From 79f49eaa334e7e20e0648c5dea7fc4975090dea3 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Sat, 10 Feb 2024 14:56:18 -0600 Subject: [PATCH] chore: Regenerate services (#1344) --- Package.swift | 3 + .../AWSAutoScaling/AutoScalingClient.swift | 198 +- .../AWSAutoScaling/models/Models.swift | 8660 +- .../models/Models.swift | 2 +- .../AWSBedrockRuntime/models/Models.swift | 2 +- .../CloudFormationClient.swift | 213 +- .../AWSCloudFormation/models/Models.swift | 10656 +- .../AWSCloudFront/CloudFrontClient.swift | 536 +- .../AWSCloudFront/models/Models.swift | 20423 ++-- .../AWSCloudSearch/CloudSearchClient.swift | 81 +- .../AWSCloudSearch/models/Models.swift | 3330 +- .../AWSCloudWatch/CloudWatchClient.swift | 117 +- .../AWSCloudWatch/models/Models.swift | 5971 +- .../AWSCloudWatchLogs/models/Models.swift | 2 +- Sources/Services/AWSDocDB/DocDBClient.swift | 162 +- Sources/Services/AWSDocDB/models/Models.swift | 9330 +- Sources/Services/AWSEC2/EC2Client.swift | 1848 +- Sources/Services/AWSEC2/models/Models.swift | 93191 ++++------------ .../AWSElastiCache/ElastiCacheClient.swift | 228 +- .../AWSElastiCache/models/Models.swift | 14942 +-- .../ElasticBeanstalkClient.swift | 144 +- .../AWSElasticBeanstalk/models/Models.swift | 7441 +- .../ElasticLoadBalancingClient.swift | 90 +- .../models/Models.swift | 4091 +- .../ElasticLoadBalancingv2Client.swift | 135 +- .../models/Models.swift | 7822 +- Sources/Services/AWSIAM/IAMClient.swift | 480 +- Sources/Services/AWSIAM/models/Models.swift | 16043 +-- .../Services/AWSKinesis/models/Models.swift | 2 +- .../Services/AWSLambda/models/Models.swift | 2 +- .../AWSLexRuntimeV2/models/Models.swift | 2 +- .../Services/AWSNeptune/NeptuneClient.swift | 210 +- .../Services/AWSNeptune/models/Models.swift | 12671 +-- Sources/Services/AWSRDS/RDSClient.swift | 471 +- Sources/Services/AWSRDS/models/Models.swift | 31774 ++---- .../Services/AWSRedshift/RedshiftClient.swift | 399 +- .../Services/AWSRedshift/models/Models.swift | 23176 +--- .../Services/AWSRoute53/Route53Client.swift | 332 +- .../Services/AWSRoute53/models/Models.swift | 9848 +- Sources/Services/AWSS3/S3Client.swift | 469 +- Sources/Services/AWSS3/models/Models.swift | 11161 +- .../AWSS3Control/S3ControlClient.swift | 436 +- .../Services/AWSS3Control/models/Models.swift | 10187 +- Sources/Services/AWSSES/SESClient.swift | 216 +- Sources/Services/AWSSES/models/Models.swift | 7346 +- Sources/Services/AWSSNS/SNSClient.swift | 129 +- Sources/Services/AWSSNS/models/Models.swift | 5018 +- Sources/Services/AWSSTS/STSClient.swift | 27 +- Sources/Services/AWSSTS/models/Models.swift | 1371 +- .../AWSSageMakerRuntime/models/Models.swift | 2 +- .../models/Models.swift | 6 +- 51 files changed, 89025 insertions(+), 232371 deletions(-) diff --git a/Package.swift b/Package.swift index dfab88c7133..f2817c515f2 100644 --- a/Package.swift +++ b/Package.swift @@ -136,6 +136,8 @@ func addIntegrationTestTarget(_ name: String) { ] case "AWSS3": additionalDependencies = ["AWSSSOAdmin"] + case "AWSSTS": + additionalDependencies = ["AWSIAM", "AWSCognitoIdentity"] default: break } @@ -625,6 +627,7 @@ let servicesWithIntegrationTests: [String] = [ "AWSMediaConvert", "AWSS3", "AWSSQS", + "AWSSTS", "AWSTranscribeStreaming", ] diff --git a/Sources/Services/AWSAutoScaling/AutoScalingClient.swift b/Sources/Services/AWSAutoScaling/AutoScalingClient.swift index 643173422f9..6436a3be8fd 100644 --- a/Sources/Services/AWSAutoScaling/AutoScalingClient.swift +++ b/Sources/Services/AWSAutoScaling/AutoScalingClient.swift @@ -11,14 +11,11 @@ public class AutoScalingClient { let config: AutoScalingClient.AutoScalingClientConfiguration let serviceName = "Auto Scaling" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: AutoScalingClient.AutoScalingClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -79,7 +76,6 @@ extension AutoScalingClient { public func attachInstances(input: AttachInstancesInput) async throws -> AttachInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachInstances") @@ -103,7 +99,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -134,7 +130,6 @@ extension AutoScalingClient { public func attachLoadBalancerTargetGroups(input: AttachLoadBalancerTargetGroupsInput) async throws -> AttachLoadBalancerTargetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachLoadBalancerTargetGroups") @@ -158,7 +153,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachLoadBalancerTargetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachLoadBalancerTargetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachLoadBalancerTargetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -180,7 +175,6 @@ extension AutoScalingClient { public func attachLoadBalancers(input: AttachLoadBalancersInput) async throws -> AttachLoadBalancersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachLoadBalancers") @@ -204,7 +198,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachLoadBalancersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachLoadBalancersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachLoadBalancersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -239,7 +233,6 @@ extension AutoScalingClient { public func attachTrafficSources(input: AttachTrafficSourcesInput) async throws -> AttachTrafficSourcesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachTrafficSources") @@ -263,7 +256,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachTrafficSourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachTrafficSourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachTrafficSourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -284,7 +277,6 @@ extension AutoScalingClient { public func batchDeleteScheduledAction(input: BatchDeleteScheduledActionInput) async throws -> BatchDeleteScheduledActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "batchDeleteScheduledAction") @@ -308,7 +300,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BatchDeleteScheduledActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BatchDeleteScheduledActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BatchDeleteScheduledActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -331,7 +323,6 @@ extension AutoScalingClient { public func batchPutScheduledUpdateGroupAction(input: BatchPutScheduledUpdateGroupActionInput) async throws -> BatchPutScheduledUpdateGroupActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "batchPutScheduledUpdateGroupAction") @@ -355,7 +346,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BatchPutScheduledUpdateGroupActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BatchPutScheduledUpdateGroupActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BatchPutScheduledUpdateGroupActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -378,7 +369,6 @@ extension AutoScalingClient { public func cancelInstanceRefresh(input: CancelInstanceRefreshInput) async throws -> CancelInstanceRefreshOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelInstanceRefresh") @@ -402,7 +392,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelInstanceRefreshOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelInstanceRefreshOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelInstanceRefreshOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -438,7 +428,6 @@ extension AutoScalingClient { public func completeLifecycleAction(input: CompleteLifecycleActionInput) async throws -> CompleteLifecycleActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "completeLifecycleAction") @@ -462,7 +451,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CompleteLifecycleActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CompleteLifecycleActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CompleteLifecycleActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -486,7 +475,6 @@ extension AutoScalingClient { public func createAutoScalingGroup(input: CreateAutoScalingGroupInput) async throws -> CreateAutoScalingGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createAutoScalingGroup") @@ -510,7 +498,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAutoScalingGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAutoScalingGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAutoScalingGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -533,7 +521,6 @@ extension AutoScalingClient { public func createLaunchConfiguration(input: CreateLaunchConfigurationInput) async throws -> CreateLaunchConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLaunchConfiguration") @@ -557,7 +544,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLaunchConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLaunchConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLaunchConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -581,7 +568,6 @@ extension AutoScalingClient { public func createOrUpdateTags(input: CreateOrUpdateTagsInput) async throws -> CreateOrUpdateTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createOrUpdateTags") @@ -605,7 +591,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateOrUpdateTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateOrUpdateTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateOrUpdateTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -628,7 +614,6 @@ extension AutoScalingClient { public func deleteAutoScalingGroup(input: DeleteAutoScalingGroupInput) async throws -> DeleteAutoScalingGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteAutoScalingGroup") @@ -652,7 +637,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAutoScalingGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAutoScalingGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAutoScalingGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -674,7 +659,6 @@ extension AutoScalingClient { public func deleteLaunchConfiguration(input: DeleteLaunchConfigurationInput) async throws -> DeleteLaunchConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLaunchConfiguration") @@ -698,7 +682,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLaunchConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLaunchConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLaunchConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -719,7 +703,6 @@ extension AutoScalingClient { public func deleteLifecycleHook(input: DeleteLifecycleHookInput) async throws -> DeleteLifecycleHookOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLifecycleHook") @@ -743,7 +726,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLifecycleHookOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLifecycleHookOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLifecycleHookOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -764,7 +747,6 @@ extension AutoScalingClient { public func deleteNotificationConfiguration(input: DeleteNotificationConfigurationInput) async throws -> DeleteNotificationConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNotificationConfiguration") @@ -788,7 +770,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNotificationConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNotificationConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNotificationConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -810,7 +792,6 @@ extension AutoScalingClient { public func deletePolicy(input: DeletePolicyInput) async throws -> DeletePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deletePolicy") @@ -834,7 +815,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -855,7 +836,6 @@ extension AutoScalingClient { public func deleteScheduledAction(input: DeleteScheduledActionInput) async throws -> DeleteScheduledActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteScheduledAction") @@ -879,7 +859,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteScheduledActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteScheduledActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteScheduledActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -901,7 +881,6 @@ extension AutoScalingClient { public func deleteTags(input: DeleteTagsInput) async throws -> DeleteTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTags") @@ -925,7 +904,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -949,7 +928,6 @@ extension AutoScalingClient { public func deleteWarmPool(input: DeleteWarmPoolInput) async throws -> DeleteWarmPoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteWarmPool") @@ -973,7 +951,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteWarmPoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteWarmPoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteWarmPoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -994,7 +972,6 @@ extension AutoScalingClient { public func describeAccountLimits(input: DescribeAccountLimitsInput) async throws -> DescribeAccountLimitsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAccountLimits") @@ -1018,7 +995,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAccountLimitsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAccountLimitsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAccountLimitsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1045,7 +1022,6 @@ extension AutoScalingClient { public func describeAdjustmentTypes(input: DescribeAdjustmentTypesInput) async throws -> DescribeAdjustmentTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAdjustmentTypes") @@ -1069,7 +1045,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAdjustmentTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAdjustmentTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAdjustmentTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1091,7 +1067,6 @@ extension AutoScalingClient { public func describeAutoScalingGroups(input: DescribeAutoScalingGroupsInput) async throws -> DescribeAutoScalingGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAutoScalingGroups") @@ -1115,7 +1090,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAutoScalingGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAutoScalingGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAutoScalingGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1137,7 +1112,6 @@ extension AutoScalingClient { public func describeAutoScalingInstances(input: DescribeAutoScalingInstancesInput) async throws -> DescribeAutoScalingInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAutoScalingInstances") @@ -1161,7 +1135,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAutoScalingInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAutoScalingInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAutoScalingInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1182,7 +1156,6 @@ extension AutoScalingClient { public func describeAutoScalingNotificationTypes(input: DescribeAutoScalingNotificationTypesInput) async throws -> DescribeAutoScalingNotificationTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAutoScalingNotificationTypes") @@ -1206,7 +1179,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAutoScalingNotificationTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAutoScalingNotificationTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAutoScalingNotificationTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1228,7 +1201,6 @@ extension AutoScalingClient { public func describeInstanceRefreshes(input: DescribeInstanceRefreshesInput) async throws -> DescribeInstanceRefreshesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceRefreshes") @@ -1252,7 +1224,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceRefreshesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceRefreshesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceRefreshesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1274,7 +1246,6 @@ extension AutoScalingClient { public func describeLaunchConfigurations(input: DescribeLaunchConfigurationsInput) async throws -> DescribeLaunchConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLaunchConfigurations") @@ -1298,7 +1269,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLaunchConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLaunchConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLaunchConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1323,7 +1294,6 @@ extension AutoScalingClient { public func describeLifecycleHookTypes(input: DescribeLifecycleHookTypesInput) async throws -> DescribeLifecycleHookTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLifecycleHookTypes") @@ -1347,7 +1317,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLifecycleHookTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLifecycleHookTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLifecycleHookTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1368,7 +1338,6 @@ extension AutoScalingClient { public func describeLifecycleHooks(input: DescribeLifecycleHooksInput) async throws -> DescribeLifecycleHooksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLifecycleHooks") @@ -1392,7 +1361,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLifecycleHooksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLifecycleHooksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLifecycleHooksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1414,7 +1383,6 @@ extension AutoScalingClient { public func describeLoadBalancerTargetGroups(input: DescribeLoadBalancerTargetGroupsInput) async throws -> DescribeLoadBalancerTargetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoadBalancerTargetGroups") @@ -1438,7 +1406,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoadBalancerTargetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoadBalancerTargetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoadBalancerTargetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1460,7 +1428,6 @@ extension AutoScalingClient { public func describeLoadBalancers(input: DescribeLoadBalancersInput) async throws -> DescribeLoadBalancersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoadBalancers") @@ -1484,7 +1451,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoadBalancersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoadBalancersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoadBalancersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1505,7 +1472,6 @@ extension AutoScalingClient { public func describeMetricCollectionTypes(input: DescribeMetricCollectionTypesInput) async throws -> DescribeMetricCollectionTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeMetricCollectionTypes") @@ -1529,7 +1495,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeMetricCollectionTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeMetricCollectionTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeMetricCollectionTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1551,7 +1517,6 @@ extension AutoScalingClient { public func describeNotificationConfigurations(input: DescribeNotificationConfigurationsInput) async throws -> DescribeNotificationConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNotificationConfigurations") @@ -1575,7 +1540,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNotificationConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNotificationConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNotificationConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1598,7 +1563,6 @@ extension AutoScalingClient { public func describePolicies(input: DescribePoliciesInput) async throws -> DescribePoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePolicies") @@ -1622,7 +1586,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1644,7 +1608,6 @@ extension AutoScalingClient { public func describeScalingActivities(input: DescribeScalingActivitiesInput) async throws -> DescribeScalingActivitiesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeScalingActivities") @@ -1668,7 +1631,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeScalingActivitiesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeScalingActivitiesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeScalingActivitiesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1689,7 +1652,6 @@ extension AutoScalingClient { public func describeScalingProcessTypes(input: DescribeScalingProcessTypesInput) async throws -> DescribeScalingProcessTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeScalingProcessTypes") @@ -1713,7 +1675,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeScalingProcessTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeScalingProcessTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeScalingProcessTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1735,7 +1697,6 @@ extension AutoScalingClient { public func describeScheduledActions(input: DescribeScheduledActionsInput) async throws -> DescribeScheduledActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeScheduledActions") @@ -1759,7 +1720,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeScheduledActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeScheduledActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeScheduledActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1781,7 +1742,6 @@ extension AutoScalingClient { public func describeTags(input: DescribeTagsInput) async throws -> DescribeTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTags") @@ -1805,7 +1765,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1826,7 +1786,6 @@ extension AutoScalingClient { public func describeTerminationPolicyTypes(input: DescribeTerminationPolicyTypesInput) async throws -> DescribeTerminationPolicyTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTerminationPolicyTypes") @@ -1850,7 +1809,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTerminationPolicyTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTerminationPolicyTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTerminationPolicyTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1872,7 +1831,6 @@ extension AutoScalingClient { public func describeTrafficSources(input: DescribeTrafficSourcesInput) async throws -> DescribeTrafficSourcesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTrafficSources") @@ -1896,7 +1854,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTrafficSourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTrafficSourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTrafficSourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1919,7 +1877,6 @@ extension AutoScalingClient { public func describeWarmPool(input: DescribeWarmPoolInput) async throws -> DescribeWarmPoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeWarmPool") @@ -1943,7 +1900,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeWarmPoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeWarmPoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeWarmPoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1964,7 +1921,6 @@ extension AutoScalingClient { public func detachInstances(input: DetachInstancesInput) async throws -> DetachInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachInstances") @@ -1988,7 +1944,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2009,7 +1965,6 @@ extension AutoScalingClient { public func detachLoadBalancerTargetGroups(input: DetachLoadBalancerTargetGroupsInput) async throws -> DetachLoadBalancerTargetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachLoadBalancerTargetGroups") @@ -2033,7 +1988,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachLoadBalancerTargetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachLoadBalancerTargetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachLoadBalancerTargetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2054,7 +2009,6 @@ extension AutoScalingClient { public func detachLoadBalancers(input: DetachLoadBalancersInput) async throws -> DetachLoadBalancersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachLoadBalancers") @@ -2078,7 +2032,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachLoadBalancersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachLoadBalancersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachLoadBalancersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2099,7 +2053,6 @@ extension AutoScalingClient { public func detachTrafficSources(input: DetachTrafficSourcesInput) async throws -> DetachTrafficSourcesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachTrafficSources") @@ -2123,7 +2076,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachTrafficSourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachTrafficSourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachTrafficSourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2144,7 +2097,6 @@ extension AutoScalingClient { public func disableMetricsCollection(input: DisableMetricsCollectionInput) async throws -> DisableMetricsCollectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableMetricsCollection") @@ -2168,7 +2120,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableMetricsCollectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableMetricsCollectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableMetricsCollectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2189,7 +2141,6 @@ extension AutoScalingClient { public func enableMetricsCollection(input: EnableMetricsCollectionInput) async throws -> EnableMetricsCollectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableMetricsCollection") @@ -2213,7 +2164,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableMetricsCollectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableMetricsCollectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableMetricsCollectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2234,7 +2185,6 @@ extension AutoScalingClient { public func enterStandby(input: EnterStandbyInput) async throws -> EnterStandbyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enterStandby") @@ -2258,7 +2208,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnterStandbyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnterStandbyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnterStandbyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2280,7 +2230,6 @@ extension AutoScalingClient { public func executePolicy(input: ExecutePolicyInput) async throws -> ExecutePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "executePolicy") @@ -2304,7 +2253,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ExecutePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ExecutePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ExecutePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2325,7 +2274,6 @@ extension AutoScalingClient { public func exitStandby(input: ExitStandbyInput) async throws -> ExitStandbyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "exitStandby") @@ -2349,7 +2297,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ExitStandbyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ExitStandbyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ExitStandbyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2370,7 +2318,6 @@ extension AutoScalingClient { public func getPredictiveScalingForecast(input: GetPredictiveScalingForecastInput) async throws -> GetPredictiveScalingForecastOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getPredictiveScalingForecast") @@ -2394,7 +2341,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPredictiveScalingForecastOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPredictiveScalingForecastOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPredictiveScalingForecastOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2431,7 +2378,6 @@ extension AutoScalingClient { public func putLifecycleHook(input: PutLifecycleHookInput) async throws -> PutLifecycleHookOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putLifecycleHook") @@ -2455,7 +2401,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutLifecycleHookOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutLifecycleHookOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutLifecycleHookOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2478,7 +2424,6 @@ extension AutoScalingClient { public func putNotificationConfiguration(input: PutNotificationConfigurationInput) async throws -> PutNotificationConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putNotificationConfiguration") @@ -2502,7 +2447,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutNotificationConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutNotificationConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutNotificationConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2525,7 +2470,6 @@ extension AutoScalingClient { public func putScalingPolicy(input: PutScalingPolicyInput) async throws -> PutScalingPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putScalingPolicy") @@ -2549,7 +2493,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutScalingPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutScalingPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutScalingPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2572,7 +2516,6 @@ extension AutoScalingClient { public func putScheduledUpdateGroupAction(input: PutScheduledUpdateGroupActionInput) async throws -> PutScheduledUpdateGroupActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putScheduledUpdateGroupAction") @@ -2596,7 +2539,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutScheduledUpdateGroupActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutScheduledUpdateGroupActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutScheduledUpdateGroupActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2618,7 +2561,6 @@ extension AutoScalingClient { public func putWarmPool(input: PutWarmPoolInput) async throws -> PutWarmPoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putWarmPool") @@ -2642,7 +2584,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutWarmPoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutWarmPoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutWarmPoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2678,7 +2620,6 @@ extension AutoScalingClient { public func recordLifecycleActionHeartbeat(input: RecordLifecycleActionHeartbeatInput) async throws -> RecordLifecycleActionHeartbeatOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "recordLifecycleActionHeartbeat") @@ -2702,7 +2643,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RecordLifecycleActionHeartbeatOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RecordLifecycleActionHeartbeatOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RecordLifecycleActionHeartbeatOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2724,7 +2665,6 @@ extension AutoScalingClient { public func resumeProcesses(input: ResumeProcessesInput) async throws -> ResumeProcessesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resumeProcesses") @@ -2748,7 +2688,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResumeProcessesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResumeProcessesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResumeProcessesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2781,7 +2721,6 @@ extension AutoScalingClient { public func rollbackInstanceRefresh(input: RollbackInstanceRefreshInput) async throws -> RollbackInstanceRefreshOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rollbackInstanceRefresh") @@ -2805,7 +2744,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RollbackInstanceRefreshOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RollbackInstanceRefreshOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RollbackInstanceRefreshOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2827,7 +2766,6 @@ extension AutoScalingClient { public func setDesiredCapacity(input: SetDesiredCapacityInput) async throws -> SetDesiredCapacityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setDesiredCapacity") @@ -2851,7 +2789,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetDesiredCapacityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetDesiredCapacityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetDesiredCapacityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2872,7 +2810,6 @@ extension AutoScalingClient { public func setInstanceHealth(input: SetInstanceHealthInput) async throws -> SetInstanceHealthOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setInstanceHealth") @@ -2896,7 +2833,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetInstanceHealthOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetInstanceHealthOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetInstanceHealthOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2918,7 +2855,6 @@ extension AutoScalingClient { public func setInstanceProtection(input: SetInstanceProtectionInput) async throws -> SetInstanceProtectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setInstanceProtection") @@ -2942,7 +2878,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetInstanceProtectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetInstanceProtectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetInstanceProtectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2965,7 +2901,6 @@ extension AutoScalingClient { public func startInstanceRefresh(input: StartInstanceRefreshInput) async throws -> StartInstanceRefreshOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startInstanceRefresh") @@ -2989,7 +2924,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartInstanceRefreshOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartInstanceRefreshOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartInstanceRefreshOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3011,7 +2946,6 @@ extension AutoScalingClient { public func suspendProcesses(input: SuspendProcessesInput) async throws -> SuspendProcessesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "suspendProcesses") @@ -3035,7 +2969,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SuspendProcessesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SuspendProcessesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SuspendProcessesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3057,7 +2991,6 @@ extension AutoScalingClient { public func terminateInstanceInAutoScalingGroup(input: TerminateInstanceInAutoScalingGroupInput) async throws -> TerminateInstanceInAutoScalingGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "terminateInstanceInAutoScalingGroup") @@ -3081,7 +3014,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TerminateInstanceInAutoScalingGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TerminateInstanceInAutoScalingGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TerminateInstanceInAutoScalingGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3113,7 +3046,6 @@ extension AutoScalingClient { public func updateAutoScalingGroup(input: UpdateAutoScalingGroupInput) async throws -> UpdateAutoScalingGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateAutoScalingGroup") @@ -3137,7 +3069,7 @@ extension AutoScalingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateAutoScalingGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateAutoScalingGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateAutoScalingGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSAutoScaling/models/Models.swift b/Sources/Services/AWSAutoScaling/models/Models.swift index 9c93496660c..ebef4abf9a8 100644 --- a/Sources/Services/AWSAutoScaling/models/Models.swift +++ b/Sources/Services/AWSAutoScaling/models/Models.swift @@ -1,8 +1,10 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML -extension AutoScalingClientTypes.AcceleratorCountRequest: Swift.Codable { +extension AutoScalingClientTypes.AcceleratorCountRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -18,12 +20,14 @@ extension AutoScalingClientTypes.AcceleratorCountRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.AcceleratorCountRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -132,7 +136,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.AcceleratorTotalMemoryMiBRequest: Swift.Codable { +extension AutoScalingClientTypes.AcceleratorTotalMemoryMiBRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -148,12 +152,14 @@ extension AutoScalingClientTypes.AcceleratorTotalMemoryMiBRequest: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.AcceleratorTotalMemoryMiBRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -213,16 +219,14 @@ extension AutoScalingClientTypes { } extension ActiveInstanceRefreshNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ActiveInstanceRefreshNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -250,23 +254,7 @@ public struct ActiveInstanceRefreshNotFoundFault: ClientRuntime.ModeledError, AW } } -struct ActiveInstanceRefreshNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ActiveInstanceRefreshNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension AutoScalingClientTypes.Activity: Swift.Codable { +extension AutoScalingClientTypes.Activity: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case activityId = "ActivityId" case autoScalingGroupARN = "AutoScalingGroupARN" @@ -322,32 +310,24 @@ extension AutoScalingClientTypes.Activity: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let activityIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .activityId) - activityId = activityIdDecoded - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let causeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cause) - cause = causeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let statusCodeDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.ScalingActivityStatusCode.self, forKey: .statusCode) - statusCode = statusCodeDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .progress) - progress = progressDecoded - let detailsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .details) - details = detailsDecoded - let autoScalingGroupStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupState) - autoScalingGroupState = autoScalingGroupStateDecoded - let autoScalingGroupARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupARN) - autoScalingGroupARN = autoScalingGroupARNDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.Activity() + value.activityId = try reader["ActivityId"].readIfPresent() + value.autoScalingGroupName = try reader["AutoScalingGroupName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.cause = try reader["Cause"].readIfPresent() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + value.statusCode = try reader["StatusCode"].readIfPresent() + value.statusMessage = try reader["StatusMessage"].readIfPresent() + value.progress = try reader["Progress"].readIfPresent() + value.details = try reader["Details"].readIfPresent() + value.autoScalingGroupState = try reader["AutoScalingGroupState"].readIfPresent() + value.autoScalingGroupARN = try reader["AutoScalingGroupARN"].readIfPresent() + return value + } } } @@ -416,7 +396,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.AdjustmentType: Swift.Codable { +extension AutoScalingClientTypes.AdjustmentType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case adjustmentType = "AdjustmentType" } @@ -428,10 +408,13 @@ extension AutoScalingClientTypes.AdjustmentType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let adjustmentTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .adjustmentType) - adjustmentType = adjustmentTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.AdjustmentType() + value.adjustmentType = try reader["AdjustmentType"].readIfPresent() + return value + } } } @@ -451,7 +434,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.Alarm: Swift.Codable { +extension AutoScalingClientTypes.Alarm: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case alarmARN = "AlarmARN" case alarmName = "AlarmName" @@ -467,12 +450,14 @@ extension AutoScalingClientTypes.Alarm: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let alarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmName) - alarmName = alarmNameDecoded - let alarmARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmARN) - alarmARN = alarmARNDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.Alarm() + value.alarmName = try reader["AlarmName"].readIfPresent() + value.alarmARN = try reader["AlarmARN"].readIfPresent() + return value + } } } @@ -496,7 +481,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.AlarmSpecification: Swift.Codable { +extension AutoScalingClientTypes.AlarmSpecification: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case alarms = "Alarms" } @@ -517,26 +502,12 @@ extension AutoScalingClientTypes.AlarmSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.alarms) { - struct KeyVal0{struct member{}} - let alarmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarms) - if let alarmsWrappedContainer = alarmsWrappedContainer { - let alarmsContainer = try alarmsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmsBuffer:[Swift.String]? = nil - if let alarmsContainer = alarmsContainer { - alarmsBuffer = [Swift.String]() - for stringContainer0 in alarmsContainer { - alarmsBuffer?.append(stringContainer0) - } - } - alarms = alarmsBuffer - } else { - alarms = [] - } - } else { - alarms = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.AlarmSpecification() + value.alarms = try reader["Alarms"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -558,16 +529,14 @@ extension AutoScalingClientTypes { } extension AlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -596,23 +565,12 @@ public struct AlreadyExistsFault: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct AlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AlreadyExistsFaultBody: Swift.Decodable { +extension AttachInstancesInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case autoScalingGroupName = "AutoScalingGroupName" + case instanceIds = "InstanceIds" } -} -extension AttachInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -659,45 +617,12 @@ public struct AttachInstancesInput: Swift.Equatable { } } -struct AttachInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let autoScalingGroupName: Swift.String? -} - -extension AttachInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceIds = "InstanceIds" - } +extension AttachInstancesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct member{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AttachInstancesOutput() } - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - } -} - -extension AttachInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -706,18 +631,30 @@ public struct AttachInstancesOutput: Swift.Equatable { public init() { } } -enum AttachInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AttachInstancesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AttachLoadBalancerTargetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case targetGroupARNs = "TargetGroupARNs" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -765,65 +702,44 @@ public struct AttachLoadBalancerTargetGroupsInput: Swift.Equatable { } } -struct AttachLoadBalancerTargetGroupsInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let targetGroupARNs: [Swift.String]? -} - -extension AttachLoadBalancerTargetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case targetGroupARNs = "TargetGroupARNs" - } +extension AttachLoadBalancerTargetGroupsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.targetGroupARNs) { - struct KeyVal0{struct member{}} - let targetGroupARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroupARNs) - if let targetGroupARNsWrappedContainer = targetGroupARNsWrappedContainer { - let targetGroupARNsContainer = try targetGroupARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var targetGroupARNsBuffer:[Swift.String]? = nil - if let targetGroupARNsContainer = targetGroupARNsContainer { - targetGroupARNsBuffer = [Swift.String]() - for stringContainer0 in targetGroupARNsContainer { - targetGroupARNsBuffer?.append(stringContainer0) - } - } - targetGroupARNs = targetGroupARNsBuffer - } else { - targetGroupARNs = [] - } - } else { - targetGroupARNs = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AttachLoadBalancerTargetGroupsOutput() } } } -extension AttachLoadBalancerTargetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct AttachLoadBalancerTargetGroupsOutput: Swift.Equatable { public init() { } } -enum AttachLoadBalancerTargetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AttachLoadBalancerTargetGroupsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AttachLoadBalancersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case loadBalancerNames = "LoadBalancerNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -871,65 +787,44 @@ public struct AttachLoadBalancersInput: Swift.Equatable { } } -struct AttachLoadBalancersInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let loadBalancerNames: [Swift.String]? -} - -extension AttachLoadBalancersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case loadBalancerNames = "LoadBalancerNames" - } +extension AttachLoadBalancersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.loadBalancerNames) { - struct KeyVal0{struct member{}} - let loadBalancerNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerNames) - if let loadBalancerNamesWrappedContainer = loadBalancerNamesWrappedContainer { - let loadBalancerNamesContainer = try loadBalancerNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerNamesBuffer:[Swift.String]? = nil - if let loadBalancerNamesContainer = loadBalancerNamesContainer { - loadBalancerNamesBuffer = [Swift.String]() - for stringContainer0 in loadBalancerNamesContainer { - loadBalancerNamesBuffer?.append(stringContainer0) - } - } - loadBalancerNames = loadBalancerNamesBuffer - } else { - loadBalancerNames = [] - } - } else { - loadBalancerNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AttachLoadBalancersOutput() } } } -extension AttachLoadBalancersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct AttachLoadBalancersOutput: Swift.Equatable { public init() { } } -enum AttachLoadBalancersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AttachLoadBalancersOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AttachTrafficSourcesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case trafficSources = "TrafficSources" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -977,67 +872,41 @@ public struct AttachTrafficSourcesInput: Swift.Equatable { } } -struct AttachTrafficSourcesInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let trafficSources: [AutoScalingClientTypes.TrafficSourceIdentifier]? -} - -extension AttachTrafficSourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case trafficSources = "TrafficSources" - } +extension AttachTrafficSourcesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.trafficSources) { - struct KeyVal0{struct member{}} - let trafficSourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficSources) - if let trafficSourcesWrappedContainer = trafficSourcesWrappedContainer { - let trafficSourcesContainer = try trafficSourcesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.TrafficSourceIdentifier].self, forKey: .member) - var trafficSourcesBuffer:[AutoScalingClientTypes.TrafficSourceIdentifier]? = nil - if let trafficSourcesContainer = trafficSourcesContainer { - trafficSourcesBuffer = [AutoScalingClientTypes.TrafficSourceIdentifier]() - for structureContainer0 in trafficSourcesContainer { - trafficSourcesBuffer?.append(structureContainer0) - } - } - trafficSources = trafficSourcesBuffer - } else { - trafficSources = [] - } - } else { - trafficSources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AttachTrafficSourcesOutput() } } } -extension AttachTrafficSourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct AttachTrafficSourcesOutput: Swift.Equatable { public init() { } } -enum AttachTrafficSourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AttachTrafficSourcesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } public enum AutoScalingClientTypes {} -extension AutoScalingClientTypes.AutoScalingGroup: Swift.Codable { +extension AutoScalingClientTypes.AutoScalingGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoScalingGroupARN = "AutoScalingGroupARN" case autoScalingGroupName = "AutoScalingGroupName" @@ -1266,231 +1135,47 @@ extension AutoScalingClientTypes.AutoScalingGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let autoScalingGroupARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupARN) - autoScalingGroupARN = autoScalingGroupARNDecoded - let launchConfigurationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationName) - launchConfigurationName = launchConfigurationNameDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let mixedInstancesPolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MixedInstancesPolicy.self, forKey: .mixedInstancesPolicy) - mixedInstancesPolicy = mixedInstancesPolicyDecoded - let minSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSize) - minSize = minSizeDecoded - let maxSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSize) - maxSize = maxSizeDecoded - let desiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredCapacity) - desiredCapacity = desiredCapacityDecoded - let predictedCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .predictedCapacity) - predictedCapacity = predictedCapacityDecoded - let defaultCooldownDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultCooldown) - defaultCooldown = defaultCooldownDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - if containerValues.contains(.loadBalancerNames) { - struct KeyVal0{struct member{}} - let loadBalancerNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerNames) - if let loadBalancerNamesWrappedContainer = loadBalancerNamesWrappedContainer { - let loadBalancerNamesContainer = try loadBalancerNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerNamesBuffer:[Swift.String]? = nil - if let loadBalancerNamesContainer = loadBalancerNamesContainer { - loadBalancerNamesBuffer = [Swift.String]() - for stringContainer0 in loadBalancerNamesContainer { - loadBalancerNamesBuffer?.append(stringContainer0) - } - } - loadBalancerNames = loadBalancerNamesBuffer - } else { - loadBalancerNames = [] - } - } else { - loadBalancerNames = nil - } - if containerValues.contains(.targetGroupARNs) { - struct KeyVal0{struct member{}} - let targetGroupARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroupARNs) - if let targetGroupARNsWrappedContainer = targetGroupARNsWrappedContainer { - let targetGroupARNsContainer = try targetGroupARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var targetGroupARNsBuffer:[Swift.String]? = nil - if let targetGroupARNsContainer = targetGroupARNsContainer { - targetGroupARNsBuffer = [Swift.String]() - for stringContainer0 in targetGroupARNsContainer { - targetGroupARNsBuffer?.append(stringContainer0) - } - } - targetGroupARNs = targetGroupARNsBuffer - } else { - targetGroupARNs = [] - } - } else { - targetGroupARNs = nil - } - let healthCheckTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckType) - healthCheckType = healthCheckTypeDecoded - let healthCheckGracePeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckGracePeriod) - healthCheckGracePeriod = healthCheckGracePeriodDecoded - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[AutoScalingClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [AutoScalingClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - let createdTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTime) - createdTime = createdTimeDecoded - if containerValues.contains(.suspendedProcesses) { - struct KeyVal0{struct member{}} - let suspendedProcessesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .suspendedProcesses) - if let suspendedProcessesWrappedContainer = suspendedProcessesWrappedContainer { - let suspendedProcessesContainer = try suspendedProcessesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.SuspendedProcess].self, forKey: .member) - var suspendedProcessesBuffer:[AutoScalingClientTypes.SuspendedProcess]? = nil - if let suspendedProcessesContainer = suspendedProcessesContainer { - suspendedProcessesBuffer = [AutoScalingClientTypes.SuspendedProcess]() - for structureContainer0 in suspendedProcessesContainer { - suspendedProcessesBuffer?.append(structureContainer0) - } - } - suspendedProcesses = suspendedProcessesBuffer - } else { - suspendedProcesses = [] - } - } else { - suspendedProcesses = nil - } - let placementGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .placementGroup) - placementGroup = placementGroupDecoded - let vpcZoneIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcZoneIdentifier) - vpcZoneIdentifier = vpcZoneIdentifierDecoded - if containerValues.contains(.enabledMetrics) { - struct KeyVal0{struct member{}} - let enabledMetricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enabledMetrics) - if let enabledMetricsWrappedContainer = enabledMetricsWrappedContainer { - let enabledMetricsContainer = try enabledMetricsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.EnabledMetric].self, forKey: .member) - var enabledMetricsBuffer:[AutoScalingClientTypes.EnabledMetric]? = nil - if let enabledMetricsContainer = enabledMetricsContainer { - enabledMetricsBuffer = [AutoScalingClientTypes.EnabledMetric]() - for structureContainer0 in enabledMetricsContainer { - enabledMetricsBuffer?.append(structureContainer0) - } - } - enabledMetrics = enabledMetricsBuffer - } else { - enabledMetrics = [] - } - } else { - enabledMetrics = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.TagDescription].self, forKey: .member) - var tagsBuffer:[AutoScalingClientTypes.TagDescription]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [AutoScalingClientTypes.TagDescription]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.terminationPolicies) { - struct KeyVal0{struct member{}} - let terminationPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .terminationPolicies) - if let terminationPoliciesWrappedContainer = terminationPoliciesWrappedContainer { - let terminationPoliciesContainer = try terminationPoliciesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var terminationPoliciesBuffer:[Swift.String]? = nil - if let terminationPoliciesContainer = terminationPoliciesContainer { - terminationPoliciesBuffer = [Swift.String]() - for stringContainer0 in terminationPoliciesContainer { - terminationPoliciesBuffer?.append(stringContainer0) - } - } - terminationPolicies = terminationPoliciesBuffer - } else { - terminationPolicies = [] - } - } else { - terminationPolicies = nil - } - let newInstancesProtectedFromScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .newInstancesProtectedFromScaleIn) - newInstancesProtectedFromScaleIn = newInstancesProtectedFromScaleInDecoded - let serviceLinkedRoleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceLinkedRoleARN) - serviceLinkedRoleARN = serviceLinkedRoleARNDecoded - let maxInstanceLifetimeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxInstanceLifetime) - maxInstanceLifetime = maxInstanceLifetimeDecoded - let capacityRebalanceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .capacityRebalance) - capacityRebalance = capacityRebalanceDecoded - let warmPoolConfigurationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.WarmPoolConfiguration.self, forKey: .warmPoolConfiguration) - warmPoolConfiguration = warmPoolConfigurationDecoded - let warmPoolSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .warmPoolSize) - warmPoolSize = warmPoolSizeDecoded - let contextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .context) - context = contextDecoded - let desiredCapacityTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .desiredCapacityType) - desiredCapacityType = desiredCapacityTypeDecoded - let defaultInstanceWarmupDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultInstanceWarmup) - defaultInstanceWarmup = defaultInstanceWarmupDecoded - if containerValues.contains(.trafficSources) { - struct KeyVal0{struct member{}} - let trafficSourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficSources) - if let trafficSourcesWrappedContainer = trafficSourcesWrappedContainer { - let trafficSourcesContainer = try trafficSourcesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.TrafficSourceIdentifier].self, forKey: .member) - var trafficSourcesBuffer:[AutoScalingClientTypes.TrafficSourceIdentifier]? = nil - if let trafficSourcesContainer = trafficSourcesContainer { - trafficSourcesBuffer = [AutoScalingClientTypes.TrafficSourceIdentifier]() - for structureContainer0 in trafficSourcesContainer { - trafficSourcesBuffer?.append(structureContainer0) - } - } - trafficSources = trafficSourcesBuffer - } else { - trafficSources = [] - } - } else { - trafficSources = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.AutoScalingGroup() + value.autoScalingGroupName = try reader["AutoScalingGroupName"].readIfPresent() + value.autoScalingGroupARN = try reader["AutoScalingGroupARN"].readIfPresent() + value.launchConfigurationName = try reader["LaunchConfigurationName"].readIfPresent() + value.launchTemplate = try reader["LaunchTemplate"].readIfPresent(readingClosure: AutoScalingClientTypes.LaunchTemplateSpecification.readingClosure) + value.mixedInstancesPolicy = try reader["MixedInstancesPolicy"].readIfPresent(readingClosure: AutoScalingClientTypes.MixedInstancesPolicy.readingClosure) + value.minSize = try reader["MinSize"].readIfPresent() + value.maxSize = try reader["MaxSize"].readIfPresent() + value.desiredCapacity = try reader["DesiredCapacity"].readIfPresent() + value.predictedCapacity = try reader["PredictedCapacity"].readIfPresent() + value.defaultCooldown = try reader["DefaultCooldown"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.loadBalancerNames = try reader["LoadBalancerNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.targetGroupARNs = try reader["TargetGroupARNs"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.healthCheckType = try reader["HealthCheckType"].readIfPresent() + value.healthCheckGracePeriod = try reader["HealthCheckGracePeriod"].readIfPresent() + value.instances = try reader["Instances"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.Instance.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.createdTime = try reader["CreatedTime"].readTimestampIfPresent(format: .dateTime) + value.suspendedProcesses = try reader["SuspendedProcesses"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.SuspendedProcess.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.placementGroup = try reader["PlacementGroup"].readIfPresent() + value.vpcZoneIdentifier = try reader["VPCZoneIdentifier"].readIfPresent() + value.enabledMetrics = try reader["EnabledMetrics"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.EnabledMetric.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.TagDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.terminationPolicies = try reader["TerminationPolicies"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.newInstancesProtectedFromScaleIn = try reader["NewInstancesProtectedFromScaleIn"].readIfPresent() + value.serviceLinkedRoleARN = try reader["ServiceLinkedRoleARN"].readIfPresent() + value.maxInstanceLifetime = try reader["MaxInstanceLifetime"].readIfPresent() + value.capacityRebalance = try reader["CapacityRebalance"].readIfPresent() + value.warmPoolConfiguration = try reader["WarmPoolConfiguration"].readIfPresent(readingClosure: AutoScalingClientTypes.WarmPoolConfiguration.readingClosure) + value.warmPoolSize = try reader["WarmPoolSize"].readIfPresent() + value.context = try reader["Context"].readIfPresent() + value.desiredCapacityType = try reader["DesiredCapacityType"].readIfPresent() + value.defaultInstanceWarmup = try reader["DefaultInstanceWarmup"].readIfPresent() + value.trafficSources = try reader["TrafficSources"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.TrafficSourceIdentifier.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.instanceMaintenancePolicy = try reader["InstanceMaintenancePolicy"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceMaintenancePolicy.readingClosure) + return value } - let instanceMaintenancePolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMaintenancePolicy.self, forKey: .instanceMaintenancePolicy) - instanceMaintenancePolicy = instanceMaintenancePolicyDecoded } } @@ -1654,7 +1339,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.AutoScalingInstanceDetails: Swift.Codable { +extension AutoScalingClientTypes.AutoScalingInstanceDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoScalingGroupName = "AutoScalingGroupName" case availabilityZone = "AvailabilityZone" @@ -1702,28 +1387,22 @@ extension AutoScalingClientTypes.AutoScalingInstanceDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let lifecycleStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleState) - lifecycleState = lifecycleStateDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let launchConfigurationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationName) - launchConfigurationName = launchConfigurationNameDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let protectedFromScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .protectedFromScaleIn) - protectedFromScaleIn = protectedFromScaleInDecoded - let weightedCapacityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .weightedCapacity) - weightedCapacity = weightedCapacityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.AutoScalingInstanceDetails() + value.instanceId = try reader["InstanceId"].readIfPresent() + value.instanceType = try reader["InstanceType"].readIfPresent() + value.autoScalingGroupName = try reader["AutoScalingGroupName"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.lifecycleState = try reader["LifecycleState"].readIfPresent() + value.healthStatus = try reader["HealthStatus"].readIfPresent() + value.launchConfigurationName = try reader["LaunchConfigurationName"].readIfPresent() + value.launchTemplate = try reader["LaunchTemplate"].readIfPresent(readingClosure: AutoScalingClientTypes.LaunchTemplateSpecification.readingClosure) + value.protectedFromScaleIn = try reader["ProtectedFromScaleIn"].readIfPresent() + value.weightedCapacity = try reader["WeightedCapacity"].readIfPresent() + return value + } } } @@ -1820,7 +1499,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.BaselineEbsBandwidthMbpsRequest: Swift.Codable { +extension AutoScalingClientTypes.BaselineEbsBandwidthMbpsRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -1836,12 +1515,14 @@ extension AutoScalingClientTypes.BaselineEbsBandwidthMbpsRequest: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.BaselineEbsBandwidthMbpsRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -1866,6 +1547,11 @@ extension AutoScalingClientTypes { } extension BatchDeleteScheduledActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case scheduledActionNames = "ScheduledActionNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -1913,51 +1599,15 @@ public struct BatchDeleteScheduledActionInput: Swift.Equatable { } } -struct BatchDeleteScheduledActionInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let scheduledActionNames: [Swift.String]? -} - -extension BatchDeleteScheduledActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case scheduledActionNames = "ScheduledActionNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.scheduledActionNames) { - struct KeyVal0{struct member{}} - let scheduledActionNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledActionNames) - if let scheduledActionNamesWrappedContainer = scheduledActionNamesWrappedContainer { - let scheduledActionNamesContainer = try scheduledActionNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scheduledActionNamesBuffer:[Swift.String]? = nil - if let scheduledActionNamesContainer = scheduledActionNamesContainer { - scheduledActionNamesBuffer = [Swift.String]() - for stringContainer0 in scheduledActionNamesContainer { - scheduledActionNamesBuffer?.append(stringContainer0) - } - } - scheduledActionNames = scheduledActionNamesBuffer - } else { - scheduledActionNames = [] - } - } else { - scheduledActionNames = nil - } - } -} +extension BatchDeleteScheduledActionOutput { -extension BatchDeleteScheduledActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BatchDeleteScheduledActionOutputBody = try responseDecoder.decode(responseBody: data) - self.failedScheduledActions = output.failedScheduledActions - } else { - self.failedScheduledActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BatchDeleteScheduledActionResult"] + var value = BatchDeleteScheduledActionOutput() + value.failedScheduledActions = try reader["FailedScheduledActions"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -1974,51 +1624,29 @@ public struct BatchDeleteScheduledActionOutput: Swift.Equatable { } } -struct BatchDeleteScheduledActionOutputBody: Swift.Equatable { - let failedScheduledActions: [AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest]? -} +enum BatchDeleteScheduledActionOutputError { -extension BatchDeleteScheduledActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failedScheduledActions = "FailedScheduledActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BatchDeleteScheduledActionResult")) - if containerValues.contains(.failedScheduledActions) { - struct KeyVal0{struct member{}} - let failedScheduledActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failedScheduledActions) - if let failedScheduledActionsWrappedContainer = failedScheduledActionsWrappedContainer { - let failedScheduledActionsContainer = try failedScheduledActionsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest].self, forKey: .member) - var failedScheduledActionsBuffer:[AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest]? = nil - if let failedScheduledActionsContainer = failedScheduledActionsContainer { - failedScheduledActionsBuffer = [AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest]() - for structureContainer0 in failedScheduledActionsContainer { - failedScheduledActionsBuffer?.append(structureContainer0) - } - } - failedScheduledActions = failedScheduledActionsBuffer - } else { - failedScheduledActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - failedScheduledActions = nil } } } -enum BatchDeleteScheduledActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension BatchPutScheduledUpdateGroupActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case scheduledUpdateGroupActions = "ScheduledUpdateGroupActions" } -} -extension BatchPutScheduledUpdateGroupActionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -2066,51 +1694,15 @@ public struct BatchPutScheduledUpdateGroupActionInput: Swift.Equatable { } } -struct BatchPutScheduledUpdateGroupActionInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let scheduledUpdateGroupActions: [AutoScalingClientTypes.ScheduledUpdateGroupActionRequest]? -} - -extension BatchPutScheduledUpdateGroupActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case scheduledUpdateGroupActions = "ScheduledUpdateGroupActions" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.scheduledUpdateGroupActions) { - struct KeyVal0{struct member{}} - let scheduledUpdateGroupActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledUpdateGroupActions) - if let scheduledUpdateGroupActionsWrappedContainer = scheduledUpdateGroupActionsWrappedContainer { - let scheduledUpdateGroupActionsContainer = try scheduledUpdateGroupActionsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.ScheduledUpdateGroupActionRequest].self, forKey: .member) - var scheduledUpdateGroupActionsBuffer:[AutoScalingClientTypes.ScheduledUpdateGroupActionRequest]? = nil - if let scheduledUpdateGroupActionsContainer = scheduledUpdateGroupActionsContainer { - scheduledUpdateGroupActionsBuffer = [AutoScalingClientTypes.ScheduledUpdateGroupActionRequest]() - for structureContainer0 in scheduledUpdateGroupActionsContainer { - scheduledUpdateGroupActionsBuffer?.append(structureContainer0) - } - } - scheduledUpdateGroupActions = scheduledUpdateGroupActionsBuffer - } else { - scheduledUpdateGroupActions = [] - } - } else { - scheduledUpdateGroupActions = nil - } - } -} +extension BatchPutScheduledUpdateGroupActionOutput { -extension BatchPutScheduledUpdateGroupActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BatchPutScheduledUpdateGroupActionOutputBody = try responseDecoder.decode(responseBody: data) - self.failedScheduledUpdateGroupActions = output.failedScheduledUpdateGroupActions - } else { - self.failedScheduledUpdateGroupActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BatchPutScheduledUpdateGroupActionResult"] + var value = BatchPutScheduledUpdateGroupActionOutput() + value.failedScheduledUpdateGroupActions = try reader["FailedScheduledUpdateGroupActions"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2127,53 +1719,26 @@ public struct BatchPutScheduledUpdateGroupActionOutput: Swift.Equatable { } } -struct BatchPutScheduledUpdateGroupActionOutputBody: Swift.Equatable { - let failedScheduledUpdateGroupActions: [AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest]? -} +enum BatchPutScheduledUpdateGroupActionOutputError { -extension BatchPutScheduledUpdateGroupActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failedScheduledUpdateGroupActions = "FailedScheduledUpdateGroupActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BatchPutScheduledUpdateGroupActionResult")) - if containerValues.contains(.failedScheduledUpdateGroupActions) { - struct KeyVal0{struct member{}} - let failedScheduledUpdateGroupActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failedScheduledUpdateGroupActions) - if let failedScheduledUpdateGroupActionsWrappedContainer = failedScheduledUpdateGroupActionsWrappedContainer { - let failedScheduledUpdateGroupActionsContainer = try failedScheduledUpdateGroupActionsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest].self, forKey: .member) - var failedScheduledUpdateGroupActionsBuffer:[AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest]? = nil - if let failedScheduledUpdateGroupActionsContainer = failedScheduledUpdateGroupActionsContainer { - failedScheduledUpdateGroupActionsBuffer = [AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest]() - for structureContainer0 in failedScheduledUpdateGroupActionsContainer { - failedScheduledUpdateGroupActionsBuffer?.append(structureContainer0) - } - } - failedScheduledUpdateGroupActions = failedScheduledUpdateGroupActionsBuffer - } else { - failedScheduledUpdateGroupActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - failedScheduledUpdateGroupActions = nil - } - } -} - -enum BatchPutScheduledUpdateGroupActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension AutoScalingClientTypes.BlockDeviceMapping: Swift.Codable { +extension AutoScalingClientTypes.BlockDeviceMapping: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deviceName = "DeviceName" case ebs = "Ebs" @@ -2197,16 +1762,16 @@ extension AutoScalingClientTypes.BlockDeviceMapping: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let virtualNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualName) - virtualName = virtualNameDecoded - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let ebsDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.Ebs.self, forKey: .ebs) - ebs = ebsDecoded - let noDeviceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .noDevice) - noDevice = noDeviceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.BlockDeviceMapping() + value.virtualName = try reader["VirtualName"].readIfPresent() + value.deviceName = try reader["DeviceName"].readIfPresent() + value.ebs = try reader["Ebs"].readIfPresent(readingClosure: AutoScalingClientTypes.Ebs.readingClosure) + value.noDevice = try reader["NoDevice"].readIfPresent() + return value + } } } @@ -2275,6 +1840,10 @@ extension AutoScalingClientTypes { } extension CancelInstanceRefreshInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -2305,30 +1874,15 @@ public struct CancelInstanceRefreshInput: Swift.Equatable { } } -struct CancelInstanceRefreshInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? -} - -extension CancelInstanceRefreshInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - } -} +extension CancelInstanceRefreshOutput { -extension CancelInstanceRefreshOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelInstanceRefreshOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceRefreshId = output.instanceRefreshId - } else { - self.instanceRefreshId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CancelInstanceRefreshResult"] + var value = CancelInstanceRefreshOutput() + value.instanceRefreshId = try reader["InstanceRefreshId"].readIfPresent() + return value } } } @@ -2345,36 +1899,26 @@ public struct CancelInstanceRefreshOutput: Swift.Equatable { } } -struct CancelInstanceRefreshOutputBody: Swift.Equatable { - let instanceRefreshId: Swift.String? -} - -extension CancelInstanceRefreshOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceRefreshId = "InstanceRefreshId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CancelInstanceRefreshResult")) - let instanceRefreshIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceRefreshId) - instanceRefreshId = instanceRefreshIdDecoded - } -} +enum CancelInstanceRefreshOutputError { -enum CancelInstanceRefreshOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ActiveInstanceRefreshNotFound": return try await ActiveInstanceRefreshNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ActiveInstanceRefreshNotFound": return try await ActiveInstanceRefreshNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.CapacityForecast: Swift.Codable { +extension AutoScalingClientTypes.CapacityForecast: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case timestamps = "Timestamps" case values = "Values" @@ -2408,45 +1952,13 @@ extension AutoScalingClientTypes.CapacityForecast: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.timestamps) { - struct KeyVal0{struct member{}} - let timestampsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .timestamps) - if let timestampsWrappedContainer = timestampsWrappedContainer { - let timestampsContainer = try timestampsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var timestampsBuffer:[ClientRuntime.Date]? = nil - if let timestampsContainer = timestampsContainer { - timestampsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in timestampsContainer { - try timestampsBuffer?.append(timestampsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - timestamps = timestampsBuffer - } else { - timestamps = [] - } - } else { - timestamps = nil - } - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.Double].self, forKey: .member) - var valuesBuffer:[Swift.Double]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.Double]() - for doubleContainer0 in valuesContainer { - valuesBuffer?.append(doubleContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.CapacityForecast() + value.timestamps = try reader["Timestamps"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "member", isFlattened: false) + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.Double.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2474,6 +1986,14 @@ extension AutoScalingClientTypes { } extension CompleteLifecycleActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case instanceId = "InstanceId" + case lifecycleActionResult = "LifecycleActionResult" + case lifecycleActionToken = "LifecycleActionToken" + case lifecycleHookName = "LifecycleHookName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -2534,40 +2054,12 @@ public struct CompleteLifecycleActionInput: Swift.Equatable { } } -struct CompleteLifecycleActionInputBody: Swift.Equatable { - let lifecycleHookName: Swift.String? - let autoScalingGroupName: Swift.String? - let lifecycleActionToken: Swift.String? - let lifecycleActionResult: Swift.String? - let instanceId: Swift.String? -} - -extension CompleteLifecycleActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceId = "InstanceId" - case lifecycleActionResult = "LifecycleActionResult" - case lifecycleActionToken = "LifecycleActionToken" - case lifecycleHookName = "LifecycleHookName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lifecycleHookNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleHookName) - lifecycleHookName = lifecycleHookNameDecoded - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let lifecycleActionTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleActionToken) - lifecycleActionToken = lifecycleActionTokenDecoded - let lifecycleActionResultDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleActionResult) - lifecycleActionResult = lifecycleActionResultDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - } -} +extension CompleteLifecycleActionOutput { -extension CompleteLifecycleActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CompleteLifecycleActionOutput() + } } } @@ -2576,12 +2068,19 @@ public struct CompleteLifecycleActionOutput: Swift.Equatable { public init() { } } -enum CompleteLifecycleActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CompleteLifecycleActionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -2622,6 +2121,37 @@ extension AutoScalingClientTypes { } extension CreateAutoScalingGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case availabilityZones = "AvailabilityZones" + case capacityRebalance = "CapacityRebalance" + case context = "Context" + case defaultCooldown = "DefaultCooldown" + case defaultInstanceWarmup = "DefaultInstanceWarmup" + case desiredCapacity = "DesiredCapacity" + case desiredCapacityType = "DesiredCapacityType" + case healthCheckGracePeriod = "HealthCheckGracePeriod" + case healthCheckType = "HealthCheckType" + case instanceId = "InstanceId" + case instanceMaintenancePolicy = "InstanceMaintenancePolicy" + case launchConfigurationName = "LaunchConfigurationName" + case launchTemplate = "LaunchTemplate" + case lifecycleHookSpecificationList = "LifecycleHookSpecificationList" + case loadBalancerNames = "LoadBalancerNames" + case maxInstanceLifetime = "MaxInstanceLifetime" + case maxSize = "MaxSize" + case minSize = "MinSize" + case mixedInstancesPolicy = "MixedInstancesPolicy" + case newInstancesProtectedFromScaleIn = "NewInstancesProtectedFromScaleIn" + case placementGroup = "PlacementGroup" + case serviceLinkedRoleARN = "ServiceLinkedRoleARN" + case tags = "Tags" + case targetGroupARNs = "TargetGroupARNs" + case terminationPolicies = "TerminationPolicies" + case trafficSources = "TrafficSources" + case vpcZoneIdentifier = "VPCZoneIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -2906,251 +2436,12 @@ public struct CreateAutoScalingGroupInput: Swift.Equatable { } } -struct CreateAutoScalingGroupInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let launchConfigurationName: Swift.String? - let launchTemplate: AutoScalingClientTypes.LaunchTemplateSpecification? - let mixedInstancesPolicy: AutoScalingClientTypes.MixedInstancesPolicy? - let instanceId: Swift.String? - let minSize: Swift.Int? - let maxSize: Swift.Int? - let desiredCapacity: Swift.Int? - let defaultCooldown: Swift.Int? - let availabilityZones: [Swift.String]? - let loadBalancerNames: [Swift.String]? - let targetGroupARNs: [Swift.String]? - let healthCheckType: Swift.String? - let healthCheckGracePeriod: Swift.Int? - let placementGroup: Swift.String? - let vpcZoneIdentifier: Swift.String? - let terminationPolicies: [Swift.String]? - let newInstancesProtectedFromScaleIn: Swift.Bool? - let capacityRebalance: Swift.Bool? - let lifecycleHookSpecificationList: [AutoScalingClientTypes.LifecycleHookSpecification]? - let tags: [AutoScalingClientTypes.Tag]? - let serviceLinkedRoleARN: Swift.String? - let maxInstanceLifetime: Swift.Int? - let context: Swift.String? - let desiredCapacityType: Swift.String? - let defaultInstanceWarmup: Swift.Int? - let trafficSources: [AutoScalingClientTypes.TrafficSourceIdentifier]? - let instanceMaintenancePolicy: AutoScalingClientTypes.InstanceMaintenancePolicy? -} - -extension CreateAutoScalingGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case availabilityZones = "AvailabilityZones" - case capacityRebalance = "CapacityRebalance" - case context = "Context" - case defaultCooldown = "DefaultCooldown" - case defaultInstanceWarmup = "DefaultInstanceWarmup" - case desiredCapacity = "DesiredCapacity" - case desiredCapacityType = "DesiredCapacityType" - case healthCheckGracePeriod = "HealthCheckGracePeriod" - case healthCheckType = "HealthCheckType" - case instanceId = "InstanceId" - case instanceMaintenancePolicy = "InstanceMaintenancePolicy" - case launchConfigurationName = "LaunchConfigurationName" - case launchTemplate = "LaunchTemplate" - case lifecycleHookSpecificationList = "LifecycleHookSpecificationList" - case loadBalancerNames = "LoadBalancerNames" - case maxInstanceLifetime = "MaxInstanceLifetime" - case maxSize = "MaxSize" - case minSize = "MinSize" - case mixedInstancesPolicy = "MixedInstancesPolicy" - case newInstancesProtectedFromScaleIn = "NewInstancesProtectedFromScaleIn" - case placementGroup = "PlacementGroup" - case serviceLinkedRoleARN = "ServiceLinkedRoleARN" - case tags = "Tags" - case targetGroupARNs = "TargetGroupARNs" - case terminationPolicies = "TerminationPolicies" - case trafficSources = "TrafficSources" - case vpcZoneIdentifier = "VPCZoneIdentifier" - } +extension CreateAutoScalingGroupOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let launchConfigurationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationName) - launchConfigurationName = launchConfigurationNameDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let mixedInstancesPolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MixedInstancesPolicy.self, forKey: .mixedInstancesPolicy) - mixedInstancesPolicy = mixedInstancesPolicyDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let minSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSize) - minSize = minSizeDecoded - let maxSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSize) - maxSize = maxSizeDecoded - let desiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredCapacity) - desiredCapacity = desiredCapacityDecoded - let defaultCooldownDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultCooldown) - defaultCooldown = defaultCooldownDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - if containerValues.contains(.loadBalancerNames) { - struct KeyVal0{struct member{}} - let loadBalancerNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerNames) - if let loadBalancerNamesWrappedContainer = loadBalancerNamesWrappedContainer { - let loadBalancerNamesContainer = try loadBalancerNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerNamesBuffer:[Swift.String]? = nil - if let loadBalancerNamesContainer = loadBalancerNamesContainer { - loadBalancerNamesBuffer = [Swift.String]() - for stringContainer0 in loadBalancerNamesContainer { - loadBalancerNamesBuffer?.append(stringContainer0) - } - } - loadBalancerNames = loadBalancerNamesBuffer - } else { - loadBalancerNames = [] - } - } else { - loadBalancerNames = nil - } - if containerValues.contains(.targetGroupARNs) { - struct KeyVal0{struct member{}} - let targetGroupARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroupARNs) - if let targetGroupARNsWrappedContainer = targetGroupARNsWrappedContainer { - let targetGroupARNsContainer = try targetGroupARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var targetGroupARNsBuffer:[Swift.String]? = nil - if let targetGroupARNsContainer = targetGroupARNsContainer { - targetGroupARNsBuffer = [Swift.String]() - for stringContainer0 in targetGroupARNsContainer { - targetGroupARNsBuffer?.append(stringContainer0) - } - } - targetGroupARNs = targetGroupARNsBuffer - } else { - targetGroupARNs = [] - } - } else { - targetGroupARNs = nil - } - let healthCheckTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckType) - healthCheckType = healthCheckTypeDecoded - let healthCheckGracePeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckGracePeriod) - healthCheckGracePeriod = healthCheckGracePeriodDecoded - let placementGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .placementGroup) - placementGroup = placementGroupDecoded - let vpcZoneIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcZoneIdentifier) - vpcZoneIdentifier = vpcZoneIdentifierDecoded - if containerValues.contains(.terminationPolicies) { - struct KeyVal0{struct member{}} - let terminationPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .terminationPolicies) - if let terminationPoliciesWrappedContainer = terminationPoliciesWrappedContainer { - let terminationPoliciesContainer = try terminationPoliciesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var terminationPoliciesBuffer:[Swift.String]? = nil - if let terminationPoliciesContainer = terminationPoliciesContainer { - terminationPoliciesBuffer = [Swift.String]() - for stringContainer0 in terminationPoliciesContainer { - terminationPoliciesBuffer?.append(stringContainer0) - } - } - terminationPolicies = terminationPoliciesBuffer - } else { - terminationPolicies = [] - } - } else { - terminationPolicies = nil - } - let newInstancesProtectedFromScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .newInstancesProtectedFromScaleIn) - newInstancesProtectedFromScaleIn = newInstancesProtectedFromScaleInDecoded - let capacityRebalanceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .capacityRebalance) - capacityRebalance = capacityRebalanceDecoded - if containerValues.contains(.lifecycleHookSpecificationList) { - struct KeyVal0{struct member{}} - let lifecycleHookSpecificationListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .lifecycleHookSpecificationList) - if let lifecycleHookSpecificationListWrappedContainer = lifecycleHookSpecificationListWrappedContainer { - let lifecycleHookSpecificationListContainer = try lifecycleHookSpecificationListWrappedContainer.decodeIfPresent([AutoScalingClientTypes.LifecycleHookSpecification].self, forKey: .member) - var lifecycleHookSpecificationListBuffer:[AutoScalingClientTypes.LifecycleHookSpecification]? = nil - if let lifecycleHookSpecificationListContainer = lifecycleHookSpecificationListContainer { - lifecycleHookSpecificationListBuffer = [AutoScalingClientTypes.LifecycleHookSpecification]() - for structureContainer0 in lifecycleHookSpecificationListContainer { - lifecycleHookSpecificationListBuffer?.append(structureContainer0) - } - } - lifecycleHookSpecificationList = lifecycleHookSpecificationListBuffer - } else { - lifecycleHookSpecificationList = [] - } - } else { - lifecycleHookSpecificationList = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[AutoScalingClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [AutoScalingClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let serviceLinkedRoleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceLinkedRoleARN) - serviceLinkedRoleARN = serviceLinkedRoleARNDecoded - let maxInstanceLifetimeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxInstanceLifetime) - maxInstanceLifetime = maxInstanceLifetimeDecoded - let contextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .context) - context = contextDecoded - let desiredCapacityTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .desiredCapacityType) - desiredCapacityType = desiredCapacityTypeDecoded - let defaultInstanceWarmupDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultInstanceWarmup) - defaultInstanceWarmup = defaultInstanceWarmupDecoded - if containerValues.contains(.trafficSources) { - struct KeyVal0{struct member{}} - let trafficSourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficSources) - if let trafficSourcesWrappedContainer = trafficSourcesWrappedContainer { - let trafficSourcesContainer = try trafficSourcesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.TrafficSourceIdentifier].self, forKey: .member) - var trafficSourcesBuffer:[AutoScalingClientTypes.TrafficSourceIdentifier]? = nil - if let trafficSourcesContainer = trafficSourcesContainer { - trafficSourcesBuffer = [AutoScalingClientTypes.TrafficSourceIdentifier]() - for structureContainer0 in trafficSourcesContainer { - trafficSourcesBuffer?.append(structureContainer0) - } - } - trafficSources = trafficSourcesBuffer - } else { - trafficSources = [] - } - } else { - trafficSources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateAutoScalingGroupOutput() } - let instanceMaintenancePolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMaintenancePolicy.self, forKey: .instanceMaintenancePolicy) - instanceMaintenancePolicy = instanceMaintenancePolicyDecoded - } -} - -extension CreateAutoScalingGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -3159,20 +2450,49 @@ public struct CreateAutoScalingGroupOutput: Swift.Equatable { public init() { } } -enum CreateAutoScalingGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateAutoScalingGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateLaunchConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case associatePublicIpAddress = "AssociatePublicIpAddress" + case blockDeviceMappings = "BlockDeviceMappings" + case classicLinkVPCId = "ClassicLinkVPCId" + case classicLinkVPCSecurityGroups = "ClassicLinkVPCSecurityGroups" + case ebsOptimized = "EbsOptimized" + case iamInstanceProfile = "IamInstanceProfile" + case imageId = "ImageId" + case instanceId = "InstanceId" + case instanceMonitoring = "InstanceMonitoring" + case instanceType = "InstanceType" + case kernelId = "KernelId" + case keyName = "KeyName" + case launchConfigurationName = "LaunchConfigurationName" + case metadataOptions = "MetadataOptions" + case placementTenancy = "PlacementTenancy" + case ramdiskId = "RamdiskId" + case securityGroups = "SecurityGroups" + case spotPrice = "SpotPrice" + case userData = "UserData" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let associatePublicIpAddress = associatePublicIpAddress { @@ -3356,147 +2676,12 @@ public struct CreateLaunchConfigurationInput: Swift.Equatable { } } -struct CreateLaunchConfigurationInputBody: Swift.Equatable { - let launchConfigurationName: Swift.String? - let imageId: Swift.String? - let keyName: Swift.String? - let securityGroups: [Swift.String]? - let classicLinkVPCId: Swift.String? - let classicLinkVPCSecurityGroups: [Swift.String]? - let userData: Swift.String? - let instanceId: Swift.String? - let instanceType: Swift.String? - let kernelId: Swift.String? - let ramdiskId: Swift.String? - let blockDeviceMappings: [AutoScalingClientTypes.BlockDeviceMapping]? - let instanceMonitoring: AutoScalingClientTypes.InstanceMonitoring? - let spotPrice: Swift.String? - let iamInstanceProfile: Swift.String? - let ebsOptimized: Swift.Bool? - let associatePublicIpAddress: Swift.Bool? - let placementTenancy: Swift.String? - let metadataOptions: AutoScalingClientTypes.InstanceMetadataOptions? -} - -extension CreateLaunchConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatePublicIpAddress = "AssociatePublicIpAddress" - case blockDeviceMappings = "BlockDeviceMappings" - case classicLinkVPCId = "ClassicLinkVPCId" - case classicLinkVPCSecurityGroups = "ClassicLinkVPCSecurityGroups" - case ebsOptimized = "EbsOptimized" - case iamInstanceProfile = "IamInstanceProfile" - case imageId = "ImageId" - case instanceId = "InstanceId" - case instanceMonitoring = "InstanceMonitoring" - case instanceType = "InstanceType" - case kernelId = "KernelId" - case keyName = "KeyName" - case launchConfigurationName = "LaunchConfigurationName" - case metadataOptions = "MetadataOptions" - case placementTenancy = "PlacementTenancy" - case ramdiskId = "RamdiskId" - case securityGroups = "SecurityGroups" - case spotPrice = "SpotPrice" - case userData = "UserData" - } +extension CreateLaunchConfigurationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchConfigurationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationName) - launchConfigurationName = launchConfigurationNameDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let classicLinkVPCIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .classicLinkVPCId) - classicLinkVPCId = classicLinkVPCIdDecoded - if containerValues.contains(.classicLinkVPCSecurityGroups) { - struct KeyVal0{struct member{}} - let classicLinkVPCSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .classicLinkVPCSecurityGroups) - if let classicLinkVPCSecurityGroupsWrappedContainer = classicLinkVPCSecurityGroupsWrappedContainer { - let classicLinkVPCSecurityGroupsContainer = try classicLinkVPCSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var classicLinkVPCSecurityGroupsBuffer:[Swift.String]? = nil - if let classicLinkVPCSecurityGroupsContainer = classicLinkVPCSecurityGroupsContainer { - classicLinkVPCSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in classicLinkVPCSecurityGroupsContainer { - classicLinkVPCSecurityGroupsBuffer?.append(stringContainer0) - } - } - classicLinkVPCSecurityGroups = classicLinkVPCSecurityGroupsBuffer - } else { - classicLinkVPCSecurityGroups = [] - } - } else { - classicLinkVPCSecurityGroups = nil - } - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct member{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[AutoScalingClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [AutoScalingClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateLaunchConfigurationOutput() } - let instanceMonitoringDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMonitoring.self, forKey: .instanceMonitoring) - instanceMonitoring = instanceMonitoringDecoded - let spotPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotPrice) - spotPrice = spotPriceDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let associatePublicIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associatePublicIpAddress) - associatePublicIpAddress = associatePublicIpAddressDecoded - let placementTenancyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .placementTenancy) - placementTenancy = placementTenancyDecoded - let metadataOptionsDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMetadataOptions.self, forKey: .metadataOptions) - metadataOptions = metadataOptionsDecoded - } -} - -extension CreateLaunchConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -3505,19 +2690,30 @@ public struct CreateLaunchConfigurationOutput: Swift.Equatable { public init() { } } -enum CreateLaunchConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateLaunchConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateOrUpdateTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let tags = tags { @@ -3557,63 +2753,41 @@ public struct CreateOrUpdateTagsInput: Swift.Equatable { } } -struct CreateOrUpdateTagsInputBody: Swift.Equatable { - let tags: [AutoScalingClientTypes.Tag]? -} - -extension CreateOrUpdateTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +extension CreateOrUpdateTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[AutoScalingClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [AutoScalingClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateOrUpdateTagsOutput() } } } -extension CreateOrUpdateTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct CreateOrUpdateTagsOutput: Swift.Equatable { public init() { } } -enum CreateOrUpdateTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateOrUpdateTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.CustomizedMetricSpecification: Swift.Codable { +extension AutoScalingClientTypes.CustomizedMetricSpecification: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dimensions = "Dimensions" case metricName = "MetricName" @@ -3663,53 +2837,17 @@ extension AutoScalingClientTypes.CustomizedMetricSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.MetricDimension].self, forKey: .member) - var dimensionsBuffer:[AutoScalingClientTypes.MetricDimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [AutoScalingClientTypes.MetricDimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil - } - let statisticDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MetricStatistic.self, forKey: .statistic) - statistic = statisticDecoded - let unitDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .unit) - unit = unitDecoded - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.TargetTrackingMetricDataQuery].self, forKey: .member) - var metricsBuffer:[AutoScalingClientTypes.TargetTrackingMetricDataQuery]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [AutoScalingClientTypes.TargetTrackingMetricDataQuery]() - for structureContainer0 in metricsContainer { - metricsBuffer?.append(structureContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] - } - } else { - metrics = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.CustomizedMetricSpecification() + value.metricName = try reader["MetricName"].readIfPresent() + value.namespace = try reader["Namespace"].readIfPresent() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.MetricDimension.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.statistic = try reader["Statistic"].readIfPresent() + value.unit = try reader["Unit"].readIfPresent() + value.metrics = try reader["Metrics"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.TargetTrackingMetricDataQuery.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3758,6 +2896,11 @@ extension AutoScalingClientTypes { } extension DeleteAutoScalingGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case forceDelete = "ForceDelete" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -3795,28 +2938,12 @@ public struct DeleteAutoScalingGroupInput: Swift.Equatable { } } -struct DeleteAutoScalingGroupInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let forceDelete: Swift.Bool? -} - -extension DeleteAutoScalingGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case forceDelete = "ForceDelete" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let forceDeleteDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forceDelete) - forceDelete = forceDeleteDecoded - } -} +extension DeleteAutoScalingGroupOutput { -extension DeleteAutoScalingGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAutoScalingGroupOutput() + } } } @@ -3825,19 +2952,30 @@ public struct DeleteAutoScalingGroupOutput: Swift.Equatable { public init() { } } -enum DeleteAutoScalingGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAutoScalingGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteLaunchConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case launchConfigurationName = "LaunchConfigurationName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let launchConfigurationName = launchConfigurationName { @@ -3868,24 +3006,12 @@ public struct DeleteLaunchConfigurationInput: Swift.Equatable { } } -struct DeleteLaunchConfigurationInputBody: Swift.Equatable { - let launchConfigurationName: Swift.String? -} - -extension DeleteLaunchConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchConfigurationName = "LaunchConfigurationName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchConfigurationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationName) - launchConfigurationName = launchConfigurationNameDecoded - } -} +extension DeleteLaunchConfigurationOutput { -extension DeleteLaunchConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteLaunchConfigurationOutput() + } } } @@ -3894,18 +3020,30 @@ public struct DeleteLaunchConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteLaunchConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteLaunchConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteLifecycleHookInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case lifecycleHookName = "LifecycleHookName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -3944,28 +3082,12 @@ public struct DeleteLifecycleHookInput: Swift.Equatable { } } -struct DeleteLifecycleHookInputBody: Swift.Equatable { - let lifecycleHookName: Swift.String? - let autoScalingGroupName: Swift.String? -} - -extension DeleteLifecycleHookInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case lifecycleHookName = "LifecycleHookName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lifecycleHookNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleHookName) - lifecycleHookName = lifecycleHookNameDecoded - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - } -} +extension DeleteLifecycleHookOutput { -extension DeleteLifecycleHookOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteLifecycleHookOutput() + } } } @@ -3974,17 +3096,29 @@ public struct DeleteLifecycleHookOutput: Swift.Equatable { public init() { } } -enum DeleteLifecycleHookOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteLifecycleHookOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteNotificationConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case topicARN = "TopicARN" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -4023,28 +3157,12 @@ public struct DeleteNotificationConfigurationInput: Swift.Equatable { } } -struct DeleteNotificationConfigurationInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let topicARN: Swift.String? -} - -extension DeleteNotificationConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case topicARN = "TopicARN" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let topicARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicARN) - topicARN = topicARNDecoded - } -} +extension DeleteNotificationConfigurationOutput { -extension DeleteNotificationConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteNotificationConfigurationOutput() + } } } @@ -4053,17 +3171,29 @@ public struct DeleteNotificationConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteNotificationConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteNotificationConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeletePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case policyName = "PolicyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -4101,28 +3231,12 @@ public struct DeletePolicyInput: Swift.Equatable { } } -struct DeletePolicyInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let policyName: Swift.String? -} - -extension DeletePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - } -} +extension DeletePolicyOutput { -extension DeletePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeletePolicyOutput() + } } } @@ -4131,18 +3245,30 @@ public struct DeletePolicyOutput: Swift.Equatable { public init() { } } -enum DeletePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeletePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteScheduledActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case scheduledActionName = "ScheduledActionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -4181,28 +3307,12 @@ public struct DeleteScheduledActionInput: Swift.Equatable { } } -struct DeleteScheduledActionInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let scheduledActionName: Swift.String? -} - -extension DeleteScheduledActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case scheduledActionName = "ScheduledActionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - } -} +extension DeleteScheduledActionOutput { -extension DeleteScheduledActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteScheduledActionOutput() + } } } @@ -4211,17 +3321,28 @@ public struct DeleteScheduledActionOutput: Swift.Equatable { public init() { } } -enum DeleteScheduledActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteScheduledActionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let tags = tags { @@ -4261,61 +3382,44 @@ public struct DeleteTagsInput: Swift.Equatable { } } -struct DeleteTagsInputBody: Swift.Equatable { - let tags: [AutoScalingClientTypes.Tag]? -} - -extension DeleteTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +extension DeleteTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[AutoScalingClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [AutoScalingClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTagsOutput() } } } -extension DeleteTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DeleteTagsOutput: Swift.Equatable { public init() { } } -enum DeleteTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteWarmPoolInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case forceDelete = "ForceDelete" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -4353,28 +3457,12 @@ public struct DeleteWarmPoolInput: Swift.Equatable { } } -struct DeleteWarmPoolInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let forceDelete: Swift.Bool? -} - -extension DeleteWarmPoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case forceDelete = "ForceDelete" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let forceDeleteDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forceDelete) - forceDelete = forceDeleteDecoded - } -} +extension DeleteWarmPoolOutput { -extension DeleteWarmPoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteWarmPoolOutput() + } } } @@ -4383,20 +3471,28 @@ public struct DeleteWarmPoolOutput: Swift.Equatable { public init() { } } -enum DeleteWarmPoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteWarmPoolOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeAccountLimitsInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeAccountLimits", forKey:ClientRuntime.Key("Action")) @@ -4416,20 +3512,18 @@ public struct DescribeAccountLimitsInput: Swift.Equatable { public init() { } } -extension DescribeAccountLimitsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAccountLimitsOutputBody = try responseDecoder.decode(responseBody: data) - self.maxNumberOfAutoScalingGroups = output.maxNumberOfAutoScalingGroups - self.maxNumberOfLaunchConfigurations = output.maxNumberOfLaunchConfigurations - self.numberOfAutoScalingGroups = output.numberOfAutoScalingGroups - self.numberOfLaunchConfigurations = output.numberOfLaunchConfigurations - } else { - self.maxNumberOfAutoScalingGroups = nil - self.maxNumberOfLaunchConfigurations = nil - self.numberOfAutoScalingGroups = nil - self.numberOfLaunchConfigurations = nil +extension DescribeAccountLimitsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAccountLimitsResult"] + var value = DescribeAccountLimitsOutput() + value.maxNumberOfAutoScalingGroups = try reader["MaxNumberOfAutoScalingGroups"].readIfPresent() + value.maxNumberOfLaunchConfigurations = try reader["MaxNumberOfLaunchConfigurations"].readIfPresent() + value.numberOfAutoScalingGroups = try reader["NumberOfAutoScalingGroups"].readIfPresent() + value.numberOfLaunchConfigurations = try reader["NumberOfLaunchConfigurations"].readIfPresent() + return value } } } @@ -4458,46 +3552,25 @@ public struct DescribeAccountLimitsOutput: Swift.Equatable { } } -struct DescribeAccountLimitsOutputBody: Swift.Equatable { - let maxNumberOfAutoScalingGroups: Swift.Int? - let maxNumberOfLaunchConfigurations: Swift.Int? - let numberOfAutoScalingGroups: Swift.Int? - let numberOfLaunchConfigurations: Swift.Int? -} - -extension DescribeAccountLimitsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxNumberOfAutoScalingGroups = "MaxNumberOfAutoScalingGroups" - case maxNumberOfLaunchConfigurations = "MaxNumberOfLaunchConfigurations" - case numberOfAutoScalingGroups = "NumberOfAutoScalingGroups" - case numberOfLaunchConfigurations = "NumberOfLaunchConfigurations" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAccountLimitsResult")) - let maxNumberOfAutoScalingGroupsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxNumberOfAutoScalingGroups) - maxNumberOfAutoScalingGroups = maxNumberOfAutoScalingGroupsDecoded - let maxNumberOfLaunchConfigurationsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxNumberOfLaunchConfigurations) - maxNumberOfLaunchConfigurations = maxNumberOfLaunchConfigurationsDecoded - let numberOfAutoScalingGroupsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfAutoScalingGroups) - numberOfAutoScalingGroups = numberOfAutoScalingGroupsDecoded - let numberOfLaunchConfigurationsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfLaunchConfigurations) - numberOfLaunchConfigurations = numberOfLaunchConfigurationsDecoded - } -} +enum DescribeAccountLimitsOutputError { -enum DescribeAccountLimitsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeAdjustmentTypesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeAdjustmentTypes", forKey:ClientRuntime.Key("Action")) @@ -4517,14 +3590,15 @@ public struct DescribeAdjustmentTypesInput: Swift.Equatable { public init() { } } -extension DescribeAdjustmentTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAdjustmentTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.adjustmentTypes = output.adjustmentTypes - } else { - self.adjustmentTypes = nil +extension DescribeAdjustmentTypesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAdjustmentTypesResult"] + var value = DescribeAdjustmentTypesOutput() + value.adjustmentTypes = try reader["AdjustmentTypes"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.AdjustmentType.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4541,51 +3615,31 @@ public struct DescribeAdjustmentTypesOutput: Swift.Equatable { } } -struct DescribeAdjustmentTypesOutputBody: Swift.Equatable { - let adjustmentTypes: [AutoScalingClientTypes.AdjustmentType]? -} +enum DescribeAdjustmentTypesOutputError { -extension DescribeAdjustmentTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case adjustmentTypes = "AdjustmentTypes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAdjustmentTypesResult")) - if containerValues.contains(.adjustmentTypes) { - struct KeyVal0{struct member{}} - let adjustmentTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .adjustmentTypes) - if let adjustmentTypesWrappedContainer = adjustmentTypesWrappedContainer { - let adjustmentTypesContainer = try adjustmentTypesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.AdjustmentType].self, forKey: .member) - var adjustmentTypesBuffer:[AutoScalingClientTypes.AdjustmentType]? = nil - if let adjustmentTypesContainer = adjustmentTypesContainer { - adjustmentTypesBuffer = [AutoScalingClientTypes.AdjustmentType]() - for structureContainer0 in adjustmentTypesContainer { - adjustmentTypesBuffer?.append(structureContainer0) - } - } - adjustmentTypes = adjustmentTypesBuffer - } else { - adjustmentTypes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - adjustmentTypes = nil } } } -enum DescribeAdjustmentTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeAutoScalingGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupNames = "AutoScalingGroupNames" + case filters = "Filters" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeAutoScalingGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupNames = autoScalingGroupNames { @@ -4654,78 +3708,16 @@ public struct DescribeAutoScalingGroupsInput: Swift.Equatable { } } -struct DescribeAutoScalingGroupsInputBody: Swift.Equatable { - let autoScalingGroupNames: [Swift.String]? - let nextToken: Swift.String? - let maxRecords: Swift.Int? - let filters: [AutoScalingClientTypes.Filter]? -} - -extension DescribeAutoScalingGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupNames = "AutoScalingGroupNames" - case filters = "Filters" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.autoScalingGroupNames) { - struct KeyVal0{struct member{}} - let autoScalingGroupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .autoScalingGroupNames) - if let autoScalingGroupNamesWrappedContainer = autoScalingGroupNamesWrappedContainer { - let autoScalingGroupNamesContainer = try autoScalingGroupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var autoScalingGroupNamesBuffer:[Swift.String]? = nil - if let autoScalingGroupNamesContainer = autoScalingGroupNamesContainer { - autoScalingGroupNamesBuffer = [Swift.String]() - for stringContainer0 in autoScalingGroupNamesContainer { - autoScalingGroupNamesBuffer?.append(stringContainer0) - } - } - autoScalingGroupNames = autoScalingGroupNamesBuffer - } else { - autoScalingGroupNames = [] - } - } else { - autoScalingGroupNames = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct member{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[AutoScalingClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [AutoScalingClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension DescribeAutoScalingGroupsOutput { -extension DescribeAutoScalingGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAutoScalingGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.autoScalingGroups = output.autoScalingGroups - self.nextToken = output.nextToken - } else { - self.autoScalingGroups = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAutoScalingGroupsResult"] + var value = DescribeAutoScalingGroupsOutput() + value.autoScalingGroups = try reader["AutoScalingGroups"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.AutoScalingGroup.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -4747,56 +3739,31 @@ public struct DescribeAutoScalingGroupsOutput: Swift.Equatable { } } -struct DescribeAutoScalingGroupsOutputBody: Swift.Equatable { - let autoScalingGroups: [AutoScalingClientTypes.AutoScalingGroup]? - let nextToken: Swift.String? -} - -extension DescribeAutoScalingGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroups = "AutoScalingGroups" - case nextToken = "NextToken" - } +enum DescribeAutoScalingGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAutoScalingGroupsResult")) - if containerValues.contains(.autoScalingGroups) { - struct KeyVal0{struct member{}} - let autoScalingGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .autoScalingGroups) - if let autoScalingGroupsWrappedContainer = autoScalingGroupsWrappedContainer { - let autoScalingGroupsContainer = try autoScalingGroupsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.AutoScalingGroup].self, forKey: .member) - var autoScalingGroupsBuffer:[AutoScalingClientTypes.AutoScalingGroup]? = nil - if let autoScalingGroupsContainer = autoScalingGroupsContainer { - autoScalingGroupsBuffer = [AutoScalingClientTypes.AutoScalingGroup]() - for structureContainer0 in autoScalingGroupsContainer { - autoScalingGroupsBuffer?.append(structureContainer0) - } - } - autoScalingGroups = autoScalingGroupsBuffer - } else { - autoScalingGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - autoScalingGroups = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeAutoScalingGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeAutoScalingInstancesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceIds = "InstanceIds" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeAutoScalingInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceIds = instanceIds { @@ -4849,57 +3816,16 @@ public struct DescribeAutoScalingInstancesInput: Swift.Equatable { } } -struct DescribeAutoScalingInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} +extension DescribeAutoScalingInstancesOutput { -extension DescribeAutoScalingInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceIds = "InstanceIds" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct member{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeAutoScalingInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAutoScalingInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.autoScalingInstances = output.autoScalingInstances - self.nextToken = output.nextToken - } else { - self.autoScalingInstances = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAutoScalingInstancesResult"] + var value = DescribeAutoScalingInstancesOutput() + value.autoScalingInstances = try reader["AutoScalingInstances"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.AutoScalingInstanceDetails.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -4920,56 +3846,26 @@ public struct DescribeAutoScalingInstancesOutput: Swift.Equatable { } } -struct DescribeAutoScalingInstancesOutputBody: Swift.Equatable { - let autoScalingInstances: [AutoScalingClientTypes.AutoScalingInstanceDetails]? - let nextToken: Swift.String? -} +enum DescribeAutoScalingInstancesOutputError { -extension DescribeAutoScalingInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingInstances = "AutoScalingInstances" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAutoScalingInstancesResult")) - if containerValues.contains(.autoScalingInstances) { - struct KeyVal0{struct member{}} - let autoScalingInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .autoScalingInstances) - if let autoScalingInstancesWrappedContainer = autoScalingInstancesWrappedContainer { - let autoScalingInstancesContainer = try autoScalingInstancesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.AutoScalingInstanceDetails].self, forKey: .member) - var autoScalingInstancesBuffer:[AutoScalingClientTypes.AutoScalingInstanceDetails]? = nil - if let autoScalingInstancesContainer = autoScalingInstancesContainer { - autoScalingInstancesBuffer = [AutoScalingClientTypes.AutoScalingInstanceDetails]() - for structureContainer0 in autoScalingInstancesContainer { - autoScalingInstancesBuffer?.append(structureContainer0) - } - } - autoScalingInstances = autoScalingInstancesBuffer - } else { - autoScalingInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - autoScalingInstances = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeAutoScalingInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DescribeAutoScalingNotificationTypesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeAutoScalingNotificationTypes", forKey:ClientRuntime.Key("Action")) @@ -4989,14 +3885,15 @@ public struct DescribeAutoScalingNotificationTypesInput: Swift.Equatable { public init() { } } -extension DescribeAutoScalingNotificationTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAutoScalingNotificationTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.autoScalingNotificationTypes = output.autoScalingNotificationTypes - } else { - self.autoScalingNotificationTypes = nil +extension DescribeAutoScalingNotificationTypesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAutoScalingNotificationTypesResult"] + var value = DescribeAutoScalingNotificationTypesOutput() + value.autoScalingNotificationTypes = try reader["AutoScalingNotificationTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5013,51 +3910,31 @@ public struct DescribeAutoScalingNotificationTypesOutput: Swift.Equatable { } } -struct DescribeAutoScalingNotificationTypesOutputBody: Swift.Equatable { - let autoScalingNotificationTypes: [Swift.String]? -} +enum DescribeAutoScalingNotificationTypesOutputError { -extension DescribeAutoScalingNotificationTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingNotificationTypes = "AutoScalingNotificationTypes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAutoScalingNotificationTypesResult")) - if containerValues.contains(.autoScalingNotificationTypes) { - struct KeyVal0{struct member{}} - let autoScalingNotificationTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .autoScalingNotificationTypes) - if let autoScalingNotificationTypesWrappedContainer = autoScalingNotificationTypesWrappedContainer { - let autoScalingNotificationTypesContainer = try autoScalingNotificationTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var autoScalingNotificationTypesBuffer:[Swift.String]? = nil - if let autoScalingNotificationTypesContainer = autoScalingNotificationTypesContainer { - autoScalingNotificationTypesBuffer = [Swift.String]() - for stringContainer0 in autoScalingNotificationTypesContainer { - autoScalingNotificationTypesBuffer?.append(stringContainer0) - } - } - autoScalingNotificationTypes = autoScalingNotificationTypesBuffer - } else { - autoScalingNotificationTypes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - autoScalingNotificationTypes = nil } } } -enum DescribeAutoScalingNotificationTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeInstanceRefreshesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case instanceRefreshIds = "InstanceRefreshIds" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeInstanceRefreshesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -5118,61 +3995,16 @@ public struct DescribeInstanceRefreshesInput: Swift.Equatable { } } -struct DescribeInstanceRefreshesInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let instanceRefreshIds: [Swift.String]? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} +extension DescribeInstanceRefreshesOutput { -extension DescribeInstanceRefreshesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceRefreshIds = "InstanceRefreshIds" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.instanceRefreshIds) { - struct KeyVal0{struct member{}} - let instanceRefreshIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceRefreshIds) - if let instanceRefreshIdsWrappedContainer = instanceRefreshIdsWrappedContainer { - let instanceRefreshIdsContainer = try instanceRefreshIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceRefreshIdsBuffer:[Swift.String]? = nil - if let instanceRefreshIdsContainer = instanceRefreshIdsContainer { - instanceRefreshIdsBuffer = [Swift.String]() - for stringContainer0 in instanceRefreshIdsContainer { - instanceRefreshIdsBuffer?.append(stringContainer0) - } - } - instanceRefreshIds = instanceRefreshIdsBuffer - } else { - instanceRefreshIds = [] - } - } else { - instanceRefreshIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeInstanceRefreshesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceRefreshesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceRefreshes = output.instanceRefreshes - self.nextToken = output.nextToken - } else { - self.instanceRefreshes = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeInstanceRefreshesResult"] + var value = DescribeInstanceRefreshesOutput() + value.instanceRefreshes = try reader["InstanceRefreshes"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.InstanceRefresh.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -5193,56 +4025,31 @@ public struct DescribeInstanceRefreshesOutput: Swift.Equatable { } } -struct DescribeInstanceRefreshesOutputBody: Swift.Equatable { - let instanceRefreshes: [AutoScalingClientTypes.InstanceRefresh]? - let nextToken: Swift.String? -} - -extension DescribeInstanceRefreshesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceRefreshes = "InstanceRefreshes" - case nextToken = "NextToken" - } +enum DescribeInstanceRefreshesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeInstanceRefreshesResult")) - if containerValues.contains(.instanceRefreshes) { - struct KeyVal0{struct member{}} - let instanceRefreshesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceRefreshes) - if let instanceRefreshesWrappedContainer = instanceRefreshesWrappedContainer { - let instanceRefreshesContainer = try instanceRefreshesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.InstanceRefresh].self, forKey: .member) - var instanceRefreshesBuffer:[AutoScalingClientTypes.InstanceRefresh]? = nil - if let instanceRefreshesContainer = instanceRefreshesContainer { - instanceRefreshesBuffer = [AutoScalingClientTypes.InstanceRefresh]() - for structureContainer0 in instanceRefreshesContainer { - instanceRefreshesBuffer?.append(structureContainer0) - } - } - instanceRefreshes = instanceRefreshesBuffer - } else { - instanceRefreshes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - instanceRefreshes = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeInstanceRefreshesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLaunchConfigurationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case launchConfigurationNames = "LaunchConfigurationNames" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeLaunchConfigurationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let launchConfigurationNames = launchConfigurationNames { @@ -5295,57 +4102,16 @@ public struct DescribeLaunchConfigurationsInput: Swift.Equatable { } } -struct DescribeLaunchConfigurationsInputBody: Swift.Equatable { - let launchConfigurationNames: [Swift.String]? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeLaunchConfigurationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchConfigurationNames = "LaunchConfigurationNames" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } +extension DescribeLaunchConfigurationsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.launchConfigurationNames) { - struct KeyVal0{struct member{}} - let launchConfigurationNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchConfigurationNames) - if let launchConfigurationNamesWrappedContainer = launchConfigurationNamesWrappedContainer { - let launchConfigurationNamesContainer = try launchConfigurationNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var launchConfigurationNamesBuffer:[Swift.String]? = nil - if let launchConfigurationNamesContainer = launchConfigurationNamesContainer { - launchConfigurationNamesBuffer = [Swift.String]() - for stringContainer0 in launchConfigurationNamesContainer { - launchConfigurationNamesBuffer?.append(stringContainer0) - } - } - launchConfigurationNames = launchConfigurationNamesBuffer - } else { - launchConfigurationNames = [] - } - } else { - launchConfigurationNames = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeLaunchConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLaunchConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.launchConfigurations = output.launchConfigurations - self.nextToken = output.nextToken - } else { - self.launchConfigurations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLaunchConfigurationsResult"] + var value = DescribeLaunchConfigurationsOutput() + value.launchConfigurations = try reader["LaunchConfigurations"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.LaunchConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -5367,56 +4133,26 @@ public struct DescribeLaunchConfigurationsOutput: Swift.Equatable { } } -struct DescribeLaunchConfigurationsOutputBody: Swift.Equatable { - let launchConfigurations: [AutoScalingClientTypes.LaunchConfiguration]? - let nextToken: Swift.String? -} +enum DescribeLaunchConfigurationsOutputError { -extension DescribeLaunchConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchConfigurations = "LaunchConfigurations" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLaunchConfigurationsResult")) - if containerValues.contains(.launchConfigurations) { - struct KeyVal0{struct member{}} - let launchConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchConfigurations) - if let launchConfigurationsWrappedContainer = launchConfigurationsWrappedContainer { - let launchConfigurationsContainer = try launchConfigurationsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.LaunchConfiguration].self, forKey: .member) - var launchConfigurationsBuffer:[AutoScalingClientTypes.LaunchConfiguration]? = nil - if let launchConfigurationsContainer = launchConfigurationsContainer { - launchConfigurationsBuffer = [AutoScalingClientTypes.LaunchConfiguration]() - for structureContainer0 in launchConfigurationsContainer { - launchConfigurationsBuffer?.append(structureContainer0) - } - } - launchConfigurations = launchConfigurationsBuffer - } else { - launchConfigurations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - launchConfigurations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLaunchConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DescribeLifecycleHookTypesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeLifecycleHookTypes", forKey:ClientRuntime.Key("Action")) @@ -5436,14 +4172,15 @@ public struct DescribeLifecycleHookTypesInput: Swift.Equatable { public init() { } } -extension DescribeLifecycleHookTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLifecycleHookTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.lifecycleHookTypes = output.lifecycleHookTypes - } else { - self.lifecycleHookTypes = nil +extension DescribeLifecycleHookTypesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLifecycleHookTypesResult"] + var value = DescribeLifecycleHookTypesOutput() + value.lifecycleHookTypes = try reader["LifecycleHookTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5460,51 +4197,29 @@ public struct DescribeLifecycleHookTypesOutput: Swift.Equatable { } } -struct DescribeLifecycleHookTypesOutputBody: Swift.Equatable { - let lifecycleHookTypes: [Swift.String]? -} +enum DescribeLifecycleHookTypesOutputError { -extension DescribeLifecycleHookTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case lifecycleHookTypes = "LifecycleHookTypes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLifecycleHookTypesResult")) - if containerValues.contains(.lifecycleHookTypes) { - struct KeyVal0{struct member{}} - let lifecycleHookTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .lifecycleHookTypes) - if let lifecycleHookTypesWrappedContainer = lifecycleHookTypesWrappedContainer { - let lifecycleHookTypesContainer = try lifecycleHookTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var lifecycleHookTypesBuffer:[Swift.String]? = nil - if let lifecycleHookTypesContainer = lifecycleHookTypesContainer { - lifecycleHookTypesBuffer = [Swift.String]() - for stringContainer0 in lifecycleHookTypesContainer { - lifecycleHookTypesBuffer?.append(stringContainer0) - } - } - lifecycleHookTypes = lifecycleHookTypesBuffer - } else { - lifecycleHookTypes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - lifecycleHookTypes = nil } } } -enum DescribeLifecycleHookTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLifecycleHooksInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case lifecycleHookNames = "LifecycleHookNames" } -} -extension DescribeLifecycleHooksInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -5551,51 +4266,15 @@ public struct DescribeLifecycleHooksInput: Swift.Equatable { } } -struct DescribeLifecycleHooksInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let lifecycleHookNames: [Swift.String]? -} +extension DescribeLifecycleHooksOutput { -extension DescribeLifecycleHooksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case lifecycleHookNames = "LifecycleHookNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.lifecycleHookNames) { - struct KeyVal0{struct member{}} - let lifecycleHookNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .lifecycleHookNames) - if let lifecycleHookNamesWrappedContainer = lifecycleHookNamesWrappedContainer { - let lifecycleHookNamesContainer = try lifecycleHookNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var lifecycleHookNamesBuffer:[Swift.String]? = nil - if let lifecycleHookNamesContainer = lifecycleHookNamesContainer { - lifecycleHookNamesBuffer = [Swift.String]() - for stringContainer0 in lifecycleHookNamesContainer { - lifecycleHookNamesBuffer?.append(stringContainer0) - } - } - lifecycleHookNames = lifecycleHookNamesBuffer - } else { - lifecycleHookNames = [] - } - } else { - lifecycleHookNames = nil - } - } -} - -extension DescribeLifecycleHooksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLifecycleHooksOutputBody = try responseDecoder.decode(responseBody: data) - self.lifecycleHooks = output.lifecycleHooks - } else { - self.lifecycleHooks = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLifecycleHooksResult"] + var value = DescribeLifecycleHooksOutput() + value.lifecycleHooks = try reader["LifecycleHooks"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.LifecycleHook.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5612,51 +4291,30 @@ public struct DescribeLifecycleHooksOutput: Swift.Equatable { } } -struct DescribeLifecycleHooksOutputBody: Swift.Equatable { - let lifecycleHooks: [AutoScalingClientTypes.LifecycleHook]? -} +enum DescribeLifecycleHooksOutputError { -extension DescribeLifecycleHooksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case lifecycleHooks = "LifecycleHooks" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLifecycleHooksResult")) - if containerValues.contains(.lifecycleHooks) { - struct KeyVal0{struct member{}} - let lifecycleHooksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .lifecycleHooks) - if let lifecycleHooksWrappedContainer = lifecycleHooksWrappedContainer { - let lifecycleHooksContainer = try lifecycleHooksWrappedContainer.decodeIfPresent([AutoScalingClientTypes.LifecycleHook].self, forKey: .member) - var lifecycleHooksBuffer:[AutoScalingClientTypes.LifecycleHook]? = nil - if let lifecycleHooksContainer = lifecycleHooksContainer { - lifecycleHooksBuffer = [AutoScalingClientTypes.LifecycleHook]() - for structureContainer0 in lifecycleHooksContainer { - lifecycleHooksBuffer?.append(structureContainer0) - } - } - lifecycleHooks = lifecycleHooksBuffer - } else { - lifecycleHooks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - lifecycleHooks = nil } } } -enum DescribeLifecycleHooksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLoadBalancerTargetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeLoadBalancerTargetGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -5701,40 +4359,16 @@ public struct DescribeLoadBalancerTargetGroupsInput: Swift.Equatable { } } -struct DescribeLoadBalancerTargetGroupsInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} +extension DescribeLoadBalancerTargetGroupsOutput { -extension DescribeLoadBalancerTargetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeLoadBalancerTargetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoadBalancerTargetGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.loadBalancerTargetGroups = output.loadBalancerTargetGroups - self.nextToken = output.nextToken - } else { - self.loadBalancerTargetGroups = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoadBalancerTargetGroupsResult"] + var value = DescribeLoadBalancerTargetGroupsOutput() + value.loadBalancerTargetGroups = try reader["LoadBalancerTargetGroups"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.LoadBalancerTargetGroupState.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -5755,56 +4389,31 @@ public struct DescribeLoadBalancerTargetGroupsOutput: Swift.Equatable { } } -struct DescribeLoadBalancerTargetGroupsOutputBody: Swift.Equatable { - let loadBalancerTargetGroups: [AutoScalingClientTypes.LoadBalancerTargetGroupState]? - let nextToken: Swift.String? -} - -extension DescribeLoadBalancerTargetGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerTargetGroups = "LoadBalancerTargetGroups" - case nextToken = "NextToken" - } +enum DescribeLoadBalancerTargetGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoadBalancerTargetGroupsResult")) - if containerValues.contains(.loadBalancerTargetGroups) { - struct KeyVal0{struct member{}} - let loadBalancerTargetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerTargetGroups) - if let loadBalancerTargetGroupsWrappedContainer = loadBalancerTargetGroupsWrappedContainer { - let loadBalancerTargetGroupsContainer = try loadBalancerTargetGroupsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.LoadBalancerTargetGroupState].self, forKey: .member) - var loadBalancerTargetGroupsBuffer:[AutoScalingClientTypes.LoadBalancerTargetGroupState]? = nil - if let loadBalancerTargetGroupsContainer = loadBalancerTargetGroupsContainer { - loadBalancerTargetGroupsBuffer = [AutoScalingClientTypes.LoadBalancerTargetGroupState]() - for structureContainer0 in loadBalancerTargetGroupsContainer { - loadBalancerTargetGroupsBuffer?.append(structureContainer0) - } - } - loadBalancerTargetGroups = loadBalancerTargetGroupsBuffer - } else { - loadBalancerTargetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - loadBalancerTargetGroups = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeLoadBalancerTargetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLoadBalancersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeLoadBalancersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -5849,40 +4458,16 @@ public struct DescribeLoadBalancersInput: Swift.Equatable { } } -struct DescribeLoadBalancersInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} +extension DescribeLoadBalancersOutput { -extension DescribeLoadBalancersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeLoadBalancersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoadBalancersOutputBody = try responseDecoder.decode(responseBody: data) - self.loadBalancers = output.loadBalancers - self.nextToken = output.nextToken - } else { - self.loadBalancers = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoadBalancersResult"] + var value = DescribeLoadBalancersOutput() + value.loadBalancers = try reader["LoadBalancers"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.LoadBalancerState.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -5903,56 +4488,26 @@ public struct DescribeLoadBalancersOutput: Swift.Equatable { } } -struct DescribeLoadBalancersOutputBody: Swift.Equatable { - let loadBalancers: [AutoScalingClientTypes.LoadBalancerState]? - let nextToken: Swift.String? -} - -extension DescribeLoadBalancersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancers = "LoadBalancers" - case nextToken = "NextToken" - } +enum DescribeLoadBalancersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoadBalancersResult")) - if containerValues.contains(.loadBalancers) { - struct KeyVal0{struct member{}} - let loadBalancersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancers) - if let loadBalancersWrappedContainer = loadBalancersWrappedContainer { - let loadBalancersContainer = try loadBalancersWrappedContainer.decodeIfPresent([AutoScalingClientTypes.LoadBalancerState].self, forKey: .member) - var loadBalancersBuffer:[AutoScalingClientTypes.LoadBalancerState]? = nil - if let loadBalancersContainer = loadBalancersContainer { - loadBalancersBuffer = [AutoScalingClientTypes.LoadBalancerState]() - for structureContainer0 in loadBalancersContainer { - loadBalancersBuffer?.append(structureContainer0) - } - } - loadBalancers = loadBalancersBuffer - } else { - loadBalancers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - loadBalancers = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLoadBalancersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DescribeMetricCollectionTypesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeMetricCollectionTypes", forKey:ClientRuntime.Key("Action")) @@ -5972,16 +4527,16 @@ public struct DescribeMetricCollectionTypesInput: Swift.Equatable { public init() { } } -extension DescribeMetricCollectionTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeMetricCollectionTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.granularities = output.granularities - self.metrics = output.metrics - } else { - self.granularities = nil - self.metrics = nil +extension DescribeMetricCollectionTypesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeMetricCollectionTypesResult"] + var value = DescribeMetricCollectionTypesOutput() + value.granularities = try reader["Granularities"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.MetricGranularityType.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.metrics = try reader["Metrics"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.MetricCollectionType.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6002,72 +4557,30 @@ public struct DescribeMetricCollectionTypesOutput: Swift.Equatable { } } -struct DescribeMetricCollectionTypesOutputBody: Swift.Equatable { - let metrics: [AutoScalingClientTypes.MetricCollectionType]? - let granularities: [AutoScalingClientTypes.MetricGranularityType]? -} - -extension DescribeMetricCollectionTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case granularities = "Granularities" - case metrics = "Metrics" - } +enum DescribeMetricCollectionTypesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeMetricCollectionTypesResult")) - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.MetricCollectionType].self, forKey: .member) - var metricsBuffer:[AutoScalingClientTypes.MetricCollectionType]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [AutoScalingClientTypes.MetricCollectionType]() - for structureContainer0 in metricsContainer { - metricsBuffer?.append(structureContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - metrics = nil - } - if containerValues.contains(.granularities) { - struct KeyVal0{struct member{}} - let granularitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .granularities) - if let granularitiesWrappedContainer = granularitiesWrappedContainer { - let granularitiesContainer = try granularitiesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.MetricGranularityType].self, forKey: .member) - var granularitiesBuffer:[AutoScalingClientTypes.MetricGranularityType]? = nil - if let granularitiesContainer = granularitiesContainer { - granularitiesBuffer = [AutoScalingClientTypes.MetricGranularityType]() - for structureContainer0 in granularitiesContainer { - granularitiesBuffer?.append(structureContainer0) - } - } - granularities = granularitiesBuffer - } else { - granularities = [] - } - } else { - granularities = nil } } } -enum DescribeMetricCollectionTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeNotificationConfigurationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupNames = "AutoScalingGroupNames" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeNotificationConfigurationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupNames = autoScalingGroupNames { @@ -6120,57 +4633,16 @@ public struct DescribeNotificationConfigurationsInput: Swift.Equatable { } } -struct DescribeNotificationConfigurationsInputBody: Swift.Equatable { - let autoScalingGroupNames: [Swift.String]? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeNotificationConfigurationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupNames = "AutoScalingGroupNames" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.autoScalingGroupNames) { - struct KeyVal0{struct member{}} - let autoScalingGroupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .autoScalingGroupNames) - if let autoScalingGroupNamesWrappedContainer = autoScalingGroupNamesWrappedContainer { - let autoScalingGroupNamesContainer = try autoScalingGroupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var autoScalingGroupNamesBuffer:[Swift.String]? = nil - if let autoScalingGroupNamesContainer = autoScalingGroupNamesContainer { - autoScalingGroupNamesBuffer = [Swift.String]() - for stringContainer0 in autoScalingGroupNamesContainer { - autoScalingGroupNamesBuffer?.append(stringContainer0) - } - } - autoScalingGroupNames = autoScalingGroupNamesBuffer - } else { - autoScalingGroupNames = [] - } - } else { - autoScalingGroupNames = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribeNotificationConfigurationsOutput { -extension DescribeNotificationConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNotificationConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.notificationConfigurations = output.notificationConfigurations - } else { - self.nextToken = nil - self.notificationConfigurations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeNotificationConfigurationsResult"] + var value = DescribeNotificationConfigurationsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.notificationConfigurations = try reader["NotificationConfigurations"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.NotificationConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6192,56 +4664,33 @@ public struct DescribeNotificationConfigurationsOutput: Swift.Equatable { } } -struct DescribeNotificationConfigurationsOutputBody: Swift.Equatable { - let notificationConfigurations: [AutoScalingClientTypes.NotificationConfiguration]? - let nextToken: Swift.String? -} +enum DescribeNotificationConfigurationsOutputError { -extension DescribeNotificationConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case notificationConfigurations = "NotificationConfigurations" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeNotificationConfigurationsResult")) - if containerValues.contains(.notificationConfigurations) { - struct KeyVal0{struct member{}} - let notificationConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .notificationConfigurations) - if let notificationConfigurationsWrappedContainer = notificationConfigurationsWrappedContainer { - let notificationConfigurationsContainer = try notificationConfigurationsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.NotificationConfiguration].self, forKey: .member) - var notificationConfigurationsBuffer:[AutoScalingClientTypes.NotificationConfiguration]? = nil - if let notificationConfigurationsContainer = notificationConfigurationsContainer { - notificationConfigurationsBuffer = [AutoScalingClientTypes.NotificationConfiguration]() - for structureContainer0 in notificationConfigurationsContainer { - notificationConfigurationsBuffer?.append(structureContainer0) - } - } - notificationConfigurations = notificationConfigurationsBuffer - } else { - notificationConfigurations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - notificationConfigurations = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeNotificationConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribePoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" + case policyNames = "PolicyNames" + case policyTypes = "PolicyTypes" } -} -extension DescribePoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -6317,82 +4766,16 @@ public struct DescribePoliciesInput: Swift.Equatable { } } -struct DescribePoliciesInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let policyNames: [Swift.String]? - let policyTypes: [Swift.String]? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} +extension DescribePoliciesOutput { -extension DescribePoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - case policyNames = "PolicyNames" - case policyTypes = "PolicyTypes" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] - } - } else { - policyNames = nil - } - if containerValues.contains(.policyTypes) { - struct KeyVal0{struct member{}} - let policyTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyTypes) - if let policyTypesWrappedContainer = policyTypesWrappedContainer { - let policyTypesContainer = try policyTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyTypesBuffer:[Swift.String]? = nil - if let policyTypesContainer = policyTypesContainer { - policyTypesBuffer = [Swift.String]() - for stringContainer0 in policyTypesContainer { - policyTypesBuffer?.append(stringContainer0) - } - } - policyTypes = policyTypesBuffer - } else { - policyTypes = [] - } - } else { - policyTypes = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribePoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.scalingPolicies = output.scalingPolicies - } else { - self.nextToken = nil - self.scalingPolicies = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribePoliciesResult"] + var value = DescribePoliciesOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.scalingPolicies = try reader["ScalingPolicies"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.ScalingPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6413,57 +4796,34 @@ public struct DescribePoliciesOutput: Swift.Equatable { } } -struct DescribePoliciesOutputBody: Swift.Equatable { - let scalingPolicies: [AutoScalingClientTypes.ScalingPolicy]? - let nextToken: Swift.String? -} +enum DescribePoliciesOutputError { -extension DescribePoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case scalingPolicies = "ScalingPolicies" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribePoliciesResult")) - if containerValues.contains(.scalingPolicies) { - struct KeyVal0{struct member{}} - let scalingPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scalingPolicies) - if let scalingPoliciesWrappedContainer = scalingPoliciesWrappedContainer { - let scalingPoliciesContainer = try scalingPoliciesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.ScalingPolicy].self, forKey: .member) - var scalingPoliciesBuffer:[AutoScalingClientTypes.ScalingPolicy]? = nil - if let scalingPoliciesContainer = scalingPoliciesContainer { - scalingPoliciesBuffer = [AutoScalingClientTypes.ScalingPolicy]() - for structureContainer0 in scalingPoliciesContainer { - scalingPoliciesBuffer?.append(structureContainer0) - } - } - scalingPolicies = scalingPoliciesBuffer - } else { - scalingPolicies = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - scalingPolicies = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribePoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeScalingActivitiesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case activityIds = "ActivityIds" + case autoScalingGroupName = "AutoScalingGroupName" + case includeDeletedGroups = "IncludeDeletedGroups" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeScalingActivitiesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let activityIds = activityIds { @@ -6530,65 +4890,16 @@ public struct DescribeScalingActivitiesInput: Swift.Equatable { } } -struct DescribeScalingActivitiesInputBody: Swift.Equatable { - let activityIds: [Swift.String]? - let autoScalingGroupName: Swift.String? - let includeDeletedGroups: Swift.Bool? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeScalingActivitiesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activityIds = "ActivityIds" - case autoScalingGroupName = "AutoScalingGroupName" - case includeDeletedGroups = "IncludeDeletedGroups" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.activityIds) { - struct KeyVal0{struct member{}} - let activityIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .activityIds) - if let activityIdsWrappedContainer = activityIdsWrappedContainer { - let activityIdsContainer = try activityIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var activityIdsBuffer:[Swift.String]? = nil - if let activityIdsContainer = activityIdsContainer { - activityIdsBuffer = [Swift.String]() - for stringContainer0 in activityIdsContainer { - activityIdsBuffer?.append(stringContainer0) - } - } - activityIds = activityIdsBuffer - } else { - activityIds = [] - } - } else { - activityIds = nil - } - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let includeDeletedGroupsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeDeletedGroups) - includeDeletedGroups = includeDeletedGroupsDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeScalingActivitiesOutput { -extension DescribeScalingActivitiesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeScalingActivitiesOutputBody = try responseDecoder.decode(responseBody: data) - self.activities = output.activities - self.nextToken = output.nextToken - } else { - self.activities = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeScalingActivitiesResult"] + var value = DescribeScalingActivitiesOutput() + value.activities = try reader["Activities"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.Activity.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -6610,56 +4921,26 @@ public struct DescribeScalingActivitiesOutput: Swift.Equatable { } } -struct DescribeScalingActivitiesOutputBody: Swift.Equatable { - let activities: [AutoScalingClientTypes.Activity]? - let nextToken: Swift.String? -} - -extension DescribeScalingActivitiesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activities = "Activities" - case nextToken = "NextToken" - } +enum DescribeScalingActivitiesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeScalingActivitiesResult")) - if containerValues.contains(.activities) { - struct KeyVal0{struct member{}} - let activitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .activities) - if let activitiesWrappedContainer = activitiesWrappedContainer { - let activitiesContainer = try activitiesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Activity].self, forKey: .member) - var activitiesBuffer:[AutoScalingClientTypes.Activity]? = nil - if let activitiesContainer = activitiesContainer { - activitiesBuffer = [AutoScalingClientTypes.Activity]() - for structureContainer0 in activitiesContainer { - activitiesBuffer?.append(structureContainer0) - } - } - activities = activitiesBuffer - } else { - activities = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - activities = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeScalingActivitiesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DescribeScalingProcessTypesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeScalingProcessTypes", forKey:ClientRuntime.Key("Action")) @@ -6679,14 +4960,15 @@ public struct DescribeScalingProcessTypesInput: Swift.Equatable { public init() { } } -extension DescribeScalingProcessTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeScalingProcessTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.processes = output.processes - } else { - self.processes = nil +extension DescribeScalingProcessTypesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeScalingProcessTypesResult"] + var value = DescribeScalingProcessTypesOutput() + value.processes = try reader["Processes"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.ProcessType.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6703,51 +4985,33 @@ public struct DescribeScalingProcessTypesOutput: Swift.Equatable { } } -struct DescribeScalingProcessTypesOutputBody: Swift.Equatable { - let processes: [AutoScalingClientTypes.ProcessType]? -} +enum DescribeScalingProcessTypesOutputError { -extension DescribeScalingProcessTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case processes = "Processes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeScalingProcessTypesResult")) - if containerValues.contains(.processes) { - struct KeyVal0{struct member{}} - let processesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processes) - if let processesWrappedContainer = processesWrappedContainer { - let processesContainer = try processesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.ProcessType].self, forKey: .member) - var processesBuffer:[AutoScalingClientTypes.ProcessType]? = nil - if let processesContainer = processesContainer { - processesBuffer = [AutoScalingClientTypes.ProcessType]() - for structureContainer0 in processesContainer { - processesBuffer?.append(structureContainer0) - } - } - processes = processesBuffer - } else { - processes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - processes = nil } } } -enum DescribeScalingProcessTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeScheduledActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case endTime = "EndTime" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" + case scheduledActionNames = "ScheduledActionNames" + case startTime = "StartTime" } -} -extension DescribeScheduledActionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -6821,69 +5085,16 @@ public struct DescribeScheduledActionsInput: Swift.Equatable { } } -struct DescribeScheduledActionsInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let scheduledActionNames: [Swift.String]? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} +extension DescribeScheduledActionsOutput { -extension DescribeScheduledActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case endTime = "EndTime" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - case scheduledActionNames = "ScheduledActionNames" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.scheduledActionNames) { - struct KeyVal0{struct member{}} - let scheduledActionNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledActionNames) - if let scheduledActionNamesWrappedContainer = scheduledActionNamesWrappedContainer { - let scheduledActionNamesContainer = try scheduledActionNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scheduledActionNamesBuffer:[Swift.String]? = nil - if let scheduledActionNamesContainer = scheduledActionNamesContainer { - scheduledActionNamesBuffer = [Swift.String]() - for stringContainer0 in scheduledActionNamesContainer { - scheduledActionNamesBuffer?.append(stringContainer0) - } - } - scheduledActionNames = scheduledActionNamesBuffer - } else { - scheduledActionNames = [] - } - } else { - scheduledActionNames = nil - } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeScheduledActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeScheduledActionsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.scheduledUpdateGroupActions = output.scheduledUpdateGroupActions - } else { - self.nextToken = nil - self.scheduledUpdateGroupActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeScheduledActionsResult"] + var value = DescribeScheduledActionsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.scheduledUpdateGroupActions = try reader["ScheduledUpdateGroupActions"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.ScheduledUpdateGroupAction.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6904,56 +5115,31 @@ public struct DescribeScheduledActionsOutput: Swift.Equatable { } } -struct DescribeScheduledActionsOutputBody: Swift.Equatable { - let scheduledUpdateGroupActions: [AutoScalingClientTypes.ScheduledUpdateGroupAction]? - let nextToken: Swift.String? -} +enum DescribeScheduledActionsOutputError { -extension DescribeScheduledActionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case scheduledUpdateGroupActions = "ScheduledUpdateGroupActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeScheduledActionsResult")) - if containerValues.contains(.scheduledUpdateGroupActions) { - struct KeyVal0{struct member{}} - let scheduledUpdateGroupActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledUpdateGroupActions) - if let scheduledUpdateGroupActionsWrappedContainer = scheduledUpdateGroupActionsWrappedContainer { - let scheduledUpdateGroupActionsContainer = try scheduledUpdateGroupActionsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.ScheduledUpdateGroupAction].self, forKey: .member) - var scheduledUpdateGroupActionsBuffer:[AutoScalingClientTypes.ScheduledUpdateGroupAction]? = nil - if let scheduledUpdateGroupActionsContainer = scheduledUpdateGroupActionsContainer { - scheduledUpdateGroupActionsBuffer = [AutoScalingClientTypes.ScheduledUpdateGroupAction]() - for structureContainer0 in scheduledUpdateGroupActionsContainer { - scheduledUpdateGroupActionsBuffer?.append(structureContainer0) - } - } - scheduledUpdateGroupActions = scheduledUpdateGroupActionsBuffer - } else { - scheduledUpdateGroupActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - scheduledUpdateGroupActions = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeScheduledActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -7006,57 +5192,16 @@ public struct DescribeTagsInput: Swift.Equatable { } } -struct DescribeTagsInputBody: Swift.Equatable { - let filters: [AutoScalingClientTypes.Filter]? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } +extension DescribeTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct member{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[AutoScalingClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [AutoScalingClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.tags = output.tags - } else { - self.nextToken = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTagsResult"] + var value = DescribeTagsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.TagDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7077,56 +5222,26 @@ public struct DescribeTagsOutput: Swift.Equatable { } } -struct DescribeTagsOutputBody: Swift.Equatable { - let tags: [AutoScalingClientTypes.TagDescription]? - let nextToken: Swift.String? -} - -extension DescribeTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case tags = "Tags" - } +enum DescribeTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.TagDescription].self, forKey: .member) - var tagsBuffer:[AutoScalingClientTypes.TagDescription]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [AutoScalingClientTypes.TagDescription]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DescribeTerminationPolicyTypesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeTerminationPolicyTypes", forKey:ClientRuntime.Key("Action")) @@ -7146,14 +5261,15 @@ public struct DescribeTerminationPolicyTypesInput: Swift.Equatable { public init() { } } -extension DescribeTerminationPolicyTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTerminationPolicyTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.terminationPolicyTypes = output.terminationPolicyTypes - } else { - self.terminationPolicyTypes = nil +extension DescribeTerminationPolicyTypesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTerminationPolicyTypesResult"] + var value = DescribeTerminationPolicyTypesOutput() + value.terminationPolicyTypes = try reader["TerminationPolicyTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7170,51 +5286,31 @@ public struct DescribeTerminationPolicyTypesOutput: Swift.Equatable { } } -struct DescribeTerminationPolicyTypesOutputBody: Swift.Equatable { - let terminationPolicyTypes: [Swift.String]? -} +enum DescribeTerminationPolicyTypesOutputError { -extension DescribeTerminationPolicyTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case terminationPolicyTypes = "TerminationPolicyTypes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTerminationPolicyTypesResult")) - if containerValues.contains(.terminationPolicyTypes) { - struct KeyVal0{struct member{}} - let terminationPolicyTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .terminationPolicyTypes) - if let terminationPolicyTypesWrappedContainer = terminationPolicyTypesWrappedContainer { - let terminationPolicyTypesContainer = try terminationPolicyTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var terminationPolicyTypesBuffer:[Swift.String]? = nil - if let terminationPolicyTypesContainer = terminationPolicyTypesContainer { - terminationPolicyTypesBuffer = [Swift.String]() - for stringContainer0 in terminationPolicyTypesContainer { - terminationPolicyTypesBuffer?.append(stringContainer0) - } - } - terminationPolicyTypes = terminationPolicyTypesBuffer - } else { - terminationPolicyTypes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - terminationPolicyTypes = nil } } } -enum DescribeTerminationPolicyTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTrafficSourcesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" + case trafficSourceType = "TrafficSourceType" } -} -extension DescribeTrafficSourcesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -7272,44 +5368,16 @@ public struct DescribeTrafficSourcesInput: Swift.Equatable { } } -struct DescribeTrafficSourcesInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let trafficSourceType: Swift.String? - let nextToken: Swift.String? - let maxRecords: Swift.Int? -} +extension DescribeTrafficSourcesOutput { -extension DescribeTrafficSourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - case trafficSourceType = "TrafficSourceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let trafficSourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficSourceType) - trafficSourceType = trafficSourceTypeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeTrafficSourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTrafficSourcesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.trafficSources = output.trafficSources - } else { - self.nextToken = nil - self.trafficSources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTrafficSourcesResult"] + var value = DescribeTrafficSourcesOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.trafficSources = try reader["TrafficSources"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.TrafficSourceState.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7330,56 +5398,31 @@ public struct DescribeTrafficSourcesOutput: Swift.Equatable { } } -struct DescribeTrafficSourcesOutputBody: Swift.Equatable { - let trafficSources: [AutoScalingClientTypes.TrafficSourceState]? - let nextToken: Swift.String? -} - -extension DescribeTrafficSourcesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case trafficSources = "TrafficSources" - } +enum DescribeTrafficSourcesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTrafficSourcesResult")) - if containerValues.contains(.trafficSources) { - struct KeyVal0{struct member{}} - let trafficSourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficSources) - if let trafficSourcesWrappedContainer = trafficSourcesWrappedContainer { - let trafficSourcesContainer = try trafficSourcesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.TrafficSourceState].self, forKey: .member) - var trafficSourcesBuffer:[AutoScalingClientTypes.TrafficSourceState]? = nil - if let trafficSourcesContainer = trafficSourcesContainer { - trafficSourcesBuffer = [AutoScalingClientTypes.TrafficSourceState]() - for structureContainer0 in trafficSourcesContainer { - trafficSourcesBuffer?.append(structureContainer0) - } - } - trafficSources = trafficSourcesBuffer - } else { - trafficSources = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - trafficSources = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeTrafficSourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeWarmPoolInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension DescribeWarmPoolInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -7424,42 +5467,17 @@ public struct DescribeWarmPoolInput: Swift.Equatable { } } -struct DescribeWarmPoolInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} +extension DescribeWarmPoolOutput { -extension DescribeWarmPoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeWarmPoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeWarmPoolOutputBody = try responseDecoder.decode(responseBody: data) - self.instances = output.instances - self.nextToken = output.nextToken - self.warmPoolConfiguration = output.warmPoolConfiguration - } else { - self.instances = nil - self.nextToken = nil - self.warmPoolConfiguration = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeWarmPoolResult"] + var value = DescribeWarmPoolOutput() + value.instances = try reader["Instances"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.Instance.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + value.warmPoolConfiguration = try reader["WarmPoolConfiguration"].readIfPresent(readingClosure: AutoScalingClientTypes.WarmPoolConfiguration.readingClosure) + return value } } } @@ -7484,61 +5502,26 @@ public struct DescribeWarmPoolOutput: Swift.Equatable { } } -struct DescribeWarmPoolOutputBody: Swift.Equatable { - let warmPoolConfiguration: AutoScalingClientTypes.WarmPoolConfiguration? - let instances: [AutoScalingClientTypes.Instance]? - let nextToken: Swift.String? -} - -extension DescribeWarmPoolOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instances = "Instances" - case nextToken = "NextToken" - case warmPoolConfiguration = "WarmPoolConfiguration" - } +enum DescribeWarmPoolOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeWarmPoolResult")) - let warmPoolConfigurationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.WarmPoolConfiguration.self, forKey: .warmPoolConfiguration) - warmPoolConfiguration = warmPoolConfigurationDecoded - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[AutoScalingClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [AutoScalingClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - instances = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeWarmPoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension AutoScalingClientTypes.DesiredConfiguration: Swift.Codable { +extension AutoScalingClientTypes.DesiredConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case launchTemplate = "LaunchTemplate" case mixedInstancesPolicy = "MixedInstancesPolicy" @@ -7554,12 +5537,14 @@ extension AutoScalingClientTypes.DesiredConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let mixedInstancesPolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MixedInstancesPolicy.self, forKey: .mixedInstancesPolicy) - mixedInstancesPolicy = mixedInstancesPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.DesiredConfiguration() + value.launchTemplate = try reader["LaunchTemplate"].readIfPresent(readingClosure: AutoScalingClientTypes.LaunchTemplateSpecification.readingClosure) + value.mixedInstancesPolicy = try reader["MixedInstancesPolicy"].readIfPresent(readingClosure: AutoScalingClientTypes.MixedInstancesPolicy.readingClosure) + return value + } } } @@ -7584,6 +5569,12 @@ extension AutoScalingClientTypes { } extension DetachInstancesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case instanceIds = "InstanceIds" + case shouldDecrementDesiredCapacity = "ShouldDecrementDesiredCapacity" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -7638,55 +5629,15 @@ public struct DetachInstancesInput: Swift.Equatable { } } -struct DetachInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let autoScalingGroupName: Swift.String? - let shouldDecrementDesiredCapacity: Swift.Bool? -} +extension DetachInstancesOutput { -extension DetachInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceIds = "InstanceIds" - case shouldDecrementDesiredCapacity = "ShouldDecrementDesiredCapacity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct member{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let shouldDecrementDesiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .shouldDecrementDesiredCapacity) - shouldDecrementDesiredCapacity = shouldDecrementDesiredCapacityDecoded - } -} - -extension DetachInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DetachInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.activities = output.activities - } else { - self.activities = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DetachInstancesResult"] + var value = DetachInstancesOutput() + value.activities = try reader["Activities"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.Activity.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7699,55 +5650,33 @@ public struct DetachInstancesOutput: Swift.Equatable { activities: [AutoScalingClientTypes.Activity]? = nil ) { - self.activities = activities - } -} - -struct DetachInstancesOutputBody: Swift.Equatable { - let activities: [AutoScalingClientTypes.Activity]? -} - -extension DetachInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activities = "Activities" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DetachInstancesResult")) - if containerValues.contains(.activities) { - struct KeyVal0{struct member{}} - let activitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .activities) - if let activitiesWrappedContainer = activitiesWrappedContainer { - let activitiesContainer = try activitiesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Activity].self, forKey: .member) - var activitiesBuffer:[AutoScalingClientTypes.Activity]? = nil - if let activitiesContainer = activitiesContainer { - activitiesBuffer = [AutoScalingClientTypes.Activity]() - for structureContainer0 in activitiesContainer { - activitiesBuffer?.append(structureContainer0) - } - } - activities = activitiesBuffer - } else { - activities = [] - } - } else { - activities = nil - } + self.activities = activities } } -enum DetachInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DetachInstancesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DetachLoadBalancerTargetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case targetGroupARNs = "TargetGroupARNs" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -7795,64 +5724,43 @@ public struct DetachLoadBalancerTargetGroupsInput: Swift.Equatable { } } -struct DetachLoadBalancerTargetGroupsInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let targetGroupARNs: [Swift.String]? -} - -extension DetachLoadBalancerTargetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case targetGroupARNs = "TargetGroupARNs" - } +extension DetachLoadBalancerTargetGroupsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.targetGroupARNs) { - struct KeyVal0{struct member{}} - let targetGroupARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroupARNs) - if let targetGroupARNsWrappedContainer = targetGroupARNsWrappedContainer { - let targetGroupARNsContainer = try targetGroupARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var targetGroupARNsBuffer:[Swift.String]? = nil - if let targetGroupARNsContainer = targetGroupARNsContainer { - targetGroupARNsBuffer = [Swift.String]() - for stringContainer0 in targetGroupARNsContainer { - targetGroupARNsBuffer?.append(stringContainer0) - } - } - targetGroupARNs = targetGroupARNsBuffer - } else { - targetGroupARNs = [] - } - } else { - targetGroupARNs = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachLoadBalancerTargetGroupsOutput() } } } -extension DetachLoadBalancerTargetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DetachLoadBalancerTargetGroupsOutput: Swift.Equatable { public init() { } } -enum DetachLoadBalancerTargetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DetachLoadBalancerTargetGroupsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DetachLoadBalancersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case loadBalancerNames = "LoadBalancerNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -7900,64 +5808,43 @@ public struct DetachLoadBalancersInput: Swift.Equatable { } } -struct DetachLoadBalancersInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let loadBalancerNames: [Swift.String]? -} - -extension DetachLoadBalancersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case loadBalancerNames = "LoadBalancerNames" - } +extension DetachLoadBalancersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.loadBalancerNames) { - struct KeyVal0{struct member{}} - let loadBalancerNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerNames) - if let loadBalancerNamesWrappedContainer = loadBalancerNamesWrappedContainer { - let loadBalancerNamesContainer = try loadBalancerNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerNamesBuffer:[Swift.String]? = nil - if let loadBalancerNamesContainer = loadBalancerNamesContainer { - loadBalancerNamesBuffer = [Swift.String]() - for stringContainer0 in loadBalancerNamesContainer { - loadBalancerNamesBuffer?.append(stringContainer0) - } - } - loadBalancerNames = loadBalancerNamesBuffer - } else { - loadBalancerNames = [] - } - } else { - loadBalancerNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachLoadBalancersOutput() } } } -extension DetachLoadBalancersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DetachLoadBalancersOutput: Swift.Equatable { public init() { } } -enum DetachLoadBalancersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DetachLoadBalancersOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DetachTrafficSourcesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case trafficSources = "TrafficSources" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -8005,64 +5892,43 @@ public struct DetachTrafficSourcesInput: Swift.Equatable { } } -struct DetachTrafficSourcesInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let trafficSources: [AutoScalingClientTypes.TrafficSourceIdentifier]? -} - -extension DetachTrafficSourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case trafficSources = "TrafficSources" - } +extension DetachTrafficSourcesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.trafficSources) { - struct KeyVal0{struct member{}} - let trafficSourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficSources) - if let trafficSourcesWrappedContainer = trafficSourcesWrappedContainer { - let trafficSourcesContainer = try trafficSourcesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.TrafficSourceIdentifier].self, forKey: .member) - var trafficSourcesBuffer:[AutoScalingClientTypes.TrafficSourceIdentifier]? = nil - if let trafficSourcesContainer = trafficSourcesContainer { - trafficSourcesBuffer = [AutoScalingClientTypes.TrafficSourceIdentifier]() - for structureContainer0 in trafficSourcesContainer { - trafficSourcesBuffer?.append(structureContainer0) - } - } - trafficSources = trafficSourcesBuffer - } else { - trafficSources = [] - } - } else { - trafficSources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachTrafficSourcesOutput() } } } -extension DetachTrafficSourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DetachTrafficSourcesOutput: Swift.Equatable { public init() { } } -enum DetachTrafficSourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DetachTrafficSourcesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DisableMetricsCollectionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case metrics = "Metrics" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -8152,64 +6018,38 @@ public struct DisableMetricsCollectionInput: Swift.Equatable { } } -struct DisableMetricsCollectionInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let metrics: [Swift.String]? -} - -extension DisableMetricsCollectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case metrics = "Metrics" - } +extension DisableMetricsCollectionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var metricsBuffer:[Swift.String]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [Swift.String]() - for stringContainer0 in metricsContainer { - metricsBuffer?.append(stringContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] - } - } else { - metrics = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DisableMetricsCollectionOutput() } } } -extension DisableMetricsCollectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DisableMetricsCollectionOutput: Swift.Equatable { public init() { } } -enum DisableMetricsCollectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DisableMetricsCollectionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.Ebs: Swift.Codable { +extension AutoScalingClientTypes.Ebs: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deleteOnTermination = "DeleteOnTermination" case encrypted = "Encrypted" @@ -8245,22 +6085,19 @@ extension AutoScalingClientTypes.Ebs: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let volumeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeType) - volumeType = volumeTypeDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) - throughput = throughputDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.Ebs() + value.snapshotId = try reader["SnapshotId"].readIfPresent() + value.volumeSize = try reader["VolumeSize"].readIfPresent() + value.volumeType = try reader["VolumeType"].readIfPresent() + value.deleteOnTermination = try reader["DeleteOnTermination"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.encrypted = try reader["Encrypted"].readIfPresent() + value.throughput = try reader["Throughput"].readIfPresent() + return value + } } } @@ -8323,6 +6160,12 @@ extension AutoScalingClientTypes { } extension EnableMetricsCollectionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case granularity = "Granularity" + case metrics = "Metrics" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -8420,49 +6263,12 @@ public struct EnableMetricsCollectionInput: Swift.Equatable { } } -struct EnableMetricsCollectionInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let metrics: [Swift.String]? - let granularity: Swift.String? -} - -extension EnableMetricsCollectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case granularity = "Granularity" - case metrics = "Metrics" - } +extension EnableMetricsCollectionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var metricsBuffer:[Swift.String]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [Swift.String]() - for stringContainer0 in metricsContainer { - metricsBuffer?.append(stringContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] - } - } else { - metrics = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return EnableMetricsCollectionOutput() } - let granularityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .granularity) - granularity = granularityDecoded - } -} - -extension EnableMetricsCollectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -8471,17 +6277,24 @@ public struct EnableMetricsCollectionOutput: Swift.Equatable { public init() { } } -enum EnableMetricsCollectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum EnableMetricsCollectionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.EnabledMetric: Swift.Codable { +extension AutoScalingClientTypes.EnabledMetric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case granularity = "Granularity" case metric = "Metric" @@ -8497,12 +6310,14 @@ extension AutoScalingClientTypes.EnabledMetric: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metric) - metric = metricDecoded - let granularityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .granularity) - granularity = granularityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.EnabledMetric() + value.metric = try reader["Metric"].readIfPresent() + value.granularity = try reader["Granularity"].readIfPresent() + return value + } } } @@ -8570,6 +6385,12 @@ extension AutoScalingClientTypes { } extension EnterStandbyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case instanceIds = "InstanceIds" + case shouldDecrementDesiredCapacity = "ShouldDecrementDesiredCapacity" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -8624,55 +6445,15 @@ public struct EnterStandbyInput: Swift.Equatable { } } -struct EnterStandbyInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let autoScalingGroupName: Swift.String? - let shouldDecrementDesiredCapacity: Swift.Bool? -} - -extension EnterStandbyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceIds = "InstanceIds" - case shouldDecrementDesiredCapacity = "ShouldDecrementDesiredCapacity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct member{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let shouldDecrementDesiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .shouldDecrementDesiredCapacity) - shouldDecrementDesiredCapacity = shouldDecrementDesiredCapacityDecoded - } -} +extension EnterStandbyOutput { -extension EnterStandbyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnterStandbyOutputBody = try responseDecoder.decode(responseBody: data) - self.activities = output.activities - } else { - self.activities = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["EnterStandbyResult"] + var value = EnterStandbyOutput() + value.activities = try reader["Activities"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.Activity.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8689,51 +6470,32 @@ public struct EnterStandbyOutput: Swift.Equatable { } } -struct EnterStandbyOutputBody: Swift.Equatable { - let activities: [AutoScalingClientTypes.Activity]? -} +enum EnterStandbyOutputError { -extension EnterStandbyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activities = "Activities" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("EnterStandbyResult")) - if containerValues.contains(.activities) { - struct KeyVal0{struct member{}} - let activitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .activities) - if let activitiesWrappedContainer = activitiesWrappedContainer { - let activitiesContainer = try activitiesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Activity].self, forKey: .member) - var activitiesBuffer:[AutoScalingClientTypes.Activity]? = nil - if let activitiesContainer = activitiesContainer { - activitiesBuffer = [AutoScalingClientTypes.Activity]() - for structureContainer0 in activitiesContainer { - activitiesBuffer?.append(structureContainer0) - } - } - activities = activitiesBuffer - } else { - activities = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - activities = nil } } } -enum EnterStandbyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ExecutePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case breachThreshold = "BreachThreshold" + case honorCooldown = "HonorCooldown" + case metricValue = "MetricValue" + case policyName = "PolicyName" } -} -extension ExecutePolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -8792,40 +6554,12 @@ public struct ExecutePolicyInput: Swift.Equatable { } } -struct ExecutePolicyInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let policyName: Swift.String? - let honorCooldown: Swift.Bool? - let metricValue: Swift.Double? - let breachThreshold: Swift.Double? -} - -extension ExecutePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case breachThreshold = "BreachThreshold" - case honorCooldown = "HonorCooldown" - case metricValue = "MetricValue" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let honorCooldownDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .honorCooldown) - honorCooldown = honorCooldownDecoded - let metricValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .metricValue) - metricValue = metricValueDecoded - let breachThresholdDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .breachThreshold) - breachThreshold = breachThresholdDecoded - } -} +extension ExecutePolicyOutput { -extension ExecutePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ExecutePolicyOutput() + } } } @@ -8834,18 +6568,30 @@ public struct ExecutePolicyOutput: Swift.Equatable { public init() { } } -enum ExecutePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ExecutePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ExitStandbyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case instanceIds = "InstanceIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -8892,51 +6638,15 @@ public struct ExitStandbyInput: Swift.Equatable { } } -struct ExitStandbyInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let autoScalingGroupName: Swift.String? -} - -extension ExitStandbyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceIds = "InstanceIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct member{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - } -} +extension ExitStandbyOutput { -extension ExitStandbyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ExitStandbyOutputBody = try responseDecoder.decode(responseBody: data) - self.activities = output.activities - } else { - self.activities = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ExitStandbyResult"] + var value = ExitStandbyOutput() + value.activities = try reader["Activities"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.Activity.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8953,51 +6663,24 @@ public struct ExitStandbyOutput: Swift.Equatable { } } -struct ExitStandbyOutputBody: Swift.Equatable { - let activities: [AutoScalingClientTypes.Activity]? -} +enum ExitStandbyOutputError { -extension ExitStandbyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activities = "Activities" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ExitStandbyResult")) - if containerValues.contains(.activities) { - struct KeyVal0{struct member{}} - let activitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .activities) - if let activitiesWrappedContainer = activitiesWrappedContainer { - let activitiesContainer = try activitiesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Activity].self, forKey: .member) - var activitiesBuffer:[AutoScalingClientTypes.Activity]? = nil - if let activitiesContainer = activitiesContainer { - activitiesBuffer = [AutoScalingClientTypes.Activity]() - for structureContainer0 in activitiesContainer { - activitiesBuffer?.append(structureContainer0) - } - } - activities = activitiesBuffer - } else { - activities = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - activities = nil - } - } -} - -enum ExitStandbyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest: Swift.Codable { +extension AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case errorCode = "ErrorCode" case errorMessage = "ErrorMessage" @@ -9017,14 +6700,15 @@ extension AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let errorCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorCode) - errorCode = errorCodeDecoded - let errorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorMessage) - errorMessage = errorMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.FailedScheduledUpdateGroupActionRequest() + value.scheduledActionName = try reader["ScheduledActionName"].readIfPresent() + value.errorCode = try reader["ErrorCode"].readIfPresent() + value.errorMessage = try reader["ErrorMessage"].readIfPresent() + return value + } } } @@ -9053,7 +6737,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.Filter: Swift.Codable { +extension AutoScalingClientTypes.Filter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case values = "Values" @@ -9078,28 +6762,13 @@ extension AutoScalingClientTypes.Filter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.Filter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9142,6 +6811,13 @@ extension AutoScalingClientTypes { } extension GetPredictiveScalingForecastInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case endTime = "EndTime" + case policyName = "PolicyName" + case startTime = "StartTime" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -9196,46 +6872,17 @@ public struct GetPredictiveScalingForecastInput: Swift.Equatable { } } -struct GetPredictiveScalingForecastInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let policyName: Swift.String? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? -} - -extension GetPredictiveScalingForecastInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case endTime = "EndTime" - case policyName = "PolicyName" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - } -} +extension GetPredictiveScalingForecastOutput { -extension GetPredictiveScalingForecastOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetPredictiveScalingForecastOutputBody = try responseDecoder.decode(responseBody: data) - self.capacityForecast = output.capacityForecast - self.loadForecast = output.loadForecast - self.updateTime = output.updateTime - } else { - self.capacityForecast = nil - self.loadForecast = nil - self.updateTime = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetPredictiveScalingForecastResult"] + var value = GetPredictiveScalingForecastOutput() + value.capacityForecast = try reader["CapacityForecast"].readIfPresent(readingClosure: AutoScalingClientTypes.CapacityForecast.readingClosure) + value.loadForecast = try reader["LoadForecast"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.LoadForecast.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.updateTime = try reader["UpdateTime"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -9263,59 +6910,24 @@ public struct GetPredictiveScalingForecastOutput: Swift.Equatable { } } -struct GetPredictiveScalingForecastOutputBody: Swift.Equatable { - let loadForecast: [AutoScalingClientTypes.LoadForecast]? - let capacityForecast: AutoScalingClientTypes.CapacityForecast? - let updateTime: ClientRuntime.Date? -} +enum GetPredictiveScalingForecastOutputError { -extension GetPredictiveScalingForecastOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityForecast = "CapacityForecast" - case loadForecast = "LoadForecast" - case updateTime = "UpdateTime" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetPredictiveScalingForecastResult")) - if containerValues.contains(.loadForecast) { - struct KeyVal0{struct member{}} - let loadForecastWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadForecast) - if let loadForecastWrappedContainer = loadForecastWrappedContainer { - let loadForecastContainer = try loadForecastWrappedContainer.decodeIfPresent([AutoScalingClientTypes.LoadForecast].self, forKey: .member) - var loadForecastBuffer:[AutoScalingClientTypes.LoadForecast]? = nil - if let loadForecastContainer = loadForecastContainer { - loadForecastBuffer = [AutoScalingClientTypes.LoadForecast]() - for structureContainer0 in loadForecastContainer { - loadForecastBuffer?.append(structureContainer0) - } - } - loadForecast = loadForecastBuffer - } else { - loadForecast = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - loadForecast = nil } - let capacityForecastDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.CapacityForecast.self, forKey: .capacityForecast) - capacityForecast = capacityForecastDecoded - let updateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateTime) - updateTime = updateTimeDecoded } } -enum GetPredictiveScalingForecastOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension AutoScalingClientTypes.Instance: Swift.Codable { +extension AutoScalingClientTypes.Instance: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZone = "AvailabilityZone" case healthStatus = "HealthStatus" @@ -9359,26 +6971,21 @@ extension AutoScalingClientTypes.Instance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let lifecycleStateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LifecycleState.self, forKey: .lifecycleState) - lifecycleState = lifecycleStateDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let launchConfigurationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationName) - launchConfigurationName = launchConfigurationNameDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let protectedFromScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .protectedFromScaleIn) - protectedFromScaleIn = protectedFromScaleInDecoded - let weightedCapacityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .weightedCapacity) - weightedCapacity = weightedCapacityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.Instance() + value.instanceId = try reader["InstanceId"].readIfPresent() + value.instanceType = try reader["InstanceType"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.lifecycleState = try reader["LifecycleState"].readIfPresent() + value.healthStatus = try reader["HealthStatus"].readIfPresent() + value.launchConfigurationName = try reader["LaunchConfigurationName"].readIfPresent() + value.launchTemplate = try reader["LaunchTemplate"].readIfPresent(readingClosure: AutoScalingClientTypes.LaunchTemplateSpecification.readingClosure) + value.protectedFromScaleIn = try reader["ProtectedFromScaleIn"].readIfPresent() + value.weightedCapacity = try reader["WeightedCapacity"].readIfPresent() + return value + } } } @@ -9467,7 +7074,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.InstanceMaintenancePolicy: Swift.Codable { +extension AutoScalingClientTypes.InstanceMaintenancePolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maxHealthyPercentage = "MaxHealthyPercentage" case minHealthyPercentage = "MinHealthyPercentage" @@ -9483,12 +7090,14 @@ extension AutoScalingClientTypes.InstanceMaintenancePolicy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minHealthyPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minHealthyPercentage) - minHealthyPercentage = minHealthyPercentageDecoded - let maxHealthyPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxHealthyPercentage) - maxHealthyPercentage = maxHealthyPercentageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceMaintenancePolicy() + value.minHealthyPercentage = try reader["MinHealthyPercentage"].readIfPresent() + value.maxHealthyPercentage = try reader["MaxHealthyPercentage"].readIfPresent() + return value + } } } @@ -9576,7 +7185,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.InstanceMetadataOptions: Swift.Codable { +extension AutoScalingClientTypes.InstanceMetadataOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case httpEndpoint = "HttpEndpoint" case httpPutResponseHopLimit = "HttpPutResponseHopLimit" @@ -9596,14 +7205,15 @@ extension AutoScalingClientTypes.InstanceMetadataOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let httpTokensDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMetadataHttpTokensState.self, forKey: .httpTokens) - httpTokens = httpTokensDecoded - let httpPutResponseHopLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .httpPutResponseHopLimit) - httpPutResponseHopLimit = httpPutResponseHopLimitDecoded - let httpEndpointDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMetadataEndpointState.self, forKey: .httpEndpoint) - httpEndpoint = httpEndpointDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceMetadataOptions() + value.httpTokens = try reader["HttpTokens"].readIfPresent() + value.httpPutResponseHopLimit = try reader["HttpPutResponseHopLimit"].readIfPresent() + value.httpEndpoint = try reader["HttpEndpoint"].readIfPresent() + return value + } } } @@ -9631,7 +7241,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.InstanceMonitoring: Swift.Codable { +extension AutoScalingClientTypes.InstanceMonitoring: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case enabled = "Enabled" } @@ -9643,10 +7253,13 @@ extension AutoScalingClientTypes.InstanceMonitoring: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceMonitoring() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -9666,7 +7279,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.InstanceRefresh: Swift.Codable { +extension AutoScalingClientTypes.InstanceRefresh: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoScalingGroupName = "AutoScalingGroupName" case desiredConfiguration = "DesiredConfiguration" @@ -9722,32 +7335,24 @@ extension AutoScalingClientTypes.InstanceRefresh: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceRefreshIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceRefreshId) - instanceRefreshId = instanceRefreshIdDecoded - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceRefreshStatus.self, forKey: .status) - status = statusDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let percentageCompleteDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentageComplete) - percentageComplete = percentageCompleteDecoded - let instancesToUpdateDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancesToUpdate) - instancesToUpdate = instancesToUpdateDecoded - let progressDetailsDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceRefreshProgressDetails.self, forKey: .progressDetails) - progressDetails = progressDetailsDecoded - let preferencesDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.RefreshPreferences.self, forKey: .preferences) - preferences = preferencesDecoded - let desiredConfigurationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.DesiredConfiguration.self, forKey: .desiredConfiguration) - desiredConfiguration = desiredConfigurationDecoded - let rollbackDetailsDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.RollbackDetails.self, forKey: .rollbackDetails) - rollbackDetails = rollbackDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceRefresh() + value.instanceRefreshId = try reader["InstanceRefreshId"].readIfPresent() + value.autoScalingGroupName = try reader["AutoScalingGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.statusReason = try reader["StatusReason"].readIfPresent() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + value.percentageComplete = try reader["PercentageComplete"].readIfPresent() + value.instancesToUpdate = try reader["InstancesToUpdate"].readIfPresent() + value.progressDetails = try reader["ProgressDetails"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceRefreshProgressDetails.readingClosure) + value.preferences = try reader["Preferences"].readIfPresent(readingClosure: AutoScalingClientTypes.RefreshPreferences.readingClosure) + value.desiredConfiguration = try reader["DesiredConfiguration"].readIfPresent(readingClosure: AutoScalingClientTypes.DesiredConfiguration.readingClosure) + value.rollbackDetails = try reader["RollbackDetails"].readIfPresent(readingClosure: AutoScalingClientTypes.RollbackDetails.readingClosure) + return value + } } } @@ -9830,16 +7435,14 @@ extension AutoScalingClientTypes { } extension InstanceRefreshInProgressFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InstanceRefreshInProgressFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9867,23 +7470,7 @@ public struct InstanceRefreshInProgressFault: ClientRuntime.ModeledError, AWSCli } } -struct InstanceRefreshInProgressFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InstanceRefreshInProgressFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension AutoScalingClientTypes.InstanceRefreshLivePoolProgress: Swift.Codable { +extension AutoScalingClientTypes.InstanceRefreshLivePoolProgress: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instancesToUpdate = "InstancesToUpdate" case percentageComplete = "PercentageComplete" @@ -9899,12 +7486,14 @@ extension AutoScalingClientTypes.InstanceRefreshLivePoolProgress: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let percentageCompleteDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentageComplete) - percentageComplete = percentageCompleteDecoded - let instancesToUpdateDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancesToUpdate) - instancesToUpdate = instancesToUpdateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceRefreshLivePoolProgress() + value.percentageComplete = try reader["PercentageComplete"].readIfPresent() + value.instancesToUpdate = try reader["InstancesToUpdate"].readIfPresent() + return value + } } } @@ -9928,7 +7517,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.InstanceRefreshProgressDetails: Swift.Codable { +extension AutoScalingClientTypes.InstanceRefreshProgressDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case livePoolProgress = "LivePoolProgress" case warmPoolProgress = "WarmPoolProgress" @@ -9944,12 +7533,14 @@ extension AutoScalingClientTypes.InstanceRefreshProgressDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let livePoolProgressDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceRefreshLivePoolProgress.self, forKey: .livePoolProgress) - livePoolProgress = livePoolProgressDecoded - let warmPoolProgressDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceRefreshWarmPoolProgress.self, forKey: .warmPoolProgress) - warmPoolProgress = warmPoolProgressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceRefreshProgressDetails() + value.livePoolProgress = try reader["LivePoolProgress"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceRefreshLivePoolProgress.readingClosure) + value.warmPoolProgress = try reader["WarmPoolProgress"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceRefreshWarmPoolProgress.readingClosure) + return value + } } } @@ -10026,7 +7617,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.InstanceRefreshWarmPoolProgress: Swift.Codable { +extension AutoScalingClientTypes.InstanceRefreshWarmPoolProgress: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instancesToUpdate = "InstancesToUpdate" case percentageComplete = "PercentageComplete" @@ -10042,12 +7633,14 @@ extension AutoScalingClientTypes.InstanceRefreshWarmPoolProgress: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let percentageCompleteDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentageComplete) - percentageComplete = percentageCompleteDecoded - let instancesToUpdateDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancesToUpdate) - instancesToUpdate = instancesToUpdateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceRefreshWarmPoolProgress() + value.percentageComplete = try reader["PercentageComplete"].readIfPresent() + value.instancesToUpdate = try reader["InstancesToUpdate"].readIfPresent() + return value + } } } @@ -10071,7 +7664,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.InstanceRequirements: Swift.Codable { +extension AutoScalingClientTypes.InstanceRequirements: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case acceleratorCount = "AcceleratorCount" case acceleratorManufacturers = "AcceleratorManufacturers" @@ -10243,189 +7836,34 @@ extension AutoScalingClientTypes.InstanceRequirements: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vCpuCountDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.VCpuCountRequest.self, forKey: .vCpuCount) - vCpuCount = vCpuCountDecoded - let memoryMiBDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MemoryMiBRequest.self, forKey: .memoryMiB) - memoryMiB = memoryMiBDecoded - if containerValues.contains(.cpuManufacturers) { - struct KeyVal0{struct member{}} - let cpuManufacturersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cpuManufacturers) - if let cpuManufacturersWrappedContainer = cpuManufacturersWrappedContainer { - let cpuManufacturersContainer = try cpuManufacturersWrappedContainer.decodeIfPresent([AutoScalingClientTypes.CpuManufacturer].self, forKey: .member) - var cpuManufacturersBuffer:[AutoScalingClientTypes.CpuManufacturer]? = nil - if let cpuManufacturersContainer = cpuManufacturersContainer { - cpuManufacturersBuffer = [AutoScalingClientTypes.CpuManufacturer]() - for enumContainer0 in cpuManufacturersContainer { - cpuManufacturersBuffer?.append(enumContainer0) - } - } - cpuManufacturers = cpuManufacturersBuffer - } else { - cpuManufacturers = [] - } - } else { - cpuManufacturers = nil - } - let memoryGiBPerVCpuDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MemoryGiBPerVCpuRequest.self, forKey: .memoryGiBPerVCpu) - memoryGiBPerVCpu = memoryGiBPerVCpuDecoded - if containerValues.contains(.excludedInstanceTypes) { - struct KeyVal0{struct member{}} - let excludedInstanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedInstanceTypes) - if let excludedInstanceTypesWrappedContainer = excludedInstanceTypesWrappedContainer { - let excludedInstanceTypesContainer = try excludedInstanceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedInstanceTypesBuffer:[Swift.String]? = nil - if let excludedInstanceTypesContainer = excludedInstanceTypesContainer { - excludedInstanceTypesBuffer = [Swift.String]() - for stringContainer0 in excludedInstanceTypesContainer { - excludedInstanceTypesBuffer?.append(stringContainer0) - } - } - excludedInstanceTypes = excludedInstanceTypesBuffer - } else { - excludedInstanceTypes = [] - } - } else { - excludedInstanceTypes = nil - } - if containerValues.contains(.instanceGenerations) { - struct KeyVal0{struct member{}} - let instanceGenerationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceGenerations) - if let instanceGenerationsWrappedContainer = instanceGenerationsWrappedContainer { - let instanceGenerationsContainer = try instanceGenerationsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.InstanceGeneration].self, forKey: .member) - var instanceGenerationsBuffer:[AutoScalingClientTypes.InstanceGeneration]? = nil - if let instanceGenerationsContainer = instanceGenerationsContainer { - instanceGenerationsBuffer = [AutoScalingClientTypes.InstanceGeneration]() - for enumContainer0 in instanceGenerationsContainer { - instanceGenerationsBuffer?.append(enumContainer0) - } - } - instanceGenerations = instanceGenerationsBuffer - } else { - instanceGenerations = [] - } - } else { - instanceGenerations = nil - } - let spotMaxPricePercentageOverLowestPriceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .spotMaxPricePercentageOverLowestPrice) - spotMaxPricePercentageOverLowestPrice = spotMaxPricePercentageOverLowestPriceDecoded - let onDemandMaxPricePercentageOverLowestPriceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandMaxPricePercentageOverLowestPrice) - onDemandMaxPricePercentageOverLowestPrice = onDemandMaxPricePercentageOverLowestPriceDecoded - let bareMetalDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.BareMetal.self, forKey: .bareMetal) - bareMetal = bareMetalDecoded - let burstablePerformanceDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.BurstablePerformance.self, forKey: .burstablePerformance) - burstablePerformance = burstablePerformanceDecoded - let requireHibernateSupportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireHibernateSupport) - requireHibernateSupport = requireHibernateSupportDecoded - let networkInterfaceCountDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.NetworkInterfaceCountRequest.self, forKey: .networkInterfaceCount) - networkInterfaceCount = networkInterfaceCountDecoded - let localStorageDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LocalStorage.self, forKey: .localStorage) - localStorage = localStorageDecoded - if containerValues.contains(.localStorageTypes) { - struct KeyVal0{struct member{}} - let localStorageTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localStorageTypes) - if let localStorageTypesWrappedContainer = localStorageTypesWrappedContainer { - let localStorageTypesContainer = try localStorageTypesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.LocalStorageType].self, forKey: .member) - var localStorageTypesBuffer:[AutoScalingClientTypes.LocalStorageType]? = nil - if let localStorageTypesContainer = localStorageTypesContainer { - localStorageTypesBuffer = [AutoScalingClientTypes.LocalStorageType]() - for enumContainer0 in localStorageTypesContainer { - localStorageTypesBuffer?.append(enumContainer0) - } - } - localStorageTypes = localStorageTypesBuffer - } else { - localStorageTypes = [] - } - } else { - localStorageTypes = nil - } - let totalLocalStorageGBDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.TotalLocalStorageGBRequest.self, forKey: .totalLocalStorageGB) - totalLocalStorageGB = totalLocalStorageGBDecoded - let baselineEbsBandwidthMbpsDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.BaselineEbsBandwidthMbpsRequest.self, forKey: .baselineEbsBandwidthMbps) - baselineEbsBandwidthMbps = baselineEbsBandwidthMbpsDecoded - if containerValues.contains(.acceleratorTypes) { - struct KeyVal0{struct member{}} - let acceleratorTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorTypes) - if let acceleratorTypesWrappedContainer = acceleratorTypesWrappedContainer { - let acceleratorTypesContainer = try acceleratorTypesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.AcceleratorType].self, forKey: .member) - var acceleratorTypesBuffer:[AutoScalingClientTypes.AcceleratorType]? = nil - if let acceleratorTypesContainer = acceleratorTypesContainer { - acceleratorTypesBuffer = [AutoScalingClientTypes.AcceleratorType]() - for enumContainer0 in acceleratorTypesContainer { - acceleratorTypesBuffer?.append(enumContainer0) - } - } - acceleratorTypes = acceleratorTypesBuffer - } else { - acceleratorTypes = [] - } - } else { - acceleratorTypes = nil - } - let acceleratorCountDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.AcceleratorCountRequest.self, forKey: .acceleratorCount) - acceleratorCount = acceleratorCountDecoded - if containerValues.contains(.acceleratorManufacturers) { - struct KeyVal0{struct member{}} - let acceleratorManufacturersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorManufacturers) - if let acceleratorManufacturersWrappedContainer = acceleratorManufacturersWrappedContainer { - let acceleratorManufacturersContainer = try acceleratorManufacturersWrappedContainer.decodeIfPresent([AutoScalingClientTypes.AcceleratorManufacturer].self, forKey: .member) - var acceleratorManufacturersBuffer:[AutoScalingClientTypes.AcceleratorManufacturer]? = nil - if let acceleratorManufacturersContainer = acceleratorManufacturersContainer { - acceleratorManufacturersBuffer = [AutoScalingClientTypes.AcceleratorManufacturer]() - for enumContainer0 in acceleratorManufacturersContainer { - acceleratorManufacturersBuffer?.append(enumContainer0) - } - } - acceleratorManufacturers = acceleratorManufacturersBuffer - } else { - acceleratorManufacturers = [] - } - } else { - acceleratorManufacturers = nil - } - if containerValues.contains(.acceleratorNames) { - struct KeyVal0{struct member{}} - let acceleratorNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorNames) - if let acceleratorNamesWrappedContainer = acceleratorNamesWrappedContainer { - let acceleratorNamesContainer = try acceleratorNamesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.AcceleratorName].self, forKey: .member) - var acceleratorNamesBuffer:[AutoScalingClientTypes.AcceleratorName]? = nil - if let acceleratorNamesContainer = acceleratorNamesContainer { - acceleratorNamesBuffer = [AutoScalingClientTypes.AcceleratorName]() - for enumContainer0 in acceleratorNamesContainer { - acceleratorNamesBuffer?.append(enumContainer0) - } - } - acceleratorNames = acceleratorNamesBuffer - } else { - acceleratorNames = [] - } - } else { - acceleratorNames = nil - } - let acceleratorTotalMemoryMiBDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.AcceleratorTotalMemoryMiBRequest.self, forKey: .acceleratorTotalMemoryMiB) - acceleratorTotalMemoryMiB = acceleratorTotalMemoryMiBDecoded - let networkBandwidthGbpsDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.NetworkBandwidthGbpsRequest.self, forKey: .networkBandwidthGbps) - networkBandwidthGbps = networkBandwidthGbpsDecoded - if containerValues.contains(.allowedInstanceTypes) { - struct KeyVal0{struct member{}} - let allowedInstanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedInstanceTypes) - if let allowedInstanceTypesWrappedContainer = allowedInstanceTypesWrappedContainer { - let allowedInstanceTypesContainer = try allowedInstanceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allowedInstanceTypesBuffer:[Swift.String]? = nil - if let allowedInstanceTypesContainer = allowedInstanceTypesContainer { - allowedInstanceTypesBuffer = [Swift.String]() - for stringContainer0 in allowedInstanceTypesContainer { - allowedInstanceTypesBuffer?.append(stringContainer0) - } - } - allowedInstanceTypes = allowedInstanceTypesBuffer - } else { - allowedInstanceTypes = [] - } - } else { - allowedInstanceTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceRequirements() + value.vCpuCount = try reader["VCpuCount"].readIfPresent(readingClosure: AutoScalingClientTypes.VCpuCountRequest.readingClosure) + value.memoryMiB = try reader["MemoryMiB"].readIfPresent(readingClosure: AutoScalingClientTypes.MemoryMiBRequest.readingClosure) + value.cpuManufacturers = try reader["CpuManufacturers"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.CpuManufacturer.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.memoryGiBPerVCpu = try reader["MemoryGiBPerVCpu"].readIfPresent(readingClosure: AutoScalingClientTypes.MemoryGiBPerVCpuRequest.readingClosure) + value.excludedInstanceTypes = try reader["ExcludedInstanceTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.instanceGenerations = try reader["InstanceGenerations"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.InstanceGeneration.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.spotMaxPricePercentageOverLowestPrice = try reader["SpotMaxPricePercentageOverLowestPrice"].readIfPresent() + value.onDemandMaxPricePercentageOverLowestPrice = try reader["OnDemandMaxPricePercentageOverLowestPrice"].readIfPresent() + value.bareMetal = try reader["BareMetal"].readIfPresent() + value.burstablePerformance = try reader["BurstablePerformance"].readIfPresent() + value.requireHibernateSupport = try reader["RequireHibernateSupport"].readIfPresent() + value.networkInterfaceCount = try reader["NetworkInterfaceCount"].readIfPresent(readingClosure: AutoScalingClientTypes.NetworkInterfaceCountRequest.readingClosure) + value.localStorage = try reader["LocalStorage"].readIfPresent() + value.localStorageTypes = try reader["LocalStorageTypes"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.LocalStorageType.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.totalLocalStorageGB = try reader["TotalLocalStorageGB"].readIfPresent(readingClosure: AutoScalingClientTypes.TotalLocalStorageGBRequest.readingClosure) + value.baselineEbsBandwidthMbps = try reader["BaselineEbsBandwidthMbps"].readIfPresent(readingClosure: AutoScalingClientTypes.BaselineEbsBandwidthMbpsRequest.readingClosure) + value.acceleratorTypes = try reader["AcceleratorTypes"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.AcceleratorType.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.acceleratorCount = try reader["AcceleratorCount"].readIfPresent(readingClosure: AutoScalingClientTypes.AcceleratorCountRequest.readingClosure) + value.acceleratorManufacturers = try reader["AcceleratorManufacturers"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.AcceleratorManufacturer.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.acceleratorNames = try reader["AcceleratorNames"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.AcceleratorName.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.acceleratorTotalMemoryMiB = try reader["AcceleratorTotalMemoryMiB"].readIfPresent(readingClosure: AutoScalingClientTypes.AcceleratorTotalMemoryMiBRequest.readingClosure) + value.networkBandwidthGbps = try reader["NetworkBandwidthGbps"].readIfPresent(readingClosure: AutoScalingClientTypes.NetworkBandwidthGbpsRequest.readingClosure) + value.allowedInstanceTypes = try reader["AllowedInstanceTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10603,7 +8041,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.InstanceReusePolicy: Swift.Codable { +extension AutoScalingClientTypes.InstanceReusePolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case reuseOnScaleIn = "ReuseOnScaleIn" } @@ -10615,10 +8053,13 @@ extension AutoScalingClientTypes.InstanceReusePolicy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reuseOnScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .reuseOnScaleIn) - reuseOnScaleIn = reuseOnScaleInDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstanceReusePolicy() + value.reuseOnScaleIn = try reader["ReuseOnScaleIn"].readIfPresent() + return value + } } } @@ -10638,7 +8079,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.InstancesDistribution: Swift.Codable { +extension AutoScalingClientTypes.InstancesDistribution: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case onDemandAllocationStrategy = "OnDemandAllocationStrategy" case onDemandBaseCapacity = "OnDemandBaseCapacity" @@ -10670,20 +8111,18 @@ extension AutoScalingClientTypes.InstancesDistribution: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let onDemandAllocationStrategyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .onDemandAllocationStrategy) - onDemandAllocationStrategy = onDemandAllocationStrategyDecoded - let onDemandBaseCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandBaseCapacity) - onDemandBaseCapacity = onDemandBaseCapacityDecoded - let onDemandPercentageAboveBaseCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandPercentageAboveBaseCapacity) - onDemandPercentageAboveBaseCapacity = onDemandPercentageAboveBaseCapacityDecoded - let spotAllocationStrategyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotAllocationStrategy) - spotAllocationStrategy = spotAllocationStrategyDecoded - let spotInstancePoolsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .spotInstancePools) - spotInstancePools = spotInstancePoolsDecoded - let spotMaxPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotMaxPrice) - spotMaxPrice = spotMaxPriceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.InstancesDistribution() + value.onDemandAllocationStrategy = try reader["OnDemandAllocationStrategy"].readIfPresent() + value.onDemandBaseCapacity = try reader["OnDemandBaseCapacity"].readIfPresent() + value.onDemandPercentageAboveBaseCapacity = try reader["OnDemandPercentageAboveBaseCapacity"].readIfPresent() + value.spotAllocationStrategy = try reader["SpotAllocationStrategy"].readIfPresent() + value.spotInstancePools = try reader["SpotInstancePools"].readIfPresent() + value.spotMaxPrice = try reader["SpotMaxPrice"].readIfPresent() + return value + } } } @@ -10724,16 +8163,14 @@ extension AutoScalingClientTypes { } extension InvalidNextToken { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidNextToken() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10762,33 +8199,15 @@ public struct InvalidNextToken: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct InvalidNextTokenBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidNextTokenBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IrreversibleInstanceRefreshFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IrreversibleInstanceRefreshFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10809,30 +8228,14 @@ public struct IrreversibleInstanceRefreshFault: ClientRuntime.ModeledError, AWSC public internal(set) var requestID: Swift.String? public init( - message: Swift.String? = nil - ) - { - self.properties.message = message - } -} - -struct IrreversibleInstanceRefreshFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension IrreversibleInstanceRefreshFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + message: Swift.String? = nil + ) + { + self.properties.message = message } } -extension AutoScalingClientTypes.LaunchConfiguration: Swift.Codable { +extension AutoScalingClientTypes.LaunchConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case associatePublicIpAddress = "AssociatePublicIpAddress" case blockDeviceMappings = "BlockDeviceMappings" @@ -10947,99 +8350,32 @@ extension AutoScalingClientTypes.LaunchConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchConfigurationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationName) - launchConfigurationName = launchConfigurationNameDecoded - let launchConfigurationARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationARN) - launchConfigurationARN = launchConfigurationARNDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let classicLinkVPCIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .classicLinkVPCId) - classicLinkVPCId = classicLinkVPCIdDecoded - if containerValues.contains(.classicLinkVPCSecurityGroups) { - struct KeyVal0{struct member{}} - let classicLinkVPCSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .classicLinkVPCSecurityGroups) - if let classicLinkVPCSecurityGroupsWrappedContainer = classicLinkVPCSecurityGroupsWrappedContainer { - let classicLinkVPCSecurityGroupsContainer = try classicLinkVPCSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var classicLinkVPCSecurityGroupsBuffer:[Swift.String]? = nil - if let classicLinkVPCSecurityGroupsContainer = classicLinkVPCSecurityGroupsContainer { - classicLinkVPCSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in classicLinkVPCSecurityGroupsContainer { - classicLinkVPCSecurityGroupsBuffer?.append(stringContainer0) - } - } - classicLinkVPCSecurityGroups = classicLinkVPCSecurityGroupsBuffer - } else { - classicLinkVPCSecurityGroups = [] - } - } else { - classicLinkVPCSecurityGroups = nil - } - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct member{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[AutoScalingClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [AutoScalingClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let instanceMonitoringDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMonitoring.self, forKey: .instanceMonitoring) - instanceMonitoring = instanceMonitoringDecoded - let spotPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotPrice) - spotPrice = spotPriceDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let createdTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTime) - createdTime = createdTimeDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let associatePublicIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associatePublicIpAddress) - associatePublicIpAddress = associatePublicIpAddressDecoded - let placementTenancyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .placementTenancy) - placementTenancy = placementTenancyDecoded - let metadataOptionsDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMetadataOptions.self, forKey: .metadataOptions) - metadataOptions = metadataOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LaunchConfiguration() + value.launchConfigurationName = try reader["LaunchConfigurationName"].readIfPresent() + value.launchConfigurationARN = try reader["LaunchConfigurationARN"].readIfPresent() + value.imageId = try reader["ImageId"].readIfPresent() + value.keyName = try reader["KeyName"].readIfPresent() + value.securityGroups = try reader["SecurityGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.classicLinkVPCId = try reader["ClassicLinkVPCId"].readIfPresent() + value.classicLinkVPCSecurityGroups = try reader["ClassicLinkVPCSecurityGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.userData = try reader["UserData"].readIfPresent() + value.instanceType = try reader["InstanceType"].readIfPresent() + value.kernelId = try reader["KernelId"].readIfPresent() + value.ramdiskId = try reader["RamdiskId"].readIfPresent() + value.blockDeviceMappings = try reader["BlockDeviceMappings"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.BlockDeviceMapping.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.instanceMonitoring = try reader["InstanceMonitoring"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceMonitoring.readingClosure) + value.spotPrice = try reader["SpotPrice"].readIfPresent() + value.iamInstanceProfile = try reader["IamInstanceProfile"].readIfPresent() + value.createdTime = try reader["CreatedTime"].readTimestampIfPresent(format: .dateTime) + value.ebsOptimized = try reader["EbsOptimized"].readIfPresent() + value.associatePublicIpAddress = try reader["AssociatePublicIpAddress"].readIfPresent() + value.placementTenancy = try reader["PlacementTenancy"].readIfPresent() + value.metadataOptions = try reader["MetadataOptions"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceMetadataOptions.readingClosure) + return value + } } } @@ -11139,7 +8475,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.LaunchTemplate: Swift.Codable { +extension AutoScalingClientTypes.LaunchTemplate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case launchTemplateSpecification = "LaunchTemplateSpecification" case overrides = "Overrides" @@ -11164,28 +8500,13 @@ extension AutoScalingClientTypes.LaunchTemplate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplateSpecification) - launchTemplateSpecification = launchTemplateSpecificationDecoded - if containerValues.contains(.overrides) { - struct KeyVal0{struct member{}} - let overridesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .overrides) - if let overridesWrappedContainer = overridesWrappedContainer { - let overridesContainer = try overridesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.LaunchTemplateOverrides].self, forKey: .member) - var overridesBuffer:[AutoScalingClientTypes.LaunchTemplateOverrides]? = nil - if let overridesContainer = overridesContainer { - overridesBuffer = [AutoScalingClientTypes.LaunchTemplateOverrides]() - for structureContainer0 in overridesContainer { - overridesBuffer?.append(structureContainer0) - } - } - overrides = overridesBuffer - } else { - overrides = [] - } - } else { - overrides = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LaunchTemplate() + value.launchTemplateSpecification = try reader["LaunchTemplateSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.LaunchTemplateSpecification.readingClosure) + value.overrides = try reader["Overrides"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.LaunchTemplateOverrides.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11210,7 +8531,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.LaunchTemplateOverrides: Swift.Codable { +extension AutoScalingClientTypes.LaunchTemplateOverrides: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instanceRequirements = "InstanceRequirements" case instanceType = "InstanceType" @@ -11234,16 +8555,16 @@ extension AutoScalingClientTypes.LaunchTemplateOverrides: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let weightedCapacityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .weightedCapacity) - weightedCapacity = weightedCapacityDecoded - let launchTemplateSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplateSpecification) - launchTemplateSpecification = launchTemplateSpecificationDecoded - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceRequirements.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LaunchTemplateOverrides() + value.instanceType = try reader["InstanceType"].readIfPresent() + value.weightedCapacity = try reader["WeightedCapacity"].readIfPresent() + value.launchTemplateSpecification = try reader["LaunchTemplateSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.LaunchTemplateSpecification.readingClosure) + value.instanceRequirements = try reader["InstanceRequirements"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceRequirements.readingClosure) + return value + } } } @@ -11282,7 +8603,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.LaunchTemplateSpecification: Swift.Codable { +extension AutoScalingClientTypes.LaunchTemplateSpecification: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case launchTemplateId = "LaunchTemplateId" case launchTemplateName = "LaunchTemplateName" @@ -11302,14 +8623,15 @@ extension AutoScalingClientTypes.LaunchTemplateSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LaunchTemplateSpecification() + value.launchTemplateId = try reader["LaunchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["LaunchTemplateName"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -11337,7 +8659,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.LifecycleHook: Swift.Codable { +extension AutoScalingClientTypes.LifecycleHook: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoScalingGroupName = "AutoScalingGroupName" case defaultResult = "DefaultResult" @@ -11381,26 +8703,21 @@ extension AutoScalingClientTypes.LifecycleHook: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lifecycleHookNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleHookName) - lifecycleHookName = lifecycleHookNameDecoded - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let lifecycleTransitionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleTransition) - lifecycleTransition = lifecycleTransitionDecoded - let notificationTargetARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTargetARN) - notificationTargetARN = notificationTargetARNDecoded - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - let notificationMetadataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationMetadata) - notificationMetadata = notificationMetadataDecoded - let heartbeatTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .heartbeatTimeout) - heartbeatTimeout = heartbeatTimeoutDecoded - let globalTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .globalTimeout) - globalTimeout = globalTimeoutDecoded - let defaultResultDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultResult) - defaultResult = defaultResultDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LifecycleHook() + value.lifecycleHookName = try reader["LifecycleHookName"].readIfPresent() + value.autoScalingGroupName = try reader["AutoScalingGroupName"].readIfPresent() + value.lifecycleTransition = try reader["LifecycleTransition"].readIfPresent() + value.notificationTargetARN = try reader["NotificationTargetARN"].readIfPresent() + value.roleARN = try reader["RoleARN"].readIfPresent() + value.notificationMetadata = try reader["NotificationMetadata"].readIfPresent() + value.heartbeatTimeout = try reader["HeartbeatTimeout"].readIfPresent() + value.globalTimeout = try reader["GlobalTimeout"].readIfPresent() + value.defaultResult = try reader["DefaultResult"].readIfPresent() + return value + } } } @@ -11452,7 +8769,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.LifecycleHookSpecification: Swift.Codable { +extension AutoScalingClientTypes.LifecycleHookSpecification: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultResult = "DefaultResult" case heartbeatTimeout = "HeartbeatTimeout" @@ -11488,22 +8805,19 @@ extension AutoScalingClientTypes.LifecycleHookSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lifecycleHookNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleHookName) - lifecycleHookName = lifecycleHookNameDecoded - let lifecycleTransitionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleTransition) - lifecycleTransition = lifecycleTransitionDecoded - let notificationMetadataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationMetadata) - notificationMetadata = notificationMetadataDecoded - let heartbeatTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .heartbeatTimeout) - heartbeatTimeout = heartbeatTimeoutDecoded - let defaultResultDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultResult) - defaultResult = defaultResultDecoded - let notificationTargetARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTargetARN) - notificationTargetARN = notificationTargetARNDecoded - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LifecycleHookSpecification() + value.lifecycleHookName = try reader["LifecycleHookName"].readIfPresent() + value.lifecycleTransition = try reader["LifecycleTransition"].readIfPresent() + value.notificationMetadata = try reader["NotificationMetadata"].readIfPresent() + value.heartbeatTimeout = try reader["HeartbeatTimeout"].readIfPresent() + value.defaultResult = try reader["DefaultResult"].readIfPresent() + value.notificationTargetARN = try reader["NotificationTargetARN"].readIfPresent() + value.roleARN = try reader["RoleARN"].readIfPresent() + return value + } } } @@ -11649,16 +8963,14 @@ extension AutoScalingClientTypes { } extension LimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11687,23 +8999,7 @@ public struct LimitExceededFault: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct LimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension LimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension AutoScalingClientTypes.LoadBalancerState: Swift.Codable { +extension AutoScalingClientTypes.LoadBalancerState: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case loadBalancerName = "LoadBalancerName" case state = "State" @@ -11719,12 +9015,14 @@ extension AutoScalingClientTypes.LoadBalancerState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LoadBalancerState() + value.loadBalancerName = try reader["LoadBalancerName"].readIfPresent() + value.state = try reader["State"].readIfPresent() + return value + } } } @@ -11758,7 +9056,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.LoadBalancerTargetGroupState: Swift.Codable { +extension AutoScalingClientTypes.LoadBalancerTargetGroupState: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case loadBalancerTargetGroupARN = "LoadBalancerTargetGroupARN" case state = "State" @@ -11774,12 +9072,14 @@ extension AutoScalingClientTypes.LoadBalancerTargetGroupState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerTargetGroupARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerTargetGroupARN) - loadBalancerTargetGroupARN = loadBalancerTargetGroupARNDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LoadBalancerTargetGroupState() + value.loadBalancerTargetGroupARN = try reader["LoadBalancerTargetGroupARN"].readIfPresent() + value.state = try reader["State"].readIfPresent() + return value + } } } @@ -11813,7 +9113,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.LoadForecast: Swift.Codable { +extension AutoScalingClientTypes.LoadForecast: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricSpecification = "MetricSpecification" case timestamps = "Timestamps" @@ -11851,48 +9151,15 @@ extension AutoScalingClientTypes.LoadForecast: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.timestamps) { - struct KeyVal0{struct member{}} - let timestampsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .timestamps) - if let timestampsWrappedContainer = timestampsWrappedContainer { - let timestampsContainer = try timestampsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var timestampsBuffer:[ClientRuntime.Date]? = nil - if let timestampsContainer = timestampsContainer { - timestampsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in timestampsContainer { - try timestampsBuffer?.append(timestampsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - timestamps = timestampsBuffer - } else { - timestamps = [] - } - } else { - timestamps = nil - } - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.Double].self, forKey: .member) - var valuesBuffer:[Swift.Double]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.Double]() - for doubleContainer0 in valuesContainer { - valuesBuffer?.append(doubleContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.LoadForecast() + value.timestamps = try reader["Timestamps"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "member", isFlattened: false) + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.Double.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.metricSpecification = try reader["MetricSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.PredictiveScalingMetricSpecification.readingClosure) + return value } - let metricSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingMetricSpecification.self, forKey: .metricSpecification) - metricSpecification = metricSpecificationDecoded } } @@ -11990,7 +9257,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.MemoryGiBPerVCpuRequest: Swift.Codable { +extension AutoScalingClientTypes.MemoryGiBPerVCpuRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -12006,12 +9273,14 @@ extension AutoScalingClientTypes.MemoryGiBPerVCpuRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.MemoryGiBPerVCpuRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -12035,7 +9304,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.MemoryMiBRequest: Swift.Codable { +extension AutoScalingClientTypes.MemoryMiBRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -12051,12 +9320,14 @@ extension AutoScalingClientTypes.MemoryMiBRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.MemoryMiBRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -12081,7 +9352,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.Metric: Swift.Codable { +extension AutoScalingClientTypes.Metric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dimensions = "Dimensions" case metricName = "MetricName" @@ -12110,30 +9381,14 @@ extension AutoScalingClientTypes.Metric: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.MetricDimension].self, forKey: .member) - var dimensionsBuffer:[AutoScalingClientTypes.MetricDimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [AutoScalingClientTypes.MetricDimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.Metric() + value.namespace = try reader["Namespace"].readIfPresent() + value.metricName = try reader["MetricName"].readIfPresent() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.MetricDimension.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12164,7 +9419,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.MetricCollectionType: Swift.Codable { +extension AutoScalingClientTypes.MetricCollectionType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metric = "Metric" } @@ -12176,10 +9431,13 @@ extension AutoScalingClientTypes.MetricCollectionType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metric) - metric = metricDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.MetricCollectionType() + value.metric = try reader["Metric"].readIfPresent() + return value + } } } @@ -12239,7 +9497,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.MetricDataQuery: Swift.Codable { +extension AutoScalingClientTypes.MetricDataQuery: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case expression = "Expression" case id = "Id" @@ -12267,18 +9525,17 @@ extension AutoScalingClientTypes.MetricDataQuery: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let expressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expression) - expression = expressionDecoded - let metricStatDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MetricStat.self, forKey: .metricStat) - metricStat = metricStatDecoded - let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) - label = labelDecoded - let returnDataDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnData) - returnData = returnDataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.MetricDataQuery() + value.id = try reader["Id"].readIfPresent() + value.expression = try reader["Expression"].readIfPresent() + value.metricStat = try reader["MetricStat"].readIfPresent(readingClosure: AutoScalingClientTypes.MetricStat.readingClosure) + value.label = try reader["Label"].readIfPresent() + value.returnData = try reader["ReturnData"].readIfPresent() + return value + } } } @@ -12315,7 +9572,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.MetricDimension: Swift.Codable { +extension AutoScalingClientTypes.MetricDimension: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case value = "Value" @@ -12331,12 +9588,14 @@ extension AutoScalingClientTypes.MetricDimension: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.MetricDimension() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -12362,7 +9621,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.MetricGranularityType: Swift.Codable { +extension AutoScalingClientTypes.MetricGranularityType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case granularity = "Granularity" } @@ -12374,10 +9633,13 @@ extension AutoScalingClientTypes.MetricGranularityType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let granularityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .granularity) - granularity = granularityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.MetricGranularityType() + value.granularity = try reader["Granularity"].readIfPresent() + return value + } } } @@ -12397,7 +9659,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.MetricStat: Swift.Codable { +extension AutoScalingClientTypes.MetricStat: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metric = "Metric" case stat = "Stat" @@ -12417,14 +9679,15 @@ extension AutoScalingClientTypes.MetricStat: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.Metric.self, forKey: .metric) - metric = metricDecoded - let statDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stat) - stat = statDecoded - let unitDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .unit) - unit = unitDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.MetricStat() + value.metric = try reader["Metric"].readIfPresent(readingClosure: AutoScalingClientTypes.Metric.readingClosure) + value.stat = try reader["Stat"].readIfPresent() + value.unit = try reader["Unit"].readIfPresent() + return value + } } } @@ -12533,7 +9796,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.MixedInstancesPolicy: Swift.Codable { +extension AutoScalingClientTypes.MixedInstancesPolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instancesDistribution = "InstancesDistribution" case launchTemplate = "LaunchTemplate" @@ -12549,12 +9812,14 @@ extension AutoScalingClientTypes.MixedInstancesPolicy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplate.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let instancesDistributionDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstancesDistribution.self, forKey: .instancesDistribution) - instancesDistribution = instancesDistributionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.MixedInstancesPolicy() + value.launchTemplate = try reader["LaunchTemplate"].readIfPresent(readingClosure: AutoScalingClientTypes.LaunchTemplate.readingClosure) + value.instancesDistribution = try reader["InstancesDistribution"].readIfPresent(readingClosure: AutoScalingClientTypes.InstancesDistribution.readingClosure) + return value + } } } @@ -12578,7 +9843,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.NetworkBandwidthGbpsRequest: Swift.Codable { +extension AutoScalingClientTypes.NetworkBandwidthGbpsRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -12594,12 +9859,14 @@ extension AutoScalingClientTypes.NetworkBandwidthGbpsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.NetworkBandwidthGbpsRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -12623,7 +9890,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.NetworkInterfaceCountRequest: Swift.Codable { +extension AutoScalingClientTypes.NetworkInterfaceCountRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -12639,12 +9906,14 @@ extension AutoScalingClientTypes.NetworkInterfaceCountRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.NetworkInterfaceCountRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -12668,7 +9937,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.NotificationConfiguration: Swift.Codable { +extension AutoScalingClientTypes.NotificationConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoScalingGroupName = "AutoScalingGroupName" case notificationType = "NotificationType" @@ -12688,14 +9957,15 @@ extension AutoScalingClientTypes.NotificationConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let topicARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicARN) - topicARN = topicARNDecoded - let notificationTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationType) - notificationType = notificationTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.NotificationConfiguration() + value.autoScalingGroupName = try reader["AutoScalingGroupName"].readIfPresent() + value.topicARN = try reader["TopicARN"].readIfPresent() + value.notificationType = try reader["NotificationType"].readIfPresent() + return value + } } } @@ -12809,7 +10079,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.PredefinedMetricSpecification: Swift.Codable { +extension AutoScalingClientTypes.PredefinedMetricSpecification: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case predefinedMetricType = "PredefinedMetricType" case resourceLabel = "ResourceLabel" @@ -12825,12 +10095,14 @@ extension AutoScalingClientTypes.PredefinedMetricSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let predefinedMetricTypeDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MetricType.self, forKey: .predefinedMetricType) - predefinedMetricType = predefinedMetricTypeDecoded - let resourceLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceLabel) - resourceLabel = resourceLabelDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredefinedMetricSpecification() + value.predefinedMetricType = try reader["PredefinedMetricType"].readIfPresent() + value.resourceLabel = try reader["ResourceLabel"].readIfPresent() + return value + } } } @@ -12908,7 +10180,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.PredictiveScalingConfiguration: Swift.Codable { +extension AutoScalingClientTypes.PredictiveScalingConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maxCapacityBreachBehavior = "MaxCapacityBreachBehavior" case maxCapacityBuffer = "MaxCapacityBuffer" @@ -12945,35 +10217,17 @@ extension AutoScalingClientTypes.PredictiveScalingConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.metricSpecifications) { - struct KeyVal0{struct member{}} - let metricSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricSpecifications) - if let metricSpecificationsWrappedContainer = metricSpecificationsWrappedContainer { - let metricSpecificationsContainer = try metricSpecificationsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.PredictiveScalingMetricSpecification].self, forKey: .member) - var metricSpecificationsBuffer:[AutoScalingClientTypes.PredictiveScalingMetricSpecification]? = nil - if let metricSpecificationsContainer = metricSpecificationsContainer { - metricSpecificationsBuffer = [AutoScalingClientTypes.PredictiveScalingMetricSpecification]() - for structureContainer0 in metricSpecificationsContainer { - metricSpecificationsBuffer?.append(structureContainer0) - } - } - metricSpecifications = metricSpecificationsBuffer - } else { - metricSpecifications = [] - } - } else { - metricSpecifications = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredictiveScalingConfiguration() + value.metricSpecifications = try reader["MetricSpecifications"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.PredictiveScalingMetricSpecification.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.mode = try reader["Mode"].readIfPresent() + value.schedulingBufferTime = try reader["SchedulingBufferTime"].readIfPresent() + value.maxCapacityBreachBehavior = try reader["MaxCapacityBreachBehavior"].readIfPresent() + value.maxCapacityBuffer = try reader["MaxCapacityBuffer"].readIfPresent() + return value } - let modeDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingMode.self, forKey: .mode) - mode = modeDecoded - let schedulingBufferTimeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .schedulingBufferTime) - schedulingBufferTime = schedulingBufferTimeDecoded - let maxCapacityBreachBehaviorDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingMaxCapacityBreachBehavior.self, forKey: .maxCapacityBreachBehavior) - maxCapacityBreachBehavior = maxCapacityBreachBehaviorDecoded - let maxCapacityBufferDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxCapacityBuffer) - maxCapacityBuffer = maxCapacityBufferDecoded } } @@ -13014,7 +10268,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.PredictiveScalingCustomizedCapacityMetric: Swift.Codable { +extension AutoScalingClientTypes.PredictiveScalingCustomizedCapacityMetric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricDataQueries = "MetricDataQueries" } @@ -13035,26 +10289,12 @@ extension AutoScalingClientTypes.PredictiveScalingCustomizedCapacityMetric: Swif } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.metricDataQueries) { - struct KeyVal0{struct member{}} - let metricDataQueriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricDataQueries) - if let metricDataQueriesWrappedContainer = metricDataQueriesWrappedContainer { - let metricDataQueriesContainer = try metricDataQueriesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.MetricDataQuery].self, forKey: .member) - var metricDataQueriesBuffer:[AutoScalingClientTypes.MetricDataQuery]? = nil - if let metricDataQueriesContainer = metricDataQueriesContainer { - metricDataQueriesBuffer = [AutoScalingClientTypes.MetricDataQuery]() - for structureContainer0 in metricDataQueriesContainer { - metricDataQueriesBuffer?.append(structureContainer0) - } - } - metricDataQueries = metricDataQueriesBuffer - } else { - metricDataQueries = [] - } - } else { - metricDataQueries = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredictiveScalingCustomizedCapacityMetric() + value.metricDataQueries = try reader["MetricDataQueries"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.MetricDataQuery.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13076,7 +10316,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.PredictiveScalingCustomizedLoadMetric: Swift.Codable { +extension AutoScalingClientTypes.PredictiveScalingCustomizedLoadMetric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricDataQueries = "MetricDataQueries" } @@ -13097,26 +10337,12 @@ extension AutoScalingClientTypes.PredictiveScalingCustomizedLoadMetric: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.metricDataQueries) { - struct KeyVal0{struct member{}} - let metricDataQueriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricDataQueries) - if let metricDataQueriesWrappedContainer = metricDataQueriesWrappedContainer { - let metricDataQueriesContainer = try metricDataQueriesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.MetricDataQuery].self, forKey: .member) - var metricDataQueriesBuffer:[AutoScalingClientTypes.MetricDataQuery]? = nil - if let metricDataQueriesContainer = metricDataQueriesContainer { - metricDataQueriesBuffer = [AutoScalingClientTypes.MetricDataQuery]() - for structureContainer0 in metricDataQueriesContainer { - metricDataQueriesBuffer?.append(structureContainer0) - } - } - metricDataQueries = metricDataQueriesBuffer - } else { - metricDataQueries = [] - } - } else { - metricDataQueries = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredictiveScalingCustomizedLoadMetric() + value.metricDataQueries = try reader["MetricDataQueries"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.MetricDataQuery.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13138,7 +10364,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.PredictiveScalingCustomizedScalingMetric: Swift.Codable { +extension AutoScalingClientTypes.PredictiveScalingCustomizedScalingMetric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricDataQueries = "MetricDataQueries" } @@ -13159,26 +10385,12 @@ extension AutoScalingClientTypes.PredictiveScalingCustomizedScalingMetric: Swift } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.metricDataQueries) { - struct KeyVal0{struct member{}} - let metricDataQueriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricDataQueries) - if let metricDataQueriesWrappedContainer = metricDataQueriesWrappedContainer { - let metricDataQueriesContainer = try metricDataQueriesWrappedContainer.decodeIfPresent([AutoScalingClientTypes.MetricDataQuery].self, forKey: .member) - var metricDataQueriesBuffer:[AutoScalingClientTypes.MetricDataQuery]? = nil - if let metricDataQueriesContainer = metricDataQueriesContainer { - metricDataQueriesBuffer = [AutoScalingClientTypes.MetricDataQuery]() - for structureContainer0 in metricDataQueriesContainer { - metricDataQueriesBuffer?.append(structureContainer0) - } - } - metricDataQueries = metricDataQueriesBuffer - } else { - metricDataQueries = [] - } - } else { - metricDataQueries = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredictiveScalingCustomizedScalingMetric() + value.metricDataQueries = try reader["MetricDataQueries"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.MetricDataQuery.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13232,7 +10444,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.PredictiveScalingMetricSpecification: Swift.Codable { +extension AutoScalingClientTypes.PredictiveScalingMetricSpecification: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case customizedCapacityMetricSpecification = "CustomizedCapacityMetricSpecification" case customizedLoadMetricSpecification = "CustomizedLoadMetricSpecification" @@ -13268,22 +10480,19 @@ extension AutoScalingClientTypes.PredictiveScalingMetricSpecification: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .targetValue) - targetValue = targetValueDecoded - let predefinedMetricPairSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingPredefinedMetricPair.self, forKey: .predefinedMetricPairSpecification) - predefinedMetricPairSpecification = predefinedMetricPairSpecificationDecoded - let predefinedScalingMetricSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingPredefinedScalingMetric.self, forKey: .predefinedScalingMetricSpecification) - predefinedScalingMetricSpecification = predefinedScalingMetricSpecificationDecoded - let predefinedLoadMetricSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingPredefinedLoadMetric.self, forKey: .predefinedLoadMetricSpecification) - predefinedLoadMetricSpecification = predefinedLoadMetricSpecificationDecoded - let customizedScalingMetricSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingCustomizedScalingMetric.self, forKey: .customizedScalingMetricSpecification) - customizedScalingMetricSpecification = customizedScalingMetricSpecificationDecoded - let customizedLoadMetricSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingCustomizedLoadMetric.self, forKey: .customizedLoadMetricSpecification) - customizedLoadMetricSpecification = customizedLoadMetricSpecificationDecoded - let customizedCapacityMetricSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingCustomizedCapacityMetric.self, forKey: .customizedCapacityMetricSpecification) - customizedCapacityMetricSpecification = customizedCapacityMetricSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredictiveScalingMetricSpecification() + value.targetValue = try reader["TargetValue"].readIfPresent() + value.predefinedMetricPairSpecification = try reader["PredefinedMetricPairSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.PredictiveScalingPredefinedMetricPair.readingClosure) + value.predefinedScalingMetricSpecification = try reader["PredefinedScalingMetricSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.PredictiveScalingPredefinedScalingMetric.readingClosure) + value.predefinedLoadMetricSpecification = try reader["PredefinedLoadMetricSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.PredictiveScalingPredefinedLoadMetric.readingClosure) + value.customizedScalingMetricSpecification = try reader["CustomizedScalingMetricSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.PredictiveScalingCustomizedScalingMetric.readingClosure) + value.customizedLoadMetricSpecification = try reader["CustomizedLoadMetricSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.PredictiveScalingCustomizedLoadMetric.readingClosure) + value.customizedCapacityMetricSpecification = try reader["CustomizedCapacityMetricSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.PredictiveScalingCustomizedCapacityMetric.readingClosure) + return value + } } } @@ -13373,7 +10582,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.PredictiveScalingPredefinedLoadMetric: Swift.Codable { +extension AutoScalingClientTypes.PredictiveScalingPredefinedLoadMetric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case predefinedMetricType = "PredefinedMetricType" case resourceLabel = "ResourceLabel" @@ -13389,12 +10598,14 @@ extension AutoScalingClientTypes.PredictiveScalingPredefinedLoadMetric: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let predefinedMetricTypeDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredefinedLoadMetricType.self, forKey: .predefinedMetricType) - predefinedMetricType = predefinedMetricTypeDecoded - let resourceLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceLabel) - resourceLabel = resourceLabelDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredictiveScalingPredefinedLoadMetric() + value.predefinedMetricType = try reader["PredefinedMetricType"].readIfPresent() + value.resourceLabel = try reader["ResourceLabel"].readIfPresent() + return value + } } } @@ -13426,7 +10637,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.PredictiveScalingPredefinedMetricPair: Swift.Codable { +extension AutoScalingClientTypes.PredictiveScalingPredefinedMetricPair: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case predefinedMetricType = "PredefinedMetricType" case resourceLabel = "ResourceLabel" @@ -13442,12 +10653,14 @@ extension AutoScalingClientTypes.PredictiveScalingPredefinedMetricPair: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let predefinedMetricTypeDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredefinedMetricPairType.self, forKey: .predefinedMetricType) - predefinedMetricType = predefinedMetricTypeDecoded - let resourceLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceLabel) - resourceLabel = resourceLabelDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredictiveScalingPredefinedMetricPair() + value.predefinedMetricType = try reader["PredefinedMetricType"].readIfPresent() + value.resourceLabel = try reader["ResourceLabel"].readIfPresent() + return value + } } } @@ -13479,7 +10692,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.PredictiveScalingPredefinedScalingMetric: Swift.Codable { +extension AutoScalingClientTypes.PredictiveScalingPredefinedScalingMetric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case predefinedMetricType = "PredefinedMetricType" case resourceLabel = "ResourceLabel" @@ -13495,12 +10708,14 @@ extension AutoScalingClientTypes.PredictiveScalingPredefinedScalingMetric: Swift } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let predefinedMetricTypeDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredefinedScalingMetricType.self, forKey: .predefinedMetricType) - predefinedMetricType = predefinedMetricTypeDecoded - let resourceLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceLabel) - resourceLabel = resourceLabelDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.PredictiveScalingPredefinedScalingMetric() + value.predefinedMetricType = try reader["PredefinedMetricType"].readIfPresent() + value.resourceLabel = try reader["ResourceLabel"].readIfPresent() + return value + } } } @@ -13532,7 +10747,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.ProcessType: Swift.Codable { +extension AutoScalingClientTypes.ProcessType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case processName = "ProcessName" } @@ -13544,10 +10759,13 @@ extension AutoScalingClientTypes.ProcessType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let processNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .processName) - processName = processNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.ProcessType() + value.processName = try reader["ProcessName"].readIfPresent() + return value + } } } @@ -13587,6 +10805,17 @@ extension AutoScalingClientTypes { } extension PutLifecycleHookInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case defaultResult = "DefaultResult" + case heartbeatTimeout = "HeartbeatTimeout" + case lifecycleHookName = "LifecycleHookName" + case lifecycleTransition = "LifecycleTransition" + case notificationMetadata = "NotificationMetadata" + case notificationTargetARN = "NotificationTargetARN" + case roleARN = "RoleARN" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -13674,52 +10903,12 @@ public struct PutLifecycleHookInput: Swift.Equatable { } } -struct PutLifecycleHookInputBody: Swift.Equatable { - let lifecycleHookName: Swift.String? - let autoScalingGroupName: Swift.String? - let lifecycleTransition: Swift.String? - let roleARN: Swift.String? - let notificationTargetARN: Swift.String? - let notificationMetadata: Swift.String? - let heartbeatTimeout: Swift.Int? - let defaultResult: Swift.String? -} - -extension PutLifecycleHookInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case defaultResult = "DefaultResult" - case heartbeatTimeout = "HeartbeatTimeout" - case lifecycleHookName = "LifecycleHookName" - case lifecycleTransition = "LifecycleTransition" - case notificationMetadata = "NotificationMetadata" - case notificationTargetARN = "NotificationTargetARN" - case roleARN = "RoleARN" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lifecycleHookNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleHookName) - lifecycleHookName = lifecycleHookNameDecoded - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let lifecycleTransitionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleTransition) - lifecycleTransition = lifecycleTransitionDecoded - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - let notificationTargetARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTargetARN) - notificationTargetARN = notificationTargetARNDecoded - let notificationMetadataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationMetadata) - notificationMetadata = notificationMetadataDecoded - let heartbeatTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .heartbeatTimeout) - heartbeatTimeout = heartbeatTimeoutDecoded - let defaultResultDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultResult) - defaultResult = defaultResultDecoded - } -} +extension PutLifecycleHookOutput { -extension PutLifecycleHookOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutLifecycleHookOutput() + } } } @@ -13728,18 +10917,31 @@ public struct PutLifecycleHookOutput: Swift.Equatable { public init() { } } -enum PutLifecycleHookOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutLifecycleHookOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutNotificationConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case notificationTypes = "NotificationTypes" + case topicARN = "TopicARN" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -13795,70 +10997,57 @@ public struct PutNotificationConfigurationInput: Swift.Equatable { } } -struct PutNotificationConfigurationInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let topicARN: Swift.String? - let notificationTypes: [Swift.String]? -} - -extension PutNotificationConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case notificationTypes = "NotificationTypes" - case topicARN = "TopicARN" - } +extension PutNotificationConfigurationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let topicARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicARN) - topicARN = topicARNDecoded - if containerValues.contains(.notificationTypes) { - struct KeyVal0{struct member{}} - let notificationTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .notificationTypes) - if let notificationTypesWrappedContainer = notificationTypesWrappedContainer { - let notificationTypesContainer = try notificationTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var notificationTypesBuffer:[Swift.String]? = nil - if let notificationTypesContainer = notificationTypesContainer { - notificationTypesBuffer = [Swift.String]() - for stringContainer0 in notificationTypesContainer { - notificationTypesBuffer?.append(stringContainer0) - } - } - notificationTypes = notificationTypesBuffer - } else { - notificationTypes = [] - } - } else { - notificationTypes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutNotificationConfigurationOutput() } } } -extension PutNotificationConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct PutNotificationConfigurationOutput: Swift.Equatable { public init() { } } -enum PutNotificationConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutNotificationConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutScalingPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case adjustmentType = "AdjustmentType" + case autoScalingGroupName = "AutoScalingGroupName" + case cooldown = "Cooldown" + case enabled = "Enabled" + case estimatedInstanceWarmup = "EstimatedInstanceWarmup" + case metricAggregationType = "MetricAggregationType" + case minAdjustmentMagnitude = "MinAdjustmentMagnitude" + case minAdjustmentStep = "MinAdjustmentStep" + case policyName = "PolicyName" + case policyType = "PolicyType" + case predictiveScalingConfiguration = "PredictiveScalingConfiguration" + case scalingAdjustment = "ScalingAdjustment" + case stepAdjustments = "StepAdjustments" + case targetTrackingConfiguration = "TargetTrackingConfiguration" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let adjustmentType = adjustmentType { @@ -14010,101 +11199,16 @@ public struct PutScalingPolicyInput: Swift.Equatable { } } -struct PutScalingPolicyInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let policyName: Swift.String? - let policyType: Swift.String? - let adjustmentType: Swift.String? - let minAdjustmentStep: Swift.Int? - let minAdjustmentMagnitude: Swift.Int? - let scalingAdjustment: Swift.Int? - let cooldown: Swift.Int? - let metricAggregationType: Swift.String? - let stepAdjustments: [AutoScalingClientTypes.StepAdjustment]? - let estimatedInstanceWarmup: Swift.Int? - let targetTrackingConfiguration: AutoScalingClientTypes.TargetTrackingConfiguration? - let enabled: Swift.Bool? - let predictiveScalingConfiguration: AutoScalingClientTypes.PredictiveScalingConfiguration? -} - -extension PutScalingPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case adjustmentType = "AdjustmentType" - case autoScalingGroupName = "AutoScalingGroupName" - case cooldown = "Cooldown" - case enabled = "Enabled" - case estimatedInstanceWarmup = "EstimatedInstanceWarmup" - case metricAggregationType = "MetricAggregationType" - case minAdjustmentMagnitude = "MinAdjustmentMagnitude" - case minAdjustmentStep = "MinAdjustmentStep" - case policyName = "PolicyName" - case policyType = "PolicyType" - case predictiveScalingConfiguration = "PredictiveScalingConfiguration" - case scalingAdjustment = "ScalingAdjustment" - case stepAdjustments = "StepAdjustments" - case targetTrackingConfiguration = "TargetTrackingConfiguration" - } +extension PutScalingPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyType) - policyType = policyTypeDecoded - let adjustmentTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .adjustmentType) - adjustmentType = adjustmentTypeDecoded - let minAdjustmentStepDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minAdjustmentStep) - minAdjustmentStep = minAdjustmentStepDecoded - let minAdjustmentMagnitudeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minAdjustmentMagnitude) - minAdjustmentMagnitude = minAdjustmentMagnitudeDecoded - let scalingAdjustmentDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .scalingAdjustment) - scalingAdjustment = scalingAdjustmentDecoded - let cooldownDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .cooldown) - cooldown = cooldownDecoded - let metricAggregationTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricAggregationType) - metricAggregationType = metricAggregationTypeDecoded - if containerValues.contains(.stepAdjustments) { - struct KeyVal0{struct member{}} - let stepAdjustmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stepAdjustments) - if let stepAdjustmentsWrappedContainer = stepAdjustmentsWrappedContainer { - let stepAdjustmentsContainer = try stepAdjustmentsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.StepAdjustment].self, forKey: .member) - var stepAdjustmentsBuffer:[AutoScalingClientTypes.StepAdjustment]? = nil - if let stepAdjustmentsContainer = stepAdjustmentsContainer { - stepAdjustmentsBuffer = [AutoScalingClientTypes.StepAdjustment]() - for structureContainer0 in stepAdjustmentsContainer { - stepAdjustmentsBuffer?.append(structureContainer0) - } - } - stepAdjustments = stepAdjustmentsBuffer - } else { - stepAdjustments = [] - } - } else { - stepAdjustments = nil - } - let estimatedInstanceWarmupDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .estimatedInstanceWarmup) - estimatedInstanceWarmup = estimatedInstanceWarmupDecoded - let targetTrackingConfigurationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.TargetTrackingConfiguration.self, forKey: .targetTrackingConfiguration) - targetTrackingConfiguration = targetTrackingConfigurationDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let predictiveScalingConfigurationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingConfiguration.self, forKey: .predictiveScalingConfiguration) - predictiveScalingConfiguration = predictiveScalingConfigurationDecoded - } -} - -extension PutScalingPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PutScalingPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.alarms = output.alarms - self.policyARN = output.policyARN - } else { - self.alarms = nil - self.policyARN = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PutScalingPolicyResult"] + var value = PutScalingPolicyOutput() + value.alarms = try reader["Alarms"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.Alarm.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.policyARN = try reader["PolicyARN"].readIfPresent() + return value } } } @@ -14126,57 +11230,39 @@ public struct PutScalingPolicyOutput: Swift.Equatable { } } -struct PutScalingPolicyOutputBody: Swift.Equatable { - let policyARN: Swift.String? - let alarms: [AutoScalingClientTypes.Alarm]? -} - -extension PutScalingPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarms = "Alarms" - case policyARN = "PolicyARN" - } +enum PutScalingPolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PutScalingPolicyResult")) - let policyARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyARN) - policyARN = policyARNDecoded - if containerValues.contains(.alarms) { - struct KeyVal0{struct member{}} - let alarmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarms) - if let alarmsWrappedContainer = alarmsWrappedContainer { - let alarmsContainer = try alarmsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Alarm].self, forKey: .member) - var alarmsBuffer:[AutoScalingClientTypes.Alarm]? = nil - if let alarmsContainer = alarmsContainer { - alarmsBuffer = [AutoScalingClientTypes.Alarm]() - for structureContainer0 in alarmsContainer { - alarmsBuffer?.append(structureContainer0) - } - } - alarms = alarmsBuffer - } else { - alarms = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - alarms = nil } } } -enum PutScalingPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension PutScheduledUpdateGroupActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case desiredCapacity = "DesiredCapacity" + case endTime = "EndTime" + case maxSize = "MaxSize" + case minSize = "MinSize" + case recurrence = "Recurrence" + case scheduledActionName = "ScheduledActionName" + case startTime = "StartTime" + case time = "Time" + case timeZone = "TimeZone" } -} -extension PutScheduledUpdateGroupActionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -14271,60 +11357,12 @@ public struct PutScheduledUpdateGroupActionInput: Swift.Equatable { } } -struct PutScheduledUpdateGroupActionInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let scheduledActionName: Swift.String? - let time: ClientRuntime.Date? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let recurrence: Swift.String? - let minSize: Swift.Int? - let maxSize: Swift.Int? - let desiredCapacity: Swift.Int? - let timeZone: Swift.String? -} - -extension PutScheduledUpdateGroupActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case desiredCapacity = "DesiredCapacity" - case endTime = "EndTime" - case maxSize = "MaxSize" - case minSize = "MinSize" - case recurrence = "Recurrence" - case scheduledActionName = "ScheduledActionName" - case startTime = "StartTime" - case time = "Time" - case timeZone = "TimeZone" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let timeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .time) - time = timeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let recurrenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recurrence) - recurrence = recurrenceDecoded - let minSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSize) - minSize = minSizeDecoded - let maxSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSize) - maxSize = maxSizeDecoded - let desiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredCapacity) - desiredCapacity = desiredCapacityDecoded - let timeZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timeZone) - timeZone = timeZoneDecoded - } -} +extension PutScheduledUpdateGroupActionOutput { -extension PutScheduledUpdateGroupActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutScheduledUpdateGroupActionOutput() + } } } @@ -14333,19 +11371,34 @@ public struct PutScheduledUpdateGroupActionOutput: Swift.Equatable { public init() { } } -enum PutScheduledUpdateGroupActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutScheduledUpdateGroupActionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutWarmPoolInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case instanceReusePolicy = "InstanceReusePolicy" + case maxGroupPreparedCapacity = "MaxGroupPreparedCapacity" + case minSize = "MinSize" + case poolState = "PoolState" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -14404,40 +11457,12 @@ public struct PutWarmPoolInput: Swift.Equatable { } } -struct PutWarmPoolInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let maxGroupPreparedCapacity: Swift.Int? - let minSize: Swift.Int? - let poolState: AutoScalingClientTypes.WarmPoolState? - let instanceReusePolicy: AutoScalingClientTypes.InstanceReusePolicy? -} - -extension PutWarmPoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceReusePolicy = "InstanceReusePolicy" - case maxGroupPreparedCapacity = "MaxGroupPreparedCapacity" - case minSize = "MinSize" - case poolState = "PoolState" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let maxGroupPreparedCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxGroupPreparedCapacity) - maxGroupPreparedCapacity = maxGroupPreparedCapacityDecoded - let minSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSize) - minSize = minSizeDecoded - let poolStateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.WarmPoolState.self, forKey: .poolState) - poolState = poolStateDecoded - let instanceReusePolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceReusePolicy.self, forKey: .instanceReusePolicy) - instanceReusePolicy = instanceReusePolicyDecoded - } -} +extension PutWarmPoolOutput { -extension PutWarmPoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutWarmPoolOutput() + } } } @@ -14446,18 +11471,32 @@ public struct PutWarmPoolOutput: Swift.Equatable { public init() { } } -enum PutWarmPoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutWarmPoolOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RecordLifecycleActionHeartbeatInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case instanceId = "InstanceId" + case lifecycleActionToken = "LifecycleActionToken" + case lifecycleHookName = "LifecycleHookName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -14510,36 +11549,12 @@ public struct RecordLifecycleActionHeartbeatInput: Swift.Equatable { } } -struct RecordLifecycleActionHeartbeatInputBody: Swift.Equatable { - let lifecycleHookName: Swift.String? - let autoScalingGroupName: Swift.String? - let lifecycleActionToken: Swift.String? - let instanceId: Swift.String? -} - -extension RecordLifecycleActionHeartbeatInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceId = "InstanceId" - case lifecycleActionToken = "LifecycleActionToken" - case lifecycleHookName = "LifecycleHookName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lifecycleHookNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleHookName) - lifecycleHookName = lifecycleHookNameDecoded - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let lifecycleActionTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleActionToken) - lifecycleActionToken = lifecycleActionTokenDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - } -} +extension RecordLifecycleActionHeartbeatOutput { -extension RecordLifecycleActionHeartbeatOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RecordLifecycleActionHeartbeatOutput() + } } } @@ -14548,17 +11563,24 @@ public struct RecordLifecycleActionHeartbeatOutput: Swift.Equatable { public init() { } } -enum RecordLifecycleActionHeartbeatOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RecordLifecycleActionHeartbeatOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.RefreshPreferences: Swift.Codable { +extension AutoScalingClientTypes.RefreshPreferences: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case alarmSpecification = "AlarmSpecification" case autoRollback = "AutoRollback" @@ -14615,45 +11637,22 @@ extension AutoScalingClientTypes.RefreshPreferences: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minHealthyPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minHealthyPercentage) - minHealthyPercentage = minHealthyPercentageDecoded - let instanceWarmupDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceWarmup) - instanceWarmup = instanceWarmupDecoded - if containerValues.contains(.checkpointPercentages) { - struct KeyVal0{struct member{}} - let checkpointPercentagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .checkpointPercentages) - if let checkpointPercentagesWrappedContainer = checkpointPercentagesWrappedContainer { - let checkpointPercentagesContainer = try checkpointPercentagesWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var checkpointPercentagesBuffer:[Swift.Int]? = nil - if let checkpointPercentagesContainer = checkpointPercentagesContainer { - checkpointPercentagesBuffer = [Swift.Int]() - for integerContainer0 in checkpointPercentagesContainer { - checkpointPercentagesBuffer?.append(integerContainer0) - } - } - checkpointPercentages = checkpointPercentagesBuffer - } else { - checkpointPercentages = [] - } - } else { - checkpointPercentages = nil - } - let checkpointDelayDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .checkpointDelay) - checkpointDelay = checkpointDelayDecoded - let skipMatchingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipMatching) - skipMatching = skipMatchingDecoded - let autoRollbackDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoRollback) - autoRollback = autoRollbackDecoded - let scaleInProtectedInstancesDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.ScaleInProtectedInstances.self, forKey: .scaleInProtectedInstances) - scaleInProtectedInstances = scaleInProtectedInstancesDecoded - let standbyInstancesDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.StandbyInstances.self, forKey: .standbyInstances) - standbyInstances = standbyInstancesDecoded - let alarmSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.AlarmSpecification.self, forKey: .alarmSpecification) - alarmSpecification = alarmSpecificationDecoded - let maxHealthyPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxHealthyPercentage) - maxHealthyPercentage = maxHealthyPercentageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.RefreshPreferences() + value.minHealthyPercentage = try reader["MinHealthyPercentage"].readIfPresent() + value.instanceWarmup = try reader["InstanceWarmup"].readIfPresent() + value.checkpointPercentages = try reader["CheckpointPercentages"].readListIfPresent(memberReadingClosure: Swift.Int.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.checkpointDelay = try reader["CheckpointDelay"].readIfPresent() + value.skipMatching = try reader["SkipMatching"].readIfPresent() + value.autoRollback = try reader["AutoRollback"].readIfPresent() + value.scaleInProtectedInstances = try reader["ScaleInProtectedInstances"].readIfPresent() + value.standbyInstances = try reader["StandbyInstances"].readIfPresent() + value.alarmSpecification = try reader["AlarmSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.AlarmSpecification.readingClosure) + value.maxHealthyPercentage = try reader["MaxHealthyPercentage"].readIfPresent() + return value + } } } @@ -14748,16 +11747,14 @@ extension AutoScalingClientTypes { } extension ResourceContentionFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceContentionFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14786,33 +11783,15 @@ public struct ResourceContentionFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct ResourceContentionFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceContentionFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ResourceInUseFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceInUseFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14841,23 +11820,12 @@ public struct ResourceInUseFault: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct ResourceInUseFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceInUseFaultBody: Swift.Decodable { +extension ResumeProcessesInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case autoScalingGroupName = "AutoScalingGroupName" + case scalingProcesses = "ScalingProcesses" } -} -extension ResumeProcessesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -14925,65 +11893,39 @@ public struct ResumeProcessesInput: Swift.Equatable { } } -struct ResumeProcessesInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let scalingProcesses: [Swift.String]? -} - -extension ResumeProcessesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case scalingProcesses = "ScalingProcesses" - } +extension ResumeProcessesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.scalingProcesses) { - struct KeyVal0{struct member{}} - let scalingProcessesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scalingProcesses) - if let scalingProcessesWrappedContainer = scalingProcessesWrappedContainer { - let scalingProcessesContainer = try scalingProcessesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scalingProcessesBuffer:[Swift.String]? = nil - if let scalingProcessesContainer = scalingProcessesContainer { - scalingProcessesBuffer = [Swift.String]() - for stringContainer0 in scalingProcessesContainer { - scalingProcessesBuffer?.append(stringContainer0) - } - } - scalingProcesses = scalingProcessesBuffer - } else { - scalingProcesses = [] - } - } else { - scalingProcesses = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ResumeProcessesOutput() } } } -extension ResumeProcessesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct ResumeProcessesOutput: Swift.Equatable { public init() { } } -enum ResumeProcessesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ResumeProcessesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.RollbackDetails: Swift.Codable { +extension AutoScalingClientTypes.RollbackDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instancesToUpdateOnRollback = "InstancesToUpdateOnRollback" case percentageCompleteOnRollback = "PercentageCompleteOnRollback" @@ -15011,18 +11953,17 @@ extension AutoScalingClientTypes.RollbackDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let rollbackReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rollbackReason) - rollbackReason = rollbackReasonDecoded - let rollbackStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .rollbackStartTime) - rollbackStartTime = rollbackStartTimeDecoded - let percentageCompleteOnRollbackDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentageCompleteOnRollback) - percentageCompleteOnRollback = percentageCompleteOnRollbackDecoded - let instancesToUpdateOnRollbackDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancesToUpdateOnRollback) - instancesToUpdateOnRollback = instancesToUpdateOnRollbackDecoded - let progressDetailsOnRollbackDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceRefreshProgressDetails.self, forKey: .progressDetailsOnRollback) - progressDetailsOnRollback = progressDetailsOnRollbackDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.RollbackDetails() + value.rollbackReason = try reader["RollbackReason"].readIfPresent() + value.rollbackStartTime = try reader["RollbackStartTime"].readTimestampIfPresent(format: .dateTime) + value.percentageCompleteOnRollback = try reader["PercentageCompleteOnRollback"].readIfPresent() + value.instancesToUpdateOnRollback = try reader["InstancesToUpdateOnRollback"].readIfPresent() + value.progressDetailsOnRollback = try reader["ProgressDetailsOnRollback"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceRefreshProgressDetails.readingClosure) + return value + } } } @@ -15059,6 +12000,10 @@ extension AutoScalingClientTypes { } extension RollbackInstanceRefreshInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -15089,30 +12034,15 @@ public struct RollbackInstanceRefreshInput: Swift.Equatable { } } -struct RollbackInstanceRefreshInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? -} - -extension RollbackInstanceRefreshInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - } -} +extension RollbackInstanceRefreshOutput { -extension RollbackInstanceRefreshOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RollbackInstanceRefreshOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceRefreshId = output.instanceRefreshId - } else { - self.instanceRefreshId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RollbackInstanceRefreshResult"] + var value = RollbackInstanceRefreshOutput() + value.instanceRefreshId = try reader["InstanceRefreshId"].readIfPresent() + return value } } } @@ -15129,32 +12059,22 @@ public struct RollbackInstanceRefreshOutput: Swift.Equatable { } } -struct RollbackInstanceRefreshOutputBody: Swift.Equatable { - let instanceRefreshId: Swift.String? -} - -extension RollbackInstanceRefreshOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceRefreshId = "InstanceRefreshId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RollbackInstanceRefreshResult")) - let instanceRefreshIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceRefreshId) - instanceRefreshId = instanceRefreshIdDecoded - } -} +enum RollbackInstanceRefreshOutputError { -enum RollbackInstanceRefreshOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ActiveInstanceRefreshNotFound": return try await ActiveInstanceRefreshNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IrreversibleInstanceRefresh": return try await IrreversibleInstanceRefreshFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ActiveInstanceRefreshNotFound": return try await ActiveInstanceRefreshNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IrreversibleInstanceRefresh": return try await IrreversibleInstanceRefreshFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -15195,16 +12115,14 @@ extension AutoScalingClientTypes { } extension ScalingActivityInProgressFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ScalingActivityInProgressFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15233,22 +12151,6 @@ public struct ScalingActivityInProgressFault: ClientRuntime.ModeledError, AWSCli } } -struct ScalingActivityInProgressFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ScalingActivityInProgressFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AutoScalingClientTypes { public enum ScalingActivityStatusCode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case cancelled @@ -15314,7 +12216,7 @@ extension AutoScalingClientTypes { } } -extension AutoScalingClientTypes.ScalingPolicy: Swift.Codable { +extension AutoScalingClientTypes.ScalingPolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case adjustmentType = "AdjustmentType" case alarms = "Alarms" @@ -15404,74 +12306,28 @@ extension AutoScalingClientTypes.ScalingPolicy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyARN) - policyARN = policyARNDecoded - let policyTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyType) - policyType = policyTypeDecoded - let adjustmentTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .adjustmentType) - adjustmentType = adjustmentTypeDecoded - let minAdjustmentStepDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minAdjustmentStep) - minAdjustmentStep = minAdjustmentStepDecoded - let minAdjustmentMagnitudeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minAdjustmentMagnitude) - minAdjustmentMagnitude = minAdjustmentMagnitudeDecoded - let scalingAdjustmentDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .scalingAdjustment) - scalingAdjustment = scalingAdjustmentDecoded - let cooldownDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .cooldown) - cooldown = cooldownDecoded - if containerValues.contains(.stepAdjustments) { - struct KeyVal0{struct member{}} - let stepAdjustmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stepAdjustments) - if let stepAdjustmentsWrappedContainer = stepAdjustmentsWrappedContainer { - let stepAdjustmentsContainer = try stepAdjustmentsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.StepAdjustment].self, forKey: .member) - var stepAdjustmentsBuffer:[AutoScalingClientTypes.StepAdjustment]? = nil - if let stepAdjustmentsContainer = stepAdjustmentsContainer { - stepAdjustmentsBuffer = [AutoScalingClientTypes.StepAdjustment]() - for structureContainer0 in stepAdjustmentsContainer { - stepAdjustmentsBuffer?.append(structureContainer0) - } - } - stepAdjustments = stepAdjustmentsBuffer - } else { - stepAdjustments = [] - } - } else { - stepAdjustments = nil - } - let metricAggregationTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricAggregationType) - metricAggregationType = metricAggregationTypeDecoded - let estimatedInstanceWarmupDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .estimatedInstanceWarmup) - estimatedInstanceWarmup = estimatedInstanceWarmupDecoded - if containerValues.contains(.alarms) { - struct KeyVal0{struct member{}} - let alarmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarms) - if let alarmsWrappedContainer = alarmsWrappedContainer { - let alarmsContainer = try alarmsWrappedContainer.decodeIfPresent([AutoScalingClientTypes.Alarm].self, forKey: .member) - var alarmsBuffer:[AutoScalingClientTypes.Alarm]? = nil - if let alarmsContainer = alarmsContainer { - alarmsBuffer = [AutoScalingClientTypes.Alarm]() - for structureContainer0 in alarmsContainer { - alarmsBuffer?.append(structureContainer0) - } - } - alarms = alarmsBuffer - } else { - alarms = [] - } - } else { - alarms = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.ScalingPolicy() + value.autoScalingGroupName = try reader["AutoScalingGroupName"].readIfPresent() + value.policyName = try reader["PolicyName"].readIfPresent() + value.policyARN = try reader["PolicyARN"].readIfPresent() + value.policyType = try reader["PolicyType"].readIfPresent() + value.adjustmentType = try reader["AdjustmentType"].readIfPresent() + value.minAdjustmentStep = try reader["MinAdjustmentStep"].readIfPresent() + value.minAdjustmentMagnitude = try reader["MinAdjustmentMagnitude"].readIfPresent() + value.scalingAdjustment = try reader["ScalingAdjustment"].readIfPresent() + value.cooldown = try reader["Cooldown"].readIfPresent() + value.stepAdjustments = try reader["StepAdjustments"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.StepAdjustment.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.metricAggregationType = try reader["MetricAggregationType"].readIfPresent() + value.estimatedInstanceWarmup = try reader["EstimatedInstanceWarmup"].readIfPresent() + value.alarms = try reader["Alarms"].readListIfPresent(memberReadingClosure: AutoScalingClientTypes.Alarm.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.targetTrackingConfiguration = try reader["TargetTrackingConfiguration"].readIfPresent(readingClosure: AutoScalingClientTypes.TargetTrackingConfiguration.readingClosure) + value.enabled = try reader["Enabled"].readIfPresent() + value.predictiveScalingConfiguration = try reader["PredictiveScalingConfiguration"].readIfPresent(readingClosure: AutoScalingClientTypes.PredictiveScalingConfiguration.readingClosure) + return value } - let targetTrackingConfigurationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.TargetTrackingConfiguration.self, forKey: .targetTrackingConfiguration) - targetTrackingConfiguration = targetTrackingConfigurationDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let predictiveScalingConfigurationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredictiveScalingConfiguration.self, forKey: .predictiveScalingConfiguration) - predictiveScalingConfiguration = predictiveScalingConfigurationDecoded } } @@ -15563,7 +12419,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.ScheduledUpdateGroupAction: Swift.Codable { +extension AutoScalingClientTypes.ScheduledUpdateGroupAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoScalingGroupName = "AutoScalingGroupName" case desiredCapacity = "DesiredCapacity" @@ -15615,30 +12471,23 @@ extension AutoScalingClientTypes.ScheduledUpdateGroupAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let scheduledActionARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionARN) - scheduledActionARN = scheduledActionARNDecoded - let timeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .time) - time = timeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let recurrenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recurrence) - recurrence = recurrenceDecoded - let minSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSize) - minSize = minSizeDecoded - let maxSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSize) - maxSize = maxSizeDecoded - let desiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredCapacity) - desiredCapacity = desiredCapacityDecoded - let timeZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timeZone) - timeZone = timeZoneDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.ScheduledUpdateGroupAction() + value.autoScalingGroupName = try reader["AutoScalingGroupName"].readIfPresent() + value.scheduledActionName = try reader["ScheduledActionName"].readIfPresent() + value.scheduledActionARN = try reader["ScheduledActionARN"].readIfPresent() + value.time = try reader["Time"].readTimestampIfPresent(format: .dateTime) + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + value.recurrence = try reader["Recurrence"].readIfPresent() + value.minSize = try reader["MinSize"].readIfPresent() + value.maxSize = try reader["MaxSize"].readIfPresent() + value.desiredCapacity = try reader["DesiredCapacity"].readIfPresent() + value.timeZone = try reader["TimeZone"].readIfPresent() + return value + } } } @@ -15698,7 +12547,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.ScheduledUpdateGroupActionRequest: Swift.Codable { +extension AutoScalingClientTypes.ScheduledUpdateGroupActionRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case desiredCapacity = "DesiredCapacity" case endTime = "EndTime" @@ -15738,24 +12587,20 @@ extension AutoScalingClientTypes.ScheduledUpdateGroupActionRequest: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let recurrenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recurrence) - recurrence = recurrenceDecoded - let minSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSize) - minSize = minSizeDecoded - let maxSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSize) - maxSize = maxSizeDecoded - let desiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredCapacity) - desiredCapacity = desiredCapacityDecoded - let timeZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timeZone) - timeZone = timeZoneDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.ScheduledUpdateGroupActionRequest() + value.scheduledActionName = try reader["ScheduledActionName"].readIfPresent() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + value.recurrence = try reader["Recurrence"].readIfPresent() + value.minSize = try reader["MinSize"].readIfPresent() + value.maxSize = try reader["MaxSize"].readIfPresent() + value.desiredCapacity = try reader["DesiredCapacity"].readIfPresent() + value.timeZone = try reader["TimeZone"].readIfPresent() + return value + } } } @@ -15805,16 +12650,14 @@ extension AutoScalingClientTypes { } extension ServiceLinkedRoleFailure { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServiceLinkedRoleFailure() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15842,23 +12685,13 @@ public struct ServiceLinkedRoleFailure: ClientRuntime.ModeledError, AWSClientRun } } -struct ServiceLinkedRoleFailureBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServiceLinkedRoleFailureBody: Swift.Decodable { +extension SetDesiredCapacityInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case autoScalingGroupName = "AutoScalingGroupName" + case desiredCapacity = "DesiredCapacity" + case honorCooldown = "HonorCooldown" } -} -extension SetDesiredCapacityInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -15904,32 +12737,12 @@ public struct SetDesiredCapacityInput: Swift.Equatable { } } -struct SetDesiredCapacityInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let desiredCapacity: Swift.Int? - let honorCooldown: Swift.Bool? -} - -extension SetDesiredCapacityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case desiredCapacity = "DesiredCapacity" - case honorCooldown = "HonorCooldown" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let desiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredCapacity) - desiredCapacity = desiredCapacityDecoded - let honorCooldownDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .honorCooldown) - honorCooldown = honorCooldownDecoded - } -} +extension SetDesiredCapacityOutput { -extension SetDesiredCapacityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetDesiredCapacityOutput() + } } } @@ -15938,18 +12751,31 @@ public struct SetDesiredCapacityOutput: Swift.Equatable { public init() { } } -enum SetDesiredCapacityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetDesiredCapacityOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetInstanceHealthInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case healthStatus = "HealthStatus" + case instanceId = "InstanceId" + case shouldRespectGracePeriod = "ShouldRespectGracePeriod" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let healthStatus = healthStatus { @@ -15995,32 +12821,12 @@ public struct SetInstanceHealthInput: Swift.Equatable { } } -struct SetInstanceHealthInputBody: Swift.Equatable { - let instanceId: Swift.String? - let healthStatus: Swift.String? - let shouldRespectGracePeriod: Swift.Bool? -} - -extension SetInstanceHealthInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthStatus = "HealthStatus" - case instanceId = "InstanceId" - case shouldRespectGracePeriod = "ShouldRespectGracePeriod" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let shouldRespectGracePeriodDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .shouldRespectGracePeriod) - shouldRespectGracePeriod = shouldRespectGracePeriodDecoded - } -} +extension SetInstanceHealthOutput { -extension SetInstanceHealthOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetInstanceHealthOutput() + } } } @@ -16029,17 +12835,30 @@ public struct SetInstanceHealthOutput: Swift.Equatable { public init() { } } -enum SetInstanceHealthOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetInstanceHealthOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetInstanceProtectionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case instanceIds = "InstanceIds" + case protectedFromScaleIn = "ProtectedFromScaleIn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -16095,49 +12914,12 @@ public struct SetInstanceProtectionInput: Swift.Equatable { } } -struct SetInstanceProtectionInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let autoScalingGroupName: Swift.String? - let protectedFromScaleIn: Swift.Bool? -} - -extension SetInstanceProtectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case instanceIds = "InstanceIds" - case protectedFromScaleIn = "ProtectedFromScaleIn" - } +extension SetInstanceProtectionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct member{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetInstanceProtectionOutput() } - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let protectedFromScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .protectedFromScaleIn) - protectedFromScaleIn = protectedFromScaleInDecoded - } -} - -extension SetInstanceProtectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -16146,13 +12928,20 @@ public struct SetInstanceProtectionOutput: Swift.Equatable { public init() { } } -enum SetInstanceProtectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetInstanceProtectionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -16193,6 +12982,13 @@ extension AutoScalingClientTypes { } extension StartInstanceRefreshInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case desiredConfiguration = "DesiredConfiguration" + case preferences = "Preferences" + case strategy = "Strategy" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -16252,42 +13048,15 @@ public struct StartInstanceRefreshInput: Swift.Equatable { } } -struct StartInstanceRefreshInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let strategy: AutoScalingClientTypes.RefreshStrategy? - let desiredConfiguration: AutoScalingClientTypes.DesiredConfiguration? - let preferences: AutoScalingClientTypes.RefreshPreferences? -} - -extension StartInstanceRefreshInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case desiredConfiguration = "DesiredConfiguration" - case preferences = "Preferences" - case strategy = "Strategy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let strategyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.RefreshStrategy.self, forKey: .strategy) - strategy = strategyDecoded - let desiredConfigurationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.DesiredConfiguration.self, forKey: .desiredConfiguration) - desiredConfiguration = desiredConfigurationDecoded - let preferencesDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.RefreshPreferences.self, forKey: .preferences) - preferences = preferencesDecoded - } -} +extension StartInstanceRefreshOutput { -extension StartInstanceRefreshOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartInstanceRefreshOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceRefreshId = output.instanceRefreshId - } else { - self.instanceRefreshId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartInstanceRefreshResult"] + var value = StartInstanceRefreshOutput() + value.instanceRefreshId = try reader["InstanceRefreshId"].readIfPresent() + return value } } } @@ -16304,36 +13073,26 @@ public struct StartInstanceRefreshOutput: Swift.Equatable { } } -struct StartInstanceRefreshOutputBody: Swift.Equatable { - let instanceRefreshId: Swift.String? -} - -extension StartInstanceRefreshOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceRefreshId = "InstanceRefreshId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartInstanceRefreshResult")) - let instanceRefreshIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceRefreshId) - instanceRefreshId = instanceRefreshIdDecoded - } -} +enum StartInstanceRefreshOutputError { -enum StartInstanceRefreshOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InstanceRefreshInProgress": return try await InstanceRefreshInProgressFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InstanceRefreshInProgress": return try await InstanceRefreshInProgressFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.StepAdjustment: Swift.Codable { +extension AutoScalingClientTypes.StepAdjustment: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricIntervalLowerBound = "MetricIntervalLowerBound" case metricIntervalUpperBound = "MetricIntervalUpperBound" @@ -16353,14 +13112,15 @@ extension AutoScalingClientTypes.StepAdjustment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricIntervalLowerBoundDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .metricIntervalLowerBound) - metricIntervalLowerBound = metricIntervalLowerBoundDecoded - let metricIntervalUpperBoundDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .metricIntervalUpperBound) - metricIntervalUpperBound = metricIntervalUpperBoundDecoded - let scalingAdjustmentDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .scalingAdjustment) - scalingAdjustment = scalingAdjustmentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.StepAdjustment() + value.metricIntervalLowerBound = try reader["MetricIntervalLowerBound"].readIfPresent() + value.metricIntervalUpperBound = try reader["MetricIntervalUpperBound"].readIfPresent() + value.scalingAdjustment = try reader["ScalingAdjustment"].readIfPresent() + return value + } } } @@ -16408,6 +13168,11 @@ extension AutoScalingClientTypes { } extension SuspendProcessesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case scalingProcesses = "ScalingProcesses" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -16475,65 +13240,39 @@ public struct SuspendProcessesInput: Swift.Equatable { } } -struct SuspendProcessesInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let scalingProcesses: [Swift.String]? -} - -extension SuspendProcessesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case scalingProcesses = "ScalingProcesses" - } +extension SuspendProcessesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - if containerValues.contains(.scalingProcesses) { - struct KeyVal0{struct member{}} - let scalingProcessesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scalingProcesses) - if let scalingProcessesWrappedContainer = scalingProcessesWrappedContainer { - let scalingProcessesContainer = try scalingProcessesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scalingProcessesBuffer:[Swift.String]? = nil - if let scalingProcessesContainer = scalingProcessesContainer { - scalingProcessesBuffer = [Swift.String]() - for stringContainer0 in scalingProcessesContainer { - scalingProcessesBuffer?.append(stringContainer0) - } - } - scalingProcesses = scalingProcessesBuffer - } else { - scalingProcesses = [] - } - } else { - scalingProcesses = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SuspendProcessesOutput() } } } -extension SuspendProcessesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct SuspendProcessesOutput: Swift.Equatable { public init() { } } -enum SuspendProcessesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SuspendProcessesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.SuspendedProcess: Swift.Codable { +extension AutoScalingClientTypes.SuspendedProcess: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case processName = "ProcessName" case suspensionReason = "SuspensionReason" @@ -16549,12 +13288,14 @@ extension AutoScalingClientTypes.SuspendedProcess: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let processNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .processName) - processName = processNameDecoded - let suspensionReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .suspensionReason) - suspensionReason = suspensionReasonDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.SuspendedProcess() + value.processName = try reader["ProcessName"].readIfPresent() + value.suspensionReason = try reader["SuspensionReason"].readIfPresent() + return value + } } } @@ -16578,7 +13319,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.Tag: Swift.Codable { +extension AutoScalingClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case propagateAtLaunch = "PropagateAtLaunch" @@ -16606,18 +13347,17 @@ extension AutoScalingClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let propagateAtLaunchDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .propagateAtLaunch) - propagateAtLaunch = propagateAtLaunchDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.Tag() + value.resourceId = try reader["ResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + value.propagateAtLaunch = try reader["PropagateAtLaunch"].readIfPresent() + return value + } } } @@ -16654,7 +13394,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.TagDescription: Swift.Codable { +extension AutoScalingClientTypes.TagDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case propagateAtLaunch = "PropagateAtLaunch" @@ -16682,18 +13422,17 @@ extension AutoScalingClientTypes.TagDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let propagateAtLaunchDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .propagateAtLaunch) - propagateAtLaunch = propagateAtLaunchDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.TagDescription() + value.resourceId = try reader["ResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + value.propagateAtLaunch = try reader["PropagateAtLaunch"].readIfPresent() + return value + } } } @@ -16729,7 +13468,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.TargetTrackingConfiguration: Swift.Codable { +extension AutoScalingClientTypes.TargetTrackingConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case customizedMetricSpecification = "CustomizedMetricSpecification" case disableScaleIn = "DisableScaleIn" @@ -16753,16 +13492,16 @@ extension AutoScalingClientTypes.TargetTrackingConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let predefinedMetricSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.PredefinedMetricSpecification.self, forKey: .predefinedMetricSpecification) - predefinedMetricSpecification = predefinedMetricSpecificationDecoded - let customizedMetricSpecificationDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.CustomizedMetricSpecification.self, forKey: .customizedMetricSpecification) - customizedMetricSpecification = customizedMetricSpecificationDecoded - let targetValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .targetValue) - targetValue = targetValueDecoded - let disableScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableScaleIn) - disableScaleIn = disableScaleInDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.TargetTrackingConfiguration() + value.predefinedMetricSpecification = try reader["PredefinedMetricSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.PredefinedMetricSpecification.readingClosure) + value.customizedMetricSpecification = try reader["CustomizedMetricSpecification"].readIfPresent(readingClosure: AutoScalingClientTypes.CustomizedMetricSpecification.readingClosure) + value.targetValue = try reader["TargetValue"].readIfPresent() + value.disableScaleIn = try reader["DisableScaleIn"].readIfPresent() + return value + } } } @@ -16795,7 +13534,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.TargetTrackingMetricDataQuery: Swift.Codable { +extension AutoScalingClientTypes.TargetTrackingMetricDataQuery: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case expression = "Expression" case id = "Id" @@ -16823,18 +13562,17 @@ extension AutoScalingClientTypes.TargetTrackingMetricDataQuery: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let expressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expression) - expression = expressionDecoded - let metricStatDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.TargetTrackingMetricStat.self, forKey: .metricStat) - metricStat = metricStatDecoded - let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) - label = labelDecoded - let returnDataDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnData) - returnData = returnDataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.TargetTrackingMetricDataQuery() + value.id = try reader["Id"].readIfPresent() + value.expression = try reader["Expression"].readIfPresent() + value.metricStat = try reader["MetricStat"].readIfPresent(readingClosure: AutoScalingClientTypes.TargetTrackingMetricStat.readingClosure) + value.label = try reader["Label"].readIfPresent() + value.returnData = try reader["ReturnData"].readIfPresent() + return value + } } } @@ -16871,7 +13609,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.TargetTrackingMetricStat: Swift.Codable { +extension AutoScalingClientTypes.TargetTrackingMetricStat: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metric = "Metric" case stat = "Stat" @@ -16891,14 +13629,15 @@ extension AutoScalingClientTypes.TargetTrackingMetricStat: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.Metric.self, forKey: .metric) - metric = metricDecoded - let statDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stat) - stat = statDecoded - let unitDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .unit) - unit = unitDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.TargetTrackingMetricStat() + value.metric = try reader["Metric"].readIfPresent(readingClosure: AutoScalingClientTypes.Metric.readingClosure) + value.stat = try reader["Stat"].readIfPresent() + value.unit = try reader["Unit"].readIfPresent() + return value + } } } @@ -16929,6 +13668,11 @@ extension AutoScalingClientTypes { } extension TerminateInstanceInAutoScalingGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceId = "InstanceId" + case shouldDecrementDesiredCapacity = "ShouldDecrementDesiredCapacity" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceId = instanceId { @@ -16967,34 +13711,15 @@ public struct TerminateInstanceInAutoScalingGroupInput: Swift.Equatable { } } -struct TerminateInstanceInAutoScalingGroupInputBody: Swift.Equatable { - let instanceId: Swift.String? - let shouldDecrementDesiredCapacity: Swift.Bool? -} - -extension TerminateInstanceInAutoScalingGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "InstanceId" - case shouldDecrementDesiredCapacity = "ShouldDecrementDesiredCapacity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let shouldDecrementDesiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .shouldDecrementDesiredCapacity) - shouldDecrementDesiredCapacity = shouldDecrementDesiredCapacityDecoded - } -} +extension TerminateInstanceInAutoScalingGroupOutput { -extension TerminateInstanceInAutoScalingGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TerminateInstanceInAutoScalingGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.activity = output.activity - } else { - self.activity = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["TerminateInstanceInAutoScalingGroupResult"] + var value = TerminateInstanceInAutoScalingGroupOutput() + value.activity = try reader["Activity"].readIfPresent(readingClosure: AutoScalingClientTypes.Activity.readingClosure) + return value } } } @@ -17011,35 +13736,25 @@ public struct TerminateInstanceInAutoScalingGroupOutput: Swift.Equatable { } } -struct TerminateInstanceInAutoScalingGroupOutputBody: Swift.Equatable { - let activity: AutoScalingClientTypes.Activity? -} - -extension TerminateInstanceInAutoScalingGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activity = "Activity" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("TerminateInstanceInAutoScalingGroupResult")) - let activityDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.Activity.self, forKey: .activity) - activity = activityDecoded - } -} +enum TerminateInstanceInAutoScalingGroupOutputError { -enum TerminateInstanceInAutoScalingGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.TotalLocalStorageGBRequest: Swift.Codable { +extension AutoScalingClientTypes.TotalLocalStorageGBRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -17055,12 +13770,14 @@ extension AutoScalingClientTypes.TotalLocalStorageGBRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.TotalLocalStorageGBRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -17084,7 +13801,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.TrafficSourceIdentifier: Swift.Codable { +extension AutoScalingClientTypes.TrafficSourceIdentifier: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case identifier = "Identifier" case type = "Type" @@ -17100,12 +13817,14 @@ extension AutoScalingClientTypes.TrafficSourceIdentifier: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identifier) - identifier = identifierDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.TrafficSourceIdentifier() + value.identifier = try reader["Identifier"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + return value + } } } @@ -17148,7 +13867,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.TrafficSourceState: Swift.Codable { +extension AutoScalingClientTypes.TrafficSourceState: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case identifier = "Identifier" case state = "State" @@ -17172,16 +13891,16 @@ extension AutoScalingClientTypes.TrafficSourceState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficSourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficSource) - trafficSource = trafficSourceDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let identifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identifier) - identifier = identifierDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.TrafficSourceState() + value.trafficSource = try reader["TrafficSource"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.identifier = try reader["Identifier"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + return value + } } } @@ -17234,6 +13953,31 @@ extension AutoScalingClientTypes { } extension UpdateAutoScalingGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoScalingGroupName = "AutoScalingGroupName" + case availabilityZones = "AvailabilityZones" + case capacityRebalance = "CapacityRebalance" + case context = "Context" + case defaultCooldown = "DefaultCooldown" + case defaultInstanceWarmup = "DefaultInstanceWarmup" + case desiredCapacity = "DesiredCapacity" + case desiredCapacityType = "DesiredCapacityType" + case healthCheckGracePeriod = "HealthCheckGracePeriod" + case healthCheckType = "HealthCheckType" + case instanceMaintenancePolicy = "InstanceMaintenancePolicy" + case launchConfigurationName = "LaunchConfigurationName" + case launchTemplate = "LaunchTemplate" + case maxInstanceLifetime = "MaxInstanceLifetime" + case maxSize = "MaxSize" + case minSize = "MinSize" + case mixedInstancesPolicy = "MixedInstancesPolicy" + case newInstancesProtectedFromScaleIn = "NewInstancesProtectedFromScaleIn" + case placementGroup = "PlacementGroup" + case serviceLinkedRoleARN = "ServiceLinkedRoleARN" + case terminationPolicies = "TerminationPolicies" + case vpcZoneIdentifier = "VPCZoneIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoScalingGroupName = autoScalingGroupName { @@ -17429,142 +14173,12 @@ public struct UpdateAutoScalingGroupInput: Swift.Equatable { } } -struct UpdateAutoScalingGroupInputBody: Swift.Equatable { - let autoScalingGroupName: Swift.String? - let launchConfigurationName: Swift.String? - let launchTemplate: AutoScalingClientTypes.LaunchTemplateSpecification? - let mixedInstancesPolicy: AutoScalingClientTypes.MixedInstancesPolicy? - let minSize: Swift.Int? - let maxSize: Swift.Int? - let desiredCapacity: Swift.Int? - let defaultCooldown: Swift.Int? - let availabilityZones: [Swift.String]? - let healthCheckType: Swift.String? - let healthCheckGracePeriod: Swift.Int? - let placementGroup: Swift.String? - let vpcZoneIdentifier: Swift.String? - let terminationPolicies: [Swift.String]? - let newInstancesProtectedFromScaleIn: Swift.Bool? - let serviceLinkedRoleARN: Swift.String? - let maxInstanceLifetime: Swift.Int? - let capacityRebalance: Swift.Bool? - let context: Swift.String? - let desiredCapacityType: Swift.String? - let defaultInstanceWarmup: Swift.Int? - let instanceMaintenancePolicy: AutoScalingClientTypes.InstanceMaintenancePolicy? -} - -extension UpdateAutoScalingGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoScalingGroupName = "AutoScalingGroupName" - case availabilityZones = "AvailabilityZones" - case capacityRebalance = "CapacityRebalance" - case context = "Context" - case defaultCooldown = "DefaultCooldown" - case defaultInstanceWarmup = "DefaultInstanceWarmup" - case desiredCapacity = "DesiredCapacity" - case desiredCapacityType = "DesiredCapacityType" - case healthCheckGracePeriod = "HealthCheckGracePeriod" - case healthCheckType = "HealthCheckType" - case instanceMaintenancePolicy = "InstanceMaintenancePolicy" - case launchConfigurationName = "LaunchConfigurationName" - case launchTemplate = "LaunchTemplate" - case maxInstanceLifetime = "MaxInstanceLifetime" - case maxSize = "MaxSize" - case minSize = "MinSize" - case mixedInstancesPolicy = "MixedInstancesPolicy" - case newInstancesProtectedFromScaleIn = "NewInstancesProtectedFromScaleIn" - case placementGroup = "PlacementGroup" - case serviceLinkedRoleARN = "ServiceLinkedRoleARN" - case terminationPolicies = "TerminationPolicies" - case vpcZoneIdentifier = "VPCZoneIdentifier" - } +extension UpdateAutoScalingGroupOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoScalingGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .autoScalingGroupName) - autoScalingGroupName = autoScalingGroupNameDecoded - let launchConfigurationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchConfigurationName) - launchConfigurationName = launchConfigurationNameDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let mixedInstancesPolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.MixedInstancesPolicy.self, forKey: .mixedInstancesPolicy) - mixedInstancesPolicy = mixedInstancesPolicyDecoded - let minSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSize) - minSize = minSizeDecoded - let maxSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSize) - maxSize = maxSizeDecoded - let desiredCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredCapacity) - desiredCapacity = desiredCapacityDecoded - let defaultCooldownDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultCooldown) - defaultCooldown = defaultCooldownDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let healthCheckTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckType) - healthCheckType = healthCheckTypeDecoded - let healthCheckGracePeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckGracePeriod) - healthCheckGracePeriod = healthCheckGracePeriodDecoded - let placementGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .placementGroup) - placementGroup = placementGroupDecoded - let vpcZoneIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcZoneIdentifier) - vpcZoneIdentifier = vpcZoneIdentifierDecoded - if containerValues.contains(.terminationPolicies) { - struct KeyVal0{struct member{}} - let terminationPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .terminationPolicies) - if let terminationPoliciesWrappedContainer = terminationPoliciesWrappedContainer { - let terminationPoliciesContainer = try terminationPoliciesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var terminationPoliciesBuffer:[Swift.String]? = nil - if let terminationPoliciesContainer = terminationPoliciesContainer { - terminationPoliciesBuffer = [Swift.String]() - for stringContainer0 in terminationPoliciesContainer { - terminationPoliciesBuffer?.append(stringContainer0) - } - } - terminationPolicies = terminationPoliciesBuffer - } else { - terminationPolicies = [] - } - } else { - terminationPolicies = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateAutoScalingGroupOutput() } - let newInstancesProtectedFromScaleInDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .newInstancesProtectedFromScaleIn) - newInstancesProtectedFromScaleIn = newInstancesProtectedFromScaleInDecoded - let serviceLinkedRoleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceLinkedRoleARN) - serviceLinkedRoleARN = serviceLinkedRoleARNDecoded - let maxInstanceLifetimeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxInstanceLifetime) - maxInstanceLifetime = maxInstanceLifetimeDecoded - let capacityRebalanceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .capacityRebalance) - capacityRebalance = capacityRebalanceDecoded - let contextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .context) - context = contextDecoded - let desiredCapacityTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .desiredCapacityType) - desiredCapacityType = desiredCapacityTypeDecoded - let defaultInstanceWarmupDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultInstanceWarmup) - defaultInstanceWarmup = defaultInstanceWarmupDecoded - let instanceMaintenancePolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceMaintenancePolicy.self, forKey: .instanceMaintenancePolicy) - instanceMaintenancePolicy = instanceMaintenancePolicyDecoded - } -} - -extension UpdateAutoScalingGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -17573,19 +14187,26 @@ public struct UpdateAutoScalingGroupOutput: Swift.Equatable { public init() { } } -enum UpdateAutoScalingGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceContention": return try await ResourceContentionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateAutoScalingGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceContention": return try await ResourceContentionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScalingActivityInProgress": return try await ScalingActivityInProgressFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleFailure": return try await ServiceLinkedRoleFailure.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension AutoScalingClientTypes.VCpuCountRequest: Swift.Codable { +extension AutoScalingClientTypes.VCpuCountRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case min = "Min" @@ -17601,12 +14222,14 @@ extension AutoScalingClientTypes.VCpuCountRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.VCpuCountRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -17631,7 +14254,7 @@ extension AutoScalingClientTypes { } -extension AutoScalingClientTypes.WarmPoolConfiguration: Swift.Codable { +extension AutoScalingClientTypes.WarmPoolConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instanceReusePolicy = "InstanceReusePolicy" case maxGroupPreparedCapacity = "MaxGroupPreparedCapacity" @@ -17659,18 +14282,17 @@ extension AutoScalingClientTypes.WarmPoolConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxGroupPreparedCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxGroupPreparedCapacity) - maxGroupPreparedCapacity = maxGroupPreparedCapacityDecoded - let minSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSize) - minSize = minSizeDecoded - let poolStateDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.WarmPoolState.self, forKey: .poolState) - poolState = poolStateDecoded - let statusDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.WarmPoolStatus.self, forKey: .status) - status = statusDecoded - let instanceReusePolicyDecoded = try containerValues.decodeIfPresent(AutoScalingClientTypes.InstanceReusePolicy.self, forKey: .instanceReusePolicy) - instanceReusePolicy = instanceReusePolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AutoScalingClientTypes.WarmPoolConfiguration() + value.maxGroupPreparedCapacity = try reader["MaxGroupPreparedCapacity"].readIfPresent() + value.minSize = try reader["MinSize"].readIfPresent() + value.poolState = try reader["PoolState"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.instanceReusePolicy = try reader["InstanceReusePolicy"].readIfPresent(readingClosure: AutoScalingClientTypes.InstanceReusePolicy.readingClosure) + return value + } } } diff --git a/Sources/Services/AWSBedrockAgentRuntime/models/Models.swift b/Sources/Services/AWSBedrockAgentRuntime/models/Models.swift index 4643b12324c..59b0bc55915 100644 --- a/Sources/Services/AWSBedrockAgentRuntime/models/Models.swift +++ b/Sources/Services/AWSBedrockAgentRuntime/models/Models.swift @@ -1129,7 +1129,7 @@ extension InvokeAgentOutput: ClientRuntime.HttpResponseBinding { } if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.completion = decoderStream.toAsyncStream() } else { self.completion = nil diff --git a/Sources/Services/AWSBedrockRuntime/models/Models.swift b/Sources/Services/AWSBedrockRuntime/models/Models.swift index 06b69fa5552..e9d4d05e442 100644 --- a/Sources/Services/AWSBedrockRuntime/models/Models.swift +++ b/Sources/Services/AWSBedrockRuntime/models/Models.swift @@ -386,7 +386,7 @@ extension InvokeModelWithResponseStreamOutput: ClientRuntime.HttpResponseBinding } if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.body = decoderStream.toAsyncStream() } else { self.body = nil diff --git a/Sources/Services/AWSCloudFormation/CloudFormationClient.swift b/Sources/Services/AWSCloudFormation/CloudFormationClient.swift index 366cd75634b..a293ecdab45 100644 --- a/Sources/Services/AWSCloudFormation/CloudFormationClient.swift +++ b/Sources/Services/AWSCloudFormation/CloudFormationClient.swift @@ -11,14 +11,11 @@ public class CloudFormationClient { let config: CloudFormationClient.CloudFormationClientConfiguration let serviceName = "CloudFormation" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: CloudFormationClient.CloudFormationClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -79,7 +76,6 @@ extension CloudFormationClient { public func activateOrganizationsAccess(input: ActivateOrganizationsAccessInput) async throws -> ActivateOrganizationsAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "activateOrganizationsAccess") @@ -103,7 +99,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ActivateOrganizationsAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ActivateOrganizationsAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ActivateOrganizationsAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -125,7 +121,6 @@ extension CloudFormationClient { public func activateType(input: ActivateTypeInput) async throws -> ActivateTypeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "activateType") @@ -149,7 +144,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ActivateTypeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ActivateTypeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ActivateTypeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -171,7 +166,6 @@ extension CloudFormationClient { public func batchDescribeTypeConfigurations(input: BatchDescribeTypeConfigurationsInput) async throws -> BatchDescribeTypeConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "batchDescribeTypeConfigurations") @@ -195,7 +189,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BatchDescribeTypeConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BatchDescribeTypeConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BatchDescribeTypeConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -216,7 +210,6 @@ extension CloudFormationClient { public func cancelUpdateStack(input: CancelUpdateStackInput) async throws -> CancelUpdateStackOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelUpdateStack") @@ -240,7 +233,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelUpdateStackOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelUpdateStackOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelUpdateStackOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -261,7 +254,6 @@ extension CloudFormationClient { public func continueUpdateRollback(input: ContinueUpdateRollbackInput) async throws -> ContinueUpdateRollbackOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "continueUpdateRollback") @@ -285,7 +277,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ContinueUpdateRollbackOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ContinueUpdateRollbackOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ContinueUpdateRollbackOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -308,7 +300,6 @@ extension CloudFormationClient { public func createChangeSet(input: CreateChangeSetInput) async throws -> CreateChangeSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createChangeSet") @@ -332,7 +323,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateChangeSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateChangeSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateChangeSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -356,7 +347,6 @@ extension CloudFormationClient { public func createStack(input: CreateStackInput) async throws -> CreateStackOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createStack") @@ -380,7 +370,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateStackOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateStackOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateStackOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -406,7 +396,6 @@ extension CloudFormationClient { public func createStackInstances(input: CreateStackInstancesInput) async throws -> CreateStackInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createStackInstances") @@ -431,7 +420,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateStackInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateStackInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateStackInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -454,7 +443,6 @@ extension CloudFormationClient { public func createStackSet(input: CreateStackSetInput) async throws -> CreateStackSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createStackSet") @@ -479,7 +467,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateStackSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateStackSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateStackSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -501,7 +489,6 @@ extension CloudFormationClient { public func deactivateOrganizationsAccess(input: DeactivateOrganizationsAccessInput) async throws -> DeactivateOrganizationsAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deactivateOrganizationsAccess") @@ -525,7 +512,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeactivateOrganizationsAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeactivateOrganizationsAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeactivateOrganizationsAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -547,7 +534,6 @@ extension CloudFormationClient { public func deactivateType(input: DeactivateTypeInput) async throws -> DeactivateTypeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deactivateType") @@ -571,7 +557,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeactivateTypeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeactivateTypeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeactivateTypeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -592,7 +578,6 @@ extension CloudFormationClient { public func deleteChangeSet(input: DeleteChangeSetInput) async throws -> DeleteChangeSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteChangeSet") @@ -616,7 +601,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteChangeSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteChangeSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteChangeSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -637,7 +622,6 @@ extension CloudFormationClient { public func deleteStack(input: DeleteStackInput) async throws -> DeleteStackOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteStack") @@ -661,7 +645,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteStackOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteStackOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteStackOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -686,7 +670,6 @@ extension CloudFormationClient { public func deleteStackInstances(input: DeleteStackInstancesInput) async throws -> DeleteStackInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteStackInstances") @@ -711,7 +694,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteStackInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteStackInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteStackInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -733,7 +716,6 @@ extension CloudFormationClient { public func deleteStackSet(input: DeleteStackSetInput) async throws -> DeleteStackSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteStackSet") @@ -757,7 +739,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteStackSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteStackSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteStackSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -779,7 +761,6 @@ extension CloudFormationClient { public func deregisterType(input: DeregisterTypeInput) async throws -> DeregisterTypeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deregisterType") @@ -803,7 +784,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeregisterTypeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeregisterTypeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeregisterTypeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -819,7 +800,6 @@ extension CloudFormationClient { public func describeAccountLimits(input: DescribeAccountLimitsInput) async throws -> DescribeAccountLimitsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAccountLimits") @@ -843,7 +823,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAccountLimitsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAccountLimitsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAccountLimitsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -864,7 +844,6 @@ extension CloudFormationClient { public func describeChangeSet(input: DescribeChangeSetInput) async throws -> DescribeChangeSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeChangeSet") @@ -888,7 +867,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeChangeSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeChangeSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeChangeSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -909,7 +888,6 @@ extension CloudFormationClient { public func describeChangeSetHooks(input: DescribeChangeSetHooksInput) async throws -> DescribeChangeSetHooksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeChangeSetHooks") @@ -933,7 +911,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeChangeSetHooksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeChangeSetHooksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeChangeSetHooksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -955,7 +933,6 @@ extension CloudFormationClient { public func describeOrganizationsAccess(input: DescribeOrganizationsAccessInput) async throws -> DescribeOrganizationsAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeOrganizationsAccess") @@ -979,7 +956,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeOrganizationsAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeOrganizationsAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeOrganizationsAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1004,7 +981,6 @@ extension CloudFormationClient { public func describePublisher(input: DescribePublisherInput) async throws -> DescribePublisherOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePublisher") @@ -1028,7 +1004,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePublisherOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePublisherOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePublisherOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1044,7 +1020,6 @@ extension CloudFormationClient { public func describeStackDriftDetectionStatus(input: DescribeStackDriftDetectionStatusInput) async throws -> DescribeStackDriftDetectionStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStackDriftDetectionStatus") @@ -1068,7 +1043,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStackDriftDetectionStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStackDriftDetectionStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStackDriftDetectionStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1084,7 +1059,6 @@ extension CloudFormationClient { public func describeStackEvents(input: DescribeStackEventsInput) async throws -> DescribeStackEventsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStackEvents") @@ -1108,7 +1082,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStackEventsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStackEventsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStackEventsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1130,7 +1104,6 @@ extension CloudFormationClient { public func describeStackInstance(input: DescribeStackInstanceInput) async throws -> DescribeStackInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStackInstance") @@ -1154,7 +1127,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStackInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStackInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStackInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1170,7 +1143,6 @@ extension CloudFormationClient { public func describeStackResource(input: DescribeStackResourceInput) async throws -> DescribeStackResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStackResource") @@ -1194,7 +1166,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStackResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStackResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStackResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1210,7 +1182,6 @@ extension CloudFormationClient { public func describeStackResourceDrifts(input: DescribeStackResourceDriftsInput) async throws -> DescribeStackResourceDriftsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStackResourceDrifts") @@ -1234,7 +1205,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStackResourceDriftsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStackResourceDriftsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStackResourceDriftsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1250,7 +1221,6 @@ extension CloudFormationClient { public func describeStackResources(input: DescribeStackResourcesInput) async throws -> DescribeStackResourcesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStackResources") @@ -1274,7 +1244,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStackResourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStackResourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStackResourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1295,7 +1265,6 @@ extension CloudFormationClient { public func describeStackSet(input: DescribeStackSetInput) async throws -> DescribeStackSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStackSet") @@ -1319,7 +1288,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStackSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStackSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStackSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1341,7 +1310,6 @@ extension CloudFormationClient { public func describeStackSetOperation(input: DescribeStackSetOperationInput) async throws -> DescribeStackSetOperationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStackSetOperation") @@ -1365,7 +1333,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStackSetOperationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStackSetOperationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStackSetOperationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1381,7 +1349,6 @@ extension CloudFormationClient { public func describeStacks(input: DescribeStacksInput) async throws -> DescribeStacksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStacks") @@ -1405,7 +1372,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStacksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStacksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStacksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1427,7 +1394,6 @@ extension CloudFormationClient { public func describeType(input: DescribeTypeInput) async throws -> DescribeTypeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeType") @@ -1451,7 +1417,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTypeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTypeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTypeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1472,7 +1438,6 @@ extension CloudFormationClient { public func describeTypeRegistration(input: DescribeTypeRegistrationInput) async throws -> DescribeTypeRegistrationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTypeRegistration") @@ -1496,7 +1461,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTypeRegistrationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTypeRegistrationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTypeRegistrationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1512,7 +1477,6 @@ extension CloudFormationClient { public func detectStackDrift(input: DetectStackDriftInput) async throws -> DetectStackDriftOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detectStackDrift") @@ -1536,7 +1500,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetectStackDriftOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetectStackDriftOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetectStackDriftOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1552,7 +1516,6 @@ extension CloudFormationClient { public func detectStackResourceDrift(input: DetectStackResourceDriftInput) async throws -> DetectStackResourceDriftOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detectStackResourceDrift") @@ -1576,7 +1539,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetectStackResourceDriftOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetectStackResourceDriftOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetectStackResourceDriftOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1608,7 +1571,6 @@ extension CloudFormationClient { public func detectStackSetDrift(input: DetectStackSetDriftInput) async throws -> DetectStackSetDriftOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detectStackSetDrift") @@ -1633,7 +1595,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetectStackSetDriftOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetectStackSetDriftOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetectStackSetDriftOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1649,7 +1611,6 @@ extension CloudFormationClient { public func estimateTemplateCost(input: EstimateTemplateCostInput) async throws -> EstimateTemplateCostOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "estimateTemplateCost") @@ -1673,7 +1634,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EstimateTemplateCostOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EstimateTemplateCostOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EstimateTemplateCostOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1697,7 +1658,6 @@ extension CloudFormationClient { public func executeChangeSet(input: ExecuteChangeSetInput) async throws -> ExecuteChangeSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "executeChangeSet") @@ -1721,7 +1681,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ExecuteChangeSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ExecuteChangeSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ExecuteChangeSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1737,7 +1697,6 @@ extension CloudFormationClient { public func getStackPolicy(input: GetStackPolicyInput) async throws -> GetStackPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getStackPolicy") @@ -1761,7 +1720,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetStackPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetStackPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetStackPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1782,7 +1741,6 @@ extension CloudFormationClient { public func getTemplate(input: GetTemplateInput) async throws -> GetTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTemplate") @@ -1806,7 +1764,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1827,7 +1785,6 @@ extension CloudFormationClient { public func getTemplateSummary(input: GetTemplateSummaryInput) async throws -> GetTemplateSummaryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTemplateSummary") @@ -1851,7 +1808,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTemplateSummaryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTemplateSummaryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTemplateSummaryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1878,7 +1835,6 @@ extension CloudFormationClient { public func importStacksToStackSet(input: ImportStacksToStackSetInput) async throws -> ImportStacksToStackSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "importStacksToStackSet") @@ -1903,7 +1859,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ImportStacksToStackSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ImportStacksToStackSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ImportStacksToStackSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1919,7 +1875,6 @@ extension CloudFormationClient { public func listChangeSets(input: ListChangeSetsInput) async throws -> ListChangeSetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listChangeSets") @@ -1943,7 +1898,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListChangeSetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListChangeSetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListChangeSetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1959,7 +1914,6 @@ extension CloudFormationClient { public func listExports(input: ListExportsInput) async throws -> ListExportsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listExports") @@ -1983,7 +1937,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListExportsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListExportsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListExportsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1999,7 +1953,6 @@ extension CloudFormationClient { public func listImports(input: ListImportsInput) async throws -> ListImportsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listImports") @@ -2023,7 +1976,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListImportsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListImportsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListImportsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2046,7 +1999,6 @@ extension CloudFormationClient { public func listStackInstanceResourceDrifts(input: ListStackInstanceResourceDriftsInput) async throws -> ListStackInstanceResourceDriftsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listStackInstanceResourceDrifts") @@ -2070,7 +2022,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStackInstanceResourceDriftsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStackInstanceResourceDriftsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStackInstanceResourceDriftsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2091,7 +2043,6 @@ extension CloudFormationClient { public func listStackInstances(input: ListStackInstancesInput) async throws -> ListStackInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listStackInstances") @@ -2115,7 +2066,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStackInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStackInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStackInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2131,7 +2082,6 @@ extension CloudFormationClient { public func listStackResources(input: ListStackResourcesInput) async throws -> ListStackResourcesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listStackResources") @@ -2155,7 +2105,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStackResourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStackResourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStackResourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2177,7 +2127,6 @@ extension CloudFormationClient { public func listStackSetOperationResults(input: ListStackSetOperationResultsInput) async throws -> ListStackSetOperationResultsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listStackSetOperationResults") @@ -2201,7 +2150,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStackSetOperationResultsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStackSetOperationResultsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStackSetOperationResultsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2222,7 +2171,6 @@ extension CloudFormationClient { public func listStackSetOperations(input: ListStackSetOperationsInput) async throws -> ListStackSetOperationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listStackSetOperations") @@ -2246,7 +2194,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStackSetOperationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStackSetOperationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStackSetOperationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2268,7 +2216,6 @@ extension CloudFormationClient { public func listStackSets(input: ListStackSetsInput) async throws -> ListStackSetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listStackSets") @@ -2292,7 +2239,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStackSetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStackSetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStackSetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2308,7 +2255,6 @@ extension CloudFormationClient { public func listStacks(input: ListStacksInput) async throws -> ListStacksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listStacks") @@ -2332,7 +2278,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStacksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStacksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStacksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2353,7 +2299,6 @@ extension CloudFormationClient { public func listTypeRegistrations(input: ListTypeRegistrationsInput) async throws -> ListTypeRegistrationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTypeRegistrations") @@ -2377,7 +2322,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTypeRegistrationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTypeRegistrationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTypeRegistrationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2398,7 +2343,6 @@ extension CloudFormationClient { public func listTypeVersions(input: ListTypeVersionsInput) async throws -> ListTypeVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTypeVersions") @@ -2422,7 +2366,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTypeVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTypeVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTypeVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2443,7 +2387,6 @@ extension CloudFormationClient { public func listTypes(input: ListTypesInput) async throws -> ListTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTypes") @@ -2467,7 +2410,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2489,7 +2432,6 @@ extension CloudFormationClient { public func publishType(input: PublishTypeInput) async throws -> PublishTypeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "publishType") @@ -2513,7 +2455,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PublishTypeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PublishTypeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PublishTypeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2535,7 +2477,6 @@ extension CloudFormationClient { public func recordHandlerProgress(input: RecordHandlerProgressInput) async throws -> RecordHandlerProgressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "recordHandlerProgress") @@ -2559,7 +2500,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RecordHandlerProgressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RecordHandlerProgressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RecordHandlerProgressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2580,7 +2521,6 @@ extension CloudFormationClient { public func registerPublisher(input: RegisterPublisherInput) async throws -> RegisterPublisherOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerPublisher") @@ -2604,7 +2544,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterPublisherOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterPublisherOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterPublisherOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2634,7 +2574,6 @@ extension CloudFormationClient { public func registerType(input: RegisterTypeInput) async throws -> RegisterTypeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerType") @@ -2658,7 +2597,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterTypeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterTypeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterTypeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2689,7 +2628,6 @@ extension CloudFormationClient { public func rollbackStack(input: RollbackStackInput) async throws -> RollbackStackOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rollbackStack") @@ -2713,7 +2651,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RollbackStackOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RollbackStackOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RollbackStackOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2729,7 +2667,6 @@ extension CloudFormationClient { public func setStackPolicy(input: SetStackPolicyInput) async throws -> SetStackPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setStackPolicy") @@ -2753,7 +2690,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetStackPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetStackPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetStackPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2775,7 +2712,6 @@ extension CloudFormationClient { public func setTypeConfiguration(input: SetTypeConfigurationInput) async throws -> SetTypeConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setTypeConfiguration") @@ -2799,7 +2735,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetTypeConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetTypeConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetTypeConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2821,7 +2757,6 @@ extension CloudFormationClient { public func setTypeDefaultVersion(input: SetTypeDefaultVersionInput) async throws -> SetTypeDefaultVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setTypeDefaultVersion") @@ -2845,7 +2780,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetTypeDefaultVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetTypeDefaultVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetTypeDefaultVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2861,7 +2796,6 @@ extension CloudFormationClient { public func signalResource(input: SignalResourceInput) async throws -> SignalResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "signalResource") @@ -2885,7 +2819,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SignalResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SignalResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SignalResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2908,7 +2842,6 @@ extension CloudFormationClient { public func stopStackSetOperation(input: StopStackSetOperationInput) async throws -> StopStackSetOperationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopStackSetOperation") @@ -2932,7 +2865,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopStackSetOperationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopStackSetOperationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopStackSetOperationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2961,7 +2894,6 @@ extension CloudFormationClient { public func testType(input: TestTypeInput) async throws -> TestTypeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "testType") @@ -2985,7 +2917,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TestTypeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TestTypeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TestTypeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3007,7 +2939,6 @@ extension CloudFormationClient { public func updateStack(input: UpdateStackInput) async throws -> UpdateStackOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateStack") @@ -3031,7 +2962,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateStackOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateStackOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateStackOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3057,7 +2988,6 @@ extension CloudFormationClient { public func updateStackInstances(input: UpdateStackInstancesInput) async throws -> UpdateStackInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateStackInstances") @@ -3082,7 +3012,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateStackInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateStackInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateStackInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3108,7 +3038,6 @@ extension CloudFormationClient { public func updateStackSet(input: UpdateStackSetInput) async throws -> UpdateStackSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateStackSet") @@ -3133,7 +3062,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateStackSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateStackSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateStackSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3149,7 +3078,6 @@ extension CloudFormationClient { public func updateTerminationProtection(input: UpdateTerminationProtectionInput) async throws -> UpdateTerminationProtectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateTerminationProtection") @@ -3173,7 +3101,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateTerminationProtectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateTerminationProtectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateTerminationProtectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3189,7 +3117,6 @@ extension CloudFormationClient { public func validateTemplate(input: ValidateTemplateInput) async throws -> ValidateTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "validateTemplate") @@ -3213,7 +3140,7 @@ extension CloudFormationClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ValidateTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ValidateTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ValidateTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSCloudFormation/models/Models.swift b/Sources/Services/AWSCloudFormation/models/Models.swift index c3528349743..a67b81b9728 100644 --- a/Sources/Services/AWSCloudFormation/models/Models.swift +++ b/Sources/Services/AWSCloudFormation/models/Models.swift @@ -1,6 +1,8 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension CloudFormationClientTypes { public enum AccountFilterType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { @@ -40,7 +42,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.AccountGateResult: Swift.Codable { +extension CloudFormationClientTypes.AccountGateResult: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case status = "Status" case statusReason = "StatusReason" @@ -56,12 +58,14 @@ extension CloudFormationClientTypes.AccountGateResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.AccountGateStatus.self, forKey: .status) - status = statusDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.AccountGateResult() + value.status = try reader["Status"].readIfPresent() + value.statusReason = try reader["StatusReason"].readIfPresent() + return value + } } } @@ -132,7 +136,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.AccountLimit: Swift.Codable { +extension CloudFormationClientTypes.AccountLimit: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case value = "Value" @@ -148,12 +152,14 @@ extension CloudFormationClientTypes.AccountLimit: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.AccountLimit() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -187,6 +193,7 @@ extension CloudFormationClientTypes { } extension ActivateOrganizationsAccessInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("ActivateOrganizationsAccess", forKey:ClientRuntime.Key("Action")) @@ -206,8 +213,12 @@ public struct ActivateOrganizationsAccessInput: Swift.Equatable { public init() { } } -extension ActivateOrganizationsAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ActivateOrganizationsAccessOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ActivateOrganizationsAccessOutput() + } } } @@ -216,18 +227,38 @@ public struct ActivateOrganizationsAccessOutput: Swift.Equatable { public init() { } } -enum ActivateOrganizationsAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotFoundException": return try await OperationNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ActivateOrganizationsAccessOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotFoundException": return try await OperationNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ActivateTypeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoUpdate = "AutoUpdate" + case executionRoleArn = "ExecutionRoleArn" + case loggingConfig = "LoggingConfig" + case majorVersion = "MajorVersion" + case publicTypeArn = "PublicTypeArn" + case publisherId = "PublisherId" + case type = "Type" + case typeName = "TypeName" + case typeNameAlias = "TypeNameAlias" + case versionBump = "VersionBump" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoUpdate = autoUpdate { @@ -324,66 +355,15 @@ public struct ActivateTypeInput: Swift.Equatable { } } -struct ActivateTypeInputBody: Swift.Equatable { - let type: CloudFormationClientTypes.ThirdPartyType? - let publicTypeArn: Swift.String? - let publisherId: Swift.String? - let typeName: Swift.String? - let typeNameAlias: Swift.String? - let autoUpdate: Swift.Bool? - let loggingConfig: CloudFormationClientTypes.LoggingConfig? - let executionRoleArn: Swift.String? - let versionBump: CloudFormationClientTypes.VersionBump? - let majorVersion: Swift.Int? -} - -extension ActivateTypeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoUpdate = "AutoUpdate" - case executionRoleArn = "ExecutionRoleArn" - case loggingConfig = "LoggingConfig" - case majorVersion = "MajorVersion" - case publicTypeArn = "PublicTypeArn" - case publisherId = "PublisherId" - case type = "Type" - case typeName = "TypeName" - case typeNameAlias = "TypeNameAlias" - case versionBump = "VersionBump" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ThirdPartyType.self, forKey: .type) - type = typeDecoded - let publicTypeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicTypeArn) - publicTypeArn = publicTypeArnDecoded - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let typeNameAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeNameAlias) - typeNameAlias = typeNameAliasDecoded - let autoUpdateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoUpdate) - autoUpdate = autoUpdateDecoded - let loggingConfigDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.LoggingConfig.self, forKey: .loggingConfig) - loggingConfig = loggingConfigDecoded - let executionRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .executionRoleArn) - executionRoleArn = executionRoleArnDecoded - let versionBumpDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.VersionBump.self, forKey: .versionBump) - versionBump = versionBumpDecoded - let majorVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .majorVersion) - majorVersion = majorVersionDecoded - } -} +extension ActivateTypeOutput { -extension ActivateTypeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ActivateTypeOutputBody = try responseDecoder.decode(responseBody: data) - self.arn = output.arn - } else { - self.arn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ActivateTypeResult"] + var value = ActivateTypeOutput() + value.arn = try reader["Arn"].readIfPresent() + return value } } } @@ -400,45 +380,33 @@ public struct ActivateTypeOutput: Swift.Equatable { } } -struct ActivateTypeOutputBody: Swift.Equatable { - let arn: Swift.String? -} - -extension ActivateTypeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ActivateTypeResult")) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - } -} +enum ActivateTypeOutputError { -enum ActivateTypeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeNotFoundException": return try await TypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeNotFoundException": return try await TypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AlreadyExistsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -466,23 +434,7 @@ public struct AlreadyExistsException: ClientRuntime.ModeledError, AWSClientRunti } } -struct AlreadyExistsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension AlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFormationClientTypes.AutoDeployment: Swift.Codable { +extension CloudFormationClientTypes.AutoDeployment: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case enabled = "Enabled" case retainStacksOnAccountRemoval = "RetainStacksOnAccountRemoval" @@ -498,12 +450,14 @@ extension CloudFormationClientTypes.AutoDeployment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let retainStacksOnAccountRemovalDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainStacksOnAccountRemoval) - retainStacksOnAccountRemoval = retainStacksOnAccountRemovalDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.AutoDeployment() + value.enabled = try reader["Enabled"].readIfPresent() + value.retainStacksOnAccountRemoval = try reader["RetainStacksOnAccountRemoval"].readIfPresent() + return value + } } } @@ -527,7 +481,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.BatchDescribeTypeConfigurationsError: Swift.Codable { +extension CloudFormationClientTypes.BatchDescribeTypeConfigurationsError: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case errorCode = "ErrorCode" case errorMessage = "ErrorMessage" @@ -547,14 +501,15 @@ extension CloudFormationClientTypes.BatchDescribeTypeConfigurationsError: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorCode) - errorCode = errorCodeDecoded - let errorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorMessage) - errorMessage = errorMessageDecoded - let typeConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.TypeConfigurationIdentifier.self, forKey: .typeConfigurationIdentifier) - typeConfigurationIdentifier = typeConfigurationIdentifierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.BatchDescribeTypeConfigurationsError() + value.errorCode = try reader["ErrorCode"].readIfPresent() + value.errorMessage = try reader["ErrorMessage"].readIfPresent() + value.typeConfigurationIdentifier = try reader["TypeConfigurationIdentifier"].readIfPresent(readingClosure: CloudFormationClientTypes.TypeConfigurationIdentifier.readingClosure) + return value + } } } @@ -583,6 +538,10 @@ extension CloudFormationClientTypes { } extension BatchDescribeTypeConfigurationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case typeConfigurationIdentifiers = "TypeConfigurationIdentifiers" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let typeConfigurationIdentifiers = typeConfigurationIdentifiers { @@ -622,51 +581,17 @@ public struct BatchDescribeTypeConfigurationsInput: Swift.Equatable { } } -struct BatchDescribeTypeConfigurationsInputBody: Swift.Equatable { - let typeConfigurationIdentifiers: [CloudFormationClientTypes.TypeConfigurationIdentifier]? -} - -extension BatchDescribeTypeConfigurationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case typeConfigurationIdentifiers = "TypeConfigurationIdentifiers" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.typeConfigurationIdentifiers) { - struct KeyVal0{struct member{}} - let typeConfigurationIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .typeConfigurationIdentifiers) - if let typeConfigurationIdentifiersWrappedContainer = typeConfigurationIdentifiersWrappedContainer { - let typeConfigurationIdentifiersContainer = try typeConfigurationIdentifiersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.TypeConfigurationIdentifier].self, forKey: .member) - var typeConfigurationIdentifiersBuffer:[CloudFormationClientTypes.TypeConfigurationIdentifier]? = nil - if let typeConfigurationIdentifiersContainer = typeConfigurationIdentifiersContainer { - typeConfigurationIdentifiersBuffer = [CloudFormationClientTypes.TypeConfigurationIdentifier]() - for structureContainer0 in typeConfigurationIdentifiersContainer { - typeConfigurationIdentifiersBuffer?.append(structureContainer0) - } - } - typeConfigurationIdentifiers = typeConfigurationIdentifiersBuffer - } else { - typeConfigurationIdentifiers = [] - } - } else { - typeConfigurationIdentifiers = nil - } - } -} +extension BatchDescribeTypeConfigurationsOutput { -extension BatchDescribeTypeConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BatchDescribeTypeConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.errors = output.errors - self.typeConfigurations = output.typeConfigurations - self.unprocessedTypeConfigurations = output.unprocessedTypeConfigurations - } else { - self.errors = nil - self.typeConfigurations = nil - self.unprocessedTypeConfigurations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BatchDescribeTypeConfigurationsResult"] + var value = BatchDescribeTypeConfigurationsOutput() + value.errors = try reader["Errors"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.BatchDescribeTypeConfigurationsError.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.typeConfigurations = try reader["TypeConfigurations"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.TypeConfigurationDetails.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.unprocessedTypeConfigurations = try reader["UnprocessedTypeConfigurations"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.TypeConfigurationIdentifier.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -691,104 +616,33 @@ public struct BatchDescribeTypeConfigurationsOutput: Swift.Equatable { } } -struct BatchDescribeTypeConfigurationsOutputBody: Swift.Equatable { - let errors: [CloudFormationClientTypes.BatchDescribeTypeConfigurationsError]? - let unprocessedTypeConfigurations: [CloudFormationClientTypes.TypeConfigurationIdentifier]? - let typeConfigurations: [CloudFormationClientTypes.TypeConfigurationDetails]? -} +enum BatchDescribeTypeConfigurationsOutputError { -extension BatchDescribeTypeConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errors = "Errors" - case typeConfigurations = "TypeConfigurations" - case unprocessedTypeConfigurations = "UnprocessedTypeConfigurations" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BatchDescribeTypeConfigurationsResult")) - if containerValues.contains(.errors) { - struct KeyVal0{struct member{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.BatchDescribeTypeConfigurationsError].self, forKey: .member) - var errorsBuffer:[CloudFormationClientTypes.BatchDescribeTypeConfigurationsError]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [CloudFormationClientTypes.BatchDescribeTypeConfigurationsError]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] - } - } else { - errors = nil - } - if containerValues.contains(.unprocessedTypeConfigurations) { - struct KeyVal0{struct member{}} - let unprocessedTypeConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unprocessedTypeConfigurations) - if let unprocessedTypeConfigurationsWrappedContainer = unprocessedTypeConfigurationsWrappedContainer { - let unprocessedTypeConfigurationsContainer = try unprocessedTypeConfigurationsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.TypeConfigurationIdentifier].self, forKey: .member) - var unprocessedTypeConfigurationsBuffer:[CloudFormationClientTypes.TypeConfigurationIdentifier]? = nil - if let unprocessedTypeConfigurationsContainer = unprocessedTypeConfigurationsContainer { - unprocessedTypeConfigurationsBuffer = [CloudFormationClientTypes.TypeConfigurationIdentifier]() - for structureContainer0 in unprocessedTypeConfigurationsContainer { - unprocessedTypeConfigurationsBuffer?.append(structureContainer0) - } - } - unprocessedTypeConfigurations = unprocessedTypeConfigurationsBuffer - } else { - unprocessedTypeConfigurations = [] - } - } else { - unprocessedTypeConfigurations = nil - } - if containerValues.contains(.typeConfigurations) { - struct KeyVal0{struct member{}} - let typeConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .typeConfigurations) - if let typeConfigurationsWrappedContainer = typeConfigurationsWrappedContainer { - let typeConfigurationsContainer = try typeConfigurationsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.TypeConfigurationDetails].self, forKey: .member) - var typeConfigurationsBuffer:[CloudFormationClientTypes.TypeConfigurationDetails]? = nil - if let typeConfigurationsContainer = typeConfigurationsContainer { - typeConfigurationsBuffer = [CloudFormationClientTypes.TypeConfigurationDetails]() - for structureContainer0 in typeConfigurationsContainer { - typeConfigurationsBuffer?.append(structureContainer0) - } - } - typeConfigurations = typeConfigurationsBuffer - } else { - typeConfigurations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeConfigurationNotFoundException": return try await TypeConfigurationNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - typeConfigurations = nil - } - } -} - -enum BatchDescribeTypeConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeConfigurationNotFoundException": return try await TypeConfigurationNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension CFNRegistryException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CFNRegistryException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -817,22 +671,6 @@ public struct CFNRegistryException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct CFNRegistryExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CFNRegistryExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudFormationClientTypes { public enum CallAs: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case delegatedAdmin @@ -866,6 +704,11 @@ extension CloudFormationClientTypes { } extension CancelUpdateStackInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientRequestToken = "ClientRequestToken" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clientRequestToken = clientRequestToken { @@ -904,28 +747,12 @@ public struct CancelUpdateStackInput: Swift.Equatable { } } -struct CancelUpdateStackInputBody: Swift.Equatable { - let stackName: Swift.String? - let clientRequestToken: Swift.String? -} - -extension CancelUpdateStackInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRequestToken = "ClientRequestToken" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - } -} +extension CancelUpdateStackOutput { -extension CancelUpdateStackOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CancelUpdateStackOutput() + } } } @@ -934,12 +761,19 @@ public struct CancelUpdateStackOutput: Swift.Equatable { public init() { } } -enum CancelUpdateStackOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CancelUpdateStackOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -1017,7 +851,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.Change: Swift.Codable { +extension CloudFormationClientTypes.Change: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case hookInvocationCount = "HookInvocationCount" case resourceChange = "ResourceChange" @@ -1037,14 +871,15 @@ extension CloudFormationClientTypes.Change: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeType.self, forKey: .type) - type = typeDecoded - let hookInvocationCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .hookInvocationCount) - hookInvocationCount = hookInvocationCountDecoded - let resourceChangeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ResourceChange.self, forKey: .resourceChange) - resourceChange = resourceChangeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.Change() + value.type = try reader["Type"].readIfPresent() + value.hookInvocationCount = try reader["HookInvocationCount"].readIfPresent() + value.resourceChange = try reader["ResourceChange"].readIfPresent(readingClosure: CloudFormationClientTypes.ResourceChange.readingClosure) + return value + } } } @@ -1113,7 +948,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.ChangeSetHook: Swift.Codable { +extension CloudFormationClientTypes.ChangeSetHook: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case failureMode = "FailureMode" case invocationPoint = "InvocationPoint" @@ -1145,20 +980,18 @@ extension CloudFormationClientTypes.ChangeSetHook: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let invocationPointDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.HookInvocationPoint.self, forKey: .invocationPoint) - invocationPoint = invocationPointDecoded - let failureModeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.HookFailureMode.self, forKey: .failureMode) - failureMode = failureModeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let typeVersionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeVersionId) - typeVersionId = typeVersionIdDecoded - let typeConfigurationVersionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeConfigurationVersionId) - typeConfigurationVersionId = typeConfigurationVersionIdDecoded - let targetDetailsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeSetHookTargetDetails.self, forKey: .targetDetails) - targetDetails = targetDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ChangeSetHook() + value.invocationPoint = try reader["InvocationPoint"].readIfPresent() + value.failureMode = try reader["FailureMode"].readIfPresent() + value.typeName = try reader["TypeName"].readIfPresent() + value.typeVersionId = try reader["TypeVersionId"].readIfPresent() + value.typeConfigurationVersionId = try reader["TypeConfigurationVersionId"].readIfPresent() + value.targetDetails = try reader["TargetDetails"].readIfPresent(readingClosure: CloudFormationClientTypes.ChangeSetHookTargetDetails.readingClosure) + return value + } } } @@ -1216,7 +1049,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ChangeSetHookResourceTargetDetails: Swift.Codable { +extension CloudFormationClientTypes.ChangeSetHookResourceTargetDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logicalResourceId = "LogicalResourceId" case resourceAction = "ResourceAction" @@ -1236,14 +1069,15 @@ extension CloudFormationClientTypes.ChangeSetHookResourceTargetDetails: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceActionDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeAction.self, forKey: .resourceAction) - resourceAction = resourceActionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ChangeSetHookResourceTargetDetails() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.resourceAction = try reader["ResourceAction"].readIfPresent() + return value + } } } @@ -1271,7 +1105,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ChangeSetHookTargetDetails: Swift.Codable { +extension CloudFormationClientTypes.ChangeSetHookTargetDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case resourceTargetDetails = "ResourceTargetDetails" case targetType = "TargetType" @@ -1287,12 +1121,14 @@ extension CloudFormationClientTypes.ChangeSetHookTargetDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetTypeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.HookTargetType.self, forKey: .targetType) - targetType = targetTypeDecoded - let resourceTargetDetailsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeSetHookResourceTargetDetails.self, forKey: .resourceTargetDetails) - resourceTargetDetails = resourceTargetDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ChangeSetHookTargetDetails() + value.targetType = try reader["TargetType"].readIfPresent() + value.resourceTargetDetails = try reader["ResourceTargetDetails"].readIfPresent(readingClosure: CloudFormationClientTypes.ChangeSetHookResourceTargetDetails.readingClosure) + return value + } } } @@ -1352,16 +1188,14 @@ extension CloudFormationClientTypes { } extension ChangeSetNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ChangeSetNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1389,22 +1223,6 @@ public struct ChangeSetNotFoundException: ClientRuntime.ModeledError, AWSClientR } } -struct ChangeSetNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ChangeSetNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudFormationClientTypes { public enum ChangeSetStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case createComplete @@ -1455,7 +1273,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.ChangeSetSummary: Swift.Codable { +extension CloudFormationClientTypes.ChangeSetSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case changeSetId = "ChangeSetId" case changeSetName = "ChangeSetName" @@ -1515,34 +1333,25 @@ extension CloudFormationClientTypes.ChangeSetSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let changeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetId) - changeSetId = changeSetIdDecoded - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - let executionStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ExecutionStatus.self, forKey: .executionStatus) - executionStatus = executionStatusDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeSetStatus.self, forKey: .status) - status = statusDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let includeNestedStacksDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeNestedStacks) - includeNestedStacks = includeNestedStacksDecoded - let parentChangeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parentChangeSetId) - parentChangeSetId = parentChangeSetIdDecoded - let rootChangeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rootChangeSetId) - rootChangeSetId = rootChangeSetIdDecoded - let importExistingResourcesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .importExistingResources) - importExistingResources = importExistingResourcesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ChangeSetSummary() + value.stackId = try reader["StackId"].readIfPresent() + value.stackName = try reader["StackName"].readIfPresent() + value.changeSetId = try reader["ChangeSetId"].readIfPresent() + value.changeSetName = try reader["ChangeSetName"].readIfPresent() + value.executionStatus = try reader["ExecutionStatus"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.statusReason = try reader["StatusReason"].readIfPresent() + value.creationTime = try reader["CreationTime"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + value.includeNestedStacks = try reader["IncludeNestedStacks"].readIfPresent() + value.parentChangeSetId = try reader["ParentChangeSetId"].readIfPresent() + value.rootChangeSetId = try reader["RootChangeSetId"].readIfPresent() + value.importExistingResources = try reader["ImportExistingResources"].readIfPresent() + return value + } } } @@ -1750,6 +1559,13 @@ extension CloudFormationClientTypes { } extension ContinueUpdateRollbackInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientRequestToken = "ClientRequestToken" + case resourcesToSkip = "ResourcesToSkip" + case roleARN = "RoleARN" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clientRequestToken = clientRequestToken { @@ -1811,53 +1627,12 @@ public struct ContinueUpdateRollbackInput: Swift.Equatable { } } -struct ContinueUpdateRollbackInputBody: Swift.Equatable { - let stackName: Swift.String? - let roleARN: Swift.String? - let resourcesToSkip: [Swift.String]? - let clientRequestToken: Swift.String? -} - -extension ContinueUpdateRollbackInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRequestToken = "ClientRequestToken" - case resourcesToSkip = "ResourcesToSkip" - case roleARN = "RoleARN" - case stackName = "StackName" - } +extension ContinueUpdateRollbackOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - if containerValues.contains(.resourcesToSkip) { - struct KeyVal0{struct member{}} - let resourcesToSkipWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourcesToSkip) - if let resourcesToSkipWrappedContainer = resourcesToSkipWrappedContainer { - let resourcesToSkipContainer = try resourcesToSkipWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesToSkipBuffer:[Swift.String]? = nil - if let resourcesToSkipContainer = resourcesToSkipContainer { - resourcesToSkipBuffer = [Swift.String]() - for stringContainer0 in resourcesToSkipContainer { - resourcesToSkipBuffer?.append(stringContainer0) - } - } - resourcesToSkip = resourcesToSkipBuffer - } else { - resourcesToSkip = [] - } - } else { - resourcesToSkip = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ContinueUpdateRollbackOutput() } - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - } -} - -extension ContinueUpdateRollbackOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -1867,17 +1642,46 @@ public struct ContinueUpdateRollbackOutput: Swift.Equatable { public init() { } } -enum ContinueUpdateRollbackOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ContinueUpdateRollbackOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateChangeSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case capabilities = "Capabilities" + case changeSetName = "ChangeSetName" + case changeSetType = "ChangeSetType" + case clientToken = "ClientToken" + case description = "Description" + case importExistingResources = "ImportExistingResources" + case includeNestedStacks = "IncludeNestedStacks" + case notificationARNs = "NotificationARNs" + case onStackFailure = "OnStackFailure" + case parameters = "Parameters" + case resourceTypes = "ResourceTypes" + case resourcesToImport = "ResourcesToImport" + case roleARN = "RoleARN" + case rollbackConfiguration = "RollbackConfiguration" + case stackName = "StackName" + case tags = "Tags" + case templateBody = "TemplateBody" + case templateURL = "TemplateURL" + case usePreviousTemplate = "UsePreviousTemplate" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let capabilities = capabilities { @@ -2132,206 +1936,16 @@ public struct CreateChangeSetInput: Swift.Equatable { } } -struct CreateChangeSetInputBody: Swift.Equatable { - let stackName: Swift.String? - let templateBody: Swift.String? - let templateURL: Swift.String? - let usePreviousTemplate: Swift.Bool? - let parameters: [CloudFormationClientTypes.Parameter]? - let capabilities: [CloudFormationClientTypes.Capability]? - let resourceTypes: [Swift.String]? - let roleARN: Swift.String? - let rollbackConfiguration: CloudFormationClientTypes.RollbackConfiguration? - let notificationARNs: [Swift.String]? - let tags: [CloudFormationClientTypes.Tag]? - let changeSetName: Swift.String? - let clientToken: Swift.String? - let description: Swift.String? - let changeSetType: CloudFormationClientTypes.ChangeSetType? - let resourcesToImport: [CloudFormationClientTypes.ResourceToImport]? - let includeNestedStacks: Swift.Bool? - let onStackFailure: CloudFormationClientTypes.OnStackFailure? - let importExistingResources: Swift.Bool? -} - -extension CreateChangeSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capabilities = "Capabilities" - case changeSetName = "ChangeSetName" - case changeSetType = "ChangeSetType" - case clientToken = "ClientToken" - case description = "Description" - case importExistingResources = "ImportExistingResources" - case includeNestedStacks = "IncludeNestedStacks" - case notificationARNs = "NotificationARNs" - case onStackFailure = "OnStackFailure" - case parameters = "Parameters" - case resourceTypes = "ResourceTypes" - case resourcesToImport = "ResourcesToImport" - case roleARN = "RoleARN" - case rollbackConfiguration = "RollbackConfiguration" - case stackName = "StackName" - case tags = "Tags" - case templateBody = "TemplateBody" - case templateURL = "TemplateURL" - case usePreviousTemplate = "UsePreviousTemplate" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - let templateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateURL) - templateURL = templateURLDecoded - let usePreviousTemplateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .usePreviousTemplate) - usePreviousTemplate = usePreviousTemplateDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - if containerValues.contains(.resourceTypes) { - struct KeyVal0{struct member{}} - let resourceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTypes) - if let resourceTypesWrappedContainer = resourceTypesWrappedContainer { - let resourceTypesContainer = try resourceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceTypesBuffer:[Swift.String]? = nil - if let resourceTypesContainer = resourceTypesContainer { - resourceTypesBuffer = [Swift.String]() - for stringContainer0 in resourceTypesContainer { - resourceTypesBuffer?.append(stringContainer0) - } - } - resourceTypes = resourceTypesBuffer - } else { - resourceTypes = [] - } - } else { - resourceTypes = nil - } - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - let rollbackConfigurationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RollbackConfiguration.self, forKey: .rollbackConfiguration) - rollbackConfiguration = rollbackConfigurationDecoded - if containerValues.contains(.notificationARNs) { - struct KeyVal0{struct member{}} - let notificationARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .notificationARNs) - if let notificationARNsWrappedContainer = notificationARNsWrappedContainer { - let notificationARNsContainer = try notificationARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var notificationARNsBuffer:[Swift.String]? = nil - if let notificationARNsContainer = notificationARNsContainer { - notificationARNsBuffer = [Swift.String]() - for stringContainer0 in notificationARNsContainer { - notificationARNsBuffer?.append(stringContainer0) - } - } - notificationARNs = notificationARNsBuffer - } else { - notificationARNs = [] - } - } else { - notificationARNs = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudFormationClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudFormationClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let changeSetTypeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeSetType.self, forKey: .changeSetType) - changeSetType = changeSetTypeDecoded - if containerValues.contains(.resourcesToImport) { - struct KeyVal0{struct member{}} - let resourcesToImportWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourcesToImport) - if let resourcesToImportWrappedContainer = resourcesToImportWrappedContainer { - let resourcesToImportContainer = try resourcesToImportWrappedContainer.decodeIfPresent([CloudFormationClientTypes.ResourceToImport].self, forKey: .member) - var resourcesToImportBuffer:[CloudFormationClientTypes.ResourceToImport]? = nil - if let resourcesToImportContainer = resourcesToImportContainer { - resourcesToImportBuffer = [CloudFormationClientTypes.ResourceToImport]() - for structureContainer0 in resourcesToImportContainer { - resourcesToImportBuffer?.append(structureContainer0) - } - } - resourcesToImport = resourcesToImportBuffer - } else { - resourcesToImport = [] - } - } else { - resourcesToImport = nil - } - let includeNestedStacksDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeNestedStacks) - includeNestedStacks = includeNestedStacksDecoded - let onStackFailureDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.OnStackFailure.self, forKey: .onStackFailure) - onStackFailure = onStackFailureDecoded - let importExistingResourcesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .importExistingResources) - importExistingResources = importExistingResourcesDecoded - } -} +extension CreateChangeSetOutput { -extension CreateChangeSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateChangeSetOutputBody = try responseDecoder.decode(responseBody: data) - self.id = output.id - self.stackId = output.stackId - } else { - self.id = nil - self.stackId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateChangeSetResult"] + var value = CreateChangeSetOutput() + value.id = try reader["Id"].readIfPresent() + value.stackId = try reader["StackId"].readIfPresent() + return value } } } @@ -2353,40 +1967,47 @@ public struct CreateChangeSetOutput: Swift.Equatable { } } -struct CreateChangeSetOutputBody: Swift.Equatable { - let id: Swift.String? - let stackId: Swift.String? -} - -extension CreateChangeSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case id = "Id" - case stackId = "StackId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateChangeSetResult")) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - } -} +enum CreateChangeSetOutputError { -enum CreateChangeSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExistsException": return try await AlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCapabilitiesException": return try await InsufficientCapabilitiesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExistsException": return try await AlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCapabilitiesException": return try await InsufficientCapabilitiesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateStackInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case capabilities = "Capabilities" + case clientRequestToken = "ClientRequestToken" + case disableRollback = "DisableRollback" + case enableTerminationProtection = "EnableTerminationProtection" + case notificationARNs = "NotificationARNs" + case onFailure = "OnFailure" + case parameters = "Parameters" + case resourceTypes = "ResourceTypes" + case retainExceptOnCreate = "RetainExceptOnCreate" + case roleARN = "RoleARN" + case rollbackConfiguration = "RollbackConfiguration" + case stackName = "StackName" + case stackPolicyBody = "StackPolicyBody" + case stackPolicyURL = "StackPolicyURL" + case tags = "Tags" + case templateBody = "TemplateBody" + case templateURL = "TemplateURL" + case timeoutInMinutes = "TimeoutInMinutes" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let capabilities = capabilities { @@ -2615,176 +2236,18 @@ public struct CreateStackInput: Swift.Equatable { } } -struct CreateStackInputBody: Swift.Equatable { - let stackName: Swift.String? - let templateBody: Swift.String? - let templateURL: Swift.String? - let parameters: [CloudFormationClientTypes.Parameter]? - let disableRollback: Swift.Bool? - let rollbackConfiguration: CloudFormationClientTypes.RollbackConfiguration? - let timeoutInMinutes: Swift.Int? - let notificationARNs: [Swift.String]? - let capabilities: [CloudFormationClientTypes.Capability]? - let resourceTypes: [Swift.String]? - let roleARN: Swift.String? - let onFailure: CloudFormationClientTypes.OnFailure? - let stackPolicyBody: Swift.String? - let stackPolicyURL: Swift.String? - let tags: [CloudFormationClientTypes.Tag]? - let clientRequestToken: Swift.String? - let enableTerminationProtection: Swift.Bool? - let retainExceptOnCreate: Swift.Bool? -} - -extension CreateStackInputBody: Swift.Decodable { +extension CreateStackInstancesInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case capabilities = "Capabilities" - case clientRequestToken = "ClientRequestToken" - case disableRollback = "DisableRollback" - case enableTerminationProtection = "EnableTerminationProtection" - case notificationARNs = "NotificationARNs" - case onFailure = "OnFailure" - case parameters = "Parameters" - case resourceTypes = "ResourceTypes" - case retainExceptOnCreate = "RetainExceptOnCreate" - case roleARN = "RoleARN" - case rollbackConfiguration = "RollbackConfiguration" - case stackName = "StackName" - case stackPolicyBody = "StackPolicyBody" - case stackPolicyURL = "StackPolicyURL" - case tags = "Tags" - case templateBody = "TemplateBody" - case templateURL = "TemplateURL" - case timeoutInMinutes = "TimeoutInMinutes" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - let templateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateURL) - templateURL = templateURLDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - let disableRollbackDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableRollback) - disableRollback = disableRollbackDecoded - let rollbackConfigurationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RollbackConfiguration.self, forKey: .rollbackConfiguration) - rollbackConfiguration = rollbackConfigurationDecoded - let timeoutInMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .timeoutInMinutes) - timeoutInMinutes = timeoutInMinutesDecoded - if containerValues.contains(.notificationARNs) { - struct KeyVal0{struct member{}} - let notificationARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .notificationARNs) - if let notificationARNsWrappedContainer = notificationARNsWrappedContainer { - let notificationARNsContainer = try notificationARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var notificationARNsBuffer:[Swift.String]? = nil - if let notificationARNsContainer = notificationARNsContainer { - notificationARNsBuffer = [Swift.String]() - for stringContainer0 in notificationARNsContainer { - notificationARNsBuffer?.append(stringContainer0) - } - } - notificationARNs = notificationARNsBuffer - } else { - notificationARNs = [] - } - } else { - notificationARNs = nil - } - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - if containerValues.contains(.resourceTypes) { - struct KeyVal0{struct member{}} - let resourceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTypes) - if let resourceTypesWrappedContainer = resourceTypesWrappedContainer { - let resourceTypesContainer = try resourceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceTypesBuffer:[Swift.String]? = nil - if let resourceTypesContainer = resourceTypesContainer { - resourceTypesBuffer = [Swift.String]() - for stringContainer0 in resourceTypesContainer { - resourceTypesBuffer?.append(stringContainer0) - } - } - resourceTypes = resourceTypesBuffer - } else { - resourceTypes = [] - } - } else { - resourceTypes = nil - } - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - let onFailureDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.OnFailure.self, forKey: .onFailure) - onFailure = onFailureDecoded - let stackPolicyBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyBody) - stackPolicyBody = stackPolicyBodyDecoded - let stackPolicyURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyURL) - stackPolicyURL = stackPolicyURLDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudFormationClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudFormationClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - let enableTerminationProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableTerminationProtection) - enableTerminationProtection = enableTerminationProtectionDecoded - let retainExceptOnCreateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainExceptOnCreate) - retainExceptOnCreate = retainExceptOnCreateDecoded + case accounts = "Accounts" + case callAs = "CallAs" + case deploymentTargets = "DeploymentTargets" + case operationId = "OperationId" + case operationPreferences = "OperationPreferences" + case parameterOverrides = "ParameterOverrides" + case regions = "Regions" + case stackSetName = "StackSetName" } -} -extension CreateStackInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accounts = accounts { @@ -2907,109 +2370,15 @@ public struct CreateStackInstancesInput: Swift.Equatable { } } -struct CreateStackInstancesInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let accounts: [Swift.String]? - let deploymentTargets: CloudFormationClientTypes.DeploymentTargets? - let regions: [Swift.String]? - let parameterOverrides: [CloudFormationClientTypes.Parameter]? - let operationPreferences: CloudFormationClientTypes.StackSetOperationPreferences? - let operationId: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension CreateStackInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accounts = "Accounts" - case callAs = "CallAs" - case deploymentTargets = "DeploymentTargets" - case operationId = "OperationId" - case operationPreferences = "OperationPreferences" - case parameterOverrides = "ParameterOverrides" - case regions = "Regions" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - if containerValues.contains(.accounts) { - struct KeyVal0{struct member{}} - let accountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accounts) - if let accountsWrappedContainer = accountsWrappedContainer { - let accountsContainer = try accountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var accountsBuffer:[Swift.String]? = nil - if let accountsContainer = accountsContainer { - accountsBuffer = [Swift.String]() - for stringContainer0 in accountsContainer { - accountsBuffer?.append(stringContainer0) - } - } - accounts = accountsBuffer - } else { - accounts = [] - } - } else { - accounts = nil - } - let deploymentTargetsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DeploymentTargets.self, forKey: .deploymentTargets) - deploymentTargets = deploymentTargetsDecoded - if containerValues.contains(.regions) { - struct KeyVal0{struct member{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionsBuffer:[Swift.String]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Swift.String]() - for stringContainer0 in regionsContainer { - regionsBuffer?.append(stringContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil - } - if containerValues.contains(.parameterOverrides) { - struct KeyVal0{struct member{}} - let parameterOverridesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameterOverrides) - if let parameterOverridesWrappedContainer = parameterOverridesWrappedContainer { - let parameterOverridesContainer = try parameterOverridesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parameterOverridesBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parameterOverridesContainer = parameterOverridesContainer { - parameterOverridesBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parameterOverridesContainer { - parameterOverridesBuffer?.append(structureContainer0) - } - } - parameterOverrides = parameterOverridesBuffer - } else { - parameterOverrides = [] - } - } else { - parameterOverrides = nil - } - let operationPreferencesDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationPreferences.self, forKey: .operationPreferences) - operationPreferences = operationPreferencesDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension CreateStackInstancesOutput { -extension CreateStackInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateStackInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.operationId = output.operationId - } else { - self.operationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateStackInstancesResult"] + var value = CreateStackInstancesOutput() + value.operationId = try reader["OperationId"].readIfPresent() + return value } } } @@ -3026,46 +2395,37 @@ public struct CreateStackInstancesOutput: Swift.Equatable { } } -struct CreateStackInstancesOutputBody: Swift.Equatable { - let operationId: Swift.String? -} - -extension CreateStackInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case operationId = "OperationId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateStackInstancesResult")) - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - } -} +enum CreateStackInstancesOutputError { -enum CreateStackInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressException": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleRequestException": return try await StaleRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressException": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleRequestException": return try await StaleRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CreateStackOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateStackOutputBody = try responseDecoder.decode(responseBody: data) - self.stackId = output.stackId - } else { - self.stackId = nil +extension CreateStackOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateStackResult"] + var value = CreateStackOutput() + value.stackId = try reader["StackId"].readIfPresent() + return value } } } @@ -3083,37 +2443,45 @@ public struct CreateStackOutput: Swift.Equatable { } } -struct CreateStackOutputBody: Swift.Equatable { - let stackId: Swift.String? -} - -extension CreateStackOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackId = "StackId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateStackResult")) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - } -} +enum CreateStackOutputError { -enum CreateStackOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExistsException": return try await AlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCapabilitiesException": return try await InsufficientCapabilitiesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExistsException": return try await AlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCapabilitiesException": return try await InsufficientCapabilitiesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateStackSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case administrationRoleARN = "AdministrationRoleARN" + case autoDeployment = "AutoDeployment" + case callAs = "CallAs" + case capabilities = "Capabilities" + case clientRequestToken = "ClientRequestToken" + case description = "Description" + case executionRoleName = "ExecutionRoleName" + case managedExecution = "ManagedExecution" + case parameters = "Parameters" + case permissionModel = "PermissionModel" + case stackId = "StackId" + case stackSetName = "StackSetName" + case tags = "Tags" + case templateBody = "TemplateBody" + case templateURL = "TemplateURL" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let administrationRoleARN = administrationRoleARN { @@ -3310,137 +2678,15 @@ public struct CreateStackSetInput: Swift.Equatable { } } -struct CreateStackSetInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let description: Swift.String? - let templateBody: Swift.String? - let templateURL: Swift.String? - let stackId: Swift.String? - let parameters: [CloudFormationClientTypes.Parameter]? - let capabilities: [CloudFormationClientTypes.Capability]? - let tags: [CloudFormationClientTypes.Tag]? - let administrationRoleARN: Swift.String? - let executionRoleName: Swift.String? - let permissionModel: CloudFormationClientTypes.PermissionModels? - let autoDeployment: CloudFormationClientTypes.AutoDeployment? - let callAs: CloudFormationClientTypes.CallAs? - let clientRequestToken: Swift.String? - let managedExecution: CloudFormationClientTypes.ManagedExecution? -} - -extension CreateStackSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case administrationRoleARN = "AdministrationRoleARN" - case autoDeployment = "AutoDeployment" - case callAs = "CallAs" - case capabilities = "Capabilities" - case clientRequestToken = "ClientRequestToken" - case description = "Description" - case executionRoleName = "ExecutionRoleName" - case managedExecution = "ManagedExecution" - case parameters = "Parameters" - case permissionModel = "PermissionModel" - case stackId = "StackId" - case stackSetName = "StackSetName" - case tags = "Tags" - case templateBody = "TemplateBody" - case templateURL = "TemplateURL" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - let templateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateURL) - templateURL = templateURLDecoded - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudFormationClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudFormationClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let administrationRoleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .administrationRoleARN) - administrationRoleARN = administrationRoleARNDecoded - let executionRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .executionRoleName) - executionRoleName = executionRoleNameDecoded - let permissionModelDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.PermissionModels.self, forKey: .permissionModel) - permissionModel = permissionModelDecoded - let autoDeploymentDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.AutoDeployment.self, forKey: .autoDeployment) - autoDeployment = autoDeploymentDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - let managedExecutionDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ManagedExecution.self, forKey: .managedExecution) - managedExecution = managedExecutionDecoded - } -} +extension CreateStackSetOutput { -extension CreateStackSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateStackSetOutputBody = try responseDecoder.decode(responseBody: data) - self.stackSetId = output.stackSetId - } else { - self.stackSetId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateStackSetResult"] + var value = CreateStackSetOutput() + value.stackSetId = try reader["StackSetId"].readIfPresent() + return value } } } @@ -3457,46 +2703,34 @@ public struct CreateStackSetOutput: Swift.Equatable { } } -struct CreateStackSetOutputBody: Swift.Equatable { - let stackSetId: Swift.String? -} - -extension CreateStackSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackSetId = "StackSetId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateStackSetResult")) - let stackSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetId) - stackSetId = stackSetIdDecoded - } -} +enum CreateStackSetOutputError { -enum CreateStackSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CreatedButModifiedException": return try await CreatedButModifiedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NameAlreadyExistsException": return try await NameAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CreatedButModifiedException": return try await CreatedButModifiedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NameAlreadyExistsException": return try await NameAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreatedButModifiedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CreatedButModifiedException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3524,23 +2758,8 @@ public struct CreatedButModifiedException: ClientRuntime.ModeledError, AWSClient } } -struct CreatedButModifiedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CreatedButModifiedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DeactivateOrganizationsAccessInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DeactivateOrganizationsAccess", forKey:ClientRuntime.Key("Action")) @@ -3560,8 +2779,12 @@ public struct DeactivateOrganizationsAccessInput: Swift.Equatable { public init() { } } -extension DeactivateOrganizationsAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeactivateOrganizationsAccessOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeactivateOrganizationsAccessOutput() + } } } @@ -3570,18 +2793,31 @@ public struct DeactivateOrganizationsAccessOutput: Swift.Equatable { public init() { } } -enum DeactivateOrganizationsAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotFoundException": return try await OperationNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeactivateOrganizationsAccessOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotFoundException": return try await OperationNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeactivateTypeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case type = "Type" + case typeName = "TypeName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -3625,32 +2861,12 @@ public struct DeactivateTypeInput: Swift.Equatable { } } -struct DeactivateTypeInputBody: Swift.Equatable { - let typeName: Swift.String? - let type: CloudFormationClientTypes.ThirdPartyType? - let arn: Swift.String? -} - -extension DeactivateTypeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case type = "Type" - case typeName = "TypeName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ThirdPartyType.self, forKey: .type) - type = typeDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - } -} +extension DeactivateTypeOutput { -extension DeactivateTypeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeactivateTypeOutput() + } } } @@ -3659,18 +2875,30 @@ public struct DeactivateTypeOutput: Swift.Equatable { public init() { } } -enum DeactivateTypeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeNotFoundException": return try await TypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeactivateTypeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeNotFoundException": return try await TypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteChangeSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case changeSetName = "ChangeSetName" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let changeSetName = changeSetName { @@ -3709,28 +2937,12 @@ public struct DeleteChangeSetInput: Swift.Equatable { } } -struct DeleteChangeSetInputBody: Swift.Equatable { - let changeSetName: Swift.String? - let stackName: Swift.String? -} - -extension DeleteChangeSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeSetName = "ChangeSetName" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - } -} +extension DeleteChangeSetOutput { -extension DeleteChangeSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteChangeSetOutput() + } } } @@ -3740,17 +2952,31 @@ public struct DeleteChangeSetOutput: Swift.Equatable { public init() { } } -enum DeleteChangeSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidChangeSetStatus": return try await InvalidChangeSetStatusException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteChangeSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidChangeSetStatus": return try await InvalidChangeSetStatusException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteStackInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientRequestToken = "ClientRequestToken" + case retainResources = "RetainResources" + case roleARN = "RoleARN" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clientRequestToken = clientRequestToken { @@ -3812,52 +3038,18 @@ public struct DeleteStackInput: Swift.Equatable { } } -struct DeleteStackInputBody: Swift.Equatable { - let stackName: Swift.String? - let retainResources: [Swift.String]? - let roleARN: Swift.String? - let clientRequestToken: Swift.String? -} - -extension DeleteStackInputBody: Swift.Decodable { +extension DeleteStackInstancesInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRequestToken = "ClientRequestToken" - case retainResources = "RetainResources" - case roleARN = "RoleARN" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - if containerValues.contains(.retainResources) { - struct KeyVal0{struct member{}} - let retainResourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .retainResources) - if let retainResourcesWrappedContainer = retainResourcesWrappedContainer { - let retainResourcesContainer = try retainResourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var retainResourcesBuffer:[Swift.String]? = nil - if let retainResourcesContainer = retainResourcesContainer { - retainResourcesBuffer = [Swift.String]() - for stringContainer0 in retainResourcesContainer { - retainResourcesBuffer?.append(stringContainer0) - } - } - retainResources = retainResourcesBuffer - } else { - retainResources = [] - } - } else { - retainResources = nil - } - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded + case accounts = "Accounts" + case callAs = "CallAs" + case deploymentTargets = "DeploymentTargets" + case operationId = "OperationId" + case operationPreferences = "OperationPreferences" + case regions = "Regions" + case retainStacks = "RetainStacks" + case stackSetName = "StackSetName" } -} -extension DeleteStackInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accounts = accounts { @@ -3961,92 +3153,15 @@ public struct DeleteStackInstancesInput: Swift.Equatable { } } -struct DeleteStackInstancesInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let accounts: [Swift.String]? - let deploymentTargets: CloudFormationClientTypes.DeploymentTargets? - let regions: [Swift.String]? - let operationPreferences: CloudFormationClientTypes.StackSetOperationPreferences? - let retainStacks: Swift.Bool? - let operationId: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension DeleteStackInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accounts = "Accounts" - case callAs = "CallAs" - case deploymentTargets = "DeploymentTargets" - case operationId = "OperationId" - case operationPreferences = "OperationPreferences" - case regions = "Regions" - case retainStacks = "RetainStacks" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - if containerValues.contains(.accounts) { - struct KeyVal0{struct member{}} - let accountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accounts) - if let accountsWrappedContainer = accountsWrappedContainer { - let accountsContainer = try accountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var accountsBuffer:[Swift.String]? = nil - if let accountsContainer = accountsContainer { - accountsBuffer = [Swift.String]() - for stringContainer0 in accountsContainer { - accountsBuffer?.append(stringContainer0) - } - } - accounts = accountsBuffer - } else { - accounts = [] - } - } else { - accounts = nil - } - let deploymentTargetsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DeploymentTargets.self, forKey: .deploymentTargets) - deploymentTargets = deploymentTargetsDecoded - if containerValues.contains(.regions) { - struct KeyVal0{struct member{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionsBuffer:[Swift.String]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Swift.String]() - for stringContainer0 in regionsContainer { - regionsBuffer?.append(stringContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil - } - let operationPreferencesDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationPreferences.self, forKey: .operationPreferences) - operationPreferences = operationPreferencesDecoded - let retainStacksDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainStacks) - retainStacks = retainStacksDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension DeleteStackInstancesOutput { -extension DeleteStackInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteStackInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.operationId = output.operationId - } else { - self.operationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteStackInstancesResult"] + var value = DeleteStackInstancesOutput() + value.operationId = try reader["OperationId"].readIfPresent() + return value } } } @@ -4063,39 +3178,33 @@ public struct DeleteStackInstancesOutput: Swift.Equatable { } } -struct DeleteStackInstancesOutputBody: Swift.Equatable { - let operationId: Swift.String? -} - -extension DeleteStackInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case operationId = "OperationId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteStackInstancesResult")) - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - } -} +enum DeleteStackInstancesOutputError { -enum DeleteStackInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressException": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleRequestException": return try await StaleRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressException": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleRequestException": return try await StaleRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension DeleteStackOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteStackOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteStackOutput() + } } } @@ -4104,17 +3213,29 @@ public struct DeleteStackOutput: Swift.Equatable { public init() { } } -enum DeleteStackOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteStackOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteStackSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case stackSetName = "StackSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -4156,28 +3277,12 @@ public struct DeleteStackSetInput: Swift.Equatable { } } -struct DeleteStackSetInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension DeleteStackSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case stackSetName = "StackSetName" - } +extension DeleteStackSetOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} - -extension DeleteStackSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteStackSetOutput() + } } } @@ -4186,18 +3291,25 @@ public struct DeleteStackSetOutput: Swift.Equatable { public init() { } } -enum DeleteStackSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OperationInProgressException": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotEmptyException": return try await StackSetNotEmptyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteStackSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OperationInProgressException": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotEmptyException": return try await StackSetNotEmptyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CloudFormationClientTypes.DeploymentTargets: Swift.Codable { +extension CloudFormationClientTypes.DeploymentTargets: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accountFilterType = "AccountFilterType" case accounts = "Accounts" @@ -4239,50 +3351,16 @@ extension CloudFormationClientTypes.DeploymentTargets: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.accounts) { - struct KeyVal0{struct member{}} - let accountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accounts) - if let accountsWrappedContainer = accountsWrappedContainer { - let accountsContainer = try accountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var accountsBuffer:[Swift.String]? = nil - if let accountsContainer = accountsContainer { - accountsBuffer = [Swift.String]() - for stringContainer0 in accountsContainer { - accountsBuffer?.append(stringContainer0) - } - } - accounts = accountsBuffer - } else { - accounts = [] - } - } else { - accounts = nil - } - let accountsUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountsUrl) - accountsUrl = accountsUrlDecoded - if containerValues.contains(.organizationalUnitIds) { - struct KeyVal0{struct member{}} - let organizationalUnitIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .organizationalUnitIds) - if let organizationalUnitIdsWrappedContainer = organizationalUnitIdsWrappedContainer { - let organizationalUnitIdsContainer = try organizationalUnitIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var organizationalUnitIdsBuffer:[Swift.String]? = nil - if let organizationalUnitIdsContainer = organizationalUnitIdsContainer { - organizationalUnitIdsBuffer = [Swift.String]() - for stringContainer0 in organizationalUnitIdsContainer { - organizationalUnitIdsBuffer?.append(stringContainer0) - } - } - organizationalUnitIds = organizationalUnitIdsBuffer - } else { - organizationalUnitIds = [] - } - } else { - organizationalUnitIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.DeploymentTargets() + value.accounts = try reader["Accounts"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.accountsUrl = try reader["AccountsUrl"].readIfPresent() + value.organizationalUnitIds = try reader["OrganizationalUnitIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.accountFilterType = try reader["AccountFilterType"].readIfPresent() + return value } - let accountFilterTypeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.AccountFilterType.self, forKey: .accountFilterType) - accountFilterType = accountFilterTypeDecoded } } @@ -4355,6 +3433,13 @@ extension CloudFormationClientTypes { } extension DeregisterTypeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case type = "Type" + case typeName = "TypeName" + case versionId = "VersionId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -4405,36 +3490,12 @@ public struct DeregisterTypeInput: Swift.Equatable { } } -struct DeregisterTypeInputBody: Swift.Equatable { - let arn: Swift.String? - let type: CloudFormationClientTypes.RegistryType? - let typeName: Swift.String? - let versionId: Swift.String? -} - -extension DeregisterTypeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case type = "Type" - case typeName = "TypeName" - case versionId = "VersionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - } -} +extension DeregisterTypeOutput { -extension DeregisterTypeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeregisterTypeOutput() + } } } @@ -4443,18 +3504,29 @@ public struct DeregisterTypeOutput: Swift.Equatable { public init() { } } -enum DeregisterTypeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeNotFoundException": return try await TypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeregisterTypeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeNotFoundException": return try await TypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeAccountLimitsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -4485,32 +3557,16 @@ public struct DescribeAccountLimitsInput: Swift.Equatable { } } -struct DescribeAccountLimitsInputBody: Swift.Equatable { - let nextToken: Swift.String? -} - -extension DescribeAccountLimitsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeAccountLimitsOutput { -extension DescribeAccountLimitsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAccountLimitsOutputBody = try responseDecoder.decode(responseBody: data) - self.accountLimits = output.accountLimits - self.nextToken = output.nextToken - } else { - self.accountLimits = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAccountLimitsResult"] + var value = DescribeAccountLimitsOutput() + value.accountLimits = try reader["AccountLimits"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.AccountLimit.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -4532,54 +3588,30 @@ public struct DescribeAccountLimitsOutput: Swift.Equatable { } } -struct DescribeAccountLimitsOutputBody: Swift.Equatable { - let accountLimits: [CloudFormationClientTypes.AccountLimit]? - let nextToken: Swift.String? -} - -extension DescribeAccountLimitsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountLimits = "AccountLimits" - case nextToken = "NextToken" - } +enum DescribeAccountLimitsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAccountLimitsResult")) - if containerValues.contains(.accountLimits) { - struct KeyVal0{struct member{}} - let accountLimitsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accountLimits) - if let accountLimitsWrappedContainer = accountLimitsWrappedContainer { - let accountLimitsContainer = try accountLimitsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.AccountLimit].self, forKey: .member) - var accountLimitsBuffer:[CloudFormationClientTypes.AccountLimit]? = nil - if let accountLimitsContainer = accountLimitsContainer { - accountLimitsBuffer = [CloudFormationClientTypes.AccountLimit]() - for structureContainer0 in accountLimitsContainer { - accountLimitsBuffer?.append(structureContainer0) - } - } - accountLimits = accountLimitsBuffer - } else { - accountLimits = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - accountLimits = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeAccountLimitsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeChangeSetHooksInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case changeSetName = "ChangeSetName" + case logicalResourceId = "LogicalResourceId" + case nextToken = "NextToken" + case stackName = "StackName" } -} -extension DescribeChangeSetHooksInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let changeSetName = changeSetName { @@ -4631,54 +3663,21 @@ public struct DescribeChangeSetHooksInput: Swift.Equatable { } } -struct DescribeChangeSetHooksInputBody: Swift.Equatable { - let changeSetName: Swift.String? - let stackName: Swift.String? - let nextToken: Swift.String? - let logicalResourceId: Swift.String? -} - -extension DescribeChangeSetHooksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeSetName = "ChangeSetName" - case logicalResourceId = "LogicalResourceId" - case nextToken = "NextToken" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - } -} +extension DescribeChangeSetHooksOutput { -extension DescribeChangeSetHooksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeChangeSetHooksOutputBody = try responseDecoder.decode(responseBody: data) - self.changeSetId = output.changeSetId - self.changeSetName = output.changeSetName - self.hooks = output.hooks - self.nextToken = output.nextToken - self.stackId = output.stackId - self.stackName = output.stackName - self.status = output.status - } else { - self.changeSetId = nil - self.changeSetName = nil - self.hooks = nil - self.nextToken = nil - self.stackId = nil - self.stackName = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeChangeSetHooksResult"] + var value = DescribeChangeSetHooksOutput() + value.changeSetId = try reader["ChangeSetId"].readIfPresent() + value.changeSetName = try reader["ChangeSetName"].readIfPresent() + value.hooks = try reader["Hooks"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.ChangeSetHook.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + value.stackId = try reader["StackId"].readIfPresent() + value.stackName = try reader["StackName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -4719,75 +3718,30 @@ public struct DescribeChangeSetHooksOutput: Swift.Equatable { } } -struct DescribeChangeSetHooksOutputBody: Swift.Equatable { - let changeSetId: Swift.String? - let changeSetName: Swift.String? - let hooks: [CloudFormationClientTypes.ChangeSetHook]? - let status: CloudFormationClientTypes.ChangeSetHooksStatus? - let nextToken: Swift.String? - let stackId: Swift.String? - let stackName: Swift.String? -} - -extension DescribeChangeSetHooksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeSetId = "ChangeSetId" - case changeSetName = "ChangeSetName" - case hooks = "Hooks" - case nextToken = "NextToken" - case stackId = "StackId" - case stackName = "StackName" - case status = "Status" - } +enum DescribeChangeSetHooksOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeChangeSetHooksResult")) - let changeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetId) - changeSetId = changeSetIdDecoded - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - if containerValues.contains(.hooks) { - struct KeyVal0{struct member{}} - let hooksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hooks) - if let hooksWrappedContainer = hooksWrappedContainer { - let hooksContainer = try hooksWrappedContainer.decodeIfPresent([CloudFormationClientTypes.ChangeSetHook].self, forKey: .member) - var hooksBuffer:[CloudFormationClientTypes.ChangeSetHook]? = nil - if let hooksContainer = hooksContainer { - hooksBuffer = [CloudFormationClientTypes.ChangeSetHook]() - for structureContainer0 in hooksContainer { - hooksBuffer?.append(structureContainer0) - } - } - hooks = hooksBuffer - } else { - hooks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ChangeSetNotFound": return try await ChangeSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - hooks = nil } - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeSetHooksStatus.self, forKey: .status) - status = statusDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded } } -enum DescribeChangeSetHooksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ChangeSetNotFound": return try await ChangeSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeChangeSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case changeSetName = "ChangeSetName" + case nextToken = "NextToken" + case stackName = "StackName" } -} -extension DescribeChangeSetInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let changeSetName = changeSetName { @@ -4833,78 +3787,35 @@ public struct DescribeChangeSetInput: Swift.Equatable { } } -struct DescribeChangeSetInputBody: Swift.Equatable { - let changeSetName: Swift.String? - let stackName: Swift.String? - let nextToken: Swift.String? -} - -extension DescribeChangeSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeSetName = "ChangeSetName" - case nextToken = "NextToken" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeChangeSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeChangeSetOutputBody = try responseDecoder.decode(responseBody: data) - self.capabilities = output.capabilities - self.changeSetId = output.changeSetId - self.changeSetName = output.changeSetName - self.changes = output.changes - self.creationTime = output.creationTime - self.description = output.description - self.executionStatus = output.executionStatus - self.importExistingResources = output.importExistingResources - self.includeNestedStacks = output.includeNestedStacks - self.nextToken = output.nextToken - self.notificationARNs = output.notificationARNs - self.onStackFailure = output.onStackFailure - self.parameters = output.parameters - self.parentChangeSetId = output.parentChangeSetId - self.rollbackConfiguration = output.rollbackConfiguration - self.rootChangeSetId = output.rootChangeSetId - self.stackId = output.stackId - self.stackName = output.stackName - self.status = output.status - self.statusReason = output.statusReason - self.tags = output.tags - } else { - self.capabilities = nil - self.changeSetId = nil - self.changeSetName = nil - self.changes = nil - self.creationTime = nil - self.description = nil - self.executionStatus = nil - self.importExistingResources = nil - self.includeNestedStacks = nil - self.nextToken = nil - self.notificationARNs = nil - self.onStackFailure = nil - self.parameters = nil - self.parentChangeSetId = nil - self.rollbackConfiguration = nil - self.rootChangeSetId = nil - self.stackId = nil - self.stackName = nil - self.status = nil - self.statusReason = nil - self.tags = nil +extension DescribeChangeSetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeChangeSetResult"] + var value = DescribeChangeSetOutput() + value.capabilities = try reader["Capabilities"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Capability.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.changeSetId = try reader["ChangeSetId"].readIfPresent() + value.changeSetName = try reader["ChangeSetName"].readIfPresent() + value.changes = try reader["Changes"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Change.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.creationTime = try reader["CreationTime"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + value.executionStatus = try reader["ExecutionStatus"].readIfPresent() + value.importExistingResources = try reader["ImportExistingResources"].readIfPresent() + value.includeNestedStacks = try reader["IncludeNestedStacks"].readIfPresent() + value.nextToken = try reader["NextToken"].readIfPresent() + value.notificationARNs = try reader["NotificationARNs"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.onStackFailure = try reader["OnStackFailure"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Parameter.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.parentChangeSetId = try reader["ParentChangeSetId"].readIfPresent() + value.rollbackConfiguration = try reader["RollbackConfiguration"].readIfPresent(readingClosure: CloudFormationClientTypes.RollbackConfiguration.readingClosure) + value.rootChangeSetId = try reader["RootChangeSetId"].readIfPresent() + value.stackId = try reader["StackId"].readIfPresent() + value.stackName = try reader["StackName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.statusReason = try reader["StatusReason"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5008,199 +3919,28 @@ public struct DescribeChangeSetOutput: Swift.Equatable { } } -struct DescribeChangeSetOutputBody: Swift.Equatable { - let changeSetName: Swift.String? - let changeSetId: Swift.String? - let stackId: Swift.String? - let stackName: Swift.String? - let description: Swift.String? - let parameters: [CloudFormationClientTypes.Parameter]? - let creationTime: ClientRuntime.Date? - let executionStatus: CloudFormationClientTypes.ExecutionStatus? - let status: CloudFormationClientTypes.ChangeSetStatus? - let statusReason: Swift.String? - let notificationARNs: [Swift.String]? - let rollbackConfiguration: CloudFormationClientTypes.RollbackConfiguration? - let capabilities: [CloudFormationClientTypes.Capability]? - let tags: [CloudFormationClientTypes.Tag]? - let changes: [CloudFormationClientTypes.Change]? - let nextToken: Swift.String? - let includeNestedStacks: Swift.Bool? - let parentChangeSetId: Swift.String? - let rootChangeSetId: Swift.String? - let onStackFailure: CloudFormationClientTypes.OnStackFailure? - let importExistingResources: Swift.Bool? -} - -extension DescribeChangeSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capabilities = "Capabilities" - case changeSetId = "ChangeSetId" - case changeSetName = "ChangeSetName" - case changes = "Changes" - case creationTime = "CreationTime" - case description = "Description" - case executionStatus = "ExecutionStatus" - case importExistingResources = "ImportExistingResources" - case includeNestedStacks = "IncludeNestedStacks" - case nextToken = "NextToken" - case notificationARNs = "NotificationARNs" - case onStackFailure = "OnStackFailure" - case parameters = "Parameters" - case parentChangeSetId = "ParentChangeSetId" - case rollbackConfiguration = "RollbackConfiguration" - case rootChangeSetId = "RootChangeSetId" - case stackId = "StackId" - case stackName = "StackName" - case status = "Status" - case statusReason = "StatusReason" - case tags = "Tags" - } +enum DescribeChangeSetOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeChangeSetResult")) - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - let changeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetId) - changeSetId = changeSetIdDecoded - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let executionStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ExecutionStatus.self, forKey: .executionStatus) - executionStatus = executionStatusDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeSetStatus.self, forKey: .status) - status = statusDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded - if containerValues.contains(.notificationARNs) { - struct KeyVal0{struct member{}} - let notificationARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .notificationARNs) - if let notificationARNsWrappedContainer = notificationARNsWrappedContainer { - let notificationARNsContainer = try notificationARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var notificationARNsBuffer:[Swift.String]? = nil - if let notificationARNsContainer = notificationARNsContainer { - notificationARNsBuffer = [Swift.String]() - for stringContainer0 in notificationARNsContainer { - notificationARNsBuffer?.append(stringContainer0) - } - } - notificationARNs = notificationARNsBuffer - } else { - notificationARNs = [] - } - } else { - notificationARNs = nil - } - let rollbackConfigurationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RollbackConfiguration.self, forKey: .rollbackConfiguration) - rollbackConfiguration = rollbackConfigurationDecoded - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudFormationClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudFormationClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.changes) { - struct KeyVal0{struct member{}} - let changesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .changes) - if let changesWrappedContainer = changesWrappedContainer { - let changesContainer = try changesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Change].self, forKey: .member) - var changesBuffer:[CloudFormationClientTypes.Change]? = nil - if let changesContainer = changesContainer { - changesBuffer = [CloudFormationClientTypes.Change]() - for structureContainer0 in changesContainer { - changesBuffer?.append(structureContainer0) - } - } - changes = changesBuffer - } else { - changes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ChangeSetNotFound": return try await ChangeSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - changes = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let includeNestedStacksDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeNestedStacks) - includeNestedStacks = includeNestedStacksDecoded - let parentChangeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parentChangeSetId) - parentChangeSetId = parentChangeSetIdDecoded - let rootChangeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rootChangeSetId) - rootChangeSetId = rootChangeSetIdDecoded - let onStackFailureDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.OnStackFailure.self, forKey: .onStackFailure) - onStackFailure = onStackFailureDecoded - let importExistingResourcesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .importExistingResources) - importExistingResources = importExistingResourcesDecoded } } -enum DescribeChangeSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ChangeSetNotFound": return try await ChangeSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeOrganizationsAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" } -} -extension DescribeOrganizationsAccessInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -5234,30 +3974,15 @@ public struct DescribeOrganizationsAccessInput: Swift.Equatable { } } -struct DescribeOrganizationsAccessInputBody: Swift.Equatable { - let callAs: CloudFormationClientTypes.CallAs? -} - -extension DescribeOrganizationsAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension DescribeOrganizationsAccessOutput { -extension DescribeOrganizationsAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeOrganizationsAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.status = output.status - } else { - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeOrganizationsAccessResult"] + var value = DescribeOrganizationsAccessOutput() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -5274,35 +3999,29 @@ public struct DescribeOrganizationsAccessOutput: Swift.Equatable { } } -struct DescribeOrganizationsAccessOutputBody: Swift.Equatable { - let status: CloudFormationClientTypes.OrganizationStatus? -} - -extension DescribeOrganizationsAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeOrganizationsAccessResult")) - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.OrganizationStatus.self, forKey: .status) - status = statusDecoded - } -} +enum DescribeOrganizationsAccessOutputError { -enum DescribeOrganizationsAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotFoundException": return try await OperationNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotFoundException": return try await OperationNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribePublisherInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case publisherId = "PublisherId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let publisherId = publisherId { @@ -5332,36 +4051,18 @@ public struct DescribePublisherInput: Swift.Equatable { } } -struct DescribePublisherInputBody: Swift.Equatable { - let publisherId: Swift.String? -} - -extension DescribePublisherInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publisherId = "PublisherId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - } -} +extension DescribePublisherOutput { -extension DescribePublisherOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePublisherOutputBody = try responseDecoder.decode(responseBody: data) - self.identityProvider = output.identityProvider - self.publisherId = output.publisherId - self.publisherProfile = output.publisherProfile - self.publisherStatus = output.publisherStatus - } else { - self.identityProvider = nil - self.publisherId = nil - self.publisherProfile = nil - self.publisherStatus = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribePublisherResult"] + var value = DescribePublisherOutput() + value.identityProvider = try reader["IdentityProvider"].readIfPresent() + value.publisherId = try reader["PublisherId"].readIfPresent() + value.publisherProfile = try reader["PublisherProfile"].readIfPresent() + value.publisherStatus = try reader["PublisherStatus"].readIfPresent() + return value } } } @@ -5390,46 +4091,28 @@ public struct DescribePublisherOutput: Swift.Equatable { } } -struct DescribePublisherOutputBody: Swift.Equatable { - let publisherId: Swift.String? - let publisherStatus: CloudFormationClientTypes.PublisherStatus? - let identityProvider: CloudFormationClientTypes.IdentityProvider? - let publisherProfile: Swift.String? -} - -extension DescribePublisherOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identityProvider = "IdentityProvider" - case publisherId = "PublisherId" - case publisherProfile = "PublisherProfile" - case publisherStatus = "PublisherStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribePublisherResult")) - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - let publisherStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.PublisherStatus.self, forKey: .publisherStatus) - publisherStatus = publisherStatusDecoded - let identityProviderDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.IdentityProvider.self, forKey: .identityProvider) - identityProvider = identityProviderDecoded - let publisherProfileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherProfile) - publisherProfile = publisherProfileDecoded - } -} +enum DescribePublisherOutputError { -enum DescribePublisherOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeStackDriftDetectionStatusInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case stackDriftDetectionId = "StackDriftDetectionId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let stackDriftDetectionId = stackDriftDetectionId { @@ -5460,42 +4143,21 @@ public struct DescribeStackDriftDetectionStatusInput: Swift.Equatable { } } -struct DescribeStackDriftDetectionStatusInputBody: Swift.Equatable { - let stackDriftDetectionId: Swift.String? -} - -extension DescribeStackDriftDetectionStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackDriftDetectionId = "StackDriftDetectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackDriftDetectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackDriftDetectionId) - stackDriftDetectionId = stackDriftDetectionIdDecoded - } -} +extension DescribeStackDriftDetectionStatusOutput { -extension DescribeStackDriftDetectionStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStackDriftDetectionStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.detectionStatus = output.detectionStatus - self.detectionStatusReason = output.detectionStatusReason - self.driftedStackResourceCount = output.driftedStackResourceCount - self.stackDriftDetectionId = output.stackDriftDetectionId - self.stackDriftStatus = output.stackDriftStatus - self.stackId = output.stackId - self.timestamp = output.timestamp - } else { - self.detectionStatus = nil - self.detectionStatusReason = nil - self.driftedStackResourceCount = nil - self.stackDriftDetectionId = nil - self.stackDriftStatus = nil - self.stackId = nil - self.timestamp = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStackDriftDetectionStatusResult"] + var value = DescribeStackDriftDetectionStatusOutput() + value.detectionStatus = try reader["DetectionStatus"].readIfPresent() + value.detectionStatusReason = try reader["DetectionStatusReason"].readIfPresent() + value.driftedStackResourceCount = try reader["DriftedStackResourceCount"].readIfPresent() + value.stackDriftDetectionId = try reader["StackDriftDetectionId"].readIfPresent() + value.stackDriftStatus = try reader["StackDriftStatus"].readIfPresent() + value.stackId = try reader["StackId"].readIfPresent() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -5554,57 +4216,28 @@ public struct DescribeStackDriftDetectionStatusOutput: Swift.Equatable { } } -struct DescribeStackDriftDetectionStatusOutputBody: Swift.Equatable { - let stackId: Swift.String? - let stackDriftDetectionId: Swift.String? - let stackDriftStatus: CloudFormationClientTypes.StackDriftStatus? - let detectionStatus: CloudFormationClientTypes.StackDriftDetectionStatus? - let detectionStatusReason: Swift.String? - let driftedStackResourceCount: Swift.Int? - let timestamp: ClientRuntime.Date? -} - -extension DescribeStackDriftDetectionStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case detectionStatus = "DetectionStatus" - case detectionStatusReason = "DetectionStatusReason" - case driftedStackResourceCount = "DriftedStackResourceCount" - case stackDriftDetectionId = "StackDriftDetectionId" - case stackDriftStatus = "StackDriftStatus" - case stackId = "StackId" - case timestamp = "Timestamp" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStackDriftDetectionStatusResult")) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let stackDriftDetectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackDriftDetectionId) - stackDriftDetectionId = stackDriftDetectionIdDecoded - let stackDriftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftStatus.self, forKey: .stackDriftStatus) - stackDriftStatus = stackDriftStatusDecoded - let detectionStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftDetectionStatus.self, forKey: .detectionStatus) - detectionStatus = detectionStatusDecoded - let detectionStatusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .detectionStatusReason) - detectionStatusReason = detectionStatusReasonDecoded - let driftedStackResourceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .driftedStackResourceCount) - driftedStackResourceCount = driftedStackResourceCountDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - } -} +enum DescribeStackDriftDetectionStatusOutputError { -enum DescribeStackDriftDetectionStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeStackEventsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -5649,36 +4282,16 @@ public struct DescribeStackEventsInput: Swift.Equatable { } } -struct DescribeStackEventsInputBody: Swift.Equatable { - let stackName: Swift.String? - let nextToken: Swift.String? -} - -extension DescribeStackEventsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeStackEventsOutput { -extension DescribeStackEventsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStackEventsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.stackEvents = output.stackEvents - } else { - self.nextToken = nil - self.stackEvents = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStackEventsResult"] + var value = DescribeStackEventsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.stackEvents = try reader["StackEvents"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackEvent.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5700,54 +4313,30 @@ public struct DescribeStackEventsOutput: Swift.Equatable { } } -struct DescribeStackEventsOutputBody: Swift.Equatable { - let stackEvents: [CloudFormationClientTypes.StackEvent]? - let nextToken: Swift.String? -} +enum DescribeStackEventsOutputError { -extension DescribeStackEventsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackEvents = "StackEvents" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStackEventsResult")) - if containerValues.contains(.stackEvents) { - struct KeyVal0{struct member{}} - let stackEventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackEvents) - if let stackEventsWrappedContainer = stackEventsWrappedContainer { - let stackEventsContainer = try stackEventsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackEvent].self, forKey: .member) - var stackEventsBuffer:[CloudFormationClientTypes.StackEvent]? = nil - if let stackEventsContainer = stackEventsContainer { - stackEventsBuffer = [CloudFormationClientTypes.StackEvent]() - for structureContainer0 in stackEventsContainer { - stackEventsBuffer?.append(structureContainer0) - } - } - stackEvents = stackEventsBuffer - } else { - stackEvents = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - stackEvents = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeStackEventsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeStackInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case stackInstanceAccount = "StackInstanceAccount" + case stackInstanceRegion = "StackInstanceRegion" + case stackSetName = "StackSetName" } -} -extension DescribeStackInstanceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -5805,42 +4394,15 @@ public struct DescribeStackInstanceInput: Swift.Equatable { } } -struct DescribeStackInstanceInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let stackInstanceAccount: Swift.String? - let stackInstanceRegion: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension DescribeStackInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case stackInstanceAccount = "StackInstanceAccount" - case stackInstanceRegion = "StackInstanceRegion" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let stackInstanceAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackInstanceAccount) - stackInstanceAccount = stackInstanceAccountDecoded - let stackInstanceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackInstanceRegion) - stackInstanceRegion = stackInstanceRegionDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension DescribeStackInstanceOutput { -extension DescribeStackInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStackInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.stackInstance = output.stackInstance - } else { - self.stackInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStackInstanceResult"] + var value = DescribeStackInstanceOutput() + value.stackInstance = try reader["StackInstance"].readIfPresent(readingClosure: CloudFormationClientTypes.StackInstance.readingClosure) + return value } } } @@ -5857,35 +4419,32 @@ public struct DescribeStackInstanceOutput: Swift.Equatable { } } -struct DescribeStackInstanceOutputBody: Swift.Equatable { - let stackInstance: CloudFormationClientTypes.StackInstance? -} - -extension DescribeStackInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackInstance = "StackInstance" - } +enum DescribeStackInstanceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStackInstanceResult")) - let stackInstanceDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackInstance.self, forKey: .stackInstance) - stackInstance = stackInstanceDecoded - } -} - -enum DescribeStackInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "StackInstanceNotFoundException": return try await StackInstanceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "StackInstanceNotFoundException": return try await StackInstanceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeStackResourceDriftsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" + case stackName = "StackName" + case stackResourceDriftStatusFilters = "StackResourceDriftStatusFilters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -5954,61 +4513,16 @@ public struct DescribeStackResourceDriftsInput: Swift.Equatable { } } -struct DescribeStackResourceDriftsInputBody: Swift.Equatable { - let stackName: Swift.String? - let stackResourceDriftStatusFilters: [CloudFormationClientTypes.StackResourceDriftStatus]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeStackResourceDriftsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - case stackName = "StackName" - case stackResourceDriftStatusFilters = "StackResourceDriftStatusFilters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - if containerValues.contains(.stackResourceDriftStatusFilters) { - struct KeyVal0{struct member{}} - let stackResourceDriftStatusFiltersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackResourceDriftStatusFilters) - if let stackResourceDriftStatusFiltersWrappedContainer = stackResourceDriftStatusFiltersWrappedContainer { - let stackResourceDriftStatusFiltersContainer = try stackResourceDriftStatusFiltersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackResourceDriftStatus].self, forKey: .member) - var stackResourceDriftStatusFiltersBuffer:[CloudFormationClientTypes.StackResourceDriftStatus]? = nil - if let stackResourceDriftStatusFiltersContainer = stackResourceDriftStatusFiltersContainer { - stackResourceDriftStatusFiltersBuffer = [CloudFormationClientTypes.StackResourceDriftStatus]() - for enumContainer0 in stackResourceDriftStatusFiltersContainer { - stackResourceDriftStatusFiltersBuffer?.append(enumContainer0) - } - } - stackResourceDriftStatusFilters = stackResourceDriftStatusFiltersBuffer - } else { - stackResourceDriftStatusFilters = [] - } - } else { - stackResourceDriftStatusFilters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeStackResourceDriftsOutput { -extension DescribeStackResourceDriftsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStackResourceDriftsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.stackResourceDrifts = output.stackResourceDrifts - } else { - self.nextToken = nil - self.stackResourceDrifts = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStackResourceDriftsResult"] + var value = DescribeStackResourceDriftsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.stackResourceDrifts = try reader["StackResourceDrifts"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackResourceDrift.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6030,54 +4544,28 @@ public struct DescribeStackResourceDriftsOutput: Swift.Equatable { } } -struct DescribeStackResourceDriftsOutputBody: Swift.Equatable { - let stackResourceDrifts: [CloudFormationClientTypes.StackResourceDrift]? - let nextToken: Swift.String? -} +enum DescribeStackResourceDriftsOutputError { -extension DescribeStackResourceDriftsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackResourceDrifts = "StackResourceDrifts" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStackResourceDriftsResult")) - if containerValues.contains(.stackResourceDrifts) { - struct KeyVal0{struct member{}} - let stackResourceDriftsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackResourceDrifts) - if let stackResourceDriftsWrappedContainer = stackResourceDriftsWrappedContainer { - let stackResourceDriftsContainer = try stackResourceDriftsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackResourceDrift].self, forKey: .member) - var stackResourceDriftsBuffer:[CloudFormationClientTypes.StackResourceDrift]? = nil - if let stackResourceDriftsContainer = stackResourceDriftsContainer { - stackResourceDriftsBuffer = [CloudFormationClientTypes.StackResourceDrift]() - for structureContainer0 in stackResourceDriftsContainer { - stackResourceDriftsBuffer?.append(structureContainer0) - } - } - stackResourceDrifts = stackResourceDriftsBuffer - } else { - stackResourceDrifts = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - stackResourceDrifts = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeStackResourceDriftsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeStackResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case logicalResourceId = "LogicalResourceId" + case stackName = "StackName" } -} -extension DescribeStackResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let logicalResourceId = logicalResourceId { @@ -6124,34 +4612,15 @@ public struct DescribeStackResourceInput: Swift.Equatable { } } -struct DescribeStackResourceInputBody: Swift.Equatable { - let stackName: Swift.String? - let logicalResourceId: Swift.String? -} - -extension DescribeStackResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case logicalResourceId = "LogicalResourceId" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - } -} +extension DescribeStackResourceOutput { -extension DescribeStackResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStackResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.stackResourceDetail = output.stackResourceDetail - } else { - self.stackResourceDetail = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStackResourceResult"] + var value = DescribeStackResourceOutput() + value.stackResourceDetail = try reader["StackResourceDetail"].readIfPresent(readingClosure: CloudFormationClientTypes.StackResourceDetail.readingClosure) + return value } } } @@ -6169,33 +4638,29 @@ public struct DescribeStackResourceOutput: Swift.Equatable { } } -struct DescribeStackResourceOutputBody: Swift.Equatable { - let stackResourceDetail: CloudFormationClientTypes.StackResourceDetail? -} - -extension DescribeStackResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackResourceDetail = "StackResourceDetail" - } +enum DescribeStackResourceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStackResourceResult")) - let stackResourceDetailDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDetail.self, forKey: .stackResourceDetail) - stackResourceDetail = stackResourceDetailDecoded + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } } } -enum DescribeStackResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeStackResourcesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case logicalResourceId = "LogicalResourceId" + case physicalResourceId = "PhysicalResourceId" + case stackName = "StackName" } -} -extension DescribeStackResourcesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let logicalResourceId = logicalResourceId { @@ -6247,38 +4712,15 @@ public struct DescribeStackResourcesInput: Swift.Equatable { } } -struct DescribeStackResourcesInputBody: Swift.Equatable { - let stackName: Swift.String? - let logicalResourceId: Swift.String? - let physicalResourceId: Swift.String? -} - -extension DescribeStackResourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case logicalResourceId = "LogicalResourceId" - case physicalResourceId = "PhysicalResourceId" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let physicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .physicalResourceId) - physicalResourceId = physicalResourceIdDecoded - } -} +extension DescribeStackResourcesOutput { -extension DescribeStackResourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStackResourcesOutputBody = try responseDecoder.decode(responseBody: data) - self.stackResources = output.stackResources - } else { - self.stackResources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStackResourcesResult"] + var value = DescribeStackResourcesOutput() + value.stackResources = try reader["StackResources"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackResource.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6296,50 +4738,28 @@ public struct DescribeStackResourcesOutput: Swift.Equatable { } } -struct DescribeStackResourcesOutputBody: Swift.Equatable { - let stackResources: [CloudFormationClientTypes.StackResource]? -} +enum DescribeStackResourcesOutputError { -extension DescribeStackResourcesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackResources = "StackResources" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStackResourcesResult")) - if containerValues.contains(.stackResources) { - struct KeyVal0{struct member{}} - let stackResourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackResources) - if let stackResourcesWrappedContainer = stackResourcesWrappedContainer { - let stackResourcesContainer = try stackResourcesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackResource].self, forKey: .member) - var stackResourcesBuffer:[CloudFormationClientTypes.StackResource]? = nil - if let stackResourcesContainer = stackResourcesContainer { - stackResourcesBuffer = [CloudFormationClientTypes.StackResource]() - for structureContainer0 in stackResourcesContainer { - stackResourcesBuffer?.append(structureContainer0) - } - } - stackResources = stackResourcesBuffer - } else { - stackResources = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - stackResources = nil } } } -enum DescribeStackResourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeStackSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case stackSetName = "StackSetName" } -} -extension DescribeStackSetInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -6381,27 +4801,13 @@ public struct DescribeStackSetInput: Swift.Equatable { } } -struct DescribeStackSetInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension DescribeStackSetInputBody: Swift.Decodable { +extension DescribeStackSetOperationInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case callAs = "CallAs" + case operationId = "OperationId" case stackSetName = "StackSetName" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} - -extension DescribeStackSetOperationInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -6451,38 +4857,15 @@ public struct DescribeStackSetOperationInput: Swift.Equatable { } } -struct DescribeStackSetOperationInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let operationId: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension DescribeStackSetOperationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case operationId = "OperationId" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension DescribeStackSetOperationOutput { -extension DescribeStackSetOperationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStackSetOperationOutputBody = try responseDecoder.decode(responseBody: data) - self.stackSetOperation = output.stackSetOperation - } else { - self.stackSetOperation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStackSetOperationResult"] + var value = DescribeStackSetOperationOutput() + value.stackSetOperation = try reader["StackSetOperation"].readIfPresent(readingClosure: CloudFormationClientTypes.StackSetOperation.readingClosure) + return value } } } @@ -6499,42 +4882,33 @@ public struct DescribeStackSetOperationOutput: Swift.Equatable { } } -struct DescribeStackSetOperationOutputBody: Swift.Equatable { - let stackSetOperation: CloudFormationClientTypes.StackSetOperation? -} - -extension DescribeStackSetOperationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackSetOperation = "StackSetOperation" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStackSetOperationResult")) - let stackSetOperationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperation.self, forKey: .stackSetOperation) - stackSetOperation = stackSetOperationDecoded - } -} +enum DescribeStackSetOperationOutputError { -enum DescribeStackSetOperationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OperationNotFoundException": return try await OperationNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OperationNotFoundException": return try await OperationNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension DescribeStackSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStackSetOutputBody = try responseDecoder.decode(responseBody: data) - self.stackSet = output.stackSet - } else { - self.stackSet = nil +extension DescribeStackSetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStackSetResult"] + var value = DescribeStackSetOutput() + value.stackSet = try reader["StackSet"].readIfPresent(readingClosure: CloudFormationClientTypes.StackSet.readingClosure) + return value } } } @@ -6551,34 +4925,29 @@ public struct DescribeStackSetOutput: Swift.Equatable { } } -struct DescribeStackSetOutputBody: Swift.Equatable { - let stackSet: CloudFormationClientTypes.StackSet? -} - -extension DescribeStackSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackSet = "StackSet" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStackSetResult")) - let stackSetDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSet.self, forKey: .stackSet) - stackSet = stackSetDecoded - } -} +enum DescribeStackSetOutputError { -enum DescribeStackSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeStacksInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -6623,36 +4992,16 @@ public struct DescribeStacksInput: Swift.Equatable { } } -struct DescribeStacksInputBody: Swift.Equatable { - let stackName: Swift.String? - let nextToken: Swift.String? -} - -extension DescribeStacksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeStacksOutput { -extension DescribeStacksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStacksOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.stacks = output.stacks - } else { - self.nextToken = nil - self.stacks = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStacksResult"] + var value = DescribeStacksOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.stacks = try reader["Stacks"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Stack.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6674,54 +5023,32 @@ public struct DescribeStacksOutput: Swift.Equatable { } } -struct DescribeStacksOutputBody: Swift.Equatable { - let stacks: [CloudFormationClientTypes.Stack]? - let nextToken: Swift.String? -} +enum DescribeStacksOutputError { -extension DescribeStacksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stacks = "Stacks" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStacksResult")) - if containerValues.contains(.stacks) { - struct KeyVal0{struct member{}} - let stacksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stacks) - if let stacksWrappedContainer = stacksWrappedContainer { - let stacksContainer = try stacksWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Stack].self, forKey: .member) - var stacksBuffer:[CloudFormationClientTypes.Stack]? = nil - if let stacksContainer = stacksContainer { - stacksBuffer = [CloudFormationClientTypes.Stack]() - for structureContainer0 in stacksContainer { - stacksBuffer?.append(structureContainer0) - } - } - stacks = stacksBuffer - } else { - stacks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - stacks = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeStacksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTypeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case publicVersionNumber = "PublicVersionNumber" + case publisherId = "PublisherId" + case type = "Type" + case typeName = "TypeName" + case versionId = "VersionId" } -} -extension DescribeTypeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -6786,102 +5113,41 @@ public struct DescribeTypeInput: Swift.Equatable { } } -struct DescribeTypeInputBody: Swift.Equatable { - let type: CloudFormationClientTypes.RegistryType? - let typeName: Swift.String? - let arn: Swift.String? - let versionId: Swift.String? - let publisherId: Swift.String? - let publicVersionNumber: Swift.String? -} - -extension DescribeTypeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case publicVersionNumber = "PublicVersionNumber" - case publisherId = "PublisherId" - case type = "Type" - case typeName = "TypeName" - case versionId = "VersionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - let publicVersionNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicVersionNumber) - publicVersionNumber = publicVersionNumberDecoded - } -} - -extension DescribeTypeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTypeOutputBody = try responseDecoder.decode(responseBody: data) - self.arn = output.arn - self.autoUpdate = output.autoUpdate - self.configurationSchema = output.configurationSchema - self.defaultVersionId = output.defaultVersionId - self.deprecatedStatus = output.deprecatedStatus - self.description = output.description - self.documentationUrl = output.documentationUrl - self.executionRoleArn = output.executionRoleArn - self.isActivated = output.isActivated - self.isDefaultVersion = output.isDefaultVersion - self.lastUpdated = output.lastUpdated - self.latestPublicVersion = output.latestPublicVersion - self.loggingConfig = output.loggingConfig - self.originalTypeArn = output.originalTypeArn - self.originalTypeName = output.originalTypeName - self.provisioningType = output.provisioningType - self.publicVersionNumber = output.publicVersionNumber - self.publisherId = output.publisherId - self.requiredActivatedTypes = output.requiredActivatedTypes - self.schema = output.schema - self.sourceUrl = output.sourceUrl - self.timeCreated = output.timeCreated - self.type = output.type - self.typeName = output.typeName - self.typeTestsStatus = output.typeTestsStatus - self.typeTestsStatusDescription = output.typeTestsStatusDescription - self.visibility = output.visibility - } else { - self.arn = nil - self.autoUpdate = nil - self.configurationSchema = nil - self.defaultVersionId = nil - self.deprecatedStatus = nil - self.description = nil - self.documentationUrl = nil - self.executionRoleArn = nil - self.isActivated = nil - self.isDefaultVersion = nil - self.lastUpdated = nil - self.latestPublicVersion = nil - self.loggingConfig = nil - self.originalTypeArn = nil - self.originalTypeName = nil - self.provisioningType = nil - self.publicVersionNumber = nil - self.publisherId = nil - self.requiredActivatedTypes = nil - self.schema = nil - self.sourceUrl = nil - self.timeCreated = nil - self.type = nil - self.typeName = nil - self.typeTestsStatus = nil - self.typeTestsStatusDescription = nil - self.visibility = nil +extension DescribeTypeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTypeResult"] + var value = DescribeTypeOutput() + value.arn = try reader["Arn"].readIfPresent() + value.autoUpdate = try reader["AutoUpdate"].readIfPresent() + value.configurationSchema = try reader["ConfigurationSchema"].readIfPresent() + value.defaultVersionId = try reader["DefaultVersionId"].readIfPresent() + value.deprecatedStatus = try reader["DeprecatedStatus"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.documentationUrl = try reader["DocumentationUrl"].readIfPresent() + value.executionRoleArn = try reader["ExecutionRoleArn"].readIfPresent() + value.isActivated = try reader["IsActivated"].readIfPresent() + value.isDefaultVersion = try reader["IsDefaultVersion"].readIfPresent() + value.lastUpdated = try reader["LastUpdated"].readTimestampIfPresent(format: .dateTime) + value.latestPublicVersion = try reader["LatestPublicVersion"].readIfPresent() + value.loggingConfig = try reader["LoggingConfig"].readIfPresent(readingClosure: CloudFormationClientTypes.LoggingConfig.readingClosure) + value.originalTypeArn = try reader["OriginalTypeArn"].readIfPresent() + value.originalTypeName = try reader["OriginalTypeName"].readIfPresent() + value.provisioningType = try reader["ProvisioningType"].readIfPresent() + value.publicVersionNumber = try reader["PublicVersionNumber"].readIfPresent() + value.publisherId = try reader["PublisherId"].readIfPresent() + value.requiredActivatedTypes = try reader["RequiredActivatedTypes"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.RequiredActivatedType.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.schema = try reader["Schema"].readIfPresent() + value.sourceUrl = try reader["SourceUrl"].readIfPresent() + value.timeCreated = try reader["TimeCreated"].readTimestampIfPresent(format: .dateTime) + value.type = try reader["Type"].readIfPresent() + value.typeName = try reader["TypeName"].readIfPresent() + value.typeTestsStatus = try reader["TypeTestsStatus"].readIfPresent() + value.typeTestsStatusDescription = try reader["TypeTestsStatusDescription"].readIfPresent() + value.visibility = try reader["Visibility"].readIfPresent() + return value } } } @@ -7037,156 +5303,29 @@ public struct DescribeTypeOutput: Swift.Equatable { } } -struct DescribeTypeOutputBody: Swift.Equatable { - let arn: Swift.String? - let type: CloudFormationClientTypes.RegistryType? - let typeName: Swift.String? - let defaultVersionId: Swift.String? - let isDefaultVersion: Swift.Bool? - let typeTestsStatus: CloudFormationClientTypes.TypeTestsStatus? - let typeTestsStatusDescription: Swift.String? - let description: Swift.String? - let schema: Swift.String? - let provisioningType: CloudFormationClientTypes.ProvisioningType? - let deprecatedStatus: CloudFormationClientTypes.DeprecatedStatus? - let loggingConfig: CloudFormationClientTypes.LoggingConfig? - let requiredActivatedTypes: [CloudFormationClientTypes.RequiredActivatedType]? - let executionRoleArn: Swift.String? - let visibility: CloudFormationClientTypes.Visibility? - let sourceUrl: Swift.String? - let documentationUrl: Swift.String? - let lastUpdated: ClientRuntime.Date? - let timeCreated: ClientRuntime.Date? - let configurationSchema: Swift.String? - let publisherId: Swift.String? - let originalTypeName: Swift.String? - let originalTypeArn: Swift.String? - let publicVersionNumber: Swift.String? - let latestPublicVersion: Swift.String? - let isActivated: Swift.Bool? - let autoUpdate: Swift.Bool? -} - -extension DescribeTypeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case autoUpdate = "AutoUpdate" - case configurationSchema = "ConfigurationSchema" - case defaultVersionId = "DefaultVersionId" - case deprecatedStatus = "DeprecatedStatus" - case description = "Description" - case documentationUrl = "DocumentationUrl" - case executionRoleArn = "ExecutionRoleArn" - case isActivated = "IsActivated" - case isDefaultVersion = "IsDefaultVersion" - case lastUpdated = "LastUpdated" - case latestPublicVersion = "LatestPublicVersion" - case loggingConfig = "LoggingConfig" - case originalTypeArn = "OriginalTypeArn" - case originalTypeName = "OriginalTypeName" - case provisioningType = "ProvisioningType" - case publicVersionNumber = "PublicVersionNumber" - case publisherId = "PublisherId" - case requiredActivatedTypes = "RequiredActivatedTypes" - case schema = "Schema" - case sourceUrl = "SourceUrl" - case timeCreated = "TimeCreated" - case type = "Type" - case typeName = "TypeName" - case typeTestsStatus = "TypeTestsStatus" - case typeTestsStatusDescription = "TypeTestsStatusDescription" - case visibility = "Visibility" - } +enum DescribeTypeOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTypeResult")) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let defaultVersionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultVersionId) - defaultVersionId = defaultVersionIdDecoded - let isDefaultVersionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefaultVersion) - isDefaultVersion = isDefaultVersionDecoded - let typeTestsStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.TypeTestsStatus.self, forKey: .typeTestsStatus) - typeTestsStatus = typeTestsStatusDecoded - let typeTestsStatusDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeTestsStatusDescription) - typeTestsStatusDescription = typeTestsStatusDescriptionDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let schemaDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .schema) - schema = schemaDecoded - let provisioningTypeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ProvisioningType.self, forKey: .provisioningType) - provisioningType = provisioningTypeDecoded - let deprecatedStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DeprecatedStatus.self, forKey: .deprecatedStatus) - deprecatedStatus = deprecatedStatusDecoded - let loggingConfigDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.LoggingConfig.self, forKey: .loggingConfig) - loggingConfig = loggingConfigDecoded - if containerValues.contains(.requiredActivatedTypes) { - struct KeyVal0{struct member{}} - let requiredActivatedTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .requiredActivatedTypes) - if let requiredActivatedTypesWrappedContainer = requiredActivatedTypesWrappedContainer { - let requiredActivatedTypesContainer = try requiredActivatedTypesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.RequiredActivatedType].self, forKey: .member) - var requiredActivatedTypesBuffer:[CloudFormationClientTypes.RequiredActivatedType]? = nil - if let requiredActivatedTypesContainer = requiredActivatedTypesContainer { - requiredActivatedTypesBuffer = [CloudFormationClientTypes.RequiredActivatedType]() - for structureContainer0 in requiredActivatedTypesContainer { - requiredActivatedTypesBuffer?.append(structureContainer0) - } - } - requiredActivatedTypes = requiredActivatedTypesBuffer - } else { - requiredActivatedTypes = [] - } - } else { - requiredActivatedTypes = nil - } - let executionRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .executionRoleArn) - executionRoleArn = executionRoleArnDecoded - let visibilityDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.Visibility.self, forKey: .visibility) - visibility = visibilityDecoded - let sourceUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceUrl) - sourceUrl = sourceUrlDecoded - let documentationUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .documentationUrl) - documentationUrl = documentationUrlDecoded - let lastUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdated) - lastUpdated = lastUpdatedDecoded - let timeCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timeCreated) - timeCreated = timeCreatedDecoded - let configurationSchemaDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSchema) - configurationSchema = configurationSchemaDecoded - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - let originalTypeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originalTypeName) - originalTypeName = originalTypeNameDecoded - let originalTypeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originalTypeArn) - originalTypeArn = originalTypeArnDecoded - let publicVersionNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicVersionNumber) - publicVersionNumber = publicVersionNumberDecoded - let latestPublicVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .latestPublicVersion) - latestPublicVersion = latestPublicVersionDecoded - let isActivatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isActivated) - isActivated = isActivatedDecoded - let autoUpdateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoUpdate) - autoUpdate = autoUpdateDecoded - } -} - -enum DescribeTypeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeNotFoundException": return try await TypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeNotFoundException": return try await TypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeTypeRegistrationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case registrationToken = "RegistrationToken" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let registrationToken = registrationToken { @@ -7217,36 +5356,18 @@ public struct DescribeTypeRegistrationInput: Swift.Equatable { } } -struct DescribeTypeRegistrationInputBody: Swift.Equatable { - let registrationToken: Swift.String? -} - -extension DescribeTypeRegistrationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case registrationToken = "RegistrationToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let registrationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .registrationToken) - registrationToken = registrationTokenDecoded - } -} +extension DescribeTypeRegistrationOutput { -extension DescribeTypeRegistrationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTypeRegistrationOutputBody = try responseDecoder.decode(responseBody: data) - self.description = output.description - self.progressStatus = output.progressStatus - self.typeArn = output.typeArn - self.typeVersionArn = output.typeVersionArn - } else { - self.description = nil - self.progressStatus = nil - self.typeArn = nil - self.typeVersionArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTypeRegistrationResult"] + var value = DescribeTypeRegistrationOutput() + value.description = try reader["Description"].readIfPresent() + value.progressStatus = try reader["ProgressStatus"].readIfPresent() + value.typeArn = try reader["TypeArn"].readIfPresent() + value.typeVersionArn = try reader["TypeVersionArn"].readIfPresent() + return value } } } @@ -7275,46 +5396,29 @@ public struct DescribeTypeRegistrationOutput: Swift.Equatable { } } -struct DescribeTypeRegistrationOutputBody: Swift.Equatable { - let progressStatus: CloudFormationClientTypes.RegistrationStatus? - let description: Swift.String? - let typeArn: Swift.String? - let typeVersionArn: Swift.String? -} - -extension DescribeTypeRegistrationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case progressStatus = "ProgressStatus" - case typeArn = "TypeArn" - case typeVersionArn = "TypeVersionArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTypeRegistrationResult")) - let progressStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistrationStatus.self, forKey: .progressStatus) - progressStatus = progressStatusDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let typeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeArn) - typeArn = typeArnDecoded - let typeVersionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeVersionArn) - typeVersionArn = typeVersionArnDecoded - } -} +enum DescribeTypeRegistrationOutputError { -enum DescribeTypeRegistrationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DetectStackDriftInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case logicalResourceIds = "LogicalResourceIds" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let logicalResourceIds = logicalResourceIds { @@ -7361,51 +5465,15 @@ public struct DetectStackDriftInput: Swift.Equatable { } } -struct DetectStackDriftInputBody: Swift.Equatable { - let stackName: Swift.String? - let logicalResourceIds: [Swift.String]? -} - -extension DetectStackDriftInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case logicalResourceIds = "LogicalResourceIds" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - if containerValues.contains(.logicalResourceIds) { - struct KeyVal0{struct member{}} - let logicalResourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logicalResourceIds) - if let logicalResourceIdsWrappedContainer = logicalResourceIdsWrappedContainer { - let logicalResourceIdsContainer = try logicalResourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logicalResourceIdsBuffer:[Swift.String]? = nil - if let logicalResourceIdsContainer = logicalResourceIdsContainer { - logicalResourceIdsBuffer = [Swift.String]() - for stringContainer0 in logicalResourceIdsContainer { - logicalResourceIdsBuffer?.append(stringContainer0) - } - } - logicalResourceIds = logicalResourceIdsBuffer - } else { - logicalResourceIds = [] - } - } else { - logicalResourceIds = nil - } - } -} +extension DetectStackDriftOutput { -extension DetectStackDriftOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DetectStackDriftOutputBody = try responseDecoder.decode(responseBody: data) - self.stackDriftDetectionId = output.stackDriftDetectionId - } else { - self.stackDriftDetectionId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DetectStackDriftResult"] + var value = DetectStackDriftOutput() + value.stackDriftDetectionId = try reader["StackDriftDetectionId"].readIfPresent() + return value } } } @@ -7423,33 +5491,28 @@ public struct DetectStackDriftOutput: Swift.Equatable { } } -struct DetectStackDriftOutputBody: Swift.Equatable { - let stackDriftDetectionId: Swift.String? -} - -extension DetectStackDriftOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackDriftDetectionId = "StackDriftDetectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DetectStackDriftResult")) - let stackDriftDetectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackDriftDetectionId) - stackDriftDetectionId = stackDriftDetectionIdDecoded - } -} +enum DetectStackDriftOutputError { -enum DetectStackDriftOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DetectStackResourceDriftInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case logicalResourceId = "LogicalResourceId" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let logicalResourceId = logicalResourceId { @@ -7488,34 +5551,15 @@ public struct DetectStackResourceDriftInput: Swift.Equatable { } } -struct DetectStackResourceDriftInputBody: Swift.Equatable { - let stackName: Swift.String? - let logicalResourceId: Swift.String? -} - -extension DetectStackResourceDriftInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case logicalResourceId = "LogicalResourceId" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - } -} +extension DetectStackResourceDriftOutput { -extension DetectStackResourceDriftOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DetectStackResourceDriftOutputBody = try responseDecoder.decode(responseBody: data) - self.stackResourceDrift = output.stackResourceDrift - } else { - self.stackResourceDrift = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DetectStackResourceDriftResult"] + var value = DetectStackResourceDriftOutput() + value.stackResourceDrift = try reader["StackResourceDrift"].readIfPresent(readingClosure: CloudFormationClientTypes.StackResourceDrift.readingClosure) + return value } } } @@ -7533,33 +5577,30 @@ public struct DetectStackResourceDriftOutput: Swift.Equatable { } } -struct DetectStackResourceDriftOutputBody: Swift.Equatable { - let stackResourceDrift: CloudFormationClientTypes.StackResourceDrift? -} - -extension DetectStackResourceDriftOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackResourceDrift = "StackResourceDrift" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DetectStackResourceDriftResult")) - let stackResourceDriftDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDrift.self, forKey: .stackResourceDrift) - stackResourceDrift = stackResourceDriftDecoded - } -} +enum DetectStackResourceDriftOutputError { -enum DetectStackResourceDriftOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DetectStackSetDriftInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case operationId = "OperationId" + case operationPreferences = "OperationPreferences" + case stackSetName = "StackSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -7615,42 +5656,15 @@ public struct DetectStackSetDriftInput: Swift.Equatable { } } -struct DetectStackSetDriftInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let operationPreferences: CloudFormationClientTypes.StackSetOperationPreferences? - let operationId: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension DetectStackSetDriftInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case operationId = "OperationId" - case operationPreferences = "OperationPreferences" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let operationPreferencesDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationPreferences.self, forKey: .operationPreferences) - operationPreferences = operationPreferencesDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension DetectStackSetDriftOutput { -extension DetectStackSetDriftOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DetectStackSetDriftOutputBody = try responseDecoder.decode(responseBody: data) - self.operationId = output.operationId - } else { - self.operationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DetectStackSetDriftResult"] + var value = DetectStackSetDriftOutput() + value.operationId = try reader["OperationId"].readIfPresent() + return value } } } @@ -7667,31 +5681,21 @@ public struct DetectStackSetDriftOutput: Swift.Equatable { } } -struct DetectStackSetDriftOutputBody: Swift.Equatable { - let operationId: Swift.String? -} - -extension DetectStackSetDriftOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case operationId = "OperationId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DetectStackSetDriftResult")) - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - } -} +enum DetectStackSetDriftOutputError { -enum DetectStackSetDriftOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressException": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressException": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -7732,6 +5736,12 @@ extension CloudFormationClientTypes { } extension EstimateTemplateCostInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case parameters = "Parameters" + case templateBody = "TemplateBody" + case templateURL = "TemplateURL" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let parameters = parameters { @@ -7785,55 +5795,15 @@ public struct EstimateTemplateCostInput: Swift.Equatable { } } -struct EstimateTemplateCostInputBody: Swift.Equatable { - let templateBody: Swift.String? - let templateURL: Swift.String? - let parameters: [CloudFormationClientTypes.Parameter]? -} - -extension EstimateTemplateCostInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case parameters = "Parameters" - case templateBody = "TemplateBody" - case templateURL = "TemplateURL" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - let templateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateURL) - templateURL = templateURLDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension EstimateTemplateCostOutput { -extension EstimateTemplateCostOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EstimateTemplateCostOutputBody = try responseDecoder.decode(responseBody: data) - self.url = output.url - } else { - self.url = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["EstimateTemplateCostResult"] + var value = EstimateTemplateCostOutput() + value.url = try reader["Url"].readIfPresent() + return value } } } @@ -7851,28 +5821,18 @@ public struct EstimateTemplateCostOutput: Swift.Equatable { } } -struct EstimateTemplateCostOutputBody: Swift.Equatable { - let url: Swift.String? -} - -extension EstimateTemplateCostOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case url = "Url" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("EstimateTemplateCostResult")) - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded - } -} +enum EstimateTemplateCostOutputError { -enum EstimateTemplateCostOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -7910,13 +5870,21 @@ extension CloudFormationClientTypes { } extension ExecuteChangeSetInput: Swift.Encodable { - public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let changeSetName = changeSetName { - try container.encode(changeSetName, forKey: ClientRuntime.Key("ChangeSetName")) - } - if let clientRequestToken = clientRequestToken { - try container.encode(clientRequestToken, forKey: ClientRuntime.Key("ClientRequestToken")) + enum CodingKeys: Swift.String, Swift.CodingKey { + case changeSetName = "ChangeSetName" + case clientRequestToken = "ClientRequestToken" + case disableRollback = "DisableRollback" + case retainExceptOnCreate = "RetainExceptOnCreate" + case stackName = "StackName" + } + + public func encode(to encoder: Swift.Encoder) throws { + var container = encoder.container(keyedBy: ClientRuntime.Key.self) + if let changeSetName = changeSetName { + try container.encode(changeSetName, forKey: ClientRuntime.Key("ChangeSetName")) + } + if let clientRequestToken = clientRequestToken { + try container.encode(clientRequestToken, forKey: ClientRuntime.Key("ClientRequestToken")) } if let disableRollback = disableRollback { try container.encode(disableRollback, forKey: ClientRuntime.Key("DisableRollback")) @@ -7976,40 +5944,12 @@ public struct ExecuteChangeSetInput: Swift.Equatable { } } -struct ExecuteChangeSetInputBody: Swift.Equatable { - let changeSetName: Swift.String? - let stackName: Swift.String? - let clientRequestToken: Swift.String? - let disableRollback: Swift.Bool? - let retainExceptOnCreate: Swift.Bool? -} +extension ExecuteChangeSetOutput { -extension ExecuteChangeSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeSetName = "ChangeSetName" - case clientRequestToken = "ClientRequestToken" - case disableRollback = "DisableRollback" - case retainExceptOnCreate = "RetainExceptOnCreate" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - let disableRollbackDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableRollback) - disableRollback = disableRollbackDecoded - let retainExceptOnCreateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainExceptOnCreate) - retainExceptOnCreate = retainExceptOnCreateDecoded - } -} - -extension ExecuteChangeSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ExecuteChangeSetOutput() + } } } @@ -8019,15 +5959,22 @@ public struct ExecuteChangeSetOutput: Swift.Equatable { public init() { } } -enum ExecuteChangeSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ChangeSetNotFound": return try await ChangeSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCapabilitiesException": return try await InsufficientCapabilitiesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidChangeSetStatus": return try await InvalidChangeSetStatusException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ExecuteChangeSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ChangeSetNotFound": return try await ChangeSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCapabilitiesException": return try await InsufficientCapabilitiesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidChangeSetStatus": return try await InvalidChangeSetStatusException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -8076,7 +6023,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.Export: Swift.Codable { +extension CloudFormationClientTypes.Export: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case exportingStackId = "ExportingStackId" case name = "Name" @@ -8096,14 +6043,15 @@ extension CloudFormationClientTypes.Export: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exportingStackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportingStackId) - exportingStackId = exportingStackIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.Export() + value.exportingStackId = try reader["ExportingStackId"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -8132,6 +6080,10 @@ extension CloudFormationClientTypes { } extension GetStackPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let stackName = stackName { @@ -8163,30 +6115,15 @@ public struct GetStackPolicyInput: Swift.Equatable { } } -struct GetStackPolicyInputBody: Swift.Equatable { - let stackName: Swift.String? -} +extension GetStackPolicyOutput { -extension GetStackPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - } -} - -extension GetStackPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetStackPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.stackPolicyBody = output.stackPolicyBody - } else { - self.stackPolicyBody = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetStackPolicyResult"] + var value = GetStackPolicyOutput() + value.stackPolicyBody = try reader["StackPolicyBody"].readIfPresent() + return value } } } @@ -8204,33 +6141,29 @@ public struct GetStackPolicyOutput: Swift.Equatable { } } -struct GetStackPolicyOutputBody: Swift.Equatable { - let stackPolicyBody: Swift.String? -} - -extension GetStackPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackPolicyBody = "StackPolicyBody" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetStackPolicyResult")) - let stackPolicyBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyBody) - stackPolicyBody = stackPolicyBodyDecoded - } -} +enum GetStackPolicyOutputError { -enum GetStackPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case changeSetName = "ChangeSetName" + case stackName = "StackName" + case templateStage = "TemplateStage" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let changeSetName = changeSetName { @@ -8282,40 +6215,16 @@ public struct GetTemplateInput: Swift.Equatable { } } -struct GetTemplateInputBody: Swift.Equatable { - let stackName: Swift.String? - let changeSetName: Swift.String? - let templateStage: CloudFormationClientTypes.TemplateStage? -} - -extension GetTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeSetName = "ChangeSetName" - case stackName = "StackName" - case templateStage = "TemplateStage" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let changeSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetName) - changeSetName = changeSetNameDecoded - let templateStageDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.TemplateStage.self, forKey: .templateStage) - templateStage = templateStageDecoded - } -} +extension GetTemplateOutput { -extension GetTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.stagesAvailable = output.stagesAvailable - self.templateBody = output.templateBody - } else { - self.stagesAvailable = nil - self.templateBody = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetTemplateResult"] + var value = GetTemplateOutput() + value.stagesAvailable = try reader["StagesAvailable"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.TemplateStage.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.templateBody = try reader["TemplateBody"].readIfPresent() + return value } } } @@ -8337,55 +6246,33 @@ public struct GetTemplateOutput: Swift.Equatable { } } -struct GetTemplateOutputBody: Swift.Equatable { - let templateBody: Swift.String? - let stagesAvailable: [CloudFormationClientTypes.TemplateStage]? -} +enum GetTemplateOutputError { -extension GetTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stagesAvailable = "StagesAvailable" - case templateBody = "TemplateBody" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetTemplateResult")) - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - if containerValues.contains(.stagesAvailable) { - struct KeyVal0{struct member{}} - let stagesAvailableWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stagesAvailable) - if let stagesAvailableWrappedContainer = stagesAvailableWrappedContainer { - let stagesAvailableContainer = try stagesAvailableWrappedContainer.decodeIfPresent([CloudFormationClientTypes.TemplateStage].self, forKey: .member) - var stagesAvailableBuffer:[CloudFormationClientTypes.TemplateStage]? = nil - if let stagesAvailableContainer = stagesAvailableContainer { - stagesAvailableBuffer = [CloudFormationClientTypes.TemplateStage]() - for enumContainer0 in stagesAvailableContainer { - stagesAvailableBuffer?.append(enumContainer0) - } - } - stagesAvailable = stagesAvailableBuffer - } else { - stagesAvailable = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ChangeSetNotFound": return try await ChangeSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - stagesAvailable = nil } } } -enum GetTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ChangeSetNotFound": return try await ChangeSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetTemplateSummaryInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case stackName = "StackName" + case stackSetName = "StackSetName" + case templateBody = "TemplateBody" + case templateSummaryConfig = "TemplateSummaryConfig" + case templateURL = "TemplateURL" } -} -extension GetTemplateSummaryInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -8455,68 +6342,24 @@ public struct GetTemplateSummaryInput: Swift.Equatable { } } -struct GetTemplateSummaryInputBody: Swift.Equatable { - let templateBody: Swift.String? - let templateURL: Swift.String? - let stackName: Swift.String? - let stackSetName: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? - let templateSummaryConfig: CloudFormationClientTypes.TemplateSummaryConfig? -} - -extension GetTemplateSummaryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case stackName = "StackName" - case stackSetName = "StackSetName" - case templateBody = "TemplateBody" - case templateSummaryConfig = "TemplateSummaryConfig" - case templateURL = "TemplateURL" - } +extension GetTemplateSummaryOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - let templateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateURL) - templateURL = templateURLDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - let templateSummaryConfigDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.TemplateSummaryConfig.self, forKey: .templateSummaryConfig) - templateSummaryConfig = templateSummaryConfigDecoded - } -} - -extension GetTemplateSummaryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTemplateSummaryOutputBody = try responseDecoder.decode(responseBody: data) - self.capabilities = output.capabilities - self.capabilitiesReason = output.capabilitiesReason - self.declaredTransforms = output.declaredTransforms - self.description = output.description - self.metadata = output.metadata - self.parameters = output.parameters - self.resourceIdentifierSummaries = output.resourceIdentifierSummaries - self.resourceTypes = output.resourceTypes - self.version = output.version - self.warnings = output.warnings - } else { - self.capabilities = nil - self.capabilitiesReason = nil - self.declaredTransforms = nil - self.description = nil - self.metadata = nil - self.parameters = nil - self.resourceIdentifierSummaries = nil - self.resourceTypes = nil - self.version = nil - self.warnings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetTemplateSummaryResult"] + var value = GetTemplateSummaryOutput() + value.capabilities = try reader["Capabilities"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Capability.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.capabilitiesReason = try reader["CapabilitiesReason"].readIfPresent() + value.declaredTransforms = try reader["DeclaredTransforms"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.description = try reader["Description"].readIfPresent() + value.metadata = try reader["Metadata"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.ParameterDeclaration.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.resourceIdentifierSummaries = try reader["ResourceIdentifierSummaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.ResourceIdentifierSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.resourceTypes = try reader["ResourceTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.version = try reader["Version"].readIfPresent() + value.warnings = try reader["Warnings"].readIfPresent(readingClosure: CloudFormationClientTypes.Warnings.readingClosure) + return value } } } @@ -8570,150 +6413,19 @@ public struct GetTemplateSummaryOutput: Swift.Equatable { } } -struct GetTemplateSummaryOutputBody: Swift.Equatable { - let parameters: [CloudFormationClientTypes.ParameterDeclaration]? - let description: Swift.String? - let capabilities: [CloudFormationClientTypes.Capability]? - let capabilitiesReason: Swift.String? - let resourceTypes: [Swift.String]? - let version: Swift.String? - let metadata: Swift.String? - let declaredTransforms: [Swift.String]? - let resourceIdentifierSummaries: [CloudFormationClientTypes.ResourceIdentifierSummary]? - let warnings: CloudFormationClientTypes.Warnings? -} +enum GetTemplateSummaryOutputError { -extension GetTemplateSummaryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capabilities = "Capabilities" - case capabilitiesReason = "CapabilitiesReason" - case declaredTransforms = "DeclaredTransforms" - case description = "Description" - case metadata = "Metadata" - case parameters = "Parameters" - case resourceIdentifierSummaries = "ResourceIdentifierSummaries" - case resourceTypes = "ResourceTypes" - case version = "Version" - case warnings = "Warnings" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetTemplateSummaryResult")) - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.ParameterDeclaration].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.ParameterDeclaration]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.ParameterDeclaration]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - let capabilitiesReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capabilitiesReason) - capabilitiesReason = capabilitiesReasonDecoded - if containerValues.contains(.resourceTypes) { - struct KeyVal0{struct member{}} - let resourceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTypes) - if let resourceTypesWrappedContainer = resourceTypesWrappedContainer { - let resourceTypesContainer = try resourceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceTypesBuffer:[Swift.String]? = nil - if let resourceTypesContainer = resourceTypesContainer { - resourceTypesBuffer = [Swift.String]() - for stringContainer0 in resourceTypesContainer { - resourceTypesBuffer?.append(stringContainer0) - } - } - resourceTypes = resourceTypesBuffer - } else { - resourceTypes = [] - } - } else { - resourceTypes = nil - } - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded - let metadataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metadata) - metadata = metadataDecoded - if containerValues.contains(.declaredTransforms) { - struct KeyVal0{struct member{}} - let declaredTransformsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .declaredTransforms) - if let declaredTransformsWrappedContainer = declaredTransformsWrappedContainer { - let declaredTransformsContainer = try declaredTransformsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var declaredTransformsBuffer:[Swift.String]? = nil - if let declaredTransformsContainer = declaredTransformsContainer { - declaredTransformsBuffer = [Swift.String]() - for stringContainer0 in declaredTransformsContainer { - declaredTransformsBuffer?.append(stringContainer0) - } - } - declaredTransforms = declaredTransformsBuffer - } else { - declaredTransforms = [] - } - } else { - declaredTransforms = nil - } - if containerValues.contains(.resourceIdentifierSummaries) { - struct KeyVal0{struct member{}} - let resourceIdentifierSummariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceIdentifierSummaries) - if let resourceIdentifierSummariesWrappedContainer = resourceIdentifierSummariesWrappedContainer { - let resourceIdentifierSummariesContainer = try resourceIdentifierSummariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.ResourceIdentifierSummary].self, forKey: .member) - var resourceIdentifierSummariesBuffer:[CloudFormationClientTypes.ResourceIdentifierSummary]? = nil - if let resourceIdentifierSummariesContainer = resourceIdentifierSummariesContainer { - resourceIdentifierSummariesBuffer = [CloudFormationClientTypes.ResourceIdentifierSummary]() - for structureContainer0 in resourceIdentifierSummariesContainer { - resourceIdentifierSummariesBuffer?.append(structureContainer0) - } - } - resourceIdentifierSummaries = resourceIdentifierSummariesBuffer - } else { - resourceIdentifierSummaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - resourceIdentifierSummaries = nil - } - let warningsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.Warnings.self, forKey: .warnings) - warnings = warningsDecoded - } -} - -enum GetTemplateSummaryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -8965,6 +6677,16 @@ extension CloudFormationClientTypes { } extension ImportStacksToStackSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case operationId = "OperationId" + case operationPreferences = "OperationPreferences" + case organizationalUnitIds = "OrganizationalUnitIds" + case stackIds = "StackIds" + case stackIdsUrl = "StackIdsUrl" + case stackSetName = "StackSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -9059,88 +6781,15 @@ public struct ImportStacksToStackSetInput: Swift.Equatable { } } -struct ImportStacksToStackSetInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let stackIds: [Swift.String]? - let stackIdsUrl: Swift.String? - let organizationalUnitIds: [Swift.String]? - let operationPreferences: CloudFormationClientTypes.StackSetOperationPreferences? - let operationId: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension ImportStacksToStackSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case operationId = "OperationId" - case operationPreferences = "OperationPreferences" - case organizationalUnitIds = "OrganizationalUnitIds" - case stackIds = "StackIds" - case stackIdsUrl = "StackIdsUrl" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - if containerValues.contains(.stackIds) { - struct KeyVal0{struct member{}} - let stackIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackIds) - if let stackIdsWrappedContainer = stackIdsWrappedContainer { - let stackIdsContainer = try stackIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var stackIdsBuffer:[Swift.String]? = nil - if let stackIdsContainer = stackIdsContainer { - stackIdsBuffer = [Swift.String]() - for stringContainer0 in stackIdsContainer { - stackIdsBuffer?.append(stringContainer0) - } - } - stackIds = stackIdsBuffer - } else { - stackIds = [] - } - } else { - stackIds = nil - } - let stackIdsUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackIdsUrl) - stackIdsUrl = stackIdsUrlDecoded - if containerValues.contains(.organizationalUnitIds) { - struct KeyVal0{struct member{}} - let organizationalUnitIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .organizationalUnitIds) - if let organizationalUnitIdsWrappedContainer = organizationalUnitIdsWrappedContainer { - let organizationalUnitIdsContainer = try organizationalUnitIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var organizationalUnitIdsBuffer:[Swift.String]? = nil - if let organizationalUnitIdsContainer = organizationalUnitIdsContainer { - organizationalUnitIdsBuffer = [Swift.String]() - for stringContainer0 in organizationalUnitIdsContainer { - organizationalUnitIdsBuffer?.append(stringContainer0) - } - } - organizationalUnitIds = organizationalUnitIdsBuffer - } else { - organizationalUnitIds = [] - } - } else { - organizationalUnitIds = nil - } - let operationPreferencesDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationPreferences.self, forKey: .operationPreferences) - operationPreferences = operationPreferencesDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension ImportStacksToStackSetOutput { -extension ImportStacksToStackSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ImportStacksToStackSetOutputBody = try responseDecoder.decode(responseBody: data) - self.operationId = output.operationId - } else { - self.operationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ImportStacksToStackSetResult"] + var value = ImportStacksToStackSetOutput() + value.operationId = try reader["OperationId"].readIfPresent() + return value } } } @@ -9157,50 +6806,38 @@ public struct ImportStacksToStackSetOutput: Swift.Equatable { } } -struct ImportStacksToStackSetOutputBody: Swift.Equatable { - let operationId: Swift.String? -} +enum ImportStacksToStackSetOutputError { -extension ImportStacksToStackSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case operationId = "OperationId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ImportStacksToStackSetResult")) - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - } -} - -enum ImportStacksToStackSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressException": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackNotFoundException": return try await StackNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleRequestException": return try await StaleRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressException": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackNotFoundException": return try await StackNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleRequestException": return try await StaleRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension InsufficientCapabilitiesException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientCapabilitiesException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9228,33 +6865,15 @@ public struct InsufficientCapabilitiesException: ClientRuntime.ModeledError, AWS } } -struct InsufficientCapabilitiesExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientCapabilitiesExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidChangeSetStatusException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidChangeSetStatusException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9282,33 +6901,15 @@ public struct InvalidChangeSetStatusException: ClientRuntime.ModeledError, AWSCl } } -struct InvalidChangeSetStatusExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidChangeSetStatusExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidOperationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidOperationException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9336,33 +6937,15 @@ public struct InvalidOperationException: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidOperationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidOperationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidStateTransitionException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidStateTransitionException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9390,33 +6973,15 @@ public struct InvalidStateTransitionException: ClientRuntime.ModeledError, AWSCl } } -struct InvalidStateTransitionExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidStateTransitionExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension LimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitExceededException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9444,23 +7009,12 @@ public struct LimitExceededException: ClientRuntime.ModeledError, AWSClientRunti } } -struct LimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension LimitExceededExceptionBody: Swift.Decodable { +extension ListChangeSetsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case nextToken = "NextToken" + case stackName = "StackName" } -} -extension ListChangeSetsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -9499,36 +7053,16 @@ public struct ListChangeSetsInput: Swift.Equatable { } } -struct ListChangeSetsInputBody: Swift.Equatable { - let stackName: Swift.String? - let nextToken: Swift.String? -} +extension ListChangeSetsOutput { -extension ListChangeSetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension ListChangeSetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListChangeSetsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.summaries = output.summaries - } else { - self.nextToken = nil - self.summaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListChangeSetsResult"] + var value = ListChangeSetsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.summaries = try reader["Summaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.ChangeSetSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9550,54 +7084,27 @@ public struct ListChangeSetsOutput: Swift.Equatable { } } -struct ListChangeSetsOutputBody: Swift.Equatable { - let summaries: [CloudFormationClientTypes.ChangeSetSummary]? - let nextToken: Swift.String? -} +enum ListChangeSetsOutputError { -extension ListChangeSetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case summaries = "Summaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListChangeSetsResult")) - if containerValues.contains(.summaries) { - struct KeyVal0{struct member{}} - let summariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .summaries) - if let summariesWrappedContainer = summariesWrappedContainer { - let summariesContainer = try summariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.ChangeSetSummary].self, forKey: .member) - var summariesBuffer:[CloudFormationClientTypes.ChangeSetSummary]? = nil - if let summariesContainer = summariesContainer { - summariesBuffer = [CloudFormationClientTypes.ChangeSetSummary]() - for structureContainer0 in summariesContainer { - summariesBuffer?.append(structureContainer0) - } - } - summaries = summariesBuffer - } else { - summaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - summaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListChangeSetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListExportsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" } -} -extension ListExportsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -9627,32 +7134,16 @@ public struct ListExportsInput: Swift.Equatable { } } -struct ListExportsInputBody: Swift.Equatable { - let nextToken: Swift.String? -} - -extension ListExportsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListExportsOutput { -extension ListExportsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListExportsOutputBody = try responseDecoder.decode(responseBody: data) - self.exports = output.exports - self.nextToken = output.nextToken - } else { - self.exports = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListExportsResult"] + var value = ListExportsOutput() + value.exports = try reader["Exports"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Export.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -9673,54 +7164,28 @@ public struct ListExportsOutput: Swift.Equatable { } } -struct ListExportsOutputBody: Swift.Equatable { - let exports: [CloudFormationClientTypes.Export]? - let nextToken: Swift.String? -} - -extension ListExportsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exports = "Exports" - case nextToken = "NextToken" - } +enum ListExportsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListExportsResult")) - if containerValues.contains(.exports) { - struct KeyVal0{struct member{}} - let exportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exports) - if let exportsWrappedContainer = exportsWrappedContainer { - let exportsContainer = try exportsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Export].self, forKey: .member) - var exportsBuffer:[CloudFormationClientTypes.Export]? = nil - if let exportsContainer = exportsContainer { - exportsBuffer = [CloudFormationClientTypes.Export]() - for structureContainer0 in exportsContainer { - exportsBuffer?.append(structureContainer0) - } - } - exports = exportsBuffer - } else { - exports = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - exports = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListExportsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListImportsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case exportName = "ExportName" + case nextToken = "NextToken" } -} -extension ListImportsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let exportName = exportName { @@ -9758,36 +7223,16 @@ public struct ListImportsInput: Swift.Equatable { } } -struct ListImportsInputBody: Swift.Equatable { - let exportName: Swift.String? - let nextToken: Swift.String? -} - -extension ListImportsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportName = "ExportName" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exportNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportName) - exportName = exportNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListImportsOutput { -extension ListImportsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListImportsOutputBody = try responseDecoder.decode(responseBody: data) - self.imports = output.imports - self.nextToken = output.nextToken - } else { - self.imports = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListImportsResult"] + var value = ListImportsOutput() + value.imports = try reader["Imports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -9808,54 +7253,34 @@ public struct ListImportsOutput: Swift.Equatable { } } -struct ListImportsOutputBody: Swift.Equatable { - let imports: [Swift.String]? - let nextToken: Swift.String? -} +enum ListImportsOutputError { -extension ListImportsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imports = "Imports" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListImportsResult")) - if containerValues.contains(.imports) { - struct KeyVal0{struct member{}} - let importsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .imports) - if let importsWrappedContainer = importsWrappedContainer { - let importsContainer = try importsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importsBuffer:[Swift.String]? = nil - if let importsContainer = importsContainer { - importsBuffer = [Swift.String]() - for stringContainer0 in importsContainer { - importsBuffer?.append(stringContainer0) - } - } - imports = importsBuffer - } else { - imports = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - imports = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListImportsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListStackInstanceResourceDriftsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case operationId = "OperationId" + case stackInstanceAccount = "StackInstanceAccount" + case stackInstanceRegion = "StackInstanceRegion" + case stackInstanceResourceDriftStatuses = "StackInstanceResourceDriftStatuses" + case stackSetName = "StackSetName" } -} -extension ListStackInstanceResourceDriftsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -9959,77 +7384,16 @@ public struct ListStackInstanceResourceDriftsInput: Swift.Equatable { } } -struct ListStackInstanceResourceDriftsInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let stackInstanceResourceDriftStatuses: [CloudFormationClientTypes.StackResourceDriftStatus]? - let stackInstanceAccount: Swift.String? - let stackInstanceRegion: Swift.String? - let operationId: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension ListStackInstanceResourceDriftsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case operationId = "OperationId" - case stackInstanceAccount = "StackInstanceAccount" - case stackInstanceRegion = "StackInstanceRegion" - case stackInstanceResourceDriftStatuses = "StackInstanceResourceDriftStatuses" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.stackInstanceResourceDriftStatuses) { - struct KeyVal0{struct member{}} - let stackInstanceResourceDriftStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackInstanceResourceDriftStatuses) - if let stackInstanceResourceDriftStatusesWrappedContainer = stackInstanceResourceDriftStatusesWrappedContainer { - let stackInstanceResourceDriftStatusesContainer = try stackInstanceResourceDriftStatusesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackResourceDriftStatus].self, forKey: .member) - var stackInstanceResourceDriftStatusesBuffer:[CloudFormationClientTypes.StackResourceDriftStatus]? = nil - if let stackInstanceResourceDriftStatusesContainer = stackInstanceResourceDriftStatusesContainer { - stackInstanceResourceDriftStatusesBuffer = [CloudFormationClientTypes.StackResourceDriftStatus]() - for enumContainer0 in stackInstanceResourceDriftStatusesContainer { - stackInstanceResourceDriftStatusesBuffer?.append(enumContainer0) - } - } - stackInstanceResourceDriftStatuses = stackInstanceResourceDriftStatusesBuffer - } else { - stackInstanceResourceDriftStatuses = [] - } - } else { - stackInstanceResourceDriftStatuses = nil - } - let stackInstanceAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackInstanceAccount) - stackInstanceAccount = stackInstanceAccountDecoded - let stackInstanceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackInstanceRegion) - stackInstanceRegion = stackInstanceRegionDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension ListStackInstanceResourceDriftsOutput { -extension ListStackInstanceResourceDriftsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStackInstanceResourceDriftsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.summaries = output.summaries - } else { - self.nextToken = nil - self.summaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListStackInstanceResourceDriftsResult"] + var value = ListStackInstanceResourceDriftsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.summaries = try reader["Summaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackInstanceResourceDriftsSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10050,57 +7414,36 @@ public struct ListStackInstanceResourceDriftsOutput: Swift.Equatable { } } -struct ListStackInstanceResourceDriftsOutputBody: Swift.Equatable { - let summaries: [CloudFormationClientTypes.StackInstanceResourceDriftsSummary]? - let nextToken: Swift.String? -} +enum ListStackInstanceResourceDriftsOutputError { -extension ListStackInstanceResourceDriftsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case summaries = "Summaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListStackInstanceResourceDriftsResult")) - if containerValues.contains(.summaries) { - struct KeyVal0{struct member{}} - let summariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .summaries) - if let summariesWrappedContainer = summariesWrappedContainer { - let summariesContainer = try summariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackInstanceResourceDriftsSummary].self, forKey: .member) - var summariesBuffer:[CloudFormationClientTypes.StackInstanceResourceDriftsSummary]? = nil - if let summariesContainer = summariesContainer { - summariesBuffer = [CloudFormationClientTypes.StackInstanceResourceDriftsSummary]() - for structureContainer0 in summariesContainer { - summariesBuffer?.append(structureContainer0) - } - } - summaries = summariesBuffer - } else { - summaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OperationNotFoundException": return try await OperationNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackInstanceNotFoundException": return try await StackInstanceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - summaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListStackInstanceResourceDriftsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OperationNotFoundException": return try await OperationNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackInstanceNotFoundException": return try await StackInstanceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListStackInstancesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case filters = "Filters" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case stackInstanceAccount = "StackInstanceAccount" + case stackInstanceRegion = "StackInstanceRegion" + case stackSetName = "StackSetName" } -} -extension ListStackInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -10186,73 +7529,16 @@ public struct ListStackInstancesInput: Swift.Equatable { } } -struct ListStackInstancesInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let filters: [CloudFormationClientTypes.StackInstanceFilter]? - let stackInstanceAccount: Swift.String? - let stackInstanceRegion: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension ListStackInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case filters = "Filters" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case stackInstanceAccount = "StackInstanceAccount" - case stackInstanceRegion = "StackInstanceRegion" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct member{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackInstanceFilter].self, forKey: .member) - var filtersBuffer:[CloudFormationClientTypes.StackInstanceFilter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [CloudFormationClientTypes.StackInstanceFilter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let stackInstanceAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackInstanceAccount) - stackInstanceAccount = stackInstanceAccountDecoded - let stackInstanceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackInstanceRegion) - stackInstanceRegion = stackInstanceRegionDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension ListStackInstancesOutput { -extension ListStackInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStackInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.summaries = output.summaries - } else { - self.nextToken = nil - self.summaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListStackInstancesResult"] + var value = ListStackInstancesOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.summaries = try reader["Summaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackInstanceSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10273,55 +7559,29 @@ public struct ListStackInstancesOutput: Swift.Equatable { } } -struct ListStackInstancesOutputBody: Swift.Equatable { - let summaries: [CloudFormationClientTypes.StackInstanceSummary]? - let nextToken: Swift.String? -} +enum ListStackInstancesOutputError { -extension ListStackInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case summaries = "Summaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListStackInstancesResult")) - if containerValues.contains(.summaries) { - struct KeyVal0{struct member{}} - let summariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .summaries) - if let summariesWrappedContainer = summariesWrappedContainer { - let summariesContainer = try summariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackInstanceSummary].self, forKey: .member) - var summariesBuffer:[CloudFormationClientTypes.StackInstanceSummary]? = nil - if let summariesContainer = summariesContainer { - summariesBuffer = [CloudFormationClientTypes.StackInstanceSummary]() - for structureContainer0 in summariesContainer { - summariesBuffer?.append(structureContainer0) - } - } - summaries = summariesBuffer - } else { - summaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - summaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListStackInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListStackResourcesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" + case stackName = "StackName" } -} -extension ListStackResourcesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -10367,36 +7627,16 @@ public struct ListStackResourcesInput: Swift.Equatable { } } -struct ListStackResourcesInputBody: Swift.Equatable { - let stackName: Swift.String? - let nextToken: Swift.String? -} - -extension ListStackResourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListStackResourcesOutput { -extension ListStackResourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStackResourcesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.stackResourceSummaries = output.stackResourceSummaries - } else { - self.nextToken = nil - self.stackResourceSummaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListStackResourcesResult"] + var value = ListStackResourcesOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.stackResourceSummaries = try reader["StackResourceSummaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackResourceSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10418,54 +7658,32 @@ public struct ListStackResourcesOutput: Swift.Equatable { } } -struct ListStackResourcesOutputBody: Swift.Equatable { - let stackResourceSummaries: [CloudFormationClientTypes.StackResourceSummary]? - let nextToken: Swift.String? -} +enum ListStackResourcesOutputError { -extension ListStackResourcesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackResourceSummaries = "StackResourceSummaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListStackResourcesResult")) - if containerValues.contains(.stackResourceSummaries) { - struct KeyVal0{struct member{}} - let stackResourceSummariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackResourceSummaries) - if let stackResourceSummariesWrappedContainer = stackResourceSummariesWrappedContainer { - let stackResourceSummariesContainer = try stackResourceSummariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackResourceSummary].self, forKey: .member) - var stackResourceSummariesBuffer:[CloudFormationClientTypes.StackResourceSummary]? = nil - if let stackResourceSummariesContainer = stackResourceSummariesContainer { - stackResourceSummariesBuffer = [CloudFormationClientTypes.StackResourceSummary]() - for structureContainer0 in stackResourceSummariesContainer { - stackResourceSummariesBuffer?.append(structureContainer0) - } - } - stackResourceSummaries = stackResourceSummariesBuffer - } else { - stackResourceSummaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - stackResourceSummaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListStackResourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListStackSetOperationResultsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case filters = "Filters" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case operationId = "OperationId" + case stackSetName = "StackSetName" } -} -extension ListStackSetOperationResultsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -10545,69 +7763,16 @@ public struct ListStackSetOperationResultsInput: Swift.Equatable { } } -struct ListStackSetOperationResultsInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let operationId: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let callAs: CloudFormationClientTypes.CallAs? - let filters: [CloudFormationClientTypes.OperationResultFilter]? -} - -extension ListStackSetOperationResultsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case filters = "Filters" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case operationId = "OperationId" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct member{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.OperationResultFilter].self, forKey: .member) - var filtersBuffer:[CloudFormationClientTypes.OperationResultFilter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [CloudFormationClientTypes.OperationResultFilter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension ListStackSetOperationResultsOutput { -extension ListStackSetOperationResultsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStackSetOperationResultsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.summaries = output.summaries - } else { - self.nextToken = nil - self.summaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListStackSetOperationResultsResult"] + var value = ListStackSetOperationResultsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.summaries = try reader["Summaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackSetOperationResultSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10628,56 +7793,32 @@ public struct ListStackSetOperationResultsOutput: Swift.Equatable { } } -struct ListStackSetOperationResultsOutputBody: Swift.Equatable { - let summaries: [CloudFormationClientTypes.StackSetOperationResultSummary]? - let nextToken: Swift.String? -} +enum ListStackSetOperationResultsOutputError { -extension ListStackSetOperationResultsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case summaries = "Summaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListStackSetOperationResultsResult")) - if containerValues.contains(.summaries) { - struct KeyVal0{struct member{}} - let summariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .summaries) - if let summariesWrappedContainer = summariesWrappedContainer { - let summariesContainer = try summariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackSetOperationResultSummary].self, forKey: .member) - var summariesBuffer:[CloudFormationClientTypes.StackSetOperationResultSummary]? = nil - if let summariesContainer = summariesContainer { - summariesBuffer = [CloudFormationClientTypes.StackSetOperationResultSummary]() - for structureContainer0 in summariesContainer { - summariesBuffer?.append(structureContainer0) - } - } - summaries = summariesBuffer - } else { - summaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OperationNotFoundException": return try await OperationNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - summaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListStackSetOperationResultsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OperationNotFoundException": return try await OperationNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListStackSetOperationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case stackSetName = "StackSetName" } -} -extension ListStackSetOperationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -10733,44 +7874,16 @@ public struct ListStackSetOperationsInput: Swift.Equatable { } } -struct ListStackSetOperationsInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension ListStackSetOperationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension ListStackSetOperationsOutput { -extension ListStackSetOperationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStackSetOperationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.summaries = output.summaries - } else { - self.nextToken = nil - self.summaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListStackSetOperationsResult"] + var value = ListStackSetOperationsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.summaries = try reader["Summaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackSetOperationSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10791,55 +7904,31 @@ public struct ListStackSetOperationsOutput: Swift.Equatable { } } -struct ListStackSetOperationsOutputBody: Swift.Equatable { - let summaries: [CloudFormationClientTypes.StackSetOperationSummary]? - let nextToken: Swift.String? -} +enum ListStackSetOperationsOutputError { -extension ListStackSetOperationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case summaries = "Summaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListStackSetOperationsResult")) - if containerValues.contains(.summaries) { - struct KeyVal0{struct member{}} - let summariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .summaries) - if let summariesWrappedContainer = summariesWrappedContainer { - let summariesContainer = try summariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackSetOperationSummary].self, forKey: .member) - var summariesBuffer:[CloudFormationClientTypes.StackSetOperationSummary]? = nil - if let summariesContainer = summariesContainer { - summariesBuffer = [CloudFormationClientTypes.StackSetOperationSummary]() - for structureContainer0 in summariesContainer { - summariesBuffer?.append(structureContainer0) - } - } - summaries = summariesBuffer - } else { - summaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - summaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListStackSetOperationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListStackSetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case callAs = "CallAs" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case status = "Status" } -} -extension ListStackSetsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -10894,44 +7983,16 @@ public struct ListStackSetsInput: Swift.Equatable { } } -struct ListStackSetsInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxResults: Swift.Int? - let status: CloudFormationClientTypes.StackSetStatus? - let callAs: CloudFormationClientTypes.CallAs? -} +extension ListStackSetsOutput { -extension ListStackSetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetStatus.self, forKey: .status) - status = statusDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} - -extension ListStackSetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStackSetsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.summaries = output.summaries - } else { - self.nextToken = nil - self.summaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListStackSetsResult"] + var value = ListStackSetsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.summaries = try reader["Summaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackSetSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10952,54 +8013,28 @@ public struct ListStackSetsOutput: Swift.Equatable { } } -struct ListStackSetsOutputBody: Swift.Equatable { - let summaries: [CloudFormationClientTypes.StackSetSummary]? - let nextToken: Swift.String? -} +enum ListStackSetsOutputError { -extension ListStackSetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case summaries = "Summaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListStackSetsResult")) - if containerValues.contains(.summaries) { - struct KeyVal0{struct member{}} - let summariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .summaries) - if let summariesWrappedContainer = summariesWrappedContainer { - let summariesContainer = try summariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackSetSummary].self, forKey: .member) - var summariesBuffer:[CloudFormationClientTypes.StackSetSummary]? = nil - if let summariesContainer = summariesContainer { - summariesBuffer = [CloudFormationClientTypes.StackSetSummary]() - for structureContainer0 in summariesContainer { - summariesBuffer?.append(structureContainer0) - } - } - summaries = summariesBuffer - } else { - summaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - summaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListStackSetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListStacksInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" + case stackStatusFilter = "StackStatusFilter" } -} -extension ListStacksInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -11046,53 +8081,16 @@ public struct ListStacksInput: Swift.Equatable { } } -struct ListStacksInputBody: Swift.Equatable { - let nextToken: Swift.String? - let stackStatusFilter: [CloudFormationClientTypes.StackStatus]? -} - -extension ListStacksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackStatusFilter = "StackStatusFilter" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.stackStatusFilter) { - struct KeyVal0{struct member{}} - let stackStatusFilterWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackStatusFilter) - if let stackStatusFilterWrappedContainer = stackStatusFilterWrappedContainer { - let stackStatusFilterContainer = try stackStatusFilterWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackStatus].self, forKey: .member) - var stackStatusFilterBuffer:[CloudFormationClientTypes.StackStatus]? = nil - if let stackStatusFilterContainer = stackStatusFilterContainer { - stackStatusFilterBuffer = [CloudFormationClientTypes.StackStatus]() - for enumContainer0 in stackStatusFilterContainer { - stackStatusFilterBuffer?.append(enumContainer0) - } - } - stackStatusFilter = stackStatusFilterBuffer - } else { - stackStatusFilter = [] - } - } else { - stackStatusFilter = nil - } - } -} +extension ListStacksOutput { -extension ListStacksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStacksOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.stackSummaries = output.stackSummaries - } else { - self.nextToken = nil - self.stackSummaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListStacksResult"] + var value = ListStacksOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.stackSummaries = try reader["StackSummaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.StackSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11114,54 +8112,32 @@ public struct ListStacksOutput: Swift.Equatable { } } -struct ListStacksOutputBody: Swift.Equatable { - let stackSummaries: [CloudFormationClientTypes.StackSummary]? - let nextToken: Swift.String? -} +enum ListStacksOutputError { -extension ListStacksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case stackSummaries = "StackSummaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListStacksResult")) - if containerValues.contains(.stackSummaries) { - struct KeyVal0{struct member{}} - let stackSummariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stackSummaries) - if let stackSummariesWrappedContainer = stackSummariesWrappedContainer { - let stackSummariesContainer = try stackSummariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.StackSummary].self, forKey: .member) - var stackSummariesBuffer:[CloudFormationClientTypes.StackSummary]? = nil - if let stackSummariesContainer = stackSummariesContainer { - stackSummariesBuffer = [CloudFormationClientTypes.StackSummary]() - for structureContainer0 in stackSummariesContainer { - stackSummariesBuffer?.append(structureContainer0) - } - } - stackSummaries = stackSummariesBuffer - } else { - stackSummaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - stackSummaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListStacksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTypeRegistrationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" + case registrationStatusFilter = "RegistrationStatusFilter" + case type = "Type" + case typeArn = "TypeArn" + case typeName = "TypeName" } -} -extension ListTypeRegistrationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -11212,66 +8188,30 @@ public struct ListTypeRegistrationsInput: Swift.Equatable { maxResults: Swift.Int? = nil, nextToken: Swift.String? = nil, registrationStatusFilter: CloudFormationClientTypes.RegistrationStatus? = nil, - type: CloudFormationClientTypes.RegistryType? = nil, - typeArn: Swift.String? = nil, - typeName: Swift.String? = nil - ) - { - self.maxResults = maxResults - self.nextToken = nextToken - self.registrationStatusFilter = registrationStatusFilter - self.type = type - self.typeArn = typeArn - self.typeName = typeName - } -} - -struct ListTypeRegistrationsInputBody: Swift.Equatable { - let type: CloudFormationClientTypes.RegistryType? - let typeName: Swift.String? - let typeArn: Swift.String? - let registrationStatusFilter: CloudFormationClientTypes.RegistrationStatus? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension ListTypeRegistrationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - case registrationStatusFilter = "RegistrationStatusFilter" - case type = "Type" - case typeArn = "TypeArn" - case typeName = "TypeName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let typeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeArn) - typeArn = typeArnDecoded - let registrationStatusFilterDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistrationStatus.self, forKey: .registrationStatusFilter) - registrationStatusFilter = registrationStatusFilterDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded + type: CloudFormationClientTypes.RegistryType? = nil, + typeArn: Swift.String? = nil, + typeName: Swift.String? = nil + ) + { + self.maxResults = maxResults + self.nextToken = nextToken + self.registrationStatusFilter = registrationStatusFilter + self.type = type + self.typeArn = typeArn + self.typeName = typeName } } -extension ListTypeRegistrationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTypeRegistrationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.registrationTokenList = output.registrationTokenList - } else { - self.nextToken = nil - self.registrationTokenList = nil +extension ListTypeRegistrationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTypeRegistrationsResult"] + var value = ListTypeRegistrationsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.registrationTokenList = try reader["RegistrationTokenList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11292,55 +8232,34 @@ public struct ListTypeRegistrationsOutput: Swift.Equatable { } } -struct ListTypeRegistrationsOutputBody: Swift.Equatable { - let registrationTokenList: [Swift.String]? - let nextToken: Swift.String? -} +enum ListTypeRegistrationsOutputError { -extension ListTypeRegistrationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case registrationTokenList = "RegistrationTokenList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTypeRegistrationsResult")) - if containerValues.contains(.registrationTokenList) { - struct KeyVal0{struct member{}} - let registrationTokenListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .registrationTokenList) - if let registrationTokenListWrappedContainer = registrationTokenListWrappedContainer { - let registrationTokenListContainer = try registrationTokenListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var registrationTokenListBuffer:[Swift.String]? = nil - if let registrationTokenListContainer = registrationTokenListContainer { - registrationTokenListBuffer = [Swift.String]() - for stringContainer0 in registrationTokenListContainer { - registrationTokenListBuffer?.append(stringContainer0) - } - } - registrationTokenList = registrationTokenListBuffer - } else { - registrationTokenList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - registrationTokenList = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListTypeRegistrationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTypeVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case deprecatedStatus = "DeprecatedStatus" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case publisherId = "PublisherId" + case type = "Type" + case typeName = "TypeName" } -} -extension ListTypeVersionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -11419,56 +8338,16 @@ public struct ListTypeVersionsInput: Swift.Equatable { } } -struct ListTypeVersionsInputBody: Swift.Equatable { - let type: CloudFormationClientTypes.RegistryType? - let typeName: Swift.String? - let arn: Swift.String? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let deprecatedStatus: CloudFormationClientTypes.DeprecatedStatus? - let publisherId: Swift.String? -} - -extension ListTypeVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case deprecatedStatus = "DeprecatedStatus" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case publisherId = "PublisherId" - case type = "Type" - case typeName = "TypeName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let deprecatedStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DeprecatedStatus.self, forKey: .deprecatedStatus) - deprecatedStatus = deprecatedStatusDecoded - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - } -} +extension ListTypeVersionsOutput { -extension ListTypeVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTypeVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.typeVersionSummaries = output.typeVersionSummaries - } else { - self.nextToken = nil - self.typeVersionSummaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTypeVersionsResult"] + var value = ListTypeVersionsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.typeVersionSummaries = try reader["TypeVersionSummaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.TypeVersionSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11489,55 +8368,34 @@ public struct ListTypeVersionsOutput: Swift.Equatable { } } -struct ListTypeVersionsOutputBody: Swift.Equatable { - let typeVersionSummaries: [CloudFormationClientTypes.TypeVersionSummary]? - let nextToken: Swift.String? -} +enum ListTypeVersionsOutputError { -extension ListTypeVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case typeVersionSummaries = "TypeVersionSummaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTypeVersionsResult")) - if containerValues.contains(.typeVersionSummaries) { - struct KeyVal0{struct member{}} - let typeVersionSummariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .typeVersionSummaries) - if let typeVersionSummariesWrappedContainer = typeVersionSummariesWrappedContainer { - let typeVersionSummariesContainer = try typeVersionSummariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.TypeVersionSummary].self, forKey: .member) - var typeVersionSummariesBuffer:[CloudFormationClientTypes.TypeVersionSummary]? = nil - if let typeVersionSummariesContainer = typeVersionSummariesContainer { - typeVersionSummariesBuffer = [CloudFormationClientTypes.TypeVersionSummary]() - for structureContainer0 in typeVersionSummariesContainer { - typeVersionSummariesBuffer?.append(structureContainer0) - } - } - typeVersionSummaries = typeVersionSummariesBuffer - } else { - typeVersionSummaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - typeVersionSummaries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListTypeVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTypesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deprecatedStatus = "DeprecatedStatus" + case filters = "Filters" + case maxResults = "MaxResults" + case nextToken = "NextToken" + case provisioningType = "ProvisioningType" + case type = "Type" + case visibility = "Visibility" } -} -extension ListTypesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deprecatedStatus = deprecatedStatus { @@ -11636,56 +8494,16 @@ public struct ListTypesInput: Swift.Equatable { } } -struct ListTypesInputBody: Swift.Equatable { - let visibility: CloudFormationClientTypes.Visibility? - let provisioningType: CloudFormationClientTypes.ProvisioningType? - let deprecatedStatus: CloudFormationClientTypes.DeprecatedStatus? - let type: CloudFormationClientTypes.RegistryType? - let filters: CloudFormationClientTypes.TypeFilters? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension ListTypesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deprecatedStatus = "DeprecatedStatus" - case filters = "Filters" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case provisioningType = "ProvisioningType" - case type = "Type" - case visibility = "Visibility" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let visibilityDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.Visibility.self, forKey: .visibility) - visibility = visibilityDecoded - let provisioningTypeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ProvisioningType.self, forKey: .provisioningType) - provisioningType = provisioningTypeDecoded - let deprecatedStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DeprecatedStatus.self, forKey: .deprecatedStatus) - deprecatedStatus = deprecatedStatusDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let filtersDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.TypeFilters.self, forKey: .filters) - filters = filtersDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListTypesOutput { -extension ListTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.typeSummaries = output.typeSummaries - } else { - self.nextToken = nil - self.typeSummaries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTypesResult"] + var value = ListTypesOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.typeSummaries = try reader["TypeSummaries"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.TypeSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11706,55 +8524,24 @@ public struct ListTypesOutput: Swift.Equatable { } } -struct ListTypesOutputBody: Swift.Equatable { - let typeSummaries: [CloudFormationClientTypes.TypeSummary]? - let nextToken: Swift.String? -} +enum ListTypesOutputError { -extension ListTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case typeSummaries = "TypeSummaries" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTypesResult")) - if containerValues.contains(.typeSummaries) { - struct KeyVal0{struct member{}} - let typeSummariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .typeSummaries) - if let typeSummariesWrappedContainer = typeSummariesWrappedContainer { - let typeSummariesContainer = try typeSummariesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.TypeSummary].self, forKey: .member) - var typeSummariesBuffer:[CloudFormationClientTypes.TypeSummary]? = nil - if let typeSummariesContainer = typeSummariesContainer { - typeSummariesBuffer = [CloudFormationClientTypes.TypeSummary]() - for structureContainer0 in typeSummariesContainer { - typeSummariesBuffer?.append(structureContainer0) - } - } - typeSummaries = typeSummariesBuffer - } else { - typeSummaries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - typeSummaries = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension CloudFormationClientTypes.LoggingConfig: Swift.Codable { +extension CloudFormationClientTypes.LoggingConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logGroupName = "LogGroupName" case logRoleArn = "LogRoleArn" @@ -11770,12 +8557,14 @@ extension CloudFormationClientTypes.LoggingConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logRoleArn) - logRoleArn = logRoleArnDecoded - let logGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logGroupName) - logGroupName = logGroupNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.LoggingConfig() + value.logRoleArn = try reader["LogRoleArn"].readIfPresent() + value.logGroupName = try reader["LogGroupName"].readIfPresent() + return value + } } } @@ -11801,7 +8590,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ManagedExecution: Swift.Codable { +extension CloudFormationClientTypes.ManagedExecution: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case active = "Active" } @@ -11813,10 +8602,13 @@ extension CloudFormationClientTypes.ManagedExecution: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let activeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .active) - active = activeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ManagedExecution() + value.active = try reader["Active"].readIfPresent() + return value + } } } @@ -11836,7 +8628,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ModuleInfo: Swift.Codable { +extension CloudFormationClientTypes.ModuleInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logicalIdHierarchy = "LogicalIdHierarchy" case typeHierarchy = "TypeHierarchy" @@ -11852,12 +8644,14 @@ extension CloudFormationClientTypes.ModuleInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeHierarchyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeHierarchy) - typeHierarchy = typeHierarchyDecoded - let logicalIdHierarchyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalIdHierarchy) - logicalIdHierarchy = logicalIdHierarchyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ModuleInfo() + value.typeHierarchy = try reader["TypeHierarchy"].readIfPresent() + value.logicalIdHierarchy = try reader["LogicalIdHierarchy"].readIfPresent() + return value + } } } @@ -11882,16 +8676,14 @@ extension CloudFormationClientTypes { } extension NameAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NameAlreadyExistsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11919,22 +8711,6 @@ public struct NameAlreadyExistsException: ClientRuntime.ModeledError, AWSClientR } } -struct NameAlreadyExistsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NameAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudFormationClientTypes { public enum OnFailure: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case delete @@ -12006,16 +8782,14 @@ extension CloudFormationClientTypes { } extension OperationIdAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OperationIdAlreadyExistsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12043,33 +8817,15 @@ public struct OperationIdAlreadyExistsException: ClientRuntime.ModeledError, AWS } } -struct OperationIdAlreadyExistsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension OperationIdAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension OperationInProgressException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OperationInProgressException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12097,33 +8853,15 @@ public struct OperationInProgressException: ClientRuntime.ModeledError, AWSClien } } -struct OperationInProgressExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension OperationInProgressExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension OperationNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OperationNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12151,23 +8889,7 @@ public struct OperationNotFoundException: ClientRuntime.ModeledError, AWSClientR } } -struct OperationNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension OperationNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFormationClientTypes.OperationResultFilter: Swift.Codable { +extension CloudFormationClientTypes.OperationResultFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case values = "Values" @@ -12183,12 +8905,14 @@ extension CloudFormationClientTypes.OperationResultFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.OperationResultFilterName.self, forKey: .name) - name = nameDecoded - let valuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .values) - values = valuesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.OperationResultFilter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Values"].readIfPresent() + return value + } } } @@ -12280,16 +9004,14 @@ extension CloudFormationClientTypes { } extension OperationStatusCheckFailedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OperationStatusCheckFailedException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12317,22 +9039,6 @@ public struct OperationStatusCheckFailedException: ClientRuntime.ModeledError, A } } -struct OperationStatusCheckFailedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension OperationStatusCheckFailedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudFormationClientTypes { public enum OrganizationStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case disabled @@ -12368,7 +9074,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.Output: Swift.Codable { +extension CloudFormationClientTypes.Output: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case exportName = "ExportName" @@ -12392,16 +9098,16 @@ extension CloudFormationClientTypes.Output: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let outputKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outputKey) - outputKey = outputKeyDecoded - let outputValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outputValue) - outputValue = outputValueDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let exportNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportName) - exportName = exportNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.Output() + value.outputKey = try reader["OutputKey"].readIfPresent() + value.outputValue = try reader["OutputValue"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.exportName = try reader["ExportName"].readIfPresent() + return value + } } } @@ -12433,7 +9139,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.Parameter: Swift.Codable { +extension CloudFormationClientTypes.Parameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case parameterKey = "ParameterKey" case parameterValue = "ParameterValue" @@ -12457,16 +9163,16 @@ extension CloudFormationClientTypes.Parameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterKey) - parameterKey = parameterKeyDecoded - let parameterValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterValue) - parameterValue = parameterValueDecoded - let usePreviousValueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .usePreviousValue) - usePreviousValue = usePreviousValueDecoded - let resolvedValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resolvedValue) - resolvedValue = resolvedValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.Parameter() + value.parameterKey = try reader["ParameterKey"].readIfPresent() + value.parameterValue = try reader["ParameterValue"].readIfPresent() + value.usePreviousValue = try reader["UsePreviousValue"].readIfPresent() + value.resolvedValue = try reader["ResolvedValue"].readIfPresent() + return value + } } } @@ -12498,7 +9204,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ParameterConstraints: Swift.Codable { +extension CloudFormationClientTypes.ParameterConstraints: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" } @@ -12519,26 +9225,12 @@ extension CloudFormationClientTypes.ParameterConstraints: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.allowedValues) { - struct KeyVal0{struct member{}} - let allowedValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedValues) - if let allowedValuesWrappedContainer = allowedValuesWrappedContainer { - let allowedValuesContainer = try allowedValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allowedValuesBuffer:[Swift.String]? = nil - if let allowedValuesContainer = allowedValuesContainer { - allowedValuesBuffer = [Swift.String]() - for stringContainer0 in allowedValuesContainer { - allowedValuesBuffer?.append(stringContainer0) - } - } - allowedValues = allowedValuesBuffer - } else { - allowedValues = [] - } - } else { - allowedValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ParameterConstraints() + value.allowedValues = try reader["AllowedValues"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12559,7 +9251,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ParameterDeclaration: Swift.Codable { +extension CloudFormationClientTypes.ParameterDeclaration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case description = "Description" @@ -12591,20 +9283,18 @@ extension CloudFormationClientTypes.ParameterDeclaration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterKey) - parameterKey = parameterKeyDecoded - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let parameterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterType) - parameterType = parameterTypeDecoded - let noEchoDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .noEcho) - noEcho = noEchoDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let parameterConstraintsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ParameterConstraints.self, forKey: .parameterConstraints) - parameterConstraints = parameterConstraintsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ParameterDeclaration() + value.parameterKey = try reader["ParameterKey"].readIfPresent() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.parameterType = try reader["ParameterType"].readIfPresent() + value.noEcho = try reader["NoEcho"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.parameterConstraints = try reader["ParameterConstraints"].readIfPresent(readingClosure: CloudFormationClientTypes.ParameterConstraints.readingClosure) + return value + } } } @@ -12676,7 +9366,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair: Swift.Codable { +extension CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -12692,12 +9382,14 @@ extension CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair: Swift } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -12723,7 +9415,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.PropertyDifference: Swift.Codable { +extension CloudFormationClientTypes.PropertyDifference: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actualValue = "ActualValue" case differenceType = "DifferenceType" @@ -12747,16 +9439,16 @@ extension CloudFormationClientTypes.PropertyDifference: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let propertyPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .propertyPath) - propertyPath = propertyPathDecoded - let expectedValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expectedValue) - expectedValue = expectedValueDecoded - let actualValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actualValue) - actualValue = actualValueDecoded - let differenceTypeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DifferenceType.self, forKey: .differenceType) - differenceType = differenceTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.PropertyDifference() + value.propertyPath = try reader["PropertyPath"].readIfPresent() + value.expectedValue = try reader["ExpectedValue"].readIfPresent() + value.actualValue = try reader["ActualValue"].readIfPresent() + value.differenceType = try reader["DifferenceType"].readIfPresent() + return value + } } } @@ -12834,6 +9526,13 @@ extension CloudFormationClientTypes { } extension PublishTypeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case publicVersionNumber = "PublicVersionNumber" + case type = "Type" + case typeName = "TypeName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -12884,42 +9583,15 @@ public struct PublishTypeInput: Swift.Equatable { } } -struct PublishTypeInputBody: Swift.Equatable { - let type: CloudFormationClientTypes.ThirdPartyType? - let arn: Swift.String? - let typeName: Swift.String? - let publicVersionNumber: Swift.String? -} - -extension PublishTypeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case publicVersionNumber = "PublicVersionNumber" - case type = "Type" - case typeName = "TypeName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ThirdPartyType.self, forKey: .type) - type = typeDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let publicVersionNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicVersionNumber) - publicVersionNumber = publicVersionNumberDecoded - } -} +extension PublishTypeOutput { -extension PublishTypeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PublishTypeOutputBody = try responseDecoder.decode(responseBody: data) - self.publicTypeArn = output.publicTypeArn - } else { - self.publicTypeArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PublishTypeResult"] + var value = PublishTypeOutput() + value.publicTypeArn = try reader["PublicTypeArn"].readIfPresent() + return value } } } @@ -12936,30 +9608,20 @@ public struct PublishTypeOutput: Swift.Equatable { } } -struct PublishTypeOutputBody: Swift.Equatable { - let publicTypeArn: Swift.String? -} - -extension PublishTypeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicTypeArn = "PublicTypeArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PublishTypeResult")) - let publicTypeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicTypeArn) - publicTypeArn = publicTypeArnDecoded - } -} +enum PublishTypeOutputError { -enum PublishTypeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeNotFoundException": return try await TypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeNotFoundException": return try await TypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -12997,6 +9659,16 @@ extension CloudFormationClientTypes { } extension RecordHandlerProgressInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case bearerToken = "BearerToken" + case clientRequestToken = "ClientRequestToken" + case currentOperationStatus = "CurrentOperationStatus" + case errorCode = "ErrorCode" + case operationStatus = "OperationStatus" + case resourceModel = "ResourceModel" + case statusMessage = "StatusMessage" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let bearerToken = bearerToken { @@ -13070,48 +9742,12 @@ public struct RecordHandlerProgressInput: Swift.Equatable { } } -struct RecordHandlerProgressInputBody: Swift.Equatable { - let bearerToken: Swift.String? - let operationStatus: CloudFormationClientTypes.OperationStatus? - let currentOperationStatus: CloudFormationClientTypes.OperationStatus? - let statusMessage: Swift.String? - let errorCode: CloudFormationClientTypes.HandlerErrorCode? - let resourceModel: Swift.String? - let clientRequestToken: Swift.String? -} - -extension RecordHandlerProgressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bearerToken = "BearerToken" - case clientRequestToken = "ClientRequestToken" - case currentOperationStatus = "CurrentOperationStatus" - case errorCode = "ErrorCode" - case operationStatus = "OperationStatus" - case resourceModel = "ResourceModel" - case statusMessage = "StatusMessage" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bearerTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bearerToken) - bearerToken = bearerTokenDecoded - let operationStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.OperationStatus.self, forKey: .operationStatus) - operationStatus = operationStatusDecoded - let currentOperationStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.OperationStatus.self, forKey: .currentOperationStatus) - currentOperationStatus = currentOperationStatusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let errorCodeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.HandlerErrorCode.self, forKey: .errorCode) - errorCode = errorCodeDecoded - let resourceModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceModel) - resourceModel = resourceModelDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - } -} +extension RecordHandlerProgressOutput { -extension RecordHandlerProgressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RecordHandlerProgressOutput() + } } } @@ -13120,13 +9756,20 @@ public struct RecordHandlerProgressOutput: Swift.Equatable { public init() { } } -enum RecordHandlerProgressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidStateTransition": return try await InvalidStateTransitionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConditionalCheckFailed": return try await OperationStatusCheckFailedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RecordHandlerProgressOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidStateTransition": return try await InvalidStateTransitionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConditionalCheckFailed": return try await OperationStatusCheckFailedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -13164,6 +9807,11 @@ extension CloudFormationClientTypes { } extension RegisterPublisherInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case acceptTermsAndConditions = "AcceptTermsAndConditions" + case connectionArn = "ConnectionArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let acceptTermsAndConditions = acceptTermsAndConditions { @@ -13200,34 +9848,15 @@ public struct RegisterPublisherInput: Swift.Equatable { } } -struct RegisterPublisherInputBody: Swift.Equatable { - let acceptTermsAndConditions: Swift.Bool? - let connectionArn: Swift.String? -} - -extension RegisterPublisherInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acceptTermsAndConditions = "AcceptTermsAndConditions" - case connectionArn = "ConnectionArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let acceptTermsAndConditionsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .acceptTermsAndConditions) - acceptTermsAndConditions = acceptTermsAndConditionsDecoded - let connectionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionArn) - connectionArn = connectionArnDecoded - } -} +extension RegisterPublisherOutput { -extension RegisterPublisherOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RegisterPublisherOutputBody = try responseDecoder.decode(responseBody: data) - self.publisherId = output.publisherId - } else { - self.publisherId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RegisterPublisherResult"] + var value = RegisterPublisherOutput() + value.publisherId = try reader["PublisherId"].readIfPresent() + return value } } } @@ -13244,34 +9873,33 @@ public struct RegisterPublisherOutput: Swift.Equatable { } } -struct RegisterPublisherOutputBody: Swift.Equatable { - let publisherId: Swift.String? -} - -extension RegisterPublisherOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publisherId = "PublisherId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RegisterPublisherResult")) - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - } -} +enum RegisterPublisherOutputError { -enum RegisterPublisherOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RegisterTypeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientRequestToken = "ClientRequestToken" + case executionRoleArn = "ExecutionRoleArn" + case loggingConfig = "LoggingConfig" + case schemaHandlerPackage = "SchemaHandlerPackage" + case type = "Type" + case typeName = "TypeName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clientRequestToken = clientRequestToken { @@ -13359,50 +9987,15 @@ public struct RegisterTypeInput: Swift.Equatable { } } -struct RegisterTypeInputBody: Swift.Equatable { - let type: CloudFormationClientTypes.RegistryType? - let typeName: Swift.String? - let schemaHandlerPackage: Swift.String? - let loggingConfig: CloudFormationClientTypes.LoggingConfig? - let executionRoleArn: Swift.String? - let clientRequestToken: Swift.String? -} - -extension RegisterTypeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRequestToken = "ClientRequestToken" - case executionRoleArn = "ExecutionRoleArn" - case loggingConfig = "LoggingConfig" - case schemaHandlerPackage = "SchemaHandlerPackage" - case type = "Type" - case typeName = "TypeName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let schemaHandlerPackageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .schemaHandlerPackage) - schemaHandlerPackage = schemaHandlerPackageDecoded - let loggingConfigDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.LoggingConfig.self, forKey: .loggingConfig) - loggingConfig = loggingConfigDecoded - let executionRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .executionRoleArn) - executionRoleArn = executionRoleArnDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - } -} +extension RegisterTypeOutput { -extension RegisterTypeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RegisterTypeOutputBody = try responseDecoder.decode(responseBody: data) - self.registrationToken = output.registrationToken - } else { - self.registrationToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RegisterTypeResult"] + var value = RegisterTypeOutput() + value.registrationToken = try reader["RegistrationToken"].readIfPresent() + return value } } } @@ -13419,29 +10012,19 @@ public struct RegisterTypeOutput: Swift.Equatable { } } -struct RegisterTypeOutputBody: Swift.Equatable { - let registrationToken: Swift.String? -} - -extension RegisterTypeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case registrationToken = "RegistrationToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RegisterTypeResult")) - let registrationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .registrationToken) - registrationToken = registrationTokenDecoded - } -} +enum RegisterTypeOutputError { -enum RegisterTypeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -13551,7 +10134,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.RequiredActivatedType: Swift.Codable { +extension CloudFormationClientTypes.RequiredActivatedType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case originalTypeName = "OriginalTypeName" case publisherId = "PublisherId" @@ -13584,32 +10167,15 @@ extension CloudFormationClientTypes.RequiredActivatedType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeNameAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeNameAlias) - typeNameAlias = typeNameAliasDecoded - let originalTypeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originalTypeName) - originalTypeName = originalTypeNameDecoded - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - if containerValues.contains(.supportedMajorVersions) { - struct KeyVal0{struct member{}} - let supportedMajorVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedMajorVersions) - if let supportedMajorVersionsWrappedContainer = supportedMajorVersionsWrappedContainer { - let supportedMajorVersionsContainer = try supportedMajorVersionsWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var supportedMajorVersionsBuffer:[Swift.Int]? = nil - if let supportedMajorVersionsContainer = supportedMajorVersionsContainer { - supportedMajorVersionsBuffer = [Swift.Int]() - for integerContainer0 in supportedMajorVersionsContainer { - supportedMajorVersionsBuffer?.append(integerContainer0) - } - } - supportedMajorVersions = supportedMajorVersionsBuffer - } else { - supportedMajorVersions = [] - } - } else { - supportedMajorVersions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.RequiredActivatedType() + value.typeNameAlias = try reader["TypeNameAlias"].readIfPresent() + value.originalTypeName = try reader["OriginalTypeName"].readIfPresent() + value.publisherId = try reader["PublisherId"].readIfPresent() + value.supportedMajorVersions = try reader["SupportedMajorVersions"].readListIfPresent(memberReadingClosure: Swift.Int.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13724,7 +10290,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.ResourceChange: Swift.Codable { +extension CloudFormationClientTypes.ResourceChange: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case action = "Action" case changeSetId = "ChangeSetId" @@ -13784,62 +10350,23 @@ extension CloudFormationClientTypes.ResourceChange: Swift.Codable { try scopeContainer.encode("", forKey: ClientRuntime.Key("")) } } - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeAction.self, forKey: .action) - action = actionDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let physicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .physicalResourceId) - physicalResourceId = physicalResourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let replacementDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.Replacement.self, forKey: .replacement) - replacement = replacementDecoded - if containerValues.contains(.scope) { - struct KeyVal0{struct member{}} - let scopeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scope) - if let scopeWrappedContainer = scopeWrappedContainer { - let scopeContainer = try scopeWrappedContainer.decodeIfPresent([CloudFormationClientTypes.ResourceAttribute].self, forKey: .member) - var scopeBuffer:[CloudFormationClientTypes.ResourceAttribute]? = nil - if let scopeContainer = scopeContainer { - scopeBuffer = [CloudFormationClientTypes.ResourceAttribute]() - for enumContainer0 in scopeContainer { - scopeBuffer?.append(enumContainer0) - } - } - scope = scopeBuffer - } else { - scope = [] - } - } else { - scope = nil - } - if containerValues.contains(.details) { - struct KeyVal0{struct member{}} - let detailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .details) - if let detailsWrappedContainer = detailsWrappedContainer { - let detailsContainer = try detailsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.ResourceChangeDetail].self, forKey: .member) - var detailsBuffer:[CloudFormationClientTypes.ResourceChangeDetail]? = nil - if let detailsContainer = detailsContainer { - detailsBuffer = [CloudFormationClientTypes.ResourceChangeDetail]() - for structureContainer0 in detailsContainer { - detailsBuffer?.append(structureContainer0) - } - } - details = detailsBuffer - } else { - details = [] - } - } else { - details = nil + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ResourceChange() + value.action = try reader["Action"].readIfPresent() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.physicalResourceId = try reader["PhysicalResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.replacement = try reader["Replacement"].readIfPresent() + value.scope = try reader["Scope"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.ResourceAttribute.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.details = try reader["Details"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.ResourceChangeDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.changeSetId = try reader["ChangeSetId"].readIfPresent() + value.moduleInfo = try reader["ModuleInfo"].readIfPresent(readingClosure: CloudFormationClientTypes.ModuleInfo.readingClosure) + return value } - let changeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetId) - changeSetId = changeSetIdDecoded - let moduleInfoDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ModuleInfo.self, forKey: .moduleInfo) - moduleInfo = moduleInfoDecoded } } @@ -13891,7 +10418,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ResourceChangeDetail: Swift.Codable { +extension CloudFormationClientTypes.ResourceChangeDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case causingEntity = "CausingEntity" case changeSource = "ChangeSource" @@ -13915,16 +10442,16 @@ extension CloudFormationClientTypes.ResourceChangeDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ResourceTargetDefinition.self, forKey: .target) - target = targetDecoded - let evaluationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.EvaluationType.self, forKey: .evaluation) - evaluation = evaluationDecoded - let changeSourceDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ChangeSource.self, forKey: .changeSource) - changeSource = changeSourceDecoded - let causingEntityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .causingEntity) - causingEntity = causingEntityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ResourceChangeDetail() + value.target = try reader["Target"].readIfPresent(readingClosure: CloudFormationClientTypes.ResourceTargetDefinition.readingClosure) + value.evaluation = try reader["Evaluation"].readIfPresent() + value.changeSource = try reader["ChangeSource"].readIfPresent() + value.causingEntity = try reader["CausingEntity"].readIfPresent() + return value + } } } @@ -13966,7 +10493,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ResourceIdentifierSummary: Swift.Codable { +extension CloudFormationClientTypes.ResourceIdentifierSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logicalResourceIds = "LogicalResourceIds" case resourceIdentifiers = "ResourceIdentifiers" @@ -14004,47 +10531,14 @@ extension CloudFormationClientTypes.ResourceIdentifierSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - if containerValues.contains(.logicalResourceIds) { - struct KeyVal0{struct member{}} - let logicalResourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logicalResourceIds) - if let logicalResourceIdsWrappedContainer = logicalResourceIdsWrappedContainer { - let logicalResourceIdsContainer = try logicalResourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logicalResourceIdsBuffer:[Swift.String]? = nil - if let logicalResourceIdsContainer = logicalResourceIdsContainer { - logicalResourceIdsBuffer = [Swift.String]() - for stringContainer0 in logicalResourceIdsContainer { - logicalResourceIdsBuffer?.append(stringContainer0) - } - } - logicalResourceIds = logicalResourceIdsBuffer - } else { - logicalResourceIds = [] - } - } else { - logicalResourceIds = nil - } - if containerValues.contains(.resourceIdentifiers) { - struct KeyVal0{struct member{}} - let resourceIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceIdentifiers) - if let resourceIdentifiersWrappedContainer = resourceIdentifiersWrappedContainer { - let resourceIdentifiersContainer = try resourceIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceIdentifiersBuffer:[Swift.String]? = nil - if let resourceIdentifiersContainer = resourceIdentifiersContainer { - resourceIdentifiersBuffer = [Swift.String]() - for stringContainer0 in resourceIdentifiersContainer { - resourceIdentifiersBuffer?.append(stringContainer0) - } - } - resourceIdentifiers = resourceIdentifiersBuffer - } else { - resourceIdentifiers = [] - } - } else { - resourceIdentifiers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ResourceIdentifierSummary() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.logicalResourceIds = try reader["LogicalResourceIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.resourceIdentifiers = try reader["ResourceIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14197,7 +10691,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.ResourceTargetDefinition: Swift.Codable { +extension CloudFormationClientTypes.ResourceTargetDefinition: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attribute = "Attribute" case name = "Name" @@ -14217,14 +10711,15 @@ extension CloudFormationClientTypes.ResourceTargetDefinition: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ResourceAttribute.self, forKey: .attribute) - attribute = attributeDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let requiresRecreationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RequiresRecreation.self, forKey: .requiresRecreation) - requiresRecreation = requiresRecreationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ResourceTargetDefinition() + value.attribute = try reader["Attribute"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.requiresRecreation = try reader["RequiresRecreation"].readIfPresent() + return value + } } } @@ -14252,7 +10747,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.ResourceToImport: Swift.Codable { +extension CloudFormationClientTypes.ResourceToImport: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logicalResourceId = "LogicalResourceId" case resourceIdentifier = "ResourceIdentifier" @@ -14281,30 +10776,14 @@ extension CloudFormationClientTypes.ResourceToImport: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - if containerValues.contains(.resourceIdentifier) { - struct KeyVal0{struct key{}; struct value{}} - let resourceIdentifierWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .resourceIdentifier) - if let resourceIdentifierWrappedContainer = resourceIdentifierWrappedContainer { - let resourceIdentifierContainer = try resourceIdentifierWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var resourceIdentifierBuffer: [Swift.String:Swift.String]? = nil - if let resourceIdentifierContainer = resourceIdentifierContainer { - resourceIdentifierBuffer = [Swift.String:Swift.String]() - for stringContainer0 in resourceIdentifierContainer { - resourceIdentifierBuffer?[stringContainer0.key] = stringContainer0.value - } - } - resourceIdentifier = resourceIdentifierBuffer - } else { - resourceIdentifier = [:] - } - } else { - resourceIdentifier = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.ResourceToImport() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.resourceIdentifier = try reader["ResourceIdentifier"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -14336,7 +10815,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.RollbackConfiguration: Swift.Codable { +extension CloudFormationClientTypes.RollbackConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case monitoringTimeInMinutes = "MonitoringTimeInMinutes" case rollbackTriggers = "RollbackTriggers" @@ -14361,29 +10840,14 @@ extension CloudFormationClientTypes.RollbackConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.rollbackTriggers) { - struct KeyVal0{struct member{}} - let rollbackTriggersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rollbackTriggers) - if let rollbackTriggersWrappedContainer = rollbackTriggersWrappedContainer { - let rollbackTriggersContainer = try rollbackTriggersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.RollbackTrigger].self, forKey: .member) - var rollbackTriggersBuffer:[CloudFormationClientTypes.RollbackTrigger]? = nil - if let rollbackTriggersContainer = rollbackTriggersContainer { - rollbackTriggersBuffer = [CloudFormationClientTypes.RollbackTrigger]() - for structureContainer0 in rollbackTriggersContainer { - rollbackTriggersBuffer?.append(structureContainer0) - } - } - rollbackTriggers = rollbackTriggersBuffer - } else { - rollbackTriggers = [] - } - } else { - rollbackTriggers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.RollbackConfiguration() + value.rollbackTriggers = try reader["RollbackTriggers"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.RollbackTrigger.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.monitoringTimeInMinutes = try reader["MonitoringTimeInMinutes"].readIfPresent() + return value } - let monitoringTimeInMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringTimeInMinutes) - monitoringTimeInMinutes = monitoringTimeInMinutesDecoded } } @@ -14417,6 +10881,13 @@ extension CloudFormationClientTypes { } extension RollbackStackInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientRequestToken = "ClientRequestToken" + case retainExceptOnCreate = "RetainExceptOnCreate" + case roleARN = "RoleARN" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clientRequestToken = clientRequestToken { @@ -14468,42 +10939,15 @@ public struct RollbackStackInput: Swift.Equatable { } } -struct RollbackStackInputBody: Swift.Equatable { - let stackName: Swift.String? - let roleARN: Swift.String? - let clientRequestToken: Swift.String? - let retainExceptOnCreate: Swift.Bool? -} - -extension RollbackStackInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRequestToken = "ClientRequestToken" - case retainExceptOnCreate = "RetainExceptOnCreate" - case roleARN = "RoleARN" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - let retainExceptOnCreateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainExceptOnCreate) - retainExceptOnCreate = retainExceptOnCreateDecoded - } -} +extension RollbackStackOutput { -extension RollbackStackOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RollbackStackOutputBody = try responseDecoder.decode(responseBody: data) - self.stackId = output.stackId - } else { - self.stackId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RollbackStackResult"] + var value = RollbackStackOutput() + value.stackId = try reader["StackId"].readIfPresent() + return value } } } @@ -14520,34 +10964,24 @@ public struct RollbackStackOutput: Swift.Equatable { } } -struct RollbackStackOutputBody: Swift.Equatable { - let stackId: Swift.String? -} - -extension RollbackStackOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackId = "StackId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RollbackStackResult")) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - } -} +enum RollbackStackOutputError { -enum RollbackStackOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CloudFormationClientTypes.RollbackTrigger: Swift.Codable { +extension CloudFormationClientTypes.RollbackTrigger: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case type = "Type" @@ -14563,12 +10997,14 @@ extension CloudFormationClientTypes.RollbackTrigger: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.RollbackTrigger() + value.arn = try reader["Arn"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + return value + } } } @@ -14595,6 +11031,12 @@ extension CloudFormationClientTypes { } extension SetStackPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case stackName = "StackName" + case stackPolicyBody = "StackPolicyBody" + case stackPolicyURL = "StackPolicyURL" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let stackName = stackName { @@ -14640,32 +11082,12 @@ public struct SetStackPolicyInput: Swift.Equatable { } } -struct SetStackPolicyInputBody: Swift.Equatable { - let stackName: Swift.String? - let stackPolicyBody: Swift.String? - let stackPolicyURL: Swift.String? -} - -extension SetStackPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackName = "StackName" - case stackPolicyBody = "StackPolicyBody" - case stackPolicyURL = "StackPolicyURL" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let stackPolicyBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyBody) - stackPolicyBody = stackPolicyBodyDecoded - let stackPolicyURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyURL) - stackPolicyURL = stackPolicyURLDecoded - } -} +extension SetStackPolicyOutput { -extension SetStackPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetStackPolicyOutput() + } } } @@ -14674,16 +11096,31 @@ public struct SetStackPolicyOutput: Swift.Equatable { public init() { } } -enum SetStackPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetStackPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetTypeConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configuration = "Configuration" + case configurationAlias = "ConfigurationAlias" + case type = "Type" + case typeArn = "TypeArn" + case typeName = "TypeName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configuration = configuration { @@ -14742,46 +11179,15 @@ public struct SetTypeConfigurationInput: Swift.Equatable { } } -struct SetTypeConfigurationInputBody: Swift.Equatable { - let typeArn: Swift.String? - let configuration: Swift.String? - let configurationAlias: Swift.String? - let typeName: Swift.String? - let type: CloudFormationClientTypes.ThirdPartyType? -} - -extension SetTypeConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configuration = "Configuration" - case configurationAlias = "ConfigurationAlias" - case type = "Type" - case typeArn = "TypeArn" - case typeName = "TypeName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeArn) - typeArn = typeArnDecoded - let configurationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configuration) - configuration = configurationDecoded - let configurationAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationAlias) - configurationAlias = configurationAliasDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ThirdPartyType.self, forKey: .type) - type = typeDecoded - } -} +extension SetTypeConfigurationOutput { -extension SetTypeConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SetTypeConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.configurationArn = output.configurationArn - } else { - self.configurationArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SetTypeConfigurationResult"] + var value = SetTypeConfigurationOutput() + value.configurationArn = try reader["ConfigurationArn"].readIfPresent() + return value } } } @@ -14798,35 +11204,32 @@ public struct SetTypeConfigurationOutput: Swift.Equatable { } } -struct SetTypeConfigurationOutputBody: Swift.Equatable { - let configurationArn: Swift.String? -} - -extension SetTypeConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationArn = "ConfigurationArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SetTypeConfigurationResult")) - let configurationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationArn) - configurationArn = configurationArnDecoded - } -} +enum SetTypeConfigurationOutputError { -enum SetTypeConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeNotFoundException": return try await TypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeNotFoundException": return try await TypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetTypeDefaultVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case type = "Type" + case typeName = "TypeName" + case versionId = "VersionId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -14877,36 +11280,12 @@ public struct SetTypeDefaultVersionInput: Swift.Equatable { } } -struct SetTypeDefaultVersionInputBody: Swift.Equatable { - let arn: Swift.String? - let type: CloudFormationClientTypes.RegistryType? - let typeName: Swift.String? - let versionId: Swift.String? -} - -extension SetTypeDefaultVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case type = "Type" - case typeName = "TypeName" - case versionId = "VersionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - } -} +extension SetTypeDefaultVersionOutput { -extension SetTypeDefaultVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetTypeDefaultVersionOutput() + } } } @@ -14915,18 +11294,32 @@ public struct SetTypeDefaultVersionOutput: Swift.Equatable { public init() { } } -enum SetTypeDefaultVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeNotFoundException": return try await TypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetTypeDefaultVersionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeNotFoundException": return try await TypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SignalResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case logicalResourceId = "LogicalResourceId" + case stackName = "StackName" + case status = "Status" + case uniqueId = "UniqueId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let logicalResourceId = logicalResourceId { @@ -14982,36 +11375,12 @@ public struct SignalResourceInput: Swift.Equatable { } } -struct SignalResourceInputBody: Swift.Equatable { - let stackName: Swift.String? - let logicalResourceId: Swift.String? - let uniqueId: Swift.String? - let status: CloudFormationClientTypes.ResourceSignalStatus? -} - -extension SignalResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case logicalResourceId = "LogicalResourceId" - case stackName = "StackName" - case status = "Status" - case uniqueId = "UniqueId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let uniqueIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uniqueId) - uniqueId = uniqueIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ResourceSignalStatus.self, forKey: .status) - status = statusDecoded - } -} +extension SignalResourceOutput { -extension SignalResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SignalResourceOutput() + } } } @@ -15020,16 +11389,23 @@ public struct SignalResourceOutput: Swift.Equatable { public init() { } } -enum SignalResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SignalResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CloudFormationClientTypes.Stack: Swift.Codable { +extension CloudFormationClientTypes.Stack: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case capabilities = "Capabilities" case changeSetId = "ChangeSetId" @@ -15174,139 +11550,35 @@ extension CloudFormationClientTypes.Stack: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let changeSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSetId) - changeSetId = changeSetIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let deletionTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deletionTime) - deletionTime = deletionTimeDecoded - let lastUpdatedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdatedTime) - lastUpdatedTime = lastUpdatedTimeDecoded - let rollbackConfigurationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RollbackConfiguration.self, forKey: .rollbackConfiguration) - rollbackConfiguration = rollbackConfigurationDecoded - let stackStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackStatus.self, forKey: .stackStatus) - stackStatus = stackStatusDecoded - let stackStatusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackStatusReason) - stackStatusReason = stackStatusReasonDecoded - let disableRollbackDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableRollback) - disableRollback = disableRollbackDecoded - if containerValues.contains(.notificationARNs) { - struct KeyVal0{struct member{}} - let notificationARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .notificationARNs) - if let notificationARNsWrappedContainer = notificationARNsWrappedContainer { - let notificationARNsContainer = try notificationARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var notificationARNsBuffer:[Swift.String]? = nil - if let notificationARNsContainer = notificationARNsContainer { - notificationARNsBuffer = [Swift.String]() - for stringContainer0 in notificationARNsContainer { - notificationARNsBuffer?.append(stringContainer0) - } - } - notificationARNs = notificationARNsBuffer - } else { - notificationARNs = [] - } - } else { - notificationARNs = nil - } - let timeoutInMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .timeoutInMinutes) - timeoutInMinutes = timeoutInMinutesDecoded - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - if containerValues.contains(.outputs) { - struct KeyVal0{struct member{}} - let outputsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .outputs) - if let outputsWrappedContainer = outputsWrappedContainer { - let outputsContainer = try outputsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Output].self, forKey: .member) - var outputsBuffer:[CloudFormationClientTypes.Output]? = nil - if let outputsContainer = outputsContainer { - outputsBuffer = [CloudFormationClientTypes.Output]() - for structureContainer0 in outputsContainer { - outputsBuffer?.append(structureContainer0) - } - } - outputs = outputsBuffer - } else { - outputs = [] - } - } else { - outputs = nil - } - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudFormationClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudFormationClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.Stack() + value.stackId = try reader["StackId"].readIfPresent() + value.stackName = try reader["StackName"].readIfPresent() + value.changeSetId = try reader["ChangeSetId"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Parameter.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.creationTime = try reader["CreationTime"].readTimestampIfPresent(format: .dateTime) + value.deletionTime = try reader["DeletionTime"].readTimestampIfPresent(format: .dateTime) + value.lastUpdatedTime = try reader["LastUpdatedTime"].readTimestampIfPresent(format: .dateTime) + value.rollbackConfiguration = try reader["RollbackConfiguration"].readIfPresent(readingClosure: CloudFormationClientTypes.RollbackConfiguration.readingClosure) + value.stackStatus = try reader["StackStatus"].readIfPresent() + value.stackStatusReason = try reader["StackStatusReason"].readIfPresent() + value.disableRollback = try reader["DisableRollback"].readIfPresent() + value.notificationARNs = try reader["NotificationARNs"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.timeoutInMinutes = try reader["TimeoutInMinutes"].readIfPresent() + value.capabilities = try reader["Capabilities"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Capability.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.outputs = try reader["Outputs"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Output.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.roleARN = try reader["RoleARN"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.enableTerminationProtection = try reader["EnableTerminationProtection"].readIfPresent() + value.parentId = try reader["ParentId"].readIfPresent() + value.rootId = try reader["RootId"].readIfPresent() + value.driftInformation = try reader["DriftInformation"].readIfPresent(readingClosure: CloudFormationClientTypes.StackDriftInformation.readingClosure) + value.retainExceptOnCreate = try reader["RetainExceptOnCreate"].readIfPresent() + return value } - let enableTerminationProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableTerminationProtection) - enableTerminationProtection = enableTerminationProtectionDecoded - let parentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parentId) - parentId = parentIdDecoded - let rootIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rootId) - rootId = rootIdDecoded - let driftInformationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftInformation.self, forKey: .driftInformation) - driftInformation = driftInformationDecoded - let retainExceptOnCreateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainExceptOnCreate) - retainExceptOnCreate = retainExceptOnCreateDecoded } } @@ -15456,7 +11728,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackDriftInformation: Swift.Codable { +extension CloudFormationClientTypes.StackDriftInformation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastCheckTimestamp = "LastCheckTimestamp" case stackDriftStatus = "StackDriftStatus" @@ -15472,12 +11744,14 @@ extension CloudFormationClientTypes.StackDriftInformation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackDriftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftStatus.self, forKey: .stackDriftStatus) - stackDriftStatus = stackDriftStatusDecoded - let lastCheckTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastCheckTimestamp) - lastCheckTimestamp = lastCheckTimestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackDriftInformation() + value.stackDriftStatus = try reader["StackDriftStatus"].readIfPresent() + value.lastCheckTimestamp = try reader["LastCheckTimestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -15510,7 +11784,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackDriftInformationSummary: Swift.Codable { +extension CloudFormationClientTypes.StackDriftInformationSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastCheckTimestamp = "LastCheckTimestamp" case stackDriftStatus = "StackDriftStatus" @@ -15526,12 +11800,14 @@ extension CloudFormationClientTypes.StackDriftInformationSummary: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackDriftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftStatus.self, forKey: .stackDriftStatus) - stackDriftStatus = stackDriftStatusDecoded - let lastCheckTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastCheckTimestamp) - lastCheckTimestamp = lastCheckTimestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackDriftInformationSummary() + value.stackDriftStatus = try reader["StackDriftStatus"].readIfPresent() + value.lastCheckTimestamp = try reader["LastCheckTimestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -15602,7 +11878,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackEvent: Swift.Codable { +extension CloudFormationClientTypes.StackEvent: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clientRequestToken = "ClientRequestToken" case eventId = "EventId" @@ -15674,40 +11950,28 @@ extension CloudFormationClientTypes.StackEvent: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let eventIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventId) - eventId = eventIdDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let physicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .physicalResourceId) - physicalResourceId = physicalResourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let resourceStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ResourceStatus.self, forKey: .resourceStatus) - resourceStatus = resourceStatusDecoded - let resourceStatusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceStatusReason) - resourceStatusReason = resourceStatusReasonDecoded - let resourcePropertiesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceProperties) - resourceProperties = resourcePropertiesDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - let hookTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hookType) - hookType = hookTypeDecoded - let hookStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.HookStatus.self, forKey: .hookStatus) - hookStatus = hookStatusDecoded - let hookStatusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hookStatusReason) - hookStatusReason = hookStatusReasonDecoded - let hookInvocationPointDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.HookInvocationPoint.self, forKey: .hookInvocationPoint) - hookInvocationPoint = hookInvocationPointDecoded - let hookFailureModeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.HookFailureMode.self, forKey: .hookFailureMode) - hookFailureMode = hookFailureModeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackEvent() + value.stackId = try reader["StackId"].readIfPresent() + value.eventId = try reader["EventId"].readIfPresent() + value.stackName = try reader["StackName"].readIfPresent() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.physicalResourceId = try reader["PhysicalResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.resourceStatus = try reader["ResourceStatus"].readIfPresent() + value.resourceStatusReason = try reader["ResourceStatusReason"].readIfPresent() + value.resourceProperties = try reader["ResourceProperties"].readIfPresent() + value.clientRequestToken = try reader["ClientRequestToken"].readIfPresent() + value.hookType = try reader["HookType"].readIfPresent() + value.hookStatus = try reader["HookStatus"].readIfPresent() + value.hookStatusReason = try reader["HookStatusReason"].readIfPresent() + value.hookInvocationPoint = try reader["HookInvocationPoint"].readIfPresent() + value.hookFailureMode = try reader["HookFailureMode"].readIfPresent() + return value + } } } @@ -15795,7 +12059,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackInstance: Swift.Codable { +extension CloudFormationClientTypes.StackInstance: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case account = "Account" case driftStatus = "DriftStatus" @@ -15860,49 +12124,24 @@ extension CloudFormationClientTypes.StackInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetId) - stackSetId = stackSetIdDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - if containerValues.contains(.parameterOverrides) { - struct KeyVal0{struct member{}} - let parameterOverridesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameterOverrides) - if let parameterOverridesWrappedContainer = parameterOverridesWrappedContainer { - let parameterOverridesContainer = try parameterOverridesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parameterOverridesBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parameterOverridesContainer = parameterOverridesContainer { - parameterOverridesBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parameterOverridesContainer { - parameterOverridesBuffer?.append(structureContainer0) - } - } - parameterOverrides = parameterOverridesBuffer - } else { - parameterOverrides = [] - } - } else { - parameterOverrides = nil - } - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackInstanceStatus.self, forKey: .status) - status = statusDecoded - let stackInstanceStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackInstanceComprehensiveStatus.self, forKey: .stackInstanceStatus) - stackInstanceStatus = stackInstanceStatusDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded - let organizationalUnitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organizationalUnitId) - organizationalUnitId = organizationalUnitIdDecoded - let driftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftStatus.self, forKey: .driftStatus) - driftStatus = driftStatusDecoded - let lastDriftCheckTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastDriftCheckTimestamp) - lastDriftCheckTimestamp = lastDriftCheckTimestampDecoded - let lastOperationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastOperationId) - lastOperationId = lastOperationIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackInstance() + value.stackSetId = try reader["StackSetId"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.account = try reader["Account"].readIfPresent() + value.stackId = try reader["StackId"].readIfPresent() + value.parameterOverrides = try reader["ParameterOverrides"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Parameter.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.stackInstanceStatus = try reader["StackInstanceStatus"].readIfPresent(readingClosure: CloudFormationClientTypes.StackInstanceComprehensiveStatus.readingClosure) + value.statusReason = try reader["StatusReason"].readIfPresent() + value.organizationalUnitId = try reader["OrganizationalUnitId"].readIfPresent() + value.driftStatus = try reader["DriftStatus"].readIfPresent() + value.lastDriftCheckTimestamp = try reader["LastDriftCheckTimestamp"].readTimestampIfPresent(format: .dateTime) + value.lastOperationId = try reader["LastOperationId"].readIfPresent() + return value + } } } @@ -15987,7 +12226,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackInstanceComprehensiveStatus: Swift.Codable { +extension CloudFormationClientTypes.StackInstanceComprehensiveStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case detailedStatus = "DetailedStatus" } @@ -15999,10 +12238,13 @@ extension CloudFormationClientTypes.StackInstanceComprehensiveStatus: Swift.Coda } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let detailedStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackInstanceDetailedStatus.self, forKey: .detailedStatus) - detailedStatus = detailedStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackInstanceComprehensiveStatus() + value.detailedStatus = try reader["DetailedStatus"].readIfPresent() + return value + } } } @@ -16081,7 +12323,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackInstanceFilter: Swift.Codable { +extension CloudFormationClientTypes.StackInstanceFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case values = "Values" @@ -16097,12 +12339,14 @@ extension CloudFormationClientTypes.StackInstanceFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackInstanceFilterName.self, forKey: .name) - name = nameDecoded - let valuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .values) - values = valuesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackInstanceFilter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Values"].readIfPresent() + return value + } } } @@ -16162,16 +12406,14 @@ extension CloudFormationClientTypes { } extension StackInstanceNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StackInstanceNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16199,23 +12441,7 @@ public struct StackInstanceNotFoundException: ClientRuntime.ModeledError, AWSCli } } -struct StackInstanceNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension StackInstanceNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFormationClientTypes.StackInstanceResourceDriftsSummary: Swift.Codable { +extension CloudFormationClientTypes.StackInstanceResourceDriftsSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logicalResourceId = "LogicalResourceId" case physicalResourceId = "PhysicalResourceId" @@ -16273,58 +12499,20 @@ extension CloudFormationClientTypes.StackInstanceResourceDriftsSummary: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let physicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .physicalResourceId) - physicalResourceId = physicalResourceIdDecoded - if containerValues.contains(.physicalResourceIdContext) { - struct KeyVal0{struct member{}} - let physicalResourceIdContextWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .physicalResourceIdContext) - if let physicalResourceIdContextWrappedContainer = physicalResourceIdContextWrappedContainer { - let physicalResourceIdContextContainer = try physicalResourceIdContextWrappedContainer.decodeIfPresent([CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair].self, forKey: .member) - var physicalResourceIdContextBuffer:[CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair]? = nil - if let physicalResourceIdContextContainer = physicalResourceIdContextContainer { - physicalResourceIdContextBuffer = [CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair]() - for structureContainer0 in physicalResourceIdContextContainer { - physicalResourceIdContextBuffer?.append(structureContainer0) - } - } - physicalResourceIdContext = physicalResourceIdContextBuffer - } else { - physicalResourceIdContext = [] - } - } else { - physicalResourceIdContext = nil - } - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - if containerValues.contains(.propertyDifferences) { - struct KeyVal0{struct member{}} - let propertyDifferencesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .propertyDifferences) - if let propertyDifferencesWrappedContainer = propertyDifferencesWrappedContainer { - let propertyDifferencesContainer = try propertyDifferencesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.PropertyDifference].self, forKey: .member) - var propertyDifferencesBuffer:[CloudFormationClientTypes.PropertyDifference]? = nil - if let propertyDifferencesContainer = propertyDifferencesContainer { - propertyDifferencesBuffer = [CloudFormationClientTypes.PropertyDifference]() - for structureContainer0 in propertyDifferencesContainer { - propertyDifferencesBuffer?.append(structureContainer0) - } - } - propertyDifferences = propertyDifferencesBuffer - } else { - propertyDifferences = [] - } - } else { - propertyDifferences = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackInstanceResourceDriftsSummary() + value.stackId = try reader["StackId"].readIfPresent() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.physicalResourceId = try reader["PhysicalResourceId"].readIfPresent() + value.physicalResourceIdContext = try reader["PhysicalResourceIdContext"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.resourceType = try reader["ResourceType"].readIfPresent() + value.propertyDifferences = try reader["PropertyDifferences"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.PropertyDifference.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.stackResourceDriftStatus = try reader["StackResourceDriftStatus"].readIfPresent() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + return value } - let stackResourceDriftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDriftStatus.self, forKey: .stackResourceDriftStatus) - stackResourceDriftStatus = stackResourceDriftStatusDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded } } @@ -16420,7 +12608,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackInstanceSummary: Swift.Codable { +extension CloudFormationClientTypes.StackInstanceSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case account = "Account" case driftStatus = "DriftStatus" @@ -16472,30 +12660,23 @@ extension CloudFormationClientTypes.StackInstanceSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetId) - stackSetId = stackSetIdDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackInstanceStatus.self, forKey: .status) - status = statusDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded - let stackInstanceStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackInstanceComprehensiveStatus.self, forKey: .stackInstanceStatus) - stackInstanceStatus = stackInstanceStatusDecoded - let organizationalUnitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organizationalUnitId) - organizationalUnitId = organizationalUnitIdDecoded - let driftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftStatus.self, forKey: .driftStatus) - driftStatus = driftStatusDecoded - let lastDriftCheckTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastDriftCheckTimestamp) - lastDriftCheckTimestamp = lastDriftCheckTimestampDecoded - let lastOperationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastOperationId) - lastOperationId = lastOperationIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackInstanceSummary() + value.stackSetId = try reader["StackSetId"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.account = try reader["Account"].readIfPresent() + value.stackId = try reader["StackId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.statusReason = try reader["StatusReason"].readIfPresent() + value.stackInstanceStatus = try reader["StackInstanceStatus"].readIfPresent(readingClosure: CloudFormationClientTypes.StackInstanceComprehensiveStatus.readingClosure) + value.organizationalUnitId = try reader["OrganizationalUnitId"].readIfPresent() + value.driftStatus = try reader["DriftStatus"].readIfPresent() + value.lastDriftCheckTimestamp = try reader["LastDriftCheckTimestamp"].readTimestampIfPresent(format: .dateTime) + value.lastOperationId = try reader["LastOperationId"].readIfPresent() + return value + } } } @@ -16577,16 +12758,14 @@ extension CloudFormationClientTypes { } extension StackNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StackNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16614,23 +12793,7 @@ public struct StackNotFoundException: ClientRuntime.ModeledError, AWSClientRunti } } -struct StackNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension StackNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFormationClientTypes.StackResource: Swift.Codable { +extension CloudFormationClientTypes.StackResource: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case driftInformation = "DriftInformation" @@ -16682,30 +12845,23 @@ extension CloudFormationClientTypes.StackResource: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let physicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .physicalResourceId) - physicalResourceId = physicalResourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let resourceStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ResourceStatus.self, forKey: .resourceStatus) - resourceStatus = resourceStatusDecoded - let resourceStatusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceStatusReason) - resourceStatusReason = resourceStatusReasonDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let driftInformationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDriftInformation.self, forKey: .driftInformation) - driftInformation = driftInformationDecoded - let moduleInfoDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ModuleInfo.self, forKey: .moduleInfo) - moduleInfo = moduleInfoDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackResource() + value.stackName = try reader["StackName"].readIfPresent() + value.stackId = try reader["StackId"].readIfPresent() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.physicalResourceId = try reader["PhysicalResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.resourceStatus = try reader["ResourceStatus"].readIfPresent() + value.resourceStatusReason = try reader["ResourceStatusReason"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.driftInformation = try reader["DriftInformation"].readIfPresent(readingClosure: CloudFormationClientTypes.StackResourceDriftInformation.readingClosure) + value.moduleInfo = try reader["ModuleInfo"].readIfPresent(readingClosure: CloudFormationClientTypes.ModuleInfo.readingClosure) + return value + } } } @@ -16769,7 +12925,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackResourceDetail: Swift.Codable { +extension CloudFormationClientTypes.StackResourceDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case driftInformation = "DriftInformation" @@ -16825,32 +12981,24 @@ extension CloudFormationClientTypes.StackResourceDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let physicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .physicalResourceId) - physicalResourceId = physicalResourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let lastUpdatedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdatedTimestamp) - lastUpdatedTimestamp = lastUpdatedTimestampDecoded - let resourceStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ResourceStatus.self, forKey: .resourceStatus) - resourceStatus = resourceStatusDecoded - let resourceStatusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceStatusReason) - resourceStatusReason = resourceStatusReasonDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let metadataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metadata) - metadata = metadataDecoded - let driftInformationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDriftInformation.self, forKey: .driftInformation) - driftInformation = driftInformationDecoded - let moduleInfoDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ModuleInfo.self, forKey: .moduleInfo) - moduleInfo = moduleInfoDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackResourceDetail() + value.stackName = try reader["StackName"].readIfPresent() + value.stackId = try reader["StackId"].readIfPresent() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.physicalResourceId = try reader["PhysicalResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.lastUpdatedTimestamp = try reader["LastUpdatedTimestamp"].readTimestampIfPresent(format: .dateTime) + value.resourceStatus = try reader["ResourceStatus"].readIfPresent() + value.resourceStatusReason = try reader["ResourceStatusReason"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.metadata = try reader["Metadata"].readIfPresent() + value.driftInformation = try reader["DriftInformation"].readIfPresent(readingClosure: CloudFormationClientTypes.StackResourceDriftInformation.readingClosure) + value.moduleInfo = try reader["ModuleInfo"].readIfPresent(readingClosure: CloudFormationClientTypes.ModuleInfo.readingClosure) + return value + } } } @@ -16918,7 +13066,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackResourceDrift: Swift.Codable { +extension CloudFormationClientTypes.StackResourceDrift: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actualProperties = "ActualProperties" case expectedProperties = "ExpectedProperties" @@ -16988,64 +13136,23 @@ extension CloudFormationClientTypes.StackResourceDrift: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let physicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .physicalResourceId) - physicalResourceId = physicalResourceIdDecoded - if containerValues.contains(.physicalResourceIdContext) { - struct KeyVal0{struct member{}} - let physicalResourceIdContextWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .physicalResourceIdContext) - if let physicalResourceIdContextWrappedContainer = physicalResourceIdContextWrappedContainer { - let physicalResourceIdContextContainer = try physicalResourceIdContextWrappedContainer.decodeIfPresent([CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair].self, forKey: .member) - var physicalResourceIdContextBuffer:[CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair]? = nil - if let physicalResourceIdContextContainer = physicalResourceIdContextContainer { - physicalResourceIdContextBuffer = [CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair]() - for structureContainer0 in physicalResourceIdContextContainer { - physicalResourceIdContextBuffer?.append(structureContainer0) - } - } - physicalResourceIdContext = physicalResourceIdContextBuffer - } else { - physicalResourceIdContext = [] - } - } else { - physicalResourceIdContext = nil - } - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let expectedPropertiesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expectedProperties) - expectedProperties = expectedPropertiesDecoded - let actualPropertiesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actualProperties) - actualProperties = actualPropertiesDecoded - if containerValues.contains(.propertyDifferences) { - struct KeyVal0{struct member{}} - let propertyDifferencesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .propertyDifferences) - if let propertyDifferencesWrappedContainer = propertyDifferencesWrappedContainer { - let propertyDifferencesContainer = try propertyDifferencesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.PropertyDifference].self, forKey: .member) - var propertyDifferencesBuffer:[CloudFormationClientTypes.PropertyDifference]? = nil - if let propertyDifferencesContainer = propertyDifferencesContainer { - propertyDifferencesBuffer = [CloudFormationClientTypes.PropertyDifference]() - for structureContainer0 in propertyDifferencesContainer { - propertyDifferencesBuffer?.append(structureContainer0) - } - } - propertyDifferences = propertyDifferencesBuffer - } else { - propertyDifferences = [] - } - } else { - propertyDifferences = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackResourceDrift() + value.stackId = try reader["StackId"].readIfPresent() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.physicalResourceId = try reader["PhysicalResourceId"].readIfPresent() + value.physicalResourceIdContext = try reader["PhysicalResourceIdContext"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.PhysicalResourceIdContextKeyValuePair.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.resourceType = try reader["ResourceType"].readIfPresent() + value.expectedProperties = try reader["ExpectedProperties"].readIfPresent() + value.actualProperties = try reader["ActualProperties"].readIfPresent() + value.propertyDifferences = try reader["PropertyDifferences"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.PropertyDifference.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.stackResourceDriftStatus = try reader["StackResourceDriftStatus"].readIfPresent() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.moduleInfo = try reader["ModuleInfo"].readIfPresent(readingClosure: CloudFormationClientTypes.ModuleInfo.readingClosure) + return value } - let stackResourceDriftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDriftStatus.self, forKey: .stackResourceDriftStatus) - stackResourceDriftStatus = stackResourceDriftStatusDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let moduleInfoDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ModuleInfo.self, forKey: .moduleInfo) - moduleInfo = moduleInfoDecoded } } @@ -17118,7 +13225,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackResourceDriftInformation: Swift.Codable { +extension CloudFormationClientTypes.StackResourceDriftInformation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastCheckTimestamp = "LastCheckTimestamp" case stackResourceDriftStatus = "StackResourceDriftStatus" @@ -17134,12 +13241,14 @@ extension CloudFormationClientTypes.StackResourceDriftInformation: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackResourceDriftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDriftStatus.self, forKey: .stackResourceDriftStatus) - stackResourceDriftStatus = stackResourceDriftStatusDecoded - let lastCheckTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastCheckTimestamp) - lastCheckTimestamp = lastCheckTimestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackResourceDriftInformation() + value.stackResourceDriftStatus = try reader["StackResourceDriftStatus"].readIfPresent() + value.lastCheckTimestamp = try reader["LastCheckTimestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -17172,7 +13281,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackResourceDriftInformationSummary: Swift.Codable { +extension CloudFormationClientTypes.StackResourceDriftInformationSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastCheckTimestamp = "LastCheckTimestamp" case stackResourceDriftStatus = "StackResourceDriftStatus" @@ -17188,12 +13297,14 @@ extension CloudFormationClientTypes.StackResourceDriftInformationSummary: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackResourceDriftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDriftStatus.self, forKey: .stackResourceDriftStatus) - stackResourceDriftStatus = stackResourceDriftStatusDecoded - let lastCheckTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastCheckTimestamp) - lastCheckTimestamp = lastCheckTimestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackResourceDriftInformationSummary() + value.stackResourceDriftStatus = try reader["StackResourceDriftStatus"].readIfPresent() + value.lastCheckTimestamp = try reader["LastCheckTimestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -17264,7 +13375,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackResourceSummary: Swift.Codable { +extension CloudFormationClientTypes.StackResourceSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case driftInformation = "DriftInformation" case lastUpdatedTimestamp = "LastUpdatedTimestamp" @@ -17304,24 +13415,20 @@ extension CloudFormationClientTypes.StackResourceSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logicalResourceId) - logicalResourceId = logicalResourceIdDecoded - let physicalResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .physicalResourceId) - physicalResourceId = physicalResourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let lastUpdatedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdatedTimestamp) - lastUpdatedTimestamp = lastUpdatedTimestampDecoded - let resourceStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ResourceStatus.self, forKey: .resourceStatus) - resourceStatus = resourceStatusDecoded - let resourceStatusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceStatusReason) - resourceStatusReason = resourceStatusReasonDecoded - let driftInformationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackResourceDriftInformationSummary.self, forKey: .driftInformation) - driftInformation = driftInformationDecoded - let moduleInfoDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ModuleInfo.self, forKey: .moduleInfo) - moduleInfo = moduleInfoDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackResourceSummary() + value.logicalResourceId = try reader["LogicalResourceId"].readIfPresent() + value.physicalResourceId = try reader["PhysicalResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.lastUpdatedTimestamp = try reader["LastUpdatedTimestamp"].readTimestampIfPresent(format: .dateTime) + value.resourceStatus = try reader["ResourceStatus"].readIfPresent() + value.resourceStatusReason = try reader["ResourceStatusReason"].readIfPresent() + value.driftInformation = try reader["DriftInformation"].readIfPresent(readingClosure: CloudFormationClientTypes.StackResourceDriftInformationSummary.readingClosure) + value.moduleInfo = try reader["ModuleInfo"].readIfPresent(readingClosure: CloudFormationClientTypes.ModuleInfo.readingClosure) + return value + } } } @@ -17373,7 +13480,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackSet: Swift.Codable { +extension CloudFormationClientTypes.StackSet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case administrationRoleARN = "AdministrationRoleARN" case autoDeployment = "AutoDeployment" @@ -17494,126 +13601,28 @@ extension CloudFormationClientTypes.StackSet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let stackSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetId) - stackSetId = stackSetIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetStatus.self, forKey: .status) - status = statusDecoded - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudFormationClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudFormationClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let stackSetARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetARN) - stackSetARN = stackSetARNDecoded - let administrationRoleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .administrationRoleARN) - administrationRoleARN = administrationRoleARNDecoded - let executionRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .executionRoleName) - executionRoleName = executionRoleNameDecoded - let stackSetDriftDetectionDetailsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetDriftDetectionDetails.self, forKey: .stackSetDriftDetectionDetails) - stackSetDriftDetectionDetails = stackSetDriftDetectionDetailsDecoded - let autoDeploymentDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.AutoDeployment.self, forKey: .autoDeployment) - autoDeployment = autoDeploymentDecoded - let permissionModelDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.PermissionModels.self, forKey: .permissionModel) - permissionModel = permissionModelDecoded - if containerValues.contains(.organizationalUnitIds) { - struct KeyVal0{struct member{}} - let organizationalUnitIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .organizationalUnitIds) - if let organizationalUnitIdsWrappedContainer = organizationalUnitIdsWrappedContainer { - let organizationalUnitIdsContainer = try organizationalUnitIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var organizationalUnitIdsBuffer:[Swift.String]? = nil - if let organizationalUnitIdsContainer = organizationalUnitIdsContainer { - organizationalUnitIdsBuffer = [Swift.String]() - for stringContainer0 in organizationalUnitIdsContainer { - organizationalUnitIdsBuffer?.append(stringContainer0) - } - } - organizationalUnitIds = organizationalUnitIdsBuffer - } else { - organizationalUnitIds = [] - } - } else { - organizationalUnitIds = nil - } - let managedExecutionDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ManagedExecution.self, forKey: .managedExecution) - managedExecution = managedExecutionDecoded - if containerValues.contains(.regions) { - struct KeyVal0{struct member{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionsBuffer:[Swift.String]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Swift.String]() - for stringContainer0 in regionsContainer { - regionsBuffer?.append(stringContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSet() + value.stackSetName = try reader["StackSetName"].readIfPresent() + value.stackSetId = try reader["StackSetId"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.templateBody = try reader["TemplateBody"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Parameter.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.capabilities = try reader["Capabilities"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Capability.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.stackSetARN = try reader["StackSetARN"].readIfPresent() + value.administrationRoleARN = try reader["AdministrationRoleARN"].readIfPresent() + value.executionRoleName = try reader["ExecutionRoleName"].readIfPresent() + value.stackSetDriftDetectionDetails = try reader["StackSetDriftDetectionDetails"].readIfPresent(readingClosure: CloudFormationClientTypes.StackSetDriftDetectionDetails.readingClosure) + value.autoDeployment = try reader["AutoDeployment"].readIfPresent(readingClosure: CloudFormationClientTypes.AutoDeployment.readingClosure) + value.permissionModel = try reader["PermissionModel"].readIfPresent() + value.organizationalUnitIds = try reader["OrganizationalUnitIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.managedExecution = try reader["ManagedExecution"].readIfPresent(readingClosure: CloudFormationClientTypes.ManagedExecution.readingClosure) + value.regions = try reader["Regions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -17702,7 +13711,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackSetDriftDetectionDetails: Swift.Codable { +extension CloudFormationClientTypes.StackSetDriftDetectionDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case driftDetectionStatus = "DriftDetectionStatus" case driftStatus = "DriftStatus" @@ -17742,24 +13751,20 @@ extension CloudFormationClientTypes.StackSetDriftDetectionDetails: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let driftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetDriftStatus.self, forKey: .driftStatus) - driftStatus = driftStatusDecoded - let driftDetectionStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetDriftDetectionStatus.self, forKey: .driftDetectionStatus) - driftDetectionStatus = driftDetectionStatusDecoded - let lastDriftCheckTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastDriftCheckTimestamp) - lastDriftCheckTimestamp = lastDriftCheckTimestampDecoded - let totalStackInstancesCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalStackInstancesCount) - totalStackInstancesCount = totalStackInstancesCountDecoded - let driftedStackInstancesCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .driftedStackInstancesCount) - driftedStackInstancesCount = driftedStackInstancesCountDecoded - let inSyncStackInstancesCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .inSyncStackInstancesCount) - inSyncStackInstancesCount = inSyncStackInstancesCountDecoded - let inProgressStackInstancesCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .inProgressStackInstancesCount) - inProgressStackInstancesCount = inProgressStackInstancesCountDecoded - let failedStackInstancesCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .failedStackInstancesCount) - failedStackInstancesCount = failedStackInstancesCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSetDriftDetectionDetails() + value.driftStatus = try reader["DriftStatus"].readIfPresent() + value.driftDetectionStatus = try reader["DriftDetectionStatus"].readIfPresent() + value.lastDriftCheckTimestamp = try reader["LastDriftCheckTimestamp"].readTimestampIfPresent(format: .dateTime) + value.totalStackInstancesCount = try reader["TotalStackInstancesCount"].readIfPresent() + value.driftedStackInstancesCount = try reader["DriftedStackInstancesCount"].readIfPresent() + value.inSyncStackInstancesCount = try reader["InSyncStackInstancesCount"].readIfPresent() + value.inProgressStackInstancesCount = try reader["InProgressStackInstancesCount"].readIfPresent() + value.failedStackInstancesCount = try reader["FailedStackInstancesCount"].readIfPresent() + return value + } } } @@ -17908,16 +13913,14 @@ extension CloudFormationClientTypes { } extension StackSetNotEmptyException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StackSetNotEmptyException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17945,33 +13948,15 @@ public struct StackSetNotEmptyException: ClientRuntime.ModeledError, AWSClientRu } } -struct StackSetNotEmptyExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension StackSetNotEmptyExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension StackSetNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StackSetNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17999,23 +13984,7 @@ public struct StackSetNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -struct StackSetNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension StackSetNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFormationClientTypes.StackSetOperation: Swift.Codable { +extension CloudFormationClientTypes.StackSetOperation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case action = "Action" case administrationRoleARN = "AdministrationRoleARN" @@ -18079,36 +14048,26 @@ extension CloudFormationClientTypes.StackSetOperation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let stackSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetId) - stackSetId = stackSetIdDecoded - let actionDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationAction.self, forKey: .action) - action = actionDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationStatus.self, forKey: .status) - status = statusDecoded - let operationPreferencesDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationPreferences.self, forKey: .operationPreferences) - operationPreferences = operationPreferencesDecoded - let retainStacksDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainStacks) - retainStacks = retainStacksDecoded - let administrationRoleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .administrationRoleARN) - administrationRoleARN = administrationRoleARNDecoded - let executionRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .executionRoleName) - executionRoleName = executionRoleNameDecoded - let creationTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTimestamp) - creationTimestamp = creationTimestampDecoded - let endTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTimestamp) - endTimestamp = endTimestampDecoded - let deploymentTargetsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DeploymentTargets.self, forKey: .deploymentTargets) - deploymentTargets = deploymentTargetsDecoded - let stackSetDriftDetectionDetailsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetDriftDetectionDetails.self, forKey: .stackSetDriftDetectionDetails) - stackSetDriftDetectionDetails = stackSetDriftDetectionDetailsDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded - let statusDetailsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationStatusDetails.self, forKey: .statusDetails) - statusDetails = statusDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSetOperation() + value.operationId = try reader["OperationId"].readIfPresent() + value.stackSetId = try reader["StackSetId"].readIfPresent() + value.action = try reader["Action"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.operationPreferences = try reader["OperationPreferences"].readIfPresent(readingClosure: CloudFormationClientTypes.StackSetOperationPreferences.readingClosure) + value.retainStacks = try reader["RetainStacks"].readIfPresent() + value.administrationRoleARN = try reader["AdministrationRoleARN"].readIfPresent() + value.executionRoleName = try reader["ExecutionRoleName"].readIfPresent() + value.creationTimestamp = try reader["CreationTimestamp"].readTimestampIfPresent(format: .dateTime) + value.endTimestamp = try reader["EndTimestamp"].readTimestampIfPresent(format: .dateTime) + value.deploymentTargets = try reader["DeploymentTargets"].readIfPresent(readingClosure: CloudFormationClientTypes.DeploymentTargets.readingClosure) + value.stackSetDriftDetectionDetails = try reader["StackSetDriftDetectionDetails"].readIfPresent(readingClosure: CloudFormationClientTypes.StackSetDriftDetectionDetails.readingClosure) + value.statusReason = try reader["StatusReason"].readIfPresent() + value.statusDetails = try reader["StatusDetails"].readIfPresent(readingClosure: CloudFormationClientTypes.StackSetOperationStatusDetails.readingClosure) + return value + } } } @@ -18230,7 +14189,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackSetOperationPreferences: Swift.Codable { +extension CloudFormationClientTypes.StackSetOperationPreferences: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case concurrencyMode = "ConcurrencyMode" case failureToleranceCount = "FailureToleranceCount" @@ -18275,39 +14234,19 @@ extension CloudFormationClientTypes.StackSetOperationPreferences: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionConcurrencyTypeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegionConcurrencyType.self, forKey: .regionConcurrencyType) - regionConcurrencyType = regionConcurrencyTypeDecoded - if containerValues.contains(.regionOrder) { - struct KeyVal0{struct member{}} - let regionOrderWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regionOrder) - if let regionOrderWrappedContainer = regionOrderWrappedContainer { - let regionOrderContainer = try regionOrderWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionOrderBuffer:[Swift.String]? = nil - if let regionOrderContainer = regionOrderContainer { - regionOrderBuffer = [Swift.String]() - for stringContainer0 in regionOrderContainer { - regionOrderBuffer?.append(stringContainer0) - } - } - regionOrder = regionOrderBuffer - } else { - regionOrder = [] - } - } else { - regionOrder = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSetOperationPreferences() + value.regionConcurrencyType = try reader["RegionConcurrencyType"].readIfPresent() + value.regionOrder = try reader["RegionOrder"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.failureToleranceCount = try reader["FailureToleranceCount"].readIfPresent() + value.failureTolerancePercentage = try reader["FailureTolerancePercentage"].readIfPresent() + value.maxConcurrentCount = try reader["MaxConcurrentCount"].readIfPresent() + value.maxConcurrentPercentage = try reader["MaxConcurrentPercentage"].readIfPresent() + value.concurrencyMode = try reader["ConcurrencyMode"].readIfPresent() + return value } - let failureToleranceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .failureToleranceCount) - failureToleranceCount = failureToleranceCountDecoded - let failureTolerancePercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .failureTolerancePercentage) - failureTolerancePercentage = failureTolerancePercentageDecoded - let maxConcurrentCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxConcurrentCount) - maxConcurrentCount = maxConcurrentCountDecoded - let maxConcurrentPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxConcurrentPercentage) - maxConcurrentPercentage = maxConcurrentPercentageDecoded - let concurrencyModeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ConcurrencyMode.self, forKey: .concurrencyMode) - concurrencyMode = concurrencyModeDecoded } } @@ -18396,7 +14335,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackSetOperationResultSummary: Swift.Codable { +extension CloudFormationClientTypes.StackSetOperationResultSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case account = "Account" case accountGateResult = "AccountGateResult" @@ -18428,20 +14367,18 @@ extension CloudFormationClientTypes.StackSetOperationResultSummary: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationResultStatus.self, forKey: .status) - status = statusDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded - let accountGateResultDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.AccountGateResult.self, forKey: .accountGateResult) - accountGateResult = accountGateResultDecoded - let organizationalUnitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organizationalUnitId) - organizationalUnitId = organizationalUnitIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSetOperationResultSummary() + value.account = try reader["Account"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.statusReason = try reader["StatusReason"].readIfPresent() + value.accountGateResult = try reader["AccountGateResult"].readIfPresent(readingClosure: CloudFormationClientTypes.AccountGateResult.readingClosure) + value.organizationalUnitId = try reader["OrganizationalUnitId"].readIfPresent() + return value + } } } @@ -18535,7 +14472,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackSetOperationStatusDetails: Swift.Codable { +extension CloudFormationClientTypes.StackSetOperationStatusDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case failedStackInstancesCount = "FailedStackInstancesCount" } @@ -18547,10 +14484,13 @@ extension CloudFormationClientTypes.StackSetOperationStatusDetails: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let failedStackInstancesCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .failedStackInstancesCount) - failedStackInstancesCount = failedStackInstancesCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSetOperationStatusDetails() + value.failedStackInstancesCount = try reader["FailedStackInstancesCount"].readIfPresent() + return value + } } } @@ -18570,7 +14510,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.StackSetOperationSummary: Swift.Codable { +extension CloudFormationClientTypes.StackSetOperationSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case action = "Action" case creationTimestamp = "CreationTimestamp" @@ -18610,24 +14550,20 @@ extension CloudFormationClientTypes.StackSetOperationSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let actionDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationAction.self, forKey: .action) - action = actionDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationStatus.self, forKey: .status) - status = statusDecoded - let creationTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTimestamp) - creationTimestamp = creationTimestampDecoded - let endTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTimestamp) - endTimestamp = endTimestampDecoded - let statusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusReason) - statusReason = statusReasonDecoded - let statusDetailsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationStatusDetails.self, forKey: .statusDetails) - statusDetails = statusDetailsDecoded - let operationPreferencesDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationPreferences.self, forKey: .operationPreferences) - operationPreferences = operationPreferencesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSetOperationSummary() + value.operationId = try reader["OperationId"].readIfPresent() + value.action = try reader["Action"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.creationTimestamp = try reader["CreationTimestamp"].readTimestampIfPresent(format: .dateTime) + value.endTimestamp = try reader["EndTimestamp"].readTimestampIfPresent(format: .dateTime) + value.statusReason = try reader["StatusReason"].readIfPresent() + value.statusDetails = try reader["StatusDetails"].readIfPresent(readingClosure: CloudFormationClientTypes.StackSetOperationStatusDetails.readingClosure) + value.operationPreferences = try reader["OperationPreferences"].readIfPresent(readingClosure: CloudFormationClientTypes.StackSetOperationPreferences.readingClosure) + return value + } } } @@ -18719,7 +14655,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackSetSummary: Swift.Codable { +extension CloudFormationClientTypes.StackSetSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoDeployment = "AutoDeployment" case description = "Description" @@ -18763,26 +14699,21 @@ extension CloudFormationClientTypes.StackSetSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let stackSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetId) - stackSetId = stackSetIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetStatus.self, forKey: .status) - status = statusDecoded - let autoDeploymentDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.AutoDeployment.self, forKey: .autoDeployment) - autoDeployment = autoDeploymentDecoded - let permissionModelDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.PermissionModels.self, forKey: .permissionModel) - permissionModel = permissionModelDecoded - let driftStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftStatus.self, forKey: .driftStatus) - driftStatus = driftStatusDecoded - let lastDriftCheckTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastDriftCheckTimestamp) - lastDriftCheckTimestamp = lastDriftCheckTimestampDecoded - let managedExecutionDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ManagedExecution.self, forKey: .managedExecution) - managedExecution = managedExecutionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSetSummary() + value.stackSetName = try reader["StackSetName"].readIfPresent() + value.stackSetId = try reader["StackSetId"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.autoDeployment = try reader["AutoDeployment"].readIfPresent(readingClosure: CloudFormationClientTypes.AutoDeployment.readingClosure) + value.permissionModel = try reader["PermissionModel"].readIfPresent() + value.driftStatus = try reader["DriftStatus"].readIfPresent() + value.lastDriftCheckTimestamp = try reader["LastDriftCheckTimestamp"].readTimestampIfPresent(format: .dateTime) + value.managedExecution = try reader["ManagedExecution"].readIfPresent(readingClosure: CloudFormationClientTypes.ManagedExecution.readingClosure) + return value + } } } @@ -18941,7 +14872,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.StackSummary: Swift.Codable { +extension CloudFormationClientTypes.StackSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case creationTime = "CreationTime" case deletionTime = "DeletionTime" @@ -18993,30 +14924,23 @@ extension CloudFormationClientTypes.StackSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let templateDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateDescription) - templateDescription = templateDescriptionDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let lastUpdatedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdatedTime) - lastUpdatedTime = lastUpdatedTimeDecoded - let deletionTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deletionTime) - deletionTime = deletionTimeDecoded - let stackStatusDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackStatus.self, forKey: .stackStatus) - stackStatus = stackStatusDecoded - let stackStatusReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackStatusReason) - stackStatusReason = stackStatusReasonDecoded - let parentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parentId) - parentId = parentIdDecoded - let rootIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rootId) - rootId = rootIdDecoded - let driftInformationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackDriftInformationSummary.self, forKey: .driftInformation) - driftInformation = driftInformationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.StackSummary() + value.stackId = try reader["StackId"].readIfPresent() + value.stackName = try reader["StackName"].readIfPresent() + value.templateDescription = try reader["TemplateDescription"].readIfPresent() + value.creationTime = try reader["CreationTime"].readTimestampIfPresent(format: .dateTime) + value.lastUpdatedTime = try reader["LastUpdatedTime"].readTimestampIfPresent(format: .dateTime) + value.deletionTime = try reader["DeletionTime"].readTimestampIfPresent(format: .dateTime) + value.stackStatus = try reader["StackStatus"].readIfPresent() + value.stackStatusReason = try reader["StackStatusReason"].readIfPresent() + value.parentId = try reader["ParentId"].readIfPresent() + value.rootId = try reader["RootId"].readIfPresent() + value.driftInformation = try reader["DriftInformation"].readIfPresent(readingClosure: CloudFormationClientTypes.StackDriftInformationSummary.readingClosure) + return value + } } } @@ -19080,16 +15004,14 @@ extension CloudFormationClientTypes { } extension StaleRequestException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StaleRequestException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19117,23 +15039,13 @@ public struct StaleRequestException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct StaleRequestExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension StaleRequestExceptionBody: Swift.Decodable { +extension StopStackSetOperationInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case callAs = "CallAs" + case operationId = "OperationId" + case stackSetName = "StackSetName" } -} -extension StopStackSetOperationInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let callAs = callAs { @@ -19183,32 +15095,12 @@ public struct StopStackSetOperationInput: Swift.Equatable { } } -struct StopStackSetOperationInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let operationId: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension StopStackSetOperationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callAs = "CallAs" - case operationId = "OperationId" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension StopStackSetOperationOutput { -extension StopStackSetOperationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return StopStackSetOperationOutput() + } } } @@ -19217,19 +15109,26 @@ public struct StopStackSetOperationOutput: Swift.Equatable { public init() { } } -enum StopStackSetOperationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotFoundException": return try await OperationNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum StopStackSetOperationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotFoundException": return try await OperationNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CloudFormationClientTypes.Tag: Swift.Codable { +extension CloudFormationClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -19245,12 +15144,14 @@ extension CloudFormationClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -19276,7 +15177,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.TemplateParameter: Swift.Codable { +extension CloudFormationClientTypes.TemplateParameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case description = "Description" @@ -19300,16 +15201,16 @@ extension CloudFormationClientTypes.TemplateParameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterKey) - parameterKey = parameterKeyDecoded - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let noEchoDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .noEcho) - noEcho = noEchoDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.TemplateParameter() + value.parameterKey = try reader["ParameterKey"].readIfPresent() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.noEcho = try reader["NoEcho"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -19373,7 +15274,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.TemplateSummaryConfig: Swift.Codable { +extension CloudFormationClientTypes.TemplateSummaryConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case treatUnrecognizedResourceTypesAsWarnings = "TreatUnrecognizedResourceTypesAsWarnings" } @@ -19385,10 +15286,13 @@ extension CloudFormationClientTypes.TemplateSummaryConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let treatUnrecognizedResourceTypesAsWarningsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .treatUnrecognizedResourceTypesAsWarnings) - treatUnrecognizedResourceTypesAsWarnings = treatUnrecognizedResourceTypesAsWarningsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.TemplateSummaryConfig() + value.treatUnrecognizedResourceTypesAsWarnings = try reader["TreatUnrecognizedResourceTypesAsWarnings"].readIfPresent() + return value + } } } @@ -19409,6 +15313,14 @@ extension CloudFormationClientTypes { } extension TestTypeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case logDeliveryBucket = "LogDeliveryBucket" + case type = "Type" + case typeName = "TypeName" + case versionId = "VersionId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -19473,46 +15385,15 @@ public struct TestTypeInput: Swift.Equatable { } } -struct TestTypeInputBody: Swift.Equatable { - let arn: Swift.String? - let type: CloudFormationClientTypes.ThirdPartyType? - let typeName: Swift.String? - let versionId: Swift.String? - let logDeliveryBucket: Swift.String? -} - -extension TestTypeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case logDeliveryBucket = "LogDeliveryBucket" - case type = "Type" - case typeName = "TypeName" - case versionId = "VersionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ThirdPartyType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - let logDeliveryBucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logDeliveryBucket) - logDeliveryBucket = logDeliveryBucketDecoded - } -} +extension TestTypeOutput { -extension TestTypeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TestTypeOutputBody = try responseDecoder.decode(responseBody: data) - self.typeVersionArn = output.typeVersionArn - } else { - self.typeVersionArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["TestTypeResult"] + var value = TestTypeOutput() + value.typeVersionArn = try reader["TypeVersionArn"].readIfPresent() + return value } } } @@ -19529,30 +15410,20 @@ public struct TestTypeOutput: Swift.Equatable { } } -struct TestTypeOutputBody: Swift.Equatable { - let typeVersionArn: Swift.String? -} - -extension TestTypeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case typeVersionArn = "TypeVersionArn" - } +enum TestTypeOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("TestTypeResult")) - let typeVersionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeVersionArn) - typeVersionArn = typeVersionArnDecoded - } -} - -enum TestTypeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CFNRegistryException": return try await CFNRegistryException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TypeNotFoundException": return try await TypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CFNRegistryException": return try await CFNRegistryException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TypeNotFoundException": return try await TypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -19593,16 +15464,14 @@ extension CloudFormationClientTypes { } extension TokenAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TokenAlreadyExistsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19630,23 +15499,7 @@ public struct TokenAlreadyExistsException: ClientRuntime.ModeledError, AWSClient } } -struct TokenAlreadyExistsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TokenAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFormationClientTypes.TypeConfigurationDetails: Swift.Codable { +extension CloudFormationClientTypes.TypeConfigurationDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case alias = "Alias" case arn = "Arn" @@ -19682,22 +15535,19 @@ extension CloudFormationClientTypes.TypeConfigurationDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let aliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alias) - alias = aliasDecoded - let configurationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configuration) - configuration = configurationDecoded - let lastUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdated) - lastUpdated = lastUpdatedDecoded - let typeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeArn) - typeArn = typeArnDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let isDefaultConfigurationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefaultConfiguration) - isDefaultConfiguration = isDefaultConfigurationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.TypeConfigurationDetails() + value.arn = try reader["Arn"].readIfPresent() + value.alias = try reader["Alias"].readIfPresent() + value.configuration = try reader["Configuration"].readIfPresent() + value.lastUpdated = try reader["LastUpdated"].readTimestampIfPresent(format: .dateTime) + value.typeArn = try reader["TypeArn"].readIfPresent() + value.typeName = try reader["TypeName"].readIfPresent() + value.isDefaultConfiguration = try reader["IsDefaultConfiguration"].readIfPresent() + return value + } } } @@ -19741,7 +15591,7 @@ extension CloudFormationClientTypes { } -extension CloudFormationClientTypes.TypeConfigurationIdentifier: Swift.Codable { +extension CloudFormationClientTypes.TypeConfigurationIdentifier: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case type = "Type" case typeArn = "TypeArn" @@ -19769,18 +15619,17 @@ extension CloudFormationClientTypes.TypeConfigurationIdentifier: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeArn) - typeArn = typeArnDecoded - let typeConfigurationAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeConfigurationAlias) - typeConfigurationAlias = typeConfigurationAliasDecoded - let typeConfigurationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeConfigurationArn) - typeConfigurationArn = typeConfigurationArnDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ThirdPartyType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.TypeConfigurationIdentifier() + value.typeArn = try reader["TypeArn"].readIfPresent() + value.typeConfigurationAlias = try reader["TypeConfigurationAlias"].readIfPresent() + value.typeConfigurationArn = try reader["TypeConfigurationArn"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + value.typeName = try reader["TypeName"].readIfPresent() + return value + } } } @@ -19817,16 +15666,14 @@ extension CloudFormationClientTypes { } extension TypeConfigurationNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TypeConfigurationNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19855,23 +15702,7 @@ public struct TypeConfigurationNotFoundException: ClientRuntime.ModeledError, AW } } -struct TypeConfigurationNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TypeConfigurationNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFormationClientTypes.TypeFilters: Swift.Codable { +extension CloudFormationClientTypes.TypeFilters: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case category = "Category" case publisherId = "PublisherId" @@ -19891,14 +15722,15 @@ extension CloudFormationClientTypes.TypeFilters: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let categoryDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.Category.self, forKey: .category) - category = categoryDecoded - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - let typeNamePrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeNamePrefix) - typeNamePrefix = typeNamePrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.TypeFilters() + value.category = try reader["Category"].readIfPresent() + value.publisherId = try reader["PublisherId"].readIfPresent() + value.typeNamePrefix = try reader["TypeNamePrefix"].readIfPresent() + return value + } } } @@ -19942,16 +15774,14 @@ extension CloudFormationClientTypes { } extension TypeNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TypeNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19980,23 +15810,7 @@ public struct TypeNotFoundException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct TypeNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TypeNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFormationClientTypes.TypeSummary: Swift.Codable { +extension CloudFormationClientTypes.TypeSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultVersionId = "DefaultVersionId" case description = "Description" @@ -20056,34 +15870,25 @@ extension CloudFormationClientTypes.TypeSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let defaultVersionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultVersionId) - defaultVersionId = defaultVersionIdDecoded - let typeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeArn) - typeArn = typeArnDecoded - let lastUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdated) - lastUpdated = lastUpdatedDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let publisherIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherId) - publisherId = publisherIdDecoded - let originalTypeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originalTypeName) - originalTypeName = originalTypeNameDecoded - let publicVersionNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicVersionNumber) - publicVersionNumber = publicVersionNumberDecoded - let latestPublicVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .latestPublicVersion) - latestPublicVersion = latestPublicVersionDecoded - let publisherIdentityDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.IdentityProvider.self, forKey: .publisherIdentity) - publisherIdentity = publisherIdentityDecoded - let publisherNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publisherName) - publisherName = publisherNameDecoded - let isActivatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isActivated) - isActivated = isActivatedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.TypeSummary() + value.type = try reader["Type"].readIfPresent() + value.typeName = try reader["TypeName"].readIfPresent() + value.defaultVersionId = try reader["DefaultVersionId"].readIfPresent() + value.typeArn = try reader["TypeArn"].readIfPresent() + value.lastUpdated = try reader["LastUpdated"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + value.publisherId = try reader["PublisherId"].readIfPresent() + value.originalTypeName = try reader["OriginalTypeName"].readIfPresent() + value.publicVersionNumber = try reader["PublicVersionNumber"].readIfPresent() + value.latestPublicVersion = try reader["LatestPublicVersion"].readIfPresent() + value.publisherIdentity = try reader["PublisherIdentity"].readIfPresent() + value.publisherName = try reader["PublisherName"].readIfPresent() + value.isActivated = try reader["IsActivated"].readIfPresent() + return value + } } } @@ -20196,7 +16001,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.TypeVersionSummary: Swift.Codable { +extension CloudFormationClientTypes.TypeVersionSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case description = "Description" @@ -20236,24 +16041,20 @@ extension CloudFormationClientTypes.TypeVersionSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RegistryType.self, forKey: .type) - type = typeDecoded - let typeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeName) - typeName = typeNameDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - let isDefaultVersionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefaultVersion) - isDefaultVersion = isDefaultVersionDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let timeCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timeCreated) - timeCreated = timeCreatedDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let publicVersionNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicVersionNumber) - publicVersionNumber = publicVersionNumberDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.TypeVersionSummary() + value.type = try reader["Type"].readIfPresent() + value.typeName = try reader["TypeName"].readIfPresent() + value.versionId = try reader["VersionId"].readIfPresent() + value.isDefaultVersion = try reader["IsDefaultVersion"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.timeCreated = try reader["TimeCreated"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + value.publicVersionNumber = try reader["PublicVersionNumber"].readIfPresent() + return value + } } } @@ -20302,6 +16103,27 @@ extension CloudFormationClientTypes { } extension UpdateStackInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case capabilities = "Capabilities" + case clientRequestToken = "ClientRequestToken" + case disableRollback = "DisableRollback" + case notificationARNs = "NotificationARNs" + case parameters = "Parameters" + case resourceTypes = "ResourceTypes" + case retainExceptOnCreate = "RetainExceptOnCreate" + case roleARN = "RoleARN" + case rollbackConfiguration = "RollbackConfiguration" + case stackName = "StackName" + case stackPolicyBody = "StackPolicyBody" + case stackPolicyDuringUpdateBody = "StackPolicyDuringUpdateBody" + case stackPolicyDuringUpdateURL = "StackPolicyDuringUpdateURL" + case stackPolicyURL = "StackPolicyURL" + case tags = "Tags" + case templateBody = "TemplateBody" + case templateURL = "TemplateURL" + case usePreviousTemplate = "UsePreviousTemplate" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let capabilities = capabilities { @@ -20530,176 +16352,18 @@ public struct UpdateStackInput: Swift.Equatable { } } -struct UpdateStackInputBody: Swift.Equatable { - let stackName: Swift.String? - let templateBody: Swift.String? - let templateURL: Swift.String? - let usePreviousTemplate: Swift.Bool? - let stackPolicyDuringUpdateBody: Swift.String? - let stackPolicyDuringUpdateURL: Swift.String? - let parameters: [CloudFormationClientTypes.Parameter]? - let capabilities: [CloudFormationClientTypes.Capability]? - let resourceTypes: [Swift.String]? - let roleARN: Swift.String? - let rollbackConfiguration: CloudFormationClientTypes.RollbackConfiguration? - let stackPolicyBody: Swift.String? - let stackPolicyURL: Swift.String? - let notificationARNs: [Swift.String]? - let tags: [CloudFormationClientTypes.Tag]? - let disableRollback: Swift.Bool? - let clientRequestToken: Swift.String? - let retainExceptOnCreate: Swift.Bool? -} - -extension UpdateStackInputBody: Swift.Decodable { +extension UpdateStackInstancesInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case capabilities = "Capabilities" - case clientRequestToken = "ClientRequestToken" - case disableRollback = "DisableRollback" - case notificationARNs = "NotificationARNs" - case parameters = "Parameters" - case resourceTypes = "ResourceTypes" - case retainExceptOnCreate = "RetainExceptOnCreate" - case roleARN = "RoleARN" - case rollbackConfiguration = "RollbackConfiguration" - case stackName = "StackName" - case stackPolicyBody = "StackPolicyBody" - case stackPolicyDuringUpdateBody = "StackPolicyDuringUpdateBody" - case stackPolicyDuringUpdateURL = "StackPolicyDuringUpdateURL" - case stackPolicyURL = "StackPolicyURL" - case tags = "Tags" - case templateBody = "TemplateBody" - case templateURL = "TemplateURL" - case usePreviousTemplate = "UsePreviousTemplate" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - let templateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateURL) - templateURL = templateURLDecoded - let usePreviousTemplateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .usePreviousTemplate) - usePreviousTemplate = usePreviousTemplateDecoded - let stackPolicyDuringUpdateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyDuringUpdateBody) - stackPolicyDuringUpdateBody = stackPolicyDuringUpdateBodyDecoded - let stackPolicyDuringUpdateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyDuringUpdateURL) - stackPolicyDuringUpdateURL = stackPolicyDuringUpdateURLDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - if containerValues.contains(.resourceTypes) { - struct KeyVal0{struct member{}} - let resourceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTypes) - if let resourceTypesWrappedContainer = resourceTypesWrappedContainer { - let resourceTypesContainer = try resourceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceTypesBuffer:[Swift.String]? = nil - if let resourceTypesContainer = resourceTypesContainer { - resourceTypesBuffer = [Swift.String]() - for stringContainer0 in resourceTypesContainer { - resourceTypesBuffer?.append(stringContainer0) - } - } - resourceTypes = resourceTypesBuffer - } else { - resourceTypes = [] - } - } else { - resourceTypes = nil - } - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - let rollbackConfigurationDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.RollbackConfiguration.self, forKey: .rollbackConfiguration) - rollbackConfiguration = rollbackConfigurationDecoded - let stackPolicyBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyBody) - stackPolicyBody = stackPolicyBodyDecoded - let stackPolicyURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackPolicyURL) - stackPolicyURL = stackPolicyURLDecoded - if containerValues.contains(.notificationARNs) { - struct KeyVal0{struct member{}} - let notificationARNsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .notificationARNs) - if let notificationARNsWrappedContainer = notificationARNsWrappedContainer { - let notificationARNsContainer = try notificationARNsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var notificationARNsBuffer:[Swift.String]? = nil - if let notificationARNsContainer = notificationARNsContainer { - notificationARNsBuffer = [Swift.String]() - for stringContainer0 in notificationARNsContainer { - notificationARNsBuffer?.append(stringContainer0) - } - } - notificationARNs = notificationARNsBuffer - } else { - notificationARNs = [] - } - } else { - notificationARNs = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudFormationClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudFormationClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let disableRollbackDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableRollback) - disableRollback = disableRollbackDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - let retainExceptOnCreateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainExceptOnCreate) - retainExceptOnCreate = retainExceptOnCreateDecoded + case accounts = "Accounts" + case callAs = "CallAs" + case deploymentTargets = "DeploymentTargets" + case operationId = "OperationId" + case operationPreferences = "OperationPreferences" + case parameterOverrides = "ParameterOverrides" + case regions = "Regions" + case stackSetName = "StackSetName" } -} -extension UpdateStackInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accounts = accounts { @@ -20822,109 +16486,15 @@ public struct UpdateStackInstancesInput: Swift.Equatable { } } -struct UpdateStackInstancesInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let accounts: [Swift.String]? - let deploymentTargets: CloudFormationClientTypes.DeploymentTargets? - let regions: [Swift.String]? - let parameterOverrides: [CloudFormationClientTypes.Parameter]? - let operationPreferences: CloudFormationClientTypes.StackSetOperationPreferences? - let operationId: Swift.String? - let callAs: CloudFormationClientTypes.CallAs? -} - -extension UpdateStackInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accounts = "Accounts" - case callAs = "CallAs" - case deploymentTargets = "DeploymentTargets" - case operationId = "OperationId" - case operationPreferences = "OperationPreferences" - case parameterOverrides = "ParameterOverrides" - case regions = "Regions" - case stackSetName = "StackSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - if containerValues.contains(.accounts) { - struct KeyVal0{struct member{}} - let accountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accounts) - if let accountsWrappedContainer = accountsWrappedContainer { - let accountsContainer = try accountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var accountsBuffer:[Swift.String]? = nil - if let accountsContainer = accountsContainer { - accountsBuffer = [Swift.String]() - for stringContainer0 in accountsContainer { - accountsBuffer?.append(stringContainer0) - } - } - accounts = accountsBuffer - } else { - accounts = [] - } - } else { - accounts = nil - } - let deploymentTargetsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DeploymentTargets.self, forKey: .deploymentTargets) - deploymentTargets = deploymentTargetsDecoded - if containerValues.contains(.regions) { - struct KeyVal0{struct member{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionsBuffer:[Swift.String]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Swift.String]() - for stringContainer0 in regionsContainer { - regionsBuffer?.append(stringContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil - } - if containerValues.contains(.parameterOverrides) { - struct KeyVal0{struct member{}} - let parameterOverridesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameterOverrides) - if let parameterOverridesWrappedContainer = parameterOverridesWrappedContainer { - let parameterOverridesContainer = try parameterOverridesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parameterOverridesBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parameterOverridesContainer = parameterOverridesContainer { - parameterOverridesBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parameterOverridesContainer { - parameterOverridesBuffer?.append(structureContainer0) - } - } - parameterOverrides = parameterOverridesBuffer - } else { - parameterOverrides = [] - } - } else { - parameterOverrides = nil - } - let operationPreferencesDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationPreferences.self, forKey: .operationPreferences) - operationPreferences = operationPreferencesDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - } -} +extension UpdateStackInstancesOutput { -extension UpdateStackInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateStackInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.operationId = output.operationId - } else { - self.operationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateStackInstancesResult"] + var value = UpdateStackInstancesOutput() + value.operationId = try reader["OperationId"].readIfPresent() + return value } } } @@ -20941,46 +16511,37 @@ public struct UpdateStackInstancesOutput: Swift.Equatable { } } -struct UpdateStackInstancesOutputBody: Swift.Equatable { - let operationId: Swift.String? -} - -extension UpdateStackInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case operationId = "OperationId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateStackInstancesResult")) - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - } -} +enum UpdateStackInstancesOutputError { -enum UpdateStackInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressException": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackInstanceNotFoundException": return try await StackInstanceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleRequestException": return try await StaleRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressException": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackInstanceNotFoundException": return try await StackInstanceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleRequestException": return try await StaleRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension UpdateStackOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateStackOutputBody = try responseDecoder.decode(responseBody: data) - self.stackId = output.stackId - } else { - self.stackId = nil +extension UpdateStackOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateStackResult"] + var value = UpdateStackOutput() + value.stackId = try reader["StackId"].readIfPresent() + return value } } } @@ -20998,35 +16559,47 @@ public struct UpdateStackOutput: Swift.Equatable { } } -struct UpdateStackOutputBody: Swift.Equatable { - let stackId: Swift.String? -} - -extension UpdateStackOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackId = "StackId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateStackResult")) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - } -} +enum UpdateStackOutputError { -enum UpdateStackOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientCapabilitiesException": return try await InsufficientCapabilitiesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientCapabilitiesException": return try await InsufficientCapabilitiesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TokenAlreadyExistsException": return try await TokenAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateStackSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accounts = "Accounts" + case administrationRoleARN = "AdministrationRoleARN" + case autoDeployment = "AutoDeployment" + case callAs = "CallAs" + case capabilities = "Capabilities" + case deploymentTargets = "DeploymentTargets" + case description = "Description" + case executionRoleName = "ExecutionRoleName" + case managedExecution = "ManagedExecution" + case operationId = "OperationId" + case operationPreferences = "OperationPreferences" + case parameters = "Parameters" + case permissionModel = "PermissionModel" + case regions = "Regions" + case stackSetName = "StackSetName" + case tags = "Tags" + case templateBody = "TemplateBody" + case templateURL = "TemplateURL" + case usePreviousTemplate = "UsePreviousTemplate" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accounts = accounts { @@ -21275,187 +16848,15 @@ public struct UpdateStackSetInput: Swift.Equatable { } } -struct UpdateStackSetInputBody: Swift.Equatable { - let stackSetName: Swift.String? - let description: Swift.String? - let templateBody: Swift.String? - let templateURL: Swift.String? - let usePreviousTemplate: Swift.Bool? - let parameters: [CloudFormationClientTypes.Parameter]? - let capabilities: [CloudFormationClientTypes.Capability]? - let tags: [CloudFormationClientTypes.Tag]? - let operationPreferences: CloudFormationClientTypes.StackSetOperationPreferences? - let administrationRoleARN: Swift.String? - let executionRoleName: Swift.String? - let deploymentTargets: CloudFormationClientTypes.DeploymentTargets? - let permissionModel: CloudFormationClientTypes.PermissionModels? - let autoDeployment: CloudFormationClientTypes.AutoDeployment? - let operationId: Swift.String? - let accounts: [Swift.String]? - let regions: [Swift.String]? - let callAs: CloudFormationClientTypes.CallAs? - let managedExecution: CloudFormationClientTypes.ManagedExecution? -} - -extension UpdateStackSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accounts = "Accounts" - case administrationRoleARN = "AdministrationRoleARN" - case autoDeployment = "AutoDeployment" - case callAs = "CallAs" - case capabilities = "Capabilities" - case deploymentTargets = "DeploymentTargets" - case description = "Description" - case executionRoleName = "ExecutionRoleName" - case managedExecution = "ManagedExecution" - case operationId = "OperationId" - case operationPreferences = "OperationPreferences" - case parameters = "Parameters" - case permissionModel = "PermissionModel" - case regions = "Regions" - case stackSetName = "StackSetName" - case tags = "Tags" - case templateBody = "TemplateBody" - case templateURL = "TemplateURL" - case usePreviousTemplate = "UsePreviousTemplate" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stackSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackSetName) - stackSetName = stackSetNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - let templateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateURL) - templateURL = templateURLDecoded - let usePreviousTemplateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .usePreviousTemplate) - usePreviousTemplate = usePreviousTemplateDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudFormationClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudFormationClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let operationPreferencesDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.StackSetOperationPreferences.self, forKey: .operationPreferences) - operationPreferences = operationPreferencesDecoded - let administrationRoleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .administrationRoleARN) - administrationRoleARN = administrationRoleARNDecoded - let executionRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .executionRoleName) - executionRoleName = executionRoleNameDecoded - let deploymentTargetsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.DeploymentTargets.self, forKey: .deploymentTargets) - deploymentTargets = deploymentTargetsDecoded - let permissionModelDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.PermissionModels.self, forKey: .permissionModel) - permissionModel = permissionModelDecoded - let autoDeploymentDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.AutoDeployment.self, forKey: .autoDeployment) - autoDeployment = autoDeploymentDecoded - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - if containerValues.contains(.accounts) { - struct KeyVal0{struct member{}} - let accountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accounts) - if let accountsWrappedContainer = accountsWrappedContainer { - let accountsContainer = try accountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var accountsBuffer:[Swift.String]? = nil - if let accountsContainer = accountsContainer { - accountsBuffer = [Swift.String]() - for stringContainer0 in accountsContainer { - accountsBuffer?.append(stringContainer0) - } - } - accounts = accountsBuffer - } else { - accounts = [] - } - } else { - accounts = nil - } - if containerValues.contains(.regions) { - struct KeyVal0{struct member{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionsBuffer:[Swift.String]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Swift.String]() - for stringContainer0 in regionsContainer { - regionsBuffer?.append(stringContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil - } - let callAsDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.CallAs.self, forKey: .callAs) - callAs = callAsDecoded - let managedExecutionDecoded = try containerValues.decodeIfPresent(CloudFormationClientTypes.ManagedExecution.self, forKey: .managedExecution) - managedExecution = managedExecutionDecoded - } -} +extension UpdateStackSetOutput { -extension UpdateStackSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateStackSetOutputBody = try responseDecoder.decode(responseBody: data) - self.operationId = output.operationId - } else { - self.operationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateStackSetResult"] + var value = UpdateStackSetOutput() + value.operationId = try reader["OperationId"].readIfPresent() + return value } } } @@ -21472,39 +16873,34 @@ public struct UpdateStackSetOutput: Swift.Equatable { } } -struct UpdateStackSetOutputBody: Swift.Equatable { - let operationId: Swift.String? -} - -extension UpdateStackSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case operationId = "OperationId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateStackSetResult")) - let operationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationId) - operationId = operationIdDecoded - } -} +enum UpdateStackSetOutputError { -enum UpdateStackSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOperationException": return try await InvalidOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressException": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackInstanceNotFoundException": return try await StackInstanceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StackSetNotFoundException": return try await StackSetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleRequestException": return try await StaleRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOperationException": return try await InvalidOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationIdAlreadyExistsException": return try await OperationIdAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressException": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackInstanceNotFoundException": return try await StackInstanceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StackSetNotFoundException": return try await StackSetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleRequestException": return try await StaleRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateTerminationProtectionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enableTerminationProtection = "EnableTerminationProtection" + case stackName = "StackName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enableTerminationProtection = enableTerminationProtection { @@ -21543,34 +16939,15 @@ public struct UpdateTerminationProtectionInput: Swift.Equatable { } } -struct UpdateTerminationProtectionInputBody: Swift.Equatable { - let enableTerminationProtection: Swift.Bool? - let stackName: Swift.String? -} - -extension UpdateTerminationProtectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableTerminationProtection = "EnableTerminationProtection" - case stackName = "StackName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enableTerminationProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableTerminationProtection) - enableTerminationProtection = enableTerminationProtectionDecoded - let stackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackName) - stackName = stackNameDecoded - } -} +extension UpdateTerminationProtectionOutput { -extension UpdateTerminationProtectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateTerminationProtectionOutputBody = try responseDecoder.decode(responseBody: data) - self.stackId = output.stackId - } else { - self.stackId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateTerminationProtectionResult"] + var value = UpdateTerminationProtectionOutput() + value.stackId = try reader["StackId"].readIfPresent() + return value } } } @@ -21587,33 +16964,28 @@ public struct UpdateTerminationProtectionOutput: Swift.Equatable { } } -struct UpdateTerminationProtectionOutputBody: Swift.Equatable { - let stackId: Swift.String? -} - -extension UpdateTerminationProtectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stackId = "StackId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateTerminationProtectionResult")) - let stackIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stackId) - stackId = stackIdDecoded - } -} +enum UpdateTerminationProtectionOutputError { -enum UpdateTerminationProtectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ValidateTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case templateBody = "TemplateBody" + case templateURL = "TemplateURL" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let templateBody = templateBody { @@ -21651,42 +17023,19 @@ public struct ValidateTemplateInput: Swift.Equatable { } } -struct ValidateTemplateInputBody: Swift.Equatable { - let templateBody: Swift.String? - let templateURL: Swift.String? -} - -extension ValidateTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateBody = "TemplateBody" - case templateURL = "TemplateURL" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateBody) - templateBody = templateBodyDecoded - let templateURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateURL) - templateURL = templateURLDecoded - } -} +extension ValidateTemplateOutput { -extension ValidateTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ValidateTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.capabilities = output.capabilities - self.capabilitiesReason = output.capabilitiesReason - self.declaredTransforms = output.declaredTransforms - self.description = output.description - self.parameters = output.parameters - } else { - self.capabilities = nil - self.capabilitiesReason = nil - self.declaredTransforms = nil - self.description = nil - self.parameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ValidateTemplateResult"] + var value = ValidateTemplateOutput() + value.capabilities = try reader["Capabilities"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.Capability.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.capabilitiesReason = try reader["CapabilitiesReason"].readIfPresent() + value.declaredTransforms = try reader["DeclaredTransforms"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.description = try reader["Description"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: CloudFormationClientTypes.TemplateParameter.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -21720,95 +17069,18 @@ public struct ValidateTemplateOutput: Swift.Equatable { } } -struct ValidateTemplateOutputBody: Swift.Equatable { - let parameters: [CloudFormationClientTypes.TemplateParameter]? - let description: Swift.String? - let capabilities: [CloudFormationClientTypes.Capability]? - let capabilitiesReason: Swift.String? - let declaredTransforms: [Swift.String]? -} - -extension ValidateTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capabilities = "Capabilities" - case capabilitiesReason = "CapabilitiesReason" - case declaredTransforms = "DeclaredTransforms" - case description = "Description" - case parameters = "Parameters" - } +enum ValidateTemplateOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ValidateTemplateResult")) - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([CloudFormationClientTypes.TemplateParameter].self, forKey: .member) - var parametersBuffer:[CloudFormationClientTypes.TemplateParameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [CloudFormationClientTypes.TemplateParameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.capabilities) { - struct KeyVal0{struct member{}} - let capabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capabilities) - if let capabilitiesWrappedContainer = capabilitiesWrappedContainer { - let capabilitiesContainer = try capabilitiesWrappedContainer.decodeIfPresent([CloudFormationClientTypes.Capability].self, forKey: .member) - var capabilitiesBuffer:[CloudFormationClientTypes.Capability]? = nil - if let capabilitiesContainer = capabilitiesContainer { - capabilitiesBuffer = [CloudFormationClientTypes.Capability]() - for enumContainer0 in capabilitiesContainer { - capabilitiesBuffer?.append(enumContainer0) - } - } - capabilities = capabilitiesBuffer - } else { - capabilities = [] - } - } else { - capabilities = nil - } - let capabilitiesReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capabilitiesReason) - capabilitiesReason = capabilitiesReasonDecoded - if containerValues.contains(.declaredTransforms) { - struct KeyVal0{struct member{}} - let declaredTransformsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .declaredTransforms) - if let declaredTransformsWrappedContainer = declaredTransformsWrappedContainer { - let declaredTransformsContainer = try declaredTransformsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var declaredTransformsBuffer:[Swift.String]? = nil - if let declaredTransformsContainer = declaredTransformsContainer { - declaredTransformsBuffer = [Swift.String]() - for stringContainer0 in declaredTransformsContainer { - declaredTransformsBuffer?.append(stringContainer0) - } - } - declaredTransforms = declaredTransformsBuffer - } else { - declaredTransforms = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - declaredTransforms = nil - } - } -} - -enum ValidateTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -21877,7 +17149,7 @@ extension CloudFormationClientTypes { } } -extension CloudFormationClientTypes.Warnings: Swift.Codable { +extension CloudFormationClientTypes.Warnings: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case unrecognizedResourceTypes = "UnrecognizedResourceTypes" } @@ -21898,26 +17170,12 @@ extension CloudFormationClientTypes.Warnings: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.unrecognizedResourceTypes) { - struct KeyVal0{struct member{}} - let unrecognizedResourceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unrecognizedResourceTypes) - if let unrecognizedResourceTypesWrappedContainer = unrecognizedResourceTypesWrappedContainer { - let unrecognizedResourceTypesContainer = try unrecognizedResourceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var unrecognizedResourceTypesBuffer:[Swift.String]? = nil - if let unrecognizedResourceTypesContainer = unrecognizedResourceTypesContainer { - unrecognizedResourceTypesBuffer = [Swift.String]() - for stringContainer0 in unrecognizedResourceTypesContainer { - unrecognizedResourceTypesBuffer?.append(stringContainer0) - } - } - unrecognizedResourceTypes = unrecognizedResourceTypesBuffer - } else { - unrecognizedResourceTypes = [] - } - } else { - unrecognizedResourceTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFormationClientTypes.Warnings() + value.unrecognizedResourceTypes = try reader["UnrecognizedResourceTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } diff --git a/Sources/Services/AWSCloudFront/CloudFrontClient.swift b/Sources/Services/AWSCloudFront/CloudFrontClient.swift index eff327b920e..9afcb3605ad 100644 --- a/Sources/Services/AWSCloudFront/CloudFrontClient.swift +++ b/Sources/Services/AWSCloudFront/CloudFrontClient.swift @@ -11,19 +11,9 @@ public class CloudFrontClient { let client: ClientRuntime.SdkHttpClient let config: CloudFrontClient.CloudFrontClientConfiguration let serviceName = "CloudFront" - let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: CloudFrontClient.CloudFrontClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) - let encoder = ClientRuntime.JSONEncoder() - self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true - self.decoder = config.decoder ?? decoder self.config = config } @@ -86,8 +76,6 @@ extension CloudFrontClient { /// - `TooManyDistributionCNAMEs` : Your request contains more CNAMEs than are allowed per distribution. public func associateAlias(input: AssociateAliasInput) async throws -> AssociateAliasOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "associateAlias") @@ -109,7 +97,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateAliasOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateAliasOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateAliasOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -198,8 +186,6 @@ extension CloudFrontClient { /// - `TrustedSignerDoesNotExist` : One or more of your trusted signers don't exist. public func copyDistribution(input: CopyDistributionInput) async throws -> CopyDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDistribution") @@ -219,12 +205,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CopyDistributionInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CopyDistributionRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CopyDistributionInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CopyDistributionRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CopyDistributionInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -258,8 +244,6 @@ extension CloudFrontClient { /// - `TooManyQueryStringsInCachePolicy` : The number of query strings in the cache policy exceeds the maximum. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func createCachePolicy(input: CreateCachePolicyInput) async throws -> CreateCachePolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCachePolicy") @@ -278,12 +262,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CachePolicyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:), keyPath: \.cachePolicyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CachePolicyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:), keyPath: \.cachePolicyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCachePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCachePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCachePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -307,8 +291,6 @@ extension CloudFrontClient { /// - `TooManyCloudFrontOriginAccessIdentities` : Processing your request would cause you to exceed the maximum number of origin access identities allowed. public func createCloudFrontOriginAccessIdentity(input: CreateCloudFrontOriginAccessIdentityInput) async throws -> CreateCloudFrontOriginAccessIdentityOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCloudFrontOriginAccessIdentity") @@ -327,12 +309,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CloudFrontOriginAccessIdentityConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:), keyPath: \.cloudFrontOriginAccessIdentityConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CloudFrontOriginAccessIdentityConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:), keyPath: \.cloudFrontOriginAccessIdentityConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCloudFrontOriginAccessIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCloudFrontOriginAccessIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCloudFrontOriginAccessIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -357,8 +339,6 @@ extension CloudFrontClient { /// - `TooManyContinuousDeploymentPolicies` : You have reached the maximum number of continuous deployment policies for this Amazon Web Services account. public func createContinuousDeploymentPolicy(input: CreateContinuousDeploymentPolicyInput) async throws -> CreateContinuousDeploymentPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createContinuousDeploymentPolicy") @@ -377,12 +357,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ContinuousDeploymentPolicyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:), keyPath: \.continuousDeploymentPolicyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ContinuousDeploymentPolicyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:), keyPath: \.continuousDeploymentPolicyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateContinuousDeploymentPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateContinuousDeploymentPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateContinuousDeploymentPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -466,8 +446,6 @@ extension CloudFrontClient { /// - `TrustedSignerDoesNotExist` : One or more of your trusted signers don't exist. public func createDistribution(input: CreateDistributionInput) async throws -> CreateDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDistribution") @@ -486,12 +464,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DistributionConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:), keyPath: \.distributionConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DistributionConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:), keyPath: \.distributionConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -580,8 +558,6 @@ extension CloudFrontClient { /// - `TrustedSignerDoesNotExist` : One or more of your trusted signers don't exist. public func createDistributionWithTags(input: CreateDistributionWithTagsInput) async throws -> CreateDistributionWithTagsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDistributionWithTags") @@ -601,12 +577,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(CreateDistributionWithTagsInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DistributionConfigWithTags", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.DistributionConfigWithTags.writingClosure(_:to:), keyPath: \.distributionConfigWithTags, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DistributionConfigWithTags", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.DistributionConfigWithTags.writingClosure(_:to:), keyPath: \.distributionConfigWithTags, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDistributionWithTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDistributionWithTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDistributionWithTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -633,8 +609,6 @@ extension CloudFrontClient { /// - `TooManyFieldLevelEncryptionQueryArgProfiles` : The maximum number of query arg profiles for field-level encryption have been created. public func createFieldLevelEncryptionConfig(input: CreateFieldLevelEncryptionConfigInput) async throws -> CreateFieldLevelEncryptionConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createFieldLevelEncryptionConfig") @@ -653,12 +627,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("FieldLevelEncryptionConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:), keyPath: \.fieldLevelEncryptionConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("FieldLevelEncryptionConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:), keyPath: \.fieldLevelEncryptionConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateFieldLevelEncryptionConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateFieldLevelEncryptionConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateFieldLevelEncryptionConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -685,8 +659,6 @@ extension CloudFrontClient { /// - `TooManyFieldLevelEncryptionProfiles` : The maximum number of profiles for field-level encryption have been created. public func createFieldLevelEncryptionProfile(input: CreateFieldLevelEncryptionProfileInput) async throws -> CreateFieldLevelEncryptionProfileOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createFieldLevelEncryptionProfile") @@ -705,12 +677,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("FieldLevelEncryptionProfileConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:), keyPath: \.fieldLevelEncryptionProfileConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("FieldLevelEncryptionProfileConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:), keyPath: \.fieldLevelEncryptionProfileConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateFieldLevelEncryptionProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateFieldLevelEncryptionProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateFieldLevelEncryptionProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -734,8 +706,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func createFunction(input: CreateFunctionInput) async throws -> CreateFunctionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createFunction") @@ -754,12 +724,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateFunctionRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CreateFunctionInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateFunctionRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CreateFunctionInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateFunctionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateFunctionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateFunctionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -785,8 +755,6 @@ extension CloudFrontClient { /// - `TooManyInvalidationsInProgress` : You have exceeded the maximum number of allowable InProgress invalidation batch requests, or invalidation objects. public func createInvalidation(input: CreateInvalidationInput) async throws -> CreateInvalidationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createInvalidation") @@ -805,12 +773,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("InvalidationBatch", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.InvalidationBatch.writingClosure(_:to:), keyPath: \.invalidationBatch, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("InvalidationBatch", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.InvalidationBatch.writingClosure(_:to:), keyPath: \.invalidationBatch, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateInvalidationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateInvalidationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateInvalidationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -833,8 +801,6 @@ extension CloudFrontClient { /// - `TooManyPublicKeysInKeyGroup` : The number of public keys in this key group is more than the maximum allowed. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func createKeyGroup(input: CreateKeyGroupInput) async throws -> CreateKeyGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createKeyGroup") @@ -853,12 +819,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("KeyGroupConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:), keyPath: \.keyGroupConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("KeyGroupConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:), keyPath: \.keyGroupConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateKeyGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateKeyGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateKeyGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -882,8 +848,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func createKeyValueStore(input: CreateKeyValueStoreInput) async throws -> CreateKeyValueStoreOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createKeyValueStore") @@ -902,12 +866,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateKeyValueStoreRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CreateKeyValueStoreInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateKeyValueStoreRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CreateKeyValueStoreInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateKeyValueStoreOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateKeyValueStoreOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateKeyValueStoreOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -930,8 +894,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func createMonitoringSubscription(input: CreateMonitoringSubscriptionInput) async throws -> CreateMonitoringSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createMonitoringSubscription") @@ -950,12 +912,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("MonitoringSubscription", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.MonitoringSubscription.writingClosure(_:to:), keyPath: \.monitoringSubscription, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("MonitoringSubscription", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.MonitoringSubscription.writingClosure(_:to:), keyPath: \.monitoringSubscription, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateMonitoringSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateMonitoringSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateMonitoringSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -977,8 +939,6 @@ extension CloudFrontClient { /// - `TooManyOriginAccessControls` : The number of origin access controls in your Amazon Web Services account exceeds the maximum allowed. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func createOriginAccessControl(input: CreateOriginAccessControlInput) async throws -> CreateOriginAccessControlOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createOriginAccessControl") @@ -997,12 +957,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OriginAccessControlConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:), keyPath: \.originAccessControlConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OriginAccessControlConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:), keyPath: \.originAccessControlConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateOriginAccessControlOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateOriginAccessControlOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateOriginAccessControlOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1038,8 +998,6 @@ extension CloudFrontClient { /// - `TooManyQueryStringsInOriginRequestPolicy` : The number of query strings in the origin request policy exceeds the maximum. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func createOriginRequestPolicy(input: CreateOriginRequestPolicyInput) async throws -> CreateOriginRequestPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createOriginRequestPolicy") @@ -1058,12 +1016,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OriginRequestPolicyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:), keyPath: \.originRequestPolicyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OriginRequestPolicyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:), keyPath: \.originRequestPolicyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateOriginRequestPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateOriginRequestPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateOriginRequestPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1085,8 +1043,6 @@ extension CloudFrontClient { /// - `TooManyPublicKeys` : The maximum number of public keys for field-level encryption have been created. To create a new public key, delete one of the existing keys. public func createPublicKey(input: CreatePublicKeyInput) async throws -> CreatePublicKeyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createPublicKey") @@ -1105,12 +1061,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PublicKeyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:), keyPath: \.publicKeyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PublicKeyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:), keyPath: \.publicKeyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePublicKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreatePublicKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreatePublicKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1133,8 +1089,6 @@ extension CloudFrontClient { /// - `TooManyRealtimeLogConfigs` : You have reached the maximum number of real-time log configurations for this Amazon Web Services account. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func createRealtimeLogConfig(input: CreateRealtimeLogConfigInput) async throws -> CreateRealtimeLogConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createRealtimeLogConfig") @@ -1153,12 +1107,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateRealtimeLogConfigRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CreateRealtimeLogConfigInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateRealtimeLogConfigRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CreateRealtimeLogConfigInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateRealtimeLogConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateRealtimeLogConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateRealtimeLogConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1185,8 +1139,6 @@ extension CloudFrontClient { /// - `TooManyResponseHeadersPolicies` : You have reached the maximum number of response headers policies for this Amazon Web Services account. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func createResponseHeadersPolicy(input: CreateResponseHeadersPolicyInput) async throws -> CreateResponseHeadersPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createResponseHeadersPolicy") @@ -1205,12 +1157,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ResponseHeadersPolicyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:), keyPath: \.responseHeadersPolicyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ResponseHeadersPolicyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:), keyPath: \.responseHeadersPolicyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateResponseHeadersPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateResponseHeadersPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateResponseHeadersPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1242,8 +1194,6 @@ extension CloudFrontClient { /// - `TrustedSignerDoesNotExist` : One or more of your trusted signers don't exist. public func createStreamingDistribution(input: CreateStreamingDistributionInput) async throws -> CreateStreamingDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createStreamingDistribution") @@ -1262,12 +1212,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("StreamingDistributionConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:), keyPath: \.streamingDistributionConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("StreamingDistributionConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:), keyPath: \.streamingDistributionConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateStreamingDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateStreamingDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateStreamingDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1300,8 +1250,6 @@ extension CloudFrontClient { /// - `TrustedSignerDoesNotExist` : One or more of your trusted signers don't exist. public func createStreamingDistributionWithTags(input: CreateStreamingDistributionWithTagsInput) async throws -> CreateStreamingDistributionWithTagsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createStreamingDistributionWithTags") @@ -1321,12 +1269,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(CreateStreamingDistributionWithTagsInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("StreamingDistributionConfigWithTags", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.StreamingDistributionConfigWithTags.writingClosure(_:to:), keyPath: \.streamingDistributionConfigWithTags, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("StreamingDistributionConfigWithTags", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.StreamingDistributionConfigWithTags.writingClosure(_:to:), keyPath: \.streamingDistributionConfigWithTags, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateStreamingDistributionWithTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateStreamingDistributionWithTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateStreamingDistributionWithTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1351,8 +1299,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteCachePolicy(input: DeleteCachePolicyInput) async throws -> DeleteCachePolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteCachePolicy") @@ -1374,7 +1320,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCachePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCachePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCachePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1398,8 +1344,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteCloudFrontOriginAccessIdentity(input: DeleteCloudFrontOriginAccessIdentityInput) async throws -> DeleteCloudFrontOriginAccessIdentityOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteCloudFrontOriginAccessIdentity") @@ -1421,7 +1365,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCloudFrontOriginAccessIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCloudFrontOriginAccessIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCloudFrontOriginAccessIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1446,8 +1390,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteContinuousDeploymentPolicy(input: DeleteContinuousDeploymentPolicyInput) async throws -> DeleteContinuousDeploymentPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteContinuousDeploymentPolicy") @@ -1469,7 +1411,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteContinuousDeploymentPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteContinuousDeploymentPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteContinuousDeploymentPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1512,8 +1454,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteDistribution(input: DeleteDistributionInput) async throws -> DeleteDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteDistribution") @@ -1535,7 +1475,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1559,8 +1499,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteFieldLevelEncryptionConfig(input: DeleteFieldLevelEncryptionConfigInput) async throws -> DeleteFieldLevelEncryptionConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteFieldLevelEncryptionConfig") @@ -1582,7 +1520,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteFieldLevelEncryptionConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteFieldLevelEncryptionConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteFieldLevelEncryptionConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1606,8 +1544,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteFieldLevelEncryptionProfile(input: DeleteFieldLevelEncryptionProfileInput) async throws -> DeleteFieldLevelEncryptionProfileOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteFieldLevelEncryptionProfile") @@ -1629,7 +1565,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteFieldLevelEncryptionProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteFieldLevelEncryptionProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteFieldLevelEncryptionProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1653,8 +1589,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func deleteFunction(input: DeleteFunctionInput) async throws -> DeleteFunctionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteFunction") @@ -1676,7 +1610,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteFunctionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteFunctionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteFunctionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1699,8 +1633,6 @@ extension CloudFrontClient { /// - `ResourceInUse` : Cannot delete this resource because it is in use. public func deleteKeyGroup(input: DeleteKeyGroupInput) async throws -> DeleteKeyGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteKeyGroup") @@ -1722,7 +1654,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteKeyGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteKeyGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteKeyGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1746,8 +1678,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteKeyValueStore(input: DeleteKeyValueStoreInput) async throws -> DeleteKeyValueStoreOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteKeyValueStore") @@ -1769,7 +1699,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteKeyValueStoreOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteKeyValueStoreOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteKeyValueStoreOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1792,8 +1722,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func deleteMonitoringSubscription(input: DeleteMonitoringSubscriptionInput) async throws -> DeleteMonitoringSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteMonitoringSubscription") @@ -1814,7 +1742,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteMonitoringSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteMonitoringSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteMonitoringSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1838,8 +1766,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteOriginAccessControl(input: DeleteOriginAccessControlInput) async throws -> DeleteOriginAccessControlOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteOriginAccessControl") @@ -1861,7 +1787,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteOriginAccessControlOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteOriginAccessControlOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteOriginAccessControlOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1886,8 +1812,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func deleteOriginRequestPolicy(input: DeleteOriginRequestPolicyInput) async throws -> DeleteOriginRequestPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteOriginRequestPolicy") @@ -1909,7 +1833,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteOriginRequestPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteOriginRequestPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteOriginRequestPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1933,8 +1857,6 @@ extension CloudFrontClient { /// - `PublicKeyInUse` : The specified public key is in use. public func deletePublicKey(input: DeletePublicKeyInput) async throws -> DeletePublicKeyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deletePublicKey") @@ -1956,7 +1878,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePublicKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePublicKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePublicKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1979,8 +1901,6 @@ extension CloudFrontClient { /// - `RealtimeLogConfigInUse` : Cannot delete the real-time log configuration because it is attached to one or more cache behaviors. public func deleteRealtimeLogConfig(input: DeleteRealtimeLogConfigInput) async throws -> DeleteRealtimeLogConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteRealtimeLogConfig") @@ -1999,12 +1919,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DeleteRealtimeLogConfigRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: DeleteRealtimeLogConfigInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DeleteRealtimeLogConfigRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: DeleteRealtimeLogConfigInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteRealtimeLogConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteRealtimeLogConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteRealtimeLogConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2029,8 +1949,6 @@ extension CloudFrontClient { /// - `ResponseHeadersPolicyInUse` : Cannot delete the response headers policy because it is attached to one or more cache behaviors in a CloudFront distribution. public func deleteResponseHeadersPolicy(input: DeleteResponseHeadersPolicyInput) async throws -> DeleteResponseHeadersPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteResponseHeadersPolicy") @@ -2052,7 +1970,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteResponseHeadersPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteResponseHeadersPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteResponseHeadersPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2095,8 +2013,6 @@ extension CloudFrontClient { /// - `StreamingDistributionNotDisabled` : The specified CloudFront distribution is not disabled. You must disable the distribution before you can delete it. public func deleteStreamingDistribution(input: DeleteStreamingDistributionInput) async throws -> DeleteStreamingDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteStreamingDistribution") @@ -2118,7 +2034,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteStreamingDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteStreamingDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteStreamingDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2139,8 +2055,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func describeFunction(input: DescribeFunctionInput) async throws -> DescribeFunctionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "describeFunction") @@ -2162,7 +2076,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFunctionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFunctionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFunctionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2184,8 +2098,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func describeKeyValueStore(input: DescribeKeyValueStoreInput) async throws -> DescribeKeyValueStoreOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "describeKeyValueStore") @@ -2206,7 +2118,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeKeyValueStoreOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeKeyValueStoreOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeKeyValueStoreOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2234,8 +2146,6 @@ extension CloudFrontClient { /// - `NoSuchCachePolicy` : The cache policy does not exist. public func getCachePolicy(input: GetCachePolicyInput) async throws -> GetCachePolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getCachePolicy") @@ -2256,7 +2166,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCachePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCachePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCachePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2277,8 +2187,6 @@ extension CloudFrontClient { /// - `NoSuchCachePolicy` : The cache policy does not exist. public func getCachePolicyConfig(input: GetCachePolicyConfigInput) async throws -> GetCachePolicyConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getCachePolicyConfig") @@ -2299,7 +2207,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCachePolicyConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCachePolicyConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCachePolicyConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2320,8 +2228,6 @@ extension CloudFrontClient { /// - `NoSuchCloudFrontOriginAccessIdentity` : The specified origin access identity does not exist. public func getCloudFrontOriginAccessIdentity(input: GetCloudFrontOriginAccessIdentityInput) async throws -> GetCloudFrontOriginAccessIdentityOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getCloudFrontOriginAccessIdentity") @@ -2342,7 +2248,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCloudFrontOriginAccessIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCloudFrontOriginAccessIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCloudFrontOriginAccessIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2363,8 +2269,6 @@ extension CloudFrontClient { /// - `NoSuchCloudFrontOriginAccessIdentity` : The specified origin access identity does not exist. public func getCloudFrontOriginAccessIdentityConfig(input: GetCloudFrontOriginAccessIdentityConfigInput) async throws -> GetCloudFrontOriginAccessIdentityConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getCloudFrontOriginAccessIdentityConfig") @@ -2385,7 +2289,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCloudFrontOriginAccessIdentityConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCloudFrontOriginAccessIdentityConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCloudFrontOriginAccessIdentityConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2406,8 +2310,6 @@ extension CloudFrontClient { /// - `NoSuchContinuousDeploymentPolicy` : The continuous deployment policy doesn't exist. public func getContinuousDeploymentPolicy(input: GetContinuousDeploymentPolicyInput) async throws -> GetContinuousDeploymentPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getContinuousDeploymentPolicy") @@ -2428,7 +2330,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetContinuousDeploymentPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetContinuousDeploymentPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetContinuousDeploymentPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2449,8 +2351,6 @@ extension CloudFrontClient { /// - `NoSuchContinuousDeploymentPolicy` : The continuous deployment policy doesn't exist. public func getContinuousDeploymentPolicyConfig(input: GetContinuousDeploymentPolicyConfigInput) async throws -> GetContinuousDeploymentPolicyConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getContinuousDeploymentPolicyConfig") @@ -2471,7 +2371,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetContinuousDeploymentPolicyConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetContinuousDeploymentPolicyConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetContinuousDeploymentPolicyConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2492,8 +2392,6 @@ extension CloudFrontClient { /// - `NoSuchDistribution` : The specified distribution does not exist. public func getDistribution(input: GetDistributionInput) async throws -> GetDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getDistribution") @@ -2514,7 +2412,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2535,8 +2433,6 @@ extension CloudFrontClient { /// - `NoSuchDistribution` : The specified distribution does not exist. public func getDistributionConfig(input: GetDistributionConfigInput) async throws -> GetDistributionConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getDistributionConfig") @@ -2557,7 +2453,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetDistributionConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetDistributionConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetDistributionConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2578,8 +2474,6 @@ extension CloudFrontClient { /// - `NoSuchFieldLevelEncryptionConfig` : The specified configuration for field-level encryption doesn't exist. public func getFieldLevelEncryption(input: GetFieldLevelEncryptionInput) async throws -> GetFieldLevelEncryptionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getFieldLevelEncryption") @@ -2600,7 +2494,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetFieldLevelEncryptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetFieldLevelEncryptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetFieldLevelEncryptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2621,8 +2515,6 @@ extension CloudFrontClient { /// - `NoSuchFieldLevelEncryptionConfig` : The specified configuration for field-level encryption doesn't exist. public func getFieldLevelEncryptionConfig(input: GetFieldLevelEncryptionConfigInput) async throws -> GetFieldLevelEncryptionConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getFieldLevelEncryptionConfig") @@ -2643,7 +2535,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetFieldLevelEncryptionConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetFieldLevelEncryptionConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetFieldLevelEncryptionConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2664,8 +2556,6 @@ extension CloudFrontClient { /// - `NoSuchFieldLevelEncryptionProfile` : The specified profile for field-level encryption doesn't exist. public func getFieldLevelEncryptionProfile(input: GetFieldLevelEncryptionProfileInput) async throws -> GetFieldLevelEncryptionProfileOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getFieldLevelEncryptionProfile") @@ -2686,7 +2576,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetFieldLevelEncryptionProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetFieldLevelEncryptionProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetFieldLevelEncryptionProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2707,8 +2597,6 @@ extension CloudFrontClient { /// - `NoSuchFieldLevelEncryptionProfile` : The specified profile for field-level encryption doesn't exist. public func getFieldLevelEncryptionProfileConfig(input: GetFieldLevelEncryptionProfileConfigInput) async throws -> GetFieldLevelEncryptionProfileConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getFieldLevelEncryptionProfileConfig") @@ -2729,7 +2617,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetFieldLevelEncryptionProfileConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetFieldLevelEncryptionProfileConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetFieldLevelEncryptionProfileConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2750,8 +2638,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func getFunction(input: GetFunctionInput) async throws -> GetFunctionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getFunction") @@ -2773,7 +2659,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetFunctionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetFunctionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetFunctionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2795,8 +2681,6 @@ extension CloudFrontClient { /// - `NoSuchInvalidation` : The specified invalidation does not exist. public func getInvalidation(input: GetInvalidationInput) async throws -> GetInvalidationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getInvalidation") @@ -2817,7 +2701,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetInvalidationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetInvalidationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetInvalidationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2837,8 +2721,6 @@ extension CloudFrontClient { /// - `NoSuchResource` : A resource that was specified is not valid. public func getKeyGroup(input: GetKeyGroupInput) async throws -> GetKeyGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getKeyGroup") @@ -2859,7 +2741,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetKeyGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetKeyGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetKeyGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2879,8 +2761,6 @@ extension CloudFrontClient { /// - `NoSuchResource` : A resource that was specified is not valid. public func getKeyGroupConfig(input: GetKeyGroupConfigInput) async throws -> GetKeyGroupConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getKeyGroupConfig") @@ -2901,7 +2781,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetKeyGroupConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetKeyGroupConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetKeyGroupConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2924,8 +2804,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func getMonitoringSubscription(input: GetMonitoringSubscriptionInput) async throws -> GetMonitoringSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getMonitoringSubscription") @@ -2946,7 +2824,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMonitoringSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMonitoringSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMonitoringSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2967,8 +2845,6 @@ extension CloudFrontClient { /// - `NoSuchOriginAccessControl` : The origin access control does not exist. public func getOriginAccessControl(input: GetOriginAccessControlInput) async throws -> GetOriginAccessControlOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getOriginAccessControl") @@ -2989,7 +2865,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetOriginAccessControlOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetOriginAccessControlOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetOriginAccessControlOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3010,8 +2886,6 @@ extension CloudFrontClient { /// - `NoSuchOriginAccessControl` : The origin access control does not exist. public func getOriginAccessControlConfig(input: GetOriginAccessControlConfigInput) async throws -> GetOriginAccessControlConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getOriginAccessControlConfig") @@ -3032,7 +2906,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetOriginAccessControlConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetOriginAccessControlConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetOriginAccessControlConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3060,8 +2934,6 @@ extension CloudFrontClient { /// - `NoSuchOriginRequestPolicy` : The origin request policy does not exist. public func getOriginRequestPolicy(input: GetOriginRequestPolicyInput) async throws -> GetOriginRequestPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getOriginRequestPolicy") @@ -3082,7 +2954,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetOriginRequestPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetOriginRequestPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetOriginRequestPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3103,8 +2975,6 @@ extension CloudFrontClient { /// - `NoSuchOriginRequestPolicy` : The origin request policy does not exist. public func getOriginRequestPolicyConfig(input: GetOriginRequestPolicyConfigInput) async throws -> GetOriginRequestPolicyConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getOriginRequestPolicyConfig") @@ -3125,7 +2995,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetOriginRequestPolicyConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetOriginRequestPolicyConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetOriginRequestPolicyConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3146,8 +3016,6 @@ extension CloudFrontClient { /// - `NoSuchPublicKey` : The specified public key doesn't exist. public func getPublicKey(input: GetPublicKeyInput) async throws -> GetPublicKeyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getPublicKey") @@ -3168,7 +3036,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPublicKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPublicKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPublicKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3189,8 +3057,6 @@ extension CloudFrontClient { /// - `NoSuchPublicKey` : The specified public key doesn't exist. public func getPublicKeyConfig(input: GetPublicKeyConfigInput) async throws -> GetPublicKeyConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getPublicKeyConfig") @@ -3211,7 +3077,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPublicKeyConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPublicKeyConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPublicKeyConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3233,8 +3099,6 @@ extension CloudFrontClient { /// - `NoSuchRealtimeLogConfig` : The real-time log configuration does not exist. public func getRealtimeLogConfig(input: GetRealtimeLogConfigInput) async throws -> GetRealtimeLogConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getRealtimeLogConfig") @@ -3253,12 +3117,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("GetRealtimeLogConfigRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: GetRealtimeLogConfigInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("GetRealtimeLogConfigRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: GetRealtimeLogConfigInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetRealtimeLogConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetRealtimeLogConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetRealtimeLogConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3279,8 +3143,6 @@ extension CloudFrontClient { /// - `NoSuchResponseHeadersPolicy` : The response headers policy does not exist. public func getResponseHeadersPolicy(input: GetResponseHeadersPolicyInput) async throws -> GetResponseHeadersPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getResponseHeadersPolicy") @@ -3301,7 +3163,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetResponseHeadersPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetResponseHeadersPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetResponseHeadersPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3322,8 +3184,6 @@ extension CloudFrontClient { /// - `NoSuchResponseHeadersPolicy` : The response headers policy does not exist. public func getResponseHeadersPolicyConfig(input: GetResponseHeadersPolicyConfigInput) async throws -> GetResponseHeadersPolicyConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getResponseHeadersPolicyConfig") @@ -3344,7 +3204,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetResponseHeadersPolicyConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetResponseHeadersPolicyConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetResponseHeadersPolicyConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3365,8 +3225,6 @@ extension CloudFrontClient { /// - `NoSuchStreamingDistribution` : The specified streaming distribution does not exist. public func getStreamingDistribution(input: GetStreamingDistributionInput) async throws -> GetStreamingDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getStreamingDistribution") @@ -3387,7 +3245,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetStreamingDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetStreamingDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetStreamingDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3408,8 +3266,6 @@ extension CloudFrontClient { /// - `NoSuchStreamingDistribution` : The specified streaming distribution does not exist. public func getStreamingDistributionConfig(input: GetStreamingDistributionConfigInput) async throws -> GetStreamingDistributionConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getStreamingDistributionConfig") @@ -3430,7 +3286,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetStreamingDistributionConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetStreamingDistributionConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetStreamingDistributionConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3452,8 +3308,6 @@ extension CloudFrontClient { /// - `NoSuchCachePolicy` : The cache policy does not exist. public func listCachePolicies(input: ListCachePoliciesInput) async throws -> ListCachePoliciesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listCachePolicies") @@ -3475,7 +3329,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListCachePoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListCachePoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListCachePoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3495,8 +3349,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listCloudFrontOriginAccessIdentities(input: ListCloudFrontOriginAccessIdentitiesInput) async throws -> ListCloudFrontOriginAccessIdentitiesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listCloudFrontOriginAccessIdentities") @@ -3518,7 +3370,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListCloudFrontOriginAccessIdentitiesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListCloudFrontOriginAccessIdentitiesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListCloudFrontOriginAccessIdentitiesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3539,8 +3391,6 @@ extension CloudFrontClient { /// - `NoSuchDistribution` : The specified distribution does not exist. public func listConflictingAliases(input: ListConflictingAliasesInput) async throws -> ListConflictingAliasesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listConflictingAliases") @@ -3562,7 +3412,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListConflictingAliasesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListConflictingAliasesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListConflictingAliasesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3584,8 +3434,6 @@ extension CloudFrontClient { /// - `NoSuchContinuousDeploymentPolicy` : The continuous deployment policy doesn't exist. public func listContinuousDeploymentPolicies(input: ListContinuousDeploymentPoliciesInput) async throws -> ListContinuousDeploymentPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listContinuousDeploymentPolicies") @@ -3607,7 +3455,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListContinuousDeploymentPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListContinuousDeploymentPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListContinuousDeploymentPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3627,8 +3475,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listDistributions(input: ListDistributionsInput) async throws -> ListDistributionsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listDistributions") @@ -3650,7 +3496,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDistributionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDistributionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDistributionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3672,8 +3518,6 @@ extension CloudFrontClient { /// - `NoSuchCachePolicy` : The cache policy does not exist. public func listDistributionsByCachePolicyId(input: ListDistributionsByCachePolicyIdInput) async throws -> ListDistributionsByCachePolicyIdOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listDistributionsByCachePolicyId") @@ -3695,7 +3539,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDistributionsByCachePolicyIdOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDistributionsByCachePolicyIdOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDistributionsByCachePolicyIdOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3716,8 +3560,6 @@ extension CloudFrontClient { /// - `NoSuchResource` : A resource that was specified is not valid. public func listDistributionsByKeyGroup(input: ListDistributionsByKeyGroupInput) async throws -> ListDistributionsByKeyGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listDistributionsByKeyGroup") @@ -3739,7 +3581,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDistributionsByKeyGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDistributionsByKeyGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDistributionsByKeyGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3761,8 +3603,6 @@ extension CloudFrontClient { /// - `NoSuchOriginRequestPolicy` : The origin request policy does not exist. public func listDistributionsByOriginRequestPolicyId(input: ListDistributionsByOriginRequestPolicyIdInput) async throws -> ListDistributionsByOriginRequestPolicyIdOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listDistributionsByOriginRequestPolicyId") @@ -3784,7 +3624,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDistributionsByOriginRequestPolicyIdOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDistributionsByOriginRequestPolicyIdOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDistributionsByOriginRequestPolicyIdOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3804,8 +3644,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listDistributionsByRealtimeLogConfig(input: ListDistributionsByRealtimeLogConfigInput) async throws -> ListDistributionsByRealtimeLogConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listDistributionsByRealtimeLogConfig") @@ -3824,12 +3662,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ListDistributionsByRealtimeLogConfigRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: ListDistributionsByRealtimeLogConfigInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ListDistributionsByRealtimeLogConfigRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: ListDistributionsByRealtimeLogConfigInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDistributionsByRealtimeLogConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDistributionsByRealtimeLogConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDistributionsByRealtimeLogConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3851,8 +3689,6 @@ extension CloudFrontClient { /// - `NoSuchResponseHeadersPolicy` : The response headers policy does not exist. public func listDistributionsByResponseHeadersPolicyId(input: ListDistributionsByResponseHeadersPolicyIdInput) async throws -> ListDistributionsByResponseHeadersPolicyIdOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listDistributionsByResponseHeadersPolicyId") @@ -3874,7 +3710,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDistributionsByResponseHeadersPolicyIdOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDistributionsByResponseHeadersPolicyIdOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDistributionsByResponseHeadersPolicyIdOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3895,8 +3731,6 @@ extension CloudFrontClient { /// - `InvalidWebACLId` : A web ACL ID specified is not valid. To specify a web ACL created using the latest version of WAF, use the ACL ARN, for example arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a. To specify a web ACL created using WAF Classic, use the ACL ID, for example 473e64fd-f30b-4765-81a0-62ad96dd167a. public func listDistributionsByWebACLId(input: ListDistributionsByWebACLIdInput) async throws -> ListDistributionsByWebACLIdOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listDistributionsByWebACLId") @@ -3918,7 +3752,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDistributionsByWebACLIdOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDistributionsByWebACLIdOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDistributionsByWebACLIdOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3938,8 +3772,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listFieldLevelEncryptionConfigs(input: ListFieldLevelEncryptionConfigsInput) async throws -> ListFieldLevelEncryptionConfigsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listFieldLevelEncryptionConfigs") @@ -3961,7 +3793,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListFieldLevelEncryptionConfigsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListFieldLevelEncryptionConfigsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListFieldLevelEncryptionConfigsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3981,8 +3813,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listFieldLevelEncryptionProfiles(input: ListFieldLevelEncryptionProfilesInput) async throws -> ListFieldLevelEncryptionProfilesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listFieldLevelEncryptionProfiles") @@ -4004,7 +3834,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListFieldLevelEncryptionProfilesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListFieldLevelEncryptionProfilesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListFieldLevelEncryptionProfilesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4025,8 +3855,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func listFunctions(input: ListFunctionsInput) async throws -> ListFunctionsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listFunctions") @@ -4048,7 +3876,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListFunctionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListFunctionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListFunctionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4070,8 +3898,6 @@ extension CloudFrontClient { /// - `NoSuchDistribution` : The specified distribution does not exist. public func listInvalidations(input: ListInvalidationsInput) async throws -> ListInvalidationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listInvalidations") @@ -4093,7 +3919,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListInvalidationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListInvalidationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListInvalidationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4113,8 +3939,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listKeyGroups(input: ListKeyGroupsInput) async throws -> ListKeyGroupsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listKeyGroups") @@ -4136,7 +3960,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListKeyGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListKeyGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListKeyGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4157,8 +3981,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listKeyValueStores(input: ListKeyValueStoresInput) async throws -> ListKeyValueStoresOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listKeyValueStores") @@ -4180,7 +4002,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListKeyValueStoresOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListKeyValueStoresOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListKeyValueStoresOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4200,8 +4022,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listOriginAccessControls(input: ListOriginAccessControlsInput) async throws -> ListOriginAccessControlsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listOriginAccessControls") @@ -4223,7 +4043,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListOriginAccessControlsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListOriginAccessControlsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListOriginAccessControlsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4245,8 +4065,6 @@ extension CloudFrontClient { /// - `NoSuchOriginRequestPolicy` : The origin request policy does not exist. public func listOriginRequestPolicies(input: ListOriginRequestPoliciesInput) async throws -> ListOriginRequestPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listOriginRequestPolicies") @@ -4268,7 +4086,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListOriginRequestPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListOriginRequestPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListOriginRequestPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4288,8 +4106,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listPublicKeys(input: ListPublicKeysInput) async throws -> ListPublicKeysOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listPublicKeys") @@ -4311,7 +4127,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPublicKeysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPublicKeysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPublicKeysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4333,8 +4149,6 @@ extension CloudFrontClient { /// - `NoSuchRealtimeLogConfig` : The real-time log configuration does not exist. public func listRealtimeLogConfigs(input: ListRealtimeLogConfigsInput) async throws -> ListRealtimeLogConfigsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listRealtimeLogConfigs") @@ -4356,7 +4170,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListRealtimeLogConfigsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListRealtimeLogConfigsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListRealtimeLogConfigsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4378,8 +4192,6 @@ extension CloudFrontClient { /// - `NoSuchResponseHeadersPolicy` : The response headers policy does not exist. public func listResponseHeadersPolicies(input: ListResponseHeadersPoliciesInput) async throws -> ListResponseHeadersPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listResponseHeadersPolicies") @@ -4401,7 +4213,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListResponseHeadersPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListResponseHeadersPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListResponseHeadersPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4421,8 +4233,6 @@ extension CloudFrontClient { /// - `InvalidArgument` : An argument is invalid. public func listStreamingDistributions(input: ListStreamingDistributionsInput) async throws -> ListStreamingDistributionsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listStreamingDistributions") @@ -4444,7 +4254,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStreamingDistributionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStreamingDistributionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStreamingDistributionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4467,8 +4277,6 @@ extension CloudFrontClient { /// - `NoSuchResource` : A resource that was specified is not valid. public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -4490,7 +4298,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4514,8 +4322,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func publishFunction(input: PublishFunctionInput) async throws -> PublishFunctionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "publishFunction") @@ -4537,7 +4343,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PublishFunctionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PublishFunctionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PublishFunctionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4560,8 +4366,6 @@ extension CloudFrontClient { /// - `NoSuchResource` : A resource that was specified is not valid. public func tagResource(input: TagResourceInput) async throws -> TagResourceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagResource") @@ -4581,12 +4385,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(TagResourceInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Tags", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.Tags.writingClosure(_:to:), keyPath: \.tags, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Tags", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.Tags.writingClosure(_:to:), keyPath: \.tags, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4610,8 +4414,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func testFunction(input: TestFunctionInput) async throws -> TestFunctionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "testFunction") @@ -4631,12 +4433,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(TestFunctionInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("TestFunctionRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: TestFunctionInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("TestFunctionRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: TestFunctionInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TestFunctionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TestFunctionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TestFunctionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4659,8 +4461,6 @@ extension CloudFrontClient { /// - `NoSuchResource` : A resource that was specified is not valid. public func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagResource") @@ -4680,12 +4480,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(UntagResourceInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("TagKeys", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.TagKeys.writingClosure(_:to:), keyPath: \.tagKeys, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("TagKeys", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.TagKeys.writingClosure(_:to:), keyPath: \.tagKeys, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4721,8 +4521,6 @@ extension CloudFrontClient { /// - `TooManyQueryStringsInCachePolicy` : The number of query strings in the cache policy exceeds the maximum. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func updateCachePolicy(input: UpdateCachePolicyInput) async throws -> UpdateCachePolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateCachePolicy") @@ -4742,12 +4540,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateCachePolicyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CachePolicyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:), keyPath: \.cachePolicyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CachePolicyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:), keyPath: \.cachePolicyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateCachePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateCachePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateCachePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4774,8 +4572,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func updateCloudFrontOriginAccessIdentity(input: UpdateCloudFrontOriginAccessIdentityInput) async throws -> UpdateCloudFrontOriginAccessIdentityOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateCloudFrontOriginAccessIdentity") @@ -4795,12 +4591,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateCloudFrontOriginAccessIdentityInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CloudFrontOriginAccessIdentityConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:), keyPath: \.cloudFrontOriginAccessIdentityConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CloudFrontOriginAccessIdentityConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:), keyPath: \.cloudFrontOriginAccessIdentityConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateCloudFrontOriginAccessIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateCloudFrontOriginAccessIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateCloudFrontOriginAccessIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4832,8 +4628,6 @@ extension CloudFrontClient { /// - `StagingDistributionInUse` : A continuous deployment policy for this staging distribution already exists. public func updateContinuousDeploymentPolicy(input: UpdateContinuousDeploymentPolicyInput) async throws -> UpdateContinuousDeploymentPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateContinuousDeploymentPolicy") @@ -4853,12 +4647,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateContinuousDeploymentPolicyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ContinuousDeploymentPolicyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:), keyPath: \.continuousDeploymentPolicyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ContinuousDeploymentPolicyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:), keyPath: \.continuousDeploymentPolicyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateContinuousDeploymentPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateContinuousDeploymentPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateContinuousDeploymentPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4956,8 +4750,6 @@ extension CloudFrontClient { /// - `TrustedSignerDoesNotExist` : One or more of your trusted signers don't exist. public func updateDistribution(input: UpdateDistributionInput) async throws -> UpdateDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateDistribution") @@ -4977,12 +4769,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateDistributionInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DistributionConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:), keyPath: \.distributionConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DistributionConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:), keyPath: \.distributionConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5066,8 +4858,6 @@ extension CloudFrontClient { /// - `TrustedSignerDoesNotExist` : One or more of your trusted signers don't exist. public func updateDistributionWithStagingConfig(input: UpdateDistributionWithStagingConfigInput) async throws -> UpdateDistributionWithStagingConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateDistributionWithStagingConfig") @@ -5090,7 +4880,7 @@ extension CloudFrontClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateDistributionWithStagingConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateDistributionWithStagingConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateDistributionWithStagingConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5120,8 +4910,6 @@ extension CloudFrontClient { /// - `TooManyFieldLevelEncryptionQueryArgProfiles` : The maximum number of query arg profiles for field-level encryption have been created. public func updateFieldLevelEncryptionConfig(input: UpdateFieldLevelEncryptionConfigInput) async throws -> UpdateFieldLevelEncryptionConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateFieldLevelEncryptionConfig") @@ -5141,12 +4929,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateFieldLevelEncryptionConfigInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("FieldLevelEncryptionConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:), keyPath: \.fieldLevelEncryptionConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("FieldLevelEncryptionConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:), keyPath: \.fieldLevelEncryptionConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateFieldLevelEncryptionConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateFieldLevelEncryptionConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateFieldLevelEncryptionConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5177,8 +4965,6 @@ extension CloudFrontClient { /// - `TooManyFieldLevelEncryptionFieldPatterns` : The maximum number of field patterns for field-level encryption have been created. public func updateFieldLevelEncryptionProfile(input: UpdateFieldLevelEncryptionProfileInput) async throws -> UpdateFieldLevelEncryptionProfileOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateFieldLevelEncryptionProfile") @@ -5198,12 +4984,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateFieldLevelEncryptionProfileInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("FieldLevelEncryptionProfileConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:), keyPath: \.fieldLevelEncryptionProfileConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("FieldLevelEncryptionProfileConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:), keyPath: \.fieldLevelEncryptionProfileConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateFieldLevelEncryptionProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateFieldLevelEncryptionProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateFieldLevelEncryptionProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5228,8 +5014,6 @@ extension CloudFrontClient { /// - `UnsupportedOperation` : This operation is not supported in this region. public func updateFunction(input: UpdateFunctionInput) async throws -> UpdateFunctionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateFunction") @@ -5249,12 +5033,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateFunctionInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateFunctionRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: UpdateFunctionInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateFunctionRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: UpdateFunctionInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateFunctionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateFunctionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateFunctionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5285,8 +5069,6 @@ extension CloudFrontClient { /// - `TooManyPublicKeysInKeyGroup` : The number of public keys in this key group is more than the maximum allowed. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func updateKeyGroup(input: UpdateKeyGroupInput) async throws -> UpdateKeyGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateKeyGroup") @@ -5306,12 +5088,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateKeyGroupInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("KeyGroupConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:), keyPath: \.keyGroupConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("KeyGroupConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:), keyPath: \.keyGroupConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateKeyGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateKeyGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateKeyGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5335,8 +5117,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func updateKeyValueStore(input: UpdateKeyValueStoreInput) async throws -> UpdateKeyValueStoreOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateKeyValueStore") @@ -5356,12 +5136,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateKeyValueStoreInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateKeyValueStoreRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: UpdateKeyValueStoreInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateKeyValueStoreRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: UpdateKeyValueStoreInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateKeyValueStoreOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateKeyValueStoreOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateKeyValueStoreOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5387,8 +5167,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func updateOriginAccessControl(input: UpdateOriginAccessControlInput) async throws -> UpdateOriginAccessControlOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateOriginAccessControl") @@ -5408,12 +5186,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateOriginAccessControlInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OriginAccessControlConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:), keyPath: \.originAccessControlConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OriginAccessControlConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:), keyPath: \.originAccessControlConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateOriginAccessControlOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateOriginAccessControlOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateOriginAccessControlOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5449,8 +5227,6 @@ extension CloudFrontClient { /// - `TooManyQueryStringsInOriginRequestPolicy` : The number of query strings in the origin request policy exceeds the maximum. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func updateOriginRequestPolicy(input: UpdateOriginRequestPolicyInput) async throws -> UpdateOriginRequestPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateOriginRequestPolicy") @@ -5470,12 +5246,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateOriginRequestPolicyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OriginRequestPolicyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:), keyPath: \.originRequestPolicyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OriginRequestPolicyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:), keyPath: \.originRequestPolicyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateOriginRequestPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateOriginRequestPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateOriginRequestPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5501,8 +5277,6 @@ extension CloudFrontClient { /// - `PreconditionFailed` : The precondition in one or more of the request fields evaluated to false. public func updatePublicKey(input: UpdatePublicKeyInput) async throws -> UpdatePublicKeyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updatePublicKey") @@ -5522,12 +5296,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdatePublicKeyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PublicKeyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:), keyPath: \.publicKeyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PublicKeyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:), keyPath: \.publicKeyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdatePublicKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdatePublicKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdatePublicKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5558,8 +5332,6 @@ extension CloudFrontClient { /// - `NoSuchRealtimeLogConfig` : The real-time log configuration does not exist. public func updateRealtimeLogConfig(input: UpdateRealtimeLogConfigInput) async throws -> UpdateRealtimeLogConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateRealtimeLogConfig") @@ -5578,12 +5350,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateRealtimeLogConfigRequest", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: UpdateRealtimeLogConfigInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateRealtimeLogConfigRequest", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: UpdateRealtimeLogConfigInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateRealtimeLogConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateRealtimeLogConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateRealtimeLogConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5619,8 +5391,6 @@ extension CloudFrontClient { /// - `TooManyRemoveHeadersInResponseHeadersPolicy` : The number of headers in RemoveHeadersConfig in the response headers policy exceeds the maximum. For more information, see [Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) (formerly known as limits) in the Amazon CloudFront Developer Guide. public func updateResponseHeadersPolicy(input: UpdateResponseHeadersPolicyInput) async throws -> UpdateResponseHeadersPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateResponseHeadersPolicy") @@ -5640,12 +5410,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateResponseHeadersPolicyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ResponseHeadersPolicyConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:), keyPath: \.responseHeadersPolicyConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ResponseHeadersPolicyConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:), keyPath: \.responseHeadersPolicyConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateResponseHeadersPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateResponseHeadersPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateResponseHeadersPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5678,8 +5448,6 @@ extension CloudFrontClient { /// - `TrustedSignerDoesNotExist` : One or more of your trusted signers don't exist. public func updateStreamingDistribution(input: UpdateStreamingDistributionInput) async throws -> UpdateStreamingDistributionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateStreamingDistribution") @@ -5699,12 +5467,12 @@ extension CloudFrontClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateStreamingDistributionInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("StreamingDistributionConfig", namespace: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:), keyPath: \.streamingDistributionConfig, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("StreamingDistributionConfig", namespaceDef: .init(prefix: "", uri: "http://cloudfront.amazonaws.com/doc/2020-05-31/"))), inputWritingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:), keyPath: \.streamingDistributionConfig, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateStreamingDistributionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateStreamingDistributionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateStreamingDistributionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSCloudFront/models/Models.swift b/Sources/Services/AWSCloudFront/models/Models.swift index 44d4cc8668c..d54d0217f6d 100644 --- a/Sources/Services/AWSCloudFront/models/Models.swift +++ b/Sources/Services/AWSCloudFront/models/Models.swift @@ -1,19 +1,30 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite import SmithyXML extension AccessDenied { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = AccessDenied() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension AccessDenied { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AccessDenied() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -41,60 +52,23 @@ public struct AccessDenied: ClientRuntime.ModeledError, AWSClientRuntime.AWSServ } } -struct AccessDeniedBody: Swift.Equatable { - let message: Swift.String? -} - -extension AccessDeniedBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.ActiveTrustedKeyGroups: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ActiveTrustedKeyGroups { static func writingClosure(_ value: CloudFrontClientTypes.ActiveTrustedKeyGroups?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.KGKeyPairIds.writingClosure(_:to:), memberNodeInfo: .init("KeyGroup"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct KeyGroup{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.KGKeyPairIds].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.KGKeyPairIds]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.KGKeyPairIds]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Enabled"].write(value.enabled) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.KGKeyPairIds.writingClosure(_:to:), memberNodeInfo: "KeyGroup", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ActiveTrustedKeyGroups() + value.enabled = try reader["Enabled"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.KGKeyPairIds.readingClosure, memberNodeInfo: "KeyGroup", isFlattened: false) + return value } } } @@ -125,44 +99,23 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ActiveTrustedSigners: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ActiveTrustedSigners { static func writingClosure(_ value: CloudFrontClientTypes.ActiveTrustedSigners?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Signer.writingClosure(_:to:), memberNodeInfo: .init("Signer"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Signer{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.Signer].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.Signer]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.Signer]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Enabled"].write(value.enabled) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Signer.writingClosure(_:to:), memberNodeInfo: "Signer", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ActiveTrustedSigners() + value.enabled = try reader["Enabled"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.Signer.readingClosure, memberNodeInfo: "Signer", isFlattened: false) + return value } } } @@ -193,24 +146,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.AliasICPRecordal: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cname = "CNAME" - case icpRecordalStatus = "ICPRecordalStatus" - } +extension CloudFrontClientTypes.AliasICPRecordal { static func writingClosure(_ value: CloudFrontClientTypes.AliasICPRecordal?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CNAME")].write(value.cname) - try writer[.init("ICPRecordalStatus")].write(value.icpRecordalStatus) + try writer["CNAME"].write(value.cname) + try writer["ICPRecordalStatus"].write(value.icpRecordalStatus) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cnameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cname) - cname = cnameDecoded - let icpRecordalStatusDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ICPRecordalStatus.self, forKey: .icpRecordalStatus) - icpRecordalStatus = icpRecordalStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.AliasICPRecordal() + value.cname = try reader["CNAME"].readIfPresent() + value.icpRecordalStatus = try reader["ICPRecordalStatus"].readIfPresent() + return value + } } } @@ -240,40 +191,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.Aliases: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.Aliases { static func writingClosure(_ value: CloudFrontClientTypes.Aliases?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("CNAME"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct CNAME{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "CNAME", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Aliases() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "CNAME", isFlattened: false) + return value } } } @@ -299,45 +231,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.AllowedMethods: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachedMethods = "CachedMethods" - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.AllowedMethods { static func writingClosure(_ value: CloudFrontClientTypes.AllowedMethods?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CachedMethods")].write(value.cachedMethods, writingClosure: CloudFrontClientTypes.CachedMethods.writingClosure(_:to:)) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Method.writingClosure(_:to:), memberNodeInfo: .init("Method"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Method{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.Method].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.Method]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.Method]() - for enumContainer0 in itemsContainer { - itemsBuffer?.append(enumContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["CachedMethods"].write(value.cachedMethods, writingClosure: CloudFrontClientTypes.CachedMethods.writingClosure(_:to:)) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Method.writingClosure(_:to:), memberNodeInfo: "Method", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.AllowedMethods() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.Method.readingClosure, memberNodeInfo: "Method", isFlattened: false) + value.cachedMethods = try reader["CachedMethods"].readIfPresent(readingClosure: CloudFrontClientTypes.CachedMethods.readingClosure) + return value } - let cachedMethodsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachedMethods.self, forKey: .cachedMethods) - cachedMethods = cachedMethodsDecoded } } @@ -425,8 +336,12 @@ public struct AssociateAliasInput: Swift.Equatable { } } -extension AssociateAliasOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension AssociateAliasOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AssociateAliasOutput() + } } } @@ -435,31 +350,46 @@ public struct AssociateAliasOutput: Swift.Equatable { public init() { } } -enum AssociateAliasOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AssociateAliasOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension BatchTooLarge { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = BatchTooLarge() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension BatchTooLarge { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BatchTooLarge() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -487,33 +417,27 @@ public struct BatchTooLarge: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct BatchTooLargeBody: Swift.Equatable { - let message: Swift.String? -} - -extension BatchTooLargeBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension CNAMEAlreadyExists { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CNAMEAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension CNAMEAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CNAMEAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -541,108 +465,56 @@ public struct CNAMEAlreadyExists: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct CNAMEAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension CNAMEAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.CacheBehavior: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowedMethods = "AllowedMethods" - case cachePolicyId = "CachePolicyId" - case compress = "Compress" - case defaultTTL = "DefaultTTL" - case fieldLevelEncryptionId = "FieldLevelEncryptionId" - case forwardedValues = "ForwardedValues" - case functionAssociations = "FunctionAssociations" - case lambdaFunctionAssociations = "LambdaFunctionAssociations" - case maxTTL = "MaxTTL" - case minTTL = "MinTTL" - case originRequestPolicyId = "OriginRequestPolicyId" - case pathPattern = "PathPattern" - case realtimeLogConfigArn = "RealtimeLogConfigArn" - case responseHeadersPolicyId = "ResponseHeadersPolicyId" - case smoothStreaming = "SmoothStreaming" - case targetOriginId = "TargetOriginId" - case trustedKeyGroups = "TrustedKeyGroups" - case trustedSigners = "TrustedSigners" - case viewerProtocolPolicy = "ViewerProtocolPolicy" - } +extension CloudFrontClientTypes.CacheBehavior { static func writingClosure(_ value: CloudFrontClientTypes.CacheBehavior?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AllowedMethods")].write(value.allowedMethods, writingClosure: CloudFrontClientTypes.AllowedMethods.writingClosure(_:to:)) - try writer[.init("CachePolicyId")].write(value.cachePolicyId) - try writer[.init("Compress")].write(value.compress) - try writer[.init("DefaultTTL")].write(value.defaultTTL) - try writer[.init("FieldLevelEncryptionId")].write(value.fieldLevelEncryptionId) - try writer[.init("ForwardedValues")].write(value.forwardedValues, writingClosure: CloudFrontClientTypes.ForwardedValues.writingClosure(_:to:)) - try writer[.init("FunctionAssociations")].write(value.functionAssociations, writingClosure: CloudFrontClientTypes.FunctionAssociations.writingClosure(_:to:)) - try writer[.init("LambdaFunctionAssociations")].write(value.lambdaFunctionAssociations, writingClosure: CloudFrontClientTypes.LambdaFunctionAssociations.writingClosure(_:to:)) - try writer[.init("MaxTTL")].write(value.maxTTL) - try writer[.init("MinTTL")].write(value.minTTL) - try writer[.init("OriginRequestPolicyId")].write(value.originRequestPolicyId) - try writer[.init("PathPattern")].write(value.pathPattern) - try writer[.init("RealtimeLogConfigArn")].write(value.realtimeLogConfigArn) - try writer[.init("ResponseHeadersPolicyId")].write(value.responseHeadersPolicyId) - try writer[.init("SmoothStreaming")].write(value.smoothStreaming) - try writer[.init("TargetOriginId")].write(value.targetOriginId) - try writer[.init("TrustedKeyGroups")].write(value.trustedKeyGroups, writingClosure: CloudFrontClientTypes.TrustedKeyGroups.writingClosure(_:to:)) - try writer[.init("TrustedSigners")].write(value.trustedSigners, writingClosure: CloudFrontClientTypes.TrustedSigners.writingClosure(_:to:)) - try writer[.init("ViewerProtocolPolicy")].write(value.viewerProtocolPolicy) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathPatternDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPattern) - pathPattern = pathPatternDecoded - let targetOriginIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetOriginId) - targetOriginId = targetOriginIdDecoded - let trustedSignersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TrustedSigners.self, forKey: .trustedSigners) - trustedSigners = trustedSignersDecoded - let trustedKeyGroupsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TrustedKeyGroups.self, forKey: .trustedKeyGroups) - trustedKeyGroups = trustedKeyGroupsDecoded - let viewerProtocolPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ViewerProtocolPolicy.self, forKey: .viewerProtocolPolicy) - viewerProtocolPolicy = viewerProtocolPolicyDecoded - let allowedMethodsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.AllowedMethods.self, forKey: .allowedMethods) - allowedMethods = allowedMethodsDecoded - let smoothStreamingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .smoothStreaming) - smoothStreaming = smoothStreamingDecoded - let compressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .compress) - compress = compressDecoded - let lambdaFunctionAssociationsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.LambdaFunctionAssociations.self, forKey: .lambdaFunctionAssociations) - lambdaFunctionAssociations = lambdaFunctionAssociationsDecoded - let functionAssociationsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionAssociations.self, forKey: .functionAssociations) - functionAssociations = functionAssociationsDecoded - let fieldLevelEncryptionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fieldLevelEncryptionId) - fieldLevelEncryptionId = fieldLevelEncryptionIdDecoded - let realtimeLogConfigArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .realtimeLogConfigArn) - realtimeLogConfigArn = realtimeLogConfigArnDecoded - let cachePolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cachePolicyId) - cachePolicyId = cachePolicyIdDecoded - let originRequestPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originRequestPolicyId) - originRequestPolicyId = originRequestPolicyIdDecoded - let responseHeadersPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .responseHeadersPolicyId) - responseHeadersPolicyId = responseHeadersPolicyIdDecoded - let forwardedValuesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ForwardedValues.self, forKey: .forwardedValues) - forwardedValues = forwardedValuesDecoded - let minTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minTTL) - minTTL = minTTLDecoded - let defaultTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultTTL) - defaultTTL = defaultTTLDecoded - let maxTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxTTL) - maxTTL = maxTTLDecoded + try writer["AllowedMethods"].write(value.allowedMethods, writingClosure: CloudFrontClientTypes.AllowedMethods.writingClosure(_:to:)) + try writer["CachePolicyId"].write(value.cachePolicyId) + try writer["Compress"].write(value.compress) + try writer["DefaultTTL"].write(value.defaultTTL) + try writer["FieldLevelEncryptionId"].write(value.fieldLevelEncryptionId) + try writer["ForwardedValues"].write(value.forwardedValues, writingClosure: CloudFrontClientTypes.ForwardedValues.writingClosure(_:to:)) + try writer["FunctionAssociations"].write(value.functionAssociations, writingClosure: CloudFrontClientTypes.FunctionAssociations.writingClosure(_:to:)) + try writer["LambdaFunctionAssociations"].write(value.lambdaFunctionAssociations, writingClosure: CloudFrontClientTypes.LambdaFunctionAssociations.writingClosure(_:to:)) + try writer["MaxTTL"].write(value.maxTTL) + try writer["MinTTL"].write(value.minTTL) + try writer["OriginRequestPolicyId"].write(value.originRequestPolicyId) + try writer["PathPattern"].write(value.pathPattern) + try writer["RealtimeLogConfigArn"].write(value.realtimeLogConfigArn) + try writer["ResponseHeadersPolicyId"].write(value.responseHeadersPolicyId) + try writer["SmoothStreaming"].write(value.smoothStreaming) + try writer["TargetOriginId"].write(value.targetOriginId) + try writer["TrustedKeyGroups"].write(value.trustedKeyGroups, writingClosure: CloudFrontClientTypes.TrustedKeyGroups.writingClosure(_:to:)) + try writer["TrustedSigners"].write(value.trustedSigners, writingClosure: CloudFrontClientTypes.TrustedSigners.writingClosure(_:to:)) + try writer["ViewerProtocolPolicy"].write(value.viewerProtocolPolicy) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CacheBehavior() + value.pathPattern = try reader["PathPattern"].readIfPresent() + value.targetOriginId = try reader["TargetOriginId"].readIfPresent() + value.trustedSigners = try reader["TrustedSigners"].readIfPresent(readingClosure: CloudFrontClientTypes.TrustedSigners.readingClosure) + value.trustedKeyGroups = try reader["TrustedKeyGroups"].readIfPresent(readingClosure: CloudFrontClientTypes.TrustedKeyGroups.readingClosure) + value.viewerProtocolPolicy = try reader["ViewerProtocolPolicy"].readIfPresent() + value.allowedMethods = try reader["AllowedMethods"].readIfPresent(readingClosure: CloudFrontClientTypes.AllowedMethods.readingClosure) + value.smoothStreaming = try reader["SmoothStreaming"].readIfPresent() + value.compress = try reader["Compress"].readIfPresent() + value.lambdaFunctionAssociations = try reader["LambdaFunctionAssociations"].readIfPresent(readingClosure: CloudFrontClientTypes.LambdaFunctionAssociations.readingClosure) + value.functionAssociations = try reader["FunctionAssociations"].readIfPresent(readingClosure: CloudFrontClientTypes.FunctionAssociations.readingClosure) + value.fieldLevelEncryptionId = try reader["FieldLevelEncryptionId"].readIfPresent() + value.realtimeLogConfigArn = try reader["RealtimeLogConfigArn"].readIfPresent() + value.cachePolicyId = try reader["CachePolicyId"].readIfPresent() + value.originRequestPolicyId = try reader["OriginRequestPolicyId"].readIfPresent() + value.responseHeadersPolicyId = try reader["ResponseHeadersPolicyId"].readIfPresent() + value.forwardedValues = try reader["ForwardedValues"].readIfPresent(readingClosure: CloudFrontClientTypes.ForwardedValues.readingClosure) + value.minTTL = try reader["MinTTL"].readIfPresent() + value.defaultTTL = try reader["DefaultTTL"].readIfPresent() + value.maxTTL = try reader["MaxTTL"].readIfPresent() + return value + } } } @@ -759,40 +631,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CacheBehaviors: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.CacheBehaviors { static func writingClosure(_ value: CloudFrontClientTypes.CacheBehaviors?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.CacheBehavior.writingClosure(_:to:), memberNodeInfo: .init("CacheBehavior"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct CacheBehavior{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.CacheBehavior].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.CacheBehavior]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.CacheBehavior]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.CacheBehavior.writingClosure(_:to:), memberNodeInfo: "CacheBehavior", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CacheBehaviors() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.CacheBehavior.readingClosure, memberNodeInfo: "CacheBehavior", isFlattened: false) + return value } } } @@ -818,28 +671,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CachePolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicyConfig = "CachePolicyConfig" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - } +extension CloudFrontClientTypes.CachePolicy { static func writingClosure(_ value: CloudFrontClientTypes.CachePolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CachePolicyConfig")].write(value.cachePolicyConfig, writingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["CachePolicyConfig"].write(value.cachePolicyConfig, writingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let cachePolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyConfig.self, forKey: .cachePolicyConfig) - cachePolicyConfig = cachePolicyConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CachePolicy() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.cachePolicyConfig = try reader["CachePolicyConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicyConfig.readingClosure) + return value + } } } @@ -878,16 +727,26 @@ extension CloudFrontClientTypes { } extension CachePolicyAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CachePolicyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension CachePolicyAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CachePolicyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -915,56 +774,30 @@ public struct CachePolicyAlreadyExists: ClientRuntime.ModeledError, AWSClientRun } } -struct CachePolicyAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension CachePolicyAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.CachePolicyConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case defaultTTL = "DefaultTTL" - case maxTTL = "MaxTTL" - case minTTL = "MinTTL" - case name = "Name" - case parametersInCacheKeyAndForwardedToOrigin = "ParametersInCacheKeyAndForwardedToOrigin" - } +extension CloudFrontClientTypes.CachePolicyConfig { static func writingClosure(_ value: CloudFrontClientTypes.CachePolicyConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("DefaultTTL")].write(value.defaultTTL) - try writer[.init("MaxTTL")].write(value.maxTTL) - try writer[.init("MinTTL")].write(value.minTTL) - try writer[.init("Name")].write(value.name) - try writer[.init("ParametersInCacheKeyAndForwardedToOrigin")].write(value.parametersInCacheKeyAndForwardedToOrigin, writingClosure: CloudFrontClientTypes.ParametersInCacheKeyAndForwardedToOrigin.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let defaultTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultTTL) - defaultTTL = defaultTTLDecoded - let maxTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxTTL) - maxTTL = maxTTLDecoded - let minTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minTTL) - minTTL = minTTLDecoded - let parametersInCacheKeyAndForwardedToOriginDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ParametersInCacheKeyAndForwardedToOrigin.self, forKey: .parametersInCacheKeyAndForwardedToOrigin) - parametersInCacheKeyAndForwardedToOrigin = parametersInCacheKeyAndForwardedToOriginDecoded + try writer["Comment"].write(value.comment) + try writer["DefaultTTL"].write(value.defaultTTL) + try writer["MaxTTL"].write(value.maxTTL) + try writer["MinTTL"].write(value.minTTL) + try writer["Name"].write(value.name) + try writer["ParametersInCacheKeyAndForwardedToOrigin"].write(value.parametersInCacheKeyAndForwardedToOrigin, writingClosure: CloudFrontClientTypes.ParametersInCacheKeyAndForwardedToOrigin.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CachePolicyConfig() + value.comment = try reader["Comment"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.defaultTTL = try reader["DefaultTTL"].readIfPresent() + value.maxTTL = try reader["MaxTTL"].readIfPresent() + value.minTTL = try reader["MinTTL"].readIfPresent() + value.parametersInCacheKeyAndForwardedToOrigin = try reader["ParametersInCacheKeyAndForwardedToOrigin"].readIfPresent(readingClosure: CloudFrontClientTypes.ParametersInCacheKeyAndForwardedToOrigin.readingClosure) + return value + } } } @@ -1051,24 +884,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.CachePolicyCookiesConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cookieBehavior = "CookieBehavior" - case cookies = "Cookies" - } +extension CloudFrontClientTypes.CachePolicyCookiesConfig { static func writingClosure(_ value: CloudFrontClientTypes.CachePolicyCookiesConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CookieBehavior")].write(value.cookieBehavior) - try writer[.init("Cookies")].write(value.cookies, writingClosure: CloudFrontClientTypes.CookieNames.writingClosure(_:to:)) + try writer["CookieBehavior"].write(value.cookieBehavior) + try writer["Cookies"].write(value.cookies, writingClosure: CloudFrontClientTypes.CookieNames.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cookieBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyCookieBehavior.self, forKey: .cookieBehavior) - cookieBehavior = cookieBehaviorDecoded - let cookiesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CookieNames.self, forKey: .cookies) - cookies = cookiesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CachePolicyCookiesConfig() + value.cookieBehavior = try reader["CookieBehavior"].readIfPresent() + value.cookies = try reader["Cookies"].readIfPresent(readingClosure: CloudFrontClientTypes.CookieNames.readingClosure) + return value + } } } @@ -1133,24 +964,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.CachePolicyHeadersConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case headerBehavior = "HeaderBehavior" - case headers = "Headers" - } +extension CloudFrontClientTypes.CachePolicyHeadersConfig { static func writingClosure(_ value: CloudFrontClientTypes.CachePolicyHeadersConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HeaderBehavior")].write(value.headerBehavior) - try writer[.init("Headers")].write(value.headers, writingClosure: CloudFrontClientTypes.Headers.writingClosure(_:to:)) + try writer["HeaderBehavior"].write(value.headerBehavior) + try writer["Headers"].write(value.headers, writingClosure: CloudFrontClientTypes.Headers.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let headerBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyHeaderBehavior.self, forKey: .headerBehavior) - headerBehavior = headerBehaviorDecoded - let headersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Headers.self, forKey: .headers) - headers = headersDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CachePolicyHeadersConfig() + value.headerBehavior = try reader["HeaderBehavior"].readIfPresent() + value.headers = try reader["Headers"].readIfPresent(readingClosure: CloudFrontClientTypes.Headers.readingClosure) + return value + } } } @@ -1180,16 +1009,26 @@ extension CloudFrontClientTypes { } extension CachePolicyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CachePolicyInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension CachePolicyInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CachePolicyInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1217,64 +1056,25 @@ public struct CachePolicyInUse: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct CachePolicyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension CachePolicyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.CachePolicyList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.CachePolicyList { static func writingClosure(_ value: CloudFrontClientTypes.CachePolicyList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.CachePolicySummary.writingClosure(_:to:), memberNodeInfo: .init("CachePolicySummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct CachePolicySummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.CachePolicySummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.CachePolicySummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.CachePolicySummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.CachePolicySummary.writingClosure(_:to:), memberNodeInfo: "CachePolicySummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CachePolicyList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.CachePolicySummary.readingClosure, memberNodeInfo: "CachePolicySummary", isFlattened: false) + return value } } } @@ -1347,24 +1147,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.CachePolicyQueryStringsConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case queryStringBehavior = "QueryStringBehavior" - case queryStrings = "QueryStrings" - } +extension CloudFrontClientTypes.CachePolicyQueryStringsConfig { static func writingClosure(_ value: CloudFrontClientTypes.CachePolicyQueryStringsConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("QueryStringBehavior")].write(value.queryStringBehavior) - try writer[.init("QueryStrings")].write(value.queryStrings, writingClosure: CloudFrontClientTypes.QueryStringNames.writingClosure(_:to:)) + try writer["QueryStringBehavior"].write(value.queryStringBehavior) + try writer["QueryStrings"].write(value.queryStrings, writingClosure: CloudFrontClientTypes.QueryStringNames.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let queryStringBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyQueryStringBehavior.self, forKey: .queryStringBehavior) - queryStringBehavior = queryStringBehaviorDecoded - let queryStringsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.QueryStringNames.self, forKey: .queryStrings) - queryStrings = queryStringsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CachePolicyQueryStringsConfig() + value.queryStringBehavior = try reader["QueryStringBehavior"].readIfPresent() + value.queryStrings = try reader["QueryStrings"].readIfPresent(readingClosure: CloudFrontClientTypes.QueryStringNames.readingClosure) + return value + } } } @@ -1397,24 +1195,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CachePolicySummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicy = "CachePolicy" - case type = "Type" - } +extension CloudFrontClientTypes.CachePolicySummary { static func writingClosure(_ value: CloudFrontClientTypes.CachePolicySummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CachePolicy")].write(value.cachePolicy, writingClosure: CloudFrontClientTypes.CachePolicy.writingClosure(_:to:)) - try writer[.init("Type")].write(value.type) + try writer["CachePolicy"].write(value.cachePolicy, writingClosure: CloudFrontClientTypes.CachePolicy.writingClosure(_:to:)) + try writer["Type"].write(value.type) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyType.self, forKey: .type) - type = typeDecoded - let cachePolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicy.self, forKey: .cachePolicy) - cachePolicy = cachePolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CachePolicySummary() + value.type = try reader["Type"].readIfPresent() + value.cachePolicy = try reader["CachePolicy"].readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicy.readingClosure) + return value + } } } @@ -1472,40 +1268,21 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.CachedMethods: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.CachedMethods { static func writingClosure(_ value: CloudFrontClientTypes.CachedMethods?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Method.writingClosure(_:to:), memberNodeInfo: .init("Method"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Method{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.Method].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.Method]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.Method]() - for enumContainer0 in itemsContainer { - itemsBuffer?.append(enumContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Method.writingClosure(_:to:), memberNodeInfo: "Method", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CachedMethods() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.Method.readingClosure, memberNodeInfo: "Method", isFlattened: false) + return value } } } @@ -1540,16 +1317,26 @@ extension CloudFrontClientTypes { } extension CannotChangeImmutablePublicKeyFields { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CannotChangeImmutablePublicKeyFields() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension CannotChangeImmutablePublicKeyFields { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CannotChangeImmutablePublicKeyFields() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1577,33 +1364,27 @@ public struct CannotChangeImmutablePublicKeyFields: ClientRuntime.ModeledError, } } -struct CannotChangeImmutablePublicKeyFieldsBody: Swift.Equatable { - let message: Swift.String? -} - -extension CannotChangeImmutablePublicKeyFieldsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension CannotDeleteEntityWhileInUse { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CannotDeleteEntityWhileInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension CannotDeleteEntityWhileInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CannotDeleteEntityWhileInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1631,22 +1412,6 @@ public struct CannotDeleteEntityWhileInUse: ClientRuntime.ModeledError, AWSClien } } -struct CannotDeleteEntityWhileInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension CannotDeleteEntityWhileInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudFrontClientTypes { public enum CertificateSource: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case acm @@ -1684,28 +1449,24 @@ extension CloudFrontClientTypes { public enum CloudFrontClientTypes {} -extension CloudFrontClientTypes.CloudFrontOriginAccessIdentity: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentityConfig = "CloudFrontOriginAccessIdentityConfig" - case id = "Id" - case s3CanonicalUserId = "S3CanonicalUserId" - } +extension CloudFrontClientTypes.CloudFrontOriginAccessIdentity { static func writingClosure(_ value: CloudFrontClientTypes.CloudFrontOriginAccessIdentity?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CloudFrontOriginAccessIdentityConfig")].write(value.cloudFrontOriginAccessIdentityConfig, writingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("S3CanonicalUserId")].write(value.s3CanonicalUserId) + try writer["CloudFrontOriginAccessIdentityConfig"].write(value.cloudFrontOriginAccessIdentityConfig, writingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["S3CanonicalUserId"].write(value.s3CanonicalUserId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let s3CanonicalUserIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3CanonicalUserId) - s3CanonicalUserId = s3CanonicalUserIdDecoded - let cloudFrontOriginAccessIdentityConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.self, forKey: .cloudFrontOriginAccessIdentityConfig) - cloudFrontOriginAccessIdentityConfig = cloudFrontOriginAccessIdentityConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CloudFrontOriginAccessIdentity() + value.id = try reader["Id"].readIfPresent() + value.s3CanonicalUserId = try reader["S3CanonicalUserId"].readIfPresent() + value.cloudFrontOriginAccessIdentityConfig = try reader["CloudFrontOriginAccessIdentityConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.readingClosure) + return value + } } } @@ -1736,16 +1497,26 @@ extension CloudFrontClientTypes { } extension CloudFrontOriginAccessIdentityAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontOriginAccessIdentityAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension CloudFrontOriginAccessIdentityAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CloudFrontOriginAccessIdentityAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1773,40 +1544,22 @@ public struct CloudFrontOriginAccessIdentityAlreadyExists: ClientRuntime.Modeled } } -struct CloudFrontOriginAccessIdentityAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension CloudFrontOriginAccessIdentityAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case comment = "Comment" - } +extension CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig { static func writingClosure(_ value: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Comment")].write(value.comment) + try writer["CallerReference"].write(value.callerReference) + try writer["Comment"].write(value.comment) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.comment = try reader["Comment"].readIfPresent() + return value + } } } @@ -1833,16 +1586,26 @@ extension CloudFrontClientTypes { } extension CloudFrontOriginAccessIdentityInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontOriginAccessIdentityInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension CloudFrontOriginAccessIdentityInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CloudFrontOriginAccessIdentityInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1870,72 +1633,29 @@ public struct CloudFrontOriginAccessIdentityInUse: ClientRuntime.ModeledError, A } } -struct CloudFrontOriginAccessIdentityInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension CloudFrontOriginAccessIdentityInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.CloudFrontOriginAccessIdentityList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case items = "Items" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.CloudFrontOriginAccessIdentityList { static func writingClosure(_ value: CloudFrontClientTypes.CloudFrontOriginAccessIdentityList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsTruncated")].write(value.isTruncated) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary.writingClosure(_:to:), memberNodeInfo: .init("CloudFrontOriginAccessIdentitySummary"), isFlattened: false) - try writer[.init("Marker")].write(value.marker) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct CloudFrontOriginAccessIdentitySummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["IsTruncated"].write(value.isTruncated) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary.writingClosure(_:to:), memberNodeInfo: "CloudFrontOriginAccessIdentitySummary", isFlattened: false) + try writer["Marker"].write(value.marker) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CloudFrontOriginAccessIdentityList() + value.marker = try reader["Marker"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary.readingClosure, memberNodeInfo: "CloudFrontOriginAccessIdentitySummary", isFlattened: false) + return value } } } @@ -1980,28 +1700,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case id = "Id" - case s3CanonicalUserId = "S3CanonicalUserId" - } +extension CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary { static func writingClosure(_ value: CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("Id")].write(value.id) - try writer[.init("S3CanonicalUserId")].write(value.s3CanonicalUserId) + try writer["Comment"].write(value.comment) + try writer["Id"].write(value.id) + try writer["S3CanonicalUserId"].write(value.s3CanonicalUserId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let s3CanonicalUserIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3CanonicalUserId) - s3CanonicalUserId = s3CanonicalUserIdDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CloudFrontOriginAccessIdentitySummary() + value.id = try reader["Id"].readIfPresent() + value.s3CanonicalUserId = try reader["S3CanonicalUserId"].readIfPresent() + value.comment = try reader["Comment"].readIfPresent() + return value + } } } @@ -2032,28 +1748,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ConflictingAlias: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "AccountId" - case alias = "Alias" - case distributionId = "DistributionId" - } +extension CloudFrontClientTypes.ConflictingAlias { static func writingClosure(_ value: CloudFrontClientTypes.ConflictingAlias?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccountId")].write(value.accountId) - try writer[.init("Alias")].write(value.alias) - try writer[.init("DistributionId")].write(value.distributionId) + try writer["AccountId"].write(value.accountId) + try writer["Alias"].write(value.alias) + try writer["DistributionId"].write(value.distributionId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let aliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alias) - alias = aliasDecoded - let distributionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .distributionId) - distributionId = distributionIdDecoded - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ConflictingAlias() + value.alias = try reader["Alias"].readIfPresent() + value.distributionId = try reader["DistributionId"].readIfPresent() + value.accountId = try reader["AccountId"].readIfPresent() + return value + } } } @@ -2081,48 +1793,25 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ConflictingAliasesList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ConflictingAliasesList { static func writingClosure(_ value: CloudFrontClientTypes.ConflictingAliasesList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ConflictingAlias.writingClosure(_:to:), memberNodeInfo: .init("ConflictingAlias"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct ConflictingAlias{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.ConflictingAlias].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.ConflictingAlias]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.ConflictingAlias]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ConflictingAlias.writingClosure(_:to:), memberNodeInfo: "ConflictingAlias", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ConflictingAliasesList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.ConflictingAlias.readingClosure, memberNodeInfo: "ConflictingAlias", isFlattened: false) + return value } } } @@ -2155,28 +1844,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ContentTypeProfile: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case contentType = "ContentType" - case format = "Format" - case profileId = "ProfileId" - } +extension CloudFrontClientTypes.ContentTypeProfile { static func writingClosure(_ value: CloudFrontClientTypes.ContentTypeProfile?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContentType")].write(value.contentType) - try writer[.init("Format")].write(value.format) - try writer[.init("ProfileId")].write(value.profileId) + try writer["ContentType"].write(value.contentType) + try writer["Format"].write(value.format) + try writer["ProfileId"].write(value.profileId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let formatDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Format.self, forKey: .format) - format = formatDecoded - let profileIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .profileId) - profileId = profileIdDecoded - let contentTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contentType) - contentType = contentTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContentTypeProfile() + value.format = try reader["Format"].readIfPresent() + value.profileId = try reader["ProfileId"].readIfPresent() + value.contentType = try reader["ContentType"].readIfPresent() + return value + } } } @@ -2206,24 +1891,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ContentTypeProfileConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case contentTypeProfiles = "ContentTypeProfiles" - case forwardWhenContentTypeIsUnknown = "ForwardWhenContentTypeIsUnknown" - } +extension CloudFrontClientTypes.ContentTypeProfileConfig { static func writingClosure(_ value: CloudFrontClientTypes.ContentTypeProfileConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContentTypeProfiles")].write(value.contentTypeProfiles, writingClosure: CloudFrontClientTypes.ContentTypeProfiles.writingClosure(_:to:)) - try writer[.init("ForwardWhenContentTypeIsUnknown")].write(value.forwardWhenContentTypeIsUnknown) + try writer["ContentTypeProfiles"].write(value.contentTypeProfiles, writingClosure: CloudFrontClientTypes.ContentTypeProfiles.writingClosure(_:to:)) + try writer["ForwardWhenContentTypeIsUnknown"].write(value.forwardWhenContentTypeIsUnknown) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let forwardWhenContentTypeIsUnknownDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forwardWhenContentTypeIsUnknown) - forwardWhenContentTypeIsUnknown = forwardWhenContentTypeIsUnknownDecoded - let contentTypeProfilesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContentTypeProfiles.self, forKey: .contentTypeProfiles) - contentTypeProfiles = contentTypeProfilesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContentTypeProfileConfig() + value.forwardWhenContentTypeIsUnknown = try reader["ForwardWhenContentTypeIsUnknown"].readIfPresent() + value.contentTypeProfiles = try reader["ContentTypeProfiles"].readIfPresent(readingClosure: CloudFrontClientTypes.ContentTypeProfiles.readingClosure) + return value + } } } @@ -2248,40 +1931,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ContentTypeProfiles: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ContentTypeProfiles { static func writingClosure(_ value: CloudFrontClientTypes.ContentTypeProfiles?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ContentTypeProfile.writingClosure(_:to:), memberNodeInfo: .init("ContentTypeProfile"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct ContentTypeProfile{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.ContentTypeProfile].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.ContentTypeProfile]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.ContentTypeProfile]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ContentTypeProfile.writingClosure(_:to:), memberNodeInfo: "ContentTypeProfile", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContentTypeProfiles() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.ContentTypeProfile.readingClosure, memberNodeInfo: "ContentTypeProfile", isFlattened: false) + return value } } } @@ -2307,28 +1971,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ContinuousDeploymentPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicyConfig = "ContinuousDeploymentPolicyConfig" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - } +extension CloudFrontClientTypes.ContinuousDeploymentPolicy { static func writingClosure(_ value: CloudFrontClientTypes.ContinuousDeploymentPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContinuousDeploymentPolicyConfig")].write(value.continuousDeploymentPolicyConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["ContinuousDeploymentPolicyConfig"].write(value.continuousDeploymentPolicyConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let continuousDeploymentPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.self, forKey: .continuousDeploymentPolicyConfig) - continuousDeploymentPolicyConfig = continuousDeploymentPolicyConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContinuousDeploymentPolicy() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.continuousDeploymentPolicyConfig = try reader["ContinuousDeploymentPolicyConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.readingClosure) + return value + } } } @@ -2360,16 +2020,26 @@ extension CloudFrontClientTypes { } extension ContinuousDeploymentPolicyAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ContinuousDeploymentPolicyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension ContinuousDeploymentPolicyAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ContinuousDeploymentPolicyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2397,44 +2067,24 @@ public struct ContinuousDeploymentPolicyAlreadyExists: ClientRuntime.ModeledErro } } -struct ContinuousDeploymentPolicyAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension ContinuousDeploymentPolicyAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.ContinuousDeploymentPolicyConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case stagingDistributionDnsNames = "StagingDistributionDnsNames" - case trafficConfig = "TrafficConfig" - } +extension CloudFrontClientTypes.ContinuousDeploymentPolicyConfig { static func writingClosure(_ value: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("StagingDistributionDnsNames")].write(value.stagingDistributionDnsNames, writingClosure: CloudFrontClientTypes.StagingDistributionDnsNames.writingClosure(_:to:)) - try writer[.init("TrafficConfig")].write(value.trafficConfig, writingClosure: CloudFrontClientTypes.TrafficConfig.writingClosure(_:to:)) + try writer["Enabled"].write(value.enabled) + try writer["StagingDistributionDnsNames"].write(value.stagingDistributionDnsNames, writingClosure: CloudFrontClientTypes.StagingDistributionDnsNames.writingClosure(_:to:)) + try writer["TrafficConfig"].write(value.trafficConfig, writingClosure: CloudFrontClientTypes.TrafficConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stagingDistributionDnsNamesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StagingDistributionDnsNames.self, forKey: .stagingDistributionDnsNames) - stagingDistributionDnsNames = stagingDistributionDnsNamesDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let trafficConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TrafficConfig.self, forKey: .trafficConfig) - trafficConfig = trafficConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContinuousDeploymentPolicyConfig() + value.stagingDistributionDnsNames = try reader["StagingDistributionDnsNames"].readIfPresent(readingClosure: CloudFrontClientTypes.StagingDistributionDnsNames.readingClosure) + value.enabled = try reader["Enabled"].readIfPresent() + value.trafficConfig = try reader["TrafficConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.TrafficConfig.readingClosure) + return value + } } } @@ -2465,16 +2115,26 @@ extension CloudFrontClientTypes { } extension ContinuousDeploymentPolicyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ContinuousDeploymentPolicyInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension ContinuousDeploymentPolicyInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ContinuousDeploymentPolicyInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2502,64 +2162,25 @@ public struct ContinuousDeploymentPolicyInUse: ClientRuntime.ModeledError, AWSCl } } -struct ContinuousDeploymentPolicyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension ContinuousDeploymentPolicyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.ContinuousDeploymentPolicyList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ContinuousDeploymentPolicyList { static func writingClosure(_ value: CloudFrontClientTypes.ContinuousDeploymentPolicyList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicySummary.writingClosure(_:to:), memberNodeInfo: .init("ContinuousDeploymentPolicySummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct ContinuousDeploymentPolicySummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.ContinuousDeploymentPolicySummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.ContinuousDeploymentPolicySummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.ContinuousDeploymentPolicySummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicySummary.writingClosure(_:to:), memberNodeInfo: "ContinuousDeploymentPolicySummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContinuousDeploymentPolicyList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicySummary.readingClosure, memberNodeInfo: "ContinuousDeploymentPolicySummary", isFlattened: false) + return value } } } @@ -2594,20 +2215,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ContinuousDeploymentPolicySummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicy = "ContinuousDeploymentPolicy" - } +extension CloudFrontClientTypes.ContinuousDeploymentPolicySummary { static func writingClosure(_ value: CloudFrontClientTypes.ContinuousDeploymentPolicySummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContinuousDeploymentPolicy")].write(value.continuousDeploymentPolicy, writingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicy.writingClosure(_:to:)) + try writer["ContinuousDeploymentPolicy"].write(value.continuousDeploymentPolicy, writingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicy.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuousDeploymentPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicy.self, forKey: .continuousDeploymentPolicy) - continuousDeploymentPolicy = continuousDeploymentPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContinuousDeploymentPolicySummary() + value.continuousDeploymentPolicy = try reader["ContinuousDeploymentPolicy"].readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicy.readingClosure) + return value + } } } @@ -2660,24 +2281,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.ContinuousDeploymentSingleHeaderConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case header = "Header" - case value = "Value" - } +extension CloudFrontClientTypes.ContinuousDeploymentSingleHeaderConfig { static func writingClosure(_ value: CloudFrontClientTypes.ContinuousDeploymentSingleHeaderConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Header")].write(value.header) - try writer[.init("Value")].write(value.value) + try writer["Header"].write(value.header) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let headerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .header) - header = headerDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContinuousDeploymentSingleHeaderConfig() + value.header = try reader["Header"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -2703,24 +2322,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ContinuousDeploymentSingleWeightConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sessionStickinessConfig = "SessionStickinessConfig" - case weight = "Weight" - } +extension CloudFrontClientTypes.ContinuousDeploymentSingleWeightConfig { static func writingClosure(_ value: CloudFrontClientTypes.ContinuousDeploymentSingleWeightConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("SessionStickinessConfig")].write(value.sessionStickinessConfig, writingClosure: CloudFrontClientTypes.SessionStickinessConfig.writingClosure(_:to:)) - try writer[.init("Weight")].write(value.weight) + try writer["SessionStickinessConfig"].write(value.sessionStickinessConfig, writingClosure: CloudFrontClientTypes.SessionStickinessConfig.writingClosure(_:to:)) + try writer["Weight"].write(value.weight) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let weightDecoded = try containerValues.decodeIfPresent(Swift.Float.self, forKey: .weight) - weight = weightDecoded - let sessionStickinessConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.SessionStickinessConfig.self, forKey: .sessionStickinessConfig) - sessionStickinessConfig = sessionStickinessConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ContinuousDeploymentSingleWeightConfig() + value.weight = try reader["Weight"].readIfPresent() + value.sessionStickinessConfig = try reader["SessionStickinessConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.SessionStickinessConfig.readingClosure) + return value + } } } @@ -2745,40 +2362,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CookieNames: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.CookieNames { static func writingClosure(_ value: CloudFrontClientTypes.CookieNames?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Name"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Name{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Name", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CookieNames() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Name", isFlattened: false) + return value } } } @@ -2804,24 +2402,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CookiePreference: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case forward = "Forward" - case whitelistedNames = "WhitelistedNames" - } +extension CloudFrontClientTypes.CookiePreference { static func writingClosure(_ value: CloudFrontClientTypes.CookiePreference?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Forward")].write(value.forward) - try writer[.init("WhitelistedNames")].write(value.whitelistedNames, writingClosure: CloudFrontClientTypes.CookieNames.writingClosure(_:to:)) + try writer["Forward"].write(value.forward) + try writer["WhitelistedNames"].write(value.whitelistedNames, writingClosure: CloudFrontClientTypes.CookieNames.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let forwardDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ItemSelection.self, forKey: .forward) - forward = forwardDecoded - let whitelistedNamesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CookieNames.self, forKey: .whitelistedNames) - whitelistedNames = whitelistedNamesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CookiePreference() + value.forward = try reader["Forward"].readIfPresent() + value.whitelistedNames = try reader["WhitelistedNames"].readIfPresent(readingClosure: CloudFrontClientTypes.CookieNames.readingClosure) + return value + } } } @@ -2847,15 +2443,10 @@ extension CloudFrontClientTypes { } extension CopyDistributionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case enabled = "Enabled" - } - static func writingClosure(_ value: CopyDistributionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Enabled")].write(value.enabled) + try writer["CallerReference"].write(value.callerReference) + try writer["Enabled"].write(value.enabled) } } @@ -2913,43 +2504,21 @@ public struct CopyDistributionInput: Swift.Equatable { } } -struct CopyDistributionInputBody: Swift.Equatable { - let callerReference: Swift.String? - let enabled: Swift.Bool? -} - -extension CopyDistributionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case enabled = "Enabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - } -} +extension CopyDistributionOutput { -extension CopyDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Distribution = try responseDecoder.decode(responseBody: data) - self.distribution = output - } else { - self.distribution = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CopyDistributionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.distribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Distribution.readingClosure) + return value } } } @@ -2974,103 +2543,88 @@ public struct CopyDistributionOutput: Swift.Equatable { } } -struct CopyDistributionOutputBody: Swift.Equatable { - let distribution: CloudFrontClientTypes.Distribution? -} - -extension CopyDistributionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distribution = "Distribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Distribution.self, forKey: .distribution) - distribution = distributionDecoded - } -} - -enum CopyDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DistributionAlreadyExists": return try await DistributionAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidErrorCode": return try await InvalidErrorCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidForwardCookies": return try await InvalidForwardCookies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLocationCode": return try await InvalidLocationCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOrigin": return try await InvalidOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidProtocolSettings": return try await InvalidProtocolSettings(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRelativePath": return try await InvalidRelativePath(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidResponseCode": return try await InvalidResponseCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTTLOrder": return try await InvalidTTLOrder(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidViewerCertificate": return try await InvalidViewerCertificate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidWebACLId": return try await InvalidWebACLId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOrigin": return try await NoSuchOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCertificates": return try await TooManyCertificates(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributions": return try await TooManyDistributions(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOrigins": return try await TooManyOrigins(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustedSigners": return try await TooManyTrustedSigners(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CopyDistributionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DistributionAlreadyExists": return try await DistributionAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidErrorCode": return try await InvalidErrorCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidForwardCookies": return try await InvalidForwardCookies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLocationCode": return try await InvalidLocationCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOrigin": return try await InvalidOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidProtocolSettings": return try await InvalidProtocolSettings.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRelativePath": return try await InvalidRelativePath.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidResponseCode": return try await InvalidResponseCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTTLOrder": return try await InvalidTTLOrder.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidViewerCertificate": return try await InvalidViewerCertificate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidWebACLId": return try await InvalidWebACLId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOrigin": return try await NoSuchOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCertificates": return try await TooManyCertificates.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributions": return try await TooManyDistributions.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOrigins": return try await TooManyOrigins.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrustedSigners": return try await TooManyTrustedSigners.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateCachePolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicyConfig = "CachePolicyConfig" - } - static func writingClosure(_ value: CreateCachePolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CachePolicyConfig")].write(value.cachePolicyConfig, writingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:)) + try writer["CachePolicyConfig"].write(value.cachePolicyConfig, writingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:)) } } @@ -3094,39 +2648,21 @@ public struct CreateCachePolicyInput: Swift.Equatable { } } -struct CreateCachePolicyInputBody: Swift.Equatable { - let cachePolicyConfig: CloudFrontClientTypes.CachePolicyConfig? -} - -extension CreateCachePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicyConfig = "CachePolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cachePolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyConfig.self, forKey: .cachePolicyConfig) - cachePolicyConfig = cachePolicyConfigDecoded - } -} +extension CreateCachePolicyOutput { -extension CreateCachePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CachePolicy = try responseDecoder.decode(responseBody: data) - self.cachePolicy = output - } else { - self.cachePolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCachePolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.cachePolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicy.readingClosure) + return value } } } @@ -3151,49 +2687,34 @@ public struct CreateCachePolicyOutput: Swift.Equatable { } } -struct CreateCachePolicyOutputBody: Swift.Equatable { - let cachePolicy: CloudFrontClientTypes.CachePolicy? +enum CreateCachePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CachePolicyAlreadyExists": return try await CachePolicyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCachePolicies": return try await TooManyCachePolicies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookiesInCachePolicy": return try await TooManyCookiesInCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInCachePolicy": return try await TooManyHeadersInCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringsInCachePolicy": return try await TooManyQueryStringsInCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } + } + } } -extension CreateCachePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicy = "CachePolicy" +extension CreateCloudFrontOriginAccessIdentityInput { + static func writingClosure(_ value: CreateCloudFrontOriginAccessIdentityInput?, to writer: SmithyXML.Writer) throws { + guard let value else { writer.detach(); return } + try writer["CloudFrontOriginAccessIdentityConfig"].write(value.cloudFrontOriginAccessIdentityConfig, writingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:)) } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cachePolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicy.self, forKey: .cachePolicy) - cachePolicy = cachePolicyDecoded - } -} - -enum CreateCachePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CachePolicyAlreadyExists": return try await CachePolicyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCachePolicies": return try await TooManyCachePolicies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookiesInCachePolicy": return try await TooManyCookiesInCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInCachePolicy": return try await TooManyHeadersInCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringsInCachePolicy": return try await TooManyQueryStringsInCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension CreateCloudFrontOriginAccessIdentityInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentityConfig = "CloudFrontOriginAccessIdentityConfig" - } - - static func writingClosure(_ value: CreateCloudFrontOriginAccessIdentityInput?, to writer: SmithyXML.Writer) throws { - guard let value else { writer.detach(); return } - try writer[.init("CloudFrontOriginAccessIdentityConfig")].write(value.cloudFrontOriginAccessIdentityConfig, writingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:)) - } -} +} extension CreateCloudFrontOriginAccessIdentityInput { @@ -3216,39 +2737,21 @@ public struct CreateCloudFrontOriginAccessIdentityInput: Swift.Equatable { } } -struct CreateCloudFrontOriginAccessIdentityInputBody: Swift.Equatable { - let cloudFrontOriginAccessIdentityConfig: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig? -} +extension CreateCloudFrontOriginAccessIdentityOutput { -extension CreateCloudFrontOriginAccessIdentityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentityConfig = "CloudFrontOriginAccessIdentityConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudFrontOriginAccessIdentityConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.self, forKey: .cloudFrontOriginAccessIdentityConfig) - cloudFrontOriginAccessIdentityConfig = cloudFrontOriginAccessIdentityConfigDecoded - } -} - -extension CreateCloudFrontOriginAccessIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CloudFrontOriginAccessIdentity = try responseDecoder.decode(responseBody: data) - self.cloudFrontOriginAccessIdentity = output - } else { - self.cloudFrontOriginAccessIdentity = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCloudFrontOriginAccessIdentityOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.cloudFrontOriginAccessIdentity = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentity.readingClosure) + return value } } } @@ -3274,44 +2777,29 @@ public struct CreateCloudFrontOriginAccessIdentityOutput: Swift.Equatable { } } -struct CreateCloudFrontOriginAccessIdentityOutputBody: Swift.Equatable { - let cloudFrontOriginAccessIdentity: CloudFrontClientTypes.CloudFrontOriginAccessIdentity? -} - -extension CreateCloudFrontOriginAccessIdentityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentity = "CloudFrontOriginAccessIdentity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudFrontOriginAccessIdentityDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CloudFrontOriginAccessIdentity.self, forKey: .cloudFrontOriginAccessIdentity) - cloudFrontOriginAccessIdentity = cloudFrontOriginAccessIdentityDecoded - } -} +enum CreateCloudFrontOriginAccessIdentityOutputError { -enum CreateCloudFrontOriginAccessIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CloudFrontOriginAccessIdentityAlreadyExists": return try await CloudFrontOriginAccessIdentityAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCloudFrontOriginAccessIdentities": return try await TooManyCloudFrontOriginAccessIdentities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "CloudFrontOriginAccessIdentityAlreadyExists": return try await CloudFrontOriginAccessIdentityAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCloudFrontOriginAccessIdentities": return try await TooManyCloudFrontOriginAccessIdentities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateContinuousDeploymentPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicyConfig = "ContinuousDeploymentPolicyConfig" - } - static func writingClosure(_ value: CreateContinuousDeploymentPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContinuousDeploymentPolicyConfig")].write(value.continuousDeploymentPolicyConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:)) + try writer["ContinuousDeploymentPolicyConfig"].write(value.continuousDeploymentPolicyConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:)) } } @@ -3335,39 +2823,21 @@ public struct CreateContinuousDeploymentPolicyInput: Swift.Equatable { } } -struct CreateContinuousDeploymentPolicyInputBody: Swift.Equatable { - let continuousDeploymentPolicyConfig: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig? -} - -extension CreateContinuousDeploymentPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicyConfig = "ContinuousDeploymentPolicyConfig" - } +extension CreateContinuousDeploymentPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuousDeploymentPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.self, forKey: .continuousDeploymentPolicyConfig) - continuousDeploymentPolicyConfig = continuousDeploymentPolicyConfigDecoded - } -} - -extension CreateContinuousDeploymentPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ContinuousDeploymentPolicy = try responseDecoder.decode(responseBody: data) - self.continuousDeploymentPolicy = output - } else { - self.continuousDeploymentPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateContinuousDeploymentPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.continuousDeploymentPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicy.readingClosure) + return value } } } @@ -3392,45 +2862,30 @@ public struct CreateContinuousDeploymentPolicyOutput: Swift.Equatable { } } -struct CreateContinuousDeploymentPolicyOutputBody: Swift.Equatable { - let continuousDeploymentPolicy: CloudFrontClientTypes.ContinuousDeploymentPolicy? -} - -extension CreateContinuousDeploymentPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicy = "ContinuousDeploymentPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuousDeploymentPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicy.self, forKey: .continuousDeploymentPolicy) - continuousDeploymentPolicy = continuousDeploymentPolicyDecoded - } -} +enum CreateContinuousDeploymentPolicyOutputError { -enum CreateContinuousDeploymentPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ContinuousDeploymentPolicyAlreadyExists": return try await ContinuousDeploymentPolicyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StagingDistributionInUse": return try await StagingDistributionInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyContinuousDeploymentPolicies": return try await TooManyContinuousDeploymentPolicies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ContinuousDeploymentPolicyAlreadyExists": return try await ContinuousDeploymentPolicyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "StagingDistributionInUse": return try await StagingDistributionInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyContinuousDeploymentPolicies": return try await TooManyContinuousDeploymentPolicies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateDistributionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionConfig = "DistributionConfig" - } - static func writingClosure(_ value: CreateDistributionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DistributionConfig")].write(value.distributionConfig, writingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:)) + try writer["DistributionConfig"].write(value.distributionConfig, writingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:)) } } @@ -3455,39 +2910,21 @@ public struct CreateDistributionInput: Swift.Equatable { } } -struct CreateDistributionInputBody: Swift.Equatable { - let distributionConfig: CloudFrontClientTypes.DistributionConfig? -} +extension CreateDistributionOutput { -extension CreateDistributionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionConfig = "DistributionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionConfig.self, forKey: .distributionConfig) - distributionConfig = distributionConfigDecoded - } -} - -extension CreateDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Distribution = try responseDecoder.decode(responseBody: data) - self.distribution = output - } else { - self.distribution = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateDistributionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.distribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Distribution.readingClosure) + return value } } } @@ -3513,104 +2950,89 @@ public struct CreateDistributionOutput: Swift.Equatable { } } -struct CreateDistributionOutputBody: Swift.Equatable { - let distribution: CloudFrontClientTypes.Distribution? -} - -extension CreateDistributionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distribution = "Distribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Distribution.self, forKey: .distribution) - distribution = distributionDecoded - } -} - -enum CreateDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ContinuousDeploymentPolicyInUse": return try await ContinuousDeploymentPolicyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DistributionAlreadyExists": return try await DistributionAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalOriginAccessConfiguration": return try await IllegalOriginAccessConfiguration(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDomainNameForOriginAccessControl": return try await InvalidDomainNameForOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidErrorCode": return try await InvalidErrorCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidForwardCookies": return try await InvalidForwardCookies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLocationCode": return try await InvalidLocationCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOrigin": return try await InvalidOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidProtocolSettings": return try await InvalidProtocolSettings(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRelativePath": return try await InvalidRelativePath(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidResponseCode": return try await InvalidResponseCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTTLOrder": return try await InvalidTTLOrder(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidViewerCertificate": return try await InvalidViewerCertificate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidWebACLId": return try await InvalidWebACLId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOrigin": return try await NoSuchOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCertificates": return try await TooManyCertificates(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributions": return try await TooManyDistributions(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOrigins": return try await TooManyOrigins(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustedSigners": return try await TooManyTrustedSigners(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateDistributionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ContinuousDeploymentPolicyInUse": return try await ContinuousDeploymentPolicyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DistributionAlreadyExists": return try await DistributionAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalOriginAccessConfiguration": return try await IllegalOriginAccessConfiguration.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDomainNameForOriginAccessControl": return try await InvalidDomainNameForOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidErrorCode": return try await InvalidErrorCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidForwardCookies": return try await InvalidForwardCookies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLocationCode": return try await InvalidLocationCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOrigin": return try await InvalidOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidProtocolSettings": return try await InvalidProtocolSettings.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRelativePath": return try await InvalidRelativePath.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidResponseCode": return try await InvalidResponseCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTTLOrder": return try await InvalidTTLOrder.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidViewerCertificate": return try await InvalidViewerCertificate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidWebACLId": return try await InvalidWebACLId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOrigin": return try await NoSuchOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCertificates": return try await TooManyCertificates.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributions": return try await TooManyDistributions.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOrigins": return try await TooManyOrigins.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrustedSigners": return try await TooManyTrustedSigners.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateDistributionWithTagsInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionConfigWithTags = "DistributionConfigWithTags" - } - static func writingClosure(_ value: CreateDistributionWithTagsInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DistributionConfigWithTags")].write(value.distributionConfigWithTags, writingClosure: CloudFrontClientTypes.DistributionConfigWithTags.writingClosure(_:to:)) + try writer["DistributionConfigWithTags"].write(value.distributionConfigWithTags, writingClosure: CloudFrontClientTypes.DistributionConfigWithTags.writingClosure(_:to:)) } } @@ -3644,39 +3066,21 @@ public struct CreateDistributionWithTagsInput: Swift.Equatable { } } -struct CreateDistributionWithTagsInputBody: Swift.Equatable { - let distributionConfigWithTags: CloudFrontClientTypes.DistributionConfigWithTags? -} - -extension CreateDistributionWithTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionConfigWithTags = "DistributionConfigWithTags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionConfigWithTagsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionConfigWithTags.self, forKey: .distributionConfigWithTags) - distributionConfigWithTags = distributionConfigWithTagsDecoded - } -} +extension CreateDistributionWithTagsOutput { -extension CreateDistributionWithTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Distribution = try responseDecoder.decode(responseBody: data) - self.distribution = output - } else { - self.distribution = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateDistributionWithTagsOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.distribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Distribution.readingClosure) + return value } } } @@ -3702,105 +3106,90 @@ public struct CreateDistributionWithTagsOutput: Swift.Equatable { } } -struct CreateDistributionWithTagsOutputBody: Swift.Equatable { - let distribution: CloudFrontClientTypes.Distribution? -} - -extension CreateDistributionWithTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distribution = "Distribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Distribution.self, forKey: .distribution) - distribution = distributionDecoded - } -} - -enum CreateDistributionWithTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ContinuousDeploymentPolicyInUse": return try await ContinuousDeploymentPolicyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DistributionAlreadyExists": return try await DistributionAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalOriginAccessConfiguration": return try await IllegalOriginAccessConfiguration(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDomainNameForOriginAccessControl": return try await InvalidDomainNameForOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidErrorCode": return try await InvalidErrorCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidForwardCookies": return try await InvalidForwardCookies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLocationCode": return try await InvalidLocationCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOrigin": return try await InvalidOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidProtocolSettings": return try await InvalidProtocolSettings(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRelativePath": return try await InvalidRelativePath(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidResponseCode": return try await InvalidResponseCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagging": return try await InvalidTagging(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTTLOrder": return try await InvalidTTLOrder(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidViewerCertificate": return try await InvalidViewerCertificate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidWebACLId": return try await InvalidWebACLId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOrigin": return try await NoSuchOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCertificates": return try await TooManyCertificates(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributions": return try await TooManyDistributions(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOrigins": return try await TooManyOrigins(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustedSigners": return try await TooManyTrustedSigners(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateDistributionWithTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ContinuousDeploymentPolicyInUse": return try await ContinuousDeploymentPolicyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DistributionAlreadyExists": return try await DistributionAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalOriginAccessConfiguration": return try await IllegalOriginAccessConfiguration.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDomainNameForOriginAccessControl": return try await InvalidDomainNameForOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidErrorCode": return try await InvalidErrorCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidForwardCookies": return try await InvalidForwardCookies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLocationCode": return try await InvalidLocationCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOrigin": return try await InvalidOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidProtocolSettings": return try await InvalidProtocolSettings.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRelativePath": return try await InvalidRelativePath.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidResponseCode": return try await InvalidResponseCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTagging": return try await InvalidTagging.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTTLOrder": return try await InvalidTTLOrder.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidViewerCertificate": return try await InvalidViewerCertificate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidWebACLId": return try await InvalidWebACLId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOrigin": return try await NoSuchOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCertificates": return try await TooManyCertificates.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributions": return try await TooManyDistributions.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOrigins": return try await TooManyOrigins.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrustedSigners": return try await TooManyTrustedSigners.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateFieldLevelEncryptionConfigInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionConfig = "FieldLevelEncryptionConfig" - } - static func writingClosure(_ value: CreateFieldLevelEncryptionConfigInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FieldLevelEncryptionConfig")].write(value.fieldLevelEncryptionConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:)) + try writer["FieldLevelEncryptionConfig"].write(value.fieldLevelEncryptionConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:)) } } @@ -3824,39 +3213,21 @@ public struct CreateFieldLevelEncryptionConfigInput: Swift.Equatable { } } -struct CreateFieldLevelEncryptionConfigInputBody: Swift.Equatable { - let fieldLevelEncryptionConfig: CloudFrontClientTypes.FieldLevelEncryptionConfig? -} - -extension CreateFieldLevelEncryptionConfigInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionConfig = "FieldLevelEncryptionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionConfig.self, forKey: .fieldLevelEncryptionConfig) - fieldLevelEncryptionConfig = fieldLevelEncryptionConfigDecoded - } -} +extension CreateFieldLevelEncryptionConfigOutput { -extension CreateFieldLevelEncryptionConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryption = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryption = output - } else { - self.fieldLevelEncryption = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateFieldLevelEncryptionConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.fieldLevelEncryption = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryption.readingClosure) + return value } } } @@ -3881,47 +3252,32 @@ public struct CreateFieldLevelEncryptionConfigOutput: Swift.Equatable { } } -struct CreateFieldLevelEncryptionConfigOutputBody: Swift.Equatable { - let fieldLevelEncryption: CloudFrontClientTypes.FieldLevelEncryption? -} - -extension CreateFieldLevelEncryptionConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryption = "FieldLevelEncryption" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryption.self, forKey: .fieldLevelEncryption) - fieldLevelEncryption = fieldLevelEncryptionDecoded - } -} - -enum CreateFieldLevelEncryptionConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "FieldLevelEncryptionConfigAlreadyExists": return try await FieldLevelEncryptionConfigAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "QueryArgProfileEmpty": return try await QueryArgProfileEmpty(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionConfigs": return try await TooManyFieldLevelEncryptionConfigs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionContentTypeProfiles": return try await TooManyFieldLevelEncryptionContentTypeProfiles(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionQueryArgProfiles": return try await TooManyFieldLevelEncryptionQueryArgProfiles(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateFieldLevelEncryptionConfigOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "FieldLevelEncryptionConfigAlreadyExists": return try await FieldLevelEncryptionConfigAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "QueryArgProfileEmpty": return try await QueryArgProfileEmpty.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionConfigs": return try await TooManyFieldLevelEncryptionConfigs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionContentTypeProfiles": return try await TooManyFieldLevelEncryptionContentTypeProfiles.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionQueryArgProfiles": return try await TooManyFieldLevelEncryptionQueryArgProfiles.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateFieldLevelEncryptionProfileInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfileConfig = "FieldLevelEncryptionProfileConfig" - } - static func writingClosure(_ value: CreateFieldLevelEncryptionProfileInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FieldLevelEncryptionProfileConfig")].write(value.fieldLevelEncryptionProfileConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:)) + try writer["FieldLevelEncryptionProfileConfig"].write(value.fieldLevelEncryptionProfileConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:)) } } @@ -3945,39 +3301,21 @@ public struct CreateFieldLevelEncryptionProfileInput: Swift.Equatable { } } -struct CreateFieldLevelEncryptionProfileInputBody: Swift.Equatable { - let fieldLevelEncryptionProfileConfig: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig? -} +extension CreateFieldLevelEncryptionProfileOutput { -extension CreateFieldLevelEncryptionProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfileConfig = "FieldLevelEncryptionProfileConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionProfileConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.self, forKey: .fieldLevelEncryptionProfileConfig) - fieldLevelEncryptionProfileConfig = fieldLevelEncryptionProfileConfigDecoded - } -} - -extension CreateFieldLevelEncryptionProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryptionProfile = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryptionProfile = output - } else { - self.fieldLevelEncryptionProfile = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateFieldLevelEncryptionProfileOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.fieldLevelEncryptionProfile = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfile.readingClosure) + return value } } } @@ -4002,35 +3340,24 @@ public struct CreateFieldLevelEncryptionProfileOutput: Swift.Equatable { } } -struct CreateFieldLevelEncryptionProfileOutputBody: Swift.Equatable { - let fieldLevelEncryptionProfile: CloudFrontClientTypes.FieldLevelEncryptionProfile? -} - -extension CreateFieldLevelEncryptionProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfile = "FieldLevelEncryptionProfile" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionProfileDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionProfile.self, forKey: .fieldLevelEncryptionProfile) - fieldLevelEncryptionProfile = fieldLevelEncryptionProfileDecoded - } -} - -enum CreateFieldLevelEncryptionProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "FieldLevelEncryptionProfileAlreadyExists": return try await FieldLevelEncryptionProfileAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FieldLevelEncryptionProfileSizeExceeded": return try await FieldLevelEncryptionProfileSizeExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchPublicKey": return try await NoSuchPublicKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionEncryptionEntities": return try await TooManyFieldLevelEncryptionEncryptionEntities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionFieldPatterns": return try await TooManyFieldLevelEncryptionFieldPatterns(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionProfiles": return try await TooManyFieldLevelEncryptionProfiles(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateFieldLevelEncryptionProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "FieldLevelEncryptionProfileAlreadyExists": return try await FieldLevelEncryptionProfileAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "FieldLevelEncryptionProfileSizeExceeded": return try await FieldLevelEncryptionProfileSizeExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchPublicKey": return try await NoSuchPublicKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionEncryptionEntities": return try await TooManyFieldLevelEncryptionEncryptionEntities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionFieldPatterns": return try await TooManyFieldLevelEncryptionFieldPatterns.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionProfiles": return try await TooManyFieldLevelEncryptionProfiles.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4041,17 +3368,11 @@ extension CreateFunctionInput: Swift.CustomDebugStringConvertible { } extension CreateFunctionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionCode = "FunctionCode" - case functionConfig = "FunctionConfig" - case name = "Name" - } - static func writingClosure(_ value: CreateFunctionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FunctionCode")].write(value.functionCode) - try writer[.init("FunctionConfig")].write(value.functionConfig, writingClosure: CloudFrontClientTypes.FunctionConfig.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) + try writer["FunctionCode"].write(value.functionCode) + try writer["FunctionConfig"].write(value.functionConfig, writingClosure: CloudFrontClientTypes.FunctionConfig.writingClosure(_:to:)) + try writer["Name"].write(value.name) } } @@ -4085,55 +3406,21 @@ public struct CreateFunctionInput: Swift.Equatable { } } -struct CreateFunctionInputBody: Swift.Equatable { - let name: Swift.String? - let functionConfig: CloudFrontClientTypes.FunctionConfig? - let functionCode: ClientRuntime.Data? -} - -extension CreateFunctionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionCode = "FunctionCode" - case functionConfig = "FunctionConfig" - case name = "Name" - } +extension CreateFunctionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let functionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionConfig.self, forKey: .functionConfig) - functionConfig = functionConfigDecoded - if containerValues.contains(.functionCode) { - do { - let functionCodeDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .functionCode) - functionCode = functionCodeDecoded - } catch { - functionCode = "".data(using: .utf8) + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateFunctionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue } - } else { - functionCode = nil - } - } -} - -extension CreateFunctionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FunctionSummary = try responseDecoder.decode(responseBody: data) - self.functionSummary = output - } else { - self.functionSummary = nil + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.functionSummary = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FunctionSummary.readingClosure) + return value } } } @@ -4158,44 +3445,29 @@ public struct CreateFunctionOutput: Swift.Equatable { } } -struct CreateFunctionOutputBody: Swift.Equatable { - let functionSummary: CloudFrontClientTypes.FunctionSummary? -} - -extension CreateFunctionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionSummary = "FunctionSummary" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionSummaryDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionSummary.self, forKey: .functionSummary) - functionSummary = functionSummaryDecoded - } -} +enum CreateFunctionOutputError { -enum CreateFunctionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "FunctionAlreadyExists": return try await FunctionAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FunctionSizeLimitExceeded": return try await FunctionSizeLimitExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFunctions": return try await TooManyFunctions(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "FunctionAlreadyExists": return try await FunctionAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "FunctionSizeLimitExceeded": return try await FunctionSizeLimitExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFunctions": return try await TooManyFunctions.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateInvalidationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case invalidationBatch = "InvalidationBatch" - } - static func writingClosure(_ value: CreateInvalidationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("InvalidationBatch")].write(value.invalidationBatch, writingClosure: CloudFrontClientTypes.InvalidationBatch.writingClosure(_:to:)) + try writer["InvalidationBatch"].write(value.invalidationBatch, writingClosure: CloudFrontClientTypes.InvalidationBatch.writingClosure(_:to:)) } } @@ -4228,34 +3500,18 @@ public struct CreateInvalidationInput: Swift.Equatable { } } -struct CreateInvalidationInputBody: Swift.Equatable { - let invalidationBatch: CloudFrontClientTypes.InvalidationBatch? -} - -extension CreateInvalidationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case invalidationBatch = "InvalidationBatch" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let invalidationBatchDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.InvalidationBatch.self, forKey: .invalidationBatch) - invalidationBatch = invalidationBatchDecoded - } -} +extension CreateInvalidationOutput { -extension CreateInvalidationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Invalidation = try responseDecoder.decode(responseBody: data) - self.invalidation = output - } else { - self.invalidation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateInvalidationOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.invalidation = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Invalidation.readingClosure) + return value } } } @@ -4277,46 +3533,31 @@ public struct CreateInvalidationOutput: Swift.Equatable { } } -struct CreateInvalidationOutputBody: Swift.Equatable { - let invalidation: CloudFrontClientTypes.Invalidation? -} - -extension CreateInvalidationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case invalidation = "Invalidation" - } +enum CreateInvalidationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let invalidationDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Invalidation.self, forKey: .invalidation) - invalidation = invalidationDecoded - } -} - -enum CreateInvalidationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BatchTooLarge": return try await BatchTooLarge(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyInvalidationsInProgress": return try await TooManyInvalidationsInProgress(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "BatchTooLarge": return try await BatchTooLarge.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyInvalidationsInProgress": return try await TooManyInvalidationsInProgress.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateKeyGroupInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroupConfig = "KeyGroupConfig" - } - static func writingClosure(_ value: CreateKeyGroupInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KeyGroupConfig")].write(value.keyGroupConfig, writingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:)) + try writer["KeyGroupConfig"].write(value.keyGroupConfig, writingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:)) } } @@ -4340,39 +3581,21 @@ public struct CreateKeyGroupInput: Swift.Equatable { } } -struct CreateKeyGroupInputBody: Swift.Equatable { - let keyGroupConfig: CloudFrontClientTypes.KeyGroupConfig? -} - -extension CreateKeyGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroupConfig = "KeyGroupConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroupConfig.self, forKey: .keyGroupConfig) - keyGroupConfig = keyGroupConfigDecoded - } -} +extension CreateKeyGroupOutput { -extension CreateKeyGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyGroup = try responseDecoder.decode(responseBody: data) - self.keyGroup = output - } else { - self.keyGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateKeyGroupOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.keyGroup = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyGroup.readingClosure) + return value } } } @@ -4397,47 +3620,30 @@ public struct CreateKeyGroupOutput: Swift.Equatable { } } -struct CreateKeyGroupOutputBody: Swift.Equatable { - let keyGroup: CloudFrontClientTypes.KeyGroup? -} - -extension CreateKeyGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroup = "KeyGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroup.self, forKey: .keyGroup) - keyGroup = keyGroupDecoded - } -} +enum CreateKeyGroupOutputError { -enum CreateKeyGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KeyGroupAlreadyExists": return try await KeyGroupAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyKeyGroups": return try await TooManyKeyGroups(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyPublicKeysInKeyGroup": return try await TooManyPublicKeysInKeyGroup(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "KeyGroupAlreadyExists": return try await KeyGroupAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyKeyGroups": return try await TooManyKeyGroups.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyPublicKeysInKeyGroup": return try await TooManyPublicKeysInKeyGroup.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateKeyValueStoreInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case importSource = "ImportSource" - case name = "Name" - } - static func writingClosure(_ value: CreateKeyValueStoreInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("ImportSource")].write(value.importSource, writingClosure: CloudFrontClientTypes.ImportSource.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) + try writer["Comment"].write(value.comment) + try writer["ImportSource"].write(value.importSource, writingClosure: CloudFrontClientTypes.ImportSource.writingClosure(_:to:)) + try writer["Name"].write(value.name) } } @@ -4469,47 +3675,21 @@ public struct CreateKeyValueStoreInput: Swift.Equatable { } } -struct CreateKeyValueStoreInputBody: Swift.Equatable { - let name: Swift.String? - let comment: Swift.String? - let importSource: CloudFrontClientTypes.ImportSource? -} +extension CreateKeyValueStoreOutput { -extension CreateKeyValueStoreInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case importSource = "ImportSource" - case name = "Name" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let importSourceDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ImportSource.self, forKey: .importSource) - importSource = importSourceDecoded - } -} - -extension CreateKeyValueStoreOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyValueStore = try responseDecoder.decode(responseBody: data) - self.keyValueStore = output - } else { - self.keyValueStore = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateKeyValueStoreOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.keyValueStore = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyValueStore.readingClosure) + return value } } } @@ -4534,44 +3714,29 @@ public struct CreateKeyValueStoreOutput: Swift.Equatable { } } -struct CreateKeyValueStoreOutputBody: Swift.Equatable { - let keyValueStore: CloudFrontClientTypes.KeyValueStore? -} - -extension CreateKeyValueStoreOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyValueStore = "KeyValueStore" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyValueStoreDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyValueStore.self, forKey: .keyValueStore) - keyValueStore = keyValueStoreDecoded - } -} +enum CreateKeyValueStoreOutputError { -enum CreateKeyValueStoreOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityLimitExceeded": return try await EntityLimitExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntitySizeLimitExceeded": return try await EntitySizeLimitExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "EntityLimitExceeded": return try await EntityLimitExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "EntitySizeLimitExceeded": return try await EntitySizeLimitExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateMonitoringSubscriptionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case monitoringSubscription = "MonitoringSubscription" - } - static func writingClosure(_ value: CreateMonitoringSubscriptionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("MonitoringSubscription")].write(value.monitoringSubscription, writingClosure: CloudFrontClientTypes.MonitoringSubscription.writingClosure(_:to:)) + try writer["MonitoringSubscription"].write(value.monitoringSubscription, writingClosure: CloudFrontClientTypes.MonitoringSubscription.writingClosure(_:to:)) } } @@ -4603,29 +3768,15 @@ public struct CreateMonitoringSubscriptionInput: Swift.Equatable { } } -struct CreateMonitoringSubscriptionInputBody: Swift.Equatable { - let monitoringSubscription: CloudFrontClientTypes.MonitoringSubscription? -} - -extension CreateMonitoringSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case monitoringSubscription = "MonitoringSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let monitoringSubscriptionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.MonitoringSubscription.self, forKey: .monitoringSubscription) - monitoringSubscription = monitoringSubscriptionDecoded - } -} +extension CreateMonitoringSubscriptionOutput { -extension CreateMonitoringSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.MonitoringSubscription = try responseDecoder.decode(responseBody: data) - self.monitoringSubscription = output - } else { - self.monitoringSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateMonitoringSubscriptionOutput() + value.monitoringSubscription = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.MonitoringSubscription.readingClosure) + return value } } } @@ -4642,43 +3793,28 @@ public struct CreateMonitoringSubscriptionOutput: Swift.Equatable { } } -struct CreateMonitoringSubscriptionOutputBody: Swift.Equatable { - let monitoringSubscription: CloudFrontClientTypes.MonitoringSubscription? -} - -extension CreateMonitoringSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case monitoringSubscription = "MonitoringSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let monitoringSubscriptionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.MonitoringSubscription.self, forKey: .monitoringSubscription) - monitoringSubscription = monitoringSubscriptionDecoded - } -} +enum CreateMonitoringSubscriptionOutputError { -enum CreateMonitoringSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MonitoringSubscriptionAlreadyExists": return try await MonitoringSubscriptionAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MonitoringSubscriptionAlreadyExists": return try await MonitoringSubscriptionAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateOriginAccessControlInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControlConfig = "OriginAccessControlConfig" - } - static func writingClosure(_ value: CreateOriginAccessControlInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OriginAccessControlConfig")].write(value.originAccessControlConfig, writingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:)) + try writer["OriginAccessControlConfig"].write(value.originAccessControlConfig, writingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:)) } } @@ -4702,39 +3838,21 @@ public struct CreateOriginAccessControlInput: Swift.Equatable { } } -struct CreateOriginAccessControlInputBody: Swift.Equatable { - let originAccessControlConfig: CloudFrontClientTypes.OriginAccessControlConfig? -} - -extension CreateOriginAccessControlInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControlConfig = "OriginAccessControlConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originAccessControlConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlConfig.self, forKey: .originAccessControlConfig) - originAccessControlConfig = originAccessControlConfigDecoded - } -} +extension CreateOriginAccessControlOutput { -extension CreateOriginAccessControlOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginAccessControl = try responseDecoder.decode(responseBody: data) - self.originAccessControl = output - } else { - self.originAccessControl = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateOriginAccessControlOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.originAccessControl = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginAccessControl.readingClosure) + return value } } } @@ -4759,42 +3877,27 @@ public struct CreateOriginAccessControlOutput: Swift.Equatable { } } -struct CreateOriginAccessControlOutputBody: Swift.Equatable { - let originAccessControl: CloudFrontClientTypes.OriginAccessControl? -} - -extension CreateOriginAccessControlOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControl = "OriginAccessControl" - } +enum CreateOriginAccessControlOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originAccessControlDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControl.self, forKey: .originAccessControl) - originAccessControl = originAccessControlDecoded - } -} - -enum CreateOriginAccessControlOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OriginAccessControlAlreadyExists": return try await OriginAccessControlAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginAccessControls": return try await TooManyOriginAccessControls(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "OriginAccessControlAlreadyExists": return try await OriginAccessControlAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginAccessControls": return try await TooManyOriginAccessControls.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateOriginRequestPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicyConfig = "OriginRequestPolicyConfig" - } - static func writingClosure(_ value: CreateOriginRequestPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OriginRequestPolicyConfig")].write(value.originRequestPolicyConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:)) + try writer["OriginRequestPolicyConfig"].write(value.originRequestPolicyConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:)) } } @@ -4818,39 +3921,21 @@ public struct CreateOriginRequestPolicyInput: Swift.Equatable { } } -struct CreateOriginRequestPolicyInputBody: Swift.Equatable { - let originRequestPolicyConfig: CloudFrontClientTypes.OriginRequestPolicyConfig? -} - -extension CreateOriginRequestPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicyConfig = "OriginRequestPolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originRequestPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyConfig.self, forKey: .originRequestPolicyConfig) - originRequestPolicyConfig = originRequestPolicyConfigDecoded - } -} +extension CreateOriginRequestPolicyOutput { -extension CreateOriginRequestPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginRequestPolicy = try responseDecoder.decode(responseBody: data) - self.originRequestPolicy = output - } else { - self.originRequestPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateOriginRequestPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.originRequestPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicy.readingClosure) + return value } } } @@ -4875,47 +3960,32 @@ public struct CreateOriginRequestPolicyOutput: Swift.Equatable { } } -struct CreateOriginRequestPolicyOutputBody: Swift.Equatable { - let originRequestPolicy: CloudFrontClientTypes.OriginRequestPolicy? -} - -extension CreateOriginRequestPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicy = "OriginRequestPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originRequestPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicy.self, forKey: .originRequestPolicy) - originRequestPolicy = originRequestPolicyDecoded - } -} - -enum CreateOriginRequestPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OriginRequestPolicyAlreadyExists": return try await OriginRequestPolicyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookiesInOriginRequestPolicy": return try await TooManyCookiesInOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInOriginRequestPolicy": return try await TooManyHeadersInOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginRequestPolicies": return try await TooManyOriginRequestPolicies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringsInOriginRequestPolicy": return try await TooManyQueryStringsInOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateOriginRequestPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "OriginRequestPolicyAlreadyExists": return try await OriginRequestPolicyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookiesInOriginRequestPolicy": return try await TooManyCookiesInOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInOriginRequestPolicy": return try await TooManyHeadersInOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginRequestPolicies": return try await TooManyOriginRequestPolicies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringsInOriginRequestPolicy": return try await TooManyQueryStringsInOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreatePublicKeyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKeyConfig = "PublicKeyConfig" - } - static func writingClosure(_ value: CreatePublicKeyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("PublicKeyConfig")].write(value.publicKeyConfig, writingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:)) + try writer["PublicKeyConfig"].write(value.publicKeyConfig, writingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:)) } } @@ -4939,39 +4009,21 @@ public struct CreatePublicKeyInput: Swift.Equatable { } } -struct CreatePublicKeyInputBody: Swift.Equatable { - let publicKeyConfig: CloudFrontClientTypes.PublicKeyConfig? -} - -extension CreatePublicKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKeyConfig = "PublicKeyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicKeyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PublicKeyConfig.self, forKey: .publicKeyConfig) - publicKeyConfig = publicKeyConfigDecoded - } -} +extension CreatePublicKeyOutput { -extension CreatePublicKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.PublicKey = try responseDecoder.decode(responseBody: data) - self.publicKey = output - } else { - self.publicKey = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreatePublicKeyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.publicKey = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.PublicKey.readingClosure) + return value } } } @@ -4996,48 +4048,30 @@ public struct CreatePublicKeyOutput: Swift.Equatable { } } -struct CreatePublicKeyOutputBody: Swift.Equatable { - let publicKey: CloudFrontClientTypes.PublicKey? -} - -extension CreatePublicKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKey = "PublicKey" - } +enum CreatePublicKeyOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicKeyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PublicKey.self, forKey: .publicKey) - publicKey = publicKeyDecoded - } -} - -enum CreatePublicKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PublicKeyAlreadyExists": return try await PublicKeyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyPublicKeys": return try await TooManyPublicKeys(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PublicKeyAlreadyExists": return try await PublicKeyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyPublicKeys": return try await TooManyPublicKeys.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateRealtimeLogConfigInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endPoints = "EndPoints" - case fields = "Fields" - case name = "Name" - case samplingRate = "SamplingRate" - } - static func writingClosure(_ value: CreateRealtimeLogConfigInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EndPoints")].writeList(value.endPoints, memberWritingClosure: CloudFrontClientTypes.EndPoint.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("Fields")].writeList(value.fields, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Field"), isFlattened: false) - try writer[.init("Name")].write(value.name) - try writer[.init("SamplingRate")].write(value.samplingRate) + try writer["EndPoints"].writeList(value.endPoints, memberWritingClosure: CloudFrontClientTypes.EndPoint.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["Fields"].writeList(value.fields, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Field", isFlattened: false) + try writer["Name"].write(value.name) + try writer["SamplingRate"].write(value.samplingRate) } } @@ -5076,76 +4110,15 @@ public struct CreateRealtimeLogConfigInput: Swift.Equatable { } } -struct CreateRealtimeLogConfigInputBody: Swift.Equatable { - let endPoints: [CloudFrontClientTypes.EndPoint]? - let fields: [Swift.String]? - let name: Swift.String? - let samplingRate: Swift.Int? -} - -extension CreateRealtimeLogConfigInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endPoints = "EndPoints" - case fields = "Fields" - case name = "Name" - case samplingRate = "SamplingRate" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.endPoints) { - struct KeyVal0{struct member{}} - let endPointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .endPoints) - if let endPointsWrappedContainer = endPointsWrappedContainer { - let endPointsContainer = try endPointsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.EndPoint].self, forKey: .member) - var endPointsBuffer:[CloudFrontClientTypes.EndPoint]? = nil - if let endPointsContainer = endPointsContainer { - endPointsBuffer = [CloudFrontClientTypes.EndPoint]() - for structureContainer0 in endPointsContainer { - endPointsBuffer?.append(structureContainer0) - } - } - endPoints = endPointsBuffer - } else { - endPoints = [] - } - } else { - endPoints = nil - } - if containerValues.contains(.fields) { - struct KeyVal0{struct Field{}} - let fieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fields) - if let fieldsWrappedContainer = fieldsWrappedContainer { - let fieldsContainer = try fieldsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fieldsBuffer:[Swift.String]? = nil - if let fieldsContainer = fieldsContainer { - fieldsBuffer = [Swift.String]() - for stringContainer0 in fieldsContainer { - fieldsBuffer?.append(stringContainer0) - } - } - fields = fieldsBuffer - } else { - fields = [] - } - } else { - fields = nil - } - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let samplingRateDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .samplingRate) - samplingRate = samplingRateDecoded - } -} +extension CreateRealtimeLogConfigOutput { -extension CreateRealtimeLogConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateRealtimeLogConfigOutputBody = try responseDecoder.decode(responseBody: data) - self.realtimeLogConfig = output.realtimeLogConfig - } else { - self.realtimeLogConfig = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateRealtimeLogConfigOutput() + value.realtimeLogConfig = try reader["RealtimeLogConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.RealtimeLogConfig.readingClosure) + return value } } } @@ -5162,43 +4135,28 @@ public struct CreateRealtimeLogConfigOutput: Swift.Equatable { } } -struct CreateRealtimeLogConfigOutputBody: Swift.Equatable { - let realtimeLogConfig: CloudFrontClientTypes.RealtimeLogConfig? -} +enum CreateRealtimeLogConfigOutputError { -extension CreateRealtimeLogConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case realtimeLogConfig = "RealtimeLogConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let realtimeLogConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.RealtimeLogConfig.self, forKey: .realtimeLogConfig) - realtimeLogConfig = realtimeLogConfigDecoded - } -} - -enum CreateRealtimeLogConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RealtimeLogConfigAlreadyExists": return try await RealtimeLogConfigAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRealtimeLogConfigs": return try await TooManyRealtimeLogConfigs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "RealtimeLogConfigAlreadyExists": return try await RealtimeLogConfigAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRealtimeLogConfigs": return try await TooManyRealtimeLogConfigs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateResponseHeadersPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicyConfig = "ResponseHeadersPolicyConfig" - } - static func writingClosure(_ value: CreateResponseHeadersPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ResponseHeadersPolicyConfig")].write(value.responseHeadersPolicyConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:)) + try writer["ResponseHeadersPolicyConfig"].write(value.responseHeadersPolicyConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:)) } } @@ -5222,39 +4180,21 @@ public struct CreateResponseHeadersPolicyInput: Swift.Equatable { } } -struct CreateResponseHeadersPolicyInputBody: Swift.Equatable { - let responseHeadersPolicyConfig: CloudFrontClientTypes.ResponseHeadersPolicyConfig? -} - -extension CreateResponseHeadersPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicyConfig = "ResponseHeadersPolicyConfig" - } +extension CreateResponseHeadersPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let responseHeadersPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyConfig.self, forKey: .responseHeadersPolicyConfig) - responseHeadersPolicyConfig = responseHeadersPolicyConfigDecoded - } -} - -extension CreateResponseHeadersPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ResponseHeadersPolicy = try responseDecoder.decode(responseBody: data) - self.responseHeadersPolicy = output - } else { - self.responseHeadersPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateResponseHeadersPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.responseHeadersPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicy.readingClosure) + return value } } } @@ -5279,47 +4219,32 @@ public struct CreateResponseHeadersPolicyOutput: Swift.Equatable { } } -struct CreateResponseHeadersPolicyOutputBody: Swift.Equatable { - let responseHeadersPolicy: CloudFrontClientTypes.ResponseHeadersPolicy? -} - -extension CreateResponseHeadersPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicy = "ResponseHeadersPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let responseHeadersPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicy.self, forKey: .responseHeadersPolicy) - responseHeadersPolicy = responseHeadersPolicyDecoded - } -} - -enum CreateResponseHeadersPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResponseHeadersPolicyAlreadyExists": return try await ResponseHeadersPolicyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooLongCSPInResponseHeadersPolicy": return try await TooLongCSPInResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCustomHeadersInResponseHeadersPolicy": return try await TooManyCustomHeadersInResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRemoveHeadersInResponseHeadersPolicy": return try await TooManyRemoveHeadersInResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyResponseHeadersPolicies": return try await TooManyResponseHeadersPolicies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateResponseHeadersPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ResponseHeadersPolicyAlreadyExists": return try await ResponseHeadersPolicyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooLongCSPInResponseHeadersPolicy": return try await TooLongCSPInResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCustomHeadersInResponseHeadersPolicy": return try await TooManyCustomHeadersInResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRemoveHeadersInResponseHeadersPolicy": return try await TooManyRemoveHeadersInResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyResponseHeadersPolicies": return try await TooManyResponseHeadersPolicies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateStreamingDistributionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionConfig = "StreamingDistributionConfig" - } - static func writingClosure(_ value: CreateStreamingDistributionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StreamingDistributionConfig")].write(value.streamingDistributionConfig, writingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:)) + try writer["StreamingDistributionConfig"].write(value.streamingDistributionConfig, writingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:)) } } @@ -5344,39 +4269,21 @@ public struct CreateStreamingDistributionInput: Swift.Equatable { } } -struct CreateStreamingDistributionInputBody: Swift.Equatable { - let streamingDistributionConfig: CloudFrontClientTypes.StreamingDistributionConfig? -} - -extension CreateStreamingDistributionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionConfig = "StreamingDistributionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistributionConfig.self, forKey: .streamingDistributionConfig) - streamingDistributionConfig = streamingDistributionConfigDecoded - } -} +extension CreateStreamingDistributionOutput { -extension CreateStreamingDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.StreamingDistribution = try responseDecoder.decode(responseBody: data) - self.streamingDistribution = output - } else { - self.streamingDistribution = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateStreamingDistributionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.streamingDistribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.StreamingDistribution.readingClosure) + return value } } } @@ -5402,52 +4309,37 @@ public struct CreateStreamingDistributionOutput: Swift.Equatable { } } -struct CreateStreamingDistributionOutputBody: Swift.Equatable { - let streamingDistribution: CloudFrontClientTypes.StreamingDistribution? -} - -extension CreateStreamingDistributionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistribution = "StreamingDistribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistribution.self, forKey: .streamingDistribution) - streamingDistribution = streamingDistributionDecoded - } -} - -enum CreateStreamingDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOrigin": return try await InvalidOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StreamingDistributionAlreadyExists": return try await StreamingDistributionAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyStreamingDistributionCNAMEs": return try await TooManyStreamingDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyStreamingDistributions": return try await TooManyStreamingDistributions(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustedSigners": return try await TooManyTrustedSigners(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateStreamingDistributionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOrigin": return try await InvalidOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "StreamingDistributionAlreadyExists": return try await StreamingDistributionAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyStreamingDistributionCNAMEs": return try await TooManyStreamingDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyStreamingDistributions": return try await TooManyStreamingDistributions.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrustedSigners": return try await TooManyTrustedSigners.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateStreamingDistributionWithTagsInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionConfigWithTags = "StreamingDistributionConfigWithTags" - } - static func writingClosure(_ value: CreateStreamingDistributionWithTagsInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StreamingDistributionConfigWithTags")].write(value.streamingDistributionConfigWithTags, writingClosure: CloudFrontClientTypes.StreamingDistributionConfigWithTags.writingClosure(_:to:)) + try writer["StreamingDistributionConfigWithTags"].write(value.streamingDistributionConfigWithTags, writingClosure: CloudFrontClientTypes.StreamingDistributionConfigWithTags.writingClosure(_:to:)) } } @@ -5481,39 +4373,21 @@ public struct CreateStreamingDistributionWithTagsInput: Swift.Equatable { } } -struct CreateStreamingDistributionWithTagsInputBody: Swift.Equatable { - let streamingDistributionConfigWithTags: CloudFrontClientTypes.StreamingDistributionConfigWithTags? -} +extension CreateStreamingDistributionWithTagsOutput { -extension CreateStreamingDistributionWithTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionConfigWithTags = "StreamingDistributionConfigWithTags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionConfigWithTagsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistributionConfigWithTags.self, forKey: .streamingDistributionConfigWithTags) - streamingDistributionConfigWithTags = streamingDistributionConfigWithTagsDecoded - } -} - -extension CreateStreamingDistributionWithTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.StreamingDistribution = try responseDecoder.decode(responseBody: data) - self.streamingDistribution = output - } else { - self.streamingDistribution = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateStreamingDistributionWithTagsOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.streamingDistribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.StreamingDistribution.readingClosure) + return value } } } @@ -5539,71 +4413,54 @@ public struct CreateStreamingDistributionWithTagsOutput: Swift.Equatable { } } -struct CreateStreamingDistributionWithTagsOutputBody: Swift.Equatable { - let streamingDistribution: CloudFrontClientTypes.StreamingDistribution? -} - -extension CreateStreamingDistributionWithTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistribution = "StreamingDistribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistribution.self, forKey: .streamingDistribution) - streamingDistribution = streamingDistributionDecoded - } -} - -enum CreateStreamingDistributionWithTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOrigin": return try await InvalidOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagging": return try await InvalidTagging(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StreamingDistributionAlreadyExists": return try await StreamingDistributionAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyStreamingDistributionCNAMEs": return try await TooManyStreamingDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyStreamingDistributions": return try await TooManyStreamingDistributions(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustedSigners": return try await TooManyTrustedSigners(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateStreamingDistributionWithTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOrigin": return try await InvalidOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTagging": return try await InvalidTagging.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "StreamingDistributionAlreadyExists": return try await StreamingDistributionAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyStreamingDistributionCNAMEs": return try await TooManyStreamingDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyStreamingDistributions": return try await TooManyStreamingDistributions.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrustedSigners": return try await TooManyTrustedSigners.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CloudFrontClientTypes.CustomErrorResponse: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errorCachingMinTTL = "ErrorCachingMinTTL" - case errorCode = "ErrorCode" - case responseCode = "ResponseCode" - case responsePagePath = "ResponsePagePath" - } +extension CloudFrontClientTypes.CustomErrorResponse { static func writingClosure(_ value: CloudFrontClientTypes.CustomErrorResponse?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ErrorCachingMinTTL")].write(value.errorCachingMinTTL) - try writer[.init("ErrorCode")].write(value.errorCode) - try writer[.init("ResponseCode")].write(value.responseCode) - try writer[.init("ResponsePagePath")].write(value.responsePagePath) + try writer["ErrorCachingMinTTL"].write(value.errorCachingMinTTL) + try writer["ErrorCode"].write(value.errorCode) + try writer["ResponseCode"].write(value.responseCode) + try writer["ResponsePagePath"].write(value.responsePagePath) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorCodeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .errorCode) - errorCode = errorCodeDecoded - let responsePagePathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .responsePagePath) - responsePagePath = responsePagePathDecoded - let responseCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .responseCode) - responseCode = responseCodeDecoded - let errorCachingMinTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .errorCachingMinTTL) - errorCachingMinTTL = errorCachingMinTTLDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CustomErrorResponse() + value.errorCode = try reader["ErrorCode"].readIfPresent() + value.responsePagePath = try reader["ResponsePagePath"].readIfPresent() + value.responseCode = try reader["ResponseCode"].readIfPresent() + value.errorCachingMinTTL = try reader["ErrorCachingMinTTL"].readIfPresent() + return value + } } } @@ -5659,40 +4516,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CustomErrorResponses: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.CustomErrorResponses { static func writingClosure(_ value: CloudFrontClientTypes.CustomErrorResponses?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.CustomErrorResponse.writingClosure(_:to:), memberNodeInfo: .init("CustomErrorResponse"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct CustomErrorResponse{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.CustomErrorResponse].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.CustomErrorResponse]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.CustomErrorResponse]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.CustomErrorResponse.writingClosure(_:to:), memberNodeInfo: "CustomErrorResponse", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CustomErrorResponses() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.CustomErrorResponse.readingClosure, memberNodeInfo: "CustomErrorResponse", isFlattened: false) + return value } } } @@ -5725,40 +4563,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CustomHeaders: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.CustomHeaders { static func writingClosure(_ value: CloudFrontClientTypes.CustomHeaders?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginCustomHeader.writingClosure(_:to:), memberNodeInfo: .init("OriginCustomHeader"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct OriginCustomHeader{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.OriginCustomHeader].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.OriginCustomHeader]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.OriginCustomHeader]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginCustomHeader.writingClosure(_:to:), memberNodeInfo: "OriginCustomHeader", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CustomHeaders() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.OriginCustomHeader.readingClosure, memberNodeInfo: "OriginCustomHeader", isFlattened: false) + return value } } } @@ -5784,40 +4603,30 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.CustomOriginConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case httpPort = "HTTPPort" - case httpsPort = "HTTPSPort" - case originKeepaliveTimeout = "OriginKeepaliveTimeout" - case originProtocolPolicy = "OriginProtocolPolicy" - case originReadTimeout = "OriginReadTimeout" - case originSslProtocols = "OriginSslProtocols" - } +extension CloudFrontClientTypes.CustomOriginConfig { static func writingClosure(_ value: CloudFrontClientTypes.CustomOriginConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HTTPPort")].write(value.httpPort) - try writer[.init("HTTPSPort")].write(value.httpsPort) - try writer[.init("OriginKeepaliveTimeout")].write(value.originKeepaliveTimeout) - try writer[.init("OriginProtocolPolicy")].write(value.originProtocolPolicy) - try writer[.init("OriginReadTimeout")].write(value.originReadTimeout) - try writer[.init("OriginSslProtocols")].write(value.originSslProtocols, writingClosure: CloudFrontClientTypes.OriginSslProtocols.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let httpPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .httpPort) - httpPort = httpPortDecoded - let httpsPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .httpsPort) - httpsPort = httpsPortDecoded - let originProtocolPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginProtocolPolicy.self, forKey: .originProtocolPolicy) - originProtocolPolicy = originProtocolPolicyDecoded - let originSslProtocolsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginSslProtocols.self, forKey: .originSslProtocols) - originSslProtocols = originSslProtocolsDecoded - let originReadTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .originReadTimeout) - originReadTimeout = originReadTimeoutDecoded - let originKeepaliveTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .originKeepaliveTimeout) - originKeepaliveTimeout = originKeepaliveTimeoutDecoded + try writer["HTTPPort"].write(value.httpPort) + try writer["HTTPSPort"].write(value.httpsPort) + try writer["OriginKeepaliveTimeout"].write(value.originKeepaliveTimeout) + try writer["OriginProtocolPolicy"].write(value.originProtocolPolicy) + try writer["OriginReadTimeout"].write(value.originReadTimeout) + try writer["OriginSslProtocols"].write(value.originSslProtocols, writingClosure: CloudFrontClientTypes.OriginSslProtocols.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.CustomOriginConfig() + value.httpPort = try reader["HTTPPort"].readIfPresent() + value.httpsPort = try reader["HTTPSPort"].readIfPresent() + value.originProtocolPolicy = try reader["OriginProtocolPolicy"].readIfPresent() + value.originSslProtocols = try reader["OriginSslProtocols"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginSslProtocols.readingClosure) + value.originReadTimeout = try reader["OriginReadTimeout"].readIfPresent() + value.originKeepaliveTimeout = try reader["OriginKeepaliveTimeout"].readIfPresent() + return value + } } } @@ -5866,88 +4675,54 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.DefaultCacheBehavior: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowedMethods = "AllowedMethods" - case cachePolicyId = "CachePolicyId" - case compress = "Compress" - case defaultTTL = "DefaultTTL" - case fieldLevelEncryptionId = "FieldLevelEncryptionId" - case forwardedValues = "ForwardedValues" - case functionAssociations = "FunctionAssociations" - case lambdaFunctionAssociations = "LambdaFunctionAssociations" - case maxTTL = "MaxTTL" - case minTTL = "MinTTL" - case originRequestPolicyId = "OriginRequestPolicyId" - case realtimeLogConfigArn = "RealtimeLogConfigArn" - case responseHeadersPolicyId = "ResponseHeadersPolicyId" - case smoothStreaming = "SmoothStreaming" - case targetOriginId = "TargetOriginId" - case trustedKeyGroups = "TrustedKeyGroups" - case trustedSigners = "TrustedSigners" - case viewerProtocolPolicy = "ViewerProtocolPolicy" - } +extension CloudFrontClientTypes.DefaultCacheBehavior { static func writingClosure(_ value: CloudFrontClientTypes.DefaultCacheBehavior?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AllowedMethods")].write(value.allowedMethods, writingClosure: CloudFrontClientTypes.AllowedMethods.writingClosure(_:to:)) - try writer[.init("CachePolicyId")].write(value.cachePolicyId) - try writer[.init("Compress")].write(value.compress) - try writer[.init("DefaultTTL")].write(value.defaultTTL) - try writer[.init("FieldLevelEncryptionId")].write(value.fieldLevelEncryptionId) - try writer[.init("ForwardedValues")].write(value.forwardedValues, writingClosure: CloudFrontClientTypes.ForwardedValues.writingClosure(_:to:)) - try writer[.init("FunctionAssociations")].write(value.functionAssociations, writingClosure: CloudFrontClientTypes.FunctionAssociations.writingClosure(_:to:)) - try writer[.init("LambdaFunctionAssociations")].write(value.lambdaFunctionAssociations, writingClosure: CloudFrontClientTypes.LambdaFunctionAssociations.writingClosure(_:to:)) - try writer[.init("MaxTTL")].write(value.maxTTL) - try writer[.init("MinTTL")].write(value.minTTL) - try writer[.init("OriginRequestPolicyId")].write(value.originRequestPolicyId) - try writer[.init("RealtimeLogConfigArn")].write(value.realtimeLogConfigArn) - try writer[.init("ResponseHeadersPolicyId")].write(value.responseHeadersPolicyId) - try writer[.init("SmoothStreaming")].write(value.smoothStreaming) - try writer[.init("TargetOriginId")].write(value.targetOriginId) - try writer[.init("TrustedKeyGroups")].write(value.trustedKeyGroups, writingClosure: CloudFrontClientTypes.TrustedKeyGroups.writingClosure(_:to:)) - try writer[.init("TrustedSigners")].write(value.trustedSigners, writingClosure: CloudFrontClientTypes.TrustedSigners.writingClosure(_:to:)) - try writer[.init("ViewerProtocolPolicy")].write(value.viewerProtocolPolicy) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetOriginIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetOriginId) - targetOriginId = targetOriginIdDecoded - let trustedSignersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TrustedSigners.self, forKey: .trustedSigners) - trustedSigners = trustedSignersDecoded - let trustedKeyGroupsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TrustedKeyGroups.self, forKey: .trustedKeyGroups) - trustedKeyGroups = trustedKeyGroupsDecoded - let viewerProtocolPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ViewerProtocolPolicy.self, forKey: .viewerProtocolPolicy) - viewerProtocolPolicy = viewerProtocolPolicyDecoded - let allowedMethodsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.AllowedMethods.self, forKey: .allowedMethods) - allowedMethods = allowedMethodsDecoded - let smoothStreamingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .smoothStreaming) - smoothStreaming = smoothStreamingDecoded - let compressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .compress) - compress = compressDecoded - let lambdaFunctionAssociationsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.LambdaFunctionAssociations.self, forKey: .lambdaFunctionAssociations) - lambdaFunctionAssociations = lambdaFunctionAssociationsDecoded - let functionAssociationsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionAssociations.self, forKey: .functionAssociations) - functionAssociations = functionAssociationsDecoded - let fieldLevelEncryptionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fieldLevelEncryptionId) - fieldLevelEncryptionId = fieldLevelEncryptionIdDecoded - let realtimeLogConfigArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .realtimeLogConfigArn) - realtimeLogConfigArn = realtimeLogConfigArnDecoded - let cachePolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cachePolicyId) - cachePolicyId = cachePolicyIdDecoded - let originRequestPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originRequestPolicyId) - originRequestPolicyId = originRequestPolicyIdDecoded - let responseHeadersPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .responseHeadersPolicyId) - responseHeadersPolicyId = responseHeadersPolicyIdDecoded - let forwardedValuesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ForwardedValues.self, forKey: .forwardedValues) - forwardedValues = forwardedValuesDecoded - let minTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minTTL) - minTTL = minTTLDecoded - let defaultTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultTTL) - defaultTTL = defaultTTLDecoded - let maxTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxTTL) - maxTTL = maxTTLDecoded + try writer["AllowedMethods"].write(value.allowedMethods, writingClosure: CloudFrontClientTypes.AllowedMethods.writingClosure(_:to:)) + try writer["CachePolicyId"].write(value.cachePolicyId) + try writer["Compress"].write(value.compress) + try writer["DefaultTTL"].write(value.defaultTTL) + try writer["FieldLevelEncryptionId"].write(value.fieldLevelEncryptionId) + try writer["ForwardedValues"].write(value.forwardedValues, writingClosure: CloudFrontClientTypes.ForwardedValues.writingClosure(_:to:)) + try writer["FunctionAssociations"].write(value.functionAssociations, writingClosure: CloudFrontClientTypes.FunctionAssociations.writingClosure(_:to:)) + try writer["LambdaFunctionAssociations"].write(value.lambdaFunctionAssociations, writingClosure: CloudFrontClientTypes.LambdaFunctionAssociations.writingClosure(_:to:)) + try writer["MaxTTL"].write(value.maxTTL) + try writer["MinTTL"].write(value.minTTL) + try writer["OriginRequestPolicyId"].write(value.originRequestPolicyId) + try writer["RealtimeLogConfigArn"].write(value.realtimeLogConfigArn) + try writer["ResponseHeadersPolicyId"].write(value.responseHeadersPolicyId) + try writer["SmoothStreaming"].write(value.smoothStreaming) + try writer["TargetOriginId"].write(value.targetOriginId) + try writer["TrustedKeyGroups"].write(value.trustedKeyGroups, writingClosure: CloudFrontClientTypes.TrustedKeyGroups.writingClosure(_:to:)) + try writer["TrustedSigners"].write(value.trustedSigners, writingClosure: CloudFrontClientTypes.TrustedSigners.writingClosure(_:to:)) + try writer["ViewerProtocolPolicy"].write(value.viewerProtocolPolicy) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.DefaultCacheBehavior() + value.targetOriginId = try reader["TargetOriginId"].readIfPresent() + value.trustedSigners = try reader["TrustedSigners"].readIfPresent(readingClosure: CloudFrontClientTypes.TrustedSigners.readingClosure) + value.trustedKeyGroups = try reader["TrustedKeyGroups"].readIfPresent(readingClosure: CloudFrontClientTypes.TrustedKeyGroups.readingClosure) + value.viewerProtocolPolicy = try reader["ViewerProtocolPolicy"].readIfPresent() + value.allowedMethods = try reader["AllowedMethods"].readIfPresent(readingClosure: CloudFrontClientTypes.AllowedMethods.readingClosure) + value.smoothStreaming = try reader["SmoothStreaming"].readIfPresent() + value.compress = try reader["Compress"].readIfPresent() + value.lambdaFunctionAssociations = try reader["LambdaFunctionAssociations"].readIfPresent(readingClosure: CloudFrontClientTypes.LambdaFunctionAssociations.readingClosure) + value.functionAssociations = try reader["FunctionAssociations"].readIfPresent(readingClosure: CloudFrontClientTypes.FunctionAssociations.readingClosure) + value.fieldLevelEncryptionId = try reader["FieldLevelEncryptionId"].readIfPresent() + value.realtimeLogConfigArn = try reader["RealtimeLogConfigArn"].readIfPresent() + value.cachePolicyId = try reader["CachePolicyId"].readIfPresent() + value.originRequestPolicyId = try reader["OriginRequestPolicyId"].readIfPresent() + value.responseHeadersPolicyId = try reader["ResponseHeadersPolicyId"].readIfPresent() + value.forwardedValues = try reader["ForwardedValues"].readIfPresent(readingClosure: CloudFrontClientTypes.ForwardedValues.readingClosure) + value.minTTL = try reader["MinTTL"].readIfPresent() + value.defaultTTL = try reader["DefaultTTL"].readIfPresent() + value.maxTTL = try reader["MaxTTL"].readIfPresent() + return value + } } } @@ -6097,8 +4872,12 @@ public struct DeleteCachePolicyInput: Swift.Equatable { } } -extension DeleteCachePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteCachePolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCachePolicyOutput() + } } } @@ -6107,17 +4886,22 @@ public struct DeleteCachePolicyOutput: Swift.Equatable { public init() { } } -enum DeleteCachePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CachePolicyInUse": return try await CachePolicyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalDelete": return try await IllegalDelete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteCachePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CachePolicyInUse": return try await CachePolicyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalDelete": return try await IllegalDelete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6161,8 +4945,12 @@ public struct DeleteCloudFrontOriginAccessIdentityInput: Swift.Equatable { } } -extension DeleteCloudFrontOriginAccessIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteCloudFrontOriginAccessIdentityOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCloudFrontOriginAccessIdentityOutput() + } } } @@ -6171,16 +4959,21 @@ public struct DeleteCloudFrontOriginAccessIdentityOutput: Swift.Equatable { public init() { } } -enum DeleteCloudFrontOriginAccessIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CloudFrontOriginAccessIdentityInUse": return try await CloudFrontOriginAccessIdentityInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCloudFrontOriginAccessIdentity": return try await NoSuchCloudFrontOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteCloudFrontOriginAccessIdentityOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CloudFrontOriginAccessIdentityInUse": return try await CloudFrontOriginAccessIdentityInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCloudFrontOriginAccessIdentity": return try await NoSuchCloudFrontOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6223,8 +5016,12 @@ public struct DeleteContinuousDeploymentPolicyInput: Swift.Equatable { } } -extension DeleteContinuousDeploymentPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteContinuousDeploymentPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteContinuousDeploymentPolicyOutput() + } } } @@ -6233,17 +5030,22 @@ public struct DeleteContinuousDeploymentPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteContinuousDeploymentPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ContinuousDeploymentPolicyInUse": return try await ContinuousDeploymentPolicyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteContinuousDeploymentPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ContinuousDeploymentPolicyInUse": return try await ContinuousDeploymentPolicyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6306,8 +5108,12 @@ public struct DeleteDistributionInput: Swift.Equatable { } } -extension DeleteDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteDistributionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDistributionOutput() + } } } @@ -6316,16 +5122,21 @@ public struct DeleteDistributionOutput: Swift.Equatable { public init() { } } -enum DeleteDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DistributionNotDisabled": return try await DistributionNotDisabled(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDistributionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DistributionNotDisabled": return try await DistributionNotDisabled.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6368,8 +5179,12 @@ public struct DeleteFieldLevelEncryptionConfigInput: Swift.Equatable { } } -extension DeleteFieldLevelEncryptionConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteFieldLevelEncryptionConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteFieldLevelEncryptionConfigOutput() + } } } @@ -6378,16 +5193,21 @@ public struct DeleteFieldLevelEncryptionConfigOutput: Swift.Equatable { public init() { } } -enum DeleteFieldLevelEncryptionConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FieldLevelEncryptionConfigInUse": return try await FieldLevelEncryptionConfigInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteFieldLevelEncryptionConfigOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "FieldLevelEncryptionConfigInUse": return try await FieldLevelEncryptionConfigInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6430,8 +5250,12 @@ public struct DeleteFieldLevelEncryptionProfileInput: Swift.Equatable { } } -extension DeleteFieldLevelEncryptionProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteFieldLevelEncryptionProfileOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteFieldLevelEncryptionProfileOutput() + } } } @@ -6440,16 +5264,21 @@ public struct DeleteFieldLevelEncryptionProfileOutput: Swift.Equatable { public init() { } } -enum DeleteFieldLevelEncryptionProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FieldLevelEncryptionProfileInUse": return try await FieldLevelEncryptionProfileInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteFieldLevelEncryptionProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "FieldLevelEncryptionProfileInUse": return try await FieldLevelEncryptionProfileInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6493,8 +5322,12 @@ public struct DeleteFunctionInput: Swift.Equatable { } } -extension DeleteFunctionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteFunctionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteFunctionOutput() + } } } @@ -6503,16 +5336,21 @@ public struct DeleteFunctionOutput: Swift.Equatable { public init() { } } -enum DeleteFunctionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "FunctionInUse": return try await FunctionInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFunctionExists": return try await NoSuchFunctionExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteFunctionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "FunctionInUse": return try await FunctionInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFunctionExists": return try await NoSuchFunctionExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6555,8 +5393,12 @@ public struct DeleteKeyGroupInput: Swift.Equatable { } } -extension DeleteKeyGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteKeyGroupOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteKeyGroupOutput() + } } } @@ -6565,15 +5407,20 @@ public struct DeleteKeyGroupOutput: Swift.Equatable { public init() { } } -enum DeleteKeyGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResource": return try await NoSuchResource(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteKeyGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResource": return try await NoSuchResource.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ResourceInUse": return try await ResourceInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6617,8 +5464,12 @@ public struct DeleteKeyValueStoreInput: Swift.Equatable { } } -extension DeleteKeyValueStoreOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteKeyValueStoreOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteKeyValueStoreOutput() + } } } @@ -6627,16 +5478,21 @@ public struct DeleteKeyValueStoreOutput: Swift.Equatable { public init() { } } -enum DeleteKeyValueStoreOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CannotDeleteEntityWhileInUse": return try await CannotDeleteEntityWhileInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityNotFound": return try await EntityNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteKeyValueStoreOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CannotDeleteEntityWhileInUse": return try await CannotDeleteEntityWhileInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "EntityNotFound": return try await EntityNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6664,8 +5520,12 @@ public struct DeleteMonitoringSubscriptionInput: Swift.Equatable { } } -extension DeleteMonitoringSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteMonitoringSubscriptionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteMonitoringSubscriptionOutput() + } } } @@ -6674,15 +5534,20 @@ public struct DeleteMonitoringSubscriptionOutput: Swift.Equatable { public init() { } } -enum DeleteMonitoringSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchMonitoringSubscription": return try await NoSuchMonitoringSubscription(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteMonitoringSubscriptionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchMonitoringSubscription": return try await NoSuchMonitoringSubscription.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6725,8 +5590,12 @@ public struct DeleteOriginAccessControlInput: Swift.Equatable { } } -extension DeleteOriginAccessControlOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteOriginAccessControlOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteOriginAccessControlOutput() + } } } @@ -6735,16 +5604,21 @@ public struct DeleteOriginAccessControlOutput: Swift.Equatable { public init() { } } -enum DeleteOriginAccessControlOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginAccessControl": return try await NoSuchOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OriginAccessControlInUse": return try await OriginAccessControlInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteOriginAccessControlOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginAccessControl": return try await NoSuchOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "OriginAccessControlInUse": return try await OriginAccessControlInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6787,8 +5661,12 @@ public struct DeleteOriginRequestPolicyInput: Swift.Equatable { } } -extension DeleteOriginRequestPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteOriginRequestPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteOriginRequestPolicyOutput() + } } } @@ -6797,17 +5675,22 @@ public struct DeleteOriginRequestPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteOriginRequestPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalDelete": return try await IllegalDelete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OriginRequestPolicyInUse": return try await OriginRequestPolicyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteOriginRequestPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalDelete": return try await IllegalDelete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "OriginRequestPolicyInUse": return try await OriginRequestPolicyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6850,8 +5733,12 @@ public struct DeletePublicKeyInput: Swift.Equatable { } } -extension DeletePublicKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeletePublicKeyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeletePublicKeyOutput() + } } } @@ -6860,30 +5747,30 @@ public struct DeletePublicKeyOutput: Swift.Equatable { public init() { } } -enum DeletePublicKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchPublicKey": return try await NoSuchPublicKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PublicKeyInUse": return try await PublicKeyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeletePublicKeyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchPublicKey": return try await NoSuchPublicKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PublicKeyInUse": return try await PublicKeyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension DeleteRealtimeLogConfigInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case name = "Name" - } - static func writingClosure(_ value: DeleteRealtimeLogConfigInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("Name")].write(value.name) + try writer["ARN"].write(value.arn) + try writer["Name"].write(value.name) } } @@ -6910,28 +5797,12 @@ public struct DeleteRealtimeLogConfigInput: Swift.Equatable { } } -struct DeleteRealtimeLogConfigInputBody: Swift.Equatable { - let name: Swift.String? - let arn: Swift.String? -} - -extension DeleteRealtimeLogConfigInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case name = "Name" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - } -} +extension DeleteRealtimeLogConfigOutput { -extension DeleteRealtimeLogConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteRealtimeLogConfigOutput() + } } } @@ -6940,15 +5811,20 @@ public struct DeleteRealtimeLogConfigOutput: Swift.Equatable { public init() { } } -enum DeleteRealtimeLogConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RealtimeLogConfigInUse": return try await RealtimeLogConfigInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteRealtimeLogConfigOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "RealtimeLogConfigInUse": return try await RealtimeLogConfigInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6991,8 +5867,12 @@ public struct DeleteResponseHeadersPolicyInput: Swift.Equatable { } } -extension DeleteResponseHeadersPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteResponseHeadersPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteResponseHeadersPolicyOutput() + } } } @@ -7001,17 +5881,22 @@ public struct DeleteResponseHeadersPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteResponseHeadersPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalDelete": return try await IllegalDelete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResponseHeadersPolicyInUse": return try await ResponseHeadersPolicyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteResponseHeadersPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalDelete": return try await IllegalDelete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ResponseHeadersPolicyInUse": return try await ResponseHeadersPolicyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -7055,8 +5940,12 @@ public struct DeleteStreamingDistributionInput: Swift.Equatable { } } -extension DeleteStreamingDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteStreamingDistributionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteStreamingDistributionOutput() + } } } @@ -7065,16 +5954,21 @@ public struct DeleteStreamingDistributionOutput: Swift.Equatable { public init() { } } -enum DeleteStreamingDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchStreamingDistribution": return try await NoSuchStreamingDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StreamingDistributionNotDisabled": return try await StreamingDistributionNotDisabled(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteStreamingDistributionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchStreamingDistribution": return try await NoSuchStreamingDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "StreamingDistributionNotDisabled": return try await StreamingDistributionNotDisabled.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -7118,18 +6012,18 @@ public struct DescribeFunctionInput: Swift.Equatable { } } -extension DescribeFunctionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FunctionSummary = try responseDecoder.decode(responseBody: data) - self.functionSummary = output - } else { - self.functionSummary = nil +extension DescribeFunctionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFunctionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.functionSummary = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FunctionSummary.readingClosure) + return value } } } @@ -7150,29 +6044,18 @@ public struct DescribeFunctionOutput: Swift.Equatable { } } -struct DescribeFunctionOutputBody: Swift.Equatable { - let functionSummary: CloudFrontClientTypes.FunctionSummary? -} - -extension DescribeFunctionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionSummary = "FunctionSummary" - } +enum DescribeFunctionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionSummaryDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionSummary.self, forKey: .functionSummary) - functionSummary = functionSummaryDecoded - } -} - -enum DescribeFunctionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchFunctionExists": return try await NoSuchFunctionExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "NoSuchFunctionExists": return try await NoSuchFunctionExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -7200,18 +6083,18 @@ public struct DescribeKeyValueStoreInput: Swift.Equatable { } } -extension DescribeKeyValueStoreOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyValueStore = try responseDecoder.decode(responseBody: data) - self.keyValueStore = output - } else { - self.keyValueStore = nil +extension DescribeKeyValueStoreOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeKeyValueStoreOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.keyValueStore = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyValueStore.readingClosure) + return value } } } @@ -7232,100 +6115,54 @@ public struct DescribeKeyValueStoreOutput: Swift.Equatable { } } -struct DescribeKeyValueStoreOutputBody: Swift.Equatable { - let keyValueStore: CloudFrontClientTypes.KeyValueStore? -} - -extension DescribeKeyValueStoreOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyValueStore = "KeyValueStore" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyValueStoreDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyValueStore.self, forKey: .keyValueStore) - keyValueStore = keyValueStoreDecoded - } -} +enum DescribeKeyValueStoreOutputError { -enum DescribeKeyValueStoreOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityNotFound": return try await EntityNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "EntityNotFound": return try await EntityNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CloudFrontClientTypes.Distribution: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case activeTrustedKeyGroups = "ActiveTrustedKeyGroups" - case activeTrustedSigners = "ActiveTrustedSigners" - case aliasICPRecordals = "AliasICPRecordals" - case distributionConfig = "DistributionConfig" - case domainName = "DomainName" - case id = "Id" - case inProgressInvalidationBatches = "InProgressInvalidationBatches" - case lastModifiedTime = "LastModifiedTime" - case status = "Status" - } +extension CloudFrontClientTypes.Distribution { static func writingClosure(_ value: CloudFrontClientTypes.Distribution?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("ActiveTrustedKeyGroups")].write(value.activeTrustedKeyGroups, writingClosure: CloudFrontClientTypes.ActiveTrustedKeyGroups.writingClosure(_:to:)) - try writer[.init("ActiveTrustedSigners")].write(value.activeTrustedSigners, writingClosure: CloudFrontClientTypes.ActiveTrustedSigners.writingClosure(_:to:)) - try writer[.init("AliasICPRecordals")].writeList(value.aliasICPRecordals, memberWritingClosure: CloudFrontClientTypes.AliasICPRecordal.writingClosure(_:to:), memberNodeInfo: .init("AliasICPRecordal"), isFlattened: false) - try writer[.init("DistributionConfig")].write(value.distributionConfig, writingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:)) - try writer[.init("DomainName")].write(value.domainName) - try writer[.init("Id")].write(value.id) - try writer[.init("InProgressInvalidationBatches")].write(value.inProgressInvalidationBatches) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("Status")].write(value.status) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let inProgressInvalidationBatchesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .inProgressInvalidationBatches) - inProgressInvalidationBatches = inProgressInvalidationBatchesDecoded - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let activeTrustedSignersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ActiveTrustedSigners.self, forKey: .activeTrustedSigners) - activeTrustedSigners = activeTrustedSignersDecoded - let activeTrustedKeyGroupsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ActiveTrustedKeyGroups.self, forKey: .activeTrustedKeyGroups) - activeTrustedKeyGroups = activeTrustedKeyGroupsDecoded - let distributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionConfig.self, forKey: .distributionConfig) - distributionConfig = distributionConfigDecoded - if containerValues.contains(.aliasICPRecordals) { - struct KeyVal0{struct AliasICPRecordal{}} - let aliasICPRecordalsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .aliasICPRecordals) - if let aliasICPRecordalsWrappedContainer = aliasICPRecordalsWrappedContainer { - let aliasICPRecordalsContainer = try aliasICPRecordalsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.AliasICPRecordal].self, forKey: .member) - var aliasICPRecordalsBuffer:[CloudFrontClientTypes.AliasICPRecordal]? = nil - if let aliasICPRecordalsContainer = aliasICPRecordalsContainer { - aliasICPRecordalsBuffer = [CloudFrontClientTypes.AliasICPRecordal]() - for structureContainer0 in aliasICPRecordalsContainer { - aliasICPRecordalsBuffer?.append(structureContainer0) - } - } - aliasICPRecordals = aliasICPRecordalsBuffer - } else { - aliasICPRecordals = [] - } - } else { - aliasICPRecordals = nil + try writer["ARN"].write(value.arn) + try writer["ActiveTrustedKeyGroups"].write(value.activeTrustedKeyGroups, writingClosure: CloudFrontClientTypes.ActiveTrustedKeyGroups.writingClosure(_:to:)) + try writer["ActiveTrustedSigners"].write(value.activeTrustedSigners, writingClosure: CloudFrontClientTypes.ActiveTrustedSigners.writingClosure(_:to:)) + try writer["AliasICPRecordals"].writeList(value.aliasICPRecordals, memberWritingClosure: CloudFrontClientTypes.AliasICPRecordal.writingClosure(_:to:), memberNodeInfo: "AliasICPRecordal", isFlattened: false) + try writer["DistributionConfig"].write(value.distributionConfig, writingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:)) + try writer["DomainName"].write(value.domainName) + try writer["Id"].write(value.id) + try writer["InProgressInvalidationBatches"].write(value.inProgressInvalidationBatches) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["Status"].write(value.status) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Distribution() + value.id = try reader["Id"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.inProgressInvalidationBatches = try reader["InProgressInvalidationBatches"].readIfPresent() + value.domainName = try reader["DomainName"].readIfPresent() + value.activeTrustedSigners = try reader["ActiveTrustedSigners"].readIfPresent(readingClosure: CloudFrontClientTypes.ActiveTrustedSigners.readingClosure) + value.activeTrustedKeyGroups = try reader["ActiveTrustedKeyGroups"].readIfPresent(readingClosure: CloudFrontClientTypes.ActiveTrustedKeyGroups.readingClosure) + value.distributionConfig = try reader["DistributionConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.DistributionConfig.readingClosure) + value.aliasICPRecordals = try reader["AliasICPRecordals"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.AliasICPRecordal.readingClosure, memberNodeInfo: "AliasICPRecordal", isFlattened: false) + return value } } } @@ -7390,16 +6227,26 @@ extension CloudFrontClientTypes { } extension DistributionAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DistributionAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension DistributionAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DistributionAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7427,108 +6274,56 @@ public struct DistributionAlreadyExists: ClientRuntime.ModeledError, AWSClientRu } } -struct DistributionAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension DistributionAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.DistributionConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case aliases = "Aliases" - case cacheBehaviors = "CacheBehaviors" - case callerReference = "CallerReference" - case comment = "Comment" - case continuousDeploymentPolicyId = "ContinuousDeploymentPolicyId" - case customErrorResponses = "CustomErrorResponses" - case defaultCacheBehavior = "DefaultCacheBehavior" - case defaultRootObject = "DefaultRootObject" - case enabled = "Enabled" - case httpVersion = "HttpVersion" - case isIPV6Enabled = "IsIPV6Enabled" - case logging = "Logging" - case originGroups = "OriginGroups" - case origins = "Origins" - case priceClass = "PriceClass" - case restrictions = "Restrictions" - case staging = "Staging" - case viewerCertificate = "ViewerCertificate" - case webACLId = "WebACLId" - } +extension CloudFrontClientTypes.DistributionConfig { static func writingClosure(_ value: CloudFrontClientTypes.DistributionConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Aliases")].write(value.aliases, writingClosure: CloudFrontClientTypes.Aliases.writingClosure(_:to:)) - try writer[.init("CacheBehaviors")].write(value.cacheBehaviors, writingClosure: CloudFrontClientTypes.CacheBehaviors.writingClosure(_:to:)) - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Comment")].write(value.comment) - try writer[.init("ContinuousDeploymentPolicyId")].write(value.continuousDeploymentPolicyId) - try writer[.init("CustomErrorResponses")].write(value.customErrorResponses, writingClosure: CloudFrontClientTypes.CustomErrorResponses.writingClosure(_:to:)) - try writer[.init("DefaultCacheBehavior")].write(value.defaultCacheBehavior, writingClosure: CloudFrontClientTypes.DefaultCacheBehavior.writingClosure(_:to:)) - try writer[.init("DefaultRootObject")].write(value.defaultRootObject) - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("HttpVersion")].write(value.httpVersion) - try writer[.init("IsIPV6Enabled")].write(value.isIPV6Enabled) - try writer[.init("Logging")].write(value.logging, writingClosure: CloudFrontClientTypes.LoggingConfig.writingClosure(_:to:)) - try writer[.init("OriginGroups")].write(value.originGroups, writingClosure: CloudFrontClientTypes.OriginGroups.writingClosure(_:to:)) - try writer[.init("Origins")].write(value.origins, writingClosure: CloudFrontClientTypes.Origins.writingClosure(_:to:)) - try writer[.init("PriceClass")].write(value.priceClass) - try writer[.init("Restrictions")].write(value.restrictions, writingClosure: CloudFrontClientTypes.Restrictions.writingClosure(_:to:)) - try writer[.init("Staging")].write(value.staging) - try writer[.init("ViewerCertificate")].write(value.viewerCertificate, writingClosure: CloudFrontClientTypes.ViewerCertificate.writingClosure(_:to:)) - try writer[.init("WebACLId")].write(value.webACLId) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let aliasesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Aliases.self, forKey: .aliases) - aliases = aliasesDecoded - let defaultRootObjectDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultRootObject) - defaultRootObject = defaultRootObjectDecoded - let originsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Origins.self, forKey: .origins) - origins = originsDecoded - let originGroupsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginGroups.self, forKey: .originGroups) - originGroups = originGroupsDecoded - let defaultCacheBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DefaultCacheBehavior.self, forKey: .defaultCacheBehavior) - defaultCacheBehavior = defaultCacheBehaviorDecoded - let cacheBehaviorsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CacheBehaviors.self, forKey: .cacheBehaviors) - cacheBehaviors = cacheBehaviorsDecoded - let customErrorResponsesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CustomErrorResponses.self, forKey: .customErrorResponses) - customErrorResponses = customErrorResponsesDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let loggingDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.LoggingConfig.self, forKey: .logging) - logging = loggingDecoded - let priceClassDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PriceClass.self, forKey: .priceClass) - priceClass = priceClassDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let viewerCertificateDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ViewerCertificate.self, forKey: .viewerCertificate) - viewerCertificate = viewerCertificateDecoded - let restrictionsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Restrictions.self, forKey: .restrictions) - restrictions = restrictionsDecoded - let webACLIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .webACLId) - webACLId = webACLIdDecoded - let httpVersionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.HttpVersion.self, forKey: .httpVersion) - httpVersion = httpVersionDecoded - let isIPV6EnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isIPV6Enabled) - isIPV6Enabled = isIPV6EnabledDecoded - let continuousDeploymentPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continuousDeploymentPolicyId) - continuousDeploymentPolicyId = continuousDeploymentPolicyIdDecoded - let stagingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .staging) - staging = stagingDecoded + try writer["Aliases"].write(value.aliases, writingClosure: CloudFrontClientTypes.Aliases.writingClosure(_:to:)) + try writer["CacheBehaviors"].write(value.cacheBehaviors, writingClosure: CloudFrontClientTypes.CacheBehaviors.writingClosure(_:to:)) + try writer["CallerReference"].write(value.callerReference) + try writer["Comment"].write(value.comment) + try writer["ContinuousDeploymentPolicyId"].write(value.continuousDeploymentPolicyId) + try writer["CustomErrorResponses"].write(value.customErrorResponses, writingClosure: CloudFrontClientTypes.CustomErrorResponses.writingClosure(_:to:)) + try writer["DefaultCacheBehavior"].write(value.defaultCacheBehavior, writingClosure: CloudFrontClientTypes.DefaultCacheBehavior.writingClosure(_:to:)) + try writer["DefaultRootObject"].write(value.defaultRootObject) + try writer["Enabled"].write(value.enabled) + try writer["HttpVersion"].write(value.httpVersion) + try writer["IsIPV6Enabled"].write(value.isIPV6Enabled) + try writer["Logging"].write(value.logging, writingClosure: CloudFrontClientTypes.LoggingConfig.writingClosure(_:to:)) + try writer["OriginGroups"].write(value.originGroups, writingClosure: CloudFrontClientTypes.OriginGroups.writingClosure(_:to:)) + try writer["Origins"].write(value.origins, writingClosure: CloudFrontClientTypes.Origins.writingClosure(_:to:)) + try writer["PriceClass"].write(value.priceClass) + try writer["Restrictions"].write(value.restrictions, writingClosure: CloudFrontClientTypes.Restrictions.writingClosure(_:to:)) + try writer["Staging"].write(value.staging) + try writer["ViewerCertificate"].write(value.viewerCertificate, writingClosure: CloudFrontClientTypes.ViewerCertificate.writingClosure(_:to:)) + try writer["WebACLId"].write(value.webACLId) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.DistributionConfig() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.aliases = try reader["Aliases"].readIfPresent(readingClosure: CloudFrontClientTypes.Aliases.readingClosure) + value.defaultRootObject = try reader["DefaultRootObject"].readIfPresent() + value.origins = try reader["Origins"].readIfPresent(readingClosure: CloudFrontClientTypes.Origins.readingClosure) + value.originGroups = try reader["OriginGroups"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginGroups.readingClosure) + value.defaultCacheBehavior = try reader["DefaultCacheBehavior"].readIfPresent(readingClosure: CloudFrontClientTypes.DefaultCacheBehavior.readingClosure) + value.cacheBehaviors = try reader["CacheBehaviors"].readIfPresent(readingClosure: CloudFrontClientTypes.CacheBehaviors.readingClosure) + value.customErrorResponses = try reader["CustomErrorResponses"].readIfPresent(readingClosure: CloudFrontClientTypes.CustomErrorResponses.readingClosure) + value.comment = try reader["Comment"].readIfPresent() + value.logging = try reader["Logging"].readIfPresent(readingClosure: CloudFrontClientTypes.LoggingConfig.readingClosure) + value.priceClass = try reader["PriceClass"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() + value.viewerCertificate = try reader["ViewerCertificate"].readIfPresent(readingClosure: CloudFrontClientTypes.ViewerCertificate.readingClosure) + value.restrictions = try reader["Restrictions"].readIfPresent(readingClosure: CloudFrontClientTypes.Restrictions.readingClosure) + value.webACLId = try reader["WebACLId"].readIfPresent() + value.httpVersion = try reader["HttpVersion"].readIfPresent() + value.isIPV6Enabled = try reader["IsIPV6Enabled"].readIfPresent() + value.continuousDeploymentPolicyId = try reader["ContinuousDeploymentPolicyId"].readIfPresent() + value.staging = try reader["Staging"].readIfPresent() + return value + } } } @@ -7644,24 +6439,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.DistributionConfigWithTags: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionConfig = "DistributionConfig" - case tags = "Tags" - } +extension CloudFrontClientTypes.DistributionConfigWithTags { static func writingClosure(_ value: CloudFrontClientTypes.DistributionConfigWithTags?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DistributionConfig")].write(value.distributionConfig, writingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:)) - try writer[.init("Tags")].write(value.tags, writingClosure: CloudFrontClientTypes.Tags.writingClosure(_:to:)) + try writer["DistributionConfig"].write(value.distributionConfig, writingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:)) + try writer["Tags"].write(value.tags, writingClosure: CloudFrontClientTypes.Tags.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionConfig.self, forKey: .distributionConfig) - distributionConfig = distributionConfigDecoded - let tagsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Tags.self, forKey: .tags) - tags = tagsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.DistributionConfigWithTags() + value.distributionConfig = try reader["DistributionConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.DistributionConfig.readingClosure) + value.tags = try reader["Tags"].readIfPresent(readingClosure: CloudFrontClientTypes.Tags.readingClosure) + return value + } } } @@ -7687,56 +6480,29 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.DistributionIdList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case items = "Items" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.DistributionIdList { static func writingClosure(_ value: CloudFrontClientTypes.DistributionIdList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsTruncated")].write(value.isTruncated) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("DistributionId"), isFlattened: false) - try writer[.init("Marker")].write(value.marker) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct DistributionId{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["IsTruncated"].write(value.isTruncated) + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "DistributionId", isFlattened: false) + try writer["Marker"].write(value.marker) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.DistributionIdList() + value.marker = try reader["Marker"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "DistributionId", isFlattened: false) + return value } } } @@ -7781,56 +6547,29 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.DistributionList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case items = "Items" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.DistributionList { static func writingClosure(_ value: CloudFrontClientTypes.DistributionList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsTruncated")].write(value.isTruncated) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.DistributionSummary.writingClosure(_:to:), memberNodeInfo: .init("DistributionSummary"), isFlattened: false) - try writer[.init("Marker")].write(value.marker) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct DistributionSummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.DistributionSummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.DistributionSummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.DistributionSummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["IsTruncated"].write(value.isTruncated) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.DistributionSummary.writingClosure(_:to:), memberNodeInfo: "DistributionSummary", isFlattened: false) + try writer["Marker"].write(value.marker) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.DistributionList() + value.marker = try reader["Marker"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.DistributionSummary.readingClosure, memberNodeInfo: "DistributionSummary", isFlattened: false) + return value } } } @@ -7876,16 +6615,26 @@ extension CloudFrontClientTypes { } extension DistributionNotDisabled { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DistributionNotDisabled() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension DistributionNotDisabled { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DistributionNotDisabled() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7913,133 +6662,60 @@ public struct DistributionNotDisabled: ClientRuntime.ModeledError, AWSClientRunt } } -struct DistributionNotDisabledBody: Swift.Equatable { - let message: Swift.String? -} - -extension DistributionNotDisabledBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.DistributionSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case aliasICPRecordals = "AliasICPRecordals" - case aliases = "Aliases" - case cacheBehaviors = "CacheBehaviors" - case comment = "Comment" - case customErrorResponses = "CustomErrorResponses" - case defaultCacheBehavior = "DefaultCacheBehavior" - case domainName = "DomainName" - case enabled = "Enabled" - case httpVersion = "HttpVersion" - case id = "Id" - case isIPV6Enabled = "IsIPV6Enabled" - case lastModifiedTime = "LastModifiedTime" - case originGroups = "OriginGroups" - case origins = "Origins" - case priceClass = "PriceClass" - case restrictions = "Restrictions" - case staging = "Staging" - case status = "Status" - case viewerCertificate = "ViewerCertificate" - case webACLId = "WebACLId" - } +extension CloudFrontClientTypes.DistributionSummary { static func writingClosure(_ value: CloudFrontClientTypes.DistributionSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("AliasICPRecordals")].writeList(value.aliasICPRecordals, memberWritingClosure: CloudFrontClientTypes.AliasICPRecordal.writingClosure(_:to:), memberNodeInfo: .init("AliasICPRecordal"), isFlattened: false) - try writer[.init("Aliases")].write(value.aliases, writingClosure: CloudFrontClientTypes.Aliases.writingClosure(_:to:)) - try writer[.init("CacheBehaviors")].write(value.cacheBehaviors, writingClosure: CloudFrontClientTypes.CacheBehaviors.writingClosure(_:to:)) - try writer[.init("Comment")].write(value.comment) - try writer[.init("CustomErrorResponses")].write(value.customErrorResponses, writingClosure: CloudFrontClientTypes.CustomErrorResponses.writingClosure(_:to:)) - try writer[.init("DefaultCacheBehavior")].write(value.defaultCacheBehavior, writingClosure: CloudFrontClientTypes.DefaultCacheBehavior.writingClosure(_:to:)) - try writer[.init("DomainName")].write(value.domainName) - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("HttpVersion")].write(value.httpVersion) - try writer[.init("Id")].write(value.id) - try writer[.init("IsIPV6Enabled")].write(value.isIPV6Enabled) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("OriginGroups")].write(value.originGroups, writingClosure: CloudFrontClientTypes.OriginGroups.writingClosure(_:to:)) - try writer[.init("Origins")].write(value.origins, writingClosure: CloudFrontClientTypes.Origins.writingClosure(_:to:)) - try writer[.init("PriceClass")].write(value.priceClass) - try writer[.init("Restrictions")].write(value.restrictions, writingClosure: CloudFrontClientTypes.Restrictions.writingClosure(_:to:)) - try writer[.init("Staging")].write(value.staging) - try writer[.init("Status")].write(value.status) - try writer[.init("ViewerCertificate")].write(value.viewerCertificate, writingClosure: CloudFrontClientTypes.ViewerCertificate.writingClosure(_:to:)) - try writer[.init("WebACLId")].write(value.webACLId) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let aliasesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Aliases.self, forKey: .aliases) - aliases = aliasesDecoded - let originsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Origins.self, forKey: .origins) - origins = originsDecoded - let originGroupsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginGroups.self, forKey: .originGroups) - originGroups = originGroupsDecoded - let defaultCacheBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DefaultCacheBehavior.self, forKey: .defaultCacheBehavior) - defaultCacheBehavior = defaultCacheBehaviorDecoded - let cacheBehaviorsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CacheBehaviors.self, forKey: .cacheBehaviors) - cacheBehaviors = cacheBehaviorsDecoded - let customErrorResponsesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CustomErrorResponses.self, forKey: .customErrorResponses) - customErrorResponses = customErrorResponsesDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let priceClassDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PriceClass.self, forKey: .priceClass) - priceClass = priceClassDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let viewerCertificateDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ViewerCertificate.self, forKey: .viewerCertificate) - viewerCertificate = viewerCertificateDecoded - let restrictionsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Restrictions.self, forKey: .restrictions) - restrictions = restrictionsDecoded - let webACLIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .webACLId) - webACLId = webACLIdDecoded - let httpVersionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.HttpVersion.self, forKey: .httpVersion) - httpVersion = httpVersionDecoded - let isIPV6EnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isIPV6Enabled) - isIPV6Enabled = isIPV6EnabledDecoded - if containerValues.contains(.aliasICPRecordals) { - struct KeyVal0{struct AliasICPRecordal{}} - let aliasICPRecordalsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .aliasICPRecordals) - if let aliasICPRecordalsWrappedContainer = aliasICPRecordalsWrappedContainer { - let aliasICPRecordalsContainer = try aliasICPRecordalsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.AliasICPRecordal].self, forKey: .member) - var aliasICPRecordalsBuffer:[CloudFrontClientTypes.AliasICPRecordal]? = nil - if let aliasICPRecordalsContainer = aliasICPRecordalsContainer { - aliasICPRecordalsBuffer = [CloudFrontClientTypes.AliasICPRecordal]() - for structureContainer0 in aliasICPRecordalsContainer { - aliasICPRecordalsBuffer?.append(structureContainer0) - } - } - aliasICPRecordals = aliasICPRecordalsBuffer - } else { - aliasICPRecordals = [] - } - } else { - aliasICPRecordals = nil + try writer["ARN"].write(value.arn) + try writer["AliasICPRecordals"].writeList(value.aliasICPRecordals, memberWritingClosure: CloudFrontClientTypes.AliasICPRecordal.writingClosure(_:to:), memberNodeInfo: "AliasICPRecordal", isFlattened: false) + try writer["Aliases"].write(value.aliases, writingClosure: CloudFrontClientTypes.Aliases.writingClosure(_:to:)) + try writer["CacheBehaviors"].write(value.cacheBehaviors, writingClosure: CloudFrontClientTypes.CacheBehaviors.writingClosure(_:to:)) + try writer["Comment"].write(value.comment) + try writer["CustomErrorResponses"].write(value.customErrorResponses, writingClosure: CloudFrontClientTypes.CustomErrorResponses.writingClosure(_:to:)) + try writer["DefaultCacheBehavior"].write(value.defaultCacheBehavior, writingClosure: CloudFrontClientTypes.DefaultCacheBehavior.writingClosure(_:to:)) + try writer["DomainName"].write(value.domainName) + try writer["Enabled"].write(value.enabled) + try writer["HttpVersion"].write(value.httpVersion) + try writer["Id"].write(value.id) + try writer["IsIPV6Enabled"].write(value.isIPV6Enabled) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["OriginGroups"].write(value.originGroups, writingClosure: CloudFrontClientTypes.OriginGroups.writingClosure(_:to:)) + try writer["Origins"].write(value.origins, writingClosure: CloudFrontClientTypes.Origins.writingClosure(_:to:)) + try writer["PriceClass"].write(value.priceClass) + try writer["Restrictions"].write(value.restrictions, writingClosure: CloudFrontClientTypes.Restrictions.writingClosure(_:to:)) + try writer["Staging"].write(value.staging) + try writer["Status"].write(value.status) + try writer["ViewerCertificate"].write(value.viewerCertificate, writingClosure: CloudFrontClientTypes.ViewerCertificate.writingClosure(_:to:)) + try writer["WebACLId"].write(value.webACLId) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.DistributionSummary() + value.id = try reader["Id"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.domainName = try reader["DomainName"].readIfPresent() + value.aliases = try reader["Aliases"].readIfPresent(readingClosure: CloudFrontClientTypes.Aliases.readingClosure) + value.origins = try reader["Origins"].readIfPresent(readingClosure: CloudFrontClientTypes.Origins.readingClosure) + value.originGroups = try reader["OriginGroups"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginGroups.readingClosure) + value.defaultCacheBehavior = try reader["DefaultCacheBehavior"].readIfPresent(readingClosure: CloudFrontClientTypes.DefaultCacheBehavior.readingClosure) + value.cacheBehaviors = try reader["CacheBehaviors"].readIfPresent(readingClosure: CloudFrontClientTypes.CacheBehaviors.readingClosure) + value.customErrorResponses = try reader["CustomErrorResponses"].readIfPresent(readingClosure: CloudFrontClientTypes.CustomErrorResponses.readingClosure) + value.comment = try reader["Comment"].readIfPresent() + value.priceClass = try reader["PriceClass"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() + value.viewerCertificate = try reader["ViewerCertificate"].readIfPresent(readingClosure: CloudFrontClientTypes.ViewerCertificate.readingClosure) + value.restrictions = try reader["Restrictions"].readIfPresent(readingClosure: CloudFrontClientTypes.Restrictions.readingClosure) + value.webACLId = try reader["WebACLId"].readIfPresent() + value.httpVersion = try reader["HttpVersion"].readIfPresent() + value.isIPV6Enabled = try reader["IsIPV6Enabled"].readIfPresent() + value.aliasICPRecordals = try reader["AliasICPRecordals"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.AliasICPRecordal.readingClosure, memberNodeInfo: "AliasICPRecordal", isFlattened: false) + value.staging = try reader["Staging"].readIfPresent() + return value } - let stagingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .staging) - staging = stagingDecoded } } @@ -8158,40 +6834,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.EncryptionEntities: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.EncryptionEntities { static func writingClosure(_ value: CloudFrontClientTypes.EncryptionEntities?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.EncryptionEntity.writingClosure(_:to:), memberNodeInfo: .init("EncryptionEntity"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct EncryptionEntity{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.EncryptionEntity].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.EncryptionEntity]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.EncryptionEntity]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.EncryptionEntity.writingClosure(_:to:), memberNodeInfo: "EncryptionEntity", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.EncryptionEntities() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.EncryptionEntity.readingClosure, memberNodeInfo: "EncryptionEntity", isFlattened: false) + return value } } } @@ -8217,28 +6874,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.EncryptionEntity: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldPatterns = "FieldPatterns" - case providerId = "ProviderId" - case publicKeyId = "PublicKeyId" - } +extension CloudFrontClientTypes.EncryptionEntity { static func writingClosure(_ value: CloudFrontClientTypes.EncryptionEntity?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FieldPatterns")].write(value.fieldPatterns, writingClosure: CloudFrontClientTypes.FieldPatterns.writingClosure(_:to:)) - try writer[.init("ProviderId")].write(value.providerId) - try writer[.init("PublicKeyId")].write(value.publicKeyId) + try writer["FieldPatterns"].write(value.fieldPatterns, writingClosure: CloudFrontClientTypes.FieldPatterns.writingClosure(_:to:)) + try writer["ProviderId"].write(value.providerId) + try writer["PublicKeyId"].write(value.publicKeyId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicKeyId) - publicKeyId = publicKeyIdDecoded - let providerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .providerId) - providerId = providerIdDecoded - let fieldPatternsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldPatterns.self, forKey: .fieldPatterns) - fieldPatterns = fieldPatternsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.EncryptionEntity() + value.publicKeyId = try reader["PublicKeyId"].readIfPresent() + value.providerId = try reader["ProviderId"].readIfPresent() + value.fieldPatterns = try reader["FieldPatterns"].readIfPresent(readingClosure: CloudFrontClientTypes.FieldPatterns.readingClosure) + return value + } } } @@ -8269,24 +6922,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.EndPoint: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kinesisStreamConfig = "KinesisStreamConfig" - case streamType = "StreamType" - } +extension CloudFrontClientTypes.EndPoint { static func writingClosure(_ value: CloudFrontClientTypes.EndPoint?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KinesisStreamConfig")].write(value.kinesisStreamConfig, writingClosure: CloudFrontClientTypes.KinesisStreamConfig.writingClosure(_:to:)) - try writer[.init("StreamType")].write(value.streamType) + try writer["KinesisStreamConfig"].write(value.kinesisStreamConfig, writingClosure: CloudFrontClientTypes.KinesisStreamConfig.writingClosure(_:to:)) + try writer["StreamType"].write(value.streamType) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .streamType) - streamType = streamTypeDecoded - let kinesisStreamConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KinesisStreamConfig.self, forKey: .kinesisStreamConfig) - kinesisStreamConfig = kinesisStreamConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.EndPoint() + value.streamType = try reader["StreamType"].readIfPresent() + value.kinesisStreamConfig = try reader["KinesisStreamConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.KinesisStreamConfig.readingClosure) + return value + } } } @@ -8312,16 +6963,26 @@ extension CloudFrontClientTypes { } extension EntityAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EntityAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value + } + } +} + +extension EntityAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EntityAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8349,33 +7010,27 @@ public struct EntityAlreadyExists: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct EntityAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension EntityAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension EntityLimitExceeded { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EntityLimitExceeded() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension EntityLimitExceeded { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EntityLimitExceeded() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8403,33 +7058,27 @@ public struct EntityLimitExceeded: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct EntityLimitExceededBody: Swift.Equatable { - let message: Swift.String? -} - -extension EntityLimitExceededBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension EntityNotFound { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EntityNotFound() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension EntityNotFound { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EntityNotFound() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8457,33 +7106,27 @@ public struct EntityNotFound: ClientRuntime.ModeledError, AWSClientRuntime.AWSSe } } -struct EntityNotFoundBody: Swift.Equatable { - let message: Swift.String? -} - -extension EntityNotFoundBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension EntitySizeLimitExceeded { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EntitySizeLimitExceeded() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension EntitySizeLimitExceeded { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EntitySizeLimitExceeded() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8511,22 +7154,6 @@ public struct EntitySizeLimitExceeded: ClientRuntime.ModeledError, AWSClientRunt } } -struct EntitySizeLimitExceededBody: Swift.Equatable { - let message: Swift.String? -} - -extension EntitySizeLimitExceededBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudFrontClientTypes { public enum EventType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case originRequest @@ -8565,28 +7192,24 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.FieldLevelEncryption: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionConfig = "FieldLevelEncryptionConfig" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - } +extension CloudFrontClientTypes.FieldLevelEncryption { static func writingClosure(_ value: CloudFrontClientTypes.FieldLevelEncryption?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FieldLevelEncryptionConfig")].write(value.fieldLevelEncryptionConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["FieldLevelEncryptionConfig"].write(value.fieldLevelEncryptionConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let fieldLevelEncryptionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionConfig.self, forKey: .fieldLevelEncryptionConfig) - fieldLevelEncryptionConfig = fieldLevelEncryptionConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldLevelEncryption() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.fieldLevelEncryptionConfig = try reader["FieldLevelEncryptionConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.readingClosure) + return value + } } } @@ -8617,32 +7240,26 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.FieldLevelEncryptionConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case comment = "Comment" - case contentTypeProfileConfig = "ContentTypeProfileConfig" - case queryArgProfileConfig = "QueryArgProfileConfig" - } +extension CloudFrontClientTypes.FieldLevelEncryptionConfig { static func writingClosure(_ value: CloudFrontClientTypes.FieldLevelEncryptionConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Comment")].write(value.comment) - try writer[.init("ContentTypeProfileConfig")].write(value.contentTypeProfileConfig, writingClosure: CloudFrontClientTypes.ContentTypeProfileConfig.writingClosure(_:to:)) - try writer[.init("QueryArgProfileConfig")].write(value.queryArgProfileConfig, writingClosure: CloudFrontClientTypes.QueryArgProfileConfig.writingClosure(_:to:)) + try writer["CallerReference"].write(value.callerReference) + try writer["Comment"].write(value.comment) + try writer["ContentTypeProfileConfig"].write(value.contentTypeProfileConfig, writingClosure: CloudFrontClientTypes.ContentTypeProfileConfig.writingClosure(_:to:)) + try writer["QueryArgProfileConfig"].write(value.queryArgProfileConfig, writingClosure: CloudFrontClientTypes.QueryArgProfileConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let queryArgProfileConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.QueryArgProfileConfig.self, forKey: .queryArgProfileConfig) - queryArgProfileConfig = queryArgProfileConfigDecoded - let contentTypeProfileConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContentTypeProfileConfig.self, forKey: .contentTypeProfileConfig) - contentTypeProfileConfig = contentTypeProfileConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldLevelEncryptionConfig() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.comment = try reader["Comment"].readIfPresent() + value.queryArgProfileConfig = try reader["QueryArgProfileConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.QueryArgProfileConfig.readingClosure) + value.contentTypeProfileConfig = try reader["ContentTypeProfileConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ContentTypeProfileConfig.readingClosure) + return value + } } } @@ -8676,16 +7293,26 @@ extension CloudFrontClientTypes { } extension FieldLevelEncryptionConfigAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = FieldLevelEncryptionConfigAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension FieldLevelEncryptionConfigAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FieldLevelEncryptionConfigAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8713,33 +7340,27 @@ public struct FieldLevelEncryptionConfigAlreadyExists: ClientRuntime.ModeledErro } } -struct FieldLevelEncryptionConfigAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension FieldLevelEncryptionConfigAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension FieldLevelEncryptionConfigInUse { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = FieldLevelEncryptionConfigInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension FieldLevelEncryptionConfigInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FieldLevelEncryptionConfigInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8767,64 +7388,25 @@ public struct FieldLevelEncryptionConfigInUse: ClientRuntime.ModeledError, AWSCl } } -struct FieldLevelEncryptionConfigInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension FieldLevelEncryptionConfigInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.FieldLevelEncryptionList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.FieldLevelEncryptionList { static func writingClosure(_ value: CloudFrontClientTypes.FieldLevelEncryptionList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionSummary.writingClosure(_:to:), memberNodeInfo: .init("FieldLevelEncryptionSummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct FieldLevelEncryptionSummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.FieldLevelEncryptionSummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.FieldLevelEncryptionSummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.FieldLevelEncryptionSummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionSummary.writingClosure(_:to:), memberNodeInfo: "FieldLevelEncryptionSummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldLevelEncryptionList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.FieldLevelEncryptionSummary.readingClosure, memberNodeInfo: "FieldLevelEncryptionSummary", isFlattened: false) + return value } } } @@ -8859,28 +7441,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.FieldLevelEncryptionProfile: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfileConfig = "FieldLevelEncryptionProfileConfig" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - } +extension CloudFrontClientTypes.FieldLevelEncryptionProfile { static func writingClosure(_ value: CloudFrontClientTypes.FieldLevelEncryptionProfile?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FieldLevelEncryptionProfileConfig")].write(value.fieldLevelEncryptionProfileConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["FieldLevelEncryptionProfileConfig"].write(value.fieldLevelEncryptionProfileConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let fieldLevelEncryptionProfileConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.self, forKey: .fieldLevelEncryptionProfileConfig) - fieldLevelEncryptionProfileConfig = fieldLevelEncryptionProfileConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldLevelEncryptionProfile() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.fieldLevelEncryptionProfileConfig = try reader["FieldLevelEncryptionProfileConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.readingClosure) + return value + } } } @@ -8912,16 +7490,26 @@ extension CloudFrontClientTypes { } extension FieldLevelEncryptionProfileAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = FieldLevelEncryptionProfileAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension FieldLevelEncryptionProfileAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FieldLevelEncryptionProfileAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8949,48 +7537,26 @@ public struct FieldLevelEncryptionProfileAlreadyExists: ClientRuntime.ModeledErr } } -struct FieldLevelEncryptionProfileAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension FieldLevelEncryptionProfileAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.FieldLevelEncryptionProfileConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case comment = "Comment" - case encryptionEntities = "EncryptionEntities" - case name = "Name" - } +extension CloudFrontClientTypes.FieldLevelEncryptionProfileConfig { static func writingClosure(_ value: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Comment")].write(value.comment) - try writer[.init("EncryptionEntities")].write(value.encryptionEntities, writingClosure: CloudFrontClientTypes.EncryptionEntities.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) + try writer["CallerReference"].write(value.callerReference) + try writer["Comment"].write(value.comment) + try writer["EncryptionEntities"].write(value.encryptionEntities, writingClosure: CloudFrontClientTypes.EncryptionEntities.writingClosure(_:to:)) + try writer["Name"].write(value.name) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let encryptionEntitiesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.EncryptionEntities.self, forKey: .encryptionEntities) - encryptionEntities = encryptionEntitiesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldLevelEncryptionProfileConfig() + value.name = try reader["Name"].readIfPresent() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.comment = try reader["Comment"].readIfPresent() + value.encryptionEntities = try reader["EncryptionEntities"].readIfPresent(readingClosure: CloudFrontClientTypes.EncryptionEntities.readingClosure) + return value + } } } @@ -9026,16 +7592,26 @@ extension CloudFrontClientTypes { } extension FieldLevelEncryptionProfileInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = FieldLevelEncryptionProfileInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension FieldLevelEncryptionProfileInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FieldLevelEncryptionProfileInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9063,64 +7639,25 @@ public struct FieldLevelEncryptionProfileInUse: ClientRuntime.ModeledError, AWSC } } -struct FieldLevelEncryptionProfileInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension FieldLevelEncryptionProfileInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.FieldLevelEncryptionProfileList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.FieldLevelEncryptionProfileList { static func writingClosure(_ value: CloudFrontClientTypes.FieldLevelEncryptionProfileList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileSummary.writingClosure(_:to:), memberNodeInfo: .init("FieldLevelEncryptionProfileSummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct FieldLevelEncryptionProfileSummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.FieldLevelEncryptionProfileSummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.FieldLevelEncryptionProfileSummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.FieldLevelEncryptionProfileSummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileSummary.writingClosure(_:to:), memberNodeInfo: "FieldLevelEncryptionProfileSummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldLevelEncryptionProfileList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileSummary.readingClosure, memberNodeInfo: "FieldLevelEncryptionProfileSummary", isFlattened: false) + return value } } } @@ -9156,16 +7693,26 @@ extension CloudFrontClientTypes { } extension FieldLevelEncryptionProfileSizeExceeded { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = FieldLevelEncryptionProfileSizeExceeded() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension FieldLevelEncryptionProfileSizeExceeded { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FieldLevelEncryptionProfileSizeExceeded() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9193,52 +7740,28 @@ public struct FieldLevelEncryptionProfileSizeExceeded: ClientRuntime.ModeledErro } } -struct FieldLevelEncryptionProfileSizeExceededBody: Swift.Equatable { - let message: Swift.String? -} - -extension FieldLevelEncryptionProfileSizeExceededBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.FieldLevelEncryptionProfileSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case encryptionEntities = "EncryptionEntities" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - case name = "Name" - } +extension CloudFrontClientTypes.FieldLevelEncryptionProfileSummary { static func writingClosure(_ value: CloudFrontClientTypes.FieldLevelEncryptionProfileSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("EncryptionEntities")].write(value.encryptionEntities, writingClosure: CloudFrontClientTypes.EncryptionEntities.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("Name")].write(value.name) + try writer["Comment"].write(value.comment) + try writer["EncryptionEntities"].write(value.encryptionEntities, writingClosure: CloudFrontClientTypes.EncryptionEntities.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["Name"].write(value.name) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let encryptionEntitiesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.EncryptionEntities.self, forKey: .encryptionEntities) - encryptionEntities = encryptionEntitiesDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldLevelEncryptionProfileSummary() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.name = try reader["Name"].readIfPresent() + value.encryptionEntities = try reader["EncryptionEntities"].readIfPresent(readingClosure: CloudFrontClientTypes.EncryptionEntities.readingClosure) + value.comment = try reader["Comment"].readIfPresent() + return value + } } } @@ -9278,36 +7801,28 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.FieldLevelEncryptionSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case contentTypeProfileConfig = "ContentTypeProfileConfig" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - case queryArgProfileConfig = "QueryArgProfileConfig" - } +extension CloudFrontClientTypes.FieldLevelEncryptionSummary { static func writingClosure(_ value: CloudFrontClientTypes.FieldLevelEncryptionSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("ContentTypeProfileConfig")].write(value.contentTypeProfileConfig, writingClosure: CloudFrontClientTypes.ContentTypeProfileConfig.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("QueryArgProfileConfig")].write(value.queryArgProfileConfig, writingClosure: CloudFrontClientTypes.QueryArgProfileConfig.writingClosure(_:to:)) + try writer["Comment"].write(value.comment) + try writer["ContentTypeProfileConfig"].write(value.contentTypeProfileConfig, writingClosure: CloudFrontClientTypes.ContentTypeProfileConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["QueryArgProfileConfig"].write(value.queryArgProfileConfig, writingClosure: CloudFrontClientTypes.QueryArgProfileConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let queryArgProfileConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.QueryArgProfileConfig.self, forKey: .queryArgProfileConfig) - queryArgProfileConfig = queryArgProfileConfigDecoded - let contentTypeProfileConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContentTypeProfileConfig.self, forKey: .contentTypeProfileConfig) - contentTypeProfileConfig = contentTypeProfileConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldLevelEncryptionSummary() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.comment = try reader["Comment"].readIfPresent() + value.queryArgProfileConfig = try reader["QueryArgProfileConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.QueryArgProfileConfig.readingClosure) + value.contentTypeProfileConfig = try reader["ContentTypeProfileConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ContentTypeProfileConfig.readingClosure) + return value + } } } @@ -9345,40 +7860,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.FieldPatterns: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.FieldPatterns { static func writingClosure(_ value: CloudFrontClientTypes.FieldPatterns?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("FieldPattern"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct FieldPattern{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "FieldPattern", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FieldPatterns() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "FieldPattern", isFlattened: false) + return value } } } @@ -9433,32 +7929,26 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.ForwardedValues: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cookies = "Cookies" - case headers = "Headers" - case queryString = "QueryString" - case queryStringCacheKeys = "QueryStringCacheKeys" - } +extension CloudFrontClientTypes.ForwardedValues { static func writingClosure(_ value: CloudFrontClientTypes.ForwardedValues?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Cookies")].write(value.cookies, writingClosure: CloudFrontClientTypes.CookiePreference.writingClosure(_:to:)) - try writer[.init("Headers")].write(value.headers, writingClosure: CloudFrontClientTypes.Headers.writingClosure(_:to:)) - try writer[.init("QueryString")].write(value.queryString) - try writer[.init("QueryStringCacheKeys")].write(value.queryStringCacheKeys, writingClosure: CloudFrontClientTypes.QueryStringCacheKeys.writingClosure(_:to:)) + try writer["Cookies"].write(value.cookies, writingClosure: CloudFrontClientTypes.CookiePreference.writingClosure(_:to:)) + try writer["Headers"].write(value.headers, writingClosure: CloudFrontClientTypes.Headers.writingClosure(_:to:)) + try writer["QueryString"].write(value.queryString) + try writer["QueryStringCacheKeys"].write(value.queryStringCacheKeys, writingClosure: CloudFrontClientTypes.QueryStringCacheKeys.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let queryStringDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .queryString) - queryString = queryStringDecoded - let cookiesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CookiePreference.self, forKey: .cookies) - cookies = cookiesDecoded - let headersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Headers.self, forKey: .headers) - headers = headersDecoded - let queryStringCacheKeysDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.QueryStringCacheKeys.self, forKey: .queryStringCacheKeys) - queryStringCacheKeys = queryStringCacheKeysDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ForwardedValues() + value.queryString = try reader["QueryString"].readIfPresent() + value.cookies = try reader["Cookies"].readIfPresent(readingClosure: CloudFrontClientTypes.CookiePreference.readingClosure) + value.headers = try reader["Headers"].readIfPresent(readingClosure: CloudFrontClientTypes.Headers.readingClosure) + value.queryStringCacheKeys = try reader["QueryStringCacheKeys"].readIfPresent(readingClosure: CloudFrontClientTypes.QueryStringCacheKeys.readingClosure) + return value + } } } @@ -9525,16 +8015,26 @@ extension CloudFrontClientTypes { } extension FunctionAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = FunctionAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension FunctionAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FunctionAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9562,40 +8062,22 @@ public struct FunctionAlreadyExists: ClientRuntime.ModeledError, AWSClientRuntim } } -struct FunctionAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension FunctionAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.FunctionAssociation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventType = "EventType" - case functionARN = "FunctionARN" - } +extension CloudFrontClientTypes.FunctionAssociation { static func writingClosure(_ value: CloudFrontClientTypes.FunctionAssociation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EventType")].write(value.eventType) - try writer[.init("FunctionARN")].write(value.functionARN) + try writer["EventType"].write(value.eventType) + try writer["FunctionARN"].write(value.functionARN) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionARN) - functionARN = functionARNDecoded - let eventTypeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.EventType.self, forKey: .eventType) - eventType = eventTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FunctionAssociation() + value.functionARN = try reader["FunctionARN"].readIfPresent() + value.eventType = try reader["EventType"].readIfPresent() + return value + } } } @@ -9621,40 +8103,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.FunctionAssociations: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.FunctionAssociations { static func writingClosure(_ value: CloudFrontClientTypes.FunctionAssociations?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.FunctionAssociation.writingClosure(_:to:), memberNodeInfo: .init("FunctionAssociation"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct FunctionAssociation{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.FunctionAssociation].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.FunctionAssociation]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.FunctionAssociation]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.FunctionAssociation.writingClosure(_:to:), memberNodeInfo: "FunctionAssociation", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FunctionAssociations() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.FunctionAssociation.readingClosure, memberNodeInfo: "FunctionAssociation", isFlattened: false) + return value } } } @@ -9680,28 +8143,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.FunctionConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case keyValueStoreAssociations = "KeyValueStoreAssociations" - case runtime = "Runtime" - } +extension CloudFrontClientTypes.FunctionConfig { static func writingClosure(_ value: CloudFrontClientTypes.FunctionConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("KeyValueStoreAssociations")].write(value.keyValueStoreAssociations, writingClosure: CloudFrontClientTypes.KeyValueStoreAssociations.writingClosure(_:to:)) - try writer[.init("Runtime")].write(value.runtime) + try writer["Comment"].write(value.comment) + try writer["KeyValueStoreAssociations"].write(value.keyValueStoreAssociations, writingClosure: CloudFrontClientTypes.KeyValueStoreAssociations.writingClosure(_:to:)) + try writer["Runtime"].write(value.runtime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let runtimeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionRuntime.self, forKey: .runtime) - runtime = runtimeDecoded - let keyValueStoreAssociationsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyValueStoreAssociations.self, forKey: .keyValueStoreAssociations) - keyValueStoreAssociations = keyValueStoreAssociationsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FunctionConfig() + value.comment = try reader["Comment"].readIfPresent() + value.runtime = try reader["Runtime"].readIfPresent() + value.keyValueStoreAssociations = try reader["KeyValueStoreAssociations"].readIfPresent(readingClosure: CloudFrontClientTypes.KeyValueStoreAssociations.readingClosure) + return value + } } } @@ -9732,16 +8191,26 @@ extension CloudFrontClientTypes { } extension FunctionInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = FunctionInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension FunctionInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FunctionInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9769,64 +8238,25 @@ public struct FunctionInUse: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct FunctionInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension FunctionInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.FunctionList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.FunctionList { static func writingClosure(_ value: CloudFrontClientTypes.FunctionList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.FunctionSummary.writingClosure(_:to:), memberNodeInfo: .init("FunctionSummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct FunctionSummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.FunctionSummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.FunctionSummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.FunctionSummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.FunctionSummary.writingClosure(_:to:), memberNodeInfo: "FunctionSummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FunctionList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.FunctionSummary.readingClosure, memberNodeInfo: "FunctionSummary", isFlattened: false) + return value } } } @@ -9861,32 +8291,26 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.FunctionMetadata: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createdTime = "CreatedTime" - case functionARN = "FunctionARN" - case lastModifiedTime = "LastModifiedTime" - case stage = "Stage" - } +extension CloudFrontClientTypes.FunctionMetadata { static func writingClosure(_ value: CloudFrontClientTypes.FunctionMetadata?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreatedTime")].writeTimestamp(value.createdTime, format: .dateTime) - try writer[.init("FunctionARN")].write(value.functionARN) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("Stage")].write(value.stage) + try writer["CreatedTime"].writeTimestamp(value.createdTime, format: .dateTime) + try writer["FunctionARN"].write(value.functionARN) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["Stage"].write(value.stage) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionARN) - functionARN = functionARNDecoded - let stageDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionStage.self, forKey: .stage) - stage = stageDecoded - let createdTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTime) - createdTime = createdTimeDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FunctionMetadata() + value.functionARN = try reader["FunctionARN"].readIfPresent() + value.stage = try reader["Stage"].readIfPresent() + value.createdTime = try reader["CreatedTime"].readTimestampIfPresent(format: .dateTime) + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -9953,16 +8377,26 @@ extension CloudFrontClientTypes { } extension FunctionSizeLimitExceeded { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = FunctionSizeLimitExceeded() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension FunctionSizeLimitExceeded { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FunctionSizeLimitExceeded() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9990,22 +8424,6 @@ public struct FunctionSizeLimitExceeded: ClientRuntime.ModeledError, AWSClientRu } } -struct FunctionSizeLimitExceededBody: Swift.Equatable { - let message: Swift.String? -} - -extension FunctionSizeLimitExceededBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudFrontClientTypes { public enum FunctionStage: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case development @@ -10038,32 +8456,26 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.FunctionSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionConfig = "FunctionConfig" - case functionMetadata = "FunctionMetadata" - case name = "Name" - case status = "Status" - } +extension CloudFrontClientTypes.FunctionSummary { static func writingClosure(_ value: CloudFrontClientTypes.FunctionSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FunctionConfig")].write(value.functionConfig, writingClosure: CloudFrontClientTypes.FunctionConfig.writingClosure(_:to:)) - try writer[.init("FunctionMetadata")].write(value.functionMetadata, writingClosure: CloudFrontClientTypes.FunctionMetadata.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) - try writer[.init("Status")].write(value.status) + try writer["FunctionConfig"].write(value.functionConfig, writingClosure: CloudFrontClientTypes.FunctionConfig.writingClosure(_:to:)) + try writer["FunctionMetadata"].write(value.functionMetadata, writingClosure: CloudFrontClientTypes.FunctionMetadata.writingClosure(_:to:)) + try writer["Name"].write(value.name) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let functionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionConfig.self, forKey: .functionConfig) - functionConfig = functionConfigDecoded - let functionMetadataDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionMetadata.self, forKey: .functionMetadata) - functionMetadata = functionMetadataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.FunctionSummary() + value.name = try reader["Name"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.functionConfig = try reader["FunctionConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.FunctionConfig.readingClosure) + value.functionMetadata = try reader["FunctionMetadata"].readIfPresent(readingClosure: CloudFrontClientTypes.FunctionMetadata.readingClosure) + return value + } } } @@ -10098,44 +8510,23 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.GeoRestriction: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - case restrictionType = "RestrictionType" - } +extension CloudFrontClientTypes.GeoRestriction { static func writingClosure(_ value: CloudFrontClientTypes.GeoRestriction?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Location"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - try writer[.init("RestrictionType")].write(value.restrictionType) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let restrictionTypeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.GeoRestrictionType.self, forKey: .restrictionType) - restrictionType = restrictionTypeDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Location{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Location", isFlattened: false) + try writer["Quantity"].write(value.quantity) + try writer["RestrictionType"].write(value.restrictionType) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.GeoRestriction() + value.restrictionType = try reader["RestrictionType"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Location", isFlattened: false) + return value } } } @@ -10230,18 +8621,18 @@ public struct GetCachePolicyConfigInput: Swift.Equatable { } } -extension GetCachePolicyConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CachePolicyConfig = try responseDecoder.decode(responseBody: data) - self.cachePolicyConfig = output - } else { - self.cachePolicyConfig = nil +extension GetCachePolicyConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetCachePolicyConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.cachePolicyConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicyConfig.readingClosure) + return value } } } @@ -10262,29 +8653,18 @@ public struct GetCachePolicyConfigOutput: Swift.Equatable { } } -struct GetCachePolicyConfigOutputBody: Swift.Equatable { - let cachePolicyConfig: CloudFrontClientTypes.CachePolicyConfig? -} - -extension GetCachePolicyConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicyConfig = "CachePolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cachePolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyConfig.self, forKey: .cachePolicyConfig) - cachePolicyConfig = cachePolicyConfigDecoded - } -} +enum GetCachePolicyConfigOutputError { -enum GetCachePolicyConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10312,18 +8692,18 @@ public struct GetCachePolicyInput: Swift.Equatable { } } -extension GetCachePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CachePolicy = try responseDecoder.decode(responseBody: data) - self.cachePolicy = output - } else { - self.cachePolicy = nil +extension GetCachePolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetCachePolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.cachePolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicy.readingClosure) + return value } } } @@ -10344,29 +8724,18 @@ public struct GetCachePolicyOutput: Swift.Equatable { } } -struct GetCachePolicyOutputBody: Swift.Equatable { - let cachePolicy: CloudFrontClientTypes.CachePolicy? -} - -extension GetCachePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicy = "CachePolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cachePolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicy.self, forKey: .cachePolicy) - cachePolicy = cachePolicyDecoded - } -} +enum GetCachePolicyOutputError { -enum GetCachePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10395,18 +8764,18 @@ public struct GetCloudFrontOriginAccessIdentityConfigInput: Swift.Equatable { } } -extension GetCloudFrontOriginAccessIdentityConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig = try responseDecoder.decode(responseBody: data) - self.cloudFrontOriginAccessIdentityConfig = output - } else { - self.cloudFrontOriginAccessIdentityConfig = nil +extension GetCloudFrontOriginAccessIdentityConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetCloudFrontOriginAccessIdentityConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.cloudFrontOriginAccessIdentityConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.readingClosure) + return value } } } @@ -10428,29 +8797,18 @@ public struct GetCloudFrontOriginAccessIdentityConfigOutput: Swift.Equatable { } } -struct GetCloudFrontOriginAccessIdentityConfigOutputBody: Swift.Equatable { - let cloudFrontOriginAccessIdentityConfig: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig? -} - -extension GetCloudFrontOriginAccessIdentityConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentityConfig = "CloudFrontOriginAccessIdentityConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudFrontOriginAccessIdentityConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.self, forKey: .cloudFrontOriginAccessIdentityConfig) - cloudFrontOriginAccessIdentityConfig = cloudFrontOriginAccessIdentityConfigDecoded - } -} +enum GetCloudFrontOriginAccessIdentityConfigOutputError { -enum GetCloudFrontOriginAccessIdentityConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCloudFrontOriginAccessIdentity": return try await NoSuchCloudFrontOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCloudFrontOriginAccessIdentity": return try await NoSuchCloudFrontOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10479,18 +8837,18 @@ public struct GetCloudFrontOriginAccessIdentityInput: Swift.Equatable { } } -extension GetCloudFrontOriginAccessIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CloudFrontOriginAccessIdentity = try responseDecoder.decode(responseBody: data) - self.cloudFrontOriginAccessIdentity = output - } else { - self.cloudFrontOriginAccessIdentity = nil +extension GetCloudFrontOriginAccessIdentityOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetCloudFrontOriginAccessIdentityOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.cloudFrontOriginAccessIdentity = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentity.readingClosure) + return value } } } @@ -10512,29 +8870,18 @@ public struct GetCloudFrontOriginAccessIdentityOutput: Swift.Equatable { } } -struct GetCloudFrontOriginAccessIdentityOutputBody: Swift.Equatable { - let cloudFrontOriginAccessIdentity: CloudFrontClientTypes.CloudFrontOriginAccessIdentity? -} - -extension GetCloudFrontOriginAccessIdentityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentity = "CloudFrontOriginAccessIdentity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudFrontOriginAccessIdentityDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CloudFrontOriginAccessIdentity.self, forKey: .cloudFrontOriginAccessIdentity) - cloudFrontOriginAccessIdentity = cloudFrontOriginAccessIdentityDecoded - } -} +enum GetCloudFrontOriginAccessIdentityOutputError { -enum GetCloudFrontOriginAccessIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCloudFrontOriginAccessIdentity": return try await NoSuchCloudFrontOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCloudFrontOriginAccessIdentity": return try await NoSuchCloudFrontOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10562,18 +8909,18 @@ public struct GetContinuousDeploymentPolicyConfigInput: Swift.Equatable { } } -extension GetContinuousDeploymentPolicyConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig = try responseDecoder.decode(responseBody: data) - self.continuousDeploymentPolicyConfig = output - } else { - self.continuousDeploymentPolicyConfig = nil +extension GetContinuousDeploymentPolicyConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetContinuousDeploymentPolicyConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.continuousDeploymentPolicyConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.readingClosure) + return value } } } @@ -10594,29 +8941,18 @@ public struct GetContinuousDeploymentPolicyConfigOutput: Swift.Equatable { } } -struct GetContinuousDeploymentPolicyConfigOutputBody: Swift.Equatable { - let continuousDeploymentPolicyConfig: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig? -} - -extension GetContinuousDeploymentPolicyConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicyConfig = "ContinuousDeploymentPolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuousDeploymentPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.self, forKey: .continuousDeploymentPolicyConfig) - continuousDeploymentPolicyConfig = continuousDeploymentPolicyConfigDecoded - } -} +enum GetContinuousDeploymentPolicyConfigOutputError { -enum GetContinuousDeploymentPolicyConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10644,18 +8980,18 @@ public struct GetContinuousDeploymentPolicyInput: Swift.Equatable { } } -extension GetContinuousDeploymentPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ContinuousDeploymentPolicy = try responseDecoder.decode(responseBody: data) - self.continuousDeploymentPolicy = output - } else { - self.continuousDeploymentPolicy = nil +extension GetContinuousDeploymentPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetContinuousDeploymentPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.continuousDeploymentPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicy.readingClosure) + return value } } } @@ -10676,29 +9012,18 @@ public struct GetContinuousDeploymentPolicyOutput: Swift.Equatable { } } -struct GetContinuousDeploymentPolicyOutputBody: Swift.Equatable { - let continuousDeploymentPolicy: CloudFrontClientTypes.ContinuousDeploymentPolicy? -} - -extension GetContinuousDeploymentPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicy = "ContinuousDeploymentPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuousDeploymentPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicy.self, forKey: .continuousDeploymentPolicy) - continuousDeploymentPolicy = continuousDeploymentPolicyDecoded - } -} +enum GetContinuousDeploymentPolicyOutputError { -enum GetContinuousDeploymentPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10727,18 +9052,18 @@ public struct GetDistributionConfigInput: Swift.Equatable { } } -extension GetDistributionConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.DistributionConfig = try responseDecoder.decode(responseBody: data) - self.distributionConfig = output - } else { - self.distributionConfig = nil +extension GetDistributionConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetDistributionConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.distributionConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.DistributionConfig.readingClosure) + return value } } } @@ -10760,29 +9085,18 @@ public struct GetDistributionConfigOutput: Swift.Equatable { } } -struct GetDistributionConfigOutputBody: Swift.Equatable { - let distributionConfig: CloudFrontClientTypes.DistributionConfig? -} - -extension GetDistributionConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionConfig = "DistributionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionConfig.self, forKey: .distributionConfig) - distributionConfig = distributionConfigDecoded - } -} +enum GetDistributionConfigOutputError { -enum GetDistributionConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10811,18 +9125,18 @@ public struct GetDistributionInput: Swift.Equatable { } } -extension GetDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Distribution = try responseDecoder.decode(responseBody: data) - self.distribution = output - } else { - self.distribution = nil +extension GetDistributionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetDistributionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.distribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Distribution.readingClosure) + return value } } } @@ -10839,34 +9153,23 @@ public struct GetDistributionOutput: Swift.Equatable { eTag: Swift.String? = nil ) { - self.distribution = distribution - self.eTag = eTag - } -} - -struct GetDistributionOutputBody: Swift.Equatable { - let distribution: CloudFrontClientTypes.Distribution? -} - -extension GetDistributionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distribution = "Distribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Distribution.self, forKey: .distribution) - distribution = distributionDecoded + self.distribution = distribution + self.eTag = eTag } } -enum GetDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum GetDistributionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10894,18 +9197,18 @@ public struct GetFieldLevelEncryptionConfigInput: Swift.Equatable { } } -extension GetFieldLevelEncryptionConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryptionConfig = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryptionConfig = output - } else { - self.fieldLevelEncryptionConfig = nil +extension GetFieldLevelEncryptionConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetFieldLevelEncryptionConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.fieldLevelEncryptionConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.readingClosure) + return value } } } @@ -10926,29 +9229,18 @@ public struct GetFieldLevelEncryptionConfigOutput: Swift.Equatable { } } -struct GetFieldLevelEncryptionConfigOutputBody: Swift.Equatable { - let fieldLevelEncryptionConfig: CloudFrontClientTypes.FieldLevelEncryptionConfig? -} - -extension GetFieldLevelEncryptionConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionConfig = "FieldLevelEncryptionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionConfig.self, forKey: .fieldLevelEncryptionConfig) - fieldLevelEncryptionConfig = fieldLevelEncryptionConfigDecoded - } -} +enum GetFieldLevelEncryptionConfigOutputError { -enum GetFieldLevelEncryptionConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10976,18 +9268,18 @@ public struct GetFieldLevelEncryptionInput: Swift.Equatable { } } -extension GetFieldLevelEncryptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryption = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryption = output - } else { - self.fieldLevelEncryption = nil +extension GetFieldLevelEncryptionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetFieldLevelEncryptionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.fieldLevelEncryption = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryption.readingClosure) + return value } } } @@ -11008,29 +9300,18 @@ public struct GetFieldLevelEncryptionOutput: Swift.Equatable { } } -struct GetFieldLevelEncryptionOutputBody: Swift.Equatable { - let fieldLevelEncryption: CloudFrontClientTypes.FieldLevelEncryption? -} - -extension GetFieldLevelEncryptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryption = "FieldLevelEncryption" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryption.self, forKey: .fieldLevelEncryption) - fieldLevelEncryption = fieldLevelEncryptionDecoded - } -} +enum GetFieldLevelEncryptionOutputError { -enum GetFieldLevelEncryptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11058,18 +9339,18 @@ public struct GetFieldLevelEncryptionProfileConfigInput: Swift.Equatable { } } -extension GetFieldLevelEncryptionProfileConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryptionProfileConfig = output - } else { - self.fieldLevelEncryptionProfileConfig = nil +extension GetFieldLevelEncryptionProfileConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetFieldLevelEncryptionProfileConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.fieldLevelEncryptionProfileConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.readingClosure) + return value } } } @@ -11090,29 +9371,18 @@ public struct GetFieldLevelEncryptionProfileConfigOutput: Swift.Equatable { } } -struct GetFieldLevelEncryptionProfileConfigOutputBody: Swift.Equatable { - let fieldLevelEncryptionProfileConfig: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig? -} - -extension GetFieldLevelEncryptionProfileConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfileConfig = "FieldLevelEncryptionProfileConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionProfileConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.self, forKey: .fieldLevelEncryptionProfileConfig) - fieldLevelEncryptionProfileConfig = fieldLevelEncryptionProfileConfigDecoded - } -} +enum GetFieldLevelEncryptionProfileConfigOutputError { -enum GetFieldLevelEncryptionProfileConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11140,18 +9410,18 @@ public struct GetFieldLevelEncryptionProfileInput: Swift.Equatable { } } -extension GetFieldLevelEncryptionProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryptionProfile = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryptionProfile = output - } else { - self.fieldLevelEncryptionProfile = nil +extension GetFieldLevelEncryptionProfileOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetFieldLevelEncryptionProfileOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.fieldLevelEncryptionProfile = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfile.readingClosure) + return value } } } @@ -11172,29 +9442,18 @@ public struct GetFieldLevelEncryptionProfileOutput: Swift.Equatable { } } -struct GetFieldLevelEncryptionProfileOutputBody: Swift.Equatable { - let fieldLevelEncryptionProfile: CloudFrontClientTypes.FieldLevelEncryptionProfile? -} - -extension GetFieldLevelEncryptionProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfile = "FieldLevelEncryptionProfile" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionProfileDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionProfile.self, forKey: .fieldLevelEncryptionProfile) - fieldLevelEncryptionProfile = fieldLevelEncryptionProfileDecoded - } -} +enum GetFieldLevelEncryptionProfileOutputError { -enum GetFieldLevelEncryptionProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11243,25 +9502,28 @@ extension GetFunctionOutput: Swift.CustomDebugStringConvertible { "GetFunctionOutput(contentType: \(Swift.String(describing: contentType)), eTag: \(Swift.String(describing: eTag)), functionCode: \"CONTENT_REDACTED\")"} } -extension GetFunctionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let contentTypeHeaderValue = httpResponse.headers.value(for: "Content-Type") { - self.contentType = contentTypeHeaderValue - } else { - self.contentType = nil - } - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - switch httpResponse.body { - case .data(let data): - self.functionCode = data - case .stream(let stream): - self.functionCode = try stream.readToEnd() - case .noStream: - self.functionCode = nil +extension GetFunctionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetFunctionOutput() + if let contentTypeHeaderValue = httpResponse.headers.value(for: "Content-Type") { + value.contentType = contentTypeHeaderValue + } + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + switch httpResponse.body { + case .data(let data): + value.functionCode = data + case .stream(let stream): + value.functionCode = try stream.readToEnd() + case .noStream: + value.functionCode = nil + } + return value } } } @@ -11286,37 +9548,18 @@ public struct GetFunctionOutput: Swift.Equatable { } } -struct GetFunctionOutputBody: Swift.Equatable { - let functionCode: ClientRuntime.Data? -} - -extension GetFunctionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionCode = "FunctionCode" - } +enum GetFunctionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.functionCode) { - do { - let functionCodeDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .functionCode) - functionCode = functionCodeDecoded - } catch { - functionCode = "".data(using: .utf8) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "NoSuchFunctionExists": return try await NoSuchFunctionExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - functionCode = nil - } - } -} - -enum GetFunctionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchFunctionExists": return try await NoSuchFunctionExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -11353,13 +9596,15 @@ public struct GetInvalidationInput: Swift.Equatable { } } -extension GetInvalidationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Invalidation = try responseDecoder.decode(responseBody: data) - self.invalidation = output - } else { - self.invalidation = nil +extension GetInvalidationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetInvalidationOutput() + value.invalidation = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Invalidation.readingClosure) + return value } } } @@ -11377,30 +9622,19 @@ public struct GetInvalidationOutput: Swift.Equatable { } } -struct GetInvalidationOutputBody: Swift.Equatable { - let invalidation: CloudFrontClientTypes.Invalidation? -} - -extension GetInvalidationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case invalidation = "Invalidation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let invalidationDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Invalidation.self, forKey: .invalidation) - invalidation = invalidationDecoded - } -} +enum GetInvalidationOutputError { -enum GetInvalidationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchInvalidation": return try await NoSuchInvalidation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchInvalidation": return try await NoSuchInvalidation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11428,18 +9662,18 @@ public struct GetKeyGroupConfigInput: Swift.Equatable { } } -extension GetKeyGroupConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyGroupConfig = try responseDecoder.decode(responseBody: data) - self.keyGroupConfig = output - } else { - self.keyGroupConfig = nil +extension GetKeyGroupConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetKeyGroupConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.keyGroupConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyGroupConfig.readingClosure) + return value } } } @@ -11460,28 +9694,17 @@ public struct GetKeyGroupConfigOutput: Swift.Equatable { } } -struct GetKeyGroupConfigOutputBody: Swift.Equatable { - let keyGroupConfig: CloudFrontClientTypes.KeyGroupConfig? -} - -extension GetKeyGroupConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroupConfig = "KeyGroupConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroupConfig.self, forKey: .keyGroupConfig) - keyGroupConfig = keyGroupConfigDecoded - } -} +enum GetKeyGroupConfigOutputError { -enum GetKeyGroupConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchResource": return try await NoSuchResource(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "NoSuchResource": return try await NoSuchResource.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11509,18 +9732,18 @@ public struct GetKeyGroupInput: Swift.Equatable { } } -extension GetKeyGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyGroup = try responseDecoder.decode(responseBody: data) - self.keyGroup = output - } else { - self.keyGroup = nil +extension GetKeyGroupOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetKeyGroupOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.keyGroup = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyGroup.readingClosure) + return value } } } @@ -11541,28 +9764,17 @@ public struct GetKeyGroupOutput: Swift.Equatable { } } -struct GetKeyGroupOutputBody: Swift.Equatable { - let keyGroup: CloudFrontClientTypes.KeyGroup? -} - -extension GetKeyGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroup = "KeyGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroup.self, forKey: .keyGroup) - keyGroup = keyGroupDecoded - } -} +enum GetKeyGroupOutputError { -enum GetKeyGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchResource": return try await NoSuchResource(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "NoSuchResource": return try await NoSuchResource.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11590,13 +9802,15 @@ public struct GetMonitoringSubscriptionInput: Swift.Equatable { } } -extension GetMonitoringSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.MonitoringSubscription = try responseDecoder.decode(responseBody: data) - self.monitoringSubscription = output - } else { - self.monitoringSubscription = nil +extension GetMonitoringSubscriptionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetMonitoringSubscriptionOutput() + value.monitoringSubscription = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.MonitoringSubscription.readingClosure) + return value } } } @@ -11613,31 +9827,20 @@ public struct GetMonitoringSubscriptionOutput: Swift.Equatable { } } -struct GetMonitoringSubscriptionOutputBody: Swift.Equatable { - let monitoringSubscription: CloudFrontClientTypes.MonitoringSubscription? -} - -extension GetMonitoringSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case monitoringSubscription = "MonitoringSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let monitoringSubscriptionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.MonitoringSubscription.self, forKey: .monitoringSubscription) - monitoringSubscription = monitoringSubscriptionDecoded - } -} +enum GetMonitoringSubscriptionOutputError { -enum GetMonitoringSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchMonitoringSubscription": return try await NoSuchMonitoringSubscription(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchMonitoringSubscription": return try await NoSuchMonitoringSubscription.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11665,18 +9868,18 @@ public struct GetOriginAccessControlConfigInput: Swift.Equatable { } } -extension GetOriginAccessControlConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginAccessControlConfig = try responseDecoder.decode(responseBody: data) - self.originAccessControlConfig = output - } else { - self.originAccessControlConfig = nil +extension GetOriginAccessControlConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetOriginAccessControlConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.originAccessControlConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginAccessControlConfig.readingClosure) + return value } } } @@ -11697,29 +9900,18 @@ public struct GetOriginAccessControlConfigOutput: Swift.Equatable { } } -struct GetOriginAccessControlConfigOutputBody: Swift.Equatable { - let originAccessControlConfig: CloudFrontClientTypes.OriginAccessControlConfig? -} - -extension GetOriginAccessControlConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControlConfig = "OriginAccessControlConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originAccessControlConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlConfig.self, forKey: .originAccessControlConfig) - originAccessControlConfig = originAccessControlConfigDecoded - } -} +enum GetOriginAccessControlConfigOutputError { -enum GetOriginAccessControlConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginAccessControl": return try await NoSuchOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginAccessControl": return try await NoSuchOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11747,18 +9939,18 @@ public struct GetOriginAccessControlInput: Swift.Equatable { } } -extension GetOriginAccessControlOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginAccessControl = try responseDecoder.decode(responseBody: data) - self.originAccessControl = output - } else { - self.originAccessControl = nil +extension GetOriginAccessControlOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetOriginAccessControlOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.originAccessControl = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginAccessControl.readingClosure) + return value } } } @@ -11779,29 +9971,18 @@ public struct GetOriginAccessControlOutput: Swift.Equatable { } } -struct GetOriginAccessControlOutputBody: Swift.Equatable { - let originAccessControl: CloudFrontClientTypes.OriginAccessControl? -} - -extension GetOriginAccessControlOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControl = "OriginAccessControl" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originAccessControlDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControl.self, forKey: .originAccessControl) - originAccessControl = originAccessControlDecoded - } -} +enum GetOriginAccessControlOutputError { -enum GetOriginAccessControlOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginAccessControl": return try await NoSuchOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginAccessControl": return try await NoSuchOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11829,18 +10010,18 @@ public struct GetOriginRequestPolicyConfigInput: Swift.Equatable { } } -extension GetOriginRequestPolicyConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginRequestPolicyConfig = try responseDecoder.decode(responseBody: data) - self.originRequestPolicyConfig = output - } else { - self.originRequestPolicyConfig = nil +extension GetOriginRequestPolicyConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetOriginRequestPolicyConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.originRequestPolicyConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.readingClosure) + return value } } } @@ -11861,29 +10042,18 @@ public struct GetOriginRequestPolicyConfigOutput: Swift.Equatable { } } -struct GetOriginRequestPolicyConfigOutputBody: Swift.Equatable { - let originRequestPolicyConfig: CloudFrontClientTypes.OriginRequestPolicyConfig? -} - -extension GetOriginRequestPolicyConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicyConfig = "OriginRequestPolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originRequestPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyConfig.self, forKey: .originRequestPolicyConfig) - originRequestPolicyConfig = originRequestPolicyConfigDecoded - } -} +enum GetOriginRequestPolicyConfigOutputError { -enum GetOriginRequestPolicyConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11911,18 +10081,18 @@ public struct GetOriginRequestPolicyInput: Swift.Equatable { } } -extension GetOriginRequestPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginRequestPolicy = try responseDecoder.decode(responseBody: data) - self.originRequestPolicy = output - } else { - self.originRequestPolicy = nil +extension GetOriginRequestPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetOriginRequestPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.originRequestPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicy.readingClosure) + return value } } } @@ -11943,29 +10113,18 @@ public struct GetOriginRequestPolicyOutput: Swift.Equatable { } } -struct GetOriginRequestPolicyOutputBody: Swift.Equatable { - let originRequestPolicy: CloudFrontClientTypes.OriginRequestPolicy? -} - -extension GetOriginRequestPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicy = "OriginRequestPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originRequestPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicy.self, forKey: .originRequestPolicy) - originRequestPolicy = originRequestPolicyDecoded - } -} +enum GetOriginRequestPolicyOutputError { -enum GetOriginRequestPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11993,18 +10152,18 @@ public struct GetPublicKeyConfigInput: Swift.Equatable { } } -extension GetPublicKeyConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.PublicKeyConfig = try responseDecoder.decode(responseBody: data) - self.publicKeyConfig = output - } else { - self.publicKeyConfig = nil +extension GetPublicKeyConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetPublicKeyConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.publicKeyConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.PublicKeyConfig.readingClosure) + return value } } } @@ -12025,29 +10184,18 @@ public struct GetPublicKeyConfigOutput: Swift.Equatable { } } -struct GetPublicKeyConfigOutputBody: Swift.Equatable { - let publicKeyConfig: CloudFrontClientTypes.PublicKeyConfig? -} - -extension GetPublicKeyConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKeyConfig = "PublicKeyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicKeyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PublicKeyConfig.self, forKey: .publicKeyConfig) - publicKeyConfig = publicKeyConfigDecoded - } -} +enum GetPublicKeyConfigOutputError { -enum GetPublicKeyConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchPublicKey": return try await NoSuchPublicKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchPublicKey": return try await NoSuchPublicKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -12075,18 +10223,18 @@ public struct GetPublicKeyInput: Swift.Equatable { } } -extension GetPublicKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.PublicKey = try responseDecoder.decode(responseBody: data) - self.publicKey = output - } else { - self.publicKey = nil +extension GetPublicKeyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetPublicKeyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.publicKey = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.PublicKey.readingClosure) + return value } } } @@ -12107,43 +10255,27 @@ public struct GetPublicKeyOutput: Swift.Equatable { } } -struct GetPublicKeyOutputBody: Swift.Equatable { - let publicKey: CloudFrontClientTypes.PublicKey? -} - -extension GetPublicKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKey = "PublicKey" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicKeyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PublicKey.self, forKey: .publicKey) - publicKey = publicKeyDecoded - } -} +enum GetPublicKeyOutputError { -enum GetPublicKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchPublicKey": return try await NoSuchPublicKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchPublicKey": return try await NoSuchPublicKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension GetRealtimeLogConfigInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case name = "Name" - } - static func writingClosure(_ value: GetRealtimeLogConfigInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("Name")].write(value.name) + try writer["ARN"].write(value.arn) + try writer["Name"].write(value.name) } } @@ -12170,34 +10302,15 @@ public struct GetRealtimeLogConfigInput: Swift.Equatable { } } -struct GetRealtimeLogConfigInputBody: Swift.Equatable { - let name: Swift.String? - let arn: Swift.String? -} - -extension GetRealtimeLogConfigInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case name = "Name" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - } -} +extension GetRealtimeLogConfigOutput { -extension GetRealtimeLogConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetRealtimeLogConfigOutputBody = try responseDecoder.decode(responseBody: data) - self.realtimeLogConfig = output.realtimeLogConfig - } else { - self.realtimeLogConfig = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetRealtimeLogConfigOutput() + value.realtimeLogConfig = try reader["RealtimeLogConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.RealtimeLogConfig.readingClosure) + return value } } } @@ -12214,30 +10327,19 @@ public struct GetRealtimeLogConfigOutput: Swift.Equatable { } } -struct GetRealtimeLogConfigOutputBody: Swift.Equatable { - let realtimeLogConfig: CloudFrontClientTypes.RealtimeLogConfig? -} - -extension GetRealtimeLogConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case realtimeLogConfig = "RealtimeLogConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let realtimeLogConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.RealtimeLogConfig.self, forKey: .realtimeLogConfig) - realtimeLogConfig = realtimeLogConfigDecoded - } -} +enum GetRealtimeLogConfigOutputError { -enum GetRealtimeLogConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -12265,18 +10367,18 @@ public struct GetResponseHeadersPolicyConfigInput: Swift.Equatable { } } -extension GetResponseHeadersPolicyConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ResponseHeadersPolicyConfig = try responseDecoder.decode(responseBody: data) - self.responseHeadersPolicyConfig = output - } else { - self.responseHeadersPolicyConfig = nil +extension GetResponseHeadersPolicyConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetResponseHeadersPolicyConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.responseHeadersPolicyConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.readingClosure) + return value } } } @@ -12297,29 +10399,18 @@ public struct GetResponseHeadersPolicyConfigOutput: Swift.Equatable { } } -struct GetResponseHeadersPolicyConfigOutputBody: Swift.Equatable { - let responseHeadersPolicyConfig: CloudFrontClientTypes.ResponseHeadersPolicyConfig? -} - -extension GetResponseHeadersPolicyConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicyConfig = "ResponseHeadersPolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let responseHeadersPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyConfig.self, forKey: .responseHeadersPolicyConfig) - responseHeadersPolicyConfig = responseHeadersPolicyConfigDecoded - } -} +enum GetResponseHeadersPolicyConfigOutputError { -enum GetResponseHeadersPolicyConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -12347,18 +10438,18 @@ public struct GetResponseHeadersPolicyInput: Swift.Equatable { } } -extension GetResponseHeadersPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ResponseHeadersPolicy = try responseDecoder.decode(responseBody: data) - self.responseHeadersPolicy = output - } else { - self.responseHeadersPolicy = nil +extension GetResponseHeadersPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetResponseHeadersPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.responseHeadersPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicy.readingClosure) + return value } } } @@ -12379,29 +10470,18 @@ public struct GetResponseHeadersPolicyOutput: Swift.Equatable { } } -struct GetResponseHeadersPolicyOutputBody: Swift.Equatable { - let responseHeadersPolicy: CloudFrontClientTypes.ResponseHeadersPolicy? -} - -extension GetResponseHeadersPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicy = "ResponseHeadersPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let responseHeadersPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicy.self, forKey: .responseHeadersPolicy) - responseHeadersPolicy = responseHeadersPolicyDecoded - } -} +enum GetResponseHeadersPolicyOutputError { -enum GetResponseHeadersPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -12430,18 +10510,18 @@ public struct GetStreamingDistributionConfigInput: Swift.Equatable { } } -extension GetStreamingDistributionConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.StreamingDistributionConfig = try responseDecoder.decode(responseBody: data) - self.streamingDistributionConfig = output - } else { - self.streamingDistributionConfig = nil +extension GetStreamingDistributionConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetStreamingDistributionConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.streamingDistributionConfig = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.StreamingDistributionConfig.readingClosure) + return value } } } @@ -12463,29 +10543,18 @@ public struct GetStreamingDistributionConfigOutput: Swift.Equatable { } } -struct GetStreamingDistributionConfigOutputBody: Swift.Equatable { - let streamingDistributionConfig: CloudFrontClientTypes.StreamingDistributionConfig? -} - -extension GetStreamingDistributionConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionConfig = "StreamingDistributionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistributionConfig.self, forKey: .streamingDistributionConfig) - streamingDistributionConfig = streamingDistributionConfigDecoded - } -} +enum GetStreamingDistributionConfigOutputError { -enum GetStreamingDistributionConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchStreamingDistribution": return try await NoSuchStreamingDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchStreamingDistribution": return try await NoSuchStreamingDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -12514,18 +10583,18 @@ public struct GetStreamingDistributionInput: Swift.Equatable { } } -extension GetStreamingDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.StreamingDistribution = try responseDecoder.decode(responseBody: data) - self.streamingDistribution = output - } else { - self.streamingDistribution = nil +extension GetStreamingDistributionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetStreamingDistributionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.streamingDistribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.StreamingDistribution.readingClosure) + return value } } } @@ -12547,67 +10616,37 @@ public struct GetStreamingDistributionOutput: Swift.Equatable { } } -struct GetStreamingDistributionOutputBody: Swift.Equatable { - let streamingDistribution: CloudFrontClientTypes.StreamingDistribution? -} - -extension GetStreamingDistributionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistribution = "StreamingDistribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistribution.self, forKey: .streamingDistribution) - streamingDistribution = streamingDistributionDecoded - } -} +enum GetStreamingDistributionOutputError { -enum GetStreamingDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchStreamingDistribution": return try await NoSuchStreamingDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchStreamingDistribution": return try await NoSuchStreamingDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CloudFrontClientTypes.Headers: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.Headers { static func writingClosure(_ value: CloudFrontClientTypes.Headers?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Name"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Name{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Name", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Headers() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Name", isFlattened: false) + return value } } } @@ -12707,16 +10746,26 @@ extension CloudFrontClientTypes { } extension IllegalDelete { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IllegalDelete() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension IllegalDelete { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IllegalDelete() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12744,33 +10793,27 @@ public struct IllegalDelete: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct IllegalDeleteBody: Swift.Equatable { - let message: Swift.String? -} - -extension IllegalDeleteBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12798,33 +10841,27 @@ public struct IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior: Cli } } -struct IllegalFieldLevelEncryptionConfigAssociationWithCacheBehaviorBody: Swift.Equatable { - let message: Swift.String? -} - -extension IllegalFieldLevelEncryptionConfigAssociationWithCacheBehaviorBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension IllegalOriginAccessConfiguration { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IllegalOriginAccessConfiguration() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension IllegalOriginAccessConfiguration { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IllegalOriginAccessConfiguration() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12852,33 +10889,27 @@ public struct IllegalOriginAccessConfiguration: ClientRuntime.ModeledError, AWSC } } -struct IllegalOriginAccessConfigurationBody: Swift.Equatable { - let message: Swift.String? -} - -extension IllegalOriginAccessConfigurationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension IllegalUpdate { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IllegalUpdate() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension IllegalUpdate { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IllegalUpdate() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12906,40 +10937,22 @@ public struct IllegalUpdate: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct IllegalUpdateBody: Swift.Equatable { - let message: Swift.String? -} - -extension IllegalUpdateBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.ImportSource: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceARN = "SourceARN" - case sourceType = "SourceType" - } +extension CloudFrontClientTypes.ImportSource { static func writingClosure(_ value: CloudFrontClientTypes.ImportSource?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("SourceARN")].write(value.sourceARN) - try writer[.init("SourceType")].write(value.sourceType) + try writer["SourceARN"].write(value.sourceARN) + try writer["SourceType"].write(value.sourceType) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ImportSourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let sourceARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceARN) - sourceARN = sourceARNDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ImportSource() + value.sourceType = try reader["SourceType"].readIfPresent() + value.sourceARN = try reader["SourceARN"].readIfPresent() + return value + } } } @@ -12995,16 +11008,26 @@ extension CloudFrontClientTypes { } extension InconsistentQuantities { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InconsistentQuantities() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension InconsistentQuantities { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InconsistentQuantities() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13032,33 +11055,27 @@ public struct InconsistentQuantities: ClientRuntime.ModeledError, AWSClientRunti } } -struct InconsistentQuantitiesBody: Swift.Equatable { - let message: Swift.String? -} - -extension InconsistentQuantitiesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidArgument { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidArgument() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidArgument { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidArgument() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13086,33 +11103,27 @@ public struct InvalidArgument: ClientRuntime.ModeledError, AWSClientRuntime.AWSS } } -struct InvalidArgumentBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidArgumentBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidDefaultRootObject { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidDefaultRootObject() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidDefaultRootObject { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDefaultRootObject() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13140,33 +11151,27 @@ public struct InvalidDefaultRootObject: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidDefaultRootObjectBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDefaultRootObjectBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidDomainNameForOriginAccessControl { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidDomainNameForOriginAccessControl() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidDomainNameForOriginAccessControl { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDomainNameForOriginAccessControl() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13194,33 +11199,27 @@ public struct InvalidDomainNameForOriginAccessControl: ClientRuntime.ModeledErro } } -struct InvalidDomainNameForOriginAccessControlBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDomainNameForOriginAccessControlBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidErrorCode { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidErrorCode() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidErrorCode { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidErrorCode() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13248,33 +11247,27 @@ public struct InvalidErrorCode: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct InvalidErrorCodeBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidErrorCodeBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidForwardCookies { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidForwardCookies() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidForwardCookies { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidForwardCookies() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13302,33 +11295,27 @@ public struct InvalidForwardCookies: ClientRuntime.ModeledError, AWSClientRuntim } } -struct InvalidForwardCookiesBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidForwardCookiesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidFunctionAssociation { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidFunctionAssociation() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidFunctionAssociation { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidFunctionAssociation() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13356,33 +11343,27 @@ public struct InvalidFunctionAssociation: ClientRuntime.ModeledError, AWSClientR } } -struct InvalidFunctionAssociationBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidFunctionAssociationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidGeoRestrictionParameter { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidGeoRestrictionParameter() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidGeoRestrictionParameter { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidGeoRestrictionParameter() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13410,33 +11391,27 @@ public struct InvalidGeoRestrictionParameter: ClientRuntime.ModeledError, AWSCli } } -struct InvalidGeoRestrictionParameterBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidGeoRestrictionParameterBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidHeadersForS3Origin { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidHeadersForS3Origin() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidHeadersForS3Origin { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidHeadersForS3Origin() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13464,33 +11439,27 @@ public struct InvalidHeadersForS3Origin: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidHeadersForS3OriginBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidHeadersForS3OriginBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidIfMatchVersion { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidIfMatchVersion() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidIfMatchVersion { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidIfMatchVersion() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13518,33 +11487,27 @@ public struct InvalidIfMatchVersion: ClientRuntime.ModeledError, AWSClientRuntim } } -struct InvalidIfMatchVersionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidIfMatchVersionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidLambdaFunctionAssociation { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidLambdaFunctionAssociation() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidLambdaFunctionAssociation { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidLambdaFunctionAssociation() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13572,33 +11535,27 @@ public struct InvalidLambdaFunctionAssociation: ClientRuntime.ModeledError, AWSC } } -struct InvalidLambdaFunctionAssociationBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidLambdaFunctionAssociationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidLocationCode { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidLocationCode() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidLocationCode { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidLocationCode() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13626,33 +11583,27 @@ public struct InvalidLocationCode: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct InvalidLocationCodeBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidLocationCodeBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidMinimumProtocolVersion { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidMinimumProtocolVersion() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidMinimumProtocolVersion { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidMinimumProtocolVersion() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13680,33 +11631,27 @@ public struct InvalidMinimumProtocolVersion: ClientRuntime.ModeledError, AWSClie } } -struct InvalidMinimumProtocolVersionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidMinimumProtocolVersionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidOrigin { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidOrigin() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidOrigin { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidOrigin() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13735,16 +11680,26 @@ public struct InvalidOrigin: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } extension InvalidOriginAccessControl { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidOriginAccessControl() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension InvalidOriginAccessControl { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidOriginAccessControl() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13772,33 +11727,27 @@ public struct InvalidOriginAccessControl: ClientRuntime.ModeledError, AWSClientR } } -struct InvalidOriginAccessControlBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidOriginAccessControlBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidOriginAccessIdentity { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidOriginAccessIdentity() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidOriginAccessIdentity { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidOriginAccessIdentity() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13826,49 +11775,27 @@ public struct InvalidOriginAccessIdentity: ClientRuntime.ModeledError, AWSClient } } -struct InvalidOriginAccessIdentityBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidOriginAccessIdentityBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -struct InvalidOriginBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidOriginBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidOriginKeepaliveTimeout { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidOriginKeepaliveTimeout() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidOriginKeepaliveTimeout { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidOriginKeepaliveTimeout() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13896,33 +11823,27 @@ public struct InvalidOriginKeepaliveTimeout: ClientRuntime.ModeledError, AWSClie } } -struct InvalidOriginKeepaliveTimeoutBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidOriginKeepaliveTimeoutBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidOriginReadTimeout { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidOriginReadTimeout() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidOriginReadTimeout { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidOriginReadTimeout() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13950,33 +11871,27 @@ public struct InvalidOriginReadTimeout: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidOriginReadTimeoutBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidOriginReadTimeoutBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidProtocolSettings { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidProtocolSettings() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidProtocolSettings { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidProtocolSettings() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14004,33 +11919,27 @@ public struct InvalidProtocolSettings: ClientRuntime.ModeledError, AWSClientRunt } } -struct InvalidProtocolSettingsBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidProtocolSettingsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidQueryStringParameters { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidQueryStringParameters() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidQueryStringParameters { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidQueryStringParameters() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14058,33 +11967,27 @@ public struct InvalidQueryStringParameters: ClientRuntime.ModeledError, AWSClien } } -struct InvalidQueryStringParametersBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidQueryStringParametersBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidRelativePath { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidRelativePath() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidRelativePath { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRelativePath() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14112,33 +12015,27 @@ public struct InvalidRelativePath: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct InvalidRelativePathBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRelativePathBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidRequiredProtocol { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidRequiredProtocol() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidRequiredProtocol { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRequiredProtocol() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14166,33 +12063,27 @@ public struct InvalidRequiredProtocol: ClientRuntime.ModeledError, AWSClientRunt } } -struct InvalidRequiredProtocolBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRequiredProtocolBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidResponseCode { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidResponseCode() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidResponseCode { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidResponseCode() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14220,33 +12111,27 @@ public struct InvalidResponseCode: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct InvalidResponseCodeBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidResponseCodeBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidTTLOrder { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidTTLOrder() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidTTLOrder { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTTLOrder() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14274,33 +12159,27 @@ public struct InvalidTTLOrder: ClientRuntime.ModeledError, AWSClientRuntime.AWSS } } -struct InvalidTTLOrderBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidTTLOrderBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidTagging { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidTagging() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidTagging { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTagging() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14328,33 +12207,27 @@ public struct InvalidTagging: ClientRuntime.ModeledError, AWSClientRuntime.AWSSe } } -struct InvalidTaggingBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidTaggingBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidViewerCertificate { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidViewerCertificate() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidViewerCertificate { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidViewerCertificate() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14382,33 +12255,27 @@ public struct InvalidViewerCertificate: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidViewerCertificateBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidViewerCertificateBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidWebACLId { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidWebACLId() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidWebACLId { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidWebACLId() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14436,48 +12303,26 @@ public struct InvalidWebACLId: ClientRuntime.ModeledError, AWSClientRuntime.AWSS } } -struct InvalidWebACLIdBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidWebACLIdBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.Invalidation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "CreateTime" - case id = "Id" - case invalidationBatch = "InvalidationBatch" - case status = "Status" - } +extension CloudFrontClientTypes.Invalidation { static func writingClosure(_ value: CloudFrontClientTypes.Invalidation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreateTime")].writeTimestamp(value.createTime, format: .dateTime) - try writer[.init("Id")].write(value.id) - try writer[.init("InvalidationBatch")].write(value.invalidationBatch, writingClosure: CloudFrontClientTypes.InvalidationBatch.writingClosure(_:to:)) - try writer[.init("Status")].write(value.status) + try writer["CreateTime"].writeTimestamp(value.createTime, format: .dateTime) + try writer["Id"].write(value.id) + try writer["InvalidationBatch"].write(value.invalidationBatch, writingClosure: CloudFrontClientTypes.InvalidationBatch.writingClosure(_:to:)) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let invalidationBatchDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.InvalidationBatch.self, forKey: .invalidationBatch) - invalidationBatch = invalidationBatchDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Invalidation() + value.id = try reader["Id"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.invalidationBatch = try reader["InvalidationBatch"].readIfPresent(readingClosure: CloudFrontClientTypes.InvalidationBatch.readingClosure) + return value + } } } @@ -14513,24 +12358,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.InvalidationBatch: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case paths = "Paths" - } +extension CloudFrontClientTypes.InvalidationBatch { static func writingClosure(_ value: CloudFrontClientTypes.InvalidationBatch?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Paths")].write(value.paths, writingClosure: CloudFrontClientTypes.Paths.writingClosure(_:to:)) + try writer["CallerReference"].write(value.callerReference) + try writer["Paths"].write(value.paths, writingClosure: CloudFrontClientTypes.Paths.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Paths.self, forKey: .paths) - paths = pathsDecoded - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.InvalidationBatch() + value.paths = try reader["Paths"].readIfPresent(readingClosure: CloudFrontClientTypes.Paths.readingClosure) + value.callerReference = try reader["CallerReference"].readIfPresent() + return value + } } } @@ -14556,56 +12399,29 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.InvalidationList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case items = "Items" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.InvalidationList { static func writingClosure(_ value: CloudFrontClientTypes.InvalidationList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsTruncated")].write(value.isTruncated) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.InvalidationSummary.writingClosure(_:to:), memberNodeInfo: .init("InvalidationSummary"), isFlattened: false) - try writer[.init("Marker")].write(value.marker) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct InvalidationSummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.InvalidationSummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.InvalidationSummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.InvalidationSummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["IsTruncated"].write(value.isTruncated) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.InvalidationSummary.writingClosure(_:to:), memberNodeInfo: "InvalidationSummary", isFlattened: false) + try writer["Marker"].write(value.marker) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.InvalidationList() + value.marker = try reader["Marker"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.InvalidationSummary.readingClosure, memberNodeInfo: "InvalidationSummary", isFlattened: false) + return value } } } @@ -14650,28 +12466,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.InvalidationSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "CreateTime" - case id = "Id" - case status = "Status" - } +extension CloudFrontClientTypes.InvalidationSummary { static func writingClosure(_ value: CloudFrontClientTypes.InvalidationSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreateTime")].writeTimestamp(value.createTime, format: .dateTime) - try writer[.init("Id")].write(value.id) - try writer[.init("Status")].write(value.status) + try writer["CreateTime"].writeTimestamp(value.createTime, format: .dateTime) + try writer["Id"].write(value.id) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.InvalidationSummary() + value.id = try reader["Id"].readIfPresent() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -14737,24 +12549,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.KGKeyPairIds: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroupId = "KeyGroupId" - case keyPairIds = "KeyPairIds" - } +extension CloudFrontClientTypes.KGKeyPairIds { static func writingClosure(_ value: CloudFrontClientTypes.KGKeyPairIds?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KeyGroupId")].write(value.keyGroupId) - try writer[.init("KeyPairIds")].write(value.keyPairIds, writingClosure: CloudFrontClientTypes.KeyPairIds.writingClosure(_:to:)) + try writer["KeyGroupId"].write(value.keyGroupId) + try writer["KeyPairIds"].write(value.keyPairIds, writingClosure: CloudFrontClientTypes.KeyPairIds.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyGroupId) - keyGroupId = keyGroupIdDecoded - let keyPairIdsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyPairIds.self, forKey: .keyPairIds) - keyPairIds = keyPairIdsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KGKeyPairIds() + value.keyGroupId = try reader["KeyGroupId"].readIfPresent() + value.keyPairIds = try reader["KeyPairIds"].readIfPresent(readingClosure: CloudFrontClientTypes.KeyPairIds.readingClosure) + return value + } } } @@ -14778,28 +12588,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KeyGroup: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case id = "Id" - case keyGroupConfig = "KeyGroupConfig" - case lastModifiedTime = "LastModifiedTime" - } +extension CloudFrontClientTypes.KeyGroup { static func writingClosure(_ value: CloudFrontClientTypes.KeyGroup?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Id")].write(value.id) - try writer[.init("KeyGroupConfig")].write(value.keyGroupConfig, writingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:)) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["Id"].write(value.id) + try writer["KeyGroupConfig"].write(value.keyGroupConfig, writingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:)) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let keyGroupConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroupConfig.self, forKey: .keyGroupConfig) - keyGroupConfig = keyGroupConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyGroup() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.keyGroupConfig = try reader["KeyGroupConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.KeyGroupConfig.readingClosure) + return value + } } } @@ -14831,16 +12637,26 @@ extension CloudFrontClientTypes { } extension KeyGroupAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = KeyGroupAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension KeyGroupAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KeyGroupAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14868,61 +12684,24 @@ public struct KeyGroupAlreadyExists: ClientRuntime.ModeledError, AWSClientRuntim } } -struct KeyGroupAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension KeyGroupAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.KeyGroupConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case items = "Items" - case name = "Name" - } +extension CloudFrontClientTypes.KeyGroupConfig { static func writingClosure(_ value: CloudFrontClientTypes.KeyGroupConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("PublicKey"), isFlattened: false) - try writer[.init("Name")].write(value.name) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct PublicKey{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Comment"].write(value.comment) + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "PublicKey", isFlattened: false) + try writer["Name"].write(value.name) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyGroupConfig() + value.name = try reader["Name"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "PublicKey", isFlattened: false) + value.comment = try reader["Comment"].readIfPresent() + return value } - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded } } @@ -14952,48 +12731,25 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KeyGroupList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.KeyGroupList { static func writingClosure(_ value: CloudFrontClientTypes.KeyGroupList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.KeyGroupSummary.writingClosure(_:to:), memberNodeInfo: .init("KeyGroupSummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct KeyGroupSummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.KeyGroupSummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.KeyGroupSummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.KeyGroupSummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.KeyGroupSummary.writingClosure(_:to:), memberNodeInfo: "KeyGroupSummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyGroupList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.KeyGroupSummary.readingClosure, memberNodeInfo: "KeyGroupSummary", isFlattened: false) + return value } } } @@ -15028,20 +12784,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KeyGroupSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroup = "KeyGroup" - } +extension CloudFrontClientTypes.KeyGroupSummary { static func writingClosure(_ value: CloudFrontClientTypes.KeyGroupSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KeyGroup")].write(value.keyGroup, writingClosure: CloudFrontClientTypes.KeyGroup.writingClosure(_:to:)) + try writer["KeyGroup"].write(value.keyGroup, writingClosure: CloudFrontClientTypes.KeyGroup.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroup.self, forKey: .keyGroup) - keyGroup = keyGroupDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyGroupSummary() + value.keyGroup = try reader["KeyGroup"].readIfPresent(readingClosure: CloudFrontClientTypes.KeyGroup.readingClosure) + return value + } } } @@ -15062,40 +12818,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KeyPairIds: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.KeyPairIds { static func writingClosure(_ value: CloudFrontClientTypes.KeyPairIds?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("KeyPairId"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct KeyPairId{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "KeyPairId", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyPairIds() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "KeyPairId", isFlattened: false) + return value } } } @@ -15121,40 +12858,30 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KeyValueStore: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case comment = "Comment" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - case name = "Name" - case status = "Status" - } +extension CloudFrontClientTypes.KeyValueStore { static func writingClosure(_ value: CloudFrontClientTypes.KeyValueStore?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("Comment")].write(value.comment) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("Name")].write(value.name) - try writer[.init("Status")].write(value.status) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded + try writer["ARN"].write(value.arn) + try writer["Comment"].write(value.comment) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["Name"].write(value.name) + try writer["Status"].write(value.status) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyValueStore() + value.name = try reader["Name"].readIfPresent() + value.id = try reader["Id"].readIfPresent() + value.comment = try reader["Comment"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -15199,20 +12926,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KeyValueStoreAssociation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyValueStoreARN = "KeyValueStoreARN" - } +extension CloudFrontClientTypes.KeyValueStoreAssociation { static func writingClosure(_ value: CloudFrontClientTypes.KeyValueStoreAssociation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KeyValueStoreARN")].write(value.keyValueStoreARN) + try writer["KeyValueStoreARN"].write(value.keyValueStoreARN) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyValueStoreARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyValueStoreARN) - keyValueStoreARN = keyValueStoreARNDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyValueStoreAssociation() + value.keyValueStoreARN = try reader["KeyValueStoreARN"].readIfPresent() + return value + } } } @@ -15233,40 +12960,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KeyValueStoreAssociations: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.KeyValueStoreAssociations { static func writingClosure(_ value: CloudFrontClientTypes.KeyValueStoreAssociations?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.KeyValueStoreAssociation.writingClosure(_:to:), memberNodeInfo: .init("KeyValueStoreAssociation"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct KeyValueStoreAssociation{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.KeyValueStoreAssociation].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.KeyValueStoreAssociation]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.KeyValueStoreAssociation]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.KeyValueStoreAssociation.writingClosure(_:to:), memberNodeInfo: "KeyValueStoreAssociation", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyValueStoreAssociations() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.KeyValueStoreAssociation.readingClosure, memberNodeInfo: "KeyValueStoreAssociation", isFlattened: false) + return value } } } @@ -15292,48 +13000,25 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KeyValueStoreList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.KeyValueStoreList { static func writingClosure(_ value: CloudFrontClientTypes.KeyValueStoreList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.KeyValueStore.writingClosure(_:to:), memberNodeInfo: .init("KeyValueStore"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct KeyValueStore{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.KeyValueStore].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.KeyValueStore]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.KeyValueStore]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.KeyValueStore.writingClosure(_:to:), memberNodeInfo: "KeyValueStore", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KeyValueStoreList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.KeyValueStore.readingClosure, memberNodeInfo: "KeyValueStore", isFlattened: false) + return value } } } @@ -15368,24 +13053,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.KinesisStreamConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case roleARN = "RoleARN" - case streamARN = "StreamARN" - } +extension CloudFrontClientTypes.KinesisStreamConfig { static func writingClosure(_ value: CloudFrontClientTypes.KinesisStreamConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("RoleARN")].write(value.roleARN) - try writer[.init("StreamARN")].write(value.streamARN) + try writer["RoleARN"].write(value.roleARN) + try writer["StreamARN"].write(value.streamARN) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleARN) - roleARN = roleARNDecoded - let streamARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .streamARN) - streamARN = streamARNDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.KinesisStreamConfig() + value.roleARN = try reader["RoleARN"].readIfPresent() + value.streamARN = try reader["StreamARN"].readIfPresent() + return value + } } } @@ -15411,28 +13094,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.LambdaFunctionAssociation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventType = "EventType" - case includeBody = "IncludeBody" - case lambdaFunctionARN = "LambdaFunctionARN" - } +extension CloudFrontClientTypes.LambdaFunctionAssociation { static func writingClosure(_ value: CloudFrontClientTypes.LambdaFunctionAssociation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EventType")].write(value.eventType) - try writer[.init("IncludeBody")].write(value.includeBody) - try writer[.init("LambdaFunctionARN")].write(value.lambdaFunctionARN) + try writer["EventType"].write(value.eventType) + try writer["IncludeBody"].write(value.includeBody) + try writer["LambdaFunctionARN"].write(value.lambdaFunctionARN) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lambdaFunctionARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lambdaFunctionARN) - lambdaFunctionARN = lambdaFunctionARNDecoded - let eventTypeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.EventType.self, forKey: .eventType) - eventType = eventTypeDecoded - let includeBodyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeBody) - includeBody = includeBodyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.LambdaFunctionAssociation() + value.lambdaFunctionARN = try reader["LambdaFunctionARN"].readIfPresent() + value.eventType = try reader["EventType"].readIfPresent() + value.includeBody = try reader["IncludeBody"].readIfPresent() + return value + } } } @@ -15470,40 +13149,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.LambdaFunctionAssociations: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.LambdaFunctionAssociations { static func writingClosure(_ value: CloudFrontClientTypes.LambdaFunctionAssociations?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.LambdaFunctionAssociation.writingClosure(_:to:), memberNodeInfo: .init("LambdaFunctionAssociation"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct LambdaFunctionAssociation{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.LambdaFunctionAssociation].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.LambdaFunctionAssociation]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.LambdaFunctionAssociation]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.LambdaFunctionAssociation.writingClosure(_:to:), memberNodeInfo: "LambdaFunctionAssociation", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.LambdaFunctionAssociations() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.LambdaFunctionAssociation.readingClosure, memberNodeInfo: "LambdaFunctionAssociation", isFlattened: false) + return value } } } @@ -15580,13 +13240,15 @@ public struct ListCachePoliciesInput: Swift.Equatable { } } -extension ListCachePoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CachePolicyList = try responseDecoder.decode(responseBody: data) - self.cachePolicyList = output - } else { - self.cachePolicyList = nil +extension ListCachePoliciesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListCachePoliciesOutput() + value.cachePolicyList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicyList.readingClosure) + return value } } } @@ -15603,30 +13265,19 @@ public struct ListCachePoliciesOutput: Swift.Equatable { } } -struct ListCachePoliciesOutputBody: Swift.Equatable { - let cachePolicyList: CloudFrontClientTypes.CachePolicyList? -} - -extension ListCachePoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicyList = "CachePolicyList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cachePolicyListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyList.self, forKey: .cachePolicyList) - cachePolicyList = cachePolicyListDecoded - } -} +enum ListCachePoliciesOutputError { -enum ListCachePoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -15671,13 +13322,15 @@ public struct ListCloudFrontOriginAccessIdentitiesInput: Swift.Equatable { } } -extension ListCloudFrontOriginAccessIdentitiesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CloudFrontOriginAccessIdentityList = try responseDecoder.decode(responseBody: data) - self.cloudFrontOriginAccessIdentityList = output - } else { - self.cloudFrontOriginAccessIdentityList = nil +extension ListCloudFrontOriginAccessIdentitiesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListCloudFrontOriginAccessIdentitiesOutput() + value.cloudFrontOriginAccessIdentityList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityList.readingClosure) + return value } } } @@ -15695,28 +13348,17 @@ public struct ListCloudFrontOriginAccessIdentitiesOutput: Swift.Equatable { } } -struct ListCloudFrontOriginAccessIdentitiesOutputBody: Swift.Equatable { - let cloudFrontOriginAccessIdentityList: CloudFrontClientTypes.CloudFrontOriginAccessIdentityList? -} - -extension ListCloudFrontOriginAccessIdentitiesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentityList = "CloudFrontOriginAccessIdentityList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudFrontOriginAccessIdentityListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CloudFrontOriginAccessIdentityList.self, forKey: .cloudFrontOriginAccessIdentityList) - cloudFrontOriginAccessIdentityList = cloudFrontOriginAccessIdentityListDecoded - } -} +enum ListCloudFrontOriginAccessIdentitiesOutputError { -enum ListCloudFrontOriginAccessIdentitiesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -15782,13 +13424,15 @@ public struct ListConflictingAliasesInput: Swift.Equatable { } } -extension ListConflictingAliasesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ConflictingAliasesList = try responseDecoder.decode(responseBody: data) - self.conflictingAliasesList = output - } else { - self.conflictingAliasesList = nil +extension ListConflictingAliasesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListConflictingAliasesOutput() + value.conflictingAliasesList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ConflictingAliasesList.readingClosure) + return value } } } @@ -15805,29 +13449,18 @@ public struct ListConflictingAliasesOutput: Swift.Equatable { } } -struct ListConflictingAliasesOutputBody: Swift.Equatable { - let conflictingAliasesList: CloudFrontClientTypes.ConflictingAliasesList? -} - -extension ListConflictingAliasesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case conflictingAliasesList = "ConflictingAliasesList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let conflictingAliasesListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ConflictingAliasesList.self, forKey: .conflictingAliasesList) - conflictingAliasesList = conflictingAliasesListDecoded - } -} +enum ListConflictingAliasesOutputError { -enum ListConflictingAliasesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -15871,13 +13504,15 @@ public struct ListContinuousDeploymentPoliciesInput: Swift.Equatable { } } -extension ListContinuousDeploymentPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ContinuousDeploymentPolicyList = try responseDecoder.decode(responseBody: data) - self.continuousDeploymentPolicyList = output - } else { - self.continuousDeploymentPolicyList = nil +extension ListContinuousDeploymentPoliciesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListContinuousDeploymentPoliciesOutput() + value.continuousDeploymentPolicyList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyList.readingClosure) + return value } } } @@ -15894,30 +13529,19 @@ public struct ListContinuousDeploymentPoliciesOutput: Swift.Equatable { } } -struct ListContinuousDeploymentPoliciesOutputBody: Swift.Equatable { - let continuousDeploymentPolicyList: CloudFrontClientTypes.ContinuousDeploymentPolicyList? -} - -extension ListContinuousDeploymentPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicyList = "ContinuousDeploymentPolicyList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuousDeploymentPolicyListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicyList.self, forKey: .continuousDeploymentPolicyList) - continuousDeploymentPolicyList = continuousDeploymentPolicyListDecoded - } -} +enum ListContinuousDeploymentPoliciesOutputError { -enum ListContinuousDeploymentPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -15969,13 +13593,15 @@ public struct ListDistributionsByCachePolicyIdInput: Swift.Equatable { } } -extension ListDistributionsByCachePolicyIdOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.DistributionIdList = try responseDecoder.decode(responseBody: data) - self.distributionIdList = output - } else { - self.distributionIdList = nil +extension ListDistributionsByCachePolicyIdOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListDistributionsByCachePolicyIdOutput() + value.distributionIdList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.DistributionIdList.readingClosure) + return value } } } @@ -15992,30 +13618,19 @@ public struct ListDistributionsByCachePolicyIdOutput: Swift.Equatable { } } -struct ListDistributionsByCachePolicyIdOutputBody: Swift.Equatable { - let distributionIdList: CloudFrontClientTypes.DistributionIdList? -} - -extension ListDistributionsByCachePolicyIdOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionIdList = "DistributionIdList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionIdListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionIdList.self, forKey: .distributionIdList) - distributionIdList = distributionIdListDecoded - } -} +enum ListDistributionsByCachePolicyIdOutputError { -enum ListDistributionsByCachePolicyIdOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16067,13 +13682,15 @@ public struct ListDistributionsByKeyGroupInput: Swift.Equatable { } } -extension ListDistributionsByKeyGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.DistributionIdList = try responseDecoder.decode(responseBody: data) - self.distributionIdList = output - } else { - self.distributionIdList = nil +extension ListDistributionsByKeyGroupOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListDistributionsByKeyGroupOutput() + value.distributionIdList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.DistributionIdList.readingClosure) + return value } } } @@ -16090,29 +13707,18 @@ public struct ListDistributionsByKeyGroupOutput: Swift.Equatable { } } -struct ListDistributionsByKeyGroupOutputBody: Swift.Equatable { - let distributionIdList: CloudFrontClientTypes.DistributionIdList? -} - -extension ListDistributionsByKeyGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionIdList = "DistributionIdList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionIdListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionIdList.self, forKey: .distributionIdList) - distributionIdList = distributionIdListDecoded - } -} +enum ListDistributionsByKeyGroupOutputError { -enum ListDistributionsByKeyGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResource": return try await NoSuchResource(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResource": return try await NoSuchResource.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16164,13 +13770,15 @@ public struct ListDistributionsByOriginRequestPolicyIdInput: Swift.Equatable { } } -extension ListDistributionsByOriginRequestPolicyIdOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.DistributionIdList = try responseDecoder.decode(responseBody: data) - self.distributionIdList = output - } else { - self.distributionIdList = nil +extension ListDistributionsByOriginRequestPolicyIdOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListDistributionsByOriginRequestPolicyIdOutput() + value.distributionIdList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.DistributionIdList.readingClosure) + return value } } } @@ -16187,48 +13795,30 @@ public struct ListDistributionsByOriginRequestPolicyIdOutput: Swift.Equatable { } } -struct ListDistributionsByOriginRequestPolicyIdOutputBody: Swift.Equatable { - let distributionIdList: CloudFrontClientTypes.DistributionIdList? -} - -extension ListDistributionsByOriginRequestPolicyIdOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionIdList = "DistributionIdList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionIdListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionIdList.self, forKey: .distributionIdList) - distributionIdList = distributionIdListDecoded - } -} +enum ListDistributionsByOriginRequestPolicyIdOutputError { -enum ListDistributionsByOriginRequestPolicyIdOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension ListDistributionsByRealtimeLogConfigInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case realtimeLogConfigArn = "RealtimeLogConfigArn" - case realtimeLogConfigName = "RealtimeLogConfigName" - } - static func writingClosure(_ value: ListDistributionsByRealtimeLogConfigInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Marker")].write(value.marker) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("RealtimeLogConfigArn")].write(value.realtimeLogConfigArn) - try writer[.init("RealtimeLogConfigName")].write(value.realtimeLogConfigName) + try writer["Marker"].write(value.marker) + try writer["MaxItems"].write(value.maxItems) + try writer["RealtimeLogConfigArn"].write(value.realtimeLogConfigArn) + try writer["RealtimeLogConfigName"].write(value.realtimeLogConfigName) } } @@ -16263,41 +13853,15 @@ public struct ListDistributionsByRealtimeLogConfigInput: Swift.Equatable { } } -struct ListDistributionsByRealtimeLogConfigInputBody: Swift.Equatable { - let marker: Swift.String? - let maxItems: Swift.Int? - let realtimeLogConfigName: Swift.String? - let realtimeLogConfigArn: Swift.String? -} - -extension ListDistributionsByRealtimeLogConfigInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case realtimeLogConfigArn = "RealtimeLogConfigArn" - case realtimeLogConfigName = "RealtimeLogConfigName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let realtimeLogConfigNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .realtimeLogConfigName) - realtimeLogConfigName = realtimeLogConfigNameDecoded - let realtimeLogConfigArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .realtimeLogConfigArn) - realtimeLogConfigArn = realtimeLogConfigArnDecoded - } -} +extension ListDistributionsByRealtimeLogConfigOutput { -extension ListDistributionsByRealtimeLogConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.DistributionList = try responseDecoder.decode(responseBody: data) - self.distributionList = output - } else { - self.distributionList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListDistributionsByRealtimeLogConfigOutput() + value.distributionList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.DistributionList.readingClosure) + return value } } } @@ -16314,28 +13878,17 @@ public struct ListDistributionsByRealtimeLogConfigOutput: Swift.Equatable { } } -struct ListDistributionsByRealtimeLogConfigOutputBody: Swift.Equatable { - let distributionList: CloudFrontClientTypes.DistributionList? -} - -extension ListDistributionsByRealtimeLogConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionList = "DistributionList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionList.self, forKey: .distributionList) - distributionList = distributionListDecoded - } -} +enum ListDistributionsByRealtimeLogConfigOutputError { -enum ListDistributionsByRealtimeLogConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16387,13 +13940,15 @@ public struct ListDistributionsByResponseHeadersPolicyIdInput: Swift.Equatable { } } -extension ListDistributionsByResponseHeadersPolicyIdOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.DistributionIdList = try responseDecoder.decode(responseBody: data) - self.distributionIdList = output - } else { - self.distributionIdList = nil +extension ListDistributionsByResponseHeadersPolicyIdOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListDistributionsByResponseHeadersPolicyIdOutput() + value.distributionIdList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.DistributionIdList.readingClosure) + return value } } } @@ -16410,30 +13965,19 @@ public struct ListDistributionsByResponseHeadersPolicyIdOutput: Swift.Equatable } } -struct ListDistributionsByResponseHeadersPolicyIdOutputBody: Swift.Equatable { - let distributionIdList: CloudFrontClientTypes.DistributionIdList? -} - -extension ListDistributionsByResponseHeadersPolicyIdOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionIdList = "DistributionIdList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionIdListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionIdList.self, forKey: .distributionIdList) - distributionIdList = distributionIdListDecoded - } -} +enum ListDistributionsByResponseHeadersPolicyIdOutputError { -enum ListDistributionsByResponseHeadersPolicyIdOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16486,13 +14030,15 @@ public struct ListDistributionsByWebACLIdInput: Swift.Equatable { } } -extension ListDistributionsByWebACLIdOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.DistributionList = try responseDecoder.decode(responseBody: data) - self.distributionList = output - } else { - self.distributionList = nil +extension ListDistributionsByWebACLIdOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListDistributionsByWebACLIdOutput() + value.distributionList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.DistributionList.readingClosure) + return value } } } @@ -16510,29 +14056,18 @@ public struct ListDistributionsByWebACLIdOutput: Swift.Equatable { } } -struct ListDistributionsByWebACLIdOutputBody: Swift.Equatable { - let distributionList: CloudFrontClientTypes.DistributionList? -} - -extension ListDistributionsByWebACLIdOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionList = "DistributionList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionList.self, forKey: .distributionList) - distributionList = distributionListDecoded - } -} +enum ListDistributionsByWebACLIdOutputError { -enum ListDistributionsByWebACLIdOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidWebACLId": return try await InvalidWebACLId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidWebACLId": return try await InvalidWebACLId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16577,13 +14112,15 @@ public struct ListDistributionsInput: Swift.Equatable { } } -extension ListDistributionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.DistributionList = try responseDecoder.decode(responseBody: data) - self.distributionList = output - } else { - self.distributionList = nil +extension ListDistributionsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListDistributionsOutput() + value.distributionList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.DistributionList.readingClosure) + return value } } } @@ -16601,28 +14138,17 @@ public struct ListDistributionsOutput: Swift.Equatable { } } -struct ListDistributionsOutputBody: Swift.Equatable { - let distributionList: CloudFrontClientTypes.DistributionList? -} - -extension ListDistributionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionList = "DistributionList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionList.self, forKey: .distributionList) - distributionList = distributionListDecoded - } -} +enum ListDistributionsOutputError { -enum ListDistributionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16666,13 +14192,15 @@ public struct ListFieldLevelEncryptionConfigsInput: Swift.Equatable { } } -extension ListFieldLevelEncryptionConfigsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryptionList = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryptionList = output - } else { - self.fieldLevelEncryptionList = nil +extension ListFieldLevelEncryptionConfigsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListFieldLevelEncryptionConfigsOutput() + value.fieldLevelEncryptionList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionList.readingClosure) + return value } } } @@ -16689,28 +14217,17 @@ public struct ListFieldLevelEncryptionConfigsOutput: Swift.Equatable { } } -struct ListFieldLevelEncryptionConfigsOutputBody: Swift.Equatable { - let fieldLevelEncryptionList: CloudFrontClientTypes.FieldLevelEncryptionList? -} - -extension ListFieldLevelEncryptionConfigsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionList = "FieldLevelEncryptionList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionList.self, forKey: .fieldLevelEncryptionList) - fieldLevelEncryptionList = fieldLevelEncryptionListDecoded - } -} +enum ListFieldLevelEncryptionConfigsOutputError { -enum ListFieldLevelEncryptionConfigsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16754,13 +14271,15 @@ public struct ListFieldLevelEncryptionProfilesInput: Swift.Equatable { } } -extension ListFieldLevelEncryptionProfilesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryptionProfileList = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryptionProfileList = output - } else { - self.fieldLevelEncryptionProfileList = nil +extension ListFieldLevelEncryptionProfilesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListFieldLevelEncryptionProfilesOutput() + value.fieldLevelEncryptionProfileList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileList.readingClosure) + return value } } } @@ -16777,28 +14296,17 @@ public struct ListFieldLevelEncryptionProfilesOutput: Swift.Equatable { } } -struct ListFieldLevelEncryptionProfilesOutputBody: Swift.Equatable { - let fieldLevelEncryptionProfileList: CloudFrontClientTypes.FieldLevelEncryptionProfileList? -} - -extension ListFieldLevelEncryptionProfilesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfileList = "FieldLevelEncryptionProfileList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionProfileListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionProfileList.self, forKey: .fieldLevelEncryptionProfileList) - fieldLevelEncryptionProfileList = fieldLevelEncryptionProfileListDecoded - } -} +enum ListFieldLevelEncryptionProfilesOutputError { -enum ListFieldLevelEncryptionProfilesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16850,13 +14358,15 @@ public struct ListFunctionsInput: Swift.Equatable { } } -extension ListFunctionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FunctionList = try responseDecoder.decode(responseBody: data) - self.functionList = output - } else { - self.functionList = nil +extension ListFunctionsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListFunctionsOutput() + value.functionList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FunctionList.readingClosure) + return value } } } @@ -16873,29 +14383,18 @@ public struct ListFunctionsOutput: Swift.Equatable { } } -struct ListFunctionsOutputBody: Swift.Equatable { - let functionList: CloudFrontClientTypes.FunctionList? -} - -extension ListFunctionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionList = "FunctionList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionList.self, forKey: .functionList) - functionList = functionListDecoded - } -} +enum ListFunctionsOutputError { -enum ListFunctionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -16948,13 +14447,15 @@ public struct ListInvalidationsInput: Swift.Equatable { } } -extension ListInvalidationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.InvalidationList = try responseDecoder.decode(responseBody: data) - self.invalidationList = output - } else { - self.invalidationList = nil +extension ListInvalidationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListInvalidationsOutput() + value.invalidationList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.InvalidationList.readingClosure) + return value } } } @@ -16972,30 +14473,19 @@ public struct ListInvalidationsOutput: Swift.Equatable { } } -struct ListInvalidationsOutputBody: Swift.Equatable { - let invalidationList: CloudFrontClientTypes.InvalidationList? -} - -extension ListInvalidationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case invalidationList = "InvalidationList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let invalidationListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.InvalidationList.self, forKey: .invalidationList) - invalidationList = invalidationListDecoded - } -} +enum ListInvalidationsOutputError { -enum ListInvalidationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17039,13 +14529,15 @@ public struct ListKeyGroupsInput: Swift.Equatable { } } -extension ListKeyGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyGroupList = try responseDecoder.decode(responseBody: data) - self.keyGroupList = output - } else { - self.keyGroupList = nil +extension ListKeyGroupsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListKeyGroupsOutput() + value.keyGroupList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyGroupList.readingClosure) + return value } } } @@ -17062,28 +14554,17 @@ public struct ListKeyGroupsOutput: Swift.Equatable { } } -struct ListKeyGroupsOutputBody: Swift.Equatable { - let keyGroupList: CloudFrontClientTypes.KeyGroupList? -} - -extension ListKeyGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroupList = "KeyGroupList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroupList.self, forKey: .keyGroupList) - keyGroupList = keyGroupListDecoded - } -} +enum ListKeyGroupsOutputError { -enum ListKeyGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17135,13 +14616,15 @@ public struct ListKeyValueStoresInput: Swift.Equatable { } } -extension ListKeyValueStoresOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyValueStoreList = try responseDecoder.decode(responseBody: data) - self.keyValueStoreList = output - } else { - self.keyValueStoreList = nil +extension ListKeyValueStoresOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListKeyValueStoresOutput() + value.keyValueStoreList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyValueStoreList.readingClosure) + return value } } } @@ -17158,29 +14641,18 @@ public struct ListKeyValueStoresOutput: Swift.Equatable { } } -struct ListKeyValueStoresOutputBody: Swift.Equatable { - let keyValueStoreList: CloudFrontClientTypes.KeyValueStoreList? -} - -extension ListKeyValueStoresOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyValueStoreList = "KeyValueStoreList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyValueStoreListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyValueStoreList.self, forKey: .keyValueStoreList) - keyValueStoreList = keyValueStoreListDecoded - } -} +enum ListKeyValueStoresOutputError { -enum ListKeyValueStoresOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17224,13 +14696,15 @@ public struct ListOriginAccessControlsInput: Swift.Equatable { } } -extension ListOriginAccessControlsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginAccessControlList = try responseDecoder.decode(responseBody: data) - self.originAccessControlList = output - } else { - self.originAccessControlList = nil +extension ListOriginAccessControlsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListOriginAccessControlsOutput() + value.originAccessControlList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginAccessControlList.readingClosure) + return value } } } @@ -17247,28 +14721,17 @@ public struct ListOriginAccessControlsOutput: Swift.Equatable { } } -struct ListOriginAccessControlsOutputBody: Swift.Equatable { - let originAccessControlList: CloudFrontClientTypes.OriginAccessControlList? -} - -extension ListOriginAccessControlsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControlList = "OriginAccessControlList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originAccessControlListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlList.self, forKey: .originAccessControlList) - originAccessControlList = originAccessControlListDecoded - } -} +enum ListOriginAccessControlsOutputError { -enum ListOriginAccessControlsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17324,13 +14787,15 @@ public struct ListOriginRequestPoliciesInput: Swift.Equatable { } } -extension ListOriginRequestPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginRequestPolicyList = try responseDecoder.decode(responseBody: data) - self.originRequestPolicyList = output - } else { - self.originRequestPolicyList = nil +extension ListOriginRequestPoliciesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListOriginRequestPoliciesOutput() + value.originRequestPolicyList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicyList.readingClosure) + return value } } } @@ -17347,30 +14812,19 @@ public struct ListOriginRequestPoliciesOutput: Swift.Equatable { } } -struct ListOriginRequestPoliciesOutputBody: Swift.Equatable { - let originRequestPolicyList: CloudFrontClientTypes.OriginRequestPolicyList? -} - -extension ListOriginRequestPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicyList = "OriginRequestPolicyList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originRequestPolicyListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyList.self, forKey: .originRequestPolicyList) - originRequestPolicyList = originRequestPolicyListDecoded - } -} +enum ListOriginRequestPoliciesOutputError { -enum ListOriginRequestPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17414,13 +14868,15 @@ public struct ListPublicKeysInput: Swift.Equatable { } } -extension ListPublicKeysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.PublicKeyList = try responseDecoder.decode(responseBody: data) - self.publicKeyList = output - } else { - self.publicKeyList = nil +extension ListPublicKeysOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListPublicKeysOutput() + value.publicKeyList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.PublicKeyList.readingClosure) + return value } } } @@ -17437,28 +14893,17 @@ public struct ListPublicKeysOutput: Swift.Equatable { } } -struct ListPublicKeysOutputBody: Swift.Equatable { - let publicKeyList: CloudFrontClientTypes.PublicKeyList? -} - -extension ListPublicKeysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKeyList = "PublicKeyList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicKeyListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PublicKeyList.self, forKey: .publicKeyList) - publicKeyList = publicKeyListDecoded - } -} +enum ListPublicKeysOutputError { -enum ListPublicKeysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17502,13 +14947,15 @@ public struct ListRealtimeLogConfigsInput: Swift.Equatable { } } -extension ListRealtimeLogConfigsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.RealtimeLogConfigs = try responseDecoder.decode(responseBody: data) - self.realtimeLogConfigs = output - } else { - self.realtimeLogConfigs = nil +extension ListRealtimeLogConfigsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListRealtimeLogConfigsOutput() + value.realtimeLogConfigs = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.RealtimeLogConfigs.readingClosure) + return value } } } @@ -17525,30 +14972,19 @@ public struct ListRealtimeLogConfigsOutput: Swift.Equatable { } } -struct ListRealtimeLogConfigsOutputBody: Swift.Equatable { - let realtimeLogConfigs: CloudFrontClientTypes.RealtimeLogConfigs? -} - -extension ListRealtimeLogConfigsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case realtimeLogConfigs = "RealtimeLogConfigs" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let realtimeLogConfigsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.RealtimeLogConfigs.self, forKey: .realtimeLogConfigs) - realtimeLogConfigs = realtimeLogConfigsDecoded - } -} +enum ListRealtimeLogConfigsOutputError { -enum ListRealtimeLogConfigsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17604,13 +15040,15 @@ public struct ListResponseHeadersPoliciesInput: Swift.Equatable { } } -extension ListResponseHeadersPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ResponseHeadersPolicyList = try responseDecoder.decode(responseBody: data) - self.responseHeadersPolicyList = output - } else { - self.responseHeadersPolicyList = nil +extension ListResponseHeadersPoliciesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListResponseHeadersPoliciesOutput() + value.responseHeadersPolicyList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyList.readingClosure) + return value } } } @@ -17627,30 +15065,19 @@ public struct ListResponseHeadersPoliciesOutput: Swift.Equatable { } } -struct ListResponseHeadersPoliciesOutputBody: Swift.Equatable { - let responseHeadersPolicyList: CloudFrontClientTypes.ResponseHeadersPolicyList? -} - -extension ListResponseHeadersPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicyList = "ResponseHeadersPolicyList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let responseHeadersPolicyListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyList.self, forKey: .responseHeadersPolicyList) - responseHeadersPolicyList = responseHeadersPolicyListDecoded - } -} +enum ListResponseHeadersPoliciesOutputError { -enum ListResponseHeadersPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17695,13 +15122,15 @@ public struct ListStreamingDistributionsInput: Swift.Equatable { } } -extension ListStreamingDistributionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.StreamingDistributionList = try responseDecoder.decode(responseBody: data) - self.streamingDistributionList = output - } else { - self.streamingDistributionList = nil +extension ListStreamingDistributionsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListStreamingDistributionsOutput() + value.streamingDistributionList = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.StreamingDistributionList.readingClosure) + return value } } } @@ -17719,28 +15148,17 @@ public struct ListStreamingDistributionsOutput: Swift.Equatable { } } -struct ListStreamingDistributionsOutputBody: Swift.Equatable { - let streamingDistributionList: CloudFrontClientTypes.StreamingDistributionList? -} - -extension ListStreamingDistributionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionList = "StreamingDistributionList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionListDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistributionList.self, forKey: .streamingDistributionList) - streamingDistributionList = streamingDistributionListDecoded - } -} +enum ListStreamingDistributionsOutputError { -enum ListStreamingDistributionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -17780,13 +15198,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Tags = try responseDecoder.decode(responseBody: data) - self.tags = output - } else { - self.tags = nil +extension ListTagsForResourceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTagsForResourceOutput() + value.tags = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Tags.readingClosure) + return value } } } @@ -17805,61 +15225,44 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let tags: CloudFrontClientTypes.Tags? -} - -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tagsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Tags.self, forKey: .tags) - tags = tagsDecoded - } -} +enum ListTagsForResourceOutputError { -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagging": return try await InvalidTagging(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResource": return try await NoSuchResource(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTagging": return try await InvalidTagging.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResource": return try await NoSuchResource.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CloudFrontClientTypes.LoggingConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case enabled = "Enabled" - case includeCookies = "IncludeCookies" - case `prefix` = "Prefix" - } +extension CloudFrontClientTypes.LoggingConfig { static func writingClosure(_ value: CloudFrontClientTypes.LoggingConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("IncludeCookies")].write(value.includeCookies) - try writer[.init("Prefix")].write(value.`prefix`) + try writer["Bucket"].write(value.bucket) + try writer["Enabled"].write(value.enabled) + try writer["IncludeCookies"].write(value.includeCookies) + try writer["Prefix"].write(value.`prefix`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let includeCookiesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeCookies) - includeCookies = includeCookiesDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.LoggingConfig() + value.enabled = try reader["Enabled"].readIfPresent() + value.includeCookies = try reader["IncludeCookies"].readIfPresent() + value.bucket = try reader["Bucket"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + return value + } } } @@ -17990,16 +15393,26 @@ extension CloudFrontClientTypes { } extension MissingBody { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = MissingBody() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension MissingBody { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MissingBody() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18027,36 +15440,20 @@ public struct MissingBody: ClientRuntime.ModeledError, AWSClientRuntime.AWSServi } } -struct MissingBodyBody: Swift.Equatable { - let message: Swift.String? -} - -extension MissingBodyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.MonitoringSubscription: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case realtimeMetricsSubscriptionConfig = "RealtimeMetricsSubscriptionConfig" - } +extension CloudFrontClientTypes.MonitoringSubscription { static func writingClosure(_ value: CloudFrontClientTypes.MonitoringSubscription?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("RealtimeMetricsSubscriptionConfig")].write(value.realtimeMetricsSubscriptionConfig, writingClosure: CloudFrontClientTypes.RealtimeMetricsSubscriptionConfig.writingClosure(_:to:)) + try writer["RealtimeMetricsSubscriptionConfig"].write(value.realtimeMetricsSubscriptionConfig, writingClosure: CloudFrontClientTypes.RealtimeMetricsSubscriptionConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let realtimeMetricsSubscriptionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.RealtimeMetricsSubscriptionConfig.self, forKey: .realtimeMetricsSubscriptionConfig) - realtimeMetricsSubscriptionConfig = realtimeMetricsSubscriptionConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.MonitoringSubscription() + value.realtimeMetricsSubscriptionConfig = try reader["RealtimeMetricsSubscriptionConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.RealtimeMetricsSubscriptionConfig.readingClosure) + return value + } } } @@ -18077,16 +15474,26 @@ extension CloudFrontClientTypes { } extension MonitoringSubscriptionAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = MonitoringSubscriptionAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension MonitoringSubscriptionAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MonitoringSubscriptionAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18114,33 +15521,27 @@ public struct MonitoringSubscriptionAlreadyExists: ClientRuntime.ModeledError, A } } -struct MonitoringSubscriptionAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension MonitoringSubscriptionAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchCachePolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchCachePolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18168,33 +15569,27 @@ public struct NoSuchCachePolicy: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct NoSuchCachePolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchCachePolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchCloudFrontOriginAccessIdentity { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchCloudFrontOriginAccessIdentity() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchCloudFrontOriginAccessIdentity { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchCloudFrontOriginAccessIdentity() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18222,33 +15617,27 @@ public struct NoSuchCloudFrontOriginAccessIdentity: ClientRuntime.ModeledError, } } -struct NoSuchCloudFrontOriginAccessIdentityBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchCloudFrontOriginAccessIdentityBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchContinuousDeploymentPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchContinuousDeploymentPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchContinuousDeploymentPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchContinuousDeploymentPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18276,33 +15665,27 @@ public struct NoSuchContinuousDeploymentPolicy: ClientRuntime.ModeledError, AWSC } } -struct NoSuchContinuousDeploymentPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchContinuousDeploymentPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchDistribution { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchDistribution() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchDistribution { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchDistribution() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18330,33 +15713,27 @@ public struct NoSuchDistribution: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct NoSuchDistributionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchDistributionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchFieldLevelEncryptionConfig { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchFieldLevelEncryptionConfig() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchFieldLevelEncryptionConfig { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchFieldLevelEncryptionConfig() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18384,33 +15761,27 @@ public struct NoSuchFieldLevelEncryptionConfig: ClientRuntime.ModeledError, AWSC } } -struct NoSuchFieldLevelEncryptionConfigBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchFieldLevelEncryptionConfigBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchFieldLevelEncryptionProfile { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchFieldLevelEncryptionProfile() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchFieldLevelEncryptionProfile { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchFieldLevelEncryptionProfile() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18438,33 +15809,27 @@ public struct NoSuchFieldLevelEncryptionProfile: ClientRuntime.ModeledError, AWS } } -struct NoSuchFieldLevelEncryptionProfileBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchFieldLevelEncryptionProfileBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchFunctionExists { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchFunctionExists() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchFunctionExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchFunctionExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18492,33 +15857,27 @@ public struct NoSuchFunctionExists: ClientRuntime.ModeledError, AWSClientRuntime } } -struct NoSuchFunctionExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchFunctionExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchInvalidation { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchInvalidation() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchInvalidation { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchInvalidation() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18546,33 +15905,27 @@ public struct NoSuchInvalidation: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct NoSuchInvalidationBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchInvalidationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchMonitoringSubscription { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchMonitoringSubscription() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchMonitoringSubscription { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchMonitoringSubscription() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18600,33 +15953,27 @@ public struct NoSuchMonitoringSubscription: ClientRuntime.ModeledError, AWSClien } } -struct NoSuchMonitoringSubscriptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchMonitoringSubscriptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchOrigin { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchOrigin() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchOrigin { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchOrigin() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18655,16 +16002,26 @@ public struct NoSuchOrigin: ClientRuntime.ModeledError, AWSClientRuntime.AWSServ } extension NoSuchOriginAccessControl { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchOriginAccessControl() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension NoSuchOriginAccessControl { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchOriginAccessControl() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18692,49 +16049,27 @@ public struct NoSuchOriginAccessControl: ClientRuntime.ModeledError, AWSClientRu } } -struct NoSuchOriginAccessControlBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchOriginAccessControlBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -struct NoSuchOriginBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchOriginBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchOriginRequestPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchOriginRequestPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18762,33 +16097,27 @@ public struct NoSuchOriginRequestPolicy: ClientRuntime.ModeledError, AWSClientRu } } -struct NoSuchOriginRequestPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchOriginRequestPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchPublicKey { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchPublicKey() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchPublicKey { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchPublicKey() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18816,33 +16145,27 @@ public struct NoSuchPublicKey: ClientRuntime.ModeledError, AWSClientRuntime.AWSS } } -struct NoSuchPublicKeyBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchPublicKeyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchRealtimeLogConfig { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchRealtimeLogConfig() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchRealtimeLogConfig { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchRealtimeLogConfig() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18870,33 +16193,27 @@ public struct NoSuchRealtimeLogConfig: ClientRuntime.ModeledError, AWSClientRunt } } -struct NoSuchRealtimeLogConfigBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchRealtimeLogConfigBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchResource { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchResource() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchResource { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchResource() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18924,33 +16241,27 @@ public struct NoSuchResource: ClientRuntime.ModeledError, AWSClientRuntime.AWSSe } } -struct NoSuchResourceBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchResourceBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchResponseHeadersPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchResponseHeadersPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18978,33 +16289,27 @@ public struct NoSuchResponseHeadersPolicy: ClientRuntime.ModeledError, AWSClient } } -struct NoSuchResponseHeadersPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchResponseHeadersPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchStreamingDistribution { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchStreamingDistribution() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchStreamingDistribution { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchStreamingDistribution() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19032,72 +16337,38 @@ public struct NoSuchStreamingDistribution: ClientRuntime.ModeledError, AWSClient } } -struct NoSuchStreamingDistributionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchStreamingDistributionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.Origin: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectionAttempts = "ConnectionAttempts" - case connectionTimeout = "ConnectionTimeout" - case customHeaders = "CustomHeaders" - case customOriginConfig = "CustomOriginConfig" - case domainName = "DomainName" - case id = "Id" - case originAccessControlId = "OriginAccessControlId" - case originPath = "OriginPath" - case originShield = "OriginShield" - case s3OriginConfig = "S3OriginConfig" - } +extension CloudFrontClientTypes.Origin { static func writingClosure(_ value: CloudFrontClientTypes.Origin?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ConnectionAttempts")].write(value.connectionAttempts) - try writer[.init("ConnectionTimeout")].write(value.connectionTimeout) - try writer[.init("CustomHeaders")].write(value.customHeaders, writingClosure: CloudFrontClientTypes.CustomHeaders.writingClosure(_:to:)) - try writer[.init("CustomOriginConfig")].write(value.customOriginConfig, writingClosure: CloudFrontClientTypes.CustomOriginConfig.writingClosure(_:to:)) - try writer[.init("DomainName")].write(value.domainName) - try writer[.init("Id")].write(value.id) - try writer[.init("OriginAccessControlId")].write(value.originAccessControlId) - try writer[.init("OriginPath")].write(value.originPath) - try writer[.init("OriginShield")].write(value.originShield, writingClosure: CloudFrontClientTypes.OriginShield.writingClosure(_:to:)) - try writer[.init("S3OriginConfig")].write(value.s3OriginConfig, writingClosure: CloudFrontClientTypes.S3OriginConfig.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let originPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originPath) - originPath = originPathDecoded - let customHeadersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CustomHeaders.self, forKey: .customHeaders) - customHeaders = customHeadersDecoded - let s3OriginConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.S3OriginConfig.self, forKey: .s3OriginConfig) - s3OriginConfig = s3OriginConfigDecoded - let customOriginConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CustomOriginConfig.self, forKey: .customOriginConfig) - customOriginConfig = customOriginConfigDecoded - let connectionAttemptsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .connectionAttempts) - connectionAttempts = connectionAttemptsDecoded - let connectionTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .connectionTimeout) - connectionTimeout = connectionTimeoutDecoded - let originShieldDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginShield.self, forKey: .originShield) - originShield = originShieldDecoded - let originAccessControlIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originAccessControlId) - originAccessControlId = originAccessControlIdDecoded + try writer["ConnectionAttempts"].write(value.connectionAttempts) + try writer["ConnectionTimeout"].write(value.connectionTimeout) + try writer["CustomHeaders"].write(value.customHeaders, writingClosure: CloudFrontClientTypes.CustomHeaders.writingClosure(_:to:)) + try writer["CustomOriginConfig"].write(value.customOriginConfig, writingClosure: CloudFrontClientTypes.CustomOriginConfig.writingClosure(_:to:)) + try writer["DomainName"].write(value.domainName) + try writer["Id"].write(value.id) + try writer["OriginAccessControlId"].write(value.originAccessControlId) + try writer["OriginPath"].write(value.originPath) + try writer["OriginShield"].write(value.originShield, writingClosure: CloudFrontClientTypes.OriginShield.writingClosure(_:to:)) + try writer["S3OriginConfig"].write(value.s3OriginConfig, writingClosure: CloudFrontClientTypes.S3OriginConfig.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Origin() + value.id = try reader["Id"].readIfPresent() + value.domainName = try reader["DomainName"].readIfPresent() + value.originPath = try reader["OriginPath"].readIfPresent() + value.customHeaders = try reader["CustomHeaders"].readIfPresent(readingClosure: CloudFrontClientTypes.CustomHeaders.readingClosure) + value.s3OriginConfig = try reader["S3OriginConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.S3OriginConfig.readingClosure) + value.customOriginConfig = try reader["CustomOriginConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.CustomOriginConfig.readingClosure) + value.connectionAttempts = try reader["ConnectionAttempts"].readIfPresent() + value.connectionTimeout = try reader["ConnectionTimeout"].readIfPresent() + value.originShield = try reader["OriginShield"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginShield.readingClosure) + value.originAccessControlId = try reader["OriginAccessControlId"].readIfPresent() + return value + } } } @@ -19175,24 +16446,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginAccessControl: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case id = "Id" - case originAccessControlConfig = "OriginAccessControlConfig" - } +extension CloudFrontClientTypes.OriginAccessControl { static func writingClosure(_ value: CloudFrontClientTypes.OriginAccessControl?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Id")].write(value.id) - try writer[.init("OriginAccessControlConfig")].write(value.originAccessControlConfig, writingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["OriginAccessControlConfig"].write(value.originAccessControlConfig, writingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let originAccessControlConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlConfig.self, forKey: .originAccessControlConfig) - originAccessControlConfig = originAccessControlConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginAccessControl() + value.id = try reader["Id"].readIfPresent() + value.originAccessControlConfig = try reader["OriginAccessControlConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginAccessControlConfig.readingClosure) + return value + } } } @@ -19218,16 +16487,26 @@ extension CloudFrontClientTypes { } extension OriginAccessControlAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = OriginAccessControlAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension OriginAccessControlAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OriginAccessControlAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19255,52 +16534,28 @@ public struct OriginAccessControlAlreadyExists: ClientRuntime.ModeledError, AWSC } } -struct OriginAccessControlAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension OriginAccessControlAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.OriginAccessControlConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case name = "Name" - case originAccessControlOriginType = "OriginAccessControlOriginType" - case signingBehavior = "SigningBehavior" - case signingProtocol = "SigningProtocol" - } +extension CloudFrontClientTypes.OriginAccessControlConfig { static func writingClosure(_ value: CloudFrontClientTypes.OriginAccessControlConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Description")].write(value.description) - try writer[.init("Name")].write(value.name) - try writer[.init("OriginAccessControlOriginType")].write(value.originAccessControlOriginType) - try writer[.init("SigningBehavior")].write(value.signingBehavior) - try writer[.init("SigningProtocol")].write(value.signingProtocol) + try writer["Description"].write(value.description) + try writer["Name"].write(value.name) + try writer["OriginAccessControlOriginType"].write(value.originAccessControlOriginType) + try writer["SigningBehavior"].write(value.signingBehavior) + try writer["SigningProtocol"].write(value.signingProtocol) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let signingProtocolDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlSigningProtocols.self, forKey: .signingProtocol) - signingProtocol = signingProtocolDecoded - let signingBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlSigningBehaviors.self, forKey: .signingBehavior) - signingBehavior = signingBehaviorDecoded - let originAccessControlOriginTypeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlOriginTypes.self, forKey: .originAccessControlOriginType) - originAccessControlOriginType = originAccessControlOriginTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginAccessControlConfig() + value.name = try reader["Name"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.signingProtocol = try reader["SigningProtocol"].readIfPresent() + value.signingBehavior = try reader["SigningBehavior"].readIfPresent() + value.originAccessControlOriginType = try reader["OriginAccessControlOriginType"].readIfPresent() + return value + } } } @@ -19347,16 +16602,26 @@ extension CloudFrontClientTypes { } extension OriginAccessControlInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = OriginAccessControlInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension OriginAccessControlInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OriginAccessControlInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19384,72 +16649,29 @@ public struct OriginAccessControlInUse: ClientRuntime.ModeledError, AWSClientRun } } -struct OriginAccessControlInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension OriginAccessControlInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.OriginAccessControlList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case items = "Items" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.OriginAccessControlList { static func writingClosure(_ value: CloudFrontClientTypes.OriginAccessControlList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsTruncated")].write(value.isTruncated) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginAccessControlSummary.writingClosure(_:to:), memberNodeInfo: .init("OriginAccessControlSummary"), isFlattened: false) - try writer[.init("Marker")].write(value.marker) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct OriginAccessControlSummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.OriginAccessControlSummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.OriginAccessControlSummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.OriginAccessControlSummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["IsTruncated"].write(value.isTruncated) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginAccessControlSummary.writingClosure(_:to:), memberNodeInfo: "OriginAccessControlSummary", isFlattened: false) + try writer["Marker"].write(value.marker) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginAccessControlList() + value.marker = try reader["Marker"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.OriginAccessControlSummary.readingClosure, memberNodeInfo: "OriginAccessControlSummary", isFlattened: false) + return value } } } @@ -19590,40 +16812,30 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.OriginAccessControlSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case id = "Id" - case name = "Name" - case originAccessControlOriginType = "OriginAccessControlOriginType" - case signingBehavior = "SigningBehavior" - case signingProtocol = "SigningProtocol" - } +extension CloudFrontClientTypes.OriginAccessControlSummary { static func writingClosure(_ value: CloudFrontClientTypes.OriginAccessControlSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Description")].write(value.description) - try writer[.init("Id")].write(value.id) - try writer[.init("Name")].write(value.name) - try writer[.init("OriginAccessControlOriginType")].write(value.originAccessControlOriginType) - try writer[.init("SigningBehavior")].write(value.signingBehavior) - try writer[.init("SigningProtocol")].write(value.signingProtocol) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let signingProtocolDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlSigningProtocols.self, forKey: .signingProtocol) - signingProtocol = signingProtocolDecoded - let signingBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlSigningBehaviors.self, forKey: .signingBehavior) - signingBehavior = signingBehaviorDecoded - let originAccessControlOriginTypeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlOriginTypes.self, forKey: .originAccessControlOriginType) - originAccessControlOriginType = originAccessControlOriginTypeDecoded + try writer["Description"].write(value.description) + try writer["Id"].write(value.id) + try writer["Name"].write(value.name) + try writer["OriginAccessControlOriginType"].write(value.originAccessControlOriginType) + try writer["SigningBehavior"].write(value.signingBehavior) + try writer["SigningProtocol"].write(value.signingProtocol) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginAccessControlSummary() + value.id = try reader["Id"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.signingProtocol = try reader["SigningProtocol"].readIfPresent() + value.signingBehavior = try reader["SigningBehavior"].readIfPresent() + value.originAccessControlOriginType = try reader["OriginAccessControlOriginType"].readIfPresent() + return value + } } } @@ -19675,24 +16887,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginCustomHeader: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case headerName = "HeaderName" - case headerValue = "HeaderValue" - } +extension CloudFrontClientTypes.OriginCustomHeader { static func writingClosure(_ value: CloudFrontClientTypes.OriginCustomHeader?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HeaderName")].write(value.headerName) - try writer[.init("HeaderValue")].write(value.headerValue) + try writer["HeaderName"].write(value.headerName) + try writer["HeaderValue"].write(value.headerValue) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let headerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .headerName) - headerName = headerNameDecoded - let headerValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .headerValue) - headerValue = headerValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginCustomHeader() + value.headerName = try reader["HeaderName"].readIfPresent() + value.headerValue = try reader["HeaderValue"].readIfPresent() + return value + } } } @@ -19723,28 +16933,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginGroup: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failoverCriteria = "FailoverCriteria" - case id = "Id" - case members = "Members" - } +extension CloudFrontClientTypes.OriginGroup { static func writingClosure(_ value: CloudFrontClientTypes.OriginGroup?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FailoverCriteria")].write(value.failoverCriteria, writingClosure: CloudFrontClientTypes.OriginGroupFailoverCriteria.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("Members")].write(value.members, writingClosure: CloudFrontClientTypes.OriginGroupMembers.writingClosure(_:to:)) + try writer["FailoverCriteria"].write(value.failoverCriteria, writingClosure: CloudFrontClientTypes.OriginGroupFailoverCriteria.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["Members"].write(value.members, writingClosure: CloudFrontClientTypes.OriginGroupMembers.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let failoverCriteriaDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginGroupFailoverCriteria.self, forKey: .failoverCriteria) - failoverCriteria = failoverCriteriaDecoded - let membersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginGroupMembers.self, forKey: .members) - members = membersDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginGroup() + value.id = try reader["Id"].readIfPresent() + value.failoverCriteria = try reader["FailoverCriteria"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginGroupFailoverCriteria.readingClosure) + value.members = try reader["Members"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginGroupMembers.readingClosure) + return value + } } } @@ -19775,20 +16981,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginGroupFailoverCriteria: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case statusCodes = "StatusCodes" - } +extension CloudFrontClientTypes.OriginGroupFailoverCriteria { static func writingClosure(_ value: CloudFrontClientTypes.OriginGroupFailoverCriteria?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StatusCodes")].write(value.statusCodes, writingClosure: CloudFrontClientTypes.StatusCodes.writingClosure(_:to:)) + try writer["StatusCodes"].write(value.statusCodes, writingClosure: CloudFrontClientTypes.StatusCodes.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusCodesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StatusCodes.self, forKey: .statusCodes) - statusCodes = statusCodesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginGroupFailoverCriteria() + value.statusCodes = try reader["StatusCodes"].readIfPresent(readingClosure: CloudFrontClientTypes.StatusCodes.readingClosure) + return value + } } } @@ -19809,20 +17015,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginGroupMember: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originId = "OriginId" - } +extension CloudFrontClientTypes.OriginGroupMember { static func writingClosure(_ value: CloudFrontClientTypes.OriginGroupMember?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OriginId")].write(value.originId) + try writer["OriginId"].write(value.originId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originId) - originId = originIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginGroupMember() + value.originId = try reader["OriginId"].readIfPresent() + return value + } } } @@ -19843,40 +17049,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginGroupMembers: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.OriginGroupMembers { static func writingClosure(_ value: CloudFrontClientTypes.OriginGroupMembers?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginGroupMember.writingClosure(_:to:), memberNodeInfo: .init("OriginGroupMember"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct OriginGroupMember{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.OriginGroupMember].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.OriginGroupMember]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.OriginGroupMember]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginGroupMember.writingClosure(_:to:), memberNodeInfo: "OriginGroupMember", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginGroupMembers() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.OriginGroupMember.readingClosure, memberNodeInfo: "OriginGroupMember", isFlattened: false) + return value } } } @@ -19903,40 +17090,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginGroups: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.OriginGroups { static func writingClosure(_ value: CloudFrontClientTypes.OriginGroups?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginGroup.writingClosure(_:to:), memberNodeInfo: .init("OriginGroup"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct OriginGroup{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.OriginGroup].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.OriginGroup]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.OriginGroup]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginGroup.writingClosure(_:to:), memberNodeInfo: "OriginGroup", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginGroups() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.OriginGroup.readingClosure, memberNodeInfo: "OriginGroup", isFlattened: false) + return value } } } @@ -19997,28 +17165,24 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.OriginRequestPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - case originRequestPolicyConfig = "OriginRequestPolicyConfig" - } +extension CloudFrontClientTypes.OriginRequestPolicy { static func writingClosure(_ value: CloudFrontClientTypes.OriginRequestPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("OriginRequestPolicyConfig")].write(value.originRequestPolicyConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["OriginRequestPolicyConfig"].write(value.originRequestPolicyConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let originRequestPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyConfig.self, forKey: .originRequestPolicyConfig) - originRequestPolicyConfig = originRequestPolicyConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginRequestPolicy() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.originRequestPolicyConfig = try reader["OriginRequestPolicyConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.readingClosure) + return value + } } } @@ -20059,16 +17223,26 @@ extension CloudFrontClientTypes { } extension OriginRequestPolicyAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = OriginRequestPolicyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension OriginRequestPolicyAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OriginRequestPolicyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20096,52 +17270,28 @@ public struct OriginRequestPolicyAlreadyExists: ClientRuntime.ModeledError, AWSC } } -struct OriginRequestPolicyAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension OriginRequestPolicyAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.OriginRequestPolicyConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case cookiesConfig = "CookiesConfig" - case headersConfig = "HeadersConfig" - case name = "Name" - case queryStringsConfig = "QueryStringsConfig" - } +extension CloudFrontClientTypes.OriginRequestPolicyConfig { static func writingClosure(_ value: CloudFrontClientTypes.OriginRequestPolicyConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("CookiesConfig")].write(value.cookiesConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyCookiesConfig.writingClosure(_:to:)) - try writer[.init("HeadersConfig")].write(value.headersConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyHeadersConfig.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) - try writer[.init("QueryStringsConfig")].write(value.queryStringsConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyQueryStringsConfig.writingClosure(_:to:)) + try writer["Comment"].write(value.comment) + try writer["CookiesConfig"].write(value.cookiesConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyCookiesConfig.writingClosure(_:to:)) + try writer["HeadersConfig"].write(value.headersConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyHeadersConfig.writingClosure(_:to:)) + try writer["Name"].write(value.name) + try writer["QueryStringsConfig"].write(value.queryStringsConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyQueryStringsConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let headersConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyHeadersConfig.self, forKey: .headersConfig) - headersConfig = headersConfigDecoded - let cookiesConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyCookiesConfig.self, forKey: .cookiesConfig) - cookiesConfig = cookiesConfigDecoded - let queryStringsConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyQueryStringsConfig.self, forKey: .queryStringsConfig) - queryStringsConfig = queryStringsConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginRequestPolicyConfig() + value.comment = try reader["Comment"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.headersConfig = try reader["HeadersConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicyHeadersConfig.readingClosure) + value.cookiesConfig = try reader["CookiesConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicyCookiesConfig.readingClosure) + value.queryStringsConfig = try reader["QueryStringsConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicyQueryStringsConfig.readingClosure) + return value + } } } @@ -20228,24 +17378,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.OriginRequestPolicyCookiesConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cookieBehavior = "CookieBehavior" - case cookies = "Cookies" - } +extension CloudFrontClientTypes.OriginRequestPolicyCookiesConfig { static func writingClosure(_ value: CloudFrontClientTypes.OriginRequestPolicyCookiesConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CookieBehavior")].write(value.cookieBehavior) - try writer[.init("Cookies")].write(value.cookies, writingClosure: CloudFrontClientTypes.CookieNames.writingClosure(_:to:)) + try writer["CookieBehavior"].write(value.cookieBehavior) + try writer["Cookies"].write(value.cookies, writingClosure: CloudFrontClientTypes.CookieNames.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cookieBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyCookieBehavior.self, forKey: .cookieBehavior) - cookieBehavior = cookieBehaviorDecoded - let cookiesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CookieNames.self, forKey: .cookies) - cookies = cookiesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginRequestPolicyCookiesConfig() + value.cookieBehavior = try reader["CookieBehavior"].readIfPresent() + value.cookies = try reader["Cookies"].readIfPresent(readingClosure: CloudFrontClientTypes.CookieNames.readingClosure) + return value + } } } @@ -20319,24 +17467,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.OriginRequestPolicyHeadersConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case headerBehavior = "HeaderBehavior" - case headers = "Headers" - } +extension CloudFrontClientTypes.OriginRequestPolicyHeadersConfig { static func writingClosure(_ value: CloudFrontClientTypes.OriginRequestPolicyHeadersConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HeaderBehavior")].write(value.headerBehavior) - try writer[.init("Headers")].write(value.headers, writingClosure: CloudFrontClientTypes.Headers.writingClosure(_:to:)) + try writer["HeaderBehavior"].write(value.headerBehavior) + try writer["Headers"].write(value.headers, writingClosure: CloudFrontClientTypes.Headers.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let headerBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyHeaderBehavior.self, forKey: .headerBehavior) - headerBehavior = headerBehaviorDecoded - let headersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Headers.self, forKey: .headers) - headers = headersDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginRequestPolicyHeadersConfig() + value.headerBehavior = try reader["HeaderBehavior"].readIfPresent() + value.headers = try reader["Headers"].readIfPresent(readingClosure: CloudFrontClientTypes.Headers.readingClosure) + return value + } } } @@ -20372,16 +17518,26 @@ extension CloudFrontClientTypes { } extension OriginRequestPolicyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = OriginRequestPolicyInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension OriginRequestPolicyInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OriginRequestPolicyInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20409,64 +17565,25 @@ public struct OriginRequestPolicyInUse: ClientRuntime.ModeledError, AWSClientRun } } -struct OriginRequestPolicyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension OriginRequestPolicyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.OriginRequestPolicyList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.OriginRequestPolicyList { static func writingClosure(_ value: CloudFrontClientTypes.OriginRequestPolicyList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginRequestPolicySummary.writingClosure(_:to:), memberNodeInfo: .init("OriginRequestPolicySummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct OriginRequestPolicySummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.OriginRequestPolicySummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.OriginRequestPolicySummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.OriginRequestPolicySummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.OriginRequestPolicySummary.writingClosure(_:to:), memberNodeInfo: "OriginRequestPolicySummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginRequestPolicyList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.OriginRequestPolicySummary.readingClosure, memberNodeInfo: "OriginRequestPolicySummary", isFlattened: false) + return value } } } @@ -20539,24 +17656,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.OriginRequestPolicyQueryStringsConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case queryStringBehavior = "QueryStringBehavior" - case queryStrings = "QueryStrings" - } +extension CloudFrontClientTypes.OriginRequestPolicyQueryStringsConfig { static func writingClosure(_ value: CloudFrontClientTypes.OriginRequestPolicyQueryStringsConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("QueryStringBehavior")].write(value.queryStringBehavior) - try writer[.init("QueryStrings")].write(value.queryStrings, writingClosure: CloudFrontClientTypes.QueryStringNames.writingClosure(_:to:)) + try writer["QueryStringBehavior"].write(value.queryStringBehavior) + try writer["QueryStrings"].write(value.queryStrings, writingClosure: CloudFrontClientTypes.QueryStringNames.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let queryStringBehaviorDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyQueryStringBehavior.self, forKey: .queryStringBehavior) - queryStringBehavior = queryStringBehaviorDecoded - let queryStringsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.QueryStringNames.self, forKey: .queryStrings) - queryStrings = queryStringsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginRequestPolicyQueryStringsConfig() + value.queryStringBehavior = try reader["QueryStringBehavior"].readIfPresent() + value.queryStrings = try reader["QueryStrings"].readIfPresent(readingClosure: CloudFrontClientTypes.QueryStringNames.readingClosure) + return value + } } } @@ -20589,24 +17704,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginRequestPolicySummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicy = "OriginRequestPolicy" - case type = "Type" - } +extension CloudFrontClientTypes.OriginRequestPolicySummary { static func writingClosure(_ value: CloudFrontClientTypes.OriginRequestPolicySummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OriginRequestPolicy")].write(value.originRequestPolicy, writingClosure: CloudFrontClientTypes.OriginRequestPolicy.writingClosure(_:to:)) - try writer[.init("Type")].write(value.type) + try writer["OriginRequestPolicy"].write(value.originRequestPolicy, writingClosure: CloudFrontClientTypes.OriginRequestPolicy.writingClosure(_:to:)) + try writer["Type"].write(value.type) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyType.self, forKey: .type) - type = typeDecoded - let originRequestPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicy.self, forKey: .originRequestPolicy) - originRequestPolicy = originRequestPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginRequestPolicySummary() + value.type = try reader["Type"].readIfPresent() + value.originRequestPolicy = try reader["OriginRequestPolicy"].readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicy.readingClosure) + return value + } } } @@ -20664,24 +17777,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.OriginShield: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case originShieldRegion = "OriginShieldRegion" - } +extension CloudFrontClientTypes.OriginShield { static func writingClosure(_ value: CloudFrontClientTypes.OriginShield?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("OriginShieldRegion")].write(value.originShieldRegion) + try writer["Enabled"].write(value.enabled) + try writer["OriginShieldRegion"].write(value.originShieldRegion) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let originShieldRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originShieldRegion) - originShieldRegion = originShieldRegionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginShield() + value.enabled = try reader["Enabled"].readIfPresent() + value.originShieldRegion = try reader["OriginShieldRegion"].readIfPresent() + return value + } } } @@ -20706,40 +17817,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.OriginSslProtocols: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.OriginSslProtocols { static func writingClosure(_ value: CloudFrontClientTypes.OriginSslProtocols?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.SslProtocol.writingClosure(_:to:), memberNodeInfo: .init("SslProtocol"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct SslProtocol{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.SslProtocol].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.SslProtocol]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.SslProtocol]() - for enumContainer0 in itemsContainer { - itemsBuffer?.append(enumContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.SslProtocol.writingClosure(_:to:), memberNodeInfo: "SslProtocol", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.OriginSslProtocols() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.SslProtocol.readingClosure, memberNodeInfo: "SslProtocol", isFlattened: false) + return value } } } @@ -20766,40 +17858,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.Origins: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.Origins { static func writingClosure(_ value: CloudFrontClientTypes.Origins?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Origin.writingClosure(_:to:), memberNodeInfo: .init("Origin"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Origin{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.Origin].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.Origin]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.Origin]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Origin.writingClosure(_:to:), memberNodeInfo: "Origin", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Origins() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.Origin.readingClosure, memberNodeInfo: "Origin", isFlattened: false) + return value } } } @@ -20826,36 +17899,28 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ParametersInCacheKeyAndForwardedToOrigin: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cookiesConfig = "CookiesConfig" - case enableAcceptEncodingBrotli = "EnableAcceptEncodingBrotli" - case enableAcceptEncodingGzip = "EnableAcceptEncodingGzip" - case headersConfig = "HeadersConfig" - case queryStringsConfig = "QueryStringsConfig" - } +extension CloudFrontClientTypes.ParametersInCacheKeyAndForwardedToOrigin { static func writingClosure(_ value: CloudFrontClientTypes.ParametersInCacheKeyAndForwardedToOrigin?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CookiesConfig")].write(value.cookiesConfig, writingClosure: CloudFrontClientTypes.CachePolicyCookiesConfig.writingClosure(_:to:)) - try writer[.init("EnableAcceptEncodingBrotli")].write(value.enableAcceptEncodingBrotli) - try writer[.init("EnableAcceptEncodingGzip")].write(value.enableAcceptEncodingGzip) - try writer[.init("HeadersConfig")].write(value.headersConfig, writingClosure: CloudFrontClientTypes.CachePolicyHeadersConfig.writingClosure(_:to:)) - try writer[.init("QueryStringsConfig")].write(value.queryStringsConfig, writingClosure: CloudFrontClientTypes.CachePolicyQueryStringsConfig.writingClosure(_:to:)) + try writer["CookiesConfig"].write(value.cookiesConfig, writingClosure: CloudFrontClientTypes.CachePolicyCookiesConfig.writingClosure(_:to:)) + try writer["EnableAcceptEncodingBrotli"].write(value.enableAcceptEncodingBrotli) + try writer["EnableAcceptEncodingGzip"].write(value.enableAcceptEncodingGzip) + try writer["HeadersConfig"].write(value.headersConfig, writingClosure: CloudFrontClientTypes.CachePolicyHeadersConfig.writingClosure(_:to:)) + try writer["QueryStringsConfig"].write(value.queryStringsConfig, writingClosure: CloudFrontClientTypes.CachePolicyQueryStringsConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enableAcceptEncodingGzipDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableAcceptEncodingGzip) - enableAcceptEncodingGzip = enableAcceptEncodingGzipDecoded - let enableAcceptEncodingBrotliDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableAcceptEncodingBrotli) - enableAcceptEncodingBrotli = enableAcceptEncodingBrotliDecoded - let headersConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyHeadersConfig.self, forKey: .headersConfig) - headersConfig = headersConfigDecoded - let cookiesConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyCookiesConfig.self, forKey: .cookiesConfig) - cookiesConfig = cookiesConfigDecoded - let queryStringsConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyQueryStringsConfig.self, forKey: .queryStringsConfig) - queryStringsConfig = queryStringsConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ParametersInCacheKeyAndForwardedToOrigin() + value.enableAcceptEncodingGzip = try reader["EnableAcceptEncodingGzip"].readIfPresent() + value.enableAcceptEncodingBrotli = try reader["EnableAcceptEncodingBrotli"].readIfPresent() + value.headersConfig = try reader["HeadersConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicyHeadersConfig.readingClosure) + value.cookiesConfig = try reader["CookiesConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicyCookiesConfig.readingClosure) + value.queryStringsConfig = try reader["QueryStringsConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicyQueryStringsConfig.readingClosure) + return value + } } } @@ -20913,40 +17978,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.Paths: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.Paths { static func writingClosure(_ value: CloudFrontClientTypes.Paths?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Path"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Path{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Path", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Paths() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Path", isFlattened: false) + return value } } } @@ -20973,16 +18019,26 @@ extension CloudFrontClientTypes { } extension PreconditionFailed { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = PreconditionFailed() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension PreconditionFailed { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PreconditionFailed() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21010,22 +18066,6 @@ public struct PreconditionFailed: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct PreconditionFailedBody: Swift.Equatable { - let message: Swift.String? -} - -extension PreconditionFailedBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudFrontClientTypes { public enum PriceClass: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case priceclass100 @@ -21061,28 +18101,24 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.PublicKey: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createdTime = "CreatedTime" - case id = "Id" - case publicKeyConfig = "PublicKeyConfig" - } +extension CloudFrontClientTypes.PublicKey { static func writingClosure(_ value: CloudFrontClientTypes.PublicKey?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreatedTime")].writeTimestamp(value.createdTime, format: .dateTime) - try writer[.init("Id")].write(value.id) - try writer[.init("PublicKeyConfig")].write(value.publicKeyConfig, writingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:)) + try writer["CreatedTime"].writeTimestamp(value.createdTime, format: .dateTime) + try writer["Id"].write(value.id) + try writer["PublicKeyConfig"].write(value.publicKeyConfig, writingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let createdTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTime) - createdTime = createdTimeDecoded - let publicKeyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PublicKeyConfig.self, forKey: .publicKeyConfig) - publicKeyConfig = publicKeyConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.PublicKey() + value.id = try reader["Id"].readIfPresent() + value.createdTime = try reader["CreatedTime"].readTimestampIfPresent(format: .dateTime) + value.publicKeyConfig = try reader["PublicKeyConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.PublicKeyConfig.readingClosure) + return value + } } } @@ -21114,16 +18150,26 @@ extension CloudFrontClientTypes { } extension PublicKeyAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = PublicKeyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension PublicKeyAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PublicKeyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21151,48 +18197,26 @@ public struct PublicKeyAlreadyExists: ClientRuntime.ModeledError, AWSClientRunti } } -struct PublicKeyAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension PublicKeyAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.PublicKeyConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case comment = "Comment" - case encodedKey = "EncodedKey" - case name = "Name" - } +extension CloudFrontClientTypes.PublicKeyConfig { static func writingClosure(_ value: CloudFrontClientTypes.PublicKeyConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Comment")].write(value.comment) - try writer[.init("EncodedKey")].write(value.encodedKey) - try writer[.init("Name")].write(value.name) + try writer["CallerReference"].write(value.callerReference) + try writer["Comment"].write(value.comment) + try writer["EncodedKey"].write(value.encodedKey) + try writer["Name"].write(value.name) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let encodedKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .encodedKey) - encodedKey = encodedKeyDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.PublicKeyConfig() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.encodedKey = try reader["EncodedKey"].readIfPresent() + value.comment = try reader["Comment"].readIfPresent() + return value + } } } @@ -21228,16 +18252,26 @@ extension CloudFrontClientTypes { } extension PublicKeyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = PublicKeyInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension PublicKeyInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PublicKeyInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21261,68 +18295,29 @@ public struct PublicKeyInUse: ClientRuntime.ModeledError, AWSClientRuntime.AWSSe message: Swift.String? = nil ) { - self.properties.message = message - } -} - -struct PublicKeyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension PublicKeyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + self.properties.message = message } } -extension CloudFrontClientTypes.PublicKeyList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.PublicKeyList { static func writingClosure(_ value: CloudFrontClientTypes.PublicKeyList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.PublicKeySummary.writingClosure(_:to:), memberNodeInfo: .init("PublicKeySummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct PublicKeySummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.PublicKeySummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.PublicKeySummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.PublicKeySummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.PublicKeySummary.writingClosure(_:to:), memberNodeInfo: "PublicKeySummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.PublicKeyList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.PublicKeySummary.readingClosure, memberNodeInfo: "PublicKeySummary", isFlattened: false) + return value } } } @@ -21357,36 +18352,28 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.PublicKeySummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case createdTime = "CreatedTime" - case encodedKey = "EncodedKey" - case id = "Id" - case name = "Name" - } +extension CloudFrontClientTypes.PublicKeySummary { static func writingClosure(_ value: CloudFrontClientTypes.PublicKeySummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("CreatedTime")].writeTimestamp(value.createdTime, format: .dateTime) - try writer[.init("EncodedKey")].write(value.encodedKey) - try writer[.init("Id")].write(value.id) - try writer[.init("Name")].write(value.name) + try writer["Comment"].write(value.comment) + try writer["CreatedTime"].writeTimestamp(value.createdTime, format: .dateTime) + try writer["EncodedKey"].write(value.encodedKey) + try writer["Id"].write(value.id) + try writer["Name"].write(value.name) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let createdTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTime) - createdTime = createdTimeDecoded - let encodedKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .encodedKey) - encodedKey = encodedKeyDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.PublicKeySummary() + value.id = try reader["Id"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.createdTime = try reader["CreatedTime"].readTimestampIfPresent(format: .dateTime) + value.encodedKey = try reader["EncodedKey"].readIfPresent() + value.comment = try reader["Comment"].readIfPresent() + return value + } } } @@ -21465,13 +18452,15 @@ public struct PublishFunctionInput: Swift.Equatable { } } -extension PublishFunctionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FunctionSummary = try responseDecoder.decode(responseBody: data) - self.functionSummary = output - } else { - self.functionSummary = nil +extension PublishFunctionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = PublishFunctionOutput() + value.functionSummary = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FunctionSummary.readingClosure) + return value } } } @@ -21488,54 +18477,41 @@ public struct PublishFunctionOutput: Swift.Equatable { } } -struct PublishFunctionOutputBody: Swift.Equatable { - let functionSummary: CloudFrontClientTypes.FunctionSummary? -} - -extension PublishFunctionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionSummary = "FunctionSummary" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionSummaryDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionSummary.self, forKey: .functionSummary) - functionSummary = functionSummaryDecoded - } -} +enum PublishFunctionOutputError { -enum PublishFunctionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFunctionExists": return try await NoSuchFunctionExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFunctionExists": return try await NoSuchFunctionExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CloudFrontClientTypes.QueryArgProfile: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case profileId = "ProfileId" - case queryArg = "QueryArg" - } +extension CloudFrontClientTypes.QueryArgProfile { static func writingClosure(_ value: CloudFrontClientTypes.QueryArgProfile?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ProfileId")].write(value.profileId) - try writer[.init("QueryArg")].write(value.queryArg) + try writer["ProfileId"].write(value.profileId) + try writer["QueryArg"].write(value.queryArg) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let queryArgDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queryArg) - queryArg = queryArgDecoded - let profileIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .profileId) - profileId = profileIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.QueryArgProfile() + value.queryArg = try reader["QueryArg"].readIfPresent() + value.profileId = try reader["ProfileId"].readIfPresent() + return value + } } } @@ -21561,24 +18537,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.QueryArgProfileConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case forwardWhenQueryArgProfileIsUnknown = "ForwardWhenQueryArgProfileIsUnknown" - case queryArgProfiles = "QueryArgProfiles" - } +extension CloudFrontClientTypes.QueryArgProfileConfig { static func writingClosure(_ value: CloudFrontClientTypes.QueryArgProfileConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ForwardWhenQueryArgProfileIsUnknown")].write(value.forwardWhenQueryArgProfileIsUnknown) - try writer[.init("QueryArgProfiles")].write(value.queryArgProfiles, writingClosure: CloudFrontClientTypes.QueryArgProfiles.writingClosure(_:to:)) + try writer["ForwardWhenQueryArgProfileIsUnknown"].write(value.forwardWhenQueryArgProfileIsUnknown) + try writer["QueryArgProfiles"].write(value.queryArgProfiles, writingClosure: CloudFrontClientTypes.QueryArgProfiles.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let forwardWhenQueryArgProfileIsUnknownDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forwardWhenQueryArgProfileIsUnknown) - forwardWhenQueryArgProfileIsUnknown = forwardWhenQueryArgProfileIsUnknownDecoded - let queryArgProfilesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.QueryArgProfiles.self, forKey: .queryArgProfiles) - queryArgProfiles = queryArgProfilesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.QueryArgProfileConfig() + value.forwardWhenQueryArgProfileIsUnknown = try reader["ForwardWhenQueryArgProfileIsUnknown"].readIfPresent() + value.queryArgProfiles = try reader["QueryArgProfiles"].readIfPresent(readingClosure: CloudFrontClientTypes.QueryArgProfiles.readingClosure) + return value + } } } @@ -21604,16 +18578,26 @@ extension CloudFrontClientTypes { } extension QueryArgProfileEmpty { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = QueryArgProfileEmpty() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension QueryArgProfileEmpty { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = QueryArgProfileEmpty() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21641,56 +18625,21 @@ public struct QueryArgProfileEmpty: ClientRuntime.ModeledError, AWSClientRuntime } } -struct QueryArgProfileEmptyBody: Swift.Equatable { - let message: Swift.String? -} - -extension QueryArgProfileEmptyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.QueryArgProfiles: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.QueryArgProfiles { static func writingClosure(_ value: CloudFrontClientTypes.QueryArgProfiles?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.QueryArgProfile.writingClosure(_:to:), memberNodeInfo: .init("QueryArgProfile"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct QueryArgProfile{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.QueryArgProfile].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.QueryArgProfile]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.QueryArgProfile]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.QueryArgProfile.writingClosure(_:to:), memberNodeInfo: "QueryArgProfile", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.QueryArgProfiles() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.QueryArgProfile.readingClosure, memberNodeInfo: "QueryArgProfile", isFlattened: false) + return value } } } @@ -21716,40 +18665,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.QueryStringCacheKeys: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.QueryStringCacheKeys { static func writingClosure(_ value: CloudFrontClientTypes.QueryStringCacheKeys?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Name"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Name{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Name", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.QueryStringCacheKeys() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Name", isFlattened: false) + return value } } } @@ -21775,40 +18705,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.QueryStringNames: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.QueryStringNames { static func writingClosure(_ value: CloudFrontClientTypes.QueryStringNames?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Name"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Name{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Name", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.QueryStringNames() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Name", isFlattened: false) + return value } } } @@ -21834,69 +18745,27 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.RealtimeLogConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case endPoints = "EndPoints" - case fields = "Fields" - case name = "Name" - case samplingRate = "SamplingRate" - } +extension CloudFrontClientTypes.RealtimeLogConfig { static func writingClosure(_ value: CloudFrontClientTypes.RealtimeLogConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("EndPoints")].writeList(value.endPoints, memberWritingClosure: CloudFrontClientTypes.EndPoint.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("Fields")].writeList(value.fields, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Field"), isFlattened: false) - try writer[.init("Name")].write(value.name) - try writer[.init("SamplingRate")].write(value.samplingRate) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let samplingRateDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .samplingRate) - samplingRate = samplingRateDecoded - if containerValues.contains(.endPoints) { - struct KeyVal0{struct member{}} - let endPointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .endPoints) - if let endPointsWrappedContainer = endPointsWrappedContainer { - let endPointsContainer = try endPointsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.EndPoint].self, forKey: .member) - var endPointsBuffer:[CloudFrontClientTypes.EndPoint]? = nil - if let endPointsContainer = endPointsContainer { - endPointsBuffer = [CloudFrontClientTypes.EndPoint]() - for structureContainer0 in endPointsContainer { - endPointsBuffer?.append(structureContainer0) - } - } - endPoints = endPointsBuffer - } else { - endPoints = [] - } - } else { - endPoints = nil - } - if containerValues.contains(.fields) { - struct KeyVal0{struct Field{}} - let fieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fields) - if let fieldsWrappedContainer = fieldsWrappedContainer { - let fieldsContainer = try fieldsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fieldsBuffer:[Swift.String]? = nil - if let fieldsContainer = fieldsContainer { - fieldsBuffer = [Swift.String]() - for stringContainer0 in fieldsContainer { - fieldsBuffer?.append(stringContainer0) - } - } - fields = fieldsBuffer - } else { - fields = [] - } - } else { - fields = nil + try writer["ARN"].write(value.arn) + try writer["EndPoints"].writeList(value.endPoints, memberWritingClosure: CloudFrontClientTypes.EndPoint.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["Fields"].writeList(value.fields, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Field", isFlattened: false) + try writer["Name"].write(value.name) + try writer["SamplingRate"].write(value.samplingRate) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.RealtimeLogConfig() + value.arn = try reader["ARN"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.samplingRate = try reader["SamplingRate"].readIfPresent() + value.endPoints = try reader["EndPoints"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.EndPoint.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.fields = try reader["Fields"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Field", isFlattened: false) + return value } } } @@ -21939,16 +18808,26 @@ extension CloudFrontClientTypes { } extension RealtimeLogConfigAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RealtimeLogConfigAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension RealtimeLogConfigAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RealtimeLogConfigAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21976,33 +18855,27 @@ public struct RealtimeLogConfigAlreadyExists: ClientRuntime.ModeledError, AWSCli } } -struct RealtimeLogConfigAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension RealtimeLogConfigAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension RealtimeLogConfigInUse { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RealtimeLogConfigInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension RealtimeLogConfigInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RealtimeLogConfigInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22030,33 +18903,27 @@ public struct RealtimeLogConfigInUse: ClientRuntime.ModeledError, AWSClientRunti } } -struct RealtimeLogConfigInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension RealtimeLogConfigInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension RealtimeLogConfigOwnerMismatch { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RealtimeLogConfigOwnerMismatch() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension RealtimeLogConfigOwnerMismatch { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RealtimeLogConfigOwnerMismatch() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22084,69 +18951,28 @@ public struct RealtimeLogConfigOwnerMismatch: ClientRuntime.ModeledError, AWSCli } } -struct RealtimeLogConfigOwnerMismatchBody: Swift.Equatable { - let message: Swift.String? -} - -extension RealtimeLogConfigOwnerMismatchBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.RealtimeLogConfigs: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case items = "Items" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - } +extension CloudFrontClientTypes.RealtimeLogConfigs { static func writingClosure(_ value: CloudFrontClientTypes.RealtimeLogConfigs?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsTruncated")].write(value.isTruncated) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.RealtimeLogConfig.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("Marker")].write(value.marker) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct member{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.RealtimeLogConfig].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.RealtimeLogConfig]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.RealtimeLogConfig]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["IsTruncated"].write(value.isTruncated) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.RealtimeLogConfig.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["Marker"].write(value.marker) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.RealtimeLogConfigs() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.RealtimeLogConfig.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } @@ -22185,20 +19011,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.RealtimeMetricsSubscriptionConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case realtimeMetricsSubscriptionStatus = "RealtimeMetricsSubscriptionStatus" - } +extension CloudFrontClientTypes.RealtimeMetricsSubscriptionConfig { static func writingClosure(_ value: CloudFrontClientTypes.RealtimeMetricsSubscriptionConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("RealtimeMetricsSubscriptionStatus")].write(value.realtimeMetricsSubscriptionStatus) + try writer["RealtimeMetricsSubscriptionStatus"].write(value.realtimeMetricsSubscriptionStatus) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let realtimeMetricsSubscriptionStatusDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.RealtimeMetricsSubscriptionStatus.self, forKey: .realtimeMetricsSubscriptionStatus) - realtimeMetricsSubscriptionStatus = realtimeMetricsSubscriptionStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.RealtimeMetricsSubscriptionConfig() + value.realtimeMetricsSubscriptionStatus = try reader["RealtimeMetricsSubscriptionStatus"].readIfPresent() + return value + } } } @@ -22302,16 +19128,26 @@ extension CloudFrontClientTypes { } extension ResourceInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ResourceInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension ResourceInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22339,44 +19175,24 @@ public struct ResourceInUse: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct ResourceInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.ResponseHeadersPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - case responseHeadersPolicyConfig = "ResponseHeadersPolicyConfig" - } +extension CloudFrontClientTypes.ResponseHeadersPolicy { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("ResponseHeadersPolicyConfig")].write(value.responseHeadersPolicyConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["ResponseHeadersPolicyConfig"].write(value.responseHeadersPolicyConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let responseHeadersPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyConfig.self, forKey: .responseHeadersPolicyConfig) - responseHeadersPolicyConfig = responseHeadersPolicyConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicy() + value.id = try reader["Id"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.responseHeadersPolicyConfig = try reader["ResponseHeadersPolicyConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.readingClosure) + return value + } } } @@ -22407,40 +19223,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowHeaders: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowHeaders { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowHeaders?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Header"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Header{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Header", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowHeaders() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Header", isFlattened: false) + return value } } } @@ -22467,40 +19264,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethods: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethods { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethods?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethodsValues.writingClosure(_:to:), memberNodeInfo: .init("Method"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Method{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethodsValues].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethodsValues]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethodsValues]() - for enumContainer0 in itemsContainer { - itemsBuffer?.append(enumContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethodsValues.writingClosure(_:to:), memberNodeInfo: "Method", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethods() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethodsValues.readingClosure, memberNodeInfo: "Method", isFlattened: false) + return value } } } @@ -22596,40 +19374,21 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowOrigins: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowOrigins { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowOrigins?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Origin"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Origin{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Origin", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowOrigins() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Origin", isFlattened: false) + return value } } } @@ -22656,40 +19415,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyAccessControlExposeHeaders: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyAccessControlExposeHeaders { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlExposeHeaders?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Header"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct Header{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Header", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyAccessControlExposeHeaders() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Header", isFlattened: false) + return value } } } @@ -22716,16 +19456,26 @@ extension CloudFrontClientTypes { } extension ResponseHeadersPolicyAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ResponseHeadersPolicyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension ResponseHeadersPolicyAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResponseHeadersPolicyAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22753,60 +19503,32 @@ public struct ResponseHeadersPolicyAlreadyExists: ClientRuntime.ModeledError, AW } } -struct ResponseHeadersPolicyAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResponseHeadersPolicyAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.ResponseHeadersPolicyConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case corsConfig = "CorsConfig" - case customHeadersConfig = "CustomHeadersConfig" - case name = "Name" - case removeHeadersConfig = "RemoveHeadersConfig" - case securityHeadersConfig = "SecurityHeadersConfig" - case serverTimingHeadersConfig = "ServerTimingHeadersConfig" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyConfig { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("CorsConfig")].write(value.corsConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCorsConfig.writingClosure(_:to:)) - try writer[.init("CustomHeadersConfig")].write(value.customHeadersConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCustomHeadersConfig.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) - try writer[.init("RemoveHeadersConfig")].write(value.removeHeadersConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeadersConfig.writingClosure(_:to:)) - try writer[.init("SecurityHeadersConfig")].write(value.securityHeadersConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicySecurityHeadersConfig.writingClosure(_:to:)) - try writer[.init("ServerTimingHeadersConfig")].write(value.serverTimingHeadersConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyServerTimingHeadersConfig.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let corsConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyCorsConfig.self, forKey: .corsConfig) - corsConfig = corsConfigDecoded - let securityHeadersConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicySecurityHeadersConfig.self, forKey: .securityHeadersConfig) - securityHeadersConfig = securityHeadersConfigDecoded - let serverTimingHeadersConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyServerTimingHeadersConfig.self, forKey: .serverTimingHeadersConfig) - serverTimingHeadersConfig = serverTimingHeadersConfigDecoded - let customHeadersConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyCustomHeadersConfig.self, forKey: .customHeadersConfig) - customHeadersConfig = customHeadersConfigDecoded - let removeHeadersConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeadersConfig.self, forKey: .removeHeadersConfig) - removeHeadersConfig = removeHeadersConfigDecoded + try writer["Comment"].write(value.comment) + try writer["CorsConfig"].write(value.corsConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCorsConfig.writingClosure(_:to:)) + try writer["CustomHeadersConfig"].write(value.customHeadersConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCustomHeadersConfig.writingClosure(_:to:)) + try writer["Name"].write(value.name) + try writer["RemoveHeadersConfig"].write(value.removeHeadersConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeadersConfig.writingClosure(_:to:)) + try writer["SecurityHeadersConfig"].write(value.securityHeadersConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicySecurityHeadersConfig.writingClosure(_:to:)) + try writer["ServerTimingHeadersConfig"].write(value.serverTimingHeadersConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyServerTimingHeadersConfig.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyConfig() + value.comment = try reader["Comment"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.corsConfig = try reader["CorsConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCorsConfig.readingClosure) + value.securityHeadersConfig = try reader["SecurityHeadersConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicySecurityHeadersConfig.readingClosure) + value.serverTimingHeadersConfig = try reader["ServerTimingHeadersConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyServerTimingHeadersConfig.readingClosure) + value.customHeadersConfig = try reader["CustomHeadersConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCustomHeadersConfig.readingClosure) + value.removeHeadersConfig = try reader["RemoveHeadersConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeadersConfig.readingClosure) + return value + } } } @@ -22851,24 +19573,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyContentSecurityPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case contentSecurityPolicy = "ContentSecurityPolicy" - case `override` = "Override" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyContentSecurityPolicy { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyContentSecurityPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContentSecurityPolicy")].write(value.contentSecurityPolicy) - try writer[.init("Override")].write(value.`override`) + try writer["ContentSecurityPolicy"].write(value.contentSecurityPolicy) + try writer["Override"].write(value.`override`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let overrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .override) - `override` = overrideDecoded - let contentSecurityPolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contentSecurityPolicy) - contentSecurityPolicy = contentSecurityPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyContentSecurityPolicy() + value.`override` = try reader["Override"].readIfPresent() + value.contentSecurityPolicy = try reader["ContentSecurityPolicy"].readIfPresent() + return value + } } } @@ -22894,20 +19614,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyContentTypeOptions: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `override` = "Override" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyContentTypeOptions { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyContentTypeOptions?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Override")].write(value.`override`) + try writer["Override"].write(value.`override`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let overrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .override) - `override` = overrideDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyContentTypeOptions() + value.`override` = try reader["Override"].readIfPresent() + return value + } } } @@ -22928,44 +19648,32 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyCorsConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlAllowCredentials = "AccessControlAllowCredentials" - case accessControlAllowHeaders = "AccessControlAllowHeaders" - case accessControlAllowMethods = "AccessControlAllowMethods" - case accessControlAllowOrigins = "AccessControlAllowOrigins" - case accessControlExposeHeaders = "AccessControlExposeHeaders" - case accessControlMaxAgeSec = "AccessControlMaxAgeSec" - case originOverride = "OriginOverride" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyCorsConfig { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyCorsConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlAllowCredentials")].write(value.accessControlAllowCredentials) - try writer[.init("AccessControlAllowHeaders")].write(value.accessControlAllowHeaders, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowHeaders.writingClosure(_:to:)) - try writer[.init("AccessControlAllowMethods")].write(value.accessControlAllowMethods, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethods.writingClosure(_:to:)) - try writer[.init("AccessControlAllowOrigins")].write(value.accessControlAllowOrigins, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowOrigins.writingClosure(_:to:)) - try writer[.init("AccessControlExposeHeaders")].write(value.accessControlExposeHeaders, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlExposeHeaders.writingClosure(_:to:)) - try writer[.init("AccessControlMaxAgeSec")].write(value.accessControlMaxAgeSec) - try writer[.init("OriginOverride")].write(value.originOverride) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessControlAllowOriginsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowOrigins.self, forKey: .accessControlAllowOrigins) - accessControlAllowOrigins = accessControlAllowOriginsDecoded - let accessControlAllowHeadersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowHeaders.self, forKey: .accessControlAllowHeaders) - accessControlAllowHeaders = accessControlAllowHeadersDecoded - let accessControlAllowMethodsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethods.self, forKey: .accessControlAllowMethods) - accessControlAllowMethods = accessControlAllowMethodsDecoded - let accessControlAllowCredentialsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .accessControlAllowCredentials) - accessControlAllowCredentials = accessControlAllowCredentialsDecoded - let accessControlExposeHeadersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyAccessControlExposeHeaders.self, forKey: .accessControlExposeHeaders) - accessControlExposeHeaders = accessControlExposeHeadersDecoded - let accessControlMaxAgeSecDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .accessControlMaxAgeSec) - accessControlMaxAgeSec = accessControlMaxAgeSecDecoded - let originOverrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .originOverride) - originOverride = originOverrideDecoded + try writer["AccessControlAllowCredentials"].write(value.accessControlAllowCredentials) + try writer["AccessControlAllowHeaders"].write(value.accessControlAllowHeaders, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowHeaders.writingClosure(_:to:)) + try writer["AccessControlAllowMethods"].write(value.accessControlAllowMethods, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethods.writingClosure(_:to:)) + try writer["AccessControlAllowOrigins"].write(value.accessControlAllowOrigins, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowOrigins.writingClosure(_:to:)) + try writer["AccessControlExposeHeaders"].write(value.accessControlExposeHeaders, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlExposeHeaders.writingClosure(_:to:)) + try writer["AccessControlMaxAgeSec"].write(value.accessControlMaxAgeSec) + try writer["OriginOverride"].write(value.originOverride) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyCorsConfig() + value.accessControlAllowOrigins = try reader["AccessControlAllowOrigins"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowOrigins.readingClosure) + value.accessControlAllowHeaders = try reader["AccessControlAllowHeaders"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowHeaders.readingClosure) + value.accessControlAllowMethods = try reader["AccessControlAllowMethods"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlAllowMethods.readingClosure) + value.accessControlAllowCredentials = try reader["AccessControlAllowCredentials"].readIfPresent() + value.accessControlExposeHeaders = try reader["AccessControlExposeHeaders"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyAccessControlExposeHeaders.readingClosure) + value.accessControlMaxAgeSec = try reader["AccessControlMaxAgeSec"].readIfPresent() + value.originOverride = try reader["OriginOverride"].readIfPresent() + return value + } } } @@ -23014,28 +19722,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case header = "Header" - case `override` = "Override" - case value = "Value" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Header")].write(value.header) - try writer[.init("Override")].write(value.`override`) - try writer[.init("Value")].write(value.value) + try writer["Header"].write(value.header) + try writer["Override"].write(value.`override`) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let headerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .header) - header = headerDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let overrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .override) - `override` = overrideDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader() + value.header = try reader["Header"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + value.`override` = try reader["Override"].readIfPresent() + return value + } } } @@ -23066,40 +19770,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyCustomHeadersConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyCustomHeadersConfig { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyCustomHeadersConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader.writingClosure(_:to:), memberNodeInfo: .init("ResponseHeadersPolicyCustomHeader"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct ResponseHeadersPolicyCustomHeader{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader.writingClosure(_:to:), memberNodeInfo: "ResponseHeadersPolicyCustomHeader", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyCustomHeadersConfig() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.ResponseHeadersPolicyCustomHeader.readingClosure, memberNodeInfo: "ResponseHeadersPolicyCustomHeader", isFlattened: false) + return value } } } @@ -23125,24 +19810,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyFrameOptions: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case frameOption = "FrameOption" - case `override` = "Override" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyFrameOptions { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyFrameOptions?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FrameOption")].write(value.frameOption) - try writer[.init("Override")].write(value.`override`) + try writer["FrameOption"].write(value.frameOption) + try writer["Override"].write(value.`override`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let overrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .override) - `override` = overrideDecoded - let frameOptionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FrameOptionsList.self, forKey: .frameOption) - frameOption = frameOptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyFrameOptions() + value.`override` = try reader["Override"].readIfPresent() + value.frameOption = try reader["FrameOption"].readIfPresent() + return value + } } } @@ -23169,16 +19852,26 @@ extension CloudFrontClientTypes { } extension ResponseHeadersPolicyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ResponseHeadersPolicyInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension ResponseHeadersPolicyInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResponseHeadersPolicyInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23206,64 +19899,25 @@ public struct ResponseHeadersPolicyInUse: ClientRuntime.ModeledError, AWSClientR } } -struct ResponseHeadersPolicyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResponseHeadersPolicyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.ResponseHeadersPolicyList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyList { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicySummary.writingClosure(_:to:), memberNodeInfo: .init("ResponseHeadersPolicySummary"), isFlattened: false) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct ResponseHeadersPolicySummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.ResponseHeadersPolicySummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.ResponseHeadersPolicySummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.ResponseHeadersPolicySummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicySummary.writingClosure(_:to:), memberNodeInfo: "ResponseHeadersPolicySummary", isFlattened: false) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyList() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.ResponseHeadersPolicySummary.readingClosure, memberNodeInfo: "ResponseHeadersPolicySummary", isFlattened: false) + return value } } } @@ -23298,24 +19952,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyReferrerPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `override` = "Override" - case referrerPolicy = "ReferrerPolicy" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyReferrerPolicy { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyReferrerPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Override")].write(value.`override`) - try writer[.init("ReferrerPolicy")].write(value.referrerPolicy) + try writer["Override"].write(value.`override`) + try writer["ReferrerPolicy"].write(value.referrerPolicy) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let overrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .override) - `override` = overrideDecoded - let referrerPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ReferrerPolicyList.self, forKey: .referrerPolicy) - referrerPolicy = referrerPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyReferrerPolicy() + value.`override` = try reader["Override"].readIfPresent() + value.referrerPolicy = try reader["ReferrerPolicy"].readIfPresent() + return value + } } } @@ -23360,20 +20012,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case header = "Header" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Header")].write(value.header) + try writer["Header"].write(value.header) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let headerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .header) - header = headerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader() + value.header = try reader["Header"].readIfPresent() + return value + } } } @@ -23394,40 +20046,21 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeadersConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeadersConfig { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeadersConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader.writingClosure(_:to:), memberNodeInfo: .init("ResponseHeadersPolicyRemoveHeader"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct ResponseHeadersPolicyRemoveHeader{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader.writingClosure(_:to:), memberNodeInfo: "ResponseHeadersPolicyRemoveHeader", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeadersConfig() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.ResponseHeadersPolicyRemoveHeader.readingClosure, memberNodeInfo: "ResponseHeadersPolicyRemoveHeader", isFlattened: false) + return value } } } @@ -23453,40 +20086,30 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicySecurityHeadersConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case contentSecurityPolicy = "ContentSecurityPolicy" - case contentTypeOptions = "ContentTypeOptions" - case frameOptions = "FrameOptions" - case referrerPolicy = "ReferrerPolicy" - case strictTransportSecurity = "StrictTransportSecurity" - case xssProtection = "XSSProtection" - } +extension CloudFrontClientTypes.ResponseHeadersPolicySecurityHeadersConfig { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicySecurityHeadersConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContentSecurityPolicy")].write(value.contentSecurityPolicy, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyContentSecurityPolicy.writingClosure(_:to:)) - try writer[.init("ContentTypeOptions")].write(value.contentTypeOptions, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyContentTypeOptions.writingClosure(_:to:)) - try writer[.init("FrameOptions")].write(value.frameOptions, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyFrameOptions.writingClosure(_:to:)) - try writer[.init("ReferrerPolicy")].write(value.referrerPolicy, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyReferrerPolicy.writingClosure(_:to:)) - try writer[.init("StrictTransportSecurity")].write(value.strictTransportSecurity, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyStrictTransportSecurity.writingClosure(_:to:)) - try writer[.init("XSSProtection")].write(value.xssProtection, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyXSSProtection.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let xssProtectionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyXSSProtection.self, forKey: .xssProtection) - xssProtection = xssProtectionDecoded - let frameOptionsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyFrameOptions.self, forKey: .frameOptions) - frameOptions = frameOptionsDecoded - let referrerPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyReferrerPolicy.self, forKey: .referrerPolicy) - referrerPolicy = referrerPolicyDecoded - let contentSecurityPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyContentSecurityPolicy.self, forKey: .contentSecurityPolicy) - contentSecurityPolicy = contentSecurityPolicyDecoded - let contentTypeOptionsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyContentTypeOptions.self, forKey: .contentTypeOptions) - contentTypeOptions = contentTypeOptionsDecoded - let strictTransportSecurityDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyStrictTransportSecurity.self, forKey: .strictTransportSecurity) - strictTransportSecurity = strictTransportSecurityDecoded + try writer["ContentSecurityPolicy"].write(value.contentSecurityPolicy, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyContentSecurityPolicy.writingClosure(_:to:)) + try writer["ContentTypeOptions"].write(value.contentTypeOptions, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyContentTypeOptions.writingClosure(_:to:)) + try writer["FrameOptions"].write(value.frameOptions, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyFrameOptions.writingClosure(_:to:)) + try writer["ReferrerPolicy"].write(value.referrerPolicy, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyReferrerPolicy.writingClosure(_:to:)) + try writer["StrictTransportSecurity"].write(value.strictTransportSecurity, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyStrictTransportSecurity.writingClosure(_:to:)) + try writer["XSSProtection"].write(value.xssProtection, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyXSSProtection.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicySecurityHeadersConfig() + value.xssProtection = try reader["XSSProtection"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyXSSProtection.readingClosure) + value.frameOptions = try reader["FrameOptions"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyFrameOptions.readingClosure) + value.referrerPolicy = try reader["ReferrerPolicy"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyReferrerPolicy.readingClosure) + value.contentSecurityPolicy = try reader["ContentSecurityPolicy"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyContentSecurityPolicy.readingClosure) + value.contentTypeOptions = try reader["ContentTypeOptions"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyContentTypeOptions.readingClosure) + value.strictTransportSecurity = try reader["StrictTransportSecurity"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicyStrictTransportSecurity.readingClosure) + return value + } } } @@ -23526,24 +20149,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyServerTimingHeadersConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case samplingRate = "SamplingRate" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyServerTimingHeadersConfig { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyServerTimingHeadersConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("SamplingRate")].write(value.samplingRate) + try writer["Enabled"].write(value.enabled) + try writer["SamplingRate"].write(value.samplingRate) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let samplingRateDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .samplingRate) - samplingRate = samplingRateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyServerTimingHeadersConfig() + value.enabled = try reader["Enabled"].readIfPresent() + value.samplingRate = try reader["SamplingRate"].readIfPresent() + return value + } } } @@ -23568,32 +20189,26 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicyStrictTransportSecurity: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlMaxAgeSec = "AccessControlMaxAgeSec" - case includeSubdomains = "IncludeSubdomains" - case `override` = "Override" - case preload = "Preload" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyStrictTransportSecurity { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyStrictTransportSecurity?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlMaxAgeSec")].write(value.accessControlMaxAgeSec) - try writer[.init("IncludeSubdomains")].write(value.includeSubdomains) - try writer[.init("Override")].write(value.`override`) - try writer[.init("Preload")].write(value.preload) + try writer["AccessControlMaxAgeSec"].write(value.accessControlMaxAgeSec) + try writer["IncludeSubdomains"].write(value.includeSubdomains) + try writer["Override"].write(value.`override`) + try writer["Preload"].write(value.preload) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let overrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .override) - `override` = overrideDecoded - let includeSubdomainsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeSubdomains) - includeSubdomains = includeSubdomainsDecoded - let preloadDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .preload) - preload = preloadDecoded - let accessControlMaxAgeSecDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .accessControlMaxAgeSec) - accessControlMaxAgeSec = accessControlMaxAgeSecDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyStrictTransportSecurity() + value.`override` = try reader["Override"].readIfPresent() + value.includeSubdomains = try reader["IncludeSubdomains"].readIfPresent() + value.preload = try reader["Preload"].readIfPresent() + value.accessControlMaxAgeSec = try reader["AccessControlMaxAgeSec"].readIfPresent() + return value + } } } @@ -23627,24 +20242,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.ResponseHeadersPolicySummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicy = "ResponseHeadersPolicy" - case type = "Type" - } +extension CloudFrontClientTypes.ResponseHeadersPolicySummary { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicySummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ResponseHeadersPolicy")].write(value.responseHeadersPolicy, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicy.writingClosure(_:to:)) - try writer[.init("Type")].write(value.type) + try writer["ResponseHeadersPolicy"].write(value.responseHeadersPolicy, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicy.writingClosure(_:to:)) + try writer["Type"].write(value.type) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyType.self, forKey: .type) - type = typeDecoded - let responseHeadersPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicy.self, forKey: .responseHeadersPolicy) - responseHeadersPolicy = responseHeadersPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicySummary() + value.type = try reader["Type"].readIfPresent() + value.responseHeadersPolicy = try reader["ResponseHeadersPolicy"].readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicy.readingClosure) + return value + } } } @@ -23702,32 +20315,26 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.ResponseHeadersPolicyXSSProtection: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case modeBlock = "ModeBlock" - case `override` = "Override" - case protection = "Protection" - case reportUri = "ReportUri" - } +extension CloudFrontClientTypes.ResponseHeadersPolicyXSSProtection { static func writingClosure(_ value: CloudFrontClientTypes.ResponseHeadersPolicyXSSProtection?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ModeBlock")].write(value.modeBlock) - try writer[.init("Override")].write(value.`override`) - try writer[.init("Protection")].write(value.protection) - try writer[.init("ReportUri")].write(value.reportUri) + try writer["ModeBlock"].write(value.modeBlock) + try writer["Override"].write(value.`override`) + try writer["Protection"].write(value.protection) + try writer["ReportUri"].write(value.reportUri) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let overrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .override) - `override` = overrideDecoded - let protectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .protection) - protection = protectionDecoded - let modeBlockDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .modeBlock) - modeBlock = modeBlockDecoded - let reportUriDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reportUri) - reportUri = reportUriDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ResponseHeadersPolicyXSSProtection() + value.`override` = try reader["Override"].readIfPresent() + value.protection = try reader["Protection"].readIfPresent() + value.modeBlock = try reader["ModeBlock"].readIfPresent() + value.reportUri = try reader["ReportUri"].readIfPresent() + return value + } } } @@ -23761,20 +20368,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.Restrictions: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case geoRestriction = "GeoRestriction" - } +extension CloudFrontClientTypes.Restrictions { static func writingClosure(_ value: CloudFrontClientTypes.Restrictions?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("GeoRestriction")].write(value.geoRestriction, writingClosure: CloudFrontClientTypes.GeoRestriction.writingClosure(_:to:)) + try writer["GeoRestriction"].write(value.geoRestriction, writingClosure: CloudFrontClientTypes.GeoRestriction.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let geoRestrictionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.GeoRestriction.self, forKey: .geoRestriction) - geoRestriction = geoRestrictionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Restrictions() + value.geoRestriction = try reader["GeoRestriction"].readIfPresent(readingClosure: CloudFrontClientTypes.GeoRestriction.readingClosure) + return value + } } } @@ -23795,24 +20402,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.S3Origin: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case originAccessIdentity = "OriginAccessIdentity" - } +extension CloudFrontClientTypes.S3Origin { static func writingClosure(_ value: CloudFrontClientTypes.S3Origin?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DomainName")].write(value.domainName) - try writer[.init("OriginAccessIdentity")].write(value.originAccessIdentity) + try writer["DomainName"].write(value.domainName) + try writer["OriginAccessIdentity"].write(value.originAccessIdentity) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let originAccessIdentityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originAccessIdentity) - originAccessIdentity = originAccessIdentityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.S3Origin() + value.domainName = try reader["DomainName"].readIfPresent() + value.originAccessIdentity = try reader["OriginAccessIdentity"].readIfPresent() + return value + } } } @@ -23838,20 +20443,20 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.S3OriginConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessIdentity = "OriginAccessIdentity" - } +extension CloudFrontClientTypes.S3OriginConfig { static func writingClosure(_ value: CloudFrontClientTypes.S3OriginConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OriginAccessIdentity")].write(value.originAccessIdentity) + try writer["OriginAccessIdentity"].write(value.originAccessIdentity) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originAccessIdentityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originAccessIdentity) - originAccessIdentity = originAccessIdentityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.S3OriginConfig() + value.originAccessIdentity = try reader["OriginAccessIdentity"].readIfPresent() + return value + } } } @@ -23907,24 +20512,22 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.SessionStickinessConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case idleTTL = "IdleTTL" - case maximumTTL = "MaximumTTL" - } +extension CloudFrontClientTypes.SessionStickinessConfig { static func writingClosure(_ value: CloudFrontClientTypes.SessionStickinessConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IdleTTL")].write(value.idleTTL) - try writer[.init("MaximumTTL")].write(value.maximumTTL) + try writer["IdleTTL"].write(value.idleTTL) + try writer["MaximumTTL"].write(value.maximumTTL) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idleTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .idleTTL) - idleTTL = idleTTLDecoded - let maximumTTLDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumTTL) - maximumTTL = maximumTTLDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.SessionStickinessConfig() + value.idleTTL = try reader["IdleTTL"].readIfPresent() + value.maximumTTL = try reader["MaximumTTL"].readIfPresent() + return value + } } } @@ -23950,24 +20553,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.Signer: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case awsAccountNumber = "AwsAccountNumber" - case keyPairIds = "KeyPairIds" - } +extension CloudFrontClientTypes.Signer { static func writingClosure(_ value: CloudFrontClientTypes.Signer?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AwsAccountNumber")].write(value.awsAccountNumber) - try writer[.init("KeyPairIds")].write(value.keyPairIds, writingClosure: CloudFrontClientTypes.KeyPairIds.writingClosure(_:to:)) + try writer["AwsAccountNumber"].write(value.awsAccountNumber) + try writer["KeyPairIds"].write(value.keyPairIds, writingClosure: CloudFrontClientTypes.KeyPairIds.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let awsAccountNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsAccountNumber) - awsAccountNumber = awsAccountNumberDecoded - let keyPairIdsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyPairIds.self, forKey: .keyPairIds) - keyPairIds = keyPairIdsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Signer() + value.awsAccountNumber = try reader["AwsAccountNumber"].readIfPresent() + value.keyPairIds = try reader["KeyPairIds"].readIfPresent(readingClosure: CloudFrontClientTypes.KeyPairIds.readingClosure) + return value + } } } @@ -24029,40 +20630,21 @@ extension CloudFrontClientTypes { } } -extension CloudFrontClientTypes.StagingDistributionDnsNames: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.StagingDistributionDnsNames { static func writingClosure(_ value: CloudFrontClientTypes.StagingDistributionDnsNames?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("DnsName"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct DnsName{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "DnsName", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.StagingDistributionDnsNames() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "DnsName", isFlattened: false) + return value } } } @@ -24089,16 +20671,26 @@ extension CloudFrontClientTypes { } extension StagingDistributionInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = StagingDistributionInUse() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension StagingDistributionInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StagingDistributionInUse() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24126,56 +20718,21 @@ public struct StagingDistributionInUse: ClientRuntime.ModeledError, AWSClientRun } } -struct StagingDistributionInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension StagingDistributionInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.StatusCodes: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.StatusCodes { static func writingClosure(_ value: CloudFrontClientTypes.StatusCodes?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.Int.writingClosure(_:to:), memberNodeInfo: .init("StatusCode"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct StatusCode{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var itemsBuffer:[Swift.Int]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.Int]() - for integerContainer0 in itemsContainer { - itemsBuffer?.append(integerContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.Int.writingClosure(_:to:), memberNodeInfo: "StatusCode", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.StatusCodes() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.Int.readingClosure, memberNodeInfo: "StatusCode", isFlattened: false) + return value } } } @@ -24202,44 +20759,32 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.StreamingDistribution: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case activeTrustedSigners = "ActiveTrustedSigners" - case domainName = "DomainName" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - case status = "Status" - case streamingDistributionConfig = "StreamingDistributionConfig" - } +extension CloudFrontClientTypes.StreamingDistribution { static func writingClosure(_ value: CloudFrontClientTypes.StreamingDistribution?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("ActiveTrustedSigners")].write(value.activeTrustedSigners, writingClosure: CloudFrontClientTypes.ActiveTrustedSigners.writingClosure(_:to:)) - try writer[.init("DomainName")].write(value.domainName) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("Status")].write(value.status) - try writer[.init("StreamingDistributionConfig")].write(value.streamingDistributionConfig, writingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let activeTrustedSignersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ActiveTrustedSigners.self, forKey: .activeTrustedSigners) - activeTrustedSigners = activeTrustedSignersDecoded - let streamingDistributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistributionConfig.self, forKey: .streamingDistributionConfig) - streamingDistributionConfig = streamingDistributionConfigDecoded + try writer["ARN"].write(value.arn) + try writer["ActiveTrustedSigners"].write(value.activeTrustedSigners, writingClosure: CloudFrontClientTypes.ActiveTrustedSigners.writingClosure(_:to:)) + try writer["DomainName"].write(value.domainName) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["Status"].write(value.status) + try writer["StreamingDistributionConfig"].write(value.streamingDistributionConfig, writingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.StreamingDistribution() + value.id = try reader["Id"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.domainName = try reader["DomainName"].readIfPresent() + value.activeTrustedSigners = try reader["ActiveTrustedSigners"].readIfPresent(readingClosure: CloudFrontClientTypes.ActiveTrustedSigners.readingClosure) + value.streamingDistributionConfig = try reader["StreamingDistributionConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.StreamingDistributionConfig.readingClosure) + return value + } } } @@ -24290,16 +20835,26 @@ extension CloudFrontClientTypes { } extension StreamingDistributionAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = StreamingDistributionAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension StreamingDistributionAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StreamingDistributionAlreadyExists() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24327,64 +20882,34 @@ public struct StreamingDistributionAlreadyExists: ClientRuntime.ModeledError, AW } } -struct StreamingDistributionAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension StreamingDistributionAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.StreamingDistributionConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case aliases = "Aliases" - case callerReference = "CallerReference" - case comment = "Comment" - case enabled = "Enabled" - case logging = "Logging" - case priceClass = "PriceClass" - case s3Origin = "S3Origin" - case trustedSigners = "TrustedSigners" - } +extension CloudFrontClientTypes.StreamingDistributionConfig { static func writingClosure(_ value: CloudFrontClientTypes.StreamingDistributionConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Aliases")].write(value.aliases, writingClosure: CloudFrontClientTypes.Aliases.writingClosure(_:to:)) - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Comment")].write(value.comment) - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("Logging")].write(value.logging, writingClosure: CloudFrontClientTypes.StreamingLoggingConfig.writingClosure(_:to:)) - try writer[.init("PriceClass")].write(value.priceClass) - try writer[.init("S3Origin")].write(value.s3Origin, writingClosure: CloudFrontClientTypes.S3Origin.writingClosure(_:to:)) - try writer[.init("TrustedSigners")].write(value.trustedSigners, writingClosure: CloudFrontClientTypes.TrustedSigners.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let s3OriginDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.S3Origin.self, forKey: .s3Origin) - s3Origin = s3OriginDecoded - let aliasesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Aliases.self, forKey: .aliases) - aliases = aliasesDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let loggingDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingLoggingConfig.self, forKey: .logging) - logging = loggingDecoded - let trustedSignersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TrustedSigners.self, forKey: .trustedSigners) - trustedSigners = trustedSignersDecoded - let priceClassDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PriceClass.self, forKey: .priceClass) - priceClass = priceClassDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + try writer["Aliases"].write(value.aliases, writingClosure: CloudFrontClientTypes.Aliases.writingClosure(_:to:)) + try writer["CallerReference"].write(value.callerReference) + try writer["Comment"].write(value.comment) + try writer["Enabled"].write(value.enabled) + try writer["Logging"].write(value.logging, writingClosure: CloudFrontClientTypes.StreamingLoggingConfig.writingClosure(_:to:)) + try writer["PriceClass"].write(value.priceClass) + try writer["S3Origin"].write(value.s3Origin, writingClosure: CloudFrontClientTypes.S3Origin.writingClosure(_:to:)) + try writer["TrustedSigners"].write(value.trustedSigners, writingClosure: CloudFrontClientTypes.TrustedSigners.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.StreamingDistributionConfig() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.s3Origin = try reader["S3Origin"].readIfPresent(readingClosure: CloudFrontClientTypes.S3Origin.readingClosure) + value.aliases = try reader["Aliases"].readIfPresent(readingClosure: CloudFrontClientTypes.Aliases.readingClosure) + value.comment = try reader["Comment"].readIfPresent() + value.logging = try reader["Logging"].readIfPresent(readingClosure: CloudFrontClientTypes.StreamingLoggingConfig.readingClosure) + value.trustedSigners = try reader["TrustedSigners"].readIfPresent(readingClosure: CloudFrontClientTypes.TrustedSigners.readingClosure) + value.priceClass = try reader["PriceClass"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -24437,24 +20962,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.StreamingDistributionConfigWithTags: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionConfig = "StreamingDistributionConfig" - case tags = "Tags" - } +extension CloudFrontClientTypes.StreamingDistributionConfigWithTags { static func writingClosure(_ value: CloudFrontClientTypes.StreamingDistributionConfigWithTags?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StreamingDistributionConfig")].write(value.streamingDistributionConfig, writingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:)) - try writer[.init("Tags")].write(value.tags, writingClosure: CloudFrontClientTypes.Tags.writingClosure(_:to:)) + try writer["StreamingDistributionConfig"].write(value.streamingDistributionConfig, writingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:)) + try writer["Tags"].write(value.tags, writingClosure: CloudFrontClientTypes.Tags.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistributionConfig.self, forKey: .streamingDistributionConfig) - streamingDistributionConfig = streamingDistributionConfigDecoded - let tagsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Tags.self, forKey: .tags) - tags = tagsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.StreamingDistributionConfigWithTags() + value.streamingDistributionConfig = try reader["StreamingDistributionConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.StreamingDistributionConfig.readingClosure) + value.tags = try reader["Tags"].readIfPresent(readingClosure: CloudFrontClientTypes.Tags.readingClosure) + return value + } } } @@ -24480,56 +21003,29 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.StreamingDistributionList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case items = "Items" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.StreamingDistributionList { static func writingClosure(_ value: CloudFrontClientTypes.StreamingDistributionList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsTruncated")].write(value.isTruncated) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.StreamingDistributionSummary.writingClosure(_:to:), memberNodeInfo: .init("StreamingDistributionSummary"), isFlattened: false) - try writer[.init("Marker")].write(value.marker) - try writer[.init("MaxItems")].write(value.maxItems) - try writer[.init("NextMarker")].write(value.nextMarker) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct StreamingDistributionSummary{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.StreamingDistributionSummary].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.StreamingDistributionSummary]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.StreamingDistributionSummary]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["IsTruncated"].write(value.isTruncated) + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.StreamingDistributionSummary.writingClosure(_:to:), memberNodeInfo: "StreamingDistributionSummary", isFlattened: false) + try writer["Marker"].write(value.marker) + try writer["MaxItems"].write(value.maxItems) + try writer["NextMarker"].write(value.nextMarker) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.StreamingDistributionList() + value.marker = try reader["Marker"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.StreamingDistributionSummary.readingClosure, memberNodeInfo: "StreamingDistributionSummary", isFlattened: false) + return value } } } @@ -24575,16 +21071,26 @@ extension CloudFrontClientTypes { } extension StreamingDistributionNotDisabled { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = StreamingDistributionNotDisabled() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension StreamingDistributionNotDisabled { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StreamingDistributionNotDisabled() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24612,76 +21118,40 @@ public struct StreamingDistributionNotDisabled: ClientRuntime.ModeledError, AWSC } } -struct StreamingDistributionNotDisabledBody: Swift.Equatable { - let message: Swift.String? -} - -extension StreamingDistributionNotDisabledBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.StreamingDistributionSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case aliases = "Aliases" - case comment = "Comment" - case domainName = "DomainName" - case enabled = "Enabled" - case id = "Id" - case lastModifiedTime = "LastModifiedTime" - case priceClass = "PriceClass" - case s3Origin = "S3Origin" - case status = "Status" - case trustedSigners = "TrustedSigners" - } +extension CloudFrontClientTypes.StreamingDistributionSummary { static func writingClosure(_ value: CloudFrontClientTypes.StreamingDistributionSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("Aliases")].write(value.aliases, writingClosure: CloudFrontClientTypes.Aliases.writingClosure(_:to:)) - try writer[.init("Comment")].write(value.comment) - try writer[.init("DomainName")].write(value.domainName) - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("Id")].write(value.id) - try writer[.init("LastModifiedTime")].writeTimestamp(value.lastModifiedTime, format: .dateTime) - try writer[.init("PriceClass")].write(value.priceClass) - try writer[.init("S3Origin")].write(value.s3Origin, writingClosure: CloudFrontClientTypes.S3Origin.writingClosure(_:to:)) - try writer[.init("Status")].write(value.status) - try writer[.init("TrustedSigners")].write(value.trustedSigners, writingClosure: CloudFrontClientTypes.TrustedSigners.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let lastModifiedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedTime) - lastModifiedTime = lastModifiedTimeDecoded - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let s3OriginDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.S3Origin.self, forKey: .s3Origin) - s3Origin = s3OriginDecoded - let aliasesDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Aliases.self, forKey: .aliases) - aliases = aliasesDecoded - let trustedSignersDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TrustedSigners.self, forKey: .trustedSigners) - trustedSigners = trustedSignersDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let priceClassDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PriceClass.self, forKey: .priceClass) - priceClass = priceClassDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + try writer["ARN"].write(value.arn) + try writer["Aliases"].write(value.aliases, writingClosure: CloudFrontClientTypes.Aliases.writingClosure(_:to:)) + try writer["Comment"].write(value.comment) + try writer["DomainName"].write(value.domainName) + try writer["Enabled"].write(value.enabled) + try writer["Id"].write(value.id) + try writer["LastModifiedTime"].writeTimestamp(value.lastModifiedTime, format: .dateTime) + try writer["PriceClass"].write(value.priceClass) + try writer["S3Origin"].write(value.s3Origin, writingClosure: CloudFrontClientTypes.S3Origin.writingClosure(_:to:)) + try writer["Status"].write(value.status) + try writer["TrustedSigners"].write(value.trustedSigners, writingClosure: CloudFrontClientTypes.TrustedSigners.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.StreamingDistributionSummary() + value.id = try reader["Id"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.lastModifiedTime = try reader["LastModifiedTime"].readTimestampIfPresent(format: .dateTime) + value.domainName = try reader["DomainName"].readIfPresent() + value.s3Origin = try reader["S3Origin"].readIfPresent(readingClosure: CloudFrontClientTypes.S3Origin.readingClosure) + value.aliases = try reader["Aliases"].readIfPresent(readingClosure: CloudFrontClientTypes.Aliases.readingClosure) + value.trustedSigners = try reader["TrustedSigners"].readIfPresent(readingClosure: CloudFrontClientTypes.TrustedSigners.readingClosure) + value.comment = try reader["Comment"].readIfPresent() + value.priceClass = try reader["PriceClass"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -24752,28 +21222,24 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.StreamingLoggingConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case enabled = "Enabled" - case `prefix` = "Prefix" - } +extension CloudFrontClientTypes.StreamingLoggingConfig { static func writingClosure(_ value: CloudFrontClientTypes.StreamingLoggingConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("Prefix")].write(value.`prefix`) + try writer["Bucket"].write(value.bucket) + try writer["Enabled"].write(value.enabled) + try writer["Prefix"].write(value.`prefix`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.StreamingLoggingConfig() + value.enabled = try reader["Enabled"].readIfPresent() + value.bucket = try reader["Bucket"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + return value + } } } @@ -24804,24 +21270,22 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.Tag: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case value = "Value" - } +extension CloudFrontClientTypes.Tag { static func writingClosure(_ value: CloudFrontClientTypes.Tag?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Key")].write(value.key) - try writer[.init("Value")].write(value.value) + try writer["Key"].write(value.key) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -24846,36 +21310,19 @@ extension CloudFrontClientTypes { } -extension CloudFrontClientTypes.TagKeys: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - } +extension CloudFrontClientTypes.TagKeys { static func writingClosure(_ value: CloudFrontClientTypes.TagKeys?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Key"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.items) { - struct KeyVal0{struct Key{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Key", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.TagKeys() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Key", isFlattened: false) + return value } } } @@ -24897,13 +21344,9 @@ extension CloudFrontClientTypes { } extension TagResourceInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } - static func writingClosure(_ value: TagResourceInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Tags")].write(value.tags, writingClosure: CloudFrontClientTypes.Tags.writingClosure(_:to:)) + try writer["Tags"].write(value.tags, writingClosure: CloudFrontClientTypes.Tags.writingClosure(_:to:)) } } @@ -24948,24 +21391,12 @@ public struct TagResourceInput: Swift.Equatable { } } -struct TagResourceInputBody: Swift.Equatable { - let tags: CloudFrontClientTypes.Tags? -} - -extension TagResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tagsDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Tags.self, forKey: .tags) - tags = tagsDecoded - } -} +extension TagResourceOutput { -extension TagResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagResourceOutput() + } } } @@ -24974,49 +21405,37 @@ public struct TagResourceOutput: Swift.Equatable { public init() { } } -enum TagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagging": return try await InvalidTagging(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResource": return try await NoSuchResource(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTagging": return try await InvalidTagging.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResource": return try await NoSuchResource.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CloudFrontClientTypes.Tags: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case items = "Items" - } +extension CloudFrontClientTypes.Tags { static func writingClosure(_ value: CloudFrontClientTypes.Tags?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Items")].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.items) { - struct KeyVal0{struct Tag{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.Tag].self, forKey: .member) - var itemsBuffer:[CloudFrontClientTypes.Tag]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [CloudFrontClientTypes.Tag]() - for structureContainer0 in itemsContainer { - itemsBuffer?.append(structureContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Items"].writeList(value.items, memberWritingClosure: CloudFrontClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.Tags() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: CloudFrontClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -25038,16 +21457,26 @@ extension CloudFrontClientTypes { } extension TestFunctionFailed { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TestFunctionFailed() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TestFunctionFailed { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TestFunctionFailed() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25075,37 +21504,16 @@ public struct TestFunctionFailed: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct TestFunctionFailedBody: Swift.Equatable { - let message: Swift.String? -} - -extension TestFunctionFailedBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TestFunctionInput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { "TestFunctionInput(ifMatch: \(Swift.String(describing: ifMatch)), name: \(Swift.String(describing: name)), stage: \(Swift.String(describing: stage)), eventObject: \"CONTENT_REDACTED\")"} } extension TestFunctionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventObject = "EventObject" - case stage = "Stage" - } - static func writingClosure(_ value: TestFunctionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EventObject")].write(value.eventObject) - try writer[.init("Stage")].write(value.stage) + try writer["EventObject"].write(value.eventObject) + try writer["Stage"].write(value.stage) } } @@ -25157,41 +21565,15 @@ public struct TestFunctionInput: Swift.Equatable { } } -struct TestFunctionInputBody: Swift.Equatable { - let stage: CloudFrontClientTypes.FunctionStage? - let eventObject: ClientRuntime.Data? -} - -extension TestFunctionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventObject = "EventObject" - case stage = "Stage" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stageDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionStage.self, forKey: .stage) - stage = stageDecoded - if containerValues.contains(.eventObject) { - do { - let eventObjectDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .eventObject) - eventObject = eventObjectDecoded - } catch { - eventObject = "".data(using: .utf8) - } - } else { - eventObject = nil - } - } -} +extension TestFunctionOutput { -extension TestFunctionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.TestResult = try responseDecoder.decode(responseBody: data) - self.testResult = output - } else { - self.testResult = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = TestFunctionOutput() + value.testResult = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.TestResult.readingClosure) + return value } } } @@ -25208,83 +21590,47 @@ public struct TestFunctionOutput: Swift.Equatable { } } -struct TestFunctionOutputBody: Swift.Equatable { - let testResult: CloudFrontClientTypes.TestResult? -} - -extension TestFunctionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case testResult = "TestResult" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let testResultDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TestResult.self, forKey: .testResult) - testResult = testResultDecoded - } -} +enum TestFunctionOutputError { -enum TestFunctionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFunctionExists": return try await NoSuchFunctionExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TestFunctionFailed": return try await TestFunctionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFunctionExists": return try await NoSuchFunctionExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TestFunctionFailed": return try await TestFunctionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CloudFrontClientTypes.TestResult: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case computeUtilization = "ComputeUtilization" - case functionErrorMessage = "FunctionErrorMessage" - case functionExecutionLogs = "FunctionExecutionLogs" - case functionOutput = "FunctionOutput" - case functionSummary = "FunctionSummary" - } +extension CloudFrontClientTypes.TestResult { static func writingClosure(_ value: CloudFrontClientTypes.TestResult?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ComputeUtilization")].write(value.computeUtilization) - try writer[.init("FunctionErrorMessage")].write(value.functionErrorMessage) - try writer[.init("FunctionExecutionLogs")].writeList(value.functionExecutionLogs, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("FunctionOutput")].write(value.functionOutput) - try writer[.init("FunctionSummary")].write(value.functionSummary, writingClosure: CloudFrontClientTypes.FunctionSummary.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionSummaryDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionSummary.self, forKey: .functionSummary) - functionSummary = functionSummaryDecoded - let computeUtilizationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .computeUtilization) - computeUtilization = computeUtilizationDecoded - if containerValues.contains(.functionExecutionLogs) { - struct KeyVal0{struct member{}} - let functionExecutionLogsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .functionExecutionLogs) - if let functionExecutionLogsWrappedContainer = functionExecutionLogsWrappedContainer { - let functionExecutionLogsContainer = try functionExecutionLogsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var functionExecutionLogsBuffer:[Swift.String]? = nil - if let functionExecutionLogsContainer = functionExecutionLogsContainer { - functionExecutionLogsBuffer = [Swift.String]() - for stringContainer0 in functionExecutionLogsContainer { - functionExecutionLogsBuffer?.append(stringContainer0) - } - } - functionExecutionLogs = functionExecutionLogsBuffer - } else { - functionExecutionLogs = [] - } - } else { - functionExecutionLogs = nil + try writer["ComputeUtilization"].write(value.computeUtilization) + try writer["FunctionErrorMessage"].write(value.functionErrorMessage) + try writer["FunctionExecutionLogs"].writeList(value.functionExecutionLogs, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["FunctionOutput"].write(value.functionOutput) + try writer["FunctionSummary"].write(value.functionSummary, writingClosure: CloudFrontClientTypes.FunctionSummary.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.TestResult() + value.functionSummary = try reader["FunctionSummary"].readIfPresent(readingClosure: CloudFrontClientTypes.FunctionSummary.readingClosure) + value.computeUtilization = try reader["ComputeUtilization"].readIfPresent() + value.functionExecutionLogs = try reader["FunctionExecutionLogs"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.functionErrorMessage = try reader["FunctionErrorMessage"].readIfPresent() + value.functionOutput = try reader["FunctionOutput"].readIfPresent() + return value } - let functionErrorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionErrorMessage) - functionErrorMessage = functionErrorMessageDecoded - let functionOutputDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionOutput) - functionOutput = functionOutputDecoded } } @@ -25326,16 +21672,26 @@ extension CloudFrontClientTypes { } extension TooLongCSPInResponseHeadersPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooLongCSPInResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TooLongCSPInResponseHeadersPolicy { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooLongCSPInResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25363,33 +21719,27 @@ public struct TooLongCSPInResponseHeadersPolicy: ClientRuntime.ModeledError, AWS } } -struct TooLongCSPInResponseHeadersPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooLongCSPInResponseHeadersPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyCacheBehaviors { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyCacheBehaviors() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyCacheBehaviors { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCacheBehaviors() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25417,33 +21767,27 @@ public struct TooManyCacheBehaviors: ClientRuntime.ModeledError, AWSClientRuntim } } -struct TooManyCacheBehaviorsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCacheBehaviorsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyCachePolicies { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyCachePolicies() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyCachePolicies { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCachePolicies() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25471,33 +21815,27 @@ public struct TooManyCachePolicies: ClientRuntime.ModeledError, AWSClientRuntime } } -struct TooManyCachePoliciesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCachePoliciesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyCertificates { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyCertificates() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyCertificates { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCertificates() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25525,33 +21863,27 @@ public struct TooManyCertificates: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct TooManyCertificatesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCertificatesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyCloudFrontOriginAccessIdentities { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyCloudFrontOriginAccessIdentities() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyCloudFrontOriginAccessIdentities { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCloudFrontOriginAccessIdentities() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25579,33 +21911,27 @@ public struct TooManyCloudFrontOriginAccessIdentities: ClientRuntime.ModeledErro } } -struct TooManyCloudFrontOriginAccessIdentitiesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCloudFrontOriginAccessIdentitiesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyContinuousDeploymentPolicies { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyContinuousDeploymentPolicies() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyContinuousDeploymentPolicies { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyContinuousDeploymentPolicies() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25633,33 +21959,27 @@ public struct TooManyContinuousDeploymentPolicies: ClientRuntime.ModeledError, A } } -struct TooManyContinuousDeploymentPoliciesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyContinuousDeploymentPoliciesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyCookieNamesInWhiteList { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyCookieNamesInWhiteList() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyCookieNamesInWhiteList { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCookieNamesInWhiteList() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25687,33 +22007,27 @@ public struct TooManyCookieNamesInWhiteList: ClientRuntime.ModeledError, AWSClie } } -struct TooManyCookieNamesInWhiteListBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCookieNamesInWhiteListBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyCookiesInCachePolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyCookiesInCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyCookiesInCachePolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCookiesInCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25741,33 +22055,27 @@ public struct TooManyCookiesInCachePolicy: ClientRuntime.ModeledError, AWSClient } } -struct TooManyCookiesInCachePolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCookiesInCachePolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyCookiesInOriginRequestPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyCookiesInOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyCookiesInOriginRequestPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCookiesInOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25795,33 +22103,27 @@ public struct TooManyCookiesInOriginRequestPolicy: ClientRuntime.ModeledError, A } } -struct TooManyCookiesInOriginRequestPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCookiesInOriginRequestPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyCustomHeadersInResponseHeadersPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyCustomHeadersInResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyCustomHeadersInResponseHeadersPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCustomHeadersInResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25849,33 +22151,27 @@ public struct TooManyCustomHeadersInResponseHeadersPolicy: ClientRuntime.Modeled } } -struct TooManyCustomHeadersInResponseHeadersPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCustomHeadersInResponseHeadersPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionCNAMEs { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionCNAMEs() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionCNAMEs { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionCNAMEs() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25903,33 +22199,27 @@ public struct TooManyDistributionCNAMEs: ClientRuntime.ModeledError, AWSClientRu } } -struct TooManyDistributionCNAMEsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionCNAMEsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributions { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributions() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributions { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributions() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25958,16 +22248,26 @@ public struct TooManyDistributions: ClientRuntime.ModeledError, AWSClientRuntime } extension TooManyDistributionsAssociatedToCachePolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsAssociatedToCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TooManyDistributionsAssociatedToCachePolicy { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsAssociatedToCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25995,33 +22295,27 @@ public struct TooManyDistributionsAssociatedToCachePolicy: ClientRuntime.Modeled } } -struct TooManyDistributionsAssociatedToCachePolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsAssociatedToCachePolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionsAssociatedToFieldLevelEncryptionConfig { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsAssociatedToFieldLevelEncryptionConfig() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionsAssociatedToFieldLevelEncryptionConfig { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsAssociatedToFieldLevelEncryptionConfig() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26049,33 +22343,27 @@ public struct TooManyDistributionsAssociatedToFieldLevelEncryptionConfig: Client } } -struct TooManyDistributionsAssociatedToFieldLevelEncryptionConfigBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsAssociatedToFieldLevelEncryptionConfigBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionsAssociatedToKeyGroup { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsAssociatedToKeyGroup() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionsAssociatedToKeyGroup { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsAssociatedToKeyGroup() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26103,33 +22391,27 @@ public struct TooManyDistributionsAssociatedToKeyGroup: ClientRuntime.ModeledErr } } -struct TooManyDistributionsAssociatedToKeyGroupBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsAssociatedToKeyGroupBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionsAssociatedToOriginAccessControl { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsAssociatedToOriginAccessControl() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionsAssociatedToOriginAccessControl { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsAssociatedToOriginAccessControl() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26157,33 +22439,27 @@ public struct TooManyDistributionsAssociatedToOriginAccessControl: ClientRuntime } } -struct TooManyDistributionsAssociatedToOriginAccessControlBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsAssociatedToOriginAccessControlBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionsAssociatedToOriginRequestPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsAssociatedToOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionsAssociatedToOriginRequestPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsAssociatedToOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26211,33 +22487,27 @@ public struct TooManyDistributionsAssociatedToOriginRequestPolicy: ClientRuntime } } -struct TooManyDistributionsAssociatedToOriginRequestPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsAssociatedToOriginRequestPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionsAssociatedToResponseHeadersPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsAssociatedToResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionsAssociatedToResponseHeadersPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsAssociatedToResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26265,49 +22535,27 @@ public struct TooManyDistributionsAssociatedToResponseHeadersPolicy: ClientRunti } } -struct TooManyDistributionsAssociatedToResponseHeadersPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsAssociatedToResponseHeadersPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -struct TooManyDistributionsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionsWithFunctionAssociations { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsWithFunctionAssociations() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionsWithFunctionAssociations { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsWithFunctionAssociations() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26335,33 +22583,27 @@ public struct TooManyDistributionsWithFunctionAssociations: ClientRuntime.Modele } } -struct TooManyDistributionsWithFunctionAssociationsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsWithFunctionAssociationsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionsWithLambdaAssociations { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsWithLambdaAssociations() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionsWithLambdaAssociations { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsWithLambdaAssociations() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26389,33 +22631,27 @@ public struct TooManyDistributionsWithLambdaAssociations: ClientRuntime.ModeledE } } -struct TooManyDistributionsWithLambdaAssociationsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsWithLambdaAssociationsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyDistributionsWithSingleFunctionARN { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyDistributionsWithSingleFunctionARN() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyDistributionsWithSingleFunctionARN { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyDistributionsWithSingleFunctionARN() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26443,33 +22679,27 @@ public struct TooManyDistributionsWithSingleFunctionARN: ClientRuntime.ModeledEr } } -struct TooManyDistributionsWithSingleFunctionARNBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyDistributionsWithSingleFunctionARNBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyFieldLevelEncryptionConfigs { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyFieldLevelEncryptionConfigs() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyFieldLevelEncryptionConfigs { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyFieldLevelEncryptionConfigs() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26497,33 +22727,27 @@ public struct TooManyFieldLevelEncryptionConfigs: ClientRuntime.ModeledError, AW } } -struct TooManyFieldLevelEncryptionConfigsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyFieldLevelEncryptionConfigsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyFieldLevelEncryptionContentTypeProfiles { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyFieldLevelEncryptionContentTypeProfiles() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyFieldLevelEncryptionContentTypeProfiles { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyFieldLevelEncryptionContentTypeProfiles() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26551,33 +22775,27 @@ public struct TooManyFieldLevelEncryptionContentTypeProfiles: ClientRuntime.Mode } } -struct TooManyFieldLevelEncryptionContentTypeProfilesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyFieldLevelEncryptionContentTypeProfilesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyFieldLevelEncryptionEncryptionEntities { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyFieldLevelEncryptionEncryptionEntities() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyFieldLevelEncryptionEncryptionEntities { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyFieldLevelEncryptionEncryptionEntities() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26605,33 +22823,27 @@ public struct TooManyFieldLevelEncryptionEncryptionEntities: ClientRuntime.Model } } -struct TooManyFieldLevelEncryptionEncryptionEntitiesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyFieldLevelEncryptionEncryptionEntitiesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyFieldLevelEncryptionFieldPatterns { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyFieldLevelEncryptionFieldPatterns() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyFieldLevelEncryptionFieldPatterns { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyFieldLevelEncryptionFieldPatterns() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26659,33 +22871,27 @@ public struct TooManyFieldLevelEncryptionFieldPatterns: ClientRuntime.ModeledErr } } -struct TooManyFieldLevelEncryptionFieldPatternsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyFieldLevelEncryptionFieldPatternsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyFieldLevelEncryptionProfiles { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyFieldLevelEncryptionProfiles() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyFieldLevelEncryptionProfiles { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyFieldLevelEncryptionProfiles() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26713,33 +22919,27 @@ public struct TooManyFieldLevelEncryptionProfiles: ClientRuntime.ModeledError, A } } -struct TooManyFieldLevelEncryptionProfilesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyFieldLevelEncryptionProfilesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyFieldLevelEncryptionQueryArgProfiles { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyFieldLevelEncryptionQueryArgProfiles() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyFieldLevelEncryptionQueryArgProfiles { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyFieldLevelEncryptionQueryArgProfiles() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26767,33 +22967,27 @@ public struct TooManyFieldLevelEncryptionQueryArgProfiles: ClientRuntime.Modeled } } -struct TooManyFieldLevelEncryptionQueryArgProfilesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyFieldLevelEncryptionQueryArgProfilesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyFunctionAssociations { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyFunctionAssociations() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyFunctionAssociations { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyFunctionAssociations() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26821,33 +23015,27 @@ public struct TooManyFunctionAssociations: ClientRuntime.ModeledError, AWSClient } } -struct TooManyFunctionAssociationsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyFunctionAssociationsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyFunctions { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyFunctions() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyFunctions { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyFunctions() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26875,33 +23063,27 @@ public struct TooManyFunctions: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct TooManyFunctionsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyFunctionsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyHeadersInCachePolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyHeadersInCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyHeadersInCachePolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyHeadersInCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26929,33 +23111,27 @@ public struct TooManyHeadersInCachePolicy: ClientRuntime.ModeledError, AWSClient } } -struct TooManyHeadersInCachePolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyHeadersInCachePolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyHeadersInForwardedValues { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyHeadersInForwardedValues() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyHeadersInForwardedValues { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyHeadersInForwardedValues() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26983,33 +23159,27 @@ public struct TooManyHeadersInForwardedValues: ClientRuntime.ModeledError, AWSCl } } -struct TooManyHeadersInForwardedValuesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyHeadersInForwardedValuesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyHeadersInOriginRequestPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyHeadersInOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyHeadersInOriginRequestPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyHeadersInOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27037,33 +23207,27 @@ public struct TooManyHeadersInOriginRequestPolicy: ClientRuntime.ModeledError, A } } -struct TooManyHeadersInOriginRequestPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyHeadersInOriginRequestPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyInvalidationsInProgress { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyInvalidationsInProgress() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyInvalidationsInProgress { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyInvalidationsInProgress() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27091,33 +23255,27 @@ public struct TooManyInvalidationsInProgress: ClientRuntime.ModeledError, AWSCli } } -struct TooManyInvalidationsInProgressBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyInvalidationsInProgressBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyKeyGroups { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyKeyGroups() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyKeyGroups { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyKeyGroups() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27146,16 +23304,26 @@ public struct TooManyKeyGroups: ClientRuntime.ModeledError, AWSClientRuntime.AWS } extension TooManyKeyGroupsAssociatedToDistribution { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyKeyGroupsAssociatedToDistribution() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TooManyKeyGroupsAssociatedToDistribution { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyKeyGroupsAssociatedToDistribution() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27183,49 +23351,27 @@ public struct TooManyKeyGroupsAssociatedToDistribution: ClientRuntime.ModeledErr } } -struct TooManyKeyGroupsAssociatedToDistributionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyKeyGroupsAssociatedToDistributionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -struct TooManyKeyGroupsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyKeyGroupsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyLambdaFunctionAssociations { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyLambdaFunctionAssociations() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyLambdaFunctionAssociations { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyLambdaFunctionAssociations() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27253,33 +23399,27 @@ public struct TooManyLambdaFunctionAssociations: ClientRuntime.ModeledError, AWS } } -struct TooManyLambdaFunctionAssociationsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyLambdaFunctionAssociationsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyOriginAccessControls { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyOriginAccessControls() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyOriginAccessControls { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyOriginAccessControls() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27307,33 +23447,27 @@ public struct TooManyOriginAccessControls: ClientRuntime.ModeledError, AWSClient } } -struct TooManyOriginAccessControlsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyOriginAccessControlsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyOriginCustomHeaders { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyOriginCustomHeaders() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyOriginCustomHeaders { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyOriginCustomHeaders() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27361,33 +23495,27 @@ public struct TooManyOriginCustomHeaders: ClientRuntime.ModeledError, AWSClientR } } -struct TooManyOriginCustomHeadersBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyOriginCustomHeadersBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyOriginGroupsPerDistribution { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyOriginGroupsPerDistribution() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyOriginGroupsPerDistribution { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyOriginGroupsPerDistribution() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27415,33 +23543,27 @@ public struct TooManyOriginGroupsPerDistribution: ClientRuntime.ModeledError, AW } } -struct TooManyOriginGroupsPerDistributionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyOriginGroupsPerDistributionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyOriginRequestPolicies { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyOriginRequestPolicies() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyOriginRequestPolicies { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyOriginRequestPolicies() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27469,33 +23591,27 @@ public struct TooManyOriginRequestPolicies: ClientRuntime.ModeledError, AWSClien } } -struct TooManyOriginRequestPoliciesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyOriginRequestPoliciesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyOrigins { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyOrigins() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyOrigins { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyOrigins() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27523,33 +23639,27 @@ public struct TooManyOrigins: ClientRuntime.ModeledError, AWSClientRuntime.AWSSe } } -struct TooManyOriginsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyOriginsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyPublicKeys { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyPublicKeys() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyPublicKeys { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyPublicKeys() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27577,33 +23687,27 @@ public struct TooManyPublicKeys: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct TooManyPublicKeysBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyPublicKeysBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyPublicKeysInKeyGroup { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyPublicKeysInKeyGroup() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyPublicKeysInKeyGroup { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyPublicKeysInKeyGroup() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27631,33 +23735,27 @@ public struct TooManyPublicKeysInKeyGroup: ClientRuntime.ModeledError, AWSClient } } -struct TooManyPublicKeysInKeyGroupBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyPublicKeysInKeyGroupBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyQueryStringParameters { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyQueryStringParameters() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyQueryStringParameters { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyQueryStringParameters() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27685,33 +23783,27 @@ public struct TooManyQueryStringParameters: ClientRuntime.ModeledError, AWSClien } } -struct TooManyQueryStringParametersBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyQueryStringParametersBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyQueryStringsInCachePolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyQueryStringsInCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyQueryStringsInCachePolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyQueryStringsInCachePolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27739,33 +23831,27 @@ public struct TooManyQueryStringsInCachePolicy: ClientRuntime.ModeledError, AWSC } } -struct TooManyQueryStringsInCachePolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyQueryStringsInCachePolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyQueryStringsInOriginRequestPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyQueryStringsInOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyQueryStringsInOriginRequestPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyQueryStringsInOriginRequestPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27793,33 +23879,27 @@ public struct TooManyQueryStringsInOriginRequestPolicy: ClientRuntime.ModeledErr } } -struct TooManyQueryStringsInOriginRequestPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyQueryStringsInOriginRequestPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyRealtimeLogConfigs { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyRealtimeLogConfigs() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyRealtimeLogConfigs { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyRealtimeLogConfigs() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27847,33 +23927,27 @@ public struct TooManyRealtimeLogConfigs: ClientRuntime.ModeledError, AWSClientRu } } -struct TooManyRealtimeLogConfigsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyRealtimeLogConfigsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyRemoveHeadersInResponseHeadersPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyRemoveHeadersInResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyRemoveHeadersInResponseHeadersPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyRemoveHeadersInResponseHeadersPolicy() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27901,33 +23975,27 @@ public struct TooManyRemoveHeadersInResponseHeadersPolicy: ClientRuntime.Modeled } } -struct TooManyRemoveHeadersInResponseHeadersPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyRemoveHeadersInResponseHeadersPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyResponseHeadersPolicies { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyResponseHeadersPolicies() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyResponseHeadersPolicies { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyResponseHeadersPolicies() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27955,33 +24023,27 @@ public struct TooManyResponseHeadersPolicies: ClientRuntime.ModeledError, AWSCli } } -struct TooManyResponseHeadersPoliciesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyResponseHeadersPoliciesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyStreamingDistributionCNAMEs { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyStreamingDistributionCNAMEs() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyStreamingDistributionCNAMEs { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyStreamingDistributionCNAMEs() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -28009,33 +24071,27 @@ public struct TooManyStreamingDistributionCNAMEs: ClientRuntime.ModeledError, AW } } -struct TooManyStreamingDistributionCNAMEsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyStreamingDistributionCNAMEsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyStreamingDistributions { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyStreamingDistributions() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyStreamingDistributions { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyStreamingDistributions() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -28063,33 +24119,27 @@ public struct TooManyStreamingDistributions: ClientRuntime.ModeledError, AWSClie } } -struct TooManyStreamingDistributionsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyStreamingDistributionsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyTrustedSigners { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyTrustedSigners() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyTrustedSigners { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTrustedSigners() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -28117,44 +24167,24 @@ public struct TooManyTrustedSigners: ClientRuntime.ModeledError, AWSClientRuntim } } -struct TooManyTrustedSignersBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTrustedSignersBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.TrafficConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case singleHeaderConfig = "SingleHeaderConfig" - case singleWeightConfig = "SingleWeightConfig" - case type = "Type" - } +extension CloudFrontClientTypes.TrafficConfig { static func writingClosure(_ value: CloudFrontClientTypes.TrafficConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("SingleHeaderConfig")].write(value.singleHeaderConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentSingleHeaderConfig.writingClosure(_:to:)) - try writer[.init("SingleWeightConfig")].write(value.singleWeightConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentSingleWeightConfig.writingClosure(_:to:)) - try writer[.init("Type")].write(value.type) + try writer["SingleHeaderConfig"].write(value.singleHeaderConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentSingleHeaderConfig.writingClosure(_:to:)) + try writer["SingleWeightConfig"].write(value.singleWeightConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentSingleWeightConfig.writingClosure(_:to:)) + try writer["Type"].write(value.type) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let singleWeightConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentSingleWeightConfig.self, forKey: .singleWeightConfig) - singleWeightConfig = singleWeightConfigDecoded - let singleHeaderConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentSingleHeaderConfig.self, forKey: .singleHeaderConfig) - singleHeaderConfig = singleHeaderConfigDecoded - let typeDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicyType.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.TrafficConfig() + value.singleWeightConfig = try reader["SingleWeightConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentSingleWeightConfig.readingClosure) + value.singleHeaderConfig = try reader["SingleHeaderConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentSingleHeaderConfig.readingClosure) + value.type = try reader["Type"].readIfPresent() + return value + } } } @@ -28184,16 +24214,26 @@ extension CloudFrontClientTypes { } extension TrustedKeyGroupDoesNotExist { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TrustedKeyGroupDoesNotExist() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TrustedKeyGroupDoesNotExist { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrustedKeyGroupDoesNotExist() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -28221,60 +24261,23 @@ public struct TrustedKeyGroupDoesNotExist: ClientRuntime.ModeledError, AWSClient } } -struct TrustedKeyGroupDoesNotExistBody: Swift.Equatable { - let message: Swift.String? -} - -extension TrustedKeyGroupDoesNotExistBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.TrustedKeyGroups: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.TrustedKeyGroups { static func writingClosure(_ value: CloudFrontClientTypes.TrustedKeyGroups?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("KeyGroup"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct KeyGroup{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Enabled"].write(value.enabled) + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "KeyGroup", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.TrustedKeyGroups() + value.enabled = try reader["Enabled"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "KeyGroup", isFlattened: false) + return value } } } @@ -28306,16 +24309,26 @@ extension CloudFrontClientTypes { } extension TrustedSignerDoesNotExist { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TrustedSignerDoesNotExist() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TrustedSignerDoesNotExist { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrustedSignerDoesNotExist() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -28343,60 +24356,23 @@ public struct TrustedSignerDoesNotExist: ClientRuntime.ModeledError, AWSClientRu } } -struct TrustedSignerDoesNotExistBody: Swift.Equatable { - let message: Swift.String? -} - -extension TrustedSignerDoesNotExistBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudFrontClientTypes.TrustedSigners: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case items = "Items" - case quantity = "Quantity" - } +extension CloudFrontClientTypes.TrustedSigners { static func writingClosure(_ value: CloudFrontClientTypes.TrustedSigners?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("Items")].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("AwsAccountNumber"), isFlattened: false) - try writer[.init("Quantity")].write(value.quantity) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.items) { - struct KeyVal0{struct AwsAccountNumber{}} - let itemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .items) - if let itemsWrappedContainer = itemsWrappedContainer { - let itemsContainer = try itemsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var itemsBuffer:[Swift.String]? = nil - if let itemsContainer = itemsContainer { - itemsBuffer = [Swift.String]() - for stringContainer0 in itemsContainer { - itemsBuffer?.append(stringContainer0) - } - } - items = itemsBuffer - } else { - items = [] - } - } else { - items = nil + try writer["Enabled"].write(value.enabled) + try writer["Items"].writeList(value.items, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "AwsAccountNumber", isFlattened: false) + try writer["Quantity"].write(value.quantity) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.TrustedSigners() + value.enabled = try reader["Enabled"].readIfPresent() + value.quantity = try reader["Quantity"].readIfPresent() + value.items = try reader["Items"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AwsAccountNumber", isFlattened: false) + return value } } } @@ -28428,16 +24404,26 @@ extension CloudFrontClientTypes { } extension UnsupportedOperation { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = UnsupportedOperation() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension UnsupportedOperation { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnsupportedOperation() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -28465,30 +24451,10 @@ public struct UnsupportedOperation: ClientRuntime.ModeledError, AWSClientRuntime } } -struct UnsupportedOperationBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnsupportedOperationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UntagResourceInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagKeys = "TagKeys" - } - static func writingClosure(_ value: UntagResourceInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("TagKeys")].write(value.tagKeys, writingClosure: CloudFrontClientTypes.TagKeys.writingClosure(_:to:)) + try writer["TagKeys"].write(value.tagKeys, writingClosure: CloudFrontClientTypes.TagKeys.writingClosure(_:to:)) } } @@ -28533,24 +24499,12 @@ public struct UntagResourceInput: Swift.Equatable { } } -struct UntagResourceInputBody: Swift.Equatable { - let tagKeys: CloudFrontClientTypes.TagKeys? -} - -extension UntagResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagKeys = "TagKeys" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tagKeysDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.TagKeys.self, forKey: .tagKeys) - tagKeys = tagKeysDecoded - } -} +extension UntagResourceOutput { -extension UntagResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagResourceOutput() + } } } @@ -28559,27 +24513,28 @@ public struct UntagResourceOutput: Swift.Equatable { public init() { } } -enum UntagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagging": return try await InvalidTagging(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResource": return try await NoSuchResource(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTagging": return try await InvalidTagging.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResource": return try await NoSuchResource.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateCachePolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicyConfig = "CachePolicyConfig" - } - static func writingClosure(_ value: UpdateCachePolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CachePolicyConfig")].write(value.cachePolicyConfig, writingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:)) + try writer["CachePolicyConfig"].write(value.cachePolicyConfig, writingClosure: CloudFrontClientTypes.CachePolicyConfig.writingClosure(_:to:)) } } @@ -28619,41 +24574,25 @@ public struct UpdateCachePolicyInput: Swift.Equatable { id: Swift.String? = nil, ifMatch: Swift.String? = nil ) - { - self.cachePolicyConfig = cachePolicyConfig - self.id = id - self.ifMatch = ifMatch - } -} - -struct UpdateCachePolicyInputBody: Swift.Equatable { - let cachePolicyConfig: CloudFrontClientTypes.CachePolicyConfig? -} - -extension UpdateCachePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicyConfig = "CachePolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cachePolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicyConfig.self, forKey: .cachePolicyConfig) - cachePolicyConfig = cachePolicyConfigDecoded + { + self.cachePolicyConfig = cachePolicyConfig + self.id = id + self.ifMatch = ifMatch } } -extension UpdateCachePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CachePolicy = try responseDecoder.decode(responseBody: data) - self.cachePolicy = output - } else { - self.cachePolicy = nil +extension UpdateCachePolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateCachePolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.cachePolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CachePolicy.readingClosure) + return value } } } @@ -28674,50 +24613,35 @@ public struct UpdateCachePolicyOutput: Swift.Equatable { } } -struct UpdateCachePolicyOutputBody: Swift.Equatable { - let cachePolicy: CloudFrontClientTypes.CachePolicy? -} - -extension UpdateCachePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cachePolicy = "CachePolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cachePolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CachePolicy.self, forKey: .cachePolicy) - cachePolicy = cachePolicyDecoded - } -} - -enum UpdateCachePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CachePolicyAlreadyExists": return try await CachePolicyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookiesInCachePolicy": return try await TooManyCookiesInCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInCachePolicy": return try await TooManyHeadersInCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringsInCachePolicy": return try await TooManyQueryStringsInCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateCachePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CachePolicyAlreadyExists": return try await CachePolicyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookiesInCachePolicy": return try await TooManyCookiesInCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInCachePolicy": return try await TooManyHeadersInCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringsInCachePolicy": return try await TooManyQueryStringsInCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateCloudFrontOriginAccessIdentityInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentityConfig = "CloudFrontOriginAccessIdentityConfig" - } - static func writingClosure(_ value: UpdateCloudFrontOriginAccessIdentityInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CloudFrontOriginAccessIdentityConfig")].write(value.cloudFrontOriginAccessIdentityConfig, writingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:)) + try writer["CloudFrontOriginAccessIdentityConfig"].write(value.cloudFrontOriginAccessIdentityConfig, writingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.writingClosure(_:to:)) } } @@ -28765,34 +24689,18 @@ public struct UpdateCloudFrontOriginAccessIdentityInput: Swift.Equatable { } } -struct UpdateCloudFrontOriginAccessIdentityInputBody: Swift.Equatable { - let cloudFrontOriginAccessIdentityConfig: CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig? -} - -extension UpdateCloudFrontOriginAccessIdentityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentityConfig = "CloudFrontOriginAccessIdentityConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudFrontOriginAccessIdentityConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CloudFrontOriginAccessIdentityConfig.self, forKey: .cloudFrontOriginAccessIdentityConfig) - cloudFrontOriginAccessIdentityConfig = cloudFrontOriginAccessIdentityConfigDecoded - } -} +extension UpdateCloudFrontOriginAccessIdentityOutput { -extension UpdateCloudFrontOriginAccessIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.CloudFrontOriginAccessIdentity = try responseDecoder.decode(responseBody: data) - self.cloudFrontOriginAccessIdentity = output - } else { - self.cloudFrontOriginAccessIdentity = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateCloudFrontOriginAccessIdentityOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.cloudFrontOriginAccessIdentity = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.CloudFrontOriginAccessIdentity.readingClosure) + return value } } } @@ -28814,47 +24722,32 @@ public struct UpdateCloudFrontOriginAccessIdentityOutput: Swift.Equatable { } } -struct UpdateCloudFrontOriginAccessIdentityOutputBody: Swift.Equatable { - let cloudFrontOriginAccessIdentity: CloudFrontClientTypes.CloudFrontOriginAccessIdentity? -} - -extension UpdateCloudFrontOriginAccessIdentityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudFrontOriginAccessIdentity = "CloudFrontOriginAccessIdentity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudFrontOriginAccessIdentityDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CloudFrontOriginAccessIdentity.self, forKey: .cloudFrontOriginAccessIdentity) - cloudFrontOriginAccessIdentity = cloudFrontOriginAccessIdentityDecoded - } -} - -enum UpdateCloudFrontOriginAccessIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCloudFrontOriginAccessIdentity": return try await NoSuchCloudFrontOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateCloudFrontOriginAccessIdentityOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCloudFrontOriginAccessIdentity": return try await NoSuchCloudFrontOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateContinuousDeploymentPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicyConfig = "ContinuousDeploymentPolicyConfig" - } - static func writingClosure(_ value: UpdateContinuousDeploymentPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContinuousDeploymentPolicyConfig")].write(value.continuousDeploymentPolicyConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:)) + try writer["ContinuousDeploymentPolicyConfig"].write(value.continuousDeploymentPolicyConfig, writingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.writingClosure(_:to:)) } } @@ -28901,34 +24794,18 @@ public struct UpdateContinuousDeploymentPolicyInput: Swift.Equatable { } } -struct UpdateContinuousDeploymentPolicyInputBody: Swift.Equatable { - let continuousDeploymentPolicyConfig: CloudFrontClientTypes.ContinuousDeploymentPolicyConfig? -} - -extension UpdateContinuousDeploymentPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicyConfig = "ContinuousDeploymentPolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuousDeploymentPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicyConfig.self, forKey: .continuousDeploymentPolicyConfig) - continuousDeploymentPolicyConfig = continuousDeploymentPolicyConfigDecoded - } -} +extension UpdateContinuousDeploymentPolicyOutput { -extension UpdateContinuousDeploymentPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ContinuousDeploymentPolicy = try responseDecoder.decode(responseBody: data) - self.continuousDeploymentPolicy = output - } else { - self.continuousDeploymentPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateContinuousDeploymentPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.continuousDeploymentPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ContinuousDeploymentPolicy.readingClosure) + return value } } } @@ -28949,46 +24826,31 @@ public struct UpdateContinuousDeploymentPolicyOutput: Swift.Equatable { } } -struct UpdateContinuousDeploymentPolicyOutputBody: Swift.Equatable { - let continuousDeploymentPolicy: CloudFrontClientTypes.ContinuousDeploymentPolicy? -} - -extension UpdateContinuousDeploymentPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuousDeploymentPolicy = "ContinuousDeploymentPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuousDeploymentPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ContinuousDeploymentPolicy.self, forKey: .continuousDeploymentPolicy) - continuousDeploymentPolicy = continuousDeploymentPolicyDecoded - } -} +enum UpdateContinuousDeploymentPolicyOutputError { -enum UpdateContinuousDeploymentPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StagingDistributionInUse": return try await StagingDistributionInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "StagingDistributionInUse": return try await StagingDistributionInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateDistributionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionConfig = "DistributionConfig" - } - static func writingClosure(_ value: UpdateDistributionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DistributionConfig")].write(value.distributionConfig, writingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:)) + try writer["DistributionConfig"].write(value.distributionConfig, writingClosure: CloudFrontClientTypes.DistributionConfig.writingClosure(_:to:)) } } @@ -29036,34 +24898,18 @@ public struct UpdateDistributionInput: Swift.Equatable { } } -struct UpdateDistributionInputBody: Swift.Equatable { - let distributionConfig: CloudFrontClientTypes.DistributionConfig? -} - -extension UpdateDistributionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distributionConfig = "DistributionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.DistributionConfig.self, forKey: .distributionConfig) - distributionConfig = distributionConfigDecoded - } -} +extension UpdateDistributionOutput { -extension UpdateDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Distribution = try responseDecoder.decode(responseBody: data) - self.distribution = output - } else { - self.distribution = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateDistributionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.distribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Distribution.readingClosure) + return value } } } @@ -29085,93 +24931,82 @@ public struct UpdateDistributionOutput: Swift.Equatable { } } -struct UpdateDistributionOutputBody: Swift.Equatable { - let distribution: CloudFrontClientTypes.Distribution? -} - -extension UpdateDistributionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distribution = "Distribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Distribution.self, forKey: .distribution) - distribution = distributionDecoded - } -} - -enum UpdateDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ContinuousDeploymentPolicyInUse": return try await ContinuousDeploymentPolicyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalOriginAccessConfiguration": return try await IllegalOriginAccessConfiguration(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDomainNameForOriginAccessControl": return try await InvalidDomainNameForOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidErrorCode": return try await InvalidErrorCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidForwardCookies": return try await InvalidForwardCookies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLocationCode": return try await InvalidLocationCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRelativePath": return try await InvalidRelativePath(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidResponseCode": return try await InvalidResponseCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTTLOrder": return try await InvalidTTLOrder(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidViewerCertificate": return try await InvalidViewerCertificate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidWebACLId": return try await InvalidWebACLId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOrigin": return try await NoSuchOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StagingDistributionInUse": return try await StagingDistributionInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCertificates": return try await TooManyCertificates(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOrigins": return try await TooManyOrigins(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustedSigners": return try await TooManyTrustedSigners(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateDistributionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ContinuousDeploymentPolicyInUse": return try await ContinuousDeploymentPolicyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalOriginAccessConfiguration": return try await IllegalOriginAccessConfiguration.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDomainNameForOriginAccessControl": return try await InvalidDomainNameForOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidErrorCode": return try await InvalidErrorCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidForwardCookies": return try await InvalidForwardCookies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLocationCode": return try await InvalidLocationCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRelativePath": return try await InvalidRelativePath.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidResponseCode": return try await InvalidResponseCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTTLOrder": return try await InvalidTTLOrder.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidViewerCertificate": return try await InvalidViewerCertificate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidWebACLId": return try await InvalidWebACLId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchContinuousDeploymentPolicy": return try await NoSuchContinuousDeploymentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOrigin": return try await NoSuchOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "StagingDistributionInUse": return try await StagingDistributionInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCertificates": return try await TooManyCertificates.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOrigins": return try await TooManyOrigins.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrustedSigners": return try await TooManyTrustedSigners.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -29230,18 +25065,18 @@ public struct UpdateDistributionWithStagingConfigInput: Swift.Equatable { } } -extension UpdateDistributionWithStagingConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.Distribution = try responseDecoder.decode(responseBody: data) - self.distribution = output - } else { - self.distribution = nil +extension UpdateDistributionWithStagingConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateDistributionWithStagingConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.distribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.Distribution.readingClosure) + return value } } } @@ -29262,100 +25097,85 @@ public struct UpdateDistributionWithStagingConfigOutput: Swift.Equatable { } } -struct UpdateDistributionWithStagingConfigOutputBody: Swift.Equatable { - let distribution: CloudFrontClientTypes.Distribution? -} - -extension UpdateDistributionWithStagingConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case distribution = "Distribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let distributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.Distribution.self, forKey: .distribution) - distribution = distributionDecoded - } -} - -enum UpdateDistributionWithStagingConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidErrorCode": return try await InvalidErrorCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidForwardCookies": return try await InvalidForwardCookies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLocationCode": return try await InvalidLocationCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRelativePath": return try await InvalidRelativePath(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidResponseCode": return try await InvalidResponseCode(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTTLOrder": return try await InvalidTTLOrder(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidViewerCertificate": return try await InvalidViewerCertificate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidWebACLId": return try await InvalidWebACLId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCachePolicy": return try await NoSuchCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDistribution": return try await NoSuchDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOrigin": return try await NoSuchOrigin(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCertificates": return try await TooManyCertificates(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyOrigins": return try await TooManyOrigins(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustedSigners": return try await TooManyTrustedSigners(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateDistributionWithStagingConfigOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior": return try await IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDefaultRootObject": return try await InvalidDefaultRootObject.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidErrorCode": return try await InvalidErrorCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidForwardCookies": return try await InvalidForwardCookies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidFunctionAssociation": return try await InvalidFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidGeoRestrictionParameter": return try await InvalidGeoRestrictionParameter.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidHeadersForS3Origin": return try await InvalidHeadersForS3Origin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLambdaFunctionAssociation": return try await InvalidLambdaFunctionAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidLocationCode": return try await InvalidLocationCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidMinimumProtocolVersion": return try await InvalidMinimumProtocolVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginKeepaliveTimeout": return try await InvalidOriginKeepaliveTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginReadTimeout": return try await InvalidOriginReadTimeout.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidQueryStringParameters": return try await InvalidQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRelativePath": return try await InvalidRelativePath.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRequiredProtocol": return try await InvalidRequiredProtocol.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidResponseCode": return try await InvalidResponseCode.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTTLOrder": return try await InvalidTTLOrder.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidViewerCertificate": return try await InvalidViewerCertificate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidWebACLId": return try await InvalidWebACLId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCachePolicy": return try await NoSuchCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDistribution": return try await NoSuchDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOrigin": return try await NoSuchOrigin.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "RealtimeLogConfigOwnerMismatch": return try await RealtimeLogConfigOwnerMismatch.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCacheBehaviors": return try await TooManyCacheBehaviors.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCertificates": return try await TooManyCertificates.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookieNamesInWhiteList": return try await TooManyCookieNamesInWhiteList.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionCNAMEs": return try await TooManyDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToCachePolicy": return try await TooManyDistributionsAssociatedToCachePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToFieldLevelEncryptionConfig": return try await TooManyDistributionsAssociatedToFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToKeyGroup": return try await TooManyDistributionsAssociatedToKeyGroup.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginAccessControl": return try await TooManyDistributionsAssociatedToOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToOriginRequestPolicy": return try await TooManyDistributionsAssociatedToOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsAssociatedToResponseHeadersPolicy": return try await TooManyDistributionsAssociatedToResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithFunctionAssociations": return try await TooManyDistributionsWithFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithLambdaAssociations": return try await TooManyDistributionsWithLambdaAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyDistributionsWithSingleFunctionARN": return try await TooManyDistributionsWithSingleFunctionARN.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFunctionAssociations": return try await TooManyFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInForwardedValues": return try await TooManyHeadersInForwardedValues.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyKeyGroupsAssociatedToDistribution": return try await TooManyKeyGroupsAssociatedToDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyLambdaFunctionAssociations": return try await TooManyLambdaFunctionAssociations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginCustomHeaders": return try await TooManyOriginCustomHeaders.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOriginGroupsPerDistribution": return try await TooManyOriginGroupsPerDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyOrigins": return try await TooManyOrigins.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringParameters": return try await TooManyQueryStringParameters.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrustedSigners": return try await TooManyTrustedSigners.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedKeyGroupDoesNotExist": return try await TrustedKeyGroupDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateFieldLevelEncryptionConfigInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionConfig = "FieldLevelEncryptionConfig" - } - static func writingClosure(_ value: UpdateFieldLevelEncryptionConfigInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FieldLevelEncryptionConfig")].write(value.fieldLevelEncryptionConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:)) + try writer["FieldLevelEncryptionConfig"].write(value.fieldLevelEncryptionConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionConfig.writingClosure(_:to:)) } } @@ -29402,34 +25222,18 @@ public struct UpdateFieldLevelEncryptionConfigInput: Swift.Equatable { } } -struct UpdateFieldLevelEncryptionConfigInputBody: Swift.Equatable { - let fieldLevelEncryptionConfig: CloudFrontClientTypes.FieldLevelEncryptionConfig? -} - -extension UpdateFieldLevelEncryptionConfigInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionConfig = "FieldLevelEncryptionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionConfig.self, forKey: .fieldLevelEncryptionConfig) - fieldLevelEncryptionConfig = fieldLevelEncryptionConfigDecoded - } -} +extension UpdateFieldLevelEncryptionConfigOutput { -extension UpdateFieldLevelEncryptionConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryption = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryption = output - } else { - self.fieldLevelEncryption = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateFieldLevelEncryptionConfigOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.fieldLevelEncryption = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryption.readingClosure) + return value } } } @@ -29450,50 +25254,35 @@ public struct UpdateFieldLevelEncryptionConfigOutput: Swift.Equatable { } } -struct UpdateFieldLevelEncryptionConfigOutputBody: Swift.Equatable { - let fieldLevelEncryption: CloudFrontClientTypes.FieldLevelEncryption? -} - -extension UpdateFieldLevelEncryptionConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryption = "FieldLevelEncryption" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryption.self, forKey: .fieldLevelEncryption) - fieldLevelEncryption = fieldLevelEncryptionDecoded - } -} - -enum UpdateFieldLevelEncryptionConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "QueryArgProfileEmpty": return try await QueryArgProfileEmpty(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionContentTypeProfiles": return try await TooManyFieldLevelEncryptionContentTypeProfiles(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionQueryArgProfiles": return try await TooManyFieldLevelEncryptionQueryArgProfiles(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateFieldLevelEncryptionConfigOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionConfig": return try await NoSuchFieldLevelEncryptionConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "QueryArgProfileEmpty": return try await QueryArgProfileEmpty.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionContentTypeProfiles": return try await TooManyFieldLevelEncryptionContentTypeProfiles.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionQueryArgProfiles": return try await TooManyFieldLevelEncryptionQueryArgProfiles.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateFieldLevelEncryptionProfileInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfileConfig = "FieldLevelEncryptionProfileConfig" - } - static func writingClosure(_ value: UpdateFieldLevelEncryptionProfileInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FieldLevelEncryptionProfileConfig")].write(value.fieldLevelEncryptionProfileConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:)) + try writer["FieldLevelEncryptionProfileConfig"].write(value.fieldLevelEncryptionProfileConfig, writingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.writingClosure(_:to:)) } } @@ -29540,34 +25329,18 @@ public struct UpdateFieldLevelEncryptionProfileInput: Swift.Equatable { } } -struct UpdateFieldLevelEncryptionProfileInputBody: Swift.Equatable { - let fieldLevelEncryptionProfileConfig: CloudFrontClientTypes.FieldLevelEncryptionProfileConfig? -} - -extension UpdateFieldLevelEncryptionProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfileConfig = "FieldLevelEncryptionProfileConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionProfileConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionProfileConfig.self, forKey: .fieldLevelEncryptionProfileConfig) - fieldLevelEncryptionProfileConfig = fieldLevelEncryptionProfileConfigDecoded - } -} +extension UpdateFieldLevelEncryptionProfileOutput { -extension UpdateFieldLevelEncryptionProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FieldLevelEncryptionProfile = try responseDecoder.decode(responseBody: data) - self.fieldLevelEncryptionProfile = output - } else { - self.fieldLevelEncryptionProfile = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateFieldLevelEncryptionProfileOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.fieldLevelEncryptionProfile = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FieldLevelEncryptionProfile.readingClosure) + return value } } } @@ -29588,39 +25361,28 @@ public struct UpdateFieldLevelEncryptionProfileOutput: Swift.Equatable { } } -struct UpdateFieldLevelEncryptionProfileOutputBody: Swift.Equatable { - let fieldLevelEncryptionProfile: CloudFrontClientTypes.FieldLevelEncryptionProfile? -} - -extension UpdateFieldLevelEncryptionProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldLevelEncryptionProfile = "FieldLevelEncryptionProfile" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldLevelEncryptionProfileDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FieldLevelEncryptionProfile.self, forKey: .fieldLevelEncryptionProfile) - fieldLevelEncryptionProfile = fieldLevelEncryptionProfileDecoded - } -} - -enum UpdateFieldLevelEncryptionProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FieldLevelEncryptionProfileAlreadyExists": return try await FieldLevelEncryptionProfileAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FieldLevelEncryptionProfileSizeExceeded": return try await FieldLevelEncryptionProfileSizeExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchPublicKey": return try await NoSuchPublicKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionEncryptionEntities": return try await TooManyFieldLevelEncryptionEncryptionEntities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyFieldLevelEncryptionFieldPatterns": return try await TooManyFieldLevelEncryptionFieldPatterns(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateFieldLevelEncryptionProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "FieldLevelEncryptionProfileAlreadyExists": return try await FieldLevelEncryptionProfileAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "FieldLevelEncryptionProfileSizeExceeded": return try await FieldLevelEncryptionProfileSizeExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFieldLevelEncryptionProfile": return try await NoSuchFieldLevelEncryptionProfile.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchPublicKey": return try await NoSuchPublicKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionEncryptionEntities": return try await TooManyFieldLevelEncryptionEncryptionEntities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyFieldLevelEncryptionFieldPatterns": return try await TooManyFieldLevelEncryptionFieldPatterns.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -29631,15 +25393,10 @@ extension UpdateFunctionInput: Swift.CustomDebugStringConvertible { } extension UpdateFunctionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionCode = "FunctionCode" - case functionConfig = "FunctionConfig" - } - static func writingClosure(_ value: UpdateFunctionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FunctionCode")].write(value.functionCode) - try writer[.init("FunctionConfig")].write(value.functionConfig, writingClosure: CloudFrontClientTypes.FunctionConfig.writingClosure(_:to:)) + try writer["FunctionCode"].write(value.functionCode) + try writer["FunctionConfig"].write(value.functionConfig, writingClosure: CloudFrontClientTypes.FunctionConfig.writingClosure(_:to:)) } } @@ -29692,46 +25449,18 @@ public struct UpdateFunctionInput: Swift.Equatable { } } -struct UpdateFunctionInputBody: Swift.Equatable { - let functionConfig: CloudFrontClientTypes.FunctionConfig? - let functionCode: ClientRuntime.Data? -} - -extension UpdateFunctionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionCode = "FunctionCode" - case functionConfig = "FunctionConfig" - } +extension UpdateFunctionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionConfig.self, forKey: .functionConfig) - functionConfig = functionConfigDecoded - if containerValues.contains(.functionCode) { - do { - let functionCodeDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .functionCode) - functionCode = functionCodeDecoded - } catch { - functionCode = "".data(using: .utf8) + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateFunctionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETtag") { + value.eTag = eTagHeaderValue } - } else { - functionCode = nil - } - } -} - -extension UpdateFunctionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETtag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.FunctionSummary = try responseDecoder.decode(responseBody: data) - self.functionSummary = output - } else { - self.functionSummary = nil + value.functionSummary = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.FunctionSummary.readingClosure) + return value } } } @@ -29752,45 +25481,30 @@ public struct UpdateFunctionOutput: Swift.Equatable { } } -struct UpdateFunctionOutputBody: Swift.Equatable { - let functionSummary: CloudFrontClientTypes.FunctionSummary? -} - -extension UpdateFunctionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionSummary = "FunctionSummary" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionSummaryDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.FunctionSummary.self, forKey: .functionSummary) - functionSummary = functionSummaryDecoded - } -} +enum UpdateFunctionOutputError { -enum UpdateFunctionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "FunctionSizeLimitExceeded": return try await FunctionSizeLimitExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchFunctionExists": return try await NoSuchFunctionExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "FunctionSizeLimitExceeded": return try await FunctionSizeLimitExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchFunctionExists": return try await NoSuchFunctionExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "UnsupportedOperation": return try await UnsupportedOperation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateKeyGroupInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroupConfig = "KeyGroupConfig" - } - static func writingClosure(_ value: UpdateKeyGroupInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KeyGroupConfig")].write(value.keyGroupConfig, writingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:)) + try writer["KeyGroupConfig"].write(value.keyGroupConfig, writingClosure: CloudFrontClientTypes.KeyGroupConfig.writingClosure(_:to:)) } } @@ -29837,34 +25551,18 @@ public struct UpdateKeyGroupInput: Swift.Equatable { } } -struct UpdateKeyGroupInputBody: Swift.Equatable { - let keyGroupConfig: CloudFrontClientTypes.KeyGroupConfig? -} - -extension UpdateKeyGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroupConfig = "KeyGroupConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroupConfig.self, forKey: .keyGroupConfig) - keyGroupConfig = keyGroupConfigDecoded - } -} +extension UpdateKeyGroupOutput { -extension UpdateKeyGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyGroup = try responseDecoder.decode(responseBody: data) - self.keyGroup = output - } else { - self.keyGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateKeyGroupOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.keyGroup = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyGroup.readingClosure) + return value } } } @@ -29885,45 +25583,30 @@ public struct UpdateKeyGroupOutput: Swift.Equatable { } } -struct UpdateKeyGroupOutputBody: Swift.Equatable { - let keyGroup: CloudFrontClientTypes.KeyGroup? -} - -extension UpdateKeyGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyGroup = "KeyGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyGroupDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyGroup.self, forKey: .keyGroup) - keyGroup = keyGroupDecoded - } -} +enum UpdateKeyGroupOutputError { -enum UpdateKeyGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KeyGroupAlreadyExists": return try await KeyGroupAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResource": return try await NoSuchResource(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyPublicKeysInKeyGroup": return try await TooManyPublicKeysInKeyGroup(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "KeyGroupAlreadyExists": return try await KeyGroupAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResource": return try await NoSuchResource.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyPublicKeysInKeyGroup": return try await TooManyPublicKeysInKeyGroup.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateKeyValueStoreInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - } - static func writingClosure(_ value: UpdateKeyValueStoreInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) + try writer["Comment"].write(value.comment) } } @@ -29971,34 +25654,18 @@ public struct UpdateKeyValueStoreInput: Swift.Equatable { } } -struct UpdateKeyValueStoreInputBody: Swift.Equatable { - let comment: Swift.String? -} - -extension UpdateKeyValueStoreInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - } -} +extension UpdateKeyValueStoreOutput { -extension UpdateKeyValueStoreOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.KeyValueStore = try responseDecoder.decode(responseBody: data) - self.keyValueStore = output - } else { - self.keyValueStore = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateKeyValueStoreOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.keyValueStore = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.KeyValueStore.readingClosure) + return value } } } @@ -30019,44 +25686,29 @@ public struct UpdateKeyValueStoreOutput: Swift.Equatable { } } -struct UpdateKeyValueStoreOutputBody: Swift.Equatable { - let keyValueStore: CloudFrontClientTypes.KeyValueStore? -} - -extension UpdateKeyValueStoreOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyValueStore = "KeyValueStore" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyValueStoreDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.KeyValueStore.self, forKey: .keyValueStore) - keyValueStore = keyValueStoreDecoded - } -} +enum UpdateKeyValueStoreOutputError { -enum UpdateKeyValueStoreOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityNotFound": return try await EntityNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "EntityNotFound": return try await EntityNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateOriginAccessControlInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControlConfig = "OriginAccessControlConfig" - } - static func writingClosure(_ value: UpdateOriginAccessControlInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OriginAccessControlConfig")].write(value.originAccessControlConfig, writingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:)) + try writer["OriginAccessControlConfig"].write(value.originAccessControlConfig, writingClosure: CloudFrontClientTypes.OriginAccessControlConfig.writingClosure(_:to:)) } } @@ -30103,34 +25755,18 @@ public struct UpdateOriginAccessControlInput: Swift.Equatable { } } -struct UpdateOriginAccessControlInputBody: Swift.Equatable { - let originAccessControlConfig: CloudFrontClientTypes.OriginAccessControlConfig? -} - -extension UpdateOriginAccessControlInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControlConfig = "OriginAccessControlConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originAccessControlConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControlConfig.self, forKey: .originAccessControlConfig) - originAccessControlConfig = originAccessControlConfigDecoded - } -} +extension UpdateOriginAccessControlOutput { -extension UpdateOriginAccessControlOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginAccessControl = try responseDecoder.decode(responseBody: data) - self.originAccessControl = output - } else { - self.originAccessControl = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateOriginAccessControlOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.originAccessControl = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginAccessControl.readingClosure) + return value } } } @@ -30151,46 +25787,31 @@ public struct UpdateOriginAccessControlOutput: Swift.Equatable { } } -struct UpdateOriginAccessControlOutputBody: Swift.Equatable { - let originAccessControl: CloudFrontClientTypes.OriginAccessControl? -} - -extension UpdateOriginAccessControlOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originAccessControl = "OriginAccessControl" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originAccessControlDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginAccessControl.self, forKey: .originAccessControl) - originAccessControl = originAccessControlDecoded - } -} +enum UpdateOriginAccessControlOutputError { -enum UpdateOriginAccessControlOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginAccessControl": return try await NoSuchOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OriginAccessControlAlreadyExists": return try await OriginAccessControlAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginAccessControl": return try await NoSuchOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "OriginAccessControlAlreadyExists": return try await OriginAccessControlAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateOriginRequestPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicyConfig = "OriginRequestPolicyConfig" - } - static func writingClosure(_ value: UpdateOriginRequestPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OriginRequestPolicyConfig")].write(value.originRequestPolicyConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:)) + try writer["OriginRequestPolicyConfig"].write(value.originRequestPolicyConfig, writingClosure: CloudFrontClientTypes.OriginRequestPolicyConfig.writingClosure(_:to:)) } } @@ -30237,34 +25858,18 @@ public struct UpdateOriginRequestPolicyInput: Swift.Equatable { } } -struct UpdateOriginRequestPolicyInputBody: Swift.Equatable { - let originRequestPolicyConfig: CloudFrontClientTypes.OriginRequestPolicyConfig? -} - -extension UpdateOriginRequestPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicyConfig = "OriginRequestPolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originRequestPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicyConfig.self, forKey: .originRequestPolicyConfig) - originRequestPolicyConfig = originRequestPolicyConfigDecoded - } -} +extension UpdateOriginRequestPolicyOutput { -extension UpdateOriginRequestPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.OriginRequestPolicy = try responseDecoder.decode(responseBody: data) - self.originRequestPolicy = output - } else { - self.originRequestPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateOriginRequestPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.originRequestPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.OriginRequestPolicy.readingClosure) + return value } } } @@ -30285,50 +25890,35 @@ public struct UpdateOriginRequestPolicyOutput: Swift.Equatable { } } -struct UpdateOriginRequestPolicyOutputBody: Swift.Equatable { - let originRequestPolicy: CloudFrontClientTypes.OriginRequestPolicy? -} - -extension UpdateOriginRequestPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originRequestPolicy = "OriginRequestPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originRequestPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.OriginRequestPolicy.self, forKey: .originRequestPolicy) - originRequestPolicy = originRequestPolicyDecoded - } -} - -enum UpdateOriginRequestPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OriginRequestPolicyAlreadyExists": return try await OriginRequestPolicyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCookiesInOriginRequestPolicy": return try await TooManyCookiesInOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHeadersInOriginRequestPolicy": return try await TooManyHeadersInOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyQueryStringsInOriginRequestPolicy": return try await TooManyQueryStringsInOriginRequestPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateOriginRequestPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchOriginRequestPolicy": return try await NoSuchOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "OriginRequestPolicyAlreadyExists": return try await OriginRequestPolicyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCookiesInOriginRequestPolicy": return try await TooManyCookiesInOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHeadersInOriginRequestPolicy": return try await TooManyHeadersInOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyQueryStringsInOriginRequestPolicy": return try await TooManyQueryStringsInOriginRequestPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdatePublicKeyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKeyConfig = "PublicKeyConfig" - } - static func writingClosure(_ value: UpdatePublicKeyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("PublicKeyConfig")].write(value.publicKeyConfig, writingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:)) + try writer["PublicKeyConfig"].write(value.publicKeyConfig, writingClosure: CloudFrontClientTypes.PublicKeyConfig.writingClosure(_:to:)) } } @@ -30375,34 +25965,18 @@ public struct UpdatePublicKeyInput: Swift.Equatable { } } -struct UpdatePublicKeyInputBody: Swift.Equatable { - let publicKeyConfig: CloudFrontClientTypes.PublicKeyConfig? -} - -extension UpdatePublicKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKeyConfig = "PublicKeyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicKeyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PublicKeyConfig.self, forKey: .publicKeyConfig) - publicKeyConfig = publicKeyConfigDecoded - } -} +extension UpdatePublicKeyOutput { -extension UpdatePublicKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.PublicKey = try responseDecoder.decode(responseBody: data) - self.publicKey = output - } else { - self.publicKey = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdatePublicKeyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.publicKey = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.PublicKey.readingClosure) + return value } } } @@ -30423,54 +25997,35 @@ public struct UpdatePublicKeyOutput: Swift.Equatable { } } -struct UpdatePublicKeyOutputBody: Swift.Equatable { - let publicKey: CloudFrontClientTypes.PublicKey? -} - -extension UpdatePublicKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicKey = "PublicKey" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicKeyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.PublicKey.self, forKey: .publicKey) - publicKey = publicKeyDecoded - } -} +enum UpdatePublicKeyOutputError { -enum UpdatePublicKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CannotChangeImmutablePublicKeyFields": return try await CannotChangeImmutablePublicKeyFields(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchPublicKey": return try await NoSuchPublicKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CannotChangeImmutablePublicKeyFields": return try await CannotChangeImmutablePublicKeyFields.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchPublicKey": return try await NoSuchPublicKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateRealtimeLogConfigInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case endPoints = "EndPoints" - case fields = "Fields" - case name = "Name" - case samplingRate = "SamplingRate" - } - static func writingClosure(_ value: UpdateRealtimeLogConfigInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ARN")].write(value.arn) - try writer[.init("EndPoints")].writeList(value.endPoints, memberWritingClosure: CloudFrontClientTypes.EndPoint.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("Fields")].writeList(value.fields, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Field"), isFlattened: false) - try writer[.init("Name")].write(value.name) - try writer[.init("SamplingRate")].write(value.samplingRate) + try writer["ARN"].write(value.arn) + try writer["EndPoints"].writeList(value.endPoints, memberWritingClosure: CloudFrontClientTypes.EndPoint.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["Fields"].writeList(value.fields, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Field", isFlattened: false) + try writer["Name"].write(value.name) + try writer["SamplingRate"].write(value.samplingRate) } } @@ -30509,80 +26064,15 @@ public struct UpdateRealtimeLogConfigInput: Swift.Equatable { } } -struct UpdateRealtimeLogConfigInputBody: Swift.Equatable { - let endPoints: [CloudFrontClientTypes.EndPoint]? - let fields: [Swift.String]? - let name: Swift.String? - let arn: Swift.String? - let samplingRate: Swift.Int? -} - -extension UpdateRealtimeLogConfigInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case endPoints = "EndPoints" - case fields = "Fields" - case name = "Name" - case samplingRate = "SamplingRate" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.endPoints) { - struct KeyVal0{struct member{}} - let endPointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .endPoints) - if let endPointsWrappedContainer = endPointsWrappedContainer { - let endPointsContainer = try endPointsWrappedContainer.decodeIfPresent([CloudFrontClientTypes.EndPoint].self, forKey: .member) - var endPointsBuffer:[CloudFrontClientTypes.EndPoint]? = nil - if let endPointsContainer = endPointsContainer { - endPointsBuffer = [CloudFrontClientTypes.EndPoint]() - for structureContainer0 in endPointsContainer { - endPointsBuffer?.append(structureContainer0) - } - } - endPoints = endPointsBuffer - } else { - endPoints = [] - } - } else { - endPoints = nil - } - if containerValues.contains(.fields) { - struct KeyVal0{struct Field{}} - let fieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fields) - if let fieldsWrappedContainer = fieldsWrappedContainer { - let fieldsContainer = try fieldsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fieldsBuffer:[Swift.String]? = nil - if let fieldsContainer = fieldsContainer { - fieldsBuffer = [Swift.String]() - for stringContainer0 in fieldsContainer { - fieldsBuffer?.append(stringContainer0) - } - } - fields = fieldsBuffer - } else { - fields = [] - } - } else { - fields = nil - } - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let samplingRateDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .samplingRate) - samplingRate = samplingRateDecoded - } -} +extension UpdateRealtimeLogConfigOutput { -extension UpdateRealtimeLogConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateRealtimeLogConfigOutputBody = try responseDecoder.decode(responseBody: data) - self.realtimeLogConfig = output.realtimeLogConfig - } else { - self.realtimeLogConfig = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateRealtimeLogConfigOutput() + value.realtimeLogConfig = try reader["RealtimeLogConfig"].readIfPresent(readingClosure: CloudFrontClientTypes.RealtimeLogConfig.readingClosure) + return value } } } @@ -30599,42 +26089,27 @@ public struct UpdateRealtimeLogConfigOutput: Swift.Equatable { } } -struct UpdateRealtimeLogConfigOutputBody: Swift.Equatable { - let realtimeLogConfig: CloudFrontClientTypes.RealtimeLogConfig? -} - -extension UpdateRealtimeLogConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case realtimeLogConfig = "RealtimeLogConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let realtimeLogConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.RealtimeLogConfig.self, forKey: .realtimeLogConfig) - realtimeLogConfig = realtimeLogConfigDecoded - } -} +enum UpdateRealtimeLogConfigOutputError { -enum UpdateRealtimeLogConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchRealtimeLogConfig": return try await NoSuchRealtimeLogConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateResponseHeadersPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicyConfig = "ResponseHeadersPolicyConfig" - } - static func writingClosure(_ value: UpdateResponseHeadersPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ResponseHeadersPolicyConfig")].write(value.responseHeadersPolicyConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:)) + try writer["ResponseHeadersPolicyConfig"].write(value.responseHeadersPolicyConfig, writingClosure: CloudFrontClientTypes.ResponseHeadersPolicyConfig.writingClosure(_:to:)) } } @@ -30681,34 +26156,18 @@ public struct UpdateResponseHeadersPolicyInput: Swift.Equatable { } } -struct UpdateResponseHeadersPolicyInputBody: Swift.Equatable { - let responseHeadersPolicyConfig: CloudFrontClientTypes.ResponseHeadersPolicyConfig? -} - -extension UpdateResponseHeadersPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicyConfig = "ResponseHeadersPolicyConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let responseHeadersPolicyConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicyConfig.self, forKey: .responseHeadersPolicyConfig) - responseHeadersPolicyConfig = responseHeadersPolicyConfigDecoded - } -} +extension UpdateResponseHeadersPolicyOutput { -extension UpdateResponseHeadersPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.ResponseHeadersPolicy = try responseDecoder.decode(responseBody: data) - self.responseHeadersPolicy = output - } else { - self.responseHeadersPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateResponseHeadersPolicyOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.responseHeadersPolicy = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.ResponseHeadersPolicy.readingClosure) + return value } } } @@ -30729,50 +26188,35 @@ public struct UpdateResponseHeadersPolicyOutput: Swift.Equatable { } } -struct UpdateResponseHeadersPolicyOutputBody: Swift.Equatable { - let responseHeadersPolicy: CloudFrontClientTypes.ResponseHeadersPolicy? -} - -extension UpdateResponseHeadersPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case responseHeadersPolicy = "ResponseHeadersPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let responseHeadersPolicyDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.ResponseHeadersPolicy.self, forKey: .responseHeadersPolicy) - responseHeadersPolicy = responseHeadersPolicyDecoded - } -} - -enum UpdateResponseHeadersPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResponseHeadersPolicyAlreadyExists": return try await ResponseHeadersPolicyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooLongCSPInResponseHeadersPolicy": return try await TooLongCSPInResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCustomHeadersInResponseHeadersPolicy": return try await TooManyCustomHeadersInResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRemoveHeadersInResponseHeadersPolicy": return try await TooManyRemoveHeadersInResponseHeadersPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateResponseHeadersPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchResponseHeadersPolicy": return try await NoSuchResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ResponseHeadersPolicyAlreadyExists": return try await ResponseHeadersPolicyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooLongCSPInResponseHeadersPolicy": return try await TooLongCSPInResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyCustomHeadersInResponseHeadersPolicy": return try await TooManyCustomHeadersInResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRemoveHeadersInResponseHeadersPolicy": return try await TooManyRemoveHeadersInResponseHeadersPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateStreamingDistributionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionConfig = "StreamingDistributionConfig" - } - static func writingClosure(_ value: UpdateStreamingDistributionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StreamingDistributionConfig")].write(value.streamingDistributionConfig, writingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:)) + try writer["StreamingDistributionConfig"].write(value.streamingDistributionConfig, writingClosure: CloudFrontClientTypes.StreamingDistributionConfig.writingClosure(_:to:)) } } @@ -30820,34 +26264,18 @@ public struct UpdateStreamingDistributionInput: Swift.Equatable { } } -struct UpdateStreamingDistributionInputBody: Swift.Equatable { - let streamingDistributionConfig: CloudFrontClientTypes.StreamingDistributionConfig? -} - -extension UpdateStreamingDistributionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistributionConfig = "StreamingDistributionConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionConfigDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistributionConfig.self, forKey: .streamingDistributionConfig) - streamingDistributionConfig = streamingDistributionConfigDecoded - } -} +extension UpdateStreamingDistributionOutput { -extension UpdateStreamingDistributionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: CloudFrontClientTypes.StreamingDistribution = try responseDecoder.decode(responseBody: data) - self.streamingDistribution = output - } else { - self.streamingDistribution = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateStreamingDistributionOutput() + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + value.streamingDistribution = try reader.readIfPresent(readingClosure: CloudFrontClientTypes.StreamingDistribution.readingClosure) + return value } } } @@ -30869,83 +26297,60 @@ public struct UpdateStreamingDistributionOutput: Swift.Equatable { } } -struct UpdateStreamingDistributionOutputBody: Swift.Equatable { - let streamingDistribution: CloudFrontClientTypes.StreamingDistribution? -} - -extension UpdateStreamingDistributionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case streamingDistribution = "StreamingDistribution" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let streamingDistributionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.StreamingDistribution.self, forKey: .streamingDistribution) - streamingDistribution = streamingDistributionDecoded - } -} - -enum UpdateStreamingDistributionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessDenied": return try await AccessDenied(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IllegalUpdate": return try await IllegalUpdate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InconsistentQuantities": return try await InconsistentQuantities(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingBody": return try await MissingBody(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchStreamingDistribution": return try await NoSuchStreamingDistribution(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PreconditionFailed": return try await PreconditionFailed(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyStreamingDistributionCNAMEs": return try await TooManyStreamingDistributionCNAMEs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustedSigners": return try await TooManyTrustedSigners(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateStreamingDistributionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "AccessDenied": return try await AccessDenied.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CNAMEAlreadyExists": return try await CNAMEAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IllegalUpdate": return try await IllegalUpdate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InconsistentQuantities": return try await InconsistentQuantities.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidIfMatchVersion": return try await InvalidIfMatchVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessControl": return try await InvalidOriginAccessControl.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidOriginAccessIdentity": return try await InvalidOriginAccessIdentity.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "MissingBody": return try await MissingBody.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchStreamingDistribution": return try await NoSuchStreamingDistribution.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PreconditionFailed": return try await PreconditionFailed.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyStreamingDistributionCNAMEs": return try await TooManyStreamingDistributionCNAMEs.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrustedSigners": return try await TooManyTrustedSigners.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrustedSignerDoesNotExist": return try await TrustedSignerDoesNotExist.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CloudFrontClientTypes.ViewerCertificate: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acmCertificateArn = "ACMCertificateArn" - case certificate = "Certificate" - case certificateSource = "CertificateSource" - case cloudFrontDefaultCertificate = "CloudFrontDefaultCertificate" - case iamCertificateId = "IAMCertificateId" - case minimumProtocolVersion = "MinimumProtocolVersion" - case sslSupportMethod = "SSLSupportMethod" - } +extension CloudFrontClientTypes.ViewerCertificate { static func writingClosure(_ value: CloudFrontClientTypes.ViewerCertificate?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ACMCertificateArn")].write(value.acmCertificateArn) - try writer[.init("Certificate")].write(value.certificate) - try writer[.init("CertificateSource")].write(value.certificateSource) - try writer[.init("CloudFrontDefaultCertificate")].write(value.cloudFrontDefaultCertificate) - try writer[.init("IAMCertificateId")].write(value.iamCertificateId) - try writer[.init("MinimumProtocolVersion")].write(value.minimumProtocolVersion) - try writer[.init("SSLSupportMethod")].write(value.sslSupportMethod) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudFrontDefaultCertificateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .cloudFrontDefaultCertificate) - cloudFrontDefaultCertificate = cloudFrontDefaultCertificateDecoded - let iamCertificateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamCertificateId) - iamCertificateId = iamCertificateIdDecoded - let acmCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .acmCertificateArn) - acmCertificateArn = acmCertificateArnDecoded - let sslSupportMethodDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.SSLSupportMethod.self, forKey: .sslSupportMethod) - sslSupportMethod = sslSupportMethodDecoded - let minimumProtocolVersionDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.MinimumProtocolVersion.self, forKey: .minimumProtocolVersion) - minimumProtocolVersion = minimumProtocolVersionDecoded - let certificateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificate) - certificate = certificateDecoded - let certificateSourceDecoded = try containerValues.decodeIfPresent(CloudFrontClientTypes.CertificateSource.self, forKey: .certificateSource) - certificateSource = certificateSourceDecoded + try writer["ACMCertificateArn"].write(value.acmCertificateArn) + try writer["Certificate"].write(value.certificate) + try writer["CertificateSource"].write(value.certificateSource) + try writer["CloudFrontDefaultCertificate"].write(value.cloudFrontDefaultCertificate) + try writer["IAMCertificateId"].write(value.iamCertificateId) + try writer["MinimumProtocolVersion"].write(value.minimumProtocolVersion) + try writer["SSLSupportMethod"].write(value.sslSupportMethod) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudFrontClientTypes.ViewerCertificate() + value.cloudFrontDefaultCertificate = try reader["CloudFrontDefaultCertificate"].readIfPresent() + value.iamCertificateId = try reader["IAMCertificateId"].readIfPresent() + value.acmCertificateArn = try reader["ACMCertificateArn"].readIfPresent() + value.sslSupportMethod = try reader["SSLSupportMethod"].readIfPresent() + value.minimumProtocolVersion = try reader["MinimumProtocolVersion"].readIfPresent() + value.certificate = try reader["Certificate"].readIfPresent() + value.certificateSource = try reader["CertificateSource"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSCloudSearch/CloudSearchClient.swift b/Sources/Services/AWSCloudSearch/CloudSearchClient.swift index 3da28783ab0..4c49d976de2 100644 --- a/Sources/Services/AWSCloudSearch/CloudSearchClient.swift +++ b/Sources/Services/AWSCloudSearch/CloudSearchClient.swift @@ -11,14 +11,11 @@ public class CloudSearchClient { let config: CloudSearchClient.CloudSearchClientConfiguration let serviceName = "CloudSearch" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: CloudSearchClient.CloudSearchClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -81,7 +78,6 @@ extension CloudSearchClient { public func buildSuggesters(input: BuildSuggestersInput) async throws -> BuildSuggestersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "buildSuggesters") @@ -105,7 +101,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BuildSuggestersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BuildSuggestersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BuildSuggestersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -130,7 +126,6 @@ extension CloudSearchClient { public func createDomain(input: CreateDomainInput) async throws -> CreateDomainOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDomain") @@ -154,7 +149,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDomainOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDomainOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDomainOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -180,7 +175,6 @@ extension CloudSearchClient { public func defineAnalysisScheme(input: DefineAnalysisSchemeInput) async throws -> DefineAnalysisSchemeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "defineAnalysisScheme") @@ -204,7 +198,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DefineAnalysisSchemeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DefineAnalysisSchemeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DefineAnalysisSchemeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -230,7 +224,6 @@ extension CloudSearchClient { public func defineExpression(input: DefineExpressionInput) async throws -> DefineExpressionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "defineExpression") @@ -254,7 +247,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DefineExpressionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DefineExpressionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DefineExpressionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -280,7 +273,6 @@ extension CloudSearchClient { public func defineIndexField(input: DefineIndexFieldInput) async throws -> DefineIndexFieldOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "defineIndexField") @@ -304,7 +296,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DefineIndexFieldOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DefineIndexFieldOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DefineIndexFieldOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -330,7 +322,6 @@ extension CloudSearchClient { public func defineSuggester(input: DefineSuggesterInput) async throws -> DefineSuggesterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "defineSuggester") @@ -354,7 +345,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DefineSuggesterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DefineSuggesterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DefineSuggesterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -379,7 +370,6 @@ extension CloudSearchClient { public func deleteAnalysisScheme(input: DeleteAnalysisSchemeInput) async throws -> DeleteAnalysisSchemeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteAnalysisScheme") @@ -403,7 +393,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAnalysisSchemeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAnalysisSchemeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAnalysisSchemeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -425,7 +415,6 @@ extension CloudSearchClient { public func deleteDomain(input: DeleteDomainInput) async throws -> DeleteDomainOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDomain") @@ -449,7 +438,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDomainOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDomainOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDomainOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -474,7 +463,6 @@ extension CloudSearchClient { public func deleteExpression(input: DeleteExpressionInput) async throws -> DeleteExpressionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteExpression") @@ -498,7 +486,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteExpressionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteExpressionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteExpressionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -523,7 +511,6 @@ extension CloudSearchClient { public func deleteIndexField(input: DeleteIndexFieldInput) async throws -> DeleteIndexFieldOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteIndexField") @@ -547,7 +534,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteIndexFieldOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteIndexFieldOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteIndexFieldOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -572,7 +559,6 @@ extension CloudSearchClient { public func deleteSuggester(input: DeleteSuggesterInput) async throws -> DeleteSuggesterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSuggester") @@ -596,7 +582,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSuggesterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSuggesterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSuggesterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -619,7 +605,6 @@ extension CloudSearchClient { public func describeAnalysisSchemes(input: DescribeAnalysisSchemesInput) async throws -> DescribeAnalysisSchemesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAnalysisSchemes") @@ -643,7 +628,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAnalysisSchemesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAnalysisSchemesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAnalysisSchemesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -669,7 +654,6 @@ extension CloudSearchClient { public func describeAvailabilityOptions(input: DescribeAvailabilityOptionsInput) async throws -> DescribeAvailabilityOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAvailabilityOptions") @@ -693,7 +677,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAvailabilityOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAvailabilityOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAvailabilityOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -718,7 +702,6 @@ extension CloudSearchClient { public func describeDomainEndpointOptions(input: DescribeDomainEndpointOptionsInput) async throws -> DescribeDomainEndpointOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDomainEndpointOptions") @@ -742,7 +725,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDomainEndpointOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDomainEndpointOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDomainEndpointOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -764,7 +747,6 @@ extension CloudSearchClient { public func describeDomains(input: DescribeDomainsInput) async throws -> DescribeDomainsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDomains") @@ -788,7 +770,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDomainsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDomainsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDomainsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -811,7 +793,6 @@ extension CloudSearchClient { public func describeExpressions(input: DescribeExpressionsInput) async throws -> DescribeExpressionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeExpressions") @@ -835,7 +816,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeExpressionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeExpressionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeExpressionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -858,7 +839,6 @@ extension CloudSearchClient { public func describeIndexFields(input: DescribeIndexFieldsInput) async throws -> DescribeIndexFieldsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIndexFields") @@ -882,7 +862,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIndexFieldsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIndexFieldsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIndexFieldsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -905,7 +885,6 @@ extension CloudSearchClient { public func describeScalingParameters(input: DescribeScalingParametersInput) async throws -> DescribeScalingParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeScalingParameters") @@ -929,7 +908,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeScalingParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeScalingParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeScalingParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -952,7 +931,6 @@ extension CloudSearchClient { public func describeServiceAccessPolicies(input: DescribeServiceAccessPoliciesInput) async throws -> DescribeServiceAccessPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeServiceAccessPolicies") @@ -976,7 +954,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeServiceAccessPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeServiceAccessPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeServiceAccessPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -999,7 +977,6 @@ extension CloudSearchClient { public func describeSuggesters(input: DescribeSuggestersInput) async throws -> DescribeSuggestersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSuggesters") @@ -1023,7 +1000,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSuggestersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSuggestersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSuggestersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1047,7 +1024,6 @@ extension CloudSearchClient { public func indexDocuments(input: IndexDocumentsInput) async throws -> IndexDocumentsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "indexDocuments") @@ -1071,7 +1047,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(IndexDocumentsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(IndexDocumentsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(IndexDocumentsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1092,7 +1068,6 @@ extension CloudSearchClient { public func listDomainNames(input: ListDomainNamesInput) async throws -> ListDomainNamesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listDomainNames") @@ -1116,7 +1091,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDomainNamesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDomainNamesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDomainNamesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1143,7 +1118,6 @@ extension CloudSearchClient { public func updateAvailabilityOptions(input: UpdateAvailabilityOptionsInput) async throws -> UpdateAvailabilityOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateAvailabilityOptions") @@ -1167,7 +1141,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateAvailabilityOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateAvailabilityOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateAvailabilityOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1194,7 +1168,6 @@ extension CloudSearchClient { public func updateDomainEndpointOptions(input: UpdateDomainEndpointOptionsInput) async throws -> UpdateDomainEndpointOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateDomainEndpointOptions") @@ -1218,7 +1191,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateDomainEndpointOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateDomainEndpointOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateDomainEndpointOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1244,7 +1217,6 @@ extension CloudSearchClient { public func updateScalingParameters(input: UpdateScalingParametersInput) async throws -> UpdateScalingParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateScalingParameters") @@ -1268,7 +1240,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateScalingParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateScalingParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateScalingParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1294,7 +1266,6 @@ extension CloudSearchClient { public func updateServiceAccessPolicies(input: UpdateServiceAccessPoliciesInput) async throws -> UpdateServiceAccessPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateServiceAccessPolicies") @@ -1318,7 +1289,7 @@ extension CloudSearchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateServiceAccessPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateServiceAccessPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateServiceAccessPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSCloudSearch/models/Models.swift b/Sources/Services/AWSCloudSearch/models/Models.swift index 501eb371cfc..bfd6c183062 100644 --- a/Sources/Services/AWSCloudSearch/models/Models.swift +++ b/Sources/Services/AWSCloudSearch/models/Models.swift @@ -1,8 +1,10 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML -extension CloudSearchClientTypes.AccessPoliciesStatus: Swift.Codable { +extension CloudSearchClientTypes.AccessPoliciesStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case options = "Options" case status = "Status" @@ -18,12 +20,14 @@ extension CloudSearchClientTypes.AccessPoliciesStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .options) - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.AccessPoliciesStatus() + value.options = try reader["Options"].readIfPresent() + value.status = try reader["Status"].readIfPresent(readingClosure: CloudSearchClientTypes.OptionStatus.readingClosure) + return value + } } } @@ -87,7 +91,7 @@ extension CloudSearchClientTypes { } } -extension CloudSearchClientTypes.AnalysisOptions: Swift.Codable { +extension CloudSearchClientTypes.AnalysisOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case algorithmicStemming = "AlgorithmicStemming" case japaneseTokenizationDictionary = "JapaneseTokenizationDictionary" @@ -115,18 +119,17 @@ extension CloudSearchClientTypes.AnalysisOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let synonymsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .synonyms) - synonyms = synonymsDecoded - let stopwordsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stopwords) - stopwords = stopwordsDecoded - let stemmingDictionaryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stemmingDictionary) - stemmingDictionary = stemmingDictionaryDecoded - let japaneseTokenizationDictionaryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .japaneseTokenizationDictionary) - japaneseTokenizationDictionary = japaneseTokenizationDictionaryDecoded - let algorithmicStemmingDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AlgorithmicStemming.self, forKey: .algorithmicStemming) - algorithmicStemming = algorithmicStemmingDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.AnalysisOptions() + value.synonyms = try reader["Synonyms"].readIfPresent() + value.stopwords = try reader["Stopwords"].readIfPresent() + value.stemmingDictionary = try reader["StemmingDictionary"].readIfPresent() + value.japaneseTokenizationDictionary = try reader["JapaneseTokenizationDictionary"].readIfPresent() + value.algorithmicStemming = try reader["AlgorithmicStemming"].readIfPresent() + return value + } } } @@ -162,7 +165,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.AnalysisScheme: Swift.Codable { +extension CloudSearchClientTypes.AnalysisScheme: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case analysisOptions = "AnalysisOptions" case analysisSchemeLanguage = "AnalysisSchemeLanguage" @@ -182,14 +185,15 @@ extension CloudSearchClientTypes.AnalysisScheme: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let analysisSchemeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .analysisSchemeName) - analysisSchemeName = analysisSchemeNameDecoded - let analysisSchemeLanguageDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AnalysisSchemeLanguage.self, forKey: .analysisSchemeLanguage) - analysisSchemeLanguage = analysisSchemeLanguageDecoded - let analysisOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AnalysisOptions.self, forKey: .analysisOptions) - analysisOptions = analysisOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.AnalysisScheme() + value.analysisSchemeName = try reader["AnalysisSchemeName"].readIfPresent() + value.analysisSchemeLanguage = try reader["AnalysisSchemeLanguage"].readIfPresent() + value.analysisOptions = try reader["AnalysisOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.AnalysisOptions.readingClosure) + return value + } } } @@ -351,7 +355,7 @@ extension CloudSearchClientTypes { } } -extension CloudSearchClientTypes.AnalysisSchemeStatus: Swift.Codable { +extension CloudSearchClientTypes.AnalysisSchemeStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case options = "Options" case status = "Status" @@ -367,12 +371,14 @@ extension CloudSearchClientTypes.AnalysisSchemeStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AnalysisScheme.self, forKey: .options) - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.AnalysisSchemeStatus() + value.options = try reader["Options"].readIfPresent(readingClosure: CloudSearchClientTypes.AnalysisScheme.readingClosure) + value.status = try reader["Status"].readIfPresent(readingClosure: CloudSearchClientTypes.OptionStatus.readingClosure) + return value + } } } @@ -398,7 +404,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.AvailabilityOptionsStatus: Swift.Codable { +extension CloudSearchClientTypes.AvailabilityOptionsStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case options = "Options" case status = "Status" @@ -414,12 +420,14 @@ extension CloudSearchClientTypes.AvailabilityOptionsStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .options) ?? false - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.AvailabilityOptionsStatus() + value.options = try reader["Options"].readIfPresent() ?? false + value.status = try reader["Status"].readIfPresent(readingClosure: CloudSearchClientTypes.OptionStatus.readingClosure) + return value + } } } @@ -446,18 +454,15 @@ extension CloudSearchClientTypes { } extension BaseException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.code = output.error.code - self.properties.message = output.error.message - } else { - self.properties.code = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BaseException() + value.properties.code = try reader["Code"].readIfPresent() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -490,27 +495,11 @@ public struct BaseException: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct BaseExceptionBody: Swift.Equatable { - let code: Swift.String? - let message: Swift.String? -} - -extension BaseExceptionBody: Swift.Decodable { +extension BuildSuggestersInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case domainName = "DomainName" } -} -extension BuildSuggestersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -542,30 +531,15 @@ public struct BuildSuggestersInput: Swift.Equatable { } } -struct BuildSuggestersInputBody: Swift.Equatable { - let domainName: Swift.String? -} - -extension BuildSuggestersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - } -} +extension BuildSuggestersOutput { -extension BuildSuggestersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BuildSuggestersOutputBody = try responseDecoder.decode(responseBody: data) - self.fieldNames = output.fieldNames - } else { - self.fieldNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BuildSuggestersResult"] + var value = BuildSuggestersOutput() + value.fieldNames = try reader["FieldNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -583,49 +557,22 @@ public struct BuildSuggestersOutput: Swift.Equatable { } } -struct BuildSuggestersOutputBody: Swift.Equatable { - let fieldNames: [Swift.String]? -} +enum BuildSuggestersOutputError { -extension BuildSuggestersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldNames = "FieldNames" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BuildSuggestersResult")) - if containerValues.contains(.fieldNames) { - struct KeyVal0{struct member{}} - let fieldNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fieldNames) - if let fieldNamesWrappedContainer = fieldNamesWrappedContainer { - let fieldNamesContainer = try fieldNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fieldNamesBuffer:[Swift.String]? = nil - if let fieldNamesContainer = fieldNamesContainer { - fieldNamesBuffer = [Swift.String]() - for stringContainer0 in fieldNamesContainer { - fieldNamesBuffer?.append(stringContainer0) - } - } - fieldNames = fieldNamesBuffer - } else { - fieldNames = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - fieldNames = nil - } - } -} - -enum BuildSuggestersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -633,6 +580,10 @@ enum BuildSuggestersOutputError: ClientRuntime.HttpResponseErrorBinding { public enum CloudSearchClientTypes {} extension CreateDomainInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -664,30 +615,15 @@ public struct CreateDomainInput: Swift.Equatable { } } -struct CreateDomainInputBody: Swift.Equatable { - let domainName: Swift.String? -} - -extension CreateDomainInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - } -} +extension CreateDomainOutput { -extension CreateDomainOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDomainOutputBody = try responseDecoder.decode(responseBody: data) - self.domainStatus = output.domainStatus - } else { - self.domainStatus = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDomainResult"] + var value = CreateDomainOutput() + value.domainStatus = try reader["DomainStatus"].readIfPresent(readingClosure: CloudSearchClientTypes.DomainStatus.readingClosure) + return value } } } @@ -705,38 +641,28 @@ public struct CreateDomainOutput: Swift.Equatable { } } -struct CreateDomainOutputBody: Swift.Equatable { - let domainStatus: CloudSearchClientTypes.DomainStatus? -} - -extension CreateDomainOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainStatus = "DomainStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDomainResult")) - let domainStatusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DomainStatus.self, forKey: .domainStatus) - domainStatus = domainStatusDecoded - } -} +enum CreateDomainOutputError { -enum CreateDomainOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceAlreadyExists": return try await ResourceAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceAlreadyExists": return try await ResourceAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CloudSearchClientTypes.DateArrayOptions: Swift.Codable { +extension CloudSearchClientTypes.DateArrayOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -764,18 +690,17 @@ extension CloudSearchClientTypes.DateArrayOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceFields) - sourceFields = sourceFieldsDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.DateArrayOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceFields = try reader["SourceFields"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + return value + } } } @@ -811,7 +736,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.DateOptions: Swift.Codable { +extension CloudSearchClientTypes.DateOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -843,20 +768,18 @@ extension CloudSearchClientTypes.DateOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceField) - sourceField = sourceFieldDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded - let sortEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sortEnabled) - sortEnabled = sortEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.DateOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceField = try reader["SourceField"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + value.sortEnabled = try reader["SortEnabled"].readIfPresent() + return value + } } } @@ -897,6 +820,11 @@ extension CloudSearchClientTypes { } extension DefineAnalysisSchemeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case analysisScheme = "AnalysisScheme" + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let analysisScheme = analysisScheme { @@ -936,34 +864,15 @@ public struct DefineAnalysisSchemeInput: Swift.Equatable { } } -struct DefineAnalysisSchemeInputBody: Swift.Equatable { - let domainName: Swift.String? - let analysisScheme: CloudSearchClientTypes.AnalysisScheme? -} - -extension DefineAnalysisSchemeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisScheme = "AnalysisScheme" - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let analysisSchemeDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AnalysisScheme.self, forKey: .analysisScheme) - analysisScheme = analysisSchemeDecoded - } -} +extension DefineAnalysisSchemeOutput { -extension DefineAnalysisSchemeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DefineAnalysisSchemeOutputBody = try responseDecoder.decode(responseBody: data) - self.analysisScheme = output.analysisScheme - } else { - self.analysisScheme = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DefineAnalysisSchemeResult"] + var value = DefineAnalysisSchemeOutput() + value.analysisScheme = try reader["AnalysisScheme"].readIfPresent(readingClosure: CloudSearchClientTypes.AnalysisSchemeStatus.readingClosure) + return value } } } @@ -982,39 +891,34 @@ public struct DefineAnalysisSchemeOutput: Swift.Equatable { } } -struct DefineAnalysisSchemeOutputBody: Swift.Equatable { - let analysisScheme: CloudSearchClientTypes.AnalysisSchemeStatus? -} - -extension DefineAnalysisSchemeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisScheme = "AnalysisScheme" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DefineAnalysisSchemeResult")) - let analysisSchemeDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AnalysisSchemeStatus.self, forKey: .analysisScheme) - analysisScheme = analysisSchemeDecoded - } -} - -enum DefineAnalysisSchemeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DefineAnalysisSchemeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DefineExpressionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + case expression = "Expression" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -1054,34 +958,15 @@ public struct DefineExpressionInput: Swift.Equatable { } } -struct DefineExpressionInputBody: Swift.Equatable { - let domainName: Swift.String? - let expression: CloudSearchClientTypes.Expression? -} - -extension DefineExpressionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case expression = "Expression" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let expressionDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.Expression.self, forKey: .expression) - expression = expressionDecoded - } -} +extension DefineExpressionOutput { -extension DefineExpressionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DefineExpressionOutputBody = try responseDecoder.decode(responseBody: data) - self.expression = output.expression - } else { - self.expression = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DefineExpressionResult"] + var value = DefineExpressionOutput() + value.expression = try reader["Expression"].readIfPresent(readingClosure: CloudSearchClientTypes.ExpressionStatus.readingClosure) + return value } } } @@ -1100,39 +985,34 @@ public struct DefineExpressionOutput: Swift.Equatable { } } -struct DefineExpressionOutputBody: Swift.Equatable { - let expression: CloudSearchClientTypes.ExpressionStatus? -} - -extension DefineExpressionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case expression = "Expression" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DefineExpressionResult")) - let expressionDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.ExpressionStatus.self, forKey: .expression) - expression = expressionDecoded - } -} - -enum DefineExpressionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DefineExpressionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DefineIndexFieldInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + case indexField = "IndexField" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -1172,34 +1052,15 @@ public struct DefineIndexFieldInput: Swift.Equatable { } } -struct DefineIndexFieldInputBody: Swift.Equatable { - let domainName: Swift.String? - let indexField: CloudSearchClientTypes.IndexField? -} +extension DefineIndexFieldOutput { -extension DefineIndexFieldInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case indexField = "IndexField" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let indexFieldDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.IndexField.self, forKey: .indexField) - indexField = indexFieldDecoded - } -} - -extension DefineIndexFieldOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DefineIndexFieldOutputBody = try responseDecoder.decode(responseBody: data) - self.indexField = output.indexField - } else { - self.indexField = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DefineIndexFieldResult"] + var value = DefineIndexFieldOutput() + value.indexField = try reader["IndexField"].readIfPresent(readingClosure: CloudSearchClientTypes.IndexFieldStatus.readingClosure) + return value } } } @@ -1218,39 +1079,34 @@ public struct DefineIndexFieldOutput: Swift.Equatable { } } -struct DefineIndexFieldOutputBody: Swift.Equatable { - let indexField: CloudSearchClientTypes.IndexFieldStatus? -} - -extension DefineIndexFieldOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case indexField = "IndexField" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DefineIndexFieldResult")) - let indexFieldDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.IndexFieldStatus.self, forKey: .indexField) - indexField = indexFieldDecoded - } -} - -enum DefineIndexFieldOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DefineIndexFieldOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DefineSuggesterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + case suggester = "Suggester" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -1290,34 +1146,15 @@ public struct DefineSuggesterInput: Swift.Equatable { } } -struct DefineSuggesterInputBody: Swift.Equatable { - let domainName: Swift.String? - let suggester: CloudSearchClientTypes.Suggester? -} - -extension DefineSuggesterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case suggester = "Suggester" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let suggesterDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.Suggester.self, forKey: .suggester) - suggester = suggesterDecoded - } -} +extension DefineSuggesterOutput { -extension DefineSuggesterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DefineSuggesterOutputBody = try responseDecoder.decode(responseBody: data) - self.suggester = output.suggester - } else { - self.suggester = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DefineSuggesterResult"] + var value = DefineSuggesterOutput() + value.suggester = try reader["Suggester"].readIfPresent(readingClosure: CloudSearchClientTypes.SuggesterStatus.readingClosure) + return value } } } @@ -1336,39 +1173,34 @@ public struct DefineSuggesterOutput: Swift.Equatable { } } -struct DefineSuggesterOutputBody: Swift.Equatable { - let suggester: CloudSearchClientTypes.SuggesterStatus? -} - -extension DefineSuggesterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case suggester = "Suggester" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DefineSuggesterResult")) - let suggesterDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.SuggesterStatus.self, forKey: .suggester) - suggester = suggesterDecoded - } -} - -enum DefineSuggesterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DefineSuggesterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteAnalysisSchemeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case analysisSchemeName = "AnalysisSchemeName" + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let analysisSchemeName = analysisSchemeName { @@ -1408,34 +1240,15 @@ public struct DeleteAnalysisSchemeInput: Swift.Equatable { } } -struct DeleteAnalysisSchemeInputBody: Swift.Equatable { - let domainName: Swift.String? - let analysisSchemeName: Swift.String? -} - -extension DeleteAnalysisSchemeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisSchemeName = "AnalysisSchemeName" - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let analysisSchemeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .analysisSchemeName) - analysisSchemeName = analysisSchemeNameDecoded - } -} +extension DeleteAnalysisSchemeOutput { -extension DeleteAnalysisSchemeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteAnalysisSchemeOutputBody = try responseDecoder.decode(responseBody: data) - self.analysisScheme = output.analysisScheme - } else { - self.analysisScheme = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteAnalysisSchemeResult"] + var value = DeleteAnalysisSchemeOutput() + value.analysisScheme = try reader["AnalysisScheme"].readIfPresent(readingClosure: CloudSearchClientTypes.AnalysisSchemeStatus.readingClosure) + return value } } } @@ -1454,38 +1267,32 @@ public struct DeleteAnalysisSchemeOutput: Swift.Equatable { } } -struct DeleteAnalysisSchemeOutputBody: Swift.Equatable { - let analysisScheme: CloudSearchClientTypes.AnalysisSchemeStatus? -} - -extension DeleteAnalysisSchemeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisScheme = "AnalysisScheme" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteAnalysisSchemeResult")) - let analysisSchemeDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AnalysisSchemeStatus.self, forKey: .analysisScheme) - analysisScheme = analysisSchemeDecoded - } -} +enum DeleteAnalysisSchemeOutputError { -enum DeleteAnalysisSchemeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDomainInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -1517,30 +1324,15 @@ public struct DeleteDomainInput: Swift.Equatable { } } -struct DeleteDomainInputBody: Swift.Equatable { - let domainName: Swift.String? -} - -extension DeleteDomainInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - } -} +extension DeleteDomainOutput { -extension DeleteDomainOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDomainOutputBody = try responseDecoder.decode(responseBody: data) - self.domainStatus = output.domainStatus - } else { - self.domainStatus = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDomainResult"] + var value = DeleteDomainOutput() + value.domainStatus = try reader["DomainStatus"].readIfPresent(readingClosure: CloudSearchClientTypes.DomainStatus.readingClosure) + return value } } } @@ -1558,35 +1350,30 @@ public struct DeleteDomainOutput: Swift.Equatable { } } -struct DeleteDomainOutputBody: Swift.Equatable { - let domainStatus: CloudSearchClientTypes.DomainStatus? -} - -extension DeleteDomainOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainStatus = "DomainStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDomainResult")) - let domainStatusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DomainStatus.self, forKey: .domainStatus) - domainStatus = domainStatusDecoded - } -} +enum DeleteDomainOutputError { -enum DeleteDomainOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteExpressionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + case expressionName = "ExpressionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -1626,34 +1413,15 @@ public struct DeleteExpressionInput: Swift.Equatable { } } -struct DeleteExpressionInputBody: Swift.Equatable { - let domainName: Swift.String? - let expressionName: Swift.String? -} - -extension DeleteExpressionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case expressionName = "ExpressionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let expressionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expressionName) - expressionName = expressionNameDecoded - } -} +extension DeleteExpressionOutput { -extension DeleteExpressionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteExpressionOutputBody = try responseDecoder.decode(responseBody: data) - self.expression = output.expression - } else { - self.expression = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteExpressionResult"] + var value = DeleteExpressionOutput() + value.expression = try reader["Expression"].readIfPresent(readingClosure: CloudSearchClientTypes.ExpressionStatus.readingClosure) + return value } } } @@ -1672,38 +1440,33 @@ public struct DeleteExpressionOutput: Swift.Equatable { } } -struct DeleteExpressionOutputBody: Swift.Equatable { - let expression: CloudSearchClientTypes.ExpressionStatus? -} - -extension DeleteExpressionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case expression = "Expression" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteExpressionResult")) - let expressionDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.ExpressionStatus.self, forKey: .expression) - expression = expressionDecoded - } -} +enum DeleteExpressionOutputError { -enum DeleteExpressionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteIndexFieldInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + case indexFieldName = "IndexFieldName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -1743,34 +1506,15 @@ public struct DeleteIndexFieldInput: Swift.Equatable { } } -struct DeleteIndexFieldInputBody: Swift.Equatable { - let domainName: Swift.String? - let indexFieldName: Swift.String? -} - -extension DeleteIndexFieldInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case indexFieldName = "IndexFieldName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let indexFieldNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .indexFieldName) - indexFieldName = indexFieldNameDecoded - } -} +extension DeleteIndexFieldOutput { -extension DeleteIndexFieldOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteIndexFieldOutputBody = try responseDecoder.decode(responseBody: data) - self.indexField = output.indexField - } else { - self.indexField = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteIndexFieldResult"] + var value = DeleteIndexFieldOutput() + value.indexField = try reader["IndexField"].readIfPresent(readingClosure: CloudSearchClientTypes.IndexFieldStatus.readingClosure) + return value } } } @@ -1789,38 +1533,33 @@ public struct DeleteIndexFieldOutput: Swift.Equatable { } } -struct DeleteIndexFieldOutputBody: Swift.Equatable { - let indexField: CloudSearchClientTypes.IndexFieldStatus? -} +enum DeleteIndexFieldOutputError { -extension DeleteIndexFieldOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case indexField = "IndexField" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteIndexFieldResult")) - let indexFieldDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.IndexFieldStatus.self, forKey: .indexField) - indexField = indexFieldDecoded - } -} - -enum DeleteIndexFieldOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteSuggesterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + case suggesterName = "SuggesterName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -1860,34 +1599,15 @@ public struct DeleteSuggesterInput: Swift.Equatable { } } -struct DeleteSuggesterInputBody: Swift.Equatable { - let domainName: Swift.String? - let suggesterName: Swift.String? -} - -extension DeleteSuggesterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case suggesterName = "SuggesterName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let suggesterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .suggesterName) - suggesterName = suggesterNameDecoded - } -} +extension DeleteSuggesterOutput { -extension DeleteSuggesterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteSuggesterOutputBody = try responseDecoder.decode(responseBody: data) - self.suggester = output.suggester - } else { - self.suggester = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteSuggesterResult"] + var value = DeleteSuggesterOutput() + value.suggester = try reader["Suggester"].readIfPresent(readingClosure: CloudSearchClientTypes.SuggesterStatus.readingClosure) + return value } } } @@ -1906,38 +1626,34 @@ public struct DeleteSuggesterOutput: Swift.Equatable { } } -struct DeleteSuggesterOutputBody: Swift.Equatable { - let suggester: CloudSearchClientTypes.SuggesterStatus? -} - -extension DeleteSuggesterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case suggester = "Suggester" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteSuggesterResult")) - let suggesterDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.SuggesterStatus.self, forKey: .suggester) - suggester = suggesterDecoded - } -} +enum DeleteSuggesterOutputError { -enum DeleteSuggesterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeAnalysisSchemesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case analysisSchemeNames = "AnalysisSchemeNames" + case deployed = "Deployed" + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let analysisSchemeNames = analysisSchemeNames { @@ -1992,55 +1708,15 @@ public struct DescribeAnalysisSchemesInput: Swift.Equatable { } } -struct DescribeAnalysisSchemesInputBody: Swift.Equatable { - let domainName: Swift.String? - let analysisSchemeNames: [Swift.String]? - let deployed: Swift.Bool? -} - -extension DescribeAnalysisSchemesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisSchemeNames = "AnalysisSchemeNames" - case deployed = "Deployed" - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - if containerValues.contains(.analysisSchemeNames) { - struct KeyVal0{struct member{}} - let analysisSchemeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .analysisSchemeNames) - if let analysisSchemeNamesWrappedContainer = analysisSchemeNamesWrappedContainer { - let analysisSchemeNamesContainer = try analysisSchemeNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var analysisSchemeNamesBuffer:[Swift.String]? = nil - if let analysisSchemeNamesContainer = analysisSchemeNamesContainer { - analysisSchemeNamesBuffer = [Swift.String]() - for stringContainer0 in analysisSchemeNamesContainer { - analysisSchemeNamesBuffer?.append(stringContainer0) - } - } - analysisSchemeNames = analysisSchemeNamesBuffer - } else { - analysisSchemeNames = [] - } - } else { - analysisSchemeNames = nil - } - let deployedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deployed) - deployed = deployedDecoded - } -} +extension DescribeAnalysisSchemesOutput { -extension DescribeAnalysisSchemesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAnalysisSchemesOutputBody = try responseDecoder.decode(responseBody: data) - self.analysisSchemes = output.analysisSchemes - } else { - self.analysisSchemes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAnalysisSchemesResult"] + var value = DescribeAnalysisSchemesOutput() + value.analysisSchemes = try reader["AnalysisSchemes"].readListIfPresent(memberReadingClosure: CloudSearchClientTypes.AnalysisSchemeStatus.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2059,53 +1735,31 @@ public struct DescribeAnalysisSchemesOutput: Swift.Equatable { } } -struct DescribeAnalysisSchemesOutputBody: Swift.Equatable { - let analysisSchemes: [CloudSearchClientTypes.AnalysisSchemeStatus]? -} +enum DescribeAnalysisSchemesOutputError { -extension DescribeAnalysisSchemesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisSchemes = "AnalysisSchemes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAnalysisSchemesResult")) - if containerValues.contains(.analysisSchemes) { - struct KeyVal0{struct member{}} - let analysisSchemesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .analysisSchemes) - if let analysisSchemesWrappedContainer = analysisSchemesWrappedContainer { - let analysisSchemesContainer = try analysisSchemesWrappedContainer.decodeIfPresent([CloudSearchClientTypes.AnalysisSchemeStatus].self, forKey: .member) - var analysisSchemesBuffer:[CloudSearchClientTypes.AnalysisSchemeStatus]? = nil - if let analysisSchemesContainer = analysisSchemesContainer { - analysisSchemesBuffer = [CloudSearchClientTypes.AnalysisSchemeStatus]() - for structureContainer0 in analysisSchemesContainer { - analysisSchemesBuffer?.append(structureContainer0) - } - } - analysisSchemes = analysisSchemesBuffer - } else { - analysisSchemes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - analysisSchemes = nil } } } -enum DescribeAnalysisSchemesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeAvailabilityOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deployed = "Deployed" + case domainName = "DomainName" } -} -extension DescribeAvailabilityOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deployed = deployed { @@ -2144,34 +1798,15 @@ public struct DescribeAvailabilityOptionsInput: Swift.Equatable { } } -struct DescribeAvailabilityOptionsInputBody: Swift.Equatable { - let domainName: Swift.String? - let deployed: Swift.Bool? -} - -extension DescribeAvailabilityOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deployed = "Deployed" - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let deployedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deployed) - deployed = deployedDecoded - } -} +extension DescribeAvailabilityOptionsOutput { -extension DescribeAvailabilityOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAvailabilityOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.availabilityOptions = output.availabilityOptions - } else { - self.availabilityOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAvailabilityOptionsResult"] + var value = DescribeAvailabilityOptionsOutput() + value.availabilityOptions = try reader["AvailabilityOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.AvailabilityOptionsStatus.readingClosure) + return value } } } @@ -2189,39 +1824,34 @@ public struct DescribeAvailabilityOptionsOutput: Swift.Equatable { } } -struct DescribeAvailabilityOptionsOutputBody: Swift.Equatable { - let availabilityOptions: CloudSearchClientTypes.AvailabilityOptionsStatus? -} - -extension DescribeAvailabilityOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityOptions = "AvailabilityOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAvailabilityOptionsResult")) - let availabilityOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AvailabilityOptionsStatus.self, forKey: .availabilityOptions) - availabilityOptions = availabilityOptionsDecoded - } -} - -enum DescribeAvailabilityOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DisabledAction": return try await DisabledOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DescribeAvailabilityOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DisabledAction": return try await DisabledOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeDomainEndpointOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deployed = "Deployed" + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deployed = deployed { @@ -2260,34 +1890,15 @@ public struct DescribeDomainEndpointOptionsInput: Swift.Equatable { } } -struct DescribeDomainEndpointOptionsInputBody: Swift.Equatable { - let domainName: Swift.String? - let deployed: Swift.Bool? -} - -extension DescribeDomainEndpointOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deployed = "Deployed" - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let deployedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deployed) - deployed = deployedDecoded - } -} +extension DescribeDomainEndpointOptionsOutput { -extension DescribeDomainEndpointOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDomainEndpointOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.domainEndpointOptions = output.domainEndpointOptions - } else { - self.domainEndpointOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDomainEndpointOptionsResult"] + var value = DescribeDomainEndpointOptionsOutput() + value.domainEndpointOptions = try reader["DomainEndpointOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.DomainEndpointOptionsStatus.readingClosure) + return value } } } @@ -2305,38 +1916,32 @@ public struct DescribeDomainEndpointOptionsOutput: Swift.Equatable { } } -struct DescribeDomainEndpointOptionsOutputBody: Swift.Equatable { - let domainEndpointOptions: CloudSearchClientTypes.DomainEndpointOptionsStatus? -} - -extension DescribeDomainEndpointOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainEndpointOptions = "DomainEndpointOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDomainEndpointOptionsResult")) - let domainEndpointOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DomainEndpointOptionsStatus.self, forKey: .domainEndpointOptions) - domainEndpointOptions = domainEndpointOptionsDecoded - } -} +enum DescribeDomainEndpointOptionsOutputError { -enum DescribeDomainEndpointOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DisabledAction": return try await DisabledOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DisabledAction": return try await DisabledOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeDomainsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainNames = "DomainNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainNames = domainNames { @@ -2376,47 +1981,15 @@ public struct DescribeDomainsInput: Swift.Equatable { } } -struct DescribeDomainsInputBody: Swift.Equatable { - let domainNames: [Swift.String]? -} +extension DescribeDomainsOutput { -extension DescribeDomainsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainNames = "DomainNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.domainNames) { - struct KeyVal0{struct member{}} - let domainNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainNames) - if let domainNamesWrappedContainer = domainNamesWrappedContainer { - let domainNamesContainer = try domainNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var domainNamesBuffer:[Swift.String]? = nil - if let domainNamesContainer = domainNamesContainer { - domainNamesBuffer = [Swift.String]() - for stringContainer0 in domainNamesContainer { - domainNamesBuffer?.append(stringContainer0) - } - } - domainNames = domainNamesBuffer - } else { - domainNames = [] - } - } else { - domainNames = nil - } - } -} - -extension DescribeDomainsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDomainsOutputBody = try responseDecoder.decode(responseBody: data) - self.domainStatusList = output.domainStatusList - } else { - self.domainStatusList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDomainsResult"] + var value = DescribeDomainsOutput() + value.domainStatusList = try reader["DomainStatusList"].readListIfPresent(memberReadingClosure: CloudSearchClientTypes.DomainStatus.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2435,52 +2008,31 @@ public struct DescribeDomainsOutput: Swift.Equatable { } } -struct DescribeDomainsOutputBody: Swift.Equatable { - let domainStatusList: [CloudSearchClientTypes.DomainStatus]? -} +enum DescribeDomainsOutputError { -extension DescribeDomainsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainStatusList = "DomainStatusList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDomainsResult")) - if containerValues.contains(.domainStatusList) { - struct KeyVal0{struct member{}} - let domainStatusListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainStatusList) - if let domainStatusListWrappedContainer = domainStatusListWrappedContainer { - let domainStatusListContainer = try domainStatusListWrappedContainer.decodeIfPresent([CloudSearchClientTypes.DomainStatus].self, forKey: .member) - var domainStatusListBuffer:[CloudSearchClientTypes.DomainStatus]? = nil - if let domainStatusListContainer = domainStatusListContainer { - domainStatusListBuffer = [CloudSearchClientTypes.DomainStatus]() - for structureContainer0 in domainStatusListContainer { - domainStatusListBuffer?.append(structureContainer0) - } - } - domainStatusList = domainStatusListBuffer - } else { - domainStatusList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - domainStatusList = nil } } } -enum DescribeDomainsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeExpressionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deployed = "Deployed" + case domainName = "DomainName" + case expressionNames = "ExpressionNames" } -} -extension DescribeExpressionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deployed = deployed { @@ -2535,55 +2087,15 @@ public struct DescribeExpressionsInput: Swift.Equatable { } } -struct DescribeExpressionsInputBody: Swift.Equatable { - let domainName: Swift.String? - let expressionNames: [Swift.String]? - let deployed: Swift.Bool? -} - -extension DescribeExpressionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deployed = "Deployed" - case domainName = "DomainName" - case expressionNames = "ExpressionNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - if containerValues.contains(.expressionNames) { - struct KeyVal0{struct member{}} - let expressionNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .expressionNames) - if let expressionNamesWrappedContainer = expressionNamesWrappedContainer { - let expressionNamesContainer = try expressionNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var expressionNamesBuffer:[Swift.String]? = nil - if let expressionNamesContainer = expressionNamesContainer { - expressionNamesBuffer = [Swift.String]() - for stringContainer0 in expressionNamesContainer { - expressionNamesBuffer?.append(stringContainer0) - } - } - expressionNames = expressionNamesBuffer - } else { - expressionNames = [] - } - } else { - expressionNames = nil - } - let deployedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deployed) - deployed = deployedDecoded - } -} +extension DescribeExpressionsOutput { -extension DescribeExpressionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeExpressionsOutputBody = try responseDecoder.decode(responseBody: data) - self.expressions = output.expressions - } else { - self.expressions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeExpressionsResult"] + var value = DescribeExpressionsOutput() + value.expressions = try reader["Expressions"].readListIfPresent(memberReadingClosure: CloudSearchClientTypes.ExpressionStatus.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2602,53 +2114,32 @@ public struct DescribeExpressionsOutput: Swift.Equatable { } } -struct DescribeExpressionsOutputBody: Swift.Equatable { - let expressions: [CloudSearchClientTypes.ExpressionStatus]? -} +enum DescribeExpressionsOutputError { -extension DescribeExpressionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case expressions = "Expressions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeExpressionsResult")) - if containerValues.contains(.expressions) { - struct KeyVal0{struct member{}} - let expressionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .expressions) - if let expressionsWrappedContainer = expressionsWrappedContainer { - let expressionsContainer = try expressionsWrappedContainer.decodeIfPresent([CloudSearchClientTypes.ExpressionStatus].self, forKey: .member) - var expressionsBuffer:[CloudSearchClientTypes.ExpressionStatus]? = nil - if let expressionsContainer = expressionsContainer { - expressionsBuffer = [CloudSearchClientTypes.ExpressionStatus]() - for structureContainer0 in expressionsContainer { - expressionsBuffer?.append(structureContainer0) - } - } - expressions = expressionsBuffer - } else { - expressions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - expressions = nil } } } -enum DescribeExpressionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeIndexFieldsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deployed = "Deployed" + case domainName = "DomainName" + case fieldNames = "FieldNames" } -} -extension DescribeIndexFieldsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deployed = deployed { @@ -2703,55 +2194,15 @@ public struct DescribeIndexFieldsInput: Swift.Equatable { } } -struct DescribeIndexFieldsInputBody: Swift.Equatable { - let domainName: Swift.String? - let fieldNames: [Swift.String]? - let deployed: Swift.Bool? -} - -extension DescribeIndexFieldsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deployed = "Deployed" - case domainName = "DomainName" - case fieldNames = "FieldNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - if containerValues.contains(.fieldNames) { - struct KeyVal0{struct member{}} - let fieldNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fieldNames) - if let fieldNamesWrappedContainer = fieldNamesWrappedContainer { - let fieldNamesContainer = try fieldNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fieldNamesBuffer:[Swift.String]? = nil - if let fieldNamesContainer = fieldNamesContainer { - fieldNamesBuffer = [Swift.String]() - for stringContainer0 in fieldNamesContainer { - fieldNamesBuffer?.append(stringContainer0) - } - } - fieldNames = fieldNamesBuffer - } else { - fieldNames = [] - } - } else { - fieldNames = nil - } - let deployedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deployed) - deployed = deployedDecoded - } -} +extension DescribeIndexFieldsOutput { -extension DescribeIndexFieldsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIndexFieldsOutputBody = try responseDecoder.decode(responseBody: data) - self.indexFields = output.indexFields - } else { - self.indexFields = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeIndexFieldsResult"] + var value = DescribeIndexFieldsOutput() + value.indexFields = try reader["IndexFields"].readListIfPresent(memberReadingClosure: CloudSearchClientTypes.IndexFieldStatus.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2770,53 +2221,30 @@ public struct DescribeIndexFieldsOutput: Swift.Equatable { } } -struct DescribeIndexFieldsOutputBody: Swift.Equatable { - let indexFields: [CloudSearchClientTypes.IndexFieldStatus]? -} +enum DescribeIndexFieldsOutputError { -extension DescribeIndexFieldsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case indexFields = "IndexFields" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeIndexFieldsResult")) - if containerValues.contains(.indexFields) { - struct KeyVal0{struct member{}} - let indexFieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .indexFields) - if let indexFieldsWrappedContainer = indexFieldsWrappedContainer { - let indexFieldsContainer = try indexFieldsWrappedContainer.decodeIfPresent([CloudSearchClientTypes.IndexFieldStatus].self, forKey: .member) - var indexFieldsBuffer:[CloudSearchClientTypes.IndexFieldStatus]? = nil - if let indexFieldsContainer = indexFieldsContainer { - indexFieldsBuffer = [CloudSearchClientTypes.IndexFieldStatus]() - for structureContainer0 in indexFieldsContainer { - indexFieldsBuffer?.append(structureContainer0) - } - } - indexFields = indexFieldsBuffer - } else { - indexFields = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - indexFields = nil } } } -enum DescribeIndexFieldsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeScalingParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" } -} -extension DescribeScalingParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -2848,30 +2276,15 @@ public struct DescribeScalingParametersInput: Swift.Equatable { } } -struct DescribeScalingParametersInputBody: Swift.Equatable { - let domainName: Swift.String? -} - -extension DescribeScalingParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - } -} +extension DescribeScalingParametersOutput { -extension DescribeScalingParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeScalingParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.scalingParameters = output.scalingParameters - } else { - self.scalingParameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeScalingParametersResult"] + var value = DescribeScalingParametersOutput() + value.scalingParameters = try reader["ScalingParameters"].readIfPresent(readingClosure: CloudSearchClientTypes.ScalingParametersStatus.readingClosure) + return value } } } @@ -2890,36 +2303,31 @@ public struct DescribeScalingParametersOutput: Swift.Equatable { } } -struct DescribeScalingParametersOutputBody: Swift.Equatable { - let scalingParameters: CloudSearchClientTypes.ScalingParametersStatus? -} - -extension DescribeScalingParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case scalingParameters = "ScalingParameters" - } +enum DescribeScalingParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeScalingParametersResult")) - let scalingParametersDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.ScalingParametersStatus.self, forKey: .scalingParameters) - scalingParameters = scalingParametersDecoded - } -} - -enum DescribeScalingParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeServiceAccessPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deployed = "Deployed" + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deployed = deployed { @@ -2958,34 +2366,15 @@ public struct DescribeServiceAccessPoliciesInput: Swift.Equatable { } } -struct DescribeServiceAccessPoliciesInputBody: Swift.Equatable { - let domainName: Swift.String? - let deployed: Swift.Bool? -} - -extension DescribeServiceAccessPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deployed = "Deployed" - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let deployedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deployed) - deployed = deployedDecoded - } -} +extension DescribeServiceAccessPoliciesOutput { -extension DescribeServiceAccessPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeServiceAccessPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.accessPolicies = output.accessPolicies - } else { - self.accessPolicies = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeServiceAccessPoliciesResult"] + var value = DescribeServiceAccessPoliciesOutput() + value.accessPolicies = try reader["AccessPolicies"].readIfPresent(readingClosure: CloudSearchClientTypes.AccessPoliciesStatus.readingClosure) + return value } } } @@ -2996,44 +2385,40 @@ public struct DescribeServiceAccessPoliciesOutput: Swift.Equatable { /// This member is required. public var accessPolicies: CloudSearchClientTypes.AccessPoliciesStatus? - public init( - accessPolicies: CloudSearchClientTypes.AccessPoliciesStatus? = nil - ) - { - self.accessPolicies = accessPolicies - } -} - -struct DescribeServiceAccessPoliciesOutputBody: Swift.Equatable { - let accessPolicies: CloudSearchClientTypes.AccessPoliciesStatus? -} - -extension DescribeServiceAccessPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPolicies = "AccessPolicies" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeServiceAccessPoliciesResult")) - let accessPoliciesDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AccessPoliciesStatus.self, forKey: .accessPolicies) - accessPolicies = accessPoliciesDecoded + public init( + accessPolicies: CloudSearchClientTypes.AccessPoliciesStatus? = nil + ) + { + self.accessPolicies = accessPolicies } } -enum DescribeServiceAccessPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DescribeServiceAccessPoliciesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeSuggestersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deployed = "Deployed" + case domainName = "DomainName" + case suggesterNames = "SuggesterNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deployed = deployed { @@ -3088,55 +2473,15 @@ public struct DescribeSuggestersInput: Swift.Equatable { } } -struct DescribeSuggestersInputBody: Swift.Equatable { - let domainName: Swift.String? - let suggesterNames: [Swift.String]? - let deployed: Swift.Bool? -} - -extension DescribeSuggestersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deployed = "Deployed" - case domainName = "DomainName" - case suggesterNames = "SuggesterNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - if containerValues.contains(.suggesterNames) { - struct KeyVal0{struct member{}} - let suggesterNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .suggesterNames) - if let suggesterNamesWrappedContainer = suggesterNamesWrappedContainer { - let suggesterNamesContainer = try suggesterNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var suggesterNamesBuffer:[Swift.String]? = nil - if let suggesterNamesContainer = suggesterNamesContainer { - suggesterNamesBuffer = [Swift.String]() - for stringContainer0 in suggesterNamesContainer { - suggesterNamesBuffer?.append(stringContainer0) - } - } - suggesterNames = suggesterNamesBuffer - } else { - suggesterNames = [] - } - } else { - suggesterNames = nil - } - let deployedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deployed) - deployed = deployedDecoded - } -} +extension DescribeSuggestersOutput { -extension DescribeSuggestersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSuggestersOutputBody = try responseDecoder.decode(responseBody: data) - self.suggesters = output.suggesters - } else { - self.suggesters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeSuggestersResult"] + var value = DescribeSuggestersOutput() + value.suggesters = try reader["Suggesters"].readListIfPresent(memberReadingClosure: CloudSearchClientTypes.SuggesterStatus.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3155,65 +2500,35 @@ public struct DescribeSuggestersOutput: Swift.Equatable { } } -struct DescribeSuggestersOutputBody: Swift.Equatable { - let suggesters: [CloudSearchClientTypes.SuggesterStatus]? -} +enum DescribeSuggestersOutputError { -extension DescribeSuggestersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case suggesters = "Suggesters" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeSuggestersResult")) - if containerValues.contains(.suggesters) { - struct KeyVal0{struct member{}} - let suggestersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .suggesters) - if let suggestersWrappedContainer = suggestersWrappedContainer { - let suggestersContainer = try suggestersWrappedContainer.decodeIfPresent([CloudSearchClientTypes.SuggesterStatus].self, forKey: .member) - var suggestersBuffer:[CloudSearchClientTypes.SuggesterStatus]? = nil - if let suggestersContainer = suggestersContainer { - suggestersBuffer = [CloudSearchClientTypes.SuggesterStatus]() - for structureContainer0 in suggestersContainer { - suggestersBuffer?.append(structureContainer0) - } - } - suggesters = suggestersBuffer - } else { - suggesters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - suggesters = nil - } - } -} - -enum DescribeSuggestersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DisabledOperationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.code = output.error.code - self.properties.message = output.error.message - } else { - self.properties.code = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DisabledOperationException() + value.properties.code = try reader["Code"].readIfPresent() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3246,27 +2561,7 @@ public struct DisabledOperationException: ClientRuntime.ModeledError, AWSClientR } } -struct DisabledOperationExceptionBody: Swift.Equatable { - let code: Swift.String? - let message: Swift.String? -} - -extension DisabledOperationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudSearchClientTypes.DocumentSuggesterOptions: Swift.Codable { +extension CloudSearchClientTypes.DocumentSuggesterOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case fuzzyMatching = "FuzzyMatching" case sortExpression = "SortExpression" @@ -3286,14 +2581,15 @@ extension CloudSearchClientTypes.DocumentSuggesterOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceField) - sourceField = sourceFieldDecoded - let fuzzyMatchingDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.SuggesterFuzzyMatching.self, forKey: .fuzzyMatching) - fuzzyMatching = fuzzyMatchingDecoded - let sortExpressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sortExpression) - sortExpression = sortExpressionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.DocumentSuggesterOptions() + value.sourceField = try reader["SourceField"].readIfPresent() + value.fuzzyMatching = try reader["FuzzyMatching"].readIfPresent() + value.sortExpression = try reader["SortExpression"].readIfPresent() + return value + } } } @@ -3322,7 +2618,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.DomainEndpointOptions: Swift.Codable { +extension CloudSearchClientTypes.DomainEndpointOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case enforceHTTPS = "EnforceHTTPS" case tlsSecurityPolicy = "TLSSecurityPolicy" @@ -3338,12 +2634,14 @@ extension CloudSearchClientTypes.DomainEndpointOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enforceHTTPSDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enforceHTTPS) - enforceHTTPS = enforceHTTPSDecoded - let tlsSecurityPolicyDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.TLSSecurityPolicy.self, forKey: .tlsSecurityPolicy) - tlsSecurityPolicy = tlsSecurityPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.DomainEndpointOptions() + value.enforceHTTPS = try reader["EnforceHTTPS"].readIfPresent() + value.tlsSecurityPolicy = try reader["TLSSecurityPolicy"].readIfPresent() + return value + } } } @@ -3367,7 +2665,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.DomainEndpointOptionsStatus: Swift.Codable { +extension CloudSearchClientTypes.DomainEndpointOptionsStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case options = "Options" case status = "Status" @@ -3383,12 +2681,14 @@ extension CloudSearchClientTypes.DomainEndpointOptionsStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DomainEndpointOptions.self, forKey: .options) - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.DomainEndpointOptionsStatus() + value.options = try reader["Options"].readIfPresent(readingClosure: CloudSearchClientTypes.DomainEndpointOptions.readingClosure) + value.status = try reader["Status"].readIfPresent(readingClosure: CloudSearchClientTypes.OptionStatus.readingClosure) + return value + } } } @@ -3414,7 +2714,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.DomainStatus: Swift.Codable { +extension CloudSearchClientTypes.DomainStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case created = "Created" @@ -3474,34 +2774,25 @@ extension CloudSearchClientTypes.DomainStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainId) - domainId = domainIdDecoded - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let createdDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .created) - created = createdDecoded - let deletedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleted) - deleted = deletedDecoded - let docServiceDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.ServiceEndpoint.self, forKey: .docService) - docService = docServiceDecoded - let searchServiceDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.ServiceEndpoint.self, forKey: .searchService) - searchService = searchServiceDecoded - let requiresIndexDocumentsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requiresIndexDocuments) - requiresIndexDocuments = requiresIndexDocumentsDecoded - let processingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .processing) - processing = processingDecoded - let searchInstanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .searchInstanceType) - searchInstanceType = searchInstanceTypeDecoded - let searchPartitionCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .searchPartitionCount) - searchPartitionCount = searchPartitionCountDecoded - let searchInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .searchInstanceCount) - searchInstanceCount = searchInstanceCountDecoded - let limitsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.Limits.self, forKey: .limits) - limits = limitsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.DomainStatus() + value.domainId = try reader["DomainId"].readIfPresent() + value.domainName = try reader["DomainName"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.created = try reader["Created"].readIfPresent() + value.deleted = try reader["Deleted"].readIfPresent() + value.docService = try reader["DocService"].readIfPresent(readingClosure: CloudSearchClientTypes.ServiceEndpoint.readingClosure) + value.searchService = try reader["SearchService"].readIfPresent(readingClosure: CloudSearchClientTypes.ServiceEndpoint.readingClosure) + value.requiresIndexDocuments = try reader["RequiresIndexDocuments"].readIfPresent() + value.processing = try reader["Processing"].readIfPresent() + value.searchInstanceType = try reader["SearchInstanceType"].readIfPresent() + value.searchPartitionCount = try reader["SearchPartitionCount"].readIfPresent() + value.searchInstanceCount = try reader["SearchInstanceCount"].readIfPresent() + value.limits = try reader["Limits"].readIfPresent(readingClosure: CloudSearchClientTypes.Limits.readingClosure) + return value + } } } @@ -3571,7 +2862,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.DoubleArrayOptions: Swift.Codable { +extension CloudSearchClientTypes.DoubleArrayOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -3599,18 +2890,17 @@ extension CloudSearchClientTypes.DoubleArrayOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceFields) - sourceFields = sourceFieldsDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.DoubleArrayOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceFields = try reader["SourceFields"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + return value + } } } @@ -3646,7 +2936,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.DoubleOptions: Swift.Codable { +extension CloudSearchClientTypes.DoubleOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -3678,20 +2968,18 @@ extension CloudSearchClientTypes.DoubleOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceField) - sourceField = sourceFieldDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded - let sortEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sortEnabled) - sortEnabled = sortEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.DoubleOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceField = try reader["SourceField"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + value.sortEnabled = try reader["SortEnabled"].readIfPresent() + return value + } } } @@ -3731,7 +3019,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.Expression: Swift.Codable { +extension CloudSearchClientTypes.Expression: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case expressionName = "ExpressionName" case expressionValue = "ExpressionValue" @@ -3747,12 +3035,14 @@ extension CloudSearchClientTypes.Expression: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let expressionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expressionName) - expressionName = expressionNameDecoded - let expressionValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expressionValue) - expressionValue = expressionValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.Expression() + value.expressionName = try reader["ExpressionName"].readIfPresent() + value.expressionValue = try reader["ExpressionValue"].readIfPresent() + return value + } } } @@ -3778,7 +3068,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.ExpressionStatus: Swift.Codable { +extension CloudSearchClientTypes.ExpressionStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case options = "Options" case status = "Status" @@ -3794,12 +3084,14 @@ extension CloudSearchClientTypes.ExpressionStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.Expression.self, forKey: .options) - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.ExpressionStatus() + value.options = try reader["Options"].readIfPresent(readingClosure: CloudSearchClientTypes.Expression.readingClosure) + value.status = try reader["Status"].readIfPresent(readingClosure: CloudSearchClientTypes.OptionStatus.readingClosure) + return value + } } } @@ -3826,6 +3118,10 @@ extension CloudSearchClientTypes { } extension IndexDocumentsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -3857,30 +3153,15 @@ public struct IndexDocumentsInput: Swift.Equatable { } } -struct IndexDocumentsInputBody: Swift.Equatable { - let domainName: Swift.String? -} - -extension IndexDocumentsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - } -} +extension IndexDocumentsOutput { -extension IndexDocumentsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: IndexDocumentsOutputBody = try responseDecoder.decode(responseBody: data) - self.fieldNames = output.fieldNames - } else { - self.fieldNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["IndexDocumentsResult"] + var value = IndexDocumentsOutput() + value.fieldNames = try reader["FieldNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3898,54 +3179,27 @@ public struct IndexDocumentsOutput: Swift.Equatable { } } -struct IndexDocumentsOutputBody: Swift.Equatable { - let fieldNames: [Swift.String]? -} - -extension IndexDocumentsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldNames = "FieldNames" - } +enum IndexDocumentsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("IndexDocumentsResult")) - if containerValues.contains(.fieldNames) { - struct KeyVal0{struct member{}} - let fieldNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fieldNames) - if let fieldNamesWrappedContainer = fieldNamesWrappedContainer { - let fieldNamesContainer = try fieldNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fieldNamesBuffer:[Swift.String]? = nil - if let fieldNamesContainer = fieldNamesContainer { - fieldNamesBuffer = [Swift.String]() - for stringContainer0 in fieldNamesContainer { - fieldNamesBuffer?.append(stringContainer0) - } - } - fieldNames = fieldNamesBuffer - } else { - fieldNames = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - fieldNames = nil - } - } -} - -enum IndexDocumentsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension CloudSearchClientTypes.IndexField: Swift.Codable { +extension CloudSearchClientTypes.IndexField: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dateArrayOptions = "DateArrayOptions" case dateOptions = "DateOptions" @@ -4005,34 +3259,25 @@ extension CloudSearchClientTypes.IndexField: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let indexFieldNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .indexFieldName) - indexFieldName = indexFieldNameDecoded - let indexFieldTypeDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.IndexFieldType.self, forKey: .indexFieldType) - indexFieldType = indexFieldTypeDecoded - let intOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.IntOptions.self, forKey: .intOptions) - intOptions = intOptionsDecoded - let doubleOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DoubleOptions.self, forKey: .doubleOptions) - doubleOptions = doubleOptionsDecoded - let literalOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.LiteralOptions.self, forKey: .literalOptions) - literalOptions = literalOptionsDecoded - let textOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.TextOptions.self, forKey: .textOptions) - textOptions = textOptionsDecoded - let dateOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DateOptions.self, forKey: .dateOptions) - dateOptions = dateOptionsDecoded - let latLonOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.LatLonOptions.self, forKey: .latLonOptions) - latLonOptions = latLonOptionsDecoded - let intArrayOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.IntArrayOptions.self, forKey: .intArrayOptions) - intArrayOptions = intArrayOptionsDecoded - let doubleArrayOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DoubleArrayOptions.self, forKey: .doubleArrayOptions) - doubleArrayOptions = doubleArrayOptionsDecoded - let literalArrayOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.LiteralArrayOptions.self, forKey: .literalArrayOptions) - literalArrayOptions = literalArrayOptionsDecoded - let textArrayOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.TextArrayOptions.self, forKey: .textArrayOptions) - textArrayOptions = textArrayOptionsDecoded - let dateArrayOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DateArrayOptions.self, forKey: .dateArrayOptions) - dateArrayOptions = dateArrayOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.IndexField() + value.indexFieldName = try reader["IndexFieldName"].readIfPresent() + value.indexFieldType = try reader["IndexFieldType"].readIfPresent() + value.intOptions = try reader["IntOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.IntOptions.readingClosure) + value.doubleOptions = try reader["DoubleOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.DoubleOptions.readingClosure) + value.literalOptions = try reader["LiteralOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.LiteralOptions.readingClosure) + value.textOptions = try reader["TextOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.TextOptions.readingClosure) + value.dateOptions = try reader["DateOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.DateOptions.readingClosure) + value.latLonOptions = try reader["LatLonOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.LatLonOptions.readingClosure) + value.intArrayOptions = try reader["IntArrayOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.IntArrayOptions.readingClosure) + value.doubleArrayOptions = try reader["DoubleArrayOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.DoubleArrayOptions.readingClosure) + value.literalArrayOptions = try reader["LiteralArrayOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.LiteralArrayOptions.readingClosure) + value.textArrayOptions = try reader["TextArrayOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.TextArrayOptions.readingClosure) + value.dateArrayOptions = try reader["DateArrayOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.DateArrayOptions.readingClosure) + return value + } } } @@ -4102,7 +3347,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.IndexFieldStatus: Swift.Codable { +extension CloudSearchClientTypes.IndexFieldStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case options = "Options" case status = "Status" @@ -4118,12 +3363,14 @@ extension CloudSearchClientTypes.IndexFieldStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.IndexField.self, forKey: .options) - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.IndexFieldStatus() + value.options = try reader["Options"].readIfPresent(readingClosure: CloudSearchClientTypes.IndexField.readingClosure) + value.status = try reader["Status"].readIfPresent(readingClosure: CloudSearchClientTypes.OptionStatus.readingClosure) + return value + } } } @@ -4209,7 +3456,7 @@ extension CloudSearchClientTypes { } } -extension CloudSearchClientTypes.IntArrayOptions: Swift.Codable { +extension CloudSearchClientTypes.IntArrayOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -4237,18 +3484,17 @@ extension CloudSearchClientTypes.IntArrayOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceFields) - sourceFields = sourceFieldsDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.IntArrayOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceFields = try reader["SourceFields"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + return value + } } } @@ -4284,7 +3530,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.IntOptions: Swift.Codable { +extension CloudSearchClientTypes.IntOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -4316,20 +3562,18 @@ extension CloudSearchClientTypes.IntOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceField) - sourceField = sourceFieldDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded - let sortEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sortEnabled) - sortEnabled = sortEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.IntOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceField = try reader["SourceField"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + value.sortEnabled = try reader["SortEnabled"].readIfPresent() + return value + } } } @@ -4370,18 +3614,15 @@ extension CloudSearchClientTypes { } extension InternalException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.code = output.error.code - self.properties.message = output.error.message - } else { - self.properties.code = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InternalException() + value.properties.code = try reader["Code"].readIfPresent() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4414,39 +3655,16 @@ public struct InternalException: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct InternalExceptionBody: Swift.Equatable { - let code: Swift.String? - let message: Swift.String? -} - -extension InternalExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidTypeException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.code = output.error.code - self.properties.message = output.error.message - } else { - self.properties.code = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTypeException() + value.properties.code = try reader["Code"].readIfPresent() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4479,27 +3697,7 @@ public struct InvalidTypeException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct InvalidTypeExceptionBody: Swift.Equatable { - let code: Swift.String? - let message: Swift.String? -} - -extension InvalidTypeExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudSearchClientTypes.LatLonOptions: Swift.Codable { +extension CloudSearchClientTypes.LatLonOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -4531,20 +3729,18 @@ extension CloudSearchClientTypes.LatLonOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceField) - sourceField = sourceFieldDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded - let sortEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sortEnabled) - sortEnabled = sortEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.LatLonOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceField = try reader["SourceField"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + value.sortEnabled = try reader["SortEnabled"].readIfPresent() + return value + } } } @@ -4585,18 +3781,15 @@ extension CloudSearchClientTypes { } extension LimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.code = output.error.code - self.properties.message = output.error.message - } else { - self.properties.code = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitExceededException() + value.properties.code = try reader["Code"].readIfPresent() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4629,27 +3822,7 @@ public struct LimitExceededException: ClientRuntime.ModeledError, AWSClientRunti } } -struct LimitExceededExceptionBody: Swift.Equatable { - let code: Swift.String? - let message: Swift.String? -} - -extension LimitExceededExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudSearchClientTypes.Limits: Swift.Codable { +extension CloudSearchClientTypes.Limits: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maximumPartitionCount = "MaximumPartitionCount" case maximumReplicationCount = "MaximumReplicationCount" @@ -4665,12 +3838,14 @@ extension CloudSearchClientTypes.Limits: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maximumReplicationCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumReplicationCount) - maximumReplicationCount = maximumReplicationCountDecoded - let maximumPartitionCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumPartitionCount) - maximumPartitionCount = maximumPartitionCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.Limits() + value.maximumReplicationCount = try reader["MaximumReplicationCount"].readIfPresent() + value.maximumPartitionCount = try reader["MaximumPartitionCount"].readIfPresent() + return value + } } } @@ -4694,6 +3869,7 @@ extension CloudSearchClientTypes { } extension ListDomainNamesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("ListDomainNames", forKey:ClientRuntime.Key("Action")) @@ -4713,14 +3889,15 @@ public struct ListDomainNamesInput: Swift.Equatable { public init() { } } -extension ListDomainNamesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListDomainNamesOutputBody = try responseDecoder.decode(responseBody: data) - self.domainNames = output.domainNames - } else { - self.domainNames = nil +extension ListDomainNamesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListDomainNamesResult"] + var value = ListDomainNamesOutput() + value.domainNames = try reader["DomainNames"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -4738,51 +3915,24 @@ public struct ListDomainNamesOutput: Swift.Equatable { } } -struct ListDomainNamesOutputBody: Swift.Equatable { - let domainNames: [Swift.String:Swift.String]? -} - -extension ListDomainNamesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainNames = "DomainNames" - } +enum ListDomainNamesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListDomainNamesResult")) - if containerValues.contains(.domainNames) { - struct KeyVal0{struct key{}; struct value{}} - let domainNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .domainNames) - if let domainNamesWrappedContainer = domainNamesWrappedContainer { - let domainNamesContainer = try domainNamesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var domainNamesBuffer: [Swift.String:Swift.String]? = nil - if let domainNamesContainer = domainNamesContainer { - domainNamesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in domainNamesContainer { - domainNamesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - domainNames = domainNamesBuffer - } else { - domainNames = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - domainNames = nil - } - } -} - -enum ListDomainNamesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension CloudSearchClientTypes.LiteralArrayOptions: Swift.Codable { +extension CloudSearchClientTypes.LiteralArrayOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -4810,18 +3960,17 @@ extension CloudSearchClientTypes.LiteralArrayOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceFields) - sourceFields = sourceFieldsDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.LiteralArrayOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceFields = try reader["SourceFields"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + return value + } } } @@ -4857,7 +4006,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.LiteralOptions: Swift.Codable { +extension CloudSearchClientTypes.LiteralOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultValue = "DefaultValue" case facetEnabled = "FacetEnabled" @@ -4889,20 +4038,18 @@ extension CloudSearchClientTypes.LiteralOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceField) - sourceField = sourceFieldDecoded - let facetEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .facetEnabled) - facetEnabled = facetEnabledDecoded - let searchEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .searchEnabled) - searchEnabled = searchEnabledDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded - let sortEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sortEnabled) - sortEnabled = sortEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.LiteralOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceField = try reader["SourceField"].readIfPresent() + value.facetEnabled = try reader["FacetEnabled"].readIfPresent() + value.searchEnabled = try reader["SearchEnabled"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + value.sortEnabled = try reader["SortEnabled"].readIfPresent() + return value + } } } @@ -4989,7 +4136,7 @@ extension CloudSearchClientTypes { } } -extension CloudSearchClientTypes.OptionStatus: Swift.Codable { +extension CloudSearchClientTypes.OptionStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case creationDate = "CreationDate" case pendingDeletion = "PendingDeletion" @@ -5017,18 +4164,17 @@ extension CloudSearchClientTypes.OptionStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let creationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationDate) - creationDate = creationDateDecoded - let updateDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateDate) - updateDate = updateDateDecoded - let updateVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .updateVersion) ?? 0 - updateVersion = updateVersionDecoded - let stateDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionState.self, forKey: .state) - state = stateDecoded - let pendingDeletionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .pendingDeletion) - pendingDeletion = pendingDeletionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.OptionStatus() + value.creationDate = try reader["CreationDate"].readTimestampIfPresent(format: .dateTime) + value.updateDate = try reader["UpdateDate"].readTimestampIfPresent(format: .dateTime) + value.updateVersion = try reader["UpdateVersion"].readIfPresent() ?? 0 + value.state = try reader["State"].readIfPresent() + value.pendingDeletion = try reader["PendingDeletion"].readIfPresent() + return value + } } } @@ -5154,18 +4300,15 @@ extension CloudSearchClientTypes { } extension ResourceAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.code = output.error.code - self.properties.message = output.error.message - } else { - self.properties.code = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceAlreadyExistsException() + value.properties.code = try reader["Code"].readIfPresent() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5198,39 +4341,16 @@ public struct ResourceAlreadyExistsException: ClientRuntime.ModeledError, AWSCli } } -struct ResourceAlreadyExistsExceptionBody: Swift.Equatable { - let code: Swift.String? - let message: Swift.String? -} - -extension ResourceAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ResourceNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.code = output.error.code - self.properties.message = output.error.message - } else { - self.properties.code = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFoundException() + value.properties.code = try reader["Code"].readIfPresent() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5263,27 +4383,7 @@ public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -struct ResourceNotFoundExceptionBody: Swift.Equatable { - let code: Swift.String? - let message: Swift.String? -} - -extension ResourceNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudSearchClientTypes.ScalingParameters: Swift.Codable { +extension CloudSearchClientTypes.ScalingParameters: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case desiredInstanceType = "DesiredInstanceType" case desiredPartitionCount = "DesiredPartitionCount" @@ -5303,14 +4403,15 @@ extension CloudSearchClientTypes.ScalingParameters: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let desiredInstanceTypeDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.PartitionInstanceType.self, forKey: .desiredInstanceType) - desiredInstanceType = desiredInstanceTypeDecoded - let desiredReplicationCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredReplicationCount) ?? 0 - desiredReplicationCount = desiredReplicationCountDecoded - let desiredPartitionCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .desiredPartitionCount) ?? 0 - desiredPartitionCount = desiredPartitionCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.ScalingParameters() + value.desiredInstanceType = try reader["DesiredInstanceType"].readIfPresent() + value.desiredReplicationCount = try reader["DesiredReplicationCount"].readIfPresent() ?? 0 + value.desiredPartitionCount = try reader["DesiredPartitionCount"].readIfPresent() ?? 0 + return value + } } } @@ -5338,7 +4439,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.ScalingParametersStatus: Swift.Codable { +extension CloudSearchClientTypes.ScalingParametersStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case options = "Options" case status = "Status" @@ -5354,12 +4455,14 @@ extension CloudSearchClientTypes.ScalingParametersStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.ScalingParameters.self, forKey: .options) - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.ScalingParametersStatus() + value.options = try reader["Options"].readIfPresent(readingClosure: CloudSearchClientTypes.ScalingParameters.readingClosure) + value.status = try reader["Status"].readIfPresent(readingClosure: CloudSearchClientTypes.OptionStatus.readingClosure) + return value + } } } @@ -5385,7 +4488,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.ServiceEndpoint: Swift.Codable { +extension CloudSearchClientTypes.ServiceEndpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case endpoint = "Endpoint" } @@ -5397,10 +4500,13 @@ extension CloudSearchClientTypes.ServiceEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.ServiceEndpoint() + value.endpoint = try reader["Endpoint"].readIfPresent() + return value + } } } @@ -5420,7 +4526,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.Suggester: Swift.Codable { +extension CloudSearchClientTypes.Suggester: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case documentSuggesterOptions = "DocumentSuggesterOptions" case suggesterName = "SuggesterName" @@ -5436,12 +4542,14 @@ extension CloudSearchClientTypes.Suggester: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let suggesterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .suggesterName) - suggesterName = suggesterNameDecoded - let documentSuggesterOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DocumentSuggesterOptions.self, forKey: .documentSuggesterOptions) - documentSuggesterOptions = documentSuggesterOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.Suggester() + value.suggesterName = try reader["SuggesterName"].readIfPresent() + value.documentSuggesterOptions = try reader["DocumentSuggesterOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.DocumentSuggesterOptions.readingClosure) + return value + } } } @@ -5502,7 +4610,7 @@ extension CloudSearchClientTypes { } } -extension CloudSearchClientTypes.SuggesterStatus: Swift.Codable { +extension CloudSearchClientTypes.SuggesterStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case options = "Options" case status = "Status" @@ -5518,12 +4626,14 @@ extension CloudSearchClientTypes.SuggesterStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.Suggester.self, forKey: .options) - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.OptionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.SuggesterStatus() + value.options = try reader["Options"].readIfPresent(readingClosure: CloudSearchClientTypes.Suggester.readingClosure) + value.status = try reader["Status"].readIfPresent(readingClosure: CloudSearchClientTypes.OptionStatus.readingClosure) + return value + } } } @@ -5582,7 +4692,7 @@ extension CloudSearchClientTypes { } } -extension CloudSearchClientTypes.TextArrayOptions: Swift.Codable { +extension CloudSearchClientTypes.TextArrayOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case analysisScheme = "AnalysisScheme" case defaultValue = "DefaultValue" @@ -5610,18 +4720,17 @@ extension CloudSearchClientTypes.TextArrayOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceFields) - sourceFields = sourceFieldsDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded - let highlightEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .highlightEnabled) - highlightEnabled = highlightEnabledDecoded - let analysisSchemeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .analysisScheme) - analysisScheme = analysisSchemeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.TextArrayOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceFields = try reader["SourceFields"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + value.highlightEnabled = try reader["HighlightEnabled"].readIfPresent() + value.analysisScheme = try reader["AnalysisScheme"].readIfPresent() + return value + } } } @@ -5657,7 +4766,7 @@ extension CloudSearchClientTypes { } -extension CloudSearchClientTypes.TextOptions: Swift.Codable { +extension CloudSearchClientTypes.TextOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case analysisScheme = "AnalysisScheme" case defaultValue = "DefaultValue" @@ -5689,20 +4798,18 @@ extension CloudSearchClientTypes.TextOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let sourceFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceField) - sourceField = sourceFieldDecoded - let returnEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnEnabled) - returnEnabled = returnEnabledDecoded - let sortEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sortEnabled) - sortEnabled = sortEnabledDecoded - let highlightEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .highlightEnabled) - highlightEnabled = highlightEnabledDecoded - let analysisSchemeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .analysisScheme) - analysisScheme = analysisSchemeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudSearchClientTypes.TextOptions() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.sourceField = try reader["SourceField"].readIfPresent() + value.returnEnabled = try reader["ReturnEnabled"].readIfPresent() + value.sortEnabled = try reader["SortEnabled"].readIfPresent() + value.highlightEnabled = try reader["HighlightEnabled"].readIfPresent() + value.analysisScheme = try reader["AnalysisScheme"].readIfPresent() + return value + } } } @@ -5743,6 +4850,11 @@ extension CloudSearchClientTypes { } extension UpdateAvailabilityOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + case multiAZ = "MultiAZ" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -5782,34 +4894,15 @@ public struct UpdateAvailabilityOptionsInput: Swift.Equatable { } } -struct UpdateAvailabilityOptionsInputBody: Swift.Equatable { - let domainName: Swift.String? - let multiAZ: Swift.Bool? -} - -extension UpdateAvailabilityOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case multiAZ = "MultiAZ" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - } -} +extension UpdateAvailabilityOptionsOutput { -extension UpdateAvailabilityOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateAvailabilityOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.availabilityOptions = output.availabilityOptions - } else { - self.availabilityOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateAvailabilityOptionsResult"] + var value = UpdateAvailabilityOptionsOutput() + value.availabilityOptions = try reader["AvailabilityOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.AvailabilityOptionsStatus.readingClosure) + return value } } } @@ -5827,40 +4920,35 @@ public struct UpdateAvailabilityOptionsOutput: Swift.Equatable { } } -struct UpdateAvailabilityOptionsOutputBody: Swift.Equatable { - let availabilityOptions: CloudSearchClientTypes.AvailabilityOptionsStatus? -} - -extension UpdateAvailabilityOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityOptions = "AvailabilityOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateAvailabilityOptionsResult")) - let availabilityOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AvailabilityOptionsStatus.self, forKey: .availabilityOptions) - availabilityOptions = availabilityOptionsDecoded - } -} - -enum UpdateAvailabilityOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DisabledAction": return try await DisabledOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateAvailabilityOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DisabledAction": return try await DisabledOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateDomainEndpointOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainEndpointOptions = "DomainEndpointOptions" + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainEndpointOptions = domainEndpointOptions { @@ -5900,34 +4988,15 @@ public struct UpdateDomainEndpointOptionsInput: Swift.Equatable { } } -struct UpdateDomainEndpointOptionsInputBody: Swift.Equatable { - let domainName: Swift.String? - let domainEndpointOptions: CloudSearchClientTypes.DomainEndpointOptions? -} - -extension UpdateDomainEndpointOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainEndpointOptions = "DomainEndpointOptions" - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let domainEndpointOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DomainEndpointOptions.self, forKey: .domainEndpointOptions) - domainEndpointOptions = domainEndpointOptionsDecoded - } -} +extension UpdateDomainEndpointOptionsOutput { -extension UpdateDomainEndpointOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateDomainEndpointOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.domainEndpointOptions = output.domainEndpointOptions - } else { - self.domainEndpointOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateDomainEndpointOptionsResult"] + var value = UpdateDomainEndpointOptionsOutput() + value.domainEndpointOptions = try reader["DomainEndpointOptions"].readIfPresent(readingClosure: CloudSearchClientTypes.DomainEndpointOptionsStatus.readingClosure) + return value } } } @@ -5945,40 +5014,35 @@ public struct UpdateDomainEndpointOptionsOutput: Swift.Equatable { } } -struct UpdateDomainEndpointOptionsOutputBody: Swift.Equatable { - let domainEndpointOptions: CloudSearchClientTypes.DomainEndpointOptionsStatus? -} - -extension UpdateDomainEndpointOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainEndpointOptions = "DomainEndpointOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateDomainEndpointOptionsResult")) - let domainEndpointOptionsDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.DomainEndpointOptionsStatus.self, forKey: .domainEndpointOptions) - domainEndpointOptions = domainEndpointOptionsDecoded - } -} - -enum UpdateDomainEndpointOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DisabledAction": return try await DisabledOperationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateDomainEndpointOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DisabledAction": return try await DisabledOperationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateScalingParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domainName = "DomainName" + case scalingParameters = "ScalingParameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domainName = domainName { @@ -6018,34 +5082,15 @@ public struct UpdateScalingParametersInput: Swift.Equatable { } } -struct UpdateScalingParametersInputBody: Swift.Equatable { - let domainName: Swift.String? - let scalingParameters: CloudSearchClientTypes.ScalingParameters? -} - -extension UpdateScalingParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domainName = "DomainName" - case scalingParameters = "ScalingParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let scalingParametersDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.ScalingParameters.self, forKey: .scalingParameters) - scalingParameters = scalingParametersDecoded - } -} +extension UpdateScalingParametersOutput { -extension UpdateScalingParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateScalingParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.scalingParameters = output.scalingParameters - } else { - self.scalingParameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateScalingParametersResult"] + var value = UpdateScalingParametersOutput() + value.scalingParameters = try reader["ScalingParameters"].readIfPresent(readingClosure: CloudSearchClientTypes.ScalingParametersStatus.readingClosure) + return value } } } @@ -6064,39 +5109,34 @@ public struct UpdateScalingParametersOutput: Swift.Equatable { } } -struct UpdateScalingParametersOutputBody: Swift.Equatable { - let scalingParameters: CloudSearchClientTypes.ScalingParametersStatus? -} - -extension UpdateScalingParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case scalingParameters = "ScalingParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateScalingParametersResult")) - let scalingParametersDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.ScalingParametersStatus.self, forKey: .scalingParameters) - scalingParameters = scalingParametersDecoded - } -} - -enum UpdateScalingParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateScalingParametersOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateServiceAccessPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accessPolicies = "AccessPolicies" + case domainName = "DomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accessPolicies = accessPolicies { @@ -6136,34 +5176,15 @@ public struct UpdateServiceAccessPoliciesInput: Swift.Equatable { } } -struct UpdateServiceAccessPoliciesInputBody: Swift.Equatable { - let domainName: Swift.String? - let accessPolicies: Swift.String? -} - -extension UpdateServiceAccessPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPolicies = "AccessPolicies" - case domainName = "DomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let accessPoliciesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessPolicies) - accessPolicies = accessPoliciesDecoded - } -} +extension UpdateServiceAccessPoliciesOutput { -extension UpdateServiceAccessPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateServiceAccessPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.accessPolicies = output.accessPolicies - } else { - self.accessPolicies = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateServiceAccessPoliciesResult"] + var value = UpdateServiceAccessPoliciesOutput() + value.accessPolicies = try reader["AccessPolicies"].readIfPresent(readingClosure: CloudSearchClientTypes.AccessPoliciesStatus.readingClosure) + return value } } } @@ -6182,51 +5203,38 @@ public struct UpdateServiceAccessPoliciesOutput: Swift.Equatable { } } -struct UpdateServiceAccessPoliciesOutputBody: Swift.Equatable { - let accessPolicies: CloudSearchClientTypes.AccessPoliciesStatus? -} - -extension UpdateServiceAccessPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPolicies = "AccessPolicies" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateServiceAccessPoliciesResult")) - let accessPoliciesDecoded = try containerValues.decodeIfPresent(CloudSearchClientTypes.AccessPoliciesStatus.self, forKey: .accessPolicies) - accessPolicies = accessPoliciesDecoded - } -} - -enum UpdateServiceAccessPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BaseException": return try await BaseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalException": return try await InternalException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidType": return try await InvalidTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateServiceAccessPoliciesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BaseException": return try await BaseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalException": return try await InternalException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidType": return try await InvalidTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ValidationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.code = output.error.code - self.properties.message = output.error.message - } else { - self.properties.code = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ValidationException() + value.properties.code = try reader["Code"].readIfPresent() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6258,23 +5266,3 @@ public struct ValidationException: ClientRuntime.ModeledError, AWSClientRuntime. self.properties.message = message } } - -struct ValidationExceptionBody: Swift.Equatable { - let code: Swift.String? - let message: Swift.String? -} - -extension ValidationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} diff --git a/Sources/Services/AWSCloudWatch/CloudWatchClient.swift b/Sources/Services/AWSCloudWatch/CloudWatchClient.swift index d93f7be3d62..618281329ed 100644 --- a/Sources/Services/AWSCloudWatch/CloudWatchClient.swift +++ b/Sources/Services/AWSCloudWatch/CloudWatchClient.swift @@ -11,14 +11,11 @@ public class CloudWatchClient { let config: CloudWatchClient.CloudWatchClientConfiguration let serviceName = "CloudWatch" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: CloudWatchClient.CloudWatchClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -78,7 +75,6 @@ extension CloudWatchClient { public func deleteAlarms(input: DeleteAlarmsInput) async throws -> DeleteAlarmsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteAlarms") @@ -102,7 +98,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAlarmsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAlarmsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAlarmsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -127,7 +123,6 @@ extension CloudWatchClient { public func deleteAnomalyDetector(input: DeleteAnomalyDetectorInput) async throws -> DeleteAnomalyDetectorOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteAnomalyDetector") @@ -151,7 +146,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAnomalyDetectorOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAnomalyDetectorOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAnomalyDetectorOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -174,7 +169,6 @@ extension CloudWatchClient { public func deleteDashboards(input: DeleteDashboardsInput) async throws -> DeleteDashboardsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDashboards") @@ -198,7 +192,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDashboardsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDashboardsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDashboardsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -220,7 +214,6 @@ extension CloudWatchClient { public func deleteInsightRules(input: DeleteInsightRulesInput) async throws -> DeleteInsightRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteInsightRules") @@ -244,7 +237,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteInsightRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteInsightRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteInsightRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -267,7 +260,6 @@ extension CloudWatchClient { public func deleteMetricStream(input: DeleteMetricStreamInput) async throws -> DeleteMetricStreamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteMetricStream") @@ -291,7 +283,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteMetricStreamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteMetricStreamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteMetricStreamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -312,7 +304,6 @@ extension CloudWatchClient { public func describeAlarmHistory(input: DescribeAlarmHistoryInput) async throws -> DescribeAlarmHistoryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAlarmHistory") @@ -336,7 +327,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAlarmHistoryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAlarmHistoryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAlarmHistoryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -357,7 +348,6 @@ extension CloudWatchClient { public func describeAlarms(input: DescribeAlarmsInput) async throws -> DescribeAlarmsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAlarms") @@ -381,7 +371,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAlarmsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAlarmsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAlarmsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -397,7 +387,6 @@ extension CloudWatchClient { public func describeAlarmsForMetric(input: DescribeAlarmsForMetricInput) async throws -> DescribeAlarmsForMetricOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAlarmsForMetric") @@ -421,7 +410,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAlarmsForMetricOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAlarmsForMetricOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAlarmsForMetricOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -445,7 +434,6 @@ extension CloudWatchClient { public func describeAnomalyDetectors(input: DescribeAnomalyDetectorsInput) async throws -> DescribeAnomalyDetectorsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAnomalyDetectors") @@ -469,7 +457,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAnomalyDetectorsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAnomalyDetectorsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAnomalyDetectorsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -490,7 +478,6 @@ extension CloudWatchClient { public func describeInsightRules(input: DescribeInsightRulesInput) async throws -> DescribeInsightRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInsightRules") @@ -514,7 +501,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInsightRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInsightRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInsightRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -530,7 +517,6 @@ extension CloudWatchClient { public func disableAlarmActions(input: DisableAlarmActionsInput) async throws -> DisableAlarmActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableAlarmActions") @@ -554,7 +540,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableAlarmActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableAlarmActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableAlarmActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -576,7 +562,6 @@ extension CloudWatchClient { public func disableInsightRules(input: DisableInsightRulesInput) async throws -> DisableInsightRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableInsightRules") @@ -600,7 +585,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableInsightRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableInsightRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableInsightRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -616,7 +601,6 @@ extension CloudWatchClient { public func enableAlarmActions(input: EnableAlarmActionsInput) async throws -> EnableAlarmActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableAlarmActions") @@ -640,7 +624,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableAlarmActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableAlarmActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableAlarmActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -663,7 +647,6 @@ extension CloudWatchClient { public func enableInsightRules(input: EnableInsightRulesInput) async throws -> EnableInsightRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableInsightRules") @@ -687,7 +670,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableInsightRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableInsightRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableInsightRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -710,7 +693,6 @@ extension CloudWatchClient { public func getDashboard(input: GetDashboardInput) async throws -> GetDashboardOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getDashboard") @@ -734,7 +716,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetDashboardOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetDashboardOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetDashboardOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -771,7 +753,6 @@ extension CloudWatchClient { public func getInsightRuleReport(input: GetInsightRuleReportInput) async throws -> GetInsightRuleReportOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getInsightRuleReport") @@ -795,7 +776,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetInsightRuleReportOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetInsightRuleReportOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetInsightRuleReportOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -827,7 +808,6 @@ extension CloudWatchClient { public func getMetricData(input: GetMetricDataInput) async throws -> GetMetricDataOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getMetricData") @@ -851,7 +831,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMetricDataOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMetricDataOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMetricDataOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -893,7 +873,6 @@ extension CloudWatchClient { public func getMetricStatistics(input: GetMetricStatisticsInput) async throws -> GetMetricStatisticsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getMetricStatistics") @@ -917,7 +896,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMetricStatisticsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMetricStatisticsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMetricStatisticsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -942,7 +921,6 @@ extension CloudWatchClient { public func getMetricStream(input: GetMetricStreamInput) async throws -> GetMetricStreamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getMetricStream") @@ -966,7 +944,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMetricStreamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMetricStreamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMetricStreamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -986,7 +964,6 @@ extension CloudWatchClient { public func getMetricWidgetImage(input: GetMetricWidgetImageInput) async throws -> GetMetricWidgetImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getMetricWidgetImage") @@ -1010,7 +987,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMetricWidgetImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMetricWidgetImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMetricWidgetImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1032,7 +1009,6 @@ extension CloudWatchClient { public func listDashboards(input: ListDashboardsInput) async throws -> ListDashboardsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listDashboards") @@ -1056,7 +1032,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDashboardsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDashboardsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDashboardsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1079,7 +1055,6 @@ extension CloudWatchClient { public func listManagedInsightRules(input: ListManagedInsightRulesInput) async throws -> ListManagedInsightRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listManagedInsightRules") @@ -1103,7 +1078,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListManagedInsightRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListManagedInsightRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListManagedInsightRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1127,7 +1102,6 @@ extension CloudWatchClient { public func listMetricStreams(input: ListMetricStreamsInput) async throws -> ListMetricStreamsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listMetricStreams") @@ -1151,7 +1125,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListMetricStreamsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListMetricStreamsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListMetricStreamsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1173,7 +1147,6 @@ extension CloudWatchClient { public func listMetrics(input: ListMetricsInput) async throws -> ListMetricsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listMetrics") @@ -1197,7 +1170,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListMetricsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListMetricsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListMetricsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1220,7 +1193,6 @@ extension CloudWatchClient { public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -1244,7 +1216,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1269,7 +1241,6 @@ extension CloudWatchClient { public func putAnomalyDetector(input: PutAnomalyDetectorInput) async throws -> PutAnomalyDetectorOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putAnomalyDetector") @@ -1293,7 +1264,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutAnomalyDetectorOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutAnomalyDetectorOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutAnomalyDetectorOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1314,7 +1285,6 @@ extension CloudWatchClient { public func putCompositeAlarm(input: PutCompositeAlarmInput) async throws -> PutCompositeAlarmOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putCompositeAlarm") @@ -1338,7 +1308,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutCompositeAlarmOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutCompositeAlarmOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutCompositeAlarmOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1360,7 +1330,6 @@ extension CloudWatchClient { public func putDashboard(input: PutDashboardInput) async throws -> PutDashboardOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putDashboard") @@ -1384,7 +1353,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutDashboardOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutDashboardOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutDashboardOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1407,7 +1376,6 @@ extension CloudWatchClient { public func putInsightRule(input: PutInsightRuleInput) async throws -> PutInsightRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putInsightRule") @@ -1431,7 +1399,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutInsightRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutInsightRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutInsightRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1453,7 +1421,6 @@ extension CloudWatchClient { public func putManagedInsightRules(input: PutManagedInsightRulesInput) async throws -> PutManagedInsightRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putManagedInsightRules") @@ -1477,7 +1444,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutManagedInsightRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutManagedInsightRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutManagedInsightRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1509,7 +1476,6 @@ extension CloudWatchClient { public func putMetricAlarm(input: PutMetricAlarmInput) async throws -> PutMetricAlarmOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putMetricAlarm") @@ -1533,7 +1499,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutMetricAlarmOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutMetricAlarmOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutMetricAlarmOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1561,7 +1527,6 @@ extension CloudWatchClient { public func putMetricData(input: PutMetricDataInput) async throws -> PutMetricDataOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putMetricData") @@ -1585,7 +1550,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutMetricDataOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutMetricDataOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutMetricDataOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1619,7 +1584,6 @@ extension CloudWatchClient { public func putMetricStream(input: PutMetricStreamInput) async throws -> PutMetricStreamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putMetricStream") @@ -1643,7 +1607,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutMetricStreamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutMetricStreamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutMetricStreamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1665,7 +1629,6 @@ extension CloudWatchClient { public func setAlarmState(input: SetAlarmStateInput) async throws -> SetAlarmStateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setAlarmState") @@ -1689,7 +1652,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetAlarmStateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetAlarmStateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetAlarmStateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1712,7 +1675,6 @@ extension CloudWatchClient { public func startMetricStreams(input: StartMetricStreamsInput) async throws -> StartMetricStreamsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startMetricStreams") @@ -1736,7 +1698,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartMetricStreamsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartMetricStreamsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartMetricStreamsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1759,7 +1721,6 @@ extension CloudWatchClient { public func stopMetricStreams(input: StopMetricStreamsInput) async throws -> StopMetricStreamsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopMetricStreams") @@ -1783,7 +1744,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopMetricStreamsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopMetricStreamsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopMetricStreamsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1807,7 +1768,6 @@ extension CloudWatchClient { public func tagResource(input: TagResourceInput) async throws -> TagResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagResource") @@ -1831,7 +1791,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1855,7 +1815,6 @@ extension CloudWatchClient { public func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagResource") @@ -1879,7 +1838,7 @@ extension CloudWatchClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSCloudWatch/models/Models.swift b/Sources/Services/AWSCloudWatch/models/Models.swift index 873a5d34380..f396065759f 100644 --- a/Sources/Services/AWSCloudWatch/models/Models.swift +++ b/Sources/Services/AWSCloudWatch/models/Models.swift @@ -1,6 +1,8 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension CloudWatchClientTypes { public enum ActionsSuppressedBy: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { @@ -37,7 +39,7 @@ extension CloudWatchClientTypes { } } -extension CloudWatchClientTypes.AlarmHistoryItem: Swift.Codable { +extension CloudWatchClientTypes.AlarmHistoryItem: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case alarmName = "AlarmName" case alarmType = "AlarmType" @@ -69,20 +71,18 @@ extension CloudWatchClientTypes.AlarmHistoryItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let alarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmName) - alarmName = alarmNameDecoded - let alarmTypeDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.AlarmType.self, forKey: .alarmType) - alarmType = alarmTypeDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let historyItemTypeDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.HistoryItemType.self, forKey: .historyItemType) - historyItemType = historyItemTypeDecoded - let historySummaryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .historySummary) - historySummary = historySummaryDecoded - let historyDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .historyData) - historyData = historyDataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.AlarmHistoryItem() + value.alarmName = try reader["AlarmName"].readIfPresent() + value.alarmType = try reader["AlarmType"].readIfPresent() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.historyItemType = try reader["HistoryItemType"].readIfPresent() + value.historySummary = try reader["HistorySummary"].readIfPresent() + value.historyData = try reader["HistoryData"].readIfPresent() + return value + } } } @@ -154,7 +154,7 @@ extension CloudWatchClientTypes { } } -extension CloudWatchClientTypes.AnomalyDetector: Swift.Codable { +extension CloudWatchClientTypes.AnomalyDetector: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case configuration = "Configuration" case dimensions = "Dimensions" @@ -203,41 +203,20 @@ extension CloudWatchClientTypes.AnomalyDetector: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.AnomalyDetector() + value.namespace = try reader["Namespace"].readIfPresent() + value.metricName = try reader["MetricName"].readIfPresent() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Dimension.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.stat = try reader["Stat"].readIfPresent() + value.configuration = try reader["Configuration"].readIfPresent(readingClosure: CloudWatchClientTypes.AnomalyDetectorConfiguration.readingClosure) + value.stateValue = try reader["StateValue"].readIfPresent() + value.singleMetricAnomalyDetector = try reader["SingleMetricAnomalyDetector"].readIfPresent(readingClosure: CloudWatchClientTypes.SingleMetricAnomalyDetector.readingClosure) + value.metricMathAnomalyDetector = try reader["MetricMathAnomalyDetector"].readIfPresent(readingClosure: CloudWatchClientTypes.MetricMathAnomalyDetector.readingClosure) + return value } - let statDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stat) - stat = statDecoded - let configurationDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.AnomalyDetectorConfiguration.self, forKey: .configuration) - configuration = configurationDecoded - let stateValueDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.AnomalyDetectorStateValue.self, forKey: .stateValue) - stateValue = stateValueDecoded - let singleMetricAnomalyDetectorDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.SingleMetricAnomalyDetector.self, forKey: .singleMetricAnomalyDetector) - singleMetricAnomalyDetector = singleMetricAnomalyDetectorDecoded - let metricMathAnomalyDetectorDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.MetricMathAnomalyDetector.self, forKey: .metricMathAnomalyDetector) - metricMathAnomalyDetector = metricMathAnomalyDetectorDecoded } } @@ -289,7 +268,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.AnomalyDetectorConfiguration: Swift.Codable { +extension CloudWatchClientTypes.AnomalyDetectorConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case excludedTimeRanges = "ExcludedTimeRanges" case metricTimezone = "MetricTimezone" @@ -314,29 +293,14 @@ extension CloudWatchClientTypes.AnomalyDetectorConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.excludedTimeRanges) { - struct KeyVal0{struct member{}} - let excludedTimeRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedTimeRanges) - if let excludedTimeRangesWrappedContainer = excludedTimeRangesWrappedContainer { - let excludedTimeRangesContainer = try excludedTimeRangesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Range].self, forKey: .member) - var excludedTimeRangesBuffer:[CloudWatchClientTypes.Range]? = nil - if let excludedTimeRangesContainer = excludedTimeRangesContainer { - excludedTimeRangesBuffer = [CloudWatchClientTypes.Range]() - for structureContainer0 in excludedTimeRangesContainer { - excludedTimeRangesBuffer?.append(structureContainer0) - } - } - excludedTimeRanges = excludedTimeRangesBuffer - } else { - excludedTimeRanges = [] - } - } else { - excludedTimeRanges = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.AnomalyDetectorConfiguration() + value.excludedTimeRanges = try reader["ExcludedTimeRanges"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Range.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.metricTimezone = try reader["MetricTimezone"].readIfPresent() + return value } - let metricTimezoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricTimezone) - metricTimezone = metricTimezoneDecoded } } @@ -476,7 +440,7 @@ extension CloudWatchClientTypes { } } -extension CloudWatchClientTypes.CompositeAlarm: Swift.Codable { +extension CloudWatchClientTypes.CompositeAlarm: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actionsEnabled = "ActionsEnabled" case actionsSuppressedBy = "ActionsSuppressedBy" @@ -587,97 +551,31 @@ extension CloudWatchClientTypes.CompositeAlarm: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .actionsEnabled) - actionsEnabled = actionsEnabledDecoded - if containerValues.contains(.alarmActions) { - struct KeyVal0{struct member{}} - let alarmActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmActions) - if let alarmActionsWrappedContainer = alarmActionsWrappedContainer { - let alarmActionsContainer = try alarmActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmActionsBuffer:[Swift.String]? = nil - if let alarmActionsContainer = alarmActionsContainer { - alarmActionsBuffer = [Swift.String]() - for stringContainer0 in alarmActionsContainer { - alarmActionsBuffer?.append(stringContainer0) - } - } - alarmActions = alarmActionsBuffer - } else { - alarmActions = [] - } - } else { - alarmActions = nil - } - let alarmArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmArn) - alarmArn = alarmArnDecoded - let alarmConfigurationUpdatedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .alarmConfigurationUpdatedTimestamp) - alarmConfigurationUpdatedTimestamp = alarmConfigurationUpdatedTimestampDecoded - let alarmDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmDescription) - alarmDescription = alarmDescriptionDecoded - let alarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmName) - alarmName = alarmNameDecoded - let alarmRuleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmRule) - alarmRule = alarmRuleDecoded - if containerValues.contains(.insufficientDataActions) { - struct KeyVal0{struct member{}} - let insufficientDataActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .insufficientDataActions) - if let insufficientDataActionsWrappedContainer = insufficientDataActionsWrappedContainer { - let insufficientDataActionsContainer = try insufficientDataActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var insufficientDataActionsBuffer:[Swift.String]? = nil - if let insufficientDataActionsContainer = insufficientDataActionsContainer { - insufficientDataActionsBuffer = [Swift.String]() - for stringContainer0 in insufficientDataActionsContainer { - insufficientDataActionsBuffer?.append(stringContainer0) - } - } - insufficientDataActions = insufficientDataActionsBuffer - } else { - insufficientDataActions = [] - } - } else { - insufficientDataActions = nil - } - if containerValues.contains(.okActions) { - struct KeyVal0{struct member{}} - let okActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .okActions) - if let okActionsWrappedContainer = okActionsWrappedContainer { - let okActionsContainer = try okActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var okActionsBuffer:[Swift.String]? = nil - if let okActionsContainer = okActionsContainer { - okActionsBuffer = [Swift.String]() - for stringContainer0 in okActionsContainer { - okActionsBuffer?.append(stringContainer0) - } - } - okActions = okActionsBuffer - } else { - okActions = [] - } - } else { - okActions = nil - } - let stateReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateReason) - stateReason = stateReasonDecoded - let stateReasonDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateReasonData) - stateReasonData = stateReasonDataDecoded - let stateUpdatedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .stateUpdatedTimestamp) - stateUpdatedTimestamp = stateUpdatedTimestampDecoded - let stateValueDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StateValue.self, forKey: .stateValue) - stateValue = stateValueDecoded - let stateTransitionedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .stateTransitionedTimestamp) - stateTransitionedTimestamp = stateTransitionedTimestampDecoded - let actionsSuppressedByDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.ActionsSuppressedBy.self, forKey: .actionsSuppressedBy) - actionsSuppressedBy = actionsSuppressedByDecoded - let actionsSuppressedReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionsSuppressedReason) - actionsSuppressedReason = actionsSuppressedReasonDecoded - let actionsSuppressorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionsSuppressor) - actionsSuppressor = actionsSuppressorDecoded - let actionsSuppressorWaitPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .actionsSuppressorWaitPeriod) - actionsSuppressorWaitPeriod = actionsSuppressorWaitPeriodDecoded - let actionsSuppressorExtensionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .actionsSuppressorExtensionPeriod) - actionsSuppressorExtensionPeriod = actionsSuppressorExtensionPeriodDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.CompositeAlarm() + value.actionsEnabled = try reader["ActionsEnabled"].readIfPresent() + value.alarmActions = try reader["AlarmActions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.alarmArn = try reader["AlarmArn"].readIfPresent() + value.alarmConfigurationUpdatedTimestamp = try reader["AlarmConfigurationUpdatedTimestamp"].readTimestampIfPresent(format: .dateTime) + value.alarmDescription = try reader["AlarmDescription"].readIfPresent() + value.alarmName = try reader["AlarmName"].readIfPresent() + value.alarmRule = try reader["AlarmRule"].readIfPresent() + value.insufficientDataActions = try reader["InsufficientDataActions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.okActions = try reader["OKActions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.stateReason = try reader["StateReason"].readIfPresent() + value.stateReasonData = try reader["StateReasonData"].readIfPresent() + value.stateUpdatedTimestamp = try reader["StateUpdatedTimestamp"].readTimestampIfPresent(format: .dateTime) + value.stateValue = try reader["StateValue"].readIfPresent() + value.stateTransitionedTimestamp = try reader["StateTransitionedTimestamp"].readTimestampIfPresent(format: .dateTime) + value.actionsSuppressedBy = try reader["ActionsSuppressedBy"].readIfPresent() + value.actionsSuppressedReason = try reader["ActionsSuppressedReason"].readIfPresent() + value.actionsSuppressor = try reader["ActionsSuppressor"].readIfPresent() + value.actionsSuppressorWaitPeriod = try reader["ActionsSuppressorWaitPeriod"].readIfPresent() + value.actionsSuppressorExtensionPeriod = try reader["ActionsSuppressorExtensionPeriod"].readIfPresent() + return value + } } } @@ -770,16 +668,14 @@ extension CloudWatchClientTypes { } extension ConcurrentModificationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConcurrentModificationException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -807,23 +703,7 @@ public struct ConcurrentModificationException: ClientRuntime.ModeledError, AWSCl } } -struct ConcurrentModificationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ConcurrentModificationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudWatchClientTypes.DashboardEntry: Swift.Codable { +extension CloudWatchClientTypes.DashboardEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dashboardArn = "DashboardArn" case dashboardName = "DashboardName" @@ -847,16 +727,16 @@ extension CloudWatchClientTypes.DashboardEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dashboardNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardName) - dashboardName = dashboardNameDecoded - let dashboardArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardArn) - dashboardArn = dashboardArnDecoded - let lastModifiedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModified) - lastModified = lastModifiedDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.DashboardEntry() + value.dashboardName = try reader["DashboardName"].readIfPresent() + value.dashboardArn = try reader["DashboardArn"].readIfPresent() + value.lastModified = try reader["LastModified"].readTimestampIfPresent(format: .dateTime) + value.size = try reader["Size"].readIfPresent() + return value + } } } @@ -889,18 +769,15 @@ extension CloudWatchClientTypes { } extension DashboardInvalidInputError { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.dashboardValidationMessages = output.error.dashboardValidationMessages - self.properties.message = output.error.message - } else { - self.properties.dashboardValidationMessages = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DashboardInvalidInputError() + value.properties.dashboardValidationMessages = try reader["dashboardValidationMessages"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.DashboardValidationMessage.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -931,54 +808,15 @@ public struct DashboardInvalidInputError: ClientRuntime.ModeledError, AWSClientR } } -struct DashboardInvalidInputErrorBody: Swift.Equatable { - let message: Swift.String? - let dashboardValidationMessages: [CloudWatchClientTypes.DashboardValidationMessage]? -} - -extension DashboardInvalidInputErrorBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dashboardValidationMessages - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - if containerValues.contains(.dashboardValidationMessages) { - struct KeyVal0{struct member{}} - let dashboardValidationMessagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dashboardValidationMessages) - if let dashboardValidationMessagesWrappedContainer = dashboardValidationMessagesWrappedContainer { - let dashboardValidationMessagesContainer = try dashboardValidationMessagesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.DashboardValidationMessage].self, forKey: .member) - var dashboardValidationMessagesBuffer:[CloudWatchClientTypes.DashboardValidationMessage]? = nil - if let dashboardValidationMessagesContainer = dashboardValidationMessagesContainer { - dashboardValidationMessagesBuffer = [CloudWatchClientTypes.DashboardValidationMessage]() - for structureContainer0 in dashboardValidationMessagesContainer { - dashboardValidationMessagesBuffer?.append(structureContainer0) - } - } - dashboardValidationMessages = dashboardValidationMessagesBuffer - } else { - dashboardValidationMessages = [] - } - } else { - dashboardValidationMessages = nil - } - } -} - extension DashboardNotFoundError { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DashboardNotFoundError() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1006,23 +844,7 @@ public struct DashboardNotFoundError: ClientRuntime.ModeledError, AWSClientRunti } } -struct DashboardNotFoundErrorBody: Swift.Equatable { - let message: Swift.String? -} - -extension DashboardNotFoundErrorBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudWatchClientTypes.DashboardValidationMessage: Swift.Codable { +extension CloudWatchClientTypes.DashboardValidationMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dataPath = "DataPath" case message = "Message" @@ -1038,12 +860,14 @@ extension CloudWatchClientTypes.DashboardValidationMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataPath) - dataPath = dataPathDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.DashboardValidationMessage() + value.dataPath = try reader["DataPath"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + return value + } } } @@ -1067,7 +891,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.Datapoint: Swift.Codable { +extension CloudWatchClientTypes.Datapoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case average = "Average" case extendedStatistics = "ExtendedStatistics" @@ -1116,40 +940,19 @@ extension CloudWatchClientTypes.Datapoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let sampleCountDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .sampleCount) - sampleCount = sampleCountDecoded - let averageDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .average) - average = averageDecoded - let sumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .sum) - sum = sumDecoded - let minimumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minimum) - minimum = minimumDecoded - let maximumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maximum) - maximum = maximumDecoded - let unitDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StandardUnit.self, forKey: .unit) - unit = unitDecoded - if containerValues.contains(.extendedStatistics) { - struct KeyVal0{struct key{}; struct value{}} - let extendedStatisticsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .extendedStatistics) - if let extendedStatisticsWrappedContainer = extendedStatisticsWrappedContainer { - let extendedStatisticsContainer = try extendedStatisticsWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var extendedStatisticsBuffer: [Swift.String:Swift.Double]? = nil - if let extendedStatisticsContainer = extendedStatisticsContainer { - extendedStatisticsBuffer = [Swift.String:Swift.Double]() - for doubleContainer0 in extendedStatisticsContainer { - extendedStatisticsBuffer?[doubleContainer0.key] = doubleContainer0.value - } - } - extendedStatistics = extendedStatisticsBuffer - } else { - extendedStatistics = [:] - } - } else { - extendedStatistics = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.Datapoint() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.sampleCount = try reader["SampleCount"].readIfPresent() + value.average = try reader["Average"].readIfPresent() + value.sum = try reader["Sum"].readIfPresent() + value.minimum = try reader["Minimum"].readIfPresent() + value.maximum = try reader["Maximum"].readIfPresent() + value.unit = try reader["Unit"].readIfPresent() + value.extendedStatistics = try reader["ExtendedStatistics"].readMapIfPresent(valueReadingClosure: Swift.Double.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -1199,6 +1002,10 @@ extension CloudWatchClientTypes { } extension DeleteAlarmsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case alarmNames = "AlarmNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let alarmNames = alarmNames { @@ -1238,60 +1045,47 @@ public struct DeleteAlarmsInput: Swift.Equatable { } } -struct DeleteAlarmsInputBody: Swift.Equatable { - let alarmNames: [Swift.String]? -} - -extension DeleteAlarmsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmNames = "AlarmNames" - } +extension DeleteAlarmsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.alarmNames) { - struct KeyVal0{struct member{}} - let alarmNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmNames) - if let alarmNamesWrappedContainer = alarmNamesWrappedContainer { - let alarmNamesContainer = try alarmNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmNamesBuffer:[Swift.String]? = nil - if let alarmNamesContainer = alarmNamesContainer { - alarmNamesBuffer = [Swift.String]() - for stringContainer0 in alarmNamesContainer { - alarmNamesBuffer?.append(stringContainer0) - } - } - alarmNames = alarmNamesBuffer - } else { - alarmNames = [] - } - } else { - alarmNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAlarmsOutput() } } } -extension DeleteAlarmsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DeleteAlarmsOutput: Swift.Equatable { public init() { } } -enum DeleteAlarmsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFound": return try await ResourceNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAlarmsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceNotFound": return try await ResourceNotFound.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteAnomalyDetectorInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dimensions = "Dimensions" + case metricMathAnomalyDetector = "MetricMathAnomalyDetector" + case metricName = "MetricName" + case namespace = "Namespace" + case singleMetricAnomalyDetector = "SingleMetricAnomalyDetector" + case stat = "Stat" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dimensions = dimensions { @@ -1395,61 +1189,12 @@ public struct DeleteAnomalyDetectorInput: Swift.Equatable { } } -struct DeleteAnomalyDetectorInputBody: Swift.Equatable { - let namespace: Swift.String? - let metricName: Swift.String? - let dimensions: [CloudWatchClientTypes.Dimension]? - let stat: Swift.String? - let singleMetricAnomalyDetector: CloudWatchClientTypes.SingleMetricAnomalyDetector? - let metricMathAnomalyDetector: CloudWatchClientTypes.MetricMathAnomalyDetector? -} - -extension DeleteAnomalyDetectorInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dimensions = "Dimensions" - case metricMathAnomalyDetector = "MetricMathAnomalyDetector" - case metricName = "MetricName" - case namespace = "Namespace" - case singleMetricAnomalyDetector = "SingleMetricAnomalyDetector" - case stat = "Stat" - } +extension DeleteAnomalyDetectorOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAnomalyDetectorOutput() } - let statDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stat) - stat = statDecoded - let singleMetricAnomalyDetectorDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.SingleMetricAnomalyDetector.self, forKey: .singleMetricAnomalyDetector) - singleMetricAnomalyDetector = singleMetricAnomalyDetectorDecoded - let metricMathAnomalyDetectorDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.MetricMathAnomalyDetector.self, forKey: .metricMathAnomalyDetector) - metricMathAnomalyDetector = metricMathAnomalyDetectorDecoded - } -} - -extension DeleteAnomalyDetectorOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -1458,21 +1203,32 @@ public struct DeleteAnomalyDetectorOutput: Swift.Equatable { public init() { } } -enum DeleteAnomalyDetectorOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAnomalyDetectorOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDashboardsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dashboardNames = "DashboardNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dashboardNames = dashboardNames { @@ -1512,62 +1268,44 @@ public struct DeleteDashboardsInput: Swift.Equatable { } } -struct DeleteDashboardsInputBody: Swift.Equatable { - let dashboardNames: [Swift.String]? -} - -extension DeleteDashboardsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dashboardNames = "DashboardNames" - } +extension DeleteDashboardsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dashboardNames) { - struct KeyVal0{struct member{}} - let dashboardNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dashboardNames) - if let dashboardNamesWrappedContainer = dashboardNamesWrappedContainer { - let dashboardNamesContainer = try dashboardNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dashboardNamesBuffer:[Swift.String]? = nil - if let dashboardNamesContainer = dashboardNamesContainer { - dashboardNamesBuffer = [Swift.String]() - for stringContainer0 in dashboardNamesContainer { - dashboardNamesBuffer?.append(stringContainer0) - } - } - dashboardNames = dashboardNamesBuffer - } else { - dashboardNames = [] - } - } else { - dashboardNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDashboardsOutput() } } } -extension DeleteDashboardsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DeleteDashboardsOutput: Swift.Equatable { public init() { } } -enum DeleteDashboardsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFound": return try await DashboardNotFoundError(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDashboardsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceNotFound": return try await DashboardNotFoundError.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteInsightRulesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleNames = "RuleNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleNames = ruleNames { @@ -1607,47 +1345,15 @@ public struct DeleteInsightRulesInput: Swift.Equatable { } } -struct DeleteInsightRulesInputBody: Swift.Equatable { - let ruleNames: [Swift.String]? -} - -extension DeleteInsightRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleNames = "RuleNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ruleNames) { - struct KeyVal0{struct member{}} - let ruleNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleNames) - if let ruleNamesWrappedContainer = ruleNamesWrappedContainer { - let ruleNamesContainer = try ruleNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ruleNamesBuffer:[Swift.String]? = nil - if let ruleNamesContainer = ruleNamesContainer { - ruleNamesBuffer = [Swift.String]() - for stringContainer0 in ruleNamesContainer { - ruleNamesBuffer?.append(stringContainer0) - } - } - ruleNames = ruleNamesBuffer - } else { - ruleNames = [] - } - } else { - ruleNames = nil - } - } -} +extension DeleteInsightRulesOutput { -extension DeleteInsightRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteInsightRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.failures = output.failures - } else { - self.failures = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteInsightRulesResult"] + var value = DeleteInsightRulesOutput() + value.failures = try reader["Failures"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.PartialFailure.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -1664,52 +1370,29 @@ public struct DeleteInsightRulesOutput: Swift.Equatable { } } -struct DeleteInsightRulesOutputBody: Swift.Equatable { - let failures: [CloudWatchClientTypes.PartialFailure]? -} +enum DeleteInsightRulesOutputError { -extension DeleteInsightRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failures = "Failures" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteInsightRulesResult")) - if containerValues.contains(.failures) { - struct KeyVal0{struct member{}} - let failuresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failures) - if let failuresWrappedContainer = failuresWrappedContainer { - let failuresContainer = try failuresWrappedContainer.decodeIfPresent([CloudWatchClientTypes.PartialFailure].self, forKey: .member) - var failuresBuffer:[CloudWatchClientTypes.PartialFailure]? = nil - if let failuresContainer = failuresContainer { - failuresBuffer = [CloudWatchClientTypes.PartialFailure]() - for structureContainer0 in failuresContainer { - failuresBuffer?.append(structureContainer0) - } - } - failures = failuresBuffer - } else { - failures = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - failures = nil } } } -enum DeleteInsightRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DeleteMetricStreamInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case name = "Name" } -} -extension DeleteMetricStreamInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let name = name { @@ -1740,24 +1423,12 @@ public struct DeleteMetricStreamInput: Swift.Equatable { } } -struct DeleteMetricStreamInputBody: Swift.Equatable { - let name: Swift.String? -} - -extension DeleteMetricStreamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - } -} +extension DeleteMetricStreamOutput { -extension DeleteMetricStreamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteMetricStreamOutput() + } } } @@ -1766,19 +1437,37 @@ public struct DeleteMetricStreamOutput: Swift.Equatable { public init() { } } -enum DeleteMetricStreamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteMetricStreamOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeAlarmHistoryInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case alarmName = "AlarmName" + case alarmTypes = "AlarmTypes" + case endDate = "EndDate" + case historyItemType = "HistoryItemType" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" + case scanBy = "ScanBy" + case startDate = "StartDate" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let alarmName = alarmName { @@ -1866,77 +1555,16 @@ public struct DescribeAlarmHistoryInput: Swift.Equatable { } } -struct DescribeAlarmHistoryInputBody: Swift.Equatable { - let alarmName: Swift.String? - let alarmTypes: [CloudWatchClientTypes.AlarmType]? - let historyItemType: CloudWatchClientTypes.HistoryItemType? - let startDate: ClientRuntime.Date? - let endDate: ClientRuntime.Date? - let maxRecords: Swift.Int? - let nextToken: Swift.String? - let scanBy: CloudWatchClientTypes.ScanBy? -} - -extension DescribeAlarmHistoryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmName = "AlarmName" - case alarmTypes = "AlarmTypes" - case endDate = "EndDate" - case historyItemType = "HistoryItemType" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - case scanBy = "ScanBy" - case startDate = "StartDate" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let alarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmName) - alarmName = alarmNameDecoded - if containerValues.contains(.alarmTypes) { - struct KeyVal0{struct member{}} - let alarmTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmTypes) - if let alarmTypesWrappedContainer = alarmTypesWrappedContainer { - let alarmTypesContainer = try alarmTypesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.AlarmType].self, forKey: .member) - var alarmTypesBuffer:[CloudWatchClientTypes.AlarmType]? = nil - if let alarmTypesContainer = alarmTypesContainer { - alarmTypesBuffer = [CloudWatchClientTypes.AlarmType]() - for enumContainer0 in alarmTypesContainer { - alarmTypesBuffer?.append(enumContainer0) - } - } - alarmTypes = alarmTypesBuffer - } else { - alarmTypes = [] - } - } else { - alarmTypes = nil - } - let historyItemTypeDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.HistoryItemType.self, forKey: .historyItemType) - historyItemType = historyItemTypeDecoded - let startDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startDate) - startDate = startDateDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let scanByDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.ScanBy.self, forKey: .scanBy) - scanBy = scanByDecoded - } -} +extension DescribeAlarmHistoryOutput { -extension DescribeAlarmHistoryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAlarmHistoryOutputBody = try responseDecoder.decode(responseBody: data) - self.alarmHistoryItems = output.alarmHistoryItems - self.nextToken = output.nextToken - } else { - self.alarmHistoryItems = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAlarmHistoryResult"] + var value = DescribeAlarmHistoryOutput() + value.alarmHistoryItems = try reader["AlarmHistoryItems"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.AlarmHistoryItem.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -1957,55 +1585,34 @@ public struct DescribeAlarmHistoryOutput: Swift.Equatable { } } -struct DescribeAlarmHistoryOutputBody: Swift.Equatable { - let alarmHistoryItems: [CloudWatchClientTypes.AlarmHistoryItem]? - let nextToken: Swift.String? -} - -extension DescribeAlarmHistoryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmHistoryItems = "AlarmHistoryItems" - case nextToken = "NextToken" - } +enum DescribeAlarmHistoryOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAlarmHistoryResult")) - if containerValues.contains(.alarmHistoryItems) { - struct KeyVal0{struct member{}} - let alarmHistoryItemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmHistoryItems) - if let alarmHistoryItemsWrappedContainer = alarmHistoryItemsWrappedContainer { - let alarmHistoryItemsContainer = try alarmHistoryItemsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.AlarmHistoryItem].self, forKey: .member) - var alarmHistoryItemsBuffer:[CloudWatchClientTypes.AlarmHistoryItem]? = nil - if let alarmHistoryItemsContainer = alarmHistoryItemsContainer { - alarmHistoryItemsBuffer = [CloudWatchClientTypes.AlarmHistoryItem]() - for structureContainer0 in alarmHistoryItemsContainer { - alarmHistoryItemsBuffer?.append(structureContainer0) - } - } - alarmHistoryItems = alarmHistoryItemsBuffer - } else { - alarmHistoryItems = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - alarmHistoryItems = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeAlarmHistoryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeAlarmsForMetricInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dimensions = "Dimensions" + case extendedStatistic = "ExtendedStatistic" + case metricName = "MetricName" + case namespace = "Namespace" + case period = "Period" + case statistic = "Statistic" + case unit = "Unit" } -} -extension DescribeAlarmsForMetricInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dimensions = dimensions { @@ -2088,71 +1695,15 @@ public struct DescribeAlarmsForMetricInput: Swift.Equatable { } } -struct DescribeAlarmsForMetricInputBody: Swift.Equatable { - let metricName: Swift.String? - let namespace: Swift.String? - let statistic: CloudWatchClientTypes.Statistic? - let extendedStatistic: Swift.String? - let dimensions: [CloudWatchClientTypes.Dimension]? - let period: Swift.Int? - let unit: CloudWatchClientTypes.StandardUnit? -} - -extension DescribeAlarmsForMetricInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dimensions = "Dimensions" - case extendedStatistic = "ExtendedStatistic" - case metricName = "MetricName" - case namespace = "Namespace" - case period = "Period" - case statistic = "Statistic" - case unit = "Unit" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let statisticDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.Statistic.self, forKey: .statistic) - statistic = statisticDecoded - let extendedStatisticDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .extendedStatistic) - extendedStatistic = extendedStatisticDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil - } - let periodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .period) - period = periodDecoded - let unitDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StandardUnit.self, forKey: .unit) - unit = unitDecoded - } -} +extension DescribeAlarmsForMetricOutput { -extension DescribeAlarmsForMetricOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAlarmsForMetricOutputBody = try responseDecoder.decode(responseBody: data) - self.metricAlarms = output.metricAlarms - } else { - self.metricAlarms = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAlarmsForMetricResult"] + var value = DescribeAlarmsForMetricOutput() + value.metricAlarms = try reader["MetricAlarms"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricAlarm.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2169,50 +1720,35 @@ public struct DescribeAlarmsForMetricOutput: Swift.Equatable { } } -struct DescribeAlarmsForMetricOutputBody: Swift.Equatable { - let metricAlarms: [CloudWatchClientTypes.MetricAlarm]? -} +enum DescribeAlarmsForMetricOutputError { -extension DescribeAlarmsForMetricOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metricAlarms = "MetricAlarms" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAlarmsForMetricResult")) - if containerValues.contains(.metricAlarms) { - struct KeyVal0{struct member{}} - let metricAlarmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricAlarms) - if let metricAlarmsWrappedContainer = metricAlarmsWrappedContainer { - let metricAlarmsContainer = try metricAlarmsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricAlarm].self, forKey: .member) - var metricAlarmsBuffer:[CloudWatchClientTypes.MetricAlarm]? = nil - if let metricAlarmsContainer = metricAlarmsContainer { - metricAlarmsBuffer = [CloudWatchClientTypes.MetricAlarm]() - for structureContainer0 in metricAlarmsContainer { - metricAlarmsBuffer?.append(structureContainer0) - } - } - metricAlarms = metricAlarmsBuffer - } else { - metricAlarms = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - metricAlarms = nil } } } -enum DescribeAlarmsForMetricOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeAlarmsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actionPrefix = "ActionPrefix" + case alarmNamePrefix = "AlarmNamePrefix" + case alarmNames = "AlarmNames" + case alarmTypes = "AlarmTypes" + case childrenOfAlarmName = "ChildrenOfAlarmName" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" + case parentsOfAlarmName = "ParentsOfAlarmName" + case stateValue = "StateValue" } -} -extension DescribeAlarmsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actionPrefix = actionPrefix { @@ -2316,100 +1852,17 @@ public struct DescribeAlarmsInput: Swift.Equatable { } } -struct DescribeAlarmsInputBody: Swift.Equatable { - let alarmNames: [Swift.String]? - let alarmNamePrefix: Swift.String? - let alarmTypes: [CloudWatchClientTypes.AlarmType]? - let childrenOfAlarmName: Swift.String? - let parentsOfAlarmName: Swift.String? - let stateValue: CloudWatchClientTypes.StateValue? - let actionPrefix: Swift.String? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeAlarmsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionPrefix = "ActionPrefix" - case alarmNamePrefix = "AlarmNamePrefix" - case alarmNames = "AlarmNames" - case alarmTypes = "AlarmTypes" - case childrenOfAlarmName = "ChildrenOfAlarmName" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - case parentsOfAlarmName = "ParentsOfAlarmName" - case stateValue = "StateValue" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.alarmNames) { - struct KeyVal0{struct member{}} - let alarmNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmNames) - if let alarmNamesWrappedContainer = alarmNamesWrappedContainer { - let alarmNamesContainer = try alarmNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmNamesBuffer:[Swift.String]? = nil - if let alarmNamesContainer = alarmNamesContainer { - alarmNamesBuffer = [Swift.String]() - for stringContainer0 in alarmNamesContainer { - alarmNamesBuffer?.append(stringContainer0) - } - } - alarmNames = alarmNamesBuffer - } else { - alarmNames = [] - } - } else { - alarmNames = nil - } - let alarmNamePrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmNamePrefix) - alarmNamePrefix = alarmNamePrefixDecoded - if containerValues.contains(.alarmTypes) { - struct KeyVal0{struct member{}} - let alarmTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmTypes) - if let alarmTypesWrappedContainer = alarmTypesWrappedContainer { - let alarmTypesContainer = try alarmTypesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.AlarmType].self, forKey: .member) - var alarmTypesBuffer:[CloudWatchClientTypes.AlarmType]? = nil - if let alarmTypesContainer = alarmTypesContainer { - alarmTypesBuffer = [CloudWatchClientTypes.AlarmType]() - for enumContainer0 in alarmTypesContainer { - alarmTypesBuffer?.append(enumContainer0) - } - } - alarmTypes = alarmTypesBuffer - } else { - alarmTypes = [] - } - } else { - alarmTypes = nil - } - let childrenOfAlarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .childrenOfAlarmName) - childrenOfAlarmName = childrenOfAlarmNameDecoded - let parentsOfAlarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parentsOfAlarmName) - parentsOfAlarmName = parentsOfAlarmNameDecoded - let stateValueDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StateValue.self, forKey: .stateValue) - stateValue = stateValueDecoded - let actionPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionPrefix) - actionPrefix = actionPrefixDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeAlarmsOutput { -extension DescribeAlarmsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAlarmsOutputBody = try responseDecoder.decode(responseBody: data) - self.compositeAlarms = output.compositeAlarms - self.metricAlarms = output.metricAlarms - self.nextToken = output.nextToken - } else { - self.compositeAlarms = nil - self.metricAlarms = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAlarmsResult"] + var value = DescribeAlarmsOutput() + value.compositeAlarms = try reader["CompositeAlarms"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.CompositeAlarm.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.metricAlarms = try reader["MetricAlarms"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricAlarm.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -2434,76 +1887,33 @@ public struct DescribeAlarmsOutput: Swift.Equatable { } } -struct DescribeAlarmsOutputBody: Swift.Equatable { - let compositeAlarms: [CloudWatchClientTypes.CompositeAlarm]? - let metricAlarms: [CloudWatchClientTypes.MetricAlarm]? - let nextToken: Swift.String? -} - -extension DescribeAlarmsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case compositeAlarms = "CompositeAlarms" - case metricAlarms = "MetricAlarms" - case nextToken = "NextToken" - } +enum DescribeAlarmsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAlarmsResult")) - if containerValues.contains(.compositeAlarms) { - struct KeyVal0{struct member{}} - let compositeAlarmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .compositeAlarms) - if let compositeAlarmsWrappedContainer = compositeAlarmsWrappedContainer { - let compositeAlarmsContainer = try compositeAlarmsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.CompositeAlarm].self, forKey: .member) - var compositeAlarmsBuffer:[CloudWatchClientTypes.CompositeAlarm]? = nil - if let compositeAlarmsContainer = compositeAlarmsContainer { - compositeAlarmsBuffer = [CloudWatchClientTypes.CompositeAlarm]() - for structureContainer0 in compositeAlarmsContainer { - compositeAlarmsBuffer?.append(structureContainer0) - } - } - compositeAlarms = compositeAlarmsBuffer - } else { - compositeAlarms = [] - } - } else { - compositeAlarms = nil - } - if containerValues.contains(.metricAlarms) { - struct KeyVal0{struct member{}} - let metricAlarmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricAlarms) - if let metricAlarmsWrappedContainer = metricAlarmsWrappedContainer { - let metricAlarmsContainer = try metricAlarmsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricAlarm].self, forKey: .member) - var metricAlarmsBuffer:[CloudWatchClientTypes.MetricAlarm]? = nil - if let metricAlarmsContainer = metricAlarmsContainer { - metricAlarmsBuffer = [CloudWatchClientTypes.MetricAlarm]() - for structureContainer0 in metricAlarmsContainer { - metricAlarmsBuffer?.append(structureContainer0) - } - } - metricAlarms = metricAlarmsBuffer - } else { - metricAlarms = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - metricAlarms = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeAlarmsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeAnomalyDetectorsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case anomalyDetectorTypes = "AnomalyDetectorTypes" + case dimensions = "Dimensions" + case maxResults = "MaxResults" + case metricName = "MetricName" + case namespace = "Namespace" + case nextToken = "NextToken" } -} -extension DescribeAnomalyDetectorsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let anomalyDetectorTypes = anomalyDetectorTypes { @@ -2586,86 +1996,16 @@ public struct DescribeAnomalyDetectorsInput: Swift.Equatable { } } -struct DescribeAnomalyDetectorsInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxResults: Swift.Int? - let namespace: Swift.String? - let metricName: Swift.String? - let dimensions: [CloudWatchClientTypes.Dimension]? - let anomalyDetectorTypes: [CloudWatchClientTypes.AnomalyDetectorType]? -} - -extension DescribeAnomalyDetectorsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case anomalyDetectorTypes = "AnomalyDetectorTypes" - case dimensions = "Dimensions" - case maxResults = "MaxResults" - case metricName = "MetricName" - case namespace = "Namespace" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil - } - if containerValues.contains(.anomalyDetectorTypes) { - struct KeyVal0{struct member{}} - let anomalyDetectorTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .anomalyDetectorTypes) - if let anomalyDetectorTypesWrappedContainer = anomalyDetectorTypesWrappedContainer { - let anomalyDetectorTypesContainer = try anomalyDetectorTypesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.AnomalyDetectorType].self, forKey: .member) - var anomalyDetectorTypesBuffer:[CloudWatchClientTypes.AnomalyDetectorType]? = nil - if let anomalyDetectorTypesContainer = anomalyDetectorTypesContainer { - anomalyDetectorTypesBuffer = [CloudWatchClientTypes.AnomalyDetectorType]() - for enumContainer0 in anomalyDetectorTypesContainer { - anomalyDetectorTypesBuffer?.append(enumContainer0) - } - } - anomalyDetectorTypes = anomalyDetectorTypesBuffer - } else { - anomalyDetectorTypes = [] - } - } else { - anomalyDetectorTypes = nil - } - } -} +extension DescribeAnomalyDetectorsOutput { -extension DescribeAnomalyDetectorsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAnomalyDetectorsOutputBody = try responseDecoder.decode(responseBody: data) - self.anomalyDetectors = output.anomalyDetectors - self.nextToken = output.nextToken - } else { - self.anomalyDetectors = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAnomalyDetectorsResult"] + var value = DescribeAnomalyDetectorsOutput() + value.anomalyDetectors = try reader["AnomalyDetectors"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.AnomalyDetector.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -2686,58 +2026,32 @@ public struct DescribeAnomalyDetectorsOutput: Swift.Equatable { } } -struct DescribeAnomalyDetectorsOutputBody: Swift.Equatable { - let anomalyDetectors: [CloudWatchClientTypes.AnomalyDetector]? - let nextToken: Swift.String? -} +enum DescribeAnomalyDetectorsOutputError { -extension DescribeAnomalyDetectorsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case anomalyDetectors = "AnomalyDetectors" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAnomalyDetectorsResult")) - if containerValues.contains(.anomalyDetectors) { - struct KeyVal0{struct member{}} - let anomalyDetectorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .anomalyDetectors) - if let anomalyDetectorsWrappedContainer = anomalyDetectorsWrappedContainer { - let anomalyDetectorsContainer = try anomalyDetectorsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.AnomalyDetector].self, forKey: .member) - var anomalyDetectorsBuffer:[CloudWatchClientTypes.AnomalyDetector]? = nil - if let anomalyDetectorsContainer = anomalyDetectorsContainer { - anomalyDetectorsBuffer = [CloudWatchClientTypes.AnomalyDetector]() - for structureContainer0 in anomalyDetectorsContainer { - anomalyDetectorsBuffer?.append(structureContainer0) - } - } - anomalyDetectors = anomalyDetectorsBuffer - } else { - anomalyDetectors = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - anomalyDetectors = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeAnomalyDetectorsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeInsightRulesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" } -} -extension DescribeInsightRulesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -2774,36 +2088,16 @@ public struct DescribeInsightRulesInput: Swift.Equatable { } } -struct DescribeInsightRulesInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeInsightRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeInsightRulesOutput { -extension DescribeInsightRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInsightRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.insightRules = output.insightRules - self.nextToken = output.nextToken - } else { - self.insightRules = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeInsightRulesResult"] + var value = DescribeInsightRulesOutput() + value.insightRules = try reader["InsightRules"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.InsightRule.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -2824,55 +2118,24 @@ public struct DescribeInsightRulesOutput: Swift.Equatable { } } -struct DescribeInsightRulesOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let insightRules: [CloudWatchClientTypes.InsightRule]? -} +enum DescribeInsightRulesOutputError { -extension DescribeInsightRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case insightRules = "InsightRules" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeInsightRulesResult")) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.insightRules) { - struct KeyVal0{struct member{}} - let insightRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .insightRules) - if let insightRulesWrappedContainer = insightRulesWrappedContainer { - let insightRulesContainer = try insightRulesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.InsightRule].self, forKey: .member) - var insightRulesBuffer:[CloudWatchClientTypes.InsightRule]? = nil - if let insightRulesContainer = insightRulesContainer { - insightRulesBuffer = [CloudWatchClientTypes.InsightRule]() - for structureContainer0 in insightRulesContainer { - insightRulesBuffer?.append(structureContainer0) - } - } - insightRules = insightRulesBuffer - } else { - insightRules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - insightRules = nil } } } -enum DescribeInsightRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension CloudWatchClientTypes.Dimension: Swift.Codable { +extension CloudWatchClientTypes.Dimension: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case value = "Value" @@ -2888,12 +2151,14 @@ extension CloudWatchClientTypes.Dimension: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.Dimension() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -2919,7 +2184,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.DimensionFilter: Swift.Codable { +extension CloudWatchClientTypes.DimensionFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case value = "Value" @@ -2935,12 +2200,14 @@ extension CloudWatchClientTypes.DimensionFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.DimensionFilter() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -2966,6 +2233,10 @@ extension CloudWatchClientTypes { } extension DisableAlarmActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case alarmNames = "AlarmNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let alarmNames = alarmNames { @@ -3005,59 +2276,41 @@ public struct DisableAlarmActionsInput: Swift.Equatable { } } -struct DisableAlarmActionsInputBody: Swift.Equatable { - let alarmNames: [Swift.String]? -} +extension DisableAlarmActionsOutput { -extension DisableAlarmActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmNames = "AlarmNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.alarmNames) { - struct KeyVal0{struct member{}} - let alarmNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmNames) - if let alarmNamesWrappedContainer = alarmNamesWrappedContainer { - let alarmNamesContainer = try alarmNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmNamesBuffer:[Swift.String]? = nil - if let alarmNamesContainer = alarmNamesContainer { - alarmNamesBuffer = [Swift.String]() - for stringContainer0 in alarmNamesContainer { - alarmNamesBuffer?.append(stringContainer0) - } - } - alarmNames = alarmNamesBuffer - } else { - alarmNames = [] - } - } else { - alarmNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DisableAlarmActionsOutput() } } } -extension DisableAlarmActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DisableAlarmActionsOutput: Swift.Equatable { public init() { } } -enum DisableAlarmActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DisableAlarmActionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DisableInsightRulesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleNames = "RuleNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleNames = ruleNames { @@ -3097,47 +2350,15 @@ public struct DisableInsightRulesInput: Swift.Equatable { } } -struct DisableInsightRulesInputBody: Swift.Equatable { - let ruleNames: [Swift.String]? -} - -extension DisableInsightRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleNames = "RuleNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ruleNames) { - struct KeyVal0{struct member{}} - let ruleNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleNames) - if let ruleNamesWrappedContainer = ruleNamesWrappedContainer { - let ruleNamesContainer = try ruleNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ruleNamesBuffer:[Swift.String]? = nil - if let ruleNamesContainer = ruleNamesContainer { - ruleNamesBuffer = [Swift.String]() - for stringContainer0 in ruleNamesContainer { - ruleNamesBuffer?.append(stringContainer0) - } - } - ruleNames = ruleNamesBuffer - } else { - ruleNames = [] - } - } else { - ruleNames = nil - } - } -} +extension DisableInsightRulesOutput { -extension DisableInsightRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableInsightRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.failures = output.failures - } else { - self.failures = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DisableInsightRulesResult"] + var value = DisableInsightRulesOutput() + value.failures = try reader["Failures"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.PartialFailure.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3154,52 +2375,29 @@ public struct DisableInsightRulesOutput: Swift.Equatable { } } -struct DisableInsightRulesOutputBody: Swift.Equatable { - let failures: [CloudWatchClientTypes.PartialFailure]? -} +enum DisableInsightRulesOutputError { -extension DisableInsightRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failures = "Failures" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DisableInsightRulesResult")) - if containerValues.contains(.failures) { - struct KeyVal0{struct member{}} - let failuresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failures) - if let failuresWrappedContainer = failuresWrappedContainer { - let failuresContainer = try failuresWrappedContainer.decodeIfPresent([CloudWatchClientTypes.PartialFailure].self, forKey: .member) - var failuresBuffer:[CloudWatchClientTypes.PartialFailure]? = nil - if let failuresContainer = failuresContainer { - failuresBuffer = [CloudWatchClientTypes.PartialFailure]() - for structureContainer0 in failuresContainer { - failuresBuffer?.append(structureContainer0) - } - } - failures = failuresBuffer - } else { - failures = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - failures = nil } } } -enum DisableInsightRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension EnableAlarmActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case alarmNames = "AlarmNames" } -} -extension EnableAlarmActionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let alarmNames = alarmNames { @@ -3239,59 +2437,41 @@ public struct EnableAlarmActionsInput: Swift.Equatable { } } -struct EnableAlarmActionsInputBody: Swift.Equatable { - let alarmNames: [Swift.String]? -} +extension EnableAlarmActionsOutput { -extension EnableAlarmActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmNames = "AlarmNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.alarmNames) { - struct KeyVal0{struct member{}} - let alarmNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmNames) - if let alarmNamesWrappedContainer = alarmNamesWrappedContainer { - let alarmNamesContainer = try alarmNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmNamesBuffer:[Swift.String]? = nil - if let alarmNamesContainer = alarmNamesContainer { - alarmNamesBuffer = [Swift.String]() - for stringContainer0 in alarmNamesContainer { - alarmNamesBuffer?.append(stringContainer0) - } - } - alarmNames = alarmNamesBuffer - } else { - alarmNames = [] - } - } else { - alarmNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return EnableAlarmActionsOutput() } } } -extension EnableAlarmActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct EnableAlarmActionsOutput: Swift.Equatable { public init() { } } -enum EnableAlarmActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum EnableAlarmActionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension EnableInsightRulesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleNames = "RuleNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleNames = ruleNames { @@ -3331,47 +2511,15 @@ public struct EnableInsightRulesInput: Swift.Equatable { } } -struct EnableInsightRulesInputBody: Swift.Equatable { - let ruleNames: [Swift.String]? -} - -extension EnableInsightRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleNames = "RuleNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ruleNames) { - struct KeyVal0{struct member{}} - let ruleNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleNames) - if let ruleNamesWrappedContainer = ruleNamesWrappedContainer { - let ruleNamesContainer = try ruleNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ruleNamesBuffer:[Swift.String]? = nil - if let ruleNamesContainer = ruleNamesContainer { - ruleNamesBuffer = [Swift.String]() - for stringContainer0 in ruleNamesContainer { - ruleNamesBuffer?.append(stringContainer0) - } - } - ruleNames = ruleNamesBuffer - } else { - ruleNames = [] - } - } else { - ruleNames = nil - } - } -} +extension EnableInsightRulesOutput { -extension EnableInsightRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableInsightRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.failures = output.failures - } else { - self.failures = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["EnableInsightRulesResult"] + var value = EnableInsightRulesOutput() + value.failures = try reader["Failures"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.PartialFailure.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3388,48 +2536,21 @@ public struct EnableInsightRulesOutput: Swift.Equatable { } } -struct EnableInsightRulesOutputBody: Swift.Equatable { - let failures: [CloudWatchClientTypes.PartialFailure]? -} +enum EnableInsightRulesOutputError { -extension EnableInsightRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failures = "Failures" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("EnableInsightRulesResult")) - if containerValues.contains(.failures) { - struct KeyVal0{struct member{}} - let failuresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failures) - if let failuresWrappedContainer = failuresWrappedContainer { - let failuresContainer = try failuresWrappedContainer.decodeIfPresent([CloudWatchClientTypes.PartialFailure].self, forKey: .member) - var failuresBuffer:[CloudWatchClientTypes.PartialFailure]? = nil - if let failuresContainer = failuresContainer { - failuresBuffer = [CloudWatchClientTypes.PartialFailure]() - for structureContainer0 in failuresContainer { - failuresBuffer?.append(structureContainer0) - } - } - failures = failuresBuffer - } else { - failures = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - failures = nil - } - } -} - -enum EnableInsightRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -3464,6 +2585,10 @@ extension CloudWatchClientTypes { } extension GetDashboardInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dashboardName = "DashboardName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dashboardName = dashboardName { @@ -3494,34 +2619,17 @@ public struct GetDashboardInput: Swift.Equatable { } } -struct GetDashboardInputBody: Swift.Equatable { - let dashboardName: Swift.String? -} +extension GetDashboardOutput { -extension GetDashboardInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dashboardName = "DashboardName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dashboardNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardName) - dashboardName = dashboardNameDecoded - } -} - -extension GetDashboardOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetDashboardOutputBody = try responseDecoder.decode(responseBody: data) - self.dashboardArn = output.dashboardArn - self.dashboardBody = output.dashboardBody - self.dashboardName = output.dashboardName - } else { - self.dashboardArn = nil - self.dashboardBody = nil - self.dashboardName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetDashboardResult"] + var value = GetDashboardOutput() + value.dashboardArn = try reader["DashboardArn"].readIfPresent() + value.dashboardBody = try reader["DashboardBody"].readIfPresent() + value.dashboardName = try reader["DashboardName"].readIfPresent() + return value } } } @@ -3546,44 +2654,36 @@ public struct GetDashboardOutput: Swift.Equatable { } } -struct GetDashboardOutputBody: Swift.Equatable { - let dashboardArn: Swift.String? - let dashboardBody: Swift.String? - let dashboardName: Swift.String? -} - -extension GetDashboardOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dashboardArn = "DashboardArn" - case dashboardBody = "DashboardBody" - case dashboardName = "DashboardName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetDashboardResult")) - let dashboardArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardArn) - dashboardArn = dashboardArnDecoded - let dashboardBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardBody) - dashboardBody = dashboardBodyDecoded - let dashboardNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardName) - dashboardName = dashboardNameDecoded - } -} +enum GetDashboardOutputError { -enum GetDashboardOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFound": return try await DashboardNotFoundError(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceNotFound": return try await DashboardNotFoundError.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetInsightRuleReportInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case endTime = "EndTime" + case maxContributorCount = "MaxContributorCount" + case metrics = "Metrics" + case orderBy = "OrderBy" + case period = "Period" + case ruleName = "RuleName" + case startTime = "StartTime" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let endTime = endTime { @@ -3682,81 +2782,20 @@ public struct GetInsightRuleReportInput: Swift.Equatable { } } -struct GetInsightRuleReportInputBody: Swift.Equatable { - let ruleName: Swift.String? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let period: Swift.Int? - let maxContributorCount: Swift.Int? - let metrics: [Swift.String]? - let orderBy: Swift.String? -} - -extension GetInsightRuleReportInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endTime = "EndTime" - case maxContributorCount = "MaxContributorCount" - case metrics = "Metrics" - case orderBy = "OrderBy" - case period = "Period" - case ruleName = "RuleName" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleName) - ruleName = ruleNameDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let periodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .period) - period = periodDecoded - let maxContributorCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxContributorCount) - maxContributorCount = maxContributorCountDecoded - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var metricsBuffer:[Swift.String]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [Swift.String]() - for stringContainer0 in metricsContainer { - metricsBuffer?.append(stringContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] - } - } else { - metrics = nil - } - let orderByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .orderBy) - orderBy = orderByDecoded - } -} +extension GetInsightRuleReportOutput { -extension GetInsightRuleReportOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetInsightRuleReportOutputBody = try responseDecoder.decode(responseBody: data) - self.aggregateValue = output.aggregateValue - self.aggregationStatistic = output.aggregationStatistic - self.approximateUniqueCount = output.approximateUniqueCount - self.contributors = output.contributors - self.keyLabels = output.keyLabels - self.metricDatapoints = output.metricDatapoints - } else { - self.aggregateValue = nil - self.aggregationStatistic = nil - self.approximateUniqueCount = nil - self.contributors = nil - self.keyLabels = nil - self.metricDatapoints = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetInsightRuleReportResult"] + var value = GetInsightRuleReportOutput() + value.aggregateValue = try reader["AggregateValue"].readIfPresent() + value.aggregationStatistic = try reader["AggregationStatistic"].readIfPresent() + value.approximateUniqueCount = try reader["ApproximateUniqueCount"].readIfPresent() + value.contributors = try reader["Contributors"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.InsightRuleContributor.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.keyLabels = try reader["KeyLabels"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.metricDatapoints = try reader["MetricDatapoints"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.InsightRuleMetricDatapoint.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3793,107 +2832,36 @@ public struct GetInsightRuleReportOutput: Swift.Equatable { } } -struct GetInsightRuleReportOutputBody: Swift.Equatable { - let keyLabels: [Swift.String]? - let aggregationStatistic: Swift.String? - let aggregateValue: Swift.Double? - let approximateUniqueCount: Swift.Int? - let contributors: [CloudWatchClientTypes.InsightRuleContributor]? - let metricDatapoints: [CloudWatchClientTypes.InsightRuleMetricDatapoint]? -} +enum GetInsightRuleReportOutputError { -extension GetInsightRuleReportOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case aggregateValue = "AggregateValue" - case aggregationStatistic = "AggregationStatistic" - case approximateUniqueCount = "ApproximateUniqueCount" - case contributors = "Contributors" - case keyLabels = "KeyLabels" - case metricDatapoints = "MetricDatapoints" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetInsightRuleReportResult")) - if containerValues.contains(.keyLabels) { - struct KeyVal0{struct member{}} - let keyLabelsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .keyLabels) - if let keyLabelsWrappedContainer = keyLabelsWrappedContainer { - let keyLabelsContainer = try keyLabelsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var keyLabelsBuffer:[Swift.String]? = nil - if let keyLabelsContainer = keyLabelsContainer { - keyLabelsBuffer = [Swift.String]() - for stringContainer0 in keyLabelsContainer { - keyLabelsBuffer?.append(stringContainer0) - } - } - keyLabels = keyLabelsBuffer - } else { - keyLabels = [] - } - } else { - keyLabels = nil - } - let aggregationStatisticDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .aggregationStatistic) - aggregationStatistic = aggregationStatisticDecoded - let aggregateValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .aggregateValue) - aggregateValue = aggregateValueDecoded - let approximateUniqueCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .approximateUniqueCount) - approximateUniqueCount = approximateUniqueCountDecoded - if containerValues.contains(.contributors) { - struct KeyVal0{struct member{}} - let contributorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .contributors) - if let contributorsWrappedContainer = contributorsWrappedContainer { - let contributorsContainer = try contributorsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.InsightRuleContributor].self, forKey: .member) - var contributorsBuffer:[CloudWatchClientTypes.InsightRuleContributor]? = nil - if let contributorsContainer = contributorsContainer { - contributorsBuffer = [CloudWatchClientTypes.InsightRuleContributor]() - for structureContainer0 in contributorsContainer { - contributorsBuffer?.append(structureContainer0) - } - } - contributors = contributorsBuffer - } else { - contributors = [] - } - } else { - contributors = nil - } - if containerValues.contains(.metricDatapoints) { - struct KeyVal0{struct member{}} - let metricDatapointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricDatapoints) - if let metricDatapointsWrappedContainer = metricDatapointsWrappedContainer { - let metricDatapointsContainer = try metricDatapointsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.InsightRuleMetricDatapoint].self, forKey: .member) - var metricDatapointsBuffer:[CloudWatchClientTypes.InsightRuleMetricDatapoint]? = nil - if let metricDatapointsContainer = metricDatapointsContainer { - metricDatapointsBuffer = [CloudWatchClientTypes.InsightRuleMetricDatapoint]() - for structureContainer0 in metricDatapointsContainer { - metricDatapointsBuffer?.append(structureContainer0) - } - } - metricDatapoints = metricDatapointsBuffer - } else { - metricDatapoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - metricDatapoints = nil } } } -enum GetInsightRuleReportOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetMetricDataInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case endTime = "EndTime" + case labelOptions = "LabelOptions" + case maxDatapoints = "MaxDatapoints" + case metricDataQueries = "MetricDataQueries" + case nextToken = "NextToken" + case scanBy = "ScanBy" + case startTime = "StartTime" } -} -extension GetMetricDataInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let endTime = endTime { @@ -3986,75 +2954,17 @@ public struct GetMetricDataInput: Swift.Equatable { } } -struct GetMetricDataInputBody: Swift.Equatable { - let metricDataQueries: [CloudWatchClientTypes.MetricDataQuery]? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let nextToken: Swift.String? - let scanBy: CloudWatchClientTypes.ScanBy? - let maxDatapoints: Swift.Int? - let labelOptions: CloudWatchClientTypes.LabelOptions? -} - -extension GetMetricDataInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endTime = "EndTime" - case labelOptions = "LabelOptions" - case maxDatapoints = "MaxDatapoints" - case metricDataQueries = "MetricDataQueries" - case nextToken = "NextToken" - case scanBy = "ScanBy" - case startTime = "StartTime" - } +extension GetMetricDataOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.metricDataQueries) { - struct KeyVal0{struct member{}} - let metricDataQueriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricDataQueries) - if let metricDataQueriesWrappedContainer = metricDataQueriesWrappedContainer { - let metricDataQueriesContainer = try metricDataQueriesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricDataQuery].self, forKey: .member) - var metricDataQueriesBuffer:[CloudWatchClientTypes.MetricDataQuery]? = nil - if let metricDataQueriesContainer = metricDataQueriesContainer { - metricDataQueriesBuffer = [CloudWatchClientTypes.MetricDataQuery]() - for structureContainer0 in metricDataQueriesContainer { - metricDataQueriesBuffer?.append(structureContainer0) - } - } - metricDataQueries = metricDataQueriesBuffer - } else { - metricDataQueries = [] - } - } else { - metricDataQueries = nil - } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let scanByDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.ScanBy.self, forKey: .scanBy) - scanBy = scanByDecoded - let maxDatapointsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxDatapoints) - maxDatapoints = maxDatapointsDecoded - let labelOptionsDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.LabelOptions.self, forKey: .labelOptions) - labelOptions = labelOptionsDecoded - } -} - -extension GetMetricDataOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMetricDataOutputBody = try responseDecoder.decode(responseBody: data) - self.messages = output.messages - self.metricDataResults = output.metricDataResults - self.nextToken = output.nextToken - } else { - self.messages = nil - self.metricDataResults = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetMetricDataResult"] + var value = GetMetricDataOutput() + value.messages = try reader["Messages"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MessageData.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.metricDataResults = try reader["MetricDataResults"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricDataResult.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -4079,76 +2989,36 @@ public struct GetMetricDataOutput: Swift.Equatable { } } -struct GetMetricDataOutputBody: Swift.Equatable { - let metricDataResults: [CloudWatchClientTypes.MetricDataResult]? - let nextToken: Swift.String? - let messages: [CloudWatchClientTypes.MessageData]? -} +enum GetMetricDataOutputError { -extension GetMetricDataOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case messages = "Messages" - case metricDataResults = "MetricDataResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetMetricDataResult")) - if containerValues.contains(.metricDataResults) { - struct KeyVal0{struct member{}} - let metricDataResultsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricDataResults) - if let metricDataResultsWrappedContainer = metricDataResultsWrappedContainer { - let metricDataResultsContainer = try metricDataResultsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricDataResult].self, forKey: .member) - var metricDataResultsBuffer:[CloudWatchClientTypes.MetricDataResult]? = nil - if let metricDataResultsContainer = metricDataResultsContainer { - metricDataResultsBuffer = [CloudWatchClientTypes.MetricDataResult]() - for structureContainer0 in metricDataResultsContainer { - metricDataResultsBuffer?.append(structureContainer0) - } - } - metricDataResults = metricDataResultsBuffer - } else { - metricDataResults = [] - } - } else { - metricDataResults = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.messages) { - struct KeyVal0{struct member{}} - let messagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .messages) - if let messagesWrappedContainer = messagesWrappedContainer { - let messagesContainer = try messagesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MessageData].self, forKey: .member) - var messagesBuffer:[CloudWatchClientTypes.MessageData]? = nil - if let messagesContainer = messagesContainer { - messagesBuffer = [CloudWatchClientTypes.MessageData]() - for structureContainer0 in messagesContainer { - messagesBuffer?.append(structureContainer0) - } - } - messages = messagesBuffer - } else { - messages = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - messages = nil } } } -enum GetMetricDataOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetMetricStatisticsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dimensions = "Dimensions" + case endTime = "EndTime" + case extendedStatistics = "ExtendedStatistics" + case metricName = "MetricName" + case namespace = "Namespace" + case period = "Period" + case startTime = "StartTime" + case statistics = "Statistics" + case unit = "Unit" } -} -extension GetMetricStatisticsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dimensions = dimensions { @@ -4281,115 +3151,16 @@ public struct GetMetricStatisticsInput: Swift.Equatable { } } -struct GetMetricStatisticsInputBody: Swift.Equatable { - let namespace: Swift.String? - let metricName: Swift.String? - let dimensions: [CloudWatchClientTypes.Dimension]? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let period: Swift.Int? - let statistics: [CloudWatchClientTypes.Statistic]? - let extendedStatistics: [Swift.String]? - let unit: CloudWatchClientTypes.StandardUnit? -} - -extension GetMetricStatisticsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dimensions = "Dimensions" - case endTime = "EndTime" - case extendedStatistics = "ExtendedStatistics" - case metricName = "MetricName" - case namespace = "Namespace" - case period = "Period" - case startTime = "StartTime" - case statistics = "Statistics" - case unit = "Unit" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil - } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let periodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .period) - period = periodDecoded - if containerValues.contains(.statistics) { - struct KeyVal0{struct member{}} - let statisticsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statistics) - if let statisticsWrappedContainer = statisticsWrappedContainer { - let statisticsContainer = try statisticsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Statistic].self, forKey: .member) - var statisticsBuffer:[CloudWatchClientTypes.Statistic]? = nil - if let statisticsContainer = statisticsContainer { - statisticsBuffer = [CloudWatchClientTypes.Statistic]() - for enumContainer0 in statisticsContainer { - statisticsBuffer?.append(enumContainer0) - } - } - statistics = statisticsBuffer - } else { - statistics = [] - } - } else { - statistics = nil - } - if containerValues.contains(.extendedStatistics) { - struct KeyVal0{struct member{}} - let extendedStatisticsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .extendedStatistics) - if let extendedStatisticsWrappedContainer = extendedStatisticsWrappedContainer { - let extendedStatisticsContainer = try extendedStatisticsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var extendedStatisticsBuffer:[Swift.String]? = nil - if let extendedStatisticsContainer = extendedStatisticsContainer { - extendedStatisticsBuffer = [Swift.String]() - for stringContainer0 in extendedStatisticsContainer { - extendedStatisticsBuffer?.append(stringContainer0) - } - } - extendedStatistics = extendedStatisticsBuffer - } else { - extendedStatistics = [] - } - } else { - extendedStatistics = nil - } - let unitDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StandardUnit.self, forKey: .unit) - unit = unitDecoded - } -} +extension GetMetricStatisticsOutput { -extension GetMetricStatisticsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMetricStatisticsOutputBody = try responseDecoder.decode(responseBody: data) - self.datapoints = output.datapoints - self.label = output.label - } else { - self.datapoints = nil - self.label = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetMetricStatisticsResult"] + var value = GetMetricStatisticsOutput() + value.datapoints = try reader["Datapoints"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Datapoint.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.label = try reader["Label"].readIfPresent() + return value } } } @@ -4410,58 +3181,31 @@ public struct GetMetricStatisticsOutput: Swift.Equatable { } } -struct GetMetricStatisticsOutputBody: Swift.Equatable { - let label: Swift.String? - let datapoints: [CloudWatchClientTypes.Datapoint]? -} +enum GetMetricStatisticsOutputError { -extension GetMetricStatisticsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case datapoints = "Datapoints" - case label = "Label" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetMetricStatisticsResult")) - let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) - label = labelDecoded - if containerValues.contains(.datapoints) { - struct KeyVal0{struct member{}} - let datapointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .datapoints) - if let datapointsWrappedContainer = datapointsWrappedContainer { - let datapointsContainer = try datapointsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Datapoint].self, forKey: .member) - var datapointsBuffer:[CloudWatchClientTypes.Datapoint]? = nil - if let datapointsContainer = datapointsContainer { - datapointsBuffer = [CloudWatchClientTypes.Datapoint]() - for structureContainer0 in datapointsContainer { - datapointsBuffer?.append(structureContainer0) - } - } - datapoints = datapointsBuffer - } else { - datapoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - datapoints = nil } } } -enum GetMetricStatisticsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetMetricStreamInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case name = "Name" } -} -extension GetMetricStreamInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let name = name { @@ -4492,52 +3236,26 @@ public struct GetMetricStreamInput: Swift.Equatable { } } -struct GetMetricStreamInputBody: Swift.Equatable { - let name: Swift.String? -} +extension GetMetricStreamOutput { -extension GetMetricStreamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - } -} - -extension GetMetricStreamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMetricStreamOutputBody = try responseDecoder.decode(responseBody: data) - self.arn = output.arn - self.creationDate = output.creationDate - self.excludeFilters = output.excludeFilters - self.firehoseArn = output.firehoseArn - self.includeFilters = output.includeFilters - self.includeLinkedAccountsMetrics = output.includeLinkedAccountsMetrics - self.lastUpdateDate = output.lastUpdateDate - self.name = output.name - self.outputFormat = output.outputFormat - self.roleArn = output.roleArn - self.state = output.state - self.statisticsConfigurations = output.statisticsConfigurations - } else { - self.arn = nil - self.creationDate = nil - self.excludeFilters = nil - self.firehoseArn = nil - self.includeFilters = nil - self.includeLinkedAccountsMetrics = nil - self.lastUpdateDate = nil - self.name = nil - self.outputFormat = nil - self.roleArn = nil - self.state = nil - self.statisticsConfigurations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetMetricStreamResult"] + var value = GetMetricStreamOutput() + value.arn = try reader["Arn"].readIfPresent() + value.creationDate = try reader["CreationDate"].readTimestampIfPresent(format: .dateTime) + value.excludeFilters = try reader["ExcludeFilters"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricStreamFilter.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.firehoseArn = try reader["FirehoseArn"].readIfPresent() + value.includeFilters = try reader["IncludeFilters"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricStreamFilter.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.includeLinkedAccountsMetrics = try reader["IncludeLinkedAccountsMetrics"].readIfPresent() + value.lastUpdateDate = try reader["LastUpdateDate"].readTimestampIfPresent(format: .dateTime) + value.name = try reader["Name"].readIfPresent() + value.outputFormat = try reader["OutputFormat"].readIfPresent() + value.roleArn = try reader["RoleArn"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.statisticsConfigurations = try reader["StatisticsConfigurations"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricStreamStatisticsConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4598,133 +3316,33 @@ public struct GetMetricStreamOutput: Swift.Equatable { } } -struct GetMetricStreamOutputBody: Swift.Equatable { - let arn: Swift.String? - let name: Swift.String? - let includeFilters: [CloudWatchClientTypes.MetricStreamFilter]? - let excludeFilters: [CloudWatchClientTypes.MetricStreamFilter]? - let firehoseArn: Swift.String? - let roleArn: Swift.String? - let state: Swift.String? - let creationDate: ClientRuntime.Date? - let lastUpdateDate: ClientRuntime.Date? - let outputFormat: CloudWatchClientTypes.MetricStreamOutputFormat? - let statisticsConfigurations: [CloudWatchClientTypes.MetricStreamStatisticsConfiguration]? - let includeLinkedAccountsMetrics: Swift.Bool? -} - -extension GetMetricStreamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case creationDate = "CreationDate" - case excludeFilters = "ExcludeFilters" - case firehoseArn = "FirehoseArn" - case includeFilters = "IncludeFilters" - case includeLinkedAccountsMetrics = "IncludeLinkedAccountsMetrics" - case lastUpdateDate = "LastUpdateDate" - case name = "Name" - case outputFormat = "OutputFormat" - case roleArn = "RoleArn" - case state = "State" - case statisticsConfigurations = "StatisticsConfigurations" - } +enum GetMetricStreamOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetMetricStreamResult")) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.includeFilters) { - struct KeyVal0{struct member{}} - let includeFiltersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .includeFilters) - if let includeFiltersWrappedContainer = includeFiltersWrappedContainer { - let includeFiltersContainer = try includeFiltersWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricStreamFilter].self, forKey: .member) - var includeFiltersBuffer:[CloudWatchClientTypes.MetricStreamFilter]? = nil - if let includeFiltersContainer = includeFiltersContainer { - includeFiltersBuffer = [CloudWatchClientTypes.MetricStreamFilter]() - for structureContainer0 in includeFiltersContainer { - includeFiltersBuffer?.append(structureContainer0) - } - } - includeFilters = includeFiltersBuffer - } else { - includeFilters = [] - } - } else { - includeFilters = nil - } - if containerValues.contains(.excludeFilters) { - struct KeyVal0{struct member{}} - let excludeFiltersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludeFilters) - if let excludeFiltersWrappedContainer = excludeFiltersWrappedContainer { - let excludeFiltersContainer = try excludeFiltersWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricStreamFilter].self, forKey: .member) - var excludeFiltersBuffer:[CloudWatchClientTypes.MetricStreamFilter]? = nil - if let excludeFiltersContainer = excludeFiltersContainer { - excludeFiltersBuffer = [CloudWatchClientTypes.MetricStreamFilter]() - for structureContainer0 in excludeFiltersContainer { - excludeFiltersBuffer?.append(structureContainer0) - } - } - excludeFilters = excludeFiltersBuffer - } else { - excludeFilters = [] - } - } else { - excludeFilters = nil - } - let firehoseArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .firehoseArn) - firehoseArn = firehoseArnDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let creationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationDate) - creationDate = creationDateDecoded - let lastUpdateDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdateDate) - lastUpdateDate = lastUpdateDateDecoded - let outputFormatDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.MetricStreamOutputFormat.self, forKey: .outputFormat) - outputFormat = outputFormatDecoded - if containerValues.contains(.statisticsConfigurations) { - struct KeyVal0{struct member{}} - let statisticsConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statisticsConfigurations) - if let statisticsConfigurationsWrappedContainer = statisticsConfigurationsWrappedContainer { - let statisticsConfigurationsContainer = try statisticsConfigurationsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricStreamStatisticsConfiguration].self, forKey: .member) - var statisticsConfigurationsBuffer:[CloudWatchClientTypes.MetricStreamStatisticsConfiguration]? = nil - if let statisticsConfigurationsContainer = statisticsConfigurationsContainer { - statisticsConfigurationsBuffer = [CloudWatchClientTypes.MetricStreamStatisticsConfiguration]() - for structureContainer0 in statisticsConfigurationsContainer { - statisticsConfigurationsBuffer?.append(structureContainer0) - } - } - statisticsConfigurations = statisticsConfigurationsBuffer - } else { - statisticsConfigurations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - statisticsConfigurations = nil } - let includeLinkedAccountsMetricsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeLinkedAccountsMetrics) - includeLinkedAccountsMetrics = includeLinkedAccountsMetricsDecoded } } -enum GetMetricStreamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetMetricWidgetImageInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case metricWidget = "MetricWidget" + case outputFormat = "OutputFormat" } -} -extension GetMetricWidgetImageInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let metricWidget = metricWidget { @@ -4786,34 +3404,15 @@ public struct GetMetricWidgetImageInput: Swift.Equatable { } } -struct GetMetricWidgetImageInputBody: Swift.Equatable { - let metricWidget: Swift.String? - let outputFormat: Swift.String? -} - -extension GetMetricWidgetImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metricWidget = "MetricWidget" - case outputFormat = "OutputFormat" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricWidgetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricWidget) - metricWidget = metricWidgetDecoded - let outputFormatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outputFormat) - outputFormat = outputFormatDecoded - } -} +extension GetMetricWidgetImageOutput { -extension GetMetricWidgetImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMetricWidgetImageOutputBody = try responseDecoder.decode(responseBody: data) - self.metricWidgetImage = output.metricWidgetImage - } else { - self.metricWidgetImage = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetMetricWidgetImageResult"] + var value = GetMetricWidgetImageOutput() + value.metricWidgetImage = try reader["MetricWidgetImage"].readIfPresent() + return value } } } @@ -4830,36 +3429,18 @@ public struct GetMetricWidgetImageOutput: Swift.Equatable { } } -struct GetMetricWidgetImageOutputBody: Swift.Equatable { - let metricWidgetImage: ClientRuntime.Data? -} - -extension GetMetricWidgetImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metricWidgetImage = "MetricWidgetImage" - } +enum GetMetricWidgetImageOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetMetricWidgetImageResult")) - if containerValues.contains(.metricWidgetImage) { - do { - let metricWidgetImageDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .metricWidgetImage) - metricWidgetImage = metricWidgetImageDecoded - } catch { - metricWidgetImage = "".data(using: .utf8) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - metricWidgetImage = nil - } - } -} - -enum GetMetricWidgetImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -4899,7 +3480,7 @@ extension CloudWatchClientTypes { } } -extension CloudWatchClientTypes.InsightRule: Swift.Codable { +extension CloudWatchClientTypes.InsightRule: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case definition = "Definition" case managedRule = "ManagedRule" @@ -4927,18 +3508,17 @@ extension CloudWatchClientTypes.InsightRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let schemaDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .schema) - schema = schemaDecoded - let definitionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .definition) - definition = definitionDecoded - let managedRuleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .managedRule) - managedRule = managedRuleDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.InsightRule() + value.name = try reader["Name"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.schema = try reader["Schema"].readIfPresent() + value.definition = try reader["Definition"].readIfPresent() + value.managedRule = try reader["ManagedRule"].readIfPresent() + return value + } } } @@ -4978,7 +3558,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.InsightRuleContributor: Swift.Codable { +extension CloudWatchClientTypes.InsightRuleContributor: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case approximateAggregateValue = "ApproximateAggregateValue" case datapoints = "Datapoints" @@ -5016,47 +3596,14 @@ extension CloudWatchClientTypes.InsightRuleContributor: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.keys) { - struct KeyVal0{struct member{}} - let keysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .keys) - if let keysWrappedContainer = keysWrappedContainer { - let keysContainer = try keysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var keysBuffer:[Swift.String]? = nil - if let keysContainer = keysContainer { - keysBuffer = [Swift.String]() - for stringContainer0 in keysContainer { - keysBuffer?.append(stringContainer0) - } - } - keys = keysBuffer - } else { - keys = [] - } - } else { - keys = nil - } - let approximateAggregateValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .approximateAggregateValue) - approximateAggregateValue = approximateAggregateValueDecoded - if containerValues.contains(.datapoints) { - struct KeyVal0{struct member{}} - let datapointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .datapoints) - if let datapointsWrappedContainer = datapointsWrappedContainer { - let datapointsContainer = try datapointsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.InsightRuleContributorDatapoint].self, forKey: .member) - var datapointsBuffer:[CloudWatchClientTypes.InsightRuleContributorDatapoint]? = nil - if let datapointsContainer = datapointsContainer { - datapointsBuffer = [CloudWatchClientTypes.InsightRuleContributorDatapoint]() - for structureContainer0 in datapointsContainer { - datapointsBuffer?.append(structureContainer0) - } - } - datapoints = datapointsBuffer - } else { - datapoints = [] - } - } else { - datapoints = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.InsightRuleContributor() + value.keys = try reader["Keys"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.approximateAggregateValue = try reader["ApproximateAggregateValue"].readIfPresent() + value.datapoints = try reader["Datapoints"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.InsightRuleContributorDatapoint.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5088,7 +3635,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.InsightRuleContributorDatapoint: Swift.Codable { +extension CloudWatchClientTypes.InsightRuleContributorDatapoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case approximateValue = "ApproximateValue" case timestamp = "Timestamp" @@ -5104,12 +3651,14 @@ extension CloudWatchClientTypes.InsightRuleContributorDatapoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let approximateValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .approximateValue) - approximateValue = approximateValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.InsightRuleContributorDatapoint() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.approximateValue = try reader["ApproximateValue"].readIfPresent() + return value + } } } @@ -5135,7 +3684,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.InsightRuleMetricDatapoint: Swift.Codable { +extension CloudWatchClientTypes.InsightRuleMetricDatapoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case average = "Average" case maxContributorValue = "MaxContributorValue" @@ -5175,24 +3724,20 @@ extension CloudWatchClientTypes.InsightRuleMetricDatapoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let uniqueContributorsDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .uniqueContributors) - uniqueContributors = uniqueContributorsDecoded - let maxContributorValueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxContributorValue) - maxContributorValue = maxContributorValueDecoded - let sampleCountDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .sampleCount) - sampleCount = sampleCountDecoded - let averageDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .average) - average = averageDecoded - let sumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .sum) - sum = sumDecoded - let minimumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minimum) - minimum = minimumDecoded - let maximumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maximum) - maximum = maximumDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.InsightRuleMetricDatapoint() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.uniqueContributors = try reader["UniqueContributors"].readIfPresent() + value.maxContributorValue = try reader["MaxContributorValue"].readIfPresent() + value.sampleCount = try reader["SampleCount"].readIfPresent() + value.average = try reader["Average"].readIfPresent() + value.sum = try reader["Sum"].readIfPresent() + value.minimum = try reader["Minimum"].readIfPresent() + value.maximum = try reader["Maximum"].readIfPresent() + return value + } } } @@ -5242,16 +3787,14 @@ extension CloudWatchClientTypes { } extension InternalServiceFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InternalServiceFault() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5280,33 +3823,15 @@ public struct InternalServiceFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct InternalServiceFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InternalServiceFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidFormatFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidFormatFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5335,33 +3860,15 @@ public struct InvalidFormatFault: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct InvalidFormatFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidFormatFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidNextToken { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidNextToken() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5390,33 +3897,15 @@ public struct InvalidNextToken: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct InvalidNextTokenBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidNextTokenBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidParameterCombinationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidParameterCombinationException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5445,33 +3934,15 @@ public struct InvalidParameterCombinationException: ClientRuntime.ModeledError, } } -struct InvalidParameterCombinationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidParameterCombinationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidParameterValueException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidParameterValueException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5500,23 +3971,7 @@ public struct InvalidParameterValueException: ClientRuntime.ModeledError, AWSCli } } -struct InvalidParameterValueExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidParameterValueExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudWatchClientTypes.LabelOptions: Swift.Codable { +extension CloudWatchClientTypes.LabelOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case timezone = "Timezone" } @@ -5528,10 +3983,13 @@ extension CloudWatchClientTypes.LabelOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let timezoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezone) - timezone = timezoneDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.LabelOptions() + value.timezone = try reader["Timezone"].readIfPresent() + return value + } } } @@ -5552,16 +4010,14 @@ extension CloudWatchClientTypes { } extension LimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitExceededException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5589,33 +4045,15 @@ public struct LimitExceededException: ClientRuntime.ModeledError, AWSClientRunti } } -struct LimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension LimitExceededExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension LimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5644,23 +4082,12 @@ public struct LimitExceededFault: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct LimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension LimitExceededFaultBody: Swift.Decodable { +extension ListDashboardsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dashboardNamePrefix = "DashboardNamePrefix" + case nextToken = "NextToken" } -} -extension ListDashboardsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dashboardNamePrefix = dashboardNamePrefix { @@ -5697,36 +4124,16 @@ public struct ListDashboardsInput: Swift.Equatable { } } -struct ListDashboardsInputBody: Swift.Equatable { - let dashboardNamePrefix: Swift.String? - let nextToken: Swift.String? -} - -extension ListDashboardsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dashboardNamePrefix = "DashboardNamePrefix" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dashboardNamePrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardNamePrefix) - dashboardNamePrefix = dashboardNamePrefixDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListDashboardsOutput { -extension ListDashboardsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListDashboardsOutputBody = try responseDecoder.decode(responseBody: data) - self.dashboardEntries = output.dashboardEntries - self.nextToken = output.nextToken - } else { - self.dashboardEntries = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListDashboardsResult"] + var value = ListDashboardsOutput() + value.dashboardEntries = try reader["DashboardEntries"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.DashboardEntry.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -5747,56 +4154,31 @@ public struct ListDashboardsOutput: Swift.Equatable { } } -struct ListDashboardsOutputBody: Swift.Equatable { - let dashboardEntries: [CloudWatchClientTypes.DashboardEntry]? - let nextToken: Swift.String? -} - -extension ListDashboardsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dashboardEntries = "DashboardEntries" - case nextToken = "NextToken" - } +enum ListDashboardsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListDashboardsResult")) - if containerValues.contains(.dashboardEntries) { - struct KeyVal0{struct member{}} - let dashboardEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dashboardEntries) - if let dashboardEntriesWrappedContainer = dashboardEntriesWrappedContainer { - let dashboardEntriesContainer = try dashboardEntriesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.DashboardEntry].self, forKey: .member) - var dashboardEntriesBuffer:[CloudWatchClientTypes.DashboardEntry]? = nil - if let dashboardEntriesContainer = dashboardEntriesContainer { - dashboardEntriesBuffer = [CloudWatchClientTypes.DashboardEntry]() - for structureContainer0 in dashboardEntriesContainer { - dashboardEntriesBuffer?.append(structureContainer0) - } - } - dashboardEntries = dashboardEntriesBuffer - } else { - dashboardEntries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dashboardEntries = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListDashboardsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListManagedInsightRulesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" + case resourceARN = "ResourceARN" } -} -extension ListManagedInsightRulesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -5841,40 +4223,16 @@ public struct ListManagedInsightRulesInput: Swift.Equatable { } } -struct ListManagedInsightRulesInputBody: Swift.Equatable { - let resourceARN: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension ListManagedInsightRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - case resourceARN = "ResourceARN" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceARN) - resourceARN = resourceARNDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension ListManagedInsightRulesOutput { -extension ListManagedInsightRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListManagedInsightRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.managedRules = output.managedRules - self.nextToken = output.nextToken - } else { - self.managedRules = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListManagedInsightRulesResult"] + var value = ListManagedInsightRulesOutput() + value.managedRules = try reader["ManagedRules"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.ManagedRuleDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -5895,57 +4253,31 @@ public struct ListManagedInsightRulesOutput: Swift.Equatable { } } -struct ListManagedInsightRulesOutputBody: Swift.Equatable { - let managedRules: [CloudWatchClientTypes.ManagedRuleDescription]? - let nextToken: Swift.String? -} - -extension ListManagedInsightRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case managedRules = "ManagedRules" - case nextToken = "NextToken" - } +enum ListManagedInsightRulesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListManagedInsightRulesResult")) - if containerValues.contains(.managedRules) { - struct KeyVal0{struct member{}} - let managedRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .managedRules) - if let managedRulesWrappedContainer = managedRulesWrappedContainer { - let managedRulesContainer = try managedRulesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.ManagedRuleDescription].self, forKey: .member) - var managedRulesBuffer:[CloudWatchClientTypes.ManagedRuleDescription]? = nil - if let managedRulesContainer = managedRulesContainer { - managedRulesBuffer = [CloudWatchClientTypes.ManagedRuleDescription]() - for structureContainer0 in managedRulesContainer { - managedRulesBuffer?.append(structureContainer0) - } - } - managedRules = managedRulesBuffer - } else { - managedRules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - managedRules = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListManagedInsightRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListMetricStreamsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" } -} -extension ListMetricStreamsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -5982,36 +4314,16 @@ public struct ListMetricStreamsInput: Swift.Equatable { } } -struct ListMetricStreamsInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension ListMetricStreamsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension ListMetricStreamsOutput { -extension ListMetricStreamsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListMetricStreamsOutputBody = try responseDecoder.decode(responseBody: data) - self.entries = output.entries - self.nextToken = output.nextToken - } else { - self.entries = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListMetricStreamsResult"] + var value = ListMetricStreamsOutput() + value.entries = try reader["Entries"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricStreamEntry.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -6032,58 +4344,37 @@ public struct ListMetricStreamsOutput: Swift.Equatable { } } -struct ListMetricStreamsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let entries: [CloudWatchClientTypes.MetricStreamEntry]? -} - -extension ListMetricStreamsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case entries = "Entries" - case nextToken = "NextToken" - } +enum ListMetricStreamsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListMetricStreamsResult")) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.entries) { - struct KeyVal0{struct member{}} - let entriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .entries) - if let entriesWrappedContainer = entriesWrappedContainer { - let entriesContainer = try entriesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricStreamEntry].self, forKey: .member) - var entriesBuffer:[CloudWatchClientTypes.MetricStreamEntry]? = nil - if let entriesContainer = entriesContainer { - entriesBuffer = [CloudWatchClientTypes.MetricStreamEntry]() - for structureContainer0 in entriesContainer { - entriesBuffer?.append(structureContainer0) - } - } - entries = entriesBuffer - } else { - entries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidNextToken": return try await InvalidNextToken.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - entries = nil } } } -enum ListMetricStreamsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidNextToken": return try await InvalidNextToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListMetricsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dimensions = "Dimensions" + case includeLinkedAccounts = "IncludeLinkedAccounts" + case metricName = "MetricName" + case namespace = "Namespace" + case nextToken = "NextToken" + case owningAccount = "OwningAccount" + case recentlyActive = "RecentlyActive" } -} -extension ListMetricsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dimensions = dimensions { @@ -6164,75 +4455,17 @@ public struct ListMetricsInput: Swift.Equatable { } } -struct ListMetricsInputBody: Swift.Equatable { - let namespace: Swift.String? - let metricName: Swift.String? - let dimensions: [CloudWatchClientTypes.DimensionFilter]? - let nextToken: Swift.String? - let recentlyActive: CloudWatchClientTypes.RecentlyActive? - let includeLinkedAccounts: Swift.Bool? - let owningAccount: Swift.String? -} - -extension ListMetricsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dimensions = "Dimensions" - case includeLinkedAccounts = "IncludeLinkedAccounts" - case metricName = "MetricName" - case namespace = "Namespace" - case nextToken = "NextToken" - case owningAccount = "OwningAccount" - case recentlyActive = "RecentlyActive" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.DimensionFilter].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.DimensionFilter]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.DimensionFilter]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let recentlyActiveDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.RecentlyActive.self, forKey: .recentlyActive) - recentlyActive = recentlyActiveDecoded - let includeLinkedAccountsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeLinkedAccounts) - includeLinkedAccounts = includeLinkedAccountsDecoded - let owningAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .owningAccount) - owningAccount = owningAccountDecoded - } -} +extension ListMetricsOutput { -extension ListMetricsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListMetricsOutputBody = try responseDecoder.decode(responseBody: data) - self.metrics = output.metrics - self.nextToken = output.nextToken - self.owningAccounts = output.owningAccounts - } else { - self.metrics = nil - self.nextToken = nil - self.owningAccounts = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListMetricsResult"] + var value = ListMetricsOutput() + value.metrics = try reader["Metrics"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Metric.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + value.owningAccounts = try reader["OwningAccounts"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6257,77 +4490,29 @@ public struct ListMetricsOutput: Swift.Equatable { } } -struct ListMetricsOutputBody: Swift.Equatable { - let metrics: [CloudWatchClientTypes.Metric]? - let nextToken: Swift.String? - let owningAccounts: [Swift.String]? -} +enum ListMetricsOutputError { -extension ListMetricsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metrics = "Metrics" - case nextToken = "NextToken" - case owningAccounts = "OwningAccounts" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListMetricsResult")) - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Metric].self, forKey: .member) - var metricsBuffer:[CloudWatchClientTypes.Metric]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [CloudWatchClientTypes.Metric]() - for structureContainer0 in metricsContainer { - metricsBuffer?.append(structureContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] - } - } else { - metrics = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.owningAccounts) { - struct KeyVal0{struct member{}} - let owningAccountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .owningAccounts) - if let owningAccountsWrappedContainer = owningAccountsWrappedContainer { - let owningAccountsContainer = try owningAccountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var owningAccountsBuffer:[Swift.String]? = nil - if let owningAccountsContainer = owningAccountsContainer { - owningAccountsBuffer = [Swift.String]() - for stringContainer0 in owningAccountsContainer { - owningAccountsBuffer?.append(stringContainer0) - } - } - owningAccounts = owningAccountsBuffer - } else { - owningAccounts = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - owningAccounts = nil } } } -enum ListMetricsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTagsForResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceARN = "ResourceARN" } -} -extension ListTagsForResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceARN = resourceARN { @@ -6358,30 +4543,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -struct ListTagsForResourceInputBody: Swift.Equatable { - let resourceARN: Swift.String? -} - -extension ListTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceARN = "ResourceARN" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceARN) - resourceARN = resourceARNDecoded - } -} +extension ListTagsForResourceOutput { -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tags = output.tags - } else { - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTagsForResourceResult"] + var value = ListTagsForResourceOutput() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6398,53 +4568,26 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let tags: [CloudWatchClientTypes.Tag]? -} - -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +enum ListTagsForResourceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTagsForResourceResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudWatchClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudWatchClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } } } -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension CloudWatchClientTypes.ManagedRule: Swift.Codable { +extension CloudWatchClientTypes.ManagedRule: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case resourceARN = "ResourceARN" case tags = "Tags" @@ -6473,30 +4616,14 @@ extension CloudWatchClientTypes.ManagedRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let resourceARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceARN) - resourceARN = resourceARNDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudWatchClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudWatchClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.ManagedRule() + value.templateName = try reader["TemplateName"].readIfPresent() + value.resourceARN = try reader["ResourceARN"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6527,7 +4654,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.ManagedRuleDescription: Swift.Codable { +extension CloudWatchClientTypes.ManagedRuleDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case resourceARN = "ResourceARN" case ruleState = "RuleState" @@ -6547,14 +4674,15 @@ extension CloudWatchClientTypes.ManagedRuleDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let resourceARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceARN) - resourceARN = resourceARNDecoded - let ruleStateDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.ManagedRuleState.self, forKey: .ruleState) - ruleState = ruleStateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.ManagedRuleDescription() + value.templateName = try reader["TemplateName"].readIfPresent() + value.resourceARN = try reader["ResourceARN"].readIfPresent() + value.ruleState = try reader["RuleState"].readIfPresent(readingClosure: CloudWatchClientTypes.ManagedRuleState.readingClosure) + return value + } } } @@ -6582,7 +4710,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.ManagedRuleState: Swift.Codable { +extension CloudWatchClientTypes.ManagedRuleState: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ruleName = "RuleName" case state = "State" @@ -6598,12 +4726,14 @@ extension CloudWatchClientTypes.ManagedRuleState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleName) - ruleName = ruleNameDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.ManagedRuleState() + value.ruleName = try reader["RuleName"].readIfPresent() + value.state = try reader["State"].readIfPresent() + return value + } } } @@ -6629,7 +4759,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MessageData: Swift.Codable { +extension CloudWatchClientTypes.MessageData: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case code = "Code" case value = "Value" @@ -6645,12 +4775,14 @@ extension CloudWatchClientTypes.MessageData: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MessageData() + value.code = try reader["Code"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -6674,7 +4806,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.Metric: Swift.Codable { +extension CloudWatchClientTypes.Metric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dimensions = "Dimensions" case metricName = "MetricName" @@ -6703,30 +4835,14 @@ extension CloudWatchClientTypes.Metric: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.Metric() + value.namespace = try reader["Namespace"].readIfPresent() + value.metricName = try reader["MetricName"].readIfPresent() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Dimension.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6755,7 +4871,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricAlarm: Swift.Codable { +extension CloudWatchClientTypes.MetricAlarm: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actionsEnabled = "ActionsEnabled" case alarmActions = "AlarmActions" @@ -6924,151 +5040,41 @@ extension CloudWatchClientTypes.MetricAlarm: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let alarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmName) - alarmName = alarmNameDecoded - let alarmArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmArn) - alarmArn = alarmArnDecoded - let alarmDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmDescription) - alarmDescription = alarmDescriptionDecoded - let alarmConfigurationUpdatedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .alarmConfigurationUpdatedTimestamp) - alarmConfigurationUpdatedTimestamp = alarmConfigurationUpdatedTimestampDecoded - let actionsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .actionsEnabled) - actionsEnabled = actionsEnabledDecoded - if containerValues.contains(.okActions) { - struct KeyVal0{struct member{}} - let okActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .okActions) - if let okActionsWrappedContainer = okActionsWrappedContainer { - let okActionsContainer = try okActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var okActionsBuffer:[Swift.String]? = nil - if let okActionsContainer = okActionsContainer { - okActionsBuffer = [Swift.String]() - for stringContainer0 in okActionsContainer { - okActionsBuffer?.append(stringContainer0) - } - } - okActions = okActionsBuffer - } else { - okActions = [] - } - } else { - okActions = nil - } - if containerValues.contains(.alarmActions) { - struct KeyVal0{struct member{}} - let alarmActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmActions) - if let alarmActionsWrappedContainer = alarmActionsWrappedContainer { - let alarmActionsContainer = try alarmActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmActionsBuffer:[Swift.String]? = nil - if let alarmActionsContainer = alarmActionsContainer { - alarmActionsBuffer = [Swift.String]() - for stringContainer0 in alarmActionsContainer { - alarmActionsBuffer?.append(stringContainer0) - } - } - alarmActions = alarmActionsBuffer - } else { - alarmActions = [] - } - } else { - alarmActions = nil - } - if containerValues.contains(.insufficientDataActions) { - struct KeyVal0{struct member{}} - let insufficientDataActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .insufficientDataActions) - if let insufficientDataActionsWrappedContainer = insufficientDataActionsWrappedContainer { - let insufficientDataActionsContainer = try insufficientDataActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var insufficientDataActionsBuffer:[Swift.String]? = nil - if let insufficientDataActionsContainer = insufficientDataActionsContainer { - insufficientDataActionsBuffer = [Swift.String]() - for stringContainer0 in insufficientDataActionsContainer { - insufficientDataActionsBuffer?.append(stringContainer0) - } - } - insufficientDataActions = insufficientDataActionsBuffer - } else { - insufficientDataActions = [] - } - } else { - insufficientDataActions = nil - } - let stateValueDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StateValue.self, forKey: .stateValue) - stateValue = stateValueDecoded - let stateReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateReason) - stateReason = stateReasonDecoded - let stateReasonDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateReasonData) - stateReasonData = stateReasonDataDecoded - let stateUpdatedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .stateUpdatedTimestamp) - stateUpdatedTimestamp = stateUpdatedTimestampDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let statisticDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.Statistic.self, forKey: .statistic) - statistic = statisticDecoded - let extendedStatisticDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .extendedStatistic) - extendedStatistic = extendedStatisticDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil - } - let periodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .period) - period = periodDecoded - let unitDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StandardUnit.self, forKey: .unit) - unit = unitDecoded - let evaluationPeriodsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .evaluationPeriods) - evaluationPeriods = evaluationPeriodsDecoded - let datapointsToAlarmDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .datapointsToAlarm) - datapointsToAlarm = datapointsToAlarmDecoded - let thresholdDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .threshold) - threshold = thresholdDecoded - let comparisonOperatorDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.ComparisonOperator.self, forKey: .comparisonOperator) - comparisonOperator = comparisonOperatorDecoded - let treatMissingDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .treatMissingData) - treatMissingData = treatMissingDataDecoded - let evaluateLowSampleCountPercentileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .evaluateLowSampleCountPercentile) - evaluateLowSampleCountPercentile = evaluateLowSampleCountPercentileDecoded - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricDataQuery].self, forKey: .member) - var metricsBuffer:[CloudWatchClientTypes.MetricDataQuery]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [CloudWatchClientTypes.MetricDataQuery]() - for structureContainer0 in metricsContainer { - metricsBuffer?.append(structureContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] - } - } else { - metrics = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricAlarm() + value.alarmName = try reader["AlarmName"].readIfPresent() + value.alarmArn = try reader["AlarmArn"].readIfPresent() + value.alarmDescription = try reader["AlarmDescription"].readIfPresent() + value.alarmConfigurationUpdatedTimestamp = try reader["AlarmConfigurationUpdatedTimestamp"].readTimestampIfPresent(format: .dateTime) + value.actionsEnabled = try reader["ActionsEnabled"].readIfPresent() + value.okActions = try reader["OKActions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.alarmActions = try reader["AlarmActions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.insufficientDataActions = try reader["InsufficientDataActions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.stateValue = try reader["StateValue"].readIfPresent() + value.stateReason = try reader["StateReason"].readIfPresent() + value.stateReasonData = try reader["StateReasonData"].readIfPresent() + value.stateUpdatedTimestamp = try reader["StateUpdatedTimestamp"].readTimestampIfPresent(format: .dateTime) + value.metricName = try reader["MetricName"].readIfPresent() + value.namespace = try reader["Namespace"].readIfPresent() + value.statistic = try reader["Statistic"].readIfPresent() + value.extendedStatistic = try reader["ExtendedStatistic"].readIfPresent() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Dimension.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.period = try reader["Period"].readIfPresent() + value.unit = try reader["Unit"].readIfPresent() + value.evaluationPeriods = try reader["EvaluationPeriods"].readIfPresent() + value.datapointsToAlarm = try reader["DatapointsToAlarm"].readIfPresent() + value.threshold = try reader["Threshold"].readIfPresent() + value.comparisonOperator = try reader["ComparisonOperator"].readIfPresent() + value.treatMissingData = try reader["TreatMissingData"].readIfPresent() + value.evaluateLowSampleCountPercentile = try reader["EvaluateLowSampleCountPercentile"].readIfPresent() + value.metrics = try reader["Metrics"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricDataQuery.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.thresholdMetricId = try reader["ThresholdMetricId"].readIfPresent() + value.evaluationState = try reader["EvaluationState"].readIfPresent() + value.stateTransitionedTimestamp = try reader["StateTransitionedTimestamp"].readTimestampIfPresent(format: .dateTime) + return value } - let thresholdMetricIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .thresholdMetricId) - thresholdMetricId = thresholdMetricIdDecoded - let evaluationStateDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.EvaluationState.self, forKey: .evaluationState) - evaluationState = evaluationStateDecoded - let stateTransitionedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .stateTransitionedTimestamp) - stateTransitionedTimestamp = stateTransitionedTimestampDecoded } } @@ -7200,7 +5206,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricDataQuery: Swift.Codable { +extension CloudWatchClientTypes.MetricDataQuery: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accountId = "AccountId" case expression = "Expression" @@ -7236,22 +5242,19 @@ extension CloudWatchClientTypes.MetricDataQuery: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let metricStatDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.MetricStat.self, forKey: .metricStat) - metricStat = metricStatDecoded - let expressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expression) - expression = expressionDecoded - let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) - label = labelDecoded - let returnDataDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnData) - returnData = returnDataDecoded - let periodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .period) - period = periodDecoded - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricDataQuery() + value.id = try reader["Id"].readIfPresent() + value.metricStat = try reader["MetricStat"].readIfPresent(readingClosure: CloudWatchClientTypes.MetricStat.readingClosure) + value.expression = try reader["Expression"].readIfPresent() + value.label = try reader["Label"].readIfPresent() + value.returnData = try reader["ReturnData"].readIfPresent() + value.period = try reader["Period"].readIfPresent() + value.accountId = try reader["AccountId"].readIfPresent() + return value + } } } @@ -7296,7 +5299,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricDataResult: Swift.Codable { +extension CloudWatchClientTypes.MetricDataResult: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case id = "Id" case label = "Label" @@ -7355,70 +5358,17 @@ extension CloudWatchClientTypes.MetricDataResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) - label = labelDecoded - if containerValues.contains(.timestamps) { - struct KeyVal0{struct member{}} - let timestampsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .timestamps) - if let timestampsWrappedContainer = timestampsWrappedContainer { - let timestampsContainer = try timestampsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var timestampsBuffer:[ClientRuntime.Date]? = nil - if let timestampsContainer = timestampsContainer { - timestampsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in timestampsContainer { - try timestampsBuffer?.append(timestampsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - timestamps = timestampsBuffer - } else { - timestamps = [] - } - } else { - timestamps = nil - } - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.Double].self, forKey: .member) - var valuesBuffer:[Swift.Double]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.Double]() - for doubleContainer0 in valuesContainer { - valuesBuffer?.append(doubleContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil - } - let statusCodeDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StatusCode.self, forKey: .statusCode) - statusCode = statusCodeDecoded - if containerValues.contains(.messages) { - struct KeyVal0{struct member{}} - let messagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .messages) - if let messagesWrappedContainer = messagesWrappedContainer { - let messagesContainer = try messagesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MessageData].self, forKey: .member) - var messagesBuffer:[CloudWatchClientTypes.MessageData]? = nil - if let messagesContainer = messagesContainer { - messagesBuffer = [CloudWatchClientTypes.MessageData]() - for structureContainer0 in messagesContainer { - messagesBuffer?.append(structureContainer0) - } - } - messages = messagesBuffer - } else { - messages = [] - } - } else { - messages = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricDataResult() + value.id = try reader["Id"].readIfPresent() + value.label = try reader["Label"].readIfPresent() + value.timestamps = try reader["Timestamps"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "member", isFlattened: false) + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.Double.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.statusCode = try reader["StatusCode"].readIfPresent() + value.messages = try reader["Messages"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MessageData.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7459,7 +5409,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricDatum: Swift.Codable { +extension CloudWatchClientTypes.MetricDatum: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case counts = "Counts" case dimensions = "Dimensions" @@ -7530,77 +5480,21 @@ extension CloudWatchClientTypes.MetricDatum: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil - } - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .value) - value = valueDecoded - let statisticValuesDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StatisticSet.self, forKey: .statisticValues) - statisticValues = statisticValuesDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.Double].self, forKey: .member) - var valuesBuffer:[Swift.Double]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.Double]() - for doubleContainer0 in valuesContainer { - valuesBuffer?.append(doubleContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil - } - if containerValues.contains(.counts) { - struct KeyVal0{struct member{}} - let countsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .counts) - if let countsWrappedContainer = countsWrappedContainer { - let countsContainer = try countsWrappedContainer.decodeIfPresent([Swift.Double].self, forKey: .member) - var countsBuffer:[Swift.Double]? = nil - if let countsContainer = countsContainer { - countsBuffer = [Swift.Double]() - for doubleContainer0 in countsContainer { - countsBuffer?.append(doubleContainer0) - } - } - counts = countsBuffer - } else { - counts = [] - } - } else { - counts = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricDatum() + value.metricName = try reader["MetricName"].readIfPresent() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Dimension.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.value = try reader["Value"].readIfPresent() + value.statisticValues = try reader["StatisticValues"].readIfPresent(readingClosure: CloudWatchClientTypes.StatisticSet.readingClosure) + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.Double.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.counts = try reader["Counts"].readListIfPresent(memberReadingClosure: Swift.Double.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.unit = try reader["Unit"].readIfPresent() + value.storageResolution = try reader["StorageResolution"].readIfPresent() + return value } - let unitDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StandardUnit.self, forKey: .unit) - unit = unitDecoded - let storageResolutionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageResolution) - storageResolution = storageResolutionDecoded } } @@ -7653,7 +5547,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricMathAnomalyDetector: Swift.Codable { +extension CloudWatchClientTypes.MetricMathAnomalyDetector: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricDataQueries = "MetricDataQueries" } @@ -7674,26 +5568,12 @@ extension CloudWatchClientTypes.MetricMathAnomalyDetector: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.metricDataQueries) { - struct KeyVal0{struct member{}} - let metricDataQueriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricDataQueries) - if let metricDataQueriesWrappedContainer = metricDataQueriesWrappedContainer { - let metricDataQueriesContainer = try metricDataQueriesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricDataQuery].self, forKey: .member) - var metricDataQueriesBuffer:[CloudWatchClientTypes.MetricDataQuery]? = nil - if let metricDataQueriesContainer = metricDataQueriesContainer { - metricDataQueriesBuffer = [CloudWatchClientTypes.MetricDataQuery]() - for structureContainer0 in metricDataQueriesContainer { - metricDataQueriesBuffer?.append(structureContainer0) - } - } - metricDataQueries = metricDataQueriesBuffer - } else { - metricDataQueries = [] - } - } else { - metricDataQueries = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricMathAnomalyDetector() + value.metricDataQueries = try reader["MetricDataQueries"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricDataQuery.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7714,7 +5594,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricStat: Swift.Codable { +extension CloudWatchClientTypes.MetricStat: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metric = "Metric" case period = "Period" @@ -7738,16 +5618,16 @@ extension CloudWatchClientTypes.MetricStat: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.Metric.self, forKey: .metric) - metric = metricDecoded - let periodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .period) - period = periodDecoded - let statDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stat) - stat = statDecoded - let unitDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StandardUnit.self, forKey: .unit) - unit = unitDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricStat() + value.metric = try reader["Metric"].readIfPresent(readingClosure: CloudWatchClientTypes.Metric.readingClosure) + value.period = try reader["Period"].readIfPresent() + value.stat = try reader["Stat"].readIfPresent() + value.unit = try reader["Unit"].readIfPresent() + return value + } } } @@ -7788,7 +5668,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricStreamEntry: Swift.Codable { +extension CloudWatchClientTypes.MetricStreamEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case creationDate = "CreationDate" @@ -7824,22 +5704,19 @@ extension CloudWatchClientTypes.MetricStreamEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let creationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationDate) - creationDate = creationDateDecoded - let lastUpdateDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdateDate) - lastUpdateDate = lastUpdateDateDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let firehoseArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .firehoseArn) - firehoseArn = firehoseArnDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let outputFormatDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.MetricStreamOutputFormat.self, forKey: .outputFormat) - outputFormat = outputFormatDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricStreamEntry() + value.arn = try reader["Arn"].readIfPresent() + value.creationDate = try reader["CreationDate"].readTimestampIfPresent(format: .dateTime) + value.lastUpdateDate = try reader["LastUpdateDate"].readTimestampIfPresent(format: .dateTime) + value.name = try reader["Name"].readIfPresent() + value.firehoseArn = try reader["FirehoseArn"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.outputFormat = try reader["OutputFormat"].readIfPresent() + return value + } } } @@ -7883,7 +5760,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricStreamFilter: Swift.Codable { +extension CloudWatchClientTypes.MetricStreamFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricNames = "MetricNames" case namespace = "Namespace" @@ -7908,28 +5785,13 @@ extension CloudWatchClientTypes.MetricStreamFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - if containerValues.contains(.metricNames) { - struct KeyVal0{struct member{}} - let metricNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricNames) - if let metricNamesWrappedContainer = metricNamesWrappedContainer { - let metricNamesContainer = try metricNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var metricNamesBuffer:[Swift.String]? = nil - if let metricNamesContainer = metricNamesContainer { - metricNamesBuffer = [Swift.String]() - for stringContainer0 in metricNamesContainer { - metricNamesBuffer?.append(stringContainer0) - } - } - metricNames = metricNamesBuffer - } else { - metricNames = [] - } - } else { - metricNames = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricStreamFilter() + value.namespace = try reader["Namespace"].readIfPresent() + value.metricNames = try reader["MetricNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7989,7 +5851,7 @@ extension CloudWatchClientTypes { } } -extension CloudWatchClientTypes.MetricStreamStatisticsConfiguration: Swift.Codable { +extension CloudWatchClientTypes.MetricStreamStatisticsConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case additionalStatistics = "AdditionalStatistics" case includeMetrics = "IncludeMetrics" @@ -8023,45 +5885,13 @@ extension CloudWatchClientTypes.MetricStreamStatisticsConfiguration: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.includeMetrics) { - struct KeyVal0{struct member{}} - let includeMetricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .includeMetrics) - if let includeMetricsWrappedContainer = includeMetricsWrappedContainer { - let includeMetricsContainer = try includeMetricsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricStreamStatisticsMetric].self, forKey: .member) - var includeMetricsBuffer:[CloudWatchClientTypes.MetricStreamStatisticsMetric]? = nil - if let includeMetricsContainer = includeMetricsContainer { - includeMetricsBuffer = [CloudWatchClientTypes.MetricStreamStatisticsMetric]() - for structureContainer0 in includeMetricsContainer { - includeMetricsBuffer?.append(structureContainer0) - } - } - includeMetrics = includeMetricsBuffer - } else { - includeMetrics = [] - } - } else { - includeMetrics = nil - } - if containerValues.contains(.additionalStatistics) { - struct KeyVal0{struct member{}} - let additionalStatisticsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .additionalStatistics) - if let additionalStatisticsWrappedContainer = additionalStatisticsWrappedContainer { - let additionalStatisticsContainer = try additionalStatisticsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var additionalStatisticsBuffer:[Swift.String]? = nil - if let additionalStatisticsContainer = additionalStatisticsContainer { - additionalStatisticsBuffer = [Swift.String]() - for stringContainer0 in additionalStatisticsContainer { - additionalStatisticsBuffer?.append(stringContainer0) - } - } - additionalStatistics = additionalStatisticsBuffer - } else { - additionalStatistics = [] - } - } else { - additionalStatistics = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricStreamStatisticsConfiguration() + value.includeMetrics = try reader["IncludeMetrics"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.MetricStreamStatisticsMetric.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.additionalStatistics = try reader["AdditionalStatistics"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8088,7 +5918,7 @@ extension CloudWatchClientTypes { } -extension CloudWatchClientTypes.MetricStreamStatisticsMetric: Swift.Codable { +extension CloudWatchClientTypes.MetricStreamStatisticsMetric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricName = "MetricName" case namespace = "Namespace" @@ -8104,12 +5934,14 @@ extension CloudWatchClientTypes.MetricStreamStatisticsMetric: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.MetricStreamStatisticsMetric() + value.namespace = try reader["Namespace"].readIfPresent() + value.metricName = try reader["MetricName"].readIfPresent() + return value + } } } @@ -8136,16 +5968,14 @@ extension CloudWatchClientTypes { } extension MissingRequiredParameterException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MissingRequiredParameterException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8174,23 +6004,7 @@ public struct MissingRequiredParameterException: ClientRuntime.ModeledError, AWS } } -struct MissingRequiredParameterExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension MissingRequiredParameterExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CloudWatchClientTypes.PartialFailure: Swift.Codable { +extension CloudWatchClientTypes.PartialFailure: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case exceptionType = "ExceptionType" case failureCode = "FailureCode" @@ -8214,16 +6028,16 @@ extension CloudWatchClientTypes.PartialFailure: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let failureResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureResource) - failureResource = failureResourceDecoded - let exceptionTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exceptionType) - exceptionType = exceptionTypeDecoded - let failureCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureCode) - failureCode = failureCodeDecoded - let failureDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureDescription) - failureDescription = failureDescriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.PartialFailure() + value.failureResource = try reader["FailureResource"].readIfPresent() + value.exceptionType = try reader["ExceptionType"].readIfPresent() + value.failureCode = try reader["FailureCode"].readIfPresent() + value.failureDescription = try reader["FailureDescription"].readIfPresent() + return value + } } } @@ -8256,6 +6070,16 @@ extension CloudWatchClientTypes { } extension PutAnomalyDetectorInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configuration = "Configuration" + case dimensions = "Dimensions" + case metricMathAnomalyDetector = "MetricMathAnomalyDetector" + case metricName = "MetricName" + case namespace = "Namespace" + case singleMetricAnomalyDetector = "SingleMetricAnomalyDetector" + case stat = "Stat" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configuration = configuration { @@ -8366,65 +6190,12 @@ public struct PutAnomalyDetectorInput: Swift.Equatable { } } -struct PutAnomalyDetectorInputBody: Swift.Equatable { - let namespace: Swift.String? - let metricName: Swift.String? - let dimensions: [CloudWatchClientTypes.Dimension]? - let stat: Swift.String? - let configuration: CloudWatchClientTypes.AnomalyDetectorConfiguration? - let singleMetricAnomalyDetector: CloudWatchClientTypes.SingleMetricAnomalyDetector? - let metricMathAnomalyDetector: CloudWatchClientTypes.MetricMathAnomalyDetector? -} - -extension PutAnomalyDetectorInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configuration = "Configuration" - case dimensions = "Dimensions" - case metricMathAnomalyDetector = "MetricMathAnomalyDetector" - case metricName = "MetricName" - case namespace = "Namespace" - case singleMetricAnomalyDetector = "SingleMetricAnomalyDetector" - case stat = "Stat" - } +extension PutAnomalyDetectorOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutAnomalyDetectorOutput() } - let statDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stat) - stat = statDecoded - let configurationDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.AnomalyDetectorConfiguration.self, forKey: .configuration) - configuration = configurationDecoded - let singleMetricAnomalyDetectorDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.SingleMetricAnomalyDetector.self, forKey: .singleMetricAnomalyDetector) - singleMetricAnomalyDetector = singleMetricAnomalyDetectorDecoded - let metricMathAnomalyDetectorDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.MetricMathAnomalyDetector.self, forKey: .metricMathAnomalyDetector) - metricMathAnomalyDetector = metricMathAnomalyDetectorDecoded - } -} - -extension PutAnomalyDetectorOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -8433,21 +6204,42 @@ public struct PutAnomalyDetectorOutput: Swift.Equatable { public init() { } } -enum PutAnomalyDetectorOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutAnomalyDetectorOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutCompositeAlarmInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actionsEnabled = "ActionsEnabled" + case actionsSuppressor = "ActionsSuppressor" + case actionsSuppressorExtensionPeriod = "ActionsSuppressorExtensionPeriod" + case actionsSuppressorWaitPeriod = "ActionsSuppressorWaitPeriod" + case alarmActions = "AlarmActions" + case alarmDescription = "AlarmDescription" + case alarmName = "AlarmName" + case alarmRule = "AlarmRule" + case insufficientDataActions = "InsufficientDataActions" + case okActions = "OKActions" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actionsEnabled = actionsEnabled { @@ -8607,132 +6399,12 @@ public struct PutCompositeAlarmInput: Swift.Equatable { } } -struct PutCompositeAlarmInputBody: Swift.Equatable { - let actionsEnabled: Swift.Bool? - let alarmActions: [Swift.String]? - let alarmDescription: Swift.String? - let alarmName: Swift.String? - let alarmRule: Swift.String? - let insufficientDataActions: [Swift.String]? - let okActions: [Swift.String]? - let tags: [CloudWatchClientTypes.Tag]? - let actionsSuppressor: Swift.String? - let actionsSuppressorWaitPeriod: Swift.Int? - let actionsSuppressorExtensionPeriod: Swift.Int? -} - -extension PutCompositeAlarmInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionsEnabled = "ActionsEnabled" - case actionsSuppressor = "ActionsSuppressor" - case actionsSuppressorExtensionPeriod = "ActionsSuppressorExtensionPeriod" - case actionsSuppressorWaitPeriod = "ActionsSuppressorWaitPeriod" - case alarmActions = "AlarmActions" - case alarmDescription = "AlarmDescription" - case alarmName = "AlarmName" - case alarmRule = "AlarmRule" - case insufficientDataActions = "InsufficientDataActions" - case okActions = "OKActions" - case tags = "Tags" - } +extension PutCompositeAlarmOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .actionsEnabled) - actionsEnabled = actionsEnabledDecoded - if containerValues.contains(.alarmActions) { - struct KeyVal0{struct member{}} - let alarmActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmActions) - if let alarmActionsWrappedContainer = alarmActionsWrappedContainer { - let alarmActionsContainer = try alarmActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmActionsBuffer:[Swift.String]? = nil - if let alarmActionsContainer = alarmActionsContainer { - alarmActionsBuffer = [Swift.String]() - for stringContainer0 in alarmActionsContainer { - alarmActionsBuffer?.append(stringContainer0) - } - } - alarmActions = alarmActionsBuffer - } else { - alarmActions = [] - } - } else { - alarmActions = nil - } - let alarmDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmDescription) - alarmDescription = alarmDescriptionDecoded - let alarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmName) - alarmName = alarmNameDecoded - let alarmRuleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmRule) - alarmRule = alarmRuleDecoded - if containerValues.contains(.insufficientDataActions) { - struct KeyVal0{struct member{}} - let insufficientDataActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .insufficientDataActions) - if let insufficientDataActionsWrappedContainer = insufficientDataActionsWrappedContainer { - let insufficientDataActionsContainer = try insufficientDataActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var insufficientDataActionsBuffer:[Swift.String]? = nil - if let insufficientDataActionsContainer = insufficientDataActionsContainer { - insufficientDataActionsBuffer = [Swift.String]() - for stringContainer0 in insufficientDataActionsContainer { - insufficientDataActionsBuffer?.append(stringContainer0) - } - } - insufficientDataActions = insufficientDataActionsBuffer - } else { - insufficientDataActions = [] - } - } else { - insufficientDataActions = nil - } - if containerValues.contains(.okActions) { - struct KeyVal0{struct member{}} - let okActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .okActions) - if let okActionsWrappedContainer = okActionsWrappedContainer { - let okActionsContainer = try okActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var okActionsBuffer:[Swift.String]? = nil - if let okActionsContainer = okActionsContainer { - okActionsBuffer = [Swift.String]() - for stringContainer0 in okActionsContainer { - okActionsBuffer?.append(stringContainer0) - } - } - okActions = okActionsBuffer - } else { - okActions = [] - } - } else { - okActions = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudWatchClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudWatchClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutCompositeAlarmOutput() } - let actionsSuppressorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionsSuppressor) - actionsSuppressor = actionsSuppressorDecoded - let actionsSuppressorWaitPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .actionsSuppressorWaitPeriod) - actionsSuppressorWaitPeriod = actionsSuppressorWaitPeriodDecoded - let actionsSuppressorExtensionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .actionsSuppressorExtensionPeriod) - actionsSuppressorExtensionPeriod = actionsSuppressorExtensionPeriodDecoded - } -} - -extension PutCompositeAlarmOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -8741,17 +6413,29 @@ public struct PutCompositeAlarmOutput: Swift.Equatable { public init() { } } -enum PutCompositeAlarmOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutCompositeAlarmOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutDashboardInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dashboardBody = "DashboardBody" + case dashboardName = "DashboardName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dashboardBody = dashboardBody { @@ -8790,34 +6474,15 @@ public struct PutDashboardInput: Swift.Equatable { } } -struct PutDashboardInputBody: Swift.Equatable { - let dashboardName: Swift.String? - let dashboardBody: Swift.String? -} - -extension PutDashboardInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dashboardBody = "DashboardBody" - case dashboardName = "DashboardName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dashboardNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardName) - dashboardName = dashboardNameDecoded - let dashboardBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dashboardBody) - dashboardBody = dashboardBodyDecoded - } -} +extension PutDashboardOutput { -extension PutDashboardOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PutDashboardOutputBody = try responseDecoder.decode(responseBody: data) - self.dashboardValidationMessages = output.dashboardValidationMessages - } else { - self.dashboardValidationMessages = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PutDashboardResult"] + var value = PutDashboardOutput() + value.dashboardValidationMessages = try reader["DashboardValidationMessages"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.DashboardValidationMessage.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8834,52 +6499,32 @@ public struct PutDashboardOutput: Swift.Equatable { } } -struct PutDashboardOutputBody: Swift.Equatable { - let dashboardValidationMessages: [CloudWatchClientTypes.DashboardValidationMessage]? -} +enum PutDashboardOutputError { -extension PutDashboardOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dashboardValidationMessages = "DashboardValidationMessages" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PutDashboardResult")) - if containerValues.contains(.dashboardValidationMessages) { - struct KeyVal0{struct member{}} - let dashboardValidationMessagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dashboardValidationMessages) - if let dashboardValidationMessagesWrappedContainer = dashboardValidationMessagesWrappedContainer { - let dashboardValidationMessagesContainer = try dashboardValidationMessagesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.DashboardValidationMessage].self, forKey: .member) - var dashboardValidationMessagesBuffer:[CloudWatchClientTypes.DashboardValidationMessage]? = nil - if let dashboardValidationMessagesContainer = dashboardValidationMessagesContainer { - dashboardValidationMessagesBuffer = [CloudWatchClientTypes.DashboardValidationMessage]() - for structureContainer0 in dashboardValidationMessagesContainer { - dashboardValidationMessagesBuffer?.append(structureContainer0) - } - } - dashboardValidationMessages = dashboardValidationMessagesBuffer - } else { - dashboardValidationMessages = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterInput": return try await DashboardInvalidInputError.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dashboardValidationMessages = nil } } } -enum PutDashboardOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterInput": return try await DashboardInvalidInputError(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension PutInsightRuleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleDefinition = "RuleDefinition" + case ruleName = "RuleName" + case ruleState = "RuleState" + case tags = "Tags" } -} -extension PutInsightRuleInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleDefinition = ruleDefinition { @@ -8941,74 +6586,44 @@ public struct PutInsightRuleInput: Swift.Equatable { } } -struct PutInsightRuleInputBody: Swift.Equatable { - let ruleName: Swift.String? - let ruleState: Swift.String? - let ruleDefinition: Swift.String? - let tags: [CloudWatchClientTypes.Tag]? -} - -extension PutInsightRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleDefinition = "RuleDefinition" - case ruleName = "RuleName" - case ruleState = "RuleState" - case tags = "Tags" - } +extension PutInsightRuleOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleName) - ruleName = ruleNameDecoded - let ruleStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleState) - ruleState = ruleStateDecoded - let ruleDefinitionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleDefinition) - ruleDefinition = ruleDefinitionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudWatchClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudWatchClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutInsightRuleOutput() } } } -extension PutInsightRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct PutInsightRuleOutput: Swift.Equatable { public init() { } } -enum PutInsightRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededException": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutInsightRuleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededException": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } -} +} + +extension PutManagedInsightRulesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case managedRules = "ManagedRules" + } -extension PutManagedInsightRulesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let managedRules = managedRules { @@ -9048,47 +6663,15 @@ public struct PutManagedInsightRulesInput: Swift.Equatable { } } -struct PutManagedInsightRulesInputBody: Swift.Equatable { - let managedRules: [CloudWatchClientTypes.ManagedRule]? -} - -extension PutManagedInsightRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case managedRules = "ManagedRules" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.managedRules) { - struct KeyVal0{struct member{}} - let managedRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .managedRules) - if let managedRulesWrappedContainer = managedRulesWrappedContainer { - let managedRulesContainer = try managedRulesWrappedContainer.decodeIfPresent([CloudWatchClientTypes.ManagedRule].self, forKey: .member) - var managedRulesBuffer:[CloudWatchClientTypes.ManagedRule]? = nil - if let managedRulesContainer = managedRulesContainer { - managedRulesBuffer = [CloudWatchClientTypes.ManagedRule]() - for structureContainer0 in managedRulesContainer { - managedRulesBuffer?.append(structureContainer0) - } - } - managedRules = managedRulesBuffer - } else { - managedRules = [] - } - } else { - managedRules = nil - } - } -} +extension PutManagedInsightRulesOutput { -extension PutManagedInsightRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PutManagedInsightRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.failures = output.failures - } else { - self.failures = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PutManagedInsightRulesResult"] + var value = PutManagedInsightRulesOutput() + value.failures = try reader["Failures"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.PartialFailure.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9105,52 +6688,50 @@ public struct PutManagedInsightRulesOutput: Swift.Equatable { } } -struct PutManagedInsightRulesOutputBody: Swift.Equatable { - let failures: [CloudWatchClientTypes.PartialFailure]? -} +enum PutManagedInsightRulesOutputError { -extension PutManagedInsightRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failures = "Failures" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PutManagedInsightRulesResult")) - if containerValues.contains(.failures) { - struct KeyVal0{struct member{}} - let failuresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failures) - if let failuresWrappedContainer = failuresWrappedContainer { - let failuresContainer = try failuresWrappedContainer.decodeIfPresent([CloudWatchClientTypes.PartialFailure].self, forKey: .member) - var failuresBuffer:[CloudWatchClientTypes.PartialFailure]? = nil - if let failuresContainer = failuresContainer { - failuresBuffer = [CloudWatchClientTypes.PartialFailure]() - for structureContainer0 in failuresContainer { - failuresBuffer?.append(structureContainer0) - } - } - failures = failuresBuffer - } else { - failures = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - failures = nil } } } -enum PutManagedInsightRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension PutMetricAlarmInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actionsEnabled = "ActionsEnabled" + case alarmActions = "AlarmActions" + case alarmDescription = "AlarmDescription" + case alarmName = "AlarmName" + case comparisonOperator = "ComparisonOperator" + case datapointsToAlarm = "DatapointsToAlarm" + case dimensions = "Dimensions" + case evaluateLowSampleCountPercentile = "EvaluateLowSampleCountPercentile" + case evaluationPeriods = "EvaluationPeriods" + case extendedStatistic = "ExtendedStatistic" + case insufficientDataActions = "InsufficientDataActions" + case metricName = "MetricName" + case metrics = "Metrics" + case namespace = "Namespace" + case okActions = "OKActions" + case period = "Period" + case statistic = "Statistic" + case tags = "Tags" + case threshold = "Threshold" + case thresholdMetricId = "ThresholdMetricId" + case treatMissingData = "TreatMissingData" + case unit = "Unit" } -} -extension PutMetricAlarmInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actionsEnabled = actionsEnabled { @@ -9508,210 +7089,12 @@ public struct PutMetricAlarmInput: Swift.Equatable { } } -struct PutMetricAlarmInputBody: Swift.Equatable { - let alarmName: Swift.String? - let alarmDescription: Swift.String? - let actionsEnabled: Swift.Bool? - let okActions: [Swift.String]? - let alarmActions: [Swift.String]? - let insufficientDataActions: [Swift.String]? - let metricName: Swift.String? - let namespace: Swift.String? - let statistic: CloudWatchClientTypes.Statistic? - let extendedStatistic: Swift.String? - let dimensions: [CloudWatchClientTypes.Dimension]? - let period: Swift.Int? - let unit: CloudWatchClientTypes.StandardUnit? - let evaluationPeriods: Swift.Int? - let datapointsToAlarm: Swift.Int? - let threshold: Swift.Double? - let comparisonOperator: CloudWatchClientTypes.ComparisonOperator? - let treatMissingData: Swift.String? - let evaluateLowSampleCountPercentile: Swift.String? - let metrics: [CloudWatchClientTypes.MetricDataQuery]? - let tags: [CloudWatchClientTypes.Tag]? - let thresholdMetricId: Swift.String? -} - -extension PutMetricAlarmInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionsEnabled = "ActionsEnabled" - case alarmActions = "AlarmActions" - case alarmDescription = "AlarmDescription" - case alarmName = "AlarmName" - case comparisonOperator = "ComparisonOperator" - case datapointsToAlarm = "DatapointsToAlarm" - case dimensions = "Dimensions" - case evaluateLowSampleCountPercentile = "EvaluateLowSampleCountPercentile" - case evaluationPeriods = "EvaluationPeriods" - case extendedStatistic = "ExtendedStatistic" - case insufficientDataActions = "InsufficientDataActions" - case metricName = "MetricName" - case metrics = "Metrics" - case namespace = "Namespace" - case okActions = "OKActions" - case period = "Period" - case statistic = "Statistic" - case tags = "Tags" - case threshold = "Threshold" - case thresholdMetricId = "ThresholdMetricId" - case treatMissingData = "TreatMissingData" - case unit = "Unit" - } +extension PutMetricAlarmOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let alarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmName) - alarmName = alarmNameDecoded - let alarmDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmDescription) - alarmDescription = alarmDescriptionDecoded - let actionsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .actionsEnabled) - actionsEnabled = actionsEnabledDecoded - if containerValues.contains(.okActions) { - struct KeyVal0{struct member{}} - let okActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .okActions) - if let okActionsWrappedContainer = okActionsWrappedContainer { - let okActionsContainer = try okActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var okActionsBuffer:[Swift.String]? = nil - if let okActionsContainer = okActionsContainer { - okActionsBuffer = [Swift.String]() - for stringContainer0 in okActionsContainer { - okActionsBuffer?.append(stringContainer0) - } - } - okActions = okActionsBuffer - } else { - okActions = [] - } - } else { - okActions = nil - } - if containerValues.contains(.alarmActions) { - struct KeyVal0{struct member{}} - let alarmActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alarmActions) - if let alarmActionsWrappedContainer = alarmActionsWrappedContainer { - let alarmActionsContainer = try alarmActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alarmActionsBuffer:[Swift.String]? = nil - if let alarmActionsContainer = alarmActionsContainer { - alarmActionsBuffer = [Swift.String]() - for stringContainer0 in alarmActionsContainer { - alarmActionsBuffer?.append(stringContainer0) - } - } - alarmActions = alarmActionsBuffer - } else { - alarmActions = [] - } - } else { - alarmActions = nil - } - if containerValues.contains(.insufficientDataActions) { - struct KeyVal0{struct member{}} - let insufficientDataActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .insufficientDataActions) - if let insufficientDataActionsWrappedContainer = insufficientDataActionsWrappedContainer { - let insufficientDataActionsContainer = try insufficientDataActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var insufficientDataActionsBuffer:[Swift.String]? = nil - if let insufficientDataActionsContainer = insufficientDataActionsContainer { - insufficientDataActionsBuffer = [Swift.String]() - for stringContainer0 in insufficientDataActionsContainer { - insufficientDataActionsBuffer?.append(stringContainer0) - } - } - insufficientDataActions = insufficientDataActionsBuffer - } else { - insufficientDataActions = [] - } - } else { - insufficientDataActions = nil - } - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let statisticDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.Statistic.self, forKey: .statistic) - statistic = statisticDecoded - let extendedStatisticDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .extendedStatistic) - extendedStatistic = extendedStatisticDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil - } - let periodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .period) - period = periodDecoded - let unitDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StandardUnit.self, forKey: .unit) - unit = unitDecoded - let evaluationPeriodsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .evaluationPeriods) - evaluationPeriods = evaluationPeriodsDecoded - let datapointsToAlarmDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .datapointsToAlarm) - datapointsToAlarm = datapointsToAlarmDecoded - let thresholdDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .threshold) - threshold = thresholdDecoded - let comparisonOperatorDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.ComparisonOperator.self, forKey: .comparisonOperator) - comparisonOperator = comparisonOperatorDecoded - let treatMissingDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .treatMissingData) - treatMissingData = treatMissingDataDecoded - let evaluateLowSampleCountPercentileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .evaluateLowSampleCountPercentile) - evaluateLowSampleCountPercentile = evaluateLowSampleCountPercentileDecoded - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricDataQuery].self, forKey: .member) - var metricsBuffer:[CloudWatchClientTypes.MetricDataQuery]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [CloudWatchClientTypes.MetricDataQuery]() - for structureContainer0 in metricsContainer { - metricsBuffer?.append(structureContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] - } - } else { - metrics = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudWatchClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudWatchClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutMetricAlarmOutput() } - let thresholdMetricIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .thresholdMetricId) - thresholdMetricId = thresholdMetricIdDecoded - } -} - -extension PutMetricAlarmOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -9720,17 +7103,29 @@ public struct PutMetricAlarmOutput: Swift.Equatable { public init() { } } -enum PutMetricAlarmOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutMetricAlarmOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutMetricDataInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case metricData = "MetricData" + case namespace = "Namespace" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let metricData = metricData { @@ -9778,67 +7173,53 @@ public struct PutMetricDataInput: Swift.Equatable { } } -struct PutMetricDataInputBody: Swift.Equatable { - let namespace: Swift.String? - let metricData: [CloudWatchClientTypes.MetricDatum]? -} - -extension PutMetricDataInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metricData = "MetricData" - case namespace = "Namespace" - } +extension PutMetricDataOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - if containerValues.contains(.metricData) { - struct KeyVal0{struct member{}} - let metricDataWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricData) - if let metricDataWrappedContainer = metricDataWrappedContainer { - let metricDataContainer = try metricDataWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricDatum].self, forKey: .member) - var metricDataBuffer:[CloudWatchClientTypes.MetricDatum]? = nil - if let metricDataContainer = metricDataContainer { - metricDataBuffer = [CloudWatchClientTypes.MetricDatum]() - for structureContainer0 in metricDataContainer { - metricDataBuffer?.append(structureContainer0) - } - } - metricData = metricDataBuffer - } else { - metricData = [] - } - } else { - metricData = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutMetricDataOutput() } } } -extension PutMetricDataOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct PutMetricDataOutput: Swift.Equatable { public init() { } } -enum PutMetricDataOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutMetricDataOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutMetricStreamInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case excludeFilters = "ExcludeFilters" + case firehoseArn = "FirehoseArn" + case includeFilters = "IncludeFilters" + case includeLinkedAccountsMetrics = "IncludeLinkedAccountsMetrics" + case name = "Name" + case outputFormat = "OutputFormat" + case roleArn = "RoleArn" + case statisticsConfigurations = "StatisticsConfigurations" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let excludeFilters = excludeFilters { @@ -9968,130 +7349,15 @@ public struct PutMetricStreamInput: Swift.Equatable { } } -struct PutMetricStreamInputBody: Swift.Equatable { - let name: Swift.String? - let includeFilters: [CloudWatchClientTypes.MetricStreamFilter]? - let excludeFilters: [CloudWatchClientTypes.MetricStreamFilter]? - let firehoseArn: Swift.String? - let roleArn: Swift.String? - let outputFormat: CloudWatchClientTypes.MetricStreamOutputFormat? - let tags: [CloudWatchClientTypes.Tag]? - let statisticsConfigurations: [CloudWatchClientTypes.MetricStreamStatisticsConfiguration]? - let includeLinkedAccountsMetrics: Swift.Bool? -} - -extension PutMetricStreamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case excludeFilters = "ExcludeFilters" - case firehoseArn = "FirehoseArn" - case includeFilters = "IncludeFilters" - case includeLinkedAccountsMetrics = "IncludeLinkedAccountsMetrics" - case name = "Name" - case outputFormat = "OutputFormat" - case roleArn = "RoleArn" - case statisticsConfigurations = "StatisticsConfigurations" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.includeFilters) { - struct KeyVal0{struct member{}} - let includeFiltersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .includeFilters) - if let includeFiltersWrappedContainer = includeFiltersWrappedContainer { - let includeFiltersContainer = try includeFiltersWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricStreamFilter].self, forKey: .member) - var includeFiltersBuffer:[CloudWatchClientTypes.MetricStreamFilter]? = nil - if let includeFiltersContainer = includeFiltersContainer { - includeFiltersBuffer = [CloudWatchClientTypes.MetricStreamFilter]() - for structureContainer0 in includeFiltersContainer { - includeFiltersBuffer?.append(structureContainer0) - } - } - includeFilters = includeFiltersBuffer - } else { - includeFilters = [] - } - } else { - includeFilters = nil - } - if containerValues.contains(.excludeFilters) { - struct KeyVal0{struct member{}} - let excludeFiltersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludeFilters) - if let excludeFiltersWrappedContainer = excludeFiltersWrappedContainer { - let excludeFiltersContainer = try excludeFiltersWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricStreamFilter].self, forKey: .member) - var excludeFiltersBuffer:[CloudWatchClientTypes.MetricStreamFilter]? = nil - if let excludeFiltersContainer = excludeFiltersContainer { - excludeFiltersBuffer = [CloudWatchClientTypes.MetricStreamFilter]() - for structureContainer0 in excludeFiltersContainer { - excludeFiltersBuffer?.append(structureContainer0) - } - } - excludeFilters = excludeFiltersBuffer - } else { - excludeFilters = [] - } - } else { - excludeFilters = nil - } - let firehoseArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .firehoseArn) - firehoseArn = firehoseArnDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let outputFormatDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.MetricStreamOutputFormat.self, forKey: .outputFormat) - outputFormat = outputFormatDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudWatchClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudWatchClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.statisticsConfigurations) { - struct KeyVal0{struct member{}} - let statisticsConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statisticsConfigurations) - if let statisticsConfigurationsWrappedContainer = statisticsConfigurationsWrappedContainer { - let statisticsConfigurationsContainer = try statisticsConfigurationsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.MetricStreamStatisticsConfiguration].self, forKey: .member) - var statisticsConfigurationsBuffer:[CloudWatchClientTypes.MetricStreamStatisticsConfiguration]? = nil - if let statisticsConfigurationsContainer = statisticsConfigurationsContainer { - statisticsConfigurationsBuffer = [CloudWatchClientTypes.MetricStreamStatisticsConfiguration]() - for structureContainer0 in statisticsConfigurationsContainer { - statisticsConfigurationsBuffer?.append(structureContainer0) - } - } - statisticsConfigurations = statisticsConfigurationsBuffer - } else { - statisticsConfigurations = [] - } - } else { - statisticsConfigurations = nil - } - let includeLinkedAccountsMetricsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeLinkedAccountsMetrics) - includeLinkedAccountsMetrics = includeLinkedAccountsMetricsDecoded - } -} +extension PutMetricStreamOutput { -extension PutMetricStreamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PutMetricStreamOutputBody = try responseDecoder.decode(responseBody: data) - self.arn = output.arn - } else { - self.arn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PutMetricStreamResult"] + var value = PutMetricStreamOutput() + value.arn = try reader["Arn"].readIfPresent() + return value } } } @@ -10108,38 +7374,28 @@ public struct PutMetricStreamOutput: Swift.Equatable { } } -struct PutMetricStreamOutputBody: Swift.Equatable { - let arn: Swift.String? -} - -extension PutMetricStreamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PutMetricStreamResult")) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - } -} +enum PutMetricStreamOutputError { -enum PutMetricStreamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModificationException": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModificationException": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CloudWatchClientTypes.Range: Swift.Codable { +extension CloudWatchClientTypes.Range: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case endTime = "EndTime" case startTime = "StartTime" @@ -10155,12 +7411,14 @@ extension CloudWatchClientTypes.Range: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.Range() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -10216,16 +7474,14 @@ extension CloudWatchClientTypes { } extension ResourceNotFound { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFound() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10254,37 +7510,17 @@ public struct ResourceNotFound: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct ResourceNotFoundBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceNotFoundBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ResourceNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.resourceId = output.error.resourceId - self.properties.resourceType = output.error.resourceType - } else { - self.properties.message = nil - self.properties.resourceId = nil - self.properties.resourceType = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.properties.resourceId = try reader["ResourceId"].readIfPresent() + value.properties.resourceType = try reader["ResourceType"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10318,30 +7554,6 @@ public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -struct ResourceNotFoundExceptionBody: Swift.Equatable { - let resourceType: Swift.String? - let resourceId: Swift.String? - let message: Swift.String? -} - -extension ResourceNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - case resourceId = "ResourceId" - case resourceType = "ResourceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CloudWatchClientTypes { public enum ScanBy: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case timestampAscending @@ -10375,6 +7587,13 @@ extension CloudWatchClientTypes { } extension SetAlarmStateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case alarmName = "AlarmName" + case stateReason = "StateReason" + case stateReasonData = "StateReasonData" + case stateValue = "StateValue" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let alarmName = alarmName { @@ -10428,36 +7647,12 @@ public struct SetAlarmStateInput: Swift.Equatable { } } -struct SetAlarmStateInputBody: Swift.Equatable { - let alarmName: Swift.String? - let stateValue: CloudWatchClientTypes.StateValue? - let stateReason: Swift.String? - let stateReasonData: Swift.String? -} - -extension SetAlarmStateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmName = "AlarmName" - case stateReason = "StateReason" - case stateReasonData = "StateReasonData" - case stateValue = "StateValue" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let alarmNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alarmName) - alarmName = alarmNameDecoded - let stateValueDecoded = try containerValues.decodeIfPresent(CloudWatchClientTypes.StateValue.self, forKey: .stateValue) - stateValue = stateValueDecoded - let stateReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateReason) - stateReason = stateReasonDecoded - let stateReasonDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateReasonData) - stateReasonData = stateReasonDataDecoded - } -} +extension SetAlarmStateOutput { -extension SetAlarmStateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetAlarmStateOutput() + } } } @@ -10466,18 +7661,25 @@ public struct SetAlarmStateOutput: Swift.Equatable { public init() { } } -enum SetAlarmStateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidFormat": return try await InvalidFormatFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetAlarmStateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidFormat": return try await InvalidFormatFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFound.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CloudWatchClientTypes.SingleMetricAnomalyDetector: Swift.Codable { +extension CloudWatchClientTypes.SingleMetricAnomalyDetector: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dimensions = "Dimensions" case metricName = "MetricName" @@ -10510,33 +7712,16 @@ extension CloudWatchClientTypes.SingleMetricAnomalyDetector: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[CloudWatchClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [CloudWatchClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.SingleMetricAnomalyDetector() + value.namespace = try reader["Namespace"].readIfPresent() + value.metricName = try reader["MetricName"].readIfPresent() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: CloudWatchClientTypes.Dimension.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.stat = try reader["Stat"].readIfPresent() + return value } - let statDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stat) - stat = statDecoded } } @@ -10676,6 +7861,10 @@ extension CloudWatchClientTypes { } extension StartMetricStreamsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case names = "Names" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let names = names { @@ -10715,57 +7904,35 @@ public struct StartMetricStreamsInput: Swift.Equatable { } } -struct StartMetricStreamsInputBody: Swift.Equatable { - let names: [Swift.String]? -} - -extension StartMetricStreamsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case names = "Names" - } +extension StartMetricStreamsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.names) { - struct KeyVal0{struct member{}} - let namesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .names) - if let namesWrappedContainer = namesWrappedContainer { - let namesContainer = try namesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var namesBuffer:[Swift.String]? = nil - if let namesContainer = namesContainer { - namesBuffer = [Swift.String]() - for stringContainer0 in namesContainer { - namesBuffer?.append(stringContainer0) - } - } - names = namesBuffer - } else { - names = [] - } - } else { - names = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return StartMetricStreamsOutput() } } } -extension StartMetricStreamsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct StartMetricStreamsOutput: Swift.Equatable { public init() { } } -enum StartMetricStreamsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum StartMetricStreamsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -10846,7 +8013,7 @@ extension CloudWatchClientTypes { } } -extension CloudWatchClientTypes.StatisticSet: Swift.Codable { +extension CloudWatchClientTypes.StatisticSet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maximum = "Maximum" case minimum = "Minimum" @@ -10870,16 +8037,16 @@ extension CloudWatchClientTypes.StatisticSet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sampleCountDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .sampleCount) - sampleCount = sampleCountDecoded - let sumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .sum) - sum = sumDecoded - let minimumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minimum) - minimum = minimumDecoded - let maximumDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maximum) - maximum = maximumDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.StatisticSet() + value.sampleCount = try reader["SampleCount"].readIfPresent() + value.sum = try reader["Sum"].readIfPresent() + value.minimum = try reader["Minimum"].readIfPresent() + value.maximum = try reader["Maximum"].readIfPresent() + return value + } } } @@ -10954,6 +8121,10 @@ extension CloudWatchClientTypes { } extension StopMetricStreamsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case names = "Names" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let names = names { @@ -10993,62 +8164,40 @@ public struct StopMetricStreamsInput: Swift.Equatable { } } -struct StopMetricStreamsInputBody: Swift.Equatable { - let names: [Swift.String]? -} - -extension StopMetricStreamsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case names = "Names" - } +extension StopMetricStreamsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.names) { - struct KeyVal0{struct member{}} - let namesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .names) - if let namesWrappedContainer = namesWrappedContainer { - let namesContainer = try namesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var namesBuffer:[Swift.String]? = nil - if let namesContainer = namesContainer { - namesBuffer = [Swift.String]() - for stringContainer0 in namesContainer { - namesBuffer?.append(stringContainer0) - } - } - names = namesBuffer - } else { - names = [] - } - } else { - names = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return StopMetricStreamsOutput() } } } -extension StopMetricStreamsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct StopMetricStreamsOutput: Swift.Equatable { public init() { } } -enum StopMetricStreamsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingParameter": return try await MissingRequiredParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum StopMetricStreamsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingParameter": return try await MissingRequiredParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CloudWatchClientTypes.Tag: Swift.Codable { +extension CloudWatchClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -11064,12 +8213,14 @@ extension CloudWatchClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CloudWatchClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -11096,6 +8247,11 @@ extension CloudWatchClientTypes { } extension TagResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceARN = "ResourceARN" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceARN = resourceARN { @@ -11143,67 +8299,46 @@ public struct TagResourceInput: Swift.Equatable { } } -struct TagResourceInputBody: Swift.Equatable { - let resourceARN: Swift.String? - let tags: [CloudWatchClientTypes.Tag]? -} - -extension TagResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceARN = "ResourceARN" - case tags = "Tags" - } +extension TagResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceARN) - resourceARN = resourceARNDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([CloudWatchClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[CloudWatchClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [CloudWatchClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagResourceOutput() } } } -extension TagResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagResourceOutput: Swift.Equatable { public init() { } } -enum TagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModificationException": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModificationException": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceARN = "ResourceARN" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceARN = resourceARN { @@ -11251,62 +8386,36 @@ public struct UntagResourceInput: Swift.Equatable { } } -struct UntagResourceInputBody: Swift.Equatable { - let resourceARN: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceARN = "ResourceARN" - case tagKeys = "TagKeys" - } +extension UntagResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceARN) - resourceARN = resourceARNDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagResourceOutput() } } } -extension UntagResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagResourceOutput: Swift.Equatable { public init() { } } -enum UntagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModificationException": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceError": return try await InternalServiceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModificationException": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalServiceError": return try await InternalServiceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } diff --git a/Sources/Services/AWSCloudWatchLogs/models/Models.swift b/Sources/Services/AWSCloudWatchLogs/models/Models.swift index dc541fc613c..438de3864f8 100644 --- a/Sources/Services/AWSCloudWatchLogs/models/Models.swift +++ b/Sources/Services/AWSCloudWatchLogs/models/Models.swift @@ -12494,7 +12494,7 @@ extension StartLiveTailOutput: ClientRuntime.HttpResponseBinding { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.responseStream = decoderStream.toAsyncStream() } else { self.responseStream = nil diff --git a/Sources/Services/AWSDocDB/DocDBClient.swift b/Sources/Services/AWSDocDB/DocDBClient.swift index ef17bc07000..3248b83cca2 100644 --- a/Sources/Services/AWSDocDB/DocDBClient.swift +++ b/Sources/Services/AWSDocDB/DocDBClient.swift @@ -11,14 +11,11 @@ public class DocDBClient { let config: DocDBClient.DocDBClientConfiguration let serviceName = "DocDB" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: DocDBClient.DocDBClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -79,7 +76,6 @@ extension DocDBClient { public func addSourceIdentifierToSubscription(input: AddSourceIdentifierToSubscriptionInput) async throws -> AddSourceIdentifierToSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addSourceIdentifierToSubscription") @@ -103,7 +99,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddSourceIdentifierToSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddSourceIdentifierToSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddSourceIdentifierToSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -126,7 +122,6 @@ extension DocDBClient { public func addTagsToResource(input: AddTagsToResourceInput) async throws -> AddTagsToResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addTagsToResource") @@ -150,7 +145,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddTagsToResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddTagsToResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddTagsToResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -173,7 +168,6 @@ extension DocDBClient { public func applyPendingMaintenanceAction(input: ApplyPendingMaintenanceActionInput) async throws -> ApplyPendingMaintenanceActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "applyPendingMaintenanceAction") @@ -197,7 +191,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ApplyPendingMaintenanceActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ApplyPendingMaintenanceActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ApplyPendingMaintenanceActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -220,7 +214,6 @@ extension DocDBClient { public func copyDBClusterParameterGroup(input: CopyDBClusterParameterGroupInput) async throws -> CopyDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBClusterParameterGroup") @@ -244,7 +237,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -270,7 +263,6 @@ extension DocDBClient { public func copyDBClusterSnapshot(input: CopyDBClusterSnapshotInput) async throws -> CopyDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBClusterSnapshot") @@ -294,7 +286,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -331,7 +323,6 @@ extension DocDBClient { public func createDBCluster(input: CreateDBClusterInput) async throws -> CreateDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBCluster") @@ -355,7 +346,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -377,7 +368,6 @@ extension DocDBClient { public func createDBClusterParameterGroup(input: CreateDBClusterParameterGroupInput) async throws -> CreateDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBClusterParameterGroup") @@ -401,7 +391,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -426,7 +416,6 @@ extension DocDBClient { public func createDBClusterSnapshot(input: CreateDBClusterSnapshotInput) async throws -> CreateDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBClusterSnapshot") @@ -450,7 +439,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -485,7 +474,6 @@ extension DocDBClient { public func createDBInstance(input: CreateDBInstanceInput) async throws -> CreateDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBInstance") @@ -509,7 +497,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -534,7 +522,6 @@ extension DocDBClient { public func createDBSubnetGroup(input: CreateDBSubnetGroupInput) async throws -> CreateDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBSubnetGroup") @@ -558,7 +545,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -585,7 +572,6 @@ extension DocDBClient { public func createEventSubscription(input: CreateEventSubscriptionInput) async throws -> CreateEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createEventSubscription") @@ -609,7 +595,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -633,7 +619,6 @@ extension DocDBClient { public func createGlobalCluster(input: CreateGlobalClusterInput) async throws -> CreateGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createGlobalCluster") @@ -657,7 +642,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -682,7 +667,6 @@ extension DocDBClient { public func deleteDBCluster(input: DeleteDBClusterInput) async throws -> DeleteDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBCluster") @@ -706,7 +690,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -728,7 +712,6 @@ extension DocDBClient { public func deleteDBClusterParameterGroup(input: DeleteDBClusterParameterGroupInput) async throws -> DeleteDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterParameterGroup") @@ -752,7 +735,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -774,7 +757,6 @@ extension DocDBClient { public func deleteDBClusterSnapshot(input: DeleteDBClusterSnapshotInput) async throws -> DeleteDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterSnapshot") @@ -798,7 +780,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -823,7 +805,6 @@ extension DocDBClient { public func deleteDBInstance(input: DeleteDBInstanceInput) async throws -> DeleteDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBInstance") @@ -847,7 +828,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -870,7 +851,6 @@ extension DocDBClient { public func deleteDBSubnetGroup(input: DeleteDBSubnetGroupInput) async throws -> DeleteDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBSubnetGroup") @@ -894,7 +874,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -916,7 +896,6 @@ extension DocDBClient { public func deleteEventSubscription(input: DeleteEventSubscriptionInput) async throws -> DeleteEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteEventSubscription") @@ -940,7 +919,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -962,7 +941,6 @@ extension DocDBClient { public func deleteGlobalCluster(input: DeleteGlobalClusterInput) async throws -> DeleteGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteGlobalCluster") @@ -986,7 +964,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1007,7 +985,6 @@ extension DocDBClient { public func describeCertificates(input: DescribeCertificatesInput) async throws -> DescribeCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCertificates") @@ -1031,7 +1008,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1052,7 +1029,6 @@ extension DocDBClient { public func describeDBClusterParameterGroups(input: DescribeDBClusterParameterGroupsInput) async throws -> DescribeDBClusterParameterGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterParameterGroups") @@ -1076,7 +1052,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterParameterGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterParameterGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterParameterGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1097,7 +1073,6 @@ extension DocDBClient { public func describeDBClusterParameters(input: DescribeDBClusterParametersInput) async throws -> DescribeDBClusterParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterParameters") @@ -1121,7 +1096,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1142,7 +1117,6 @@ extension DocDBClient { public func describeDBClusterSnapshotAttributes(input: DescribeDBClusterSnapshotAttributesInput) async throws -> DescribeDBClusterSnapshotAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterSnapshotAttributes") @@ -1166,7 +1140,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterSnapshotAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterSnapshotAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterSnapshotAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1187,7 +1161,6 @@ extension DocDBClient { public func describeDBClusterSnapshots(input: DescribeDBClusterSnapshotsInput) async throws -> DescribeDBClusterSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterSnapshots") @@ -1211,7 +1184,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1232,7 +1205,6 @@ extension DocDBClient { public func describeDBClusters(input: DescribeDBClustersInput) async throws -> DescribeDBClustersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusters") @@ -1256,7 +1228,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClustersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClustersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClustersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1272,7 +1244,6 @@ extension DocDBClient { public func describeDBEngineVersions(input: DescribeDBEngineVersionsInput) async throws -> DescribeDBEngineVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBEngineVersions") @@ -1296,7 +1267,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBEngineVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBEngineVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBEngineVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1317,7 +1288,6 @@ extension DocDBClient { public func describeDBInstances(input: DescribeDBInstancesInput) async throws -> DescribeDBInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBInstances") @@ -1341,7 +1311,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1362,7 +1332,6 @@ extension DocDBClient { public func describeDBSubnetGroups(input: DescribeDBSubnetGroupsInput) async throws -> DescribeDBSubnetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBSubnetGroups") @@ -1386,7 +1355,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBSubnetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBSubnetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBSubnetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1402,7 +1371,6 @@ extension DocDBClient { public func describeEngineDefaultClusterParameters(input: DescribeEngineDefaultClusterParametersInput) async throws -> DescribeEngineDefaultClusterParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEngineDefaultClusterParameters") @@ -1426,7 +1394,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEngineDefaultClusterParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEngineDefaultClusterParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEngineDefaultClusterParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1442,7 +1410,6 @@ extension DocDBClient { public func describeEventCategories(input: DescribeEventCategoriesInput) async throws -> DescribeEventCategoriesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEventCategories") @@ -1466,7 +1433,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventCategoriesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventCategoriesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventCategoriesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1487,7 +1454,6 @@ extension DocDBClient { public func describeEventSubscriptions(input: DescribeEventSubscriptionsInput) async throws -> DescribeEventSubscriptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEventSubscriptions") @@ -1511,7 +1477,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventSubscriptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventSubscriptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventSubscriptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1527,7 +1493,6 @@ extension DocDBClient { public func describeEvents(input: DescribeEventsInput) async throws -> DescribeEventsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEvents") @@ -1551,7 +1516,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1572,7 +1537,6 @@ extension DocDBClient { public func describeGlobalClusters(input: DescribeGlobalClustersInput) async throws -> DescribeGlobalClustersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeGlobalClusters") @@ -1596,7 +1560,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeGlobalClustersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeGlobalClustersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeGlobalClustersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1612,7 +1576,6 @@ extension DocDBClient { public func describeOrderableDBInstanceOptions(input: DescribeOrderableDBInstanceOptionsInput) async throws -> DescribeOrderableDBInstanceOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeOrderableDBInstanceOptions") @@ -1636,7 +1599,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeOrderableDBInstanceOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeOrderableDBInstanceOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeOrderableDBInstanceOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1657,7 +1620,6 @@ extension DocDBClient { public func describePendingMaintenanceActions(input: DescribePendingMaintenanceActionsInput) async throws -> DescribePendingMaintenanceActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePendingMaintenanceActions") @@ -1681,7 +1643,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePendingMaintenanceActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePendingMaintenanceActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePendingMaintenanceActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1704,7 +1666,6 @@ extension DocDBClient { public func failoverDBCluster(input: FailoverDBClusterInput) async throws -> FailoverDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "failoverDBCluster") @@ -1728,7 +1689,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(FailoverDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(FailoverDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(FailoverDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1751,7 +1712,6 @@ extension DocDBClient { public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -1775,7 +1735,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1806,7 +1766,6 @@ extension DocDBClient { public func modifyDBCluster(input: ModifyDBClusterInput) async throws -> ModifyDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBCluster") @@ -1830,7 +1789,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1852,7 +1811,6 @@ extension DocDBClient { public func modifyDBClusterParameterGroup(input: ModifyDBClusterParameterGroupInput) async throws -> ModifyDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBClusterParameterGroup") @@ -1876,7 +1834,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1899,7 +1857,6 @@ extension DocDBClient { public func modifyDBClusterSnapshotAttribute(input: ModifyDBClusterSnapshotAttributeInput) async throws -> ModifyDBClusterSnapshotAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBClusterSnapshotAttribute") @@ -1923,7 +1880,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterSnapshotAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterSnapshotAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterSnapshotAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1956,7 +1913,6 @@ extension DocDBClient { public func modifyDBInstance(input: ModifyDBInstanceInput) async throws -> ModifyDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBInstance") @@ -1980,7 +1936,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2005,7 +1961,6 @@ extension DocDBClient { public func modifyDBSubnetGroup(input: ModifyDBSubnetGroupInput) async throws -> ModifyDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBSubnetGroup") @@ -2029,7 +1984,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2055,7 +2010,6 @@ extension DocDBClient { public func modifyEventSubscription(input: ModifyEventSubscriptionInput) async throws -> ModifyEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyEventSubscription") @@ -2079,7 +2033,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2101,7 +2055,6 @@ extension DocDBClient { public func modifyGlobalCluster(input: ModifyGlobalClusterInput) async throws -> ModifyGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyGlobalCluster") @@ -2125,7 +2078,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2147,7 +2100,6 @@ extension DocDBClient { public func rebootDBInstance(input: RebootDBInstanceInput) async throws -> RebootDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebootDBInstance") @@ -2171,7 +2123,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebootDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebootDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebootDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2194,7 +2146,6 @@ extension DocDBClient { public func removeFromGlobalCluster(input: RemoveFromGlobalClusterInput) async throws -> RemoveFromGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeFromGlobalCluster") @@ -2218,7 +2169,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveFromGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveFromGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveFromGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2240,7 +2191,6 @@ extension DocDBClient { public func removeSourceIdentifierFromSubscription(input: RemoveSourceIdentifierFromSubscriptionInput) async throws -> RemoveSourceIdentifierFromSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeSourceIdentifierFromSubscription") @@ -2264,7 +2214,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveSourceIdentifierFromSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveSourceIdentifierFromSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveSourceIdentifierFromSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2287,7 +2237,6 @@ extension DocDBClient { public func removeTagsFromResource(input: RemoveTagsFromResourceInput) async throws -> RemoveTagsFromResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeTagsFromResource") @@ -2311,7 +2260,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveTagsFromResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveTagsFromResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveTagsFromResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2333,7 +2282,6 @@ extension DocDBClient { public func resetDBClusterParameterGroup(input: ResetDBClusterParameterGroupInput) async throws -> ResetDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetDBClusterParameterGroup") @@ -2357,7 +2305,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2391,7 +2339,6 @@ extension DocDBClient { public func restoreDBClusterFromSnapshot(input: RestoreDBClusterFromSnapshotInput) async throws -> RestoreDBClusterFromSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBClusterFromSnapshot") @@ -2415,7 +2362,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBClusterFromSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBClusterFromSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBClusterFromSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2450,7 +2397,6 @@ extension DocDBClient { public func restoreDBClusterToPointInTime(input: RestoreDBClusterToPointInTimeInput) async throws -> RestoreDBClusterToPointInTimeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBClusterToPointInTime") @@ -2474,7 +2420,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBClusterToPointInTimeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBClusterToPointInTimeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBClusterToPointInTimeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2497,7 +2443,6 @@ extension DocDBClient { public func startDBCluster(input: StartDBClusterInput) async throws -> StartDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startDBCluster") @@ -2521,7 +2466,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2544,7 +2489,6 @@ extension DocDBClient { public func stopDBCluster(input: StopDBClusterInput) async throws -> StopDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopDBCluster") @@ -2568,7 +2512,7 @@ extension DocDBClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSDocDB/models/Models.swift b/Sources/Services/AWSDocDB/models/Models.swift index b42b747503c..dd994d6cdc7 100644 --- a/Sources/Services/AWSDocDB/models/Models.swift +++ b/Sources/Services/AWSDocDB/models/Models.swift @@ -1,8 +1,15 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension AddSourceIdentifierToSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceIdentifier = "SourceIdentifier" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceIdentifier = sourceIdentifier { @@ -50,34 +57,15 @@ public struct AddSourceIdentifierToSubscriptionInput: Swift.Equatable { } } -struct AddSourceIdentifierToSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let sourceIdentifier: Swift.String? -} - -extension AddSourceIdentifierToSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceIdentifier = "SourceIdentifier" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - } -} +extension AddSourceIdentifierToSubscriptionOutput { -extension AddSourceIdentifierToSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AddSourceIdentifierToSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AddSourceIdentifierToSubscriptionResult"] + var value = AddSourceIdentifierToSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: DocDBClientTypes.EventSubscription.readingClosure) + return value } } } @@ -94,35 +82,30 @@ public struct AddSourceIdentifierToSubscriptionOutput: Swift.Equatable { } } -struct AddSourceIdentifierToSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: DocDBClientTypes.EventSubscription? -} - -extension AddSourceIdentifierToSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AddSourceIdentifierToSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum AddSourceIdentifierToSubscriptionOutputError { -enum AddSourceIdentifierToSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddTagsToResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -171,61 +154,35 @@ public struct AddTagsToResourceInput: Swift.Equatable { } } -struct AddTagsToResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tags: [DocDBClientTypes.Tag]? -} - -extension AddTagsToResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tags = "Tags" - } +extension AddTagsToResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddTagsToResourceOutput() } } } -extension AddTagsToResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct AddTagsToResourceOutput: Swift.Equatable { public init() { } } -enum AddTagsToResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddTagsToResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -263,6 +220,12 @@ extension DocDBClientTypes { } extension ApplyPendingMaintenanceActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyAction = "ApplyAction" + case optInType = "OptInType" + case resourceIdentifier = "ResourceIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyAction = applyAction { @@ -316,38 +279,15 @@ public struct ApplyPendingMaintenanceActionInput: Swift.Equatable { } } -struct ApplyPendingMaintenanceActionInputBody: Swift.Equatable { - let resourceIdentifier: Swift.String? - let applyAction: Swift.String? - let optInType: Swift.String? -} - -extension ApplyPendingMaintenanceActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyAction = "ApplyAction" - case optInType = "OptInType" - case resourceIdentifier = "ResourceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - let applyActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyAction) - applyAction = applyActionDecoded - let optInTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optInType) - optInType = optInTypeDecoded - } -} +extension ApplyPendingMaintenanceActionOutput { -extension ApplyPendingMaintenanceActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ApplyPendingMaintenanceActionOutputBody = try responseDecoder.decode(responseBody: data) - self.resourcePendingMaintenanceActions = output.resourcePendingMaintenanceActions - } else { - self.resourcePendingMaintenanceActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ApplyPendingMaintenanceActionResult"] + var value = ApplyPendingMaintenanceActionOutput() + value.resourcePendingMaintenanceActions = try reader["ResourcePendingMaintenanceActions"].readIfPresent(readingClosure: DocDBClientTypes.ResourcePendingMaintenanceActions.readingClosure) + return value } } } @@ -364,46 +304,34 @@ public struct ApplyPendingMaintenanceActionOutput: Swift.Equatable { } } -struct ApplyPendingMaintenanceActionOutputBody: Swift.Equatable { - let resourcePendingMaintenanceActions: DocDBClientTypes.ResourcePendingMaintenanceActions? -} - -extension ApplyPendingMaintenanceActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourcePendingMaintenanceActions = "ResourcePendingMaintenanceActions" - } +enum ApplyPendingMaintenanceActionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ApplyPendingMaintenanceActionResult")) - let resourcePendingMaintenanceActionsDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.ResourcePendingMaintenanceActions.self, forKey: .resourcePendingMaintenanceActions) - resourcePendingMaintenanceActions = resourcePendingMaintenanceActionsDecoded - } -} - -enum ApplyPendingMaintenanceActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AuthorizationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -431,23 +359,7 @@ public struct AuthorizationNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct AuthorizationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.AvailabilityZone: Swift.Codable { +extension DocDBClientTypes.AvailabilityZone: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -459,10 +371,13 @@ extension DocDBClientTypes.AvailabilityZone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.AvailabilityZone() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -482,7 +397,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.Certificate: Swift.Codable { +extension DocDBClientTypes.Certificate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case certificateArn = "CertificateArn" case certificateIdentifier = "CertificateIdentifier" @@ -514,20 +429,18 @@ extension DocDBClientTypes.Certificate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateIdentifier) - certificateIdentifier = certificateIdentifierDecoded - let certificateTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateType) - certificateType = certificateTypeDecoded - let thumbprintDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .thumbprint) - thumbprint = thumbprintDecoded - let validFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validFrom) - validFrom = validFromDecoded - let validTillDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validTill) - validTill = validTillDecoded - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.Certificate() + value.certificateIdentifier = try reader["CertificateIdentifier"].readIfPresent() + value.certificateType = try reader["CertificateType"].readIfPresent() + value.thumbprint = try reader["Thumbprint"].readIfPresent() + value.validFrom = try reader["ValidFrom"].readTimestampIfPresent(format: .dateTime) + value.validTill = try reader["ValidTill"].readTimestampIfPresent(format: .dateTime) + value.certificateArn = try reader["CertificateArn"].readIfPresent() + return value + } } } @@ -567,7 +480,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.CertificateDetails: Swift.Codable { +extension DocDBClientTypes.CertificateDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case caIdentifier = "CAIdentifier" case validTill = "ValidTill" @@ -583,12 +496,14 @@ extension DocDBClientTypes.CertificateDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let caIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caIdentifier) - caIdentifier = caIdentifierDecoded - let validTillDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validTill) - validTill = validTillDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.CertificateDetails() + value.caIdentifier = try reader["CAIdentifier"].readIfPresent() + value.validTill = try reader["ValidTill"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -613,16 +528,14 @@ extension DocDBClientTypes { } extension CertificateNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CertificateNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -650,23 +563,7 @@ public struct CertificateNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct CertificateNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CertificateNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.CloudwatchLogsExportConfiguration: Swift.Codable { +extension DocDBClientTypes.CloudwatchLogsExportConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case disableLogTypes = "DisableLogTypes" case enableLogTypes = "EnableLogTypes" @@ -700,45 +597,13 @@ extension DocDBClientTypes.CloudwatchLogsExportConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.enableLogTypes) { - struct KeyVal0{struct member{}} - let enableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableLogTypes) - if let enableLogTypesWrappedContainer = enableLogTypesWrappedContainer { - let enableLogTypesContainer = try enableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableLogTypesBuffer:[Swift.String]? = nil - if let enableLogTypesContainer = enableLogTypesContainer { - enableLogTypesBuffer = [Swift.String]() - for stringContainer0 in enableLogTypesContainer { - enableLogTypesBuffer?.append(stringContainer0) - } - } - enableLogTypes = enableLogTypesBuffer - } else { - enableLogTypes = [] - } - } else { - enableLogTypes = nil - } - if containerValues.contains(.disableLogTypes) { - struct KeyVal0{struct member{}} - let disableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .disableLogTypes) - if let disableLogTypesWrappedContainer = disableLogTypesWrappedContainer { - let disableLogTypesContainer = try disableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var disableLogTypesBuffer:[Swift.String]? = nil - if let disableLogTypesContainer = disableLogTypesContainer { - disableLogTypesBuffer = [Swift.String]() - for stringContainer0 in disableLogTypesContainer { - disableLogTypesBuffer?.append(stringContainer0) - } - } - disableLogTypes = disableLogTypesBuffer - } else { - disableLogTypes = [] - } - } else { - disableLogTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.CloudwatchLogsExportConfiguration() + value.enableLogTypes = try reader["EnableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.disableLogTypes = try reader["DisableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -764,6 +629,13 @@ extension DocDBClientTypes { } extension CopyDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceDBClusterParameterGroupIdentifier = "SourceDBClusterParameterGroupIdentifier" + case tags = "Tags" + case targetDBClusterParameterGroupDescription = "TargetDBClusterParameterGroupDescription" + case targetDBClusterParameterGroupIdentifier = "TargetDBClusterParameterGroupIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceDBClusterParameterGroupIdentifier = sourceDBClusterParameterGroupIdentifier { @@ -844,59 +716,15 @@ public struct CopyDBClusterParameterGroupInput: Swift.Equatable { } } -struct CopyDBClusterParameterGroupInputBody: Swift.Equatable { - let sourceDBClusterParameterGroupIdentifier: Swift.String? - let targetDBClusterParameterGroupIdentifier: Swift.String? - let targetDBClusterParameterGroupDescription: Swift.String? - let tags: [DocDBClientTypes.Tag]? -} - -extension CopyDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceDBClusterParameterGroupIdentifier = "SourceDBClusterParameterGroupIdentifier" - case tags = "Tags" - case targetDBClusterParameterGroupDescription = "TargetDBClusterParameterGroupDescription" - case targetDBClusterParameterGroupIdentifier = "TargetDBClusterParameterGroupIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBClusterParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterParameterGroupIdentifier) - sourceDBClusterParameterGroupIdentifier = sourceDBClusterParameterGroupIdentifierDecoded - let targetDBClusterParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterParameterGroupIdentifier) - targetDBClusterParameterGroupIdentifier = targetDBClusterParameterGroupIdentifierDecoded - let targetDBClusterParameterGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterParameterGroupDescription) - targetDBClusterParameterGroupDescription = targetDBClusterParameterGroupDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CopyDBClusterParameterGroupOutput { -extension CopyDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroup = output.dbClusterParameterGroup - } else { - self.dbClusterParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBClusterParameterGroupResult"] + var value = CopyDBClusterParameterGroupOutput() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent(readingClosure: DocDBClientTypes.DBClusterParameterGroup.readingClosure) + return value } } } @@ -913,36 +741,35 @@ public struct CopyDBClusterParameterGroupOutput: Swift.Equatable { } } -struct CopyDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroup: DocDBClientTypes.DBClusterParameterGroup? -} - -extension CopyDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroup = "DBClusterParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBClusterParameterGroupResult")) - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBClusterParameterGroup.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - } -} +enum CopyDBClusterParameterGroupOutputError { -enum CopyDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopyDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case copyTags = "CopyTags" + case kmsKeyId = "KmsKeyId" + case preSignedUrl = "PreSignedUrl" + case sourceDBClusterSnapshotIdentifier = "SourceDBClusterSnapshotIdentifier" + case tags = "Tags" + case targetDBClusterSnapshotIdentifier = "TargetDBClusterSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let copyTags = copyTags { @@ -1043,67 +870,15 @@ public struct CopyDBClusterSnapshotInput: Swift.Equatable { } } -struct CopyDBClusterSnapshotInputBody: Swift.Equatable { - let sourceDBClusterSnapshotIdentifier: Swift.String? - let targetDBClusterSnapshotIdentifier: Swift.String? - let kmsKeyId: Swift.String? - let preSignedUrl: Swift.String? - let copyTags: Swift.Bool? - let tags: [DocDBClientTypes.Tag]? -} - -extension CopyDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case copyTags = "CopyTags" - case kmsKeyId = "KmsKeyId" - case preSignedUrl = "PreSignedUrl" - case sourceDBClusterSnapshotIdentifier = "SourceDBClusterSnapshotIdentifier" - case tags = "Tags" - case targetDBClusterSnapshotIdentifier = "TargetDBClusterSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterSnapshotIdentifier) - sourceDBClusterSnapshotIdentifier = sourceDBClusterSnapshotIdentifierDecoded - let targetDBClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterSnapshotIdentifier) - targetDBClusterSnapshotIdentifier = targetDBClusterSnapshotIdentifierDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - let copyTagsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTags) - copyTags = copyTagsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CopyDBClusterSnapshotOutput { -extension CopyDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBClusterSnapshotResult"] + var value = CopyDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: DocDBClientTypes.DBClusterSnapshot.readingClosure) + return value } } } @@ -1120,39 +895,53 @@ public struct CopyDBClusterSnapshotOutput: Swift.Equatable { } } -struct CopyDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: DocDBClientTypes.DBClusterSnapshot? -} - -extension CopyDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded - } -} +enum CopyDBClusterSnapshotOutputError { -enum CopyDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case availabilityZones = "AvailabilityZones" + case backupRetentionPeriod = "BackupRetentionPeriod" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbSubnetGroupName = "DBSubnetGroupName" + case deletionProtection = "DeletionProtection" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case engine = "Engine" + case engineVersion = "EngineVersion" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case kmsKeyId = "KmsKeyId" + case masterUserPassword = "MasterUserPassword" + case masterUsername = "MasterUsername" + case port = "Port" + case preSignedUrl = "PreSignedUrl" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case storageEncrypted = "StorageEncrypted" + case storageType = "StorageType" + case tags = "Tags" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZones = availabilityZones { @@ -1391,178 +1180,15 @@ public struct CreateDBClusterInput: Swift.Equatable { } } -struct CreateDBClusterInputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let backupRetentionPeriod: Swift.Int? - let dbClusterIdentifier: Swift.String? - let dbClusterParameterGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let dbSubnetGroupName: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let port: Swift.Int? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let tags: [DocDBClientTypes.Tag]? - let storageEncrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let preSignedUrl: Swift.String? - let enableCloudwatchLogsExports: [Swift.String]? - let deletionProtection: Swift.Bool? - let globalClusterIdentifier: Swift.String? - let storageType: Swift.String? -} - -extension CreateDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - case backupRetentionPeriod = "BackupRetentionPeriod" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case deletionProtection = "DeletionProtection" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case engine = "Engine" - case engineVersion = "EngineVersion" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case kmsKeyId = "KmsKeyId" - case masterUserPassword = "MasterUserPassword" - case masterUsername = "MasterUsername" - case port = "Port" - case preSignedUrl = "PreSignedUrl" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case storageEncrypted = "StorageEncrypted" - case storageType = "StorageType" - case tags = "Tags" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - } -} +extension CreateDBClusterOutput { -extension CreateDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterResult"] + var value = CreateDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: DocDBClientTypes.DBCluster.readingClosure) + return value } } } @@ -1579,50 +1205,47 @@ public struct CreateDBClusterOutput: Swift.Equatable { } } -struct CreateDBClusterOutputBody: Swift.Equatable { - let dbCluster: DocDBClientTypes.DBCluster? -} - -extension CreateDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum CreateDBClusterOutputError { -enum CreateDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbParameterGroupFamily = "DBParameterGroupFamily" + case description = "Description" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -1691,59 +1314,15 @@ public struct CreateDBClusterParameterGroupInput: Swift.Equatable { } } -struct CreateDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let dbParameterGroupFamily: Swift.String? - let description: Swift.String? - let tags: [DocDBClientTypes.Tag]? -} - -extension CreateDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbParameterGroupFamily = "DBParameterGroupFamily" - case description = "Description" - case tags = "Tags" - } +extension CreateDBClusterParameterGroupOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroup = output.dbClusterParameterGroup - } else { - self.dbClusterParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterParameterGroupResult"] + var value = CreateDBClusterParameterGroupOutput() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent(readingClosure: DocDBClientTypes.DBClusterParameterGroup.readingClosure) + return value } } } @@ -1760,35 +1339,31 @@ public struct CreateDBClusterParameterGroupOutput: Swift.Equatable { } } -struct CreateDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroup: DocDBClientTypes.DBClusterParameterGroup? -} - -extension CreateDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroup = "DBClusterParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterParameterGroupResult")) - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBClusterParameterGroup.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - } -} +enum CreateDBClusterParameterGroupOutputError { -enum CreateDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -1858,57 +1433,17 @@ public struct CreateDBClusterSnapshotInput: Swift.Equatable { } } -struct CreateDBClusterSnapshotInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let tags: [DocDBClientTypes.Tag]? -} - -extension CreateDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil - } - } +extension CreateDBClusterSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterSnapshotResult"] + var value = CreateDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: DocDBClientTypes.DBClusterSnapshot.readingClosure) + return value + } + } } public struct CreateDBClusterSnapshotOutput: Swift.Equatable { @@ -1923,38 +1458,44 @@ public struct CreateDBClusterSnapshotOutput: Swift.Equatable { } } -struct CreateDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: DocDBClientTypes.DBClusterSnapshot? -} - -extension CreateDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } +enum CreateDBClusterSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded - } -} - -enum CreateDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case availabilityZone = "AvailabilityZone" + case caCertificateIdentifier = "CACertificateIdentifier" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbInstanceClass = "DBInstanceClass" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case enablePerformanceInsights = "EnablePerformanceInsights" + case engine = "Engine" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case promotionTier = "PromotionTier" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoMinorVersionUpgrade = autoMinorVersionUpgrade { @@ -2091,95 +1632,15 @@ public struct CreateDBInstanceInput: Swift.Equatable { } } -struct CreateDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let dbInstanceClass: Swift.String? - let engine: Swift.String? - let availabilityZone: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let tags: [DocDBClientTypes.Tag]? - let dbClusterIdentifier: Swift.String? - let copyTagsToSnapshot: Swift.Bool? - let promotionTier: Swift.Int? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let caCertificateIdentifier: Swift.String? -} - -extension CreateDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case availabilityZone = "AvailabilityZone" - case caCertificateIdentifier = "CACertificateIdentifier" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbInstanceClass = "DBInstanceClass" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case enablePerformanceInsights = "EnablePerformanceInsights" - case engine = "Engine" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case promotionTier = "PromotionTier" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - } -} +extension CreateDBInstanceOutput { -extension CreateDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBInstanceResult"] + var value = CreateDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: DocDBClientTypes.DBInstance.readingClosure) + return value } } } @@ -2196,48 +1657,45 @@ public struct CreateDBInstanceOutput: Swift.Equatable { } } -struct CreateDBInstanceOutputBody: Swift.Equatable { - let dbInstance: DocDBClientTypes.DBInstance? -} - -extension CreateDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum CreateDBInstanceOutputError { -enum CreateDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupDescription = "DBSubnetGroupDescription" + case dbSubnetGroupName = "DBSubnetGroupName" + case subnetIds = "SubnetIds" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupDescription = dbSubnetGroupDescription { @@ -2310,76 +1768,15 @@ public struct CreateDBSubnetGroupInput: Swift.Equatable { } } -struct CreateDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let dbSubnetGroupDescription: Swift.String? - let subnetIds: [Swift.String]? - let tags: [DocDBClientTypes.Tag]? -} - -extension CreateDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupDescription = "DBSubnetGroupDescription" - case dbSubnetGroupName = "DBSubnetGroupName" - case subnetIds = "SubnetIds" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateDBSubnetGroupOutput { -extension CreateDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroup = output.dbSubnetGroup - } else { - self.dbSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBSubnetGroupResult"] + var value = CreateDBSubnetGroupOutput() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: DocDBClientTypes.DBSubnetGroup.readingClosure) + return value } } } @@ -2396,38 +1793,38 @@ public struct CreateDBSubnetGroupOutput: Swift.Equatable { } } -struct CreateDBSubnetGroupOutputBody: Swift.Equatable { - let dbSubnetGroup: DocDBClientTypes.DBSubnetGroup? -} - -extension CreateDBSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroup = "DBSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBSubnetGroupResult")) - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - } -} +enum CreateDBSubnetGroupOutputError { -enum CreateDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupAlreadyExists": return try await DBSubnetGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupQuotaExceeded": return try await DBSubnetGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupAlreadyExists": return try await DBSubnetGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupQuotaExceeded": return try await DBSubnetGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case eventCategories = "EventCategories" + case snsTopicArn = "SnsTopicArn" + case sourceIds = "SourceIds" + case sourceType = "SourceType" + case subscriptionName = "SubscriptionName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -2539,105 +1936,15 @@ public struct CreateEventSubscriptionInput: Swift.Equatable { } } -struct CreateEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let snsTopicArn: Swift.String? - let sourceType: Swift.String? - let eventCategories: [Swift.String]? - let sourceIds: [Swift.String]? - let enabled: Swift.Bool? - let tags: [DocDBClientTypes.Tag]? -} - -extension CreateEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case eventCategories = "EventCategories" - case snsTopicArn = "SnsTopicArn" - case sourceIds = "SourceIds" - case sourceType = "SourceType" - case subscriptionName = "SubscriptionName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - if containerValues.contains(.sourceIds) { - struct KeyVal0{struct SourceId{}} - let sourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIds) - if let sourceIdsWrappedContainer = sourceIdsWrappedContainer { - let sourceIdsContainer = try sourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsBuffer:[Swift.String]? = nil - if let sourceIdsContainer = sourceIdsContainer { - sourceIdsBuffer = [Swift.String]() - for stringContainer0 in sourceIdsContainer { - sourceIdsBuffer?.append(stringContainer0) - } - } - sourceIds = sourceIdsBuffer - } else { - sourceIds = [] - } - } else { - sourceIds = nil - } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateEventSubscriptionOutput { -extension CreateEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateEventSubscriptionResult"] + var value = CreateEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: DocDBClientTypes.EventSubscription.readingClosure) + return value } } } @@ -2654,40 +1961,40 @@ public struct CreateEventSubscriptionOutput: Swift.Equatable { } } -struct CreateEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: DocDBClientTypes.EventSubscription? -} - -extension CreateEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum CreateEventSubscriptionOutputError { -enum CreateEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSInvalidTopic": return try await SNSInvalidTopicFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSNoAuthorization": return try await SNSNoAuthorizationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionAlreadyExist": return try await SubscriptionAlreadyExistFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSInvalidTopic": return try await SNSInvalidTopicFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSNoAuthorization": return try await SNSNoAuthorizationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionAlreadyExist": return try await SubscriptionAlreadyExistFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case databaseName = "DatabaseName" + case deletionProtection = "DeletionProtection" + case engine = "Engine" + case engineVersion = "EngineVersion" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" + case storageEncrypted = "StorageEncrypted" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let databaseName = databaseName { @@ -2761,54 +2068,15 @@ public struct CreateGlobalClusterInput: Swift.Equatable { } } -struct CreateGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let sourceDBClusterIdentifier: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let deletionProtection: Swift.Bool? - let databaseName: Swift.String? - let storageEncrypted: Swift.Bool? -} - -extension CreateGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case databaseName = "DatabaseName" - case deletionProtection = "DeletionProtection" - case engine = "Engine" - case engineVersion = "EngineVersion" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" - case storageEncrypted = "StorageEncrypted" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let sourceDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterIdentifier) - sourceDBClusterIdentifier = sourceDBClusterIdentifierDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - } -} +extension CreateGlobalClusterOutput { -extension CreateGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateGlobalClusterResult"] + var value = CreateGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: DocDBClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -2825,37 +2093,27 @@ public struct CreateGlobalClusterOutput: Swift.Equatable { } } -struct CreateGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: DocDBClientTypes.GlobalCluster? -} - -extension CreateGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum CreateGlobalClusterOutputError { -enum CreateGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterAlreadyExistsFault": return try await GlobalClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterQuotaExceededFault": return try await GlobalClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterAlreadyExistsFault": return try await GlobalClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterQuotaExceededFault": return try await GlobalClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension DocDBClientTypes.DBCluster: Swift.Codable { +extension DocDBClientTypes.DBCluster: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case associatedRoles = "AssociatedRoles" case availabilityZones = "AvailabilityZones" @@ -3049,176 +2307,45 @@ extension DocDBClientTypes.DBCluster: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let earliestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .earliestRestorableTime) - earliestRestorableTime = earliestRestorableTimeDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let readerEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .readerEndpoint) - readerEndpoint = readerEndpointDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let latestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestRestorableTime) - latestRestorableTime = latestRestorableTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let replicationSourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationSourceIdentifier) - replicationSourceIdentifier = replicationSourceIdentifierDecoded - if containerValues.contains(.readReplicaIdentifiers) { - struct KeyVal0{struct ReadReplicaIdentifier{}} - let readReplicaIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readReplicaIdentifiers) - if let readReplicaIdentifiersWrappedContainer = readReplicaIdentifiersWrappedContainer { - let readReplicaIdentifiersContainer = try readReplicaIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readReplicaIdentifiersBuffer:[Swift.String]? = nil - if let readReplicaIdentifiersContainer = readReplicaIdentifiersContainer { - readReplicaIdentifiersBuffer = [Swift.String]() - for stringContainer0 in readReplicaIdentifiersContainer { - readReplicaIdentifiersBuffer?.append(stringContainer0) - } - } - readReplicaIdentifiers = readReplicaIdentifiersBuffer - } else { - readReplicaIdentifiers = [] - } - } else { - readReplicaIdentifiers = nil - } - if containerValues.contains(.dbClusterMembers) { - struct KeyVal0{struct DBClusterMember{}} - let dbClusterMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterMembers) - if let dbClusterMembersWrappedContainer = dbClusterMembersWrappedContainer { - let dbClusterMembersContainer = try dbClusterMembersWrappedContainer.decodeIfPresent([DocDBClientTypes.DBClusterMember].self, forKey: .member) - var dbClusterMembersBuffer:[DocDBClientTypes.DBClusterMember]? = nil - if let dbClusterMembersContainer = dbClusterMembersContainer { - dbClusterMembersBuffer = [DocDBClientTypes.DBClusterMember]() - for structureContainer0 in dbClusterMembersContainer { - dbClusterMembersBuffer?.append(structureContainer0) - } - } - dbClusterMembers = dbClusterMembersBuffer - } else { - dbClusterMembers = [] - } - } else { - dbClusterMembers = nil - } - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroupMembership{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([DocDBClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[DocDBClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [DocDBClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] - } - } else { - vpcSecurityGroups = nil - } - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterResourceId) - dbClusterResourceId = dbClusterResourceIdDecoded - let dbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterArn) - dbClusterArn = dbClusterArnDecoded - if containerValues.contains(.associatedRoles) { - struct KeyVal0{struct DBClusterRole{}} - let associatedRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedRoles) - if let associatedRolesWrappedContainer = associatedRolesWrappedContainer { - let associatedRolesContainer = try associatedRolesWrappedContainer.decodeIfPresent([DocDBClientTypes.DBClusterRole].self, forKey: .member) - var associatedRolesBuffer:[DocDBClientTypes.DBClusterRole]? = nil - if let associatedRolesContainer = associatedRolesContainer { - associatedRolesBuffer = [DocDBClientTypes.DBClusterRole]() - for structureContainer0 in associatedRolesContainer { - associatedRolesBuffer?.append(structureContainer0) - } - } - associatedRoles = associatedRolesBuffer - } else { - associatedRoles = [] - } - } else { - associatedRoles = nil - } - let cloneGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloneGroupId) - cloneGroupId = cloneGroupIdDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - if containerValues.contains(.enabledCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enabledCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enabledCloudwatchLogsExports) - if let enabledCloudwatchLogsExportsWrappedContainer = enabledCloudwatchLogsExportsWrappedContainer { - let enabledCloudwatchLogsExportsContainer = try enabledCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enabledCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enabledCloudwatchLogsExportsContainer = enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enabledCloudwatchLogsExports = enabledCloudwatchLogsExportsBuffer - } else { - enabledCloudwatchLogsExports = [] - } - } else { - enabledCloudwatchLogsExports = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBCluster() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.earliestRestorableTime = try reader["EarliestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.endpoint = try reader["Endpoint"].readIfPresent() + value.readerEndpoint = try reader["ReaderEndpoint"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.latestRestorableTime = try reader["LatestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.port = try reader["Port"].readIfPresent() + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.preferredBackupWindow = try reader["PreferredBackupWindow"].readIfPresent() + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.replicationSourceIdentifier = try reader["ReplicationSourceIdentifier"].readIfPresent() + value.readReplicaIdentifiers = try reader["ReadReplicaIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ReadReplicaIdentifier", isFlattened: false) + value.dbClusterMembers = try reader["DBClusterMembers"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBClusterMember.readingClosure, memberNodeInfo: "DBClusterMember", isFlattened: false) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: DocDBClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroupMembership", isFlattened: false) + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbClusterResourceId = try reader["DbClusterResourceId"].readIfPresent() + value.dbClusterArn = try reader["DBClusterArn"].readIfPresent() + value.associatedRoles = try reader["AssociatedRoles"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBClusterRole.readingClosure, memberNodeInfo: "DBClusterRole", isFlattened: false) + value.cloneGroupId = try reader["CloneGroupId"].readIfPresent() + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.enabledCloudwatchLogsExports = try reader["EnabledCloudwatchLogsExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + return value } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded } } @@ -3367,16 +2494,14 @@ extension DocDBClientTypes { } extension DBClusterAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3404,23 +2529,7 @@ public struct DBClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSClient } } -struct DBClusterAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.DBClusterMember: Swift.Codable { +extension DocDBClientTypes.DBClusterMember: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterParameterGroupStatus = "DBClusterParameterGroupStatus" case dbInstanceIdentifier = "DBInstanceIdentifier" @@ -3444,16 +2553,16 @@ extension DocDBClientTypes.DBClusterMember: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let isClusterWriterDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isClusterWriter) - isClusterWriter = isClusterWriterDecoded - let dbClusterParameterGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupStatus) - dbClusterParameterGroupStatus = dbClusterParameterGroupStatusDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBClusterMember() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.isClusterWriter = try reader["IsClusterWriter"].readIfPresent() + value.dbClusterParameterGroupStatus = try reader["DBClusterParameterGroupStatus"].readIfPresent() + value.promotionTier = try reader["PromotionTier"].readIfPresent() + return value + } } } @@ -3486,16 +2595,14 @@ extension DocDBClientTypes { } extension DBClusterNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3523,23 +2630,7 @@ public struct DBClusterNotFoundFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct DBClusterNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.DBClusterParameterGroup: Swift.Codable { +extension DocDBClientTypes.DBClusterParameterGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterParameterGroupArn = "DBClusterParameterGroupArn" case dbClusterParameterGroupName = "DBClusterParameterGroupName" @@ -3563,16 +2654,16 @@ extension DocDBClientTypes.DBClusterParameterGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dbClusterParameterGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupArn) - dbClusterParameterGroupArn = dbClusterParameterGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBClusterParameterGroup() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.dbClusterParameterGroupArn = try reader["DBClusterParameterGroupArn"].readIfPresent() + return value + } } } @@ -3605,16 +2696,14 @@ extension DocDBClientTypes { } extension DBClusterParameterGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterParameterGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3642,33 +2731,15 @@ public struct DBClusterParameterGroupNotFoundFault: ClientRuntime.ModeledError, } } -struct DBClusterParameterGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterParameterGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3696,23 +2767,7 @@ public struct DBClusterQuotaExceededFault: ClientRuntime.ModeledError, AWSClient } } -struct DBClusterQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.DBClusterRole: Swift.Codable { +extension DocDBClientTypes.DBClusterRole: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case roleArn = "RoleArn" case status = "Status" @@ -3728,12 +2783,14 @@ extension DocDBClientTypes.DBClusterRole: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBClusterRole() + value.roleArn = try reader["RoleArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -3763,7 +2820,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.DBClusterSnapshot: Swift.Codable { +extension DocDBClientTypes.DBClusterSnapshot: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZones = "AvailabilityZones" case clusterCreateTime = "ClusterCreateTime" @@ -3852,61 +2909,30 @@ extension DocDBClientTypes.DBClusterSnapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let snapshotCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotCreateTime) - snapshotCreateTime = snapshotCreateTimeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbClusterSnapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotArn) - dbClusterSnapshotArn = dbClusterSnapshotArnDecoded - let sourceDBClusterSnapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterSnapshotArn) - sourceDBClusterSnapshotArn = sourceDBClusterSnapshotArnDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBClusterSnapshot() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.dbClusterSnapshotIdentifier = try reader["DBClusterSnapshotIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.snapshotCreateTime = try reader["SnapshotCreateTime"].readTimestampIfPresent(format: .dateTime) + value.engine = try reader["Engine"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.snapshotType = try reader["SnapshotType"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbClusterSnapshotArn = try reader["DBClusterSnapshotArn"].readIfPresent() + value.sourceDBClusterSnapshotArn = try reader["SourceDBClusterSnapshotArn"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + return value + } } } @@ -3995,16 +3021,14 @@ extension DocDBClientTypes { } extension DBClusterSnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterSnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4032,23 +3056,7 @@ public struct DBClusterSnapshotAlreadyExistsFault: ClientRuntime.ModeledError, A } } -struct DBClusterSnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterSnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.DBClusterSnapshotAttribute: Swift.Codable { +extension DocDBClientTypes.DBClusterSnapshotAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeName = "AttributeName" case attributeValues = "AttributeValues" @@ -4073,28 +3081,13 @@ extension DocDBClientTypes.DBClusterSnapshotAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.attributeValues) { - struct KeyVal0{struct AttributeValue{}} - let attributeValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeValues) - if let attributeValuesWrappedContainer = attributeValuesWrappedContainer { - let attributeValuesContainer = try attributeValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var attributeValuesBuffer:[Swift.String]? = nil - if let attributeValuesContainer = attributeValuesContainer { - attributeValuesBuffer = [Swift.String]() - for stringContainer0 in attributeValuesContainer { - attributeValuesBuffer?.append(stringContainer0) - } - } - attributeValues = attributeValuesBuffer - } else { - attributeValues = [] - } - } else { - attributeValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBClusterSnapshotAttribute() + value.attributeName = try reader["AttributeName"].readIfPresent() + value.attributeValues = try reader["AttributeValues"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AttributeValue", isFlattened: false) + return value } } } @@ -4119,7 +3112,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.DBClusterSnapshotAttributesResult: Swift.Codable { +extension DocDBClientTypes.DBClusterSnapshotAttributesResult: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterSnapshotAttributes = "DBClusterSnapshotAttributes" case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" @@ -4144,28 +3137,13 @@ extension DocDBClientTypes.DBClusterSnapshotAttributesResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - if containerValues.contains(.dbClusterSnapshotAttributes) { - struct KeyVal0{struct DBClusterSnapshotAttribute{}} - let dbClusterSnapshotAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterSnapshotAttributes) - if let dbClusterSnapshotAttributesWrappedContainer = dbClusterSnapshotAttributesWrappedContainer { - let dbClusterSnapshotAttributesContainer = try dbClusterSnapshotAttributesWrappedContainer.decodeIfPresent([DocDBClientTypes.DBClusterSnapshotAttribute].self, forKey: .member) - var dbClusterSnapshotAttributesBuffer:[DocDBClientTypes.DBClusterSnapshotAttribute]? = nil - if let dbClusterSnapshotAttributesContainer = dbClusterSnapshotAttributesContainer { - dbClusterSnapshotAttributesBuffer = [DocDBClientTypes.DBClusterSnapshotAttribute]() - for structureContainer0 in dbClusterSnapshotAttributesContainer { - dbClusterSnapshotAttributesBuffer?.append(structureContainer0) - } - } - dbClusterSnapshotAttributes = dbClusterSnapshotAttributesBuffer - } else { - dbClusterSnapshotAttributes = [] - } - } else { - dbClusterSnapshotAttributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBClusterSnapshotAttributesResult() + value.dbClusterSnapshotIdentifier = try reader["DBClusterSnapshotIdentifier"].readIfPresent() + value.dbClusterSnapshotAttributes = try reader["DBClusterSnapshotAttributes"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBClusterSnapshotAttribute.readingClosure, memberNodeInfo: "DBClusterSnapshotAttribute", isFlattened: false) + return value } } } @@ -4191,16 +3169,14 @@ extension DocDBClientTypes { } extension DBClusterSnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterSnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4228,23 +3204,7 @@ public struct DBClusterSnapshotNotFoundFault: ClientRuntime.ModeledError, AWSCli } } -struct DBClusterSnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterSnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.DBEngineVersion: Swift.Codable { +extension DocDBClientTypes.DBEngineVersion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbEngineDescription = "DBEngineDescription" case dbEngineVersionDescription = "DBEngineVersionDescription" @@ -4319,79 +3279,22 @@ extension DocDBClientTypes.DBEngineVersion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let dbEngineDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineDescription) - dbEngineDescription = dbEngineDescriptionDecoded - let dbEngineVersionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionDescription) - dbEngineVersionDescription = dbEngineVersionDescriptionDecoded - if containerValues.contains(.validUpgradeTarget) { - struct KeyVal0{struct UpgradeTarget{}} - let validUpgradeTargetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validUpgradeTarget) - if let validUpgradeTargetWrappedContainer = validUpgradeTargetWrappedContainer { - let validUpgradeTargetContainer = try validUpgradeTargetWrappedContainer.decodeIfPresent([DocDBClientTypes.UpgradeTarget].self, forKey: .member) - var validUpgradeTargetBuffer:[DocDBClientTypes.UpgradeTarget]? = nil - if let validUpgradeTargetContainer = validUpgradeTargetContainer { - validUpgradeTargetBuffer = [DocDBClientTypes.UpgradeTarget]() - for structureContainer0 in validUpgradeTargetContainer { - validUpgradeTargetBuffer?.append(structureContainer0) - } - } - validUpgradeTarget = validUpgradeTargetBuffer - } else { - validUpgradeTarget = [] - } - } else { - validUpgradeTarget = nil - } - if containerValues.contains(.exportableLogTypes) { - struct KeyVal0{struct member{}} - let exportableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportableLogTypes) - if let exportableLogTypesWrappedContainer = exportableLogTypesWrappedContainer { - let exportableLogTypesContainer = try exportableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportableLogTypesBuffer:[Swift.String]? = nil - if let exportableLogTypesContainer = exportableLogTypesContainer { - exportableLogTypesBuffer = [Swift.String]() - for stringContainer0 in exportableLogTypesContainer { - exportableLogTypesBuffer?.append(stringContainer0) - } - } - exportableLogTypes = exportableLogTypesBuffer - } else { - exportableLogTypes = [] - } - } else { - exportableLogTypes = nil - } - let supportsLogExportsToCloudwatchLogsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLogExportsToCloudwatchLogs) - supportsLogExportsToCloudwatchLogs = supportsLogExportsToCloudwatchLogsDecoded - if containerValues.contains(.supportedCACertificateIdentifiers) { - struct KeyVal0{struct member{}} - let supportedCACertificateIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCACertificateIdentifiers) - if let supportedCACertificateIdentifiersWrappedContainer = supportedCACertificateIdentifiersWrappedContainer { - let supportedCACertificateIdentifiersContainer = try supportedCACertificateIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedCACertificateIdentifiersBuffer:[Swift.String]? = nil - if let supportedCACertificateIdentifiersContainer = supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer = [Swift.String]() - for stringContainer0 in supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer?.append(stringContainer0) - } - } - supportedCACertificateIdentifiers = supportedCACertificateIdentifiersBuffer - } else { - supportedCACertificateIdentifiers = [] - } - } else { - supportedCACertificateIdentifiers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBEngineVersion() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.dbEngineDescription = try reader["DBEngineDescription"].readIfPresent() + value.dbEngineVersionDescription = try reader["DBEngineVersionDescription"].readIfPresent() + value.validUpgradeTarget = try reader["ValidUpgradeTarget"].readListIfPresent(memberReadingClosure: DocDBClientTypes.UpgradeTarget.readingClosure, memberNodeInfo: "UpgradeTarget", isFlattened: false) + value.exportableLogTypes = try reader["ExportableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsLogExportsToCloudwatchLogs = try reader["SupportsLogExportsToCloudwatchLogs"].readIfPresent() + value.supportedCACertificateIdentifiers = try reader["SupportedCACertificateIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsCertificateRotationWithoutRestart = try reader["SupportsCertificateRotationWithoutRestart"].readIfPresent() + return value } - let supportsCertificateRotationWithoutRestartDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsCertificateRotationWithoutRestart) - supportsCertificateRotationWithoutRestart = supportsCertificateRotationWithoutRestartDecoded } } @@ -4447,7 +3350,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.DBInstance: Swift.Codable { +extension DocDBClientTypes.DBInstance: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" case availabilityZone = "AvailabilityZone" @@ -4602,119 +3505,42 @@ extension DocDBClientTypes.DBInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let dbInstanceStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceStatus) - dbInstanceStatus = dbInstanceStatusDecoded - let endpointDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.Endpoint.self, forKey: .endpoint) - endpoint = endpointDecoded - let instanceCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .instanceCreateTime) - instanceCreateTime = instanceCreateTimeDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroupMembership{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([DocDBClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[DocDBClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [DocDBClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] - } - } else { - vpcSecurityGroups = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.PendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - let latestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestRestorableTime) - latestRestorableTime = latestRestorableTimeDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - if containerValues.contains(.statusInfos) { - struct KeyVal0{struct DBInstanceStatusInfo{}} - let statusInfosWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statusInfos) - if let statusInfosWrappedContainer = statusInfosWrappedContainer { - let statusInfosContainer = try statusInfosWrappedContainer.decodeIfPresent([DocDBClientTypes.DBInstanceStatusInfo].self, forKey: .member) - var statusInfosBuffer:[DocDBClientTypes.DBInstanceStatusInfo]? = nil - if let statusInfosContainer = statusInfosContainer { - statusInfosBuffer = [DocDBClientTypes.DBInstanceStatusInfo]() - for structureContainer0 in statusInfosContainer { - statusInfosBuffer?.append(structureContainer0) - } - } - statusInfos = statusInfosBuffer - } else { - statusInfos = [] - } - } else { - statusInfos = nil - } - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let dbInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceArn) - dbInstanceArn = dbInstanceArnDecoded - if containerValues.contains(.enabledCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enabledCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enabledCloudwatchLogsExports) - if let enabledCloudwatchLogsExportsWrappedContainer = enabledCloudwatchLogsExportsWrappedContainer { - let enabledCloudwatchLogsExportsContainer = try enabledCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enabledCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enabledCloudwatchLogsExportsContainer = enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enabledCloudwatchLogsExports = enabledCloudwatchLogsExportsBuffer - } else { - enabledCloudwatchLogsExports = [] - } - } else { - enabledCloudwatchLogsExports = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBInstance() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.dbInstanceStatus = try reader["DBInstanceStatus"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent(readingClosure: DocDBClientTypes.Endpoint.readingClosure) + value.instanceCreateTime = try reader["InstanceCreateTime"].readTimestampIfPresent(format: .dateTime) + value.preferredBackupWindow = try reader["PreferredBackupWindow"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: DocDBClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroupMembership", isFlattened: false) + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: DocDBClientTypes.DBSubnetGroup.readingClosure) + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: DocDBClientTypes.PendingModifiedValues.readingClosure) + value.latestRestorableTime = try reader["LatestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.autoMinorVersionUpgrade = try reader["AutoMinorVersionUpgrade"].readIfPresent() + value.publiclyAccessible = try reader["PubliclyAccessible"].readIfPresent() + value.statusInfos = try reader["StatusInfos"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBInstanceStatusInfo.readingClosure, memberNodeInfo: "DBInstanceStatusInfo", isFlattened: false) + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbiResourceId = try reader["DbiResourceId"].readIfPresent() + value.caCertificateIdentifier = try reader["CACertificateIdentifier"].readIfPresent() + value.copyTagsToSnapshot = try reader["CopyTagsToSnapshot"].readIfPresent() + value.promotionTier = try reader["PromotionTier"].readIfPresent() + value.dbInstanceArn = try reader["DBInstanceArn"].readIfPresent() + value.enabledCloudwatchLogsExports = try reader["EnabledCloudwatchLogsExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.certificateDetails = try reader["CertificateDetails"].readIfPresent(readingClosure: DocDBClientTypes.CertificateDetails.readingClosure) + value.performanceInsightsEnabled = try reader["PerformanceInsightsEnabled"].readIfPresent() + value.performanceInsightsKMSKeyId = try reader["PerformanceInsightsKMSKeyId"].readIfPresent() + return value } - let certificateDetailsDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.CertificateDetails.self, forKey: .certificateDetails) - certificateDetails = certificateDetailsDecoded - let performanceInsightsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .performanceInsightsEnabled) - performanceInsightsEnabled = performanceInsightsEnabledDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded } } @@ -4851,16 +3677,14 @@ extension DocDBClientTypes { } extension DBInstanceAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4888,33 +3712,15 @@ public struct DBInstanceAlreadyExistsFault: ClientRuntime.ModeledError, AWSClien } } -struct DBInstanceAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBInstanceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4942,23 +3748,7 @@ public struct DBInstanceNotFoundFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct DBInstanceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.DBInstanceStatusInfo: Swift.Codable { +extension DocDBClientTypes.DBInstanceStatusInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case message = "Message" case normal = "Normal" @@ -4982,16 +3772,16 @@ extension DocDBClientTypes.DBInstanceStatusInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusType) - statusType = statusTypeDecoded - let normalDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .normal) - normal = normalDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBInstanceStatusInfo() + value.statusType = try reader["StatusType"].readIfPresent() + value.normal = try reader["Normal"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + return value + } } } @@ -5024,16 +3814,14 @@ extension DocDBClientTypes { } extension DBParameterGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5061,33 +3849,15 @@ public struct DBParameterGroupAlreadyExistsFault: ClientRuntime.ModeledError, AW } } -struct DBParameterGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBParameterGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5115,33 +3885,15 @@ public struct DBParameterGroupNotFoundFault: ClientRuntime.ModeledError, AWSClie } } -struct DBParameterGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBParameterGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5169,33 +3921,15 @@ public struct DBParameterGroupQuotaExceededFault: ClientRuntime.ModeledError, AW } } -struct DBParameterGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSecurityGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSecurityGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5223,33 +3957,15 @@ public struct DBSecurityGroupNotFoundFault: ClientRuntime.ModeledError, AWSClien } } -struct DBSecurityGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSecurityGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5277,33 +3993,15 @@ public struct DBSnapshotAlreadyExistsFault: ClientRuntime.ModeledError, AWSClien } } -struct DBSnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5331,23 +4029,7 @@ public struct DBSnapshotNotFoundFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct DBSnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.DBSubnetGroup: Swift.Codable { +extension DocDBClientTypes.DBSubnetGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSubnetGroupArn = "DBSubnetGroupArn" case dbSubnetGroupDescription = "DBSubnetGroupDescription" @@ -5388,37 +4070,18 @@ extension DocDBClientTypes.DBSubnetGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let subnetGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupStatus) - subnetGroupStatus = subnetGroupStatusDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct Subnet{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([DocDBClientTypes.Subnet].self, forKey: .member) - var subnetsBuffer:[DocDBClientTypes.Subnet]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [DocDBClientTypes.Subnet]() - for structureContainer0 in subnetsContainer { - subnetsBuffer?.append(structureContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.DBSubnetGroup() + value.dbSubnetGroupName = try reader["DBSubnetGroupName"].readIfPresent() + value.dbSubnetGroupDescription = try reader["DBSubnetGroupDescription"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.subnetGroupStatus = try reader["SubnetGroupStatus"].readIfPresent() + value.subnets = try reader["Subnets"].readListIfPresent(memberReadingClosure: DocDBClientTypes.Subnet.readingClosure, memberNodeInfo: "Subnet", isFlattened: false) + value.dbSubnetGroupArn = try reader["DBSubnetGroupArn"].readIfPresent() + return value } - let dbSubnetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupArn) - dbSubnetGroupArn = dbSubnetGroupArnDecoded } } @@ -5459,16 +4122,14 @@ extension DocDBClientTypes { } extension DBSubnetGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5496,33 +4157,15 @@ public struct DBSubnetGroupAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct DBSubnetGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupDoesNotCoverEnoughAZs { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupDoesNotCoverEnoughAZs() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5550,33 +4193,15 @@ public struct DBSubnetGroupDoesNotCoverEnoughAZs: ClientRuntime.ModeledError, AW } } -struct DBSubnetGroupDoesNotCoverEnoughAZsBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupDoesNotCoverEnoughAZsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5604,33 +4229,15 @@ public struct DBSubnetGroupNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBSubnetGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5658,33 +4265,15 @@ public struct DBSubnetGroupQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct DBSubnetGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5712,33 +4301,15 @@ public struct DBSubnetQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBSubnetQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBUpgradeDependencyFailureFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBUpgradeDependencyFailureFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5766,23 +4337,13 @@ public struct DBUpgradeDependencyFailureFault: ClientRuntime.ModeledError, AWSCl } } -struct DBUpgradeDependencyFailureFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBUpgradeDependencyFailureFaultBody: Swift.Decodable { +extension DeleteDBClusterInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dbClusterIdentifier = "DBClusterIdentifier" + case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" + case skipFinalSnapshot = "SkipFinalSnapshot" } -} -extension DeleteDBClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -5836,38 +4397,15 @@ public struct DeleteDBClusterInput: Swift.Equatable { } } -struct DeleteDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let skipFinalSnapshot: Swift.Bool? - let finalDBSnapshotIdentifier: Swift.String? -} - -extension DeleteDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" - case skipFinalSnapshot = "SkipFinalSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let skipFinalSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipFinalSnapshot) - skipFinalSnapshot = skipFinalSnapshotDecoded - let finalDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalDBSnapshotIdentifier) - finalDBSnapshotIdentifier = finalDBSnapshotIdentifierDecoded - } -} +extension DeleteDBClusterOutput { -extension DeleteDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterResult"] + var value = DeleteDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: DocDBClientTypes.DBCluster.readingClosure) + return value } } } @@ -5884,38 +4422,32 @@ public struct DeleteDBClusterOutput: Swift.Equatable { } } -struct DeleteDBClusterOutputBody: Swift.Equatable { - let dbCluster: DocDBClientTypes.DBCluster? -} - -extension DeleteDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum DeleteDBClusterOutputError { -enum DeleteDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -5953,24 +4485,12 @@ public struct DeleteDBClusterParameterGroupInput: Swift.Equatable { } } -struct DeleteDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension DeleteDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} +extension DeleteDBClusterParameterGroupOutput { -extension DeleteDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBClusterParameterGroupOutput() + } } } @@ -5979,18 +4499,29 @@ public struct DeleteDBClusterParameterGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBClusterParameterGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifier { @@ -6022,30 +4553,15 @@ public struct DeleteDBClusterSnapshotInput: Swift.Equatable { } } -struct DeleteDBClusterSnapshotInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? -} - -extension DeleteDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - } -} +extension DeleteDBClusterSnapshotOutput { -extension DeleteDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterSnapshotResult"] + var value = DeleteDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: DocDBClientTypes.DBClusterSnapshot.readingClosure) + return value } } } @@ -6062,35 +4578,29 @@ public struct DeleteDBClusterSnapshotOutput: Swift.Equatable { } } -struct DeleteDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: DocDBClientTypes.DBClusterSnapshot? -} - -extension DeleteDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded - } -} +enum DeleteDBClusterSnapshotOutputError { -enum DeleteDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -6124,30 +4634,15 @@ public struct DeleteDBInstanceInput: Swift.Equatable { } } -struct DeleteDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? -} - -extension DeleteDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - } -} +extension DeleteDBInstanceOutput { -extension DeleteDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBInstanceResult"] + var value = DeleteDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: DocDBClientTypes.DBInstance.readingClosure) + return value } } } @@ -6164,38 +4659,32 @@ public struct DeleteDBInstanceOutput: Swift.Equatable { } } -struct DeleteDBInstanceOutputBody: Swift.Equatable { - let dbInstance: DocDBClientTypes.DBInstance? -} - -extension DeleteDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum DeleteDBInstanceOutputError { -enum DeleteDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupName = "DBSubnetGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupName = dbSubnetGroupName { @@ -6227,24 +4716,12 @@ public struct DeleteDBSubnetGroupInput: Swift.Equatable { } } -struct DeleteDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? -} - -extension DeleteDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupName = "DBSubnetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - } -} +extension DeleteDBSubnetGroupOutput { -extension DeleteDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBSubnetGroupOutput() + } } } @@ -6253,19 +4730,30 @@ public struct DeleteDBSubnetGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetStateFault": return try await InvalidDBSubnetStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBSubnetGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetStateFault": return try await InvalidDBSubnetStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let subscriptionName = subscriptionName { @@ -6297,30 +4785,15 @@ public struct DeleteEventSubscriptionInput: Swift.Equatable { } } -struct DeleteEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? -} - -extension DeleteEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - } -} +extension DeleteEventSubscriptionOutput { -extension DeleteEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteEventSubscriptionResult"] + var value = DeleteEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: DocDBClientTypes.EventSubscription.readingClosure) + return value } } } @@ -6337,35 +4810,29 @@ public struct DeleteEventSubscriptionOutput: Swift.Equatable { } } -struct DeleteEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: DocDBClientTypes.EventSubscription? -} - -extension DeleteEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum DeleteEventSubscriptionOutputError { -enum DeleteEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidEventSubscriptionState": return try await InvalidEventSubscriptionStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidEventSubscriptionState": return try await InvalidEventSubscriptionStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalClusterIdentifier = "GlobalClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalClusterIdentifier = globalClusterIdentifier { @@ -6397,30 +4864,15 @@ public struct DeleteGlobalClusterInput: Swift.Equatable { } } -struct DeleteGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? -} - -extension DeleteGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusterIdentifier = "GlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - } -} +extension DeleteGlobalClusterOutput { -extension DeleteGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteGlobalClusterResult"] + var value = DeleteGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: DocDBClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -6437,35 +4889,32 @@ public struct DeleteGlobalClusterOutput: Swift.Equatable { } } -struct DeleteGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: DocDBClientTypes.GlobalCluster? -} - -extension DeleteGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } +enum DeleteGlobalClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} - -enum DeleteGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateIdentifier = "CertificateIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificateIdentifier = certificateIdentifier { @@ -6531,61 +4980,16 @@ public struct DescribeCertificatesInput: Swift.Equatable { } } -struct DescribeCertificatesInputBody: Swift.Equatable { - let certificateIdentifier: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateIdentifier = "CertificateIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateIdentifier) - certificateIdentifier = certificateIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeCertificatesOutput { -extension DescribeCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCertificatesOutputBody = try responseDecoder.decode(responseBody: data) - self.certificates = output.certificates - self.marker = output.marker - } else { - self.certificates = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCertificatesResult"] + var value = DescribeCertificatesOutput() + value.certificates = try reader["Certificates"].readListIfPresent(memberReadingClosure: DocDBClientTypes.Certificate.readingClosure, memberNodeInfo: "Certificate", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -6606,55 +5010,31 @@ public struct DescribeCertificatesOutput: Swift.Equatable { } } -struct DescribeCertificatesOutputBody: Swift.Equatable { - let certificates: [DocDBClientTypes.Certificate]? - let marker: Swift.String? -} - -extension DescribeCertificatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificates = "Certificates" - case marker = "Marker" - } +enum DescribeCertificatesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCertificatesResult")) - if containerValues.contains(.certificates) { - struct KeyVal0{struct Certificate{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([DocDBClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[DocDBClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [DocDBClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CertificateNotFound": return try await CertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - certificates = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CertificateNotFound": return try await CertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterParameterGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClusterParameterGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -6717,61 +5097,16 @@ public struct DescribeDBClusterParameterGroupsInput: Swift.Equatable { } } -struct DescribeDBClusterParameterGroupsInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClusterParameterGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBClusterParameterGroupsOutput { -extension DescribeDBClusterParameterGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterParameterGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroups = output.dbClusterParameterGroups - self.marker = output.marker - } else { - self.dbClusterParameterGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterParameterGroupsResult"] + var value = DescribeDBClusterParameterGroupsOutput() + value.dbClusterParameterGroups = try reader["DBClusterParameterGroups"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBClusterParameterGroup.readingClosure, memberNodeInfo: "DBClusterParameterGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -6793,55 +5128,32 @@ public struct DescribeDBClusterParameterGroupsOutput: Swift.Equatable { } } -struct DescribeDBClusterParameterGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterParameterGroups: [DocDBClientTypes.DBClusterParameterGroup]? -} - -extension DescribeDBClusterParameterGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroups = "DBClusterParameterGroups" - case marker = "Marker" - } +enum DescribeDBClusterParameterGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterParameterGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterParameterGroups) { - struct KeyVal0{struct DBClusterParameterGroup{}} - let dbClusterParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterParameterGroups) - if let dbClusterParameterGroupsWrappedContainer = dbClusterParameterGroupsWrappedContainer { - let dbClusterParameterGroupsContainer = try dbClusterParameterGroupsWrappedContainer.decodeIfPresent([DocDBClientTypes.DBClusterParameterGroup].self, forKey: .member) - var dbClusterParameterGroupsBuffer:[DocDBClientTypes.DBClusterParameterGroup]? = nil - if let dbClusterParameterGroupsContainer = dbClusterParameterGroupsContainer { - dbClusterParameterGroupsBuffer = [DocDBClientTypes.DBClusterParameterGroup]() - for structureContainer0 in dbClusterParameterGroupsContainer { - dbClusterParameterGroupsBuffer?.append(structureContainer0) - } - } - dbClusterParameterGroups = dbClusterParameterGroupsBuffer - } else { - dbClusterParameterGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterParameterGroups = nil } } } -enum DescribeDBClusterParameterGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case source = "Source" } -} -extension DescribeDBClusterParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -6912,65 +5224,16 @@ public struct DescribeDBClusterParametersInput: Swift.Equatable { } } -struct DescribeDBClusterParametersInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let source: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClusterParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case source = "Source" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBClusterParametersOutput { -extension DescribeDBClusterParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.parameters = output.parameters - } else { - self.marker = nil - self.parameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterParametersResult"] + var value = DescribeDBClusterParametersOutput() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: DocDBClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -6992,55 +5255,28 @@ public struct DescribeDBClusterParametersOutput: Swift.Equatable { } } -struct DescribeDBClusterParametersOutputBody: Swift.Equatable { - let parameters: [DocDBClientTypes.Parameter]? - let marker: Swift.String? -} - -extension DescribeDBClusterParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case parameters = "Parameters" - } +enum DescribeDBClusterParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterParametersResult")) - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([DocDBClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[DocDBClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [DocDBClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - parameters = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBClusterParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterSnapshotAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" } -} -extension DescribeDBClusterSnapshotAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifier { @@ -7072,30 +5308,15 @@ public struct DescribeDBClusterSnapshotAttributesInput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotAttributesInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? -} - -extension DescribeDBClusterSnapshotAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - } -} +extension DescribeDBClusterSnapshotAttributesOutput { -extension DescribeDBClusterSnapshotAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterSnapshotAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshotAttributesResult = output.dbClusterSnapshotAttributesResult - } else { - self.dbClusterSnapshotAttributesResult = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterSnapshotAttributesResult"] + var value = DescribeDBClusterSnapshotAttributesOutput() + value.dbClusterSnapshotAttributesResult = try reader["DBClusterSnapshotAttributesResult"].readIfPresent(readingClosure: DocDBClientTypes.DBClusterSnapshotAttributesResult.readingClosure) + return value } } } @@ -7112,34 +5333,35 @@ public struct DescribeDBClusterSnapshotAttributesOutput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotAttributesOutputBody: Swift.Equatable { - let dbClusterSnapshotAttributesResult: DocDBClientTypes.DBClusterSnapshotAttributesResult? -} - -extension DescribeDBClusterSnapshotAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotAttributesResult = "DBClusterSnapshotAttributesResult" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterSnapshotAttributesResult")) - let dbClusterSnapshotAttributesResultDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBClusterSnapshotAttributesResult.self, forKey: .dbClusterSnapshotAttributesResult) - dbClusterSnapshotAttributesResult = dbClusterSnapshotAttributesResultDecoded - } -} +enum DescribeDBClusterSnapshotAttributesOutputError { -enum DescribeDBClusterSnapshotAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeDBClusterSnapshotsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case filters = "Filters" + case includePublic = "IncludePublic" + case includeShared = "IncludeShared" + case marker = "Marker" + case maxRecords = "MaxRecords" + case snapshotType = "SnapshotType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -7245,77 +5467,16 @@ public struct DescribeDBClusterSnapshotsInput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotsInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let dbClusterSnapshotIdentifier: Swift.String? - let snapshotType: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let includeShared: Swift.Bool? - let includePublic: Swift.Bool? -} - -extension DescribeDBClusterSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case filters = "Filters" - case includePublic = "IncludePublic" - case includeShared = "IncludeShared" - case marker = "Marker" - case maxRecords = "MaxRecords" - case snapshotType = "SnapshotType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let includeSharedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeShared) - includeShared = includeSharedDecoded - let includePublicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includePublic) - includePublic = includePublicDecoded - } -} +extension DescribeDBClusterSnapshotsOutput { -extension DescribeDBClusterSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshots = output.dbClusterSnapshots - self.marker = output.marker - } else { - self.dbClusterSnapshots = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterSnapshotsResult"] + var value = DescribeDBClusterSnapshotsOutput() + value.dbClusterSnapshots = try reader["DBClusterSnapshots"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBClusterSnapshot.readingClosure, memberNodeInfo: "DBClusterSnapshot", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -7337,55 +5498,31 @@ public struct DescribeDBClusterSnapshotsOutput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterSnapshots: [DocDBClientTypes.DBClusterSnapshot]? -} - -extension DescribeDBClusterSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshots = "DBClusterSnapshots" - case marker = "Marker" - } +enum DescribeDBClusterSnapshotsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterSnapshotsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterSnapshots) { - struct KeyVal0{struct DBClusterSnapshot{}} - let dbClusterSnapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterSnapshots) - if let dbClusterSnapshotsWrappedContainer = dbClusterSnapshotsWrappedContainer { - let dbClusterSnapshotsContainer = try dbClusterSnapshotsWrappedContainer.decodeIfPresent([DocDBClientTypes.DBClusterSnapshot].self, forKey: .member) - var dbClusterSnapshotsBuffer:[DocDBClientTypes.DBClusterSnapshot]? = nil - if let dbClusterSnapshotsContainer = dbClusterSnapshotsContainer { - dbClusterSnapshotsBuffer = [DocDBClientTypes.DBClusterSnapshot]() - for structureContainer0 in dbClusterSnapshotsContainer { - dbClusterSnapshotsBuffer?.append(structureContainer0) - } - } - dbClusterSnapshots = dbClusterSnapshotsBuffer - } else { - dbClusterSnapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterSnapshots = nil } } } -enum DescribeDBClusterSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClustersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClustersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -7450,61 +5587,16 @@ public struct DescribeDBClustersInput: Swift.Equatable { } } -struct DescribeDBClustersInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClustersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBClustersOutput { -extension DescribeDBClustersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClustersOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusters = output.dbClusters - self.marker = output.marker - } else { - self.dbClusters = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClustersResult"] + var value = DescribeDBClustersOutput() + value.dbClusters = try reader["DBClusters"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBCluster.readingClosure, memberNodeInfo: "DBCluster", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -7526,55 +5618,36 @@ public struct DescribeDBClustersOutput: Swift.Equatable { } } -struct DescribeDBClustersOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusters: [DocDBClientTypes.DBCluster]? -} - -extension DescribeDBClustersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusters = "DBClusters" - case marker = "Marker" - } +enum DescribeDBClustersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClustersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusters) { - struct KeyVal0{struct DBCluster{}} - let dbClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusters) - if let dbClustersWrappedContainer = dbClustersWrappedContainer { - let dbClustersContainer = try dbClustersWrappedContainer.decodeIfPresent([DocDBClientTypes.DBCluster].self, forKey: .member) - var dbClustersBuffer:[DocDBClientTypes.DBCluster]? = nil - if let dbClustersContainer = dbClustersContainer { - dbClustersBuffer = [DocDBClientTypes.DBCluster]() - for structureContainer0 in dbClustersContainer { - dbClustersBuffer?.append(structureContainer0) - } - } - dbClusters = dbClustersBuffer - } else { - dbClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusters = nil } } } -enum DescribeDBClustersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBEngineVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case defaultOnly = "DefaultOnly" + case engine = "Engine" + case engineVersion = "EngineVersion" + case filters = "Filters" + case listSupportedCharacterSets = "ListSupportedCharacterSets" + case listSupportedTimezones = "ListSupportedTimezones" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBEngineVersionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -7672,81 +5745,16 @@ public struct DescribeDBEngineVersionsInput: Swift.Equatable { } } -struct DescribeDBEngineVersionsInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbParameterGroupFamily: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let defaultOnly: Swift.Bool? - let listSupportedCharacterSets: Swift.Bool? - let listSupportedTimezones: Swift.Bool? -} - -extension DescribeDBEngineVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case defaultOnly = "DefaultOnly" - case engine = "Engine" - case engineVersion = "EngineVersion" - case filters = "Filters" - case listSupportedCharacterSets = "ListSupportedCharacterSets" - case listSupportedTimezones = "ListSupportedTimezones" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let defaultOnlyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .defaultOnly) - defaultOnly = defaultOnlyDecoded - let listSupportedCharacterSetsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .listSupportedCharacterSets) - listSupportedCharacterSets = listSupportedCharacterSetsDecoded - let listSupportedTimezonesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .listSupportedTimezones) - listSupportedTimezones = listSupportedTimezonesDecoded - } -} +extension DescribeDBEngineVersionsOutput { -extension DescribeDBEngineVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBEngineVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbEngineVersions = output.dbEngineVersions - self.marker = output.marker - } else { - self.dbEngineVersions = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBEngineVersionsResult"] + var value = DescribeDBEngineVersionsOutput() + value.dbEngineVersions = try reader["DBEngineVersions"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBEngineVersion.readingClosure, memberNodeInfo: "DBEngineVersion", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -7768,54 +5776,30 @@ public struct DescribeDBEngineVersionsOutput: Swift.Equatable { } } -struct DescribeDBEngineVersionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbEngineVersions: [DocDBClientTypes.DBEngineVersion]? -} - -extension DescribeDBEngineVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbEngineVersions = "DBEngineVersions" - case marker = "Marker" - } +enum DescribeDBEngineVersionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBEngineVersionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbEngineVersions) { - struct KeyVal0{struct DBEngineVersion{}} - let dbEngineVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbEngineVersions) - if let dbEngineVersionsWrappedContainer = dbEngineVersionsWrappedContainer { - let dbEngineVersionsContainer = try dbEngineVersionsWrappedContainer.decodeIfPresent([DocDBClientTypes.DBEngineVersion].self, forKey: .member) - var dbEngineVersionsBuffer:[DocDBClientTypes.DBEngineVersion]? = nil - if let dbEngineVersionsContainer = dbEngineVersionsContainer { - dbEngineVersionsBuffer = [DocDBClientTypes.DBEngineVersion]() - for structureContainer0 in dbEngineVersionsContainer { - dbEngineVersionsBuffer?.append(structureContainer0) - } - } - dbEngineVersions = dbEngineVersionsBuffer - } else { - dbEngineVersions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbEngineVersions = nil } } } -enum DescribeDBEngineVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBInstancesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -7882,61 +5866,16 @@ public struct DescribeDBInstancesInput: Swift.Equatable { } } -struct DescribeDBInstancesInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBInstancesOutput { -extension DescribeDBInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstances = output.dbInstances - self.marker = output.marker - } else { - self.dbInstances = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBInstancesResult"] + var value = DescribeDBInstancesOutput() + value.dbInstances = try reader["DBInstances"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBInstance.readingClosure, memberNodeInfo: "DBInstance", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -7958,55 +5897,31 @@ public struct DescribeDBInstancesOutput: Swift.Equatable { } } -struct DescribeDBInstancesOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbInstances: [DocDBClientTypes.DBInstance]? +enum DescribeDBInstancesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } } -extension DescribeDBInstancesOutputBody: Swift.Decodable { +extension DescribeDBSubnetGroupsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstances = "DBInstances" + case dbSubnetGroupName = "DBSubnetGroupName" + case filters = "Filters" case marker = "Marker" + case maxRecords = "MaxRecords" } - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBInstancesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbInstances) { - struct KeyVal0{struct DBInstance{}} - let dbInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbInstances) - if let dbInstancesWrappedContainer = dbInstancesWrappedContainer { - let dbInstancesContainer = try dbInstancesWrappedContainer.decodeIfPresent([DocDBClientTypes.DBInstance].self, forKey: .member) - var dbInstancesBuffer:[DocDBClientTypes.DBInstance]? = nil - if let dbInstancesContainer = dbInstancesContainer { - dbInstancesBuffer = [DocDBClientTypes.DBInstance]() - for structureContainer0 in dbInstancesContainer { - dbInstancesBuffer?.append(structureContainer0) - } - } - dbInstances = dbInstancesBuffer - } else { - dbInstances = [] - } - } else { - dbInstances = nil - } - } -} - -enum DescribeDBInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension DescribeDBSubnetGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupName = dbSubnetGroupName { @@ -8067,61 +5982,16 @@ public struct DescribeDBSubnetGroupsInput: Swift.Equatable { } } -struct DescribeDBSubnetGroupsInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBSubnetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupName = "DBSubnetGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBSubnetGroupsOutput { -extension DescribeDBSubnetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBSubnetGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroups = output.dbSubnetGroups - self.marker = output.marker - } else { - self.dbSubnetGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBSubnetGroupsResult"] + var value = DescribeDBSubnetGroupsOutput() + value.dbSubnetGroups = try reader["DBSubnetGroups"].readListIfPresent(memberReadingClosure: DocDBClientTypes.DBSubnetGroup.readingClosure, memberNodeInfo: "DBSubnetGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -8143,55 +6013,31 @@ public struct DescribeDBSubnetGroupsOutput: Swift.Equatable { } } -struct DescribeDBSubnetGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbSubnetGroups: [DocDBClientTypes.DBSubnetGroup]? -} - -extension DescribeDBSubnetGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroups = "DBSubnetGroups" - case marker = "Marker" - } +enum DescribeDBSubnetGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBSubnetGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbSubnetGroups) { - struct KeyVal0{struct DBSubnetGroup{}} - let dbSubnetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSubnetGroups) - if let dbSubnetGroupsWrappedContainer = dbSubnetGroupsWrappedContainer { - let dbSubnetGroupsContainer = try dbSubnetGroupsWrappedContainer.decodeIfPresent([DocDBClientTypes.DBSubnetGroup].self, forKey: .member) - var dbSubnetGroupsBuffer:[DocDBClientTypes.DBSubnetGroup]? = nil - if let dbSubnetGroupsContainer = dbSubnetGroupsContainer { - dbSubnetGroupsBuffer = [DocDBClientTypes.DBSubnetGroup]() - for structureContainer0 in dbSubnetGroupsContainer { - dbSubnetGroupsBuffer?.append(structureContainer0) - } - } - dbSubnetGroups = dbSubnetGroupsBuffer - } else { - dbSubnetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbSubnetGroups = nil } } } -enum DescribeDBSubnetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEngineDefaultClusterParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeEngineDefaultClusterParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -8253,59 +6099,15 @@ public struct DescribeEngineDefaultClusterParametersInput: Swift.Equatable { } } -struct DescribeEngineDefaultClusterParametersInputBody: Swift.Equatable { - let dbParameterGroupFamily: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEngineDefaultClusterParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEngineDefaultClusterParametersOutput { -extension DescribeEngineDefaultClusterParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEngineDefaultClusterParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.engineDefaults = output.engineDefaults - } else { - self.engineDefaults = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEngineDefaultClusterParametersResult"] + var value = DescribeEngineDefaultClusterParametersOutput() + value.engineDefaults = try reader["EngineDefaults"].readIfPresent(readingClosure: DocDBClientTypes.EngineDefaults.readingClosure) + return value } } } @@ -8322,33 +6124,28 @@ public struct DescribeEngineDefaultClusterParametersOutput: Swift.Equatable { } } -struct DescribeEngineDefaultClusterParametersOutputBody: Swift.Equatable { - let engineDefaults: DocDBClientTypes.EngineDefaults? -} - -extension DescribeEngineDefaultClusterParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineDefaults = "EngineDefaults" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEngineDefaultClusterParametersResult")) - let engineDefaultsDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.EngineDefaults.self, forKey: .engineDefaults) - engineDefaults = engineDefaultsDecoded - } -} +enum DescribeEngineDefaultClusterParametersOutputError { -enum DescribeEngineDefaultClusterParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeEventCategoriesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case sourceType = "SourceType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -8395,51 +6192,15 @@ public struct DescribeEventCategoriesInput: Swift.Equatable { } } -struct DescribeEventCategoriesInputBody: Swift.Equatable { - let sourceType: Swift.String? - let filters: [DocDBClientTypes.Filter]? -} - -extension DescribeEventCategoriesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case sourceType = "SourceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension DescribeEventCategoriesOutput { -extension DescribeEventCategoriesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventCategoriesOutputBody = try responseDecoder.decode(responseBody: data) - self.eventCategoriesMapList = output.eventCategoriesMapList - } else { - self.eventCategoriesMapList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventCategoriesResult"] + var value = DescribeEventCategoriesOutput() + value.eventCategoriesMapList = try reader["EventCategoriesMapList"].readListIfPresent(memberReadingClosure: DocDBClientTypes.EventCategoriesMap.readingClosure, memberNodeInfo: "EventCategoriesMap", isFlattened: false) + return value } } } @@ -8457,50 +6218,30 @@ public struct DescribeEventCategoriesOutput: Swift.Equatable { } } -struct DescribeEventCategoriesOutputBody: Swift.Equatable { - let eventCategoriesMapList: [DocDBClientTypes.EventCategoriesMap]? -} +enum DescribeEventCategoriesOutputError { -extension DescribeEventCategoriesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventCategoriesMapList = "EventCategoriesMapList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventCategoriesResult")) - if containerValues.contains(.eventCategoriesMapList) { - struct KeyVal0{struct EventCategoriesMap{}} - let eventCategoriesMapListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategoriesMapList) - if let eventCategoriesMapListWrappedContainer = eventCategoriesMapListWrappedContainer { - let eventCategoriesMapListContainer = try eventCategoriesMapListWrappedContainer.decodeIfPresent([DocDBClientTypes.EventCategoriesMap].self, forKey: .member) - var eventCategoriesMapListBuffer:[DocDBClientTypes.EventCategoriesMap]? = nil - if let eventCategoriesMapListContainer = eventCategoriesMapListContainer { - eventCategoriesMapListBuffer = [DocDBClientTypes.EventCategoriesMap]() - for structureContainer0 in eventCategoriesMapListContainer { - eventCategoriesMapListBuffer?.append(structureContainer0) - } - } - eventCategoriesMapList = eventCategoriesMapListBuffer - } else { - eventCategoriesMapList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventCategoriesMapList = nil } } } -enum DescribeEventCategoriesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventSubscriptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case subscriptionName = "SubscriptionName" } -} -extension DescribeEventSubscriptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -8561,61 +6302,16 @@ public struct DescribeEventSubscriptionsInput: Swift.Equatable { } } -struct DescribeEventSubscriptionsInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEventSubscriptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEventSubscriptionsOutput { -extension DescribeEventSubscriptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventSubscriptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscriptionsList = output.eventSubscriptionsList - self.marker = output.marker - } else { - self.eventSubscriptionsList = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventSubscriptionsResult"] + var value = DescribeEventSubscriptionsOutput() + value.eventSubscriptionsList = try reader["EventSubscriptionsList"].readListIfPresent(memberReadingClosure: DocDBClientTypes.EventSubscription.readingClosure, memberNodeInfo: "EventSubscription", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -8637,55 +6333,36 @@ public struct DescribeEventSubscriptionsOutput: Swift.Equatable { } } -struct DescribeEventSubscriptionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let eventSubscriptionsList: [DocDBClientTypes.EventSubscription]? -} - -extension DescribeEventSubscriptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscriptionsList = "EventSubscriptionsList" - case marker = "Marker" - } +enum DescribeEventSubscriptionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventSubscriptionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.eventSubscriptionsList) { - struct KeyVal0{struct EventSubscription{}} - let eventSubscriptionsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventSubscriptionsList) - if let eventSubscriptionsListWrappedContainer = eventSubscriptionsListWrappedContainer { - let eventSubscriptionsListContainer = try eventSubscriptionsListWrappedContainer.decodeIfPresent([DocDBClientTypes.EventSubscription].self, forKey: .member) - var eventSubscriptionsListBuffer:[DocDBClientTypes.EventSubscription]? = nil - if let eventSubscriptionsListContainer = eventSubscriptionsListContainer { - eventSubscriptionsListBuffer = [DocDBClientTypes.EventSubscription]() - for structureContainer0 in eventSubscriptionsListContainer { - eventSubscriptionsListBuffer?.append(structureContainer0) - } - } - eventSubscriptionsList = eventSubscriptionsListBuffer - } else { - eventSubscriptionsList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventSubscriptionsList = nil } } } -enum DescribeEventSubscriptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case duration = "Duration" + case endTime = "EndTime" + case eventCategories = "EventCategories" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case sourceIdentifier = "SourceIdentifier" + case sourceType = "SourceType" + case startTime = "StartTime" } -} -extension DescribeEventsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let duration = duration { @@ -8802,98 +6479,16 @@ public struct DescribeEventsInput: Swift.Equatable { } } -struct DescribeEventsInputBody: Swift.Equatable { - let sourceIdentifier: Swift.String? - let sourceType: DocDBClientTypes.SourceType? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let duration: Swift.Int? - let eventCategories: [Swift.String]? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEventsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case duration = "Duration" - case endTime = "EndTime" - case eventCategories = "EventCategories" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case sourceIdentifier = "SourceIdentifier" - case sourceType = "SourceType" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEventsOutput { -extension DescribeEventsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventsOutputBody = try responseDecoder.decode(responseBody: data) - self.events = output.events - self.marker = output.marker - } else { - self.events = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventsResult"] + var value = DescribeEventsOutput() + value.events = try reader["Events"].readListIfPresent(memberReadingClosure: DocDBClientTypes.Event.readingClosure, memberNodeInfo: "Event", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -8915,54 +6510,30 @@ public struct DescribeEventsOutput: Swift.Equatable { } } -struct DescribeEventsOutputBody: Swift.Equatable { - let marker: Swift.String? - let events: [DocDBClientTypes.Event]? -} - -extension DescribeEventsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Events" - case marker = "Marker" - } +enum DescribeEventsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.events) { - struct KeyVal0{struct Event{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([DocDBClientTypes.Event].self, forKey: .member) - var eventsBuffer:[DocDBClientTypes.Event]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [DocDBClientTypes.Event]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - events = nil } } } -enum DescribeEventsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeGlobalClustersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeGlobalClustersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -9022,61 +6593,16 @@ public struct DescribeGlobalClustersInput: Swift.Equatable { } } -struct DescribeGlobalClustersInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeGlobalClustersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeGlobalClustersOutput { -extension DescribeGlobalClustersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeGlobalClustersOutputBody = try responseDecoder.decode(responseBody: data) - self.globalClusters = output.globalClusters - self.marker = output.marker - } else { - self.globalClusters = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeGlobalClustersResult"] + var value = DescribeGlobalClustersOutput() + value.globalClusters = try reader["GlobalClusters"].readListIfPresent(memberReadingClosure: DocDBClientTypes.GlobalCluster.readingClosure, memberNodeInfo: "GlobalClusterMember", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -9097,55 +6623,35 @@ public struct DescribeGlobalClustersOutput: Swift.Equatable { } } -struct DescribeGlobalClustersOutputBody: Swift.Equatable { - let marker: Swift.String? - let globalClusters: [DocDBClientTypes.GlobalCluster]? -} - -extension DescribeGlobalClustersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusters = "GlobalClusters" - case marker = "Marker" - } +enum DescribeGlobalClustersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeGlobalClustersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.globalClusters) { - struct KeyVal0{struct GlobalClusterMember{}} - let globalClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalClusters) - if let globalClustersWrappedContainer = globalClustersWrappedContainer { - let globalClustersContainer = try globalClustersWrappedContainer.decodeIfPresent([DocDBClientTypes.GlobalCluster].self, forKey: .member) - var globalClustersBuffer:[DocDBClientTypes.GlobalCluster]? = nil - if let globalClustersContainer = globalClustersContainer { - globalClustersBuffer = [DocDBClientTypes.GlobalCluster]() - for structureContainer0 in globalClustersContainer { - globalClustersBuffer?.append(structureContainer0) - } - } - globalClusters = globalClustersBuffer - } else { - globalClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - globalClusters = nil } } } -enum DescribeGlobalClustersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeOrderableDBInstanceOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceClass = "DBInstanceClass" + case engine = "Engine" + case engineVersion = "EngineVersion" + case filters = "Filters" + case licenseModel = "LicenseModel" + case marker = "Marker" + case maxRecords = "MaxRecords" + case vpc = "Vpc" } -} -extension DescribeOrderableDBInstanceOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceClass = dbInstanceClass { @@ -9235,77 +6741,16 @@ public struct DescribeOrderableDBInstanceOptionsInput: Swift.Equatable { } } -struct DescribeOrderableDBInstanceOptionsInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbInstanceClass: Swift.String? - let licenseModel: Swift.String? - let vpc: Swift.Bool? - let filters: [DocDBClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeOrderableDBInstanceOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceClass = "DBInstanceClass" - case engine = "Engine" - case engineVersion = "EngineVersion" - case filters = "Filters" - case licenseModel = "LicenseModel" - case marker = "Marker" - case maxRecords = "MaxRecords" - case vpc = "Vpc" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let vpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .vpc) - vpc = vpcDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeOrderableDBInstanceOptionsOutput { -extension DescribeOrderableDBInstanceOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeOrderableDBInstanceOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.orderableDBInstanceOptions = output.orderableDBInstanceOptions - } else { - self.marker = nil - self.orderableDBInstanceOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeOrderableDBInstanceOptionsResult"] + var value = DescribeOrderableDBInstanceOptionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.orderableDBInstanceOptions = try reader["OrderableDBInstanceOptions"].readListIfPresent(memberReadingClosure: DocDBClientTypes.OrderableDBInstanceOption.readingClosure, memberNodeInfo: "OrderableDBInstanceOption", isFlattened: false) + return value } } } @@ -9327,54 +6772,30 @@ public struct DescribeOrderableDBInstanceOptionsOutput: Swift.Equatable { } } -struct DescribeOrderableDBInstanceOptionsOutputBody: Swift.Equatable { - let orderableDBInstanceOptions: [DocDBClientTypes.OrderableDBInstanceOption]? - let marker: Swift.String? -} +enum DescribeOrderableDBInstanceOptionsOutputError { -extension DescribeOrderableDBInstanceOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case orderableDBInstanceOptions = "OrderableDBInstanceOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeOrderableDBInstanceOptionsResult")) - if containerValues.contains(.orderableDBInstanceOptions) { - struct KeyVal0{struct OrderableDBInstanceOption{}} - let orderableDBInstanceOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .orderableDBInstanceOptions) - if let orderableDBInstanceOptionsWrappedContainer = orderableDBInstanceOptionsWrappedContainer { - let orderableDBInstanceOptionsContainer = try orderableDBInstanceOptionsWrappedContainer.decodeIfPresent([DocDBClientTypes.OrderableDBInstanceOption].self, forKey: .member) - var orderableDBInstanceOptionsBuffer:[DocDBClientTypes.OrderableDBInstanceOption]? = nil - if let orderableDBInstanceOptionsContainer = orderableDBInstanceOptionsContainer { - orderableDBInstanceOptionsBuffer = [DocDBClientTypes.OrderableDBInstanceOption]() - for structureContainer0 in orderableDBInstanceOptionsContainer { - orderableDBInstanceOptionsBuffer?.append(structureContainer0) - } - } - orderableDBInstanceOptions = orderableDBInstanceOptionsBuffer - } else { - orderableDBInstanceOptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - orderableDBInstanceOptions = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeOrderableDBInstanceOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribePendingMaintenanceActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case resourceIdentifier = "ResourceIdentifier" } -} -extension DescribePendingMaintenanceActionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -9439,61 +6860,16 @@ public struct DescribePendingMaintenanceActionsInput: Swift.Equatable { } } -struct DescribePendingMaintenanceActionsInputBody: Swift.Equatable { - let resourceIdentifier: Swift.String? - let filters: [DocDBClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribePendingMaintenanceActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case resourceIdentifier = "ResourceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribePendingMaintenanceActionsOutput { -extension DescribePendingMaintenanceActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePendingMaintenanceActionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.pendingMaintenanceActions = output.pendingMaintenanceActions - } else { - self.marker = nil - self.pendingMaintenanceActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribePendingMaintenanceActionsResult"] + var value = DescribePendingMaintenanceActionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.pendingMaintenanceActions = try reader["PendingMaintenanceActions"].readListIfPresent(memberReadingClosure: DocDBClientTypes.ResourcePendingMaintenanceActions.readingClosure, memberNodeInfo: "ResourcePendingMaintenanceActions", isFlattened: false) + return value } } } @@ -9515,57 +6891,26 @@ public struct DescribePendingMaintenanceActionsOutput: Swift.Equatable { } } -struct DescribePendingMaintenanceActionsOutputBody: Swift.Equatable { - let pendingMaintenanceActions: [DocDBClientTypes.ResourcePendingMaintenanceActions]? - let marker: Swift.String? -} +enum DescribePendingMaintenanceActionsOutputError { -extension DescribePendingMaintenanceActionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case pendingMaintenanceActions = "PendingMaintenanceActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribePendingMaintenanceActionsResult")) - if containerValues.contains(.pendingMaintenanceActions) { - struct KeyVal0{struct ResourcePendingMaintenanceActions{}} - let pendingMaintenanceActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .pendingMaintenanceActions) - if let pendingMaintenanceActionsWrappedContainer = pendingMaintenanceActionsWrappedContainer { - let pendingMaintenanceActionsContainer = try pendingMaintenanceActionsWrappedContainer.decodeIfPresent([DocDBClientTypes.ResourcePendingMaintenanceActions].self, forKey: .member) - var pendingMaintenanceActionsBuffer:[DocDBClientTypes.ResourcePendingMaintenanceActions]? = nil - if let pendingMaintenanceActionsContainer = pendingMaintenanceActionsContainer { - pendingMaintenanceActionsBuffer = [DocDBClientTypes.ResourcePendingMaintenanceActions]() - for structureContainer0 in pendingMaintenanceActionsContainer { - pendingMaintenanceActionsBuffer?.append(structureContainer0) - } - } - pendingMaintenanceActions = pendingMaintenanceActionsBuffer - } else { - pendingMaintenanceActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - pendingMaintenanceActions = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum DescribePendingMaintenanceActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } public enum DocDBClientTypes {} -extension DocDBClientTypes.Endpoint: Swift.Codable { +extension DocDBClientTypes.Endpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case address = "Address" case hostedZoneId = "HostedZoneId" @@ -9585,14 +6930,15 @@ extension DocDBClientTypes.Endpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.Endpoint() + value.address = try reader["Address"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + return value + } } } @@ -9620,7 +6966,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.EngineDefaults: Swift.Codable { +extension DocDBClientTypes.EngineDefaults: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbParameterGroupFamily = "DBParameterGroupFamily" case marker = "Marker" @@ -9649,30 +6995,14 @@ extension DocDBClientTypes.EngineDefaults: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([DocDBClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[DocDBClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [DocDBClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.EngineDefaults() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: DocDBClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -9701,7 +7031,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.Event: Swift.Codable { +extension DocDBClientTypes.Event: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case date = "Date" case eventCategories = "EventCategories" @@ -9742,37 +7072,18 @@ extension DocDBClientTypes.Event: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.Event() + value.sourceIdentifier = try reader["SourceIdentifier"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.eventCategories = try reader["EventCategories"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + value.sourceArn = try reader["SourceArn"].readIfPresent() + return value } - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded } } @@ -9812,7 +7123,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.EventCategoriesMap: Swift.Codable { +extension DocDBClientTypes.EventCategoriesMap: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case eventCategories = "EventCategories" case sourceType = "SourceType" @@ -9837,28 +7148,13 @@ extension DocDBClientTypes.EventCategoriesMap: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.EventCategoriesMap() + value.sourceType = try reader["SourceType"].readIfPresent() + value.eventCategories = try reader["EventCategories"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + return value } } } @@ -9883,7 +7179,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.EventSubscription: Swift.Codable { +extension DocDBClientTypes.EventSubscription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case custSubscriptionId = "CustSubscriptionId" case customerAwsId = "CustomerAwsId" @@ -9949,62 +7245,22 @@ extension DocDBClientTypes.EventSubscription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerAwsIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerAwsId) - customerAwsId = customerAwsIdDecoded - let custSubscriptionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .custSubscriptionId) - custSubscriptionId = custSubscriptionIdDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let subscriptionCreationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionCreationTime) - subscriptionCreationTime = subscriptionCreationTimeDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.sourceIdsList) { - struct KeyVal0{struct SourceId{}} - let sourceIdsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIdsList) - if let sourceIdsListWrappedContainer = sourceIdsListWrappedContainer { - let sourceIdsListContainer = try sourceIdsListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsListBuffer:[Swift.String]? = nil - if let sourceIdsListContainer = sourceIdsListContainer { - sourceIdsListBuffer = [Swift.String]() - for stringContainer0 in sourceIdsListContainer { - sourceIdsListBuffer?.append(stringContainer0) - } - } - sourceIdsList = sourceIdsListBuffer - } else { - sourceIdsList = [] - } - } else { - sourceIdsList = nil - } - if containerValues.contains(.eventCategoriesList) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategoriesList) - if let eventCategoriesListWrappedContainer = eventCategoriesListWrappedContainer { - let eventCategoriesListContainer = try eventCategoriesListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesListBuffer:[Swift.String]? = nil - if let eventCategoriesListContainer = eventCategoriesListContainer { - eventCategoriesListBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesListContainer { - eventCategoriesListBuffer?.append(stringContainer0) - } - } - eventCategoriesList = eventCategoriesListBuffer - } else { - eventCategoriesList = [] - } - } else { - eventCategoriesList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.EventSubscription() + value.customerAwsId = try reader["CustomerAwsId"].readIfPresent() + value.custSubscriptionId = try reader["CustSubscriptionId"].readIfPresent() + value.snsTopicArn = try reader["SnsTopicArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.subscriptionCreationTime = try reader["SubscriptionCreationTime"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.sourceIdsList = try reader["SourceIdsList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SourceId", isFlattened: false) + value.eventCategoriesList = try reader["EventCategoriesList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.enabled = try reader["Enabled"].readIfPresent() + value.eventSubscriptionArn = try reader["EventSubscriptionArn"].readIfPresent() + return value } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let eventSubscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventSubscriptionArn) - eventSubscriptionArn = eventSubscriptionArnDecoded } } @@ -10061,16 +7317,14 @@ extension DocDBClientTypes { } extension EventSubscriptionQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EventSubscriptionQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10098,23 +7352,12 @@ public struct EventSubscriptionQuotaExceededFault: ClientRuntime.ModeledError, A } } -struct EventSubscriptionQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EventSubscriptionQuotaExceededFaultBody: Swift.Decodable { +extension FailoverDBClusterInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dbClusterIdentifier = "DBClusterIdentifier" + case targetDBInstanceIdentifier = "TargetDBInstanceIdentifier" } -} -extension FailoverDBClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -10154,34 +7397,15 @@ public struct FailoverDBClusterInput: Swift.Equatable { } } -struct FailoverDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let targetDBInstanceIdentifier: Swift.String? -} - -extension FailoverDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case targetDBInstanceIdentifier = "TargetDBInstanceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let targetDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBInstanceIdentifier) - targetDBInstanceIdentifier = targetDBInstanceIdentifierDecoded - } -} +extension FailoverDBClusterOutput { -extension FailoverDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: FailoverDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["FailoverDBClusterResult"] + var value = FailoverDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: DocDBClientTypes.DBCluster.readingClosure) + return value } } } @@ -10198,36 +7422,26 @@ public struct FailoverDBClusterOutput: Swift.Equatable { } } -struct FailoverDBClusterOutputBody: Swift.Equatable { - let dbCluster: DocDBClientTypes.DBCluster? -} - -extension FailoverDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("FailoverDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum FailoverDBClusterOutputError { -enum FailoverDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension DocDBClientTypes.Filter: Swift.Codable { +extension DocDBClientTypes.Filter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case values = "Values" @@ -10252,28 +7466,13 @@ extension DocDBClientTypes.Filter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct Value{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.Filter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Value", isFlattened: false) + return value } } } @@ -10300,7 +7499,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.GlobalCluster: Swift.Codable { +extension DocDBClientTypes.GlobalCluster: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case databaseName = "DatabaseName" case deletionProtection = "DeletionProtection" @@ -10357,44 +7556,21 @@ extension DocDBClientTypes.GlobalCluster: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let globalClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterResourceId) - globalClusterResourceId = globalClusterResourceIdDecoded - let globalClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterArn) - globalClusterArn = globalClusterArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - if containerValues.contains(.globalClusterMembers) { - struct KeyVal0{struct GlobalClusterMember{}} - let globalClusterMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalClusterMembers) - if let globalClusterMembersWrappedContainer = globalClusterMembersWrappedContainer { - let globalClusterMembersContainer = try globalClusterMembersWrappedContainer.decodeIfPresent([DocDBClientTypes.GlobalClusterMember].self, forKey: .member) - var globalClusterMembersBuffer:[DocDBClientTypes.GlobalClusterMember]? = nil - if let globalClusterMembersContainer = globalClusterMembersContainer { - globalClusterMembersBuffer = [DocDBClientTypes.GlobalClusterMember]() - for structureContainer0 in globalClusterMembersContainer { - globalClusterMembersBuffer?.append(structureContainer0) - } - } - globalClusterMembers = globalClusterMembersBuffer - } else { - globalClusterMembers = [] - } - } else { - globalClusterMembers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.GlobalCluster() + value.globalClusterIdentifier = try reader["GlobalClusterIdentifier"].readIfPresent() + value.globalClusterResourceId = try reader["GlobalClusterResourceId"].readIfPresent() + value.globalClusterArn = try reader["GlobalClusterArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.databaseName = try reader["DatabaseName"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + value.globalClusterMembers = try reader["GlobalClusterMembers"].readListIfPresent(memberReadingClosure: DocDBClientTypes.GlobalClusterMember.readingClosure, memberNodeInfo: "GlobalClusterMember", isFlattened: false) + return value } } } @@ -10452,16 +7628,14 @@ extension DocDBClientTypes { } extension GlobalClusterAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10489,23 +7663,7 @@ public struct GlobalClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct GlobalClusterAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.GlobalClusterMember: Swift.Codable { +extension DocDBClientTypes.GlobalClusterMember: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterArn = "DBClusterArn" case isWriter = "IsWriter" @@ -10534,31 +7692,15 @@ extension DocDBClientTypes.GlobalClusterMember: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterArn) - dbClusterArn = dbClusterArnDecoded - if containerValues.contains(.readers) { - struct KeyVal0{struct member{}} - let readersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readers) - if let readersWrappedContainer = readersWrappedContainer { - let readersContainer = try readersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readersBuffer:[Swift.String]? = nil - if let readersContainer = readersContainer { - readersBuffer = [Swift.String]() - for stringContainer0 in readersContainer { - readersBuffer?.append(stringContainer0) - } - } - readers = readersBuffer - } else { - readers = [] - } - } else { - readers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.GlobalClusterMember() + value.dbClusterArn = try reader["DBClusterArn"].readIfPresent() + value.readers = try reader["Readers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isWriter = try reader["IsWriter"].readIfPresent() + return value } - let isWriterDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isWriter) - isWriter = isWriterDecoded } } @@ -10587,16 +7729,14 @@ extension DocDBClientTypes { } extension GlobalClusterNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10624,33 +7764,15 @@ public struct GlobalClusterNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct GlobalClusterNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension GlobalClusterQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10678,33 +7800,15 @@ public struct GlobalClusterQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct GlobalClusterQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InstanceQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InstanceQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10732,33 +7836,15 @@ public struct InstanceQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct InstanceQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InstanceQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientDBClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientDBClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10786,33 +7872,15 @@ public struct InsufficientDBClusterCapacityFault: ClientRuntime.ModeledError, AW } } -struct InsufficientDBClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientDBClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientDBInstanceCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientDBInstanceCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10840,33 +7908,15 @@ public struct InsufficientDBInstanceCapacityFault: ClientRuntime.ModeledError, A } } -struct InsufficientDBInstanceCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientDBInstanceCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientStorageClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientStorageClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10894,33 +7944,15 @@ public struct InsufficientStorageClusterCapacityFault: ClientRuntime.ModeledErro } } -struct InsufficientStorageClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientStorageClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10948,33 +7980,15 @@ public struct InvalidDBClusterSnapshotStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidDBClusterSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11002,33 +8016,15 @@ public struct InvalidDBClusterStateFault: ClientRuntime.ModeledError, AWSClientR } } -struct InvalidDBClusterStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBInstanceStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBInstanceStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11056,33 +8052,15 @@ public struct InvalidDBInstanceStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidDBInstanceStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBInstanceStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBParameterGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBParameterGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11110,33 +8088,15 @@ public struct InvalidDBParameterGroupStateFault: ClientRuntime.ModeledError, AWS } } -struct InvalidDBParameterGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBParameterGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSecurityGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSecurityGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11164,33 +8124,15 @@ public struct InvalidDBSecurityGroupStateFault: ClientRuntime.ModeledError, AWSC } } -struct InvalidDBSecurityGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSecurityGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11218,33 +8160,15 @@ public struct InvalidDBSnapshotStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidDBSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSubnetGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSubnetGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11272,33 +8196,15 @@ public struct InvalidDBSubnetGroupStateFault: ClientRuntime.ModeledError, AWSCli } } -struct InvalidDBSubnetGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSubnetGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSubnetStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSubnetStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11326,33 +8232,15 @@ public struct InvalidDBSubnetStateFault: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidDBSubnetStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSubnetStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidEventSubscriptionStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidEventSubscriptionStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11380,33 +8268,15 @@ public struct InvalidEventSubscriptionStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidEventSubscriptionStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidEventSubscriptionStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidGlobalClusterStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidGlobalClusterStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11434,33 +8304,15 @@ public struct InvalidGlobalClusterStateFault: ClientRuntime.ModeledError, AWSCli } } -struct InvalidGlobalClusterStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidGlobalClusterStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidRestoreFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRestoreFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11488,33 +8340,15 @@ public struct InvalidRestoreFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct InvalidRestoreFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRestoreFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSubnet { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSubnet() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11542,33 +8376,15 @@ public struct InvalidSubnet: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct InvalidSubnetBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSubnetBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidVPCNetworkStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidVPCNetworkStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11596,33 +8412,15 @@ public struct InvalidVPCNetworkStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidVPCNetworkStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidVPCNetworkStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension KMSKeyNotAccessibleFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSKeyNotAccessibleFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11650,23 +8448,12 @@ public struct KMSKeyNotAccessibleFault: ClientRuntime.ModeledError, AWSClientRun } } -struct KMSKeyNotAccessibleFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSKeyNotAccessibleFaultBody: Swift.Decodable { +extension ListTagsForResourceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case filters = "Filters" + case resourceName = "ResourceName" } -} -extension ListTagsForResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -11714,51 +8501,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -struct ListTagsForResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let filters: [DocDBClientTypes.Filter]? -} - -extension ListTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case resourceName = "ResourceName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([DocDBClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[DocDBClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [DocDBClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension ListTagsForResourceOutput { -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tagList = output.tagList - } else { - self.tagList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTagsForResourceResult"] + var value = ListTagsForResourceOutput() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: DocDBClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -11776,53 +8527,44 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let tagList: [DocDBClientTypes.Tag]? -} +enum ListTagsForResourceOutputError { -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagList = "TagList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTagsForResourceResult")) - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[DocDBClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tagList = nil } } } -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" + case applyImmediately = "ApplyImmediately" + case backupRetentionPeriod = "BackupRetentionPeriod" + case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case deletionProtection = "DeletionProtection" + case engineVersion = "EngineVersion" + case masterUserPassword = "MasterUserPassword" + case newDBClusterIdentifier = "NewDBClusterIdentifier" + case port = "Port" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case storageType = "StorageType" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" } -} -extension ModifyDBClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowMajorVersionUpgrade = allowMajorVersionUpgrade { @@ -11982,103 +8724,15 @@ public struct ModifyDBClusterInput: Swift.Equatable { } } -struct ModifyDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let newDBClusterIdentifier: Swift.String? - let applyImmediately: Swift.Bool? - let backupRetentionPeriod: Swift.Int? - let dbClusterParameterGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let port: Swift.Int? - let masterUserPassword: Swift.String? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let cloudwatchLogsExportConfiguration: DocDBClientTypes.CloudwatchLogsExportConfiguration? - let engineVersion: Swift.String? - let allowMajorVersionUpgrade: Swift.Bool? - let deletionProtection: Swift.Bool? - let storageType: Swift.String? -} - -extension ModifyDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" - case applyImmediately = "ApplyImmediately" - case backupRetentionPeriod = "BackupRetentionPeriod" - case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case deletionProtection = "DeletionProtection" - case engineVersion = "EngineVersion" - case masterUserPassword = "MasterUserPassword" - case newDBClusterIdentifier = "NewDBClusterIdentifier" - case port = "Port" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case storageType = "StorageType" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension ModifyDBClusterOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let newDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newDBClusterIdentifier) - newDBClusterIdentifier = newDBClusterIdentifierDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let cloudwatchLogsExportConfigurationDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.CloudwatchLogsExportConfiguration.self, forKey: .cloudwatchLogsExportConfiguration) - cloudwatchLogsExportConfiguration = cloudwatchLogsExportConfigurationDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let allowMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowMajorVersionUpgrade) - allowMajorVersionUpgrade = allowMajorVersionUpgradeDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - } -} - -extension ModifyDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterResult"] + var value = ModifyDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: DocDBClientTypes.DBCluster.readingClosure) + return value } } } @@ -12095,44 +8749,39 @@ public struct ModifyDBClusterOutput: Swift.Equatable { } } -struct ModifyDBClusterOutputBody: Swift.Equatable { - let dbCluster: DocDBClientTypes.DBCluster? -} - -extension ModifyDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum ModifyDBClusterOutputError { -enum ModifyDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case parameters = "Parameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -12181,51 +8830,15 @@ public struct ModifyDBClusterParameterGroupInput: Swift.Equatable { } } -struct ModifyDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let parameters: [DocDBClientTypes.Parameter]? -} - -extension ModifyDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case parameters = "Parameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([DocDBClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[DocDBClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [DocDBClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ModifyDBClusterParameterGroupOutput { -extension ModifyDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroupName = output.dbClusterParameterGroupName - } else { - self.dbClusterParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterParameterGroupResult"] + var value = ModifyDBClusterParameterGroupOutput() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + return value } } } @@ -12252,35 +8865,32 @@ public struct ModifyDBClusterParameterGroupOutput: Swift.Equatable { } } -struct ModifyDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension ModifyDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } +enum ModifyDBClusterParameterGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterParameterGroupResult")) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} - -enum ModifyDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBClusterSnapshotAttributeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeName = "AttributeName" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case valuesToAdd = "ValuesToAdd" + case valuesToRemove = "ValuesToRemove" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeName = attributeName { @@ -12352,76 +8962,15 @@ public struct ModifyDBClusterSnapshotAttributeInput: Swift.Equatable { } } -struct ModifyDBClusterSnapshotAttributeInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? - let attributeName: Swift.String? - let valuesToAdd: [Swift.String]? - let valuesToRemove: [Swift.String]? -} - -extension ModifyDBClusterSnapshotAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeName = "AttributeName" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case valuesToAdd = "ValuesToAdd" - case valuesToRemove = "ValuesToRemove" - } +extension ModifyDBClusterSnapshotAttributeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.valuesToAdd) { - struct KeyVal0{struct AttributeValue{}} - let valuesToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valuesToAdd) - if let valuesToAddWrappedContainer = valuesToAddWrappedContainer { - let valuesToAddContainer = try valuesToAddWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesToAddBuffer:[Swift.String]? = nil - if let valuesToAddContainer = valuesToAddContainer { - valuesToAddBuffer = [Swift.String]() - for stringContainer0 in valuesToAddContainer { - valuesToAddBuffer?.append(stringContainer0) - } - } - valuesToAdd = valuesToAddBuffer - } else { - valuesToAdd = [] - } - } else { - valuesToAdd = nil - } - if containerValues.contains(.valuesToRemove) { - struct KeyVal0{struct AttributeValue{}} - let valuesToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valuesToRemove) - if let valuesToRemoveWrappedContainer = valuesToRemoveWrappedContainer { - let valuesToRemoveContainer = try valuesToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesToRemoveBuffer:[Swift.String]? = nil - if let valuesToRemoveContainer = valuesToRemoveContainer { - valuesToRemoveBuffer = [Swift.String]() - for stringContainer0 in valuesToRemoveContainer { - valuesToRemoveBuffer?.append(stringContainer0) - } - } - valuesToRemove = valuesToRemoveBuffer - } else { - valuesToRemove = [] - } - } else { - valuesToRemove = nil - } - } -} - -extension ModifyDBClusterSnapshotAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterSnapshotAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshotAttributesResult = output.dbClusterSnapshotAttributesResult - } else { - self.dbClusterSnapshotAttributesResult = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterSnapshotAttributeResult"] + var value = ModifyDBClusterSnapshotAttributeOutput() + value.dbClusterSnapshotAttributesResult = try reader["DBClusterSnapshotAttributesResult"].readIfPresent(readingClosure: DocDBClientTypes.DBClusterSnapshotAttributesResult.readingClosure) + return value } } } @@ -12438,36 +8987,41 @@ public struct ModifyDBClusterSnapshotAttributeOutput: Swift.Equatable { } } -struct ModifyDBClusterSnapshotAttributeOutputBody: Swift.Equatable { - let dbClusterSnapshotAttributesResult: DocDBClientTypes.DBClusterSnapshotAttributesResult? -} - -extension ModifyDBClusterSnapshotAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotAttributesResult = "DBClusterSnapshotAttributesResult" - } +enum ModifyDBClusterSnapshotAttributeOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterSnapshotAttributeResult")) - let dbClusterSnapshotAttributesResultDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBClusterSnapshotAttributesResult.self, forKey: .dbClusterSnapshotAttributesResult) - dbClusterSnapshotAttributesResult = dbClusterSnapshotAttributesResultDecoded + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SharedSnapshotQuotaExceeded": return try await SharedSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } } } -enum ModifyDBClusterSnapshotAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SharedSnapshotQuotaExceeded": return try await SharedSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case caCertificateIdentifier = "CACertificateIdentifier" + case certificateRotationRestart = "CertificateRotationRestart" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbInstanceClass = "DBInstanceClass" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case enablePerformanceInsights = "EnablePerformanceInsights" + case newDBInstanceIdentifier = "NewDBInstanceIdentifier" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case promotionTier = "PromotionTier" } -} -extension ModifyDBInstanceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -12587,74 +9141,15 @@ public struct ModifyDBInstanceInput: Swift.Equatable { } } -struct ModifyDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let dbInstanceClass: Swift.String? - let applyImmediately: Swift.Bool? - let preferredMaintenanceWindow: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let newDBInstanceIdentifier: Swift.String? - let caCertificateIdentifier: Swift.String? - let copyTagsToSnapshot: Swift.Bool? - let promotionTier: Swift.Int? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let certificateRotationRestart: Swift.Bool? -} - -extension ModifyDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case caCertificateIdentifier = "CACertificateIdentifier" - case certificateRotationRestart = "CertificateRotationRestart" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbInstanceClass = "DBInstanceClass" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case enablePerformanceInsights = "EnablePerformanceInsights" - case newDBInstanceIdentifier = "NewDBInstanceIdentifier" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case promotionTier = "PromotionTier" - } +extension ModifyDBInstanceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let newDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newDBInstanceIdentifier) - newDBInstanceIdentifier = newDBInstanceIdentifierDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let certificateRotationRestartDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .certificateRotationRestart) - certificateRotationRestart = certificateRotationRestartDecoded - } -} - -extension ModifyDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBInstanceResult"] + var value = ModifyDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: DocDBClientTypes.DBInstance.readingClosure) + return value } } } @@ -12671,46 +9166,42 @@ public struct ModifyDBInstanceOutput: Swift.Equatable { } } -struct ModifyDBInstanceOutputBody: Swift.Equatable { - let dbInstance: DocDBClientTypes.DBInstance? -} - -extension ModifyDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum ModifyDBInstanceOutputError { -enum ModifyDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CertificateNotFound": return try await CertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBUpgradeDependencyFailure": return try await DBUpgradeDependencyFailureFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CertificateNotFound": return try await CertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBUpgradeDependencyFailure": return try await DBUpgradeDependencyFailureFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupDescription = "DBSubnetGroupDescription" + case dbSubnetGroupName = "DBSubnetGroupName" + case subnetIds = "SubnetIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupDescription = dbSubnetGroupDescription { @@ -12766,55 +9257,15 @@ public struct ModifyDBSubnetGroupInput: Swift.Equatable { } } -struct ModifyDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let dbSubnetGroupDescription: Swift.String? - let subnetIds: [Swift.String]? -} - -extension ModifyDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupDescription = "DBSubnetGroupDescription" - case dbSubnetGroupName = "DBSubnetGroupName" - case subnetIds = "SubnetIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - } -} +extension ModifyDBSubnetGroupOutput { -extension ModifyDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroup = output.dbSubnetGroup - } else { - self.dbSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBSubnetGroupResult"] + var value = ModifyDBSubnetGroupOutput() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: DocDBClientTypes.DBSubnetGroup.readingClosure) + return value } } } @@ -12831,38 +9282,36 @@ public struct ModifyDBSubnetGroupOutput: Swift.Equatable { } } -struct ModifyDBSubnetGroupOutputBody: Swift.Equatable { - let dbSubnetGroup: DocDBClientTypes.DBSubnetGroup? -} - -extension ModifyDBSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroup = "DBSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBSubnetGroupResult")) - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - } -} +enum ModifyDBSubnetGroupOutputError { -enum ModifyDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetAlreadyInUse": return try await SubnetAlreadyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetAlreadyInUse": return try await SubnetAlreadyInUse.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case eventCategories = "EventCategories" + case snsTopicArn = "SnsTopicArn" + case sourceType = "SourceType" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -12931,63 +9380,15 @@ public struct ModifyEventSubscriptionInput: Swift.Equatable { } } -struct ModifyEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let snsTopicArn: Swift.String? - let sourceType: Swift.String? - let eventCategories: [Swift.String]? - let enabled: Swift.Bool? -} - -extension ModifyEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case eventCategories = "EventCategories" - case snsTopicArn = "SnsTopicArn" - case sourceType = "SourceType" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - } -} +extension ModifyEventSubscriptionOutput { -extension ModifyEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyEventSubscriptionResult"] + var value = ModifyEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: DocDBClientTypes.EventSubscription.readingClosure) + return value } } } @@ -13004,39 +9405,35 @@ public struct ModifyEventSubscriptionOutput: Swift.Equatable { } } -struct ModifyEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: DocDBClientTypes.EventSubscription? -} - -extension ModifyEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum ModifyEventSubscriptionOutputError { -enum ModifyEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSInvalidTopic": return try await SNSInvalidTopicFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSNoAuthorization": return try await SNSNoAuthorizationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSInvalidTopic": return try await SNSInvalidTopicFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSNoAuthorization": return try await SNSNoAuthorizationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deletionProtection = "DeletionProtection" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case newGlobalClusterIdentifier = "NewGlobalClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deletionProtection = deletionProtection { @@ -13089,38 +9486,15 @@ public struct ModifyGlobalClusterInput: Swift.Equatable { } } -struct ModifyGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let newGlobalClusterIdentifier: Swift.String? - let deletionProtection: Swift.Bool? -} - -extension ModifyGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deletionProtection = "DeletionProtection" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case newGlobalClusterIdentifier = "NewGlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let newGlobalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newGlobalClusterIdentifier) - newGlobalClusterIdentifier = newGlobalClusterIdentifierDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - } -} +extension ModifyGlobalClusterOutput { -extension ModifyGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyGlobalClusterResult"] + var value = ModifyGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: DocDBClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -13137,35 +9511,25 @@ public struct ModifyGlobalClusterOutput: Swift.Equatable { } } -struct ModifyGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: DocDBClientTypes.GlobalCluster? -} - -extension ModifyGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum ModifyGlobalClusterOutputError { -enum ModifyGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension DocDBClientTypes.OrderableDBInstanceOption: Swift.Codable { +extension DocDBClientTypes.OrderableDBInstanceOption: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZones = "AvailabilityZones" case dbInstanceClass = "DBInstanceClass" @@ -13210,39 +9574,19 @@ extension DocDBClientTypes.OrderableDBInstanceOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([DocDBClientTypes.AvailabilityZone].self, forKey: .member) - var availabilityZonesBuffer:[DocDBClientTypes.AvailabilityZone]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [DocDBClientTypes.AvailabilityZone]() - for structureContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(structureContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.OrderableDBInstanceOption() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: DocDBClientTypes.AvailabilityZone.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.vpc = try reader["Vpc"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + return value } - let vpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .vpc) - vpc = vpcDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded } } @@ -13286,7 +9630,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.Parameter: Swift.Codable { +extension DocDBClientTypes.Parameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case applyMethod = "ApplyMethod" @@ -13334,28 +9678,22 @@ extension DocDBClientTypes.Parameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterName) - parameterName = parameterNameDecoded - let parameterValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterValue) - parameterValue = parameterValueDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let applyTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyType) - applyType = applyTypeDecoded - let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) - dataType = dataTypeDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded - let isModifiableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isModifiable) - isModifiable = isModifiableDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let applyMethodDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.ApplyMethod.self, forKey: .applyMethod) - applyMethod = applyMethodDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.Parameter() + value.parameterName = try reader["ParameterName"].readIfPresent() + value.parameterValue = try reader["ParameterValue"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.applyType = try reader["ApplyType"].readIfPresent() + value.dataType = try reader["DataType"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + value.isModifiable = try reader["IsModifiable"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.applyMethod = try reader["ApplyMethod"].readIfPresent() + return value + } } } @@ -13411,7 +9749,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.PendingCloudwatchLogsExports: Swift.Codable { +extension DocDBClientTypes.PendingCloudwatchLogsExports: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logTypesToDisable = "LogTypesToDisable" case logTypesToEnable = "LogTypesToEnable" @@ -13445,45 +9783,13 @@ extension DocDBClientTypes.PendingCloudwatchLogsExports: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.logTypesToEnable) { - struct KeyVal0{struct member{}} - let logTypesToEnableWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logTypesToEnable) - if let logTypesToEnableWrappedContainer = logTypesToEnableWrappedContainer { - let logTypesToEnableContainer = try logTypesToEnableWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logTypesToEnableBuffer:[Swift.String]? = nil - if let logTypesToEnableContainer = logTypesToEnableContainer { - logTypesToEnableBuffer = [Swift.String]() - for stringContainer0 in logTypesToEnableContainer { - logTypesToEnableBuffer?.append(stringContainer0) - } - } - logTypesToEnable = logTypesToEnableBuffer - } else { - logTypesToEnable = [] - } - } else { - logTypesToEnable = nil - } - if containerValues.contains(.logTypesToDisable) { - struct KeyVal0{struct member{}} - let logTypesToDisableWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logTypesToDisable) - if let logTypesToDisableWrappedContainer = logTypesToDisableWrappedContainer { - let logTypesToDisableContainer = try logTypesToDisableWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logTypesToDisableBuffer:[Swift.String]? = nil - if let logTypesToDisableContainer = logTypesToDisableContainer { - logTypesToDisableBuffer = [Swift.String]() - for stringContainer0 in logTypesToDisableContainer { - logTypesToDisableBuffer?.append(stringContainer0) - } - } - logTypesToDisable = logTypesToDisableBuffer - } else { - logTypesToDisable = [] - } - } else { - logTypesToDisable = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.PendingCloudwatchLogsExports() + value.logTypesToEnable = try reader["LogTypesToEnable"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.logTypesToDisable = try reader["LogTypesToDisable"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13508,7 +9814,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.PendingMaintenanceAction: Swift.Codable { +extension DocDBClientTypes.PendingMaintenanceAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case action = "Action" case autoAppliedAfterDate = "AutoAppliedAfterDate" @@ -13540,20 +9846,18 @@ extension DocDBClientTypes.PendingMaintenanceAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .action) - action = actionDecoded - let autoAppliedAfterDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .autoAppliedAfterDate) - autoAppliedAfterDate = autoAppliedAfterDateDecoded - let forcedApplyDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .forcedApplyDate) - forcedApplyDate = forcedApplyDateDecoded - let optInStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optInStatus) - optInStatus = optInStatusDecoded - let currentApplyDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .currentApplyDate) - currentApplyDate = currentApplyDateDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.PendingMaintenanceAction() + value.action = try reader["Action"].readIfPresent() + value.autoAppliedAfterDate = try reader["AutoAppliedAfterDate"].readTimestampIfPresent(format: .dateTime) + value.forcedApplyDate = try reader["ForcedApplyDate"].readTimestampIfPresent(format: .dateTime) + value.optInStatus = try reader["OptInStatus"].readIfPresent() + value.currentApplyDate = try reader["CurrentApplyDate"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -13593,7 +9897,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.PendingModifiedValues: Swift.Codable { +extension DocDBClientTypes.PendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case backupRetentionPeriod = "BackupRetentionPeriod" @@ -13657,36 +9961,26 @@ extension DocDBClientTypes.PendingModifiedValues: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let pendingCloudwatchLogsExportsDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.PendingCloudwatchLogsExports.self, forKey: .pendingCloudwatchLogsExports) - pendingCloudwatchLogsExports = pendingCloudwatchLogsExportsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.PendingModifiedValues() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.masterUserPassword = try reader["MasterUserPassword"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.caCertificateIdentifier = try reader["CACertificateIdentifier"].readIfPresent() + value.dbSubnetGroupName = try reader["DBSubnetGroupName"].readIfPresent() + value.pendingCloudwatchLogsExports = try reader["PendingCloudwatchLogsExports"].readIfPresent(readingClosure: DocDBClientTypes.PendingCloudwatchLogsExports.readingClosure) + return value + } } } @@ -13759,6 +10053,11 @@ extension DocDBClientTypes { } extension RebootDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case forceFailover = "ForceFailover" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -13799,34 +10098,15 @@ public struct RebootDBInstanceInput: Swift.Equatable { } } -struct RebootDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let forceFailover: Swift.Bool? -} - -extension RebootDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case forceFailover = "ForceFailover" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let forceFailoverDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forceFailover) - forceFailover = forceFailoverDecoded - } -} +extension RebootDBInstanceOutput { -extension RebootDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RebootDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RebootDBInstanceResult"] + var value = RebootDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: DocDBClientTypes.DBInstance.readingClosure) + return value } } } @@ -13843,35 +10123,30 @@ public struct RebootDBInstanceOutput: Swift.Equatable { } } -struct RebootDBInstanceOutputBody: Swift.Equatable { - let dbInstance: DocDBClientTypes.DBInstance? -} - -extension RebootDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RebootDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum RebootDBInstanceOutputError { -enum RebootDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveFromGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DbClusterIdentifier" + case globalClusterIdentifier = "GlobalClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -13911,34 +10186,15 @@ public struct RemoveFromGlobalClusterInput: Swift.Equatable { } } -struct RemoveFromGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? -} - -extension RemoveFromGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DbClusterIdentifier" - case globalClusterIdentifier = "GlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} +extension RemoveFromGlobalClusterOutput { -extension RemoveFromGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RemoveFromGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RemoveFromGlobalClusterResult"] + var value = RemoveFromGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: DocDBClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -13955,36 +10211,31 @@ public struct RemoveFromGlobalClusterOutput: Swift.Equatable { } } -struct RemoveFromGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: DocDBClientTypes.GlobalCluster? -} - -extension RemoveFromGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RemoveFromGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum RemoveFromGlobalClusterOutputError { -enum RemoveFromGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveSourceIdentifierFromSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceIdentifier = "SourceIdentifier" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceIdentifier = sourceIdentifier { @@ -14024,34 +10275,15 @@ public struct RemoveSourceIdentifierFromSubscriptionInput: Swift.Equatable { } } -struct RemoveSourceIdentifierFromSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let sourceIdentifier: Swift.String? -} - -extension RemoveSourceIdentifierFromSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceIdentifier = "SourceIdentifier" - case subscriptionName = "SubscriptionName" - } +extension RemoveSourceIdentifierFromSubscriptionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - } -} - -extension RemoveSourceIdentifierFromSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RemoveSourceIdentifierFromSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RemoveSourceIdentifierFromSubscriptionResult"] + var value = RemoveSourceIdentifierFromSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: DocDBClientTypes.EventSubscription.readingClosure) + return value } } } @@ -14068,35 +10300,30 @@ public struct RemoveSourceIdentifierFromSubscriptionOutput: Swift.Equatable { } } -struct RemoveSourceIdentifierFromSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: DocDBClientTypes.EventSubscription? -} - -extension RemoveSourceIdentifierFromSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RemoveSourceIdentifierFromSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum RemoveSourceIdentifierFromSubscriptionOutputError { -enum RemoveSourceIdentifierFromSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveTagsFromResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -14145,66 +10372,46 @@ public struct RemoveTagsFromResourceInput: Swift.Equatable { } } -struct RemoveTagsFromResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tagKeys: [Swift.String]? -} - -extension RemoveTagsFromResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tagKeys = "TagKeys" - } +extension RemoveTagsFromResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveTagsFromResourceOutput() } } } -extension RemoveTagsFromResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct RemoveTagsFromResourceOutput: Swift.Equatable { public init() { } } -enum RemoveTagsFromResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveTagsFromResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResetDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case parameters = "Parameters" + case resetAllParameters = "ResetAllParameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -14259,55 +10466,15 @@ public struct ResetDBClusterParameterGroupInput: Swift.Equatable { } } -struct ResetDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let resetAllParameters: Swift.Bool? - let parameters: [DocDBClientTypes.Parameter]? -} - -extension ResetDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case parameters = "Parameters" - case resetAllParameters = "ResetAllParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let resetAllParametersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resetAllParameters) - resetAllParameters = resetAllParametersDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([DocDBClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[DocDBClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [DocDBClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ResetDBClusterParameterGroupOutput { -extension ResetDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroupName = output.dbClusterParameterGroupName - } else { - self.dbClusterParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResetDBClusterParameterGroupResult"] + var value = ResetDBClusterParameterGroupOutput() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + return value } } } @@ -14334,45 +10501,33 @@ public struct ResetDBClusterParameterGroupOutput: Swift.Equatable { } } -struct ResetDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension ResetDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResetDBClusterParameterGroupResult")) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} +enum ResetDBClusterParameterGroupOutputError { -enum ResetDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResourceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14400,23 +10555,7 @@ public struct ResourceNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct ResourceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.ResourcePendingMaintenanceActions: Swift.Codable { +extension DocDBClientTypes.ResourcePendingMaintenanceActions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case pendingMaintenanceActionDetails = "PendingMaintenanceActionDetails" case resourceIdentifier = "ResourceIdentifier" @@ -14441,28 +10580,13 @@ extension DocDBClientTypes.ResourcePendingMaintenanceActions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - if containerValues.contains(.pendingMaintenanceActionDetails) { - struct KeyVal0{struct PendingMaintenanceAction{}} - let pendingMaintenanceActionDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .pendingMaintenanceActionDetails) - if let pendingMaintenanceActionDetailsWrappedContainer = pendingMaintenanceActionDetailsWrappedContainer { - let pendingMaintenanceActionDetailsContainer = try pendingMaintenanceActionDetailsWrappedContainer.decodeIfPresent([DocDBClientTypes.PendingMaintenanceAction].self, forKey: .member) - var pendingMaintenanceActionDetailsBuffer:[DocDBClientTypes.PendingMaintenanceAction]? = nil - if let pendingMaintenanceActionDetailsContainer = pendingMaintenanceActionDetailsContainer { - pendingMaintenanceActionDetailsBuffer = [DocDBClientTypes.PendingMaintenanceAction]() - for structureContainer0 in pendingMaintenanceActionDetailsContainer { - pendingMaintenanceActionDetailsBuffer?.append(structureContainer0) - } - } - pendingMaintenanceActionDetails = pendingMaintenanceActionDetailsBuffer - } else { - pendingMaintenanceActionDetails = [] - } - } else { - pendingMaintenanceActionDetails = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.ResourcePendingMaintenanceActions() + value.resourceIdentifier = try reader["ResourceIdentifier"].readIfPresent() + value.pendingMaintenanceActionDetails = try reader["PendingMaintenanceActionDetails"].readListIfPresent(memberReadingClosure: DocDBClientTypes.PendingMaintenanceAction.readingClosure, memberNodeInfo: "PendingMaintenanceAction", isFlattened: false) + return value } } } @@ -14485,9 +10609,26 @@ extension DocDBClientTypes { } } -} - -extension RestoreDBClusterFromSnapshotInput: Swift.Encodable { +} + +extension RestoreDBClusterFromSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case availabilityZones = "AvailabilityZones" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbSubnetGroupName = "DBSubnetGroupName" + case deletionProtection = "DeletionProtection" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case engine = "Engine" + case engineVersion = "EngineVersion" + case kmsKeyId = "KmsKeyId" + case port = "Port" + case snapshotIdentifier = "SnapshotIdentifier" + case storageType = "StorageType" + case tags = "Tags" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZones = availabilityZones { @@ -14663,150 +10804,15 @@ public struct RestoreDBClusterFromSnapshotInput: Swift.Equatable { } } -struct RestoreDBClusterFromSnapshotInputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let dbClusterIdentifier: Swift.String? - let snapshotIdentifier: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let port: Swift.Int? - let dbSubnetGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let tags: [DocDBClientTypes.Tag]? - let kmsKeyId: Swift.String? - let enableCloudwatchLogsExports: [Swift.String]? - let deletionProtection: Swift.Bool? - let dbClusterParameterGroupName: Swift.String? - let storageType: Swift.String? -} - -extension RestoreDBClusterFromSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case deletionProtection = "DeletionProtection" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case engine = "Engine" - case engineVersion = "EngineVersion" - case kmsKeyId = "KmsKeyId" - case port = "Port" - case snapshotIdentifier = "SnapshotIdentifier" - case storageType = "StorageType" - case tags = "Tags" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - } -} +extension RestoreDBClusterFromSnapshotOutput { -extension RestoreDBClusterFromSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBClusterFromSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBClusterFromSnapshotResult"] + var value = RestoreDBClusterFromSnapshotOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: DocDBClientTypes.DBCluster.readingClosure) + return value } } } @@ -14823,47 +10829,53 @@ public struct RestoreDBClusterFromSnapshotOutput: Swift.Equatable { } } -struct RestoreDBClusterFromSnapshotOutputBody: Swift.Equatable { - let dbCluster: DocDBClientTypes.DBCluster? -} - -extension RestoreDBClusterFromSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBClusterFromSnapshotResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum RestoreDBClusterFromSnapshotOutputError { -enum RestoreDBClusterFromSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestoreFault": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestoreFault": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RestoreDBClusterToPointInTimeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbSubnetGroupName = "DBSubnetGroupName" + case deletionProtection = "DeletionProtection" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case kmsKeyId = "KmsKeyId" + case port = "Port" + case restoreToTime = "RestoreToTime" + case restoreType = "RestoreType" + case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" + case storageType = "StorageType" + case tags = "Tags" + case useLatestRestorableTime = "UseLatestRestorableTime" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -15040,129 +11052,15 @@ public struct RestoreDBClusterToPointInTimeInput: Swift.Equatable { } } -struct RestoreDBClusterToPointInTimeInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let restoreType: Swift.String? - let sourceDBClusterIdentifier: Swift.String? - let restoreToTime: ClientRuntime.Date? - let useLatestRestorableTime: Swift.Bool? - let port: Swift.Int? - let dbSubnetGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let tags: [DocDBClientTypes.Tag]? - let kmsKeyId: Swift.String? - let enableCloudwatchLogsExports: [Swift.String]? - let deletionProtection: Swift.Bool? - let storageType: Swift.String? -} - -extension RestoreDBClusterToPointInTimeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbSubnetGroupName = "DBSubnetGroupName" - case deletionProtection = "DeletionProtection" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case kmsKeyId = "KmsKeyId" - case port = "Port" - case restoreToTime = "RestoreToTime" - case restoreType = "RestoreType" - case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" - case storageType = "StorageType" - case tags = "Tags" - case useLatestRestorableTime = "UseLatestRestorableTime" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let restoreTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .restoreType) - restoreType = restoreTypeDecoded - let sourceDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterIdentifier) - sourceDBClusterIdentifier = sourceDBClusterIdentifierDecoded - let restoreToTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreToTime) - restoreToTime = restoreToTimeDecoded - let useLatestRestorableTimeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useLatestRestorableTime) - useLatestRestorableTime = useLatestRestorableTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([DocDBClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[DocDBClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [DocDBClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - } -} +extension RestoreDBClusterToPointInTimeOutput { -extension RestoreDBClusterToPointInTimeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBClusterToPointInTimeOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBClusterToPointInTimeResult"] + var value = RestoreDBClusterToPointInTimeOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: DocDBClientTypes.DBCluster.readingClosure) + return value } } } @@ -15179,58 +11077,46 @@ public struct RestoreDBClusterToPointInTimeOutput: Swift.Equatable { } } -struct RestoreDBClusterToPointInTimeOutputBody: Swift.Equatable { - let dbCluster: DocDBClientTypes.DBCluster? -} - -extension RestoreDBClusterToPointInTimeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBClusterToPointInTimeResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum RestoreDBClusterToPointInTimeOutputError { -enum RestoreDBClusterToPointInTimeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestoreFault": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestoreFault": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SNSInvalidTopicFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSInvalidTopicFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15258,33 +11144,15 @@ public struct SNSInvalidTopicFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct SNSInvalidTopicFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSInvalidTopicFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSNoAuthorizationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSNoAuthorizationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15312,33 +11180,15 @@ public struct SNSNoAuthorizationFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct SNSNoAuthorizationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSNoAuthorizationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSTopicArnNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSTopicArnNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15366,33 +11216,15 @@ public struct SNSTopicArnNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct SNSTopicArnNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSTopicArnNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SharedSnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SharedSnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15420,33 +11252,15 @@ public struct SharedSnapshotQuotaExceededFault: ClientRuntime.ModeledError, AWSC } } -struct SharedSnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SharedSnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15474,33 +11288,15 @@ public struct SnapshotQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct SnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SourceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SourceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15528,22 +11324,6 @@ public struct SourceNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct SourceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SourceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DocDBClientTypes { public enum SourceType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case dbCluster @@ -15589,6 +11369,10 @@ extension DocDBClientTypes { } extension StartDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -15619,30 +11403,15 @@ public struct StartDBClusterInput: Swift.Equatable { } } -struct StartDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} - -extension StartDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} +extension StartDBClusterOutput { -extension StartDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartDBClusterResult"] + var value = StartDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: DocDBClientTypes.DBCluster.readingClosure) + return value } } } @@ -15659,36 +11428,30 @@ public struct StartDBClusterOutput: Swift.Equatable { } } -struct StartDBClusterOutputBody: Swift.Equatable { - let dbCluster: DocDBClientTypes.DBCluster? -} - -extension StartDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum StartDBClusterOutputError { -enum StartDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StopDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -15719,30 +11482,15 @@ public struct StopDBClusterInput: Swift.Equatable { } } -struct StopDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} - -extension StopDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} +extension StopDBClusterOutput { -extension StopDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StopDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StopDBClusterResult"] + var value = StopDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: DocDBClientTypes.DBCluster.readingClosure) + return value } } } @@ -15759,46 +11507,34 @@ public struct StopDBClusterOutput: Swift.Equatable { } } -struct StopDBClusterOutputBody: Swift.Equatable { - let dbCluster: DocDBClientTypes.DBCluster? -} - -extension StopDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } +enum StopDBClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StopDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum StopDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StorageQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StorageQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15826,33 +11562,15 @@ public struct StorageQuotaExceededFault: ClientRuntime.ModeledError, AWSClientRu } } -struct StorageQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension StorageQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension StorageTypeNotSupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StorageTypeNotSupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15880,23 +11598,7 @@ public struct StorageTypeNotSupportedFault: ClientRuntime.ModeledError, AWSClien } } -struct StorageTypeNotSupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension StorageTypeNotSupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.Subnet: Swift.Codable { +extension DocDBClientTypes.Subnet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case subnetAvailabilityZone = "SubnetAvailabilityZone" case subnetIdentifier = "SubnetIdentifier" @@ -15916,14 +11618,15 @@ extension DocDBClientTypes.Subnet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetIdentifier) - subnetIdentifier = subnetIdentifierDecoded - let subnetAvailabilityZoneDecoded = try containerValues.decodeIfPresent(DocDBClientTypes.AvailabilityZone.self, forKey: .subnetAvailabilityZone) - subnetAvailabilityZone = subnetAvailabilityZoneDecoded - let subnetStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetStatus) - subnetStatus = subnetStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.Subnet() + value.subnetIdentifier = try reader["SubnetIdentifier"].readIfPresent() + value.subnetAvailabilityZone = try reader["SubnetAvailabilityZone"].readIfPresent(readingClosure: DocDBClientTypes.AvailabilityZone.readingClosure) + value.subnetStatus = try reader["SubnetStatus"].readIfPresent() + return value + } } } @@ -15952,16 +11655,14 @@ extension DocDBClientTypes { } extension SubnetAlreadyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubnetAlreadyInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15989,33 +11690,15 @@ public struct SubnetAlreadyInUse: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct SubnetAlreadyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubnetAlreadyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionAlreadyExistFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionAlreadyExistFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16043,33 +11726,15 @@ public struct SubscriptionAlreadyExistFault: ClientRuntime.ModeledError, AWSClie } } -struct SubscriptionAlreadyExistFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionAlreadyExistFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionCategoryNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionCategoryNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16097,33 +11762,15 @@ public struct SubscriptionCategoryNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct SubscriptionCategoryNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionCategoryNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16151,23 +11798,7 @@ public struct SubscriptionNotFoundFault: ClientRuntime.ModeledError, AWSClientRu } } -struct SubscriptionNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension DocDBClientTypes.Tag: Swift.Codable { +extension DocDBClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -16183,12 +11814,14 @@ extension DocDBClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -16212,7 +11845,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.UpgradeTarget: Swift.Codable { +extension DocDBClientTypes.UpgradeTarget: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoUpgrade = "AutoUpgrade" case description = "Description" @@ -16240,18 +11873,17 @@ extension DocDBClientTypes.UpgradeTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let autoUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoUpgrade) - autoUpgrade = autoUpgradeDecoded - let isMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isMajorVersionUpgrade) - isMajorVersionUpgrade = isMajorVersionUpgradeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.UpgradeTarget() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.autoUpgrade = try reader["AutoUpgrade"].readIfPresent() + value.isMajorVersionUpgrade = try reader["IsMajorVersionUpgrade"].readIfPresent() + return value + } } } @@ -16287,7 +11919,7 @@ extension DocDBClientTypes { } -extension DocDBClientTypes.VpcSecurityGroupMembership: Swift.Codable { +extension DocDBClientTypes.VpcSecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case status = "Status" case vpcSecurityGroupId = "VpcSecurityGroupId" @@ -16303,12 +11935,14 @@ extension DocDBClientTypes.VpcSecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcSecurityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcSecurityGroupId) - vpcSecurityGroupId = vpcSecurityGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DocDBClientTypes.VpcSecurityGroupMembership() + value.vpcSecurityGroupId = try reader["VpcSecurityGroupId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSEC2/EC2Client.swift b/Sources/Services/AWSEC2/EC2Client.swift index 267ad379af7..c8c65b72a2c 100644 --- a/Sources/Services/AWSEC2/EC2Client.swift +++ b/Sources/Services/AWSEC2/EC2Client.swift @@ -11,14 +11,11 @@ public class EC2Client { let config: EC2Client.EC2ClientConfiguration let serviceName = "EC2" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: EC2Client.EC2ClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -73,7 +70,6 @@ extension EC2Client { public func acceptAddressTransfer(input: AcceptAddressTransferInput) async throws -> AcceptAddressTransferOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "acceptAddressTransfer") @@ -97,7 +93,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AcceptAddressTransferOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AcceptAddressTransferOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AcceptAddressTransferOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -113,7 +109,6 @@ extension EC2Client { public func acceptReservedInstancesExchangeQuote(input: AcceptReservedInstancesExchangeQuoteInput) async throws -> AcceptReservedInstancesExchangeQuoteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "acceptReservedInstancesExchangeQuote") @@ -137,7 +132,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AcceptReservedInstancesExchangeQuoteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AcceptReservedInstancesExchangeQuoteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AcceptReservedInstancesExchangeQuoteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -153,7 +148,6 @@ extension EC2Client { public func acceptTransitGatewayMulticastDomainAssociations(input: AcceptTransitGatewayMulticastDomainAssociationsInput) async throws -> AcceptTransitGatewayMulticastDomainAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "acceptTransitGatewayMulticastDomainAssociations") @@ -177,7 +171,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AcceptTransitGatewayMulticastDomainAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AcceptTransitGatewayMulticastDomainAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AcceptTransitGatewayMulticastDomainAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -193,7 +187,6 @@ extension EC2Client { public func acceptTransitGatewayPeeringAttachment(input: AcceptTransitGatewayPeeringAttachmentInput) async throws -> AcceptTransitGatewayPeeringAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "acceptTransitGatewayPeeringAttachment") @@ -217,7 +210,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AcceptTransitGatewayPeeringAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AcceptTransitGatewayPeeringAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AcceptTransitGatewayPeeringAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -233,7 +226,6 @@ extension EC2Client { public func acceptTransitGatewayVpcAttachment(input: AcceptTransitGatewayVpcAttachmentInput) async throws -> AcceptTransitGatewayVpcAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "acceptTransitGatewayVpcAttachment") @@ -257,7 +249,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AcceptTransitGatewayVpcAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AcceptTransitGatewayVpcAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AcceptTransitGatewayVpcAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -273,7 +265,6 @@ extension EC2Client { public func acceptVpcEndpointConnections(input: AcceptVpcEndpointConnectionsInput) async throws -> AcceptVpcEndpointConnectionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "acceptVpcEndpointConnections") @@ -297,7 +288,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AcceptVpcEndpointConnectionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AcceptVpcEndpointConnectionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AcceptVpcEndpointConnectionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -313,7 +304,6 @@ extension EC2Client { public func acceptVpcPeeringConnection(input: AcceptVpcPeeringConnectionInput) async throws -> AcceptVpcPeeringConnectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "acceptVpcPeeringConnection") @@ -337,7 +327,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AcceptVpcPeeringConnectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AcceptVpcPeeringConnectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AcceptVpcPeeringConnectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -353,7 +343,6 @@ extension EC2Client { public func advertiseByoipCidr(input: AdvertiseByoipCidrInput) async throws -> AdvertiseByoipCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "advertiseByoipCidr") @@ -377,7 +366,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AdvertiseByoipCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AdvertiseByoipCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AdvertiseByoipCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -393,7 +382,6 @@ extension EC2Client { public func allocateAddress(input: AllocateAddressInput) async throws -> AllocateAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "allocateAddress") @@ -417,7 +405,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AllocateAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AllocateAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AllocateAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -433,7 +421,6 @@ extension EC2Client { public func allocateHosts(input: AllocateHostsInput) async throws -> AllocateHostsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "allocateHosts") @@ -457,7 +444,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AllocateHostsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AllocateHostsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AllocateHostsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -473,7 +460,6 @@ extension EC2Client { public func allocateIpamPoolCidr(input: AllocateIpamPoolCidrInput) async throws -> AllocateIpamPoolCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "allocateIpamPoolCidr") @@ -498,7 +484,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AllocateIpamPoolCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AllocateIpamPoolCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AllocateIpamPoolCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -514,7 +500,6 @@ extension EC2Client { public func applySecurityGroupsToClientVpnTargetNetwork(input: ApplySecurityGroupsToClientVpnTargetNetworkInput) async throws -> ApplySecurityGroupsToClientVpnTargetNetworkOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "applySecurityGroupsToClientVpnTargetNetwork") @@ -538,7 +523,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ApplySecurityGroupsToClientVpnTargetNetworkOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ApplySecurityGroupsToClientVpnTargetNetworkOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ApplySecurityGroupsToClientVpnTargetNetworkOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -554,7 +539,6 @@ extension EC2Client { public func assignIpv6Addresses(input: AssignIpv6AddressesInput) async throws -> AssignIpv6AddressesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "assignIpv6Addresses") @@ -578,7 +562,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssignIpv6AddressesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssignIpv6AddressesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssignIpv6AddressesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -594,7 +578,6 @@ extension EC2Client { public func assignPrivateIpAddresses(input: AssignPrivateIpAddressesInput) async throws -> AssignPrivateIpAddressesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "assignPrivateIpAddresses") @@ -618,7 +601,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssignPrivateIpAddressesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssignPrivateIpAddressesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssignPrivateIpAddressesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -634,7 +617,6 @@ extension EC2Client { public func assignPrivateNatGatewayAddress(input: AssignPrivateNatGatewayAddressInput) async throws -> AssignPrivateNatGatewayAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "assignPrivateNatGatewayAddress") @@ -658,7 +640,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssignPrivateNatGatewayAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssignPrivateNatGatewayAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssignPrivateNatGatewayAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -674,7 +656,6 @@ extension EC2Client { public func associateAddress(input: AssociateAddressInput) async throws -> AssociateAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateAddress") @@ -698,7 +679,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -714,7 +695,6 @@ extension EC2Client { public func associateClientVpnTargetNetwork(input: AssociateClientVpnTargetNetworkInput) async throws -> AssociateClientVpnTargetNetworkOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateClientVpnTargetNetwork") @@ -739,7 +719,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateClientVpnTargetNetworkOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateClientVpnTargetNetworkOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateClientVpnTargetNetworkOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -755,7 +735,6 @@ extension EC2Client { public func associateDhcpOptions(input: AssociateDhcpOptionsInput) async throws -> AssociateDhcpOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateDhcpOptions") @@ -779,7 +758,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateDhcpOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateDhcpOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateDhcpOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -795,7 +774,6 @@ extension EC2Client { public func associateEnclaveCertificateIamRole(input: AssociateEnclaveCertificateIamRoleInput) async throws -> AssociateEnclaveCertificateIamRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateEnclaveCertificateIamRole") @@ -819,7 +797,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateEnclaveCertificateIamRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateEnclaveCertificateIamRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateEnclaveCertificateIamRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -835,7 +813,6 @@ extension EC2Client { public func associateIamInstanceProfile(input: AssociateIamInstanceProfileInput) async throws -> AssociateIamInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateIamInstanceProfile") @@ -859,7 +836,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateIamInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateIamInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateIamInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -875,7 +852,6 @@ extension EC2Client { public func associateInstanceEventWindow(input: AssociateInstanceEventWindowInput) async throws -> AssociateInstanceEventWindowOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateInstanceEventWindow") @@ -899,7 +875,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateInstanceEventWindowOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateInstanceEventWindowOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateInstanceEventWindowOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -915,7 +891,6 @@ extension EC2Client { public func associateIpamByoasn(input: AssociateIpamByoasnInput) async throws -> AssociateIpamByoasnOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateIpamByoasn") @@ -939,7 +914,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateIpamByoasnOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateIpamByoasnOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateIpamByoasnOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -955,7 +930,6 @@ extension EC2Client { public func associateIpamResourceDiscovery(input: AssociateIpamResourceDiscoveryInput) async throws -> AssociateIpamResourceDiscoveryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateIpamResourceDiscovery") @@ -980,7 +954,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateIpamResourceDiscoveryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateIpamResourceDiscoveryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateIpamResourceDiscoveryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -996,7 +970,6 @@ extension EC2Client { public func associateNatGatewayAddress(input: AssociateNatGatewayAddressInput) async throws -> AssociateNatGatewayAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateNatGatewayAddress") @@ -1020,7 +993,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateNatGatewayAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateNatGatewayAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateNatGatewayAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1036,7 +1009,6 @@ extension EC2Client { public func associateRouteTable(input: AssociateRouteTableInput) async throws -> AssociateRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateRouteTable") @@ -1060,7 +1032,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1076,7 +1048,6 @@ extension EC2Client { public func associateSubnetCidrBlock(input: AssociateSubnetCidrBlockInput) async throws -> AssociateSubnetCidrBlockOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateSubnetCidrBlock") @@ -1100,7 +1071,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateSubnetCidrBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateSubnetCidrBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateSubnetCidrBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1116,7 +1087,6 @@ extension EC2Client { public func associateTransitGatewayMulticastDomain(input: AssociateTransitGatewayMulticastDomainInput) async throws -> AssociateTransitGatewayMulticastDomainOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateTransitGatewayMulticastDomain") @@ -1140,7 +1110,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateTransitGatewayMulticastDomainOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateTransitGatewayMulticastDomainOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateTransitGatewayMulticastDomainOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1156,7 +1126,6 @@ extension EC2Client { public func associateTransitGatewayPolicyTable(input: AssociateTransitGatewayPolicyTableInput) async throws -> AssociateTransitGatewayPolicyTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateTransitGatewayPolicyTable") @@ -1180,7 +1149,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateTransitGatewayPolicyTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateTransitGatewayPolicyTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateTransitGatewayPolicyTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1196,7 +1165,6 @@ extension EC2Client { public func associateTransitGatewayRouteTable(input: AssociateTransitGatewayRouteTableInput) async throws -> AssociateTransitGatewayRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateTransitGatewayRouteTable") @@ -1220,7 +1188,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateTransitGatewayRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateTransitGatewayRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateTransitGatewayRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1236,7 +1204,6 @@ extension EC2Client { public func associateTrunkInterface(input: AssociateTrunkInterfaceInput) async throws -> AssociateTrunkInterfaceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateTrunkInterface") @@ -1261,7 +1228,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateTrunkInterfaceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateTrunkInterfaceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateTrunkInterfaceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1277,7 +1244,6 @@ extension EC2Client { public func associateVpcCidrBlock(input: AssociateVpcCidrBlockInput) async throws -> AssociateVpcCidrBlockOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateVpcCidrBlock") @@ -1301,7 +1267,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateVpcCidrBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateVpcCidrBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateVpcCidrBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1317,7 +1283,6 @@ extension EC2Client { public func attachClassicLinkVpc(input: AttachClassicLinkVpcInput) async throws -> AttachClassicLinkVpcOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachClassicLinkVpc") @@ -1341,7 +1306,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachClassicLinkVpcOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachClassicLinkVpcOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachClassicLinkVpcOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1357,7 +1322,6 @@ extension EC2Client { public func attachInternetGateway(input: AttachInternetGatewayInput) async throws -> AttachInternetGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachInternetGateway") @@ -1381,7 +1345,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachInternetGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachInternetGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachInternetGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1397,7 +1361,6 @@ extension EC2Client { public func attachNetworkInterface(input: AttachNetworkInterfaceInput) async throws -> AttachNetworkInterfaceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachNetworkInterface") @@ -1421,7 +1384,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachNetworkInterfaceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachNetworkInterfaceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachNetworkInterfaceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1437,7 +1400,6 @@ extension EC2Client { public func attachVerifiedAccessTrustProvider(input: AttachVerifiedAccessTrustProviderInput) async throws -> AttachVerifiedAccessTrustProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachVerifiedAccessTrustProvider") @@ -1462,7 +1424,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachVerifiedAccessTrustProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachVerifiedAccessTrustProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachVerifiedAccessTrustProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1489,7 +1451,6 @@ extension EC2Client { public func attachVolume(input: AttachVolumeInput) async throws -> AttachVolumeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachVolume") @@ -1513,7 +1474,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachVolumeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachVolumeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachVolumeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1529,7 +1490,6 @@ extension EC2Client { public func attachVpnGateway(input: AttachVpnGatewayInput) async throws -> AttachVpnGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachVpnGateway") @@ -1553,7 +1513,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachVpnGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachVpnGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachVpnGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1569,7 +1529,6 @@ extension EC2Client { public func authorizeClientVpnIngress(input: AuthorizeClientVpnIngressInput) async throws -> AuthorizeClientVpnIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeClientVpnIngress") @@ -1594,7 +1553,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeClientVpnIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeClientVpnIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeClientVpnIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1610,7 +1569,6 @@ extension EC2Client { public func authorizeSecurityGroupEgress(input: AuthorizeSecurityGroupEgressInput) async throws -> AuthorizeSecurityGroupEgressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeSecurityGroupEgress") @@ -1634,7 +1592,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeSecurityGroupEgressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeSecurityGroupEgressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeSecurityGroupEgressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1650,7 +1608,6 @@ extension EC2Client { public func authorizeSecurityGroupIngress(input: AuthorizeSecurityGroupIngressInput) async throws -> AuthorizeSecurityGroupIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeSecurityGroupIngress") @@ -1674,7 +1631,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeSecurityGroupIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeSecurityGroupIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeSecurityGroupIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1690,7 +1647,6 @@ extension EC2Client { public func bundleInstance(input: BundleInstanceInput) async throws -> BundleInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "bundleInstance") @@ -1714,7 +1670,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BundleInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BundleInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BundleInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1730,7 +1686,6 @@ extension EC2Client { public func cancelBundleTask(input: CancelBundleTaskInput) async throws -> CancelBundleTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelBundleTask") @@ -1754,7 +1709,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelBundleTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelBundleTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelBundleTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1770,7 +1725,6 @@ extension EC2Client { public func cancelCapacityReservation(input: CancelCapacityReservationInput) async throws -> CancelCapacityReservationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelCapacityReservation") @@ -1794,7 +1748,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelCapacityReservationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelCapacityReservationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelCapacityReservationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1816,7 +1770,6 @@ extension EC2Client { public func cancelCapacityReservationFleets(input: CancelCapacityReservationFleetsInput) async throws -> CancelCapacityReservationFleetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelCapacityReservationFleets") @@ -1840,7 +1793,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelCapacityReservationFleetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelCapacityReservationFleetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelCapacityReservationFleetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1856,7 +1809,6 @@ extension EC2Client { public func cancelConversionTask(input: CancelConversionTaskInput) async throws -> CancelConversionTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelConversionTask") @@ -1880,7 +1832,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelConversionTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelConversionTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelConversionTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1896,7 +1848,6 @@ extension EC2Client { public func cancelExportTask(input: CancelExportTaskInput) async throws -> CancelExportTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelExportTask") @@ -1920,7 +1871,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelExportTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelExportTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelExportTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1936,7 +1887,6 @@ extension EC2Client { public func cancelImageLaunchPermission(input: CancelImageLaunchPermissionInput) async throws -> CancelImageLaunchPermissionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelImageLaunchPermission") @@ -1960,7 +1910,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelImageLaunchPermissionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelImageLaunchPermissionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelImageLaunchPermissionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1976,7 +1926,6 @@ extension EC2Client { public func cancelImportTask(input: CancelImportTaskInput) async throws -> CancelImportTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelImportTask") @@ -2000,7 +1949,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelImportTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelImportTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelImportTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2016,7 +1965,6 @@ extension EC2Client { public func cancelReservedInstancesListing(input: CancelReservedInstancesListingInput) async throws -> CancelReservedInstancesListingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelReservedInstancesListing") @@ -2040,7 +1988,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelReservedInstancesListingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelReservedInstancesListingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelReservedInstancesListingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2056,7 +2004,6 @@ extension EC2Client { public func cancelSpotFleetRequests(input: CancelSpotFleetRequestsInput) async throws -> CancelSpotFleetRequestsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelSpotFleetRequests") @@ -2080,7 +2027,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelSpotFleetRequestsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelSpotFleetRequestsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelSpotFleetRequestsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2096,7 +2043,6 @@ extension EC2Client { public func cancelSpotInstanceRequests(input: CancelSpotInstanceRequestsInput) async throws -> CancelSpotInstanceRequestsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelSpotInstanceRequests") @@ -2120,7 +2066,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelSpotInstanceRequestsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelSpotInstanceRequestsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelSpotInstanceRequestsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2136,7 +2082,6 @@ extension EC2Client { public func confirmProductInstance(input: ConfirmProductInstanceInput) async throws -> ConfirmProductInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "confirmProductInstance") @@ -2160,7 +2105,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ConfirmProductInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ConfirmProductInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ConfirmProductInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2176,7 +2121,6 @@ extension EC2Client { public func copyFpgaImage(input: CopyFpgaImageInput) async throws -> CopyFpgaImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyFpgaImage") @@ -2200,7 +2144,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyFpgaImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyFpgaImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyFpgaImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2216,7 +2160,6 @@ extension EC2Client { public func copyImage(input: CopyImageInput) async throws -> CopyImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyImage") @@ -2240,7 +2183,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2256,7 +2199,6 @@ extension EC2Client { public func copySnapshot(input: CopySnapshotInput) async throws -> CopySnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copySnapshot") @@ -2280,7 +2222,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopySnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopySnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopySnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2296,7 +2238,6 @@ extension EC2Client { public func createCapacityReservation(input: CreateCapacityReservationInput) async throws -> CreateCapacityReservationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCapacityReservation") @@ -2320,7 +2261,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCapacityReservationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCapacityReservationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCapacityReservationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2336,7 +2277,6 @@ extension EC2Client { public func createCapacityReservationFleet(input: CreateCapacityReservationFleetInput) async throws -> CreateCapacityReservationFleetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCapacityReservationFleet") @@ -2361,7 +2301,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCapacityReservationFleetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCapacityReservationFleetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCapacityReservationFleetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2377,7 +2317,6 @@ extension EC2Client { public func createCarrierGateway(input: CreateCarrierGatewayInput) async throws -> CreateCarrierGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCarrierGateway") @@ -2402,7 +2341,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCarrierGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCarrierGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCarrierGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2418,7 +2357,6 @@ extension EC2Client { public func createClientVpnEndpoint(input: CreateClientVpnEndpointInput) async throws -> CreateClientVpnEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createClientVpnEndpoint") @@ -2443,7 +2381,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateClientVpnEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateClientVpnEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateClientVpnEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2459,7 +2397,6 @@ extension EC2Client { public func createClientVpnRoute(input: CreateClientVpnRouteInput) async throws -> CreateClientVpnRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createClientVpnRoute") @@ -2484,7 +2421,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateClientVpnRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateClientVpnRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateClientVpnRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2500,7 +2437,6 @@ extension EC2Client { public func createCoipCidr(input: CreateCoipCidrInput) async throws -> CreateCoipCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCoipCidr") @@ -2524,7 +2460,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCoipCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCoipCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCoipCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2540,7 +2476,6 @@ extension EC2Client { public func createCoipPool(input: CreateCoipPoolInput) async throws -> CreateCoipPoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCoipPool") @@ -2564,7 +2499,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCoipPoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCoipPoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCoipPoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2580,7 +2515,6 @@ extension EC2Client { public func createCustomerGateway(input: CreateCustomerGatewayInput) async throws -> CreateCustomerGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCustomerGateway") @@ -2604,7 +2538,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCustomerGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCustomerGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCustomerGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2620,7 +2554,6 @@ extension EC2Client { public func createDefaultSubnet(input: CreateDefaultSubnetInput) async throws -> CreateDefaultSubnetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDefaultSubnet") @@ -2644,7 +2577,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDefaultSubnetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDefaultSubnetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDefaultSubnetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2660,7 +2593,6 @@ extension EC2Client { public func createDefaultVpc(input: CreateDefaultVpcInput) async throws -> CreateDefaultVpcOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDefaultVpc") @@ -2684,7 +2616,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDefaultVpcOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDefaultVpcOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDefaultVpcOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2713,7 +2645,6 @@ extension EC2Client { public func createDhcpOptions(input: CreateDhcpOptionsInput) async throws -> CreateDhcpOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDhcpOptions") @@ -2737,7 +2668,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDhcpOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDhcpOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDhcpOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2753,7 +2684,6 @@ extension EC2Client { public func createEgressOnlyInternetGateway(input: CreateEgressOnlyInternetGatewayInput) async throws -> CreateEgressOnlyInternetGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createEgressOnlyInternetGateway") @@ -2777,7 +2707,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateEgressOnlyInternetGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateEgressOnlyInternetGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateEgressOnlyInternetGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2793,7 +2723,6 @@ extension EC2Client { public func createFleet(input: CreateFleetInput) async throws -> CreateFleetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createFleet") @@ -2817,7 +2746,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateFleetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateFleetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateFleetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2833,7 +2762,6 @@ extension EC2Client { public func createFlowLogs(input: CreateFlowLogsInput) async throws -> CreateFlowLogsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createFlowLogs") @@ -2857,7 +2785,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateFlowLogsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateFlowLogsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateFlowLogsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2873,7 +2801,6 @@ extension EC2Client { public func createFpgaImage(input: CreateFpgaImageInput) async throws -> CreateFpgaImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createFpgaImage") @@ -2897,7 +2824,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateFpgaImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateFpgaImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateFpgaImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2913,7 +2840,6 @@ extension EC2Client { public func createImage(input: CreateImageInput) async throws -> CreateImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createImage") @@ -2937,7 +2863,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2953,7 +2879,6 @@ extension EC2Client { public func createInstanceConnectEndpoint(input: CreateInstanceConnectEndpointInput) async throws -> CreateInstanceConnectEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createInstanceConnectEndpoint") @@ -2978,7 +2903,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateInstanceConnectEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateInstanceConnectEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateInstanceConnectEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3001,7 +2926,6 @@ extension EC2Client { public func createInstanceEventWindow(input: CreateInstanceEventWindowInput) async throws -> CreateInstanceEventWindowOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createInstanceEventWindow") @@ -3025,7 +2949,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateInstanceEventWindowOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateInstanceEventWindowOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateInstanceEventWindowOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3041,7 +2965,6 @@ extension EC2Client { public func createInstanceExportTask(input: CreateInstanceExportTaskInput) async throws -> CreateInstanceExportTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createInstanceExportTask") @@ -3065,7 +2988,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateInstanceExportTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateInstanceExportTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateInstanceExportTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3081,7 +3004,6 @@ extension EC2Client { public func createInternetGateway(input: CreateInternetGatewayInput) async throws -> CreateInternetGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createInternetGateway") @@ -3105,7 +3027,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateInternetGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateInternetGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateInternetGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3121,7 +3043,6 @@ extension EC2Client { public func createIpam(input: CreateIpamInput) async throws -> CreateIpamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createIpam") @@ -3146,7 +3067,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateIpamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateIpamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateIpamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3162,7 +3083,6 @@ extension EC2Client { public func createIpamPool(input: CreateIpamPoolInput) async throws -> CreateIpamPoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createIpamPool") @@ -3187,7 +3107,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateIpamPoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateIpamPoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateIpamPoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3203,7 +3123,6 @@ extension EC2Client { public func createIpamResourceDiscovery(input: CreateIpamResourceDiscoveryInput) async throws -> CreateIpamResourceDiscoveryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createIpamResourceDiscovery") @@ -3228,7 +3147,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateIpamResourceDiscoveryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateIpamResourceDiscoveryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateIpamResourceDiscoveryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3244,7 +3163,6 @@ extension EC2Client { public func createIpamScope(input: CreateIpamScopeInput) async throws -> CreateIpamScopeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createIpamScope") @@ -3269,7 +3187,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateIpamScopeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateIpamScopeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateIpamScopeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3285,7 +3203,6 @@ extension EC2Client { public func createKeyPair(input: CreateKeyPairInput) async throws -> CreateKeyPairOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createKeyPair") @@ -3309,7 +3226,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateKeyPairOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateKeyPairOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateKeyPairOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3325,7 +3242,6 @@ extension EC2Client { public func createLaunchTemplate(input: CreateLaunchTemplateInput) async throws -> CreateLaunchTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLaunchTemplate") @@ -3349,7 +3265,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLaunchTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLaunchTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLaunchTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3365,7 +3281,6 @@ extension EC2Client { public func createLaunchTemplateVersion(input: CreateLaunchTemplateVersionInput) async throws -> CreateLaunchTemplateVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLaunchTemplateVersion") @@ -3389,7 +3304,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLaunchTemplateVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLaunchTemplateVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLaunchTemplateVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3409,7 +3324,6 @@ extension EC2Client { public func createLocalGatewayRoute(input: CreateLocalGatewayRouteInput) async throws -> CreateLocalGatewayRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLocalGatewayRoute") @@ -3433,7 +3347,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLocalGatewayRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLocalGatewayRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLocalGatewayRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3449,7 +3363,6 @@ extension EC2Client { public func createLocalGatewayRouteTable(input: CreateLocalGatewayRouteTableInput) async throws -> CreateLocalGatewayRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLocalGatewayRouteTable") @@ -3473,7 +3386,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLocalGatewayRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLocalGatewayRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLocalGatewayRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3489,7 +3402,6 @@ extension EC2Client { public func createLocalGatewayRouteTableVirtualInterfaceGroupAssociation(input: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput) async throws -> CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLocalGatewayRouteTableVirtualInterfaceGroupAssociation") @@ -3513,7 +3425,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3529,7 +3441,6 @@ extension EC2Client { public func createLocalGatewayRouteTableVpcAssociation(input: CreateLocalGatewayRouteTableVpcAssociationInput) async throws -> CreateLocalGatewayRouteTableVpcAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLocalGatewayRouteTableVpcAssociation") @@ -3553,7 +3464,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLocalGatewayRouteTableVpcAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLocalGatewayRouteTableVpcAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLocalGatewayRouteTableVpcAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3569,7 +3480,6 @@ extension EC2Client { public func createManagedPrefixList(input: CreateManagedPrefixListInput) async throws -> CreateManagedPrefixListOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createManagedPrefixList") @@ -3594,7 +3504,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateManagedPrefixListOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateManagedPrefixListOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateManagedPrefixListOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3610,7 +3520,6 @@ extension EC2Client { public func createNatGateway(input: CreateNatGatewayInput) async throws -> CreateNatGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createNatGateway") @@ -3635,7 +3544,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateNatGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateNatGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateNatGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3651,7 +3560,6 @@ extension EC2Client { public func createNetworkAcl(input: CreateNetworkAclInput) async throws -> CreateNetworkAclOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createNetworkAcl") @@ -3675,7 +3583,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateNetworkAclOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateNetworkAclOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateNetworkAclOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3691,7 +3599,6 @@ extension EC2Client { public func createNetworkAclEntry(input: CreateNetworkAclEntryInput) async throws -> CreateNetworkAclEntryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createNetworkAclEntry") @@ -3715,7 +3622,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateNetworkAclEntryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateNetworkAclEntryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateNetworkAclEntryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3731,7 +3638,6 @@ extension EC2Client { public func createNetworkInsightsAccessScope(input: CreateNetworkInsightsAccessScopeInput) async throws -> CreateNetworkInsightsAccessScopeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createNetworkInsightsAccessScope") @@ -3756,7 +3662,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateNetworkInsightsAccessScopeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateNetworkInsightsAccessScopeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateNetworkInsightsAccessScopeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3772,7 +3678,6 @@ extension EC2Client { public func createNetworkInsightsPath(input: CreateNetworkInsightsPathInput) async throws -> CreateNetworkInsightsPathOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createNetworkInsightsPath") @@ -3797,7 +3702,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateNetworkInsightsPathOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateNetworkInsightsPathOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateNetworkInsightsPathOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3813,7 +3718,6 @@ extension EC2Client { public func createNetworkInterface(input: CreateNetworkInterfaceInput) async throws -> CreateNetworkInterfaceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createNetworkInterface") @@ -3838,7 +3742,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateNetworkInterfaceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateNetworkInterfaceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateNetworkInterfaceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3854,7 +3758,6 @@ extension EC2Client { public func createNetworkInterfacePermission(input: CreateNetworkInterfacePermissionInput) async throws -> CreateNetworkInterfacePermissionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createNetworkInterfacePermission") @@ -3878,7 +3781,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateNetworkInterfacePermissionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateNetworkInterfacePermissionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateNetworkInterfacePermissionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3894,7 +3797,6 @@ extension EC2Client { public func createPlacementGroup(input: CreatePlacementGroupInput) async throws -> CreatePlacementGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createPlacementGroup") @@ -3918,7 +3820,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePlacementGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreatePlacementGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreatePlacementGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3934,7 +3836,6 @@ extension EC2Client { public func createPublicIpv4Pool(input: CreatePublicIpv4PoolInput) async throws -> CreatePublicIpv4PoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createPublicIpv4Pool") @@ -3958,7 +3859,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePublicIpv4PoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreatePublicIpv4PoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreatePublicIpv4PoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3974,7 +3875,6 @@ extension EC2Client { public func createReplaceRootVolumeTask(input: CreateReplaceRootVolumeTaskInput) async throws -> CreateReplaceRootVolumeTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createReplaceRootVolumeTask") @@ -3999,7 +3899,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateReplaceRootVolumeTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateReplaceRootVolumeTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateReplaceRootVolumeTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4015,7 +3915,6 @@ extension EC2Client { public func createReservedInstancesListing(input: CreateReservedInstancesListingInput) async throws -> CreateReservedInstancesListingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createReservedInstancesListing") @@ -4039,7 +3938,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateReservedInstancesListingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateReservedInstancesListingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateReservedInstancesListingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4055,7 +3954,6 @@ extension EC2Client { public func createRestoreImageTask(input: CreateRestoreImageTaskInput) async throws -> CreateRestoreImageTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createRestoreImageTask") @@ -4079,7 +3977,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateRestoreImageTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateRestoreImageTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateRestoreImageTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4102,7 +4000,6 @@ extension EC2Client { public func createRoute(input: CreateRouteInput) async throws -> CreateRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createRoute") @@ -4126,7 +4023,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4142,7 +4039,6 @@ extension EC2Client { public func createRouteTable(input: CreateRouteTableInput) async throws -> CreateRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createRouteTable") @@ -4166,7 +4062,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4182,7 +4078,6 @@ extension EC2Client { public func createSecurityGroup(input: CreateSecurityGroupInput) async throws -> CreateSecurityGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSecurityGroup") @@ -4206,7 +4101,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSecurityGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSecurityGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSecurityGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4222,7 +4117,6 @@ extension EC2Client { public func createSnapshot(input: CreateSnapshotInput) async throws -> CreateSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSnapshot") @@ -4246,7 +4140,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4262,7 +4156,6 @@ extension EC2Client { public func createSnapshots(input: CreateSnapshotsInput) async throws -> CreateSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSnapshots") @@ -4286,7 +4179,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4302,7 +4195,6 @@ extension EC2Client { public func createSpotDatafeedSubscription(input: CreateSpotDatafeedSubscriptionInput) async throws -> CreateSpotDatafeedSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSpotDatafeedSubscription") @@ -4326,7 +4218,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSpotDatafeedSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSpotDatafeedSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSpotDatafeedSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4342,7 +4234,6 @@ extension EC2Client { public func createStoreImageTask(input: CreateStoreImageTaskInput) async throws -> CreateStoreImageTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createStoreImageTask") @@ -4366,7 +4257,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateStoreImageTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateStoreImageTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateStoreImageTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4382,7 +4273,6 @@ extension EC2Client { public func createSubnet(input: CreateSubnetInput) async throws -> CreateSubnetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSubnet") @@ -4406,7 +4296,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSubnetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSubnetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSubnetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4422,7 +4312,6 @@ extension EC2Client { public func createSubnetCidrReservation(input: CreateSubnetCidrReservationInput) async throws -> CreateSubnetCidrReservationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSubnetCidrReservation") @@ -4446,7 +4335,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSubnetCidrReservationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSubnetCidrReservationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSubnetCidrReservationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4462,7 +4351,6 @@ extension EC2Client { public func createTags(input: CreateTagsInput) async throws -> CreateTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTags") @@ -4486,7 +4374,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4502,7 +4390,6 @@ extension EC2Client { public func createTrafficMirrorFilter(input: CreateTrafficMirrorFilterInput) async throws -> CreateTrafficMirrorFilterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTrafficMirrorFilter") @@ -4527,7 +4414,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTrafficMirrorFilterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTrafficMirrorFilterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTrafficMirrorFilterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4543,7 +4430,6 @@ extension EC2Client { public func createTrafficMirrorFilterRule(input: CreateTrafficMirrorFilterRuleInput) async throws -> CreateTrafficMirrorFilterRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTrafficMirrorFilterRule") @@ -4568,7 +4454,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTrafficMirrorFilterRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTrafficMirrorFilterRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTrafficMirrorFilterRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4584,7 +4470,6 @@ extension EC2Client { public func createTrafficMirrorSession(input: CreateTrafficMirrorSessionInput) async throws -> CreateTrafficMirrorSessionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTrafficMirrorSession") @@ -4609,7 +4494,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTrafficMirrorSessionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTrafficMirrorSessionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTrafficMirrorSessionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4625,7 +4510,6 @@ extension EC2Client { public func createTrafficMirrorTarget(input: CreateTrafficMirrorTargetInput) async throws -> CreateTrafficMirrorTargetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTrafficMirrorTarget") @@ -4650,7 +4534,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTrafficMirrorTargetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTrafficMirrorTargetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTrafficMirrorTargetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4666,7 +4550,6 @@ extension EC2Client { public func createTransitGateway(input: CreateTransitGatewayInput) async throws -> CreateTransitGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGateway") @@ -4690,7 +4573,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4706,7 +4589,6 @@ extension EC2Client { public func createTransitGatewayConnect(input: CreateTransitGatewayConnectInput) async throws -> CreateTransitGatewayConnectOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayConnect") @@ -4730,7 +4612,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayConnectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayConnectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayConnectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4746,7 +4628,6 @@ extension EC2Client { public func createTransitGatewayConnectPeer(input: CreateTransitGatewayConnectPeerInput) async throws -> CreateTransitGatewayConnectPeerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayConnectPeer") @@ -4770,7 +4651,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayConnectPeerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayConnectPeerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayConnectPeerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4786,7 +4667,6 @@ extension EC2Client { public func createTransitGatewayMulticastDomain(input: CreateTransitGatewayMulticastDomainInput) async throws -> CreateTransitGatewayMulticastDomainOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayMulticastDomain") @@ -4810,7 +4690,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayMulticastDomainOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayMulticastDomainOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayMulticastDomainOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4826,7 +4706,6 @@ extension EC2Client { public func createTransitGatewayPeeringAttachment(input: CreateTransitGatewayPeeringAttachmentInput) async throws -> CreateTransitGatewayPeeringAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayPeeringAttachment") @@ -4850,7 +4729,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayPeeringAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayPeeringAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayPeeringAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4866,7 +4745,6 @@ extension EC2Client { public func createTransitGatewayPolicyTable(input: CreateTransitGatewayPolicyTableInput) async throws -> CreateTransitGatewayPolicyTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayPolicyTable") @@ -4890,7 +4768,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayPolicyTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayPolicyTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayPolicyTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4906,7 +4784,6 @@ extension EC2Client { public func createTransitGatewayPrefixListReference(input: CreateTransitGatewayPrefixListReferenceInput) async throws -> CreateTransitGatewayPrefixListReferenceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayPrefixListReference") @@ -4930,7 +4807,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayPrefixListReferenceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayPrefixListReferenceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayPrefixListReferenceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4946,7 +4823,6 @@ extension EC2Client { public func createTransitGatewayRoute(input: CreateTransitGatewayRouteInput) async throws -> CreateTransitGatewayRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayRoute") @@ -4970,7 +4846,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4986,7 +4862,6 @@ extension EC2Client { public func createTransitGatewayRouteTable(input: CreateTransitGatewayRouteTableInput) async throws -> CreateTransitGatewayRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayRouteTable") @@ -5010,7 +4885,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5026,7 +4901,6 @@ extension EC2Client { public func createTransitGatewayRouteTableAnnouncement(input: CreateTransitGatewayRouteTableAnnouncementInput) async throws -> CreateTransitGatewayRouteTableAnnouncementOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayRouteTableAnnouncement") @@ -5050,7 +4924,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayRouteTableAnnouncementOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayRouteTableAnnouncementOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayRouteTableAnnouncementOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5066,7 +4940,6 @@ extension EC2Client { public func createTransitGatewayVpcAttachment(input: CreateTransitGatewayVpcAttachmentInput) async throws -> CreateTransitGatewayVpcAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTransitGatewayVpcAttachment") @@ -5090,7 +4963,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTransitGatewayVpcAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTransitGatewayVpcAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTransitGatewayVpcAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5106,7 +4979,6 @@ extension EC2Client { public func createVerifiedAccessEndpoint(input: CreateVerifiedAccessEndpointInput) async throws -> CreateVerifiedAccessEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVerifiedAccessEndpoint") @@ -5131,7 +5003,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVerifiedAccessEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVerifiedAccessEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVerifiedAccessEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5147,7 +5019,6 @@ extension EC2Client { public func createVerifiedAccessGroup(input: CreateVerifiedAccessGroupInput) async throws -> CreateVerifiedAccessGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVerifiedAccessGroup") @@ -5172,7 +5043,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVerifiedAccessGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVerifiedAccessGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVerifiedAccessGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5188,7 +5059,6 @@ extension EC2Client { public func createVerifiedAccessInstance(input: CreateVerifiedAccessInstanceInput) async throws -> CreateVerifiedAccessInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVerifiedAccessInstance") @@ -5213,7 +5083,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVerifiedAccessInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVerifiedAccessInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVerifiedAccessInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5229,7 +5099,6 @@ extension EC2Client { public func createVerifiedAccessTrustProvider(input: CreateVerifiedAccessTrustProviderInput) async throws -> CreateVerifiedAccessTrustProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVerifiedAccessTrustProvider") @@ -5254,7 +5123,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVerifiedAccessTrustProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVerifiedAccessTrustProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVerifiedAccessTrustProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5270,7 +5139,6 @@ extension EC2Client { public func createVolume(input: CreateVolumeInput) async throws -> CreateVolumeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVolume") @@ -5295,7 +5163,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVolumeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVolumeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVolumeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5311,7 +5179,6 @@ extension EC2Client { public func createVpc(input: CreateVpcInput) async throws -> CreateVpcOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVpc") @@ -5335,7 +5202,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVpcOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVpcOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVpcOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5351,7 +5218,6 @@ extension EC2Client { public func createVpcEndpoint(input: CreateVpcEndpointInput) async throws -> CreateVpcEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVpcEndpoint") @@ -5375,7 +5241,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVpcEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVpcEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVpcEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5391,7 +5257,6 @@ extension EC2Client { public func createVpcEndpointConnectionNotification(input: CreateVpcEndpointConnectionNotificationInput) async throws -> CreateVpcEndpointConnectionNotificationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVpcEndpointConnectionNotification") @@ -5415,7 +5280,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVpcEndpointConnectionNotificationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVpcEndpointConnectionNotificationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVpcEndpointConnectionNotificationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5438,7 +5303,6 @@ extension EC2Client { public func createVpcEndpointServiceConfiguration(input: CreateVpcEndpointServiceConfigurationInput) async throws -> CreateVpcEndpointServiceConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVpcEndpointServiceConfiguration") @@ -5462,7 +5326,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVpcEndpointServiceConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVpcEndpointServiceConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVpcEndpointServiceConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5478,7 +5342,6 @@ extension EC2Client { public func createVpcPeeringConnection(input: CreateVpcPeeringConnectionInput) async throws -> CreateVpcPeeringConnectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVpcPeeringConnection") @@ -5502,7 +5365,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVpcPeeringConnectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVpcPeeringConnectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVpcPeeringConnectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5518,7 +5381,6 @@ extension EC2Client { public func createVpnConnection(input: CreateVpnConnectionInput) async throws -> CreateVpnConnectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVpnConnection") @@ -5542,7 +5404,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVpnConnectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVpnConnectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVpnConnectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5558,7 +5420,6 @@ extension EC2Client { public func createVpnConnectionRoute(input: CreateVpnConnectionRouteInput) async throws -> CreateVpnConnectionRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVpnConnectionRoute") @@ -5582,7 +5443,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVpnConnectionRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVpnConnectionRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVpnConnectionRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5598,7 +5459,6 @@ extension EC2Client { public func createVpnGateway(input: CreateVpnGatewayInput) async throws -> CreateVpnGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVpnGateway") @@ -5622,7 +5482,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVpnGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVpnGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVpnGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5638,7 +5498,6 @@ extension EC2Client { public func deleteCarrierGateway(input: DeleteCarrierGatewayInput) async throws -> DeleteCarrierGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCarrierGateway") @@ -5662,7 +5521,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCarrierGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCarrierGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCarrierGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5678,7 +5537,6 @@ extension EC2Client { public func deleteClientVpnEndpoint(input: DeleteClientVpnEndpointInput) async throws -> DeleteClientVpnEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteClientVpnEndpoint") @@ -5702,7 +5560,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteClientVpnEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteClientVpnEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteClientVpnEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5718,7 +5576,6 @@ extension EC2Client { public func deleteClientVpnRoute(input: DeleteClientVpnRouteInput) async throws -> DeleteClientVpnRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteClientVpnRoute") @@ -5742,7 +5599,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteClientVpnRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteClientVpnRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteClientVpnRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5758,7 +5615,6 @@ extension EC2Client { public func deleteCoipCidr(input: DeleteCoipCidrInput) async throws -> DeleteCoipCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCoipCidr") @@ -5782,7 +5638,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCoipCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCoipCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCoipCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5798,7 +5654,6 @@ extension EC2Client { public func deleteCoipPool(input: DeleteCoipPoolInput) async throws -> DeleteCoipPoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCoipPool") @@ -5822,7 +5677,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCoipPoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCoipPoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCoipPoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5838,7 +5693,6 @@ extension EC2Client { public func deleteCustomerGateway(input: DeleteCustomerGatewayInput) async throws -> DeleteCustomerGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCustomerGateway") @@ -5862,7 +5716,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCustomerGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCustomerGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCustomerGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5878,7 +5732,6 @@ extension EC2Client { public func deleteDhcpOptions(input: DeleteDhcpOptionsInput) async throws -> DeleteDhcpOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDhcpOptions") @@ -5902,7 +5755,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDhcpOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDhcpOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDhcpOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5918,7 +5771,6 @@ extension EC2Client { public func deleteEgressOnlyInternetGateway(input: DeleteEgressOnlyInternetGatewayInput) async throws -> DeleteEgressOnlyInternetGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteEgressOnlyInternetGateway") @@ -5942,7 +5794,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteEgressOnlyInternetGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteEgressOnlyInternetGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteEgressOnlyInternetGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5965,7 +5817,6 @@ extension EC2Client { public func deleteFleets(input: DeleteFleetsInput) async throws -> DeleteFleetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteFleets") @@ -5989,7 +5840,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteFleetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteFleetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteFleetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6005,7 +5856,6 @@ extension EC2Client { public func deleteFlowLogs(input: DeleteFlowLogsInput) async throws -> DeleteFlowLogsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteFlowLogs") @@ -6029,7 +5879,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteFlowLogsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteFlowLogsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteFlowLogsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6045,7 +5895,6 @@ extension EC2Client { public func deleteFpgaImage(input: DeleteFpgaImageInput) async throws -> DeleteFpgaImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteFpgaImage") @@ -6069,7 +5918,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteFpgaImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteFpgaImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteFpgaImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6085,7 +5934,6 @@ extension EC2Client { public func deleteInstanceConnectEndpoint(input: DeleteInstanceConnectEndpointInput) async throws -> DeleteInstanceConnectEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteInstanceConnectEndpoint") @@ -6109,7 +5957,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteInstanceConnectEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteInstanceConnectEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteInstanceConnectEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6125,7 +5973,6 @@ extension EC2Client { public func deleteInstanceEventWindow(input: DeleteInstanceEventWindowInput) async throws -> DeleteInstanceEventWindowOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteInstanceEventWindow") @@ -6149,7 +5996,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteInstanceEventWindowOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteInstanceEventWindowOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteInstanceEventWindowOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6165,7 +6012,6 @@ extension EC2Client { public func deleteInternetGateway(input: DeleteInternetGatewayInput) async throws -> DeleteInternetGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteInternetGateway") @@ -6189,7 +6035,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteInternetGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteInternetGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteInternetGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6205,7 +6051,6 @@ extension EC2Client { public func deleteIpam(input: DeleteIpamInput) async throws -> DeleteIpamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteIpam") @@ -6229,7 +6074,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteIpamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteIpamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteIpamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6245,7 +6090,6 @@ extension EC2Client { public func deleteIpamPool(input: DeleteIpamPoolInput) async throws -> DeleteIpamPoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteIpamPool") @@ -6269,7 +6113,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteIpamPoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteIpamPoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteIpamPoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6285,7 +6129,6 @@ extension EC2Client { public func deleteIpamResourceDiscovery(input: DeleteIpamResourceDiscoveryInput) async throws -> DeleteIpamResourceDiscoveryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteIpamResourceDiscovery") @@ -6309,7 +6152,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteIpamResourceDiscoveryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteIpamResourceDiscoveryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteIpamResourceDiscoveryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6325,7 +6168,6 @@ extension EC2Client { public func deleteIpamScope(input: DeleteIpamScopeInput) async throws -> DeleteIpamScopeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteIpamScope") @@ -6349,7 +6191,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteIpamScopeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteIpamScopeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteIpamScopeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6365,7 +6207,6 @@ extension EC2Client { public func deleteKeyPair(input: DeleteKeyPairInput) async throws -> DeleteKeyPairOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteKeyPair") @@ -6389,7 +6230,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteKeyPairOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteKeyPairOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteKeyPairOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6405,7 +6246,6 @@ extension EC2Client { public func deleteLaunchTemplate(input: DeleteLaunchTemplateInput) async throws -> DeleteLaunchTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLaunchTemplate") @@ -6429,7 +6269,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLaunchTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLaunchTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLaunchTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6445,7 +6285,6 @@ extension EC2Client { public func deleteLaunchTemplateVersions(input: DeleteLaunchTemplateVersionsInput) async throws -> DeleteLaunchTemplateVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLaunchTemplateVersions") @@ -6469,7 +6308,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLaunchTemplateVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLaunchTemplateVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLaunchTemplateVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6485,7 +6324,6 @@ extension EC2Client { public func deleteLocalGatewayRoute(input: DeleteLocalGatewayRouteInput) async throws -> DeleteLocalGatewayRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLocalGatewayRoute") @@ -6509,7 +6347,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLocalGatewayRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLocalGatewayRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLocalGatewayRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6525,7 +6363,6 @@ extension EC2Client { public func deleteLocalGatewayRouteTable(input: DeleteLocalGatewayRouteTableInput) async throws -> DeleteLocalGatewayRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLocalGatewayRouteTable") @@ -6549,7 +6386,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLocalGatewayRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLocalGatewayRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLocalGatewayRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6565,7 +6402,6 @@ extension EC2Client { public func deleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation(input: DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput) async throws -> DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation") @@ -6589,7 +6425,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6605,7 +6441,6 @@ extension EC2Client { public func deleteLocalGatewayRouteTableVpcAssociation(input: DeleteLocalGatewayRouteTableVpcAssociationInput) async throws -> DeleteLocalGatewayRouteTableVpcAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLocalGatewayRouteTableVpcAssociation") @@ -6629,7 +6464,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLocalGatewayRouteTableVpcAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLocalGatewayRouteTableVpcAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLocalGatewayRouteTableVpcAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6645,7 +6480,6 @@ extension EC2Client { public func deleteManagedPrefixList(input: DeleteManagedPrefixListInput) async throws -> DeleteManagedPrefixListOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteManagedPrefixList") @@ -6669,7 +6503,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteManagedPrefixListOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteManagedPrefixListOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteManagedPrefixListOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6685,7 +6519,6 @@ extension EC2Client { public func deleteNatGateway(input: DeleteNatGatewayInput) async throws -> DeleteNatGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNatGateway") @@ -6709,7 +6542,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNatGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNatGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNatGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6725,7 +6558,6 @@ extension EC2Client { public func deleteNetworkAcl(input: DeleteNetworkAclInput) async throws -> DeleteNetworkAclOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNetworkAcl") @@ -6749,7 +6581,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNetworkAclOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNetworkAclOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNetworkAclOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6765,7 +6597,6 @@ extension EC2Client { public func deleteNetworkAclEntry(input: DeleteNetworkAclEntryInput) async throws -> DeleteNetworkAclEntryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNetworkAclEntry") @@ -6789,7 +6620,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNetworkAclEntryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNetworkAclEntryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNetworkAclEntryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6805,7 +6636,6 @@ extension EC2Client { public func deleteNetworkInsightsAccessScope(input: DeleteNetworkInsightsAccessScopeInput) async throws -> DeleteNetworkInsightsAccessScopeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNetworkInsightsAccessScope") @@ -6829,7 +6659,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNetworkInsightsAccessScopeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNetworkInsightsAccessScopeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNetworkInsightsAccessScopeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6845,7 +6675,6 @@ extension EC2Client { public func deleteNetworkInsightsAccessScopeAnalysis(input: DeleteNetworkInsightsAccessScopeAnalysisInput) async throws -> DeleteNetworkInsightsAccessScopeAnalysisOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNetworkInsightsAccessScopeAnalysis") @@ -6869,7 +6698,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNetworkInsightsAccessScopeAnalysisOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNetworkInsightsAccessScopeAnalysisOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNetworkInsightsAccessScopeAnalysisOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6885,7 +6714,6 @@ extension EC2Client { public func deleteNetworkInsightsAnalysis(input: DeleteNetworkInsightsAnalysisInput) async throws -> DeleteNetworkInsightsAnalysisOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNetworkInsightsAnalysis") @@ -6909,7 +6737,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNetworkInsightsAnalysisOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNetworkInsightsAnalysisOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNetworkInsightsAnalysisOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6925,7 +6753,6 @@ extension EC2Client { public func deleteNetworkInsightsPath(input: DeleteNetworkInsightsPathInput) async throws -> DeleteNetworkInsightsPathOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNetworkInsightsPath") @@ -6949,7 +6776,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNetworkInsightsPathOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNetworkInsightsPathOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNetworkInsightsPathOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6965,7 +6792,6 @@ extension EC2Client { public func deleteNetworkInterface(input: DeleteNetworkInterfaceInput) async throws -> DeleteNetworkInterfaceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNetworkInterface") @@ -6989,7 +6815,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNetworkInterfaceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNetworkInterfaceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNetworkInterfaceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7005,7 +6831,6 @@ extension EC2Client { public func deleteNetworkInterfacePermission(input: DeleteNetworkInterfacePermissionInput) async throws -> DeleteNetworkInterfacePermissionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteNetworkInterfacePermission") @@ -7029,7 +6854,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteNetworkInterfacePermissionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteNetworkInterfacePermissionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteNetworkInterfacePermissionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7045,7 +6870,6 @@ extension EC2Client { public func deletePlacementGroup(input: DeletePlacementGroupInput) async throws -> DeletePlacementGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deletePlacementGroup") @@ -7069,7 +6893,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePlacementGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePlacementGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePlacementGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7085,7 +6909,6 @@ extension EC2Client { public func deletePublicIpv4Pool(input: DeletePublicIpv4PoolInput) async throws -> DeletePublicIpv4PoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deletePublicIpv4Pool") @@ -7109,7 +6932,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePublicIpv4PoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePublicIpv4PoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePublicIpv4PoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7125,7 +6948,6 @@ extension EC2Client { public func deleteQueuedReservedInstances(input: DeleteQueuedReservedInstancesInput) async throws -> DeleteQueuedReservedInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteQueuedReservedInstances") @@ -7149,7 +6971,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteQueuedReservedInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteQueuedReservedInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteQueuedReservedInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7165,7 +6987,6 @@ extension EC2Client { public func deleteRoute(input: DeleteRouteInput) async throws -> DeleteRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteRoute") @@ -7189,7 +7010,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7205,7 +7026,6 @@ extension EC2Client { public func deleteRouteTable(input: DeleteRouteTableInput) async throws -> DeleteRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteRouteTable") @@ -7229,7 +7049,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7245,7 +7065,6 @@ extension EC2Client { public func deleteSecurityGroup(input: DeleteSecurityGroupInput) async throws -> DeleteSecurityGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSecurityGroup") @@ -7269,7 +7088,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSecurityGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSecurityGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSecurityGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7285,7 +7104,6 @@ extension EC2Client { public func deleteSnapshot(input: DeleteSnapshotInput) async throws -> DeleteSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSnapshot") @@ -7309,7 +7127,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7325,7 +7143,6 @@ extension EC2Client { public func deleteSpotDatafeedSubscription(input: DeleteSpotDatafeedSubscriptionInput) async throws -> DeleteSpotDatafeedSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSpotDatafeedSubscription") @@ -7349,7 +7166,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSpotDatafeedSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSpotDatafeedSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSpotDatafeedSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7365,7 +7182,6 @@ extension EC2Client { public func deleteSubnet(input: DeleteSubnetInput) async throws -> DeleteSubnetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSubnet") @@ -7389,7 +7205,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSubnetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSubnetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSubnetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7405,7 +7221,6 @@ extension EC2Client { public func deleteSubnetCidrReservation(input: DeleteSubnetCidrReservationInput) async throws -> DeleteSubnetCidrReservationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSubnetCidrReservation") @@ -7429,7 +7244,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSubnetCidrReservationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSubnetCidrReservationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSubnetCidrReservationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7445,7 +7260,6 @@ extension EC2Client { public func deleteTags(input: DeleteTagsInput) async throws -> DeleteTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTags") @@ -7469,7 +7283,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7485,7 +7299,6 @@ extension EC2Client { public func deleteTrafficMirrorFilter(input: DeleteTrafficMirrorFilterInput) async throws -> DeleteTrafficMirrorFilterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTrafficMirrorFilter") @@ -7509,7 +7322,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTrafficMirrorFilterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTrafficMirrorFilterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTrafficMirrorFilterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7525,7 +7338,6 @@ extension EC2Client { public func deleteTrafficMirrorFilterRule(input: DeleteTrafficMirrorFilterRuleInput) async throws -> DeleteTrafficMirrorFilterRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTrafficMirrorFilterRule") @@ -7549,7 +7361,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTrafficMirrorFilterRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTrafficMirrorFilterRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTrafficMirrorFilterRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7565,7 +7377,6 @@ extension EC2Client { public func deleteTrafficMirrorSession(input: DeleteTrafficMirrorSessionInput) async throws -> DeleteTrafficMirrorSessionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTrafficMirrorSession") @@ -7589,7 +7400,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTrafficMirrorSessionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTrafficMirrorSessionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTrafficMirrorSessionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7605,7 +7416,6 @@ extension EC2Client { public func deleteTrafficMirrorTarget(input: DeleteTrafficMirrorTargetInput) async throws -> DeleteTrafficMirrorTargetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTrafficMirrorTarget") @@ -7629,7 +7439,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTrafficMirrorTargetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTrafficMirrorTargetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTrafficMirrorTargetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7645,7 +7455,6 @@ extension EC2Client { public func deleteTransitGateway(input: DeleteTransitGatewayInput) async throws -> DeleteTransitGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGateway") @@ -7669,7 +7478,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7685,7 +7494,6 @@ extension EC2Client { public func deleteTransitGatewayConnect(input: DeleteTransitGatewayConnectInput) async throws -> DeleteTransitGatewayConnectOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayConnect") @@ -7709,7 +7517,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayConnectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayConnectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayConnectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7725,7 +7533,6 @@ extension EC2Client { public func deleteTransitGatewayConnectPeer(input: DeleteTransitGatewayConnectPeerInput) async throws -> DeleteTransitGatewayConnectPeerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayConnectPeer") @@ -7749,7 +7556,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayConnectPeerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayConnectPeerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayConnectPeerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7765,7 +7572,6 @@ extension EC2Client { public func deleteTransitGatewayMulticastDomain(input: DeleteTransitGatewayMulticastDomainInput) async throws -> DeleteTransitGatewayMulticastDomainOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayMulticastDomain") @@ -7789,7 +7595,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayMulticastDomainOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayMulticastDomainOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayMulticastDomainOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7805,7 +7611,6 @@ extension EC2Client { public func deleteTransitGatewayPeeringAttachment(input: DeleteTransitGatewayPeeringAttachmentInput) async throws -> DeleteTransitGatewayPeeringAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayPeeringAttachment") @@ -7829,7 +7634,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayPeeringAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayPeeringAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayPeeringAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7845,7 +7650,6 @@ extension EC2Client { public func deleteTransitGatewayPolicyTable(input: DeleteTransitGatewayPolicyTableInput) async throws -> DeleteTransitGatewayPolicyTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayPolicyTable") @@ -7869,7 +7673,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayPolicyTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayPolicyTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayPolicyTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7885,7 +7689,6 @@ extension EC2Client { public func deleteTransitGatewayPrefixListReference(input: DeleteTransitGatewayPrefixListReferenceInput) async throws -> DeleteTransitGatewayPrefixListReferenceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayPrefixListReference") @@ -7909,7 +7712,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayPrefixListReferenceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayPrefixListReferenceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayPrefixListReferenceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7925,7 +7728,6 @@ extension EC2Client { public func deleteTransitGatewayRoute(input: DeleteTransitGatewayRouteInput) async throws -> DeleteTransitGatewayRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayRoute") @@ -7949,7 +7751,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7965,7 +7767,6 @@ extension EC2Client { public func deleteTransitGatewayRouteTable(input: DeleteTransitGatewayRouteTableInput) async throws -> DeleteTransitGatewayRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayRouteTable") @@ -7989,7 +7790,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8005,7 +7806,6 @@ extension EC2Client { public func deleteTransitGatewayRouteTableAnnouncement(input: DeleteTransitGatewayRouteTableAnnouncementInput) async throws -> DeleteTransitGatewayRouteTableAnnouncementOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayRouteTableAnnouncement") @@ -8029,7 +7829,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayRouteTableAnnouncementOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayRouteTableAnnouncementOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayRouteTableAnnouncementOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8045,7 +7845,6 @@ extension EC2Client { public func deleteTransitGatewayVpcAttachment(input: DeleteTransitGatewayVpcAttachmentInput) async throws -> DeleteTransitGatewayVpcAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTransitGatewayVpcAttachment") @@ -8069,7 +7868,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTransitGatewayVpcAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTransitGatewayVpcAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTransitGatewayVpcAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8085,7 +7884,6 @@ extension EC2Client { public func deleteVerifiedAccessEndpoint(input: DeleteVerifiedAccessEndpointInput) async throws -> DeleteVerifiedAccessEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVerifiedAccessEndpoint") @@ -8110,7 +7908,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVerifiedAccessEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVerifiedAccessEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVerifiedAccessEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8126,7 +7924,6 @@ extension EC2Client { public func deleteVerifiedAccessGroup(input: DeleteVerifiedAccessGroupInput) async throws -> DeleteVerifiedAccessGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVerifiedAccessGroup") @@ -8151,7 +7948,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVerifiedAccessGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVerifiedAccessGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVerifiedAccessGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8167,7 +7964,6 @@ extension EC2Client { public func deleteVerifiedAccessInstance(input: DeleteVerifiedAccessInstanceInput) async throws -> DeleteVerifiedAccessInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVerifiedAccessInstance") @@ -8192,7 +7988,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVerifiedAccessInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVerifiedAccessInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVerifiedAccessInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8208,7 +8004,6 @@ extension EC2Client { public func deleteVerifiedAccessTrustProvider(input: DeleteVerifiedAccessTrustProviderInput) async throws -> DeleteVerifiedAccessTrustProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVerifiedAccessTrustProvider") @@ -8233,7 +8028,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVerifiedAccessTrustProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVerifiedAccessTrustProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVerifiedAccessTrustProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8249,7 +8044,6 @@ extension EC2Client { public func deleteVolume(input: DeleteVolumeInput) async throws -> DeleteVolumeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVolume") @@ -8273,7 +8067,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVolumeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVolumeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVolumeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8289,7 +8083,6 @@ extension EC2Client { public func deleteVpc(input: DeleteVpcInput) async throws -> DeleteVpcOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVpc") @@ -8313,7 +8106,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVpcOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVpcOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVpcOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8329,7 +8122,6 @@ extension EC2Client { public func deleteVpcEndpointConnectionNotifications(input: DeleteVpcEndpointConnectionNotificationsInput) async throws -> DeleteVpcEndpointConnectionNotificationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVpcEndpointConnectionNotifications") @@ -8353,7 +8145,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVpcEndpointConnectionNotificationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVpcEndpointConnectionNotificationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVpcEndpointConnectionNotificationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8369,7 +8161,6 @@ extension EC2Client { public func deleteVpcEndpointServiceConfigurations(input: DeleteVpcEndpointServiceConfigurationsInput) async throws -> DeleteVpcEndpointServiceConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVpcEndpointServiceConfigurations") @@ -8393,7 +8184,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVpcEndpointServiceConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVpcEndpointServiceConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVpcEndpointServiceConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8409,7 +8200,6 @@ extension EC2Client { public func deleteVpcEndpoints(input: DeleteVpcEndpointsInput) async throws -> DeleteVpcEndpointsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVpcEndpoints") @@ -8433,7 +8223,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVpcEndpointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVpcEndpointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVpcEndpointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8449,7 +8239,6 @@ extension EC2Client { public func deleteVpcPeeringConnection(input: DeleteVpcPeeringConnectionInput) async throws -> DeleteVpcPeeringConnectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVpcPeeringConnection") @@ -8473,7 +8262,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVpcPeeringConnectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVpcPeeringConnectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVpcPeeringConnectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8489,7 +8278,6 @@ extension EC2Client { public func deleteVpnConnection(input: DeleteVpnConnectionInput) async throws -> DeleteVpnConnectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVpnConnection") @@ -8513,7 +8301,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVpnConnectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVpnConnectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVpnConnectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8529,7 +8317,6 @@ extension EC2Client { public func deleteVpnConnectionRoute(input: DeleteVpnConnectionRouteInput) async throws -> DeleteVpnConnectionRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVpnConnectionRoute") @@ -8553,7 +8340,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVpnConnectionRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVpnConnectionRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVpnConnectionRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8569,7 +8356,6 @@ extension EC2Client { public func deleteVpnGateway(input: DeleteVpnGatewayInput) async throws -> DeleteVpnGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVpnGateway") @@ -8593,7 +8379,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVpnGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVpnGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVpnGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8609,7 +8395,6 @@ extension EC2Client { public func deprovisionByoipCidr(input: DeprovisionByoipCidrInput) async throws -> DeprovisionByoipCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deprovisionByoipCidr") @@ -8633,7 +8418,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeprovisionByoipCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeprovisionByoipCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeprovisionByoipCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8649,7 +8434,6 @@ extension EC2Client { public func deprovisionIpamByoasn(input: DeprovisionIpamByoasnInput) async throws -> DeprovisionIpamByoasnOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deprovisionIpamByoasn") @@ -8673,7 +8457,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeprovisionIpamByoasnOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeprovisionIpamByoasnOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeprovisionIpamByoasnOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8689,7 +8473,6 @@ extension EC2Client { public func deprovisionIpamPoolCidr(input: DeprovisionIpamPoolCidrInput) async throws -> DeprovisionIpamPoolCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deprovisionIpamPoolCidr") @@ -8713,7 +8496,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeprovisionIpamPoolCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeprovisionIpamPoolCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeprovisionIpamPoolCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8729,7 +8512,6 @@ extension EC2Client { public func deprovisionPublicIpv4PoolCidr(input: DeprovisionPublicIpv4PoolCidrInput) async throws -> DeprovisionPublicIpv4PoolCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deprovisionPublicIpv4PoolCidr") @@ -8753,7 +8535,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeprovisionPublicIpv4PoolCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeprovisionPublicIpv4PoolCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeprovisionPublicIpv4PoolCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8769,7 +8551,6 @@ extension EC2Client { public func deregisterImage(input: DeregisterImageInput) async throws -> DeregisterImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deregisterImage") @@ -8793,7 +8574,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeregisterImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeregisterImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeregisterImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8809,7 +8590,6 @@ extension EC2Client { public func deregisterInstanceEventNotificationAttributes(input: DeregisterInstanceEventNotificationAttributesInput) async throws -> DeregisterInstanceEventNotificationAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deregisterInstanceEventNotificationAttributes") @@ -8833,7 +8613,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeregisterInstanceEventNotificationAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeregisterInstanceEventNotificationAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeregisterInstanceEventNotificationAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8849,7 +8629,6 @@ extension EC2Client { public func deregisterTransitGatewayMulticastGroupMembers(input: DeregisterTransitGatewayMulticastGroupMembersInput) async throws -> DeregisterTransitGatewayMulticastGroupMembersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deregisterTransitGatewayMulticastGroupMembers") @@ -8873,7 +8652,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeregisterTransitGatewayMulticastGroupMembersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeregisterTransitGatewayMulticastGroupMembersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeregisterTransitGatewayMulticastGroupMembersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8889,7 +8668,6 @@ extension EC2Client { public func deregisterTransitGatewayMulticastGroupSources(input: DeregisterTransitGatewayMulticastGroupSourcesInput) async throws -> DeregisterTransitGatewayMulticastGroupSourcesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deregisterTransitGatewayMulticastGroupSources") @@ -8913,7 +8691,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeregisterTransitGatewayMulticastGroupSourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeregisterTransitGatewayMulticastGroupSourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeregisterTransitGatewayMulticastGroupSourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8941,7 +8719,6 @@ extension EC2Client { public func describeAccountAttributes(input: DescribeAccountAttributesInput) async throws -> DescribeAccountAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAccountAttributes") @@ -8965,7 +8742,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAccountAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAccountAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAccountAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -8981,7 +8758,6 @@ extension EC2Client { public func describeAddressTransfers(input: DescribeAddressTransfersInput) async throws -> DescribeAddressTransfersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAddressTransfers") @@ -9005,7 +8781,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAddressTransfersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAddressTransfersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAddressTransfersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9021,7 +8797,6 @@ extension EC2Client { public func describeAddresses(input: DescribeAddressesInput) async throws -> DescribeAddressesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAddresses") @@ -9045,7 +8820,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAddressesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAddressesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAddressesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9061,7 +8836,6 @@ extension EC2Client { public func describeAddressesAttribute(input: DescribeAddressesAttributeInput) async throws -> DescribeAddressesAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAddressesAttribute") @@ -9085,7 +8859,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAddressesAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAddressesAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAddressesAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9101,7 +8875,6 @@ extension EC2Client { public func describeAggregateIdFormat(input: DescribeAggregateIdFormatInput) async throws -> DescribeAggregateIdFormatOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAggregateIdFormat") @@ -9125,7 +8898,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAggregateIdFormatOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAggregateIdFormatOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAggregateIdFormatOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9141,7 +8914,6 @@ extension EC2Client { public func describeAvailabilityZones(input: DescribeAvailabilityZonesInput) async throws -> DescribeAvailabilityZonesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAvailabilityZones") @@ -9165,7 +8937,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAvailabilityZonesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAvailabilityZonesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAvailabilityZonesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9181,7 +8953,6 @@ extension EC2Client { public func describeAwsNetworkPerformanceMetricSubscriptions(input: DescribeAwsNetworkPerformanceMetricSubscriptionsInput) async throws -> DescribeAwsNetworkPerformanceMetricSubscriptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAwsNetworkPerformanceMetricSubscriptions") @@ -9205,7 +8976,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAwsNetworkPerformanceMetricSubscriptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAwsNetworkPerformanceMetricSubscriptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAwsNetworkPerformanceMetricSubscriptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9221,7 +8992,6 @@ extension EC2Client { public func describeBundleTasks(input: DescribeBundleTasksInput) async throws -> DescribeBundleTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeBundleTasks") @@ -9245,7 +9015,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeBundleTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeBundleTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeBundleTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9261,7 +9031,6 @@ extension EC2Client { public func describeByoipCidrs(input: DescribeByoipCidrsInput) async throws -> DescribeByoipCidrsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeByoipCidrs") @@ -9285,7 +9054,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeByoipCidrsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeByoipCidrsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeByoipCidrsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9301,7 +9070,6 @@ extension EC2Client { public func describeCapacityBlockOfferings(input: DescribeCapacityBlockOfferingsInput) async throws -> DescribeCapacityBlockOfferingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCapacityBlockOfferings") @@ -9325,7 +9093,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCapacityBlockOfferingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCapacityBlockOfferingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCapacityBlockOfferingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9341,7 +9109,6 @@ extension EC2Client { public func describeCapacityReservationFleets(input: DescribeCapacityReservationFleetsInput) async throws -> DescribeCapacityReservationFleetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCapacityReservationFleets") @@ -9365,7 +9132,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCapacityReservationFleetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCapacityReservationFleetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCapacityReservationFleetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9381,7 +9148,6 @@ extension EC2Client { public func describeCapacityReservations(input: DescribeCapacityReservationsInput) async throws -> DescribeCapacityReservationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCapacityReservations") @@ -9405,7 +9171,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCapacityReservationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCapacityReservationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCapacityReservationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9421,7 +9187,6 @@ extension EC2Client { public func describeCarrierGateways(input: DescribeCarrierGatewaysInput) async throws -> DescribeCarrierGatewaysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCarrierGateways") @@ -9445,7 +9210,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCarrierGatewaysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCarrierGatewaysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCarrierGatewaysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9461,7 +9226,6 @@ extension EC2Client { public func describeClassicLinkInstances(input: DescribeClassicLinkInstancesInput) async throws -> DescribeClassicLinkInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClassicLinkInstances") @@ -9485,7 +9249,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClassicLinkInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClassicLinkInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClassicLinkInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9501,7 +9265,6 @@ extension EC2Client { public func describeClientVpnAuthorizationRules(input: DescribeClientVpnAuthorizationRulesInput) async throws -> DescribeClientVpnAuthorizationRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClientVpnAuthorizationRules") @@ -9525,7 +9288,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClientVpnAuthorizationRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClientVpnAuthorizationRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClientVpnAuthorizationRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9541,7 +9304,6 @@ extension EC2Client { public func describeClientVpnConnections(input: DescribeClientVpnConnectionsInput) async throws -> DescribeClientVpnConnectionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClientVpnConnections") @@ -9565,7 +9327,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClientVpnConnectionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClientVpnConnectionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClientVpnConnectionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9581,7 +9343,6 @@ extension EC2Client { public func describeClientVpnEndpoints(input: DescribeClientVpnEndpointsInput) async throws -> DescribeClientVpnEndpointsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClientVpnEndpoints") @@ -9605,7 +9366,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClientVpnEndpointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClientVpnEndpointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClientVpnEndpointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9621,7 +9382,6 @@ extension EC2Client { public func describeClientVpnRoutes(input: DescribeClientVpnRoutesInput) async throws -> DescribeClientVpnRoutesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClientVpnRoutes") @@ -9645,7 +9405,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClientVpnRoutesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClientVpnRoutesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClientVpnRoutesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9661,7 +9421,6 @@ extension EC2Client { public func describeClientVpnTargetNetworks(input: DescribeClientVpnTargetNetworksInput) async throws -> DescribeClientVpnTargetNetworksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClientVpnTargetNetworks") @@ -9685,7 +9444,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClientVpnTargetNetworksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClientVpnTargetNetworksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClientVpnTargetNetworksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9701,7 +9460,6 @@ extension EC2Client { public func describeCoipPools(input: DescribeCoipPoolsInput) async throws -> DescribeCoipPoolsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCoipPools") @@ -9725,7 +9483,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCoipPoolsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCoipPoolsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCoipPoolsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9741,7 +9499,6 @@ extension EC2Client { public func describeConversionTasks(input: DescribeConversionTasksInput) async throws -> DescribeConversionTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeConversionTasks") @@ -9765,7 +9522,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeConversionTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeConversionTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeConversionTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9781,7 +9538,6 @@ extension EC2Client { public func describeCustomerGateways(input: DescribeCustomerGatewaysInput) async throws -> DescribeCustomerGatewaysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCustomerGateways") @@ -9805,7 +9561,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCustomerGatewaysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCustomerGatewaysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCustomerGatewaysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9821,7 +9577,6 @@ extension EC2Client { public func describeDhcpOptions(input: DescribeDhcpOptionsInput) async throws -> DescribeDhcpOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDhcpOptions") @@ -9845,7 +9600,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDhcpOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDhcpOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDhcpOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9861,7 +9616,6 @@ extension EC2Client { public func describeEgressOnlyInternetGateways(input: DescribeEgressOnlyInternetGatewaysInput) async throws -> DescribeEgressOnlyInternetGatewaysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEgressOnlyInternetGateways") @@ -9885,7 +9639,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEgressOnlyInternetGatewaysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEgressOnlyInternetGatewaysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEgressOnlyInternetGatewaysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9901,7 +9655,6 @@ extension EC2Client { public func describeElasticGpus(input: DescribeElasticGpusInput) async throws -> DescribeElasticGpusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeElasticGpus") @@ -9925,7 +9678,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeElasticGpusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeElasticGpusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeElasticGpusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9941,7 +9694,6 @@ extension EC2Client { public func describeExportImageTasks(input: DescribeExportImageTasksInput) async throws -> DescribeExportImageTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeExportImageTasks") @@ -9965,7 +9717,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeExportImageTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeExportImageTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeExportImageTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -9981,7 +9733,6 @@ extension EC2Client { public func describeExportTasks(input: DescribeExportTasksInput) async throws -> DescribeExportTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeExportTasks") @@ -10005,7 +9756,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeExportTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeExportTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeExportTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10021,7 +9772,6 @@ extension EC2Client { public func describeFastLaunchImages(input: DescribeFastLaunchImagesInput) async throws -> DescribeFastLaunchImagesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeFastLaunchImages") @@ -10045,7 +9795,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFastLaunchImagesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFastLaunchImagesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFastLaunchImagesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10061,7 +9811,6 @@ extension EC2Client { public func describeFastSnapshotRestores(input: DescribeFastSnapshotRestoresInput) async throws -> DescribeFastSnapshotRestoresOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeFastSnapshotRestores") @@ -10085,7 +9834,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFastSnapshotRestoresOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFastSnapshotRestoresOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFastSnapshotRestoresOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10101,7 +9850,6 @@ extension EC2Client { public func describeFleetHistory(input: DescribeFleetHistoryInput) async throws -> DescribeFleetHistoryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeFleetHistory") @@ -10125,7 +9873,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFleetHistoryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFleetHistoryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFleetHistoryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10141,7 +9889,6 @@ extension EC2Client { public func describeFleetInstances(input: DescribeFleetInstancesInput) async throws -> DescribeFleetInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeFleetInstances") @@ -10165,7 +9912,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFleetInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFleetInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFleetInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10181,7 +9928,6 @@ extension EC2Client { public func describeFleets(input: DescribeFleetsInput) async throws -> DescribeFleetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeFleets") @@ -10205,7 +9951,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFleetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFleetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFleetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10221,7 +9967,6 @@ extension EC2Client { public func describeFlowLogs(input: DescribeFlowLogsInput) async throws -> DescribeFlowLogsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeFlowLogs") @@ -10245,7 +9990,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFlowLogsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFlowLogsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFlowLogsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10261,7 +10006,6 @@ extension EC2Client { public func describeFpgaImageAttribute(input: DescribeFpgaImageAttributeInput) async throws -> DescribeFpgaImageAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeFpgaImageAttribute") @@ -10285,7 +10029,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFpgaImageAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFpgaImageAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFpgaImageAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10301,7 +10045,6 @@ extension EC2Client { public func describeFpgaImages(input: DescribeFpgaImagesInput) async throws -> DescribeFpgaImagesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeFpgaImages") @@ -10325,7 +10068,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeFpgaImagesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeFpgaImagesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeFpgaImagesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10341,7 +10084,6 @@ extension EC2Client { public func describeHostReservationOfferings(input: DescribeHostReservationOfferingsInput) async throws -> DescribeHostReservationOfferingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeHostReservationOfferings") @@ -10365,7 +10107,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeHostReservationOfferingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeHostReservationOfferingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeHostReservationOfferingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10381,7 +10123,6 @@ extension EC2Client { public func describeHostReservations(input: DescribeHostReservationsInput) async throws -> DescribeHostReservationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeHostReservations") @@ -10405,7 +10146,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeHostReservationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeHostReservationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeHostReservationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10421,7 +10162,6 @@ extension EC2Client { public func describeHosts(input: DescribeHostsInput) async throws -> DescribeHostsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeHosts") @@ -10445,7 +10185,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeHostsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeHostsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeHostsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10461,7 +10201,6 @@ extension EC2Client { public func describeIamInstanceProfileAssociations(input: DescribeIamInstanceProfileAssociationsInput) async throws -> DescribeIamInstanceProfileAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIamInstanceProfileAssociations") @@ -10485,7 +10224,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIamInstanceProfileAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIamInstanceProfileAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIamInstanceProfileAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10501,7 +10240,6 @@ extension EC2Client { public func describeIdFormat(input: DescribeIdFormatInput) async throws -> DescribeIdFormatOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIdFormat") @@ -10525,7 +10263,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIdFormatOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIdFormatOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIdFormatOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10541,7 +10279,6 @@ extension EC2Client { public func describeIdentityIdFormat(input: DescribeIdentityIdFormatInput) async throws -> DescribeIdentityIdFormatOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIdentityIdFormat") @@ -10565,7 +10302,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIdentityIdFormatOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIdentityIdFormatOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIdentityIdFormatOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10581,7 +10318,6 @@ extension EC2Client { public func describeImageAttribute(input: DescribeImageAttributeInput) async throws -> DescribeImageAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeImageAttribute") @@ -10605,7 +10341,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeImageAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeImageAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeImageAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10621,7 +10357,6 @@ extension EC2Client { public func describeImages(input: DescribeImagesInput) async throws -> DescribeImagesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeImages") @@ -10645,7 +10380,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeImagesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeImagesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeImagesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10661,7 +10396,6 @@ extension EC2Client { public func describeImportImageTasks(input: DescribeImportImageTasksInput) async throws -> DescribeImportImageTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeImportImageTasks") @@ -10685,7 +10419,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeImportImageTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeImportImageTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeImportImageTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10701,7 +10435,6 @@ extension EC2Client { public func describeImportSnapshotTasks(input: DescribeImportSnapshotTasksInput) async throws -> DescribeImportSnapshotTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeImportSnapshotTasks") @@ -10725,7 +10458,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeImportSnapshotTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeImportSnapshotTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeImportSnapshotTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10741,7 +10474,6 @@ extension EC2Client { public func describeInstanceAttribute(input: DescribeInstanceAttributeInput) async throws -> DescribeInstanceAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceAttribute") @@ -10765,7 +10497,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10781,7 +10513,6 @@ extension EC2Client { public func describeInstanceConnectEndpoints(input: DescribeInstanceConnectEndpointsInput) async throws -> DescribeInstanceConnectEndpointsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceConnectEndpoints") @@ -10805,7 +10536,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceConnectEndpointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceConnectEndpointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceConnectEndpointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10821,7 +10552,6 @@ extension EC2Client { public func describeInstanceCreditSpecifications(input: DescribeInstanceCreditSpecificationsInput) async throws -> DescribeInstanceCreditSpecificationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceCreditSpecifications") @@ -10845,7 +10575,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceCreditSpecificationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceCreditSpecificationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceCreditSpecificationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10861,7 +10591,6 @@ extension EC2Client { public func describeInstanceEventNotificationAttributes(input: DescribeInstanceEventNotificationAttributesInput) async throws -> DescribeInstanceEventNotificationAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceEventNotificationAttributes") @@ -10885,7 +10614,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceEventNotificationAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceEventNotificationAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceEventNotificationAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10901,7 +10630,6 @@ extension EC2Client { public func describeInstanceEventWindows(input: DescribeInstanceEventWindowsInput) async throws -> DescribeInstanceEventWindowsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceEventWindows") @@ -10925,7 +10653,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceEventWindowsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceEventWindowsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceEventWindowsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -10947,7 +10675,6 @@ extension EC2Client { public func describeInstanceStatus(input: DescribeInstanceStatusInput) async throws -> DescribeInstanceStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceStatus") @@ -10971,7 +10698,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11010,7 +10737,6 @@ extension EC2Client { public func describeInstanceTopology(input: DescribeInstanceTopologyInput) async throws -> DescribeInstanceTopologyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceTopology") @@ -11034,7 +10760,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceTopologyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceTopologyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceTopologyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11050,7 +10776,6 @@ extension EC2Client { public func describeInstanceTypeOfferings(input: DescribeInstanceTypeOfferingsInput) async throws -> DescribeInstanceTypeOfferingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceTypeOfferings") @@ -11074,7 +10799,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceTypeOfferingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceTypeOfferingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceTypeOfferingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11090,7 +10815,6 @@ extension EC2Client { public func describeInstanceTypes(input: DescribeInstanceTypesInput) async throws -> DescribeInstanceTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceTypes") @@ -11114,7 +10838,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11130,7 +10854,6 @@ extension EC2Client { public func describeInstances(input: DescribeInstancesInput) async throws -> DescribeInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstances") @@ -11154,7 +10877,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11170,7 +10893,6 @@ extension EC2Client { public func describeInternetGateways(input: DescribeInternetGatewaysInput) async throws -> DescribeInternetGatewaysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInternetGateways") @@ -11194,7 +10916,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInternetGatewaysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInternetGatewaysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInternetGatewaysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11210,7 +10932,6 @@ extension EC2Client { public func describeIpamByoasn(input: DescribeIpamByoasnInput) async throws -> DescribeIpamByoasnOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIpamByoasn") @@ -11234,7 +10955,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIpamByoasnOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIpamByoasnOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIpamByoasnOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11250,7 +10971,6 @@ extension EC2Client { public func describeIpamPools(input: DescribeIpamPoolsInput) async throws -> DescribeIpamPoolsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIpamPools") @@ -11274,7 +10994,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIpamPoolsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIpamPoolsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIpamPoolsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11290,7 +11010,6 @@ extension EC2Client { public func describeIpamResourceDiscoveries(input: DescribeIpamResourceDiscoveriesInput) async throws -> DescribeIpamResourceDiscoveriesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIpamResourceDiscoveries") @@ -11314,7 +11033,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIpamResourceDiscoveriesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIpamResourceDiscoveriesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIpamResourceDiscoveriesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11330,7 +11049,6 @@ extension EC2Client { public func describeIpamResourceDiscoveryAssociations(input: DescribeIpamResourceDiscoveryAssociationsInput) async throws -> DescribeIpamResourceDiscoveryAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIpamResourceDiscoveryAssociations") @@ -11354,7 +11072,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIpamResourceDiscoveryAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIpamResourceDiscoveryAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIpamResourceDiscoveryAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11370,7 +11088,6 @@ extension EC2Client { public func describeIpamScopes(input: DescribeIpamScopesInput) async throws -> DescribeIpamScopesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIpamScopes") @@ -11394,7 +11111,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIpamScopesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIpamScopesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIpamScopesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11410,7 +11127,6 @@ extension EC2Client { public func describeIpams(input: DescribeIpamsInput) async throws -> DescribeIpamsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIpams") @@ -11434,7 +11150,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIpamsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIpamsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIpamsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11450,7 +11166,6 @@ extension EC2Client { public func describeIpv6Pools(input: DescribeIpv6PoolsInput) async throws -> DescribeIpv6PoolsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIpv6Pools") @@ -11474,7 +11189,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIpv6PoolsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIpv6PoolsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIpv6PoolsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11490,7 +11205,6 @@ extension EC2Client { public func describeKeyPairs(input: DescribeKeyPairsInput) async throws -> DescribeKeyPairsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeKeyPairs") @@ -11514,7 +11228,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeKeyPairsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeKeyPairsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeKeyPairsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11530,7 +11244,6 @@ extension EC2Client { public func describeLaunchTemplateVersions(input: DescribeLaunchTemplateVersionsInput) async throws -> DescribeLaunchTemplateVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLaunchTemplateVersions") @@ -11554,7 +11267,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLaunchTemplateVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLaunchTemplateVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLaunchTemplateVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11570,7 +11283,6 @@ extension EC2Client { public func describeLaunchTemplates(input: DescribeLaunchTemplatesInput) async throws -> DescribeLaunchTemplatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLaunchTemplates") @@ -11594,7 +11306,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLaunchTemplatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLaunchTemplatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLaunchTemplatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11610,7 +11322,6 @@ extension EC2Client { public func describeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(input: DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput) async throws -> DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLocalGatewayRouteTableVirtualInterfaceGroupAssociations") @@ -11634,7 +11345,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11650,7 +11361,6 @@ extension EC2Client { public func describeLocalGatewayRouteTableVpcAssociations(input: DescribeLocalGatewayRouteTableVpcAssociationsInput) async throws -> DescribeLocalGatewayRouteTableVpcAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLocalGatewayRouteTableVpcAssociations") @@ -11674,7 +11384,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLocalGatewayRouteTableVpcAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLocalGatewayRouteTableVpcAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLocalGatewayRouteTableVpcAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11690,7 +11400,6 @@ extension EC2Client { public func describeLocalGatewayRouteTables(input: DescribeLocalGatewayRouteTablesInput) async throws -> DescribeLocalGatewayRouteTablesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLocalGatewayRouteTables") @@ -11714,7 +11423,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLocalGatewayRouteTablesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLocalGatewayRouteTablesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLocalGatewayRouteTablesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11730,7 +11439,6 @@ extension EC2Client { public func describeLocalGatewayVirtualInterfaceGroups(input: DescribeLocalGatewayVirtualInterfaceGroupsInput) async throws -> DescribeLocalGatewayVirtualInterfaceGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLocalGatewayVirtualInterfaceGroups") @@ -11754,7 +11462,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLocalGatewayVirtualInterfaceGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLocalGatewayVirtualInterfaceGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLocalGatewayVirtualInterfaceGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11770,7 +11478,6 @@ extension EC2Client { public func describeLocalGatewayVirtualInterfaces(input: DescribeLocalGatewayVirtualInterfacesInput) async throws -> DescribeLocalGatewayVirtualInterfacesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLocalGatewayVirtualInterfaces") @@ -11794,7 +11501,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLocalGatewayVirtualInterfacesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLocalGatewayVirtualInterfacesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLocalGatewayVirtualInterfacesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11810,7 +11517,6 @@ extension EC2Client { public func describeLocalGateways(input: DescribeLocalGatewaysInput) async throws -> DescribeLocalGatewaysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLocalGateways") @@ -11834,7 +11540,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLocalGatewaysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLocalGatewaysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLocalGatewaysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11850,7 +11556,6 @@ extension EC2Client { public func describeLockedSnapshots(input: DescribeLockedSnapshotsInput) async throws -> DescribeLockedSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLockedSnapshots") @@ -11874,7 +11579,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLockedSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLockedSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLockedSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11890,7 +11595,6 @@ extension EC2Client { public func describeManagedPrefixLists(input: DescribeManagedPrefixListsInput) async throws -> DescribeManagedPrefixListsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeManagedPrefixLists") @@ -11914,7 +11618,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeManagedPrefixListsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeManagedPrefixListsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeManagedPrefixListsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11930,7 +11634,6 @@ extension EC2Client { public func describeMovingAddresses(input: DescribeMovingAddressesInput) async throws -> DescribeMovingAddressesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeMovingAddresses") @@ -11954,7 +11657,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeMovingAddressesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeMovingAddressesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeMovingAddressesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -11970,7 +11673,6 @@ extension EC2Client { public func describeNatGateways(input: DescribeNatGatewaysInput) async throws -> DescribeNatGatewaysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNatGateways") @@ -11994,7 +11696,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNatGatewaysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNatGatewaysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNatGatewaysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12010,7 +11712,6 @@ extension EC2Client { public func describeNetworkAcls(input: DescribeNetworkAclsInput) async throws -> DescribeNetworkAclsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNetworkAcls") @@ -12034,7 +11735,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNetworkAclsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNetworkAclsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNetworkAclsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12050,7 +11751,6 @@ extension EC2Client { public func describeNetworkInsightsAccessScopeAnalyses(input: DescribeNetworkInsightsAccessScopeAnalysesInput) async throws -> DescribeNetworkInsightsAccessScopeAnalysesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNetworkInsightsAccessScopeAnalyses") @@ -12074,7 +11774,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNetworkInsightsAccessScopeAnalysesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNetworkInsightsAccessScopeAnalysesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNetworkInsightsAccessScopeAnalysesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12090,7 +11790,6 @@ extension EC2Client { public func describeNetworkInsightsAccessScopes(input: DescribeNetworkInsightsAccessScopesInput) async throws -> DescribeNetworkInsightsAccessScopesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNetworkInsightsAccessScopes") @@ -12114,7 +11813,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNetworkInsightsAccessScopesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNetworkInsightsAccessScopesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNetworkInsightsAccessScopesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12130,7 +11829,6 @@ extension EC2Client { public func describeNetworkInsightsAnalyses(input: DescribeNetworkInsightsAnalysesInput) async throws -> DescribeNetworkInsightsAnalysesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNetworkInsightsAnalyses") @@ -12154,7 +11852,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNetworkInsightsAnalysesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNetworkInsightsAnalysesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNetworkInsightsAnalysesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12170,7 +11868,6 @@ extension EC2Client { public func describeNetworkInsightsPaths(input: DescribeNetworkInsightsPathsInput) async throws -> DescribeNetworkInsightsPathsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNetworkInsightsPaths") @@ -12194,7 +11891,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNetworkInsightsPathsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNetworkInsightsPathsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNetworkInsightsPathsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12210,7 +11907,6 @@ extension EC2Client { public func describeNetworkInterfaceAttribute(input: DescribeNetworkInterfaceAttributeInput) async throws -> DescribeNetworkInterfaceAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNetworkInterfaceAttribute") @@ -12234,7 +11930,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNetworkInterfaceAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNetworkInterfaceAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNetworkInterfaceAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12250,7 +11946,6 @@ extension EC2Client { public func describeNetworkInterfacePermissions(input: DescribeNetworkInterfacePermissionsInput) async throws -> DescribeNetworkInterfacePermissionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNetworkInterfacePermissions") @@ -12274,7 +11969,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNetworkInterfacePermissionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNetworkInterfacePermissionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNetworkInterfacePermissionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12290,7 +11985,6 @@ extension EC2Client { public func describeNetworkInterfaces(input: DescribeNetworkInterfacesInput) async throws -> DescribeNetworkInterfacesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNetworkInterfaces") @@ -12314,7 +12008,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNetworkInterfacesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNetworkInterfacesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNetworkInterfacesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12330,7 +12024,6 @@ extension EC2Client { public func describePlacementGroups(input: DescribePlacementGroupsInput) async throws -> DescribePlacementGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePlacementGroups") @@ -12354,7 +12047,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePlacementGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePlacementGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePlacementGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12370,7 +12063,6 @@ extension EC2Client { public func describePrefixLists(input: DescribePrefixListsInput) async throws -> DescribePrefixListsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePrefixLists") @@ -12394,7 +12086,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePrefixListsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePrefixListsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePrefixListsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12410,7 +12102,6 @@ extension EC2Client { public func describePrincipalIdFormat(input: DescribePrincipalIdFormatInput) async throws -> DescribePrincipalIdFormatOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePrincipalIdFormat") @@ -12434,7 +12125,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePrincipalIdFormatOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePrincipalIdFormatOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePrincipalIdFormatOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12450,7 +12141,6 @@ extension EC2Client { public func describePublicIpv4Pools(input: DescribePublicIpv4PoolsInput) async throws -> DescribePublicIpv4PoolsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePublicIpv4Pools") @@ -12474,7 +12164,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePublicIpv4PoolsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePublicIpv4PoolsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePublicIpv4PoolsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12490,7 +12180,6 @@ extension EC2Client { public func describeRegions(input: DescribeRegionsInput) async throws -> DescribeRegionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeRegions") @@ -12514,7 +12203,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeRegionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeRegionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeRegionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12530,7 +12219,6 @@ extension EC2Client { public func describeReplaceRootVolumeTasks(input: DescribeReplaceRootVolumeTasksInput) async throws -> DescribeReplaceRootVolumeTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReplaceRootVolumeTasks") @@ -12554,7 +12242,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReplaceRootVolumeTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReplaceRootVolumeTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReplaceRootVolumeTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12570,7 +12258,6 @@ extension EC2Client { public func describeReservedInstances(input: DescribeReservedInstancesInput) async throws -> DescribeReservedInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedInstances") @@ -12594,7 +12281,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12610,7 +12297,6 @@ extension EC2Client { public func describeReservedInstancesListings(input: DescribeReservedInstancesListingsInput) async throws -> DescribeReservedInstancesListingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedInstancesListings") @@ -12634,7 +12320,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedInstancesListingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedInstancesListingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedInstancesListingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12650,7 +12336,6 @@ extension EC2Client { public func describeReservedInstancesModifications(input: DescribeReservedInstancesModificationsInput) async throws -> DescribeReservedInstancesModificationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedInstancesModifications") @@ -12674,7 +12359,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedInstancesModificationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedInstancesModificationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedInstancesModificationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12690,7 +12375,6 @@ extension EC2Client { public func describeReservedInstancesOfferings(input: DescribeReservedInstancesOfferingsInput) async throws -> DescribeReservedInstancesOfferingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedInstancesOfferings") @@ -12714,7 +12398,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedInstancesOfferingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedInstancesOfferingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedInstancesOfferingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12730,7 +12414,6 @@ extension EC2Client { public func describeRouteTables(input: DescribeRouteTablesInput) async throws -> DescribeRouteTablesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeRouteTables") @@ -12754,7 +12437,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeRouteTablesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeRouteTablesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeRouteTablesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12770,7 +12453,6 @@ extension EC2Client { public func describeScheduledInstanceAvailability(input: DescribeScheduledInstanceAvailabilityInput) async throws -> DescribeScheduledInstanceAvailabilityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeScheduledInstanceAvailability") @@ -12794,7 +12476,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeScheduledInstanceAvailabilityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeScheduledInstanceAvailabilityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeScheduledInstanceAvailabilityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12810,7 +12492,6 @@ extension EC2Client { public func describeScheduledInstances(input: DescribeScheduledInstancesInput) async throws -> DescribeScheduledInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeScheduledInstances") @@ -12834,7 +12515,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeScheduledInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeScheduledInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeScheduledInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12850,7 +12531,6 @@ extension EC2Client { public func describeSecurityGroupReferences(input: DescribeSecurityGroupReferencesInput) async throws -> DescribeSecurityGroupReferencesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSecurityGroupReferences") @@ -12874,7 +12554,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSecurityGroupReferencesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSecurityGroupReferencesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSecurityGroupReferencesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12890,7 +12570,6 @@ extension EC2Client { public func describeSecurityGroupRules(input: DescribeSecurityGroupRulesInput) async throws -> DescribeSecurityGroupRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSecurityGroupRules") @@ -12914,7 +12593,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSecurityGroupRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSecurityGroupRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSecurityGroupRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12930,7 +12609,6 @@ extension EC2Client { public func describeSecurityGroups(input: DescribeSecurityGroupsInput) async throws -> DescribeSecurityGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSecurityGroups") @@ -12954,7 +12632,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSecurityGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSecurityGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSecurityGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -12970,7 +12648,6 @@ extension EC2Client { public func describeSnapshotAttribute(input: DescribeSnapshotAttributeInput) async throws -> DescribeSnapshotAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSnapshotAttribute") @@ -12994,7 +12671,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSnapshotAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSnapshotAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSnapshotAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13010,7 +12687,6 @@ extension EC2Client { public func describeSnapshotTierStatus(input: DescribeSnapshotTierStatusInput) async throws -> DescribeSnapshotTierStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSnapshotTierStatus") @@ -13034,7 +12710,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSnapshotTierStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSnapshotTierStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSnapshotTierStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13059,7 +12735,6 @@ extension EC2Client { public func describeSnapshots(input: DescribeSnapshotsInput) async throws -> DescribeSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSnapshots") @@ -13083,7 +12758,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13099,7 +12774,6 @@ extension EC2Client { public func describeSpotDatafeedSubscription(input: DescribeSpotDatafeedSubscriptionInput) async throws -> DescribeSpotDatafeedSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSpotDatafeedSubscription") @@ -13123,7 +12797,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSpotDatafeedSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSpotDatafeedSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSpotDatafeedSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13139,7 +12813,6 @@ extension EC2Client { public func describeSpotFleetInstances(input: DescribeSpotFleetInstancesInput) async throws -> DescribeSpotFleetInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSpotFleetInstances") @@ -13163,7 +12836,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSpotFleetInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSpotFleetInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSpotFleetInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13179,7 +12852,6 @@ extension EC2Client { public func describeSpotFleetRequestHistory(input: DescribeSpotFleetRequestHistoryInput) async throws -> DescribeSpotFleetRequestHistoryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSpotFleetRequestHistory") @@ -13203,7 +12875,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSpotFleetRequestHistoryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSpotFleetRequestHistoryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSpotFleetRequestHistoryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13219,7 +12891,6 @@ extension EC2Client { public func describeSpotFleetRequests(input: DescribeSpotFleetRequestsInput) async throws -> DescribeSpotFleetRequestsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSpotFleetRequests") @@ -13243,7 +12914,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSpotFleetRequestsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSpotFleetRequestsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSpotFleetRequestsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13259,7 +12930,6 @@ extension EC2Client { public func describeSpotInstanceRequests(input: DescribeSpotInstanceRequestsInput) async throws -> DescribeSpotInstanceRequestsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSpotInstanceRequests") @@ -13283,7 +12953,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSpotInstanceRequestsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSpotInstanceRequestsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSpotInstanceRequestsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13299,7 +12969,6 @@ extension EC2Client { public func describeSpotPriceHistory(input: DescribeSpotPriceHistoryInput) async throws -> DescribeSpotPriceHistoryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSpotPriceHistory") @@ -13323,7 +12992,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSpotPriceHistoryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSpotPriceHistoryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSpotPriceHistoryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13339,7 +13008,6 @@ extension EC2Client { public func describeStaleSecurityGroups(input: DescribeStaleSecurityGroupsInput) async throws -> DescribeStaleSecurityGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStaleSecurityGroups") @@ -13363,7 +13031,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStaleSecurityGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStaleSecurityGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStaleSecurityGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13379,7 +13047,6 @@ extension EC2Client { public func describeStoreImageTasks(input: DescribeStoreImageTasksInput) async throws -> DescribeStoreImageTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStoreImageTasks") @@ -13403,7 +13070,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStoreImageTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStoreImageTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStoreImageTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13419,7 +13086,6 @@ extension EC2Client { public func describeSubnets(input: DescribeSubnetsInput) async throws -> DescribeSubnetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSubnets") @@ -13443,7 +13109,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSubnetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSubnetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSubnetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13459,7 +13125,6 @@ extension EC2Client { public func describeTags(input: DescribeTagsInput) async throws -> DescribeTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTags") @@ -13483,7 +13148,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13499,7 +13164,6 @@ extension EC2Client { public func describeTrafficMirrorFilters(input: DescribeTrafficMirrorFiltersInput) async throws -> DescribeTrafficMirrorFiltersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTrafficMirrorFilters") @@ -13523,7 +13187,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTrafficMirrorFiltersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTrafficMirrorFiltersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTrafficMirrorFiltersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13539,7 +13203,6 @@ extension EC2Client { public func describeTrafficMirrorSessions(input: DescribeTrafficMirrorSessionsInput) async throws -> DescribeTrafficMirrorSessionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTrafficMirrorSessions") @@ -13563,7 +13226,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTrafficMirrorSessionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTrafficMirrorSessionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTrafficMirrorSessionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13579,7 +13242,6 @@ extension EC2Client { public func describeTrafficMirrorTargets(input: DescribeTrafficMirrorTargetsInput) async throws -> DescribeTrafficMirrorTargetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTrafficMirrorTargets") @@ -13603,7 +13265,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTrafficMirrorTargetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTrafficMirrorTargetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTrafficMirrorTargetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13619,7 +13281,6 @@ extension EC2Client { public func describeTransitGatewayAttachments(input: DescribeTransitGatewayAttachmentsInput) async throws -> DescribeTransitGatewayAttachmentsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayAttachments") @@ -13643,7 +13304,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayAttachmentsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayAttachmentsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayAttachmentsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13659,7 +13320,6 @@ extension EC2Client { public func describeTransitGatewayConnectPeers(input: DescribeTransitGatewayConnectPeersInput) async throws -> DescribeTransitGatewayConnectPeersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayConnectPeers") @@ -13683,7 +13343,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayConnectPeersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayConnectPeersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayConnectPeersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13699,7 +13359,6 @@ extension EC2Client { public func describeTransitGatewayConnects(input: DescribeTransitGatewayConnectsInput) async throws -> DescribeTransitGatewayConnectsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayConnects") @@ -13723,7 +13382,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayConnectsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayConnectsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayConnectsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13739,7 +13398,6 @@ extension EC2Client { public func describeTransitGatewayMulticastDomains(input: DescribeTransitGatewayMulticastDomainsInput) async throws -> DescribeTransitGatewayMulticastDomainsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayMulticastDomains") @@ -13763,7 +13421,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayMulticastDomainsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayMulticastDomainsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayMulticastDomainsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13779,7 +13437,6 @@ extension EC2Client { public func describeTransitGatewayPeeringAttachments(input: DescribeTransitGatewayPeeringAttachmentsInput) async throws -> DescribeTransitGatewayPeeringAttachmentsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayPeeringAttachments") @@ -13803,7 +13460,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayPeeringAttachmentsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayPeeringAttachmentsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayPeeringAttachmentsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13819,7 +13476,6 @@ extension EC2Client { public func describeTransitGatewayPolicyTables(input: DescribeTransitGatewayPolicyTablesInput) async throws -> DescribeTransitGatewayPolicyTablesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayPolicyTables") @@ -13843,7 +13499,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayPolicyTablesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayPolicyTablesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayPolicyTablesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13859,7 +13515,6 @@ extension EC2Client { public func describeTransitGatewayRouteTableAnnouncements(input: DescribeTransitGatewayRouteTableAnnouncementsInput) async throws -> DescribeTransitGatewayRouteTableAnnouncementsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayRouteTableAnnouncements") @@ -13883,7 +13538,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayRouteTableAnnouncementsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayRouteTableAnnouncementsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayRouteTableAnnouncementsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13899,7 +13554,6 @@ extension EC2Client { public func describeTransitGatewayRouteTables(input: DescribeTransitGatewayRouteTablesInput) async throws -> DescribeTransitGatewayRouteTablesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayRouteTables") @@ -13923,7 +13577,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayRouteTablesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayRouteTablesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayRouteTablesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13939,7 +13593,6 @@ extension EC2Client { public func describeTransitGatewayVpcAttachments(input: DescribeTransitGatewayVpcAttachmentsInput) async throws -> DescribeTransitGatewayVpcAttachmentsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGatewayVpcAttachments") @@ -13963,7 +13616,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewayVpcAttachmentsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewayVpcAttachmentsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewayVpcAttachmentsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -13979,7 +13632,6 @@ extension EC2Client { public func describeTransitGateways(input: DescribeTransitGatewaysInput) async throws -> DescribeTransitGatewaysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTransitGateways") @@ -14003,7 +13655,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTransitGatewaysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTransitGatewaysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTransitGatewaysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14019,7 +13671,6 @@ extension EC2Client { public func describeTrunkInterfaceAssociations(input: DescribeTrunkInterfaceAssociationsInput) async throws -> DescribeTrunkInterfaceAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTrunkInterfaceAssociations") @@ -14043,7 +13694,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTrunkInterfaceAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTrunkInterfaceAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTrunkInterfaceAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14059,7 +13710,6 @@ extension EC2Client { public func describeVerifiedAccessEndpoints(input: DescribeVerifiedAccessEndpointsInput) async throws -> DescribeVerifiedAccessEndpointsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVerifiedAccessEndpoints") @@ -14083,7 +13733,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVerifiedAccessEndpointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVerifiedAccessEndpointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVerifiedAccessEndpointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14099,7 +13749,6 @@ extension EC2Client { public func describeVerifiedAccessGroups(input: DescribeVerifiedAccessGroupsInput) async throws -> DescribeVerifiedAccessGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVerifiedAccessGroups") @@ -14123,7 +13772,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVerifiedAccessGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVerifiedAccessGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVerifiedAccessGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14139,7 +13788,6 @@ extension EC2Client { public func describeVerifiedAccessInstanceLoggingConfigurations(input: DescribeVerifiedAccessInstanceLoggingConfigurationsInput) async throws -> DescribeVerifiedAccessInstanceLoggingConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVerifiedAccessInstanceLoggingConfigurations") @@ -14163,7 +13811,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVerifiedAccessInstanceLoggingConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVerifiedAccessInstanceLoggingConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVerifiedAccessInstanceLoggingConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14179,7 +13827,6 @@ extension EC2Client { public func describeVerifiedAccessInstances(input: DescribeVerifiedAccessInstancesInput) async throws -> DescribeVerifiedAccessInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVerifiedAccessInstances") @@ -14203,7 +13850,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVerifiedAccessInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVerifiedAccessInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVerifiedAccessInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14219,7 +13866,6 @@ extension EC2Client { public func describeVerifiedAccessTrustProviders(input: DescribeVerifiedAccessTrustProvidersInput) async throws -> DescribeVerifiedAccessTrustProvidersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVerifiedAccessTrustProviders") @@ -14243,7 +13889,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVerifiedAccessTrustProvidersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVerifiedAccessTrustProvidersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVerifiedAccessTrustProvidersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14259,7 +13905,6 @@ extension EC2Client { public func describeVolumeAttribute(input: DescribeVolumeAttributeInput) async throws -> DescribeVolumeAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVolumeAttribute") @@ -14283,7 +13928,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVolumeAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVolumeAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVolumeAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14299,7 +13944,6 @@ extension EC2Client { public func describeVolumeStatus(input: DescribeVolumeStatusInput) async throws -> DescribeVolumeStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVolumeStatus") @@ -14323,7 +13967,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVolumeStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVolumeStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVolumeStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14339,7 +13983,6 @@ extension EC2Client { public func describeVolumes(input: DescribeVolumesInput) async throws -> DescribeVolumesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVolumes") @@ -14363,7 +14006,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVolumesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVolumesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVolumesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14379,7 +14022,6 @@ extension EC2Client { public func describeVolumesModifications(input: DescribeVolumesModificationsInput) async throws -> DescribeVolumesModificationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVolumesModifications") @@ -14403,7 +14045,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVolumesModificationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVolumesModificationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVolumesModificationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14419,7 +14061,6 @@ extension EC2Client { public func describeVpcAttribute(input: DescribeVpcAttributeInput) async throws -> DescribeVpcAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcAttribute") @@ -14443,7 +14084,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14459,7 +14100,6 @@ extension EC2Client { public func describeVpcClassicLink(input: DescribeVpcClassicLinkInput) async throws -> DescribeVpcClassicLinkOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcClassicLink") @@ -14483,7 +14123,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcClassicLinkOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcClassicLinkOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcClassicLinkOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14499,7 +14139,6 @@ extension EC2Client { public func describeVpcClassicLinkDnsSupport(input: DescribeVpcClassicLinkDnsSupportInput) async throws -> DescribeVpcClassicLinkDnsSupportOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcClassicLinkDnsSupport") @@ -14523,7 +14162,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcClassicLinkDnsSupportOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcClassicLinkDnsSupportOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcClassicLinkDnsSupportOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14539,7 +14178,6 @@ extension EC2Client { public func describeVpcEndpointConnectionNotifications(input: DescribeVpcEndpointConnectionNotificationsInput) async throws -> DescribeVpcEndpointConnectionNotificationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcEndpointConnectionNotifications") @@ -14563,7 +14201,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcEndpointConnectionNotificationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcEndpointConnectionNotificationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcEndpointConnectionNotificationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14579,7 +14217,6 @@ extension EC2Client { public func describeVpcEndpointConnections(input: DescribeVpcEndpointConnectionsInput) async throws -> DescribeVpcEndpointConnectionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcEndpointConnections") @@ -14603,7 +14240,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcEndpointConnectionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcEndpointConnectionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcEndpointConnectionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14619,7 +14256,6 @@ extension EC2Client { public func describeVpcEndpointServiceConfigurations(input: DescribeVpcEndpointServiceConfigurationsInput) async throws -> DescribeVpcEndpointServiceConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcEndpointServiceConfigurations") @@ -14643,7 +14279,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcEndpointServiceConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcEndpointServiceConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcEndpointServiceConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14659,7 +14295,6 @@ extension EC2Client { public func describeVpcEndpointServicePermissions(input: DescribeVpcEndpointServicePermissionsInput) async throws -> DescribeVpcEndpointServicePermissionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcEndpointServicePermissions") @@ -14683,7 +14318,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcEndpointServicePermissionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcEndpointServicePermissionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcEndpointServicePermissionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14699,7 +14334,6 @@ extension EC2Client { public func describeVpcEndpointServices(input: DescribeVpcEndpointServicesInput) async throws -> DescribeVpcEndpointServicesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcEndpointServices") @@ -14723,7 +14357,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcEndpointServicesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcEndpointServicesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcEndpointServicesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14739,7 +14373,6 @@ extension EC2Client { public func describeVpcEndpoints(input: DescribeVpcEndpointsInput) async throws -> DescribeVpcEndpointsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcEndpoints") @@ -14763,7 +14396,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcEndpointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcEndpointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcEndpointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14779,7 +14412,6 @@ extension EC2Client { public func describeVpcPeeringConnections(input: DescribeVpcPeeringConnectionsInput) async throws -> DescribeVpcPeeringConnectionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcPeeringConnections") @@ -14803,7 +14435,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcPeeringConnectionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcPeeringConnectionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcPeeringConnectionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14819,7 +14451,6 @@ extension EC2Client { public func describeVpcs(input: DescribeVpcsInput) async throws -> DescribeVpcsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpcs") @@ -14843,7 +14474,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpcsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpcsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpcsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14859,7 +14490,6 @@ extension EC2Client { public func describeVpnConnections(input: DescribeVpnConnectionsInput) async throws -> DescribeVpnConnectionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpnConnections") @@ -14883,7 +14513,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpnConnectionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpnConnectionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpnConnectionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14899,7 +14529,6 @@ extension EC2Client { public func describeVpnGateways(input: DescribeVpnGatewaysInput) async throws -> DescribeVpnGatewaysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeVpnGateways") @@ -14923,7 +14552,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeVpnGatewaysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeVpnGatewaysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeVpnGatewaysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14939,7 +14568,6 @@ extension EC2Client { public func detachClassicLinkVpc(input: DetachClassicLinkVpcInput) async throws -> DetachClassicLinkVpcOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachClassicLinkVpc") @@ -14963,7 +14591,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachClassicLinkVpcOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachClassicLinkVpcOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachClassicLinkVpcOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -14979,7 +14607,6 @@ extension EC2Client { public func detachInternetGateway(input: DetachInternetGatewayInput) async throws -> DetachInternetGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachInternetGateway") @@ -15003,7 +14630,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachInternetGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachInternetGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachInternetGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15019,7 +14646,6 @@ extension EC2Client { public func detachNetworkInterface(input: DetachNetworkInterfaceInput) async throws -> DetachNetworkInterfaceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachNetworkInterface") @@ -15043,7 +14669,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachNetworkInterfaceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachNetworkInterfaceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachNetworkInterfaceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15059,7 +14685,6 @@ extension EC2Client { public func detachVerifiedAccessTrustProvider(input: DetachVerifiedAccessTrustProviderInput) async throws -> DetachVerifiedAccessTrustProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachVerifiedAccessTrustProvider") @@ -15084,7 +14709,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachVerifiedAccessTrustProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachVerifiedAccessTrustProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachVerifiedAccessTrustProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15100,7 +14725,6 @@ extension EC2Client { public func detachVolume(input: DetachVolumeInput) async throws -> DetachVolumeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachVolume") @@ -15124,7 +14748,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachVolumeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachVolumeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachVolumeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15140,7 +14764,6 @@ extension EC2Client { public func detachVpnGateway(input: DetachVpnGatewayInput) async throws -> DetachVpnGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachVpnGateway") @@ -15164,7 +14787,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachVpnGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachVpnGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachVpnGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15180,7 +14803,6 @@ extension EC2Client { public func disableAddressTransfer(input: DisableAddressTransferInput) async throws -> DisableAddressTransferOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableAddressTransfer") @@ -15204,7 +14826,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableAddressTransferOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableAddressTransferOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableAddressTransferOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15220,7 +14842,6 @@ extension EC2Client { public func disableAwsNetworkPerformanceMetricSubscription(input: DisableAwsNetworkPerformanceMetricSubscriptionInput) async throws -> DisableAwsNetworkPerformanceMetricSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableAwsNetworkPerformanceMetricSubscription") @@ -15244,7 +14865,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableAwsNetworkPerformanceMetricSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableAwsNetworkPerformanceMetricSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableAwsNetworkPerformanceMetricSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15260,7 +14881,6 @@ extension EC2Client { public func disableEbsEncryptionByDefault(input: DisableEbsEncryptionByDefaultInput) async throws -> DisableEbsEncryptionByDefaultOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableEbsEncryptionByDefault") @@ -15284,7 +14904,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableEbsEncryptionByDefaultOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableEbsEncryptionByDefaultOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableEbsEncryptionByDefaultOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15300,7 +14920,6 @@ extension EC2Client { public func disableFastLaunch(input: DisableFastLaunchInput) async throws -> DisableFastLaunchOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableFastLaunch") @@ -15324,7 +14943,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableFastLaunchOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableFastLaunchOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableFastLaunchOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15340,7 +14959,6 @@ extension EC2Client { public func disableFastSnapshotRestores(input: DisableFastSnapshotRestoresInput) async throws -> DisableFastSnapshotRestoresOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableFastSnapshotRestores") @@ -15364,7 +14982,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableFastSnapshotRestoresOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableFastSnapshotRestoresOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableFastSnapshotRestoresOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15380,7 +14998,6 @@ extension EC2Client { public func disableImage(input: DisableImageInput) async throws -> DisableImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableImage") @@ -15404,7 +15021,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15420,7 +15037,6 @@ extension EC2Client { public func disableImageBlockPublicAccess(input: DisableImageBlockPublicAccessInput) async throws -> DisableImageBlockPublicAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableImageBlockPublicAccess") @@ -15444,7 +15060,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableImageBlockPublicAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableImageBlockPublicAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableImageBlockPublicAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15460,7 +15076,6 @@ extension EC2Client { public func disableImageDeprecation(input: DisableImageDeprecationInput) async throws -> DisableImageDeprecationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableImageDeprecation") @@ -15484,7 +15099,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableImageDeprecationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableImageDeprecationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableImageDeprecationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15500,7 +15115,6 @@ extension EC2Client { public func disableIpamOrganizationAdminAccount(input: DisableIpamOrganizationAdminAccountInput) async throws -> DisableIpamOrganizationAdminAccountOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableIpamOrganizationAdminAccount") @@ -15524,7 +15138,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableIpamOrganizationAdminAccountOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableIpamOrganizationAdminAccountOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableIpamOrganizationAdminAccountOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15540,7 +15154,6 @@ extension EC2Client { public func disableSerialConsoleAccess(input: DisableSerialConsoleAccessInput) async throws -> DisableSerialConsoleAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableSerialConsoleAccess") @@ -15564,7 +15177,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableSerialConsoleAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableSerialConsoleAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableSerialConsoleAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15580,7 +15193,6 @@ extension EC2Client { public func disableSnapshotBlockPublicAccess(input: DisableSnapshotBlockPublicAccessInput) async throws -> DisableSnapshotBlockPublicAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableSnapshotBlockPublicAccess") @@ -15604,7 +15216,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableSnapshotBlockPublicAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableSnapshotBlockPublicAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableSnapshotBlockPublicAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15620,7 +15232,6 @@ extension EC2Client { public func disableTransitGatewayRouteTablePropagation(input: DisableTransitGatewayRouteTablePropagationInput) async throws -> DisableTransitGatewayRouteTablePropagationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableTransitGatewayRouteTablePropagation") @@ -15644,7 +15255,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableTransitGatewayRouteTablePropagationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableTransitGatewayRouteTablePropagationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableTransitGatewayRouteTablePropagationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15660,7 +15271,6 @@ extension EC2Client { public func disableVgwRoutePropagation(input: DisableVgwRoutePropagationInput) async throws -> DisableVgwRoutePropagationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableVgwRoutePropagation") @@ -15684,7 +15294,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableVgwRoutePropagationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableVgwRoutePropagationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableVgwRoutePropagationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15700,7 +15310,6 @@ extension EC2Client { public func disableVpcClassicLink(input: DisableVpcClassicLinkInput) async throws -> DisableVpcClassicLinkOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableVpcClassicLink") @@ -15724,7 +15333,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableVpcClassicLinkOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableVpcClassicLinkOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableVpcClassicLinkOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15740,7 +15349,6 @@ extension EC2Client { public func disableVpcClassicLinkDnsSupport(input: DisableVpcClassicLinkDnsSupportInput) async throws -> DisableVpcClassicLinkDnsSupportOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableVpcClassicLinkDnsSupport") @@ -15764,7 +15372,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableVpcClassicLinkDnsSupportOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableVpcClassicLinkDnsSupportOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableVpcClassicLinkDnsSupportOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15780,7 +15388,6 @@ extension EC2Client { public func disassociateAddress(input: DisassociateAddressInput) async throws -> DisassociateAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateAddress") @@ -15804,7 +15411,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15828,7 +15435,6 @@ extension EC2Client { public func disassociateClientVpnTargetNetwork(input: DisassociateClientVpnTargetNetworkInput) async throws -> DisassociateClientVpnTargetNetworkOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateClientVpnTargetNetwork") @@ -15852,7 +15458,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateClientVpnTargetNetworkOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateClientVpnTargetNetworkOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateClientVpnTargetNetworkOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15868,7 +15474,6 @@ extension EC2Client { public func disassociateEnclaveCertificateIamRole(input: DisassociateEnclaveCertificateIamRoleInput) async throws -> DisassociateEnclaveCertificateIamRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateEnclaveCertificateIamRole") @@ -15892,7 +15497,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateEnclaveCertificateIamRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateEnclaveCertificateIamRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateEnclaveCertificateIamRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15908,7 +15513,6 @@ extension EC2Client { public func disassociateIamInstanceProfile(input: DisassociateIamInstanceProfileInput) async throws -> DisassociateIamInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateIamInstanceProfile") @@ -15932,7 +15536,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateIamInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateIamInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateIamInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15948,7 +15552,6 @@ extension EC2Client { public func disassociateInstanceEventWindow(input: DisassociateInstanceEventWindowInput) async throws -> DisassociateInstanceEventWindowOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateInstanceEventWindow") @@ -15972,7 +15575,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateInstanceEventWindowOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateInstanceEventWindowOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateInstanceEventWindowOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -15988,7 +15591,6 @@ extension EC2Client { public func disassociateIpamByoasn(input: DisassociateIpamByoasnInput) async throws -> DisassociateIpamByoasnOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateIpamByoasn") @@ -16012,7 +15614,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateIpamByoasnOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateIpamByoasnOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateIpamByoasnOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16028,7 +15630,6 @@ extension EC2Client { public func disassociateIpamResourceDiscovery(input: DisassociateIpamResourceDiscoveryInput) async throws -> DisassociateIpamResourceDiscoveryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateIpamResourceDiscovery") @@ -16052,7 +15653,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateIpamResourceDiscoveryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateIpamResourceDiscoveryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateIpamResourceDiscoveryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16068,7 +15669,6 @@ extension EC2Client { public func disassociateNatGatewayAddress(input: DisassociateNatGatewayAddressInput) async throws -> DisassociateNatGatewayAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateNatGatewayAddress") @@ -16092,7 +15692,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateNatGatewayAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateNatGatewayAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateNatGatewayAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16108,7 +15708,6 @@ extension EC2Client { public func disassociateRouteTable(input: DisassociateRouteTableInput) async throws -> DisassociateRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateRouteTable") @@ -16132,7 +15731,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16148,7 +15747,6 @@ extension EC2Client { public func disassociateSubnetCidrBlock(input: DisassociateSubnetCidrBlockInput) async throws -> DisassociateSubnetCidrBlockOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateSubnetCidrBlock") @@ -16172,7 +15770,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateSubnetCidrBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateSubnetCidrBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateSubnetCidrBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16188,7 +15786,6 @@ extension EC2Client { public func disassociateTransitGatewayMulticastDomain(input: DisassociateTransitGatewayMulticastDomainInput) async throws -> DisassociateTransitGatewayMulticastDomainOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateTransitGatewayMulticastDomain") @@ -16212,7 +15809,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateTransitGatewayMulticastDomainOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateTransitGatewayMulticastDomainOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateTransitGatewayMulticastDomainOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16228,7 +15825,6 @@ extension EC2Client { public func disassociateTransitGatewayPolicyTable(input: DisassociateTransitGatewayPolicyTableInput) async throws -> DisassociateTransitGatewayPolicyTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateTransitGatewayPolicyTable") @@ -16252,7 +15848,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateTransitGatewayPolicyTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateTransitGatewayPolicyTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateTransitGatewayPolicyTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16268,7 +15864,6 @@ extension EC2Client { public func disassociateTransitGatewayRouteTable(input: DisassociateTransitGatewayRouteTableInput) async throws -> DisassociateTransitGatewayRouteTableOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateTransitGatewayRouteTable") @@ -16292,7 +15887,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateTransitGatewayRouteTableOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateTransitGatewayRouteTableOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateTransitGatewayRouteTableOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16308,7 +15903,6 @@ extension EC2Client { public func disassociateTrunkInterface(input: DisassociateTrunkInterfaceInput) async throws -> DisassociateTrunkInterfaceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateTrunkInterface") @@ -16333,7 +15927,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateTrunkInterfaceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateTrunkInterfaceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateTrunkInterfaceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16349,7 +15943,6 @@ extension EC2Client { public func disassociateVpcCidrBlock(input: DisassociateVpcCidrBlockInput) async throws -> DisassociateVpcCidrBlockOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateVpcCidrBlock") @@ -16373,7 +15966,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateVpcCidrBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateVpcCidrBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateVpcCidrBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16389,7 +15982,6 @@ extension EC2Client { public func enableAddressTransfer(input: EnableAddressTransferInput) async throws -> EnableAddressTransferOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableAddressTransfer") @@ -16413,7 +16005,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableAddressTransferOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableAddressTransferOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableAddressTransferOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16429,7 +16021,6 @@ extension EC2Client { public func enableAwsNetworkPerformanceMetricSubscription(input: EnableAwsNetworkPerformanceMetricSubscriptionInput) async throws -> EnableAwsNetworkPerformanceMetricSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableAwsNetworkPerformanceMetricSubscription") @@ -16453,7 +16044,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableAwsNetworkPerformanceMetricSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableAwsNetworkPerformanceMetricSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableAwsNetworkPerformanceMetricSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16469,7 +16060,6 @@ extension EC2Client { public func enableEbsEncryptionByDefault(input: EnableEbsEncryptionByDefaultInput) async throws -> EnableEbsEncryptionByDefaultOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableEbsEncryptionByDefault") @@ -16493,7 +16083,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableEbsEncryptionByDefaultOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableEbsEncryptionByDefaultOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableEbsEncryptionByDefaultOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16509,7 +16099,6 @@ extension EC2Client { public func enableFastLaunch(input: EnableFastLaunchInput) async throws -> EnableFastLaunchOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableFastLaunch") @@ -16533,7 +16122,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableFastLaunchOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableFastLaunchOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableFastLaunchOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16549,7 +16138,6 @@ extension EC2Client { public func enableFastSnapshotRestores(input: EnableFastSnapshotRestoresInput) async throws -> EnableFastSnapshotRestoresOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableFastSnapshotRestores") @@ -16573,7 +16161,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableFastSnapshotRestoresOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableFastSnapshotRestoresOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableFastSnapshotRestoresOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16589,7 +16177,6 @@ extension EC2Client { public func enableImage(input: EnableImageInput) async throws -> EnableImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableImage") @@ -16613,7 +16200,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16629,7 +16216,6 @@ extension EC2Client { public func enableImageBlockPublicAccess(input: EnableImageBlockPublicAccessInput) async throws -> EnableImageBlockPublicAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableImageBlockPublicAccess") @@ -16653,7 +16239,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableImageBlockPublicAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableImageBlockPublicAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableImageBlockPublicAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16669,7 +16255,6 @@ extension EC2Client { public func enableImageDeprecation(input: EnableImageDeprecationInput) async throws -> EnableImageDeprecationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableImageDeprecation") @@ -16693,7 +16278,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableImageDeprecationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableImageDeprecationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableImageDeprecationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16709,7 +16294,6 @@ extension EC2Client { public func enableIpamOrganizationAdminAccount(input: EnableIpamOrganizationAdminAccountInput) async throws -> EnableIpamOrganizationAdminAccountOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableIpamOrganizationAdminAccount") @@ -16733,7 +16317,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableIpamOrganizationAdminAccountOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableIpamOrganizationAdminAccountOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableIpamOrganizationAdminAccountOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16749,7 +16333,6 @@ extension EC2Client { public func enableReachabilityAnalyzerOrganizationSharing(input: EnableReachabilityAnalyzerOrganizationSharingInput) async throws -> EnableReachabilityAnalyzerOrganizationSharingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableReachabilityAnalyzerOrganizationSharing") @@ -16773,7 +16356,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableReachabilityAnalyzerOrganizationSharingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableReachabilityAnalyzerOrganizationSharingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableReachabilityAnalyzerOrganizationSharingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16789,7 +16372,6 @@ extension EC2Client { public func enableSerialConsoleAccess(input: EnableSerialConsoleAccessInput) async throws -> EnableSerialConsoleAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableSerialConsoleAccess") @@ -16813,7 +16395,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableSerialConsoleAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableSerialConsoleAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableSerialConsoleAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16829,7 +16411,6 @@ extension EC2Client { public func enableSnapshotBlockPublicAccess(input: EnableSnapshotBlockPublicAccessInput) async throws -> EnableSnapshotBlockPublicAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableSnapshotBlockPublicAccess") @@ -16853,7 +16434,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableSnapshotBlockPublicAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableSnapshotBlockPublicAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableSnapshotBlockPublicAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16869,7 +16450,6 @@ extension EC2Client { public func enableTransitGatewayRouteTablePropagation(input: EnableTransitGatewayRouteTablePropagationInput) async throws -> EnableTransitGatewayRouteTablePropagationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableTransitGatewayRouteTablePropagation") @@ -16893,7 +16473,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableTransitGatewayRouteTablePropagationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableTransitGatewayRouteTablePropagationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableTransitGatewayRouteTablePropagationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16909,7 +16489,6 @@ extension EC2Client { public func enableVgwRoutePropagation(input: EnableVgwRoutePropagationInput) async throws -> EnableVgwRoutePropagationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableVgwRoutePropagation") @@ -16933,7 +16512,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableVgwRoutePropagationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableVgwRoutePropagationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableVgwRoutePropagationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16949,7 +16528,6 @@ extension EC2Client { public func enableVolumeIO(input: EnableVolumeIOInput) async throws -> EnableVolumeIOOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableVolumeIO") @@ -16973,7 +16551,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableVolumeIOOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableVolumeIOOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableVolumeIOOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -16989,7 +16567,6 @@ extension EC2Client { public func enableVpcClassicLink(input: EnableVpcClassicLinkInput) async throws -> EnableVpcClassicLinkOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableVpcClassicLink") @@ -17013,7 +16590,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableVpcClassicLinkOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableVpcClassicLinkOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableVpcClassicLinkOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17029,7 +16606,6 @@ extension EC2Client { public func enableVpcClassicLinkDnsSupport(input: EnableVpcClassicLinkDnsSupportInput) async throws -> EnableVpcClassicLinkDnsSupportOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableVpcClassicLinkDnsSupport") @@ -17053,7 +16629,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableVpcClassicLinkDnsSupportOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableVpcClassicLinkDnsSupportOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableVpcClassicLinkDnsSupportOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17069,7 +16645,6 @@ extension EC2Client { public func exportClientVpnClientCertificateRevocationList(input: ExportClientVpnClientCertificateRevocationListInput) async throws -> ExportClientVpnClientCertificateRevocationListOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "exportClientVpnClientCertificateRevocationList") @@ -17093,7 +16668,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ExportClientVpnClientCertificateRevocationListOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ExportClientVpnClientCertificateRevocationListOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ExportClientVpnClientCertificateRevocationListOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17109,7 +16684,6 @@ extension EC2Client { public func exportClientVpnClientConfiguration(input: ExportClientVpnClientConfigurationInput) async throws -> ExportClientVpnClientConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "exportClientVpnClientConfiguration") @@ -17133,7 +16707,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ExportClientVpnClientConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ExportClientVpnClientConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ExportClientVpnClientConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17149,7 +16723,6 @@ extension EC2Client { public func exportImage(input: ExportImageInput) async throws -> ExportImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "exportImage") @@ -17174,7 +16747,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ExportImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ExportImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ExportImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17190,7 +16763,6 @@ extension EC2Client { public func exportTransitGatewayRoutes(input: ExportTransitGatewayRoutesInput) async throws -> ExportTransitGatewayRoutesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "exportTransitGatewayRoutes") @@ -17214,7 +16786,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ExportTransitGatewayRoutesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ExportTransitGatewayRoutesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ExportTransitGatewayRoutesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17230,7 +16802,6 @@ extension EC2Client { public func getAssociatedEnclaveCertificateIamRoles(input: GetAssociatedEnclaveCertificateIamRolesInput) async throws -> GetAssociatedEnclaveCertificateIamRolesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAssociatedEnclaveCertificateIamRoles") @@ -17254,7 +16825,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAssociatedEnclaveCertificateIamRolesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAssociatedEnclaveCertificateIamRolesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAssociatedEnclaveCertificateIamRolesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17270,7 +16841,6 @@ extension EC2Client { public func getAssociatedIpv6PoolCidrs(input: GetAssociatedIpv6PoolCidrsInput) async throws -> GetAssociatedIpv6PoolCidrsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAssociatedIpv6PoolCidrs") @@ -17294,7 +16864,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAssociatedIpv6PoolCidrsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAssociatedIpv6PoolCidrsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAssociatedIpv6PoolCidrsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17310,7 +16880,6 @@ extension EC2Client { public func getAwsNetworkPerformanceData(input: GetAwsNetworkPerformanceDataInput) async throws -> GetAwsNetworkPerformanceDataOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAwsNetworkPerformanceData") @@ -17334,7 +16903,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAwsNetworkPerformanceDataOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAwsNetworkPerformanceDataOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAwsNetworkPerformanceDataOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17350,7 +16919,6 @@ extension EC2Client { public func getCapacityReservationUsage(input: GetCapacityReservationUsageInput) async throws -> GetCapacityReservationUsageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getCapacityReservationUsage") @@ -17374,7 +16942,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCapacityReservationUsageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCapacityReservationUsageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCapacityReservationUsageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17390,7 +16958,6 @@ extension EC2Client { public func getCoipPoolUsage(input: GetCoipPoolUsageInput) async throws -> GetCoipPoolUsageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getCoipPoolUsage") @@ -17414,7 +16981,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCoipPoolUsageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCoipPoolUsageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCoipPoolUsageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17430,7 +16997,6 @@ extension EC2Client { public func getConsoleOutput(input: GetConsoleOutputInput) async throws -> GetConsoleOutputOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getConsoleOutput") @@ -17454,7 +17020,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetConsoleOutputOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetConsoleOutputOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetConsoleOutputOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17470,7 +17036,6 @@ extension EC2Client { public func getConsoleScreenshot(input: GetConsoleScreenshotInput) async throws -> GetConsoleScreenshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getConsoleScreenshot") @@ -17494,7 +17059,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetConsoleScreenshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetConsoleScreenshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetConsoleScreenshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17510,7 +17075,6 @@ extension EC2Client { public func getDefaultCreditSpecification(input: GetDefaultCreditSpecificationInput) async throws -> GetDefaultCreditSpecificationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getDefaultCreditSpecification") @@ -17534,7 +17098,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetDefaultCreditSpecificationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetDefaultCreditSpecificationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetDefaultCreditSpecificationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17550,7 +17114,6 @@ extension EC2Client { public func getEbsDefaultKmsKeyId(input: GetEbsDefaultKmsKeyIdInput) async throws -> GetEbsDefaultKmsKeyIdOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getEbsDefaultKmsKeyId") @@ -17574,7 +17137,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetEbsDefaultKmsKeyIdOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetEbsDefaultKmsKeyIdOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetEbsDefaultKmsKeyIdOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17590,7 +17153,6 @@ extension EC2Client { public func getEbsEncryptionByDefault(input: GetEbsEncryptionByDefaultInput) async throws -> GetEbsEncryptionByDefaultOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getEbsEncryptionByDefault") @@ -17614,7 +17176,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetEbsEncryptionByDefaultOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetEbsEncryptionByDefaultOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetEbsEncryptionByDefaultOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17641,7 +17203,6 @@ extension EC2Client { public func getFlowLogsIntegrationTemplate(input: GetFlowLogsIntegrationTemplateInput) async throws -> GetFlowLogsIntegrationTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getFlowLogsIntegrationTemplate") @@ -17665,7 +17226,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetFlowLogsIntegrationTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetFlowLogsIntegrationTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetFlowLogsIntegrationTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17681,7 +17242,6 @@ extension EC2Client { public func getGroupsForCapacityReservation(input: GetGroupsForCapacityReservationInput) async throws -> GetGroupsForCapacityReservationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getGroupsForCapacityReservation") @@ -17705,7 +17265,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetGroupsForCapacityReservationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetGroupsForCapacityReservationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetGroupsForCapacityReservationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17721,7 +17281,6 @@ extension EC2Client { public func getHostReservationPurchasePreview(input: GetHostReservationPurchasePreviewInput) async throws -> GetHostReservationPurchasePreviewOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getHostReservationPurchasePreview") @@ -17745,7 +17304,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetHostReservationPurchasePreviewOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetHostReservationPurchasePreviewOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetHostReservationPurchasePreviewOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17761,7 +17320,6 @@ extension EC2Client { public func getImageBlockPublicAccessState(input: GetImageBlockPublicAccessStateInput) async throws -> GetImageBlockPublicAccessStateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getImageBlockPublicAccessState") @@ -17785,7 +17343,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetImageBlockPublicAccessStateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetImageBlockPublicAccessStateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetImageBlockPublicAccessStateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17801,7 +17359,6 @@ extension EC2Client { public func getInstanceTypesFromInstanceRequirements(input: GetInstanceTypesFromInstanceRequirementsInput) async throws -> GetInstanceTypesFromInstanceRequirementsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getInstanceTypesFromInstanceRequirements") @@ -17825,7 +17382,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetInstanceTypesFromInstanceRequirementsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetInstanceTypesFromInstanceRequirementsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetInstanceTypesFromInstanceRequirementsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17841,7 +17398,6 @@ extension EC2Client { public func getInstanceUefiData(input: GetInstanceUefiDataInput) async throws -> GetInstanceUefiDataOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getInstanceUefiData") @@ -17865,7 +17421,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetInstanceUefiDataOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetInstanceUefiDataOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetInstanceUefiDataOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17881,7 +17437,6 @@ extension EC2Client { public func getIpamAddressHistory(input: GetIpamAddressHistoryInput) async throws -> GetIpamAddressHistoryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIpamAddressHistory") @@ -17905,7 +17460,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIpamAddressHistoryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIpamAddressHistoryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIpamAddressHistoryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17921,7 +17476,6 @@ extension EC2Client { public func getIpamDiscoveredAccounts(input: GetIpamDiscoveredAccountsInput) async throws -> GetIpamDiscoveredAccountsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIpamDiscoveredAccounts") @@ -17945,7 +17499,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIpamDiscoveredAccountsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIpamDiscoveredAccountsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIpamDiscoveredAccountsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -17961,7 +17515,6 @@ extension EC2Client { public func getIpamDiscoveredPublicAddresses(input: GetIpamDiscoveredPublicAddressesInput) async throws -> GetIpamDiscoveredPublicAddressesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIpamDiscoveredPublicAddresses") @@ -17985,7 +17538,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIpamDiscoveredPublicAddressesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIpamDiscoveredPublicAddressesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIpamDiscoveredPublicAddressesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18001,7 +17554,6 @@ extension EC2Client { public func getIpamDiscoveredResourceCidrs(input: GetIpamDiscoveredResourceCidrsInput) async throws -> GetIpamDiscoveredResourceCidrsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIpamDiscoveredResourceCidrs") @@ -18025,7 +17577,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIpamDiscoveredResourceCidrsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIpamDiscoveredResourceCidrsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIpamDiscoveredResourceCidrsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18041,7 +17593,6 @@ extension EC2Client { public func getIpamPoolAllocations(input: GetIpamPoolAllocationsInput) async throws -> GetIpamPoolAllocationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIpamPoolAllocations") @@ -18065,7 +17616,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIpamPoolAllocationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIpamPoolAllocationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIpamPoolAllocationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18081,7 +17632,6 @@ extension EC2Client { public func getIpamPoolCidrs(input: GetIpamPoolCidrsInput) async throws -> GetIpamPoolCidrsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIpamPoolCidrs") @@ -18105,7 +17655,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIpamPoolCidrsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIpamPoolCidrsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIpamPoolCidrsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18121,7 +17671,6 @@ extension EC2Client { public func getIpamResourceCidrs(input: GetIpamResourceCidrsInput) async throws -> GetIpamResourceCidrsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIpamResourceCidrs") @@ -18145,7 +17694,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIpamResourceCidrsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIpamResourceCidrsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIpamResourceCidrsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18161,7 +17710,6 @@ extension EC2Client { public func getLaunchTemplateData(input: GetLaunchTemplateDataInput) async throws -> GetLaunchTemplateDataOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getLaunchTemplateData") @@ -18185,7 +17733,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetLaunchTemplateDataOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetLaunchTemplateDataOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetLaunchTemplateDataOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18201,7 +17749,6 @@ extension EC2Client { public func getManagedPrefixListAssociations(input: GetManagedPrefixListAssociationsInput) async throws -> GetManagedPrefixListAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getManagedPrefixListAssociations") @@ -18225,7 +17772,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetManagedPrefixListAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetManagedPrefixListAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetManagedPrefixListAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18241,7 +17788,6 @@ extension EC2Client { public func getManagedPrefixListEntries(input: GetManagedPrefixListEntriesInput) async throws -> GetManagedPrefixListEntriesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getManagedPrefixListEntries") @@ -18265,7 +17811,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetManagedPrefixListEntriesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetManagedPrefixListEntriesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetManagedPrefixListEntriesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18281,7 +17827,6 @@ extension EC2Client { public func getNetworkInsightsAccessScopeAnalysisFindings(input: GetNetworkInsightsAccessScopeAnalysisFindingsInput) async throws -> GetNetworkInsightsAccessScopeAnalysisFindingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getNetworkInsightsAccessScopeAnalysisFindings") @@ -18305,7 +17850,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetNetworkInsightsAccessScopeAnalysisFindingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetNetworkInsightsAccessScopeAnalysisFindingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetNetworkInsightsAccessScopeAnalysisFindingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18321,7 +17866,6 @@ extension EC2Client { public func getNetworkInsightsAccessScopeContent(input: GetNetworkInsightsAccessScopeContentInput) async throws -> GetNetworkInsightsAccessScopeContentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getNetworkInsightsAccessScopeContent") @@ -18345,7 +17889,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetNetworkInsightsAccessScopeContentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetNetworkInsightsAccessScopeContentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetNetworkInsightsAccessScopeContentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18361,7 +17905,6 @@ extension EC2Client { public func getPasswordData(input: GetPasswordDataInput) async throws -> GetPasswordDataOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getPasswordData") @@ -18385,7 +17928,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPasswordDataOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPasswordDataOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPasswordDataOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18401,7 +17944,6 @@ extension EC2Client { public func getReservedInstancesExchangeQuote(input: GetReservedInstancesExchangeQuoteInput) async throws -> GetReservedInstancesExchangeQuoteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getReservedInstancesExchangeQuote") @@ -18425,7 +17967,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetReservedInstancesExchangeQuoteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetReservedInstancesExchangeQuoteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetReservedInstancesExchangeQuoteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18441,7 +17983,6 @@ extension EC2Client { public func getSecurityGroupsForVpc(input: GetSecurityGroupsForVpcInput) async throws -> GetSecurityGroupsForVpcOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSecurityGroupsForVpc") @@ -18465,7 +18006,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSecurityGroupsForVpcOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSecurityGroupsForVpcOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSecurityGroupsForVpcOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18481,7 +18022,6 @@ extension EC2Client { public func getSerialConsoleAccessStatus(input: GetSerialConsoleAccessStatusInput) async throws -> GetSerialConsoleAccessStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSerialConsoleAccessStatus") @@ -18505,7 +18045,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSerialConsoleAccessStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSerialConsoleAccessStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSerialConsoleAccessStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18521,7 +18061,6 @@ extension EC2Client { public func getSnapshotBlockPublicAccessState(input: GetSnapshotBlockPublicAccessStateInput) async throws -> GetSnapshotBlockPublicAccessStateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSnapshotBlockPublicAccessState") @@ -18545,7 +18084,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSnapshotBlockPublicAccessStateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSnapshotBlockPublicAccessStateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSnapshotBlockPublicAccessStateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18561,7 +18100,6 @@ extension EC2Client { public func getSpotPlacementScores(input: GetSpotPlacementScoresInput) async throws -> GetSpotPlacementScoresOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSpotPlacementScores") @@ -18585,7 +18123,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSpotPlacementScoresOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSpotPlacementScoresOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSpotPlacementScoresOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18601,7 +18139,6 @@ extension EC2Client { public func getSubnetCidrReservations(input: GetSubnetCidrReservationsInput) async throws -> GetSubnetCidrReservationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSubnetCidrReservations") @@ -18625,7 +18162,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSubnetCidrReservationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSubnetCidrReservationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSubnetCidrReservationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18641,7 +18178,6 @@ extension EC2Client { public func getTransitGatewayAttachmentPropagations(input: GetTransitGatewayAttachmentPropagationsInput) async throws -> GetTransitGatewayAttachmentPropagationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTransitGatewayAttachmentPropagations") @@ -18665,7 +18201,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTransitGatewayAttachmentPropagationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTransitGatewayAttachmentPropagationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTransitGatewayAttachmentPropagationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18681,7 +18217,6 @@ extension EC2Client { public func getTransitGatewayMulticastDomainAssociations(input: GetTransitGatewayMulticastDomainAssociationsInput) async throws -> GetTransitGatewayMulticastDomainAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTransitGatewayMulticastDomainAssociations") @@ -18705,7 +18240,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTransitGatewayMulticastDomainAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTransitGatewayMulticastDomainAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTransitGatewayMulticastDomainAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18721,7 +18256,6 @@ extension EC2Client { public func getTransitGatewayPolicyTableAssociations(input: GetTransitGatewayPolicyTableAssociationsInput) async throws -> GetTransitGatewayPolicyTableAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTransitGatewayPolicyTableAssociations") @@ -18745,7 +18279,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTransitGatewayPolicyTableAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTransitGatewayPolicyTableAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTransitGatewayPolicyTableAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18761,7 +18295,6 @@ extension EC2Client { public func getTransitGatewayPolicyTableEntries(input: GetTransitGatewayPolicyTableEntriesInput) async throws -> GetTransitGatewayPolicyTableEntriesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTransitGatewayPolicyTableEntries") @@ -18785,7 +18318,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTransitGatewayPolicyTableEntriesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTransitGatewayPolicyTableEntriesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTransitGatewayPolicyTableEntriesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18801,7 +18334,6 @@ extension EC2Client { public func getTransitGatewayPrefixListReferences(input: GetTransitGatewayPrefixListReferencesInput) async throws -> GetTransitGatewayPrefixListReferencesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTransitGatewayPrefixListReferences") @@ -18825,7 +18357,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTransitGatewayPrefixListReferencesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTransitGatewayPrefixListReferencesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTransitGatewayPrefixListReferencesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18841,7 +18373,6 @@ extension EC2Client { public func getTransitGatewayRouteTableAssociations(input: GetTransitGatewayRouteTableAssociationsInput) async throws -> GetTransitGatewayRouteTableAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTransitGatewayRouteTableAssociations") @@ -18865,7 +18396,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTransitGatewayRouteTableAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTransitGatewayRouteTableAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTransitGatewayRouteTableAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18881,7 +18412,6 @@ extension EC2Client { public func getTransitGatewayRouteTablePropagations(input: GetTransitGatewayRouteTablePropagationsInput) async throws -> GetTransitGatewayRouteTablePropagationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTransitGatewayRouteTablePropagations") @@ -18905,7 +18435,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTransitGatewayRouteTablePropagationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTransitGatewayRouteTablePropagationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTransitGatewayRouteTablePropagationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18921,7 +18451,6 @@ extension EC2Client { public func getVerifiedAccessEndpointPolicy(input: GetVerifiedAccessEndpointPolicyInput) async throws -> GetVerifiedAccessEndpointPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getVerifiedAccessEndpointPolicy") @@ -18945,7 +18474,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetVerifiedAccessEndpointPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetVerifiedAccessEndpointPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetVerifiedAccessEndpointPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -18961,7 +18490,6 @@ extension EC2Client { public func getVerifiedAccessGroupPolicy(input: GetVerifiedAccessGroupPolicyInput) async throws -> GetVerifiedAccessGroupPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getVerifiedAccessGroupPolicy") @@ -18985,7 +18513,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetVerifiedAccessGroupPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetVerifiedAccessGroupPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetVerifiedAccessGroupPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19001,7 +18529,6 @@ extension EC2Client { public func getVpnConnectionDeviceSampleConfiguration(input: GetVpnConnectionDeviceSampleConfigurationInput) async throws -> GetVpnConnectionDeviceSampleConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getVpnConnectionDeviceSampleConfiguration") @@ -19025,7 +18552,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetVpnConnectionDeviceSampleConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetVpnConnectionDeviceSampleConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetVpnConnectionDeviceSampleConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19041,7 +18568,6 @@ extension EC2Client { public func getVpnConnectionDeviceTypes(input: GetVpnConnectionDeviceTypesInput) async throws -> GetVpnConnectionDeviceTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getVpnConnectionDeviceTypes") @@ -19065,7 +18591,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetVpnConnectionDeviceTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetVpnConnectionDeviceTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetVpnConnectionDeviceTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19081,7 +18607,6 @@ extension EC2Client { public func getVpnTunnelReplacementStatus(input: GetVpnTunnelReplacementStatusInput) async throws -> GetVpnTunnelReplacementStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getVpnTunnelReplacementStatus") @@ -19105,7 +18630,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetVpnTunnelReplacementStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetVpnTunnelReplacementStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetVpnTunnelReplacementStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19121,7 +18646,6 @@ extension EC2Client { public func importClientVpnClientCertificateRevocationList(input: ImportClientVpnClientCertificateRevocationListInput) async throws -> ImportClientVpnClientCertificateRevocationListOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "importClientVpnClientCertificateRevocationList") @@ -19145,7 +18669,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ImportClientVpnClientCertificateRevocationListOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ImportClientVpnClientCertificateRevocationListOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ImportClientVpnClientCertificateRevocationListOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19161,7 +18685,6 @@ extension EC2Client { public func importImage(input: ImportImageInput) async throws -> ImportImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "importImage") @@ -19185,7 +18708,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ImportImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ImportImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ImportImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19201,7 +18724,6 @@ extension EC2Client { public func importInstance(input: ImportInstanceInput) async throws -> ImportInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "importInstance") @@ -19225,7 +18747,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ImportInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ImportInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ImportInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19241,7 +18763,6 @@ extension EC2Client { public func importKeyPair(input: ImportKeyPairInput) async throws -> ImportKeyPairOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "importKeyPair") @@ -19265,7 +18786,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ImportKeyPairOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ImportKeyPairOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ImportKeyPairOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19281,7 +18802,6 @@ extension EC2Client { public func importSnapshot(input: ImportSnapshotInput) async throws -> ImportSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "importSnapshot") @@ -19305,7 +18825,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ImportSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ImportSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ImportSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19321,7 +18841,6 @@ extension EC2Client { public func importVolume(input: ImportVolumeInput) async throws -> ImportVolumeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "importVolume") @@ -19345,7 +18864,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ImportVolumeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ImportVolumeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ImportVolumeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19361,7 +18880,6 @@ extension EC2Client { public func listImagesInRecycleBin(input: ListImagesInRecycleBinInput) async throws -> ListImagesInRecycleBinOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listImagesInRecycleBin") @@ -19385,7 +18903,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListImagesInRecycleBinOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListImagesInRecycleBinOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListImagesInRecycleBinOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19401,7 +18919,6 @@ extension EC2Client { public func listSnapshotsInRecycleBin(input: ListSnapshotsInRecycleBinInput) async throws -> ListSnapshotsInRecycleBinOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listSnapshotsInRecycleBin") @@ -19425,7 +18942,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListSnapshotsInRecycleBinOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListSnapshotsInRecycleBinOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListSnapshotsInRecycleBinOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19447,7 +18964,6 @@ extension EC2Client { public func lockSnapshot(input: LockSnapshotInput) async throws -> LockSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "lockSnapshot") @@ -19471,7 +18987,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(LockSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(LockSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(LockSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19487,7 +19003,6 @@ extension EC2Client { public func modifyAddressAttribute(input: ModifyAddressAttributeInput) async throws -> ModifyAddressAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyAddressAttribute") @@ -19511,7 +19026,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyAddressAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyAddressAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyAddressAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19527,7 +19042,6 @@ extension EC2Client { public func modifyAvailabilityZoneGroup(input: ModifyAvailabilityZoneGroupInput) async throws -> ModifyAvailabilityZoneGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyAvailabilityZoneGroup") @@ -19551,7 +19065,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyAvailabilityZoneGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyAvailabilityZoneGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyAvailabilityZoneGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19567,7 +19081,6 @@ extension EC2Client { public func modifyCapacityReservation(input: ModifyCapacityReservationInput) async throws -> ModifyCapacityReservationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCapacityReservation") @@ -19591,7 +19104,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCapacityReservationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCapacityReservationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCapacityReservationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19607,7 +19120,6 @@ extension EC2Client { public func modifyCapacityReservationFleet(input: ModifyCapacityReservationFleetInput) async throws -> ModifyCapacityReservationFleetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCapacityReservationFleet") @@ -19631,7 +19143,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCapacityReservationFleetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCapacityReservationFleetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCapacityReservationFleetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19647,7 +19159,6 @@ extension EC2Client { public func modifyClientVpnEndpoint(input: ModifyClientVpnEndpointInput) async throws -> ModifyClientVpnEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyClientVpnEndpoint") @@ -19671,7 +19182,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClientVpnEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClientVpnEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClientVpnEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19687,7 +19198,6 @@ extension EC2Client { public func modifyDefaultCreditSpecification(input: ModifyDefaultCreditSpecificationInput) async throws -> ModifyDefaultCreditSpecificationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDefaultCreditSpecification") @@ -19711,7 +19221,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDefaultCreditSpecificationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDefaultCreditSpecificationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDefaultCreditSpecificationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19727,7 +19237,6 @@ extension EC2Client { public func modifyEbsDefaultKmsKeyId(input: ModifyEbsDefaultKmsKeyIdInput) async throws -> ModifyEbsDefaultKmsKeyIdOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyEbsDefaultKmsKeyId") @@ -19751,7 +19260,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyEbsDefaultKmsKeyIdOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyEbsDefaultKmsKeyIdOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyEbsDefaultKmsKeyIdOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19767,7 +19276,6 @@ extension EC2Client { public func modifyFleet(input: ModifyFleetInput) async throws -> ModifyFleetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyFleet") @@ -19791,7 +19299,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyFleetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyFleetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyFleetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19807,7 +19315,6 @@ extension EC2Client { public func modifyFpgaImageAttribute(input: ModifyFpgaImageAttributeInput) async throws -> ModifyFpgaImageAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyFpgaImageAttribute") @@ -19831,7 +19338,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyFpgaImageAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyFpgaImageAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyFpgaImageAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19847,7 +19354,6 @@ extension EC2Client { public func modifyHosts(input: ModifyHostsInput) async throws -> ModifyHostsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyHosts") @@ -19871,7 +19377,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyHostsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyHostsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyHostsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19887,7 +19393,6 @@ extension EC2Client { public func modifyIdFormat(input: ModifyIdFormatInput) async throws -> ModifyIdFormatOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyIdFormat") @@ -19911,7 +19416,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyIdFormatOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyIdFormatOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyIdFormatOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19927,7 +19432,6 @@ extension EC2Client { public func modifyIdentityIdFormat(input: ModifyIdentityIdFormatInput) async throws -> ModifyIdentityIdFormatOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyIdentityIdFormat") @@ -19951,7 +19455,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyIdentityIdFormatOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyIdentityIdFormatOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyIdentityIdFormatOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -19967,7 +19471,6 @@ extension EC2Client { public func modifyImageAttribute(input: ModifyImageAttributeInput) async throws -> ModifyImageAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyImageAttribute") @@ -19991,7 +19494,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyImageAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyImageAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyImageAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20007,7 +19510,6 @@ extension EC2Client { public func modifyInstanceAttribute(input: ModifyInstanceAttributeInput) async throws -> ModifyInstanceAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyInstanceAttribute") @@ -20031,7 +19533,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyInstanceAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyInstanceAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyInstanceAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20047,7 +19549,6 @@ extension EC2Client { public func modifyInstanceCapacityReservationAttributes(input: ModifyInstanceCapacityReservationAttributesInput) async throws -> ModifyInstanceCapacityReservationAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyInstanceCapacityReservationAttributes") @@ -20071,7 +19572,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyInstanceCapacityReservationAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyInstanceCapacityReservationAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyInstanceCapacityReservationAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20087,7 +19588,6 @@ extension EC2Client { public func modifyInstanceCreditSpecification(input: ModifyInstanceCreditSpecificationInput) async throws -> ModifyInstanceCreditSpecificationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyInstanceCreditSpecification") @@ -20111,7 +19611,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyInstanceCreditSpecificationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyInstanceCreditSpecificationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyInstanceCreditSpecificationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20127,7 +19627,6 @@ extension EC2Client { public func modifyInstanceEventStartTime(input: ModifyInstanceEventStartTimeInput) async throws -> ModifyInstanceEventStartTimeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyInstanceEventStartTime") @@ -20151,7 +19650,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyInstanceEventStartTimeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyInstanceEventStartTimeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyInstanceEventStartTimeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20167,7 +19666,6 @@ extension EC2Client { public func modifyInstanceEventWindow(input: ModifyInstanceEventWindowInput) async throws -> ModifyInstanceEventWindowOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyInstanceEventWindow") @@ -20191,7 +19689,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyInstanceEventWindowOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyInstanceEventWindowOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyInstanceEventWindowOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20207,7 +19705,6 @@ extension EC2Client { public func modifyInstanceMaintenanceOptions(input: ModifyInstanceMaintenanceOptionsInput) async throws -> ModifyInstanceMaintenanceOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyInstanceMaintenanceOptions") @@ -20231,7 +19728,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyInstanceMaintenanceOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyInstanceMaintenanceOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyInstanceMaintenanceOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20247,7 +19744,6 @@ extension EC2Client { public func modifyInstanceMetadataOptions(input: ModifyInstanceMetadataOptionsInput) async throws -> ModifyInstanceMetadataOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyInstanceMetadataOptions") @@ -20271,7 +19767,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyInstanceMetadataOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyInstanceMetadataOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyInstanceMetadataOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20298,7 +19794,6 @@ extension EC2Client { public func modifyInstancePlacement(input: ModifyInstancePlacementInput) async throws -> ModifyInstancePlacementOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyInstancePlacement") @@ -20322,7 +19817,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyInstancePlacementOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyInstancePlacementOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyInstancePlacementOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20338,7 +19833,6 @@ extension EC2Client { public func modifyIpam(input: ModifyIpamInput) async throws -> ModifyIpamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyIpam") @@ -20362,7 +19856,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyIpamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyIpamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyIpamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20378,7 +19872,6 @@ extension EC2Client { public func modifyIpamPool(input: ModifyIpamPoolInput) async throws -> ModifyIpamPoolOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyIpamPool") @@ -20402,7 +19895,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyIpamPoolOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyIpamPoolOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyIpamPoolOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20418,7 +19911,6 @@ extension EC2Client { public func modifyIpamResourceCidr(input: ModifyIpamResourceCidrInput) async throws -> ModifyIpamResourceCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyIpamResourceCidr") @@ -20442,7 +19934,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyIpamResourceCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyIpamResourceCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyIpamResourceCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20458,7 +19950,6 @@ extension EC2Client { public func modifyIpamResourceDiscovery(input: ModifyIpamResourceDiscoveryInput) async throws -> ModifyIpamResourceDiscoveryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyIpamResourceDiscovery") @@ -20482,7 +19973,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyIpamResourceDiscoveryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyIpamResourceDiscoveryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyIpamResourceDiscoveryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20498,7 +19989,6 @@ extension EC2Client { public func modifyIpamScope(input: ModifyIpamScopeInput) async throws -> ModifyIpamScopeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyIpamScope") @@ -20522,7 +20012,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyIpamScopeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyIpamScopeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyIpamScopeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20538,7 +20028,6 @@ extension EC2Client { public func modifyLaunchTemplate(input: ModifyLaunchTemplateInput) async throws -> ModifyLaunchTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyLaunchTemplate") @@ -20562,7 +20051,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyLaunchTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyLaunchTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyLaunchTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20578,7 +20067,6 @@ extension EC2Client { public func modifyLocalGatewayRoute(input: ModifyLocalGatewayRouteInput) async throws -> ModifyLocalGatewayRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyLocalGatewayRoute") @@ -20602,7 +20090,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyLocalGatewayRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyLocalGatewayRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyLocalGatewayRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20618,7 +20106,6 @@ extension EC2Client { public func modifyManagedPrefixList(input: ModifyManagedPrefixListInput) async throws -> ModifyManagedPrefixListOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyManagedPrefixList") @@ -20642,7 +20129,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyManagedPrefixListOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyManagedPrefixListOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyManagedPrefixListOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20658,7 +20145,6 @@ extension EC2Client { public func modifyNetworkInterfaceAttribute(input: ModifyNetworkInterfaceAttributeInput) async throws -> ModifyNetworkInterfaceAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyNetworkInterfaceAttribute") @@ -20682,7 +20168,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyNetworkInterfaceAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyNetworkInterfaceAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyNetworkInterfaceAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20698,7 +20184,6 @@ extension EC2Client { public func modifyPrivateDnsNameOptions(input: ModifyPrivateDnsNameOptionsInput) async throws -> ModifyPrivateDnsNameOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyPrivateDnsNameOptions") @@ -20722,7 +20207,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyPrivateDnsNameOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyPrivateDnsNameOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyPrivateDnsNameOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20738,7 +20223,6 @@ extension EC2Client { public func modifyReservedInstances(input: ModifyReservedInstancesInput) async throws -> ModifyReservedInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyReservedInstances") @@ -20762,7 +20246,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyReservedInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyReservedInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyReservedInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20778,7 +20262,6 @@ extension EC2Client { public func modifySecurityGroupRules(input: ModifySecurityGroupRulesInput) async throws -> ModifySecurityGroupRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifySecurityGroupRules") @@ -20802,7 +20285,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifySecurityGroupRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifySecurityGroupRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifySecurityGroupRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20818,7 +20301,6 @@ extension EC2Client { public func modifySnapshotAttribute(input: ModifySnapshotAttributeInput) async throws -> ModifySnapshotAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifySnapshotAttribute") @@ -20842,7 +20324,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifySnapshotAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifySnapshotAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifySnapshotAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20858,7 +20340,6 @@ extension EC2Client { public func modifySnapshotTier(input: ModifySnapshotTierInput) async throws -> ModifySnapshotTierOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifySnapshotTier") @@ -20882,7 +20363,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifySnapshotTierOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifySnapshotTierOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifySnapshotTierOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20898,7 +20379,6 @@ extension EC2Client { public func modifySpotFleetRequest(input: ModifySpotFleetRequestInput) async throws -> ModifySpotFleetRequestOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifySpotFleetRequest") @@ -20922,7 +20402,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifySpotFleetRequestOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifySpotFleetRequestOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifySpotFleetRequestOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20949,7 +20429,6 @@ extension EC2Client { public func modifySubnetAttribute(input: ModifySubnetAttributeInput) async throws -> ModifySubnetAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifySubnetAttribute") @@ -20973,7 +20452,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifySubnetAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifySubnetAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifySubnetAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -20989,7 +20468,6 @@ extension EC2Client { public func modifyTrafficMirrorFilterNetworkServices(input: ModifyTrafficMirrorFilterNetworkServicesInput) async throws -> ModifyTrafficMirrorFilterNetworkServicesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTrafficMirrorFilterNetworkServices") @@ -21013,7 +20491,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTrafficMirrorFilterNetworkServicesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTrafficMirrorFilterNetworkServicesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTrafficMirrorFilterNetworkServicesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21029,7 +20507,6 @@ extension EC2Client { public func modifyTrafficMirrorFilterRule(input: ModifyTrafficMirrorFilterRuleInput) async throws -> ModifyTrafficMirrorFilterRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTrafficMirrorFilterRule") @@ -21053,7 +20530,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTrafficMirrorFilterRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTrafficMirrorFilterRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTrafficMirrorFilterRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21069,7 +20546,6 @@ extension EC2Client { public func modifyTrafficMirrorSession(input: ModifyTrafficMirrorSessionInput) async throws -> ModifyTrafficMirrorSessionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTrafficMirrorSession") @@ -21093,7 +20569,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTrafficMirrorSessionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTrafficMirrorSessionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTrafficMirrorSessionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21109,7 +20585,6 @@ extension EC2Client { public func modifyTransitGateway(input: ModifyTransitGatewayInput) async throws -> ModifyTransitGatewayOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTransitGateway") @@ -21133,7 +20608,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTransitGatewayOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTransitGatewayOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTransitGatewayOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21149,7 +20624,6 @@ extension EC2Client { public func modifyTransitGatewayPrefixListReference(input: ModifyTransitGatewayPrefixListReferenceInput) async throws -> ModifyTransitGatewayPrefixListReferenceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTransitGatewayPrefixListReference") @@ -21173,7 +20647,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTransitGatewayPrefixListReferenceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTransitGatewayPrefixListReferenceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTransitGatewayPrefixListReferenceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21189,7 +20663,6 @@ extension EC2Client { public func modifyTransitGatewayVpcAttachment(input: ModifyTransitGatewayVpcAttachmentInput) async throws -> ModifyTransitGatewayVpcAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTransitGatewayVpcAttachment") @@ -21213,7 +20686,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTransitGatewayVpcAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTransitGatewayVpcAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTransitGatewayVpcAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21229,7 +20702,6 @@ extension EC2Client { public func modifyVerifiedAccessEndpoint(input: ModifyVerifiedAccessEndpointInput) async throws -> ModifyVerifiedAccessEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVerifiedAccessEndpoint") @@ -21254,7 +20726,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVerifiedAccessEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVerifiedAccessEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVerifiedAccessEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21270,7 +20742,6 @@ extension EC2Client { public func modifyVerifiedAccessEndpointPolicy(input: ModifyVerifiedAccessEndpointPolicyInput) async throws -> ModifyVerifiedAccessEndpointPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVerifiedAccessEndpointPolicy") @@ -21295,7 +20766,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVerifiedAccessEndpointPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVerifiedAccessEndpointPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVerifiedAccessEndpointPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21311,7 +20782,6 @@ extension EC2Client { public func modifyVerifiedAccessGroup(input: ModifyVerifiedAccessGroupInput) async throws -> ModifyVerifiedAccessGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVerifiedAccessGroup") @@ -21336,7 +20806,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVerifiedAccessGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVerifiedAccessGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVerifiedAccessGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21352,7 +20822,6 @@ extension EC2Client { public func modifyVerifiedAccessGroupPolicy(input: ModifyVerifiedAccessGroupPolicyInput) async throws -> ModifyVerifiedAccessGroupPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVerifiedAccessGroupPolicy") @@ -21377,7 +20846,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVerifiedAccessGroupPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVerifiedAccessGroupPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVerifiedAccessGroupPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21393,7 +20862,6 @@ extension EC2Client { public func modifyVerifiedAccessInstance(input: ModifyVerifiedAccessInstanceInput) async throws -> ModifyVerifiedAccessInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVerifiedAccessInstance") @@ -21418,7 +20886,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVerifiedAccessInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVerifiedAccessInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVerifiedAccessInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21434,7 +20902,6 @@ extension EC2Client { public func modifyVerifiedAccessInstanceLoggingConfiguration(input: ModifyVerifiedAccessInstanceLoggingConfigurationInput) async throws -> ModifyVerifiedAccessInstanceLoggingConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVerifiedAccessInstanceLoggingConfiguration") @@ -21459,7 +20926,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVerifiedAccessInstanceLoggingConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVerifiedAccessInstanceLoggingConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVerifiedAccessInstanceLoggingConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21475,7 +20942,6 @@ extension EC2Client { public func modifyVerifiedAccessTrustProvider(input: ModifyVerifiedAccessTrustProviderInput) async throws -> ModifyVerifiedAccessTrustProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVerifiedAccessTrustProvider") @@ -21500,7 +20966,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVerifiedAccessTrustProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVerifiedAccessTrustProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVerifiedAccessTrustProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21516,7 +20982,6 @@ extension EC2Client { public func modifyVolume(input: ModifyVolumeInput) async throws -> ModifyVolumeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVolume") @@ -21540,7 +21005,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVolumeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVolumeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVolumeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21556,7 +21021,6 @@ extension EC2Client { public func modifyVolumeAttribute(input: ModifyVolumeAttributeInput) async throws -> ModifyVolumeAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVolumeAttribute") @@ -21580,7 +21044,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVolumeAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVolumeAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVolumeAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21596,7 +21060,6 @@ extension EC2Client { public func modifyVpcAttribute(input: ModifyVpcAttributeInput) async throws -> ModifyVpcAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpcAttribute") @@ -21620,7 +21083,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpcAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpcAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpcAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21636,7 +21099,6 @@ extension EC2Client { public func modifyVpcEndpoint(input: ModifyVpcEndpointInput) async throws -> ModifyVpcEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpcEndpoint") @@ -21660,7 +21122,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpcEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpcEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpcEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21676,7 +21138,6 @@ extension EC2Client { public func modifyVpcEndpointConnectionNotification(input: ModifyVpcEndpointConnectionNotificationInput) async throws -> ModifyVpcEndpointConnectionNotificationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpcEndpointConnectionNotification") @@ -21700,7 +21161,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpcEndpointConnectionNotificationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpcEndpointConnectionNotificationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpcEndpointConnectionNotificationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21716,7 +21177,6 @@ extension EC2Client { public func modifyVpcEndpointServiceConfiguration(input: ModifyVpcEndpointServiceConfigurationInput) async throws -> ModifyVpcEndpointServiceConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpcEndpointServiceConfiguration") @@ -21740,7 +21200,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpcEndpointServiceConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpcEndpointServiceConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpcEndpointServiceConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21756,7 +21216,6 @@ extension EC2Client { public func modifyVpcEndpointServicePayerResponsibility(input: ModifyVpcEndpointServicePayerResponsibilityInput) async throws -> ModifyVpcEndpointServicePayerResponsibilityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpcEndpointServicePayerResponsibility") @@ -21780,7 +21239,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpcEndpointServicePayerResponsibilityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpcEndpointServicePayerResponsibilityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpcEndpointServicePayerResponsibilityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21796,7 +21255,6 @@ extension EC2Client { public func modifyVpcEndpointServicePermissions(input: ModifyVpcEndpointServicePermissionsInput) async throws -> ModifyVpcEndpointServicePermissionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpcEndpointServicePermissions") @@ -21820,7 +21278,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpcEndpointServicePermissionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpcEndpointServicePermissionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpcEndpointServicePermissionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21836,7 +21294,6 @@ extension EC2Client { public func modifyVpcPeeringConnectionOptions(input: ModifyVpcPeeringConnectionOptionsInput) async throws -> ModifyVpcPeeringConnectionOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpcPeeringConnectionOptions") @@ -21860,7 +21317,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpcPeeringConnectionOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpcPeeringConnectionOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpcPeeringConnectionOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21876,7 +21333,6 @@ extension EC2Client { public func modifyVpcTenancy(input: ModifyVpcTenancyInput) async throws -> ModifyVpcTenancyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpcTenancy") @@ -21900,7 +21356,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpcTenancyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpcTenancyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpcTenancyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21927,7 +21383,6 @@ extension EC2Client { public func modifyVpnConnection(input: ModifyVpnConnectionInput) async throws -> ModifyVpnConnectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpnConnection") @@ -21951,7 +21406,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpnConnectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpnConnectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpnConnectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -21967,7 +21422,6 @@ extension EC2Client { public func modifyVpnConnectionOptions(input: ModifyVpnConnectionOptionsInput) async throws -> ModifyVpnConnectionOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpnConnectionOptions") @@ -21991,7 +21445,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpnConnectionOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpnConnectionOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpnConnectionOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22007,7 +21461,6 @@ extension EC2Client { public func modifyVpnTunnelCertificate(input: ModifyVpnTunnelCertificateInput) async throws -> ModifyVpnTunnelCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpnTunnelCertificate") @@ -22031,7 +21484,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpnTunnelCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpnTunnelCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpnTunnelCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22047,7 +21500,6 @@ extension EC2Client { public func modifyVpnTunnelOptions(input: ModifyVpnTunnelOptionsInput) async throws -> ModifyVpnTunnelOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyVpnTunnelOptions") @@ -22071,7 +21523,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyVpnTunnelOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyVpnTunnelOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyVpnTunnelOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22087,7 +21539,6 @@ extension EC2Client { public func monitorInstances(input: MonitorInstancesInput) async throws -> MonitorInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "monitorInstances") @@ -22111,7 +21562,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(MonitorInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(MonitorInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(MonitorInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22127,7 +21578,6 @@ extension EC2Client { public func moveAddressToVpc(input: MoveAddressToVpcInput) async throws -> MoveAddressToVpcOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "moveAddressToVpc") @@ -22151,7 +21601,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(MoveAddressToVpcOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(MoveAddressToVpcOutput.httpBinding, responseDocumentBinding), responseErrorClosure(MoveAddressToVpcOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22167,7 +21617,6 @@ extension EC2Client { public func moveByoipCidrToIpam(input: MoveByoipCidrToIpamInput) async throws -> MoveByoipCidrToIpamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "moveByoipCidrToIpam") @@ -22191,7 +21640,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(MoveByoipCidrToIpamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(MoveByoipCidrToIpamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(MoveByoipCidrToIpamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22207,7 +21656,6 @@ extension EC2Client { public func provisionByoipCidr(input: ProvisionByoipCidrInput) async throws -> ProvisionByoipCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "provisionByoipCidr") @@ -22231,7 +21679,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ProvisionByoipCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ProvisionByoipCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ProvisionByoipCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22247,7 +21695,6 @@ extension EC2Client { public func provisionIpamByoasn(input: ProvisionIpamByoasnInput) async throws -> ProvisionIpamByoasnOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "provisionIpamByoasn") @@ -22271,7 +21718,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ProvisionIpamByoasnOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ProvisionIpamByoasnOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ProvisionIpamByoasnOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22287,7 +21734,6 @@ extension EC2Client { public func provisionIpamPoolCidr(input: ProvisionIpamPoolCidrInput) async throws -> ProvisionIpamPoolCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "provisionIpamPoolCidr") @@ -22312,7 +21758,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ProvisionIpamPoolCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ProvisionIpamPoolCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ProvisionIpamPoolCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22328,7 +21774,6 @@ extension EC2Client { public func provisionPublicIpv4PoolCidr(input: ProvisionPublicIpv4PoolCidrInput) async throws -> ProvisionPublicIpv4PoolCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "provisionPublicIpv4PoolCidr") @@ -22352,7 +21797,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ProvisionPublicIpv4PoolCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ProvisionPublicIpv4PoolCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ProvisionPublicIpv4PoolCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22368,7 +21813,6 @@ extension EC2Client { public func purchaseCapacityBlock(input: PurchaseCapacityBlockInput) async throws -> PurchaseCapacityBlockOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "purchaseCapacityBlock") @@ -22392,7 +21836,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PurchaseCapacityBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PurchaseCapacityBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PurchaseCapacityBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22408,7 +21852,6 @@ extension EC2Client { public func purchaseHostReservation(input: PurchaseHostReservationInput) async throws -> PurchaseHostReservationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "purchaseHostReservation") @@ -22432,7 +21875,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PurchaseHostReservationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PurchaseHostReservationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PurchaseHostReservationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22448,7 +21891,6 @@ extension EC2Client { public func purchaseReservedInstancesOffering(input: PurchaseReservedInstancesOfferingInput) async throws -> PurchaseReservedInstancesOfferingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "purchaseReservedInstancesOffering") @@ -22472,7 +21914,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PurchaseReservedInstancesOfferingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PurchaseReservedInstancesOfferingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PurchaseReservedInstancesOfferingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22488,7 +21930,6 @@ extension EC2Client { public func purchaseScheduledInstances(input: PurchaseScheduledInstancesInput) async throws -> PurchaseScheduledInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "purchaseScheduledInstances") @@ -22513,7 +21954,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PurchaseScheduledInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PurchaseScheduledInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PurchaseScheduledInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22529,7 +21970,6 @@ extension EC2Client { public func rebootInstances(input: RebootInstancesInput) async throws -> RebootInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebootInstances") @@ -22553,7 +21993,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebootInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebootInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebootInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22578,7 +22018,6 @@ extension EC2Client { public func registerImage(input: RegisterImageInput) async throws -> RegisterImageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerImage") @@ -22602,7 +22041,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterImageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterImageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterImageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22618,7 +22057,6 @@ extension EC2Client { public func registerInstanceEventNotificationAttributes(input: RegisterInstanceEventNotificationAttributesInput) async throws -> RegisterInstanceEventNotificationAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerInstanceEventNotificationAttributes") @@ -22642,7 +22080,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterInstanceEventNotificationAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterInstanceEventNotificationAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterInstanceEventNotificationAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22658,7 +22096,6 @@ extension EC2Client { public func registerTransitGatewayMulticastGroupMembers(input: RegisterTransitGatewayMulticastGroupMembersInput) async throws -> RegisterTransitGatewayMulticastGroupMembersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerTransitGatewayMulticastGroupMembers") @@ -22682,7 +22119,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterTransitGatewayMulticastGroupMembersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterTransitGatewayMulticastGroupMembersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterTransitGatewayMulticastGroupMembersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22698,7 +22135,6 @@ extension EC2Client { public func registerTransitGatewayMulticastGroupSources(input: RegisterTransitGatewayMulticastGroupSourcesInput) async throws -> RegisterTransitGatewayMulticastGroupSourcesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerTransitGatewayMulticastGroupSources") @@ -22722,7 +22158,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterTransitGatewayMulticastGroupSourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterTransitGatewayMulticastGroupSourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterTransitGatewayMulticastGroupSourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22738,7 +22174,6 @@ extension EC2Client { public func rejectTransitGatewayMulticastDomainAssociations(input: RejectTransitGatewayMulticastDomainAssociationsInput) async throws -> RejectTransitGatewayMulticastDomainAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rejectTransitGatewayMulticastDomainAssociations") @@ -22762,7 +22197,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RejectTransitGatewayMulticastDomainAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RejectTransitGatewayMulticastDomainAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RejectTransitGatewayMulticastDomainAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22778,7 +22213,6 @@ extension EC2Client { public func rejectTransitGatewayPeeringAttachment(input: RejectTransitGatewayPeeringAttachmentInput) async throws -> RejectTransitGatewayPeeringAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rejectTransitGatewayPeeringAttachment") @@ -22802,7 +22236,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RejectTransitGatewayPeeringAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RejectTransitGatewayPeeringAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RejectTransitGatewayPeeringAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22818,7 +22252,6 @@ extension EC2Client { public func rejectTransitGatewayVpcAttachment(input: RejectTransitGatewayVpcAttachmentInput) async throws -> RejectTransitGatewayVpcAttachmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rejectTransitGatewayVpcAttachment") @@ -22842,7 +22275,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RejectTransitGatewayVpcAttachmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RejectTransitGatewayVpcAttachmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RejectTransitGatewayVpcAttachmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22858,7 +22291,6 @@ extension EC2Client { public func rejectVpcEndpointConnections(input: RejectVpcEndpointConnectionsInput) async throws -> RejectVpcEndpointConnectionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rejectVpcEndpointConnections") @@ -22882,7 +22314,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RejectVpcEndpointConnectionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RejectVpcEndpointConnectionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RejectVpcEndpointConnectionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22898,7 +22330,6 @@ extension EC2Client { public func rejectVpcPeeringConnection(input: RejectVpcPeeringConnectionInput) async throws -> RejectVpcPeeringConnectionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rejectVpcPeeringConnection") @@ -22922,7 +22353,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RejectVpcPeeringConnectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RejectVpcPeeringConnectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RejectVpcPeeringConnectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22938,7 +22369,6 @@ extension EC2Client { public func releaseAddress(input: ReleaseAddressInput) async throws -> ReleaseAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "releaseAddress") @@ -22962,7 +22392,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReleaseAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReleaseAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReleaseAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -22978,7 +22408,6 @@ extension EC2Client { public func releaseHosts(input: ReleaseHostsInput) async throws -> ReleaseHostsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "releaseHosts") @@ -23002,7 +22431,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReleaseHostsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReleaseHostsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReleaseHostsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23018,7 +22447,6 @@ extension EC2Client { public func releaseIpamPoolAllocation(input: ReleaseIpamPoolAllocationInput) async throws -> ReleaseIpamPoolAllocationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "releaseIpamPoolAllocation") @@ -23042,7 +22470,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReleaseIpamPoolAllocationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReleaseIpamPoolAllocationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReleaseIpamPoolAllocationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23058,7 +22486,6 @@ extension EC2Client { public func replaceIamInstanceProfileAssociation(input: ReplaceIamInstanceProfileAssociationInput) async throws -> ReplaceIamInstanceProfileAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "replaceIamInstanceProfileAssociation") @@ -23082,7 +22509,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReplaceIamInstanceProfileAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReplaceIamInstanceProfileAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReplaceIamInstanceProfileAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23098,7 +22525,6 @@ extension EC2Client { public func replaceNetworkAclAssociation(input: ReplaceNetworkAclAssociationInput) async throws -> ReplaceNetworkAclAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "replaceNetworkAclAssociation") @@ -23122,7 +22548,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReplaceNetworkAclAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReplaceNetworkAclAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReplaceNetworkAclAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23138,7 +22564,6 @@ extension EC2Client { public func replaceNetworkAclEntry(input: ReplaceNetworkAclEntryInput) async throws -> ReplaceNetworkAclEntryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "replaceNetworkAclEntry") @@ -23162,7 +22587,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReplaceNetworkAclEntryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReplaceNetworkAclEntryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReplaceNetworkAclEntryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23178,7 +22603,6 @@ extension EC2Client { public func replaceRoute(input: ReplaceRouteInput) async throws -> ReplaceRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "replaceRoute") @@ -23202,7 +22626,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReplaceRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReplaceRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReplaceRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23218,7 +22642,6 @@ extension EC2Client { public func replaceRouteTableAssociation(input: ReplaceRouteTableAssociationInput) async throws -> ReplaceRouteTableAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "replaceRouteTableAssociation") @@ -23242,7 +22665,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReplaceRouteTableAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReplaceRouteTableAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReplaceRouteTableAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23258,7 +22681,6 @@ extension EC2Client { public func replaceTransitGatewayRoute(input: ReplaceTransitGatewayRouteInput) async throws -> ReplaceTransitGatewayRouteOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "replaceTransitGatewayRoute") @@ -23282,7 +22704,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReplaceTransitGatewayRouteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReplaceTransitGatewayRouteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReplaceTransitGatewayRouteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23298,7 +22720,6 @@ extension EC2Client { public func replaceVpnTunnel(input: ReplaceVpnTunnelInput) async throws -> ReplaceVpnTunnelOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "replaceVpnTunnel") @@ -23322,7 +22743,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReplaceVpnTunnelOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReplaceVpnTunnelOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReplaceVpnTunnelOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23338,7 +22759,6 @@ extension EC2Client { public func reportInstanceStatus(input: ReportInstanceStatusInput) async throws -> ReportInstanceStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "reportInstanceStatus") @@ -23362,7 +22782,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReportInstanceStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReportInstanceStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReportInstanceStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23378,7 +22798,6 @@ extension EC2Client { public func requestSpotFleet(input: RequestSpotFleetInput) async throws -> RequestSpotFleetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "requestSpotFleet") @@ -23402,7 +22821,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RequestSpotFleetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RequestSpotFleetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RequestSpotFleetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23418,7 +22837,6 @@ extension EC2Client { public func requestSpotInstances(input: RequestSpotInstancesInput) async throws -> RequestSpotInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "requestSpotInstances") @@ -23442,7 +22860,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RequestSpotInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RequestSpotInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RequestSpotInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23458,7 +22876,6 @@ extension EC2Client { public func resetAddressAttribute(input: ResetAddressAttributeInput) async throws -> ResetAddressAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetAddressAttribute") @@ -23482,7 +22899,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetAddressAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetAddressAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetAddressAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23498,7 +22915,6 @@ extension EC2Client { public func resetEbsDefaultKmsKeyId(input: ResetEbsDefaultKmsKeyIdInput) async throws -> ResetEbsDefaultKmsKeyIdOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetEbsDefaultKmsKeyId") @@ -23522,7 +22938,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetEbsDefaultKmsKeyIdOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetEbsDefaultKmsKeyIdOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetEbsDefaultKmsKeyIdOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23538,7 +22954,6 @@ extension EC2Client { public func resetFpgaImageAttribute(input: ResetFpgaImageAttributeInput) async throws -> ResetFpgaImageAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetFpgaImageAttribute") @@ -23562,7 +22977,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetFpgaImageAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetFpgaImageAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetFpgaImageAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23578,7 +22993,6 @@ extension EC2Client { public func resetImageAttribute(input: ResetImageAttributeInput) async throws -> ResetImageAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetImageAttribute") @@ -23602,7 +23016,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetImageAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetImageAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetImageAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23618,7 +23032,6 @@ extension EC2Client { public func resetInstanceAttribute(input: ResetInstanceAttributeInput) async throws -> ResetInstanceAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetInstanceAttribute") @@ -23642,7 +23055,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetInstanceAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetInstanceAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetInstanceAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23658,7 +23071,6 @@ extension EC2Client { public func resetNetworkInterfaceAttribute(input: ResetNetworkInterfaceAttributeInput) async throws -> ResetNetworkInterfaceAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetNetworkInterfaceAttribute") @@ -23682,7 +23094,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetNetworkInterfaceAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetNetworkInterfaceAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetNetworkInterfaceAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23698,7 +23110,6 @@ extension EC2Client { public func resetSnapshotAttribute(input: ResetSnapshotAttributeInput) async throws -> ResetSnapshotAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetSnapshotAttribute") @@ -23722,7 +23133,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetSnapshotAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetSnapshotAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetSnapshotAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23738,7 +23149,6 @@ extension EC2Client { public func restoreAddressToClassic(input: RestoreAddressToClassicInput) async throws -> RestoreAddressToClassicOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreAddressToClassic") @@ -23762,7 +23172,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreAddressToClassicOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreAddressToClassicOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreAddressToClassicOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23778,7 +23188,6 @@ extension EC2Client { public func restoreImageFromRecycleBin(input: RestoreImageFromRecycleBinInput) async throws -> RestoreImageFromRecycleBinOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreImageFromRecycleBin") @@ -23802,7 +23211,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreImageFromRecycleBinOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreImageFromRecycleBinOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreImageFromRecycleBinOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23818,7 +23227,6 @@ extension EC2Client { public func restoreManagedPrefixListVersion(input: RestoreManagedPrefixListVersionInput) async throws -> RestoreManagedPrefixListVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreManagedPrefixListVersion") @@ -23842,7 +23250,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreManagedPrefixListVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreManagedPrefixListVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreManagedPrefixListVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23858,7 +23266,6 @@ extension EC2Client { public func restoreSnapshotFromRecycleBin(input: RestoreSnapshotFromRecycleBinInput) async throws -> RestoreSnapshotFromRecycleBinOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreSnapshotFromRecycleBin") @@ -23882,7 +23289,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreSnapshotFromRecycleBinOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreSnapshotFromRecycleBinOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreSnapshotFromRecycleBinOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23898,7 +23305,6 @@ extension EC2Client { public func restoreSnapshotTier(input: RestoreSnapshotTierInput) async throws -> RestoreSnapshotTierOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreSnapshotTier") @@ -23922,7 +23328,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreSnapshotTierOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreSnapshotTierOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreSnapshotTierOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23938,7 +23344,6 @@ extension EC2Client { public func revokeClientVpnIngress(input: RevokeClientVpnIngressInput) async throws -> RevokeClientVpnIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "revokeClientVpnIngress") @@ -23962,7 +23367,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RevokeClientVpnIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RevokeClientVpnIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RevokeClientVpnIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -23978,7 +23383,6 @@ extension EC2Client { public func revokeSecurityGroupEgress(input: RevokeSecurityGroupEgressInput) async throws -> RevokeSecurityGroupEgressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "revokeSecurityGroupEgress") @@ -24002,7 +23406,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RevokeSecurityGroupEgressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RevokeSecurityGroupEgressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RevokeSecurityGroupEgressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24018,7 +23422,6 @@ extension EC2Client { public func revokeSecurityGroupIngress(input: RevokeSecurityGroupIngressInput) async throws -> RevokeSecurityGroupIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "revokeSecurityGroupIngress") @@ -24042,7 +23445,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RevokeSecurityGroupIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RevokeSecurityGroupIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RevokeSecurityGroupIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24071,7 +23474,6 @@ extension EC2Client { public func runInstances(input: RunInstancesInput) async throws -> RunInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "runInstances") @@ -24096,7 +23498,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RunInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RunInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RunInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24112,7 +23514,6 @@ extension EC2Client { public func runScheduledInstances(input: RunScheduledInstancesInput) async throws -> RunScheduledInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "runScheduledInstances") @@ -24137,7 +23538,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RunScheduledInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RunScheduledInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RunScheduledInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24153,7 +23554,6 @@ extension EC2Client { public func searchLocalGatewayRoutes(input: SearchLocalGatewayRoutesInput) async throws -> SearchLocalGatewayRoutesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "searchLocalGatewayRoutes") @@ -24177,7 +23577,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SearchLocalGatewayRoutesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SearchLocalGatewayRoutesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SearchLocalGatewayRoutesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24193,7 +23593,6 @@ extension EC2Client { public func searchTransitGatewayMulticastGroups(input: SearchTransitGatewayMulticastGroupsInput) async throws -> SearchTransitGatewayMulticastGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "searchTransitGatewayMulticastGroups") @@ -24217,7 +23616,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SearchTransitGatewayMulticastGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SearchTransitGatewayMulticastGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SearchTransitGatewayMulticastGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24233,7 +23632,6 @@ extension EC2Client { public func searchTransitGatewayRoutes(input: SearchTransitGatewayRoutesInput) async throws -> SearchTransitGatewayRoutesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "searchTransitGatewayRoutes") @@ -24257,7 +23655,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SearchTransitGatewayRoutesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SearchTransitGatewayRoutesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SearchTransitGatewayRoutesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24273,7 +23671,6 @@ extension EC2Client { public func sendDiagnosticInterrupt(input: SendDiagnosticInterruptInput) async throws -> SendDiagnosticInterruptOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "sendDiagnosticInterrupt") @@ -24297,7 +23694,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SendDiagnosticInterruptOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SendDiagnosticInterruptOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SendDiagnosticInterruptOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24313,7 +23710,6 @@ extension EC2Client { public func startInstances(input: StartInstancesInput) async throws -> StartInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startInstances") @@ -24337,7 +23733,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24353,7 +23749,6 @@ extension EC2Client { public func startNetworkInsightsAccessScopeAnalysis(input: StartNetworkInsightsAccessScopeAnalysisInput) async throws -> StartNetworkInsightsAccessScopeAnalysisOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startNetworkInsightsAccessScopeAnalysis") @@ -24378,7 +23773,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartNetworkInsightsAccessScopeAnalysisOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartNetworkInsightsAccessScopeAnalysisOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartNetworkInsightsAccessScopeAnalysisOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24394,7 +23789,6 @@ extension EC2Client { public func startNetworkInsightsAnalysis(input: StartNetworkInsightsAnalysisInput) async throws -> StartNetworkInsightsAnalysisOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startNetworkInsightsAnalysis") @@ -24419,7 +23813,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartNetworkInsightsAnalysisOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartNetworkInsightsAnalysisOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartNetworkInsightsAnalysisOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24435,7 +23829,6 @@ extension EC2Client { public func startVpcEndpointServicePrivateDnsVerification(input: StartVpcEndpointServicePrivateDnsVerificationInput) async throws -> StartVpcEndpointServicePrivateDnsVerificationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startVpcEndpointServicePrivateDnsVerification") @@ -24459,7 +23852,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartVpcEndpointServicePrivateDnsVerificationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartVpcEndpointServicePrivateDnsVerificationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartVpcEndpointServicePrivateDnsVerificationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24475,7 +23868,6 @@ extension EC2Client { public func stopInstances(input: StopInstancesInput) async throws -> StopInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopInstances") @@ -24499,7 +23891,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24515,7 +23907,6 @@ extension EC2Client { public func terminateClientVpnConnections(input: TerminateClientVpnConnectionsInput) async throws -> TerminateClientVpnConnectionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "terminateClientVpnConnections") @@ -24539,7 +23930,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TerminateClientVpnConnectionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TerminateClientVpnConnectionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TerminateClientVpnConnectionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24580,7 +23971,6 @@ extension EC2Client { public func terminateInstances(input: TerminateInstancesInput) async throws -> TerminateInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "terminateInstances") @@ -24604,7 +23994,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TerminateInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TerminateInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TerminateInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24620,7 +24010,6 @@ extension EC2Client { public func unassignIpv6Addresses(input: UnassignIpv6AddressesInput) async throws -> UnassignIpv6AddressesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "unassignIpv6Addresses") @@ -24644,7 +24033,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UnassignIpv6AddressesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UnassignIpv6AddressesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UnassignIpv6AddressesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24660,7 +24049,6 @@ extension EC2Client { public func unassignPrivateIpAddresses(input: UnassignPrivateIpAddressesInput) async throws -> UnassignPrivateIpAddressesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "unassignPrivateIpAddresses") @@ -24684,7 +24072,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UnassignPrivateIpAddressesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UnassignPrivateIpAddressesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UnassignPrivateIpAddressesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24700,7 +24088,6 @@ extension EC2Client { public func unassignPrivateNatGatewayAddress(input: UnassignPrivateNatGatewayAddressInput) async throws -> UnassignPrivateNatGatewayAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "unassignPrivateNatGatewayAddress") @@ -24724,7 +24111,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UnassignPrivateNatGatewayAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UnassignPrivateNatGatewayAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UnassignPrivateNatGatewayAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24740,7 +24127,6 @@ extension EC2Client { public func unlockSnapshot(input: UnlockSnapshotInput) async throws -> UnlockSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "unlockSnapshot") @@ -24764,7 +24150,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UnlockSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UnlockSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UnlockSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24780,7 +24166,6 @@ extension EC2Client { public func unmonitorInstances(input: UnmonitorInstancesInput) async throws -> UnmonitorInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "unmonitorInstances") @@ -24804,7 +24189,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UnmonitorInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UnmonitorInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UnmonitorInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24820,7 +24205,6 @@ extension EC2Client { public func updateSecurityGroupRuleDescriptionsEgress(input: UpdateSecurityGroupRuleDescriptionsEgressInput) async throws -> UpdateSecurityGroupRuleDescriptionsEgressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateSecurityGroupRuleDescriptionsEgress") @@ -24844,7 +24228,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateSecurityGroupRuleDescriptionsEgressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateSecurityGroupRuleDescriptionsEgressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateSecurityGroupRuleDescriptionsEgressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24860,7 +24244,6 @@ extension EC2Client { public func updateSecurityGroupRuleDescriptionsIngress(input: UpdateSecurityGroupRuleDescriptionsIngressInput) async throws -> UpdateSecurityGroupRuleDescriptionsIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateSecurityGroupRuleDescriptionsIngress") @@ -24884,7 +24267,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateSecurityGroupRuleDescriptionsIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateSecurityGroupRuleDescriptionsIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateSecurityGroupRuleDescriptionsIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -24900,7 +24283,6 @@ extension EC2Client { public func withdrawByoipCidr(input: WithdrawByoipCidrInput) async throws -> WithdrawByoipCidrOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "withdrawByoipCidr") @@ -24924,7 +24306,7 @@ extension EC2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(WithdrawByoipCidrOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(WithdrawByoipCidrOutput.httpBinding, responseDocumentBinding), responseErrorClosure(WithdrawByoipCidrOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSEC2/models/Models.swift b/Sources/Services/AWSEC2/models/Models.swift index 7b6f9c591b5..b28def66f31 100644 --- a/Sources/Services/AWSEC2/models/Models.swift +++ b/Sources/Services/AWSEC2/models/Models.swift @@ -1,12 +1,10 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML -extension EC2ClientTypes.AcceleratorCount: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.AcceleratorCount: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -18,12 +16,14 @@ extension EC2ClientTypes.AcceleratorCount: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AcceleratorCount() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -47,11 +47,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AcceleratorCountRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.AcceleratorCountRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -63,12 +59,14 @@ extension EC2ClientTypes.AcceleratorCountRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AcceleratorCountRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -195,11 +193,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AcceleratorTotalMemoryMiB: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.AcceleratorTotalMemoryMiB: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -211,12 +205,14 @@ extension EC2ClientTypes.AcceleratorTotalMemoryMiB: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AcceleratorTotalMemoryMiB() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -240,11 +236,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AcceleratorTotalMemoryMiBRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.AcceleratorTotalMemoryMiBRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -256,12 +248,14 @@ extension EC2ClientTypes.AcceleratorTotalMemoryMiBRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AcceleratorTotalMemoryMiBRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -374,55 +368,15 @@ public struct AcceptAddressTransferInput: Swift.Equatable { } } -struct AcceptAddressTransferInputBody: Swift.Equatable { - let address: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension AcceptAddressTransferInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "Address" - case dryRun = "DryRun" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AcceptAddressTransferOutput { -extension AcceptAddressTransferOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AcceptAddressTransferOutputBody = try responseDecoder.decode(responseBody: data) - self.addressTransfer = output.addressTransfer - } else { - self.addressTransfer = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AcceptAddressTransferOutput() + value.addressTransfer = try reader["addressTransfer"].readIfPresent(readingClosure: EC2ClientTypes.AddressTransfer.readingClosure) + return value } } } @@ -439,27 +393,18 @@ public struct AcceptAddressTransferOutput: Swift.Equatable { } } -struct AcceptAddressTransferOutputBody: Swift.Equatable { - let addressTransfer: EC2ClientTypes.AddressTransfer? -} - -extension AcceptAddressTransferOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressTransfer = "addressTransfer" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressTransferDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressTransfer.self, forKey: .addressTransfer) - addressTransfer = addressTransferDecoded - } -} +enum AcceptAddressTransferOutputError { -enum AcceptAddressTransferOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -528,72 +473,15 @@ public struct AcceptReservedInstancesExchangeQuoteInput: Swift.Equatable { } } -struct AcceptReservedInstancesExchangeQuoteInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let reservedInstanceIds: [Swift.String]? - let targetConfigurations: [EC2ClientTypes.TargetConfigurationRequest]? -} - -extension AcceptReservedInstancesExchangeQuoteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case reservedInstanceIds = "ReservedInstanceId" - case targetConfigurations = "TargetConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.reservedInstanceIds) { - struct KeyVal0{struct ReservedInstanceId{}} - let reservedInstanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstanceIds) - if let reservedInstanceIdsWrappedContainer = reservedInstanceIdsWrappedContainer { - let reservedInstanceIdsContainer = try reservedInstanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var reservedInstanceIdsBuffer:[Swift.String]? = nil - if let reservedInstanceIdsContainer = reservedInstanceIdsContainer { - reservedInstanceIdsBuffer = [Swift.String]() - for stringContainer0 in reservedInstanceIdsContainer { - reservedInstanceIdsBuffer?.append(stringContainer0) - } - } - reservedInstanceIds = reservedInstanceIdsBuffer - } else { - reservedInstanceIds = [] - } - } else { - reservedInstanceIds = nil - } - if containerValues.contains(.targetConfigurations) { - struct KeyVal0{struct TargetConfigurationRequest{}} - let targetConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetConfigurations) - if let targetConfigurationsWrappedContainer = targetConfigurationsWrappedContainer { - let targetConfigurationsContainer = try targetConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TargetConfigurationRequest].self, forKey: .member) - var targetConfigurationsBuffer:[EC2ClientTypes.TargetConfigurationRequest]? = nil - if let targetConfigurationsContainer = targetConfigurationsContainer { - targetConfigurationsBuffer = [EC2ClientTypes.TargetConfigurationRequest]() - for structureContainer0 in targetConfigurationsContainer { - targetConfigurationsBuffer?.append(structureContainer0) - } - } - targetConfigurations = targetConfigurationsBuffer - } else { - targetConfigurations = [] - } - } else { - targetConfigurations = nil - } - } -} +extension AcceptReservedInstancesExchangeQuoteOutput { -extension AcceptReservedInstancesExchangeQuoteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AcceptReservedInstancesExchangeQuoteOutputBody = try responseDecoder.decode(responseBody: data) - self.exchangeId = output.exchangeId - } else { - self.exchangeId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AcceptReservedInstancesExchangeQuoteOutput() + value.exchangeId = try reader["exchangeId"].readIfPresent() + return value } } } @@ -611,27 +499,18 @@ public struct AcceptReservedInstancesExchangeQuoteOutput: Swift.Equatable { } } -struct AcceptReservedInstancesExchangeQuoteOutputBody: Swift.Equatable { - let exchangeId: Swift.String? -} - -extension AcceptReservedInstancesExchangeQuoteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exchangeId = "exchangeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exchangeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exchangeId) - exchangeId = exchangeIdDecoded - } -} +enum AcceptReservedInstancesExchangeQuoteOutputError { -enum AcceptReservedInstancesExchangeQuoteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -696,59 +575,15 @@ public struct AcceptTransitGatewayMulticastDomainAssociationsInput: Swift.Equata } } -struct AcceptTransitGatewayMulticastDomainAssociationsInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let subnetIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension AcceptTransitGatewayMulticastDomainAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case subnetIds = "SubnetIds" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } +extension AcceptTransitGatewayMulticastDomainAssociationsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension AcceptTransitGatewayMulticastDomainAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AcceptTransitGatewayMulticastDomainAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.associations = output.associations - } else { - self.associations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AcceptTransitGatewayMulticastDomainAssociationsOutput() + value.associations = try reader["associations"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDomainAssociations.readingClosure) + return value } } } @@ -765,27 +600,18 @@ public struct AcceptTransitGatewayMulticastDomainAssociationsOutput: Swift.Equat } } -struct AcceptTransitGatewayMulticastDomainAssociationsOutputBody: Swift.Equatable { - let associations: EC2ClientTypes.TransitGatewayMulticastDomainAssociations? -} - -extension AcceptTransitGatewayMulticastDomainAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "associations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDomainAssociations.self, forKey: .associations) - associations = associationsDecoded - } -} +enum AcceptTransitGatewayMulticastDomainAssociationsOutputError { -enum AcceptTransitGatewayMulticastDomainAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -828,34 +654,15 @@ public struct AcceptTransitGatewayPeeringAttachmentInput: Swift.Equatable { } } -struct AcceptTransitGatewayPeeringAttachmentInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension AcceptTransitGatewayPeeringAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AcceptTransitGatewayPeeringAttachmentOutput { -extension AcceptTransitGatewayPeeringAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AcceptTransitGatewayPeeringAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPeeringAttachment = output.transitGatewayPeeringAttachment - } else { - self.transitGatewayPeeringAttachment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AcceptTransitGatewayPeeringAttachmentOutput() + value.transitGatewayPeeringAttachment = try reader["transitGatewayPeeringAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPeeringAttachment.readingClosure) + return value } } } @@ -872,27 +679,18 @@ public struct AcceptTransitGatewayPeeringAttachmentOutput: Swift.Equatable { } } -struct AcceptTransitGatewayPeeringAttachmentOutputBody: Swift.Equatable { - let transitGatewayPeeringAttachment: EC2ClientTypes.TransitGatewayPeeringAttachment? -} - -extension AcceptTransitGatewayPeeringAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPeeringAttachment = "transitGatewayPeeringAttachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPeeringAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPeeringAttachment.self, forKey: .transitGatewayPeeringAttachment) - transitGatewayPeeringAttachment = transitGatewayPeeringAttachmentDecoded - } -} +enum AcceptTransitGatewayPeeringAttachmentOutputError { -enum AcceptTransitGatewayPeeringAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -935,34 +733,15 @@ public struct AcceptTransitGatewayVpcAttachmentInput: Swift.Equatable { } } -struct AcceptTransitGatewayVpcAttachmentInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension AcceptTransitGatewayVpcAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } +extension AcceptTransitGatewayVpcAttachmentOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension AcceptTransitGatewayVpcAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AcceptTransitGatewayVpcAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayVpcAttachment = output.transitGatewayVpcAttachment - } else { - self.transitGatewayVpcAttachment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AcceptTransitGatewayVpcAttachmentOutput() + value.transitGatewayVpcAttachment = try reader["transitGatewayVpcAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayVpcAttachment.readingClosure) + return value } } } @@ -979,27 +758,18 @@ public struct AcceptTransitGatewayVpcAttachmentOutput: Swift.Equatable { } } -struct AcceptTransitGatewayVpcAttachmentOutputBody: Swift.Equatable { - let transitGatewayVpcAttachment: EC2ClientTypes.TransitGatewayVpcAttachment? -} - -extension AcceptTransitGatewayVpcAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayVpcAttachment = "transitGatewayVpcAttachment" - } +enum AcceptTransitGatewayVpcAttachmentOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayVpcAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayVpcAttachment.self, forKey: .transitGatewayVpcAttachment) - transitGatewayVpcAttachment = transitGatewayVpcAttachmentDecoded - } -} - -enum AcceptTransitGatewayVpcAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -1059,55 +829,15 @@ public struct AcceptVpcEndpointConnectionsInput: Swift.Equatable { } } -struct AcceptVpcEndpointConnectionsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceId: Swift.String? - let vpcEndpointIds: [Swift.String]? -} - -extension AcceptVpcEndpointConnectionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case serviceId = "ServiceId" - case vpcEndpointIds = "VpcEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - if containerValues.contains(.vpcEndpointIds) { - struct KeyVal0{struct item{}} - let vpcEndpointIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcEndpointIds) - if let vpcEndpointIdsWrappedContainer = vpcEndpointIdsWrappedContainer { - let vpcEndpointIdsContainer = try vpcEndpointIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcEndpointIdsBuffer:[Swift.String]? = nil - if let vpcEndpointIdsContainer = vpcEndpointIdsContainer { - vpcEndpointIdsBuffer = [Swift.String]() - for stringContainer0 in vpcEndpointIdsContainer { - vpcEndpointIdsBuffer?.append(stringContainer0) - } - } - vpcEndpointIds = vpcEndpointIdsBuffer - } else { - vpcEndpointIds = [] - } - } else { - vpcEndpointIds = nil - } - } -} +extension AcceptVpcEndpointConnectionsOutput { -extension AcceptVpcEndpointConnectionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AcceptVpcEndpointConnectionsOutputBody = try responseDecoder.decode(responseBody: data) - self.unsuccessful = output.unsuccessful - } else { - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AcceptVpcEndpointConnectionsOutput() + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -1124,44 +854,18 @@ public struct AcceptVpcEndpointConnectionsOutput: Swift.Equatable { } } -struct AcceptVpcEndpointConnectionsOutputBody: Swift.Equatable { - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension AcceptVpcEndpointConnectionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case unsuccessful = "unsuccessful" - } +enum AcceptVpcEndpointConnectionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum AcceptVpcEndpointConnectionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -1204,34 +908,15 @@ public struct AcceptVpcPeeringConnectionInput: Swift.Equatable { } } -struct AcceptVpcPeeringConnectionInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcPeeringConnectionId: Swift.String? -} - -extension AcceptVpcPeeringConnectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - } -} +extension AcceptVpcPeeringConnectionOutput { -extension AcceptVpcPeeringConnectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AcceptVpcPeeringConnectionOutputBody = try responseDecoder.decode(responseBody: data) - self.vpcPeeringConnection = output.vpcPeeringConnection - } else { - self.vpcPeeringConnection = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AcceptVpcPeeringConnectionOutput() + value.vpcPeeringConnection = try reader["vpcPeeringConnection"].readIfPresent(readingClosure: EC2ClientTypes.VpcPeeringConnection.readingClosure) + return value } } } @@ -1248,38 +933,23 @@ public struct AcceptVpcPeeringConnectionOutput: Swift.Equatable { } } -struct AcceptVpcPeeringConnectionOutputBody: Swift.Equatable { - let vpcPeeringConnection: EC2ClientTypes.VpcPeeringConnection? -} - -extension AcceptVpcPeeringConnectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpcPeeringConnection = "vpcPeeringConnection" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcPeeringConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcPeeringConnection.self, forKey: .vpcPeeringConnection) - vpcPeeringConnection = vpcPeeringConnectionDecoded - } -} +enum AcceptVpcPeeringConnectionOutputError { -enum AcceptVpcPeeringConnectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.AccessScopeAnalysisFinding: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case findingComponents = "findingComponentSet" - case findingId = "findingId" - case networkInsightsAccessScopeAnalysisId = "networkInsightsAccessScopeAnalysisId" - case networkInsightsAccessScopeId = "networkInsightsAccessScopeId" - } +extension EC2ClientTypes.AccessScopeAnalysisFinding: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1306,32 +976,15 @@ extension EC2ClientTypes.AccessScopeAnalysisFinding: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeAnalysisId) - networkInsightsAccessScopeAnalysisId = networkInsightsAccessScopeAnalysisIdDecoded - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - let findingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .findingId) - findingId = findingIdDecoded - if containerValues.contains(.findingComponents) { - struct KeyVal0{struct item{}} - let findingComponentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .findingComponents) - if let findingComponentsWrappedContainer = findingComponentsWrappedContainer { - let findingComponentsContainer = try findingComponentsWrappedContainer.decodeIfPresent([EC2ClientTypes.PathComponent].self, forKey: .member) - var findingComponentsBuffer:[EC2ClientTypes.PathComponent]? = nil - if let findingComponentsContainer = findingComponentsContainer { - findingComponentsBuffer = [EC2ClientTypes.PathComponent]() - for structureContainer0 in findingComponentsContainer { - findingComponentsBuffer?.append(structureContainer0) - } - } - findingComponents = findingComponentsBuffer - } else { - findingComponents = [] - } - } else { - findingComponents = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AccessScopeAnalysisFinding() + value.networkInsightsAccessScopeAnalysisId = try reader["networkInsightsAccessScopeAnalysisId"].readIfPresent() + value.networkInsightsAccessScopeId = try reader["networkInsightsAccessScopeId"].readIfPresent() + value.findingId = try reader["findingId"].readIfPresent() + value.findingComponents = try reader["findingComponentSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PathComponent.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -1364,12 +1017,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AccessScopePath: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "destination" - case source = "source" - case throughResources = "throughResourceSet" - } +extension EC2ClientTypes.AccessScopePath: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1393,30 +1041,14 @@ extension EC2ClientTypes.AccessScopePath: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PathStatement.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PathStatement.self, forKey: .destination) - destination = destinationDecoded - if containerValues.contains(.throughResources) { - struct KeyVal0{struct item{}} - let throughResourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .throughResources) - if let throughResourcesWrappedContainer = throughResourcesWrappedContainer { - let throughResourcesContainer = try throughResourcesWrappedContainer.decodeIfPresent([EC2ClientTypes.ThroughResourcesStatement].self, forKey: .member) - var throughResourcesBuffer:[EC2ClientTypes.ThroughResourcesStatement]? = nil - if let throughResourcesContainer = throughResourcesContainer { - throughResourcesBuffer = [EC2ClientTypes.ThroughResourcesStatement]() - for structureContainer0 in throughResourcesContainer { - throughResourcesBuffer?.append(structureContainer0) - } - } - throughResources = throughResourcesBuffer - } else { - throughResources = [] - } - } else { - throughResources = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AccessScopePath() + value.source = try reader["source"].readIfPresent(readingClosure: EC2ClientTypes.PathStatement.readingClosure) + value.destination = try reader["destination"].readIfPresent(readingClosure: EC2ClientTypes.PathStatement.readingClosure) + value.throughResources = try reader["throughResourceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ThroughResourcesStatement.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -1445,12 +1077,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AccessScopePathRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "Destination" - case source = "Source" - case throughResources = "ThroughResource" - } +extension EC2ClientTypes.AccessScopePathRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1474,30 +1101,14 @@ extension EC2ClientTypes.AccessScopePathRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PathStatementRequest.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PathStatementRequest.self, forKey: .destination) - destination = destinationDecoded - if containerValues.contains(.throughResources) { - struct KeyVal0{struct item{}} - let throughResourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .throughResources) - if let throughResourcesWrappedContainer = throughResourcesWrappedContainer { - let throughResourcesContainer = try throughResourcesWrappedContainer.decodeIfPresent([EC2ClientTypes.ThroughResourcesStatementRequest].self, forKey: .member) - var throughResourcesBuffer:[EC2ClientTypes.ThroughResourcesStatementRequest]? = nil - if let throughResourcesContainer = throughResourcesContainer { - throughResourcesBuffer = [EC2ClientTypes.ThroughResourcesStatementRequest]() - for structureContainer0 in throughResourcesContainer { - throughResourcesBuffer?.append(structureContainer0) - } - } - throughResources = throughResourcesBuffer - } else { - throughResources = [] - } - } else { - throughResources = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AccessScopePathRequest() + value.source = try reader["Source"].readIfPresent(readingClosure: EC2ClientTypes.PathStatementRequest.readingClosure) + value.destination = try reader["Destination"].readIfPresent(readingClosure: EC2ClientTypes.PathStatementRequest.readingClosure) + value.throughResources = try reader["ThroughResource"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ThroughResourcesStatementRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -1526,11 +1137,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AccountAttribute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeName = "attributeName" - case attributeValues = "attributeValueSet" - } +extension EC2ClientTypes.AccountAttribute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1551,28 +1158,13 @@ extension EC2ClientTypes.AccountAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.attributeValues) { - struct KeyVal0{struct item{}} - let attributeValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeValues) - if let attributeValuesWrappedContainer = attributeValuesWrappedContainer { - let attributeValuesContainer = try attributeValuesWrappedContainer.decodeIfPresent([EC2ClientTypes.AccountAttributeValue].self, forKey: .member) - var attributeValuesBuffer:[EC2ClientTypes.AccountAttributeValue]? = nil - if let attributeValuesContainer = attributeValuesContainer { - attributeValuesBuffer = [EC2ClientTypes.AccountAttributeValue]() - for structureContainer0 in attributeValuesContainer { - attributeValuesBuffer?.append(structureContainer0) - } - } - attributeValues = attributeValuesBuffer - } else { - attributeValues = [] - } - } else { - attributeValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AccountAttribute() + value.attributeName = try reader["attributeName"].readIfPresent() + value.attributeValues = try reader["attributeValueSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AccountAttributeValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -1629,10 +1221,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AccountAttributeValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeValue = "attributeValue" - } +extension EC2ClientTypes.AccountAttributeValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1641,10 +1230,13 @@ extension EC2ClientTypes.AccountAttributeValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeValue) - attributeValue = attributeValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AccountAttributeValue() + value.attributeValue = try reader["attributeValue"].readIfPresent() + return value + } } } @@ -1664,13 +1256,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ActiveInstance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceHealth = "instanceHealth" - case instanceId = "instanceId" - case instanceType = "instanceType" - case spotInstanceRequestId = "spotInstanceRequestId" - } +extension EC2ClientTypes.ActiveInstance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1688,16 +1274,16 @@ extension EC2ClientTypes.ActiveInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let spotInstanceRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotInstanceRequestId) - spotInstanceRequestId = spotInstanceRequestIdDecoded - let instanceHealthDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceHealthStatus.self, forKey: .instanceHealth) - instanceHealth = instanceHealthDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ActiveInstance() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.spotInstanceRequestId = try reader["spotInstanceRequestId"].readIfPresent() + value.instanceHealth = try reader["instanceHealth"].readIfPresent() + return value + } } } @@ -1767,10 +1353,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AddIpamOperatingRegion: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case regionName = "RegionName" - } +extension EC2ClientTypes.AddIpamOperatingRegion: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1779,10 +1362,13 @@ extension EC2ClientTypes.AddIpamOperatingRegion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .regionName) - regionName = regionNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AddIpamOperatingRegion() + value.regionName = try reader["RegionName"].readIfPresent() + return value + } } } @@ -1802,11 +1388,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AddPrefixListEntry: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case description = "Description" - } +extension EC2ClientTypes.AddPrefixListEntry: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1818,12 +1400,14 @@ extension EC2ClientTypes.AddPrefixListEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AddPrefixListEntry() + value.cidr = try reader["Cidr"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -1848,13 +1432,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AddedPrincipal: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case principal = "principal" - case principalType = "principalType" - case serviceId = "serviceId" - case servicePermissionId = "servicePermissionId" - } +extension EC2ClientTypes.AddedPrincipal: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1872,16 +1450,16 @@ extension EC2ClientTypes.AddedPrincipal: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let principalTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PrincipalType.self, forKey: .principalType) - principalType = principalTypeDecoded - let principalDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .principal) - principal = principalDecoded - let servicePermissionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .servicePermissionId) - servicePermissionId = servicePermissionIdDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AddedPrincipal() + value.principalType = try reader["principalType"].readIfPresent() + value.principal = try reader["principal"].readIfPresent() + value.servicePermissionId = try reader["servicePermissionId"].readIfPresent() + value.serviceId = try reader["serviceId"].readIfPresent() + return value + } } } @@ -1913,17 +1491,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AdditionalDetail: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalDetailType = "additionalDetailType" - case component = "component" - case loadBalancers = "loadBalancerSet" - case ruleGroupRuleOptionsPairs = "ruleGroupRuleOptionsPairSet" - case ruleGroupTypePairs = "ruleGroupTypePairSet" - case ruleOptions = "ruleOptionSet" - case serviceName = "serviceName" - case vpcEndpointService = "vpcEndpointService" - } +extension EC2ClientTypes.AdditionalDetail: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -1989,91 +1557,19 @@ extension EC2ClientTypes.AdditionalDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let additionalDetailTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .additionalDetailType) - additionalDetailType = additionalDetailTypeDecoded - let componentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .component) - component = componentDecoded - let vpcEndpointServiceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .vpcEndpointService) - vpcEndpointService = vpcEndpointServiceDecoded - if containerValues.contains(.ruleOptions) { - struct KeyVal0{struct item{}} - let ruleOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleOptions) - if let ruleOptionsWrappedContainer = ruleOptionsWrappedContainer { - let ruleOptionsContainer = try ruleOptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.RuleOption].self, forKey: .member) - var ruleOptionsBuffer:[EC2ClientTypes.RuleOption]? = nil - if let ruleOptionsContainer = ruleOptionsContainer { - ruleOptionsBuffer = [EC2ClientTypes.RuleOption]() - for structureContainer0 in ruleOptionsContainer { - ruleOptionsBuffer?.append(structureContainer0) - } - } - ruleOptions = ruleOptionsBuffer - } else { - ruleOptions = [] - } - } else { - ruleOptions = nil - } - if containerValues.contains(.ruleGroupTypePairs) { - struct KeyVal0{struct item{}} - let ruleGroupTypePairsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleGroupTypePairs) - if let ruleGroupTypePairsWrappedContainer = ruleGroupTypePairsWrappedContainer { - let ruleGroupTypePairsContainer = try ruleGroupTypePairsWrappedContainer.decodeIfPresent([EC2ClientTypes.RuleGroupTypePair].self, forKey: .member) - var ruleGroupTypePairsBuffer:[EC2ClientTypes.RuleGroupTypePair]? = nil - if let ruleGroupTypePairsContainer = ruleGroupTypePairsContainer { - ruleGroupTypePairsBuffer = [EC2ClientTypes.RuleGroupTypePair]() - for structureContainer0 in ruleGroupTypePairsContainer { - ruleGroupTypePairsBuffer?.append(structureContainer0) - } - } - ruleGroupTypePairs = ruleGroupTypePairsBuffer - } else { - ruleGroupTypePairs = [] - } - } else { - ruleGroupTypePairs = nil - } - if containerValues.contains(.ruleGroupRuleOptionsPairs) { - struct KeyVal0{struct item{}} - let ruleGroupRuleOptionsPairsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleGroupRuleOptionsPairs) - if let ruleGroupRuleOptionsPairsWrappedContainer = ruleGroupRuleOptionsPairsWrappedContainer { - let ruleGroupRuleOptionsPairsContainer = try ruleGroupRuleOptionsPairsWrappedContainer.decodeIfPresent([EC2ClientTypes.RuleGroupRuleOptionsPair].self, forKey: .member) - var ruleGroupRuleOptionsPairsBuffer:[EC2ClientTypes.RuleGroupRuleOptionsPair]? = nil - if let ruleGroupRuleOptionsPairsContainer = ruleGroupRuleOptionsPairsContainer { - ruleGroupRuleOptionsPairsBuffer = [EC2ClientTypes.RuleGroupRuleOptionsPair]() - for structureContainer0 in ruleGroupRuleOptionsPairsContainer { - ruleGroupRuleOptionsPairsBuffer?.append(structureContainer0) - } - } - ruleGroupRuleOptionsPairs = ruleGroupRuleOptionsPairsBuffer - } else { - ruleGroupRuleOptionsPairs = [] - } - } else { - ruleGroupRuleOptionsPairs = nil - } - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - if containerValues.contains(.loadBalancers) { - struct KeyVal0{struct item{}} - let loadBalancersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancers) - if let loadBalancersWrappedContainer = loadBalancersWrappedContainer { - let loadBalancersContainer = try loadBalancersWrappedContainer.decodeIfPresent([EC2ClientTypes.AnalysisComponent].self, forKey: .member) - var loadBalancersBuffer:[EC2ClientTypes.AnalysisComponent]? = nil - if let loadBalancersContainer = loadBalancersContainer { - loadBalancersBuffer = [EC2ClientTypes.AnalysisComponent]() - for structureContainer0 in loadBalancersContainer { - loadBalancersBuffer?.append(structureContainer0) - } - } - loadBalancers = loadBalancersBuffer - } else { - loadBalancers = [] - } - } else { - loadBalancers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AdditionalDetail() + value.additionalDetailType = try reader["additionalDetailType"].readIfPresent() + value.component = try reader["component"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.vpcEndpointService = try reader["vpcEndpointService"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.ruleOptions = try reader["ruleOptionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RuleOption.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ruleGroupTypePairs = try reader["ruleGroupTypePairSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RuleGroupTypePair.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ruleGroupRuleOptionsPairs = try reader["ruleGroupRuleOptionsPairSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RuleGroupRuleOptionsPair.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.serviceName = try reader["serviceName"].readIfPresent() + value.loadBalancers = try reader["loadBalancerSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AnalysisComponent.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -2122,23 +1618,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Address: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "allocationId" - case associationId = "associationId" - case carrierIp = "carrierIp" - case customerOwnedIp = "customerOwnedIp" - case customerOwnedIpv4Pool = "customerOwnedIpv4Pool" - case domain = "domain" - case instanceId = "instanceId" - case networkBorderGroup = "networkBorderGroup" - case networkInterfaceId = "networkInterfaceId" - case networkInterfaceOwnerId = "networkInterfaceOwnerId" - case privateIpAddress = "privateIpAddress" - case publicIp = "publicIp" - case publicIpv4Pool = "publicIpv4Pool" - case tags = "tagSet" - } +extension EC2ClientTypes.Address: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -2195,53 +1675,26 @@ extension EC2ClientTypes.Address: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let domainDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DomainType.self, forKey: .domain) - domain = domainDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let networkInterfaceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceOwnerId) - networkInterfaceOwnerId = networkInterfaceOwnerIdDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let publicIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIpv4Pool) - publicIpv4Pool = publicIpv4PoolDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - let customerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIp) - customerOwnedIp = customerOwnedIpDecoded - let customerOwnedIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIpv4Pool) - customerOwnedIpv4Pool = customerOwnedIpv4PoolDecoded - let carrierIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierIp) - carrierIp = carrierIpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Address() + value.instanceId = try reader["instanceId"].readIfPresent() + value.publicIp = try reader["publicIp"].readIfPresent() + value.allocationId = try reader["allocationId"].readIfPresent() + value.associationId = try reader["associationId"].readIfPresent() + value.domain = try reader["domain"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.networkInterfaceOwnerId = try reader["networkInterfaceOwnerId"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.publicIpv4Pool = try reader["publicIpv4Pool"].readIfPresent() + value.networkBorderGroup = try reader["networkBorderGroup"].readIfPresent() + value.customerOwnedIp = try reader["customerOwnedIp"].readIfPresent() + value.customerOwnedIpv4Pool = try reader["customerOwnedIpv4Pool"].readIfPresent() + value.carrierIp = try reader["carrierIp"].readIfPresent() + return value + } } } @@ -2313,13 +1766,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AddressAttribute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "allocationId" - case ptrRecord = "ptrRecord" - case ptrRecordUpdate = "ptrRecordUpdate" - case publicIp = "publicIp" - } +extension EC2ClientTypes.AddressAttribute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -2337,16 +1784,16 @@ extension EC2ClientTypes.AddressAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let ptrRecordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ptrRecord) - ptrRecord = ptrRecordDecoded - let ptrRecordUpdateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PtrUpdateStatus.self, forKey: .ptrRecordUpdate) - ptrRecordUpdate = ptrRecordUpdateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AddressAttribute() + value.publicIp = try reader["publicIp"].readIfPresent() + value.allocationId = try reader["allocationId"].readIfPresent() + value.ptrRecord = try reader["ptrRecord"].readIfPresent() + value.ptrRecordUpdate = try reader["ptrRecordUpdate"].readIfPresent(readingClosure: EC2ClientTypes.PtrUpdateStatus.readingClosure) + return value + } } } @@ -2439,15 +1886,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AddressTransfer: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressTransferStatus = "addressTransferStatus" - case allocationId = "allocationId" - case publicIp = "publicIp" - case transferAccountId = "transferAccountId" - case transferOfferAcceptedTimestamp = "transferOfferAcceptedTimestamp" - case transferOfferExpirationTimestamp = "transferOfferExpirationTimestamp" - } +extension EC2ClientTypes.AddressTransfer: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -2471,20 +1910,18 @@ extension EC2ClientTypes.AddressTransfer: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let transferAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transferAccountId) - transferAccountId = transferAccountIdDecoded - let transferOfferExpirationTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .transferOfferExpirationTimestamp) - transferOfferExpirationTimestamp = transferOfferExpirationTimestampDecoded - let transferOfferAcceptedTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .transferOfferAcceptedTimestamp) - transferOfferAcceptedTimestamp = transferOfferAcceptedTimestampDecoded - let addressTransferStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressTransferStatus.self, forKey: .addressTransferStatus) - addressTransferStatus = addressTransferStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AddressTransfer() + value.publicIp = try reader["publicIp"].readIfPresent() + value.allocationId = try reader["allocationId"].readIfPresent() + value.transferAccountId = try reader["transferAccountId"].readIfPresent() + value.transferOfferExpirationTimestamp = try reader["transferOfferExpirationTimestamp"].readTimestampIfPresent(format: .dateTime) + value.transferOfferAcceptedTimestamp = try reader["transferOfferAcceptedTimestamp"].readTimestampIfPresent(format: .dateTime) + value.addressTransferStatus = try reader["addressTransferStatus"].readIfPresent() + return value + } } } @@ -2620,42 +2057,15 @@ public struct AdvertiseByoipCidrInput: Swift.Equatable { } } -struct AdvertiseByoipCidrInputBody: Swift.Equatable { - let cidr: Swift.String? - let asn: Swift.String? - let dryRun: Swift.Bool? - let networkBorderGroup: Swift.String? -} - -extension AdvertiseByoipCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asn = "Asn" - case cidr = "Cidr" - case dryRun = "DryRun" - case networkBorderGroup = "NetworkBorderGroup" - } +extension AdvertiseByoipCidrOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let asnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .asn) - asn = asnDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - } -} - -extension AdvertiseByoipCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AdvertiseByoipCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.byoipCidr = output.byoipCidr - } else { - self.byoipCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AdvertiseByoipCidrOutput() + value.byoipCidr = try reader["byoipCidr"].readIfPresent(readingClosure: EC2ClientTypes.ByoipCidr.readingClosure) + return value } } } @@ -2672,27 +2082,18 @@ public struct AdvertiseByoipCidrOutput: Swift.Equatable { } } -struct AdvertiseByoipCidrOutputBody: Swift.Equatable { - let byoipCidr: EC2ClientTypes.ByoipCidr? -} - -extension AdvertiseByoipCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoipCidr = "byoipCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let byoipCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ByoipCidr.self, forKey: .byoipCidr) - byoipCidr = byoipCidrDecoded - } -} +enum AdvertiseByoipCidrOutputError { -enum AdvertiseByoipCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -2810,85 +2211,22 @@ public struct AllocateAddressInput: Swift.Equatable { } } -struct AllocateAddressInputBody: Swift.Equatable { - let domain: EC2ClientTypes.DomainType? - let address: Swift.String? - let publicIpv4Pool: Swift.String? - let networkBorderGroup: Swift.String? - let customerOwnedIpv4Pool: Swift.String? - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension AllocateAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "Address" - case customerOwnedIpv4Pool = "CustomerOwnedIpv4Pool" - case domain = "Domain" - case dryRun = "dryRun" - case networkBorderGroup = "NetworkBorderGroup" - case publicIpv4Pool = "PublicIpv4Pool" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DomainType.self, forKey: .domain) - domain = domainDecoded - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let publicIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIpv4Pool) - publicIpv4Pool = publicIpv4PoolDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - let customerOwnedIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIpv4Pool) - customerOwnedIpv4Pool = customerOwnedIpv4PoolDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension AllocateAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AllocateAddressOutputBody = try responseDecoder.decode(responseBody: data) - self.allocationId = output.allocationId - self.carrierIp = output.carrierIp - self.customerOwnedIp = output.customerOwnedIp - self.customerOwnedIpv4Pool = output.customerOwnedIpv4Pool - self.domain = output.domain - self.networkBorderGroup = output.networkBorderGroup - self.publicIp = output.publicIp - self.publicIpv4Pool = output.publicIpv4Pool - } else { - self.allocationId = nil - self.carrierIp = nil - self.customerOwnedIp = nil - self.customerOwnedIpv4Pool = nil - self.domain = nil - self.networkBorderGroup = nil - self.publicIp = nil - self.publicIpv4Pool = nil +extension AllocateAddressOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AllocateAddressOutput() + value.allocationId = try reader["allocationId"].readIfPresent() + value.carrierIp = try reader["carrierIp"].readIfPresent() + value.customerOwnedIp = try reader["customerOwnedIp"].readIfPresent() + value.customerOwnedIpv4Pool = try reader["customerOwnedIpv4Pool"].readIfPresent() + value.domain = try reader["domain"].readIfPresent() + value.networkBorderGroup = try reader["networkBorderGroup"].readIfPresent() + value.publicIp = try reader["publicIp"].readIfPresent() + value.publicIpv4Pool = try reader["publicIpv4Pool"].readIfPresent() + return value } } } @@ -2933,55 +2271,18 @@ public struct AllocateAddressOutput: Swift.Equatable { } } -struct AllocateAddressOutputBody: Swift.Equatable { - let publicIp: Swift.String? - let allocationId: Swift.String? - let publicIpv4Pool: Swift.String? - let networkBorderGroup: Swift.String? - let domain: EC2ClientTypes.DomainType? - let customerOwnedIp: Swift.String? - let customerOwnedIpv4Pool: Swift.String? - let carrierIp: Swift.String? -} - -extension AllocateAddressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "allocationId" - case carrierIp = "carrierIp" - case customerOwnedIp = "customerOwnedIp" - case customerOwnedIpv4Pool = "customerOwnedIpv4Pool" - case domain = "domain" - case networkBorderGroup = "networkBorderGroup" - case publicIp = "publicIp" - case publicIpv4Pool = "publicIpv4Pool" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let publicIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIpv4Pool) - publicIpv4Pool = publicIpv4PoolDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - let domainDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DomainType.self, forKey: .domain) - domain = domainDecoded - let customerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIp) - customerOwnedIp = customerOwnedIpDecoded - let customerOwnedIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIpv4Pool) - customerOwnedIpv4Pool = customerOwnedIpv4PoolDecoded - let carrierIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierIp) - carrierIp = carrierIpDecoded - } -} +enum AllocateAddressOutputError { -enum AllocateAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -3109,104 +2410,15 @@ public struct AllocateHostsInput: Swift.Equatable { } } -struct AllocateHostsInputBody: Swift.Equatable { - let autoPlacement: EC2ClientTypes.AutoPlacement? - let availabilityZone: Swift.String? - let clientToken: Swift.String? - let instanceType: Swift.String? - let instanceFamily: Swift.String? - let quantity: Swift.Int? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let hostRecovery: EC2ClientTypes.HostRecovery? - let outpostArn: Swift.String? - let hostMaintenance: EC2ClientTypes.HostMaintenance? - let assetIds: [Swift.String]? -} - -extension AllocateHostsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assetIds = "AssetId" - case autoPlacement = "autoPlacement" - case availabilityZone = "availabilityZone" - case clientToken = "clientToken" - case hostMaintenance = "HostMaintenance" - case hostRecovery = "HostRecovery" - case instanceFamily = "InstanceFamily" - case instanceType = "instanceType" - case outpostArn = "OutpostArn" - case quantity = "quantity" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoPlacementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AutoPlacement.self, forKey: .autoPlacement) - autoPlacement = autoPlacementDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let instanceFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - let quantityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .quantity) - quantity = quantityDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let hostRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostRecovery.self, forKey: .hostRecovery) - hostRecovery = hostRecoveryDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let hostMaintenanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostMaintenance.self, forKey: .hostMaintenance) - hostMaintenance = hostMaintenanceDecoded - if containerValues.contains(.assetIds) { - struct KeyVal0{struct member{}} - let assetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .assetIds) - if let assetIdsWrappedContainer = assetIdsWrappedContainer { - let assetIdsContainer = try assetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var assetIdsBuffer:[Swift.String]? = nil - if let assetIdsContainer = assetIdsContainer { - assetIdsBuffer = [Swift.String]() - for stringContainer0 in assetIdsContainer { - assetIdsBuffer?.append(stringContainer0) - } - } - assetIds = assetIdsBuffer - } else { - assetIds = [] - } - } else { - assetIds = nil - } - } -} - -extension AllocateHostsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AllocateHostsOutputBody = try responseDecoder.decode(responseBody: data) - self.hostIds = output.hostIds - } else { - self.hostIds = nil +extension AllocateHostsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AllocateHostsOutput() + value.hostIds = try reader["hostIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -3224,44 +2436,18 @@ public struct AllocateHostsOutput: Swift.Equatable { } } -struct AllocateHostsOutputBody: Swift.Equatable { - let hostIds: [Swift.String]? -} +enum AllocateHostsOutputError { -extension AllocateHostsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostIds = "hostIdSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.hostIds) { - struct KeyVal0{struct item{}} - let hostIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostIds) - if let hostIdsWrappedContainer = hostIdsWrappedContainer { - let hostIdsContainer = try hostIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostIdsBuffer:[Swift.String]? = nil - if let hostIdsContainer = hostIdsContainer { - hostIdsBuffer = [Swift.String]() - for stringContainer0 in hostIdsContainer { - hostIdsBuffer?.append(stringContainer0) - } - } - hostIds = hostIdsBuffer - } else { - hostIds = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - hostIds = nil - } - } -} - -enum AllocateHostsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -3385,96 +2571,15 @@ public struct AllocateIpamPoolCidrInput: Swift.Equatable { } } -struct AllocateIpamPoolCidrInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let cidr: Swift.String? - let netmaskLength: Swift.Int? - let clientToken: Swift.String? - let description: Swift.String? - let previewNextCidr: Swift.Bool? - let allowedCidrs: [Swift.String]? - let disallowedCidrs: [Swift.String]? -} - -extension AllocateIpamPoolCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowedCidrs = "AllowedCidr" - case cidr = "Cidr" - case clientToken = "ClientToken" - case description = "Description" - case disallowedCidrs = "DisallowedCidr" - case dryRun = "DryRun" - case ipamPoolId = "IpamPoolId" - case netmaskLength = "NetmaskLength" - case previewNextCidr = "PreviewNextCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let netmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .netmaskLength) - netmaskLength = netmaskLengthDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let previewNextCidrDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .previewNextCidr) - previewNextCidr = previewNextCidrDecoded - if containerValues.contains(.allowedCidrs) { - struct KeyVal0{struct item{}} - let allowedCidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedCidrs) - if let allowedCidrsWrappedContainer = allowedCidrsWrappedContainer { - let allowedCidrsContainer = try allowedCidrsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allowedCidrsBuffer:[Swift.String]? = nil - if let allowedCidrsContainer = allowedCidrsContainer { - allowedCidrsBuffer = [Swift.String]() - for stringContainer0 in allowedCidrsContainer { - allowedCidrsBuffer?.append(stringContainer0) - } - } - allowedCidrs = allowedCidrsBuffer - } else { - allowedCidrs = [] - } - } else { - allowedCidrs = nil - } - if containerValues.contains(.disallowedCidrs) { - struct KeyVal0{struct item{}} - let disallowedCidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .disallowedCidrs) - if let disallowedCidrsWrappedContainer = disallowedCidrsWrappedContainer { - let disallowedCidrsContainer = try disallowedCidrsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var disallowedCidrsBuffer:[Swift.String]? = nil - if let disallowedCidrsContainer = disallowedCidrsContainer { - disallowedCidrsBuffer = [Swift.String]() - for stringContainer0 in disallowedCidrsContainer { - disallowedCidrsBuffer?.append(stringContainer0) - } - } - disallowedCidrs = disallowedCidrsBuffer - } else { - disallowedCidrs = [] - } - } else { - disallowedCidrs = nil - } - } -} - -extension AllocateIpamPoolCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AllocateIpamPoolCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPoolAllocation = output.ipamPoolAllocation - } else { - self.ipamPoolAllocation = nil +extension AllocateIpamPoolCidrOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AllocateIpamPoolCidrOutput() + value.ipamPoolAllocation = try reader["ipamPoolAllocation"].readIfPresent(readingClosure: EC2ClientTypes.IpamPoolAllocation.readingClosure) + return value } } } @@ -3491,27 +2596,18 @@ public struct AllocateIpamPoolCidrOutput: Swift.Equatable { } } -struct AllocateIpamPoolCidrOutputBody: Swift.Equatable { - let ipamPoolAllocation: EC2ClientTypes.IpamPoolAllocation? -} - -extension AllocateIpamPoolCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPoolAllocation = "ipamPoolAllocation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamPoolAllocationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolAllocation.self, forKey: .ipamPoolAllocation) - ipamPoolAllocation = ipamPoolAllocationDecoded - } -} +enum AllocateIpamPoolCidrOutputError { -enum AllocateIpamPoolCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -3630,14 +2726,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AllowedPrincipal: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case principal = "principal" - case principalType = "principalType" - case serviceId = "serviceId" - case servicePermissionId = "servicePermissionId" - case tags = "tagSet" - } +extension EC2ClientTypes.AllowedPrincipal: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -3667,35 +2756,17 @@ extension EC2ClientTypes.AllowedPrincipal: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let principalTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PrincipalType.self, forKey: .principalType) - principalType = principalTypeDecoded - let principalDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .principal) - principal = principalDecoded - let servicePermissionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .servicePermissionId) - servicePermissionId = servicePermissionIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AllowedPrincipal() + value.principalType = try reader["principalType"].readIfPresent() + value.principal = try reader["principal"].readIfPresent() + value.servicePermissionId = try reader["servicePermissionId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.serviceId = try reader["serviceId"].readIfPresent() + return value } - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded } } @@ -3763,11 +2834,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AlternatePathHint: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case componentArn = "componentArn" - case componentId = "componentId" - } +extension EC2ClientTypes.AlternatePathHint: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -3779,12 +2846,14 @@ extension EC2ClientTypes.AlternatePathHint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let componentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .componentId) - componentId = componentIdDecoded - let componentArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .componentArn) - componentArn = componentArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AlternatePathHint() + value.componentId = try reader["componentId"].readIfPresent() + value.componentArn = try reader["componentArn"].readIfPresent() + return value + } } } @@ -3840,15 +2909,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AnalysisAclRule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "cidr" - case egress = "egress" - case portRange = "portRange" - case `protocol` = "protocol" - case ruleAction = "ruleAction" - case ruleNumber = "ruleNumber" - } +extension EC2ClientTypes.AnalysisAclRule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -3872,20 +2933,18 @@ extension EC2ClientTypes.AnalysisAclRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let egressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .egress) - egress = egressDecoded - let portRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PortRange.self, forKey: .portRange) - portRange = portRangeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let ruleActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let ruleNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ruleNumber) - ruleNumber = ruleNumberDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AnalysisAclRule() + value.cidr = try reader["cidr"].readIfPresent() + value.egress = try reader["egress"].readIfPresent() + value.portRange = try reader["portRange"].readIfPresent(readingClosure: EC2ClientTypes.PortRange.readingClosure) + value.`protocol` = try reader["protocol"].readIfPresent() + value.ruleAction = try reader["ruleAction"].readIfPresent() + value.ruleNumber = try reader["ruleNumber"].readIfPresent() + return value + } } } @@ -3925,12 +2984,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AnalysisComponent: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "arn" - case id = "id" - case name = "name" - } +extension EC2ClientTypes.AnalysisComponent: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -3945,14 +2999,15 @@ extension EC2ClientTypes.AnalysisComponent: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AnalysisComponent() + value.id = try reader["id"].readIfPresent() + value.arn = try reader["arn"].readIfPresent() + value.name = try reader["name"].readIfPresent() + return value + } } } @@ -3980,11 +3035,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AnalysisLoadBalancerListener: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instancePort = "instancePort" - case loadBalancerPort = "loadBalancerPort" - } +extension EC2ClientTypes.AnalysisLoadBalancerListener: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -3996,12 +3047,14 @@ extension EC2ClientTypes.AnalysisLoadBalancerListener: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .loadBalancerPort) - loadBalancerPort = loadBalancerPortDecoded - let instancePortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancePort) - instancePort = instancePortDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AnalysisLoadBalancerListener() + value.loadBalancerPort = try reader["loadBalancerPort"].readIfPresent() + value.instancePort = try reader["instancePort"].readIfPresent() + return value + } } } @@ -4025,13 +3078,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AnalysisLoadBalancerTarget: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "address" - case availabilityZone = "availabilityZone" - case instance = "instance" - case port = "port" - } +extension EC2ClientTypes.AnalysisLoadBalancerTarget: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -4049,16 +3096,16 @@ extension EC2ClientTypes.AnalysisLoadBalancerTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let instanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .instance) - instance = instanceDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AnalysisLoadBalancerTarget() + value.address = try reader["address"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.instance = try reader["instance"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.port = try reader["port"].readIfPresent() + return value + } } } @@ -4090,14 +3137,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AnalysisPacketHeader: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationAddresses = "destinationAddressSet" - case destinationPortRanges = "destinationPortRangeSet" - case `protocol` = "protocol" - case sourceAddresses = "sourceAddressSet" - case sourcePortRanges = "sourcePortRangeSet" - } +extension EC2ClientTypes.AnalysisPacketHeader: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -4154,85 +3194,16 @@ extension EC2ClientTypes.AnalysisPacketHeader: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.destinationAddresses) { - struct KeyVal0{struct item{}} - let destinationAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationAddresses) - if let destinationAddressesWrappedContainer = destinationAddressesWrappedContainer { - let destinationAddressesContainer = try destinationAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationAddressesBuffer:[Swift.String]? = nil - if let destinationAddressesContainer = destinationAddressesContainer { - destinationAddressesBuffer = [Swift.String]() - for stringContainer0 in destinationAddressesContainer { - destinationAddressesBuffer?.append(stringContainer0) - } - } - destinationAddresses = destinationAddressesBuffer - } else { - destinationAddresses = [] - } - } else { - destinationAddresses = nil - } - if containerValues.contains(.destinationPortRanges) { - struct KeyVal0{struct item{}} - let destinationPortRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationPortRanges) - if let destinationPortRangesWrappedContainer = destinationPortRangesWrappedContainer { - let destinationPortRangesContainer = try destinationPortRangesWrappedContainer.decodeIfPresent([EC2ClientTypes.PortRange].self, forKey: .member) - var destinationPortRangesBuffer:[EC2ClientTypes.PortRange]? = nil - if let destinationPortRangesContainer = destinationPortRangesContainer { - destinationPortRangesBuffer = [EC2ClientTypes.PortRange]() - for structureContainer0 in destinationPortRangesContainer { - destinationPortRangesBuffer?.append(structureContainer0) - } - } - destinationPortRanges = destinationPortRangesBuffer - } else { - destinationPortRanges = [] - } - } else { - destinationPortRanges = nil - } - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - if containerValues.contains(.sourceAddresses) { - struct KeyVal0{struct item{}} - let sourceAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceAddresses) - if let sourceAddressesWrappedContainer = sourceAddressesWrappedContainer { - let sourceAddressesContainer = try sourceAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceAddressesBuffer:[Swift.String]? = nil - if let sourceAddressesContainer = sourceAddressesContainer { - sourceAddressesBuffer = [Swift.String]() - for stringContainer0 in sourceAddressesContainer { - sourceAddressesBuffer?.append(stringContainer0) - } - } - sourceAddresses = sourceAddressesBuffer - } else { - sourceAddresses = [] - } - } else { - sourceAddresses = nil - } - if containerValues.contains(.sourcePortRanges) { - struct KeyVal0{struct item{}} - let sourcePortRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourcePortRanges) - if let sourcePortRangesWrappedContainer = sourcePortRangesWrappedContainer { - let sourcePortRangesContainer = try sourcePortRangesWrappedContainer.decodeIfPresent([EC2ClientTypes.PortRange].self, forKey: .member) - var sourcePortRangesBuffer:[EC2ClientTypes.PortRange]? = nil - if let sourcePortRangesContainer = sourcePortRangesContainer { - sourcePortRangesBuffer = [EC2ClientTypes.PortRange]() - for structureContainer0 in sourcePortRangesContainer { - sourcePortRangesBuffer?.append(structureContainer0) - } - } - sourcePortRanges = sourcePortRangesBuffer - } else { - sourcePortRanges = [] - } - } else { - sourcePortRanges = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AnalysisPacketHeader() + value.destinationAddresses = try reader["destinationAddressSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationPortRanges = try reader["destinationPortRangeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PortRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.`protocol` = try reader["protocol"].readIfPresent() + value.sourceAddresses = try reader["sourceAddressSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourcePortRanges = try reader["sourcePortRangeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PortRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -4269,23 +3240,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AnalysisRouteTableRoute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGatewayId = "carrierGatewayId" - case coreNetworkArn = "coreNetworkArn" - case destinationCidr = "destinationCidr" - case destinationPrefixListId = "destinationPrefixListId" - case egressOnlyInternetGatewayId = "egressOnlyInternetGatewayId" - case gatewayId = "gatewayId" - case instanceId = "instanceId" - case localGatewayId = "localGatewayId" - case natGatewayId = "natGatewayId" - case networkInterfaceId = "networkInterfaceId" - case origin = "origin" - case state = "state" - case transitGatewayId = "transitGatewayId" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } +extension EC2ClientTypes.AnalysisRouteTableRoute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -4333,36 +3288,26 @@ extension EC2ClientTypes.AnalysisRouteTableRoute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidr) - destinationCidr = destinationCidrDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded - let egressOnlyInternetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .egressOnlyInternetGatewayId) - egressOnlyInternetGatewayId = egressOnlyInternetGatewayIdDecoded - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let originDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .origin) - origin = originDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let carrierGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierGatewayId) - carrierGatewayId = carrierGatewayIdDecoded - let coreNetworkArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coreNetworkArn) - coreNetworkArn = coreNetworkArnDecoded - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AnalysisRouteTableRoute() + value.destinationCidr = try reader["destinationCidr"].readIfPresent() + value.destinationPrefixListId = try reader["destinationPrefixListId"].readIfPresent() + value.egressOnlyInternetGatewayId = try reader["egressOnlyInternetGatewayId"].readIfPresent() + value.gatewayId = try reader["gatewayId"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.natGatewayId = try reader["natGatewayId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.origin = try reader["origin"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.vpcPeeringConnectionId = try reader["vpcPeeringConnectionId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.carrierGatewayId = try reader["carrierGatewayId"].readIfPresent() + value.coreNetworkArn = try reader["coreNetworkArn"].readIfPresent() + value.localGatewayId = try reader["localGatewayId"].readIfPresent() + return value + } } } @@ -4444,15 +3389,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AnalysisSecurityGroupRule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "cidr" - case direction = "direction" - case portRange = "portRange" - case prefixListId = "prefixListId" - case `protocol` = "protocol" - case securityGroupId = "securityGroupId" - } +extension EC2ClientTypes.AnalysisSecurityGroupRule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -4476,20 +3413,18 @@ extension EC2ClientTypes.AnalysisSecurityGroupRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let directionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .direction) - direction = directionDecoded - let securityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .securityGroupId) - securityGroupId = securityGroupIdDecoded - let portRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PortRange.self, forKey: .portRange) - portRange = portRangeDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AnalysisSecurityGroupRule() + value.cidr = try reader["cidr"].readIfPresent() + value.direction = try reader["direction"].readIfPresent() + value.securityGroupId = try reader["securityGroupId"].readIfPresent() + value.portRange = try reader["portRange"].readIfPresent(readingClosure: EC2ClientTypes.PortRange.readingClosure) + value.prefixListId = try reader["prefixListId"].readIfPresent() + value.`protocol` = try reader["protocol"].readIfPresent() + return value + } } } @@ -4663,59 +3598,15 @@ public struct ApplySecurityGroupsToClientVpnTargetNetworkInput: Swift.Equatable } } -struct ApplySecurityGroupsToClientVpnTargetNetworkInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let vpcId: Swift.String? - let securityGroupIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension ApplySecurityGroupsToClientVpnTargetNetworkInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - case securityGroupIds = "SecurityGroupId" - case vpcId = "VpcId" - } +extension ApplySecurityGroupsToClientVpnTargetNetworkOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ApplySecurityGroupsToClientVpnTargetNetworkOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ApplySecurityGroupsToClientVpnTargetNetworkOutputBody = try responseDecoder.decode(responseBody: data) - self.securityGroupIds = output.securityGroupIds - } else { - self.securityGroupIds = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ApplySecurityGroupsToClientVpnTargetNetworkOutput() + value.securityGroupIds = try reader["securityGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -4732,44 +3623,18 @@ public struct ApplySecurityGroupsToClientVpnTargetNetworkOutput: Swift.Equatable } } -struct ApplySecurityGroupsToClientVpnTargetNetworkOutputBody: Swift.Equatable { - let securityGroupIds: [Swift.String]? -} - -extension ApplySecurityGroupsToClientVpnTargetNetworkOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case securityGroupIds = "securityGroupIds" - } +enum ApplySecurityGroupsToClientVpnTargetNetworkOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - securityGroupIds = nil - } - } -} - -enum ApplySecurityGroupsToClientVpnTargetNetworkOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -4856,13 +3721,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AsnAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asn = "asn" - case cidr = "cidr" - case state = "state" - case statusMessage = "statusMessage" - } +extension EC2ClientTypes.AsnAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -4880,16 +3739,16 @@ extension EC2ClientTypes.AsnAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let asnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .asn) - asn = asnDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AsnAssociationState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AsnAssociation() + value.asn = try reader["asn"].readIfPresent() + value.cidr = try reader["cidr"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -4965,11 +3824,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AsnAuthorizationContext: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - case signature = "Signature" - } +extension EC2ClientTypes.AsnAuthorizationContext: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -4981,12 +3836,14 @@ extension EC2ClientTypes.AsnAuthorizationContext: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let signatureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .signature) - signature = signatureDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AsnAuthorizationContext() + value.message = try reader["Message"].readIfPresent() + value.signature = try reader["Signature"].readIfPresent() + return value + } } } @@ -5133,84 +3990,17 @@ public struct AssignIpv6AddressesInput: Swift.Equatable { } } -struct AssignIpv6AddressesInputBody: Swift.Equatable { - let ipv6AddressCount: Swift.Int? - let ipv6Addresses: [Swift.String]? - let ipv6PrefixCount: Swift.Int? - let ipv6Prefixes: [Swift.String]? - let networkInterfaceId: Swift.String? -} - -extension AssignIpv6AddressesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6AddressCount = "ipv6AddressCount" - case ipv6Addresses = "ipv6Addresses" - case ipv6PrefixCount = "Ipv6PrefixCount" - case ipv6Prefixes = "Ipv6Prefix" - case networkInterfaceId = "networkInterfaceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6AddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6AddressCount) - ipv6AddressCount = ipv6AddressCountDecoded - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct item{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipv6AddressesBuffer:[Swift.String]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [Swift.String]() - for stringContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(stringContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let ipv6PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6PrefixCount) - ipv6PrefixCount = ipv6PrefixCountDecoded - if containerValues.contains(.ipv6Prefixes) { - struct KeyVal0{struct item{}} - let ipv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Prefixes) - if let ipv6PrefixesWrappedContainer = ipv6PrefixesWrappedContainer { - let ipv6PrefixesContainer = try ipv6PrefixesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipv6PrefixesBuffer:[Swift.String]? = nil - if let ipv6PrefixesContainer = ipv6PrefixesContainer { - ipv6PrefixesBuffer = [Swift.String]() - for stringContainer0 in ipv6PrefixesContainer { - ipv6PrefixesBuffer?.append(stringContainer0) - } - } - ipv6Prefixes = ipv6PrefixesBuffer - } else { - ipv6Prefixes = [] - } - } else { - ipv6Prefixes = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - } -} - -extension AssignIpv6AddressesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssignIpv6AddressesOutputBody = try responseDecoder.decode(responseBody: data) - self.assignedIpv6Addresses = output.assignedIpv6Addresses - self.assignedIpv6Prefixes = output.assignedIpv6Prefixes - self.networkInterfaceId = output.networkInterfaceId - } else { - self.assignedIpv6Addresses = nil - self.assignedIpv6Prefixes = nil - self.networkInterfaceId = nil +extension AssignIpv6AddressesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssignIpv6AddressesOutput() + value.assignedIpv6Addresses = try reader["assignedIpv6Addresses"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.assignedIpv6Prefixes = try reader["assignedIpv6PrefixSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + return value } } } @@ -5235,69 +4025,18 @@ public struct AssignIpv6AddressesOutput: Swift.Equatable { } } -struct AssignIpv6AddressesOutputBody: Swift.Equatable { - let assignedIpv6Addresses: [Swift.String]? - let assignedIpv6Prefixes: [Swift.String]? - let networkInterfaceId: Swift.String? -} - -extension AssignIpv6AddressesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assignedIpv6Addresses = "assignedIpv6Addresses" - case assignedIpv6Prefixes = "assignedIpv6PrefixSet" - case networkInterfaceId = "networkInterfaceId" - } +enum AssignIpv6AddressesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.assignedIpv6Addresses) { - struct KeyVal0{struct item{}} - let assignedIpv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .assignedIpv6Addresses) - if let assignedIpv6AddressesWrappedContainer = assignedIpv6AddressesWrappedContainer { - let assignedIpv6AddressesContainer = try assignedIpv6AddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var assignedIpv6AddressesBuffer:[Swift.String]? = nil - if let assignedIpv6AddressesContainer = assignedIpv6AddressesContainer { - assignedIpv6AddressesBuffer = [Swift.String]() - for stringContainer0 in assignedIpv6AddressesContainer { - assignedIpv6AddressesBuffer?.append(stringContainer0) - } - } - assignedIpv6Addresses = assignedIpv6AddressesBuffer - } else { - assignedIpv6Addresses = [] - } - } else { - assignedIpv6Addresses = nil - } - if containerValues.contains(.assignedIpv6Prefixes) { - struct KeyVal0{struct item{}} - let assignedIpv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .assignedIpv6Prefixes) - if let assignedIpv6PrefixesWrappedContainer = assignedIpv6PrefixesWrappedContainer { - let assignedIpv6PrefixesContainer = try assignedIpv6PrefixesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var assignedIpv6PrefixesBuffer:[Swift.String]? = nil - if let assignedIpv6PrefixesContainer = assignedIpv6PrefixesContainer { - assignedIpv6PrefixesBuffer = [Swift.String]() - for stringContainer0 in assignedIpv6PrefixesContainer { - assignedIpv6PrefixesBuffer?.append(stringContainer0) - } - } - assignedIpv6Prefixes = assignedIpv6PrefixesBuffer - } else { - assignedIpv6Prefixes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - assignedIpv6Prefixes = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - } -} - -enum AssignIpv6AddressesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -5387,88 +4126,17 @@ public struct AssignPrivateIpAddressesInput: Swift.Equatable { } } -struct AssignPrivateIpAddressesInputBody: Swift.Equatable { - let allowReassignment: Swift.Bool? - let networkInterfaceId: Swift.String? - let privateIpAddresses: [Swift.String]? - let secondaryPrivateIpAddressCount: Swift.Int? - let ipv4Prefixes: [Swift.String]? - let ipv4PrefixCount: Swift.Int? -} - -extension AssignPrivateIpAddressesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowReassignment = "allowReassignment" - case ipv4PrefixCount = "Ipv4PrefixCount" - case ipv4Prefixes = "Ipv4Prefix" - case networkInterfaceId = "networkInterfaceId" - case privateIpAddresses = "privateIpAddress" - case secondaryPrivateIpAddressCount = "secondaryPrivateIpAddressCount" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allowReassignmentDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowReassignment) - allowReassignment = allowReassignmentDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct PrivateIpAddress{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var privateIpAddressesBuffer:[Swift.String]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [Swift.String]() - for stringContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(stringContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let secondaryPrivateIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondaryPrivateIpAddressCount) - secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCountDecoded - if containerValues.contains(.ipv4Prefixes) { - struct KeyVal0{struct item{}} - let ipv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv4Prefixes) - if let ipv4PrefixesWrappedContainer = ipv4PrefixesWrappedContainer { - let ipv4PrefixesContainer = try ipv4PrefixesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipv4PrefixesBuffer:[Swift.String]? = nil - if let ipv4PrefixesContainer = ipv4PrefixesContainer { - ipv4PrefixesBuffer = [Swift.String]() - for stringContainer0 in ipv4PrefixesContainer { - ipv4PrefixesBuffer?.append(stringContainer0) - } - } - ipv4Prefixes = ipv4PrefixesBuffer - } else { - ipv4Prefixes = [] - } - } else { - ipv4Prefixes = nil - } - let ipv4PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4PrefixCount) - ipv4PrefixCount = ipv4PrefixCountDecoded - } -} - -extension AssignPrivateIpAddressesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssignPrivateIpAddressesOutputBody = try responseDecoder.decode(responseBody: data) - self.assignedIpv4Prefixes = output.assignedIpv4Prefixes - self.assignedPrivateIpAddresses = output.assignedPrivateIpAddresses - self.networkInterfaceId = output.networkInterfaceId - } else { - self.assignedIpv4Prefixes = nil - self.assignedPrivateIpAddresses = nil - self.networkInterfaceId = nil +extension AssignPrivateIpAddressesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssignPrivateIpAddressesOutput() + value.assignedIpv4Prefixes = try reader["assignedIpv4PrefixSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv4PrefixSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.assignedPrivateIpAddresses = try reader["assignedPrivateIpAddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AssignedPrivateIpAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + return value } } } @@ -5493,69 +4161,18 @@ public struct AssignPrivateIpAddressesOutput: Swift.Equatable { } } -struct AssignPrivateIpAddressesOutputBody: Swift.Equatable { - let networkInterfaceId: Swift.String? - let assignedPrivateIpAddresses: [EC2ClientTypes.AssignedPrivateIpAddress]? - let assignedIpv4Prefixes: [EC2ClientTypes.Ipv4PrefixSpecification]? -} +enum AssignPrivateIpAddressesOutputError { -extension AssignPrivateIpAddressesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assignedIpv4Prefixes = "assignedIpv4PrefixSet" - case assignedPrivateIpAddresses = "assignedPrivateIpAddressesSet" - case networkInterfaceId = "networkInterfaceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - if containerValues.contains(.assignedPrivateIpAddresses) { - struct KeyVal0{struct item{}} - let assignedPrivateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .assignedPrivateIpAddresses) - if let assignedPrivateIpAddressesWrappedContainer = assignedPrivateIpAddressesWrappedContainer { - let assignedPrivateIpAddressesContainer = try assignedPrivateIpAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.AssignedPrivateIpAddress].self, forKey: .member) - var assignedPrivateIpAddressesBuffer:[EC2ClientTypes.AssignedPrivateIpAddress]? = nil - if let assignedPrivateIpAddressesContainer = assignedPrivateIpAddressesContainer { - assignedPrivateIpAddressesBuffer = [EC2ClientTypes.AssignedPrivateIpAddress]() - for structureContainer0 in assignedPrivateIpAddressesContainer { - assignedPrivateIpAddressesBuffer?.append(structureContainer0) - } - } - assignedPrivateIpAddresses = assignedPrivateIpAddressesBuffer - } else { - assignedPrivateIpAddresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - assignedPrivateIpAddresses = nil - } - if containerValues.contains(.assignedIpv4Prefixes) { - struct KeyVal0{struct item{}} - let assignedIpv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .assignedIpv4Prefixes) - if let assignedIpv4PrefixesWrappedContainer = assignedIpv4PrefixesWrappedContainer { - let assignedIpv4PrefixesContainer = try assignedIpv4PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv4PrefixSpecification].self, forKey: .member) - var assignedIpv4PrefixesBuffer:[EC2ClientTypes.Ipv4PrefixSpecification]? = nil - if let assignedIpv4PrefixesContainer = assignedIpv4PrefixesContainer { - assignedIpv4PrefixesBuffer = [EC2ClientTypes.Ipv4PrefixSpecification]() - for structureContainer0 in assignedIpv4PrefixesContainer { - assignedIpv4PrefixesBuffer?.append(structureContainer0) - } - } - assignedIpv4Prefixes = assignedIpv4PrefixesBuffer - } else { - assignedIpv4Prefixes = [] - } - } else { - assignedIpv4Prefixes = nil - } - } -} - -enum AssignPrivateIpAddressesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -5621,61 +4238,16 @@ public struct AssignPrivateNatGatewayAddressInput: Swift.Equatable { } } -struct AssignPrivateNatGatewayAddressInputBody: Swift.Equatable { - let natGatewayId: Swift.String? - let privateIpAddresses: [Swift.String]? - let privateIpAddressCount: Swift.Int? - let dryRun: Swift.Bool? -} - -extension AssignPrivateNatGatewayAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case natGatewayId = "NatGatewayId" - case privateIpAddressCount = "PrivateIpAddressCount" - case privateIpAddresses = "PrivateIpAddress" - } +extension AssignPrivateNatGatewayAddressOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var privateIpAddressesBuffer:[Swift.String]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [Swift.String]() - for stringContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(stringContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let privateIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .privateIpAddressCount) - privateIpAddressCount = privateIpAddressCountDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension AssignPrivateNatGatewayAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssignPrivateNatGatewayAddressOutputBody = try responseDecoder.decode(responseBody: data) - self.natGatewayAddresses = output.natGatewayAddresses - self.natGatewayId = output.natGatewayId - } else { - self.natGatewayAddresses = nil - self.natGatewayId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssignPrivateNatGatewayAddressOutput() + value.natGatewayAddresses = try reader["natGatewayAddressSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NatGatewayAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.natGatewayId = try reader["natGatewayId"].readIfPresent() + return value } } } @@ -5696,56 +4268,23 @@ public struct AssignPrivateNatGatewayAddressOutput: Swift.Equatable { } } -struct AssignPrivateNatGatewayAddressOutputBody: Swift.Equatable { - let natGatewayId: Swift.String? - let natGatewayAddresses: [EC2ClientTypes.NatGatewayAddress]? -} - -extension AssignPrivateNatGatewayAddressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case natGatewayAddresses = "natGatewayAddressSet" - case natGatewayId = "natGatewayId" - } +enum AssignPrivateNatGatewayAddressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - if containerValues.contains(.natGatewayAddresses) { - struct KeyVal0{struct item{}} - let natGatewayAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .natGatewayAddresses) - if let natGatewayAddressesWrappedContainer = natGatewayAddressesWrappedContainer { - let natGatewayAddressesContainer = try natGatewayAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.NatGatewayAddress].self, forKey: .member) - var natGatewayAddressesBuffer:[EC2ClientTypes.NatGatewayAddress]? = nil - if let natGatewayAddressesContainer = natGatewayAddressesContainer { - natGatewayAddressesBuffer = [EC2ClientTypes.NatGatewayAddress]() - for structureContainer0 in natGatewayAddressesContainer { - natGatewayAddressesBuffer?.append(structureContainer0) - } - } - natGatewayAddresses = natGatewayAddressesBuffer - } else { - natGatewayAddresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - natGatewayAddresses = nil - } - } -} - -enum AssignPrivateNatGatewayAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } -extension EC2ClientTypes.AssignedPrivateIpAddress: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case privateIpAddress = "privateIpAddress" - } +extension EC2ClientTypes.AssignedPrivateIpAddress: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -5754,10 +4293,13 @@ extension EC2ClientTypes.AssignedPrivateIpAddress: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AssignedPrivateIpAddress() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + return value + } } } @@ -5849,54 +4391,15 @@ public struct AssociateAddressInput: Swift.Equatable { } } -struct AssociateAddressInputBody: Swift.Equatable { - let allocationId: Swift.String? - let instanceId: Swift.String? - let publicIp: Swift.String? - let allowReassociation: Swift.Bool? - let dryRun: Swift.Bool? - let networkInterfaceId: Swift.String? - let privateIpAddress: Swift.String? -} - -extension AssociateAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "AllocationId" - case allowReassociation = "allowReassociation" - case dryRun = "dryRun" - case instanceId = "InstanceId" - case networkInterfaceId = "networkInterfaceId" - case privateIpAddress = "privateIpAddress" - case publicIp = "PublicIp" - } +extension AssociateAddressOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let allowReassociationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowReassociation) - allowReassociation = allowReassociationDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - } -} - -extension AssociateAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateAddressOutputBody = try responseDecoder.decode(responseBody: data) - self.associationId = output.associationId - } else { - self.associationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateAddressOutput() + value.associationId = try reader["associationId"].readIfPresent() + return value } } } @@ -5913,27 +4416,18 @@ public struct AssociateAddressOutput: Swift.Equatable { } } -struct AssociateAddressOutputBody: Swift.Equatable { - let associationId: Swift.String? -} - -extension AssociateAddressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - } +enum AssociateAddressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - } -} - -enum AssociateAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -5991,44 +4485,16 @@ public struct AssociateClientVpnTargetNetworkInput: Swift.Equatable { } } -struct AssociateClientVpnTargetNetworkInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let subnetId: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension AssociateClientVpnTargetNetworkInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - case subnetId = "SubnetId" - } +extension AssociateClientVpnTargetNetworkOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension AssociateClientVpnTargetNetworkOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateClientVpnTargetNetworkOutputBody = try responseDecoder.decode(responseBody: data) - self.associationId = output.associationId - self.status = output.status - } else { - self.associationId = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateClientVpnTargetNetworkOutput() + value.associationId = try reader["associationId"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.AssociationStatus.readingClosure) + return value } } } @@ -6049,31 +4515,18 @@ public struct AssociateClientVpnTargetNetworkOutput: Swift.Equatable { } } -struct AssociateClientVpnTargetNetworkOutputBody: Swift.Equatable { - let associationId: Swift.String? - let status: EC2ClientTypes.AssociationStatus? -} - -extension AssociateClientVpnTargetNetworkOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AssociationStatus.self, forKey: .status) - status = statusDecoded - } -} +enum AssociateClientVpnTargetNetworkOutputError { -enum AssociateClientVpnTargetNetworkOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -6124,32 +4577,12 @@ public struct AssociateDhcpOptionsInput: Swift.Equatable { } } -struct AssociateDhcpOptionsInputBody: Swift.Equatable { - let dhcpOptionsId: Swift.String? - let vpcId: Swift.String? - let dryRun: Swift.Bool? -} - -extension AssociateDhcpOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dhcpOptionsId = "DhcpOptionsId" - case dryRun = "dryRun" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dhcpOptionsIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dhcpOptionsId) - dhcpOptionsId = dhcpOptionsIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AssociateDhcpOptionsOutput { -extension AssociateDhcpOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AssociateDhcpOptionsOutput() + } } } @@ -6158,11 +4591,18 @@ public struct AssociateDhcpOptionsOutput: Swift.Equatable { public init() { } } -enum AssociateDhcpOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum AssociateDhcpOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -6213,42 +4653,17 @@ public struct AssociateEnclaveCertificateIamRoleInput: Swift.Equatable { } } -struct AssociateEnclaveCertificateIamRoleInputBody: Swift.Equatable { - let certificateArn: Swift.String? - let roleArn: Swift.String? - let dryRun: Swift.Bool? -} - -extension AssociateEnclaveCertificateIamRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateArn = "CertificateArn" - case dryRun = "DryRun" - case roleArn = "RoleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AssociateEnclaveCertificateIamRoleOutput { -extension AssociateEnclaveCertificateIamRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateEnclaveCertificateIamRoleOutputBody = try responseDecoder.decode(responseBody: data) - self.certificateS3BucketName = output.certificateS3BucketName - self.certificateS3ObjectKey = output.certificateS3ObjectKey - self.encryptionKmsKeyId = output.encryptionKmsKeyId - } else { - self.certificateS3BucketName = nil - self.certificateS3ObjectKey = nil - self.encryptionKmsKeyId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateEnclaveCertificateIamRoleOutput() + value.certificateS3BucketName = try reader["certificateS3BucketName"].readIfPresent() + value.certificateS3ObjectKey = try reader["certificateS3ObjectKey"].readIfPresent() + value.encryptionKmsKeyId = try reader["encryptionKmsKeyId"].readIfPresent() + return value } } } @@ -6273,35 +4688,18 @@ public struct AssociateEnclaveCertificateIamRoleOutput: Swift.Equatable { } } -struct AssociateEnclaveCertificateIamRoleOutputBody: Swift.Equatable { - let certificateS3BucketName: Swift.String? - let certificateS3ObjectKey: Swift.String? - let encryptionKmsKeyId: Swift.String? -} - -extension AssociateEnclaveCertificateIamRoleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateS3BucketName = "certificateS3BucketName" - case certificateS3ObjectKey = "certificateS3ObjectKey" - case encryptionKmsKeyId = "encryptionKmsKeyId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateS3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateS3BucketName) - certificateS3BucketName = certificateS3BucketNameDecoded - let certificateS3ObjectKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateS3ObjectKey) - certificateS3ObjectKey = certificateS3ObjectKeyDecoded - let encryptionKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .encryptionKmsKeyId) - encryptionKmsKeyId = encryptionKmsKeyIdDecoded - } -} +enum AssociateEnclaveCertificateIamRoleOutputError { -enum AssociateEnclaveCertificateIamRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -6345,34 +4743,15 @@ public struct AssociateIamInstanceProfileInput: Swift.Equatable { } } -struct AssociateIamInstanceProfileInputBody: Swift.Equatable { - let iamInstanceProfile: EC2ClientTypes.IamInstanceProfileSpecification? - let instanceId: Swift.String? -} - -extension AssociateIamInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamInstanceProfile = "IamInstanceProfile" - case instanceId = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileSpecification.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - } -} +extension AssociateIamInstanceProfileOutput { -extension AssociateIamInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateIamInstanceProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.iamInstanceProfileAssociation = output.iamInstanceProfileAssociation - } else { - self.iamInstanceProfileAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateIamInstanceProfileOutput() + value.iamInstanceProfileAssociation = try reader["iamInstanceProfileAssociation"].readIfPresent(readingClosure: EC2ClientTypes.IamInstanceProfileAssociation.readingClosure) + return value } } } @@ -6389,27 +4768,18 @@ public struct AssociateIamInstanceProfileOutput: Swift.Equatable { } } -struct AssociateIamInstanceProfileOutputBody: Swift.Equatable { - let iamInstanceProfileAssociation: EC2ClientTypes.IamInstanceProfileAssociation? -} - -extension AssociateIamInstanceProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamInstanceProfileAssociation = "iamInstanceProfileAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let iamInstanceProfileAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileAssociation.self, forKey: .iamInstanceProfileAssociation) - iamInstanceProfileAssociation = iamInstanceProfileAssociationDecoded - } -} +enum AssociateIamInstanceProfileOutputError { -enum AssociateIamInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -6460,38 +4830,15 @@ public struct AssociateInstanceEventWindowInput: Swift.Equatable { } } -struct AssociateInstanceEventWindowInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceEventWindowId: Swift.String? - let associationTarget: EC2ClientTypes.InstanceEventWindowAssociationRequest? -} - -extension AssociateInstanceEventWindowInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationTarget = "AssociationTarget" - case dryRun = "DryRun" - case instanceEventWindowId = "InstanceEventWindowId" - } +extension AssociateInstanceEventWindowOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceEventWindowIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceEventWindowId) - instanceEventWindowId = instanceEventWindowIdDecoded - let associationTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindowAssociationRequest.self, forKey: .associationTarget) - associationTarget = associationTargetDecoded - } -} - -extension AssociateInstanceEventWindowOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateInstanceEventWindowOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceEventWindow = output.instanceEventWindow - } else { - self.instanceEventWindow = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateInstanceEventWindowOutput() + value.instanceEventWindow = try reader["instanceEventWindow"].readIfPresent(readingClosure: EC2ClientTypes.InstanceEventWindow.readingClosure) + return value } } } @@ -6508,27 +4855,18 @@ public struct AssociateInstanceEventWindowOutput: Swift.Equatable { } } -struct AssociateInstanceEventWindowOutputBody: Swift.Equatable { - let instanceEventWindow: EC2ClientTypes.InstanceEventWindow? -} - -extension AssociateInstanceEventWindowOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceEventWindow = "instanceEventWindow" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceEventWindowDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindow.self, forKey: .instanceEventWindow) - instanceEventWindow = instanceEventWindowDecoded - } -} +enum AssociateInstanceEventWindowOutputError { -enum AssociateInstanceEventWindowOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -6579,38 +4917,15 @@ public struct AssociateIpamByoasnInput: Swift.Equatable { } } -struct AssociateIpamByoasnInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let asn: Swift.String? - let cidr: Swift.String? -} - -extension AssociateIpamByoasnInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asn = "Asn" - case cidr = "Cidr" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let asnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .asn) - asn = asnDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - } -} +extension AssociateIpamByoasnOutput { -extension AssociateIpamByoasnOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateIpamByoasnOutputBody = try responseDecoder.decode(responseBody: data) - self.asnAssociation = output.asnAssociation - } else { - self.asnAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateIpamByoasnOutput() + value.asnAssociation = try reader["asnAssociation"].readIfPresent(readingClosure: EC2ClientTypes.AsnAssociation.readingClosure) + return value } } } @@ -6627,27 +4942,18 @@ public struct AssociateIpamByoasnOutput: Swift.Equatable { } } -struct AssociateIpamByoasnOutputBody: Swift.Equatable { - let asnAssociation: EC2ClientTypes.AsnAssociation? -} - -extension AssociateIpamByoasnOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asnAssociation = "asnAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let asnAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AsnAssociation.self, forKey: .asnAssociation) - asnAssociation = asnAssociationDecoded - } -} +enum AssociateIpamByoasnOutputError { -enum AssociateIpamByoasnOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -6721,63 +5027,15 @@ public struct AssociateIpamResourceDiscoveryInput: Swift.Equatable { } } -struct AssociateIpamResourceDiscoveryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamId: Swift.String? - let ipamResourceDiscoveryId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? -} - -extension AssociateIpamResourceDiscoveryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case ipamId = "IpamId" - case ipamResourceDiscoveryId = "IpamResourceDiscoveryId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +extension AssociateIpamResourceDiscoveryOutput { -extension AssociateIpamResourceDiscoveryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateIpamResourceDiscoveryOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceDiscoveryAssociation = output.ipamResourceDiscoveryAssociation - } else { - self.ipamResourceDiscoveryAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateIpamResourceDiscoveryOutput() + value.ipamResourceDiscoveryAssociation = try reader["ipamResourceDiscoveryAssociation"].readIfPresent(readingClosure: EC2ClientTypes.IpamResourceDiscoveryAssociation.readingClosure) + return value } } } @@ -6794,27 +5052,18 @@ public struct AssociateIpamResourceDiscoveryOutput: Swift.Equatable { } } -struct AssociateIpamResourceDiscoveryOutputBody: Swift.Equatable { - let ipamResourceDiscoveryAssociation: EC2ClientTypes.IpamResourceDiscoveryAssociation? -} - -extension AssociateIpamResourceDiscoveryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceDiscoveryAssociation = "ipamResourceDiscoveryAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamResourceDiscoveryAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceDiscoveryAssociation.self, forKey: .ipamResourceDiscoveryAssociation) - ipamResourceDiscoveryAssociation = ipamResourceDiscoveryAssociationDecoded - } -} +enum AssociateIpamResourceDiscoveryOutputError { -enum AssociateIpamResourceDiscoveryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -6890,78 +5139,16 @@ public struct AssociateNatGatewayAddressInput: Swift.Equatable { } } -struct AssociateNatGatewayAddressInputBody: Swift.Equatable { - let natGatewayId: Swift.String? - let allocationIds: [Swift.String]? - let privateIpAddresses: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension AssociateNatGatewayAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationIds = "AllocationId" - case dryRun = "DryRun" - case natGatewayId = "NatGatewayId" - case privateIpAddresses = "PrivateIpAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - if containerValues.contains(.allocationIds) { - struct KeyVal0{struct AllocationId{}} - let allocationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allocationIds) - if let allocationIdsWrappedContainer = allocationIdsWrappedContainer { - let allocationIdsContainer = try allocationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allocationIdsBuffer:[Swift.String]? = nil - if let allocationIdsContainer = allocationIdsContainer { - allocationIdsBuffer = [Swift.String]() - for stringContainer0 in allocationIdsContainer { - allocationIdsBuffer?.append(stringContainer0) - } - } - allocationIds = allocationIdsBuffer - } else { - allocationIds = [] - } - } else { - allocationIds = nil - } - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var privateIpAddressesBuffer:[Swift.String]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [Swift.String]() - for stringContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(stringContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AssociateNatGatewayAddressOutput { -extension AssociateNatGatewayAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateNatGatewayAddressOutputBody = try responseDecoder.decode(responseBody: data) - self.natGatewayAddresses = output.natGatewayAddresses - self.natGatewayId = output.natGatewayId - } else { - self.natGatewayAddresses = nil - self.natGatewayId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateNatGatewayAddressOutput() + value.natGatewayAddresses = try reader["natGatewayAddressSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NatGatewayAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.natGatewayId = try reader["natGatewayId"].readIfPresent() + return value } } } @@ -6982,48 +5169,18 @@ public struct AssociateNatGatewayAddressOutput: Swift.Equatable { } } -struct AssociateNatGatewayAddressOutputBody: Swift.Equatable { - let natGatewayId: Swift.String? - let natGatewayAddresses: [EC2ClientTypes.NatGatewayAddress]? -} - -extension AssociateNatGatewayAddressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case natGatewayAddresses = "natGatewayAddressSet" - case natGatewayId = "natGatewayId" - } +enum AssociateNatGatewayAddressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - if containerValues.contains(.natGatewayAddresses) { - struct KeyVal0{struct item{}} - let natGatewayAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .natGatewayAddresses) - if let natGatewayAddressesWrappedContainer = natGatewayAddressesWrappedContainer { - let natGatewayAddressesContainer = try natGatewayAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.NatGatewayAddress].self, forKey: .member) - var natGatewayAddressesBuffer:[EC2ClientTypes.NatGatewayAddress]? = nil - if let natGatewayAddressesContainer = natGatewayAddressesContainer { - natGatewayAddressesBuffer = [EC2ClientTypes.NatGatewayAddress]() - for structureContainer0 in natGatewayAddressesContainer { - natGatewayAddressesBuffer?.append(structureContainer0) - } - } - natGatewayAddresses = natGatewayAddressesBuffer - } else { - natGatewayAddresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - natGatewayAddresses = nil - } - } -} - -enum AssociateNatGatewayAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -7080,44 +5237,16 @@ public struct AssociateRouteTableInput: Swift.Equatable { } } -struct AssociateRouteTableInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let routeTableId: Swift.String? - let subnetId: Swift.String? - let gatewayId: Swift.String? -} - -extension AssociateRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case gatewayId = "GatewayId" - case routeTableId = "routeTableId" - case subnetId = "subnetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded - } -} +extension AssociateRouteTableOutput { -extension AssociateRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateRouteTableOutputBody = try responseDecoder.decode(responseBody: data) - self.associationId = output.associationId - self.associationState = output.associationState - } else { - self.associationId = nil - self.associationState = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateRouteTableOutput() + value.associationId = try reader["associationId"].readIfPresent() + value.associationState = try reader["associationState"].readIfPresent(readingClosure: EC2ClientTypes.RouteTableAssociationState.readingClosure) + return value } } } @@ -7138,31 +5267,18 @@ public struct AssociateRouteTableOutput: Swift.Equatable { } } -struct AssociateRouteTableOutputBody: Swift.Equatable { - let associationId: Swift.String? - let associationState: EC2ClientTypes.RouteTableAssociationState? -} - -extension AssociateRouteTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case associationState = "associationState" - } +enum AssociateRouteTableOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let associationStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RouteTableAssociationState.self, forKey: .associationState) - associationState = associationStateDecoded - } -} - -enum AssociateRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -7219,44 +5335,16 @@ public struct AssociateSubnetCidrBlockInput: Swift.Equatable { } } -struct AssociateSubnetCidrBlockInputBody: Swift.Equatable { - let ipv6CidrBlock: Swift.String? - let subnetId: Swift.String? - let ipv6IpamPoolId: Swift.String? - let ipv6NetmaskLength: Swift.Int? -} +extension AssociateSubnetCidrBlockOutput { -extension AssociateSubnetCidrBlockInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6CidrBlock = "ipv6CidrBlock" - case ipv6IpamPoolId = "Ipv6IpamPoolId" - case ipv6NetmaskLength = "Ipv6NetmaskLength" - case subnetId = "subnetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let ipv6IpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6IpamPoolId) - ipv6IpamPoolId = ipv6IpamPoolIdDecoded - let ipv6NetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6NetmaskLength) - ipv6NetmaskLength = ipv6NetmaskLengthDecoded - } -} - -extension AssociateSubnetCidrBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateSubnetCidrBlockOutputBody = try responseDecoder.decode(responseBody: data) - self.ipv6CidrBlockAssociation = output.ipv6CidrBlockAssociation - self.subnetId = output.subnetId - } else { - self.ipv6CidrBlockAssociation = nil - self.subnetId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateSubnetCidrBlockOutput() + value.ipv6CidrBlockAssociation = try reader["ipv6CidrBlockAssociation"].readIfPresent(readingClosure: EC2ClientTypes.SubnetIpv6CidrBlockAssociation.readingClosure) + value.subnetId = try reader["subnetId"].readIfPresent() + return value } } } @@ -7277,31 +5365,18 @@ public struct AssociateSubnetCidrBlockOutput: Swift.Equatable { } } -struct AssociateSubnetCidrBlockOutputBody: Swift.Equatable { - let ipv6CidrBlockAssociation: EC2ClientTypes.SubnetIpv6CidrBlockAssociation? - let subnetId: Swift.String? -} - -extension AssociateSubnetCidrBlockOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6CidrBlockAssociation = "ipv6CidrBlockAssociation" - case subnetId = "subnetId" - } +enum AssociateSubnetCidrBlockOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6CidrBlockAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetIpv6CidrBlockAssociation.self, forKey: .ipv6CidrBlockAssociation) - ipv6CidrBlockAssociation = ipv6CidrBlockAssociationDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - } -} - -enum AssociateSubnetCidrBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -7369,59 +5444,15 @@ public struct AssociateTransitGatewayMulticastDomainInput: Swift.Equatable { } } -struct AssociateTransitGatewayMulticastDomainInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let subnetIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension AssociateTransitGatewayMulticastDomainInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case subnetIds = "SubnetIds" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AssociateTransitGatewayMulticastDomainOutput { -extension AssociateTransitGatewayMulticastDomainOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateTransitGatewayMulticastDomainOutputBody = try responseDecoder.decode(responseBody: data) - self.associations = output.associations - } else { - self.associations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateTransitGatewayMulticastDomainOutput() + value.associations = try reader["associations"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDomainAssociations.readingClosure) + return value } } } @@ -7438,27 +5469,18 @@ public struct AssociateTransitGatewayMulticastDomainOutput: Swift.Equatable { } } -struct AssociateTransitGatewayMulticastDomainOutputBody: Swift.Equatable { - let associations: EC2ClientTypes.TransitGatewayMulticastDomainAssociations? -} - -extension AssociateTransitGatewayMulticastDomainOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "associations" - } +enum AssociateTransitGatewayMulticastDomainOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDomainAssociations.self, forKey: .associations) - associations = associationsDecoded - } -} - -enum AssociateTransitGatewayMulticastDomainOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -7509,38 +5531,15 @@ public struct AssociateTransitGatewayPolicyTableInput: Swift.Equatable { } } -struct AssociateTransitGatewayPolicyTableInputBody: Swift.Equatable { - let transitGatewayPolicyTableId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension AssociateTransitGatewayPolicyTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayPolicyTableId = "TransitGatewayPolicyTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayPolicyTableId) - transitGatewayPolicyTableId = transitGatewayPolicyTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AssociateTransitGatewayPolicyTableOutput { -extension AssociateTransitGatewayPolicyTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateTransitGatewayPolicyTableOutputBody = try responseDecoder.decode(responseBody: data) - self.association = output.association - } else { - self.association = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateTransitGatewayPolicyTableOutput() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPolicyTableAssociation.readingClosure) + return value } } } @@ -7557,27 +5556,18 @@ public struct AssociateTransitGatewayPolicyTableOutput: Swift.Equatable { } } -struct AssociateTransitGatewayPolicyTableOutputBody: Swift.Equatable { - let association: EC2ClientTypes.TransitGatewayPolicyTableAssociation? -} - -extension AssociateTransitGatewayPolicyTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPolicyTableAssociation.self, forKey: .association) - association = associationDecoded - } -} +enum AssociateTransitGatewayPolicyTableOutputError { -enum AssociateTransitGatewayPolicyTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -7628,38 +5618,15 @@ public struct AssociateTransitGatewayRouteTableInput: Swift.Equatable { } } -struct AssociateTransitGatewayRouteTableInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension AssociateTransitGatewayRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AssociateTransitGatewayRouteTableOutput { -extension AssociateTransitGatewayRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateTransitGatewayRouteTableOutputBody = try responseDecoder.decode(responseBody: data) - self.association = output.association - } else { - self.association = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateTransitGatewayRouteTableOutput() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayAssociation.readingClosure) + return value } } } @@ -7676,27 +5643,18 @@ public struct AssociateTransitGatewayRouteTableOutput: Swift.Equatable { } } -struct AssociateTransitGatewayRouteTableOutputBody: Swift.Equatable { - let association: EC2ClientTypes.TransitGatewayAssociation? -} - -extension AssociateTransitGatewayRouteTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAssociation.self, forKey: .association) - association = associationDecoded - } -} +enum AssociateTransitGatewayRouteTableOutputError { -enum AssociateTransitGatewayRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -7768,52 +5726,16 @@ public struct AssociateTrunkInterfaceInput: Swift.Equatable { } } -struct AssociateTrunkInterfaceInputBody: Swift.Equatable { - let branchInterfaceId: Swift.String? - let trunkInterfaceId: Swift.String? - let vlanId: Swift.Int? - let greKey: Swift.Int? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension AssociateTrunkInterfaceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case branchInterfaceId = "BranchInterfaceId" - case clientToken = "ClientToken" - case dryRun = "DryRun" - case greKey = "GreKey" - case trunkInterfaceId = "TrunkInterfaceId" - case vlanId = "VlanId" - } +extension AssociateTrunkInterfaceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let branchInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .branchInterfaceId) - branchInterfaceId = branchInterfaceIdDecoded - let trunkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trunkInterfaceId) - trunkInterfaceId = trunkInterfaceIdDecoded - let vlanIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .vlanId) - vlanId = vlanIdDecoded - let greKeyDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .greKey) - greKey = greKeyDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension AssociateTrunkInterfaceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateTrunkInterfaceOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.interfaceAssociation = output.interfaceAssociation - } else { - self.clientToken = nil - self.interfaceAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateTrunkInterfaceOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.interfaceAssociation = try reader["interfaceAssociation"].readIfPresent(readingClosure: EC2ClientTypes.TrunkInterfaceAssociation.readingClosure) + return value } } } @@ -7834,31 +5756,18 @@ public struct AssociateTrunkInterfaceOutput: Swift.Equatable { } } -struct AssociateTrunkInterfaceOutputBody: Swift.Equatable { - let interfaceAssociation: EC2ClientTypes.TrunkInterfaceAssociation? - let clientToken: Swift.String? -} - -extension AssociateTrunkInterfaceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case interfaceAssociation = "interfaceAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let interfaceAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrunkInterfaceAssociation.self, forKey: .interfaceAssociation) - interfaceAssociation = interfaceAssociationDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +enum AssociateTrunkInterfaceOutputError { -enum AssociateTrunkInterfaceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -7957,70 +5866,17 @@ public struct AssociateVpcCidrBlockInput: Swift.Equatable { } } -struct AssociateVpcCidrBlockInputBody: Swift.Equatable { - let amazonProvidedIpv6CidrBlock: Swift.Bool? - let cidrBlock: Swift.String? - let vpcId: Swift.String? - let ipv6CidrBlockNetworkBorderGroup: Swift.String? - let ipv6Pool: Swift.String? - let ipv6CidrBlock: Swift.String? - let ipv4IpamPoolId: Swift.String? - let ipv4NetmaskLength: Swift.Int? - let ipv6IpamPoolId: Swift.String? - let ipv6NetmaskLength: Swift.Int? -} - -extension AssociateVpcCidrBlockInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amazonProvidedIpv6CidrBlock = "amazonProvidedIpv6CidrBlock" - case cidrBlock = "CidrBlock" - case ipv4IpamPoolId = "Ipv4IpamPoolId" - case ipv4NetmaskLength = "Ipv4NetmaskLength" - case ipv6CidrBlock = "Ipv6CidrBlock" - case ipv6CidrBlockNetworkBorderGroup = "Ipv6CidrBlockNetworkBorderGroup" - case ipv6IpamPoolId = "Ipv6IpamPoolId" - case ipv6NetmaskLength = "Ipv6NetmaskLength" - case ipv6Pool = "Ipv6Pool" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let amazonProvidedIpv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .amazonProvidedIpv6CidrBlock) - amazonProvidedIpv6CidrBlock = amazonProvidedIpv6CidrBlockDecoded - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let ipv6CidrBlockNetworkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlockNetworkBorderGroup) - ipv6CidrBlockNetworkBorderGroup = ipv6CidrBlockNetworkBorderGroupDecoded - let ipv6PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Pool) - ipv6Pool = ipv6PoolDecoded - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let ipv4IpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv4IpamPoolId) - ipv4IpamPoolId = ipv4IpamPoolIdDecoded - let ipv4NetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4NetmaskLength) - ipv4NetmaskLength = ipv4NetmaskLengthDecoded - let ipv6IpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6IpamPoolId) - ipv6IpamPoolId = ipv6IpamPoolIdDecoded - let ipv6NetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6NetmaskLength) - ipv6NetmaskLength = ipv6NetmaskLengthDecoded - } -} - -extension AssociateVpcCidrBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateVpcCidrBlockOutputBody = try responseDecoder.decode(responseBody: data) - self.cidrBlockAssociation = output.cidrBlockAssociation - self.ipv6CidrBlockAssociation = output.ipv6CidrBlockAssociation - self.vpcId = output.vpcId - } else { - self.cidrBlockAssociation = nil - self.ipv6CidrBlockAssociation = nil - self.vpcId = nil +extension AssociateVpcCidrBlockOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateVpcCidrBlockOutput() + value.cidrBlockAssociation = try reader["cidrBlockAssociation"].readIfPresent(readingClosure: EC2ClientTypes.VpcCidrBlockAssociation.readingClosure) + value.ipv6CidrBlockAssociation = try reader["ipv6CidrBlockAssociation"].readIfPresent(readingClosure: EC2ClientTypes.VpcIpv6CidrBlockAssociation.readingClosure) + value.vpcId = try reader["vpcId"].readIfPresent() + return value } } } @@ -8045,35 +5901,18 @@ public struct AssociateVpcCidrBlockOutput: Swift.Equatable { } } -struct AssociateVpcCidrBlockOutputBody: Swift.Equatable { - let ipv6CidrBlockAssociation: EC2ClientTypes.VpcIpv6CidrBlockAssociation? - let cidrBlockAssociation: EC2ClientTypes.VpcCidrBlockAssociation? - let vpcId: Swift.String? -} - -extension AssociateVpcCidrBlockOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlockAssociation = "cidrBlockAssociation" - case ipv6CidrBlockAssociation = "ipv6CidrBlockAssociation" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6CidrBlockAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcIpv6CidrBlockAssociation.self, forKey: .ipv6CidrBlockAssociation) - ipv6CidrBlockAssociation = ipv6CidrBlockAssociationDecoded - let cidrBlockAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcCidrBlockAssociation.self, forKey: .cidrBlockAssociation) - cidrBlockAssociation = cidrBlockAssociationDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} +enum AssociateVpcCidrBlockOutputError { -enum AssociateVpcCidrBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -8107,13 +5946,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AssociatedRole: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedRoleArn = "associatedRoleArn" - case certificateS3BucketName = "certificateS3BucketName" - case certificateS3ObjectKey = "certificateS3ObjectKey" - case encryptionKmsKeyId = "encryptionKmsKeyId" - } +extension EC2ClientTypes.AssociatedRole: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -8131,16 +5964,16 @@ extension EC2ClientTypes.AssociatedRole: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associatedRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedRoleArn) - associatedRoleArn = associatedRoleArnDecoded - let certificateS3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateS3BucketName) - certificateS3BucketName = certificateS3BucketNameDecoded - let certificateS3ObjectKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateS3ObjectKey) - certificateS3ObjectKey = certificateS3ObjectKeyDecoded - let encryptionKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .encryptionKmsKeyId) - encryptionKmsKeyId = encryptionKmsKeyIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AssociatedRole() + value.associatedRoleArn = try reader["associatedRoleArn"].readIfPresent() + value.certificateS3BucketName = try reader["certificateS3BucketName"].readIfPresent() + value.certificateS3ObjectKey = try reader["certificateS3ObjectKey"].readIfPresent() + value.encryptionKmsKeyId = try reader["encryptionKmsKeyId"].readIfPresent() + return value + } } } @@ -8172,11 +6005,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AssociatedTargetNetwork: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkId = "networkId" - case networkType = "networkType" - } +extension EC2ClientTypes.AssociatedTargetNetwork: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -8188,12 +6017,14 @@ extension EC2ClientTypes.AssociatedTargetNetwork: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkId) - networkId = networkIdDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AssociatedNetworkType.self, forKey: .networkType) - networkType = networkTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AssociatedTargetNetwork() + value.networkId = try reader["networkId"].readIfPresent() + value.networkType = try reader["networkType"].readIfPresent() + return value + } } } @@ -8217,11 +6048,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AssociationStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.AssociationStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -8233,12 +6060,14 @@ extension EC2ClientTypes.AssociationStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AssociationStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AssociationStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -8303,13 +6132,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AthenaIntegration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case integrationResultS3DestinationArn = "IntegrationResultS3DestinationArn" - case partitionEndDate = "PartitionEndDate" - case partitionLoadFrequency = "PartitionLoadFrequency" - case partitionStartDate = "PartitionStartDate" - } +extension EC2ClientTypes.AthenaIntegration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -8327,16 +6150,16 @@ extension EC2ClientTypes.AthenaIntegration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let integrationResultS3DestinationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationResultS3DestinationArn) - integrationResultS3DestinationArn = integrationResultS3DestinationArnDecoded - let partitionLoadFrequencyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PartitionLoadFrequency.self, forKey: .partitionLoadFrequency) - partitionLoadFrequency = partitionLoadFrequencyDecoded - let partitionStartDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .partitionStartDate) - partitionStartDate = partitionStartDateDecoded - let partitionEndDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .partitionEndDate) - partitionEndDate = partitionEndDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AthenaIntegration() + value.integrationResultS3DestinationArn = try reader["IntegrationResultS3DestinationArn"].readIfPresent() + value.partitionLoadFrequency = try reader["PartitionLoadFrequency"].readIfPresent() + value.partitionStartDate = try reader["PartitionStartDate"].readTimestampIfPresent(format: .dateTime) + value.partitionEndDate = try reader["PartitionEndDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -8433,59 +6256,15 @@ public struct AttachClassicLinkVpcInput: Swift.Equatable { } } -struct AttachClassicLinkVpcInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let groups: [Swift.String]? - let instanceId: Swift.String? - let vpcId: Swift.String? -} - -extension AttachClassicLinkVpcInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case groups = "SecurityGroupId" - case instanceId = "instanceId" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct groupId{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupsBuffer:[Swift.String]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [Swift.String]() - for stringContainer0 in groupsContainer { - groupsBuffer?.append(stringContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} +extension AttachClassicLinkVpcOutput { -extension AttachClassicLinkVpcOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AttachClassicLinkVpcOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AttachClassicLinkVpcOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -8502,27 +6281,18 @@ public struct AttachClassicLinkVpcOutput: Swift.Equatable { } } -struct AttachClassicLinkVpcOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension AttachClassicLinkVpcOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum AttachClassicLinkVpcOutputError { -enum AttachClassicLinkVpcOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -8573,32 +6343,12 @@ public struct AttachInternetGatewayInput: Swift.Equatable { } } -struct AttachInternetGatewayInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let internetGatewayId: Swift.String? - let vpcId: Swift.String? -} - -extension AttachInternetGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case internetGatewayId = "internetGatewayId" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let internetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .internetGatewayId) - internetGatewayId = internetGatewayIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} +extension AttachInternetGatewayOutput { -extension AttachInternetGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AttachInternetGatewayOutput() + } } } @@ -8607,11 +6357,18 @@ public struct AttachInternetGatewayOutput: Swift.Equatable { public init() { } } -enum AttachInternetGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum AttachInternetGatewayOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -8685,52 +6442,16 @@ public struct AttachNetworkInterfaceInput: Swift.Equatable { } } -struct AttachNetworkInterfaceInputBody: Swift.Equatable { - let deviceIndex: Swift.Int? - let dryRun: Swift.Bool? - let instanceId: Swift.String? - let networkInterfaceId: Swift.String? - let networkCardIndex: Swift.Int? - let enaSrdSpecification: EC2ClientTypes.EnaSrdSpecification? -} - -extension AttachNetworkInterfaceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deviceIndex = "deviceIndex" - case dryRun = "dryRun" - case enaSrdSpecification = "EnaSrdSpecification" - case instanceId = "instanceId" - case networkCardIndex = "NetworkCardIndex" - case networkInterfaceId = "networkInterfaceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deviceIndex) - deviceIndex = deviceIndexDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let networkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .networkCardIndex) - networkCardIndex = networkCardIndexDecoded - let enaSrdSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnaSrdSpecification.self, forKey: .enaSrdSpecification) - enaSrdSpecification = enaSrdSpecificationDecoded - } -} +extension AttachNetworkInterfaceOutput { -extension AttachNetworkInterfaceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AttachNetworkInterfaceOutputBody = try responseDecoder.decode(responseBody: data) - self.attachmentId = output.attachmentId - self.networkCardIndex = output.networkCardIndex - } else { - self.attachmentId = nil - self.networkCardIndex = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AttachNetworkInterfaceOutput() + value.attachmentId = try reader["attachmentId"].readIfPresent() + value.networkCardIndex = try reader["networkCardIndex"].readIfPresent() + return value } } } @@ -8752,31 +6473,18 @@ public struct AttachNetworkInterfaceOutput: Swift.Equatable { } } -struct AttachNetworkInterfaceOutputBody: Swift.Equatable { - let attachmentId: Swift.String? - let networkCardIndex: Swift.Int? -} - -extension AttachNetworkInterfaceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachmentId = "attachmentId" - case networkCardIndex = "networkCardIndex" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attachmentId) - attachmentId = attachmentIdDecoded - let networkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .networkCardIndex) - networkCardIndex = networkCardIndexDecoded - } -} +enum AttachNetworkInterfaceOutputError { -enum AttachNetworkInterfaceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -8834,44 +6542,16 @@ public struct AttachVerifiedAccessTrustProviderInput: Swift.Equatable { } } -struct AttachVerifiedAccessTrustProviderInputBody: Swift.Equatable { - let verifiedAccessInstanceId: Swift.String? - let verifiedAccessTrustProviderId: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension AttachVerifiedAccessTrustProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - case verifiedAccessTrustProviderId = "VerifiedAccessTrustProviderId" - } +extension AttachVerifiedAccessTrustProviderOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let verifiedAccessTrustProviderIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessTrustProviderId) - verifiedAccessTrustProviderId = verifiedAccessTrustProviderIdDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension AttachVerifiedAccessTrustProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AttachVerifiedAccessTrustProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessInstance = output.verifiedAccessInstance - self.verifiedAccessTrustProvider = output.verifiedAccessTrustProvider - } else { - self.verifiedAccessInstance = nil - self.verifiedAccessTrustProvider = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AttachVerifiedAccessTrustProviderOutput() + value.verifiedAccessInstance = try reader["verifiedAccessInstance"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessInstance.readingClosure) + value.verifiedAccessTrustProvider = try reader["verifiedAccessTrustProvider"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessTrustProvider.readingClosure) + return value } } } @@ -8892,31 +6572,18 @@ public struct AttachVerifiedAccessTrustProviderOutput: Swift.Equatable { } } -struct AttachVerifiedAccessTrustProviderOutputBody: Swift.Equatable { - let verifiedAccessTrustProvider: EC2ClientTypes.VerifiedAccessTrustProvider? - let verifiedAccessInstance: EC2ClientTypes.VerifiedAccessInstance? -} - -extension AttachVerifiedAccessTrustProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessInstance = "verifiedAccessInstance" - case verifiedAccessTrustProvider = "verifiedAccessTrustProvider" - } +enum AttachVerifiedAccessTrustProviderOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessTrustProvider.self, forKey: .verifiedAccessTrustProvider) - verifiedAccessTrustProvider = verifiedAccessTrustProviderDecoded - let verifiedAccessInstanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessInstance.self, forKey: .verifiedAccessInstance) - verifiedAccessInstance = verifiedAccessInstanceDecoded - } -} - -enum AttachVerifiedAccessTrustProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -8975,56 +6642,22 @@ public struct AttachVolumeInput: Swift.Equatable { } } -struct AttachVolumeInputBody: Swift.Equatable { - let device: Swift.String? - let instanceId: Swift.String? - let volumeId: Swift.String? - let dryRun: Swift.Bool? -} - -extension AttachVolumeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case device = "Device" - case dryRun = "dryRun" - case instanceId = "InstanceId" - case volumeId = "VolumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .device) - device = deviceDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AttachVolumeOutput { -extension AttachVolumeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AttachVolumeOutputBody = try responseDecoder.decode(responseBody: data) - self.associatedResource = output.associatedResource - self.attachTime = output.attachTime - self.deleteOnTermination = output.deleteOnTermination - self.device = output.device - self.instanceId = output.instanceId - self.instanceOwningService = output.instanceOwningService - self.state = output.state - self.volumeId = output.volumeId - } else { - self.associatedResource = nil - self.attachTime = nil - self.deleteOnTermination = nil - self.device = nil - self.instanceId = nil - self.instanceOwningService = nil - self.state = nil - self.volumeId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AttachVolumeOutput() + value.associatedResource = try reader["associatedResource"].readIfPresent() + value.attachTime = try reader["attachTime"].readTimestampIfPresent(format: .dateTime) + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.device = try reader["device"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceOwningService = try reader["instanceOwningService"].readIfPresent() + value.state = try reader["status"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + return value } } } @@ -9070,55 +6703,18 @@ public struct AttachVolumeOutput: Swift.Equatable { } } -struct AttachVolumeOutputBody: Swift.Equatable { - let attachTime: ClientRuntime.Date? - let device: Swift.String? - let instanceId: Swift.String? - let state: EC2ClientTypes.VolumeAttachmentState? - let volumeId: Swift.String? - let deleteOnTermination: Swift.Bool? - let associatedResource: Swift.String? - let instanceOwningService: Swift.String? -} - -extension AttachVolumeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedResource = "associatedResource" - case attachTime = "attachTime" - case deleteOnTermination = "deleteOnTermination" - case device = "device" - case instanceId = "instanceId" - case instanceOwningService = "instanceOwningService" - case state = "status" - case volumeId = "volumeId" - } +enum AttachVolumeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .attachTime) - attachTime = attachTimeDecoded - let deviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .device) - device = deviceDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeAttachmentState.self, forKey: .state) - state = stateDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) - associatedResource = associatedResourceDecoded - let instanceOwningServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceOwningService) - instanceOwningService = instanceOwningServiceDecoded - } -} - -enum AttachVolumeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -9170,38 +6766,15 @@ public struct AttachVpnGatewayInput: Swift.Equatable { } } -struct AttachVpnGatewayInputBody: Swift.Equatable { - let vpcId: Swift.String? - let vpnGatewayId: Swift.String? - let dryRun: Swift.Bool? -} - -extension AttachVpnGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpcId = "VpcId" - case vpnGatewayId = "VpnGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let vpnGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnGatewayId) - vpnGatewayId = vpnGatewayIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension AttachVpnGatewayOutput { -extension AttachVpnGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AttachVpnGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.vpcAttachment = output.vpcAttachment - } else { - self.vpcAttachment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AttachVpnGatewayOutput() + value.vpcAttachment = try reader["attachment"].readIfPresent(readingClosure: EC2ClientTypes.VpcAttachment.readingClosure) + return value } } } @@ -9219,36 +6792,23 @@ public struct AttachVpnGatewayOutput: Swift.Equatable { } } -struct AttachVpnGatewayOutputBody: Swift.Equatable { - let vpcAttachment: EC2ClientTypes.VpcAttachment? -} +enum AttachVpnGatewayOutputError { -extension AttachVpnGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpcAttachment = "attachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcAttachment.self, forKey: .vpcAttachment) - vpcAttachment = vpcAttachmentDecoded - } -} - -enum AttachVpnGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.AttachmentEnaSrdSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdEnabled = "enaSrdEnabled" - case enaSrdUdpSpecification = "enaSrdUdpSpecification" - } +extension EC2ClientTypes.AttachmentEnaSrdSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -9260,12 +6820,14 @@ extension EC2ClientTypes.AttachmentEnaSrdSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdEnabled) - enaSrdEnabled = enaSrdEnabledDecoded - let enaSrdUdpSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttachmentEnaSrdUdpSpecification.self, forKey: .enaSrdUdpSpecification) - enaSrdUdpSpecification = enaSrdUdpSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AttachmentEnaSrdSpecification() + value.enaSrdEnabled = try reader["enaSrdEnabled"].readIfPresent() + value.enaSrdUdpSpecification = try reader["enaSrdUdpSpecification"].readIfPresent(readingClosure: EC2ClientTypes.AttachmentEnaSrdUdpSpecification.readingClosure) + return value + } } } @@ -9289,10 +6851,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AttachmentEnaSrdUdpSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdUdpEnabled = "enaSrdUdpEnabled" - } +extension EC2ClientTypes.AttachmentEnaSrdUdpSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -9301,10 +6860,13 @@ extension EC2ClientTypes.AttachmentEnaSrdUdpSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdUdpEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdUdpEnabled) - enaSrdUdpEnabled = enaSrdUdpEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AttachmentEnaSrdUdpSpecification() + value.enaSrdUdpEnabled = try reader["enaSrdUdpEnabled"].readIfPresent() + return value + } } } @@ -9362,10 +6924,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AttributeBooleanValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.AttributeBooleanValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -9374,10 +6933,13 @@ extension EC2ClientTypes.AttributeBooleanValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AttributeBooleanValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -9397,10 +6959,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AttributeValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.AttributeValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -9409,10 +6968,13 @@ extension EC2ClientTypes.AttributeValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AttributeValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -9432,15 +6994,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AuthorizationRule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessAll = "accessAll" - case clientVpnEndpointId = "clientVpnEndpointId" - case description = "description" - case destinationCidr = "destinationCidr" - case groupId = "groupId" - case status = "status" - } +extension EC2ClientTypes.AuthorizationRule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -9464,20 +7018,18 @@ extension EC2ClientTypes.AuthorizationRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let accessAllDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .accessAll) - accessAll = accessAllDecoded - let destinationCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidr) - destinationCidr = destinationCidrDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnAuthorizationRuleStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AuthorizationRule() + value.clientVpnEndpointId = try reader["clientVpnEndpointId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + value.accessAll = try reader["accessAll"].readIfPresent() + value.destinationCidr = try reader["destinationCidr"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnAuthorizationRuleStatus.readingClosure) + return value + } } } @@ -9591,54 +7143,15 @@ public struct AuthorizeClientVpnIngressInput: Swift.Equatable { } } -struct AuthorizeClientVpnIngressInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let targetNetworkCidr: Swift.String? - let accessGroupId: Swift.String? - let authorizeAllGroups: Swift.Bool? - let description: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} +extension AuthorizeClientVpnIngressOutput { -extension AuthorizeClientVpnIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGroupId = "AccessGroupId" - case authorizeAllGroups = "AuthorizeAllGroups" - case clientToken = "ClientToken" - case clientVpnEndpointId = "ClientVpnEndpointId" - case description = "Description" - case dryRun = "DryRun" - case targetNetworkCidr = "TargetNetworkCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let targetNetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetNetworkCidr) - targetNetworkCidr = targetNetworkCidrDecoded - let accessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGroupId) - accessGroupId = accessGroupIdDecoded - let authorizeAllGroupsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .authorizeAllGroups) - authorizeAllGroups = authorizeAllGroupsDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension AuthorizeClientVpnIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeClientVpnIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.status = output.status - } else { - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AuthorizeClientVpnIngressOutput() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnAuthorizationRuleStatus.readingClosure) + return value } } } @@ -9655,27 +7168,18 @@ public struct AuthorizeClientVpnIngressOutput: Swift.Equatable { } } -struct AuthorizeClientVpnIngressOutputBody: Swift.Equatable { - let status: EC2ClientTypes.ClientVpnAuthorizationRuleStatus? -} - -extension AuthorizeClientVpnIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnAuthorizationRuleStatus.self, forKey: .status) - status = statusDecoded - } -} +enum AuthorizeClientVpnIngressOutputError { -enum AuthorizeClientVpnIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -9792,102 +7296,16 @@ public struct AuthorizeSecurityGroupEgressInput: Swift.Equatable { } } -struct AuthorizeSecurityGroupEgressInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let groupId: Swift.String? - let ipPermissions: [EC2ClientTypes.IpPermission]? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let cidrIp: Swift.String? - let fromPort: Swift.Int? - let ipProtocol: Swift.String? - let toPort: Swift.Int? - let sourceSecurityGroupName: Swift.String? - let sourceSecurityGroupOwnerId: Swift.String? -} - -extension AuthorizeSecurityGroupEgressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrIp = "cidrIp" - case dryRun = "dryRun" - case fromPort = "fromPort" - case groupId = "groupId" - case ipPermissions = "ipPermissions" - case ipProtocol = "ipProtocol" - case sourceSecurityGroupName = "sourceSecurityGroupName" - case sourceSecurityGroupOwnerId = "sourceSecurityGroupOwnerId" - case tagSpecifications = "TagSpecification" - case toPort = "toPort" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - if containerValues.contains(.ipPermissions) { - struct KeyVal0{struct item{}} - let ipPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipPermissions) - if let ipPermissionsWrappedContainer = ipPermissionsWrappedContainer { - let ipPermissionsContainer = try ipPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var ipPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let ipPermissionsContainer = ipPermissionsContainer { - ipPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in ipPermissionsContainer { - ipPermissionsBuffer?.append(structureContainer0) - } - } - ipPermissions = ipPermissionsBuffer - } else { - ipPermissions = [] - } - } else { - ipPermissions = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let cidrIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIp) - cidrIp = cidrIpDecoded - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let ipProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipProtocol) - ipProtocol = ipProtocolDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded - let sourceSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSecurityGroupName) - sourceSecurityGroupName = sourceSecurityGroupNameDecoded - let sourceSecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSecurityGroupOwnerId) - sourceSecurityGroupOwnerId = sourceSecurityGroupOwnerIdDecoded - } -} - -extension AuthorizeSecurityGroupEgressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeSecurityGroupEgressOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - self.securityGroupRules = output.securityGroupRules - } else { - self.`return` = nil - self.securityGroupRules = nil +extension AuthorizeSecurityGroupEgressOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AuthorizeSecurityGroupEgressOutput() + value.`return` = try reader["return"].readIfPresent() + value.securityGroupRules = try reader["securityGroupRuleSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SecurityGroupRule.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -9908,48 +7326,18 @@ public struct AuthorizeSecurityGroupEgressOutput: Swift.Equatable { } } -struct AuthorizeSecurityGroupEgressOutputBody: Swift.Equatable { - let `return`: Swift.Bool? - let securityGroupRules: [EC2ClientTypes.SecurityGroupRule]? -} - -extension AuthorizeSecurityGroupEgressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - case securityGroupRules = "securityGroupRuleSet" - } +enum AuthorizeSecurityGroupEgressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - if containerValues.contains(.securityGroupRules) { - struct KeyVal0{struct item{}} - let securityGroupRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRules) - if let securityGroupRulesWrappedContainer = securityGroupRulesWrappedContainer { - let securityGroupRulesContainer = try securityGroupRulesWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupRule].self, forKey: .member) - var securityGroupRulesBuffer:[EC2ClientTypes.SecurityGroupRule]? = nil - if let securityGroupRulesContainer = securityGroupRulesContainer { - securityGroupRulesBuffer = [EC2ClientTypes.SecurityGroupRule]() - for structureContainer0 in securityGroupRulesContainer { - securityGroupRulesBuffer?.append(structureContainer0) - } - } - securityGroupRules = securityGroupRulesBuffer - } else { - securityGroupRules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - securityGroupRules = nil - } - } -} - -enum AuthorizeSecurityGroupEgressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -10072,106 +7460,16 @@ public struct AuthorizeSecurityGroupIngressInput: Swift.Equatable { } } -struct AuthorizeSecurityGroupIngressInputBody: Swift.Equatable { - let cidrIp: Swift.String? - let fromPort: Swift.Int? - let groupId: Swift.String? - let groupName: Swift.String? - let ipPermissions: [EC2ClientTypes.IpPermission]? - let ipProtocol: Swift.String? - let sourceSecurityGroupName: Swift.String? - let sourceSecurityGroupOwnerId: Swift.String? - let toPort: Swift.Int? - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension AuthorizeSecurityGroupIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrIp = "CidrIp" - case dryRun = "dryRun" - case fromPort = "FromPort" - case groupId = "GroupId" - case groupName = "GroupName" - case ipPermissions = "IpPermissions" - case ipProtocol = "IpProtocol" - case sourceSecurityGroupName = "SourceSecurityGroupName" - case sourceSecurityGroupOwnerId = "SourceSecurityGroupOwnerId" - case tagSpecifications = "TagSpecification" - case toPort = "ToPort" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIp) - cidrIp = cidrIpDecoded - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - if containerValues.contains(.ipPermissions) { - struct KeyVal0{struct item{}} - let ipPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipPermissions) - if let ipPermissionsWrappedContainer = ipPermissionsWrappedContainer { - let ipPermissionsContainer = try ipPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var ipPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let ipPermissionsContainer = ipPermissionsContainer { - ipPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in ipPermissionsContainer { - ipPermissionsBuffer?.append(structureContainer0) - } - } - ipPermissions = ipPermissionsBuffer - } else { - ipPermissions = [] - } - } else { - ipPermissions = nil - } - let ipProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipProtocol) - ipProtocol = ipProtocolDecoded - let sourceSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSecurityGroupName) - sourceSecurityGroupName = sourceSecurityGroupNameDecoded - let sourceSecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSecurityGroupOwnerId) - sourceSecurityGroupOwnerId = sourceSecurityGroupOwnerIdDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension AuthorizeSecurityGroupIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeSecurityGroupIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - self.securityGroupRules = output.securityGroupRules - } else { - self.`return` = nil - self.securityGroupRules = nil +extension AuthorizeSecurityGroupIngressOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AuthorizeSecurityGroupIngressOutput() + value.`return` = try reader["return"].readIfPresent() + value.securityGroupRules = try reader["securityGroupRuleSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SecurityGroupRule.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -10192,48 +7490,18 @@ public struct AuthorizeSecurityGroupIngressOutput: Swift.Equatable { } } -struct AuthorizeSecurityGroupIngressOutputBody: Swift.Equatable { - let `return`: Swift.Bool? - let securityGroupRules: [EC2ClientTypes.SecurityGroupRule]? -} - -extension AuthorizeSecurityGroupIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - case securityGroupRules = "securityGroupRuleSet" - } +enum AuthorizeSecurityGroupIngressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - if containerValues.contains(.securityGroupRules) { - struct KeyVal0{struct item{}} - let securityGroupRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRules) - if let securityGroupRulesWrappedContainer = securityGroupRulesWrappedContainer { - let securityGroupRulesContainer = try securityGroupRulesWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupRule].self, forKey: .member) - var securityGroupRulesBuffer:[EC2ClientTypes.SecurityGroupRule]? = nil - if let securityGroupRulesContainer = securityGroupRulesContainer { - securityGroupRulesBuffer = [EC2ClientTypes.SecurityGroupRule]() - for structureContainer0 in securityGroupRulesContainer { - securityGroupRulesBuffer?.append(structureContainer0) - } - } - securityGroupRules = securityGroupRulesBuffer - } else { - securityGroupRules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - securityGroupRules = nil - } - } -} - -enum AuthorizeSecurityGroupIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -10334,20 +7602,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AvailabilityZone: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "groupName" - case messages = "messageSet" - case networkBorderGroup = "networkBorderGroup" - case optInStatus = "optInStatus" - case parentZoneId = "parentZoneId" - case parentZoneName = "parentZoneName" - case regionName = "regionName" - case state = "zoneState" - case zoneId = "zoneId" - case zoneName = "zoneName" - case zoneType = "zoneType" - } +extension EC2ClientTypes.AvailabilityZone: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -10395,47 +7650,23 @@ extension EC2ClientTypes.AvailabilityZone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AvailabilityZoneState.self, forKey: .state) - state = stateDecoded - let optInStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AvailabilityZoneOptInStatus.self, forKey: .optInStatus) - optInStatus = optInStatusDecoded - if containerValues.contains(.messages) { - struct KeyVal0{struct item{}} - let messagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .messages) - if let messagesWrappedContainer = messagesWrappedContainer { - let messagesContainer = try messagesWrappedContainer.decodeIfPresent([EC2ClientTypes.AvailabilityZoneMessage].self, forKey: .member) - var messagesBuffer:[EC2ClientTypes.AvailabilityZoneMessage]? = nil - if let messagesContainer = messagesContainer { - messagesBuffer = [EC2ClientTypes.AvailabilityZoneMessage]() - for structureContainer0 in messagesContainer { - messagesBuffer?.append(structureContainer0) - } - } - messages = messagesBuffer - } else { - messages = [] - } - } else { - messages = nil - } - let regionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .regionName) - regionName = regionNameDecoded - let zoneNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .zoneName) - zoneName = zoneNameDecoded - let zoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .zoneId) - zoneId = zoneIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - let zoneTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .zoneType) - zoneType = zoneTypeDecoded - let parentZoneNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parentZoneName) - parentZoneName = parentZoneNameDecoded - let parentZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parentZoneId) - parentZoneId = parentZoneIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AvailabilityZone() + value.state = try reader["zoneState"].readIfPresent() + value.optInStatus = try reader["optInStatus"].readIfPresent() + value.messages = try reader["messageSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AvailabilityZoneMessage.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.regionName = try reader["regionName"].readIfPresent() + value.zoneName = try reader["zoneName"].readIfPresent() + value.zoneId = try reader["zoneId"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.networkBorderGroup = try reader["networkBorderGroup"].readIfPresent() + value.zoneType = try reader["zoneType"].readIfPresent() + value.parentZoneName = try reader["parentZoneName"].readIfPresent() + value.parentZoneId = try reader["parentZoneId"].readIfPresent() + return value + } } } @@ -10495,10 +7726,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.AvailabilityZoneMessage: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "message" - } +extension EC2ClientTypes.AvailabilityZoneMessage: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -10507,10 +7735,13 @@ extension EC2ClientTypes.AvailabilityZoneMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AvailabilityZoneMessage() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -10603,11 +7834,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.AvailableCapacity: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availableInstanceCapacity = "availableInstanceCapacity" - case availableVCpus = "availableVCpus" - } +extension EC2ClientTypes.AvailableCapacity: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -10628,29 +7855,14 @@ extension EC2ClientTypes.AvailableCapacity: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availableInstanceCapacity) { - struct KeyVal0{struct item{}} - let availableInstanceCapacityWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availableInstanceCapacity) - if let availableInstanceCapacityWrappedContainer = availableInstanceCapacityWrappedContainer { - let availableInstanceCapacityContainer = try availableInstanceCapacityWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceCapacity].self, forKey: .member) - var availableInstanceCapacityBuffer:[EC2ClientTypes.InstanceCapacity]? = nil - if let availableInstanceCapacityContainer = availableInstanceCapacityContainer { - availableInstanceCapacityBuffer = [EC2ClientTypes.InstanceCapacity]() - for structureContainer0 in availableInstanceCapacityContainer { - availableInstanceCapacityBuffer?.append(structureContainer0) - } - } - availableInstanceCapacity = availableInstanceCapacityBuffer - } else { - availableInstanceCapacity = [] - } - } else { - availableInstanceCapacity = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.AvailableCapacity() + value.availableInstanceCapacity = try reader["availableInstanceCapacity"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceCapacity.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.availableVCpus = try reader["availableVCpus"].readIfPresent() + return value } - let availableVCpusDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .availableVCpus) - availableVCpus = availableVCpusDecoded } } @@ -10709,11 +7921,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.BaselineEbsBandwidthMbps: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.BaselineEbsBandwidthMbps: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -10725,12 +7933,14 @@ extension EC2ClientTypes.BaselineEbsBandwidthMbps: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.BaselineEbsBandwidthMbps() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -10754,11 +7964,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.BaselineEbsBandwidthMbpsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.BaselineEbsBandwidthMbpsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -10770,12 +7976,14 @@ extension EC2ClientTypes.BaselineEbsBandwidthMbpsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.BaselineEbsBandwidthMbpsRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -10878,10 +8086,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.BlobAttributeValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.BlobAttributeValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -10890,17 +8095,12 @@ extension EC2ClientTypes.BlobAttributeValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.value) { - do { - let valueDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .value) - value = valueDecoded - } catch { - value = "".data(using: .utf8) - } - } else { - value = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.BlobAttributeValue() + value.value = try reader["value"].readIfPresent() + return value } } } @@ -10919,13 +8119,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.BlockDeviceMapping: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deviceName = "deviceName" - case ebs = "ebs" - case noDevice = "noDevice" - case virtualName = "virtualName" - } +extension EC2ClientTypes.BlockDeviceMapping: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -10943,16 +8137,16 @@ extension EC2ClientTypes.BlockDeviceMapping: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let virtualNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualName) - virtualName = virtualNameDecoded - let ebsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EbsBlockDevice.self, forKey: .ebs) - ebs = ebsDecoded - let noDeviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .noDevice) - noDevice = noDeviceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.BlockDeviceMapping() + value.deviceName = try reader["deviceName"].readIfPresent() + value.virtualName = try reader["virtualName"].readIfPresent() + value.ebs = try reader["ebs"].readIfPresent(readingClosure: EC2ClientTypes.EbsBlockDevice.readingClosure) + value.noDevice = try reader["noDevice"].readIfPresent() + return value + } } } @@ -11098,38 +8292,15 @@ public struct BundleInstanceInput: Swift.Equatable { } } -struct BundleInstanceInputBody: Swift.Equatable { - let instanceId: Swift.String? - let storage: EC2ClientTypes.Storage? - let dryRun: Swift.Bool? -} - -extension BundleInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceId = "InstanceId" - case storage = "Storage" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let storageDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Storage.self, forKey: .storage) - storage = storageDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension BundleInstanceOutput { -extension BundleInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BundleInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.bundleTask = output.bundleTask - } else { - self.bundleTask = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = BundleInstanceOutput() + value.bundleTask = try reader["bundleInstanceTask"].readIfPresent(readingClosure: EC2ClientTypes.BundleTask.readingClosure) + return value } } } @@ -11147,42 +8318,23 @@ public struct BundleInstanceOutput: Swift.Equatable { } } -struct BundleInstanceOutputBody: Swift.Equatable { - let bundleTask: EC2ClientTypes.BundleTask? -} - -extension BundleInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bundleTask = "bundleInstanceTask" - } +enum BundleInstanceOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bundleTaskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BundleTask.self, forKey: .bundleTask) - bundleTask = bundleTaskDecoded - } -} - -enum BundleInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.BundleTask: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bundleId = "bundleId" - case bundleTaskError = "error" - case instanceId = "instanceId" - case progress = "progress" - case startTime = "startTime" - case state = "state" - case storage = "storage" - case updateTime = "updateTime" - } +extension EC2ClientTypes.BundleTask: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -11212,24 +8364,20 @@ extension EC2ClientTypes.BundleTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bundleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bundleId) - bundleId = bundleIdDecoded - let bundleTaskErrorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BundleTaskError.self, forKey: .bundleTaskError) - bundleTaskError = bundleTaskErrorDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BundleTaskState.self, forKey: .state) - state = stateDecoded - let storageDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Storage.self, forKey: .storage) - storage = storageDecoded - let updateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateTime) - updateTime = updateTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.BundleTask() + value.bundleId = try reader["bundleId"].readIfPresent() + value.bundleTaskError = try reader["error"].readIfPresent(readingClosure: EC2ClientTypes.BundleTaskError.readingClosure) + value.instanceId = try reader["instanceId"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: .dateTime) + value.state = try reader["state"].readIfPresent() + value.storage = try reader["storage"].readIfPresent(readingClosure: EC2ClientTypes.Storage.readingClosure) + value.updateTime = try reader["updateTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -11277,11 +8425,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.BundleTaskError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.BundleTaskError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -11293,12 +8437,14 @@ extension EC2ClientTypes.BundleTaskError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.BundleTaskError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -11404,13 +8550,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Byoasn: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asn = "asn" - case ipamId = "ipamId" - case state = "state" - case statusMessage = "statusMessage" - } +extension EC2ClientTypes.Byoasn: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -11428,16 +8568,16 @@ extension EC2ClientTypes.Byoasn: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let asnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .asn) - asn = asnDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AsnState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Byoasn() + value.asn = try reader["asn"].readIfPresent() + value.ipamId = try reader["ipamId"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -11469,15 +8609,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ByoipCidr: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asnAssociations = "asnAssociationSet" - case cidr = "cidr" - case description = "description" - case networkBorderGroup = "networkBorderGroup" - case state = "state" - case statusMessage = "statusMessage" - } +extension EC2ClientTypes.ByoipCidr: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -11510,37 +8642,18 @@ extension EC2ClientTypes.ByoipCidr: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.asnAssociations) { - struct KeyVal0{struct item{}} - let asnAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .asnAssociations) - if let asnAssociationsWrappedContainer = asnAssociationsWrappedContainer { - let asnAssociationsContainer = try asnAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.AsnAssociation].self, forKey: .member) - var asnAssociationsBuffer:[EC2ClientTypes.AsnAssociation]? = nil - if let asnAssociationsContainer = asnAssociationsContainer { - asnAssociationsBuffer = [EC2ClientTypes.AsnAssociation]() - for structureContainer0 in asnAssociationsContainer { - asnAssociationsBuffer?.append(structureContainer0) - } - } - asnAssociations = asnAssociationsBuffer - } else { - asnAssociations = [] - } - } else { - asnAssociations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ByoipCidr() + value.cidr = try reader["cidr"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.asnAssociations = try reader["asnAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AsnAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.networkBorderGroup = try reader["networkBorderGroup"].readIfPresent() + return value } - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ByoipCidrState.self, forKey: .state) - state = stateDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded } } @@ -11716,34 +8829,15 @@ public struct CancelBundleTaskInput: Swift.Equatable { } } -struct CancelBundleTaskInputBody: Swift.Equatable { - let bundleId: Swift.String? - let dryRun: Swift.Bool? -} +extension CancelBundleTaskOutput { -extension CancelBundleTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bundleId = "BundleId" - case dryRun = "dryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bundleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bundleId) - bundleId = bundleIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CancelBundleTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelBundleTaskOutputBody = try responseDecoder.decode(responseBody: data) - self.bundleTask = output.bundleTask - } else { - self.bundleTask = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CancelBundleTaskOutput() + value.bundleTask = try reader["bundleInstanceTask"].readIfPresent(readingClosure: EC2ClientTypes.BundleTask.readingClosure) + return value } } } @@ -11761,36 +8855,23 @@ public struct CancelBundleTaskOutput: Swift.Equatable { } } -struct CancelBundleTaskOutputBody: Swift.Equatable { - let bundleTask: EC2ClientTypes.BundleTask? -} - -extension CancelBundleTaskOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bundleTask = "bundleInstanceTask" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bundleTaskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BundleTask.self, forKey: .bundleTask) - bundleTask = bundleTaskDecoded - } -} +enum CancelBundleTaskOutputError { -enum CancelBundleTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.CancelCapacityReservationFleetError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.CancelCapacityReservationFleetError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -11802,12 +8883,14 @@ extension EC2ClientTypes.CancelCapacityReservationFleetError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CancelCapacityReservationFleetError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -11878,53 +8961,16 @@ public struct CancelCapacityReservationFleetsInput: Swift.Equatable { } } -struct CancelCapacityReservationFleetsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let capacityReservationFleetIds: [Swift.String]? -} - -extension CancelCapacityReservationFleetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationFleetIds = "CapacityReservationFleetId" - case dryRun = "DryRun" - } +extension CancelCapacityReservationFleetsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.capacityReservationFleetIds) { - struct KeyVal0{struct item{}} - let capacityReservationFleetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capacityReservationFleetIds) - if let capacityReservationFleetIdsWrappedContainer = capacityReservationFleetIdsWrappedContainer { - let capacityReservationFleetIdsContainer = try capacityReservationFleetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var capacityReservationFleetIdsBuffer:[Swift.String]? = nil - if let capacityReservationFleetIdsContainer = capacityReservationFleetIdsContainer { - capacityReservationFleetIdsBuffer = [Swift.String]() - for stringContainer0 in capacityReservationFleetIdsContainer { - capacityReservationFleetIdsBuffer?.append(stringContainer0) - } - } - capacityReservationFleetIds = capacityReservationFleetIdsBuffer - } else { - capacityReservationFleetIds = [] - } - } else { - capacityReservationFleetIds = nil - } - } -} - -extension CancelCapacityReservationFleetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelCapacityReservationFleetsOutputBody = try responseDecoder.decode(responseBody: data) - self.failedFleetCancellations = output.failedFleetCancellations - self.successfulFleetCancellations = output.successfulFleetCancellations - } else { - self.failedFleetCancellations = nil - self.successfulFleetCancellations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CancelCapacityReservationFleetsOutput() + value.failedFleetCancellations = try reader["failedFleetCancellationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FailedCapacityReservationFleetCancellationResult.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.successfulFleetCancellations = try reader["successfulFleetCancellationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CapacityReservationFleetCancellationState.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -11945,65 +8991,18 @@ public struct CancelCapacityReservationFleetsOutput: Swift.Equatable { } } -struct CancelCapacityReservationFleetsOutputBody: Swift.Equatable { - let successfulFleetCancellations: [EC2ClientTypes.CapacityReservationFleetCancellationState]? - let failedFleetCancellations: [EC2ClientTypes.FailedCapacityReservationFleetCancellationResult]? -} +enum CancelCapacityReservationFleetsOutputError { -extension CancelCapacityReservationFleetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failedFleetCancellations = "failedFleetCancellationSet" - case successfulFleetCancellations = "successfulFleetCancellationSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successfulFleetCancellations) { - struct KeyVal0{struct item{}} - let successfulFleetCancellationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successfulFleetCancellations) - if let successfulFleetCancellationsWrappedContainer = successfulFleetCancellationsWrappedContainer { - let successfulFleetCancellationsContainer = try successfulFleetCancellationsWrappedContainer.decodeIfPresent([EC2ClientTypes.CapacityReservationFleetCancellationState].self, forKey: .member) - var successfulFleetCancellationsBuffer:[EC2ClientTypes.CapacityReservationFleetCancellationState]? = nil - if let successfulFleetCancellationsContainer = successfulFleetCancellationsContainer { - successfulFleetCancellationsBuffer = [EC2ClientTypes.CapacityReservationFleetCancellationState]() - for structureContainer0 in successfulFleetCancellationsContainer { - successfulFleetCancellationsBuffer?.append(structureContainer0) - } - } - successfulFleetCancellations = successfulFleetCancellationsBuffer - } else { - successfulFleetCancellations = [] - } - } else { - successfulFleetCancellations = nil - } - if containerValues.contains(.failedFleetCancellations) { - struct KeyVal0{struct item{}} - let failedFleetCancellationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failedFleetCancellations) - if let failedFleetCancellationsWrappedContainer = failedFleetCancellationsWrappedContainer { - let failedFleetCancellationsContainer = try failedFleetCancellationsWrappedContainer.decodeIfPresent([EC2ClientTypes.FailedCapacityReservationFleetCancellationResult].self, forKey: .member) - var failedFleetCancellationsBuffer:[EC2ClientTypes.FailedCapacityReservationFleetCancellationResult]? = nil - if let failedFleetCancellationsContainer = failedFleetCancellationsContainer { - failedFleetCancellationsBuffer = [EC2ClientTypes.FailedCapacityReservationFleetCancellationResult]() - for structureContainer0 in failedFleetCancellationsContainer { - failedFleetCancellationsBuffer?.append(structureContainer0) - } - } - failedFleetCancellations = failedFleetCancellationsBuffer - } else { - failedFleetCancellations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - failedFleetCancellations = nil - } - } -} - -enum CancelCapacityReservationFleetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -12046,34 +9045,15 @@ public struct CancelCapacityReservationInput: Swift.Equatable { } } -struct CancelCapacityReservationInputBody: Swift.Equatable { - let capacityReservationId: Swift.String? - let dryRun: Swift.Bool? -} +extension CancelCapacityReservationOutput { -extension CancelCapacityReservationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationId = "CapacityReservationId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CancelCapacityReservationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelCapacityReservationOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CancelCapacityReservationOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -12090,27 +9070,18 @@ public struct CancelCapacityReservationOutput: Swift.Equatable { } } -struct CancelCapacityReservationOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} +enum CancelCapacityReservationOutputError { -extension CancelCapacityReservationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum CancelCapacityReservationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -12160,32 +9131,12 @@ public struct CancelConversionTaskInput: Swift.Equatable { } } -struct CancelConversionTaskInputBody: Swift.Equatable { - let conversionTaskId: Swift.String? - let dryRun: Swift.Bool? - let reasonMessage: Swift.String? -} - -extension CancelConversionTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case conversionTaskId = "conversionTaskId" - case dryRun = "dryRun" - case reasonMessage = "reasonMessage" - } +extension CancelConversionTaskOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let conversionTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .conversionTaskId) - conversionTaskId = conversionTaskIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let reasonMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reasonMessage) - reasonMessage = reasonMessageDecoded - } -} - -extension CancelConversionTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CancelConversionTaskOutput() + } } } @@ -12194,11 +9145,18 @@ public struct CancelConversionTaskOutput: Swift.Equatable { public init() { } } -enum CancelConversionTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum CancelConversionTaskOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -12234,24 +9192,12 @@ public struct CancelExportTaskInput: Swift.Equatable { } } -struct CancelExportTaskInputBody: Swift.Equatable { - let exportTaskId: Swift.String? -} - -extension CancelExportTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportTaskId = "exportTaskId" - } +extension CancelExportTaskOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exportTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportTaskId) - exportTaskId = exportTaskIdDecoded - } -} - -extension CancelExportTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CancelExportTaskOutput() + } } } @@ -12260,11 +9206,18 @@ public struct CancelExportTaskOutput: Swift.Equatable { public init() { } } -enum CancelExportTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum CancelExportTaskOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -12307,34 +9260,15 @@ public struct CancelImageLaunchPermissionInput: Swift.Equatable { } } -struct CancelImageLaunchPermissionInputBody: Swift.Equatable { - let imageId: Swift.String? - let dryRun: Swift.Bool? -} +extension CancelImageLaunchPermissionOutput { -extension CancelImageLaunchPermissionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case imageId = "ImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CancelImageLaunchPermissionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelImageLaunchPermissionOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CancelImageLaunchPermissionOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -12351,27 +9285,18 @@ public struct CancelImageLaunchPermissionOutput: Swift.Equatable { } } -struct CancelImageLaunchPermissionOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension CancelImageLaunchPermissionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum CancelImageLaunchPermissionOutputError { -enum CancelImageLaunchPermissionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -12420,42 +9345,17 @@ public struct CancelImportTaskInput: Swift.Equatable { } } -struct CancelImportTaskInputBody: Swift.Equatable { - let cancelReason: Swift.String? - let dryRun: Swift.Bool? - let importTaskId: Swift.String? -} - -extension CancelImportTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cancelReason = "CancelReason" - case dryRun = "DryRun" - case importTaskId = "ImportTaskId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cancelReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cancelReason) - cancelReason = cancelReasonDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let importTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importTaskId) - importTaskId = importTaskIdDecoded - } -} +extension CancelImportTaskOutput { -extension CancelImportTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelImportTaskOutputBody = try responseDecoder.decode(responseBody: data) - self.importTaskId = output.importTaskId - self.previousState = output.previousState - self.state = output.state - } else { - self.importTaskId = nil - self.previousState = nil - self.state = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CancelImportTaskOutput() + value.importTaskId = try reader["importTaskId"].readIfPresent() + value.previousState = try reader["previousState"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value } } } @@ -12480,35 +9380,18 @@ public struct CancelImportTaskOutput: Swift.Equatable { } } -struct CancelImportTaskOutputBody: Swift.Equatable { - let importTaskId: Swift.String? - let previousState: Swift.String? - let state: Swift.String? -} +enum CancelImportTaskOutputError { -extension CancelImportTaskOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case importTaskId = "importTaskId" - case previousState = "previousState" - case state = "state" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let importTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importTaskId) - importTaskId = importTaskIdDecoded - let previousStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .previousState) - previousState = previousStateDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - } -} - -enum CancelImportTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -12545,30 +9428,15 @@ public struct CancelReservedInstancesListingInput: Swift.Equatable { } } -struct CancelReservedInstancesListingInputBody: Swift.Equatable { - let reservedInstancesListingId: Swift.String? -} +extension CancelReservedInstancesListingOutput { -extension CancelReservedInstancesListingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesListingId = "reservedInstancesListingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedInstancesListingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesListingId) - reservedInstancesListingId = reservedInstancesListingIdDecoded - } -} - -extension CancelReservedInstancesListingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelReservedInstancesListingOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedInstancesListings = output.reservedInstancesListings - } else { - self.reservedInstancesListings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CancelReservedInstancesListingOutput() + value.reservedInstancesListings = try reader["reservedInstancesListingsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstancesListing.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -12586,53 +9454,23 @@ public struct CancelReservedInstancesListingOutput: Swift.Equatable { } } -struct CancelReservedInstancesListingOutputBody: Swift.Equatable { - let reservedInstancesListings: [EC2ClientTypes.ReservedInstancesListing]? -} - -extension CancelReservedInstancesListingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesListings = "reservedInstancesListingsSet" - } +enum CancelReservedInstancesListingOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.reservedInstancesListings) { - struct KeyVal0{struct item{}} - let reservedInstancesListingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesListings) - if let reservedInstancesListingsWrappedContainer = reservedInstancesListingsWrappedContainer { - let reservedInstancesListingsContainer = try reservedInstancesListingsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstancesListing].self, forKey: .member) - var reservedInstancesListingsBuffer:[EC2ClientTypes.ReservedInstancesListing]? = nil - if let reservedInstancesListingsContainer = reservedInstancesListingsContainer { - reservedInstancesListingsBuffer = [EC2ClientTypes.ReservedInstancesListing]() - for structureContainer0 in reservedInstancesListingsContainer { - reservedInstancesListingsBuffer?.append(structureContainer0) - } - } - reservedInstancesListings = reservedInstancesListingsBuffer - } else { - reservedInstancesListings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - reservedInstancesListings = nil } } } -enum CancelReservedInstancesListingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.CancelSpotFleetRequestsError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.CancelSpotFleetRequestsError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -12644,12 +9482,14 @@ extension EC2ClientTypes.CancelSpotFleetRequestsError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CancelBatchErrorCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CancelSpotFleetRequestsError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -12673,11 +9513,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CancelSpotFleetRequestsErrorItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case error = "error" - case spotFleetRequestId = "spotFleetRequestId" - } +extension EC2ClientTypes.CancelSpotFleetRequestsErrorItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -12689,12 +9525,14 @@ extension EC2ClientTypes.CancelSpotFleetRequestsErrorItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CancelSpotFleetRequestsError.self, forKey: .error) - error = errorDecoded - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CancelSpotFleetRequestsErrorItem() + value.error = try reader["error"].readIfPresent(readingClosure: EC2ClientTypes.CancelSpotFleetRequestsError.readingClosure) + value.spotFleetRequestId = try reader["spotFleetRequestId"].readIfPresent() + return value + } } } @@ -12774,57 +9612,16 @@ public struct CancelSpotFleetRequestsInput: Swift.Equatable { } } -struct CancelSpotFleetRequestsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let spotFleetRequestIds: [Swift.String]? - let terminateInstances: Swift.Bool? -} - -extension CancelSpotFleetRequestsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case spotFleetRequestIds = "spotFleetRequestId" - case terminateInstances = "terminateInstances" - } +extension CancelSpotFleetRequestsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.spotFleetRequestIds) { - struct KeyVal0{struct item{}} - let spotFleetRequestIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotFleetRequestIds) - if let spotFleetRequestIdsWrappedContainer = spotFleetRequestIdsWrappedContainer { - let spotFleetRequestIdsContainer = try spotFleetRequestIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var spotFleetRequestIdsBuffer:[Swift.String]? = nil - if let spotFleetRequestIdsContainer = spotFleetRequestIdsContainer { - spotFleetRequestIdsBuffer = [Swift.String]() - for stringContainer0 in spotFleetRequestIdsContainer { - spotFleetRequestIdsBuffer?.append(stringContainer0) - } - } - spotFleetRequestIds = spotFleetRequestIdsBuffer - } else { - spotFleetRequestIds = [] - } - } else { - spotFleetRequestIds = nil - } - let terminateInstancesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .terminateInstances) - terminateInstances = terminateInstancesDecoded - } -} - -extension CancelSpotFleetRequestsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelSpotFleetRequestsOutputBody = try responseDecoder.decode(responseBody: data) - self.successfulFleetRequests = output.successfulFleetRequests - self.unsuccessfulFleetRequests = output.unsuccessfulFleetRequests - } else { - self.successfulFleetRequests = nil - self.unsuccessfulFleetRequests = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CancelSpotFleetRequestsOutput() + value.successfulFleetRequests = try reader["successfulFleetRequestSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CancelSpotFleetRequestsSuccessItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessfulFleetRequests = try reader["unsuccessfulFleetRequestSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CancelSpotFleetRequestsErrorItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -12846,75 +9643,23 @@ public struct CancelSpotFleetRequestsOutput: Swift.Equatable { } } -struct CancelSpotFleetRequestsOutputBody: Swift.Equatable { - let successfulFleetRequests: [EC2ClientTypes.CancelSpotFleetRequestsSuccessItem]? - let unsuccessfulFleetRequests: [EC2ClientTypes.CancelSpotFleetRequestsErrorItem]? -} +enum CancelSpotFleetRequestsOutputError { -extension CancelSpotFleetRequestsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case successfulFleetRequests = "successfulFleetRequestSet" - case unsuccessfulFleetRequests = "unsuccessfulFleetRequestSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successfulFleetRequests) { - struct KeyVal0{struct item{}} - let successfulFleetRequestsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successfulFleetRequests) - if let successfulFleetRequestsWrappedContainer = successfulFleetRequestsWrappedContainer { - let successfulFleetRequestsContainer = try successfulFleetRequestsWrappedContainer.decodeIfPresent([EC2ClientTypes.CancelSpotFleetRequestsSuccessItem].self, forKey: .member) - var successfulFleetRequestsBuffer:[EC2ClientTypes.CancelSpotFleetRequestsSuccessItem]? = nil - if let successfulFleetRequestsContainer = successfulFleetRequestsContainer { - successfulFleetRequestsBuffer = [EC2ClientTypes.CancelSpotFleetRequestsSuccessItem]() - for structureContainer0 in successfulFleetRequestsContainer { - successfulFleetRequestsBuffer?.append(structureContainer0) - } - } - successfulFleetRequests = successfulFleetRequestsBuffer - } else { - successfulFleetRequests = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - successfulFleetRequests = nil - } - if containerValues.contains(.unsuccessfulFleetRequests) { - struct KeyVal0{struct item{}} - let unsuccessfulFleetRequestsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessfulFleetRequests) - if let unsuccessfulFleetRequestsWrappedContainer = unsuccessfulFleetRequestsWrappedContainer { - let unsuccessfulFleetRequestsContainer = try unsuccessfulFleetRequestsWrappedContainer.decodeIfPresent([EC2ClientTypes.CancelSpotFleetRequestsErrorItem].self, forKey: .member) - var unsuccessfulFleetRequestsBuffer:[EC2ClientTypes.CancelSpotFleetRequestsErrorItem]? = nil - if let unsuccessfulFleetRequestsContainer = unsuccessfulFleetRequestsContainer { - unsuccessfulFleetRequestsBuffer = [EC2ClientTypes.CancelSpotFleetRequestsErrorItem]() - for structureContainer0 in unsuccessfulFleetRequestsContainer { - unsuccessfulFleetRequestsBuffer?.append(structureContainer0) - } - } - unsuccessfulFleetRequests = unsuccessfulFleetRequestsBuffer - } else { - unsuccessfulFleetRequests = [] - } - } else { - unsuccessfulFleetRequests = nil } } } -enum CancelSpotFleetRequestsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.CancelSpotFleetRequestsSuccessItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currentSpotFleetRequestState = "currentSpotFleetRequestState" - case previousSpotFleetRequestState = "previousSpotFleetRequestState" - case spotFleetRequestId = "spotFleetRequestId" - } +extension EC2ClientTypes.CancelSpotFleetRequestsSuccessItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -12929,14 +9674,15 @@ extension EC2ClientTypes.CancelSpotFleetRequestsSuccessItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currentSpotFleetRequestStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BatchState.self, forKey: .currentSpotFleetRequestState) - currentSpotFleetRequestState = currentSpotFleetRequestStateDecoded - let previousSpotFleetRequestStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BatchState.self, forKey: .previousSpotFleetRequestState) - previousSpotFleetRequestState = previousSpotFleetRequestStateDecoded - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CancelSpotFleetRequestsSuccessItem() + value.currentSpotFleetRequestState = try reader["currentSpotFleetRequestState"].readIfPresent() + value.previousSpotFleetRequestState = try reader["previousSpotFleetRequestState"].readIfPresent() + value.spotFleetRequestId = try reader["spotFleetRequestId"].readIfPresent() + return value + } } } @@ -13053,51 +9799,15 @@ public struct CancelSpotInstanceRequestsInput: Swift.Equatable { } } -struct CancelSpotInstanceRequestsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let spotInstanceRequestIds: [Swift.String]? -} - -extension CancelSpotInstanceRequestsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case spotInstanceRequestIds = "SpotInstanceRequestId" - } +extension CancelSpotInstanceRequestsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.spotInstanceRequestIds) { - struct KeyVal0{struct SpotInstanceRequestId{}} - let spotInstanceRequestIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotInstanceRequestIds) - if let spotInstanceRequestIdsWrappedContainer = spotInstanceRequestIdsWrappedContainer { - let spotInstanceRequestIdsContainer = try spotInstanceRequestIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var spotInstanceRequestIdsBuffer:[Swift.String]? = nil - if let spotInstanceRequestIdsContainer = spotInstanceRequestIdsContainer { - spotInstanceRequestIdsBuffer = [Swift.String]() - for stringContainer0 in spotInstanceRequestIdsContainer { - spotInstanceRequestIdsBuffer?.append(stringContainer0) - } - } - spotInstanceRequestIds = spotInstanceRequestIdsBuffer - } else { - spotInstanceRequestIds = [] - } - } else { - spotInstanceRequestIds = nil - } - } -} - -extension CancelSpotInstanceRequestsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelSpotInstanceRequestsOutputBody = try responseDecoder.decode(responseBody: data) - self.cancelledSpotInstanceRequests = output.cancelledSpotInstanceRequests - } else { - self.cancelledSpotInstanceRequests = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CancelSpotInstanceRequestsOutput() + value.cancelledSpotInstanceRequests = try reader["spotInstanceRequestSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CancelledSpotInstanceRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -13115,53 +9825,23 @@ public struct CancelSpotInstanceRequestsOutput: Swift.Equatable { } } -struct CancelSpotInstanceRequestsOutputBody: Swift.Equatable { - let cancelledSpotInstanceRequests: [EC2ClientTypes.CancelledSpotInstanceRequest]? -} - -extension CancelSpotInstanceRequestsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cancelledSpotInstanceRequests = "spotInstanceRequestSet" - } +enum CancelSpotInstanceRequestsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.cancelledSpotInstanceRequests) { - struct KeyVal0{struct item{}} - let cancelledSpotInstanceRequestsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cancelledSpotInstanceRequests) - if let cancelledSpotInstanceRequestsWrappedContainer = cancelledSpotInstanceRequestsWrappedContainer { - let cancelledSpotInstanceRequestsContainer = try cancelledSpotInstanceRequestsWrappedContainer.decodeIfPresent([EC2ClientTypes.CancelledSpotInstanceRequest].self, forKey: .member) - var cancelledSpotInstanceRequestsBuffer:[EC2ClientTypes.CancelledSpotInstanceRequest]? = nil - if let cancelledSpotInstanceRequestsContainer = cancelledSpotInstanceRequestsContainer { - cancelledSpotInstanceRequestsBuffer = [EC2ClientTypes.CancelledSpotInstanceRequest]() - for structureContainer0 in cancelledSpotInstanceRequestsContainer { - cancelledSpotInstanceRequestsBuffer?.append(structureContainer0) - } - } - cancelledSpotInstanceRequests = cancelledSpotInstanceRequestsBuffer - } else { - cancelledSpotInstanceRequests = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - cancelledSpotInstanceRequests = nil - } - } -} - -enum CancelSpotInstanceRequestsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } -extension EC2ClientTypes.CancelledSpotInstanceRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case spotInstanceRequestId = "spotInstanceRequestId" - case state = "state" - } +extension EC2ClientTypes.CancelledSpotInstanceRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -13173,12 +9853,14 @@ extension EC2ClientTypes.CancelledSpotInstanceRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let spotInstanceRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotInstanceRequestId) - spotInstanceRequestId = spotInstanceRequestIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CancelSpotInstanceRequestState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CancelledSpotInstanceRequest() + value.spotInstanceRequestId = try reader["spotInstanceRequestId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -13202,11 +9884,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CapacityAllocation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationType = "allocationType" - case count = "count" - } +extension EC2ClientTypes.CapacityAllocation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -13218,12 +9896,14 @@ extension EC2ClientTypes.CapacityAllocation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AllocationType.self, forKey: .allocationType) - allocationType = allocationTypeDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityAllocation() + value.allocationType = try reader["allocationType"].readIfPresent() + value.count = try reader["count"].readIfPresent() + return value + } } } @@ -13247,19 +9927,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CapacityBlockOffering: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case capacityBlockDurationHours = "capacityBlockDurationHours" - case capacityBlockOfferingId = "capacityBlockOfferingId" - case currencyCode = "currencyCode" - case endDate = "endDate" - case instanceCount = "instanceCount" - case instanceType = "instanceType" - case startDate = "startDate" - case tenancy = "tenancy" - case upfrontFee = "upfrontFee" - } +extension EC2ClientTypes.CapacityBlockOffering: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -13295,28 +9963,22 @@ extension EC2ClientTypes.CapacityBlockOffering: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityBlockOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityBlockOfferingId) - capacityBlockOfferingId = capacityBlockOfferingIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let startDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startDate) - startDate = startDateDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let capacityBlockDurationHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .capacityBlockDurationHours) - capacityBlockDurationHours = capacityBlockDurationHoursDecoded - let upfrontFeeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .upfrontFee) - upfrontFee = upfrontFeeDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationTenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityBlockOffering() + value.capacityBlockOfferingId = try reader["capacityBlockOfferingId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.instanceCount = try reader["instanceCount"].readIfPresent() + value.startDate = try reader["startDate"].readTimestampIfPresent(format: .dateTime) + value.endDate = try reader["endDate"].readTimestampIfPresent(format: .dateTime) + value.capacityBlockDurationHours = try reader["capacityBlockDurationHours"].readIfPresent() + value.upfrontFee = try reader["upfrontFee"].readIfPresent() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.tenancy = try reader["tenancy"].readIfPresent() + return value + } } } @@ -13372,33 +10034,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CapacityReservation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case availabilityZoneId = "availabilityZoneId" - case availableInstanceCount = "availableInstanceCount" - case capacityAllocations = "capacityAllocationSet" - case capacityReservationArn = "capacityReservationArn" - case capacityReservationFleetId = "capacityReservationFleetId" - case capacityReservationId = "capacityReservationId" - case createDate = "createDate" - case ebsOptimized = "ebsOptimized" - case endDate = "endDate" - case endDateType = "endDateType" - case ephemeralStorage = "ephemeralStorage" - case instanceMatchCriteria = "instanceMatchCriteria" - case instancePlatform = "instancePlatform" - case instanceType = "instanceType" - case outpostArn = "outpostArn" - case ownerId = "ownerId" - case placementGroupArn = "placementGroupArn" - case reservationType = "reservationType" - case startDate = "startDate" - case state = "state" - case tags = "tagSet" - case tenancy = "tenancy" - case totalInstanceCount = "totalInstanceCount" - } +extension EC2ClientTypes.CapacityReservation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -13494,90 +10130,36 @@ extension EC2ClientTypes.CapacityReservation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let capacityReservationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationArn) - capacityReservationArn = capacityReservationArnDecoded - let availabilityZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneId) - availabilityZoneId = availabilityZoneIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let instancePlatformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationInstancePlatform.self, forKey: .instancePlatform) - instancePlatform = instancePlatformDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationTenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - let totalInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalInstanceCount) - totalInstanceCount = totalInstanceCountDecoded - let availableInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .availableInstanceCount) - availableInstanceCount = availableInstanceCountDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let ephemeralStorageDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ephemeralStorage) - ephemeralStorage = ephemeralStorageDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationState.self, forKey: .state) - state = stateDecoded - let startDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startDate) - startDate = startDateDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let endDateTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EndDateType.self, forKey: .endDateType) - endDateType = endDateTypeDecoded - let instanceMatchCriteriaDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMatchCriteria.self, forKey: .instanceMatchCriteria) - instanceMatchCriteria = instanceMatchCriteriaDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let capacityReservationFleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationFleetId) - capacityReservationFleetId = capacityReservationFleetIdDecoded - let placementGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .placementGroupArn) - placementGroupArn = placementGroupArnDecoded - if containerValues.contains(.capacityAllocations) { - struct KeyVal0{struct item{}} - let capacityAllocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capacityAllocations) - if let capacityAllocationsWrappedContainer = capacityAllocationsWrappedContainer { - let capacityAllocationsContainer = try capacityAllocationsWrappedContainer.decodeIfPresent([EC2ClientTypes.CapacityAllocation].self, forKey: .member) - var capacityAllocationsBuffer:[EC2ClientTypes.CapacityAllocation]? = nil - if let capacityAllocationsContainer = capacityAllocationsContainer { - capacityAllocationsBuffer = [EC2ClientTypes.CapacityAllocation]() - for structureContainer0 in capacityAllocationsContainer { - capacityAllocationsBuffer?.append(structureContainer0) - } - } - capacityAllocations = capacityAllocationsBuffer - } else { - capacityAllocations = [] - } - } else { - capacityAllocations = nil - } - let reservationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationType.self, forKey: .reservationType) - reservationType = reservationTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservation() + value.capacityReservationId = try reader["capacityReservationId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.capacityReservationArn = try reader["capacityReservationArn"].readIfPresent() + value.availabilityZoneId = try reader["availabilityZoneId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.instancePlatform = try reader["instancePlatform"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.tenancy = try reader["tenancy"].readIfPresent() + value.totalInstanceCount = try reader["totalInstanceCount"].readIfPresent() + value.availableInstanceCount = try reader["availableInstanceCount"].readIfPresent() + value.ebsOptimized = try reader["ebsOptimized"].readIfPresent() + value.ephemeralStorage = try reader["ephemeralStorage"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.startDate = try reader["startDate"].readTimestampIfPresent(format: .dateTime) + value.endDate = try reader["endDate"].readTimestampIfPresent(format: .dateTime) + value.endDateType = try reader["endDateType"].readIfPresent() + value.instanceMatchCriteria = try reader["instanceMatchCriteria"].readIfPresent() + value.createDate = try reader["createDate"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.capacityReservationFleetId = try reader["capacityReservationFleetId"].readIfPresent() + value.placementGroupArn = try reader["placementGroupArn"].readIfPresent() + value.capacityAllocations = try reader["capacityAllocationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CapacityAllocation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.reservationType = try reader["reservationType"].readIfPresent() + return value + } } } @@ -13711,21 +10293,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CapacityReservationFleet: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationStrategy = "allocationStrategy" - case capacityReservationFleetArn = "capacityReservationFleetArn" - case capacityReservationFleetId = "capacityReservationFleetId" - case createTime = "createTime" - case endDate = "endDate" - case instanceMatchCriteria = "instanceMatchCriteria" - case instanceTypeSpecifications = "instanceTypeSpecificationSet" - case state = "state" - case tags = "tagSet" - case tenancy = "tenancy" - case totalFulfilledCapacity = "totalFulfilledCapacity" - case totalTargetCapacity = "totalTargetCapacity" - } +extension EC2ClientTypes.CapacityReservationFleet: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -13785,65 +10353,23 @@ extension EC2ClientTypes.CapacityReservationFleet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationFleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationFleetId) - capacityReservationFleetId = capacityReservationFleetIdDecoded - let capacityReservationFleetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationFleetArn) - capacityReservationFleetArn = capacityReservationFleetArnDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationFleetState.self, forKey: .state) - state = stateDecoded - let totalTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalTargetCapacity) - totalTargetCapacity = totalTargetCapacityDecoded - let totalFulfilledCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .totalFulfilledCapacity) - totalFulfilledCapacity = totalFulfilledCapacityDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetCapacityReservationTenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let instanceMatchCriteriaDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetInstanceMatchCriteria.self, forKey: .instanceMatchCriteria) - instanceMatchCriteria = instanceMatchCriteriaDecoded - let allocationStrategyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationStrategy) - allocationStrategy = allocationStrategyDecoded - if containerValues.contains(.instanceTypeSpecifications) { - struct KeyVal0{struct item{}} - let instanceTypeSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypeSpecifications) - if let instanceTypeSpecificationsWrappedContainer = instanceTypeSpecificationsWrappedContainer { - let instanceTypeSpecificationsContainer = try instanceTypeSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.FleetCapacityReservation].self, forKey: .member) - var instanceTypeSpecificationsBuffer:[EC2ClientTypes.FleetCapacityReservation]? = nil - if let instanceTypeSpecificationsContainer = instanceTypeSpecificationsContainer { - instanceTypeSpecificationsBuffer = [EC2ClientTypes.FleetCapacityReservation]() - for structureContainer0 in instanceTypeSpecificationsContainer { - instanceTypeSpecificationsBuffer?.append(structureContainer0) - } - } - instanceTypeSpecifications = instanceTypeSpecificationsBuffer - } else { - instanceTypeSpecifications = [] - } - } else { - instanceTypeSpecifications = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationFleet() + value.capacityReservationFleetId = try reader["capacityReservationFleetId"].readIfPresent() + value.capacityReservationFleetArn = try reader["capacityReservationFleetArn"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.totalTargetCapacity = try reader["totalTargetCapacity"].readIfPresent() + value.totalFulfilledCapacity = try reader["totalFulfilledCapacity"].readIfPresent() + value.tenancy = try reader["tenancy"].readIfPresent() + value.endDate = try reader["endDate"].readTimestampIfPresent(format: .dateTime) + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.instanceMatchCriteria = try reader["instanceMatchCriteria"].readIfPresent() + value.allocationStrategy = try reader["allocationStrategy"].readIfPresent() + value.instanceTypeSpecifications = try reader["instanceTypeSpecificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FleetCapacityReservation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -13930,12 +10456,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CapacityReservationFleetCancellationState: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationFleetId = "capacityReservationFleetId" - case currentFleetState = "currentFleetState" - case previousFleetState = "previousFleetState" - } +extension EC2ClientTypes.CapacityReservationFleetCancellationState: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -13950,14 +10471,15 @@ extension EC2ClientTypes.CapacityReservationFleetCancellationState: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currentFleetStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationFleetState.self, forKey: .currentFleetState) - currentFleetState = currentFleetStateDecoded - let previousFleetStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationFleetState.self, forKey: .previousFleetState) - previousFleetState = previousFleetStateDecoded - let capacityReservationFleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationFleetId) - capacityReservationFleetId = capacityReservationFleetIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationFleetCancellationState() + value.currentFleetState = try reader["currentFleetState"].readIfPresent() + value.previousFleetState = try reader["previousFleetState"].readIfPresent() + value.capacityReservationFleetId = try reader["capacityReservationFleetId"].readIfPresent() + return value + } } } @@ -14038,11 +10560,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CapacityReservationGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupArn = "groupArn" - case ownerId = "ownerId" - } +extension EC2ClientTypes.CapacityReservationGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14054,12 +10572,14 @@ extension EC2ClientTypes.CapacityReservationGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupArn) - groupArn = groupArnDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationGroup() + value.groupArn = try reader["groupArn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + return value + } } } @@ -14163,10 +10683,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CapacityReservationOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case usageStrategy = "usageStrategy" - } +extension EC2ClientTypes.CapacityReservationOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14175,10 +10692,13 @@ extension EC2ClientTypes.CapacityReservationOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let usageStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetCapacityReservationUsageStrategy.self, forKey: .usageStrategy) - usageStrategy = usageStrategyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationOptions() + value.usageStrategy = try reader["usageStrategy"].readIfPresent() + return value + } } } @@ -14198,10 +10718,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CapacityReservationOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case usageStrategy = "UsageStrategy" - } +extension EC2ClientTypes.CapacityReservationOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14210,10 +10727,13 @@ extension EC2ClientTypes.CapacityReservationOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let usageStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetCapacityReservationUsageStrategy.self, forKey: .usageStrategy) - usageStrategy = usageStrategyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationOptionsRequest() + value.usageStrategy = try reader["UsageStrategy"].readIfPresent() + return value + } } } @@ -14265,11 +10785,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CapacityReservationSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationPreference = "CapacityReservationPreference" - case capacityReservationTarget = "CapacityReservationTarget" - } +extension EC2ClientTypes.CapacityReservationSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14281,12 +10797,14 @@ extension EC2ClientTypes.CapacityReservationSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationPreferenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationPreference.self, forKey: .capacityReservationPreference) - capacityReservationPreference = capacityReservationPreferenceDecoded - let capacityReservationTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationTarget.self, forKey: .capacityReservationTarget) - capacityReservationTarget = capacityReservationTargetDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationSpecification() + value.capacityReservationPreference = try reader["CapacityReservationPreference"].readIfPresent() + value.capacityReservationTarget = try reader["CapacityReservationTarget"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservationTarget.readingClosure) + return value + } } } @@ -14314,11 +10832,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CapacityReservationSpecificationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationPreference = "capacityReservationPreference" - case capacityReservationTarget = "capacityReservationTarget" - } +extension EC2ClientTypes.CapacityReservationSpecificationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14330,12 +10844,14 @@ extension EC2ClientTypes.CapacityReservationSpecificationResponse: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationPreferenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationPreference.self, forKey: .capacityReservationPreference) - capacityReservationPreference = capacityReservationPreferenceDecoded - let capacityReservationTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationTargetResponse.self, forKey: .capacityReservationTarget) - capacityReservationTarget = capacityReservationTargetDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationSpecificationResponse() + value.capacityReservationPreference = try reader["capacityReservationPreference"].readIfPresent() + value.capacityReservationTarget = try reader["capacityReservationTarget"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservationTargetResponse.readingClosure) + return value + } } } @@ -14413,11 +10929,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CapacityReservationTarget: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationId = "CapacityReservationId" - case capacityReservationResourceGroupArn = "CapacityReservationResourceGroupArn" - } +extension EC2ClientTypes.CapacityReservationTarget: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14429,12 +10941,14 @@ extension EC2ClientTypes.CapacityReservationTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let capacityReservationResourceGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationResourceGroupArn) - capacityReservationResourceGroupArn = capacityReservationResourceGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationTarget() + value.capacityReservationId = try reader["CapacityReservationId"].readIfPresent() + value.capacityReservationResourceGroupArn = try reader["CapacityReservationResourceGroupArn"].readIfPresent() + return value + } } } @@ -14458,11 +10972,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CapacityReservationTargetResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationId = "capacityReservationId" - case capacityReservationResourceGroupArn = "capacityReservationResourceGroupArn" - } +extension EC2ClientTypes.CapacityReservationTargetResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14474,12 +10984,14 @@ extension EC2ClientTypes.CapacityReservationTargetResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let capacityReservationResourceGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationResourceGroupArn) - capacityReservationResourceGroupArn = capacityReservationResourceGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CapacityReservationTargetResponse() + value.capacityReservationId = try reader["capacityReservationId"].readIfPresent() + value.capacityReservationResourceGroupArn = try reader["capacityReservationResourceGroupArn"].readIfPresent() + return value + } } } @@ -14567,14 +11079,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CarrierGateway: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGatewayId = "carrierGatewayId" - case ownerId = "ownerId" - case state = "state" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.CarrierGateway: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14604,34 +11109,16 @@ extension EC2ClientTypes.CarrierGateway: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let carrierGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierGatewayId) - carrierGatewayId = carrierGatewayIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CarrierGatewayState.self, forKey: .state) - state = stateDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CarrierGateway() + value.carrierGatewayId = try reader["carrierGatewayId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -14706,10 +11193,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CertificateAuthentication: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRootCertificateChain = "clientRootCertificateChain" - } +extension EC2ClientTypes.CertificateAuthentication: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14718,10 +11202,13 @@ extension EC2ClientTypes.CertificateAuthentication: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientRootCertificateChainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRootCertificateChain) - clientRootCertificateChain = clientRootCertificateChainDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CertificateAuthentication() + value.clientRootCertificateChain = try reader["clientRootCertificateChain"].readIfPresent() + return value + } } } @@ -14741,10 +11228,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CertificateAuthenticationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRootCertificateChainArn = "ClientRootCertificateChainArn" - } +extension EC2ClientTypes.CertificateAuthenticationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14753,10 +11237,13 @@ extension EC2ClientTypes.CertificateAuthenticationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientRootCertificateChainArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRootCertificateChainArn) - clientRootCertificateChainArn = clientRootCertificateChainArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CertificateAuthenticationRequest() + value.clientRootCertificateChainArn = try reader["ClientRootCertificateChainArn"].readIfPresent() + return value + } } } @@ -14776,11 +11263,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CidrAuthorizationContext: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - case signature = "Signature" - } +extension EC2ClientTypes.CidrAuthorizationContext: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14792,12 +11275,14 @@ extension EC2ClientTypes.CidrAuthorizationContext: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let signatureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .signature) - signature = signatureDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CidrAuthorizationContext() + value.message = try reader["Message"].readIfPresent() + value.signature = try reader["Signature"].readIfPresent() + return value + } } } @@ -14823,10 +11308,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CidrBlock: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlock = "cidrBlock" - } +extension EC2ClientTypes.CidrBlock: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14835,10 +11317,13 @@ extension EC2ClientTypes.CidrBlock: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CidrBlock() + value.cidrBlock = try reader["cidrBlock"].readIfPresent() + return value + } } } @@ -14858,11 +11343,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClassicLinkDnsSupport: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case classicLinkDnsSupported = "classicLinkDnsSupported" - case vpcId = "vpcId" - } +extension EC2ClientTypes.ClassicLinkDnsSupport: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14874,12 +11355,14 @@ extension EC2ClientTypes.ClassicLinkDnsSupport: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let classicLinkDnsSupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .classicLinkDnsSupported) - classicLinkDnsSupported = classicLinkDnsSupportedDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClassicLinkDnsSupport() + value.classicLinkDnsSupported = try reader["classicLinkDnsSupported"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + return value + } } } @@ -14903,13 +11386,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClassicLinkInstance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groups = "groupSet" - case instanceId = "instanceId" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.ClassicLinkInstance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -14945,50 +11422,16 @@ extension EC2ClientTypes.ClassicLinkInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.groups) { - struct KeyVal0{struct item{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var groupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClassicLinkInstance() + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceId = try reader["instanceId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + return value } - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded } } @@ -15020,10 +11463,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClassicLoadBalancer: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "name" - } +extension EC2ClientTypes.ClassicLoadBalancer: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15032,10 +11472,13 @@ extension EC2ClientTypes.ClassicLoadBalancer: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClassicLoadBalancer() + value.name = try reader["name"].readIfPresent() + return value + } } } @@ -15055,10 +11498,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClassicLoadBalancersConfig: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case classicLoadBalancers = "classicLoadBalancers" - } +extension EC2ClientTypes.ClassicLoadBalancersConfig: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15076,26 +11516,12 @@ extension EC2ClientTypes.ClassicLoadBalancersConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.classicLoadBalancers) { - struct KeyVal0{struct item{}} - let classicLoadBalancersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .classicLoadBalancers) - if let classicLoadBalancersWrappedContainer = classicLoadBalancersWrappedContainer { - let classicLoadBalancersContainer = try classicLoadBalancersWrappedContainer.decodeIfPresent([EC2ClientTypes.ClassicLoadBalancer].self, forKey: .member) - var classicLoadBalancersBuffer:[EC2ClientTypes.ClassicLoadBalancer]? = nil - if let classicLoadBalancersContainer = classicLoadBalancersContainer { - classicLoadBalancersBuffer = [EC2ClientTypes.ClassicLoadBalancer]() - for structureContainer0 in classicLoadBalancersContainer { - classicLoadBalancersBuffer?.append(structureContainer0) - } - } - classicLoadBalancers = classicLoadBalancersBuffer - } else { - classicLoadBalancers = [] - } - } else { - classicLoadBalancers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClassicLoadBalancersConfig() + value.classicLoadBalancers = try reader["classicLoadBalancers"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ClassicLoadBalancer.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -15116,11 +11542,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientCertificateRevocationListStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.ClientCertificateRevocationListStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15132,12 +11554,14 @@ extension EC2ClientTypes.ClientCertificateRevocationListStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientCertificateRevocationListStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientCertificateRevocationListStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -15193,11 +11617,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ClientConnectOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case lambdaFunctionArn = "LambdaFunctionArn" - } +extension EC2ClientTypes.ClientConnectOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15209,12 +11629,14 @@ extension EC2ClientTypes.ClientConnectOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let lambdaFunctionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lambdaFunctionArn) - lambdaFunctionArn = lambdaFunctionArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientConnectOptions() + value.enabled = try reader["Enabled"].readIfPresent() + value.lambdaFunctionArn = try reader["LambdaFunctionArn"].readIfPresent() + return value + } } } @@ -15238,12 +11660,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientConnectResponseOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "enabled" - case lambdaFunctionArn = "lambdaFunctionArn" - case status = "status" - } +extension EC2ClientTypes.ClientConnectResponseOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15258,14 +11675,15 @@ extension EC2ClientTypes.ClientConnectResponseOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let lambdaFunctionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lambdaFunctionArn) - lambdaFunctionArn = lambdaFunctionArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnEndpointAttributeStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientConnectResponseOptions() + value.enabled = try reader["enabled"].readIfPresent() + value.lambdaFunctionArn = try reader["lambdaFunctionArn"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnEndpointAttributeStatus.readingClosure) + return value + } } } @@ -15293,13 +11711,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientData: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case uploadEnd = "UploadEnd" - case uploadSize = "UploadSize" - case uploadStart = "UploadStart" - } +extension EC2ClientTypes.ClientData: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15317,16 +11729,16 @@ extension EC2ClientTypes.ClientData: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let uploadEndDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .uploadEnd) - uploadEnd = uploadEndDecoded - let uploadSizeDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .uploadSize) - uploadSize = uploadSizeDecoded - let uploadStartDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .uploadStart) - uploadStart = uploadStartDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientData() + value.comment = try reader["Comment"].readIfPresent() + value.uploadEnd = try reader["UploadEnd"].readTimestampIfPresent(format: .dateTime) + value.uploadSize = try reader["UploadSize"].readIfPresent() + value.uploadStart = try reader["UploadStart"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -15358,11 +11770,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientLoginBannerOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bannerText = "BannerText" - case enabled = "Enabled" - } +extension EC2ClientTypes.ClientLoginBannerOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15374,12 +11782,14 @@ extension EC2ClientTypes.ClientLoginBannerOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let bannerTextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bannerText) - bannerText = bannerTextDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientLoginBannerOptions() + value.enabled = try reader["Enabled"].readIfPresent() + value.bannerText = try reader["BannerText"].readIfPresent() + return value + } } } @@ -15403,11 +11813,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientLoginBannerResponseOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bannerText = "bannerText" - case enabled = "enabled" - } +extension EC2ClientTypes.ClientLoginBannerResponseOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15419,12 +11825,14 @@ extension EC2ClientTypes.ClientLoginBannerResponseOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let bannerTextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bannerText) - bannerText = bannerTextDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientLoginBannerResponseOptions() + value.enabled = try reader["enabled"].readIfPresent() + value.bannerText = try reader["bannerText"].readIfPresent() + return value + } } } @@ -15448,13 +11856,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientVpnAuthentication: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activeDirectory = "activeDirectory" - case federatedAuthentication = "federatedAuthentication" - case mutualAuthentication = "mutualAuthentication" - case type = "type" - } +extension EC2ClientTypes.ClientVpnAuthentication: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15472,16 +11874,16 @@ extension EC2ClientTypes.ClientVpnAuthentication: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnAuthenticationType.self, forKey: .type) - type = typeDecoded - let activeDirectoryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DirectoryServiceAuthentication.self, forKey: .activeDirectory) - activeDirectory = activeDirectoryDecoded - let mutualAuthenticationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CertificateAuthentication.self, forKey: .mutualAuthentication) - mutualAuthentication = mutualAuthenticationDecoded - let federatedAuthenticationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FederatedAuthentication.self, forKey: .federatedAuthentication) - federatedAuthentication = federatedAuthenticationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnAuthentication() + value.type = try reader["type"].readIfPresent() + value.activeDirectory = try reader["activeDirectory"].readIfPresent(readingClosure: EC2ClientTypes.DirectoryServiceAuthentication.readingClosure) + value.mutualAuthentication = try reader["mutualAuthentication"].readIfPresent(readingClosure: EC2ClientTypes.CertificateAuthentication.readingClosure) + value.federatedAuthentication = try reader["federatedAuthentication"].readIfPresent(readingClosure: EC2ClientTypes.FederatedAuthentication.readingClosure) + return value + } } } @@ -15513,13 +11915,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientVpnAuthenticationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activeDirectory = "ActiveDirectory" - case federatedAuthentication = "FederatedAuthentication" - case mutualAuthentication = "MutualAuthentication" - case type = "Type" - } +extension EC2ClientTypes.ClientVpnAuthenticationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15537,16 +11933,16 @@ extension EC2ClientTypes.ClientVpnAuthenticationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnAuthenticationType.self, forKey: .type) - type = typeDecoded - let activeDirectoryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DirectoryServiceAuthenticationRequest.self, forKey: .activeDirectory) - activeDirectory = activeDirectoryDecoded - let mutualAuthenticationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CertificateAuthenticationRequest.self, forKey: .mutualAuthentication) - mutualAuthentication = mutualAuthenticationDecoded - let federatedAuthenticationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FederatedAuthenticationRequest.self, forKey: .federatedAuthentication) - federatedAuthentication = federatedAuthenticationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnAuthenticationRequest() + value.type = try reader["Type"].readIfPresent() + value.activeDirectory = try reader["ActiveDirectory"].readIfPresent(readingClosure: EC2ClientTypes.DirectoryServiceAuthenticationRequest.readingClosure) + value.mutualAuthentication = try reader["MutualAuthentication"].readIfPresent(readingClosure: EC2ClientTypes.CertificateAuthenticationRequest.readingClosure) + value.federatedAuthentication = try reader["FederatedAuthentication"].readIfPresent(readingClosure: EC2ClientTypes.FederatedAuthenticationRequest.readingClosure) + return value + } } } @@ -15613,11 +12009,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ClientVpnAuthorizationRuleStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.ClientVpnAuthorizationRuleStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15629,12 +12021,14 @@ extension EC2ClientTypes.ClientVpnAuthorizationRuleStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnAuthorizationRuleStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnAuthorizationRuleStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -15696,23 +12090,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ClientVpnConnection: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientIp = "clientIp" - case clientVpnEndpointId = "clientVpnEndpointId" - case commonName = "commonName" - case connectionEndTime = "connectionEndTime" - case connectionEstablishedTime = "connectionEstablishedTime" - case connectionId = "connectionId" - case egressBytes = "egressBytes" - case egressPackets = "egressPackets" - case ingressBytes = "ingressBytes" - case ingressPackets = "ingressPackets" - case postureComplianceStatuses = "postureComplianceStatusSet" - case status = "status" - case timestamp = "timestamp" - case username = "username" - } +extension EC2ClientTypes.ClientVpnConnection: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15769,52 +12147,25 @@ extension EC2ClientTypes.ClientVpnConnection: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let timestampDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timestamp) - timestamp = timestampDecoded - let connectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionId) - connectionId = connectionIdDecoded - let usernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .username) - username = usernameDecoded - let connectionEstablishedTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionEstablishedTime) - connectionEstablishedTime = connectionEstablishedTimeDecoded - let ingressBytesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ingressBytes) - ingressBytes = ingressBytesDecoded - let egressBytesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .egressBytes) - egressBytes = egressBytesDecoded - let ingressPacketsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ingressPackets) - ingressPackets = ingressPacketsDecoded - let egressPacketsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .egressPackets) - egressPackets = egressPacketsDecoded - let clientIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientIp) - clientIp = clientIpDecoded - let commonNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .commonName) - commonName = commonNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnConnectionStatus.self, forKey: .status) - status = statusDecoded - let connectionEndTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionEndTime) - connectionEndTime = connectionEndTimeDecoded - if containerValues.contains(.postureComplianceStatuses) { - struct KeyVal0{struct item{}} - let postureComplianceStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .postureComplianceStatuses) - if let postureComplianceStatusesWrappedContainer = postureComplianceStatusesWrappedContainer { - let postureComplianceStatusesContainer = try postureComplianceStatusesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var postureComplianceStatusesBuffer:[Swift.String]? = nil - if let postureComplianceStatusesContainer = postureComplianceStatusesContainer { - postureComplianceStatusesBuffer = [Swift.String]() - for stringContainer0 in postureComplianceStatusesContainer { - postureComplianceStatusesBuffer?.append(stringContainer0) - } - } - postureComplianceStatuses = postureComplianceStatusesBuffer - } else { - postureComplianceStatuses = [] - } - } else { - postureComplianceStatuses = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnConnection() + value.clientVpnEndpointId = try reader["clientVpnEndpointId"].readIfPresent() + value.timestamp = try reader["timestamp"].readIfPresent() + value.connectionId = try reader["connectionId"].readIfPresent() + value.username = try reader["username"].readIfPresent() + value.connectionEstablishedTime = try reader["connectionEstablishedTime"].readIfPresent() + value.ingressBytes = try reader["ingressBytes"].readIfPresent() + value.egressBytes = try reader["egressBytes"].readIfPresent() + value.ingressPackets = try reader["ingressPackets"].readIfPresent() + value.egressPackets = try reader["egressPackets"].readIfPresent() + value.clientIp = try reader["clientIp"].readIfPresent() + value.commonName = try reader["commonName"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnConnectionStatus.readingClosure) + value.connectionEndTime = try reader["connectionEndTime"].readIfPresent() + value.postureComplianceStatuses = try reader["postureComplianceStatusSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -15887,11 +12238,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientVpnConnectionStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.ClientVpnConnectionStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -15903,12 +12250,14 @@ extension EC2ClientTypes.ClientVpnConnectionStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnConnectionStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnConnectionStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -15970,32 +12319,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ClientVpnEndpoint: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedTargetNetworks = "associatedTargetNetwork" - case authenticationOptions = "authenticationOptions" - case clientCidrBlock = "clientCidrBlock" - case clientConnectOptions = "clientConnectOptions" - case clientLoginBannerOptions = "clientLoginBannerOptions" - case clientVpnEndpointId = "clientVpnEndpointId" - case connectionLogOptions = "connectionLogOptions" - case creationTime = "creationTime" - case deletionTime = "deletionTime" - case description = "description" - case dnsName = "dnsName" - case dnsServers = "dnsServer" - case securityGroupIds = "securityGroupIdSet" - case selfServicePortalUrl = "selfServicePortalUrl" - case serverCertificateArn = "serverCertificateArn" - case sessionTimeoutHours = "sessionTimeoutHours" - case splitTunnel = "splitTunnel" - case status = "status" - case tags = "tagSet" - case transportProtocol = "transportProtocol" - case vpcId = "vpcId" - case vpnPort = "vpnPort" - case vpnProtocol = "vpnProtocol" - } +extension EC2ClientTypes.ClientVpnEndpoint: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16115,139 +12439,35 @@ extension EC2ClientTypes.ClientVpnEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnEndpointStatus.self, forKey: .status) - status = statusDecoded - let creationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .creationTime) - creationTime = creationTimeDecoded - let deletionTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deletionTime) - deletionTime = deletionTimeDecoded - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - let clientCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientCidrBlock) - clientCidrBlock = clientCidrBlockDecoded - if containerValues.contains(.dnsServers) { - struct KeyVal0{struct item{}} - let dnsServersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dnsServers) - if let dnsServersWrappedContainer = dnsServersWrappedContainer { - let dnsServersContainer = try dnsServersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dnsServersBuffer:[Swift.String]? = nil - if let dnsServersContainer = dnsServersContainer { - dnsServersBuffer = [Swift.String]() - for stringContainer0 in dnsServersContainer { - dnsServersBuffer?.append(stringContainer0) - } - } - dnsServers = dnsServersBuffer - } else { - dnsServers = [] - } - } else { - dnsServers = nil - } - let splitTunnelDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .splitTunnel) - splitTunnel = splitTunnelDecoded - let vpnProtocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnProtocol.self, forKey: .vpnProtocol) - vpnProtocol = vpnProtocolDecoded - let transportProtocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransportProtocol.self, forKey: .transportProtocol) - transportProtocol = transportProtocolDecoded - let vpnPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .vpnPort) - vpnPort = vpnPortDecoded - if containerValues.contains(.associatedTargetNetworks) { - struct KeyVal0{struct item{}} - let associatedTargetNetworksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedTargetNetworks) - if let associatedTargetNetworksWrappedContainer = associatedTargetNetworksWrappedContainer { - let associatedTargetNetworksContainer = try associatedTargetNetworksWrappedContainer.decodeIfPresent([EC2ClientTypes.AssociatedTargetNetwork].self, forKey: .member) - var associatedTargetNetworksBuffer:[EC2ClientTypes.AssociatedTargetNetwork]? = nil - if let associatedTargetNetworksContainer = associatedTargetNetworksContainer { - associatedTargetNetworksBuffer = [EC2ClientTypes.AssociatedTargetNetwork]() - for structureContainer0 in associatedTargetNetworksContainer { - associatedTargetNetworksBuffer?.append(structureContainer0) - } - } - associatedTargetNetworks = associatedTargetNetworksBuffer - } else { - associatedTargetNetworks = [] - } - } else { - associatedTargetNetworks = nil - } - let serverCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateArn) - serverCertificateArn = serverCertificateArnDecoded - if containerValues.contains(.authenticationOptions) { - struct KeyVal0{struct item{}} - let authenticationOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .authenticationOptions) - if let authenticationOptionsWrappedContainer = authenticationOptionsWrappedContainer { - let authenticationOptionsContainer = try authenticationOptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.ClientVpnAuthentication].self, forKey: .member) - var authenticationOptionsBuffer:[EC2ClientTypes.ClientVpnAuthentication]? = nil - if let authenticationOptionsContainer = authenticationOptionsContainer { - authenticationOptionsBuffer = [EC2ClientTypes.ClientVpnAuthentication]() - for structureContainer0 in authenticationOptionsContainer { - authenticationOptionsBuffer?.append(structureContainer0) - } - } - authenticationOptions = authenticationOptionsBuffer - } else { - authenticationOptions = [] - } - } else { - authenticationOptions = nil - } - let connectionLogOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionLogResponseOptions.self, forKey: .connectionLogOptions) - connectionLogOptions = connectionLogOptionsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let selfServicePortalUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .selfServicePortalUrl) - selfServicePortalUrl = selfServicePortalUrlDecoded - let clientConnectOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientConnectResponseOptions.self, forKey: .clientConnectOptions) - clientConnectOptions = clientConnectOptionsDecoded - let sessionTimeoutHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sessionTimeoutHours) - sessionTimeoutHours = sessionTimeoutHoursDecoded - let clientLoginBannerOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientLoginBannerResponseOptions.self, forKey: .clientLoginBannerOptions) - clientLoginBannerOptions = clientLoginBannerOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnEndpoint() + value.clientVpnEndpointId = try reader["clientVpnEndpointId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnEndpointStatus.readingClosure) + value.creationTime = try reader["creationTime"].readIfPresent() + value.deletionTime = try reader["deletionTime"].readIfPresent() + value.dnsName = try reader["dnsName"].readIfPresent() + value.clientCidrBlock = try reader["clientCidrBlock"].readIfPresent() + value.dnsServers = try reader["dnsServer"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.splitTunnel = try reader["splitTunnel"].readIfPresent() + value.vpnProtocol = try reader["vpnProtocol"].readIfPresent() + value.transportProtocol = try reader["transportProtocol"].readIfPresent() + value.vpnPort = try reader["vpnPort"].readIfPresent() + value.associatedTargetNetworks = try reader["associatedTargetNetwork"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AssociatedTargetNetwork.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.serverCertificateArn = try reader["serverCertificateArn"].readIfPresent() + value.authenticationOptions = try reader["authenticationOptions"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ClientVpnAuthentication.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.connectionLogOptions = try reader["connectionLogOptions"].readIfPresent(readingClosure: EC2ClientTypes.ConnectionLogResponseOptions.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.securityGroupIds = try reader["securityGroupIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + value.selfServicePortalUrl = try reader["selfServicePortalUrl"].readIfPresent() + value.clientConnectOptions = try reader["clientConnectOptions"].readIfPresent(readingClosure: EC2ClientTypes.ClientConnectResponseOptions.readingClosure) + value.sessionTimeoutHours = try reader["sessionTimeoutHours"].readIfPresent() + value.clientLoginBannerOptions = try reader["clientLoginBannerOptions"].readIfPresent(readingClosure: EC2ClientTypes.ClientLoginBannerResponseOptions.readingClosure) + return value + } } } @@ -16356,11 +12576,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientVpnEndpointAttributeStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.ClientVpnEndpointAttributeStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16372,12 +12588,14 @@ extension EC2ClientTypes.ClientVpnEndpointAttributeStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnEndpointAttributeStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnEndpointAttributeStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -16433,11 +12651,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ClientVpnEndpointStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.ClientVpnEndpointStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16449,12 +12663,14 @@ extension EC2ClientTypes.ClientVpnEndpointStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnEndpointStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnEndpointStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -16524,16 +12740,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ClientVpnRoute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "clientVpnEndpointId" - case description = "description" - case destinationCidr = "destinationCidr" - case origin = "origin" - case status = "status" - case targetSubnet = "targetSubnet" - case type = "type" - } +extension EC2ClientTypes.ClientVpnRoute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16560,22 +12767,19 @@ extension EC2ClientTypes.ClientVpnRoute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let destinationCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidr) - destinationCidr = destinationCidrDecoded - let targetSubnetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetSubnet) - targetSubnet = targetSubnetDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let originDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .origin) - origin = originDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnRouteStatus.self, forKey: .status) - status = statusDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnRoute() + value.clientVpnEndpointId = try reader["clientVpnEndpointId"].readIfPresent() + value.destinationCidr = try reader["destinationCidr"].readIfPresent() + value.targetSubnet = try reader["targetSubnet"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.origin = try reader["origin"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnRouteStatus.readingClosure) + value.description = try reader["description"].readIfPresent() + return value + } } } @@ -16619,11 +12823,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ClientVpnRouteStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.ClientVpnRouteStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16635,12 +12835,14 @@ extension EC2ClientTypes.ClientVpnRouteStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnRouteStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ClientVpnRouteStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -16702,12 +12904,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CloudWatchLogOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case logEnabled = "logEnabled" - case logGroupArn = "logGroupArn" - case logOutputFormat = "logOutputFormat" - } +extension EC2ClientTypes.CloudWatchLogOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16722,14 +12919,15 @@ extension EC2ClientTypes.CloudWatchLogOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .logEnabled) - logEnabled = logEnabledDecoded - let logGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logGroupArn) - logGroupArn = logGroupArnDecoded - let logOutputFormatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logOutputFormat) - logOutputFormat = logOutputFormatDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CloudWatchLogOptions() + value.logEnabled = try reader["logEnabled"].readIfPresent() + value.logGroupArn = try reader["logGroupArn"].readIfPresent() + value.logOutputFormat = try reader["logOutputFormat"].readIfPresent() + return value + } } } @@ -16757,12 +12955,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CloudWatchLogOptionsSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case logEnabled = "LogEnabled" - case logGroupArn = "LogGroupArn" - case logOutputFormat = "LogOutputFormat" - } +extension EC2ClientTypes.CloudWatchLogOptionsSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16777,14 +12970,15 @@ extension EC2ClientTypes.CloudWatchLogOptionsSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .logEnabled) - logEnabled = logEnabledDecoded - let logGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logGroupArn) - logGroupArn = logGroupArnDecoded - let logOutputFormatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logOutputFormat) - logOutputFormat = logOutputFormatDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CloudWatchLogOptionsSpecification() + value.logEnabled = try reader["LogEnabled"].readIfPresent() + value.logGroupArn = try reader["LogGroupArn"].readIfPresent() + value.logOutputFormat = try reader["LogOutputFormat"].readIfPresent() + return value + } } } @@ -16812,13 +13006,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CoipAddressUsage: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "allocationId" - case awsAccountId = "awsAccountId" - case awsService = "awsService" - case coIp = "coIp" - } +extension EC2ClientTypes.CoipAddressUsage: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16836,16 +13024,16 @@ extension EC2ClientTypes.CoipAddressUsage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let awsAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsAccountId) - awsAccountId = awsAccountIdDecoded - let awsServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsService) - awsService = awsServiceDecoded - let coIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coIp) - coIp = coIpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CoipAddressUsage() + value.allocationId = try reader["allocationId"].readIfPresent() + value.awsAccountId = try reader["awsAccountId"].readIfPresent() + value.awsService = try reader["awsService"].readIfPresent() + value.coIp = try reader["coIp"].readIfPresent() + return value + } } } @@ -16877,12 +13065,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CoipCidr: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "cidr" - case coipPoolId = "coipPoolId" - case localGatewayRouteTableId = "localGatewayRouteTableId" - } +extension EC2ClientTypes.CoipCidr: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16897,14 +13080,15 @@ extension EC2ClientTypes.CoipCidr: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let coipPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coipPoolId) - coipPoolId = coipPoolIdDecoded - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CoipCidr() + value.cidr = try reader["cidr"].readIfPresent() + value.coipPoolId = try reader["coipPoolId"].readIfPresent() + value.localGatewayRouteTableId = try reader["localGatewayRouteTableId"].readIfPresent() + return value + } } } @@ -16932,14 +13116,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CoipPool: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTableId = "localGatewayRouteTableId" - case poolArn = "poolArn" - case poolCidrs = "poolCidrSet" - case poolId = "poolId" - case tags = "tagSet" - } +extension EC2ClientTypes.CoipPool: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -16978,52 +13155,17 @@ extension EC2ClientTypes.CoipPool: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - if containerValues.contains(.poolCidrs) { - struct KeyVal0{struct item{}} - let poolCidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .poolCidrs) - if let poolCidrsWrappedContainer = poolCidrsWrappedContainer { - let poolCidrsContainer = try poolCidrsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var poolCidrsBuffer:[Swift.String]? = nil - if let poolCidrsContainer = poolCidrsContainer { - poolCidrsBuffer = [Swift.String]() - for stringContainer0 in poolCidrsContainer { - poolCidrsBuffer?.append(stringContainer0) - } - } - poolCidrs = poolCidrsBuffer - } else { - poolCidrs = [] - } - } else { - poolCidrs = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CoipPool() + value.poolId = try reader["poolId"].readIfPresent() + value.poolCidrs = try reader["poolCidrSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.localGatewayRouteTableId = try reader["localGatewayRouteTableId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.poolArn = try reader["poolArn"].readIfPresent() + return value } - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let poolArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolArn) - poolArn = poolArnDecoded } } @@ -17105,40 +13247,16 @@ public struct ConfirmProductInstanceInput: Swift.Equatable { } } -struct ConfirmProductInstanceInputBody: Swift.Equatable { - let instanceId: Swift.String? - let productCode: Swift.String? - let dryRun: Swift.Bool? -} +extension ConfirmProductInstanceOutput { -extension ConfirmProductInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceId = "InstanceId" - case productCode = "ProductCode" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let productCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productCode) - productCode = productCodeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ConfirmProductInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ConfirmProductInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - self.ownerId = output.ownerId - } else { - self.ownerId = nil - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ConfirmProductInstanceOutput() + value.ownerId = try reader["ownerId"].readIfPresent() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -17159,41 +13277,23 @@ public struct ConfirmProductInstanceOutput: Swift.Equatable { } } -struct ConfirmProductInstanceOutputBody: Swift.Equatable { - let ownerId: Swift.String? - let `return`: Swift.Bool? -} - -extension ConfirmProductInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ownerId = "ownerId" - case `return` = "return" - } +enum ConfirmProductInstanceOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum ConfirmProductInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ConnectionLogOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudwatchLogGroup = "CloudwatchLogGroup" - case cloudwatchLogStream = "CloudwatchLogStream" - case enabled = "Enabled" - } +extension EC2ClientTypes.ConnectionLogOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -17208,14 +13308,15 @@ extension EC2ClientTypes.ConnectionLogOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let cloudwatchLogGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloudwatchLogGroup) - cloudwatchLogGroup = cloudwatchLogGroupDecoded - let cloudwatchLogStreamDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloudwatchLogStream) - cloudwatchLogStream = cloudwatchLogStreamDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ConnectionLogOptions() + value.enabled = try reader["Enabled"].readIfPresent() + value.cloudwatchLogGroup = try reader["CloudwatchLogGroup"].readIfPresent() + value.cloudwatchLogStream = try reader["CloudwatchLogStream"].readIfPresent() + return value + } } } @@ -17243,12 +13344,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ConnectionLogResponseOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudwatchLogGroup = "CloudwatchLogGroup" - case cloudwatchLogStream = "CloudwatchLogStream" - case enabled = "Enabled" - } +extension EC2ClientTypes.ConnectionLogResponseOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -17263,14 +13359,15 @@ extension EC2ClientTypes.ConnectionLogResponseOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let cloudwatchLogGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloudwatchLogGroup) - cloudwatchLogGroup = cloudwatchLogGroupDecoded - let cloudwatchLogStreamDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloudwatchLogStream) - cloudwatchLogStream = cloudwatchLogStreamDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ConnectionLogResponseOptions() + value.enabled = try reader["Enabled"].readIfPresent() + value.cloudwatchLogGroup = try reader["CloudwatchLogGroup"].readIfPresent() + value.cloudwatchLogStream = try reader["CloudwatchLogStream"].readIfPresent() + return value + } } } @@ -17298,16 +13395,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ConnectionNotification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectionEvents = "connectionEvents" - case connectionNotificationArn = "connectionNotificationArn" - case connectionNotificationId = "connectionNotificationId" - case connectionNotificationState = "connectionNotificationState" - case connectionNotificationType = "connectionNotificationType" - case serviceId = "serviceId" - case vpcEndpointId = "vpcEndpointId" - } +extension EC2ClientTypes.ConnectionNotification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -17343,39 +13431,19 @@ extension EC2ClientTypes.ConnectionNotification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let connectionNotificationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionNotificationId) - connectionNotificationId = connectionNotificationIdDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - let vpcEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointId) - vpcEndpointId = vpcEndpointIdDecoded - let connectionNotificationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionNotificationType.self, forKey: .connectionNotificationType) - connectionNotificationType = connectionNotificationTypeDecoded - let connectionNotificationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionNotificationArn) - connectionNotificationArn = connectionNotificationArnDecoded - if containerValues.contains(.connectionEvents) { - struct KeyVal0{struct item{}} - let connectionEventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .connectionEvents) - if let connectionEventsWrappedContainer = connectionEventsWrappedContainer { - let connectionEventsContainer = try connectionEventsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var connectionEventsBuffer:[Swift.String]? = nil - if let connectionEventsContainer = connectionEventsContainer { - connectionEventsBuffer = [Swift.String]() - for stringContainer0 in connectionEventsContainer { - connectionEventsBuffer?.append(stringContainer0) - } - } - connectionEvents = connectionEventsBuffer - } else { - connectionEvents = [] - } - } else { - connectionEvents = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ConnectionNotification() + value.connectionNotificationId = try reader["connectionNotificationId"].readIfPresent() + value.serviceId = try reader["serviceId"].readIfPresent() + value.vpcEndpointId = try reader["vpcEndpointId"].readIfPresent() + value.connectionNotificationType = try reader["connectionNotificationType"].readIfPresent() + value.connectionNotificationArn = try reader["connectionNotificationArn"].readIfPresent() + value.connectionEvents = try reader["connectionEvents"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.connectionNotificationState = try reader["connectionNotificationState"].readIfPresent() + return value } - let connectionNotificationStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionNotificationState.self, forKey: .connectionNotificationState) - connectionNotificationState = connectionNotificationStateDecoded } } @@ -17480,12 +13548,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ConnectionTrackingConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tcpEstablishedTimeout = "tcpEstablishedTimeout" - case udpStreamTimeout = "udpStreamTimeout" - case udpTimeout = "udpTimeout" - } +extension EC2ClientTypes.ConnectionTrackingConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -17500,14 +13563,15 @@ extension EC2ClientTypes.ConnectionTrackingConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tcpEstablishedTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .tcpEstablishedTimeout) - tcpEstablishedTimeout = tcpEstablishedTimeoutDecoded - let udpStreamTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .udpStreamTimeout) - udpStreamTimeout = udpStreamTimeoutDecoded - let udpTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .udpTimeout) - udpTimeout = udpTimeoutDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ConnectionTrackingConfiguration() + value.tcpEstablishedTimeout = try reader["tcpEstablishedTimeout"].readIfPresent() + value.udpStreamTimeout = try reader["udpStreamTimeout"].readIfPresent() + value.udpTimeout = try reader["udpTimeout"].readIfPresent() + return value + } } } @@ -17535,12 +13599,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ConnectionTrackingSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tcpEstablishedTimeout = "tcpEstablishedTimeout" - case udpStreamTimeout = "udpStreamTimeout" - case udpTimeout = "udpTimeout" - } +extension EC2ClientTypes.ConnectionTrackingSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -17555,14 +13614,15 @@ extension EC2ClientTypes.ConnectionTrackingSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tcpEstablishedTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .tcpEstablishedTimeout) - tcpEstablishedTimeout = tcpEstablishedTimeoutDecoded - let udpTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .udpTimeout) - udpTimeout = udpTimeoutDecoded - let udpStreamTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .udpStreamTimeout) - udpStreamTimeout = udpStreamTimeoutDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ConnectionTrackingSpecification() + value.tcpEstablishedTimeout = try reader["tcpEstablishedTimeout"].readIfPresent() + value.udpTimeout = try reader["udpTimeout"].readIfPresent() + value.udpStreamTimeout = try reader["udpStreamTimeout"].readIfPresent() + return value + } } } @@ -17590,12 +13650,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ConnectionTrackingSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tcpEstablishedTimeout = "TcpEstablishedTimeout" - case udpStreamTimeout = "UdpStreamTimeout" - case udpTimeout = "UdpTimeout" - } +extension EC2ClientTypes.ConnectionTrackingSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -17610,14 +13665,15 @@ extension EC2ClientTypes.ConnectionTrackingSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tcpEstablishedTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .tcpEstablishedTimeout) - tcpEstablishedTimeout = tcpEstablishedTimeoutDecoded - let udpStreamTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .udpStreamTimeout) - udpStreamTimeout = udpStreamTimeoutDecoded - let udpTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .udpTimeout) - udpTimeout = udpTimeoutDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ConnectionTrackingSpecificationRequest() + value.tcpEstablishedTimeout = try reader["TcpEstablishedTimeout"].readIfPresent() + value.udpStreamTimeout = try reader["UdpStreamTimeout"].readIfPresent() + value.udpTimeout = try reader["UdpTimeout"].readIfPresent() + return value + } } } @@ -17645,12 +13701,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ConnectionTrackingSpecificationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tcpEstablishedTimeout = "tcpEstablishedTimeout" - case udpStreamTimeout = "udpStreamTimeout" - case udpTimeout = "udpTimeout" - } +extension EC2ClientTypes.ConnectionTrackingSpecificationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -17665,14 +13716,15 @@ extension EC2ClientTypes.ConnectionTrackingSpecificationResponse: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tcpEstablishedTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .tcpEstablishedTimeout) - tcpEstablishedTimeout = tcpEstablishedTimeoutDecoded - let udpStreamTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .udpStreamTimeout) - udpStreamTimeout = udpStreamTimeoutDecoded - let udpTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .udpTimeout) - udpTimeout = udpTimeoutDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ConnectionTrackingSpecificationResponse() + value.tcpEstablishedTimeout = try reader["tcpEstablishedTimeout"].readIfPresent() + value.udpStreamTimeout = try reader["udpStreamTimeout"].readIfPresent() + value.udpTimeout = try reader["udpTimeout"].readIfPresent() + return value + } } } @@ -17761,16 +13813,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ConversionTask: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case conversionTaskId = "conversionTaskId" - case expirationTime = "expirationTime" - case importInstance = "importInstance" - case importVolume = "importVolume" - case state = "state" - case statusMessage = "statusMessage" - case tags = "tagSet" - } +extension EC2ClientTypes.ConversionTask: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -17806,38 +13849,18 @@ extension EC2ClientTypes.ConversionTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let conversionTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .conversionTaskId) - conversionTaskId = conversionTaskIdDecoded - let expirationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expirationTime) - expirationTime = expirationTimeDecoded - let importInstanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImportInstanceTaskDetails.self, forKey: .importInstance) - importInstance = importInstanceDecoded - let importVolumeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImportVolumeTaskDetails.self, forKey: .importVolume) - importVolume = importVolumeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConversionTaskState.self, forKey: .state) - state = stateDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ConversionTask() + value.conversionTaskId = try reader["conversionTaskId"].readIfPresent() + value.expirationTime = try reader["expirationTime"].readIfPresent() + value.importInstance = try reader["importInstance"].readIfPresent(readingClosure: EC2ClientTypes.ImportInstanceTaskDetails.readingClosure) + value.importVolume = try reader["importVolume"].readIfPresent(readingClosure: EC2ClientTypes.ImportVolumeTaskDetails.readingClosure) + value.state = try reader["state"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -17987,50 +14010,15 @@ public struct CopyFpgaImageInput: Swift.Equatable { } } -struct CopyFpgaImageInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let sourceFpgaImageId: Swift.String? - let description: Swift.String? - let name: Swift.String? - let sourceRegion: Swift.String? - let clientToken: Swift.String? -} - -extension CopyFpgaImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case name = "Name" - case sourceFpgaImageId = "SourceFpgaImageId" - case sourceRegion = "SourceRegion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let sourceFpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceFpgaImageId) - sourceFpgaImageId = sourceFpgaImageIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let sourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceRegion) - sourceRegion = sourceRegionDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +extension CopyFpgaImageOutput { -extension CopyFpgaImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyFpgaImageOutputBody = try responseDecoder.decode(responseBody: data) - self.fpgaImageId = output.fpgaImageId - } else { - self.fpgaImageId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CopyFpgaImageOutput() + value.fpgaImageId = try reader["fpgaImageId"].readIfPresent() + return value } } } @@ -18047,27 +14035,18 @@ public struct CopyFpgaImageOutput: Swift.Equatable { } } -struct CopyFpgaImageOutputBody: Swift.Equatable { - let fpgaImageId: Swift.String? -} - -extension CopyFpgaImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fpgaImageId = "fpgaImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageId) - fpgaImageId = fpgaImageIdDecoded - } -} +enum CopyFpgaImageOutputError { -enum CopyFpgaImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -18187,66 +14166,15 @@ public struct CopyImageInput: Swift.Equatable { } } -struct CopyImageInputBody: Swift.Equatable { - let clientToken: Swift.String? - let description: Swift.String? - let encrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let name: Swift.String? - let sourceImageId: Swift.String? - let sourceRegion: Swift.String? - let destinationOutpostArn: Swift.String? - let dryRun: Swift.Bool? - let copyImageTags: Swift.Bool? -} - -extension CopyImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case copyImageTags = "CopyImageTags" - case description = "Description" - case destinationOutpostArn = "DestinationOutpostArn" - case dryRun = "dryRun" - case encrypted = "encrypted" - case kmsKeyId = "kmsKeyId" - case name = "Name" - case sourceImageId = "SourceImageId" - case sourceRegion = "SourceRegion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let sourceImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceImageId) - sourceImageId = sourceImageIdDecoded - let sourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceRegion) - sourceRegion = sourceRegionDecoded - let destinationOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationOutpostArn) - destinationOutpostArn = destinationOutpostArnDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let copyImageTagsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyImageTags) - copyImageTags = copyImageTagsDecoded - } -} - -extension CopyImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyImageOutputBody = try responseDecoder.decode(responseBody: data) - self.imageId = output.imageId - } else { - self.imageId = nil +extension CopyImageOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CopyImageOutput() + value.imageId = try reader["imageId"].readIfPresent() + return value } } } @@ -18264,27 +14192,18 @@ public struct CopyImageOutput: Swift.Equatable { } } -struct CopyImageOutputBody: Swift.Equatable { - let imageId: Swift.String? -} - -extension CopyImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageId = "imageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - } -} +enum CopyImageOutputError { -enum CopyImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -18409,85 +14328,16 @@ public struct CopySnapshotInput: Swift.Equatable { } } -struct CopySnapshotInputBody: Swift.Equatable { - let description: Swift.String? - let destinationOutpostArn: Swift.String? - let destinationRegion: Swift.String? - let encrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let presignedUrl: Swift.String? - let sourceRegion: Swift.String? - let sourceSnapshotId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CopySnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case destinationOutpostArn = "DestinationOutpostArn" - case destinationRegion = "destinationRegion" - case dryRun = "dryRun" - case encrypted = "encrypted" - case kmsKeyId = "kmsKeyId" - case presignedUrl = "presignedUrl" - case sourceRegion = "SourceRegion" - case sourceSnapshotId = "SourceSnapshotId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let destinationOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationOutpostArn) - destinationOutpostArn = destinationOutpostArnDecoded - let destinationRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationRegion) - destinationRegion = destinationRegionDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let presignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .presignedUrl) - presignedUrl = presignedUrlDecoded - let sourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceRegion) - sourceRegion = sourceRegionDecoded - let sourceSnapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSnapshotId) - sourceSnapshotId = sourceSnapshotIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CopySnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopySnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshotId = output.snapshotId - self.tags = output.tags - } else { - self.snapshotId = nil - self.tags = nil +extension CopySnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CopySnapshotOutput() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -18508,48 +14358,18 @@ public struct CopySnapshotOutput: Swift.Equatable { } } -struct CopySnapshotOutputBody: Swift.Equatable { - let snapshotId: Swift.String? - let tags: [EC2ClientTypes.Tag]? -} - -extension CopySnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshotId = "snapshotId" - case tags = "tagSet" - } +enum CopySnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - tags = nil - } - } -} - -enum CopySnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -18618,12 +14438,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CpuOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amdSevSnp = "amdSevSnp" - case coreCount = "coreCount" - case threadsPerCore = "threadsPerCore" - } +extension EC2ClientTypes.CpuOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -18638,14 +14453,15 @@ extension EC2ClientTypes.CpuOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coreCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .coreCount) - coreCount = coreCountDecoded - let threadsPerCoreDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .threadsPerCore) - threadsPerCore = threadsPerCoreDecoded - let amdSevSnpDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AmdSevSnpSpecification.self, forKey: .amdSevSnp) - amdSevSnp = amdSevSnpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CpuOptions() + value.coreCount = try reader["coreCount"].readIfPresent() + value.threadsPerCore = try reader["threadsPerCore"].readIfPresent() + value.amdSevSnp = try reader["amdSevSnp"].readIfPresent() + return value + } } } @@ -18673,12 +14489,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CpuOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amdSevSnp = "AmdSevSnp" - case coreCount = "CoreCount" - case threadsPerCore = "ThreadsPerCore" - } +extension EC2ClientTypes.CpuOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -18693,14 +14504,15 @@ extension EC2ClientTypes.CpuOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coreCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .coreCount) - coreCount = coreCountDecoded - let threadsPerCoreDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .threadsPerCore) - threadsPerCore = threadsPerCoreDecoded - let amdSevSnpDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AmdSevSnpSpecification.self, forKey: .amdSevSnp) - amdSevSnp = amdSevSnpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CpuOptionsRequest() + value.coreCount = try reader["CoreCount"].readIfPresent() + value.threadsPerCore = try reader["ThreadsPerCore"].readIfPresent() + value.amdSevSnp = try reader["AmdSevSnp"].readIfPresent() + return value + } } } @@ -18838,116 +14650,25 @@ public struct CreateCapacityReservationFleetInput: Swift.Equatable { } } -struct CreateCapacityReservationFleetInputBody: Swift.Equatable { - let allocationStrategy: Swift.String? - let clientToken: Swift.String? - let instanceTypeSpecifications: [EC2ClientTypes.ReservationFleetInstanceSpecification]? - let tenancy: EC2ClientTypes.FleetCapacityReservationTenancy? - let totalTargetCapacity: Swift.Int? - let endDate: ClientRuntime.Date? - let instanceMatchCriteria: EC2ClientTypes.FleetInstanceMatchCriteria? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateCapacityReservationFleetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationStrategy = "AllocationStrategy" - case clientToken = "ClientToken" - case dryRun = "DryRun" - case endDate = "EndDate" - case instanceMatchCriteria = "InstanceMatchCriteria" - case instanceTypeSpecifications = "InstanceTypeSpecification" - case tagSpecifications = "TagSpecification" - case tenancy = "Tenancy" - case totalTargetCapacity = "TotalTargetCapacity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationStrategyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationStrategy) - allocationStrategy = allocationStrategyDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.instanceTypeSpecifications) { - struct KeyVal0{struct member{}} - let instanceTypeSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypeSpecifications) - if let instanceTypeSpecificationsWrappedContainer = instanceTypeSpecificationsWrappedContainer { - let instanceTypeSpecificationsContainer = try instanceTypeSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservationFleetInstanceSpecification].self, forKey: .member) - var instanceTypeSpecificationsBuffer:[EC2ClientTypes.ReservationFleetInstanceSpecification]? = nil - if let instanceTypeSpecificationsContainer = instanceTypeSpecificationsContainer { - instanceTypeSpecificationsBuffer = [EC2ClientTypes.ReservationFleetInstanceSpecification]() - for structureContainer0 in instanceTypeSpecificationsContainer { - instanceTypeSpecificationsBuffer?.append(structureContainer0) - } - } - instanceTypeSpecifications = instanceTypeSpecificationsBuffer - } else { - instanceTypeSpecifications = [] - } - } else { - instanceTypeSpecifications = nil - } - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetCapacityReservationTenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - let totalTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalTargetCapacity) - totalTargetCapacity = totalTargetCapacityDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let instanceMatchCriteriaDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetInstanceMatchCriteria.self, forKey: .instanceMatchCriteria) - instanceMatchCriteria = instanceMatchCriteriaDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateCapacityReservationFleetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCapacityReservationFleetOutputBody = try responseDecoder.decode(responseBody: data) - self.allocationStrategy = output.allocationStrategy - self.capacityReservationFleetId = output.capacityReservationFleetId - self.createTime = output.createTime - self.endDate = output.endDate - self.fleetCapacityReservations = output.fleetCapacityReservations - self.instanceMatchCriteria = output.instanceMatchCriteria - self.state = output.state - self.tags = output.tags - self.tenancy = output.tenancy - self.totalFulfilledCapacity = output.totalFulfilledCapacity - self.totalTargetCapacity = output.totalTargetCapacity - } else { - self.allocationStrategy = nil - self.capacityReservationFleetId = nil - self.createTime = nil - self.endDate = nil - self.fleetCapacityReservations = nil - self.instanceMatchCriteria = nil - self.state = nil - self.tags = nil - self.tenancy = nil - self.totalFulfilledCapacity = nil - self.totalTargetCapacity = nil +extension CreateCapacityReservationFleetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCapacityReservationFleetOutput() + value.allocationStrategy = try reader["allocationStrategy"].readIfPresent() + value.capacityReservationFleetId = try reader["capacityReservationFleetId"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.endDate = try reader["endDate"].readTimestampIfPresent(format: .dateTime) + value.fleetCapacityReservations = try reader["fleetCapacityReservationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FleetCapacityReservation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceMatchCriteria = try reader["instanceMatchCriteria"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tenancy = try reader["tenancy"].readIfPresent() + value.totalFulfilledCapacity = try reader["totalFulfilledCapacity"].readIfPresent() + value.totalTargetCapacity = try reader["totalTargetCapacity"].readIfPresent() + return value } } } @@ -19004,101 +14725,18 @@ public struct CreateCapacityReservationFleetOutput: Swift.Equatable { } } -struct CreateCapacityReservationFleetOutputBody: Swift.Equatable { - let capacityReservationFleetId: Swift.String? - let state: EC2ClientTypes.CapacityReservationFleetState? - let totalTargetCapacity: Swift.Int? - let totalFulfilledCapacity: Swift.Double? - let instanceMatchCriteria: EC2ClientTypes.FleetInstanceMatchCriteria? - let allocationStrategy: Swift.String? - let createTime: ClientRuntime.Date? - let endDate: ClientRuntime.Date? - let tenancy: EC2ClientTypes.FleetCapacityReservationTenancy? - let fleetCapacityReservations: [EC2ClientTypes.FleetCapacityReservation]? - let tags: [EC2ClientTypes.Tag]? -} - -extension CreateCapacityReservationFleetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationStrategy = "allocationStrategy" - case capacityReservationFleetId = "capacityReservationFleetId" - case createTime = "createTime" - case endDate = "endDate" - case fleetCapacityReservations = "fleetCapacityReservationSet" - case instanceMatchCriteria = "instanceMatchCriteria" - case state = "state" - case tags = "tagSet" - case tenancy = "tenancy" - case totalFulfilledCapacity = "totalFulfilledCapacity" - case totalTargetCapacity = "totalTargetCapacity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationFleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationFleetId) - capacityReservationFleetId = capacityReservationFleetIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationFleetState.self, forKey: .state) - state = stateDecoded - let totalTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalTargetCapacity) - totalTargetCapacity = totalTargetCapacityDecoded - let totalFulfilledCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .totalFulfilledCapacity) - totalFulfilledCapacity = totalFulfilledCapacityDecoded - let instanceMatchCriteriaDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetInstanceMatchCriteria.self, forKey: .instanceMatchCriteria) - instanceMatchCriteria = instanceMatchCriteriaDecoded - let allocationStrategyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationStrategy) - allocationStrategy = allocationStrategyDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetCapacityReservationTenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - if containerValues.contains(.fleetCapacityReservations) { - struct KeyVal0{struct item{}} - let fleetCapacityReservationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fleetCapacityReservations) - if let fleetCapacityReservationsWrappedContainer = fleetCapacityReservationsWrappedContainer { - let fleetCapacityReservationsContainer = try fleetCapacityReservationsWrappedContainer.decodeIfPresent([EC2ClientTypes.FleetCapacityReservation].self, forKey: .member) - var fleetCapacityReservationsBuffer:[EC2ClientTypes.FleetCapacityReservation]? = nil - if let fleetCapacityReservationsContainer = fleetCapacityReservationsContainer { - fleetCapacityReservationsBuffer = [EC2ClientTypes.FleetCapacityReservation]() - for structureContainer0 in fleetCapacityReservationsContainer { - fleetCapacityReservationsBuffer?.append(structureContainer0) - } - } - fleetCapacityReservations = fleetCapacityReservationsBuffer - } else { - fleetCapacityReservations = [] - } - } else { - fleetCapacityReservations = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -enum CreateCapacityReservationFleetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum CreateCapacityReservationFleetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -19265,107 +14903,15 @@ public struct CreateCapacityReservationInput: Swift.Equatable { } } -struct CreateCapacityReservationInputBody: Swift.Equatable { - let clientToken: Swift.String? - let instanceType: Swift.String? - let instancePlatform: EC2ClientTypes.CapacityReservationInstancePlatform? - let availabilityZone: Swift.String? - let availabilityZoneId: Swift.String? - let tenancy: EC2ClientTypes.CapacityReservationTenancy? - let instanceCount: Swift.Int? - let ebsOptimized: Swift.Bool? - let ephemeralStorage: Swift.Bool? - let endDate: ClientRuntime.Date? - let endDateType: EC2ClientTypes.EndDateType? - let instanceMatchCriteria: EC2ClientTypes.InstanceMatchCriteria? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? - let outpostArn: Swift.String? - let placementGroupArn: Swift.String? -} - -extension CreateCapacityReservationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "AvailabilityZone" - case availabilityZoneId = "AvailabilityZoneId" - case clientToken = "ClientToken" - case dryRun = "DryRun" - case ebsOptimized = "EbsOptimized" - case endDate = "EndDate" - case endDateType = "EndDateType" - case ephemeralStorage = "EphemeralStorage" - case instanceCount = "InstanceCount" - case instanceMatchCriteria = "InstanceMatchCriteria" - case instancePlatform = "InstancePlatform" - case instanceType = "InstanceType" - case outpostArn = "OutpostArn" - case placementGroupArn = "PlacementGroupArn" - case tagSpecifications = "TagSpecifications" - case tenancy = "Tenancy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let instancePlatformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationInstancePlatform.self, forKey: .instancePlatform) - instancePlatform = instancePlatformDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let availabilityZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneId) - availabilityZoneId = availabilityZoneIdDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationTenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let ephemeralStorageDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ephemeralStorage) - ephemeralStorage = ephemeralStorageDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let endDateTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EndDateType.self, forKey: .endDateType) - endDateType = endDateTypeDecoded - let instanceMatchCriteriaDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMatchCriteria.self, forKey: .instanceMatchCriteria) - instanceMatchCriteria = instanceMatchCriteriaDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let placementGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .placementGroupArn) - placementGroupArn = placementGroupArnDecoded - } -} - -extension CreateCapacityReservationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCapacityReservationOutputBody = try responseDecoder.decode(responseBody: data) - self.capacityReservation = output.capacityReservation - } else { - self.capacityReservation = nil +extension CreateCapacityReservationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCapacityReservationOutput() + value.capacityReservation = try reader["capacityReservation"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservation.readingClosure) + return value } } } @@ -19382,27 +14928,18 @@ public struct CreateCapacityReservationOutput: Swift.Equatable { } } -struct CreateCapacityReservationOutputBody: Swift.Equatable { - let capacityReservation: EC2ClientTypes.CapacityReservation? -} - -extension CreateCapacityReservationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservation = "capacityReservation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservation.self, forKey: .capacityReservation) - capacityReservation = capacityReservationDecoded - } -} +enum CreateCapacityReservationOutputError { -enum CreateCapacityReservationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -19468,59 +15005,15 @@ public struct CreateCarrierGatewayInput: Swift.Equatable { } } -struct CreateCarrierGatewayInputBody: Swift.Equatable { - let vpcId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? - let clientToken: Swift.String? -} - -extension CreateCarrierGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case tagSpecifications = "TagSpecification" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +extension CreateCarrierGatewayOutput { -extension CreateCarrierGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCarrierGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.carrierGateway = output.carrierGateway - } else { - self.carrierGateway = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCarrierGatewayOutput() + value.carrierGateway = try reader["carrierGateway"].readIfPresent(readingClosure: EC2ClientTypes.CarrierGateway.readingClosure) + return value } } } @@ -19537,27 +15030,18 @@ public struct CreateCarrierGatewayOutput: Swift.Equatable { } } -struct CreateCarrierGatewayOutputBody: Swift.Equatable { - let carrierGateway: EC2ClientTypes.CarrierGateway? -} - -extension CreateCarrierGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGateway = "carrierGateway" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let carrierGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CarrierGateway.self, forKey: .carrierGateway) - carrierGateway = carrierGatewayDecoded - } -} +enum CreateCarrierGatewayOutputError { -enum CreateCarrierGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -19759,170 +15243,17 @@ public struct CreateClientVpnEndpointInput: Swift.Equatable { } } -struct CreateClientVpnEndpointInputBody: Swift.Equatable { - let clientCidrBlock: Swift.String? - let serverCertificateArn: Swift.String? - let authenticationOptions: [EC2ClientTypes.ClientVpnAuthenticationRequest]? - let connectionLogOptions: EC2ClientTypes.ConnectionLogOptions? - let dnsServers: [Swift.String]? - let transportProtocol: EC2ClientTypes.TransportProtocol? - let vpnPort: Swift.Int? - let description: Swift.String? - let splitTunnel: Swift.Bool? - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let securityGroupIds: [Swift.String]? - let vpcId: Swift.String? - let selfServicePortal: EC2ClientTypes.SelfServicePortal? - let clientConnectOptions: EC2ClientTypes.ClientConnectOptions? - let sessionTimeoutHours: Swift.Int? - let clientLoginBannerOptions: EC2ClientTypes.ClientLoginBannerOptions? -} - -extension CreateClientVpnEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationOptions = "Authentication" - case clientCidrBlock = "ClientCidrBlock" - case clientConnectOptions = "ClientConnectOptions" - case clientLoginBannerOptions = "ClientLoginBannerOptions" - case clientToken = "ClientToken" - case connectionLogOptions = "ConnectionLogOptions" - case description = "Description" - case dnsServers = "DnsServers" - case dryRun = "DryRun" - case securityGroupIds = "SecurityGroupId" - case selfServicePortal = "SelfServicePortal" - case serverCertificateArn = "ServerCertificateArn" - case sessionTimeoutHours = "SessionTimeoutHours" - case splitTunnel = "SplitTunnel" - case tagSpecifications = "TagSpecification" - case transportProtocol = "TransportProtocol" - case vpcId = "VpcId" - case vpnPort = "VpnPort" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientCidrBlock) - clientCidrBlock = clientCidrBlockDecoded - let serverCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateArn) - serverCertificateArn = serverCertificateArnDecoded - if containerValues.contains(.authenticationOptions) { - struct KeyVal0{struct member{}} - let authenticationOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .authenticationOptions) - if let authenticationOptionsWrappedContainer = authenticationOptionsWrappedContainer { - let authenticationOptionsContainer = try authenticationOptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.ClientVpnAuthenticationRequest].self, forKey: .member) - var authenticationOptionsBuffer:[EC2ClientTypes.ClientVpnAuthenticationRequest]? = nil - if let authenticationOptionsContainer = authenticationOptionsContainer { - authenticationOptionsBuffer = [EC2ClientTypes.ClientVpnAuthenticationRequest]() - for structureContainer0 in authenticationOptionsContainer { - authenticationOptionsBuffer?.append(structureContainer0) - } - } - authenticationOptions = authenticationOptionsBuffer - } else { - authenticationOptions = [] - } - } else { - authenticationOptions = nil - } - let connectionLogOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionLogOptions.self, forKey: .connectionLogOptions) - connectionLogOptions = connectionLogOptionsDecoded - if containerValues.contains(.dnsServers) { - struct KeyVal0{struct item{}} - let dnsServersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dnsServers) - if let dnsServersWrappedContainer = dnsServersWrappedContainer { - let dnsServersContainer = try dnsServersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dnsServersBuffer:[Swift.String]? = nil - if let dnsServersContainer = dnsServersContainer { - dnsServersBuffer = [Swift.String]() - for stringContainer0 in dnsServersContainer { - dnsServersBuffer?.append(stringContainer0) - } - } - dnsServers = dnsServersBuffer - } else { - dnsServers = [] - } - } else { - dnsServers = nil - } - let transportProtocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransportProtocol.self, forKey: .transportProtocol) - transportProtocol = transportProtocolDecoded - let vpnPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .vpnPort) - vpnPort = vpnPortDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let splitTunnelDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .splitTunnel) - splitTunnel = splitTunnelDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let selfServicePortalDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SelfServicePortal.self, forKey: .selfServicePortal) - selfServicePortal = selfServicePortalDecoded - let clientConnectOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientConnectOptions.self, forKey: .clientConnectOptions) - clientConnectOptions = clientConnectOptionsDecoded - let sessionTimeoutHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sessionTimeoutHours) - sessionTimeoutHours = sessionTimeoutHoursDecoded - let clientLoginBannerOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientLoginBannerOptions.self, forKey: .clientLoginBannerOptions) - clientLoginBannerOptions = clientLoginBannerOptionsDecoded - } -} - -extension CreateClientVpnEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateClientVpnEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.clientVpnEndpointId = output.clientVpnEndpointId - self.dnsName = output.dnsName - self.status = output.status - } else { - self.clientVpnEndpointId = nil - self.dnsName = nil - self.status = nil +extension CreateClientVpnEndpointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateClientVpnEndpointOutput() + value.clientVpnEndpointId = try reader["clientVpnEndpointId"].readIfPresent() + value.dnsName = try reader["dnsName"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnEndpointStatus.readingClosure) + return value } } } @@ -19947,35 +15278,18 @@ public struct CreateClientVpnEndpointOutput: Swift.Equatable { } } -struct CreateClientVpnEndpointOutputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let status: EC2ClientTypes.ClientVpnEndpointStatus? - let dnsName: Swift.String? -} - -extension CreateClientVpnEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "clientVpnEndpointId" - case dnsName = "dnsName" - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnEndpointStatus.self, forKey: .status) - status = statusDecoded - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - } -} +enum CreateClientVpnEndpointOutputError { -enum CreateClientVpnEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -20056,50 +15370,15 @@ public struct CreateClientVpnRouteInput: Swift.Equatable { } } -struct CreateClientVpnRouteInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let destinationCidrBlock: Swift.String? - let targetVpcSubnetId: Swift.String? - let description: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension CreateClientVpnRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case clientVpnEndpointId = "ClientVpnEndpointId" - case description = "Description" - case destinationCidrBlock = "DestinationCidrBlock" - case dryRun = "DryRun" - case targetVpcSubnetId = "TargetVpcSubnetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let targetVpcSubnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetVpcSubnetId) - targetVpcSubnetId = targetVpcSubnetIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateClientVpnRouteOutput { -extension CreateClientVpnRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateClientVpnRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.status = output.status - } else { - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateClientVpnRouteOutput() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnRouteStatus.readingClosure) + return value } } } @@ -20116,27 +15395,18 @@ public struct CreateClientVpnRouteOutput: Swift.Equatable { } } -struct CreateClientVpnRouteOutputBody: Swift.Equatable { - let status: EC2ClientTypes.ClientVpnRouteStatus? -} - -extension CreateClientVpnRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnRouteStatus.self, forKey: .status) - status = statusDecoded - } -} +enum CreateClientVpnRouteOutputError { -enum CreateClientVpnRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -20187,38 +15457,15 @@ public struct CreateCoipCidrInput: Swift.Equatable { } } -struct CreateCoipCidrInputBody: Swift.Equatable { - let cidr: Swift.String? - let coipPoolId: Swift.String? - let dryRun: Swift.Bool? -} +extension CreateCoipCidrOutput { -extension CreateCoipCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case coipPoolId = "CoipPoolId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let coipPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coipPoolId) - coipPoolId = coipPoolIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateCoipCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCoipCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.coipCidr = output.coipCidr - } else { - self.coipCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCoipCidrOutput() + value.coipCidr = try reader["coipCidr"].readIfPresent(readingClosure: EC2ClientTypes.CoipCidr.readingClosure) + return value } } } @@ -20235,27 +15482,18 @@ public struct CreateCoipCidrOutput: Swift.Equatable { } } -struct CreateCoipCidrOutputBody: Swift.Equatable { - let coipCidr: EC2ClientTypes.CoipCidr? -} - -extension CreateCoipCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coipCidr = "coipCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coipCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CoipCidr.self, forKey: .coipCidr) - coipCidr = coipCidrDecoded - } -} +enum CreateCoipCidrOutputError { -enum CreateCoipCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -20314,55 +15552,15 @@ public struct CreateCoipPoolInput: Swift.Equatable { } } -struct CreateCoipPoolInputBody: Swift.Equatable { - let localGatewayRouteTableId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateCoipPoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case localGatewayRouteTableId = "LocalGatewayRouteTableId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateCoipPoolOutput { -extension CreateCoipPoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCoipPoolOutputBody = try responseDecoder.decode(responseBody: data) - self.coipPool = output.coipPool - } else { - self.coipPool = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCoipPoolOutput() + value.coipPool = try reader["coipPool"].readIfPresent(readingClosure: EC2ClientTypes.CoipPool.readingClosure) + return value } } } @@ -20379,27 +15577,18 @@ public struct CreateCoipPoolOutput: Swift.Equatable { } } -struct CreateCoipPoolOutputBody: Swift.Equatable { - let coipPool: EC2ClientTypes.CoipPool? -} - -extension CreateCoipPoolOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coipPool = "coipPool" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coipPoolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CoipPool.self, forKey: .coipPool) - coipPool = coipPoolDecoded - } -} +enum CreateCoipPoolOutputError { -enum CreateCoipPoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -20494,75 +15683,15 @@ public struct CreateCustomerGatewayInput: Swift.Equatable { } } -struct CreateCustomerGatewayInputBody: Swift.Equatable { - let bgpAsn: Swift.Int? - let publicIp: Swift.String? - let certificateArn: Swift.String? - let type: EC2ClientTypes.GatewayType? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let deviceName: Swift.String? - let ipAddress: Swift.String? - let dryRun: Swift.Bool? -} - -extension CreateCustomerGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bgpAsn = "BgpAsn" - case certificateArn = "CertificateArn" - case deviceName = "DeviceName" - case dryRun = "dryRun" - case ipAddress = "IpAddress" - case publicIp = "PublicIp" - case tagSpecifications = "TagSpecification" - case type = "Type" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bgpAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bgpAsn) - bgpAsn = bgpAsnDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.GatewayType.self, forKey: .type) - type = typeDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let ipAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddress) - ipAddress = ipAddressDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateCustomerGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCustomerGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.customerGateway = output.customerGateway - } else { - self.customerGateway = nil +extension CreateCustomerGatewayOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCustomerGatewayOutput() + value.customerGateway = try reader["customerGateway"].readIfPresent(readingClosure: EC2ClientTypes.CustomerGateway.readingClosure) + return value } } } @@ -20580,27 +15709,18 @@ public struct CreateCustomerGatewayOutput: Swift.Equatable { } } -struct CreateCustomerGatewayOutputBody: Swift.Equatable { - let customerGateway: EC2ClientTypes.CustomerGateway? -} - -extension CreateCustomerGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerGateway = "customerGateway" - } +enum CreateCustomerGatewayOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CustomerGateway.self, forKey: .customerGateway) - customerGateway = customerGatewayDecoded - } -} - -enum CreateCustomerGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -20650,38 +15770,15 @@ public struct CreateDefaultSubnetInput: Swift.Equatable { } } -struct CreateDefaultSubnetInputBody: Swift.Equatable { - let availabilityZone: Swift.String? - let dryRun: Swift.Bool? - let ipv6Native: Swift.Bool? -} +extension CreateDefaultSubnetOutput { -extension CreateDefaultSubnetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "AvailabilityZone" - case dryRun = "DryRun" - case ipv6Native = "Ipv6Native" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipv6NativeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ipv6Native) - ipv6Native = ipv6NativeDecoded - } -} - -extension CreateDefaultSubnetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDefaultSubnetOutputBody = try responseDecoder.decode(responseBody: data) - self.subnet = output.subnet - } else { - self.subnet = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateDefaultSubnetOutput() + value.subnet = try reader["subnet"].readIfPresent(readingClosure: EC2ClientTypes.Subnet.readingClosure) + return value } } } @@ -20698,27 +15795,18 @@ public struct CreateDefaultSubnetOutput: Swift.Equatable { } } -struct CreateDefaultSubnetOutputBody: Swift.Equatable { - let subnet: EC2ClientTypes.Subnet? -} - -extension CreateDefaultSubnetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subnet = "subnet" - } +enum CreateDefaultSubnetOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Subnet.self, forKey: .subnet) - subnet = subnetDecoded - } -} - -enum CreateDefaultSubnetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -20753,30 +15841,15 @@ public struct CreateDefaultVpcInput: Swift.Equatable { } } -struct CreateDefaultVpcInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension CreateDefaultVpcInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateDefaultVpcOutput { -extension CreateDefaultVpcOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDefaultVpcOutputBody = try responseDecoder.decode(responseBody: data) - self.vpc = output.vpc - } else { - self.vpc = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateDefaultVpcOutput() + value.vpc = try reader["vpc"].readIfPresent(readingClosure: EC2ClientTypes.Vpc.readingClosure) + return value } } } @@ -20793,27 +15866,18 @@ public struct CreateDefaultVpcOutput: Swift.Equatable { } } -struct CreateDefaultVpcOutputBody: Swift.Equatable { - let vpc: EC2ClientTypes.Vpc? -} - -extension CreateDefaultVpcOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpc = "vpc" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Vpc.self, forKey: .vpc) - vpc = vpcDecoded - } -} +enum CreateDefaultVpcOutputError { -enum CreateDefaultVpcOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -20881,72 +15945,15 @@ public struct CreateDhcpOptionsInput: Swift.Equatable { } } -struct CreateDhcpOptionsInputBody: Swift.Equatable { - let dhcpConfigurations: [EC2ClientTypes.NewDhcpConfiguration]? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateDhcpOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dhcpConfigurations = "dhcpConfiguration" - case dryRun = "dryRun" - case tagSpecifications = "TagSpecification" - } +extension CreateDhcpOptionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dhcpConfigurations) { - struct KeyVal0{struct item{}} - let dhcpConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dhcpConfigurations) - if let dhcpConfigurationsWrappedContainer = dhcpConfigurationsWrappedContainer { - let dhcpConfigurationsContainer = try dhcpConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.NewDhcpConfiguration].self, forKey: .member) - var dhcpConfigurationsBuffer:[EC2ClientTypes.NewDhcpConfiguration]? = nil - if let dhcpConfigurationsContainer = dhcpConfigurationsContainer { - dhcpConfigurationsBuffer = [EC2ClientTypes.NewDhcpConfiguration]() - for structureContainer0 in dhcpConfigurationsContainer { - dhcpConfigurationsBuffer?.append(structureContainer0) - } - } - dhcpConfigurations = dhcpConfigurationsBuffer - } else { - dhcpConfigurations = [] - } - } else { - dhcpConfigurations = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateDhcpOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDhcpOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.dhcpOptions = output.dhcpOptions - } else { - self.dhcpOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateDhcpOptionsOutput() + value.dhcpOptions = try reader["dhcpOptions"].readIfPresent(readingClosure: EC2ClientTypes.DhcpOptions.readingClosure) + return value } } } @@ -20963,27 +15970,18 @@ public struct CreateDhcpOptionsOutput: Swift.Equatable { } } -struct CreateDhcpOptionsOutputBody: Swift.Equatable { - let dhcpOptions: EC2ClientTypes.DhcpOptions? -} - -extension CreateDhcpOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dhcpOptions = "dhcpOptions" - } +enum CreateDhcpOptionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dhcpOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DhcpOptions.self, forKey: .dhcpOptions) - dhcpOptions = dhcpOptionsDecoded - } -} - -enum CreateDhcpOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -21049,61 +16047,16 @@ public struct CreateEgressOnlyInternetGatewayInput: Swift.Equatable { } } -struct CreateEgressOnlyInternetGatewayInputBody: Swift.Equatable { - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let vpcId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateEgressOnlyInternetGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case tagSpecifications = "TagSpecification" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} +extension CreateEgressOnlyInternetGatewayOutput { -extension CreateEgressOnlyInternetGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateEgressOnlyInternetGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.egressOnlyInternetGateway = output.egressOnlyInternetGateway - } else { - self.clientToken = nil - self.egressOnlyInternetGateway = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateEgressOnlyInternetGatewayOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.egressOnlyInternetGateway = try reader["egressOnlyInternetGateway"].readIfPresent(readingClosure: EC2ClientTypes.EgressOnlyInternetGateway.readingClosure) + return value } } } @@ -21124,42 +16077,23 @@ public struct CreateEgressOnlyInternetGatewayOutput: Swift.Equatable { } } -struct CreateEgressOnlyInternetGatewayOutputBody: Swift.Equatable { - let clientToken: Swift.String? - let egressOnlyInternetGateway: EC2ClientTypes.EgressOnlyInternetGateway? -} - -extension CreateEgressOnlyInternetGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case egressOnlyInternetGateway = "egressOnlyInternetGateway" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let egressOnlyInternetGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EgressOnlyInternetGateway.self, forKey: .egressOnlyInternetGateway) - egressOnlyInternetGateway = egressOnlyInternetGatewayDecoded - } -} +enum CreateEgressOnlyInternetGatewayOutputError { -enum CreateEgressOnlyInternetGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.CreateFleetError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errorCode = "errorCode" - case errorMessage = "errorMessage" - case launchTemplateAndOverrides = "launchTemplateAndOverrides" - case lifecycle = "lifecycle" - } +extension EC2ClientTypes.CreateFleetError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -21177,16 +16111,16 @@ extension EC2ClientTypes.CreateFleetError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateAndOverridesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateAndOverridesResponse.self, forKey: .launchTemplateAndOverrides) - launchTemplateAndOverrides = launchTemplateAndOverridesDecoded - let lifecycleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceLifecycle.self, forKey: .lifecycle) - lifecycle = lifecycleDecoded - let errorCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorCode) - errorCode = errorCodeDecoded - let errorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorMessage) - errorMessage = errorMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateFleetError() + value.launchTemplateAndOverrides = try reader["launchTemplateAndOverrides"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateAndOverridesResponse.readingClosure) + value.lifecycle = try reader["lifecycle"].readIfPresent() + value.errorCode = try reader["errorCode"].readIfPresent() + value.errorMessage = try reader["errorMessage"].readIfPresent() + return value + } } } @@ -21368,116 +16302,7 @@ public struct CreateFleetInput: Swift.Equatable { } } -struct CreateFleetInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let spotOptions: EC2ClientTypes.SpotOptionsRequest? - let onDemandOptions: EC2ClientTypes.OnDemandOptionsRequest? - let excessCapacityTerminationPolicy: EC2ClientTypes.FleetExcessCapacityTerminationPolicy? - let launchTemplateConfigs: [EC2ClientTypes.FleetLaunchTemplateConfigRequest]? - let targetCapacitySpecification: EC2ClientTypes.TargetCapacitySpecificationRequest? - let terminateInstancesWithExpiration: Swift.Bool? - let type: EC2ClientTypes.FleetType? - let validFrom: ClientRuntime.Date? - let validUntil: ClientRuntime.Date? - let replaceUnhealthyInstances: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let context: Swift.String? -} - -extension CreateFleetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case context = "Context" - case dryRun = "DryRun" - case excessCapacityTerminationPolicy = "ExcessCapacityTerminationPolicy" - case launchTemplateConfigs = "LaunchTemplateConfigs" - case onDemandOptions = "OnDemandOptions" - case replaceUnhealthyInstances = "ReplaceUnhealthyInstances" - case spotOptions = "SpotOptions" - case tagSpecifications = "TagSpecification" - case targetCapacitySpecification = "TargetCapacitySpecification" - case terminateInstancesWithExpiration = "TerminateInstancesWithExpiration" - case type = "Type" - case validFrom = "ValidFrom" - case validUntil = "ValidUntil" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let spotOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotOptionsRequest.self, forKey: .spotOptions) - spotOptions = spotOptionsDecoded - let onDemandOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OnDemandOptionsRequest.self, forKey: .onDemandOptions) - onDemandOptions = onDemandOptionsDecoded - let excessCapacityTerminationPolicyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetExcessCapacityTerminationPolicy.self, forKey: .excessCapacityTerminationPolicy) - excessCapacityTerminationPolicy = excessCapacityTerminationPolicyDecoded - if containerValues.contains(.launchTemplateConfigs) { - struct KeyVal0{struct item{}} - let launchTemplateConfigsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplateConfigs) - if let launchTemplateConfigsWrappedContainer = launchTemplateConfigsWrappedContainer { - let launchTemplateConfigsContainer = try launchTemplateConfigsWrappedContainer.decodeIfPresent([EC2ClientTypes.FleetLaunchTemplateConfigRequest].self, forKey: .member) - var launchTemplateConfigsBuffer:[EC2ClientTypes.FleetLaunchTemplateConfigRequest]? = nil - if let launchTemplateConfigsContainer = launchTemplateConfigsContainer { - launchTemplateConfigsBuffer = [EC2ClientTypes.FleetLaunchTemplateConfigRequest]() - for structureContainer0 in launchTemplateConfigsContainer { - launchTemplateConfigsBuffer?.append(structureContainer0) - } - } - launchTemplateConfigs = launchTemplateConfigsBuffer - } else { - launchTemplateConfigs = [] - } - } else { - launchTemplateConfigs = nil - } - let targetCapacitySpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetCapacitySpecificationRequest.self, forKey: .targetCapacitySpecification) - targetCapacitySpecification = targetCapacitySpecificationDecoded - let terminateInstancesWithExpirationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .terminateInstancesWithExpiration) - terminateInstancesWithExpiration = terminateInstancesWithExpirationDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetType.self, forKey: .type) - type = typeDecoded - let validFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validFrom) - validFrom = validFromDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - let replaceUnhealthyInstancesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .replaceUnhealthyInstances) - replaceUnhealthyInstances = replaceUnhealthyInstancesDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let contextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .context) - context = contextDecoded - } -} - -extension EC2ClientTypes.CreateFleetInstance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceIds = "instanceIds" - case instanceType = "instanceType" - case launchTemplateAndOverrides = "launchTemplateAndOverrides" - case lifecycle = "lifecycle" - case platform = "platform" - } +extension EC2ClientTypes.CreateFleetInstance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -21507,35 +16332,17 @@ extension EC2ClientTypes.CreateFleetInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateAndOverridesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateAndOverridesResponse.self, forKey: .launchTemplateAndOverrides) - launchTemplateAndOverrides = launchTemplateAndOverridesDecoded - let lifecycleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceLifecycle.self, forKey: .lifecycle) - lifecycle = lifecycleDecoded - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct item{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateFleetInstance() + value.launchTemplateAndOverrides = try reader["launchTemplateAndOverrides"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateAndOverridesResponse.readingClosure) + value.lifecycle = try reader["lifecycle"].readIfPresent() + value.instanceIds = try reader["instanceIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceType = try reader["instanceType"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + return value } - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let platformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlatformValues.self, forKey: .platform) - platform = platformDecoded } } @@ -21571,18 +16378,17 @@ extension EC2ClientTypes { } -extension CreateFleetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateFleetOutputBody = try responseDecoder.decode(responseBody: data) - self.errors = output.errors - self.fleetId = output.fleetId - self.instances = output.instances - } else { - self.errors = nil - self.fleetId = nil - self.instances = nil +extension CreateFleetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateFleetOutput() + value.errors = try reader["errorSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CreateFleetError.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.fleetId = try reader["fleetId"].readIfPresent() + value.instances = try reader["fleetInstanceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CreateFleetInstance.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -21607,69 +16413,18 @@ public struct CreateFleetOutput: Swift.Equatable { } } -struct CreateFleetOutputBody: Swift.Equatable { - let fleetId: Swift.String? - let errors: [EC2ClientTypes.CreateFleetError]? - let instances: [EC2ClientTypes.CreateFleetInstance]? -} +enum CreateFleetOutputError { -extension CreateFleetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errors = "errorSet" - case fleetId = "fleetId" - case instances = "fleetInstanceSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded - if containerValues.contains(.errors) { - struct KeyVal0{struct item{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([EC2ClientTypes.CreateFleetError].self, forKey: .member) - var errorsBuffer:[EC2ClientTypes.CreateFleetError]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [EC2ClientTypes.CreateFleetError]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] - } - } else { - errors = nil - } - if containerValues.contains(.instances) { - struct KeyVal0{struct item{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([EC2ClientTypes.CreateFleetInstance].self, forKey: .member) - var instancesBuffer:[EC2ClientTypes.CreateFleetInstance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [EC2ClientTypes.CreateFleetInstance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instances = nil - } - } -} - -enum CreateFleetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -21821,120 +16576,17 @@ public struct CreateFlowLogsInput: Swift.Equatable { } } -struct CreateFlowLogsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let deliverLogsPermissionArn: Swift.String? - let deliverCrossAccountRole: Swift.String? - let logGroupName: Swift.String? - let resourceIds: [Swift.String]? - let resourceType: EC2ClientTypes.FlowLogsResourceType? - let trafficType: EC2ClientTypes.TrafficType? - let logDestinationType: EC2ClientTypes.LogDestinationType? - let logDestination: Swift.String? - let logFormat: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let maxAggregationInterval: Swift.Int? - let destinationOptions: EC2ClientTypes.DestinationOptionsRequest? -} - -extension CreateFlowLogsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case deliverCrossAccountRole = "DeliverCrossAccountRole" - case deliverLogsPermissionArn = "DeliverLogsPermissionArn" - case destinationOptions = "DestinationOptions" - case dryRun = "DryRun" - case logDestination = "LogDestination" - case logDestinationType = "LogDestinationType" - case logFormat = "LogFormat" - case logGroupName = "LogGroupName" - case maxAggregationInterval = "MaxAggregationInterval" - case resourceIds = "ResourceId" - case resourceType = "ResourceType" - case tagSpecifications = "TagSpecification" - case trafficType = "TrafficType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let deliverLogsPermissionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliverLogsPermissionArn) - deliverLogsPermissionArn = deliverLogsPermissionArnDecoded - let deliverCrossAccountRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliverCrossAccountRole) - deliverCrossAccountRole = deliverCrossAccountRoleDecoded - let logGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logGroupName) - logGroupName = logGroupNameDecoded - if containerValues.contains(.resourceIds) { - struct KeyVal0{struct item{}} - let resourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceIds) - if let resourceIdsWrappedContainer = resourceIdsWrappedContainer { - let resourceIdsContainer = try resourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceIdsBuffer:[Swift.String]? = nil - if let resourceIdsContainer = resourceIdsContainer { - resourceIdsBuffer = [Swift.String]() - for stringContainer0 in resourceIdsContainer { - resourceIdsBuffer?.append(stringContainer0) - } - } - resourceIds = resourceIdsBuffer - } else { - resourceIds = [] - } - } else { - resourceIds = nil - } - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FlowLogsResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let trafficTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficType.self, forKey: .trafficType) - trafficType = trafficTypeDecoded - let logDestinationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LogDestinationType.self, forKey: .logDestinationType) - logDestinationType = logDestinationTypeDecoded - let logDestinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logDestination) - logDestination = logDestinationDecoded - let logFormatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logFormat) - logFormat = logFormatDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let maxAggregationIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAggregationInterval) - maxAggregationInterval = maxAggregationIntervalDecoded - let destinationOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DestinationOptionsRequest.self, forKey: .destinationOptions) - destinationOptions = destinationOptionsDecoded - } -} - -extension CreateFlowLogsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateFlowLogsOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.flowLogIds = output.flowLogIds - self.unsuccessful = output.unsuccessful - } else { - self.clientToken = nil - self.flowLogIds = nil - self.unsuccessful = nil +extension CreateFlowLogsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateFlowLogsOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.flowLogIds = try reader["flowLogIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -21959,69 +16611,18 @@ public struct CreateFlowLogsOutput: Swift.Equatable { } } -struct CreateFlowLogsOutputBody: Swift.Equatable { - let clientToken: Swift.String? - let flowLogIds: [Swift.String]? - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension CreateFlowLogsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case flowLogIds = "flowLogIdSet" - case unsuccessful = "unsuccessful" - } +enum CreateFlowLogsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.flowLogIds) { - struct KeyVal0{struct item{}} - let flowLogIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .flowLogIds) - if let flowLogIdsWrappedContainer = flowLogIdsWrappedContainer { - let flowLogIdsContainer = try flowLogIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var flowLogIdsBuffer:[Swift.String]? = nil - if let flowLogIdsContainer = flowLogIdsContainer { - flowLogIdsBuffer = [Swift.String]() - for stringContainer0 in flowLogIdsContainer { - flowLogIdsBuffer?.append(stringContainer0) - } - } - flowLogIds = flowLogIdsBuffer - } else { - flowLogIds = [] - } - } else { - flowLogIds = nil - } - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum CreateFlowLogsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -22108,73 +16709,16 @@ public struct CreateFpgaImageInput: Swift.Equatable { } } -struct CreateFpgaImageInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let inputStorageLocation: EC2ClientTypes.StorageLocation? - let logsStorageLocation: EC2ClientTypes.StorageLocation? - let description: Swift.String? - let name: Swift.String? - let clientToken: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateFpgaImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case inputStorageLocation = "InputStorageLocation" - case logsStorageLocation = "LogsStorageLocation" - case name = "Name" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let inputStorageLocationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StorageLocation.self, forKey: .inputStorageLocation) - inputStorageLocation = inputStorageLocationDecoded - let logsStorageLocationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StorageLocation.self, forKey: .logsStorageLocation) - logsStorageLocation = logsStorageLocationDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension CreateFpgaImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateFpgaImageOutputBody = try responseDecoder.decode(responseBody: data) - self.fpgaImageGlobalId = output.fpgaImageGlobalId - self.fpgaImageId = output.fpgaImageId - } else { - self.fpgaImageGlobalId = nil - self.fpgaImageId = nil +extension CreateFpgaImageOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateFpgaImageOutput() + value.fpgaImageGlobalId = try reader["fpgaImageGlobalId"].readIfPresent() + value.fpgaImageId = try reader["fpgaImageId"].readIfPresent() + return value } } } @@ -22195,31 +16739,18 @@ public struct CreateFpgaImageOutput: Swift.Equatable { } } -struct CreateFpgaImageOutputBody: Swift.Equatable { - let fpgaImageId: Swift.String? - let fpgaImageGlobalId: Swift.String? -} +enum CreateFpgaImageOutputError { -extension CreateFpgaImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fpgaImageGlobalId = "fpgaImageGlobalId" - case fpgaImageId = "fpgaImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageId) - fpgaImageId = fpgaImageIdDecoded - let fpgaImageGlobalIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageGlobalId) - fpgaImageGlobalId = fpgaImageGlobalIdDecoded - } -} - -enum CreateFpgaImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -22336,88 +16867,15 @@ public struct CreateImageInput: Swift.Equatable { } } -struct CreateImageInputBody: Swift.Equatable { - let blockDeviceMappings: [EC2ClientTypes.BlockDeviceMapping]? - let description: Swift.String? - let dryRun: Swift.Bool? - let instanceId: Swift.String? - let name: Swift.String? - let noReboot: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDeviceMappings = "blockDeviceMapping" - case description = "description" - case dryRun = "dryRun" - case instanceId = "instanceId" - case name = "name" - case noReboot = "noReboot" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct BlockDeviceMapping{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let noRebootDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .noReboot) - noReboot = noRebootDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension CreateImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateImageOutputBody = try responseDecoder.decode(responseBody: data) - self.imageId = output.imageId - } else { - self.imageId = nil +extension CreateImageOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateImageOutput() + value.imageId = try reader["imageId"].readIfPresent() + return value } } } @@ -22434,27 +16892,18 @@ public struct CreateImageOutput: Swift.Equatable { } } -struct CreateImageOutputBody: Swift.Equatable { - let imageId: Swift.String? -} +enum CreateImageOutputError { -extension CreateImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageId = "imageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - } -} - -enum CreateImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -22550,86 +16999,16 @@ public struct CreateInstanceConnectEndpointInput: Swift.Equatable { } } -struct CreateInstanceConnectEndpointInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let subnetId: Swift.String? - let securityGroupIds: [Swift.String]? - let preserveClientIp: Swift.Bool? - let clientToken: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateInstanceConnectEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case preserveClientIp = "PreserveClientIp" - case securityGroupIds = "SecurityGroupId" - case subnetId = "SubnetId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let preserveClientIpDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .preserveClientIp) - preserveClientIp = preserveClientIpDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension CreateInstanceConnectEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateInstanceConnectEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.instanceConnectEndpoint = output.instanceConnectEndpoint - } else { - self.clientToken = nil - self.instanceConnectEndpoint = nil +extension CreateInstanceConnectEndpointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateInstanceConnectEndpointOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.instanceConnectEndpoint = try reader["instanceConnectEndpoint"].readIfPresent(readingClosure: EC2ClientTypes.Ec2InstanceConnectEndpoint.readingClosure) + return value } } } @@ -22650,31 +17029,18 @@ public struct CreateInstanceConnectEndpointOutput: Swift.Equatable { } } -struct CreateInstanceConnectEndpointOutputBody: Swift.Equatable { - let instanceConnectEndpoint: EC2ClientTypes.Ec2InstanceConnectEndpoint? - let clientToken: Swift.String? -} +enum CreateInstanceConnectEndpointOutputError { -extension CreateInstanceConnectEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case instanceConnectEndpoint = "instanceConnectEndpoint" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceConnectEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ec2InstanceConnectEndpoint.self, forKey: .instanceConnectEndpoint) - instanceConnectEndpoint = instanceConnectEndpointDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -enum CreateInstanceConnectEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -22770,80 +17136,15 @@ public struct CreateInstanceEventWindowInput: Swift.Equatable { } } -struct CreateInstanceEventWindowInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let name: Swift.String? - let timeRanges: [EC2ClientTypes.InstanceEventWindowTimeRangeRequest]? - let cronExpression: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateInstanceEventWindowInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cronExpression = "CronExpression" - case dryRun = "DryRun" - case name = "Name" - case tagSpecifications = "TagSpecification" - case timeRanges = "TimeRange" - } +extension CreateInstanceEventWindowOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.timeRanges) { - struct KeyVal0{struct member{}} - let timeRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .timeRanges) - if let timeRangesWrappedContainer = timeRangesWrappedContainer { - let timeRangesContainer = try timeRangesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceEventWindowTimeRangeRequest].self, forKey: .member) - var timeRangesBuffer:[EC2ClientTypes.InstanceEventWindowTimeRangeRequest]? = nil - if let timeRangesContainer = timeRangesContainer { - timeRangesBuffer = [EC2ClientTypes.InstanceEventWindowTimeRangeRequest]() - for structureContainer0 in timeRangesContainer { - timeRangesBuffer?.append(structureContainer0) - } - } - timeRanges = timeRangesBuffer - } else { - timeRanges = [] - } - } else { - timeRanges = nil - } - let cronExpressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cronExpression) - cronExpression = cronExpressionDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension CreateInstanceEventWindowOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateInstanceEventWindowOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceEventWindow = output.instanceEventWindow - } else { - self.instanceEventWindow = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateInstanceEventWindowOutput() + value.instanceEventWindow = try reader["instanceEventWindow"].readIfPresent(readingClosure: EC2ClientTypes.InstanceEventWindow.readingClosure) + return value } } } @@ -22860,27 +17161,18 @@ public struct CreateInstanceEventWindowOutput: Swift.Equatable { } } -struct CreateInstanceEventWindowOutputBody: Swift.Equatable { - let instanceEventWindow: EC2ClientTypes.InstanceEventWindow? -} - -extension CreateInstanceEventWindowOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceEventWindow = "instanceEventWindow" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceEventWindowDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindow.self, forKey: .instanceEventWindow) - instanceEventWindow = instanceEventWindowDecoded - } -} +enum CreateInstanceEventWindowOutputError { -enum CreateInstanceEventWindowOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -22955,63 +17247,15 @@ public struct CreateInstanceExportTaskInput: Swift.Equatable { } } -struct CreateInstanceExportTaskInputBody: Swift.Equatable { - let description: Swift.String? - let exportToS3Task: EC2ClientTypes.ExportToS3TaskSpecification? - let instanceId: Swift.String? - let targetEnvironment: EC2ClientTypes.ExportEnvironment? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateInstanceExportTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case exportToS3Task = "exportToS3" - case instanceId = "instanceId" - case tagSpecifications = "TagSpecification" - case targetEnvironment = "targetEnvironment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let exportToS3TaskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportToS3TaskSpecification.self, forKey: .exportToS3Task) - exportToS3Task = exportToS3TaskDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let targetEnvironmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportEnvironment.self, forKey: .targetEnvironment) - targetEnvironment = targetEnvironmentDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} +extension CreateInstanceExportTaskOutput { -extension CreateInstanceExportTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateInstanceExportTaskOutputBody = try responseDecoder.decode(responseBody: data) - self.exportTask = output.exportTask - } else { - self.exportTask = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateInstanceExportTaskOutput() + value.exportTask = try reader["exportTask"].readIfPresent(readingClosure: EC2ClientTypes.ExportTask.readingClosure) + return value } } } @@ -23028,27 +17272,18 @@ public struct CreateInstanceExportTaskOutput: Swift.Equatable { } } -struct CreateInstanceExportTaskOutputBody: Swift.Equatable { - let exportTask: EC2ClientTypes.ExportTask? -} - -extension CreateInstanceExportTaskOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportTask = "exportTask" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exportTaskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportTask.self, forKey: .exportTask) - exportTask = exportTaskDecoded - } -} +enum CreateInstanceExportTaskOutputError { -enum CreateInstanceExportTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -23099,51 +17334,15 @@ public struct CreateInternetGatewayInput: Swift.Equatable { } } -struct CreateInternetGatewayInputBody: Swift.Equatable { - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateInternetGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateInternetGatewayOutput { -extension CreateInternetGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateInternetGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.internetGateway = output.internetGateway - } else { - self.internetGateway = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateInternetGatewayOutput() + value.internetGateway = try reader["internetGateway"].readIfPresent(readingClosure: EC2ClientTypes.InternetGateway.readingClosure) + return value } } } @@ -23160,27 +17359,18 @@ public struct CreateInternetGatewayOutput: Swift.Equatable { } } -struct CreateInternetGatewayOutputBody: Swift.Equatable { - let internetGateway: EC2ClientTypes.InternetGateway? -} +enum CreateInternetGatewayOutputError { -extension CreateInternetGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case internetGateway = "internetGateway" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let internetGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InternetGateway.self, forKey: .internetGateway) - internetGateway = internetGatewayDecoded - } -} - -enum CreateInternetGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -23268,84 +17458,15 @@ public struct CreateIpamInput: Swift.Equatable { } } -struct CreateIpamInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let description: Swift.String? - let operatingRegions: [EC2ClientTypes.AddIpamOperatingRegion]? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? - let tier: EC2ClientTypes.IpamTier? -} - -extension CreateIpamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case operatingRegions = "OperatingRegion" - case tagSpecifications = "TagSpecification" - case tier = "Tier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.operatingRegions) { - struct KeyVal0{struct member{}} - let operatingRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .operatingRegions) - if let operatingRegionsWrappedContainer = operatingRegionsWrappedContainer { - let operatingRegionsContainer = try operatingRegionsWrappedContainer.decodeIfPresent([EC2ClientTypes.AddIpamOperatingRegion].self, forKey: .member) - var operatingRegionsBuffer:[EC2ClientTypes.AddIpamOperatingRegion]? = nil - if let operatingRegionsContainer = operatingRegionsContainer { - operatingRegionsBuffer = [EC2ClientTypes.AddIpamOperatingRegion]() - for structureContainer0 in operatingRegionsContainer { - operatingRegionsBuffer?.append(structureContainer0) - } - } - operatingRegions = operatingRegionsBuffer - } else { - operatingRegions = [] - } - } else { - operatingRegions = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let tierDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamTier.self, forKey: .tier) - tier = tierDecoded - } -} - -extension CreateIpamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateIpamOutputBody = try responseDecoder.decode(responseBody: data) - self.ipam = output.ipam - } else { - self.ipam = nil +extension CreateIpamOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateIpamOutput() + value.ipam = try reader["ipam"].readIfPresent(readingClosure: EC2ClientTypes.Ipam.readingClosure) + return value } } } @@ -23362,27 +17483,18 @@ public struct CreateIpamOutput: Swift.Equatable { } } -struct CreateIpamOutputBody: Swift.Equatable { - let ipam: EC2ClientTypes.Ipam? -} - -extension CreateIpamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipam = "ipam" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ipam.self, forKey: .ipam) - ipam = ipamDecoded - } -} +enum CreateIpamOutputError { -enum CreateIpamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -23549,128 +17661,15 @@ public struct CreateIpamPoolInput: Swift.Equatable { } } -struct CreateIpamPoolInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamScopeId: Swift.String? - let locale: Swift.String? - let sourceIpamPoolId: Swift.String? - let description: Swift.String? - let addressFamily: EC2ClientTypes.AddressFamily? - let autoImport: Swift.Bool? - let publiclyAdvertisable: Swift.Bool? - let allocationMinNetmaskLength: Swift.Int? - let allocationMaxNetmaskLength: Swift.Int? - let allocationDefaultNetmaskLength: Swift.Int? - let allocationResourceTags: [EC2ClientTypes.RequestIpamResourceTag]? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? - let awsService: EC2ClientTypes.IpamPoolAwsService? - let publicIpSource: EC2ClientTypes.IpamPoolPublicIpSource? - let sourceResource: EC2ClientTypes.IpamPoolSourceResourceRequest? -} - -extension CreateIpamPoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressFamily = "AddressFamily" - case allocationDefaultNetmaskLength = "AllocationDefaultNetmaskLength" - case allocationMaxNetmaskLength = "AllocationMaxNetmaskLength" - case allocationMinNetmaskLength = "AllocationMinNetmaskLength" - case allocationResourceTags = "AllocationResourceTag" - case autoImport = "AutoImport" - case awsService = "AwsService" - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case ipamScopeId = "IpamScopeId" - case locale = "Locale" - case publicIpSource = "PublicIpSource" - case publiclyAdvertisable = "PubliclyAdvertisable" - case sourceIpamPoolId = "SourceIpamPoolId" - case sourceResource = "SourceResource" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeId) - ipamScopeId = ipamScopeIdDecoded - let localeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locale) - locale = localeDecoded - let sourceIpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIpamPoolId) - sourceIpamPoolId = sourceIpamPoolIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let addressFamilyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressFamily.self, forKey: .addressFamily) - addressFamily = addressFamilyDecoded - let autoImportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoImport) - autoImport = autoImportDecoded - let publiclyAdvertisableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAdvertisable) - publiclyAdvertisable = publiclyAdvertisableDecoded - let allocationMinNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationMinNetmaskLength) - allocationMinNetmaskLength = allocationMinNetmaskLengthDecoded - let allocationMaxNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationMaxNetmaskLength) - allocationMaxNetmaskLength = allocationMaxNetmaskLengthDecoded - let allocationDefaultNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationDefaultNetmaskLength) - allocationDefaultNetmaskLength = allocationDefaultNetmaskLengthDecoded - if containerValues.contains(.allocationResourceTags) { - struct KeyVal0{struct item{}} - let allocationResourceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allocationResourceTags) - if let allocationResourceTagsWrappedContainer = allocationResourceTagsWrappedContainer { - let allocationResourceTagsContainer = try allocationResourceTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.RequestIpamResourceTag].self, forKey: .member) - var allocationResourceTagsBuffer:[EC2ClientTypes.RequestIpamResourceTag]? = nil - if let allocationResourceTagsContainer = allocationResourceTagsContainer { - allocationResourceTagsBuffer = [EC2ClientTypes.RequestIpamResourceTag]() - for structureContainer0 in allocationResourceTagsContainer { - allocationResourceTagsBuffer?.append(structureContainer0) - } - } - allocationResourceTags = allocationResourceTagsBuffer - } else { - allocationResourceTags = [] - } - } else { - allocationResourceTags = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let awsServiceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolAwsService.self, forKey: .awsService) - awsService = awsServiceDecoded - let publicIpSourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolPublicIpSource.self, forKey: .publicIpSource) - publicIpSource = publicIpSourceDecoded - let sourceResourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolSourceResourceRequest.self, forKey: .sourceResource) - sourceResource = sourceResourceDecoded - } -} - -extension CreateIpamPoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateIpamPoolOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPool = output.ipamPool - } else { - self.ipamPool = nil +extension CreateIpamPoolOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateIpamPoolOutput() + value.ipamPool = try reader["ipamPool"].readIfPresent(readingClosure: EC2ClientTypes.IpamPool.readingClosure) + return value } } } @@ -23687,27 +17686,18 @@ public struct CreateIpamPoolOutput: Swift.Equatable { } } -struct CreateIpamPoolOutputBody: Swift.Equatable { - let ipamPool: EC2ClientTypes.IpamPool? -} - -extension CreateIpamPoolOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPool = "ipamPool" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamPoolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPool.self, forKey: .ipamPool) - ipamPool = ipamPoolDecoded - } -} +enum CreateIpamPoolOutputError { -enum CreateIpamPoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -23788,80 +17778,15 @@ public struct CreateIpamResourceDiscoveryInput: Swift.Equatable { } } -struct CreateIpamResourceDiscoveryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let description: Swift.String? - let operatingRegions: [EC2ClientTypes.AddIpamOperatingRegion]? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? -} - -extension CreateIpamResourceDiscoveryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case operatingRegions = "OperatingRegion" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.operatingRegions) { - struct KeyVal0{struct member{}} - let operatingRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .operatingRegions) - if let operatingRegionsWrappedContainer = operatingRegionsWrappedContainer { - let operatingRegionsContainer = try operatingRegionsWrappedContainer.decodeIfPresent([EC2ClientTypes.AddIpamOperatingRegion].self, forKey: .member) - var operatingRegionsBuffer:[EC2ClientTypes.AddIpamOperatingRegion]? = nil - if let operatingRegionsContainer = operatingRegionsContainer { - operatingRegionsBuffer = [EC2ClientTypes.AddIpamOperatingRegion]() - for structureContainer0 in operatingRegionsContainer { - operatingRegionsBuffer?.append(structureContainer0) - } - } - operatingRegions = operatingRegionsBuffer - } else { - operatingRegions = [] - } - } else { - operatingRegions = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +extension CreateIpamResourceDiscoveryOutput { -extension CreateIpamResourceDiscoveryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateIpamResourceDiscoveryOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceDiscovery = output.ipamResourceDiscovery - } else { - self.ipamResourceDiscovery = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateIpamResourceDiscoveryOutput() + value.ipamResourceDiscovery = try reader["ipamResourceDiscovery"].readIfPresent(readingClosure: EC2ClientTypes.IpamResourceDiscovery.readingClosure) + return value } } } @@ -23878,27 +17803,18 @@ public struct CreateIpamResourceDiscoveryOutput: Swift.Equatable { } } -struct CreateIpamResourceDiscoveryOutputBody: Swift.Equatable { - let ipamResourceDiscovery: EC2ClientTypes.IpamResourceDiscovery? -} - -extension CreateIpamResourceDiscoveryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceDiscovery = "ipamResourceDiscovery" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamResourceDiscoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceDiscovery.self, forKey: .ipamResourceDiscovery) - ipamResourceDiscovery = ipamResourceDiscoveryDecoded - } -} +enum CreateIpamResourceDiscoveryOutputError { -enum CreateIpamResourceDiscoveryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -23971,63 +17887,15 @@ public struct CreateIpamScopeInput: Swift.Equatable { } } -struct CreateIpamScopeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamId: Swift.String? - let description: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? -} - -extension CreateIpamScopeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case ipamId = "IpamId" - case tagSpecifications = "TagSpecification" - } +extension CreateIpamScopeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension CreateIpamScopeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateIpamScopeOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamScope = output.ipamScope - } else { - self.ipamScope = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateIpamScopeOutput() + value.ipamScope = try reader["ipamScope"].readIfPresent(readingClosure: EC2ClientTypes.IpamScope.readingClosure) + return value } } } @@ -24044,27 +17912,18 @@ public struct CreateIpamScopeOutput: Swift.Equatable { } } -struct CreateIpamScopeOutputBody: Swift.Equatable { - let ipamScope: EC2ClientTypes.IpamScope? -} - -extension CreateIpamScopeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamScope = "ipamScope" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamScopeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamScope.self, forKey: .ipamScope) - ipamScope = ipamScopeDecoded - } -} +enum CreateIpamScopeOutputError { -enum CreateIpamScopeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -24137,76 +17996,24 @@ public struct CreateKeyPairInput: Swift.Equatable { } } -struct CreateKeyPairInputBody: Swift.Equatable { - let keyName: Swift.String? - let dryRun: Swift.Bool? - let keyType: EC2ClientTypes.KeyType? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let keyFormat: EC2ClientTypes.KeyFormat? -} - -extension CreateKeyPairInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case keyFormat = "KeyFormat" - case keyName = "KeyName" - case keyType = "KeyType" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let keyTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.KeyType.self, forKey: .keyType) - keyType = keyTypeDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let keyFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.KeyFormat.self, forKey: .keyFormat) - keyFormat = keyFormatDecoded - } -} - extension CreateKeyPairOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { "CreateKeyPairOutput(keyFingerprint: \(Swift.String(describing: keyFingerprint)), keyName: \(Swift.String(describing: keyName)), keyPairId: \(Swift.String(describing: keyPairId)), tags: \(Swift.String(describing: tags)), keyMaterial: \"CONTENT_REDACTED\")"} } -extension CreateKeyPairOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateKeyPairOutputBody = try responseDecoder.decode(responseBody: data) - self.keyFingerprint = output.keyFingerprint - self.keyMaterial = output.keyMaterial - self.keyName = output.keyName - self.keyPairId = output.keyPairId - self.tags = output.tags - } else { - self.keyFingerprint = nil - self.keyMaterial = nil - self.keyName = nil - self.keyPairId = nil - self.tags = nil +extension CreateKeyPairOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateKeyPairOutput() + value.keyFingerprint = try reader["keyFingerprint"].readIfPresent() + value.keyMaterial = try reader["keyMaterial"].readIfPresent() + value.keyName = try reader["keyName"].readIfPresent() + value.keyPairId = try reader["keyPairId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -24242,60 +18049,18 @@ public struct CreateKeyPairOutput: Swift.Equatable { } } -struct CreateKeyPairOutputBody: Swift.Equatable { - let keyFingerprint: Swift.String? - let keyMaterial: Swift.String? - let keyName: Swift.String? - let keyPairId: Swift.String? - let tags: [EC2ClientTypes.Tag]? -} +enum CreateKeyPairOutputError { -extension CreateKeyPairOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyFingerprint = "keyFingerprint" - case keyMaterial = "keyMaterial" - case keyName = "keyName" - case keyPairId = "keyPairId" - case tags = "tagSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyFingerprintDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyFingerprint) - keyFingerprint = keyFingerprintDecoded - let keyMaterialDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyMaterial) - keyMaterial = keyMaterialDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let keyPairIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyPairId) - keyPairId = keyPairIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - tags = nil - } - } -} - -enum CreateKeyPairOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -24376,69 +18141,16 @@ public struct CreateLaunchTemplateInput: Swift.Equatable { } } -struct CreateLaunchTemplateInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let launchTemplateName: Swift.String? - let versionDescription: Swift.String? - let launchTemplateData: EC2ClientTypes.RequestLaunchTemplateData? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateLaunchTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case launchTemplateData = "LaunchTemplateData" - case launchTemplateName = "LaunchTemplateName" - case tagSpecifications = "TagSpecification" - case versionDescription = "VersionDescription" - } +extension CreateLaunchTemplateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionDescription) - versionDescription = versionDescriptionDecoded - let launchTemplateDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RequestLaunchTemplateData.self, forKey: .launchTemplateData) - launchTemplateData = launchTemplateDataDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension CreateLaunchTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLaunchTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.launchTemplate = output.launchTemplate - self.warning = output.warning - } else { - self.launchTemplate = nil - self.warning = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateLaunchTemplateOutput() + value.launchTemplate = try reader["launchTemplate"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplate.readingClosure) + value.warning = try reader["warning"].readIfPresent(readingClosure: EC2ClientTypes.ValidationWarning.readingClosure) + return value } } } @@ -24459,31 +18171,18 @@ public struct CreateLaunchTemplateOutput: Swift.Equatable { } } -struct CreateLaunchTemplateOutputBody: Swift.Equatable { - let launchTemplate: EC2ClientTypes.LaunchTemplate? - let warning: EC2ClientTypes.ValidationWarning? -} - -extension CreateLaunchTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplate = "launchTemplate" - case warning = "warning" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplate.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let warningDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ValidationWarning.self, forKey: .warning) - warning = warningDecoded - } -} +enum CreateLaunchTemplateOutputError { -enum CreateLaunchTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -24568,60 +18267,16 @@ public struct CreateLaunchTemplateVersionInput: Swift.Equatable { } } -struct CreateLaunchTemplateVersionInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let launchTemplateId: Swift.String? - let launchTemplateName: Swift.String? - let sourceVersion: Swift.String? - let versionDescription: Swift.String? - let launchTemplateData: EC2ClientTypes.RequestLaunchTemplateData? - let resolveAlias: Swift.Bool? -} - -extension CreateLaunchTemplateVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case launchTemplateData = "LaunchTemplateData" - case launchTemplateId = "LaunchTemplateId" - case launchTemplateName = "LaunchTemplateName" - case resolveAlias = "ResolveAlias" - case sourceVersion = "SourceVersion" - case versionDescription = "VersionDescription" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let sourceVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceVersion) - sourceVersion = sourceVersionDecoded - let versionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionDescription) - versionDescription = versionDescriptionDecoded - let launchTemplateDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RequestLaunchTemplateData.self, forKey: .launchTemplateData) - launchTemplateData = launchTemplateDataDecoded - let resolveAliasDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resolveAlias) - resolveAlias = resolveAliasDecoded - } -} - -extension CreateLaunchTemplateVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLaunchTemplateVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.launchTemplateVersion = output.launchTemplateVersion - self.warning = output.warning - } else { - self.launchTemplateVersion = nil - self.warning = nil +extension CreateLaunchTemplateVersionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateLaunchTemplateVersionOutput() + value.launchTemplateVersion = try reader["launchTemplateVersion"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateVersion.readingClosure) + value.warning = try reader["warning"].readIfPresent(readingClosure: EC2ClientTypes.ValidationWarning.readingClosure) + return value } } } @@ -24642,31 +18297,18 @@ public struct CreateLaunchTemplateVersionOutput: Swift.Equatable { } } -struct CreateLaunchTemplateVersionOutputBody: Swift.Equatable { - let launchTemplateVersion: EC2ClientTypes.LaunchTemplateVersion? - let warning: EC2ClientTypes.ValidationWarning? -} - -extension CreateLaunchTemplateVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateVersion = "launchTemplateVersion" - case warning = "warning" - } +enum CreateLaunchTemplateVersionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateVersionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateVersion.self, forKey: .launchTemplateVersion) - launchTemplateVersion = launchTemplateVersionDecoded - let warningDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ValidationWarning.self, forKey: .warning) - warning = warningDecoded - } -} - -enum CreateLaunchTemplateVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -24737,50 +18379,15 @@ public struct CreateLocalGatewayRouteInput: Swift.Equatable { } } -struct CreateLocalGatewayRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let localGatewayRouteTableId: Swift.String? - let localGatewayVirtualInterfaceGroupId: Swift.String? - let dryRun: Swift.Bool? - let networkInterfaceId: Swift.String? - let destinationPrefixListId: Swift.String? -} - -extension CreateLocalGatewayRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "DestinationCidrBlock" - case destinationPrefixListId = "DestinationPrefixListId" - case dryRun = "DryRun" - case localGatewayRouteTableId = "LocalGatewayRouteTableId" - case localGatewayVirtualInterfaceGroupId = "LocalGatewayVirtualInterfaceGroupId" - case networkInterfaceId = "NetworkInterfaceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let localGatewayVirtualInterfaceGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayVirtualInterfaceGroupId) - localGatewayVirtualInterfaceGroupId = localGatewayVirtualInterfaceGroupIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded - } -} +extension CreateLocalGatewayRouteOutput { -extension CreateLocalGatewayRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLocalGatewayRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.route = output.route - } else { - self.route = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateLocalGatewayRouteOutput() + value.route = try reader["route"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRoute.readingClosure) + return value } } } @@ -24797,27 +18404,18 @@ public struct CreateLocalGatewayRouteOutput: Swift.Equatable { } } -struct CreateLocalGatewayRouteOutputBody: Swift.Equatable { - let route: EC2ClientTypes.LocalGatewayRoute? -} - -extension CreateLocalGatewayRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case route = "route" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let routeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRoute.self, forKey: .route) - route = routeDecoded - } -} +enum CreateLocalGatewayRouteOutputError { -enum CreateLocalGatewayRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -24883,59 +18481,15 @@ public struct CreateLocalGatewayRouteTableInput: Swift.Equatable { } } -struct CreateLocalGatewayRouteTableInputBody: Swift.Equatable { - let localGatewayId: Swift.String? - let mode: EC2ClientTypes.LocalGatewayRouteTableMode? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateLocalGatewayRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case localGatewayId = "LocalGatewayId" - case mode = "Mode" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let modeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteTableMode.self, forKey: .mode) - mode = modeDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateLocalGatewayRouteTableOutput { -extension CreateLocalGatewayRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLocalGatewayRouteTableOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTable = output.localGatewayRouteTable - } else { - self.localGatewayRouteTable = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateLocalGatewayRouteTableOutput() + value.localGatewayRouteTable = try reader["localGatewayRouteTable"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRouteTable.readingClosure) + return value } } } @@ -24952,27 +18506,18 @@ public struct CreateLocalGatewayRouteTableOutput: Swift.Equatable { } } -struct CreateLocalGatewayRouteTableOutputBody: Swift.Equatable { - let localGatewayRouteTable: EC2ClientTypes.LocalGatewayRouteTable? -} - -extension CreateLocalGatewayRouteTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTable = "localGatewayRouteTable" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteTable.self, forKey: .localGatewayRouteTable) - localGatewayRouteTable = localGatewayRouteTableDecoded - } -} +enum CreateLocalGatewayRouteTableOutputError { -enum CreateLocalGatewayRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -25039,59 +18584,15 @@ public struct CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput: } } -struct CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInputBody: Swift.Equatable { - let localGatewayRouteTableId: Swift.String? - let localGatewayVirtualInterfaceGroupId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case localGatewayRouteTableId = "LocalGatewayRouteTableId" - case localGatewayVirtualInterfaceGroupId = "LocalGatewayVirtualInterfaceGroupId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let localGatewayVirtualInterfaceGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayVirtualInterfaceGroupId) - localGatewayVirtualInterfaceGroupId = localGatewayVirtualInterfaceGroupIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput { -extension CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTableVirtualInterfaceGroupAssociation = output.localGatewayRouteTableVirtualInterfaceGroupAssociation - } else { - self.localGatewayRouteTableVirtualInterfaceGroupAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput() + value.localGatewayRouteTableVirtualInterfaceGroupAssociation = try reader["localGatewayRouteTableVirtualInterfaceGroupAssociation"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation.readingClosure) + return value } } } @@ -25108,27 +18609,18 @@ public struct CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput } } -struct CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputBody: Swift.Equatable { - let localGatewayRouteTableVirtualInterfaceGroupAssociation: EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation? -} - -extension CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTableVirtualInterfaceGroupAssociation = "localGatewayRouteTableVirtualInterfaceGroupAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableVirtualInterfaceGroupAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation.self, forKey: .localGatewayRouteTableVirtualInterfaceGroupAssociation) - localGatewayRouteTableVirtualInterfaceGroupAssociation = localGatewayRouteTableVirtualInterfaceGroupAssociationDecoded - } -} +enum CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputError { -enum CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -25195,59 +18687,15 @@ public struct CreateLocalGatewayRouteTableVpcAssociationInput: Swift.Equatable { } } -struct CreateLocalGatewayRouteTableVpcAssociationInputBody: Swift.Equatable { - let localGatewayRouteTableId: Swift.String? - let vpcId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateLocalGatewayRouteTableVpcAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case localGatewayRouteTableId = "LocalGatewayRouteTableId" - case tagSpecifications = "TagSpecification" - case vpcId = "VpcId" - } +extension CreateLocalGatewayRouteTableVpcAssociationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateLocalGatewayRouteTableVpcAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLocalGatewayRouteTableVpcAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTableVpcAssociation = output.localGatewayRouteTableVpcAssociation - } else { - self.localGatewayRouteTableVpcAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateLocalGatewayRouteTableVpcAssociationOutput() + value.localGatewayRouteTableVpcAssociation = try reader["localGatewayRouteTableVpcAssociation"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRouteTableVpcAssociation.readingClosure) + return value } } } @@ -25264,27 +18712,18 @@ public struct CreateLocalGatewayRouteTableVpcAssociationOutput: Swift.Equatable } } -struct CreateLocalGatewayRouteTableVpcAssociationOutputBody: Swift.Equatable { - let localGatewayRouteTableVpcAssociation: EC2ClientTypes.LocalGatewayRouteTableVpcAssociation? -} +enum CreateLocalGatewayRouteTableVpcAssociationOutputError { -extension CreateLocalGatewayRouteTableVpcAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTableVpcAssociation = "localGatewayRouteTableVpcAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableVpcAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteTableVpcAssociation.self, forKey: .localGatewayRouteTableVpcAssociation) - localGatewayRouteTableVpcAssociation = localGatewayRouteTableVpcAssociationDecoded - } -} - -enum CreateLocalGatewayRouteTableVpcAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -25382,88 +18821,15 @@ public struct CreateManagedPrefixListInput: Swift.Equatable { } } -struct CreateManagedPrefixListInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let prefixListName: Swift.String? - let entries: [EC2ClientTypes.AddPrefixListEntry]? - let maxEntries: Swift.Int? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let addressFamily: Swift.String? - let clientToken: Swift.String? -} - -extension CreateManagedPrefixListInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressFamily = "AddressFamily" - case clientToken = "ClientToken" - case dryRun = "DryRun" - case entries = "Entry" - case maxEntries = "MaxEntries" - case prefixListName = "PrefixListName" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let prefixListNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListName) - prefixListName = prefixListNameDecoded - if containerValues.contains(.entries) { - struct KeyVal0{struct member{}} - let entriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .entries) - if let entriesWrappedContainer = entriesWrappedContainer { - let entriesContainer = try entriesWrappedContainer.decodeIfPresent([EC2ClientTypes.AddPrefixListEntry].self, forKey: .member) - var entriesBuffer:[EC2ClientTypes.AddPrefixListEntry]? = nil - if let entriesContainer = entriesContainer { - entriesBuffer = [EC2ClientTypes.AddPrefixListEntry]() - for structureContainer0 in entriesContainer { - entriesBuffer?.append(structureContainer0) - } - } - entries = entriesBuffer - } else { - entries = [] - } - } else { - entries = nil - } - let maxEntriesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxEntries) - maxEntries = maxEntriesDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let addressFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressFamily) - addressFamily = addressFamilyDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension CreateManagedPrefixListOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateManagedPrefixListOutputBody = try responseDecoder.decode(responseBody: data) - self.prefixList = output.prefixList - } else { - self.prefixList = nil +extension CreateManagedPrefixListOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateManagedPrefixListOutput() + value.prefixList = try reader["prefixList"].readIfPresent(readingClosure: EC2ClientTypes.ManagedPrefixList.readingClosure) + return value } } } @@ -25480,27 +18846,18 @@ public struct CreateManagedPrefixListOutput: Swift.Equatable { } } -struct CreateManagedPrefixListOutputBody: Swift.Equatable { - let prefixList: EC2ClientTypes.ManagedPrefixList? -} +enum CreateManagedPrefixListOutputError { -extension CreateManagedPrefixListOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case prefixList = "prefixList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixListDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ManagedPrefixList.self, forKey: .prefixList) - prefixList = prefixListDecoded - } -} - -enum CreateManagedPrefixListOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -25626,119 +18983,16 @@ public struct CreateNatGatewayInput: Swift.Equatable { } } -struct CreateNatGatewayInputBody: Swift.Equatable { - let allocationId: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let subnetId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let connectivityType: EC2ClientTypes.ConnectivityType? - let privateIpAddress: Swift.String? - let secondaryAllocationIds: [Swift.String]? - let secondaryPrivateIpAddresses: [Swift.String]? - let secondaryPrivateIpAddressCount: Swift.Int? -} - -extension CreateNatGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "AllocationId" - case clientToken = "ClientToken" - case connectivityType = "ConnectivityType" - case dryRun = "DryRun" - case privateIpAddress = "PrivateIpAddress" - case secondaryAllocationIds = "SecondaryAllocationId" - case secondaryPrivateIpAddressCount = "SecondaryPrivateIpAddressCount" - case secondaryPrivateIpAddresses = "SecondaryPrivateIpAddress" - case subnetId = "SubnetId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let connectivityTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectivityType.self, forKey: .connectivityType) - connectivityType = connectivityTypeDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.secondaryAllocationIds) { - struct KeyVal0{struct AllocationId{}} - let secondaryAllocationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .secondaryAllocationIds) - if let secondaryAllocationIdsWrappedContainer = secondaryAllocationIdsWrappedContainer { - let secondaryAllocationIdsContainer = try secondaryAllocationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var secondaryAllocationIdsBuffer:[Swift.String]? = nil - if let secondaryAllocationIdsContainer = secondaryAllocationIdsContainer { - secondaryAllocationIdsBuffer = [Swift.String]() - for stringContainer0 in secondaryAllocationIdsContainer { - secondaryAllocationIdsBuffer?.append(stringContainer0) - } - } - secondaryAllocationIds = secondaryAllocationIdsBuffer - } else { - secondaryAllocationIds = [] - } - } else { - secondaryAllocationIds = nil - } - if containerValues.contains(.secondaryPrivateIpAddresses) { - struct KeyVal0{struct item{}} - let secondaryPrivateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .secondaryPrivateIpAddresses) - if let secondaryPrivateIpAddressesWrappedContainer = secondaryPrivateIpAddressesWrappedContainer { - let secondaryPrivateIpAddressesContainer = try secondaryPrivateIpAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var secondaryPrivateIpAddressesBuffer:[Swift.String]? = nil - if let secondaryPrivateIpAddressesContainer = secondaryPrivateIpAddressesContainer { - secondaryPrivateIpAddressesBuffer = [Swift.String]() - for stringContainer0 in secondaryPrivateIpAddressesContainer { - secondaryPrivateIpAddressesBuffer?.append(stringContainer0) - } - } - secondaryPrivateIpAddresses = secondaryPrivateIpAddressesBuffer - } else { - secondaryPrivateIpAddresses = [] - } - } else { - secondaryPrivateIpAddresses = nil - } - let secondaryPrivateIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondaryPrivateIpAddressCount) - secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCountDecoded - } -} - -extension CreateNatGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateNatGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.natGateway = output.natGateway - } else { - self.clientToken = nil - self.natGateway = nil +extension CreateNatGatewayOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateNatGatewayOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.natGateway = try reader["natGateway"].readIfPresent(readingClosure: EC2ClientTypes.NatGateway.readingClosure) + return value } } } @@ -25759,31 +19013,18 @@ public struct CreateNatGatewayOutput: Swift.Equatable { } } -struct CreateNatGatewayOutputBody: Swift.Equatable { - let clientToken: Swift.String? - let natGateway: EC2ClientTypes.NatGateway? -} +enum CreateNatGatewayOutputError { -extension CreateNatGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case natGateway = "natGateway" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let natGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NatGateway.self, forKey: .natGateway) - natGateway = natGatewayDecoded - } -} - -enum CreateNatGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -25886,60 +19127,12 @@ public struct CreateNetworkAclEntryInput: Swift.Equatable { } } -struct CreateNetworkAclEntryInputBody: Swift.Equatable { - let cidrBlock: Swift.String? - let dryRun: Swift.Bool? - let egress: Swift.Bool? - let icmpTypeCode: EC2ClientTypes.IcmpTypeCode? - let ipv6CidrBlock: Swift.String? - let networkAclId: Swift.String? - let portRange: EC2ClientTypes.PortRange? - let `protocol`: Swift.String? - let ruleAction: EC2ClientTypes.RuleAction? - let ruleNumber: Swift.Int? -} - -extension CreateNetworkAclEntryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlock = "cidrBlock" - case dryRun = "dryRun" - case egress = "egress" - case icmpTypeCode = "Icmp" - case ipv6CidrBlock = "ipv6CidrBlock" - case networkAclId = "networkAclId" - case portRange = "portRange" - case `protocol` = "protocol" - case ruleAction = "ruleAction" - case ruleNumber = "ruleNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let egressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .egress) - egress = egressDecoded - let icmpTypeCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IcmpTypeCode.self, forKey: .icmpTypeCode) - icmpTypeCode = icmpTypeCodeDecoded - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let networkAclIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkAclId) - networkAclId = networkAclIdDecoded - let portRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PortRange.self, forKey: .portRange) - portRange = portRangeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let ruleActionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RuleAction.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let ruleNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ruleNumber) - ruleNumber = ruleNumberDecoded - } -} - -extension CreateNetworkAclEntryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension CreateNetworkAclEntryOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateNetworkAclEntryOutput() + } } } @@ -25948,11 +19141,18 @@ public struct CreateNetworkAclEntryOutput: Swift.Equatable { public init() { } } -enum CreateNetworkAclEntryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum CreateNetworkAclEntryOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -26011,55 +19211,15 @@ public struct CreateNetworkAclInput: Swift.Equatable { } } -struct CreateNetworkAclInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateNetworkAclInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case tagSpecifications = "TagSpecification" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} +extension CreateNetworkAclOutput { -extension CreateNetworkAclOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateNetworkAclOutputBody = try responseDecoder.decode(responseBody: data) - self.networkAcl = output.networkAcl - } else { - self.networkAcl = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateNetworkAclOutput() + value.networkAcl = try reader["networkAcl"].readIfPresent(readingClosure: EC2ClientTypes.NetworkAcl.readingClosure) + return value } } } @@ -26076,27 +19236,18 @@ public struct CreateNetworkAclOutput: Swift.Equatable { } } -struct CreateNetworkAclOutputBody: Swift.Equatable { - let networkAcl: EC2ClientTypes.NetworkAcl? -} - -extension CreateNetworkAclOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkAcl = "networkAcl" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkAclDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkAcl.self, forKey: .networkAcl) - networkAcl = networkAclDecoded - } -} +enum CreateNetworkAclOutputError { -enum CreateNetworkAclOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -26187,99 +19338,16 @@ public struct CreateNetworkInsightsAccessScopeInput: Swift.Equatable { } } -struct CreateNetworkInsightsAccessScopeInputBody: Swift.Equatable { - let matchPaths: [EC2ClientTypes.AccessScopePathRequest]? - let excludePaths: [EC2ClientTypes.AccessScopePathRequest]? - let clientToken: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateNetworkInsightsAccessScopeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case excludePaths = "ExcludePath" - case matchPaths = "MatchPath" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.matchPaths) { - struct KeyVal0{struct item{}} - let matchPathsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchPaths) - if let matchPathsWrappedContainer = matchPathsWrappedContainer { - let matchPathsContainer = try matchPathsWrappedContainer.decodeIfPresent([EC2ClientTypes.AccessScopePathRequest].self, forKey: .member) - var matchPathsBuffer:[EC2ClientTypes.AccessScopePathRequest]? = nil - if let matchPathsContainer = matchPathsContainer { - matchPathsBuffer = [EC2ClientTypes.AccessScopePathRequest]() - for structureContainer0 in matchPathsContainer { - matchPathsBuffer?.append(structureContainer0) - } - } - matchPaths = matchPathsBuffer - } else { - matchPaths = [] - } - } else { - matchPaths = nil - } - if containerValues.contains(.excludePaths) { - struct KeyVal0{struct item{}} - let excludePathsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludePaths) - if let excludePathsWrappedContainer = excludePathsWrappedContainer { - let excludePathsContainer = try excludePathsWrappedContainer.decodeIfPresent([EC2ClientTypes.AccessScopePathRequest].self, forKey: .member) - var excludePathsBuffer:[EC2ClientTypes.AccessScopePathRequest]? = nil - if let excludePathsContainer = excludePathsContainer { - excludePathsBuffer = [EC2ClientTypes.AccessScopePathRequest]() - for structureContainer0 in excludePathsContainer { - excludePathsBuffer?.append(structureContainer0) - } - } - excludePaths = excludePathsBuffer - } else { - excludePaths = [] - } - } else { - excludePaths = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateNetworkInsightsAccessScopeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateNetworkInsightsAccessScopeOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAccessScope = output.networkInsightsAccessScope - self.networkInsightsAccessScopeContent = output.networkInsightsAccessScopeContent - } else { - self.networkInsightsAccessScope = nil - self.networkInsightsAccessScopeContent = nil +extension CreateNetworkInsightsAccessScopeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateNetworkInsightsAccessScopeOutput() + value.networkInsightsAccessScope = try reader["networkInsightsAccessScope"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInsightsAccessScope.readingClosure) + value.networkInsightsAccessScopeContent = try reader["networkInsightsAccessScopeContent"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInsightsAccessScopeContent.readingClosure) + return value } } } @@ -26300,31 +19368,18 @@ public struct CreateNetworkInsightsAccessScopeOutput: Swift.Equatable { } } -struct CreateNetworkInsightsAccessScopeOutputBody: Swift.Equatable { - let networkInsightsAccessScope: EC2ClientTypes.NetworkInsightsAccessScope? - let networkInsightsAccessScopeContent: EC2ClientTypes.NetworkInsightsAccessScopeContent? -} - -extension CreateNetworkInsightsAccessScopeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAccessScope = "networkInsightsAccessScope" - case networkInsightsAccessScopeContent = "networkInsightsAccessScopeContent" - } +enum CreateNetworkInsightsAccessScopeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInsightsAccessScope.self, forKey: .networkInsightsAccessScope) - networkInsightsAccessScope = networkInsightsAccessScopeDecoded - let networkInsightsAccessScopeContentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInsightsAccessScopeContent.self, forKey: .networkInsightsAccessScopeContent) - networkInsightsAccessScopeContent = networkInsightsAccessScopeContentDecoded - } -} - -enum CreateNetworkInsightsAccessScopeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -26441,87 +19496,15 @@ public struct CreateNetworkInsightsPathInput: Swift.Equatable { } } -struct CreateNetworkInsightsPathInputBody: Swift.Equatable { - let sourceIp: Swift.String? - let destinationIp: Swift.String? - let source: Swift.String? - let destination: Swift.String? - let `protocol`: EC2ClientTypes.ModelProtocol? - let destinationPort: Swift.Int? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let filterAtSource: EC2ClientTypes.PathRequestFilter? - let filterAtDestination: EC2ClientTypes.PathRequestFilter? -} - -extension CreateNetworkInsightsPathInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case destination = "Destination" - case destinationIp = "DestinationIp" - case destinationPort = "DestinationPort" - case dryRun = "DryRun" - case filterAtDestination = "FilterAtDestination" - case filterAtSource = "FilterAtSource" - case `protocol` = "Protocol" - case source = "Source" - case sourceIp = "SourceIp" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIp) - sourceIp = sourceIpDecoded - let destinationIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationIp) - destinationIp = destinationIpDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) - destination = destinationDecoded - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModelProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) - destinationPort = destinationPortDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let filterAtSourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PathRequestFilter.self, forKey: .filterAtSource) - filterAtSource = filterAtSourceDecoded - let filterAtDestinationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PathRequestFilter.self, forKey: .filterAtDestination) - filterAtDestination = filterAtDestinationDecoded - } -} - -extension CreateNetworkInsightsPathOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateNetworkInsightsPathOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsPath = output.networkInsightsPath - } else { - self.networkInsightsPath = nil +extension CreateNetworkInsightsPathOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateNetworkInsightsPathOutput() + value.networkInsightsPath = try reader["networkInsightsPath"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInsightsPath.readingClosure) + return value } } } @@ -26538,27 +19521,18 @@ public struct CreateNetworkInsightsPathOutput: Swift.Equatable { } } -struct CreateNetworkInsightsPathOutputBody: Swift.Equatable { - let networkInsightsPath: EC2ClientTypes.NetworkInsightsPath? -} - -extension CreateNetworkInsightsPathOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsPath = "networkInsightsPath" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsPathDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInsightsPath.self, forKey: .networkInsightsPath) - networkInsightsPath = networkInsightsPathDecoded - } -} +enum CreateNetworkInsightsPathOutputError { -enum CreateNetworkInsightsPathOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -26767,202 +19741,16 @@ public struct CreateNetworkInterfaceInput: Swift.Equatable { } } -struct CreateNetworkInterfaceInputBody: Swift.Equatable { - let description: Swift.String? - let dryRun: Swift.Bool? - let groups: [Swift.String]? - let ipv6AddressCount: Swift.Int? - let ipv6Addresses: [EC2ClientTypes.InstanceIpv6Address]? - let privateIpAddress: Swift.String? - let privateIpAddresses: [EC2ClientTypes.PrivateIpAddressSpecification]? - let secondaryPrivateIpAddressCount: Swift.Int? - let ipv4Prefixes: [EC2ClientTypes.Ipv4PrefixSpecificationRequest]? - let ipv4PrefixCount: Swift.Int? - let ipv6Prefixes: [EC2ClientTypes.Ipv6PrefixSpecificationRequest]? - let ipv6PrefixCount: Swift.Int? - let interfaceType: EC2ClientTypes.NetworkInterfaceCreationType? - let subnetId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? - let enablePrimaryIpv6: Swift.Bool? - let connectionTrackingSpecification: EC2ClientTypes.ConnectionTrackingSpecificationRequest? -} - -extension CreateNetworkInterfaceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case connectionTrackingSpecification = "ConnectionTrackingSpecification" - case description = "description" - case dryRun = "dryRun" - case enablePrimaryIpv6 = "EnablePrimaryIpv6" - case groups = "SecurityGroupId" - case interfaceType = "InterfaceType" - case ipv4PrefixCount = "Ipv4PrefixCount" - case ipv4Prefixes = "Ipv4Prefix" - case ipv6AddressCount = "ipv6AddressCount" - case ipv6Addresses = "ipv6Addresses" - case ipv6PrefixCount = "Ipv6PrefixCount" - case ipv6Prefixes = "Ipv6Prefix" - case privateIpAddress = "privateIpAddress" - case privateIpAddresses = "privateIpAddresses" - case secondaryPrivateIpAddressCount = "secondaryPrivateIpAddressCount" - case subnetId = "subnetId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct SecurityGroupId{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupsBuffer:[Swift.String]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [Swift.String]() - for stringContainer0 in groupsContainer { - groupsBuffer?.append(stringContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let ipv6AddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6AddressCount) - ipv6AddressCount = ipv6AddressCountDecoded - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct item{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceIpv6Address].self, forKey: .member) - var ipv6AddressesBuffer:[EC2ClientTypes.InstanceIpv6Address]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [EC2ClientTypes.InstanceIpv6Address]() - for structureContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(structureContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.PrivateIpAddressSpecification].self, forKey: .member) - var privateIpAddressesBuffer:[EC2ClientTypes.PrivateIpAddressSpecification]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [EC2ClientTypes.PrivateIpAddressSpecification]() - for structureContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(structureContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let secondaryPrivateIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondaryPrivateIpAddressCount) - secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCountDecoded - if containerValues.contains(.ipv4Prefixes) { - struct KeyVal0{struct item{}} - let ipv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv4Prefixes) - if let ipv4PrefixesWrappedContainer = ipv4PrefixesWrappedContainer { - let ipv4PrefixesContainer = try ipv4PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv4PrefixSpecificationRequest].self, forKey: .member) - var ipv4PrefixesBuffer:[EC2ClientTypes.Ipv4PrefixSpecificationRequest]? = nil - if let ipv4PrefixesContainer = ipv4PrefixesContainer { - ipv4PrefixesBuffer = [EC2ClientTypes.Ipv4PrefixSpecificationRequest]() - for structureContainer0 in ipv4PrefixesContainer { - ipv4PrefixesBuffer?.append(structureContainer0) - } - } - ipv4Prefixes = ipv4PrefixesBuffer - } else { - ipv4Prefixes = [] - } - } else { - ipv4Prefixes = nil - } - let ipv4PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4PrefixCount) - ipv4PrefixCount = ipv4PrefixCountDecoded - if containerValues.contains(.ipv6Prefixes) { - struct KeyVal0{struct item{}} - let ipv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Prefixes) - if let ipv6PrefixesWrappedContainer = ipv6PrefixesWrappedContainer { - let ipv6PrefixesContainer = try ipv6PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6PrefixSpecificationRequest].self, forKey: .member) - var ipv6PrefixesBuffer:[EC2ClientTypes.Ipv6PrefixSpecificationRequest]? = nil - if let ipv6PrefixesContainer = ipv6PrefixesContainer { - ipv6PrefixesBuffer = [EC2ClientTypes.Ipv6PrefixSpecificationRequest]() - for structureContainer0 in ipv6PrefixesContainer { - ipv6PrefixesBuffer?.append(structureContainer0) - } - } - ipv6Prefixes = ipv6PrefixesBuffer - } else { - ipv6Prefixes = [] - } - } else { - ipv6Prefixes = nil - } - let ipv6PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6PrefixCount) - ipv6PrefixCount = ipv6PrefixCountDecoded - let interfaceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceCreationType.self, forKey: .interfaceType) - interfaceType = interfaceTypeDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let enablePrimaryIpv6Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePrimaryIpv6) - enablePrimaryIpv6 = enablePrimaryIpv6Decoded - let connectionTrackingSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionTrackingSpecificationRequest.self, forKey: .connectionTrackingSpecification) - connectionTrackingSpecification = connectionTrackingSpecificationDecoded - } -} - -extension CreateNetworkInterfaceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateNetworkInterfaceOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.networkInterface = output.networkInterface - } else { - self.clientToken = nil - self.networkInterface = nil +extension CreateNetworkInterfaceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateNetworkInterfaceOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.networkInterface = try reader["networkInterface"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterface.readingClosure) + return value } } } @@ -26983,31 +19771,18 @@ public struct CreateNetworkInterfaceOutput: Swift.Equatable { } } -struct CreateNetworkInterfaceOutputBody: Swift.Equatable { - let networkInterface: EC2ClientTypes.NetworkInterface? - let clientToken: Swift.String? -} +enum CreateNetworkInterfaceOutputError { -extension CreateNetworkInterfaceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case networkInterface = "networkInterface" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterface.self, forKey: .networkInterface) - networkInterface = networkInterfaceDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -enum CreateNetworkInterfaceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -27073,46 +19848,15 @@ public struct CreateNetworkInterfacePermissionInput: Swift.Equatable { } } -struct CreateNetworkInterfacePermissionInputBody: Swift.Equatable { - let networkInterfaceId: Swift.String? - let awsAccountId: Swift.String? - let awsService: Swift.String? - let permission: EC2ClientTypes.InterfacePermissionType? - let dryRun: Swift.Bool? -} +extension CreateNetworkInterfacePermissionOutput { -extension CreateNetworkInterfacePermissionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case awsAccountId = "AwsAccountId" - case awsService = "AwsService" - case dryRun = "DryRun" - case networkInterfaceId = "NetworkInterfaceId" - case permission = "Permission" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let awsAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsAccountId) - awsAccountId = awsAccountIdDecoded - let awsServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsService) - awsService = awsServiceDecoded - let permissionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InterfacePermissionType.self, forKey: .permission) - permission = permissionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateNetworkInterfacePermissionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateNetworkInterfacePermissionOutputBody = try responseDecoder.decode(responseBody: data) - self.interfacePermission = output.interfacePermission - } else { - self.interfacePermission = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateNetworkInterfacePermissionOutput() + value.interfacePermission = try reader["interfacePermission"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterfacePermission.readingClosure) + return value } } } @@ -27130,27 +19874,18 @@ public struct CreateNetworkInterfacePermissionOutput: Swift.Equatable { } } -struct CreateNetworkInterfacePermissionOutputBody: Swift.Equatable { - let interfacePermission: EC2ClientTypes.NetworkInterfacePermission? -} - -extension CreateNetworkInterfacePermissionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case interfacePermission = "interfacePermission" - } +enum CreateNetworkInterfacePermissionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let interfacePermissionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfacePermission.self, forKey: .interfacePermission) - interfacePermission = interfacePermissionDecoded - } -} - -enum CreateNetworkInterfacePermissionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -27233,67 +19968,15 @@ public struct CreatePlacementGroupInput: Swift.Equatable { } } -struct CreatePlacementGroupInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let groupName: Swift.String? - let strategy: EC2ClientTypes.PlacementStrategy? - let partitionCount: Swift.Int? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let spreadLevel: EC2ClientTypes.SpreadLevel? -} +extension CreatePlacementGroupOutput { -extension CreatePlacementGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case groupName = "groupName" - case partitionCount = "PartitionCount" - case spreadLevel = "SpreadLevel" - case strategy = "strategy" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let strategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlacementStrategy.self, forKey: .strategy) - strategy = strategyDecoded - let partitionCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partitionCount) - partitionCount = partitionCountDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let spreadLevelDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpreadLevel.self, forKey: .spreadLevel) - spreadLevel = spreadLevelDecoded - } -} - -extension CreatePlacementGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreatePlacementGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.placementGroup = output.placementGroup - } else { - self.placementGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreatePlacementGroupOutput() + value.placementGroup = try reader["placementGroup"].readIfPresent(readingClosure: EC2ClientTypes.PlacementGroup.readingClosure) + return value } } } @@ -27310,27 +19993,18 @@ public struct CreatePlacementGroupOutput: Swift.Equatable { } } -struct CreatePlacementGroupOutputBody: Swift.Equatable { - let placementGroup: EC2ClientTypes.PlacementGroup? -} - -extension CreatePlacementGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case placementGroup = "placementGroup" - } +enum CreatePlacementGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let placementGroupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlacementGroup.self, forKey: .placementGroup) - placementGroup = placementGroupDecoded - } -} - -enum CreatePlacementGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -27381,51 +20055,15 @@ public struct CreatePublicIpv4PoolInput: Swift.Equatable { } } -struct CreatePublicIpv4PoolInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreatePublicIpv4PoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} +extension CreatePublicIpv4PoolOutput { -extension CreatePublicIpv4PoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreatePublicIpv4PoolOutputBody = try responseDecoder.decode(responseBody: data) - self.poolId = output.poolId - } else { - self.poolId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreatePublicIpv4PoolOutput() + value.poolId = try reader["poolId"].readIfPresent() + return value } } } @@ -27442,27 +20080,18 @@ public struct CreatePublicIpv4PoolOutput: Swift.Equatable { } } -struct CreatePublicIpv4PoolOutputBody: Swift.Equatable { - let poolId: Swift.String? -} - -extension CreatePublicIpv4PoolOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case poolId = "poolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - } -} +enum CreatePublicIpv4PoolOutputError { -enum CreatePublicIpv4PoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -27549,71 +20178,15 @@ public struct CreateReplaceRootVolumeTaskInput: Swift.Equatable { } } -struct CreateReplaceRootVolumeTaskInputBody: Swift.Equatable { - let instanceId: Swift.String? - let snapshotId: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let imageId: Swift.String? - let deleteReplacedRootVolume: Swift.Bool? -} - -extension CreateReplaceRootVolumeTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case deleteReplacedRootVolume = "DeleteReplacedRootVolume" - case dryRun = "DryRun" - case imageId = "ImageId" - case instanceId = "InstanceId" - case snapshotId = "SnapshotId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let deleteReplacedRootVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteReplacedRootVolume) - deleteReplacedRootVolume = deleteReplacedRootVolumeDecoded - } -} - -extension CreateReplaceRootVolumeTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateReplaceRootVolumeTaskOutputBody = try responseDecoder.decode(responseBody: data) - self.replaceRootVolumeTask = output.replaceRootVolumeTask - } else { - self.replaceRootVolumeTask = nil +extension CreateReplaceRootVolumeTaskOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateReplaceRootVolumeTaskOutput() + value.replaceRootVolumeTask = try reader["replaceRootVolumeTask"].readIfPresent(readingClosure: EC2ClientTypes.ReplaceRootVolumeTask.readingClosure) + return value } } } @@ -27630,27 +20203,18 @@ public struct CreateReplaceRootVolumeTaskOutput: Swift.Equatable { } } -struct CreateReplaceRootVolumeTaskOutputBody: Swift.Equatable { - let replaceRootVolumeTask: EC2ClientTypes.ReplaceRootVolumeTask? -} +enum CreateReplaceRootVolumeTaskOutputError { -extension CreateReplaceRootVolumeTaskOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replaceRootVolumeTask = "replaceRootVolumeTask" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replaceRootVolumeTaskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReplaceRootVolumeTask.self, forKey: .replaceRootVolumeTask) - replaceRootVolumeTask = replaceRootVolumeTaskDecoded - } -} - -enum CreateReplaceRootVolumeTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -27720,59 +20284,15 @@ public struct CreateReservedInstancesListingInput: Swift.Equatable { } } -struct CreateReservedInstancesListingInputBody: Swift.Equatable { - let clientToken: Swift.String? - let instanceCount: Swift.Int? - let priceSchedules: [EC2ClientTypes.PriceScheduleSpecification]? - let reservedInstancesId: Swift.String? -} - -extension CreateReservedInstancesListingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case instanceCount = "instanceCount" - case priceSchedules = "priceSchedules" - case reservedInstancesId = "reservedInstancesId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - if containerValues.contains(.priceSchedules) { - struct KeyVal0{struct item{}} - let priceSchedulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .priceSchedules) - if let priceSchedulesWrappedContainer = priceSchedulesWrappedContainer { - let priceSchedulesContainer = try priceSchedulesWrappedContainer.decodeIfPresent([EC2ClientTypes.PriceScheduleSpecification].self, forKey: .member) - var priceSchedulesBuffer:[EC2ClientTypes.PriceScheduleSpecification]? = nil - if let priceSchedulesContainer = priceSchedulesContainer { - priceSchedulesBuffer = [EC2ClientTypes.PriceScheduleSpecification]() - for structureContainer0 in priceSchedulesContainer { - priceSchedulesBuffer?.append(structureContainer0) - } - } - priceSchedules = priceSchedulesBuffer - } else { - priceSchedules = [] - } - } else { - priceSchedules = nil - } - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded - } -} +extension CreateReservedInstancesListingOutput { -extension CreateReservedInstancesListingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateReservedInstancesListingOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedInstancesListings = output.reservedInstancesListings - } else { - self.reservedInstancesListings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateReservedInstancesListingOutput() + value.reservedInstancesListings = try reader["reservedInstancesListingsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstancesListing.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -27790,44 +20310,18 @@ public struct CreateReservedInstancesListingOutput: Swift.Equatable { } } -struct CreateReservedInstancesListingOutputBody: Swift.Equatable { - let reservedInstancesListings: [EC2ClientTypes.ReservedInstancesListing]? -} +enum CreateReservedInstancesListingOutputError { -extension CreateReservedInstancesListingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesListings = "reservedInstancesListingsSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.reservedInstancesListings) { - struct KeyVal0{struct item{}} - let reservedInstancesListingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesListings) - if let reservedInstancesListingsWrappedContainer = reservedInstancesListingsWrappedContainer { - let reservedInstancesListingsContainer = try reservedInstancesListingsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstancesListing].self, forKey: .member) - var reservedInstancesListingsBuffer:[EC2ClientTypes.ReservedInstancesListing]? = nil - if let reservedInstancesListingsContainer = reservedInstancesListingsContainer { - reservedInstancesListingsBuffer = [EC2ClientTypes.ReservedInstancesListing]() - for structureContainer0 in reservedInstancesListingsContainer { - reservedInstancesListingsBuffer?.append(structureContainer0) - } - } - reservedInstancesListings = reservedInstancesListingsBuffer - } else { - reservedInstancesListings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - reservedInstancesListings = nil - } - } -} - -enum CreateReservedInstancesListingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -27905,63 +20399,15 @@ public struct CreateRestoreImageTaskInput: Swift.Equatable { } } -struct CreateRestoreImageTaskInputBody: Swift.Equatable { - let bucket: Swift.String? - let objectKey: Swift.String? - let name: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateRestoreImageTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case dryRun = "DryRun" - case name = "Name" - case objectKey = "ObjectKey" - case tagSpecifications = "TagSpecification" - } +extension CreateRestoreImageTaskOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let objectKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .objectKey) - objectKey = objectKeyDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateRestoreImageTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateRestoreImageTaskOutputBody = try responseDecoder.decode(responseBody: data) - self.imageId = output.imageId - } else { - self.imageId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateRestoreImageTaskOutput() + value.imageId = try reader["imageId"].readIfPresent() + return value } } } @@ -27978,27 +20424,18 @@ public struct CreateRestoreImageTaskOutput: Swift.Equatable { } } -struct CreateRestoreImageTaskOutputBody: Swift.Equatable { - let imageId: Swift.String? -} - -extension CreateRestoreImageTaskOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageId = "imageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - } -} +enum CreateRestoreImageTaskOutputError { -enum CreateRestoreImageTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -28139,90 +20576,15 @@ public struct CreateRouteInput: Swift.Equatable { } } -struct CreateRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let destinationIpv6CidrBlock: Swift.String? - let destinationPrefixListId: Swift.String? - let dryRun: Swift.Bool? - let vpcEndpointId: Swift.String? - let egressOnlyInternetGatewayId: Swift.String? - let gatewayId: Swift.String? - let instanceId: Swift.String? - let natGatewayId: Swift.String? - let transitGatewayId: Swift.String? - let localGatewayId: Swift.String? - let carrierGatewayId: Swift.String? - let networkInterfaceId: Swift.String? - let routeTableId: Swift.String? - let vpcPeeringConnectionId: Swift.String? - let coreNetworkArn: Swift.String? -} - -extension CreateRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGatewayId = "CarrierGatewayId" - case coreNetworkArn = "CoreNetworkArn" - case destinationCidrBlock = "destinationCidrBlock" - case destinationIpv6CidrBlock = "destinationIpv6CidrBlock" - case destinationPrefixListId = "DestinationPrefixListId" - case dryRun = "dryRun" - case egressOnlyInternetGatewayId = "egressOnlyInternetGatewayId" - case gatewayId = "gatewayId" - case instanceId = "instanceId" - case localGatewayId = "LocalGatewayId" - case natGatewayId = "natGatewayId" - case networkInterfaceId = "networkInterfaceId" - case routeTableId = "routeTableId" - case transitGatewayId = "TransitGatewayId" - case vpcEndpointId = "VpcEndpointId" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let destinationIpv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationIpv6CidrBlock) - destinationIpv6CidrBlock = destinationIpv6CidrBlockDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointId) - vpcEndpointId = vpcEndpointIdDecoded - let egressOnlyInternetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .egressOnlyInternetGatewayId) - egressOnlyInternetGatewayId = egressOnlyInternetGatewayIdDecoded - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let carrierGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierGatewayId) - carrierGatewayId = carrierGatewayIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - let coreNetworkArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coreNetworkArn) - coreNetworkArn = coreNetworkArnDecoded - } -} - -extension CreateRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil +extension CreateRouteOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateRouteOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -28239,27 +20601,18 @@ public struct CreateRouteOutput: Swift.Equatable { } } -struct CreateRouteOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension CreateRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum CreateRouteOutputError { -enum CreateRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -28318,55 +20671,15 @@ public struct CreateRouteTableInput: Swift.Equatable { } } -struct CreateRouteTableInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case tagSpecifications = "TagSpecification" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} +extension CreateRouteTableOutput { -extension CreateRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateRouteTableOutputBody = try responseDecoder.decode(responseBody: data) - self.routeTable = output.routeTable - } else { - self.routeTable = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateRouteTableOutput() + value.routeTable = try reader["routeTable"].readIfPresent(readingClosure: EC2ClientTypes.RouteTable.readingClosure) + return value } } } @@ -28383,27 +20696,18 @@ public struct CreateRouteTableOutput: Swift.Equatable { } } -struct CreateRouteTableOutputBody: Swift.Equatable { - let routeTable: EC2ClientTypes.RouteTable? -} - -extension CreateRouteTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case routeTable = "routeTable" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let routeTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RouteTable.self, forKey: .routeTable) - routeTable = routeTableDecoded - } -} +enum CreateRouteTableOutputError { -enum CreateRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -28477,65 +20781,16 @@ public struct CreateSecurityGroupInput: Swift.Equatable { } } -struct CreateSecurityGroupInputBody: Swift.Equatable { - let description: Swift.String? - let groupName: Swift.String? - let vpcId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} +extension CreateSecurityGroupOutput { -extension CreateSecurityGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "GroupDescription" - case dryRun = "dryRun" - case groupName = "GroupName" - case tagSpecifications = "TagSpecification" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateSecurityGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSecurityGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.groupId = output.groupId - self.tags = output.tags - } else { - self.groupId = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateSecurityGroupOutput() + value.groupId = try reader["groupId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -28556,48 +20811,18 @@ public struct CreateSecurityGroupOutput: Swift.Equatable { } } -struct CreateSecurityGroupOutputBody: Swift.Equatable { - let groupId: Swift.String? - let tags: [EC2ClientTypes.Tag]? -} - -extension CreateSecurityGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupId = "groupId" - case tags = "tagSet" - } +enum CreateSecurityGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - tags = nil - } - } -} - -enum CreateSecurityGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -28679,97 +20904,32 @@ public struct CreateSnapshotInput: Swift.Equatable { } } -struct CreateSnapshotInputBody: Swift.Equatable { - let description: Swift.String? - let outpostArn: Swift.String? - let volumeId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case dryRun = "dryRun" - case outpostArn = "OutpostArn" - case tagSpecifications = "TagSpecification" - case volumeId = "VolumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dataEncryptionKeyId = output.dataEncryptionKeyId - self.description = output.description - self.encrypted = output.encrypted - self.kmsKeyId = output.kmsKeyId - self.outpostArn = output.outpostArn - self.ownerAlias = output.ownerAlias - self.ownerId = output.ownerId - self.progress = output.progress - self.restoreExpiryTime = output.restoreExpiryTime - self.snapshotId = output.snapshotId - self.sseType = output.sseType - self.startTime = output.startTime - self.state = output.state - self.stateMessage = output.stateMessage - self.storageTier = output.storageTier - self.tags = output.tags - self.volumeId = output.volumeId - self.volumeSize = output.volumeSize - } else { - self.dataEncryptionKeyId = nil - self.description = nil - self.encrypted = nil - self.kmsKeyId = nil - self.outpostArn = nil - self.ownerAlias = nil - self.ownerId = nil - self.progress = nil - self.restoreExpiryTime = nil - self.snapshotId = nil - self.sseType = nil - self.startTime = nil - self.state = nil - self.stateMessage = nil - self.storageTier = nil - self.tags = nil - self.volumeId = nil - self.volumeSize = nil +extension CreateSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateSnapshotOutput() + value.dataEncryptionKeyId = try reader["dataEncryptionKeyId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.encrypted = try reader["encrypted"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.ownerAlias = try reader["ownerAlias"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.restoreExpiryTime = try reader["restoreExpiryTime"].readTimestampIfPresent(format: .dateTime) + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.sseType = try reader["sseType"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: .dateTime) + value.state = try reader["status"].readIfPresent() + value.stateMessage = try reader["statusMessage"].readIfPresent() + value.storageTier = try reader["storageTier"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.volumeId = try reader["volumeId"].readIfPresent() + value.volumeSize = try reader["volumeSize"].readIfPresent() + return value } } } @@ -28855,112 +21015,18 @@ public struct CreateSnapshotOutput: Swift.Equatable { } } -struct CreateSnapshotOutputBody: Swift.Equatable { - let dataEncryptionKeyId: Swift.String? - let description: Swift.String? - let encrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let ownerId: Swift.String? - let progress: Swift.String? - let snapshotId: Swift.String? - let startTime: ClientRuntime.Date? - let state: EC2ClientTypes.SnapshotState? - let stateMessage: Swift.String? - let volumeId: Swift.String? - let volumeSize: Swift.Int? - let ownerAlias: Swift.String? - let outpostArn: Swift.String? - let tags: [EC2ClientTypes.Tag]? - let storageTier: EC2ClientTypes.StorageTier? - let restoreExpiryTime: ClientRuntime.Date? - let sseType: EC2ClientTypes.SSEType? -} - -extension CreateSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataEncryptionKeyId = "dataEncryptionKeyId" - case description = "description" - case encrypted = "encrypted" - case kmsKeyId = "kmsKeyId" - case outpostArn = "outpostArn" - case ownerAlias = "ownerAlias" - case ownerId = "ownerId" - case progress = "progress" - case restoreExpiryTime = "restoreExpiryTime" - case snapshotId = "snapshotId" - case sseType = "sseType" - case startTime = "startTime" - case state = "status" - case stateMessage = "statusMessage" - case storageTier = "storageTier" - case tags = "tagSet" - case volumeId = "volumeId" - case volumeSize = "volumeSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataEncryptionKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataEncryptionKeyId) - dataEncryptionKeyId = dataEncryptionKeyIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotState.self, forKey: .state) - state = stateDecoded - let stateMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateMessage) - stateMessage = stateMessageDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let ownerAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAlias) - ownerAlias = ownerAliasDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageTierDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StorageTier.self, forKey: .storageTier) - storageTier = storageTierDecoded - let restoreExpiryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreExpiryTime) - restoreExpiryTime = restoreExpiryTimeDecoded - let sseTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SSEType.self, forKey: .sseType) - sseType = sseTypeDecoded - } -} - -enum CreateSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum CreateSnapshotOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -29049,67 +21115,15 @@ public struct CreateSnapshotsInput: Swift.Equatable { } } -struct CreateSnapshotsInputBody: Swift.Equatable { - let description: Swift.String? - let instanceSpecification: EC2ClientTypes.InstanceSpecification? - let outpostArn: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? - let copyTagsFromSource: EC2ClientTypes.CopyTagsFromSource? -} +extension CreateSnapshotsOutput { -extension CreateSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case copyTagsFromSource = "CopyTagsFromSource" - case description = "Description" - case dryRun = "DryRun" - case instanceSpecification = "InstanceSpecification" - case outpostArn = "OutpostArn" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let instanceSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceSpecification.self, forKey: .instanceSpecification) - instanceSpecification = instanceSpecificationDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let copyTagsFromSourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CopyTagsFromSource.self, forKey: .copyTagsFromSource) - copyTagsFromSource = copyTagsFromSourceDecoded - } -} - -extension CreateSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshots = output.snapshots - } else { - self.snapshots = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateSnapshotsOutput() + value.snapshots = try reader["snapshotSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SnapshotInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -29126,44 +21140,18 @@ public struct CreateSnapshotsOutput: Swift.Equatable { } } -struct CreateSnapshotsOutputBody: Swift.Equatable { - let snapshots: [EC2ClientTypes.SnapshotInfo]? -} - -extension CreateSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshots = "snapshotSet" - } +enum CreateSnapshotsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.snapshots) { - struct KeyVal0{struct item{}} - let snapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshots) - if let snapshotsWrappedContainer = snapshotsWrappedContainer { - let snapshotsContainer = try snapshotsWrappedContainer.decodeIfPresent([EC2ClientTypes.SnapshotInfo].self, forKey: .member) - var snapshotsBuffer:[EC2ClientTypes.SnapshotInfo]? = nil - if let snapshotsContainer = snapshotsContainer { - snapshotsBuffer = [EC2ClientTypes.SnapshotInfo]() - for structureContainer0 in snapshotsContainer { - snapshotsBuffer?.append(structureContainer0) - } - } - snapshots = snapshotsBuffer - } else { - snapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - snapshots = nil - } - } -} - -enum CreateSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -29214,38 +21202,15 @@ public struct CreateSpotDatafeedSubscriptionInput: Swift.Equatable { } } -struct CreateSpotDatafeedSubscriptionInputBody: Swift.Equatable { - let bucket: Swift.String? - let dryRun: Swift.Bool? - let `prefix`: Swift.String? -} +extension CreateSpotDatafeedSubscriptionOutput { -extension CreateSpotDatafeedSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "bucket" - case dryRun = "dryRun" - case `prefix` = "prefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - } -} - -extension CreateSpotDatafeedSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSpotDatafeedSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.spotDatafeedSubscription = output.spotDatafeedSubscription - } else { - self.spotDatafeedSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateSpotDatafeedSubscriptionOutput() + value.spotDatafeedSubscription = try reader["spotDatafeedSubscription"].readIfPresent(readingClosure: EC2ClientTypes.SpotDatafeedSubscription.readingClosure) + return value } } } @@ -29263,27 +21228,18 @@ public struct CreateSpotDatafeedSubscriptionOutput: Swift.Equatable { } } -struct CreateSpotDatafeedSubscriptionOutputBody: Swift.Equatable { - let spotDatafeedSubscription: EC2ClientTypes.SpotDatafeedSubscription? -} - -extension CreateSpotDatafeedSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case spotDatafeedSubscription = "spotDatafeedSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let spotDatafeedSubscriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotDatafeedSubscription.self, forKey: .spotDatafeedSubscription) - spotDatafeedSubscription = spotDatafeedSubscriptionDecoded - } -} +enum CreateSpotDatafeedSubscriptionOutputError { -enum CreateSpotDatafeedSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -29350,59 +21306,15 @@ public struct CreateStoreImageTaskInput: Swift.Equatable { } } -struct CreateStoreImageTaskInputBody: Swift.Equatable { - let imageId: Swift.String? - let bucket: Swift.String? - let s3ObjectTags: [EC2ClientTypes.S3ObjectTag]? - let dryRun: Swift.Bool? -} - -extension CreateStoreImageTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case dryRun = "DryRun" - case imageId = "ImageId" - case s3ObjectTags = "S3ObjectTag" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - if containerValues.contains(.s3ObjectTags) { - struct KeyVal0{struct item{}} - let s3ObjectTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .s3ObjectTags) - if let s3ObjectTagsWrappedContainer = s3ObjectTagsWrappedContainer { - let s3ObjectTagsContainer = try s3ObjectTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.S3ObjectTag].self, forKey: .member) - var s3ObjectTagsBuffer:[EC2ClientTypes.S3ObjectTag]? = nil - if let s3ObjectTagsContainer = s3ObjectTagsContainer { - s3ObjectTagsBuffer = [EC2ClientTypes.S3ObjectTag]() - for structureContainer0 in s3ObjectTagsContainer { - s3ObjectTagsBuffer?.append(structureContainer0) - } - } - s3ObjectTags = s3ObjectTagsBuffer - } else { - s3ObjectTags = [] - } - } else { - s3ObjectTags = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateStoreImageTaskOutput { -extension CreateStoreImageTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateStoreImageTaskOutputBody = try responseDecoder.decode(responseBody: data) - self.objectKey = output.objectKey - } else { - self.objectKey = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateStoreImageTaskOutput() + value.objectKey = try reader["objectKey"].readIfPresent() + return value } } } @@ -29419,27 +21331,18 @@ public struct CreateStoreImageTaskOutput: Swift.Equatable { } } -struct CreateStoreImageTaskOutputBody: Swift.Equatable { - let objectKey: Swift.String? -} - -extension CreateStoreImageTaskOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objectKey = "objectKey" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let objectKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .objectKey) - objectKey = objectKeyDecoded - } -} +enum CreateStoreImageTaskOutputError { -enum CreateStoreImageTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -29525,67 +21428,15 @@ public struct CreateSubnetCidrReservationInput: Swift.Equatable { } } -struct CreateSubnetCidrReservationInputBody: Swift.Equatable { - let subnetId: Swift.String? - let cidr: Swift.String? - let reservationType: EC2ClientTypes.SubnetCidrReservationType? - let description: Swift.String? - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateSubnetCidrReservationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case description = "Description" - case dryRun = "DryRun" - case reservationType = "ReservationType" - case subnetId = "SubnetId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let reservationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetCidrReservationType.self, forKey: .reservationType) - reservationType = reservationTypeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} +extension CreateSubnetCidrReservationOutput { -extension CreateSubnetCidrReservationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSubnetCidrReservationOutputBody = try responseDecoder.decode(responseBody: data) - self.subnetCidrReservation = output.subnetCidrReservation - } else { - self.subnetCidrReservation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateSubnetCidrReservationOutput() + value.subnetCidrReservation = try reader["subnetCidrReservation"].readIfPresent(readingClosure: EC2ClientTypes.SubnetCidrReservation.readingClosure) + return value } } } @@ -29602,27 +21453,18 @@ public struct CreateSubnetCidrReservationOutput: Swift.Equatable { } } -struct CreateSubnetCidrReservationOutputBody: Swift.Equatable { - let subnetCidrReservation: EC2ClientTypes.SubnetCidrReservation? -} - -extension CreateSubnetCidrReservationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subnetCidrReservation = "subnetCidrReservation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetCidrReservationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetCidrReservation.self, forKey: .subnetCidrReservation) - subnetCidrReservation = subnetCidrReservationDecoded - } -} +enum CreateSubnetCidrReservationOutputError { -enum CreateSubnetCidrReservationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -29751,95 +21593,15 @@ public struct CreateSubnetInput: Swift.Equatable { } } -struct CreateSubnetInputBody: Swift.Equatable { - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let availabilityZone: Swift.String? - let availabilityZoneId: Swift.String? - let cidrBlock: Swift.String? - let ipv6CidrBlock: Swift.String? - let outpostArn: Swift.String? - let vpcId: Swift.String? - let dryRun: Swift.Bool? - let ipv6Native: Swift.Bool? - let ipv4IpamPoolId: Swift.String? - let ipv4NetmaskLength: Swift.Int? - let ipv6IpamPoolId: Swift.String? - let ipv6NetmaskLength: Swift.Int? -} - -extension CreateSubnetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "AvailabilityZone" - case availabilityZoneId = "AvailabilityZoneId" - case cidrBlock = "CidrBlock" - case dryRun = "dryRun" - case ipv4IpamPoolId = "Ipv4IpamPoolId" - case ipv4NetmaskLength = "Ipv4NetmaskLength" - case ipv6CidrBlock = "Ipv6CidrBlock" - case ipv6IpamPoolId = "Ipv6IpamPoolId" - case ipv6Native = "Ipv6Native" - case ipv6NetmaskLength = "Ipv6NetmaskLength" - case outpostArn = "OutpostArn" - case tagSpecifications = "TagSpecification" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let availabilityZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneId) - availabilityZoneId = availabilityZoneIdDecoded - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipv6NativeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ipv6Native) - ipv6Native = ipv6NativeDecoded - let ipv4IpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv4IpamPoolId) - ipv4IpamPoolId = ipv4IpamPoolIdDecoded - let ipv4NetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4NetmaskLength) - ipv4NetmaskLength = ipv4NetmaskLengthDecoded - let ipv6IpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6IpamPoolId) - ipv6IpamPoolId = ipv6IpamPoolIdDecoded - let ipv6NetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6NetmaskLength) - ipv6NetmaskLength = ipv6NetmaskLengthDecoded - } -} - -extension CreateSubnetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSubnetOutputBody = try responseDecoder.decode(responseBody: data) - self.subnet = output.subnet - } else { - self.subnet = nil +extension CreateSubnetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateSubnetOutput() + value.subnet = try reader["subnet"].readIfPresent(readingClosure: EC2ClientTypes.Subnet.readingClosure) + return value } } } @@ -29856,27 +21618,18 @@ public struct CreateSubnetOutput: Swift.Equatable { } } -struct CreateSubnetOutputBody: Swift.Equatable { - let subnet: EC2ClientTypes.Subnet? -} - -extension CreateSubnetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subnet = "subnet" - } +enum CreateSubnetOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Subnet.self, forKey: .subnet) - subnet = subnetDecoded - } -} - -enum CreateSubnetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -29945,79 +21698,32 @@ public struct CreateTagsInput: Swift.Equatable { } } -struct CreateTagsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let resources: [Swift.String]? - let tags: [EC2ClientTypes.Tag]? -} +extension CreateTagsOutput { -extension CreateTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case resources = "ResourceId" - case tags = "Tag" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.resources) { - struct KeyVal0{struct member{}} - let resourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resources) - if let resourcesWrappedContainer = resourcesWrappedContainer { - let resourcesContainer = try resourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesBuffer:[Swift.String]? = nil - if let resourcesContainer = resourcesContainer { - resourcesBuffer = [Swift.String]() - for stringContainer0 in resourcesContainer { - resourcesBuffer?.append(stringContainer0) - } - } - resources = resourcesBuffer - } else { - resources = [] - } - } else { - resources = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateTagsOutput() } } } -extension CreateTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct CreateTagsOutput: Swift.Equatable { public init() { } } -enum CreateTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum CreateTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -30082,61 +21788,16 @@ public struct CreateTrafficMirrorFilterInput: Swift.Equatable { } } -struct CreateTrafficMirrorFilterInputBody: Swift.Equatable { - let description: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? - let clientToken: Swift.String? -} +extension CreateTrafficMirrorFilterOutput { -extension CreateTrafficMirrorFilterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension CreateTrafficMirrorFilterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTrafficMirrorFilterOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.trafficMirrorFilter = output.trafficMirrorFilter - } else { - self.clientToken = nil - self.trafficMirrorFilter = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTrafficMirrorFilterOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.trafficMirrorFilter = try reader["trafficMirrorFilter"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorFilter.readingClosure) + return value } } } @@ -30157,31 +21818,18 @@ public struct CreateTrafficMirrorFilterOutput: Swift.Equatable { } } -struct CreateTrafficMirrorFilterOutputBody: Swift.Equatable { - let trafficMirrorFilter: EC2ClientTypes.TrafficMirrorFilter? - let clientToken: Swift.String? -} - -extension CreateTrafficMirrorFilterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case trafficMirrorFilter = "trafficMirrorFilter" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorFilter.self, forKey: .trafficMirrorFilter) - trafficMirrorFilter = trafficMirrorFilterDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +enum CreateTrafficMirrorFilterOutputError { -enum CreateTrafficMirrorFilterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -30299,76 +21947,16 @@ public struct CreateTrafficMirrorFilterRuleInput: Swift.Equatable { } } -struct CreateTrafficMirrorFilterRuleInputBody: Swift.Equatable { - let trafficMirrorFilterId: Swift.String? - let trafficDirection: EC2ClientTypes.TrafficDirection? - let ruleNumber: Swift.Int? - let ruleAction: EC2ClientTypes.TrafficMirrorRuleAction? - let destinationPortRange: EC2ClientTypes.TrafficMirrorPortRangeRequest? - let sourcePortRange: EC2ClientTypes.TrafficMirrorPortRangeRequest? - let `protocol`: Swift.Int? - let destinationCidrBlock: Swift.String? - let sourceCidrBlock: Swift.String? - let description: Swift.String? - let dryRun: Swift.Bool? - let clientToken: Swift.String? -} - -extension CreateTrafficMirrorFilterRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case destinationCidrBlock = "DestinationCidrBlock" - case destinationPortRange = "DestinationPortRange" - case dryRun = "DryRun" - case `protocol` = "Protocol" - case ruleAction = "RuleAction" - case ruleNumber = "RuleNumber" - case sourceCidrBlock = "SourceCidrBlock" - case sourcePortRange = "SourcePortRange" - case trafficDirection = "TrafficDirection" - case trafficMirrorFilterId = "TrafficMirrorFilterId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - let trafficDirectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficDirection.self, forKey: .trafficDirection) - trafficDirection = trafficDirectionDecoded - let ruleNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ruleNumber) - ruleNumber = ruleNumberDecoded - let ruleActionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorRuleAction.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let destinationPortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorPortRangeRequest.self, forKey: .destinationPortRange) - destinationPortRange = destinationPortRangeDecoded - let sourcePortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorPortRangeRequest.self, forKey: .sourcePortRange) - sourcePortRange = sourcePortRangeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .protocol) - `protocol` = protocolDecoded - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let sourceCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceCidrBlock) - sourceCidrBlock = sourceCidrBlockDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension CreateTrafficMirrorFilterRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTrafficMirrorFilterRuleOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.trafficMirrorFilterRule = output.trafficMirrorFilterRule - } else { - self.clientToken = nil - self.trafficMirrorFilterRule = nil +extension CreateTrafficMirrorFilterRuleOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTrafficMirrorFilterRuleOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.trafficMirrorFilterRule = try reader["trafficMirrorFilterRule"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorFilterRule.readingClosure) + return value } } } @@ -30389,31 +21977,18 @@ public struct CreateTrafficMirrorFilterRuleOutput: Swift.Equatable { } } -struct CreateTrafficMirrorFilterRuleOutputBody: Swift.Equatable { - let trafficMirrorFilterRule: EC2ClientTypes.TrafficMirrorFilterRule? - let clientToken: Swift.String? -} - -extension CreateTrafficMirrorFilterRuleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case trafficMirrorFilterRule = "trafficMirrorFilterRule" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorFilterRule.self, forKey: .trafficMirrorFilterRule) - trafficMirrorFilterRule = trafficMirrorFilterRuleDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +enum CreateTrafficMirrorFilterRuleOutputError { -enum CreateTrafficMirrorFilterRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -30524,85 +22099,16 @@ public struct CreateTrafficMirrorSessionInput: Swift.Equatable { } } -struct CreateTrafficMirrorSessionInputBody: Swift.Equatable { - let networkInterfaceId: Swift.String? - let trafficMirrorTargetId: Swift.String? - let trafficMirrorFilterId: Swift.String? - let packetLength: Swift.Int? - let sessionNumber: Swift.Int? - let virtualNetworkId: Swift.Int? - let description: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? - let clientToken: Swift.String? -} - -extension CreateTrafficMirrorSessionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case networkInterfaceId = "NetworkInterfaceId" - case packetLength = "PacketLength" - case sessionNumber = "SessionNumber" - case tagSpecifications = "TagSpecification" - case trafficMirrorFilterId = "TrafficMirrorFilterId" - case trafficMirrorTargetId = "TrafficMirrorTargetId" - case virtualNetworkId = "VirtualNetworkId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let trafficMirrorTargetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorTargetId) - trafficMirrorTargetId = trafficMirrorTargetIdDecoded - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - let packetLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetLength) - packetLength = packetLengthDecoded - let sessionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sessionNumber) - sessionNumber = sessionNumberDecoded - let virtualNetworkIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .virtualNetworkId) - virtualNetworkId = virtualNetworkIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension CreateTrafficMirrorSessionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTrafficMirrorSessionOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.trafficMirrorSession = output.trafficMirrorSession - } else { - self.clientToken = nil - self.trafficMirrorSession = nil +extension CreateTrafficMirrorSessionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTrafficMirrorSessionOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.trafficMirrorSession = try reader["trafficMirrorSession"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorSession.readingClosure) + return value } } } @@ -30623,31 +22129,18 @@ public struct CreateTrafficMirrorSessionOutput: Swift.Equatable { } } -struct CreateTrafficMirrorSessionOutputBody: Swift.Equatable { - let trafficMirrorSession: EC2ClientTypes.TrafficMirrorSession? - let clientToken: Swift.String? -} - -extension CreateTrafficMirrorSessionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case trafficMirrorSession = "trafficMirrorSession" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorSessionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorSession.self, forKey: .trafficMirrorSession) - trafficMirrorSession = trafficMirrorSessionDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +enum CreateTrafficMirrorSessionOutputError { -enum CreateTrafficMirrorSessionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -30733,73 +22226,16 @@ public struct CreateTrafficMirrorTargetInput: Swift.Equatable { } } -struct CreateTrafficMirrorTargetInputBody: Swift.Equatable { - let networkInterfaceId: Swift.String? - let networkLoadBalancerArn: Swift.String? - let description: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let gatewayLoadBalancerEndpointId: Swift.String? -} - -extension CreateTrafficMirrorTargetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case gatewayLoadBalancerEndpointId = "GatewayLoadBalancerEndpointId" - case networkInterfaceId = "NetworkInterfaceId" - case networkLoadBalancerArn = "NetworkLoadBalancerArn" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let networkLoadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkLoadBalancerArn) - networkLoadBalancerArn = networkLoadBalancerArnDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let gatewayLoadBalancerEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayLoadBalancerEndpointId) - gatewayLoadBalancerEndpointId = gatewayLoadBalancerEndpointIdDecoded - } -} - -extension CreateTrafficMirrorTargetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTrafficMirrorTargetOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.trafficMirrorTarget = output.trafficMirrorTarget - } else { - self.clientToken = nil - self.trafficMirrorTarget = nil +extension CreateTrafficMirrorTargetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTrafficMirrorTargetOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.trafficMirrorTarget = try reader["trafficMirrorTarget"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorTarget.readingClosure) + return value } } } @@ -30820,31 +22256,18 @@ public struct CreateTrafficMirrorTargetOutput: Swift.Equatable { } } -struct CreateTrafficMirrorTargetOutputBody: Swift.Equatable { - let trafficMirrorTarget: EC2ClientTypes.TrafficMirrorTarget? - let clientToken: Swift.String? -} - -extension CreateTrafficMirrorTargetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case trafficMirrorTarget = "trafficMirrorTarget" - } +enum CreateTrafficMirrorTargetOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorTarget.self, forKey: .trafficMirrorTarget) - trafficMirrorTarget = trafficMirrorTargetDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -enum CreateTrafficMirrorTargetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -30911,59 +22334,15 @@ public struct CreateTransitGatewayConnectInput: Swift.Equatable { } } -struct CreateTransitGatewayConnectInputBody: Swift.Equatable { - let transportTransitGatewayAttachmentId: Swift.String? - let options: EC2ClientTypes.CreateTransitGatewayConnectRequestOptions? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateTransitGatewayConnectInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case options = "Options" - case tagSpecifications = "TagSpecification" - case transportTransitGatewayAttachmentId = "TransportTransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transportTransitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transportTransitGatewayAttachmentId) - transportTransitGatewayAttachmentId = transportTransitGatewayAttachmentIdDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateTransitGatewayConnectRequestOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateTransitGatewayConnectOutput { -extension CreateTransitGatewayConnectOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayConnectOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayConnect = output.transitGatewayConnect - } else { - self.transitGatewayConnect = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayConnectOutput() + value.transitGatewayConnect = try reader["transitGatewayConnect"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayConnect.readingClosure) + return value } } } @@ -30980,27 +22359,18 @@ public struct CreateTransitGatewayConnectOutput: Swift.Equatable { } } -struct CreateTransitGatewayConnectOutputBody: Swift.Equatable { - let transitGatewayConnect: EC2ClientTypes.TransitGatewayConnect? -} +enum CreateTransitGatewayConnectOutputError { -extension CreateTransitGatewayConnectOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayConnect = "transitGatewayConnect" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayConnectDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayConnect.self, forKey: .transitGatewayConnect) - transitGatewayConnect = transitGatewayConnectDecoded - } -} - -enum CreateTransitGatewayConnectOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -31098,88 +22468,15 @@ public struct CreateTransitGatewayConnectPeerInput: Swift.Equatable { } } -struct CreateTransitGatewayConnectPeerInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let transitGatewayAddress: Swift.String? - let peerAddress: Swift.String? - let bgpOptions: EC2ClientTypes.TransitGatewayConnectRequestBgpOptions? - let insideCidrBlocks: [Swift.String]? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateTransitGatewayConnectPeerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bgpOptions = "BgpOptions" - case dryRun = "DryRun" - case insideCidrBlocks = "InsideCidrBlocks" - case peerAddress = "PeerAddress" - case tagSpecifications = "TagSpecification" - case transitGatewayAddress = "TransitGatewayAddress" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let transitGatewayAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAddress) - transitGatewayAddress = transitGatewayAddressDecoded - let peerAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerAddress) - peerAddress = peerAddressDecoded - let bgpOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayConnectRequestBgpOptions.self, forKey: .bgpOptions) - bgpOptions = bgpOptionsDecoded - if containerValues.contains(.insideCidrBlocks) { - struct KeyVal0{struct item{}} - let insideCidrBlocksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .insideCidrBlocks) - if let insideCidrBlocksWrappedContainer = insideCidrBlocksWrappedContainer { - let insideCidrBlocksContainer = try insideCidrBlocksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var insideCidrBlocksBuffer:[Swift.String]? = nil - if let insideCidrBlocksContainer = insideCidrBlocksContainer { - insideCidrBlocksBuffer = [Swift.String]() - for stringContainer0 in insideCidrBlocksContainer { - insideCidrBlocksBuffer?.append(stringContainer0) - } - } - insideCidrBlocks = insideCidrBlocksBuffer - } else { - insideCidrBlocks = [] - } - } else { - insideCidrBlocks = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateTransitGatewayConnectPeerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayConnectPeerOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayConnectPeer = output.transitGatewayConnectPeer - } else { - self.transitGatewayConnectPeer = nil +extension CreateTransitGatewayConnectPeerOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayConnectPeerOutput() + value.transitGatewayConnectPeer = try reader["transitGatewayConnectPeer"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayConnectPeer.readingClosure) + return value } } } @@ -31196,35 +22493,23 @@ public struct CreateTransitGatewayConnectPeerOutput: Swift.Equatable { } } -struct CreateTransitGatewayConnectPeerOutputBody: Swift.Equatable { - let transitGatewayConnectPeer: EC2ClientTypes.TransitGatewayConnectPeer? -} - -extension CreateTransitGatewayConnectPeerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayConnectPeer = "transitGatewayConnectPeer" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayConnectPeerDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayConnectPeer.self, forKey: .transitGatewayConnectPeer) - transitGatewayConnectPeer = transitGatewayConnectPeerDecoded - } -} +enum CreateTransitGatewayConnectPeerOutputError { -enum CreateTransitGatewayConnectPeerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.CreateTransitGatewayConnectRequestOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `protocol` = "Protocol" - } +extension EC2ClientTypes.CreateTransitGatewayConnectRequestOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -31233,10 +22518,13 @@ extension EC2ClientTypes.CreateTransitGatewayConnectRequestOptions: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ProtocolValue.self, forKey: .protocol) - `protocol` = protocolDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateTransitGatewayConnectRequestOptions() + value.`protocol` = try reader["Protocol"].readIfPresent() + return value + } } } @@ -31317,51 +22605,6 @@ public struct CreateTransitGatewayInput: Swift.Equatable { } } -struct CreateTransitGatewayInputBody: Swift.Equatable { - let description: Swift.String? - let options: EC2ClientTypes.TransitGatewayRequestOptions? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateTransitGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case dryRun = "DryRun" - case options = "Options" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRequestOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - extension CreateTransitGatewayMulticastDomainInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -31423,59 +22666,15 @@ public struct CreateTransitGatewayMulticastDomainInput: Swift.Equatable { } } -struct CreateTransitGatewayMulticastDomainInputBody: Swift.Equatable { - let transitGatewayId: Swift.String? - let options: EC2ClientTypes.CreateTransitGatewayMulticastDomainRequestOptions? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateTransitGatewayMulticastDomainInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case options = "Options" - case tagSpecifications = "TagSpecification" - case transitGatewayId = "TransitGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateTransitGatewayMulticastDomainRequestOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateTransitGatewayMulticastDomainOutput { -extension CreateTransitGatewayMulticastDomainOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayMulticastDomainOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayMulticastDomain = output.transitGatewayMulticastDomain - } else { - self.transitGatewayMulticastDomain = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayMulticastDomainOutput() + value.transitGatewayMulticastDomain = try reader["transitGatewayMulticastDomain"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDomain.readingClosure) + return value } } } @@ -31492,37 +22691,23 @@ public struct CreateTransitGatewayMulticastDomainOutput: Swift.Equatable { } } -struct CreateTransitGatewayMulticastDomainOutputBody: Swift.Equatable { - let transitGatewayMulticastDomain: EC2ClientTypes.TransitGatewayMulticastDomain? -} - -extension CreateTransitGatewayMulticastDomainOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayMulticastDomain = "transitGatewayMulticastDomain" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDomain.self, forKey: .transitGatewayMulticastDomain) - transitGatewayMulticastDomain = transitGatewayMulticastDomainDecoded - } -} +enum CreateTransitGatewayMulticastDomainOutputError { -enum CreateTransitGatewayMulticastDomainOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.CreateTransitGatewayMulticastDomainRequestOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoAcceptSharedAssociations = "AutoAcceptSharedAssociations" - case igmpv2Support = "Igmpv2Support" - case staticSourcesSupport = "StaticSourcesSupport" - } +extension EC2ClientTypes.CreateTransitGatewayMulticastDomainRequestOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -31537,14 +22722,15 @@ extension EC2ClientTypes.CreateTransitGatewayMulticastDomainRequestOptions: Swif } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let igmpv2SupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Igmpv2SupportValue.self, forKey: .igmpv2Support) - igmpv2Support = igmpv2SupportDecoded - let staticSourcesSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StaticSourcesSupportValue.self, forKey: .staticSourcesSupport) - staticSourcesSupport = staticSourcesSupportDecoded - let autoAcceptSharedAssociationsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AutoAcceptSharedAssociationsValue.self, forKey: .autoAcceptSharedAssociations) - autoAcceptSharedAssociations = autoAcceptSharedAssociationsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateTransitGatewayMulticastDomainRequestOptions() + value.igmpv2Support = try reader["Igmpv2Support"].readIfPresent() + value.staticSourcesSupport = try reader["StaticSourcesSupport"].readIfPresent() + value.autoAcceptSharedAssociations = try reader["AutoAcceptSharedAssociations"].readIfPresent() + return value + } } } @@ -31572,14 +22758,15 @@ extension EC2ClientTypes { } -extension CreateTransitGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGateway = output.transitGateway - } else { - self.transitGateway = nil +extension CreateTransitGatewayOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayOutput() + value.transitGateway = try reader["transitGateway"].readIfPresent(readingClosure: EC2ClientTypes.TransitGateway.readingClosure) + return value } } } @@ -31596,27 +22783,18 @@ public struct CreateTransitGatewayOutput: Swift.Equatable { } } -struct CreateTransitGatewayOutputBody: Swift.Equatable { - let transitGateway: EC2ClientTypes.TransitGateway? -} - -extension CreateTransitGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGateway = "transitGateway" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGateway.self, forKey: .transitGateway) - transitGateway = transitGatewayDecoded - } -} +enum CreateTransitGatewayOutputError { -enum CreateTransitGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -31706,71 +22884,15 @@ public struct CreateTransitGatewayPeeringAttachmentInput: Swift.Equatable { } } -struct CreateTransitGatewayPeeringAttachmentInputBody: Swift.Equatable { - let transitGatewayId: Swift.String? - let peerTransitGatewayId: Swift.String? - let peerAccountId: Swift.String? - let peerRegion: Swift.String? - let options: EC2ClientTypes.CreateTransitGatewayPeeringAttachmentRequestOptions? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateTransitGatewayPeeringAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case options = "Options" - case peerAccountId = "PeerAccountId" - case peerRegion = "PeerRegion" - case peerTransitGatewayId = "PeerTransitGatewayId" - case tagSpecifications = "TagSpecification" - case transitGatewayId = "TransitGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let peerTransitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerTransitGatewayId) - peerTransitGatewayId = peerTransitGatewayIdDecoded - let peerAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerAccountId) - peerAccountId = peerAccountIdDecoded - let peerRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerRegion) - peerRegion = peerRegionDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateTransitGatewayPeeringAttachmentRequestOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateTransitGatewayPeeringAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayPeeringAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPeeringAttachment = output.transitGatewayPeeringAttachment - } else { - self.transitGatewayPeeringAttachment = nil +extension CreateTransitGatewayPeeringAttachmentOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayPeeringAttachmentOutput() + value.transitGatewayPeeringAttachment = try reader["transitGatewayPeeringAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPeeringAttachment.readingClosure) + return value } } } @@ -31787,35 +22909,23 @@ public struct CreateTransitGatewayPeeringAttachmentOutput: Swift.Equatable { } } -struct CreateTransitGatewayPeeringAttachmentOutputBody: Swift.Equatable { - let transitGatewayPeeringAttachment: EC2ClientTypes.TransitGatewayPeeringAttachment? -} +enum CreateTransitGatewayPeeringAttachmentOutputError { -extension CreateTransitGatewayPeeringAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPeeringAttachment = "transitGatewayPeeringAttachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPeeringAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPeeringAttachment.self, forKey: .transitGatewayPeeringAttachment) - transitGatewayPeeringAttachment = transitGatewayPeeringAttachmentDecoded - } -} - -enum CreateTransitGatewayPeeringAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.CreateTransitGatewayPeeringAttachmentRequestOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dynamicRouting = "DynamicRouting" - } +extension EC2ClientTypes.CreateTransitGatewayPeeringAttachmentRequestOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -31824,10 +22934,13 @@ extension EC2ClientTypes.CreateTransitGatewayPeeringAttachmentRequestOptions: Sw } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dynamicRoutingDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DynamicRoutingValue.self, forKey: .dynamicRouting) - dynamicRouting = dynamicRoutingDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateTransitGatewayPeeringAttachmentRequestOptions() + value.dynamicRouting = try reader["DynamicRouting"].readIfPresent() + return value + } } } @@ -31901,55 +23014,15 @@ public struct CreateTransitGatewayPolicyTableInput: Swift.Equatable { } } -struct CreateTransitGatewayPolicyTableInputBody: Swift.Equatable { - let transitGatewayId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateTransitGatewayPolicyTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case tagSpecifications = "TagSpecifications" - case transitGatewayId = "TransitGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateTransitGatewayPolicyTableOutput { -extension CreateTransitGatewayPolicyTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayPolicyTableOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPolicyTable = output.transitGatewayPolicyTable - } else { - self.transitGatewayPolicyTable = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayPolicyTableOutput() + value.transitGatewayPolicyTable = try reader["transitGatewayPolicyTable"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPolicyTable.readingClosure) + return value } } } @@ -31966,27 +23039,18 @@ public struct CreateTransitGatewayPolicyTableOutput: Swift.Equatable { } } -struct CreateTransitGatewayPolicyTableOutputBody: Swift.Equatable { - let transitGatewayPolicyTable: EC2ClientTypes.TransitGatewayPolicyTable? -} - -extension CreateTransitGatewayPolicyTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPolicyTable = "transitGatewayPolicyTable" - } +enum CreateTransitGatewayPolicyTableOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPolicyTable.self, forKey: .transitGatewayPolicyTable) - transitGatewayPolicyTable = transitGatewayPolicyTableDecoded - } -} - -enum CreateTransitGatewayPolicyTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -32051,46 +23115,15 @@ public struct CreateTransitGatewayPrefixListReferenceInput: Swift.Equatable { } } -struct CreateTransitGatewayPrefixListReferenceInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let prefixListId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let blackhole: Swift.Bool? - let dryRun: Swift.Bool? -} - -extension CreateTransitGatewayPrefixListReferenceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blackhole = "Blackhole" - case dryRun = "DryRun" - case prefixListId = "PrefixListId" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let blackholeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blackhole) - blackhole = blackholeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateTransitGatewayPrefixListReferenceOutput { -extension CreateTransitGatewayPrefixListReferenceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayPrefixListReferenceOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPrefixListReference = output.transitGatewayPrefixListReference - } else { - self.transitGatewayPrefixListReference = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayPrefixListReferenceOutput() + value.transitGatewayPrefixListReference = try reader["transitGatewayPrefixListReference"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPrefixListReference.readingClosure) + return value } } } @@ -32107,27 +23140,18 @@ public struct CreateTransitGatewayPrefixListReferenceOutput: Swift.Equatable { } } -struct CreateTransitGatewayPrefixListReferenceOutputBody: Swift.Equatable { - let transitGatewayPrefixListReference: EC2ClientTypes.TransitGatewayPrefixListReference? -} +enum CreateTransitGatewayPrefixListReferenceOutputError { -extension CreateTransitGatewayPrefixListReferenceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPrefixListReference = "transitGatewayPrefixListReference" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPrefixListReferenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPrefixListReference.self, forKey: .transitGatewayPrefixListReference) - transitGatewayPrefixListReference = transitGatewayPrefixListReferenceDecoded - } -} - -enum CreateTransitGatewayPrefixListReferenceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -32192,46 +23216,15 @@ public struct CreateTransitGatewayRouteInput: Swift.Equatable { } } -struct CreateTransitGatewayRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let transitGatewayRouteTableId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let blackhole: Swift.Bool? - let dryRun: Swift.Bool? -} +extension CreateTransitGatewayRouteOutput { -extension CreateTransitGatewayRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blackhole = "Blackhole" - case destinationCidrBlock = "DestinationCidrBlock" - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let blackholeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blackhole) - blackhole = blackholeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateTransitGatewayRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.route = output.route - } else { - self.route = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayRouteOutput() + value.route = try reader["route"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRoute.readingClosure) + return value } } } @@ -32248,27 +23241,18 @@ public struct CreateTransitGatewayRouteOutput: Swift.Equatable { } } -struct CreateTransitGatewayRouteOutputBody: Swift.Equatable { - let route: EC2ClientTypes.TransitGatewayRoute? -} - -extension CreateTransitGatewayRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case route = "route" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let routeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRoute.self, forKey: .route) - route = routeDecoded - } -} +enum CreateTransitGatewayRouteOutputError { -enum CreateTransitGatewayRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -32335,59 +23319,15 @@ public struct CreateTransitGatewayRouteTableAnnouncementInput: Swift.Equatable { } } -struct CreateTransitGatewayRouteTableAnnouncementInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let peeringAttachmentId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} +extension CreateTransitGatewayRouteTableAnnouncementOutput { -extension CreateTransitGatewayRouteTableAnnouncementInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case peeringAttachmentId = "PeeringAttachmentId" - case tagSpecifications = "TagSpecification" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let peeringAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peeringAttachmentId) - peeringAttachmentId = peeringAttachmentIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateTransitGatewayRouteTableAnnouncementOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayRouteTableAnnouncementOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayRouteTableAnnouncement = output.transitGatewayRouteTableAnnouncement - } else { - self.transitGatewayRouteTableAnnouncement = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayRouteTableAnnouncementOutput() + value.transitGatewayRouteTableAnnouncement = try reader["transitGatewayRouteTableAnnouncement"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRouteTableAnnouncement.readingClosure) + return value } } } @@ -32404,27 +23344,18 @@ public struct CreateTransitGatewayRouteTableAnnouncementOutput: Swift.Equatable } } -struct CreateTransitGatewayRouteTableAnnouncementOutputBody: Swift.Equatable { - let transitGatewayRouteTableAnnouncement: EC2ClientTypes.TransitGatewayRouteTableAnnouncement? -} - -extension CreateTransitGatewayRouteTableAnnouncementOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayRouteTableAnnouncement = "transitGatewayRouteTableAnnouncement" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableAnnouncementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTableAnnouncement.self, forKey: .transitGatewayRouteTableAnnouncement) - transitGatewayRouteTableAnnouncement = transitGatewayRouteTableAnnouncementDecoded - } -} +enum CreateTransitGatewayRouteTableAnnouncementOutputError { -enum CreateTransitGatewayRouteTableAnnouncementOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -32483,55 +23414,15 @@ public struct CreateTransitGatewayRouteTableInput: Swift.Equatable { } } -struct CreateTransitGatewayRouteTableInputBody: Swift.Equatable { - let transitGatewayId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} +extension CreateTransitGatewayRouteTableOutput { -extension CreateTransitGatewayRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case tagSpecifications = "TagSpecifications" - case transitGatewayId = "TransitGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateTransitGatewayRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayRouteTableOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayRouteTable = output.transitGatewayRouteTable - } else { - self.transitGatewayRouteTable = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayRouteTableOutput() + value.transitGatewayRouteTable = try reader["transitGatewayRouteTable"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRouteTable.readingClosure) + return value } } } @@ -32548,27 +23439,18 @@ public struct CreateTransitGatewayRouteTableOutput: Swift.Equatable { } } -struct CreateTransitGatewayRouteTableOutputBody: Swift.Equatable { - let transitGatewayRouteTable: EC2ClientTypes.TransitGatewayRouteTable? -} - -extension CreateTransitGatewayRouteTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayRouteTable = "transitGatewayRouteTable" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTable.self, forKey: .transitGatewayRouteTable) - transitGatewayRouteTable = transitGatewayRouteTableDecoded - } -} +enum CreateTransitGatewayRouteTableOutputError { -enum CreateTransitGatewayRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -32659,84 +23541,15 @@ public struct CreateTransitGatewayVpcAttachmentInput: Swift.Equatable { } } -struct CreateTransitGatewayVpcAttachmentInputBody: Swift.Equatable { - let transitGatewayId: Swift.String? - let vpcId: Swift.String? - let subnetIds: [Swift.String]? - let options: EC2ClientTypes.CreateTransitGatewayVpcAttachmentRequestOptions? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let dryRun: Swift.Bool? -} - -extension CreateTransitGatewayVpcAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case options = "Options" - case subnetIds = "SubnetIds" - case tagSpecifications = "TagSpecifications" - case transitGatewayId = "TransitGatewayId" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateTransitGatewayVpcAttachmentRequestOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension CreateTransitGatewayVpcAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTransitGatewayVpcAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayVpcAttachment = output.transitGatewayVpcAttachment - } else { - self.transitGatewayVpcAttachment = nil +extension CreateTransitGatewayVpcAttachmentOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTransitGatewayVpcAttachmentOutput() + value.transitGatewayVpcAttachment = try reader["transitGatewayVpcAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayVpcAttachment.readingClosure) + return value } } } @@ -32753,38 +23566,23 @@ public struct CreateTransitGatewayVpcAttachmentOutput: Swift.Equatable { } } -struct CreateTransitGatewayVpcAttachmentOutputBody: Swift.Equatable { - let transitGatewayVpcAttachment: EC2ClientTypes.TransitGatewayVpcAttachment? -} - -extension CreateTransitGatewayVpcAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayVpcAttachment = "transitGatewayVpcAttachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayVpcAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayVpcAttachment.self, forKey: .transitGatewayVpcAttachment) - transitGatewayVpcAttachment = transitGatewayVpcAttachmentDecoded - } -} +enum CreateTransitGatewayVpcAttachmentOutputError { -enum CreateTransitGatewayVpcAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.CreateTransitGatewayVpcAttachmentRequestOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applianceModeSupport = "ApplianceModeSupport" - case dnsSupport = "DnsSupport" - case ipv6Support = "Ipv6Support" - case securityGroupReferencingSupport = "SecurityGroupReferencingSupport" - } +extension EC2ClientTypes.CreateTransitGatewayVpcAttachmentRequestOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -32802,16 +23600,16 @@ extension EC2ClientTypes.CreateTransitGatewayVpcAttachmentRequestOptions: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dnsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsSupportValue.self, forKey: .dnsSupport) - dnsSupport = dnsSupportDecoded - let securityGroupReferencingSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SecurityGroupReferencingSupportValue.self, forKey: .securityGroupReferencingSupport) - securityGroupReferencingSupport = securityGroupReferencingSupportDecoded - let ipv6SupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ipv6SupportValue.self, forKey: .ipv6Support) - ipv6Support = ipv6SupportDecoded - let applianceModeSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ApplianceModeSupportValue.self, forKey: .applianceModeSupport) - applianceModeSupport = applianceModeSupportDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateTransitGatewayVpcAttachmentRequestOptions() + value.dnsSupport = try reader["DnsSupport"].readIfPresent() + value.securityGroupReferencingSupport = try reader["SecurityGroupReferencingSupport"].readIfPresent() + value.ipv6Support = try reader["Ipv6Support"].readIfPresent() + value.applianceModeSupport = try reader["ApplianceModeSupport"].readIfPresent() + return value + } } } @@ -32843,12 +23641,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CreateVerifiedAccessEndpointEniOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInterfaceId = "NetworkInterfaceId" - case port = "Port" - case `protocol` = "Protocol" - } +extension EC2ClientTypes.CreateVerifiedAccessEndpointEniOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -32863,14 +23656,15 @@ extension EC2ClientTypes.CreateVerifiedAccessEndpointEniOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateVerifiedAccessEndpointEniOptions() + value.networkInterfaceId = try reader["NetworkInterfaceId"].readIfPresent() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + return value + } } } @@ -33050,119 +23844,7 @@ public struct CreateVerifiedAccessEndpointInput: Swift.Equatable { } } -struct CreateVerifiedAccessEndpointInputBody: Swift.Equatable { - let verifiedAccessGroupId: Swift.String? - let endpointType: EC2ClientTypes.VerifiedAccessEndpointType? - let attachmentType: EC2ClientTypes.VerifiedAccessEndpointAttachmentType? - let domainCertificateArn: Swift.String? - let applicationDomain: Swift.String? - let endpointDomainPrefix: Swift.String? - let securityGroupIds: [Swift.String]? - let loadBalancerOptions: EC2ClientTypes.CreateVerifiedAccessEndpointLoadBalancerOptions? - let networkInterfaceOptions: EC2ClientTypes.CreateVerifiedAccessEndpointEniOptions? - let description: Swift.String? - let policyDocument: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let sseSpecification: EC2ClientTypes.VerifiedAccessSseSpecificationRequest? -} - -extension CreateVerifiedAccessEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationDomain = "ApplicationDomain" - case attachmentType = "AttachmentType" - case clientToken = "ClientToken" - case description = "Description" - case domainCertificateArn = "DomainCertificateArn" - case dryRun = "DryRun" - case endpointDomainPrefix = "EndpointDomainPrefix" - case endpointType = "EndpointType" - case loadBalancerOptions = "LoadBalancerOptions" - case networkInterfaceOptions = "NetworkInterfaceOptions" - case policyDocument = "PolicyDocument" - case securityGroupIds = "SecurityGroupId" - case sseSpecification = "SseSpecification" - case tagSpecifications = "TagSpecification" - case verifiedAccessGroupId = "VerifiedAccessGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointType.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let attachmentTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointAttachmentType.self, forKey: .attachmentType) - attachmentType = attachmentTypeDecoded - let domainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainCertificateArn) - domainCertificateArn = domainCertificateArnDecoded - let applicationDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationDomain) - applicationDomain = applicationDomainDecoded - let endpointDomainPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointDomainPrefix) - endpointDomainPrefix = endpointDomainPrefixDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let loadBalancerOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateVerifiedAccessEndpointLoadBalancerOptions.self, forKey: .loadBalancerOptions) - loadBalancerOptions = loadBalancerOptionsDecoded - let networkInterfaceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateVerifiedAccessEndpointEniOptions.self, forKey: .networkInterfaceOptions) - networkInterfaceOptions = networkInterfaceOptionsDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationRequest.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded - } -} - -extension EC2ClientTypes.CreateVerifiedAccessEndpointLoadBalancerOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerArn = "LoadBalancerArn" - case port = "Port" - case `protocol` = "Protocol" - case subnetIds = "SubnetId" - } +extension EC2ClientTypes.CreateVerifiedAccessEndpointLoadBalancerOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -33189,32 +23871,15 @@ extension EC2ClientTypes.CreateVerifiedAccessEndpointLoadBalancerOptions: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateVerifiedAccessEndpointLoadBalancerOptions() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.loadBalancerArn = try reader["LoadBalancerArn"].readIfPresent() + value.subnetIds = try reader["SubnetId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -33247,14 +23912,15 @@ extension EC2ClientTypes { } -extension CreateVerifiedAccessEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVerifiedAccessEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessEndpoint = output.verifiedAccessEndpoint - } else { - self.verifiedAccessEndpoint = nil +extension CreateVerifiedAccessEndpointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVerifiedAccessEndpointOutput() + value.verifiedAccessEndpoint = try reader["verifiedAccessEndpoint"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessEndpoint.readingClosure) + return value } } } @@ -33271,27 +23937,18 @@ public struct CreateVerifiedAccessEndpointOutput: Swift.Equatable { } } -struct CreateVerifiedAccessEndpointOutputBody: Swift.Equatable { - let verifiedAccessEndpoint: EC2ClientTypes.VerifiedAccessEndpoint? -} +enum CreateVerifiedAccessEndpointOutputError { -extension CreateVerifiedAccessEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessEndpoint = "verifiedAccessEndpoint" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpoint.self, forKey: .verifiedAccessEndpoint) - verifiedAccessEndpoint = verifiedAccessEndpointDecoded - } -} - -enum CreateVerifiedAccessEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -33378,71 +24035,15 @@ public struct CreateVerifiedAccessGroupInput: Swift.Equatable { } } -struct CreateVerifiedAccessGroupInputBody: Swift.Equatable { - let verifiedAccessInstanceId: Swift.String? - let description: Swift.String? - let policyDocument: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let sseSpecification: EC2ClientTypes.VerifiedAccessSseSpecificationRequest? -} - -extension CreateVerifiedAccessGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case policyDocument = "PolicyDocument" - case sseSpecification = "SseSpecification" - case tagSpecifications = "TagSpecification" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationRequest.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded - } -} - -extension CreateVerifiedAccessGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVerifiedAccessGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessGroup = output.verifiedAccessGroup - } else { - self.verifiedAccessGroup = nil +extension CreateVerifiedAccessGroupOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVerifiedAccessGroupOutput() + value.verifiedAccessGroup = try reader["verifiedAccessGroup"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessGroup.readingClosure) + return value } } } @@ -33459,27 +24060,18 @@ public struct CreateVerifiedAccessGroupOutput: Swift.Equatable { } } -struct CreateVerifiedAccessGroupOutputBody: Swift.Equatable { - let verifiedAccessGroup: EC2ClientTypes.VerifiedAccessGroup? -} - -extension CreateVerifiedAccessGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessGroup = "verifiedAccessGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessGroup.self, forKey: .verifiedAccessGroup) - verifiedAccessGroup = verifiedAccessGroupDecoded - } -} +enum CreateVerifiedAccessGroupOutputError { -enum CreateVerifiedAccessGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -33551,63 +24143,15 @@ public struct CreateVerifiedAccessInstanceInput: Swift.Equatable { } } -struct CreateVerifiedAccessInstanceInputBody: Swift.Equatable { - let description: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let fipsEnabled: Swift.Bool? -} - -extension CreateVerifiedAccessInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case fipsEnabled = "FIPSEnabled" - case tagSpecifications = "TagSpecification" - } +extension CreateVerifiedAccessInstanceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let fipsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .fipsEnabled) - fipsEnabled = fipsEnabledDecoded - } -} - -extension CreateVerifiedAccessInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVerifiedAccessInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessInstance = output.verifiedAccessInstance - } else { - self.verifiedAccessInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVerifiedAccessInstanceOutput() + value.verifiedAccessInstance = try reader["verifiedAccessInstance"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessInstance.readingClosure) + return value } } } @@ -33624,36 +24168,23 @@ public struct CreateVerifiedAccessInstanceOutput: Swift.Equatable { } } -struct CreateVerifiedAccessInstanceOutputBody: Swift.Equatable { - let verifiedAccessInstance: EC2ClientTypes.VerifiedAccessInstance? -} +enum CreateVerifiedAccessInstanceOutputError { -extension CreateVerifiedAccessInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessInstance = "verifiedAccessInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessInstance.self, forKey: .verifiedAccessInstance) - verifiedAccessInstance = verifiedAccessInstanceDecoded - } -} - -enum CreateVerifiedAccessInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.CreateVerifiedAccessTrustProviderDeviceOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicSigningKeyUrl = "PublicSigningKeyUrl" - case tenantId = "TenantId" - } +extension EC2ClientTypes.CreateVerifiedAccessTrustProviderDeviceOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -33665,12 +24196,14 @@ extension EC2ClientTypes.CreateVerifiedAccessTrustProviderDeviceOptions: Swift.C } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tenantIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantId) - tenantId = tenantIdDecoded - let publicSigningKeyUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicSigningKeyUrl) - publicSigningKeyUrl = publicSigningKeyUrlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateVerifiedAccessTrustProviderDeviceOptions() + value.tenantId = try reader["TenantId"].readIfPresent() + value.publicSigningKeyUrl = try reader["PublicSigningKeyUrl"].readIfPresent() + return value + } } } @@ -33805,89 +24338,7 @@ public struct CreateVerifiedAccessTrustProviderInput: Swift.Equatable { } } -struct CreateVerifiedAccessTrustProviderInputBody: Swift.Equatable { - let trustProviderType: EC2ClientTypes.TrustProviderType? - let userTrustProviderType: EC2ClientTypes.UserTrustProviderType? - let deviceTrustProviderType: EC2ClientTypes.DeviceTrustProviderType? - let oidcOptions: EC2ClientTypes.CreateVerifiedAccessTrustProviderOidcOptions? - let deviceOptions: EC2ClientTypes.CreateVerifiedAccessTrustProviderDeviceOptions? - let policyReferenceName: Swift.String? - let description: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let sseSpecification: EC2ClientTypes.VerifiedAccessSseSpecificationRequest? -} - -extension CreateVerifiedAccessTrustProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case deviceOptions = "DeviceOptions" - case deviceTrustProviderType = "DeviceTrustProviderType" - case dryRun = "DryRun" - case oidcOptions = "OidcOptions" - case policyReferenceName = "PolicyReferenceName" - case sseSpecification = "SseSpecification" - case tagSpecifications = "TagSpecification" - case trustProviderType = "TrustProviderType" - case userTrustProviderType = "UserTrustProviderType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrustProviderType.self, forKey: .trustProviderType) - trustProviderType = trustProviderTypeDecoded - let userTrustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UserTrustProviderType.self, forKey: .userTrustProviderType) - userTrustProviderType = userTrustProviderTypeDecoded - let deviceTrustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeviceTrustProviderType.self, forKey: .deviceTrustProviderType) - deviceTrustProviderType = deviceTrustProviderTypeDecoded - let oidcOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateVerifiedAccessTrustProviderOidcOptions.self, forKey: .oidcOptions) - oidcOptions = oidcOptionsDecoded - let deviceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateVerifiedAccessTrustProviderDeviceOptions.self, forKey: .deviceOptions) - deviceOptions = deviceOptionsDecoded - let policyReferenceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyReferenceName) - policyReferenceName = policyReferenceNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationRequest.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded - } -} - -extension EC2ClientTypes.CreateVerifiedAccessTrustProviderOidcOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authorizationEndpoint = "AuthorizationEndpoint" - case clientId = "ClientId" - case clientSecret = "ClientSecret" - case issuer = "Issuer" - case scope = "Scope" - case tokenEndpoint = "TokenEndpoint" - case userInfoEndpoint = "UserInfoEndpoint" - } +extension EC2ClientTypes.CreateVerifiedAccessTrustProviderOidcOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -33914,22 +24365,19 @@ extension EC2ClientTypes.CreateVerifiedAccessTrustProviderOidcOptions: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let issuerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .issuer) - issuer = issuerDecoded - let authorizationEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authorizationEndpoint) - authorizationEndpoint = authorizationEndpointDecoded - let tokenEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tokenEndpoint) - tokenEndpoint = tokenEndpointDecoded - let userInfoEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userInfoEndpoint) - userInfoEndpoint = userInfoEndpointDecoded - let clientIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientId) - clientId = clientIdDecoded - let clientSecretDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientSecret) - clientSecret = clientSecretDecoded - let scopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scope) - scope = scopeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateVerifiedAccessTrustProviderOidcOptions() + value.issuer = try reader["Issuer"].readIfPresent() + value.authorizationEndpoint = try reader["AuthorizationEndpoint"].readIfPresent() + value.tokenEndpoint = try reader["TokenEndpoint"].readIfPresent() + value.userInfoEndpoint = try reader["UserInfoEndpoint"].readIfPresent() + value.clientId = try reader["ClientId"].readIfPresent() + value.clientSecret = try reader["ClientSecret"].readIfPresent() + value.scope = try reader["Scope"].readIfPresent() + return value + } } } @@ -33978,14 +24426,15 @@ extension EC2ClientTypes { } -extension CreateVerifiedAccessTrustProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVerifiedAccessTrustProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessTrustProvider = output.verifiedAccessTrustProvider - } else { - self.verifiedAccessTrustProvider = nil +extension CreateVerifiedAccessTrustProviderOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVerifiedAccessTrustProviderOutput() + value.verifiedAccessTrustProvider = try reader["verifiedAccessTrustProvider"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessTrustProvider.readingClosure) + return value } } } @@ -34002,27 +24451,18 @@ public struct CreateVerifiedAccessTrustProviderOutput: Swift.Equatable { } } -struct CreateVerifiedAccessTrustProviderOutputBody: Swift.Equatable { - let verifiedAccessTrustProvider: EC2ClientTypes.VerifiedAccessTrustProvider? -} - -extension CreateVerifiedAccessTrustProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessTrustProvider = "verifiedAccessTrustProvider" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessTrustProvider.self, forKey: .verifiedAccessTrustProvider) - verifiedAccessTrustProvider = verifiedAccessTrustProviderDecoded - } -} +enum CreateVerifiedAccessTrustProviderOutputError { -enum CreateVerifiedAccessTrustProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -34194,127 +24634,31 @@ public struct CreateVolumeInput: Swift.Equatable { } } -struct CreateVolumeInputBody: Swift.Equatable { - let availabilityZone: Swift.String? - let encrypted: Swift.Bool? - let iops: Swift.Int? - let kmsKeyId: Swift.String? - let outpostArn: Swift.String? - let size: Swift.Int? - let snapshotId: Swift.String? - let volumeType: EC2ClientTypes.VolumeType? - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let multiAttachEnabled: Swift.Bool? - let throughput: Swift.Int? - let clientToken: Swift.String? -} - -extension CreateVolumeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "AvailabilityZone" - case clientToken = "ClientToken" - case dryRun = "dryRun" - case encrypted = "encrypted" - case iops = "Iops" - case kmsKeyId = "KmsKeyId" - case multiAttachEnabled = "MultiAttachEnabled" - case outpostArn = "OutpostArn" - case size = "Size" - case snapshotId = "SnapshotId" - case tagSpecifications = "TagSpecification" - case throughput = "Throughput" - case volumeType = "VolumeType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let volumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .volumeType) - volumeType = volumeTypeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let multiAttachEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAttachEnabled) - multiAttachEnabled = multiAttachEnabledDecoded - let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) - throughput = throughputDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension CreateVolumeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVolumeOutputBody = try responseDecoder.decode(responseBody: data) - self.attachments = output.attachments - self.availabilityZone = output.availabilityZone - self.createTime = output.createTime - self.encrypted = output.encrypted - self.fastRestored = output.fastRestored - self.iops = output.iops - self.kmsKeyId = output.kmsKeyId - self.multiAttachEnabled = output.multiAttachEnabled - self.outpostArn = output.outpostArn - self.size = output.size - self.snapshotId = output.snapshotId - self.sseType = output.sseType - self.state = output.state - self.tags = output.tags - self.throughput = output.throughput - self.volumeId = output.volumeId - self.volumeType = output.volumeType - } else { - self.attachments = nil - self.availabilityZone = nil - self.createTime = nil - self.encrypted = nil - self.fastRestored = nil - self.iops = nil - self.kmsKeyId = nil - self.multiAttachEnabled = nil - self.outpostArn = nil - self.size = nil - self.snapshotId = nil - self.sseType = nil - self.state = nil - self.tags = nil - self.throughput = nil - self.volumeId = nil - self.volumeType = nil +extension CreateVolumeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVolumeOutput() + value.attachments = try reader["attachmentSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VolumeAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.encrypted = try reader["encrypted"].readIfPresent() + value.fastRestored = try reader["fastRestored"].readIfPresent() + value.iops = try reader["iops"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.multiAttachEnabled = try reader["multiAttachEnabled"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.size = try reader["size"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.sseType = try reader["sseType"].readIfPresent() + value.state = try reader["status"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.throughput = try reader["throughput"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + value.volumeType = try reader["volumeType"].readIfPresent() + return value } } } @@ -34396,134 +24740,23 @@ public struct CreateVolumeOutput: Swift.Equatable { } } -struct CreateVolumeOutputBody: Swift.Equatable { - let attachments: [EC2ClientTypes.VolumeAttachment]? - let availabilityZone: Swift.String? - let createTime: ClientRuntime.Date? - let encrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let outpostArn: Swift.String? - let size: Swift.Int? - let snapshotId: Swift.String? - let state: EC2ClientTypes.VolumeState? - let volumeId: Swift.String? - let iops: Swift.Int? - let tags: [EC2ClientTypes.Tag]? - let volumeType: EC2ClientTypes.VolumeType? - let fastRestored: Swift.Bool? - let multiAttachEnabled: Swift.Bool? - let throughput: Swift.Int? - let sseType: EC2ClientTypes.SSEType? -} - -extension CreateVolumeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachments = "attachmentSet" - case availabilityZone = "availabilityZone" - case createTime = "createTime" - case encrypted = "encrypted" - case fastRestored = "fastRestored" - case iops = "iops" - case kmsKeyId = "kmsKeyId" - case multiAttachEnabled = "multiAttachEnabled" - case outpostArn = "outpostArn" - case size = "size" - case snapshotId = "snapshotId" - case sseType = "sseType" - case state = "status" - case tags = "tagSet" - case throughput = "throughput" - case volumeId = "volumeId" - case volumeType = "volumeType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.attachments) { - struct KeyVal0{struct item{}} - let attachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachments) - if let attachmentsWrappedContainer = attachmentsWrappedContainer { - let attachmentsContainer = try attachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.VolumeAttachment].self, forKey: .member) - var attachmentsBuffer:[EC2ClientTypes.VolumeAttachment]? = nil - if let attachmentsContainer = attachmentsContainer { - attachmentsBuffer = [EC2ClientTypes.VolumeAttachment]() - for structureContainer0 in attachmentsContainer { - attachmentsBuffer?.append(structureContainer0) - } - } - attachments = attachmentsBuffer - } else { - attachments = [] - } - } else { - attachments = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeState.self, forKey: .state) - state = stateDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let volumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .volumeType) - volumeType = volumeTypeDecoded - let fastRestoredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .fastRestored) - fastRestored = fastRestoredDecoded - let multiAttachEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAttachEnabled) - multiAttachEnabled = multiAttachEnabledDecoded - let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) - throughput = throughputDecoded - let sseTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SSEType.self, forKey: .sseType) - sseType = sseTypeDecoded - } -} - -enum CreateVolumeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.CreateVolumePermission: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case group = "group" - case userId = "userId" +enum CreateVolumeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } + } } +} + +extension EC2ClientTypes.CreateVolumePermission: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -34535,12 +24768,14 @@ extension EC2ClientTypes.CreateVolumePermission: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PermissionGroup.self, forKey: .group) - group = groupDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateVolumePermission() + value.group = try reader["group"].readIfPresent() + value.userId = try reader["userId"].readIfPresent() + return value + } } } @@ -34564,11 +24799,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CreateVolumePermissionModifications: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case add = "Add" - case remove = "Remove" - } +extension EC2ClientTypes.CreateVolumePermissionModifications: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -34598,45 +24829,13 @@ extension EC2ClientTypes.CreateVolumePermissionModifications: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.add) { - struct KeyVal0{struct item{}} - let addWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .add) - if let addWrappedContainer = addWrappedContainer { - let addContainer = try addWrappedContainer.decodeIfPresent([EC2ClientTypes.CreateVolumePermission].self, forKey: .member) - var addBuffer:[EC2ClientTypes.CreateVolumePermission]? = nil - if let addContainer = addContainer { - addBuffer = [EC2ClientTypes.CreateVolumePermission]() - for structureContainer0 in addContainer { - addBuffer?.append(structureContainer0) - } - } - add = addBuffer - } else { - add = [] - } - } else { - add = nil - } - if containerValues.contains(.remove) { - struct KeyVal0{struct item{}} - let removeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .remove) - if let removeWrappedContainer = removeWrappedContainer { - let removeContainer = try removeWrappedContainer.decodeIfPresent([EC2ClientTypes.CreateVolumePermission].self, forKey: .member) - var removeBuffer:[EC2ClientTypes.CreateVolumePermission]? = nil - if let removeContainer = removeContainer { - removeBuffer = [EC2ClientTypes.CreateVolumePermission]() - for structureContainer0 in removeContainer { - removeBuffer?.append(structureContainer0) - } - } - remove = removeBuffer - } else { - remove = [] - } - } else { - remove = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreateVolumePermissionModifications() + value.add = try reader["Add"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CreateVolumePermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.remove = try reader["Remove"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CreateVolumePermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -34737,69 +24936,16 @@ public struct CreateVpcEndpointConnectionNotificationInput: Swift.Equatable { } } -struct CreateVpcEndpointConnectionNotificationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceId: Swift.String? - let vpcEndpointId: Swift.String? - let connectionNotificationArn: Swift.String? - let connectionEvents: [Swift.String]? - let clientToken: Swift.String? -} - -extension CreateVpcEndpointConnectionNotificationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case connectionEvents = "ConnectionEvents" - case connectionNotificationArn = "ConnectionNotificationArn" - case dryRun = "DryRun" - case serviceId = "ServiceId" - case vpcEndpointId = "VpcEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - let vpcEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointId) - vpcEndpointId = vpcEndpointIdDecoded - let connectionNotificationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionNotificationArn) - connectionNotificationArn = connectionNotificationArnDecoded - if containerValues.contains(.connectionEvents) { - struct KeyVal0{struct item{}} - let connectionEventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .connectionEvents) - if let connectionEventsWrappedContainer = connectionEventsWrappedContainer { - let connectionEventsContainer = try connectionEventsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var connectionEventsBuffer:[Swift.String]? = nil - if let connectionEventsContainer = connectionEventsContainer { - connectionEventsBuffer = [Swift.String]() - for stringContainer0 in connectionEventsContainer { - connectionEventsBuffer?.append(stringContainer0) - } - } - connectionEvents = connectionEventsBuffer - } else { - connectionEvents = [] - } - } else { - connectionEvents = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +extension CreateVpcEndpointConnectionNotificationOutput { -extension CreateVpcEndpointConnectionNotificationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVpcEndpointConnectionNotificationOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.connectionNotification = output.connectionNotification - } else { - self.clientToken = nil - self.connectionNotification = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVpcEndpointConnectionNotificationOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.connectionNotification = try reader["connectionNotification"].readIfPresent(readingClosure: EC2ClientTypes.ConnectionNotification.readingClosure) + return value } } } @@ -34820,31 +24966,18 @@ public struct CreateVpcEndpointConnectionNotificationOutput: Swift.Equatable { } } -struct CreateVpcEndpointConnectionNotificationOutputBody: Swift.Equatable { - let connectionNotification: EC2ClientTypes.ConnectionNotification? - let clientToken: Swift.String? -} - -extension CreateVpcEndpointConnectionNotificationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case connectionNotification = "connectionNotification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let connectionNotificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionNotification.self, forKey: .connectionNotification) - connectionNotification = connectionNotificationDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +enum CreateVpcEndpointConnectionNotificationOutputError { -enum CreateVpcEndpointConnectionNotificationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -35017,169 +25150,16 @@ public struct CreateVpcEndpointInput: Swift.Equatable { } } -struct CreateVpcEndpointInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcEndpointType: EC2ClientTypes.VpcEndpointType? - let vpcId: Swift.String? - let serviceName: Swift.String? - let policyDocument: Swift.String? - let routeTableIds: [Swift.String]? - let subnetIds: [Swift.String]? - let securityGroupIds: [Swift.String]? - let ipAddressType: EC2ClientTypes.IpAddressType? - let dnsOptions: EC2ClientTypes.DnsOptionsSpecification? - let clientToken: Swift.String? - let privateDnsEnabled: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let subnetConfigurations: [EC2ClientTypes.SubnetConfiguration]? -} - -extension CreateVpcEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dnsOptions = "DnsOptions" - case dryRun = "DryRun" - case ipAddressType = "IpAddressType" - case policyDocument = "PolicyDocument" - case privateDnsEnabled = "PrivateDnsEnabled" - case routeTableIds = "RouteTableId" - case securityGroupIds = "SecurityGroupId" - case serviceName = "ServiceName" - case subnetConfigurations = "SubnetConfiguration" - case subnetIds = "SubnetId" - case tagSpecifications = "TagSpecification" - case vpcEndpointType = "VpcEndpointType" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcEndpointTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcEndpointType.self, forKey: .vpcEndpointType) - vpcEndpointType = vpcEndpointTypeDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - if containerValues.contains(.routeTableIds) { - struct KeyVal0{struct item{}} - let routeTableIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routeTableIds) - if let routeTableIdsWrappedContainer = routeTableIdsWrappedContainer { - let routeTableIdsContainer = try routeTableIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var routeTableIdsBuffer:[Swift.String]? = nil - if let routeTableIdsContainer = routeTableIdsContainer { - routeTableIdsBuffer = [Swift.String]() - for stringContainer0 in routeTableIdsContainer { - routeTableIdsBuffer?.append(stringContainer0) - } - } - routeTableIds = routeTableIdsBuffer - } else { - routeTableIds = [] - } - } else { - routeTableIds = nil - } - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let dnsOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsOptionsSpecification.self, forKey: .dnsOptions) - dnsOptions = dnsOptionsDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let privateDnsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .privateDnsEnabled) - privateDnsEnabled = privateDnsEnabledDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - if containerValues.contains(.subnetConfigurations) { - struct KeyVal0{struct item{}} - let subnetConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetConfigurations) - if let subnetConfigurationsWrappedContainer = subnetConfigurationsWrappedContainer { - let subnetConfigurationsContainer = try subnetConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.SubnetConfiguration].self, forKey: .member) - var subnetConfigurationsBuffer:[EC2ClientTypes.SubnetConfiguration]? = nil - if let subnetConfigurationsContainer = subnetConfigurationsContainer { - subnetConfigurationsBuffer = [EC2ClientTypes.SubnetConfiguration]() - for structureContainer0 in subnetConfigurationsContainer { - subnetConfigurationsBuffer?.append(structureContainer0) - } - } - subnetConfigurations = subnetConfigurationsBuffer - } else { - subnetConfigurations = [] - } - } else { - subnetConfigurations = nil - } - } -} - -extension CreateVpcEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVpcEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.vpcEndpoint = output.vpcEndpoint - } else { - self.clientToken = nil - self.vpcEndpoint = nil +extension CreateVpcEndpointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVpcEndpointOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.vpcEndpoint = try reader["vpcEndpoint"].readIfPresent(readingClosure: EC2ClientTypes.VpcEndpoint.readingClosure) + return value } } } @@ -35200,31 +25180,18 @@ public struct CreateVpcEndpointOutput: Swift.Equatable { } } -struct CreateVpcEndpointOutputBody: Swift.Equatable { - let vpcEndpoint: EC2ClientTypes.VpcEndpoint? - let clientToken: Swift.String? -} +enum CreateVpcEndpointOutputError { -extension CreateVpcEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case vpcEndpoint = "vpcEndpoint" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcEndpoint.self, forKey: .vpcEndpoint) - vpcEndpoint = vpcEndpointDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -enum CreateVpcEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -35344,128 +25311,16 @@ public struct CreateVpcEndpointServiceConfigurationInput: Swift.Equatable { } } -struct CreateVpcEndpointServiceConfigurationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let acceptanceRequired: Swift.Bool? - let privateDnsName: Swift.String? - let networkLoadBalancerArns: [Swift.String]? - let gatewayLoadBalancerArns: [Swift.String]? - let supportedIpAddressTypes: [Swift.String]? - let clientToken: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateVpcEndpointServiceConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acceptanceRequired = "AcceptanceRequired" - case clientToken = "ClientToken" - case dryRun = "DryRun" - case gatewayLoadBalancerArns = "GatewayLoadBalancerArn" - case networkLoadBalancerArns = "NetworkLoadBalancerArn" - case privateDnsName = "PrivateDnsName" - case supportedIpAddressTypes = "SupportedIpAddressType" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let acceptanceRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .acceptanceRequired) - acceptanceRequired = acceptanceRequiredDecoded - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - if containerValues.contains(.networkLoadBalancerArns) { - struct KeyVal0{struct item{}} - let networkLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkLoadBalancerArns) - if let networkLoadBalancerArnsWrappedContainer = networkLoadBalancerArnsWrappedContainer { - let networkLoadBalancerArnsContainer = try networkLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkLoadBalancerArnsBuffer:[Swift.String]? = nil - if let networkLoadBalancerArnsContainer = networkLoadBalancerArnsContainer { - networkLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in networkLoadBalancerArnsContainer { - networkLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - networkLoadBalancerArns = networkLoadBalancerArnsBuffer - } else { - networkLoadBalancerArns = [] - } - } else { - networkLoadBalancerArns = nil - } - if containerValues.contains(.gatewayLoadBalancerArns) { - struct KeyVal0{struct item{}} - let gatewayLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .gatewayLoadBalancerArns) - if let gatewayLoadBalancerArnsWrappedContainer = gatewayLoadBalancerArnsWrappedContainer { - let gatewayLoadBalancerArnsContainer = try gatewayLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var gatewayLoadBalancerArnsBuffer:[Swift.String]? = nil - if let gatewayLoadBalancerArnsContainer = gatewayLoadBalancerArnsContainer { - gatewayLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in gatewayLoadBalancerArnsContainer { - gatewayLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - gatewayLoadBalancerArns = gatewayLoadBalancerArnsBuffer - } else { - gatewayLoadBalancerArns = [] - } - } else { - gatewayLoadBalancerArns = nil - } - if containerValues.contains(.supportedIpAddressTypes) { - struct KeyVal0{struct item{}} - let supportedIpAddressTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedIpAddressTypes) - if let supportedIpAddressTypesWrappedContainer = supportedIpAddressTypesWrappedContainer { - let supportedIpAddressTypesContainer = try supportedIpAddressTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedIpAddressTypesBuffer:[Swift.String]? = nil - if let supportedIpAddressTypesContainer = supportedIpAddressTypesContainer { - supportedIpAddressTypesBuffer = [Swift.String]() - for stringContainer0 in supportedIpAddressTypesContainer { - supportedIpAddressTypesBuffer?.append(stringContainer0) - } - } - supportedIpAddressTypes = supportedIpAddressTypesBuffer - } else { - supportedIpAddressTypes = [] - } - } else { - supportedIpAddressTypes = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension CreateVpcEndpointServiceConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVpcEndpointServiceConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.serviceConfiguration = output.serviceConfiguration - } else { - self.clientToken = nil - self.serviceConfiguration = nil +extension CreateVpcEndpointServiceConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVpcEndpointServiceConfigurationOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.serviceConfiguration = try reader["serviceConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.ServiceConfiguration.readingClosure) + return value } } } @@ -35486,31 +25341,18 @@ public struct CreateVpcEndpointServiceConfigurationOutput: Swift.Equatable { } } -struct CreateVpcEndpointServiceConfigurationOutputBody: Swift.Equatable { - let serviceConfiguration: EC2ClientTypes.ServiceConfiguration? - let clientToken: Swift.String? -} +enum CreateVpcEndpointServiceConfigurationOutputError { -extension CreateVpcEndpointServiceConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case serviceConfiguration = "serviceConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ServiceConfiguration.self, forKey: .serviceConfiguration) - serviceConfiguration = serviceConfigurationDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -enum CreateVpcEndpointServiceConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -35631,91 +25473,15 @@ public struct CreateVpcInput: Swift.Equatable { } } -struct CreateVpcInputBody: Swift.Equatable { - let cidrBlock: Swift.String? - let amazonProvidedIpv6CidrBlock: Swift.Bool? - let ipv6Pool: Swift.String? - let ipv6CidrBlock: Swift.String? - let ipv4IpamPoolId: Swift.String? - let ipv4NetmaskLength: Swift.Int? - let ipv6IpamPoolId: Swift.String? - let ipv6NetmaskLength: Swift.Int? - let dryRun: Swift.Bool? - let instanceTenancy: EC2ClientTypes.Tenancy? - let ipv6CidrBlockNetworkBorderGroup: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateVpcInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amazonProvidedIpv6CidrBlock = "amazonProvidedIpv6CidrBlock" - case cidrBlock = "CidrBlock" - case dryRun = "dryRun" - case instanceTenancy = "instanceTenancy" - case ipv4IpamPoolId = "Ipv4IpamPoolId" - case ipv4NetmaskLength = "Ipv4NetmaskLength" - case ipv6CidrBlock = "Ipv6CidrBlock" - case ipv6CidrBlockNetworkBorderGroup = "Ipv6CidrBlockNetworkBorderGroup" - case ipv6IpamPoolId = "Ipv6IpamPoolId" - case ipv6NetmaskLength = "Ipv6NetmaskLength" - case ipv6Pool = "Ipv6Pool" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let amazonProvidedIpv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .amazonProvidedIpv6CidrBlock) - amazonProvidedIpv6CidrBlock = amazonProvidedIpv6CidrBlockDecoded - let ipv6PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Pool) - ipv6Pool = ipv6PoolDecoded - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let ipv4IpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv4IpamPoolId) - ipv4IpamPoolId = ipv4IpamPoolIdDecoded - let ipv4NetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4NetmaskLength) - ipv4NetmaskLength = ipv4NetmaskLengthDecoded - let ipv6IpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6IpamPoolId) - ipv6IpamPoolId = ipv6IpamPoolIdDecoded - let ipv6NetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6NetmaskLength) - ipv6NetmaskLength = ipv6NetmaskLengthDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceTenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .instanceTenancy) - instanceTenancy = instanceTenancyDecoded - let ipv6CidrBlockNetworkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlockNetworkBorderGroup) - ipv6CidrBlockNetworkBorderGroup = ipv6CidrBlockNetworkBorderGroupDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension CreateVpcOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVpcOutputBody = try responseDecoder.decode(responseBody: data) - self.vpc = output.vpc - } else { - self.vpc = nil +extension CreateVpcOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVpcOutput() + value.vpc = try reader["vpc"].readIfPresent(readingClosure: EC2ClientTypes.Vpc.readingClosure) + return value } } } @@ -35732,27 +25498,18 @@ public struct CreateVpcOutput: Swift.Equatable { } } -struct CreateVpcOutputBody: Swift.Equatable { - let vpc: EC2ClientTypes.Vpc? -} - -extension CreateVpcOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpc = "vpc" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Vpc.self, forKey: .vpc) - vpc = vpcDecoded - } -} +enum CreateVpcOutputError { -enum CreateVpcOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -35832,67 +25589,15 @@ public struct CreateVpcPeeringConnectionInput: Swift.Equatable { } } -struct CreateVpcPeeringConnectionInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let peerOwnerId: Swift.String? - let peerVpcId: Swift.String? - let vpcId: Swift.String? - let peerRegion: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateVpcPeeringConnectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case peerOwnerId = "peerOwnerId" - case peerRegion = "PeerRegion" - case peerVpcId = "peerVpcId" - case tagSpecifications = "TagSpecification" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let peerOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerOwnerId) - peerOwnerId = peerOwnerIdDecoded - let peerVpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerVpcId) - peerVpcId = peerVpcIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let peerRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerRegion) - peerRegion = peerRegionDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} +extension CreateVpcPeeringConnectionOutput { -extension CreateVpcPeeringConnectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVpcPeeringConnectionOutputBody = try responseDecoder.decode(responseBody: data) - self.vpcPeeringConnection = output.vpcPeeringConnection - } else { - self.vpcPeeringConnection = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVpcPeeringConnectionOutput() + value.vpcPeeringConnection = try reader["vpcPeeringConnection"].readIfPresent(readingClosure: EC2ClientTypes.VpcPeeringConnection.readingClosure) + return value } } } @@ -35909,27 +25614,18 @@ public struct CreateVpcPeeringConnectionOutput: Swift.Equatable { } } -struct CreateVpcPeeringConnectionOutputBody: Swift.Equatable { - let vpcPeeringConnection: EC2ClientTypes.VpcPeeringConnection? -} - -extension CreateVpcPeeringConnectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpcPeeringConnection = "vpcPeeringConnection" - } +enum CreateVpcPeeringConnectionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcPeeringConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcPeeringConnection.self, forKey: .vpcPeeringConnection) - vpcPeeringConnection = vpcPeeringConnectionDecoded - } -} - -enum CreateVpcPeeringConnectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -36018,71 +25714,15 @@ public struct CreateVpnConnectionInput: Swift.Equatable { } } -struct CreateVpnConnectionInputBody: Swift.Equatable { - let customerGatewayId: Swift.String? - let type: Swift.String? - let vpnGatewayId: Swift.String? - let transitGatewayId: Swift.String? - let dryRun: Swift.Bool? - let options: EC2ClientTypes.VpnConnectionOptionsSpecification? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension CreateVpnConnectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerGatewayId = "CustomerGatewayId" - case dryRun = "dryRun" - case options = "options" - case tagSpecifications = "TagSpecification" - case transitGatewayId = "TransitGatewayId" - case type = "Type" - case vpnGatewayId = "VpnGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerGatewayId) - customerGatewayId = customerGatewayIdDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let vpnGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnGatewayId) - vpnGatewayId = vpnGatewayIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnConnectionOptionsSpecification.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension CreateVpnConnectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVpnConnectionOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnConnection = output.vpnConnection - } else { - self.vpnConnection = nil +extension CreateVpnConnectionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVpnConnectionOutput() + value.vpnConnection = try reader["vpnConnection"].readIfPresent(readingClosure: EC2ClientTypes.VpnConnection.readingClosure) + return value } } } @@ -36100,27 +25740,18 @@ public struct CreateVpnConnectionOutput: Swift.Equatable { } } -struct CreateVpnConnectionOutputBody: Swift.Equatable { - let vpnConnection: EC2ClientTypes.VpnConnection? -} - -extension CreateVpnConnectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnConnection = "vpnConnection" - } +enum CreateVpnConnectionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnConnection.self, forKey: .vpnConnection) - vpnConnection = vpnConnectionDecoded - } -} - -enum CreateVpnConnectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -36165,28 +25796,12 @@ public struct CreateVpnConnectionRouteInput: Swift.Equatable { } } -struct CreateVpnConnectionRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let vpnConnectionId: Swift.String? -} - -extension CreateVpnConnectionRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "DestinationCidrBlock" - case vpnConnectionId = "VpnConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - } -} +extension CreateVpnConnectionRouteOutput { -extension CreateVpnConnectionRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateVpnConnectionRouteOutput() + } } } @@ -36195,11 +25810,18 @@ public struct CreateVpnConnectionRouteOutput: Swift.Equatable { public init() { } } -enum CreateVpnConnectionRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum CreateVpnConnectionRouteOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -36273,63 +25895,15 @@ public struct CreateVpnGatewayInput: Swift.Equatable { } } -struct CreateVpnGatewayInputBody: Swift.Equatable { - let availabilityZone: Swift.String? - let type: EC2ClientTypes.GatewayType? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let amazonSideAsn: Swift.Int? - let dryRun: Swift.Bool? -} - -extension CreateVpnGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amazonSideAsn = "AmazonSideAsn" - case availabilityZone = "AvailabilityZone" - case dryRun = "dryRun" - case tagSpecifications = "TagSpecification" - case type = "Type" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.GatewayType.self, forKey: .type) - type = typeDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let amazonSideAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amazonSideAsn) - amazonSideAsn = amazonSideAsnDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension CreateVpnGatewayOutput { -extension CreateVpnGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVpnGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnGateway = output.vpnGateway - } else { - self.vpnGateway = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVpnGatewayOutput() + value.vpnGateway = try reader["vpnGateway"].readIfPresent(readingClosure: EC2ClientTypes.VpnGateway.readingClosure) + return value } } } @@ -36347,35 +25921,23 @@ public struct CreateVpnGatewayOutput: Swift.Equatable { } } -struct CreateVpnGatewayOutputBody: Swift.Equatable { - let vpnGateway: EC2ClientTypes.VpnGateway? -} - -extension CreateVpnGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnGateway = "vpnGateway" - } +enum CreateVpnGatewayOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnGateway.self, forKey: .vpnGateway) - vpnGateway = vpnGatewayDecoded - } -} - -enum CreateVpnGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.CreditSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cpuCredits = "cpuCredits" - } +extension EC2ClientTypes.CreditSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -36384,10 +25946,13 @@ extension EC2ClientTypes.CreditSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cpuCreditsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cpuCredits) - cpuCredits = cpuCreditsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreditSpecification() + value.cpuCredits = try reader["cpuCredits"].readIfPresent() + return value + } } } @@ -36407,10 +25972,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.CreditSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cpuCredits = "CpuCredits" - } +extension EC2ClientTypes.CreditSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -36419,10 +25981,13 @@ extension EC2ClientTypes.CreditSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cpuCreditsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cpuCredits) - cpuCredits = cpuCreditsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CreditSpecificationRequest() + value.cpuCredits = try reader["CpuCredits"].readIfPresent() + return value + } } } @@ -36472,17 +26037,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.CustomerGateway: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bgpAsn = "bgpAsn" - case certificateArn = "certificateArn" - case customerGatewayId = "customerGatewayId" - case deviceName = "deviceName" - case ipAddress = "ipAddress" - case state = "state" - case tags = "tagSet" - case type = "type" - } +extension EC2ClientTypes.CustomerGateway: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -36521,40 +26076,19 @@ extension EC2ClientTypes.CustomerGateway: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bgpAsnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bgpAsn) - bgpAsn = bgpAsnDecoded - let customerGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerGatewayId) - customerGatewayId = customerGatewayIdDecoded - let ipAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddress) - ipAddress = ipAddressDecoded - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.CustomerGateway() + value.bgpAsn = try reader["bgpAsn"].readIfPresent() + value.customerGatewayId = try reader["customerGatewayId"].readIfPresent() + value.ipAddress = try reader["ipAddress"].readIfPresent() + value.certificateArn = try reader["certificateArn"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.deviceName = try reader["deviceName"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -36603,15 +26137,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DataQuery: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "Destination" - case id = "Id" - case metric = "Metric" - case period = "Period" - case source = "Source" - case statistic = "Statistic" - } +extension EC2ClientTypes.DataQuery: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -36635,20 +26161,18 @@ extension EC2ClientTypes.DataQuery: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) - destination = destinationDecoded - let metricDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MetricType.self, forKey: .metric) - metric = metricDecoded - let statisticDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StatisticType.self, forKey: .statistic) - statistic = statisticDecoded - let periodDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeriodType.self, forKey: .period) - period = periodDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DataQuery() + value.id = try reader["Id"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.destination = try reader["Destination"].readIfPresent() + value.metric = try reader["Metric"].readIfPresent() + value.statistic = try reader["Statistic"].readIfPresent() + value.period = try reader["Period"].readIfPresent() + return value + } } } @@ -36688,16 +26212,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DataResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "destination" - case id = "id" - case metric = "metric" - case metricPoints = "metricPointSet" - case period = "period" - case source = "source" - case statistic = "statistic" - } +extension EC2ClientTypes.DataResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -36733,38 +26248,18 @@ extension EC2ClientTypes.DataResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) - destination = destinationDecoded - let metricDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MetricType.self, forKey: .metric) - metric = metricDecoded - let statisticDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StatisticType.self, forKey: .statistic) - statistic = statisticDecoded - let periodDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeriodType.self, forKey: .period) - period = periodDecoded - if containerValues.contains(.metricPoints) { - struct KeyVal0{struct item{}} - let metricPointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metricPoints) - if let metricPointsWrappedContainer = metricPointsWrappedContainer { - let metricPointsContainer = try metricPointsWrappedContainer.decodeIfPresent([EC2ClientTypes.MetricPoint].self, forKey: .member) - var metricPointsBuffer:[EC2ClientTypes.MetricPoint]? = nil - if let metricPointsContainer = metricPointsContainer { - metricPointsBuffer = [EC2ClientTypes.MetricPoint]() - for structureContainer0 in metricPointsContainer { - metricPointsBuffer?.append(structureContainer0) - } - } - metricPoints = metricPointsBuffer - } else { - metricPoints = [] - } - } else { - metricPoints = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DataResponse() + value.id = try reader["id"].readIfPresent() + value.source = try reader["source"].readIfPresent() + value.destination = try reader["destination"].readIfPresent() + value.metric = try reader["metric"].readIfPresent() + value.statistic = try reader["statistic"].readIfPresent() + value.period = try reader["period"].readIfPresent() + value.metricPoints = try reader["metricPointSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.MetricPoint.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -36978,34 +26473,15 @@ public struct DeleteCarrierGatewayInput: Swift.Equatable { } } -struct DeleteCarrierGatewayInputBody: Swift.Equatable { - let carrierGatewayId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteCarrierGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGatewayId = "CarrierGatewayId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let carrierGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierGatewayId) - carrierGatewayId = carrierGatewayIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteCarrierGatewayOutput { -extension DeleteCarrierGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteCarrierGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.carrierGateway = output.carrierGateway - } else { - self.carrierGateway = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteCarrierGatewayOutput() + value.carrierGateway = try reader["carrierGateway"].readIfPresent(readingClosure: EC2ClientTypes.CarrierGateway.readingClosure) + return value } } } @@ -37022,27 +26498,18 @@ public struct DeleteCarrierGatewayOutput: Swift.Equatable { } } -struct DeleteCarrierGatewayOutputBody: Swift.Equatable { - let carrierGateway: EC2ClientTypes.CarrierGateway? -} +enum DeleteCarrierGatewayOutputError { -extension DeleteCarrierGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGateway = "carrierGateway" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let carrierGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CarrierGateway.self, forKey: .carrierGateway) - carrierGateway = carrierGatewayDecoded - } -} - -enum DeleteCarrierGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -37085,34 +26552,15 @@ public struct DeleteClientVpnEndpointInput: Swift.Equatable { } } -struct DeleteClientVpnEndpointInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteClientVpnEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - } +extension DeleteClientVpnEndpointOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteClientVpnEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteClientVpnEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.status = output.status - } else { - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteClientVpnEndpointOutput() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnEndpointStatus.readingClosure) + return value } } } @@ -37129,27 +26577,18 @@ public struct DeleteClientVpnEndpointOutput: Swift.Equatable { } } -struct DeleteClientVpnEndpointOutputBody: Swift.Equatable { - let status: EC2ClientTypes.ClientVpnEndpointStatus? -} - -extension DeleteClientVpnEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnEndpointStatus.self, forKey: .status) - status = statusDecoded - } -} +enum DeleteClientVpnEndpointOutputError { -enum DeleteClientVpnEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -37207,42 +26646,15 @@ public struct DeleteClientVpnRouteInput: Swift.Equatable { } } -struct DeleteClientVpnRouteInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let targetVpcSubnetId: Swift.String? - let destinationCidrBlock: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteClientVpnRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case destinationCidrBlock = "DestinationCidrBlock" - case dryRun = "DryRun" - case targetVpcSubnetId = "TargetVpcSubnetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let targetVpcSubnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetVpcSubnetId) - targetVpcSubnetId = targetVpcSubnetIdDecoded - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteClientVpnRouteOutput { -extension DeleteClientVpnRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteClientVpnRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.status = output.status - } else { - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteClientVpnRouteOutput() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnRouteStatus.readingClosure) + return value } } } @@ -37259,27 +26671,18 @@ public struct DeleteClientVpnRouteOutput: Swift.Equatable { } } -struct DeleteClientVpnRouteOutputBody: Swift.Equatable { - let status: EC2ClientTypes.ClientVpnRouteStatus? -} - -extension DeleteClientVpnRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnRouteStatus.self, forKey: .status) - status = statusDecoded - } -} +enum DeleteClientVpnRouteOutputError { -enum DeleteClientVpnRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -37330,38 +26733,15 @@ public struct DeleteCoipCidrInput: Swift.Equatable { } } -struct DeleteCoipCidrInputBody: Swift.Equatable { - let cidr: Swift.String? - let coipPoolId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteCoipCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case coipPoolId = "CoipPoolId" - case dryRun = "DryRun" - } +extension DeleteCoipCidrOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let coipPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coipPoolId) - coipPoolId = coipPoolIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteCoipCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteCoipCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.coipCidr = output.coipCidr - } else { - self.coipCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteCoipCidrOutput() + value.coipCidr = try reader["coipCidr"].readIfPresent(readingClosure: EC2ClientTypes.CoipCidr.readingClosure) + return value } } } @@ -37378,27 +26758,18 @@ public struct DeleteCoipCidrOutput: Swift.Equatable { } } -struct DeleteCoipCidrOutputBody: Swift.Equatable { - let coipCidr: EC2ClientTypes.CoipCidr? -} +enum DeleteCoipCidrOutputError { -extension DeleteCoipCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coipCidr = "coipCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coipCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CoipCidr.self, forKey: .coipCidr) - coipCidr = coipCidrDecoded - } -} - -enum DeleteCoipCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -37441,34 +26812,15 @@ public struct DeleteCoipPoolInput: Swift.Equatable { } } -struct DeleteCoipPoolInputBody: Swift.Equatable { - let coipPoolId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteCoipPoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coipPoolId = "CoipPoolId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coipPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coipPoolId) - coipPoolId = coipPoolIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteCoipPoolOutput { -extension DeleteCoipPoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteCoipPoolOutputBody = try responseDecoder.decode(responseBody: data) - self.coipPool = output.coipPool - } else { - self.coipPool = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteCoipPoolOutput() + value.coipPool = try reader["coipPool"].readIfPresent(readingClosure: EC2ClientTypes.CoipPool.readingClosure) + return value } } } @@ -37485,27 +26837,18 @@ public struct DeleteCoipPoolOutput: Swift.Equatable { } } -struct DeleteCoipPoolOutputBody: Swift.Equatable { - let coipPool: EC2ClientTypes.CoipPool? -} - -extension DeleteCoipPoolOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coipPool = "coipPool" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coipPoolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CoipPool.self, forKey: .coipPool) - coipPool = coipPoolDecoded - } -} +enum DeleteCoipPoolOutputError { -enum DeleteCoipPoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -37549,28 +26892,12 @@ public struct DeleteCustomerGatewayInput: Swift.Equatable { } } -struct DeleteCustomerGatewayInputBody: Swift.Equatable { - let customerGatewayId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteCustomerGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerGatewayId = "CustomerGatewayId" - case dryRun = "dryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerGatewayId) - customerGatewayId = customerGatewayIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteCustomerGatewayOutput { -extension DeleteCustomerGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCustomerGatewayOutput() + } } } @@ -37579,11 +26906,18 @@ public struct DeleteCustomerGatewayOutput: Swift.Equatable { public init() { } } -enum DeleteCustomerGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteCustomerGatewayOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -37626,28 +26960,12 @@ public struct DeleteDhcpOptionsInput: Swift.Equatable { } } -struct DeleteDhcpOptionsInputBody: Swift.Equatable { - let dhcpOptionsId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteDhcpOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dhcpOptionsId = "DhcpOptionsId" - case dryRun = "dryRun" - } +extension DeleteDhcpOptionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dhcpOptionsIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dhcpOptionsId) - dhcpOptionsId = dhcpOptionsIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteDhcpOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDhcpOptionsOutput() + } } } @@ -37656,11 +26974,18 @@ public struct DeleteDhcpOptionsOutput: Swift.Equatable { public init() { } } -enum DeleteDhcpOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteDhcpOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -37703,34 +27028,15 @@ public struct DeleteEgressOnlyInternetGatewayInput: Swift.Equatable { } } -struct DeleteEgressOnlyInternetGatewayInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let egressOnlyInternetGatewayId: Swift.String? -} - -extension DeleteEgressOnlyInternetGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case egressOnlyInternetGatewayId = "EgressOnlyInternetGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let egressOnlyInternetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .egressOnlyInternetGatewayId) - egressOnlyInternetGatewayId = egressOnlyInternetGatewayIdDecoded - } -} +extension DeleteEgressOnlyInternetGatewayOutput { -extension DeleteEgressOnlyInternetGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteEgressOnlyInternetGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.returnCode = output.returnCode - } else { - self.returnCode = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteEgressOnlyInternetGatewayOutput() + value.returnCode = try reader["returnCode"].readIfPresent() + return value } } } @@ -37747,36 +27053,23 @@ public struct DeleteEgressOnlyInternetGatewayOutput: Swift.Equatable { } } -struct DeleteEgressOnlyInternetGatewayOutputBody: Swift.Equatable { - let returnCode: Swift.Bool? -} +enum DeleteEgressOnlyInternetGatewayOutputError { -extension DeleteEgressOnlyInternetGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case returnCode = "returnCode" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnCodeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnCode) - returnCode = returnCodeDecoded - } -} - -enum DeleteEgressOnlyInternetGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.DeleteFleetError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.DeleteFleetError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -37788,12 +27081,14 @@ extension EC2ClientTypes.DeleteFleetError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeleteFleetErrorCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DeleteFleetError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -37855,11 +27150,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.DeleteFleetErrorItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case error = "error" - case fleetId = "fleetId" - } +extension EC2ClientTypes.DeleteFleetErrorItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -37871,12 +27162,14 @@ extension EC2ClientTypes.DeleteFleetErrorItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeleteFleetError.self, forKey: .error) - error = errorDecoded - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DeleteFleetErrorItem() + value.error = try reader["error"].readIfPresent(readingClosure: EC2ClientTypes.DeleteFleetError.readingClosure) + value.fleetId = try reader["fleetId"].readIfPresent() + return value + } } } @@ -37900,12 +27193,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DeleteFleetSuccessItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currentFleetState = "currentFleetState" - case fleetId = "fleetId" - case previousFleetState = "previousFleetState" - } +extension EC2ClientTypes.DeleteFleetSuccessItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -37920,14 +27208,15 @@ extension EC2ClientTypes.DeleteFleetSuccessItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currentFleetStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetStateCode.self, forKey: .currentFleetState) - currentFleetState = currentFleetStateDecoded - let previousFleetStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetStateCode.self, forKey: .previousFleetState) - previousFleetState = previousFleetStateDecoded - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DeleteFleetSuccessItem() + value.currentFleetState = try reader["currentFleetState"].readIfPresent() + value.previousFleetState = try reader["previousFleetState"].readIfPresent() + value.fleetId = try reader["fleetId"].readIfPresent() + return value + } } } @@ -38010,57 +27299,16 @@ public struct DeleteFleetsInput: Swift.Equatable { } } -struct DeleteFleetsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let fleetIds: [Swift.String]? - let terminateInstances: Swift.Bool? -} - -extension DeleteFleetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case fleetIds = "FleetId" - case terminateInstances = "TerminateInstances" - } +extension DeleteFleetsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.fleetIds) { - struct KeyVal0{struct member{}} - let fleetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fleetIds) - if let fleetIdsWrappedContainer = fleetIdsWrappedContainer { - let fleetIdsContainer = try fleetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fleetIdsBuffer:[Swift.String]? = nil - if let fleetIdsContainer = fleetIdsContainer { - fleetIdsBuffer = [Swift.String]() - for stringContainer0 in fleetIdsContainer { - fleetIdsBuffer?.append(stringContainer0) - } - } - fleetIds = fleetIdsBuffer - } else { - fleetIds = [] - } - } else { - fleetIds = nil - } - let terminateInstancesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .terminateInstances) - terminateInstances = terminateInstancesDecoded - } -} - -extension DeleteFleetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteFleetsOutputBody = try responseDecoder.decode(responseBody: data) - self.successfulFleetDeletions = output.successfulFleetDeletions - self.unsuccessfulFleetDeletions = output.unsuccessfulFleetDeletions - } else { - self.successfulFleetDeletions = nil - self.unsuccessfulFleetDeletions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteFleetsOutput() + value.successfulFleetDeletions = try reader["successfulFleetDeletionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DeleteFleetSuccessItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessfulFleetDeletions = try reader["unsuccessfulFleetDeletionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DeleteFleetErrorItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -38081,65 +27329,18 @@ public struct DeleteFleetsOutput: Swift.Equatable { } } -struct DeleteFleetsOutputBody: Swift.Equatable { - let successfulFleetDeletions: [EC2ClientTypes.DeleteFleetSuccessItem]? - let unsuccessfulFleetDeletions: [EC2ClientTypes.DeleteFleetErrorItem]? -} - -extension DeleteFleetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case successfulFleetDeletions = "successfulFleetDeletionSet" - case unsuccessfulFleetDeletions = "unsuccessfulFleetDeletionSet" - } +enum DeleteFleetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successfulFleetDeletions) { - struct KeyVal0{struct item{}} - let successfulFleetDeletionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successfulFleetDeletions) - if let successfulFleetDeletionsWrappedContainer = successfulFleetDeletionsWrappedContainer { - let successfulFleetDeletionsContainer = try successfulFleetDeletionsWrappedContainer.decodeIfPresent([EC2ClientTypes.DeleteFleetSuccessItem].self, forKey: .member) - var successfulFleetDeletionsBuffer:[EC2ClientTypes.DeleteFleetSuccessItem]? = nil - if let successfulFleetDeletionsContainer = successfulFleetDeletionsContainer { - successfulFleetDeletionsBuffer = [EC2ClientTypes.DeleteFleetSuccessItem]() - for structureContainer0 in successfulFleetDeletionsContainer { - successfulFleetDeletionsBuffer?.append(structureContainer0) - } - } - successfulFleetDeletions = successfulFleetDeletionsBuffer - } else { - successfulFleetDeletions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - successfulFleetDeletions = nil - } - if containerValues.contains(.unsuccessfulFleetDeletions) { - struct KeyVal0{struct item{}} - let unsuccessfulFleetDeletionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessfulFleetDeletions) - if let unsuccessfulFleetDeletionsWrappedContainer = unsuccessfulFleetDeletionsWrappedContainer { - let unsuccessfulFleetDeletionsContainer = try unsuccessfulFleetDeletionsWrappedContainer.decodeIfPresent([EC2ClientTypes.DeleteFleetErrorItem].self, forKey: .member) - var unsuccessfulFleetDeletionsBuffer:[EC2ClientTypes.DeleteFleetErrorItem]? = nil - if let unsuccessfulFleetDeletionsContainer = unsuccessfulFleetDeletionsContainer { - unsuccessfulFleetDeletionsBuffer = [EC2ClientTypes.DeleteFleetErrorItem]() - for structureContainer0 in unsuccessfulFleetDeletionsContainer { - unsuccessfulFleetDeletionsBuffer?.append(structureContainer0) - } - } - unsuccessfulFleetDeletions = unsuccessfulFleetDeletionsBuffer - } else { - unsuccessfulFleetDeletions = [] - } - } else { - unsuccessfulFleetDeletions = nil - } - } -} - -enum DeleteFleetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -38191,51 +27392,15 @@ public struct DeleteFlowLogsInput: Swift.Equatable { } } -struct DeleteFlowLogsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let flowLogIds: [Swift.String]? -} - -extension DeleteFlowLogsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case flowLogIds = "FlowLogId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.flowLogIds) { - struct KeyVal0{struct item{}} - let flowLogIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .flowLogIds) - if let flowLogIdsWrappedContainer = flowLogIdsWrappedContainer { - let flowLogIdsContainer = try flowLogIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var flowLogIdsBuffer:[Swift.String]? = nil - if let flowLogIdsContainer = flowLogIdsContainer { - flowLogIdsBuffer = [Swift.String]() - for stringContainer0 in flowLogIdsContainer { - flowLogIdsBuffer?.append(stringContainer0) - } - } - flowLogIds = flowLogIdsBuffer - } else { - flowLogIds = [] - } - } else { - flowLogIds = nil - } - } -} +extension DeleteFlowLogsOutput { -extension DeleteFlowLogsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteFlowLogsOutputBody = try responseDecoder.decode(responseBody: data) - self.unsuccessful = output.unsuccessful - } else { - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteFlowLogsOutput() + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -38252,44 +27417,18 @@ public struct DeleteFlowLogsOutput: Swift.Equatable { } } -struct DeleteFlowLogsOutputBody: Swift.Equatable { - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension DeleteFlowLogsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case unsuccessful = "unsuccessful" - } +enum DeleteFlowLogsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum DeleteFlowLogsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -38332,34 +27471,15 @@ public struct DeleteFpgaImageInput: Swift.Equatable { } } -struct DeleteFpgaImageInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let fpgaImageId: Swift.String? -} - -extension DeleteFpgaImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case fpgaImageId = "FpgaImageId" - } +extension DeleteFpgaImageOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let fpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageId) - fpgaImageId = fpgaImageIdDecoded - } -} - -extension DeleteFpgaImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteFpgaImageOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteFpgaImageOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -38376,27 +27496,18 @@ public struct DeleteFpgaImageOutput: Swift.Equatable { } } -struct DeleteFpgaImageOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension DeleteFpgaImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } +enum DeleteFpgaImageOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum DeleteFpgaImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -38439,34 +27550,15 @@ public struct DeleteInstanceConnectEndpointInput: Swift.Equatable { } } -struct DeleteInstanceConnectEndpointInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceConnectEndpointId: Swift.String? -} - -extension DeleteInstanceConnectEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceConnectEndpointId = "InstanceConnectEndpointId" - } +extension DeleteInstanceConnectEndpointOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceConnectEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceConnectEndpointId) - instanceConnectEndpointId = instanceConnectEndpointIdDecoded - } -} - -extension DeleteInstanceConnectEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteInstanceConnectEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceConnectEndpoint = output.instanceConnectEndpoint - } else { - self.instanceConnectEndpoint = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteInstanceConnectEndpointOutput() + value.instanceConnectEndpoint = try reader["instanceConnectEndpoint"].readIfPresent(readingClosure: EC2ClientTypes.Ec2InstanceConnectEndpoint.readingClosure) + return value } } } @@ -38483,27 +27575,18 @@ public struct DeleteInstanceConnectEndpointOutput: Swift.Equatable { } } -struct DeleteInstanceConnectEndpointOutputBody: Swift.Equatable { - let instanceConnectEndpoint: EC2ClientTypes.Ec2InstanceConnectEndpoint? -} - -extension DeleteInstanceConnectEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceConnectEndpoint = "instanceConnectEndpoint" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceConnectEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ec2InstanceConnectEndpoint.self, forKey: .instanceConnectEndpoint) - instanceConnectEndpoint = instanceConnectEndpointDecoded - } -} +enum DeleteInstanceConnectEndpointOutputError { -enum DeleteInstanceConnectEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -38553,38 +27636,15 @@ public struct DeleteInstanceEventWindowInput: Swift.Equatable { } } -struct DeleteInstanceEventWindowInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let forceDelete: Swift.Bool? - let instanceEventWindowId: Swift.String? -} - -extension DeleteInstanceEventWindowInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case forceDelete = "ForceDelete" - case instanceEventWindowId = "InstanceEventWindowId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let forceDeleteDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forceDelete) - forceDelete = forceDeleteDecoded - let instanceEventWindowIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceEventWindowId) - instanceEventWindowId = instanceEventWindowIdDecoded - } -} +extension DeleteInstanceEventWindowOutput { -extension DeleteInstanceEventWindowOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteInstanceEventWindowOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceEventWindowState = output.instanceEventWindowState - } else { - self.instanceEventWindowState = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteInstanceEventWindowOutput() + value.instanceEventWindowState = try reader["instanceEventWindowState"].readIfPresent(readingClosure: EC2ClientTypes.InstanceEventWindowStateChange.readingClosure) + return value } } } @@ -38601,27 +27661,18 @@ public struct DeleteInstanceEventWindowOutput: Swift.Equatable { } } -struct DeleteInstanceEventWindowOutputBody: Swift.Equatable { - let instanceEventWindowState: EC2ClientTypes.InstanceEventWindowStateChange? -} +enum DeleteInstanceEventWindowOutputError { -extension DeleteInstanceEventWindowOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceEventWindowState = "instanceEventWindowState" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceEventWindowStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindowStateChange.self, forKey: .instanceEventWindowState) - instanceEventWindowState = instanceEventWindowStateDecoded - } -} - -enum DeleteInstanceEventWindowOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -38664,28 +27715,12 @@ public struct DeleteInternetGatewayInput: Swift.Equatable { } } -struct DeleteInternetGatewayInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let internetGatewayId: Swift.String? -} - -extension DeleteInternetGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case internetGatewayId = "internetGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let internetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .internetGatewayId) - internetGatewayId = internetGatewayIdDecoded - } -} +extension DeleteInternetGatewayOutput { -extension DeleteInternetGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteInternetGatewayOutput() + } } } @@ -38694,11 +27729,18 @@ public struct DeleteInternetGatewayOutput: Swift.Equatable { public init() { } } -enum DeleteInternetGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteInternetGatewayOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -38758,38 +27800,15 @@ public struct DeleteIpamInput: Swift.Equatable { } } -struct DeleteIpamInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamId: Swift.String? - let cascade: Swift.Bool? -} - -extension DeleteIpamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cascade = "Cascade" - case dryRun = "DryRun" - case ipamId = "IpamId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let cascadeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .cascade) - cascade = cascadeDecoded - } -} +extension DeleteIpamOutput { -extension DeleteIpamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteIpamOutputBody = try responseDecoder.decode(responseBody: data) - self.ipam = output.ipam - } else { - self.ipam = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteIpamOutput() + value.ipam = try reader["ipam"].readIfPresent(readingClosure: EC2ClientTypes.Ipam.readingClosure) + return value } } } @@ -38806,27 +27825,18 @@ public struct DeleteIpamOutput: Swift.Equatable { } } -struct DeleteIpamOutputBody: Swift.Equatable { - let ipam: EC2ClientTypes.Ipam? -} - -extension DeleteIpamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipam = "ipam" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ipam.self, forKey: .ipam) - ipam = ipamDecoded - } -} +enum DeleteIpamOutputError { -enum DeleteIpamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -38876,38 +27886,15 @@ public struct DeleteIpamPoolInput: Swift.Equatable { } } -struct DeleteIpamPoolInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let cascade: Swift.Bool? -} - -extension DeleteIpamPoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cascade = "Cascade" - case dryRun = "DryRun" - case ipamPoolId = "IpamPoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let cascadeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .cascade) - cascade = cascadeDecoded - } -} +extension DeleteIpamPoolOutput { -extension DeleteIpamPoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteIpamPoolOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPool = output.ipamPool - } else { - self.ipamPool = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteIpamPoolOutput() + value.ipamPool = try reader["ipamPool"].readIfPresent(readingClosure: EC2ClientTypes.IpamPool.readingClosure) + return value } } } @@ -38924,27 +27911,18 @@ public struct DeleteIpamPoolOutput: Swift.Equatable { } } -struct DeleteIpamPoolOutputBody: Swift.Equatable { - let ipamPool: EC2ClientTypes.IpamPool? -} - -extension DeleteIpamPoolOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPool = "ipamPool" - } +enum DeleteIpamPoolOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamPoolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPool.self, forKey: .ipamPool) - ipamPool = ipamPoolDecoded - } -} - -enum DeleteIpamPoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -38987,34 +27965,15 @@ public struct DeleteIpamResourceDiscoveryInput: Swift.Equatable { } } -struct DeleteIpamResourceDiscoveryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamResourceDiscoveryId: Swift.String? -} - -extension DeleteIpamResourceDiscoveryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case ipamResourceDiscoveryId = "IpamResourceDiscoveryId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - } -} +extension DeleteIpamResourceDiscoveryOutput { -extension DeleteIpamResourceDiscoveryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteIpamResourceDiscoveryOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceDiscovery = output.ipamResourceDiscovery - } else { - self.ipamResourceDiscovery = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteIpamResourceDiscoveryOutput() + value.ipamResourceDiscovery = try reader["ipamResourceDiscovery"].readIfPresent(readingClosure: EC2ClientTypes.IpamResourceDiscovery.readingClosure) + return value } } } @@ -39031,27 +27990,18 @@ public struct DeleteIpamResourceDiscoveryOutput: Swift.Equatable { } } -struct DeleteIpamResourceDiscoveryOutputBody: Swift.Equatable { - let ipamResourceDiscovery: EC2ClientTypes.IpamResourceDiscovery? -} +enum DeleteIpamResourceDiscoveryOutputError { -extension DeleteIpamResourceDiscoveryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceDiscovery = "ipamResourceDiscovery" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamResourceDiscoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceDiscovery.self, forKey: .ipamResourceDiscovery) - ipamResourceDiscovery = ipamResourceDiscoveryDecoded - } -} - -enum DeleteIpamResourceDiscoveryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -39094,34 +28044,15 @@ public struct DeleteIpamScopeInput: Swift.Equatable { } } -struct DeleteIpamScopeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamScopeId: Swift.String? -} - -extension DeleteIpamScopeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case ipamScopeId = "IpamScopeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeId) - ipamScopeId = ipamScopeIdDecoded - } -} +extension DeleteIpamScopeOutput { -extension DeleteIpamScopeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteIpamScopeOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamScope = output.ipamScope - } else { - self.ipamScope = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteIpamScopeOutput() + value.ipamScope = try reader["ipamScope"].readIfPresent(readingClosure: EC2ClientTypes.IpamScope.readingClosure) + return value } } } @@ -39138,27 +28069,18 @@ public struct DeleteIpamScopeOutput: Swift.Equatable { } } -struct DeleteIpamScopeOutputBody: Swift.Equatable { - let ipamScope: EC2ClientTypes.IpamScope? -} - -extension DeleteIpamScopeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamScope = "ipamScope" - } +enum DeleteIpamScopeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamScopeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamScope.self, forKey: .ipamScope) - ipamScope = ipamScopeDecoded - } -} - -enum DeleteIpamScopeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -39207,40 +28129,16 @@ public struct DeleteKeyPairInput: Swift.Equatable { } } -struct DeleteKeyPairInputBody: Swift.Equatable { - let keyName: Swift.String? - let keyPairId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteKeyPairInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case keyName = "KeyName" - case keyPairId = "KeyPairId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let keyPairIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyPairId) - keyPairId = keyPairIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteKeyPairOutput { -extension DeleteKeyPairOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteKeyPairOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - self.keyPairId = output.keyPairId - } else { - self.keyPairId = nil - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteKeyPairOutput() + value.keyPairId = try reader["keyPairId"].readIfPresent() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -39261,31 +28159,18 @@ public struct DeleteKeyPairOutput: Swift.Equatable { } } -struct DeleteKeyPairOutputBody: Swift.Equatable { - let `return`: Swift.Bool? - let keyPairId: Swift.String? -} - -extension DeleteKeyPairOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyPairId = "keyPairId" - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - let keyPairIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyPairId) - keyPairId = keyPairIdDecoded - } -} +enum DeleteKeyPairOutputError { -enum DeleteKeyPairOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -39334,38 +28219,15 @@ public struct DeleteLaunchTemplateInput: Swift.Equatable { } } -struct DeleteLaunchTemplateInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let launchTemplateId: Swift.String? - let launchTemplateName: Swift.String? -} - -extension DeleteLaunchTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case launchTemplateId = "LaunchTemplateId" - case launchTemplateName = "LaunchTemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - } -} +extension DeleteLaunchTemplateOutput { -extension DeleteLaunchTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteLaunchTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.launchTemplate = output.launchTemplate - } else { - self.launchTemplate = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteLaunchTemplateOutput() + value.launchTemplate = try reader["launchTemplate"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplate.readingClosure) + return value } } } @@ -39382,27 +28244,18 @@ public struct DeleteLaunchTemplateOutput: Swift.Equatable { } } -struct DeleteLaunchTemplateOutputBody: Swift.Equatable { - let launchTemplate: EC2ClientTypes.LaunchTemplate? -} - -extension DeleteLaunchTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplate = "launchTemplate" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplate.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - } -} +enum DeleteLaunchTemplateOutputError { -enum DeleteLaunchTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -39468,61 +28321,16 @@ public struct DeleteLaunchTemplateVersionsInput: Swift.Equatable { } } -struct DeleteLaunchTemplateVersionsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let launchTemplateId: Swift.String? - let launchTemplateName: Swift.String? - let versions: [Swift.String]? -} - -extension DeleteLaunchTemplateVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case launchTemplateId = "LaunchTemplateId" - case launchTemplateName = "LaunchTemplateName" - case versions = "LaunchTemplateVersion" - } +extension DeleteLaunchTemplateVersionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - if containerValues.contains(.versions) { - struct KeyVal0{struct item{}} - let versionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .versions) - if let versionsWrappedContainer = versionsWrappedContainer { - let versionsContainer = try versionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var versionsBuffer:[Swift.String]? = nil - if let versionsContainer = versionsContainer { - versionsBuffer = [Swift.String]() - for stringContainer0 in versionsContainer { - versionsBuffer?.append(stringContainer0) - } - } - versions = versionsBuffer - } else { - versions = [] - } - } else { - versions = nil - } - } -} - -extension DeleteLaunchTemplateVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteLaunchTemplateVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.successfullyDeletedLaunchTemplateVersions = output.successfullyDeletedLaunchTemplateVersions - self.unsuccessfullyDeletedLaunchTemplateVersions = output.unsuccessfullyDeletedLaunchTemplateVersions - } else { - self.successfullyDeletedLaunchTemplateVersions = nil - self.unsuccessfullyDeletedLaunchTemplateVersions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteLaunchTemplateVersionsOutput() + value.successfullyDeletedLaunchTemplateVersions = try reader["successfullyDeletedLaunchTemplateVersionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessfullyDeletedLaunchTemplateVersions = try reader["unsuccessfullyDeletedLaunchTemplateVersionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -39543,76 +28351,23 @@ public struct DeleteLaunchTemplateVersionsOutput: Swift.Equatable { } } -struct DeleteLaunchTemplateVersionsOutputBody: Swift.Equatable { - let successfullyDeletedLaunchTemplateVersions: [EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem]? - let unsuccessfullyDeletedLaunchTemplateVersions: [EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem]? -} - -extension DeleteLaunchTemplateVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case successfullyDeletedLaunchTemplateVersions = "successfullyDeletedLaunchTemplateVersionSet" - case unsuccessfullyDeletedLaunchTemplateVersions = "unsuccessfullyDeletedLaunchTemplateVersionSet" - } +enum DeleteLaunchTemplateVersionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successfullyDeletedLaunchTemplateVersions) { - struct KeyVal0{struct item{}} - let successfullyDeletedLaunchTemplateVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successfullyDeletedLaunchTemplateVersions) - if let successfullyDeletedLaunchTemplateVersionsWrappedContainer = successfullyDeletedLaunchTemplateVersionsWrappedContainer { - let successfullyDeletedLaunchTemplateVersionsContainer = try successfullyDeletedLaunchTemplateVersionsWrappedContainer.decodeIfPresent([EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem].self, forKey: .member) - var successfullyDeletedLaunchTemplateVersionsBuffer:[EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem]? = nil - if let successfullyDeletedLaunchTemplateVersionsContainer = successfullyDeletedLaunchTemplateVersionsContainer { - successfullyDeletedLaunchTemplateVersionsBuffer = [EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem]() - for structureContainer0 in successfullyDeletedLaunchTemplateVersionsContainer { - successfullyDeletedLaunchTemplateVersionsBuffer?.append(structureContainer0) - } - } - successfullyDeletedLaunchTemplateVersions = successfullyDeletedLaunchTemplateVersionsBuffer - } else { - successfullyDeletedLaunchTemplateVersions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - successfullyDeletedLaunchTemplateVersions = nil - } - if containerValues.contains(.unsuccessfullyDeletedLaunchTemplateVersions) { - struct KeyVal0{struct item{}} - let unsuccessfullyDeletedLaunchTemplateVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessfullyDeletedLaunchTemplateVersions) - if let unsuccessfullyDeletedLaunchTemplateVersionsWrappedContainer = unsuccessfullyDeletedLaunchTemplateVersionsWrappedContainer { - let unsuccessfullyDeletedLaunchTemplateVersionsContainer = try unsuccessfullyDeletedLaunchTemplateVersionsWrappedContainer.decodeIfPresent([EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem].self, forKey: .member) - var unsuccessfullyDeletedLaunchTemplateVersionsBuffer:[EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem]? = nil - if let unsuccessfullyDeletedLaunchTemplateVersionsContainer = unsuccessfullyDeletedLaunchTemplateVersionsContainer { - unsuccessfullyDeletedLaunchTemplateVersionsBuffer = [EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem]() - for structureContainer0 in unsuccessfullyDeletedLaunchTemplateVersionsContainer { - unsuccessfullyDeletedLaunchTemplateVersionsBuffer?.append(structureContainer0) - } - } - unsuccessfullyDeletedLaunchTemplateVersions = unsuccessfullyDeletedLaunchTemplateVersionsBuffer - } else { - unsuccessfullyDeletedLaunchTemplateVersions = [] - } - } else { - unsuccessfullyDeletedLaunchTemplateVersions = nil - } - } -} - -enum DeleteLaunchTemplateVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } -extension EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateId = "launchTemplateId" - case launchTemplateName = "launchTemplateName" - case responseError = "responseError" - case versionNumber = "versionNumber" - } +extension EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -39630,16 +28385,16 @@ extension EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .versionNumber) - versionNumber = versionNumberDecoded - let responseErrorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResponseError.self, forKey: .responseError) - responseError = responseErrorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DeleteLaunchTemplateVersionsResponseErrorItem() + value.launchTemplateId = try reader["launchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["launchTemplateName"].readIfPresent() + value.versionNumber = try reader["versionNumber"].readIfPresent() + value.responseError = try reader["responseError"].readIfPresent(readingClosure: EC2ClientTypes.ResponseError.readingClosure) + return value + } } } @@ -39671,12 +28426,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateId = "launchTemplateId" - case launchTemplateName = "launchTemplateName" - case versionNumber = "versionNumber" - } +extension EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -39691,14 +28441,15 @@ extension EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .versionNumber) - versionNumber = versionNumberDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DeleteLaunchTemplateVersionsResponseSuccessItem() + value.launchTemplateId = try reader["launchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["launchTemplateName"].readIfPresent() + value.versionNumber = try reader["versionNumber"].readIfPresent() + return value + } } } @@ -39778,42 +28529,15 @@ public struct DeleteLocalGatewayRouteInput: Swift.Equatable { } } -struct DeleteLocalGatewayRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let localGatewayRouteTableId: Swift.String? - let dryRun: Swift.Bool? - let destinationPrefixListId: Swift.String? -} - -extension DeleteLocalGatewayRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "DestinationCidrBlock" - case destinationPrefixListId = "DestinationPrefixListId" - case dryRun = "DryRun" - case localGatewayRouteTableId = "LocalGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded - } -} +extension DeleteLocalGatewayRouteOutput { -extension DeleteLocalGatewayRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteLocalGatewayRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.route = output.route - } else { - self.route = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteLocalGatewayRouteOutput() + value.route = try reader["route"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRoute.readingClosure) + return value } } } @@ -39830,27 +28554,18 @@ public struct DeleteLocalGatewayRouteOutput: Swift.Equatable { } } -struct DeleteLocalGatewayRouteOutputBody: Swift.Equatable { - let route: EC2ClientTypes.LocalGatewayRoute? -} - -extension DeleteLocalGatewayRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case route = "route" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let routeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRoute.self, forKey: .route) - route = routeDecoded - } -} +enum DeleteLocalGatewayRouteOutputError { -enum DeleteLocalGatewayRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -39893,34 +28608,15 @@ public struct DeleteLocalGatewayRouteTableInput: Swift.Equatable { } } -struct DeleteLocalGatewayRouteTableInputBody: Swift.Equatable { - let localGatewayRouteTableId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteLocalGatewayRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case localGatewayRouteTableId = "LocalGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteLocalGatewayRouteTableOutput { -extension DeleteLocalGatewayRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteLocalGatewayRouteTableOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTable = output.localGatewayRouteTable - } else { - self.localGatewayRouteTable = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteLocalGatewayRouteTableOutput() + value.localGatewayRouteTable = try reader["localGatewayRouteTable"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRouteTable.readingClosure) + return value } } } @@ -39937,27 +28633,18 @@ public struct DeleteLocalGatewayRouteTableOutput: Swift.Equatable { } } -struct DeleteLocalGatewayRouteTableOutputBody: Swift.Equatable { - let localGatewayRouteTable: EC2ClientTypes.LocalGatewayRouteTable? -} - -extension DeleteLocalGatewayRouteTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTable = "localGatewayRouteTable" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteTable.self, forKey: .localGatewayRouteTable) - localGatewayRouteTable = localGatewayRouteTableDecoded - } -} +enum DeleteLocalGatewayRouteTableOutputError { -enum DeleteLocalGatewayRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40000,34 +28687,15 @@ public struct DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput: } } -struct DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInputBody: Swift.Equatable { - let localGatewayRouteTableVirtualInterfaceGroupAssociationId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case localGatewayRouteTableVirtualInterfaceGroupAssociationId = "LocalGatewayRouteTableVirtualInterfaceGroupAssociationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableVirtualInterfaceGroupAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableVirtualInterfaceGroupAssociationId) - localGatewayRouteTableVirtualInterfaceGroupAssociationId = localGatewayRouteTableVirtualInterfaceGroupAssociationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput { -extension DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTableVirtualInterfaceGroupAssociation = output.localGatewayRouteTableVirtualInterfaceGroupAssociation - } else { - self.localGatewayRouteTableVirtualInterfaceGroupAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput() + value.localGatewayRouteTableVirtualInterfaceGroupAssociation = try reader["localGatewayRouteTableVirtualInterfaceGroupAssociation"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation.readingClosure) + return value } } } @@ -40044,27 +28712,18 @@ public struct DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput } } -struct DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputBody: Swift.Equatable { - let localGatewayRouteTableVirtualInterfaceGroupAssociation: EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation? -} - -extension DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTableVirtualInterfaceGroupAssociation = "localGatewayRouteTableVirtualInterfaceGroupAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableVirtualInterfaceGroupAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation.self, forKey: .localGatewayRouteTableVirtualInterfaceGroupAssociation) - localGatewayRouteTableVirtualInterfaceGroupAssociation = localGatewayRouteTableVirtualInterfaceGroupAssociationDecoded - } -} +enum DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputError { -enum DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40107,34 +28766,15 @@ public struct DeleteLocalGatewayRouteTableVpcAssociationInput: Swift.Equatable { } } -struct DeleteLocalGatewayRouteTableVpcAssociationInputBody: Swift.Equatable { - let localGatewayRouteTableVpcAssociationId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteLocalGatewayRouteTableVpcAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case localGatewayRouteTableVpcAssociationId = "LocalGatewayRouteTableVpcAssociationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableVpcAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableVpcAssociationId) - localGatewayRouteTableVpcAssociationId = localGatewayRouteTableVpcAssociationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteLocalGatewayRouteTableVpcAssociationOutput { -extension DeleteLocalGatewayRouteTableVpcAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteLocalGatewayRouteTableVpcAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTableVpcAssociation = output.localGatewayRouteTableVpcAssociation - } else { - self.localGatewayRouteTableVpcAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteLocalGatewayRouteTableVpcAssociationOutput() + value.localGatewayRouteTableVpcAssociation = try reader["localGatewayRouteTableVpcAssociation"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRouteTableVpcAssociation.readingClosure) + return value } } } @@ -40151,27 +28791,18 @@ public struct DeleteLocalGatewayRouteTableVpcAssociationOutput: Swift.Equatable } } -struct DeleteLocalGatewayRouteTableVpcAssociationOutputBody: Swift.Equatable { - let localGatewayRouteTableVpcAssociation: EC2ClientTypes.LocalGatewayRouteTableVpcAssociation? -} - -extension DeleteLocalGatewayRouteTableVpcAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTableVpcAssociation = "localGatewayRouteTableVpcAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableVpcAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteTableVpcAssociation.self, forKey: .localGatewayRouteTableVpcAssociation) - localGatewayRouteTableVpcAssociation = localGatewayRouteTableVpcAssociationDecoded - } -} +enum DeleteLocalGatewayRouteTableVpcAssociationOutputError { -enum DeleteLocalGatewayRouteTableVpcAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40214,34 +28845,15 @@ public struct DeleteManagedPrefixListInput: Swift.Equatable { } } -struct DeleteManagedPrefixListInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let prefixListId: Swift.String? -} - -extension DeleteManagedPrefixListInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case prefixListId = "PrefixListId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - } -} +extension DeleteManagedPrefixListOutput { -extension DeleteManagedPrefixListOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteManagedPrefixListOutputBody = try responseDecoder.decode(responseBody: data) - self.prefixList = output.prefixList - } else { - self.prefixList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteManagedPrefixListOutput() + value.prefixList = try reader["prefixList"].readIfPresent(readingClosure: EC2ClientTypes.ManagedPrefixList.readingClosure) + return value } } } @@ -40258,27 +28870,18 @@ public struct DeleteManagedPrefixListOutput: Swift.Equatable { } } -struct DeleteManagedPrefixListOutputBody: Swift.Equatable { - let prefixList: EC2ClientTypes.ManagedPrefixList? -} - -extension DeleteManagedPrefixListOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case prefixList = "prefixList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixListDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ManagedPrefixList.self, forKey: .prefixList) - prefixList = prefixListDecoded - } -} +enum DeleteManagedPrefixListOutputError { -enum DeleteManagedPrefixListOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40321,34 +28924,15 @@ public struct DeleteNatGatewayInput: Swift.Equatable { } } -struct DeleteNatGatewayInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let natGatewayId: Swift.String? -} - -extension DeleteNatGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case natGatewayId = "NatGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - } -} +extension DeleteNatGatewayOutput { -extension DeleteNatGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteNatGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.natGatewayId = output.natGatewayId - } else { - self.natGatewayId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteNatGatewayOutput() + value.natGatewayId = try reader["natGatewayId"].readIfPresent() + return value } } } @@ -40365,27 +28949,18 @@ public struct DeleteNatGatewayOutput: Swift.Equatable { } } -struct DeleteNatGatewayOutputBody: Swift.Equatable { - let natGatewayId: Swift.String? -} - -extension DeleteNatGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case natGatewayId = "natGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - } -} +enum DeleteNatGatewayOutputError { -enum DeleteNatGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40444,36 +29019,12 @@ public struct DeleteNetworkAclEntryInput: Swift.Equatable { } } -struct DeleteNetworkAclEntryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let egress: Swift.Bool? - let networkAclId: Swift.String? - let ruleNumber: Swift.Int? -} - -extension DeleteNetworkAclEntryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case egress = "egress" - case networkAclId = "networkAclId" - case ruleNumber = "ruleNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let egressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .egress) - egress = egressDecoded - let networkAclIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkAclId) - networkAclId = networkAclIdDecoded - let ruleNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ruleNumber) - ruleNumber = ruleNumberDecoded - } -} +extension DeleteNetworkAclEntryOutput { -extension DeleteNetworkAclEntryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteNetworkAclEntryOutput() + } } } @@ -40482,11 +29033,18 @@ public struct DeleteNetworkAclEntryOutput: Swift.Equatable { public init() { } } -enum DeleteNetworkAclEntryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteNetworkAclEntryOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40529,28 +29087,12 @@ public struct DeleteNetworkAclInput: Swift.Equatable { } } -struct DeleteNetworkAclInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let networkAclId: Swift.String? -} - -extension DeleteNetworkAclInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case networkAclId = "networkAclId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkAclIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkAclId) - networkAclId = networkAclIdDecoded - } -} +extension DeleteNetworkAclOutput { -extension DeleteNetworkAclOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteNetworkAclOutput() + } } } @@ -40559,11 +29101,18 @@ public struct DeleteNetworkAclOutput: Swift.Equatable { public init() { } } -enum DeleteNetworkAclOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteNetworkAclOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40606,34 +29155,15 @@ public struct DeleteNetworkInsightsAccessScopeAnalysisInput: Swift.Equatable { } } -struct DeleteNetworkInsightsAccessScopeAnalysisInputBody: Swift.Equatable { - let networkInsightsAccessScopeAnalysisId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteNetworkInsightsAccessScopeAnalysisInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case networkInsightsAccessScopeAnalysisId = "NetworkInsightsAccessScopeAnalysisId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeAnalysisId) - networkInsightsAccessScopeAnalysisId = networkInsightsAccessScopeAnalysisIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteNetworkInsightsAccessScopeAnalysisOutput { -extension DeleteNetworkInsightsAccessScopeAnalysisOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteNetworkInsightsAccessScopeAnalysisOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAccessScopeAnalysisId = output.networkInsightsAccessScopeAnalysisId - } else { - self.networkInsightsAccessScopeAnalysisId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteNetworkInsightsAccessScopeAnalysisOutput() + value.networkInsightsAccessScopeAnalysisId = try reader["networkInsightsAccessScopeAnalysisId"].readIfPresent() + return value } } } @@ -40650,27 +29180,18 @@ public struct DeleteNetworkInsightsAccessScopeAnalysisOutput: Swift.Equatable { } } -struct DeleteNetworkInsightsAccessScopeAnalysisOutputBody: Swift.Equatable { - let networkInsightsAccessScopeAnalysisId: Swift.String? -} - -extension DeleteNetworkInsightsAccessScopeAnalysisOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAccessScopeAnalysisId = "networkInsightsAccessScopeAnalysisId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeAnalysisId) - networkInsightsAccessScopeAnalysisId = networkInsightsAccessScopeAnalysisIdDecoded - } -} +enum DeleteNetworkInsightsAccessScopeAnalysisOutputError { -enum DeleteNetworkInsightsAccessScopeAnalysisOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40713,34 +29234,15 @@ public struct DeleteNetworkInsightsAccessScopeInput: Swift.Equatable { } } -struct DeleteNetworkInsightsAccessScopeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let networkInsightsAccessScopeId: Swift.String? -} - -extension DeleteNetworkInsightsAccessScopeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case networkInsightsAccessScopeId = "NetworkInsightsAccessScopeId" - } +extension DeleteNetworkInsightsAccessScopeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - } -} - -extension DeleteNetworkInsightsAccessScopeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteNetworkInsightsAccessScopeOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAccessScopeId = output.networkInsightsAccessScopeId - } else { - self.networkInsightsAccessScopeId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteNetworkInsightsAccessScopeOutput() + value.networkInsightsAccessScopeId = try reader["networkInsightsAccessScopeId"].readIfPresent() + return value } } } @@ -40757,27 +29259,18 @@ public struct DeleteNetworkInsightsAccessScopeOutput: Swift.Equatable { } } -struct DeleteNetworkInsightsAccessScopeOutputBody: Swift.Equatable { - let networkInsightsAccessScopeId: Swift.String? -} - -extension DeleteNetworkInsightsAccessScopeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAccessScopeId = "networkInsightsAccessScopeId" - } +enum DeleteNetworkInsightsAccessScopeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - } -} - -enum DeleteNetworkInsightsAccessScopeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40820,34 +29313,15 @@ public struct DeleteNetworkInsightsAnalysisInput: Swift.Equatable { } } -struct DeleteNetworkInsightsAnalysisInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let networkInsightsAnalysisId: Swift.String? -} - -extension DeleteNetworkInsightsAnalysisInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case networkInsightsAnalysisId = "NetworkInsightsAnalysisId" - } +extension DeleteNetworkInsightsAnalysisOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkInsightsAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAnalysisId) - networkInsightsAnalysisId = networkInsightsAnalysisIdDecoded - } -} - -extension DeleteNetworkInsightsAnalysisOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteNetworkInsightsAnalysisOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAnalysisId = output.networkInsightsAnalysisId - } else { - self.networkInsightsAnalysisId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteNetworkInsightsAnalysisOutput() + value.networkInsightsAnalysisId = try reader["networkInsightsAnalysisId"].readIfPresent() + return value } } } @@ -40864,27 +29338,18 @@ public struct DeleteNetworkInsightsAnalysisOutput: Swift.Equatable { } } -struct DeleteNetworkInsightsAnalysisOutputBody: Swift.Equatable { - let networkInsightsAnalysisId: Swift.String? -} - -extension DeleteNetworkInsightsAnalysisOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAnalysisId = "networkInsightsAnalysisId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAnalysisId) - networkInsightsAnalysisId = networkInsightsAnalysisIdDecoded - } -} +enum DeleteNetworkInsightsAnalysisOutputError { -enum DeleteNetworkInsightsAnalysisOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -40927,34 +29392,15 @@ public struct DeleteNetworkInsightsPathInput: Swift.Equatable { } } -struct DeleteNetworkInsightsPathInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let networkInsightsPathId: Swift.String? -} - -extension DeleteNetworkInsightsPathInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case networkInsightsPathId = "NetworkInsightsPathId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkInsightsPathIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsPathId) - networkInsightsPathId = networkInsightsPathIdDecoded - } -} +extension DeleteNetworkInsightsPathOutput { -extension DeleteNetworkInsightsPathOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteNetworkInsightsPathOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsPathId = output.networkInsightsPathId - } else { - self.networkInsightsPathId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteNetworkInsightsPathOutput() + value.networkInsightsPathId = try reader["networkInsightsPathId"].readIfPresent() + return value } } } @@ -40971,27 +29417,18 @@ public struct DeleteNetworkInsightsPathOutput: Swift.Equatable { } } -struct DeleteNetworkInsightsPathOutputBody: Swift.Equatable { - let networkInsightsPathId: Swift.String? -} - -extension DeleteNetworkInsightsPathOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsPathId = "networkInsightsPathId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsPathIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsPathId) - networkInsightsPathId = networkInsightsPathIdDecoded - } -} +enum DeleteNetworkInsightsPathOutputError { -enum DeleteNetworkInsightsPathOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -41035,28 +29472,12 @@ public struct DeleteNetworkInterfaceInput: Swift.Equatable { } } -struct DeleteNetworkInterfaceInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let networkInterfaceId: Swift.String? -} - -extension DeleteNetworkInterfaceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case networkInterfaceId = "networkInterfaceId" - } +extension DeleteNetworkInterfaceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - } -} - -extension DeleteNetworkInterfaceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteNetworkInterfaceOutput() + } } } @@ -41065,11 +29486,18 @@ public struct DeleteNetworkInterfaceOutput: Swift.Equatable { public init() { } } -enum DeleteNetworkInterfaceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteNetworkInterfaceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -41120,38 +29548,15 @@ public struct DeleteNetworkInterfacePermissionInput: Swift.Equatable { } } -struct DeleteNetworkInterfacePermissionInputBody: Swift.Equatable { - let networkInterfacePermissionId: Swift.String? - let force: Swift.Bool? - let dryRun: Swift.Bool? -} +extension DeleteNetworkInterfacePermissionOutput { -extension DeleteNetworkInterfacePermissionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case force = "Force" - case networkInterfacePermissionId = "NetworkInterfacePermissionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfacePermissionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfacePermissionId) - networkInterfacePermissionId = networkInterfacePermissionIdDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteNetworkInterfacePermissionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteNetworkInterfacePermissionOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteNetworkInterfacePermissionOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -41169,27 +29574,18 @@ public struct DeleteNetworkInterfacePermissionOutput: Swift.Equatable { } } -struct DeleteNetworkInterfacePermissionOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension DeleteNetworkInterfacePermissionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum DeleteNetworkInterfacePermissionOutputError { -enum DeleteNetworkInterfacePermissionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -41232,28 +29628,12 @@ public struct DeletePlacementGroupInput: Swift.Equatable { } } -struct DeletePlacementGroupInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let groupName: Swift.String? -} - -extension DeletePlacementGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case groupName = "groupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - } -} +extension DeletePlacementGroupOutput { -extension DeletePlacementGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeletePlacementGroupOutput() + } } } @@ -41262,11 +29642,18 @@ public struct DeletePlacementGroupOutput: Swift.Equatable { public init() { } } -enum DeletePlacementGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeletePlacementGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -41309,34 +29696,15 @@ public struct DeletePublicIpv4PoolInput: Swift.Equatable { } } -struct DeletePublicIpv4PoolInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let poolId: Swift.String? -} +extension DeletePublicIpv4PoolOutput { -extension DeletePublicIpv4PoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case poolId = "PoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - } -} - -extension DeletePublicIpv4PoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeletePublicIpv4PoolOutputBody = try responseDecoder.decode(responseBody: data) - self.returnValue = output.returnValue - } else { - self.returnValue = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeletePublicIpv4PoolOutput() + value.returnValue = try reader["returnValue"].readIfPresent() + return value } } } @@ -41353,36 +29721,23 @@ public struct DeletePublicIpv4PoolOutput: Swift.Equatable { } } -struct DeletePublicIpv4PoolOutputBody: Swift.Equatable { - let returnValue: Swift.Bool? -} - -extension DeletePublicIpv4PoolOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case returnValue = "returnValue" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnValueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnValue) - returnValue = returnValueDecoded - } -} +enum DeletePublicIpv4PoolOutputError { -enum DeletePublicIpv4PoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.DeleteQueuedReservedInstancesError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.DeleteQueuedReservedInstancesError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -41394,12 +29749,14 @@ extension EC2ClientTypes.DeleteQueuedReservedInstancesError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeleteQueuedReservedInstancesErrorCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DeleteQueuedReservedInstancesError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -41505,53 +29862,16 @@ public struct DeleteQueuedReservedInstancesInput: Swift.Equatable { } } -struct DeleteQueuedReservedInstancesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let reservedInstancesIds: [Swift.String]? -} - -extension DeleteQueuedReservedInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case reservedInstancesIds = "ReservedInstancesId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.reservedInstancesIds) { - struct KeyVal0{struct item{}} - let reservedInstancesIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesIds) - if let reservedInstancesIdsWrappedContainer = reservedInstancesIdsWrappedContainer { - let reservedInstancesIdsContainer = try reservedInstancesIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var reservedInstancesIdsBuffer:[Swift.String]? = nil - if let reservedInstancesIdsContainer = reservedInstancesIdsContainer { - reservedInstancesIdsBuffer = [Swift.String]() - for stringContainer0 in reservedInstancesIdsContainer { - reservedInstancesIdsBuffer?.append(stringContainer0) - } - } - reservedInstancesIds = reservedInstancesIdsBuffer - } else { - reservedInstancesIds = [] - } - } else { - reservedInstancesIds = nil - } - } -} +extension DeleteQueuedReservedInstancesOutput { -extension DeleteQueuedReservedInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteQueuedReservedInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.failedQueuedPurchaseDeletions = output.failedQueuedPurchaseDeletions - self.successfulQueuedPurchaseDeletions = output.successfulQueuedPurchaseDeletions - } else { - self.failedQueuedPurchaseDeletions = nil - self.successfulQueuedPurchaseDeletions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteQueuedReservedInstancesOutput() + value.failedQueuedPurchaseDeletions = try reader["failedQueuedPurchaseDeletionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FailedQueuedPurchaseDeletion.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.successfulQueuedPurchaseDeletions = try reader["successfulQueuedPurchaseDeletionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SuccessfulQueuedPurchaseDeletion.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -41572,65 +29892,18 @@ public struct DeleteQueuedReservedInstancesOutput: Swift.Equatable { } } -struct DeleteQueuedReservedInstancesOutputBody: Swift.Equatable { - let successfulQueuedPurchaseDeletions: [EC2ClientTypes.SuccessfulQueuedPurchaseDeletion]? - let failedQueuedPurchaseDeletions: [EC2ClientTypes.FailedQueuedPurchaseDeletion]? -} - -extension DeleteQueuedReservedInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failedQueuedPurchaseDeletions = "failedQueuedPurchaseDeletionSet" - case successfulQueuedPurchaseDeletions = "successfulQueuedPurchaseDeletionSet" - } +enum DeleteQueuedReservedInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successfulQueuedPurchaseDeletions) { - struct KeyVal0{struct item{}} - let successfulQueuedPurchaseDeletionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successfulQueuedPurchaseDeletions) - if let successfulQueuedPurchaseDeletionsWrappedContainer = successfulQueuedPurchaseDeletionsWrappedContainer { - let successfulQueuedPurchaseDeletionsContainer = try successfulQueuedPurchaseDeletionsWrappedContainer.decodeIfPresent([EC2ClientTypes.SuccessfulQueuedPurchaseDeletion].self, forKey: .member) - var successfulQueuedPurchaseDeletionsBuffer:[EC2ClientTypes.SuccessfulQueuedPurchaseDeletion]? = nil - if let successfulQueuedPurchaseDeletionsContainer = successfulQueuedPurchaseDeletionsContainer { - successfulQueuedPurchaseDeletionsBuffer = [EC2ClientTypes.SuccessfulQueuedPurchaseDeletion]() - for structureContainer0 in successfulQueuedPurchaseDeletionsContainer { - successfulQueuedPurchaseDeletionsBuffer?.append(structureContainer0) - } - } - successfulQueuedPurchaseDeletions = successfulQueuedPurchaseDeletionsBuffer - } else { - successfulQueuedPurchaseDeletions = [] - } - } else { - successfulQueuedPurchaseDeletions = nil - } - if containerValues.contains(.failedQueuedPurchaseDeletions) { - struct KeyVal0{struct item{}} - let failedQueuedPurchaseDeletionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failedQueuedPurchaseDeletions) - if let failedQueuedPurchaseDeletionsWrappedContainer = failedQueuedPurchaseDeletionsWrappedContainer { - let failedQueuedPurchaseDeletionsContainer = try failedQueuedPurchaseDeletionsWrappedContainer.decodeIfPresent([EC2ClientTypes.FailedQueuedPurchaseDeletion].self, forKey: .member) - var failedQueuedPurchaseDeletionsBuffer:[EC2ClientTypes.FailedQueuedPurchaseDeletion]? = nil - if let failedQueuedPurchaseDeletionsContainer = failedQueuedPurchaseDeletionsContainer { - failedQueuedPurchaseDeletionsBuffer = [EC2ClientTypes.FailedQueuedPurchaseDeletion]() - for structureContainer0 in failedQueuedPurchaseDeletionsContainer { - failedQueuedPurchaseDeletionsBuffer?.append(structureContainer0) - } - } - failedQueuedPurchaseDeletions = failedQueuedPurchaseDeletionsBuffer - } else { - failedQueuedPurchaseDeletions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - failedQueuedPurchaseDeletions = nil - } - } -} - -enum DeleteQueuedReservedInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -41694,40 +29967,12 @@ public struct DeleteRouteInput: Swift.Equatable { } } -struct DeleteRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let destinationIpv6CidrBlock: Swift.String? - let destinationPrefixListId: Swift.String? - let dryRun: Swift.Bool? - let routeTableId: Swift.String? -} - -extension DeleteRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "destinationCidrBlock" - case destinationIpv6CidrBlock = "destinationIpv6CidrBlock" - case destinationPrefixListId = "DestinationPrefixListId" - case dryRun = "dryRun" - case routeTableId = "routeTableId" - } +extension DeleteRouteOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let destinationIpv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationIpv6CidrBlock) - destinationIpv6CidrBlock = destinationIpv6CidrBlockDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - } -} - -extension DeleteRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteRouteOutput() + } } } @@ -41736,11 +29981,18 @@ public struct DeleteRouteOutput: Swift.Equatable { public init() { } } -enum DeleteRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteRouteOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -41783,28 +30035,12 @@ public struct DeleteRouteTableInput: Swift.Equatable { } } -struct DeleteRouteTableInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let routeTableId: Swift.String? -} +extension DeleteRouteTableOutput { -extension DeleteRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case routeTableId = "routeTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - } -} - -extension DeleteRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteRouteTableOutput() + } } } @@ -41813,11 +30049,18 @@ public struct DeleteRouteTableOutput: Swift.Equatable { public init() { } } -enum DeleteRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteRouteTableOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -41866,32 +30109,12 @@ public struct DeleteSecurityGroupInput: Swift.Equatable { } } -struct DeleteSecurityGroupInputBody: Swift.Equatable { - let groupId: Swift.String? - let groupName: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteSecurityGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case groupId = "GroupId" - case groupName = "GroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteSecurityGroupOutput { -extension DeleteSecurityGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSecurityGroupOutput() + } } } @@ -41900,11 +30123,18 @@ public struct DeleteSecurityGroupOutput: Swift.Equatable { public init() { } } -enum DeleteSecurityGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteSecurityGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -41947,28 +30177,12 @@ public struct DeleteSnapshotInput: Swift.Equatable { } } -struct DeleteSnapshotInputBody: Swift.Equatable { - let snapshotId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case snapshotId = "SnapshotId" - } +extension DeleteSnapshotOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSnapshotOutput() + } } } @@ -41977,11 +30191,18 @@ public struct DeleteSnapshotOutput: Swift.Equatable { public init() { } } -enum DeleteSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteSnapshotOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42017,24 +30238,12 @@ public struct DeleteSpotDatafeedSubscriptionInput: Swift.Equatable { } } -struct DeleteSpotDatafeedSubscriptionInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension DeleteSpotDatafeedSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteSpotDatafeedSubscriptionOutput { -extension DeleteSpotDatafeedSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSpotDatafeedSubscriptionOutput() + } } } @@ -42043,11 +30252,18 @@ public struct DeleteSpotDatafeedSubscriptionOutput: Swift.Equatable { public init() { } } -enum DeleteSpotDatafeedSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteSpotDatafeedSubscriptionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42090,34 +30306,15 @@ public struct DeleteSubnetCidrReservationInput: Swift.Equatable { } } -struct DeleteSubnetCidrReservationInputBody: Swift.Equatable { - let subnetCidrReservationId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteSubnetCidrReservationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case subnetCidrReservationId = "SubnetCidrReservationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetCidrReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetCidrReservationId) - subnetCidrReservationId = subnetCidrReservationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteSubnetCidrReservationOutput { -extension DeleteSubnetCidrReservationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteSubnetCidrReservationOutputBody = try responseDecoder.decode(responseBody: data) - self.deletedSubnetCidrReservation = output.deletedSubnetCidrReservation - } else { - self.deletedSubnetCidrReservation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteSubnetCidrReservationOutput() + value.deletedSubnetCidrReservation = try reader["deletedSubnetCidrReservation"].readIfPresent(readingClosure: EC2ClientTypes.SubnetCidrReservation.readingClosure) + return value } } } @@ -42134,27 +30331,18 @@ public struct DeleteSubnetCidrReservationOutput: Swift.Equatable { } } -struct DeleteSubnetCidrReservationOutputBody: Swift.Equatable { - let deletedSubnetCidrReservation: EC2ClientTypes.SubnetCidrReservation? -} - -extension DeleteSubnetCidrReservationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deletedSubnetCidrReservation = "deletedSubnetCidrReservation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deletedSubnetCidrReservationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetCidrReservation.self, forKey: .deletedSubnetCidrReservation) - deletedSubnetCidrReservation = deletedSubnetCidrReservationDecoded - } -} +enum DeleteSubnetCidrReservationOutputError { -enum DeleteSubnetCidrReservationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42197,28 +30385,12 @@ public struct DeleteSubnetInput: Swift.Equatable { } } -struct DeleteSubnetInputBody: Swift.Equatable { - let subnetId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteSubnetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case subnetId = "SubnetId" - } +extension DeleteSubnetOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteSubnetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSubnetOutput() + } } } @@ -42227,11 +30399,18 @@ public struct DeleteSubnetOutput: Swift.Equatable { public init() { } } -enum DeleteSubnetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteSubnetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42299,79 +30478,32 @@ public struct DeleteTagsInput: Swift.Equatable { } } -struct DeleteTagsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let resources: [Swift.String]? - let tags: [EC2ClientTypes.Tag]? -} +extension DeleteTagsOutput { -extension DeleteTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case resources = "resourceId" - case tags = "tag" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.resources) { - struct KeyVal0{struct member{}} - let resourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resources) - if let resourcesWrappedContainer = resourcesWrappedContainer { - let resourcesContainer = try resourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesBuffer:[Swift.String]? = nil - if let resourcesContainer = resourcesContainer { - resourcesBuffer = [Swift.String]() - for stringContainer0 in resourcesContainer { - resourcesBuffer?.append(stringContainer0) - } - } - resources = resourcesBuffer - } else { - resources = [] - } - } else { - resources = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTagsOutput() } } } -extension DeleteTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DeleteTagsOutput: Swift.Equatable { public init() { } } -enum DeleteTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42414,34 +30546,15 @@ public struct DeleteTrafficMirrorFilterInput: Swift.Equatable { } } -struct DeleteTrafficMirrorFilterInputBody: Swift.Equatable { - let trafficMirrorFilterId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTrafficMirrorFilterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case trafficMirrorFilterId = "TrafficMirrorFilterId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteTrafficMirrorFilterOutput { -extension DeleteTrafficMirrorFilterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTrafficMirrorFilterOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficMirrorFilterId = output.trafficMirrorFilterId - } else { - self.trafficMirrorFilterId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTrafficMirrorFilterOutput() + value.trafficMirrorFilterId = try reader["trafficMirrorFilterId"].readIfPresent() + return value } } } @@ -42458,27 +30571,18 @@ public struct DeleteTrafficMirrorFilterOutput: Swift.Equatable { } } -struct DeleteTrafficMirrorFilterOutputBody: Swift.Equatable { - let trafficMirrorFilterId: Swift.String? -} - -extension DeleteTrafficMirrorFilterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficMirrorFilterId = "trafficMirrorFilterId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - } -} +enum DeleteTrafficMirrorFilterOutputError { -enum DeleteTrafficMirrorFilterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42521,34 +30625,15 @@ public struct DeleteTrafficMirrorFilterRuleInput: Swift.Equatable { } } -struct DeleteTrafficMirrorFilterRuleInputBody: Swift.Equatable { - let trafficMirrorFilterRuleId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTrafficMirrorFilterRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case trafficMirrorFilterRuleId = "TrafficMirrorFilterRuleId" - } +extension DeleteTrafficMirrorFilterRuleOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterRuleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterRuleId) - trafficMirrorFilterRuleId = trafficMirrorFilterRuleIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteTrafficMirrorFilterRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTrafficMirrorFilterRuleOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficMirrorFilterRuleId = output.trafficMirrorFilterRuleId - } else { - self.trafficMirrorFilterRuleId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTrafficMirrorFilterRuleOutput() + value.trafficMirrorFilterRuleId = try reader["trafficMirrorFilterRuleId"].readIfPresent() + return value } } } @@ -42565,27 +30650,18 @@ public struct DeleteTrafficMirrorFilterRuleOutput: Swift.Equatable { } } -struct DeleteTrafficMirrorFilterRuleOutputBody: Swift.Equatable { - let trafficMirrorFilterRuleId: Swift.String? -} - -extension DeleteTrafficMirrorFilterRuleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficMirrorFilterRuleId = "trafficMirrorFilterRuleId" - } +enum DeleteTrafficMirrorFilterRuleOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterRuleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterRuleId) - trafficMirrorFilterRuleId = trafficMirrorFilterRuleIdDecoded - } -} - -enum DeleteTrafficMirrorFilterRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42628,34 +30704,15 @@ public struct DeleteTrafficMirrorSessionInput: Swift.Equatable { } } -struct DeleteTrafficMirrorSessionInputBody: Swift.Equatable { - let trafficMirrorSessionId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTrafficMirrorSessionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case trafficMirrorSessionId = "TrafficMirrorSessionId" - } +extension DeleteTrafficMirrorSessionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorSessionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorSessionId) - trafficMirrorSessionId = trafficMirrorSessionIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteTrafficMirrorSessionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTrafficMirrorSessionOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficMirrorSessionId = output.trafficMirrorSessionId - } else { - self.trafficMirrorSessionId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTrafficMirrorSessionOutput() + value.trafficMirrorSessionId = try reader["trafficMirrorSessionId"].readIfPresent() + return value } } } @@ -42672,27 +30729,18 @@ public struct DeleteTrafficMirrorSessionOutput: Swift.Equatable { } } -struct DeleteTrafficMirrorSessionOutputBody: Swift.Equatable { - let trafficMirrorSessionId: Swift.String? -} - -extension DeleteTrafficMirrorSessionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficMirrorSessionId = "trafficMirrorSessionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorSessionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorSessionId) - trafficMirrorSessionId = trafficMirrorSessionIdDecoded - } -} +enum DeleteTrafficMirrorSessionOutputError { -enum DeleteTrafficMirrorSessionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42735,34 +30783,15 @@ public struct DeleteTrafficMirrorTargetInput: Swift.Equatable { } } -struct DeleteTrafficMirrorTargetInputBody: Swift.Equatable { - let trafficMirrorTargetId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTrafficMirrorTargetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case trafficMirrorTargetId = "TrafficMirrorTargetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorTargetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorTargetId) - trafficMirrorTargetId = trafficMirrorTargetIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteTrafficMirrorTargetOutput { -extension DeleteTrafficMirrorTargetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTrafficMirrorTargetOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficMirrorTargetId = output.trafficMirrorTargetId - } else { - self.trafficMirrorTargetId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTrafficMirrorTargetOutput() + value.trafficMirrorTargetId = try reader["trafficMirrorTargetId"].readIfPresent() + return value } } } @@ -42779,27 +30808,18 @@ public struct DeleteTrafficMirrorTargetOutput: Swift.Equatable { } } -struct DeleteTrafficMirrorTargetOutputBody: Swift.Equatable { - let trafficMirrorTargetId: Swift.String? -} +enum DeleteTrafficMirrorTargetOutputError { -extension DeleteTrafficMirrorTargetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficMirrorTargetId = "trafficMirrorTargetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorTargetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorTargetId) - trafficMirrorTargetId = trafficMirrorTargetIdDecoded - } -} - -enum DeleteTrafficMirrorTargetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42842,34 +30862,15 @@ public struct DeleteTransitGatewayConnectInput: Swift.Equatable { } } -struct DeleteTransitGatewayConnectInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTransitGatewayConnectInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteTransitGatewayConnectOutput { -extension DeleteTransitGatewayConnectOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayConnectOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayConnect = output.transitGatewayConnect - } else { - self.transitGatewayConnect = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayConnectOutput() + value.transitGatewayConnect = try reader["transitGatewayConnect"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayConnect.readingClosure) + return value } } } @@ -42886,27 +30887,18 @@ public struct DeleteTransitGatewayConnectOutput: Swift.Equatable { } } -struct DeleteTransitGatewayConnectOutputBody: Swift.Equatable { - let transitGatewayConnect: EC2ClientTypes.TransitGatewayConnect? -} - -extension DeleteTransitGatewayConnectOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayConnect = "transitGatewayConnect" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayConnectDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayConnect.self, forKey: .transitGatewayConnect) - transitGatewayConnect = transitGatewayConnectDecoded - } -} +enum DeleteTransitGatewayConnectOutputError { -enum DeleteTransitGatewayConnectOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -42949,34 +30941,15 @@ public struct DeleteTransitGatewayConnectPeerInput: Swift.Equatable { } } -struct DeleteTransitGatewayConnectPeerInputBody: Swift.Equatable { - let transitGatewayConnectPeerId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTransitGatewayConnectPeerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayConnectPeerId = "TransitGatewayConnectPeerId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayConnectPeerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayConnectPeerId) - transitGatewayConnectPeerId = transitGatewayConnectPeerIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteTransitGatewayConnectPeerOutput { -extension DeleteTransitGatewayConnectPeerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayConnectPeerOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayConnectPeer = output.transitGatewayConnectPeer - } else { - self.transitGatewayConnectPeer = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayConnectPeerOutput() + value.transitGatewayConnectPeer = try reader["transitGatewayConnectPeer"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayConnectPeer.readingClosure) + return value } } } @@ -42993,27 +30966,18 @@ public struct DeleteTransitGatewayConnectPeerOutput: Swift.Equatable { } } -struct DeleteTransitGatewayConnectPeerOutputBody: Swift.Equatable { - let transitGatewayConnectPeer: EC2ClientTypes.TransitGatewayConnectPeer? -} - -extension DeleteTransitGatewayConnectPeerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayConnectPeer = "transitGatewayConnectPeer" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayConnectPeerDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayConnectPeer.self, forKey: .transitGatewayConnectPeer) - transitGatewayConnectPeer = transitGatewayConnectPeerDecoded - } -} +enum DeleteTransitGatewayConnectPeerOutputError { -enum DeleteTransitGatewayConnectPeerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -43056,26 +31020,6 @@ public struct DeleteTransitGatewayInput: Swift.Equatable { } } -struct DeleteTransitGatewayInputBody: Swift.Equatable { - let transitGatewayId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTransitGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayId = "TransitGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - extension DeleteTransitGatewayMulticastDomainInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -43114,34 +31058,15 @@ public struct DeleteTransitGatewayMulticastDomainInput: Swift.Equatable { } } -struct DeleteTransitGatewayMulticastDomainInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let dryRun: Swift.Bool? -} +extension DeleteTransitGatewayMulticastDomainOutput { -extension DeleteTransitGatewayMulticastDomainInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteTransitGatewayMulticastDomainOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayMulticastDomainOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayMulticastDomain = output.transitGatewayMulticastDomain - } else { - self.transitGatewayMulticastDomain = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayMulticastDomainOutput() + value.transitGatewayMulticastDomain = try reader["transitGatewayMulticastDomain"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDomain.readingClosure) + return value } } } @@ -43158,39 +31083,31 @@ public struct DeleteTransitGatewayMulticastDomainOutput: Swift.Equatable { } } -struct DeleteTransitGatewayMulticastDomainOutputBody: Swift.Equatable { - let transitGatewayMulticastDomain: EC2ClientTypes.TransitGatewayMulticastDomain? -} - -extension DeleteTransitGatewayMulticastDomainOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayMulticastDomain = "transitGatewayMulticastDomain" - } +enum DeleteTransitGatewayMulticastDomainOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDomain.self, forKey: .transitGatewayMulticastDomain) - transitGatewayMulticastDomain = transitGatewayMulticastDomainDecoded - } -} - -enum DeleteTransitGatewayMulticastDomainOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension DeleteTransitGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGateway = output.transitGateway - } else { - self.transitGateway = nil +extension DeleteTransitGatewayOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayOutput() + value.transitGateway = try reader["transitGateway"].readIfPresent(readingClosure: EC2ClientTypes.TransitGateway.readingClosure) + return value } } } @@ -43207,27 +31124,18 @@ public struct DeleteTransitGatewayOutput: Swift.Equatable { } } -struct DeleteTransitGatewayOutputBody: Swift.Equatable { - let transitGateway: EC2ClientTypes.TransitGateway? -} - -extension DeleteTransitGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGateway = "transitGateway" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGateway.self, forKey: .transitGateway) - transitGateway = transitGatewayDecoded - } -} +enum DeleteTransitGatewayOutputError { -enum DeleteTransitGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -43270,34 +31178,15 @@ public struct DeleteTransitGatewayPeeringAttachmentInput: Swift.Equatable { } } -struct DeleteTransitGatewayPeeringAttachmentInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTransitGatewayPeeringAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteTransitGatewayPeeringAttachmentOutput { -extension DeleteTransitGatewayPeeringAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayPeeringAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPeeringAttachment = output.transitGatewayPeeringAttachment - } else { - self.transitGatewayPeeringAttachment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayPeeringAttachmentOutput() + value.transitGatewayPeeringAttachment = try reader["transitGatewayPeeringAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPeeringAttachment.readingClosure) + return value } } } @@ -43314,27 +31203,18 @@ public struct DeleteTransitGatewayPeeringAttachmentOutput: Swift.Equatable { } } -struct DeleteTransitGatewayPeeringAttachmentOutputBody: Swift.Equatable { - let transitGatewayPeeringAttachment: EC2ClientTypes.TransitGatewayPeeringAttachment? -} +enum DeleteTransitGatewayPeeringAttachmentOutputError { -extension DeleteTransitGatewayPeeringAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPeeringAttachment = "transitGatewayPeeringAttachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPeeringAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPeeringAttachment.self, forKey: .transitGatewayPeeringAttachment) - transitGatewayPeeringAttachment = transitGatewayPeeringAttachmentDecoded - } -} - -enum DeleteTransitGatewayPeeringAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -43377,34 +31257,15 @@ public struct DeleteTransitGatewayPolicyTableInput: Swift.Equatable { } } -struct DeleteTransitGatewayPolicyTableInputBody: Swift.Equatable { - let transitGatewayPolicyTableId: Swift.String? - let dryRun: Swift.Bool? -} +extension DeleteTransitGatewayPolicyTableOutput { -extension DeleteTransitGatewayPolicyTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayPolicyTableId = "TransitGatewayPolicyTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayPolicyTableId) - transitGatewayPolicyTableId = transitGatewayPolicyTableIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteTransitGatewayPolicyTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayPolicyTableOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPolicyTable = output.transitGatewayPolicyTable - } else { - self.transitGatewayPolicyTable = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayPolicyTableOutput() + value.transitGatewayPolicyTable = try reader["transitGatewayPolicyTable"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPolicyTable.readingClosure) + return value } } } @@ -43421,27 +31282,18 @@ public struct DeleteTransitGatewayPolicyTableOutput: Swift.Equatable { } } -struct DeleteTransitGatewayPolicyTableOutputBody: Swift.Equatable { - let transitGatewayPolicyTable: EC2ClientTypes.TransitGatewayPolicyTable? -} - -extension DeleteTransitGatewayPolicyTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPolicyTable = "transitGatewayPolicyTable" - } +enum DeleteTransitGatewayPolicyTableOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPolicyTable.self, forKey: .transitGatewayPolicyTable) - transitGatewayPolicyTable = transitGatewayPolicyTableDecoded - } -} - -enum DeleteTransitGatewayPolicyTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -43492,38 +31344,15 @@ public struct DeleteTransitGatewayPrefixListReferenceInput: Swift.Equatable { } } -struct DeleteTransitGatewayPrefixListReferenceInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let prefixListId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTransitGatewayPrefixListReferenceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case prefixListId = "PrefixListId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteTransitGatewayPrefixListReferenceOutput { -extension DeleteTransitGatewayPrefixListReferenceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayPrefixListReferenceOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPrefixListReference = output.transitGatewayPrefixListReference - } else { - self.transitGatewayPrefixListReference = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayPrefixListReferenceOutput() + value.transitGatewayPrefixListReference = try reader["transitGatewayPrefixListReference"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPrefixListReference.readingClosure) + return value } } } @@ -43540,27 +31369,18 @@ public struct DeleteTransitGatewayPrefixListReferenceOutput: Swift.Equatable { } } -struct DeleteTransitGatewayPrefixListReferenceOutputBody: Swift.Equatable { - let transitGatewayPrefixListReference: EC2ClientTypes.TransitGatewayPrefixListReference? -} - -extension DeleteTransitGatewayPrefixListReferenceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPrefixListReference = "transitGatewayPrefixListReference" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPrefixListReferenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPrefixListReference.self, forKey: .transitGatewayPrefixListReference) - transitGatewayPrefixListReference = transitGatewayPrefixListReferenceDecoded - } -} +enum DeleteTransitGatewayPrefixListReferenceOutputError { -enum DeleteTransitGatewayPrefixListReferenceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -43611,38 +31431,15 @@ public struct DeleteTransitGatewayRouteInput: Swift.Equatable { } } -struct DeleteTransitGatewayRouteInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let destinationCidrBlock: Swift.String? - let dryRun: Swift.Bool? -} +extension DeleteTransitGatewayRouteOutput { -extension DeleteTransitGatewayRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "DestinationCidrBlock" - case dryRun = "DryRun" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteTransitGatewayRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.route = output.route - } else { - self.route = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayRouteOutput() + value.route = try reader["route"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRoute.readingClosure) + return value } } } @@ -43659,27 +31456,18 @@ public struct DeleteTransitGatewayRouteOutput: Swift.Equatable { } } -struct DeleteTransitGatewayRouteOutputBody: Swift.Equatable { - let route: EC2ClientTypes.TransitGatewayRoute? -} +enum DeleteTransitGatewayRouteOutputError { -extension DeleteTransitGatewayRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case route = "route" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let routeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRoute.self, forKey: .route) - route = routeDecoded - } -} - -enum DeleteTransitGatewayRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -43722,34 +31510,15 @@ public struct DeleteTransitGatewayRouteTableAnnouncementInput: Swift.Equatable { } } -struct DeleteTransitGatewayRouteTableAnnouncementInputBody: Swift.Equatable { - let transitGatewayRouteTableAnnouncementId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTransitGatewayRouteTableAnnouncementInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayRouteTableAnnouncementId = "TransitGatewayRouteTableAnnouncementId" - } +extension DeleteTransitGatewayRouteTableAnnouncementOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableAnnouncementIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableAnnouncementId) - transitGatewayRouteTableAnnouncementId = transitGatewayRouteTableAnnouncementIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteTransitGatewayRouteTableAnnouncementOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayRouteTableAnnouncementOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayRouteTableAnnouncement = output.transitGatewayRouteTableAnnouncement - } else { - self.transitGatewayRouteTableAnnouncement = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayRouteTableAnnouncementOutput() + value.transitGatewayRouteTableAnnouncement = try reader["transitGatewayRouteTableAnnouncement"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRouteTableAnnouncement.readingClosure) + return value } } } @@ -43766,27 +31535,18 @@ public struct DeleteTransitGatewayRouteTableAnnouncementOutput: Swift.Equatable } } -struct DeleteTransitGatewayRouteTableAnnouncementOutputBody: Swift.Equatable { - let transitGatewayRouteTableAnnouncement: EC2ClientTypes.TransitGatewayRouteTableAnnouncement? -} - -extension DeleteTransitGatewayRouteTableAnnouncementOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayRouteTableAnnouncement = "transitGatewayRouteTableAnnouncement" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableAnnouncementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTableAnnouncement.self, forKey: .transitGatewayRouteTableAnnouncement) - transitGatewayRouteTableAnnouncement = transitGatewayRouteTableAnnouncementDecoded - } -} +enum DeleteTransitGatewayRouteTableAnnouncementOutputError { -enum DeleteTransitGatewayRouteTableAnnouncementOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -43829,34 +31589,15 @@ public struct DeleteTransitGatewayRouteTableInput: Swift.Equatable { } } -struct DeleteTransitGatewayRouteTableInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTransitGatewayRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteTransitGatewayRouteTableOutput { -extension DeleteTransitGatewayRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayRouteTableOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayRouteTable = output.transitGatewayRouteTable - } else { - self.transitGatewayRouteTable = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayRouteTableOutput() + value.transitGatewayRouteTable = try reader["transitGatewayRouteTable"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRouteTable.readingClosure) + return value } } } @@ -43873,27 +31614,18 @@ public struct DeleteTransitGatewayRouteTableOutput: Swift.Equatable { } } -struct DeleteTransitGatewayRouteTableOutputBody: Swift.Equatable { - let transitGatewayRouteTable: EC2ClientTypes.TransitGatewayRouteTable? -} - -extension DeleteTransitGatewayRouteTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayRouteTable = "transitGatewayRouteTable" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTable.self, forKey: .transitGatewayRouteTable) - transitGatewayRouteTable = transitGatewayRouteTableDecoded - } -} +enum DeleteTransitGatewayRouteTableOutputError { -enum DeleteTransitGatewayRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -43936,34 +31668,15 @@ public struct DeleteTransitGatewayVpcAttachmentInput: Swift.Equatable { } } -struct DeleteTransitGatewayVpcAttachmentInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteTransitGatewayVpcAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteTransitGatewayVpcAttachmentOutput { -extension DeleteTransitGatewayVpcAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTransitGatewayVpcAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayVpcAttachment = output.transitGatewayVpcAttachment - } else { - self.transitGatewayVpcAttachment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteTransitGatewayVpcAttachmentOutput() + value.transitGatewayVpcAttachment = try reader["transitGatewayVpcAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayVpcAttachment.readingClosure) + return value } } } @@ -43980,27 +31693,18 @@ public struct DeleteTransitGatewayVpcAttachmentOutput: Swift.Equatable { } } -struct DeleteTransitGatewayVpcAttachmentOutputBody: Swift.Equatable { - let transitGatewayVpcAttachment: EC2ClientTypes.TransitGatewayVpcAttachment? -} - -extension DeleteTransitGatewayVpcAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayVpcAttachment = "transitGatewayVpcAttachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayVpcAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayVpcAttachment.self, forKey: .transitGatewayVpcAttachment) - transitGatewayVpcAttachment = transitGatewayVpcAttachmentDecoded - } -} +enum DeleteTransitGatewayVpcAttachmentOutputError { -enum DeleteTransitGatewayVpcAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -44050,38 +31754,15 @@ public struct DeleteVerifiedAccessEndpointInput: Swift.Equatable { } } -struct DeleteVerifiedAccessEndpointInputBody: Swift.Equatable { - let verifiedAccessEndpointId: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteVerifiedAccessEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case verifiedAccessEndpointId = "VerifiedAccessEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessEndpointId) - verifiedAccessEndpointId = verifiedAccessEndpointIdDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteVerifiedAccessEndpointOutput { -extension DeleteVerifiedAccessEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteVerifiedAccessEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessEndpoint = output.verifiedAccessEndpoint - } else { - self.verifiedAccessEndpoint = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteVerifiedAccessEndpointOutput() + value.verifiedAccessEndpoint = try reader["verifiedAccessEndpoint"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessEndpoint.readingClosure) + return value } } } @@ -44098,27 +31779,18 @@ public struct DeleteVerifiedAccessEndpointOutput: Swift.Equatable { } } -struct DeleteVerifiedAccessEndpointOutputBody: Swift.Equatable { - let verifiedAccessEndpoint: EC2ClientTypes.VerifiedAccessEndpoint? -} - -extension DeleteVerifiedAccessEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessEndpoint = "verifiedAccessEndpoint" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpoint.self, forKey: .verifiedAccessEndpoint) - verifiedAccessEndpoint = verifiedAccessEndpointDecoded - } -} +enum DeleteVerifiedAccessEndpointOutputError { -enum DeleteVerifiedAccessEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -44168,38 +31840,15 @@ public struct DeleteVerifiedAccessGroupInput: Swift.Equatable { } } -struct DeleteVerifiedAccessGroupInputBody: Swift.Equatable { - let verifiedAccessGroupId: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} +extension DeleteVerifiedAccessGroupOutput { -extension DeleteVerifiedAccessGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case verifiedAccessGroupId = "VerifiedAccessGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteVerifiedAccessGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteVerifiedAccessGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessGroup = output.verifiedAccessGroup - } else { - self.verifiedAccessGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteVerifiedAccessGroupOutput() + value.verifiedAccessGroup = try reader["verifiedAccessGroup"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessGroup.readingClosure) + return value } } } @@ -44216,27 +31865,18 @@ public struct DeleteVerifiedAccessGroupOutput: Swift.Equatable { } } -struct DeleteVerifiedAccessGroupOutputBody: Swift.Equatable { - let verifiedAccessGroup: EC2ClientTypes.VerifiedAccessGroup? -} +enum DeleteVerifiedAccessGroupOutputError { -extension DeleteVerifiedAccessGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessGroup = "verifiedAccessGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessGroup.self, forKey: .verifiedAccessGroup) - verifiedAccessGroup = verifiedAccessGroupDecoded - } -} - -enum DeleteVerifiedAccessGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -44286,38 +31926,15 @@ public struct DeleteVerifiedAccessInstanceInput: Swift.Equatable { } } -struct DeleteVerifiedAccessInstanceInputBody: Swift.Equatable { - let verifiedAccessInstanceId: Swift.String? - let dryRun: Swift.Bool? - let clientToken: Swift.String? -} - -extension DeleteVerifiedAccessInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - } +extension DeleteVerifiedAccessInstanceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension DeleteVerifiedAccessInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteVerifiedAccessInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessInstance = output.verifiedAccessInstance - } else { - self.verifiedAccessInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteVerifiedAccessInstanceOutput() + value.verifiedAccessInstance = try reader["verifiedAccessInstance"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessInstance.readingClosure) + return value } } } @@ -44334,27 +31951,18 @@ public struct DeleteVerifiedAccessInstanceOutput: Swift.Equatable { } } -struct DeleteVerifiedAccessInstanceOutputBody: Swift.Equatable { - let verifiedAccessInstance: EC2ClientTypes.VerifiedAccessInstance? -} - -extension DeleteVerifiedAccessInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessInstance = "verifiedAccessInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessInstance.self, forKey: .verifiedAccessInstance) - verifiedAccessInstance = verifiedAccessInstanceDecoded - } -} +enum DeleteVerifiedAccessInstanceOutputError { -enum DeleteVerifiedAccessInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -44404,38 +32012,15 @@ public struct DeleteVerifiedAccessTrustProviderInput: Swift.Equatable { } } -struct DeleteVerifiedAccessTrustProviderInputBody: Swift.Equatable { - let verifiedAccessTrustProviderId: Swift.String? - let dryRun: Swift.Bool? - let clientToken: Swift.String? -} - -extension DeleteVerifiedAccessTrustProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case verifiedAccessTrustProviderId = "VerifiedAccessTrustProviderId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessTrustProviderId) - verifiedAccessTrustProviderId = verifiedAccessTrustProviderIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +extension DeleteVerifiedAccessTrustProviderOutput { -extension DeleteVerifiedAccessTrustProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteVerifiedAccessTrustProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessTrustProvider = output.verifiedAccessTrustProvider - } else { - self.verifiedAccessTrustProvider = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteVerifiedAccessTrustProviderOutput() + value.verifiedAccessTrustProvider = try reader["verifiedAccessTrustProvider"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessTrustProvider.readingClosure) + return value } } } @@ -44452,27 +32037,18 @@ public struct DeleteVerifiedAccessTrustProviderOutput: Swift.Equatable { } } -struct DeleteVerifiedAccessTrustProviderOutputBody: Swift.Equatable { - let verifiedAccessTrustProvider: EC2ClientTypes.VerifiedAccessTrustProvider? -} - -extension DeleteVerifiedAccessTrustProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessTrustProvider = "verifiedAccessTrustProvider" - } +enum DeleteVerifiedAccessTrustProviderOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessTrustProvider.self, forKey: .verifiedAccessTrustProvider) - verifiedAccessTrustProvider = verifiedAccessTrustProviderDecoded - } -} - -enum DeleteVerifiedAccessTrustProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -44515,28 +32091,12 @@ public struct DeleteVolumeInput: Swift.Equatable { } } -struct DeleteVolumeInputBody: Swift.Equatable { - let volumeId: Swift.String? - let dryRun: Swift.Bool? -} +extension DeleteVolumeOutput { -extension DeleteVolumeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case volumeId = "VolumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeleteVolumeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteVolumeOutput() + } } } @@ -44545,11 +32105,18 @@ public struct DeleteVolumeOutput: Swift.Equatable { public init() { } } -enum DeleteVolumeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteVolumeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -44601,51 +32168,15 @@ public struct DeleteVpcEndpointConnectionNotificationsInput: Swift.Equatable { } } -struct DeleteVpcEndpointConnectionNotificationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let connectionNotificationIds: [Swift.String]? -} +extension DeleteVpcEndpointConnectionNotificationsOutput { -extension DeleteVpcEndpointConnectionNotificationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectionNotificationIds = "ConnectionNotificationId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.connectionNotificationIds) { - struct KeyVal0{struct item{}} - let connectionNotificationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .connectionNotificationIds) - if let connectionNotificationIdsWrappedContainer = connectionNotificationIdsWrappedContainer { - let connectionNotificationIdsContainer = try connectionNotificationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var connectionNotificationIdsBuffer:[Swift.String]? = nil - if let connectionNotificationIdsContainer = connectionNotificationIdsContainer { - connectionNotificationIdsBuffer = [Swift.String]() - for stringContainer0 in connectionNotificationIdsContainer { - connectionNotificationIdsBuffer?.append(stringContainer0) - } - } - connectionNotificationIds = connectionNotificationIdsBuffer - } else { - connectionNotificationIds = [] - } - } else { - connectionNotificationIds = nil - } - } -} - -extension DeleteVpcEndpointConnectionNotificationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteVpcEndpointConnectionNotificationsOutputBody = try responseDecoder.decode(responseBody: data) - self.unsuccessful = output.unsuccessful - } else { - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteVpcEndpointConnectionNotificationsOutput() + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -44662,44 +32193,18 @@ public struct DeleteVpcEndpointConnectionNotificationsOutput: Swift.Equatable { } } -struct DeleteVpcEndpointConnectionNotificationsOutputBody: Swift.Equatable { - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension DeleteVpcEndpointConnectionNotificationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case unsuccessful = "unsuccessful" - } +enum DeleteVpcEndpointConnectionNotificationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum DeleteVpcEndpointConnectionNotificationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -44751,51 +32256,15 @@ public struct DeleteVpcEndpointServiceConfigurationsInput: Swift.Equatable { } } -struct DeleteVpcEndpointServiceConfigurationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceIds: [Swift.String]? -} - -extension DeleteVpcEndpointServiceConfigurationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case serviceIds = "ServiceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.serviceIds) { - struct KeyVal0{struct item{}} - let serviceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceIds) - if let serviceIdsWrappedContainer = serviceIdsWrappedContainer { - let serviceIdsContainer = try serviceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serviceIdsBuffer:[Swift.String]? = nil - if let serviceIdsContainer = serviceIdsContainer { - serviceIdsBuffer = [Swift.String]() - for stringContainer0 in serviceIdsContainer { - serviceIdsBuffer?.append(stringContainer0) - } - } - serviceIds = serviceIdsBuffer - } else { - serviceIds = [] - } - } else { - serviceIds = nil - } - } -} +extension DeleteVpcEndpointServiceConfigurationsOutput { -extension DeleteVpcEndpointServiceConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteVpcEndpointServiceConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.unsuccessful = output.unsuccessful - } else { - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteVpcEndpointServiceConfigurationsOutput() + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -44812,44 +32281,18 @@ public struct DeleteVpcEndpointServiceConfigurationsOutput: Swift.Equatable { } } -struct DeleteVpcEndpointServiceConfigurationsOutputBody: Swift.Equatable { - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension DeleteVpcEndpointServiceConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case unsuccessful = "unsuccessful" - } +enum DeleteVpcEndpointServiceConfigurationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum DeleteVpcEndpointServiceConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -44901,51 +32344,15 @@ public struct DeleteVpcEndpointsInput: Swift.Equatable { } } -struct DeleteVpcEndpointsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcEndpointIds: [Swift.String]? -} - -extension DeleteVpcEndpointsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case vpcEndpointIds = "VpcEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.vpcEndpointIds) { - struct KeyVal0{struct item{}} - let vpcEndpointIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcEndpointIds) - if let vpcEndpointIdsWrappedContainer = vpcEndpointIdsWrappedContainer { - let vpcEndpointIdsContainer = try vpcEndpointIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcEndpointIdsBuffer:[Swift.String]? = nil - if let vpcEndpointIdsContainer = vpcEndpointIdsContainer { - vpcEndpointIdsBuffer = [Swift.String]() - for stringContainer0 in vpcEndpointIdsContainer { - vpcEndpointIdsBuffer?.append(stringContainer0) - } - } - vpcEndpointIds = vpcEndpointIdsBuffer - } else { - vpcEndpointIds = [] - } - } else { - vpcEndpointIds = nil - } - } -} +extension DeleteVpcEndpointsOutput { -extension DeleteVpcEndpointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteVpcEndpointsOutputBody = try responseDecoder.decode(responseBody: data) - self.unsuccessful = output.unsuccessful - } else { - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteVpcEndpointsOutput() + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -44962,44 +32369,18 @@ public struct DeleteVpcEndpointsOutput: Swift.Equatable { } } -struct DeleteVpcEndpointsOutputBody: Swift.Equatable { - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension DeleteVpcEndpointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case unsuccessful = "unsuccessful" - } +enum DeleteVpcEndpointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum DeleteVpcEndpointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -45042,28 +32423,12 @@ public struct DeleteVpcInput: Swift.Equatable { } } -struct DeleteVpcInputBody: Swift.Equatable { - let vpcId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteVpcInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteVpcOutput { -extension DeleteVpcOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteVpcOutput() + } } } @@ -45072,11 +32437,18 @@ public struct DeleteVpcOutput: Swift.Equatable { public init() { } } -enum DeleteVpcOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteVpcOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -45119,34 +32491,15 @@ public struct DeleteVpcPeeringConnectionInput: Swift.Equatable { } } -struct DeleteVpcPeeringConnectionInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcPeeringConnectionId: Swift.String? -} - -extension DeleteVpcPeeringConnectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - } -} +extension DeleteVpcPeeringConnectionOutput { -extension DeleteVpcPeeringConnectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteVpcPeeringConnectionOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteVpcPeeringConnectionOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -45163,27 +32516,18 @@ public struct DeleteVpcPeeringConnectionOutput: Swift.Equatable { } } -struct DeleteVpcPeeringConnectionOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension DeleteVpcPeeringConnectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum DeleteVpcPeeringConnectionOutputError { -enum DeleteVpcPeeringConnectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -45227,28 +32571,12 @@ public struct DeleteVpnConnectionInput: Swift.Equatable { } } -struct DeleteVpnConnectionInputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteVpnConnectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpnConnectionId = "VpnConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteVpnConnectionOutput { -extension DeleteVpnConnectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteVpnConnectionOutput() + } } } @@ -45257,11 +32585,18 @@ public struct DeleteVpnConnectionOutput: Swift.Equatable { public init() { } } -enum DeleteVpnConnectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteVpnConnectionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -45306,28 +32641,12 @@ public struct DeleteVpnConnectionRouteInput: Swift.Equatable { } } -struct DeleteVpnConnectionRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let vpnConnectionId: Swift.String? -} - -extension DeleteVpnConnectionRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "DestinationCidrBlock" - case vpnConnectionId = "VpnConnectionId" - } +extension DeleteVpnConnectionRouteOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - } -} - -extension DeleteVpnConnectionRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteVpnConnectionRouteOutput() + } } } @@ -45336,11 +32655,18 @@ public struct DeleteVpnConnectionRouteOutput: Swift.Equatable { public init() { } } -enum DeleteVpnConnectionRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteVpnConnectionRouteOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -45384,28 +32710,12 @@ public struct DeleteVpnGatewayInput: Swift.Equatable { } } -struct DeleteVpnGatewayInputBody: Swift.Equatable { - let vpnGatewayId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeleteVpnGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpnGatewayId = "VpnGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnGatewayId) - vpnGatewayId = vpnGatewayIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeleteVpnGatewayOutput { -extension DeleteVpnGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteVpnGatewayOutput() + } } } @@ -45414,11 +32724,18 @@ public struct DeleteVpnGatewayOutput: Swift.Equatable { public init() { } } -enum DeleteVpnGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeleteVpnGatewayOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -45461,34 +32778,15 @@ public struct DeprovisionByoipCidrInput: Swift.Equatable { } } -struct DeprovisionByoipCidrInputBody: Swift.Equatable { - let cidr: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeprovisionByoipCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeprovisionByoipCidrOutput { -extension DeprovisionByoipCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeprovisionByoipCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.byoipCidr = output.byoipCidr - } else { - self.byoipCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeprovisionByoipCidrOutput() + value.byoipCidr = try reader["byoipCidr"].readIfPresent(readingClosure: EC2ClientTypes.ByoipCidr.readingClosure) + return value } } } @@ -45505,27 +32803,18 @@ public struct DeprovisionByoipCidrOutput: Swift.Equatable { } } -struct DeprovisionByoipCidrOutputBody: Swift.Equatable { - let byoipCidr: EC2ClientTypes.ByoipCidr? -} - -extension DeprovisionByoipCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoipCidr = "byoipCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let byoipCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ByoipCidr.self, forKey: .byoipCidr) - byoipCidr = byoipCidrDecoded - } -} +enum DeprovisionByoipCidrOutputError { -enum DeprovisionByoipCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -45576,38 +32865,15 @@ public struct DeprovisionIpamByoasnInput: Swift.Equatable { } } -struct DeprovisionIpamByoasnInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamId: Swift.String? - let asn: Swift.String? -} - -extension DeprovisionIpamByoasnInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asn = "Asn" - case dryRun = "DryRun" - case ipamId = "IpamId" - } +extension DeprovisionIpamByoasnOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let asnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .asn) - asn = asnDecoded - } -} - -extension DeprovisionIpamByoasnOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeprovisionIpamByoasnOutputBody = try responseDecoder.decode(responseBody: data) - self.byoasn = output.byoasn - } else { - self.byoasn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeprovisionIpamByoasnOutput() + value.byoasn = try reader["byoasn"].readIfPresent(readingClosure: EC2ClientTypes.Byoasn.readingClosure) + return value } } } @@ -45624,27 +32890,18 @@ public struct DeprovisionIpamByoasnOutput: Swift.Equatable { } } -struct DeprovisionIpamByoasnOutputBody: Swift.Equatable { - let byoasn: EC2ClientTypes.Byoasn? -} +enum DeprovisionIpamByoasnOutputError { -extension DeprovisionIpamByoasnOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoasn = "byoasn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let byoasnDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Byoasn.self, forKey: .byoasn) - byoasn = byoasnDecoded - } -} - -enum DeprovisionIpamByoasnOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -45694,38 +32951,15 @@ public struct DeprovisionIpamPoolCidrInput: Swift.Equatable { } } -struct DeprovisionIpamPoolCidrInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let cidr: Swift.String? -} - -extension DeprovisionIpamPoolCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case dryRun = "DryRun" - case ipamPoolId = "IpamPoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - } -} +extension DeprovisionIpamPoolCidrOutput { -extension DeprovisionIpamPoolCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeprovisionIpamPoolCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPoolCidr = output.ipamPoolCidr - } else { - self.ipamPoolCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeprovisionIpamPoolCidrOutput() + value.ipamPoolCidr = try reader["ipamPoolCidr"].readIfPresent(readingClosure: EC2ClientTypes.IpamPoolCidr.readingClosure) + return value } } } @@ -45742,27 +32976,18 @@ public struct DeprovisionIpamPoolCidrOutput: Swift.Equatable { } } -struct DeprovisionIpamPoolCidrOutputBody: Swift.Equatable { - let ipamPoolCidr: EC2ClientTypes.IpamPoolCidr? -} - -extension DeprovisionIpamPoolCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPoolCidr = "ipamPoolCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamPoolCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolCidr.self, forKey: .ipamPoolCidr) - ipamPoolCidr = ipamPoolCidrDecoded - } -} +enum DeprovisionIpamPoolCidrOutputError { -enum DeprovisionIpamPoolCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -45813,40 +33038,16 @@ public struct DeprovisionPublicIpv4PoolCidrInput: Swift.Equatable { } } -struct DeprovisionPublicIpv4PoolCidrInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let poolId: Swift.String? - let cidr: Swift.String? -} - -extension DeprovisionPublicIpv4PoolCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case dryRun = "DryRun" - case poolId = "PoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - } -} +extension DeprovisionPublicIpv4PoolCidrOutput { -extension DeprovisionPublicIpv4PoolCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeprovisionPublicIpv4PoolCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.deprovisionedAddresses = output.deprovisionedAddresses - self.poolId = output.poolId - } else { - self.deprovisionedAddresses = nil - self.poolId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeprovisionPublicIpv4PoolCidrOutput() + value.deprovisionedAddresses = try reader["deprovisionedAddressSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.poolId = try reader["poolId"].readIfPresent() + return value } } } @@ -45867,48 +33068,18 @@ public struct DeprovisionPublicIpv4PoolCidrOutput: Swift.Equatable { } } -struct DeprovisionPublicIpv4PoolCidrOutputBody: Swift.Equatable { - let poolId: Swift.String? - let deprovisionedAddresses: [Swift.String]? -} - -extension DeprovisionPublicIpv4PoolCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deprovisionedAddresses = "deprovisionedAddressSet" - case poolId = "poolId" - } +enum DeprovisionPublicIpv4PoolCidrOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - if containerValues.contains(.deprovisionedAddresses) { - struct KeyVal0{struct item{}} - let deprovisionedAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .deprovisionedAddresses) - if let deprovisionedAddressesWrappedContainer = deprovisionedAddressesWrappedContainer { - let deprovisionedAddressesContainer = try deprovisionedAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var deprovisionedAddressesBuffer:[Swift.String]? = nil - if let deprovisionedAddressesContainer = deprovisionedAddressesContainer { - deprovisionedAddressesBuffer = [Swift.String]() - for stringContainer0 in deprovisionedAddressesContainer { - deprovisionedAddressesBuffer?.append(stringContainer0) - } - } - deprovisionedAddresses = deprovisionedAddressesBuffer - } else { - deprovisionedAddresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - deprovisionedAddresses = nil - } - } -} - -enum DeprovisionPublicIpv4PoolCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -45952,28 +33123,12 @@ public struct DeregisterImageInput: Swift.Equatable { } } -struct DeregisterImageInputBody: Swift.Equatable { - let imageId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DeregisterImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case imageId = "ImageId" - } +extension DeregisterImageOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeregisterImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeregisterImageOutput() + } } } @@ -45982,11 +33137,18 @@ public struct DeregisterImageOutput: Swift.Equatable { public init() { } } -enum DeregisterImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DeregisterImageOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -46029,34 +33191,15 @@ public struct DeregisterInstanceEventNotificationAttributesInput: Swift.Equatabl } } -struct DeregisterInstanceEventNotificationAttributesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceTagAttribute: EC2ClientTypes.DeregisterInstanceTagAttributeRequest? -} - -extension DeregisterInstanceEventNotificationAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceTagAttribute = "InstanceTagAttribute" - } +extension DeregisterInstanceEventNotificationAttributesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceTagAttributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeregisterInstanceTagAttributeRequest.self, forKey: .instanceTagAttribute) - instanceTagAttribute = instanceTagAttributeDecoded - } -} - -extension DeregisterInstanceEventNotificationAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeregisterInstanceEventNotificationAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceTagAttribute = output.instanceTagAttribute - } else { - self.instanceTagAttribute = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeregisterInstanceEventNotificationAttributesOutput() + value.instanceTagAttribute = try reader["instanceTagAttribute"].readIfPresent(readingClosure: EC2ClientTypes.InstanceTagNotificationAttribute.readingClosure) + return value } } } @@ -46073,36 +33216,23 @@ public struct DeregisterInstanceEventNotificationAttributesOutput: Swift.Equatab } } -struct DeregisterInstanceEventNotificationAttributesOutputBody: Swift.Equatable { - let instanceTagAttribute: EC2ClientTypes.InstanceTagNotificationAttribute? -} - -extension DeregisterInstanceEventNotificationAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceTagAttribute = "instanceTagAttribute" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTagAttributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceTagNotificationAttribute.self, forKey: .instanceTagAttribute) - instanceTagAttribute = instanceTagAttributeDecoded - } -} +enum DeregisterInstanceEventNotificationAttributesOutputError { -enum DeregisterInstanceEventNotificationAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.DeregisterInstanceTagAttributeRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case includeAllTagsOfInstance = "IncludeAllTagsOfInstance" - case instanceTagKeys = "InstanceTagKey" - } +extension EC2ClientTypes.DeregisterInstanceTagAttributeRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -46123,28 +33253,13 @@ extension EC2ClientTypes.DeregisterInstanceTagAttributeRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let includeAllTagsOfInstanceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeAllTagsOfInstance) - includeAllTagsOfInstance = includeAllTagsOfInstanceDecoded - if containerValues.contains(.instanceTagKeys) { - struct KeyVal0{struct item{}} - let instanceTagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTagKeys) - if let instanceTagKeysWrappedContainer = instanceTagKeysWrappedContainer { - let instanceTagKeysContainer = try instanceTagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceTagKeysBuffer:[Swift.String]? = nil - if let instanceTagKeysContainer = instanceTagKeysContainer { - instanceTagKeysBuffer = [Swift.String]() - for stringContainer0 in instanceTagKeysContainer { - instanceTagKeysBuffer?.append(stringContainer0) - } - } - instanceTagKeys = instanceTagKeysBuffer - } else { - instanceTagKeys = [] - } - } else { - instanceTagKeys = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DeregisterInstanceTagAttributeRequest() + value.includeAllTagsOfInstance = try reader["IncludeAllTagsOfInstance"].readIfPresent() + value.instanceTagKeys = try reader["InstanceTagKey"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -46229,59 +33344,15 @@ public struct DeregisterTransitGatewayMulticastGroupMembersInput: Swift.Equatabl } } -struct DeregisterTransitGatewayMulticastGroupMembersInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let groupIpAddress: Swift.String? - let networkInterfaceIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DeregisterTransitGatewayMulticastGroupMembersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupIpAddress = "GroupIpAddress" - case networkInterfaceIds = "NetworkInterfaceIds" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } +extension DeregisterTransitGatewayMulticastGroupMembersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded - if containerValues.contains(.networkInterfaceIds) { - struct KeyVal0{struct item{}} - let networkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaceIds) - if let networkInterfaceIdsWrappedContainer = networkInterfaceIdsWrappedContainer { - let networkInterfaceIdsContainer = try networkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInterfaceIdsBuffer:[Swift.String]? = nil - if let networkInterfaceIdsContainer = networkInterfaceIdsContainer { - networkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in networkInterfaceIdsContainer { - networkInterfaceIdsBuffer?.append(stringContainer0) - } - } - networkInterfaceIds = networkInterfaceIdsBuffer - } else { - networkInterfaceIds = [] - } - } else { - networkInterfaceIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DeregisterTransitGatewayMulticastGroupMembersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeregisterTransitGatewayMulticastGroupMembersOutputBody = try responseDecoder.decode(responseBody: data) - self.deregisteredMulticastGroupMembers = output.deregisteredMulticastGroupMembers - } else { - self.deregisteredMulticastGroupMembers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeregisterTransitGatewayMulticastGroupMembersOutput() + value.deregisteredMulticastGroupMembers = try reader["deregisteredMulticastGroupMembers"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupMembers.readingClosure) + return value } } } @@ -46298,27 +33369,18 @@ public struct DeregisterTransitGatewayMulticastGroupMembersOutput: Swift.Equatab } } -struct DeregisterTransitGatewayMulticastGroupMembersOutputBody: Swift.Equatable { - let deregisteredMulticastGroupMembers: EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupMembers? -} - -extension DeregisterTransitGatewayMulticastGroupMembersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deregisteredMulticastGroupMembers = "deregisteredMulticastGroupMembers" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deregisteredMulticastGroupMembersDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupMembers.self, forKey: .deregisteredMulticastGroupMembers) - deregisteredMulticastGroupMembers = deregisteredMulticastGroupMembersDecoded - } -} +enum DeregisterTransitGatewayMulticastGroupMembersOutputError { -enum DeregisterTransitGatewayMulticastGroupMembersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -46383,59 +33445,15 @@ public struct DeregisterTransitGatewayMulticastGroupSourcesInput: Swift.Equatabl } } -struct DeregisterTransitGatewayMulticastGroupSourcesInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let groupIpAddress: Swift.String? - let networkInterfaceIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DeregisterTransitGatewayMulticastGroupSourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupIpAddress = "GroupIpAddress" - case networkInterfaceIds = "NetworkInterfaceIds" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded - if containerValues.contains(.networkInterfaceIds) { - struct KeyVal0{struct item{}} - let networkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaceIds) - if let networkInterfaceIdsWrappedContainer = networkInterfaceIdsWrappedContainer { - let networkInterfaceIdsContainer = try networkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInterfaceIdsBuffer:[Swift.String]? = nil - if let networkInterfaceIdsContainer = networkInterfaceIdsContainer { - networkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in networkInterfaceIdsContainer { - networkInterfaceIdsBuffer?.append(stringContainer0) - } - } - networkInterfaceIds = networkInterfaceIdsBuffer - } else { - networkInterfaceIds = [] - } - } else { - networkInterfaceIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DeregisterTransitGatewayMulticastGroupSourcesOutput { -extension DeregisterTransitGatewayMulticastGroupSourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeregisterTransitGatewayMulticastGroupSourcesOutputBody = try responseDecoder.decode(responseBody: data) - self.deregisteredMulticastGroupSources = output.deregisteredMulticastGroupSources - } else { - self.deregisteredMulticastGroupSources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeregisterTransitGatewayMulticastGroupSourcesOutput() + value.deregisteredMulticastGroupSources = try reader["deregisteredMulticastGroupSources"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupSources.readingClosure) + return value } } } @@ -46452,27 +33470,18 @@ public struct DeregisterTransitGatewayMulticastGroupSourcesOutput: Swift.Equatab } } -struct DeregisterTransitGatewayMulticastGroupSourcesOutputBody: Swift.Equatable { - let deregisteredMulticastGroupSources: EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupSources? -} - -extension DeregisterTransitGatewayMulticastGroupSourcesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deregisteredMulticastGroupSources = "deregisteredMulticastGroupSources" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deregisteredMulticastGroupSourcesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupSources.self, forKey: .deregisteredMulticastGroupSources) - deregisteredMulticastGroupSources = deregisteredMulticastGroupSourcesDecoded - } -} +enum DeregisterTransitGatewayMulticastGroupSourcesOutputError { -enum DeregisterTransitGatewayMulticastGroupSourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -46523,51 +33532,15 @@ public struct DescribeAccountAttributesInput: Swift.Equatable { } } -struct DescribeAccountAttributesInputBody: Swift.Equatable { - let attributeNames: [EC2ClientTypes.AccountAttributeName]? - let dryRun: Swift.Bool? -} - -extension DescribeAccountAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeNames = "attributeName" - case dryRun = "dryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.attributeNames) { - struct KeyVal0{struct attributeName{}} - let attributeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeNames) - if let attributeNamesWrappedContainer = attributeNamesWrappedContainer { - let attributeNamesContainer = try attributeNamesWrappedContainer.decodeIfPresent([EC2ClientTypes.AccountAttributeName].self, forKey: .member) - var attributeNamesBuffer:[EC2ClientTypes.AccountAttributeName]? = nil - if let attributeNamesContainer = attributeNamesContainer { - attributeNamesBuffer = [EC2ClientTypes.AccountAttributeName]() - for enumContainer0 in attributeNamesContainer { - attributeNamesBuffer?.append(enumContainer0) - } - } - attributeNames = attributeNamesBuffer - } else { - attributeNames = [] - } - } else { - attributeNames = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeAccountAttributesOutput { -extension DescribeAccountAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAccountAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.accountAttributes = output.accountAttributes - } else { - self.accountAttributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeAccountAttributesOutput() + value.accountAttributes = try reader["accountAttributeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AccountAttribute.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -46584,44 +33557,18 @@ public struct DescribeAccountAttributesOutput: Swift.Equatable { } } -struct DescribeAccountAttributesOutputBody: Swift.Equatable { - let accountAttributes: [EC2ClientTypes.AccountAttribute]? -} - -extension DescribeAccountAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountAttributes = "accountAttributeSet" - } +enum DescribeAccountAttributesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.accountAttributes) { - struct KeyVal0{struct item{}} - let accountAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accountAttributes) - if let accountAttributesWrappedContainer = accountAttributesWrappedContainer { - let accountAttributesContainer = try accountAttributesWrappedContainer.decodeIfPresent([EC2ClientTypes.AccountAttribute].self, forKey: .member) - var accountAttributesBuffer:[EC2ClientTypes.AccountAttribute]? = nil - if let accountAttributesContainer = accountAttributesContainer { - accountAttributesBuffer = [EC2ClientTypes.AccountAttribute]() - for structureContainer0 in accountAttributesContainer { - accountAttributesBuffer?.append(structureContainer0) - } - } - accountAttributes = accountAttributesBuffer - } else { - accountAttributes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - accountAttributes = nil - } - } -} - -enum DescribeAccountAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -46686,61 +33633,16 @@ public struct DescribeAddressTransfersInput: Swift.Equatable { } } -struct DescribeAddressTransfersInputBody: Swift.Equatable { - let allocationIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? -} - -extension DescribeAddressTransfersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationIds = "AllocationId" - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeAddressTransfersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.allocationIds) { - struct KeyVal0{struct AllocationId{}} - let allocationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allocationIds) - if let allocationIdsWrappedContainer = allocationIdsWrappedContainer { - let allocationIdsContainer = try allocationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allocationIdsBuffer:[Swift.String]? = nil - if let allocationIdsContainer = allocationIdsContainer { - allocationIdsBuffer = [Swift.String]() - for stringContainer0 in allocationIdsContainer { - allocationIdsBuffer?.append(stringContainer0) - } - } - allocationIds = allocationIdsBuffer - } else { - allocationIds = [] - } - } else { - allocationIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeAddressTransfersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAddressTransfersOutputBody = try responseDecoder.decode(responseBody: data) - self.addressTransfers = output.addressTransfers - self.nextToken = output.nextToken - } else { - self.addressTransfers = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeAddressTransfersOutput() + value.addressTransfers = try reader["addressTransferSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AddressTransfer.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -46761,48 +33663,18 @@ public struct DescribeAddressTransfersOutput: Swift.Equatable { } } -struct DescribeAddressTransfersOutputBody: Swift.Equatable { - let addressTransfers: [EC2ClientTypes.AddressTransfer]? - let nextToken: Swift.String? -} - -extension DescribeAddressTransfersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressTransfers = "addressTransferSet" - case nextToken = "nextToken" - } +enum DescribeAddressTransfersOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.addressTransfers) { - struct KeyVal0{struct item{}} - let addressTransfersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addressTransfers) - if let addressTransfersWrappedContainer = addressTransfersWrappedContainer { - let addressTransfersContainer = try addressTransfersWrappedContainer.decodeIfPresent([EC2ClientTypes.AddressTransfer].self, forKey: .member) - var addressTransfersBuffer:[EC2ClientTypes.AddressTransfer]? = nil - if let addressTransfersContainer = addressTransfersContainer { - addressTransfersBuffer = [EC2ClientTypes.AddressTransfer]() - for structureContainer0 in addressTransfersContainer { - addressTransfersBuffer?.append(structureContainer0) - } - } - addressTransfers = addressTransfersBuffer - } else { - addressTransfers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - addressTransfers = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeAddressTransfersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -46874,65 +33746,16 @@ public struct DescribeAddressesAttributeInput: Swift.Equatable { } } -struct DescribeAddressesAttributeInputBody: Swift.Equatable { - let allocationIds: [Swift.String]? - let attribute: EC2ClientTypes.AddressAttributeName? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? -} - -extension DescribeAddressesAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationIds = "AllocationId" - case attribute = "Attribute" - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeAddressesAttributeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.allocationIds) { - struct KeyVal0{struct item{}} - let allocationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allocationIds) - if let allocationIdsWrappedContainer = allocationIdsWrappedContainer { - let allocationIdsContainer = try allocationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allocationIdsBuffer:[Swift.String]? = nil - if let allocationIdsContainer = allocationIdsContainer { - allocationIdsBuffer = [Swift.String]() - for stringContainer0 in allocationIdsContainer { - allocationIdsBuffer?.append(stringContainer0) - } - } - allocationIds = allocationIdsBuffer - } else { - allocationIds = [] - } - } else { - allocationIds = nil - } - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeAddressesAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAddressesAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.addresses = output.addresses - self.nextToken = output.nextToken - } else { - self.addresses = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeAddressesAttributeOutput() + value.addresses = try reader["addressSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AddressAttribute.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -46953,48 +33776,18 @@ public struct DescribeAddressesAttributeOutput: Swift.Equatable { } } -struct DescribeAddressesAttributeOutputBody: Swift.Equatable { - let addresses: [EC2ClientTypes.AddressAttribute]? - let nextToken: Swift.String? -} +enum DescribeAddressesAttributeOutputError { -extension DescribeAddressesAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addresses = "addressSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.addresses) { - struct KeyVal0{struct item{}} - let addressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addresses) - if let addressesWrappedContainer = addressesWrappedContainer { - let addressesContainer = try addressesWrappedContainer.decodeIfPresent([EC2ClientTypes.AddressAttribute].self, forKey: .member) - var addressesBuffer:[EC2ClientTypes.AddressAttribute]? = nil - if let addressesContainer = addressesContainer { - addressesBuffer = [EC2ClientTypes.AddressAttribute]() - for structureContainer0 in addressesContainer { - addressesBuffer?.append(structureContainer0) - } - } - addresses = addressesBuffer - } else { - addresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - addresses = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeAddressesAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -47097,93 +33890,15 @@ public struct DescribeAddressesInput: Swift.Equatable { } } -struct DescribeAddressesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let publicIps: [Swift.String]? - let allocationIds: [Swift.String]? - let dryRun: Swift.Bool? -} +extension DescribeAddressesOutput { -extension DescribeAddressesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationIds = "AllocationId" - case dryRun = "dryRun" - case filters = "Filter" - case publicIps = "PublicIp" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.publicIps) { - struct KeyVal0{struct PublicIp{}} - let publicIpsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .publicIps) - if let publicIpsWrappedContainer = publicIpsWrappedContainer { - let publicIpsContainer = try publicIpsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var publicIpsBuffer:[Swift.String]? = nil - if let publicIpsContainer = publicIpsContainer { - publicIpsBuffer = [Swift.String]() - for stringContainer0 in publicIpsContainer { - publicIpsBuffer?.append(stringContainer0) - } - } - publicIps = publicIpsBuffer - } else { - publicIps = [] - } - } else { - publicIps = nil - } - if containerValues.contains(.allocationIds) { - struct KeyVal0{struct AllocationId{}} - let allocationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allocationIds) - if let allocationIdsWrappedContainer = allocationIdsWrappedContainer { - let allocationIdsContainer = try allocationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allocationIdsBuffer:[Swift.String]? = nil - if let allocationIdsContainer = allocationIdsContainer { - allocationIdsBuffer = [Swift.String]() - for stringContainer0 in allocationIdsContainer { - allocationIdsBuffer?.append(stringContainer0) - } - } - allocationIds = allocationIdsBuffer - } else { - allocationIds = [] - } - } else { - allocationIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeAddressesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAddressesOutputBody = try responseDecoder.decode(responseBody: data) - self.addresses = output.addresses - } else { - self.addresses = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeAddressesOutput() + value.addresses = try reader["addressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Address.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -47200,44 +33915,18 @@ public struct DescribeAddressesOutput: Swift.Equatable { } } -struct DescribeAddressesOutputBody: Swift.Equatable { - let addresses: [EC2ClientTypes.Address]? -} - -extension DescribeAddressesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addresses = "addressesSet" - } +enum DescribeAddressesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.addresses) { - struct KeyVal0{struct item{}} - let addressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addresses) - if let addressesWrappedContainer = addressesWrappedContainer { - let addressesContainer = try addressesWrappedContainer.decodeIfPresent([EC2ClientTypes.Address].self, forKey: .member) - var addressesBuffer:[EC2ClientTypes.Address]? = nil - if let addressesContainer = addressesContainer { - addressesBuffer = [EC2ClientTypes.Address]() - for structureContainer0 in addressesContainer { - addressesBuffer?.append(structureContainer0) - } - } - addresses = addressesBuffer - } else { - addresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - addresses = nil - } - } -} - -enum DescribeAddressesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -47272,32 +33961,16 @@ public struct DescribeAggregateIdFormatInput: Swift.Equatable { } } -struct DescribeAggregateIdFormatInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension DescribeAggregateIdFormatInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } +extension DescribeAggregateIdFormatOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeAggregateIdFormatOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAggregateIdFormatOutputBody = try responseDecoder.decode(responseBody: data) - self.statuses = output.statuses - self.useLongIdsAggregated = output.useLongIdsAggregated - } else { - self.statuses = nil - self.useLongIdsAggregated = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeAggregateIdFormatOutput() + value.statuses = try reader["statusSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IdFormat.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.useLongIdsAggregated = try reader["useLongIdsAggregated"].readIfPresent() + return value } } } @@ -47318,48 +33991,18 @@ public struct DescribeAggregateIdFormatOutput: Swift.Equatable { } } -struct DescribeAggregateIdFormatOutputBody: Swift.Equatable { - let useLongIdsAggregated: Swift.Bool? - let statuses: [EC2ClientTypes.IdFormat]? -} - -extension DescribeAggregateIdFormatOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case statuses = "statusSet" - case useLongIdsAggregated = "useLongIdsAggregated" - } +enum DescribeAggregateIdFormatOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let useLongIdsAggregatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useLongIdsAggregated) - useLongIdsAggregated = useLongIdsAggregatedDecoded - if containerValues.contains(.statuses) { - struct KeyVal0{struct item{}} - let statusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statuses) - if let statusesWrappedContainer = statusesWrappedContainer { - let statusesContainer = try statusesWrappedContainer.decodeIfPresent([EC2ClientTypes.IdFormat].self, forKey: .member) - var statusesBuffer:[EC2ClientTypes.IdFormat]? = nil - if let statusesContainer = statusesContainer { - statusesBuffer = [EC2ClientTypes.IdFormat]() - for structureContainer0 in statusesContainer { - statusesBuffer?.append(structureContainer0) - } - } - statuses = statusesBuffer - } else { - statuses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - statuses = nil - } - } -} - -enum DescribeAggregateIdFormatOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -47469,97 +34112,15 @@ public struct DescribeAvailabilityZonesInput: Swift.Equatable { } } -struct DescribeAvailabilityZonesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let zoneNames: [Swift.String]? - let zoneIds: [Swift.String]? - let allAvailabilityZones: Swift.Bool? - let dryRun: Swift.Bool? -} - -extension DescribeAvailabilityZonesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allAvailabilityZones = "AllAvailabilityZones" - case dryRun = "dryRun" - case filters = "Filter" - case zoneIds = "ZoneId" - case zoneNames = "ZoneName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.zoneNames) { - struct KeyVal0{struct ZoneName{}} - let zoneNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .zoneNames) - if let zoneNamesWrappedContainer = zoneNamesWrappedContainer { - let zoneNamesContainer = try zoneNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var zoneNamesBuffer:[Swift.String]? = nil - if let zoneNamesContainer = zoneNamesContainer { - zoneNamesBuffer = [Swift.String]() - for stringContainer0 in zoneNamesContainer { - zoneNamesBuffer?.append(stringContainer0) - } - } - zoneNames = zoneNamesBuffer - } else { - zoneNames = [] - } - } else { - zoneNames = nil - } - if containerValues.contains(.zoneIds) { - struct KeyVal0{struct ZoneId{}} - let zoneIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .zoneIds) - if let zoneIdsWrappedContainer = zoneIdsWrappedContainer { - let zoneIdsContainer = try zoneIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var zoneIdsBuffer:[Swift.String]? = nil - if let zoneIdsContainer = zoneIdsContainer { - zoneIdsBuffer = [Swift.String]() - for stringContainer0 in zoneIdsContainer { - zoneIdsBuffer?.append(stringContainer0) - } - } - zoneIds = zoneIdsBuffer - } else { - zoneIds = [] - } - } else { - zoneIds = nil - } - let allAvailabilityZonesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allAvailabilityZones) - allAvailabilityZones = allAvailabilityZonesDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeAvailabilityZonesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAvailabilityZonesOutputBody = try responseDecoder.decode(responseBody: data) - self.availabilityZones = output.availabilityZones - } else { - self.availabilityZones = nil +extension DescribeAvailabilityZonesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeAvailabilityZonesOutput() + value.availabilityZones = try reader["availabilityZoneInfo"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AvailabilityZone.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -47576,44 +34137,18 @@ public struct DescribeAvailabilityZonesOutput: Swift.Equatable { } } -struct DescribeAvailabilityZonesOutputBody: Swift.Equatable { - let availabilityZones: [EC2ClientTypes.AvailabilityZone]? -} - -extension DescribeAvailabilityZonesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "availabilityZoneInfo" - } +enum DescribeAvailabilityZonesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct item{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([EC2ClientTypes.AvailabilityZone].self, forKey: .member) - var availabilityZonesBuffer:[EC2ClientTypes.AvailabilityZone]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [EC2ClientTypes.AvailabilityZone]() - for structureContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(structureContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - availabilityZones = nil - } - } -} - -enum DescribeAvailabilityZonesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -47678,61 +34213,16 @@ public struct DescribeAwsNetworkPerformanceMetricSubscriptionsInput: Swift.Equat } } -struct DescribeAwsNetworkPerformanceMetricSubscriptionsInputBody: Swift.Equatable { - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeAwsNetworkPerformanceMetricSubscriptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeAwsNetworkPerformanceMetricSubscriptionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeAwsNetworkPerformanceMetricSubscriptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAwsNetworkPerformanceMetricSubscriptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.subscriptions = output.subscriptions - } else { - self.nextToken = nil - self.subscriptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeAwsNetworkPerformanceMetricSubscriptionsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.subscriptions = try reader["subscriptionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Subscription.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -47753,48 +34243,18 @@ public struct DescribeAwsNetworkPerformanceMetricSubscriptionsOutput: Swift.Equa } } -struct DescribeAwsNetworkPerformanceMetricSubscriptionsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let subscriptions: [EC2ClientTypes.Subscription]? -} - -extension DescribeAwsNetworkPerformanceMetricSubscriptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case subscriptions = "subscriptionSet" - } +enum DescribeAwsNetworkPerformanceMetricSubscriptionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.subscriptions) { - struct KeyVal0{struct item{}} - let subscriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subscriptions) - if let subscriptionsWrappedContainer = subscriptionsWrappedContainer { - let subscriptionsContainer = try subscriptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.Subscription].self, forKey: .member) - var subscriptionsBuffer:[EC2ClientTypes.Subscription]? = nil - if let subscriptionsContainer = subscriptionsContainer { - subscriptionsBuffer = [EC2ClientTypes.Subscription]() - for structureContainer0 in subscriptionsContainer { - subscriptionsBuffer?.append(structureContainer0) - } - } - subscriptions = subscriptionsBuffer - } else { - subscriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - subscriptions = nil - } - } -} - -enum DescribeAwsNetworkPerformanceMetricSubscriptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -47881,72 +34341,15 @@ public struct DescribeBundleTasksInput: Swift.Equatable { } } -struct DescribeBundleTasksInputBody: Swift.Equatable { - let bundleIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeBundleTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bundleIds = "BundleId" - case dryRun = "dryRun" - case filters = "Filter" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.bundleIds) { - struct KeyVal0{struct BundleId{}} - let bundleIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .bundleIds) - if let bundleIdsWrappedContainer = bundleIdsWrappedContainer { - let bundleIdsContainer = try bundleIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var bundleIdsBuffer:[Swift.String]? = nil - if let bundleIdsContainer = bundleIdsContainer { - bundleIdsBuffer = [Swift.String]() - for stringContainer0 in bundleIdsContainer { - bundleIdsBuffer?.append(stringContainer0) - } - } - bundleIds = bundleIdsBuffer - } else { - bundleIds = [] - } - } else { - bundleIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeBundleTasksOutput { -extension DescribeBundleTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeBundleTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.bundleTasks = output.bundleTasks - } else { - self.bundleTasks = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeBundleTasksOutput() + value.bundleTasks = try reader["bundleInstanceTasksSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.BundleTask.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -47963,44 +34366,18 @@ public struct DescribeBundleTasksOutput: Swift.Equatable { } } -struct DescribeBundleTasksOutputBody: Swift.Equatable { - let bundleTasks: [EC2ClientTypes.BundleTask]? -} - -extension DescribeBundleTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bundleTasks = "bundleInstanceTasksSet" - } +enum DescribeBundleTasksOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.bundleTasks) { - struct KeyVal0{struct item{}} - let bundleTasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .bundleTasks) - if let bundleTasksWrappedContainer = bundleTasksWrappedContainer { - let bundleTasksContainer = try bundleTasksWrappedContainer.decodeIfPresent([EC2ClientTypes.BundleTask].self, forKey: .member) - var bundleTasksBuffer:[EC2ClientTypes.BundleTask]? = nil - if let bundleTasksContainer = bundleTasksContainer { - bundleTasksBuffer = [EC2ClientTypes.BundleTask]() - for structureContainer0 in bundleTasksContainer { - bundleTasksBuffer?.append(structureContainer0) - } - } - bundleTasks = bundleTasksBuffer - } else { - bundleTasks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - bundleTasks = nil - } - } -} - -enum DescribeBundleTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -48050,40 +34427,16 @@ public struct DescribeByoipCidrsInput: Swift.Equatable { } } -struct DescribeByoipCidrsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeByoipCidrsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeByoipCidrsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeByoipCidrsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeByoipCidrsOutputBody = try responseDecoder.decode(responseBody: data) - self.byoipCidrs = output.byoipCidrs - self.nextToken = output.nextToken - } else { - self.byoipCidrs = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeByoipCidrsOutput() + value.byoipCidrs = try reader["byoipCidrSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ByoipCidr.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -48104,48 +34457,18 @@ public struct DescribeByoipCidrsOutput: Swift.Equatable { } } -struct DescribeByoipCidrsOutputBody: Swift.Equatable { - let byoipCidrs: [EC2ClientTypes.ByoipCidr]? - let nextToken: Swift.String? -} - -extension DescribeByoipCidrsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoipCidrs = "byoipCidrSet" - case nextToken = "nextToken" - } +enum DescribeByoipCidrsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.byoipCidrs) { - struct KeyVal0{struct item{}} - let byoipCidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .byoipCidrs) - if let byoipCidrsWrappedContainer = byoipCidrsWrappedContainer { - let byoipCidrsContainer = try byoipCidrsWrappedContainer.decodeIfPresent([EC2ClientTypes.ByoipCidr].self, forKey: .member) - var byoipCidrsBuffer:[EC2ClientTypes.ByoipCidr]? = nil - if let byoipCidrsContainer = byoipCidrsContainer { - byoipCidrsBuffer = [EC2ClientTypes.ByoipCidr]() - for structureContainer0 in byoipCidrsContainer { - byoipCidrsBuffer?.append(structureContainer0) - } - } - byoipCidrs = byoipCidrsBuffer - } else { - byoipCidrs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - byoipCidrs = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeByoipCidrsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -48232,60 +34555,16 @@ public struct DescribeCapacityBlockOfferingsInput: Swift.Equatable { } } -struct DescribeCapacityBlockOfferingsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceType: Swift.String? - let instanceCount: Swift.Int? - let startDateRange: ClientRuntime.Date? - let endDateRange: ClientRuntime.Date? - let capacityDurationHours: Swift.Int? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeCapacityBlockOfferingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityDurationHours = "CapacityDurationHours" - case dryRun = "DryRun" - case endDateRange = "EndDateRange" - case instanceCount = "InstanceCount" - case instanceType = "InstanceType" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case startDateRange = "StartDateRange" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let startDateRangeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startDateRange) - startDateRange = startDateRangeDecoded - let endDateRangeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDateRange) - endDateRange = endDateRangeDecoded - let capacityDurationHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .capacityDurationHours) - capacityDurationHours = capacityDurationHoursDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeCapacityBlockOfferingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCapacityBlockOfferingsOutputBody = try responseDecoder.decode(responseBody: data) - self.capacityBlockOfferings = output.capacityBlockOfferings - self.nextToken = output.nextToken - } else { - self.capacityBlockOfferings = nil - self.nextToken = nil +extension DescribeCapacityBlockOfferingsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeCapacityBlockOfferingsOutput() + value.capacityBlockOfferings = try reader["capacityBlockOfferingSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CapacityBlockOffering.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -48306,48 +34585,18 @@ public struct DescribeCapacityBlockOfferingsOutput: Swift.Equatable { } } -struct DescribeCapacityBlockOfferingsOutputBody: Swift.Equatable { - let capacityBlockOfferings: [EC2ClientTypes.CapacityBlockOffering]? - let nextToken: Swift.String? -} +enum DescribeCapacityBlockOfferingsOutputError { -extension DescribeCapacityBlockOfferingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityBlockOfferings = "capacityBlockOfferingSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.capacityBlockOfferings) { - struct KeyVal0{struct item{}} - let capacityBlockOfferingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capacityBlockOfferings) - if let capacityBlockOfferingsWrappedContainer = capacityBlockOfferingsWrappedContainer { - let capacityBlockOfferingsContainer = try capacityBlockOfferingsWrappedContainer.decodeIfPresent([EC2ClientTypes.CapacityBlockOffering].self, forKey: .member) - var capacityBlockOfferingsBuffer:[EC2ClientTypes.CapacityBlockOffering]? = nil - if let capacityBlockOfferingsContainer = capacityBlockOfferingsContainer { - capacityBlockOfferingsBuffer = [EC2ClientTypes.CapacityBlockOffering]() - for structureContainer0 in capacityBlockOfferingsContainer { - capacityBlockOfferingsBuffer?.append(structureContainer0) - } - } - capacityBlockOfferings = capacityBlockOfferingsBuffer - } else { - capacityBlockOfferings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - capacityBlockOfferings = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeCapacityBlockOfferingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -48436,82 +34685,16 @@ public struct DescribeCapacityReservationFleetsInput: Swift.Equatable { } } -struct DescribeCapacityReservationFleetsInputBody: Swift.Equatable { - let capacityReservationFleetIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeCapacityReservationFleetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationFleetIds = "CapacityReservationFleetId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeCapacityReservationFleetsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.capacityReservationFleetIds) { - struct KeyVal0{struct item{}} - let capacityReservationFleetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capacityReservationFleetIds) - if let capacityReservationFleetIdsWrappedContainer = capacityReservationFleetIdsWrappedContainer { - let capacityReservationFleetIdsContainer = try capacityReservationFleetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var capacityReservationFleetIdsBuffer:[Swift.String]? = nil - if let capacityReservationFleetIdsContainer = capacityReservationFleetIdsContainer { - capacityReservationFleetIdsBuffer = [Swift.String]() - for stringContainer0 in capacityReservationFleetIdsContainer { - capacityReservationFleetIdsBuffer?.append(stringContainer0) - } - } - capacityReservationFleetIds = capacityReservationFleetIdsBuffer - } else { - capacityReservationFleetIds = [] - } - } else { - capacityReservationFleetIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeCapacityReservationFleetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCapacityReservationFleetsOutputBody = try responseDecoder.decode(responseBody: data) - self.capacityReservationFleets = output.capacityReservationFleets - self.nextToken = output.nextToken - } else { - self.capacityReservationFleets = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeCapacityReservationFleetsOutput() + value.capacityReservationFleets = try reader["capacityReservationFleetSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CapacityReservationFleet.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -48532,48 +34715,18 @@ public struct DescribeCapacityReservationFleetsOutput: Swift.Equatable { } } -struct DescribeCapacityReservationFleetsOutputBody: Swift.Equatable { - let capacityReservationFleets: [EC2ClientTypes.CapacityReservationFleet]? - let nextToken: Swift.String? -} - -extension DescribeCapacityReservationFleetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationFleets = "capacityReservationFleetSet" - case nextToken = "nextToken" - } +enum DescribeCapacityReservationFleetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.capacityReservationFleets) { - struct KeyVal0{struct item{}} - let capacityReservationFleetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capacityReservationFleets) - if let capacityReservationFleetsWrappedContainer = capacityReservationFleetsWrappedContainer { - let capacityReservationFleetsContainer = try capacityReservationFleetsWrappedContainer.decodeIfPresent([EC2ClientTypes.CapacityReservationFleet].self, forKey: .member) - var capacityReservationFleetsBuffer:[EC2ClientTypes.CapacityReservationFleet]? = nil - if let capacityReservationFleetsContainer = capacityReservationFleetsContainer { - capacityReservationFleetsBuffer = [EC2ClientTypes.CapacityReservationFleet]() - for structureContainer0 in capacityReservationFleetsContainer { - capacityReservationFleetsBuffer?.append(structureContainer0) - } - } - capacityReservationFleets = capacityReservationFleetsBuffer - } else { - capacityReservationFleets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - capacityReservationFleets = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeCapacityReservationFleetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -48712,82 +34865,16 @@ public struct DescribeCapacityReservationsInput: Swift.Equatable { } } -struct DescribeCapacityReservationsInputBody: Swift.Equatable { - let capacityReservationIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeCapacityReservationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationIds = "CapacityReservationId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.capacityReservationIds) { - struct KeyVal0{struct item{}} - let capacityReservationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capacityReservationIds) - if let capacityReservationIdsWrappedContainer = capacityReservationIdsWrappedContainer { - let capacityReservationIdsContainer = try capacityReservationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var capacityReservationIdsBuffer:[Swift.String]? = nil - if let capacityReservationIdsContainer = capacityReservationIdsContainer { - capacityReservationIdsBuffer = [Swift.String]() - for stringContainer0 in capacityReservationIdsContainer { - capacityReservationIdsBuffer?.append(stringContainer0) - } - } - capacityReservationIds = capacityReservationIdsBuffer - } else { - capacityReservationIds = [] - } - } else { - capacityReservationIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeCapacityReservationsOutput { -extension DescribeCapacityReservationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCapacityReservationsOutputBody = try responseDecoder.decode(responseBody: data) - self.capacityReservations = output.capacityReservations - self.nextToken = output.nextToken - } else { - self.capacityReservations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeCapacityReservationsOutput() + value.capacityReservations = try reader["capacityReservationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CapacityReservation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -48808,48 +34895,18 @@ public struct DescribeCapacityReservationsOutput: Swift.Equatable { } } -struct DescribeCapacityReservationsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let capacityReservations: [EC2ClientTypes.CapacityReservation]? -} - -extension DescribeCapacityReservationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservations = "capacityReservationSet" - case nextToken = "nextToken" - } +enum DescribeCapacityReservationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.capacityReservations) { - struct KeyVal0{struct item{}} - let capacityReservationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capacityReservations) - if let capacityReservationsWrappedContainer = capacityReservationsWrappedContainer { - let capacityReservationsContainer = try capacityReservationsWrappedContainer.decodeIfPresent([EC2ClientTypes.CapacityReservation].self, forKey: .member) - var capacityReservationsBuffer:[EC2ClientTypes.CapacityReservation]? = nil - if let capacityReservationsContainer = capacityReservationsContainer { - capacityReservationsBuffer = [EC2ClientTypes.CapacityReservation]() - for structureContainer0 in capacityReservationsContainer { - capacityReservationsBuffer?.append(structureContainer0) - } - } - capacityReservations = capacityReservationsBuffer - } else { - capacityReservations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - capacityReservations = nil - } - } -} - -enum DescribeCapacityReservationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -48942,82 +34999,16 @@ public struct DescribeCarrierGatewaysInput: Swift.Equatable { } } -struct DescribeCarrierGatewaysInputBody: Swift.Equatable { - let carrierGatewayIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeCarrierGatewaysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGatewayIds = "CarrierGatewayId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeCarrierGatewaysOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.carrierGatewayIds) { - struct KeyVal0{struct member{}} - let carrierGatewayIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .carrierGatewayIds) - if let carrierGatewayIdsWrappedContainer = carrierGatewayIdsWrappedContainer { - let carrierGatewayIdsContainer = try carrierGatewayIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var carrierGatewayIdsBuffer:[Swift.String]? = nil - if let carrierGatewayIdsContainer = carrierGatewayIdsContainer { - carrierGatewayIdsBuffer = [Swift.String]() - for stringContainer0 in carrierGatewayIdsContainer { - carrierGatewayIdsBuffer?.append(stringContainer0) - } - } - carrierGatewayIds = carrierGatewayIdsBuffer - } else { - carrierGatewayIds = [] - } - } else { - carrierGatewayIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeCarrierGatewaysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCarrierGatewaysOutputBody = try responseDecoder.decode(responseBody: data) - self.carrierGateways = output.carrierGateways - self.nextToken = output.nextToken - } else { - self.carrierGateways = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeCarrierGatewaysOutput() + value.carrierGateways = try reader["carrierGatewaySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CarrierGateway.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -49038,48 +35029,18 @@ public struct DescribeCarrierGatewaysOutput: Swift.Equatable { } } -struct DescribeCarrierGatewaysOutputBody: Swift.Equatable { - let carrierGateways: [EC2ClientTypes.CarrierGateway]? - let nextToken: Swift.String? -} - -extension DescribeCarrierGatewaysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGateways = "carrierGatewaySet" - case nextToken = "nextToken" - } +enum DescribeCarrierGatewaysOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.carrierGateways) { - struct KeyVal0{struct item{}} - let carrierGatewaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .carrierGateways) - if let carrierGatewaysWrappedContainer = carrierGatewaysWrappedContainer { - let carrierGatewaysContainer = try carrierGatewaysWrappedContainer.decodeIfPresent([EC2ClientTypes.CarrierGateway].self, forKey: .member) - var carrierGatewaysBuffer:[EC2ClientTypes.CarrierGateway]? = nil - if let carrierGatewaysContainer = carrierGatewaysContainer { - carrierGatewaysBuffer = [EC2ClientTypes.CarrierGateway]() - for structureContainer0 in carrierGatewaysContainer { - carrierGatewaysBuffer?.append(structureContainer0) - } - } - carrierGateways = carrierGatewaysBuffer - } else { - carrierGateways = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - carrierGateways = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeCarrierGatewaysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -49170,82 +35131,16 @@ public struct DescribeClassicLinkInstancesInput: Swift.Equatable { } } -struct DescribeClassicLinkInstancesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let instanceIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeClassicLinkInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case instanceIds = "InstanceId" - case maxResults = "maxResults" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeClassicLinkInstancesOutput { -extension DescribeClassicLinkInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClassicLinkInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.instances = output.instances - self.nextToken = output.nextToken - } else { - self.instances = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeClassicLinkInstancesOutput() + value.instances = try reader["instancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ClassicLinkInstance.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -49266,48 +35161,18 @@ public struct DescribeClassicLinkInstancesOutput: Swift.Equatable { } } -struct DescribeClassicLinkInstancesOutputBody: Swift.Equatable { - let instances: [EC2ClientTypes.ClassicLinkInstance]? - let nextToken: Swift.String? -} - -extension DescribeClassicLinkInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instances = "instancesSet" - case nextToken = "nextToken" - } +enum DescribeClassicLinkInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instances) { - struct KeyVal0{struct item{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([EC2ClientTypes.ClassicLinkInstance].self, forKey: .member) - var instancesBuffer:[EC2ClientTypes.ClassicLinkInstance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [EC2ClientTypes.ClassicLinkInstance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instances = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeClassicLinkInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -49386,65 +35251,16 @@ public struct DescribeClientVpnAuthorizationRulesInput: Swift.Equatable { } } -struct DescribeClientVpnAuthorizationRulesInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? -} - -extension DescribeClientVpnAuthorizationRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeClientVpnAuthorizationRulesOutput { -extension DescribeClientVpnAuthorizationRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClientVpnAuthorizationRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.authorizationRules = output.authorizationRules - self.nextToken = output.nextToken - } else { - self.authorizationRules = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeClientVpnAuthorizationRulesOutput() + value.authorizationRules = try reader["authorizationRule"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AuthorizationRule.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -49465,48 +35281,18 @@ public struct DescribeClientVpnAuthorizationRulesOutput: Swift.Equatable { } } -struct DescribeClientVpnAuthorizationRulesOutputBody: Swift.Equatable { - let authorizationRules: [EC2ClientTypes.AuthorizationRule]? - let nextToken: Swift.String? -} - -extension DescribeClientVpnAuthorizationRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authorizationRules = "authorizationRule" - case nextToken = "nextToken" - } +enum DescribeClientVpnAuthorizationRulesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.authorizationRules) { - struct KeyVal0{struct item{}} - let authorizationRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .authorizationRules) - if let authorizationRulesWrappedContainer = authorizationRulesWrappedContainer { - let authorizationRulesContainer = try authorizationRulesWrappedContainer.decodeIfPresent([EC2ClientTypes.AuthorizationRule].self, forKey: .member) - var authorizationRulesBuffer:[EC2ClientTypes.AuthorizationRule]? = nil - if let authorizationRulesContainer = authorizationRulesContainer { - authorizationRulesBuffer = [EC2ClientTypes.AuthorizationRule]() - for structureContainer0 in authorizationRulesContainer { - authorizationRulesBuffer?.append(structureContainer0) - } - } - authorizationRules = authorizationRulesBuffer - } else { - authorizationRules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - authorizationRules = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeClientVpnAuthorizationRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -49583,65 +35369,16 @@ public struct DescribeClientVpnConnectionsInput: Swift.Equatable { } } -struct DescribeClientVpnConnectionsInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? -} - -extension DescribeClientVpnConnectionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeClientVpnConnectionsOutput { -extension DescribeClientVpnConnectionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClientVpnConnectionsOutputBody = try responseDecoder.decode(responseBody: data) - self.connections = output.connections - self.nextToken = output.nextToken - } else { - self.connections = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeClientVpnConnectionsOutput() + value.connections = try reader["connections"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ClientVpnConnection.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -49662,48 +35399,18 @@ public struct DescribeClientVpnConnectionsOutput: Swift.Equatable { } } -struct DescribeClientVpnConnectionsOutputBody: Swift.Equatable { - let connections: [EC2ClientTypes.ClientVpnConnection]? - let nextToken: Swift.String? -} - -extension DescribeClientVpnConnectionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connections = "connections" - case nextToken = "nextToken" - } +enum DescribeClientVpnConnectionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.connections) { - struct KeyVal0{struct item{}} - let connectionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .connections) - if let connectionsWrappedContainer = connectionsWrappedContainer { - let connectionsContainer = try connectionsWrappedContainer.decodeIfPresent([EC2ClientTypes.ClientVpnConnection].self, forKey: .member) - var connectionsBuffer:[EC2ClientTypes.ClientVpnConnection]? = nil - if let connectionsContainer = connectionsContainer { - connectionsBuffer = [EC2ClientTypes.ClientVpnConnection]() - for structureContainer0 in connectionsContainer { - connectionsBuffer?.append(structureContainer0) - } - } - connections = connectionsBuffer - } else { - connections = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - connections = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeClientVpnConnectionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -49788,82 +35495,16 @@ public struct DescribeClientVpnEndpointsInput: Swift.Equatable { } } -struct DescribeClientVpnEndpointsInputBody: Swift.Equatable { - let clientVpnEndpointIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} +extension DescribeClientVpnEndpointsOutput { -extension DescribeClientVpnEndpointsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointIds = "ClientVpnEndpointId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.clientVpnEndpointIds) { - struct KeyVal0{struct item{}} - let clientVpnEndpointIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clientVpnEndpointIds) - if let clientVpnEndpointIdsWrappedContainer = clientVpnEndpointIdsWrappedContainer { - let clientVpnEndpointIdsContainer = try clientVpnEndpointIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var clientVpnEndpointIdsBuffer:[Swift.String]? = nil - if let clientVpnEndpointIdsContainer = clientVpnEndpointIdsContainer { - clientVpnEndpointIdsBuffer = [Swift.String]() - for stringContainer0 in clientVpnEndpointIdsContainer { - clientVpnEndpointIdsBuffer?.append(stringContainer0) - } - } - clientVpnEndpointIds = clientVpnEndpointIdsBuffer - } else { - clientVpnEndpointIds = [] - } - } else { - clientVpnEndpointIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeClientVpnEndpointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClientVpnEndpointsOutputBody = try responseDecoder.decode(responseBody: data) - self.clientVpnEndpoints = output.clientVpnEndpoints - self.nextToken = output.nextToken - } else { - self.clientVpnEndpoints = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeClientVpnEndpointsOutput() + value.clientVpnEndpoints = try reader["clientVpnEndpoint"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ClientVpnEndpoint.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -49884,48 +35525,18 @@ public struct DescribeClientVpnEndpointsOutput: Swift.Equatable { } } -struct DescribeClientVpnEndpointsOutputBody: Swift.Equatable { - let clientVpnEndpoints: [EC2ClientTypes.ClientVpnEndpoint]? - let nextToken: Swift.String? -} - -extension DescribeClientVpnEndpointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpoints = "clientVpnEndpoint" - case nextToken = "nextToken" - } +enum DescribeClientVpnEndpointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.clientVpnEndpoints) { - struct KeyVal0{struct item{}} - let clientVpnEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clientVpnEndpoints) - if let clientVpnEndpointsWrappedContainer = clientVpnEndpointsWrappedContainer { - let clientVpnEndpointsContainer = try clientVpnEndpointsWrappedContainer.decodeIfPresent([EC2ClientTypes.ClientVpnEndpoint].self, forKey: .member) - var clientVpnEndpointsBuffer:[EC2ClientTypes.ClientVpnEndpoint]? = nil - if let clientVpnEndpointsContainer = clientVpnEndpointsContainer { - clientVpnEndpointsBuffer = [EC2ClientTypes.ClientVpnEndpoint]() - for structureContainer0 in clientVpnEndpointsContainer { - clientVpnEndpointsBuffer?.append(structureContainer0) - } - } - clientVpnEndpoints = clientVpnEndpointsBuffer - } else { - clientVpnEndpoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - clientVpnEndpoints = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeClientVpnEndpointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -50004,65 +35615,16 @@ public struct DescribeClientVpnRoutesInput: Swift.Equatable { } } -struct DescribeClientVpnRoutesInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeClientVpnRoutesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeClientVpnRoutesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeClientVpnRoutesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClientVpnRoutesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.routes = output.routes - } else { - self.nextToken = nil - self.routes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeClientVpnRoutesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.routes = try reader["routes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ClientVpnRoute.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -50083,48 +35645,18 @@ public struct DescribeClientVpnRoutesOutput: Swift.Equatable { } } -struct DescribeClientVpnRoutesOutputBody: Swift.Equatable { - let routes: [EC2ClientTypes.ClientVpnRoute]? - let nextToken: Swift.String? -} - -extension DescribeClientVpnRoutesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case routes = "routes" - } +enum DescribeClientVpnRoutesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.routes) { - struct KeyVal0{struct item{}} - let routesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routes) - if let routesWrappedContainer = routesWrappedContainer { - let routesContainer = try routesWrappedContainer.decodeIfPresent([EC2ClientTypes.ClientVpnRoute].self, forKey: .member) - var routesBuffer:[EC2ClientTypes.ClientVpnRoute]? = nil - if let routesContainer = routesContainer { - routesBuffer = [EC2ClientTypes.ClientVpnRoute]() - for structureContainer0 in routesContainer { - routesBuffer?.append(structureContainer0) - } - } - routes = routesBuffer - } else { - routes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - routes = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeClientVpnRoutesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -50219,86 +35751,16 @@ public struct DescribeClientVpnTargetNetworksInput: Swift.Equatable { } } -struct DescribeClientVpnTargetNetworksInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let associationIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeClientVpnTargetNetworksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationIds = "AssociationIds" - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - if containerValues.contains(.associationIds) { - struct KeyVal0{struct item{}} - let associationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associationIds) - if let associationIdsWrappedContainer = associationIdsWrappedContainer { - let associationIdsContainer = try associationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var associationIdsBuffer:[Swift.String]? = nil - if let associationIdsContainer = associationIdsContainer { - associationIdsBuffer = [Swift.String]() - for stringContainer0 in associationIdsContainer { - associationIdsBuffer?.append(stringContainer0) - } - } - associationIds = associationIdsBuffer - } else { - associationIds = [] - } - } else { - associationIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeClientVpnTargetNetworksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClientVpnTargetNetworksOutputBody = try responseDecoder.decode(responseBody: data) - self.clientVpnTargetNetworks = output.clientVpnTargetNetworks - self.nextToken = output.nextToken - } else { - self.clientVpnTargetNetworks = nil - self.nextToken = nil +extension DescribeClientVpnTargetNetworksOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeClientVpnTargetNetworksOutput() + value.clientVpnTargetNetworks = try reader["clientVpnTargetNetworks"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TargetNetwork.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -50319,48 +35781,18 @@ public struct DescribeClientVpnTargetNetworksOutput: Swift.Equatable { } } -struct DescribeClientVpnTargetNetworksOutputBody: Swift.Equatable { - let clientVpnTargetNetworks: [EC2ClientTypes.TargetNetwork]? - let nextToken: Swift.String? -} - -extension DescribeClientVpnTargetNetworksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnTargetNetworks = "clientVpnTargetNetworks" - case nextToken = "nextToken" - } +enum DescribeClientVpnTargetNetworksOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.clientVpnTargetNetworks) { - struct KeyVal0{struct item{}} - let clientVpnTargetNetworksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clientVpnTargetNetworks) - if let clientVpnTargetNetworksWrappedContainer = clientVpnTargetNetworksWrappedContainer { - let clientVpnTargetNetworksContainer = try clientVpnTargetNetworksWrappedContainer.decodeIfPresent([EC2ClientTypes.TargetNetwork].self, forKey: .member) - var clientVpnTargetNetworksBuffer:[EC2ClientTypes.TargetNetwork]? = nil - if let clientVpnTargetNetworksContainer = clientVpnTargetNetworksContainer { - clientVpnTargetNetworksBuffer = [EC2ClientTypes.TargetNetwork]() - for structureContainer0 in clientVpnTargetNetworksContainer { - clientVpnTargetNetworksBuffer?.append(structureContainer0) - } - } - clientVpnTargetNetworks = clientVpnTargetNetworksBuffer - } else { - clientVpnTargetNetworks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - clientVpnTargetNetworks = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeClientVpnTargetNetworksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -50445,82 +35877,16 @@ public struct DescribeCoipPoolsInput: Swift.Equatable { } } -struct DescribeCoipPoolsInputBody: Swift.Equatable { - let poolIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeCoipPoolsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case poolIds = "PoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.poolIds) { - struct KeyVal0{struct item{}} - let poolIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .poolIds) - if let poolIdsWrappedContainer = poolIdsWrappedContainer { - let poolIdsContainer = try poolIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var poolIdsBuffer:[Swift.String]? = nil - if let poolIdsContainer = poolIdsContainer { - poolIdsBuffer = [Swift.String]() - for stringContainer0 in poolIdsContainer { - poolIdsBuffer?.append(stringContainer0) - } - } - poolIds = poolIdsBuffer - } else { - poolIds = [] - } - } else { - poolIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeCoipPoolsOutput { -extension DescribeCoipPoolsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCoipPoolsOutputBody = try responseDecoder.decode(responseBody: data) - self.coipPools = output.coipPools - self.nextToken = output.nextToken - } else { - self.coipPools = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeCoipPoolsOutput() + value.coipPools = try reader["coipPoolSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CoipPool.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -50541,48 +35907,18 @@ public struct DescribeCoipPoolsOutput: Swift.Equatable { } } -struct DescribeCoipPoolsOutputBody: Swift.Equatable { - let coipPools: [EC2ClientTypes.CoipPool]? - let nextToken: Swift.String? -} - -extension DescribeCoipPoolsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coipPools = "coipPoolSet" - case nextToken = "nextToken" - } +enum DescribeCoipPoolsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.coipPools) { - struct KeyVal0{struct item{}} - let coipPoolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .coipPools) - if let coipPoolsWrappedContainer = coipPoolsWrappedContainer { - let coipPoolsContainer = try coipPoolsWrappedContainer.decodeIfPresent([EC2ClientTypes.CoipPool].self, forKey: .member) - var coipPoolsBuffer:[EC2ClientTypes.CoipPool]? = nil - if let coipPoolsContainer = coipPoolsContainer { - coipPoolsBuffer = [EC2ClientTypes.CoipPool]() - for structureContainer0 in coipPoolsContainer { - coipPoolsBuffer?.append(structureContainer0) - } - } - coipPools = coipPoolsBuffer - } else { - coipPools = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - coipPools = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeCoipPoolsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -50633,51 +35969,15 @@ public struct DescribeConversionTasksInput: Swift.Equatable { } } -struct DescribeConversionTasksInputBody: Swift.Equatable { - let conversionTaskIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DescribeConversionTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case conversionTaskIds = "conversionTaskId" - case dryRun = "dryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.conversionTaskIds) { - struct KeyVal0{struct item{}} - let conversionTaskIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .conversionTaskIds) - if let conversionTaskIdsWrappedContainer = conversionTaskIdsWrappedContainer { - let conversionTaskIdsContainer = try conversionTaskIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var conversionTaskIdsBuffer:[Swift.String]? = nil - if let conversionTaskIdsContainer = conversionTaskIdsContainer { - conversionTaskIdsBuffer = [Swift.String]() - for stringContainer0 in conversionTaskIdsContainer { - conversionTaskIdsBuffer?.append(stringContainer0) - } - } - conversionTaskIds = conversionTaskIdsBuffer - } else { - conversionTaskIds = [] - } - } else { - conversionTaskIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeConversionTasksOutput { -extension DescribeConversionTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeConversionTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.conversionTasks = output.conversionTasks - } else { - self.conversionTasks = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeConversionTasksOutput() + value.conversionTasks = try reader["conversionTasks"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ConversionTask.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -50694,44 +35994,18 @@ public struct DescribeConversionTasksOutput: Swift.Equatable { } } -struct DescribeConversionTasksOutputBody: Swift.Equatable { - let conversionTasks: [EC2ClientTypes.ConversionTask]? -} - -extension DescribeConversionTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case conversionTasks = "conversionTasks" - } +enum DescribeConversionTasksOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.conversionTasks) { - struct KeyVal0{struct item{}} - let conversionTasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .conversionTasks) - if let conversionTasksWrappedContainer = conversionTasksWrappedContainer { - let conversionTasksContainer = try conversionTasksWrappedContainer.decodeIfPresent([EC2ClientTypes.ConversionTask].self, forKey: .member) - var conversionTasksBuffer:[EC2ClientTypes.ConversionTask]? = nil - if let conversionTasksContainer = conversionTasksContainer { - conversionTasksBuffer = [EC2ClientTypes.ConversionTask]() - for structureContainer0 in conversionTasksContainer { - conversionTasksBuffer?.append(structureContainer0) - } - } - conversionTasks = conversionTasksBuffer - } else { - conversionTasks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - conversionTasks = nil - } - } -} - -enum DescribeConversionTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -50813,72 +36087,15 @@ public struct DescribeCustomerGatewaysInput: Swift.Equatable { } } -struct DescribeCustomerGatewaysInputBody: Swift.Equatable { - let customerGatewayIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeCustomerGatewaysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerGatewayIds = "CustomerGatewayId" - case dryRun = "dryRun" - case filters = "Filter" - } +extension DescribeCustomerGatewaysOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.customerGatewayIds) { - struct KeyVal0{struct CustomerGatewayId{}} - let customerGatewayIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .customerGatewayIds) - if let customerGatewayIdsWrappedContainer = customerGatewayIdsWrappedContainer { - let customerGatewayIdsContainer = try customerGatewayIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var customerGatewayIdsBuffer:[Swift.String]? = nil - if let customerGatewayIdsContainer = customerGatewayIdsContainer { - customerGatewayIdsBuffer = [Swift.String]() - for stringContainer0 in customerGatewayIdsContainer { - customerGatewayIdsBuffer?.append(stringContainer0) - } - } - customerGatewayIds = customerGatewayIdsBuffer - } else { - customerGatewayIds = [] - } - } else { - customerGatewayIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeCustomerGatewaysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCustomerGatewaysOutputBody = try responseDecoder.decode(responseBody: data) - self.customerGateways = output.customerGateways - } else { - self.customerGateways = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeCustomerGatewaysOutput() + value.customerGateways = try reader["customerGatewaySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CustomerGateway.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -50896,44 +36113,18 @@ public struct DescribeCustomerGatewaysOutput: Swift.Equatable { } } -struct DescribeCustomerGatewaysOutputBody: Swift.Equatable { - let customerGateways: [EC2ClientTypes.CustomerGateway]? -} - -extension DescribeCustomerGatewaysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerGateways = "customerGatewaySet" - } +enum DescribeCustomerGatewaysOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.customerGateways) { - struct KeyVal0{struct item{}} - let customerGatewaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .customerGateways) - if let customerGatewaysWrappedContainer = customerGatewaysWrappedContainer { - let customerGatewaysContainer = try customerGatewaysWrappedContainer.decodeIfPresent([EC2ClientTypes.CustomerGateway].self, forKey: .member) - var customerGatewaysBuffer:[EC2ClientTypes.CustomerGateway]? = nil - if let customerGatewaysContainer = customerGatewaysContainer { - customerGatewaysBuffer = [EC2ClientTypes.CustomerGateway]() - for structureContainer0 in customerGatewaysContainer { - customerGatewaysBuffer?.append(structureContainer0) - } - } - customerGateways = customerGatewaysBuffer - } else { - customerGateways = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - customerGateways = nil - } - } -} - -enum DescribeCustomerGatewaysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -51026,82 +36217,16 @@ public struct DescribeDhcpOptionsInput: Swift.Equatable { } } -struct DescribeDhcpOptionsInputBody: Swift.Equatable { - let dhcpOptionsIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeDhcpOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dhcpOptionsIds = "DhcpOptionsId" - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dhcpOptionsIds) { - struct KeyVal0{struct DhcpOptionsId{}} - let dhcpOptionsIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dhcpOptionsIds) - if let dhcpOptionsIdsWrappedContainer = dhcpOptionsIdsWrappedContainer { - let dhcpOptionsIdsContainer = try dhcpOptionsIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dhcpOptionsIdsBuffer:[Swift.String]? = nil - if let dhcpOptionsIdsContainer = dhcpOptionsIdsContainer { - dhcpOptionsIdsBuffer = [Swift.String]() - for stringContainer0 in dhcpOptionsIdsContainer { - dhcpOptionsIdsBuffer?.append(stringContainer0) - } - } - dhcpOptionsIds = dhcpOptionsIdsBuffer - } else { - dhcpOptionsIds = [] - } - } else { - dhcpOptionsIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeDhcpOptionsOutput { -extension DescribeDhcpOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDhcpOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.dhcpOptions = output.dhcpOptions - self.nextToken = output.nextToken - } else { - self.dhcpOptions = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeDhcpOptionsOutput() + value.dhcpOptions = try reader["dhcpOptionsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DhcpOptions.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -51122,48 +36247,18 @@ public struct DescribeDhcpOptionsOutput: Swift.Equatable { } } -struct DescribeDhcpOptionsOutputBody: Swift.Equatable { - let dhcpOptions: [EC2ClientTypes.DhcpOptions]? - let nextToken: Swift.String? -} - -extension DescribeDhcpOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dhcpOptions = "dhcpOptionsSet" - case nextToken = "nextToken" - } +enum DescribeDhcpOptionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dhcpOptions) { - struct KeyVal0{struct item{}} - let dhcpOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dhcpOptions) - if let dhcpOptionsWrappedContainer = dhcpOptionsWrappedContainer { - let dhcpOptionsContainer = try dhcpOptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.DhcpOptions].self, forKey: .member) - var dhcpOptionsBuffer:[EC2ClientTypes.DhcpOptions]? = nil - if let dhcpOptionsContainer = dhcpOptionsContainer { - dhcpOptionsBuffer = [EC2ClientTypes.DhcpOptions]() - for structureContainer0 in dhcpOptionsContainer { - dhcpOptionsBuffer?.append(structureContainer0) - } - } - dhcpOptions = dhcpOptionsBuffer - } else { - dhcpOptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - dhcpOptions = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeDhcpOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -51248,82 +36343,16 @@ public struct DescribeEgressOnlyInternetGatewaysInput: Swift.Equatable { } } -struct DescribeEgressOnlyInternetGatewaysInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let egressOnlyInternetGatewayIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? -} - -extension DescribeEgressOnlyInternetGatewaysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case egressOnlyInternetGatewayIds = "EgressOnlyInternetGatewayId" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeEgressOnlyInternetGatewaysOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.egressOnlyInternetGatewayIds) { - struct KeyVal0{struct item{}} - let egressOnlyInternetGatewayIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .egressOnlyInternetGatewayIds) - if let egressOnlyInternetGatewayIdsWrappedContainer = egressOnlyInternetGatewayIdsWrappedContainer { - let egressOnlyInternetGatewayIdsContainer = try egressOnlyInternetGatewayIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var egressOnlyInternetGatewayIdsBuffer:[Swift.String]? = nil - if let egressOnlyInternetGatewayIdsContainer = egressOnlyInternetGatewayIdsContainer { - egressOnlyInternetGatewayIdsBuffer = [Swift.String]() - for stringContainer0 in egressOnlyInternetGatewayIdsContainer { - egressOnlyInternetGatewayIdsBuffer?.append(stringContainer0) - } - } - egressOnlyInternetGatewayIds = egressOnlyInternetGatewayIdsBuffer - } else { - egressOnlyInternetGatewayIds = [] - } - } else { - egressOnlyInternetGatewayIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} - -extension DescribeEgressOnlyInternetGatewaysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEgressOnlyInternetGatewaysOutputBody = try responseDecoder.decode(responseBody: data) - self.egressOnlyInternetGateways = output.egressOnlyInternetGateways - self.nextToken = output.nextToken - } else { - self.egressOnlyInternetGateways = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeEgressOnlyInternetGatewaysOutput() + value.egressOnlyInternetGateways = try reader["egressOnlyInternetGatewaySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.EgressOnlyInternetGateway.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -51344,48 +36373,18 @@ public struct DescribeEgressOnlyInternetGatewaysOutput: Swift.Equatable { } } -struct DescribeEgressOnlyInternetGatewaysOutputBody: Swift.Equatable { - let egressOnlyInternetGateways: [EC2ClientTypes.EgressOnlyInternetGateway]? - let nextToken: Swift.String? -} - -extension DescribeEgressOnlyInternetGatewaysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case egressOnlyInternetGateways = "egressOnlyInternetGatewaySet" - case nextToken = "nextToken" - } +enum DescribeEgressOnlyInternetGatewaysOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.egressOnlyInternetGateways) { - struct KeyVal0{struct item{}} - let egressOnlyInternetGatewaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .egressOnlyInternetGateways) - if let egressOnlyInternetGatewaysWrappedContainer = egressOnlyInternetGatewaysWrappedContainer { - let egressOnlyInternetGatewaysContainer = try egressOnlyInternetGatewaysWrappedContainer.decodeIfPresent([EC2ClientTypes.EgressOnlyInternetGateway].self, forKey: .member) - var egressOnlyInternetGatewaysBuffer:[EC2ClientTypes.EgressOnlyInternetGateway]? = nil - if let egressOnlyInternetGatewaysContainer = egressOnlyInternetGatewaysContainer { - egressOnlyInternetGatewaysBuffer = [EC2ClientTypes.EgressOnlyInternetGateway]() - for structureContainer0 in egressOnlyInternetGatewaysContainer { - egressOnlyInternetGatewaysBuffer?.append(structureContainer0) - } - } - egressOnlyInternetGateways = egressOnlyInternetGatewaysBuffer - } else { - egressOnlyInternetGateways = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - egressOnlyInternetGateways = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeEgressOnlyInternetGatewaysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -51476,84 +36475,17 @@ public struct DescribeElasticGpusInput: Swift.Equatable { } } -struct DescribeElasticGpusInputBody: Swift.Equatable { - let elasticGpuIds: [Swift.String]? - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeElasticGpusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case elasticGpuIds = "ElasticGpuId" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.elasticGpuIds) { - struct KeyVal0{struct item{}} - let elasticGpuIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticGpuIds) - if let elasticGpuIdsWrappedContainer = elasticGpuIdsWrappedContainer { - let elasticGpuIdsContainer = try elasticGpuIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var elasticGpuIdsBuffer:[Swift.String]? = nil - if let elasticGpuIdsContainer = elasticGpuIdsContainer { - elasticGpuIdsBuffer = [Swift.String]() - for stringContainer0 in elasticGpuIdsContainer { - elasticGpuIdsBuffer?.append(stringContainer0) - } - } - elasticGpuIds = elasticGpuIdsBuffer - } else { - elasticGpuIds = [] - } - } else { - elasticGpuIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeElasticGpusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeElasticGpusOutputBody = try responseDecoder.decode(responseBody: data) - self.elasticGpuSet = output.elasticGpuSet - self.maxResults = output.maxResults - self.nextToken = output.nextToken - } else { - self.elasticGpuSet = nil - self.maxResults = nil - self.nextToken = nil +extension DescribeElasticGpusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeElasticGpusOutput() + value.elasticGpuSet = try reader["elasticGpuSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ElasticGpus.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.maxResults = try reader["maxResults"].readIfPresent() + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -51578,52 +36510,18 @@ public struct DescribeElasticGpusOutput: Swift.Equatable { } } -struct DescribeElasticGpusOutputBody: Swift.Equatable { - let elasticGpuSet: [EC2ClientTypes.ElasticGpus]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} +enum DescribeElasticGpusOutputError { -extension DescribeElasticGpusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case elasticGpuSet = "elasticGpuSet" - case maxResults = "maxResults" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.elasticGpuSet) { - struct KeyVal0{struct item{}} - let elasticGpuSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticGpuSet) - if let elasticGpuSetWrappedContainer = elasticGpuSetWrappedContainer { - let elasticGpuSetContainer = try elasticGpuSetWrappedContainer.decodeIfPresent([EC2ClientTypes.ElasticGpus].self, forKey: .member) - var elasticGpuSetBuffer:[EC2ClientTypes.ElasticGpus]? = nil - if let elasticGpuSetContainer = elasticGpuSetContainer { - elasticGpuSetBuffer = [EC2ClientTypes.ElasticGpus]() - for structureContainer0 in elasticGpuSetContainer { - elasticGpuSetBuffer?.append(structureContainer0) - } - } - elasticGpuSet = elasticGpuSetBuffer - } else { - elasticGpuSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - elasticGpuSet = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeElasticGpusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -51704,82 +36602,16 @@ public struct DescribeExportImageTasksInput: Swift.Equatable { } } -struct DescribeExportImageTasksInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let exportImageTaskIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeExportImageTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case exportImageTaskIds = "ExportImageTaskId" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeExportImageTasksOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.exportImageTaskIds) { - struct KeyVal0{struct ExportImageTaskId{}} - let exportImageTaskIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportImageTaskIds) - if let exportImageTaskIdsWrappedContainer = exportImageTaskIdsWrappedContainer { - let exportImageTaskIdsContainer = try exportImageTaskIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportImageTaskIdsBuffer:[Swift.String]? = nil - if let exportImageTaskIdsContainer = exportImageTaskIdsContainer { - exportImageTaskIdsBuffer = [Swift.String]() - for stringContainer0 in exportImageTaskIdsContainer { - exportImageTaskIdsBuffer?.append(stringContainer0) - } - } - exportImageTaskIds = exportImageTaskIdsBuffer - } else { - exportImageTaskIds = [] - } - } else { - exportImageTaskIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeExportImageTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeExportImageTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.exportImageTasks = output.exportImageTasks - self.nextToken = output.nextToken - } else { - self.exportImageTasks = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeExportImageTasksOutput() + value.exportImageTasks = try reader["exportImageTaskSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ExportImageTask.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -51800,48 +36632,18 @@ public struct DescribeExportImageTasksOutput: Swift.Equatable { } } -struct DescribeExportImageTasksOutputBody: Swift.Equatable { - let exportImageTasks: [EC2ClientTypes.ExportImageTask]? - let nextToken: Swift.String? -} +enum DescribeExportImageTasksOutputError { -extension DescribeExportImageTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportImageTasks = "exportImageTaskSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.exportImageTasks) { - struct KeyVal0{struct item{}} - let exportImageTasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportImageTasks) - if let exportImageTasksWrappedContainer = exportImageTasksWrappedContainer { - let exportImageTasksContainer = try exportImageTasksWrappedContainer.decodeIfPresent([EC2ClientTypes.ExportImageTask].self, forKey: .member) - var exportImageTasksBuffer:[EC2ClientTypes.ExportImageTask]? = nil - if let exportImageTasksContainer = exportImageTasksContainer { - exportImageTasksBuffer = [EC2ClientTypes.ExportImageTask]() - for structureContainer0 in exportImageTasksContainer { - exportImageTasksBuffer?.append(structureContainer0) - } - } - exportImageTasks = exportImageTasksBuffer - } else { - exportImageTasks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - exportImageTasks = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeExportImageTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -51901,68 +36703,15 @@ public struct DescribeExportTasksInput: Swift.Equatable { } } -struct DescribeExportTasksInputBody: Swift.Equatable { - let exportTaskIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? -} +extension DescribeExportTasksOutput { -extension DescribeExportTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportTaskIds = "exportTaskId" - case filters = "Filter" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.exportTaskIds) { - struct KeyVal0{struct ExportTaskId{}} - let exportTaskIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportTaskIds) - if let exportTaskIdsWrappedContainer = exportTaskIdsWrappedContainer { - let exportTaskIdsContainer = try exportTaskIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportTaskIdsBuffer:[Swift.String]? = nil - if let exportTaskIdsContainer = exportTaskIdsContainer { - exportTaskIdsBuffer = [Swift.String]() - for stringContainer0 in exportTaskIdsContainer { - exportTaskIdsBuffer?.append(stringContainer0) - } - } - exportTaskIds = exportTaskIdsBuffer - } else { - exportTaskIds = [] - } - } else { - exportTaskIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} - -extension DescribeExportTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeExportTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.exportTasks = output.exportTasks - } else { - self.exportTasks = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeExportTasksOutput() + value.exportTasks = try reader["exportTaskSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ExportTask.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -51979,44 +36728,18 @@ public struct DescribeExportTasksOutput: Swift.Equatable { } } -struct DescribeExportTasksOutputBody: Swift.Equatable { - let exportTasks: [EC2ClientTypes.ExportTask]? -} - -extension DescribeExportTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportTasks = "exportTaskSet" - } +enum DescribeExportTasksOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.exportTasks) { - struct KeyVal0{struct item{}} - let exportTasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportTasks) - if let exportTasksWrappedContainer = exportTasksWrappedContainer { - let exportTasksContainer = try exportTasksWrappedContainer.decodeIfPresent([EC2ClientTypes.ExportTask].self, forKey: .member) - var exportTasksBuffer:[EC2ClientTypes.ExportTask]? = nil - if let exportTasksContainer = exportTasksContainer { - exportTasksBuffer = [EC2ClientTypes.ExportTask]() - for structureContainer0 in exportTasksContainer { - exportTasksBuffer?.append(structureContainer0) - } - } - exportTasks = exportTasksBuffer - } else { - exportTasks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - exportTasks = nil - } - } -} - -enum DescribeExportTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -52103,82 +36826,16 @@ public struct DescribeFastLaunchImagesInput: Swift.Equatable { } } -struct DescribeFastLaunchImagesInputBody: Swift.Equatable { - let imageIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeFastLaunchImagesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case imageIds = "ImageId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeFastLaunchImagesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.imageIds) { - struct KeyVal0{struct ImageId{}} - let imageIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .imageIds) - if let imageIdsWrappedContainer = imageIdsWrappedContainer { - let imageIdsContainer = try imageIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var imageIdsBuffer:[Swift.String]? = nil - if let imageIdsContainer = imageIdsContainer { - imageIdsBuffer = [Swift.String]() - for stringContainer0 in imageIdsContainer { - imageIdsBuffer?.append(stringContainer0) - } - } - imageIds = imageIdsBuffer - } else { - imageIds = [] - } - } else { - imageIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeFastLaunchImagesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeFastLaunchImagesOutputBody = try responseDecoder.decode(responseBody: data) - self.fastLaunchImages = output.fastLaunchImages - self.nextToken = output.nextToken - } else { - self.fastLaunchImages = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFastLaunchImagesOutput() + value.fastLaunchImages = try reader["fastLaunchImageSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DescribeFastLaunchImagesSuccessItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -52199,64 +36856,23 @@ public struct DescribeFastLaunchImagesOutput: Swift.Equatable { } } -struct DescribeFastLaunchImagesOutputBody: Swift.Equatable { - let fastLaunchImages: [EC2ClientTypes.DescribeFastLaunchImagesSuccessItem]? - let nextToken: Swift.String? -} - -extension DescribeFastLaunchImagesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fastLaunchImages = "fastLaunchImageSet" - case nextToken = "nextToken" - } +enum DescribeFastLaunchImagesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.fastLaunchImages) { - struct KeyVal0{struct item{}} - let fastLaunchImagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fastLaunchImages) - if let fastLaunchImagesWrappedContainer = fastLaunchImagesWrappedContainer { - let fastLaunchImagesContainer = try fastLaunchImagesWrappedContainer.decodeIfPresent([EC2ClientTypes.DescribeFastLaunchImagesSuccessItem].self, forKey: .member) - var fastLaunchImagesBuffer:[EC2ClientTypes.DescribeFastLaunchImagesSuccessItem]? = nil - if let fastLaunchImagesContainer = fastLaunchImagesContainer { - fastLaunchImagesBuffer = [EC2ClientTypes.DescribeFastLaunchImagesSuccessItem]() - for structureContainer0 in fastLaunchImagesContainer { - fastLaunchImagesBuffer?.append(structureContainer0) - } - } - fastLaunchImages = fastLaunchImagesBuffer - } else { - fastLaunchImages = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - fastLaunchImages = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeFastLaunchImagesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.DescribeFastLaunchImagesSuccessItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageId = "imageId" - case launchTemplate = "launchTemplate" - case maxParallelLaunches = "maxParallelLaunches" - case ownerId = "ownerId" - case resourceType = "resourceType" - case snapshotConfiguration = "snapshotConfiguration" - case state = "state" - case stateTransitionReason = "stateTransitionReason" - case stateTransitionTime = "stateTransitionTime" - } +extension EC2ClientTypes.DescribeFastLaunchImagesSuccessItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -52289,26 +36905,21 @@ extension EC2ClientTypes.DescribeFastLaunchImagesSuccessItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let snapshotConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchSnapshotConfigurationResponse.self, forKey: .snapshotConfiguration) - snapshotConfiguration = snapshotConfigurationDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let maxParallelLaunchesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxParallelLaunches) - maxParallelLaunches = maxParallelLaunchesDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchStateCode.self, forKey: .state) - state = stateDecoded - let stateTransitionReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateTransitionReason) - stateTransitionReason = stateTransitionReasonDecoded - let stateTransitionTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .stateTransitionTime) - stateTransitionTime = stateTransitionTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DescribeFastLaunchImagesSuccessItem() + value.imageId = try reader["imageId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.snapshotConfiguration = try reader["snapshotConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.FastLaunchSnapshotConfigurationResponse.readingClosure) + value.launchTemplate = try reader["launchTemplate"].readIfPresent(readingClosure: EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse.readingClosure) + value.maxParallelLaunches = try reader["maxParallelLaunches"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.stateTransitionReason = try reader["stateTransitionReason"].readIfPresent() + value.stateTransitionTime = try reader["stateTransitionTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -52360,20 +36971,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case disabledTime = "disabledTime" - case disablingTime = "disablingTime" - case enabledTime = "enabledTime" - case enablingTime = "enablingTime" - case optimizingTime = "optimizingTime" - case ownerAlias = "ownerAlias" - case ownerId = "ownerId" - case snapshotId = "snapshotId" - case state = "state" - case stateTransitionReason = "stateTransitionReason" - } +extension EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -52412,30 +37010,23 @@ extension EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastSnapshotRestoreStateCode.self, forKey: .state) - state = stateDecoded - let stateTransitionReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateTransitionReason) - stateTransitionReason = stateTransitionReasonDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ownerAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAlias) - ownerAlias = ownerAliasDecoded - let enablingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enablingTime) - enablingTime = enablingTimeDecoded - let optimizingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .optimizingTime) - optimizingTime = optimizingTimeDecoded - let enabledTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enabledTime) - enabledTime = enabledTimeDecoded - let disablingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .disablingTime) - disablingTime = disablingTimeDecoded - let disabledTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .disabledTime) - disabledTime = disabledTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.stateTransitionReason = try reader["stateTransitionReason"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.ownerAlias = try reader["ownerAlias"].readIfPresent() + value.enablingTime = try reader["enablingTime"].readTimestampIfPresent(format: .dateTime) + value.optimizingTime = try reader["optimizingTime"].readTimestampIfPresent(format: .dateTime) + value.enabledTime = try reader["enabledTime"].readTimestampIfPresent(format: .dateTime) + value.disablingTime = try reader["disablingTime"].readTimestampIfPresent(format: .dateTime) + value.disabledTime = try reader["disabledTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -52567,61 +37158,16 @@ public struct DescribeFastSnapshotRestoresInput: Swift.Equatable { } } -struct DescribeFastSnapshotRestoresInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeFastSnapshotRestoresInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeFastSnapshotRestoresOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeFastSnapshotRestoresOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeFastSnapshotRestoresOutputBody = try responseDecoder.decode(responseBody: data) - self.fastSnapshotRestores = output.fastSnapshotRestores - self.nextToken = output.nextToken - } else { - self.fastSnapshotRestores = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFastSnapshotRestoresOutput() + value.fastSnapshotRestores = try reader["fastSnapshotRestoreSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -52642,59 +37188,23 @@ public struct DescribeFastSnapshotRestoresOutput: Swift.Equatable { } } -struct DescribeFastSnapshotRestoresOutputBody: Swift.Equatable { - let fastSnapshotRestores: [EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem]? - let nextToken: Swift.String? -} +enum DescribeFastSnapshotRestoresOutputError { -extension DescribeFastSnapshotRestoresOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fastSnapshotRestores = "fastSnapshotRestoreSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.fastSnapshotRestores) { - struct KeyVal0{struct item{}} - let fastSnapshotRestoresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fastSnapshotRestores) - if let fastSnapshotRestoresWrappedContainer = fastSnapshotRestoresWrappedContainer { - let fastSnapshotRestoresContainer = try fastSnapshotRestoresWrappedContainer.decodeIfPresent([EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem].self, forKey: .member) - var fastSnapshotRestoresBuffer:[EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem]? = nil - if let fastSnapshotRestoresContainer = fastSnapshotRestoresContainer { - fastSnapshotRestoresBuffer = [EC2ClientTypes.DescribeFastSnapshotRestoreSuccessItem]() - for structureContainer0 in fastSnapshotRestoresContainer { - fastSnapshotRestoresBuffer?.append(structureContainer0) - } - } - fastSnapshotRestores = fastSnapshotRestoresBuffer - } else { - fastSnapshotRestores = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - fastSnapshotRestores = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeFastSnapshotRestoresOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.DescribeFleetError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errorCode = "errorCode" - case errorMessage = "errorMessage" - case launchTemplateAndOverrides = "launchTemplateAndOverrides" - case lifecycle = "lifecycle" - } +extension EC2ClientTypes.DescribeFleetError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -52712,16 +37222,16 @@ extension EC2ClientTypes.DescribeFleetError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateAndOverridesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateAndOverridesResponse.self, forKey: .launchTemplateAndOverrides) - launchTemplateAndOverrides = launchTemplateAndOverridesDecoded - let lifecycleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceLifecycle.self, forKey: .lifecycle) - lifecycle = lifecycleDecoded - let errorCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorCode) - errorCode = errorCodeDecoded - let errorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorMessage) - errorMessage = errorMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DescribeFleetError() + value.launchTemplateAndOverrides = try reader["launchTemplateAndOverrides"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateAndOverridesResponse.readingClosure) + value.lifecycle = try reader["lifecycle"].readIfPresent() + value.errorCode = try reader["errorCode"].readIfPresent() + value.errorMessage = try reader["errorMessage"].readIfPresent() + return value + } } } @@ -52820,58 +37330,19 @@ public struct DescribeFleetHistoryInput: Swift.Equatable { } } -struct DescribeFleetHistoryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let eventType: EC2ClientTypes.FleetEventType? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let fleetId: Swift.String? - let startTime: ClientRuntime.Date? -} - -extension DescribeFleetHistoryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case eventType = "EventType" - case fleetId = "FleetId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let eventTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetEventType.self, forKey: .eventType) - eventType = eventTypeDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - } -} +extension DescribeFleetHistoryOutput { -extension DescribeFleetHistoryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeFleetHistoryOutputBody = try responseDecoder.decode(responseBody: data) - self.fleetId = output.fleetId - self.historyRecords = output.historyRecords - self.lastEvaluatedTime = output.lastEvaluatedTime - self.nextToken = output.nextToken - self.startTime = output.startTime - } else { - self.fleetId = nil - self.historyRecords = nil - self.lastEvaluatedTime = nil - self.nextToken = nil - self.startTime = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFleetHistoryOutput() + value.fleetId = try reader["fleetId"].readIfPresent() + value.historyRecords = try reader["historyRecordSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.HistoryRecordEntry.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.lastEvaluatedTime = try reader["lastEvaluatedTime"].readTimestampIfPresent(format: .dateTime) + value.nextToken = try reader["nextToken"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -52904,60 +37375,18 @@ public struct DescribeFleetHistoryOutput: Swift.Equatable { } } -struct DescribeFleetHistoryOutputBody: Swift.Equatable { - let historyRecords: [EC2ClientTypes.HistoryRecordEntry]? - let lastEvaluatedTime: ClientRuntime.Date? - let nextToken: Swift.String? - let fleetId: Swift.String? - let startTime: ClientRuntime.Date? -} - -extension DescribeFleetHistoryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fleetId = "fleetId" - case historyRecords = "historyRecordSet" - case lastEvaluatedTime = "lastEvaluatedTime" - case nextToken = "nextToken" - case startTime = "startTime" - } +enum DescribeFleetHistoryOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.historyRecords) { - struct KeyVal0{struct item{}} - let historyRecordsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .historyRecords) - if let historyRecordsWrappedContainer = historyRecordsWrappedContainer { - let historyRecordsContainer = try historyRecordsWrappedContainer.decodeIfPresent([EC2ClientTypes.HistoryRecordEntry].self, forKey: .member) - var historyRecordsBuffer:[EC2ClientTypes.HistoryRecordEntry]? = nil - if let historyRecordsContainer = historyRecordsContainer { - historyRecordsBuffer = [EC2ClientTypes.HistoryRecordEntry]() - for structureContainer0 in historyRecordsContainer { - historyRecordsBuffer?.append(structureContainer0) - } - } - historyRecords = historyRecordsBuffer - } else { - historyRecords = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - historyRecords = nil - } - let lastEvaluatedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastEvaluatedTime) - lastEvaluatedTime = lastEvaluatedTimeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - } -} - -enum DescribeFleetHistoryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -53032,67 +37461,17 @@ public struct DescribeFleetInstancesInput: Swift.Equatable { } } -struct DescribeFleetInstancesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let fleetId: Swift.String? - let filters: [EC2ClientTypes.Filter]? -} - -extension DescribeFleetInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case fleetId = "FleetId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeFleetInstancesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} - -extension DescribeFleetInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeFleetInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.activeInstances = output.activeInstances - self.fleetId = output.fleetId - self.nextToken = output.nextToken - } else { - self.activeInstances = nil - self.fleetId = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFleetInstancesOutput() + value.activeInstances = try reader["activeInstanceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ActiveInstance.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.fleetId = try reader["fleetId"].readIfPresent() + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -53117,52 +37496,18 @@ public struct DescribeFleetInstancesOutput: Swift.Equatable { } } -struct DescribeFleetInstancesOutputBody: Swift.Equatable { - let activeInstances: [EC2ClientTypes.ActiveInstance]? - let nextToken: Swift.String? - let fleetId: Swift.String? -} +enum DescribeFleetInstancesOutputError { -extension DescribeFleetInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activeInstances = "activeInstanceSet" - case fleetId = "fleetId" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.activeInstances) { - struct KeyVal0{struct item{}} - let activeInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .activeInstances) - if let activeInstancesWrappedContainer = activeInstancesWrappedContainer { - let activeInstancesContainer = try activeInstancesWrappedContainer.decodeIfPresent([EC2ClientTypes.ActiveInstance].self, forKey: .member) - var activeInstancesBuffer:[EC2ClientTypes.ActiveInstance]? = nil - if let activeInstancesContainer = activeInstancesContainer { - activeInstancesBuffer = [EC2ClientTypes.ActiveInstance]() - for structureContainer0 in activeInstancesContainer { - activeInstancesBuffer?.append(structureContainer0) - } - } - activeInstances = activeInstancesBuffer - } else { - activeInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - activeInstances = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded - } -} - -enum DescribeFleetInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -53253,80 +37598,7 @@ public struct DescribeFleetsInput: Swift.Equatable { } } -struct DescribeFleetsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let fleetIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? -} - -extension DescribeFleetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case fleetIds = "FleetId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.fleetIds) { - struct KeyVal0{struct member{}} - let fleetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fleetIds) - if let fleetIdsWrappedContainer = fleetIdsWrappedContainer { - let fleetIdsContainer = try fleetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fleetIdsBuffer:[Swift.String]? = nil - if let fleetIdsContainer = fleetIdsContainer { - fleetIdsBuffer = [Swift.String]() - for stringContainer0 in fleetIdsContainer { - fleetIdsBuffer?.append(stringContainer0) - } - } - fleetIds = fleetIdsBuffer - } else { - fleetIds = [] - } - } else { - fleetIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} - -extension EC2ClientTypes.DescribeFleetsInstances: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceIds = "instanceIds" - case instanceType = "instanceType" - case launchTemplateAndOverrides = "launchTemplateAndOverrides" - case lifecycle = "lifecycle" - case platform = "platform" - } +extension EC2ClientTypes.DescribeFleetsInstances: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -53356,35 +37628,17 @@ extension EC2ClientTypes.DescribeFleetsInstances: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateAndOverridesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateAndOverridesResponse.self, forKey: .launchTemplateAndOverrides) - launchTemplateAndOverrides = launchTemplateAndOverridesDecoded - let lifecycleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceLifecycle.self, forKey: .lifecycle) - lifecycle = lifecycleDecoded - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct item{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DescribeFleetsInstances() + value.launchTemplateAndOverrides = try reader["launchTemplateAndOverrides"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateAndOverridesResponse.readingClosure) + value.lifecycle = try reader["lifecycle"].readIfPresent() + value.instanceIds = try reader["instanceIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceType = try reader["instanceType"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + return value } - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let platformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlatformValues.self, forKey: .platform) - platform = platformDecoded } } @@ -53420,16 +37674,16 @@ extension EC2ClientTypes { } -extension DescribeFleetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeFleetsOutputBody = try responseDecoder.decode(responseBody: data) - self.fleets = output.fleets - self.nextToken = output.nextToken - } else { - self.fleets = nil - self.nextToken = nil +extension DescribeFleetsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFleetsOutput() + value.fleets = try reader["fleetSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FleetData.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -53450,48 +37704,18 @@ public struct DescribeFleetsOutput: Swift.Equatable { } } -struct DescribeFleetsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let fleets: [EC2ClientTypes.FleetData]? -} - -extension DescribeFleetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fleets = "fleetSet" - case nextToken = "nextToken" - } +enum DescribeFleetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.fleets) { - struct KeyVal0{struct item{}} - let fleetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fleets) - if let fleetsWrappedContainer = fleetsWrappedContainer { - let fleetsContainer = try fleetsWrappedContainer.decodeIfPresent([EC2ClientTypes.FleetData].self, forKey: .member) - var fleetsBuffer:[EC2ClientTypes.FleetData]? = nil - if let fleetsContainer = fleetsContainer { - fleetsBuffer = [EC2ClientTypes.FleetData]() - for structureContainer0 in fleetsContainer { - fleetsBuffer?.append(structureContainer0) - } - } - fleets = fleetsBuffer - } else { - fleets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - fleets = nil - } - } -} - -enum DescribeFleetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -53588,82 +37812,16 @@ public struct DescribeFlowLogsInput: Swift.Equatable { } } -struct DescribeFlowLogsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filter: [EC2ClientTypes.Filter]? - let flowLogIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeFlowLogsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filter = "Filter" - case flowLogIds = "FlowLogId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeFlowLogsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filter) { - struct KeyVal0{struct Filter{}} - let filterWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filter) - if let filterWrappedContainer = filterWrappedContainer { - let filterContainer = try filterWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filterBuffer:[EC2ClientTypes.Filter]? = nil - if let filterContainer = filterContainer { - filterBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filterContainer { - filterBuffer?.append(structureContainer0) - } - } - filter = filterBuffer - } else { - filter = [] - } - } else { - filter = nil - } - if containerValues.contains(.flowLogIds) { - struct KeyVal0{struct item{}} - let flowLogIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .flowLogIds) - if let flowLogIdsWrappedContainer = flowLogIdsWrappedContainer { - let flowLogIdsContainer = try flowLogIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var flowLogIdsBuffer:[Swift.String]? = nil - if let flowLogIdsContainer = flowLogIdsContainer { - flowLogIdsBuffer = [Swift.String]() - for stringContainer0 in flowLogIdsContainer { - flowLogIdsBuffer?.append(stringContainer0) - } - } - flowLogIds = flowLogIdsBuffer - } else { - flowLogIds = [] - } - } else { - flowLogIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeFlowLogsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeFlowLogsOutputBody = try responseDecoder.decode(responseBody: data) - self.flowLogs = output.flowLogs - self.nextToken = output.nextToken - } else { - self.flowLogs = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFlowLogsOutput() + value.flowLogs = try reader["flowLogSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FlowLog.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -53684,48 +37842,18 @@ public struct DescribeFlowLogsOutput: Swift.Equatable { } } -struct DescribeFlowLogsOutputBody: Swift.Equatable { - let flowLogs: [EC2ClientTypes.FlowLog]? - let nextToken: Swift.String? -} - -extension DescribeFlowLogsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case flowLogs = "flowLogSet" - case nextToken = "nextToken" - } +enum DescribeFlowLogsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.flowLogs) { - struct KeyVal0{struct item{}} - let flowLogsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .flowLogs) - if let flowLogsWrappedContainer = flowLogsWrappedContainer { - let flowLogsContainer = try flowLogsWrappedContainer.decodeIfPresent([EC2ClientTypes.FlowLog].self, forKey: .member) - var flowLogsBuffer:[EC2ClientTypes.FlowLog]? = nil - if let flowLogsContainer = flowLogsContainer { - flowLogsBuffer = [EC2ClientTypes.FlowLog]() - for structureContainer0 in flowLogsContainer { - flowLogsBuffer?.append(structureContainer0) - } - } - flowLogs = flowLogsBuffer - } else { - flowLogs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - flowLogs = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeFlowLogsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -53776,38 +37904,15 @@ public struct DescribeFpgaImageAttributeInput: Swift.Equatable { } } -struct DescribeFpgaImageAttributeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let fpgaImageId: Swift.String? - let attribute: EC2ClientTypes.FpgaImageAttributeName? -} - -extension DescribeFpgaImageAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case dryRun = "DryRun" - case fpgaImageId = "FpgaImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let fpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageId) - fpgaImageId = fpgaImageIdDecoded - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FpgaImageAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - } -} +extension DescribeFpgaImageAttributeOutput { -extension DescribeFpgaImageAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeFpgaImageAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.fpgaImageAttribute = output.fpgaImageAttribute - } else { - self.fpgaImageAttribute = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFpgaImageAttributeOutput() + value.fpgaImageAttribute = try reader["fpgaImageAttribute"].readIfPresent(readingClosure: EC2ClientTypes.FpgaImageAttribute.readingClosure) + return value } } } @@ -53824,27 +37929,18 @@ public struct DescribeFpgaImageAttributeOutput: Swift.Equatable { } } -struct DescribeFpgaImageAttributeOutputBody: Swift.Equatable { - let fpgaImageAttribute: EC2ClientTypes.FpgaImageAttribute? -} - -extension DescribeFpgaImageAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fpgaImageAttribute = "fpgaImageAttribute" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fpgaImageAttributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FpgaImageAttribute.self, forKey: .fpgaImageAttribute) - fpgaImageAttribute = fpgaImageAttributeDecoded - } -} +enum DescribeFpgaImageAttributeOutputError { -enum DescribeFpgaImageAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -53963,103 +38059,16 @@ public struct DescribeFpgaImagesInput: Swift.Equatable { } } -struct DescribeFpgaImagesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let fpgaImageIds: [Swift.String]? - let owners: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeFpgaImagesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case fpgaImageIds = "FpgaImageId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case owners = "Owner" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.fpgaImageIds) { - struct KeyVal0{struct item{}} - let fpgaImageIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fpgaImageIds) - if let fpgaImageIdsWrappedContainer = fpgaImageIdsWrappedContainer { - let fpgaImageIdsContainer = try fpgaImageIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var fpgaImageIdsBuffer:[Swift.String]? = nil - if let fpgaImageIdsContainer = fpgaImageIdsContainer { - fpgaImageIdsBuffer = [Swift.String]() - for stringContainer0 in fpgaImageIdsContainer { - fpgaImageIdsBuffer?.append(stringContainer0) - } - } - fpgaImageIds = fpgaImageIdsBuffer - } else { - fpgaImageIds = [] - } - } else { - fpgaImageIds = nil - } - if containerValues.contains(.owners) { - struct KeyVal0{struct Owner{}} - let ownersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .owners) - if let ownersWrappedContainer = ownersWrappedContainer { - let ownersContainer = try ownersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ownersBuffer:[Swift.String]? = nil - if let ownersContainer = ownersContainer { - ownersBuffer = [Swift.String]() - for stringContainer0 in ownersContainer { - ownersBuffer?.append(stringContainer0) - } - } - owners = ownersBuffer - } else { - owners = [] - } - } else { - owners = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeFpgaImagesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeFpgaImagesOutputBody = try responseDecoder.decode(responseBody: data) - self.fpgaImages = output.fpgaImages - self.nextToken = output.nextToken - } else { - self.fpgaImages = nil - self.nextToken = nil +extension DescribeFpgaImagesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeFpgaImagesOutput() + value.fpgaImages = try reader["fpgaImageSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FpgaImage.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -54080,48 +38089,18 @@ public struct DescribeFpgaImagesOutput: Swift.Equatable { } } -struct DescribeFpgaImagesOutputBody: Swift.Equatable { - let fpgaImages: [EC2ClientTypes.FpgaImage]? - let nextToken: Swift.String? -} +enum DescribeFpgaImagesOutputError { -extension DescribeFpgaImagesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fpgaImages = "fpgaImageSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.fpgaImages) { - struct KeyVal0{struct item{}} - let fpgaImagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fpgaImages) - if let fpgaImagesWrappedContainer = fpgaImagesWrappedContainer { - let fpgaImagesContainer = try fpgaImagesWrappedContainer.decodeIfPresent([EC2ClientTypes.FpgaImage].self, forKey: .member) - var fpgaImagesBuffer:[EC2ClientTypes.FpgaImage]? = nil - if let fpgaImagesContainer = fpgaImagesContainer { - fpgaImagesBuffer = [EC2ClientTypes.FpgaImage]() - for structureContainer0 in fpgaImagesContainer { - fpgaImagesBuffer?.append(structureContainer0) - } - } - fpgaImages = fpgaImagesBuffer - } else { - fpgaImages = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - fpgaImages = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeFpgaImagesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -54204,69 +38183,16 @@ public struct DescribeHostReservationOfferingsInput: Swift.Equatable { } } -struct DescribeHostReservationOfferingsInputBody: Swift.Equatable { - let filter: [EC2ClientTypes.Filter]? - let maxDuration: Swift.Int? - let maxResults: Swift.Int? - let minDuration: Swift.Int? - let nextToken: Swift.String? - let offeringId: Swift.String? -} - -extension DescribeHostReservationOfferingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "Filter" - case maxDuration = "MaxDuration" - case maxResults = "MaxResults" - case minDuration = "MinDuration" - case nextToken = "NextToken" - case offeringId = "OfferingId" - } +extension DescribeHostReservationOfferingsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filter) { - struct KeyVal0{struct Filter{}} - let filterWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filter) - if let filterWrappedContainer = filterWrappedContainer { - let filterContainer = try filterWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filterBuffer:[EC2ClientTypes.Filter]? = nil - if let filterContainer = filterContainer { - filterBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filterContainer { - filterBuffer?.append(structureContainer0) - } - } - filter = filterBuffer - } else { - filter = [] - } - } else { - filter = nil - } - let maxDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxDuration) - maxDuration = maxDurationDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let minDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minDuration) - minDuration = minDurationDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let offeringIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringId) - offeringId = offeringIdDecoded - } -} - -extension DescribeHostReservationOfferingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeHostReservationOfferingsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.offeringSet = output.offeringSet - } else { - self.nextToken = nil - self.offeringSet = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeHostReservationOfferingsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.offeringSet = try reader["offeringSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.HostOffering.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -54287,48 +38213,18 @@ public struct DescribeHostReservationOfferingsOutput: Swift.Equatable { } } -struct DescribeHostReservationOfferingsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let offeringSet: [EC2ClientTypes.HostOffering]? -} - -extension DescribeHostReservationOfferingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case offeringSet = "offeringSet" - } +enum DescribeHostReservationOfferingsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.offeringSet) { - struct KeyVal0{struct item{}} - let offeringSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .offeringSet) - if let offeringSetWrappedContainer = offeringSetWrappedContainer { - let offeringSetContainer = try offeringSetWrappedContainer.decodeIfPresent([EC2ClientTypes.HostOffering].self, forKey: .member) - var offeringSetBuffer:[EC2ClientTypes.HostOffering]? = nil - if let offeringSetContainer = offeringSetContainer { - offeringSetBuffer = [EC2ClientTypes.HostOffering]() - for structureContainer0 in offeringSetContainer { - offeringSetBuffer?.append(structureContainer0) - } - } - offeringSet = offeringSetBuffer - } else { - offeringSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - offeringSet = nil - } - } -} - -enum DescribeHostReservationOfferingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -54412,78 +38308,16 @@ public struct DescribeHostReservationsInput: Swift.Equatable { } } -struct DescribeHostReservationsInputBody: Swift.Equatable { - let filter: [EC2ClientTypes.Filter]? - let hostReservationIdSet: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeHostReservationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "Filter" - case hostReservationIdSet = "HostReservationIdSet" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filter) { - struct KeyVal0{struct Filter{}} - let filterWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filter) - if let filterWrappedContainer = filterWrappedContainer { - let filterContainer = try filterWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filterBuffer:[EC2ClientTypes.Filter]? = nil - if let filterContainer = filterContainer { - filterBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filterContainer { - filterBuffer?.append(structureContainer0) - } - } - filter = filterBuffer - } else { - filter = [] - } - } else { - filter = nil - } - if containerValues.contains(.hostReservationIdSet) { - struct KeyVal0{struct item{}} - let hostReservationIdSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostReservationIdSet) - if let hostReservationIdSetWrappedContainer = hostReservationIdSetWrappedContainer { - let hostReservationIdSetContainer = try hostReservationIdSetWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostReservationIdSetBuffer:[Swift.String]? = nil - if let hostReservationIdSetContainer = hostReservationIdSetContainer { - hostReservationIdSetBuffer = [Swift.String]() - for stringContainer0 in hostReservationIdSetContainer { - hostReservationIdSetBuffer?.append(stringContainer0) - } - } - hostReservationIdSet = hostReservationIdSetBuffer - } else { - hostReservationIdSet = [] - } - } else { - hostReservationIdSet = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeHostReservationsOutput { -extension DescribeHostReservationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeHostReservationsOutputBody = try responseDecoder.decode(responseBody: data) - self.hostReservationSet = output.hostReservationSet - self.nextToken = output.nextToken - } else { - self.hostReservationSet = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeHostReservationsOutput() + value.hostReservationSet = try reader["hostReservationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.HostReservation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -54504,48 +38338,18 @@ public struct DescribeHostReservationsOutput: Swift.Equatable { } } -struct DescribeHostReservationsOutputBody: Swift.Equatable { - let hostReservationSet: [EC2ClientTypes.HostReservation]? - let nextToken: Swift.String? -} - -extension DescribeHostReservationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostReservationSet = "hostReservationSet" - case nextToken = "nextToken" - } +enum DescribeHostReservationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.hostReservationSet) { - struct KeyVal0{struct item{}} - let hostReservationSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostReservationSet) - if let hostReservationSetWrappedContainer = hostReservationSetWrappedContainer { - let hostReservationSetContainer = try hostReservationSetWrappedContainer.decodeIfPresent([EC2ClientTypes.HostReservation].self, forKey: .member) - var hostReservationSetBuffer:[EC2ClientTypes.HostReservation]? = nil - if let hostReservationSetContainer = hostReservationSetContainer { - hostReservationSetBuffer = [EC2ClientTypes.HostReservation]() - for structureContainer0 in hostReservationSetContainer { - hostReservationSetBuffer?.append(structureContainer0) - } - } - hostReservationSet = hostReservationSetBuffer - } else { - hostReservationSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - hostReservationSet = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeHostReservationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -54633,78 +38437,16 @@ public struct DescribeHostsInput: Swift.Equatable { } } -struct DescribeHostsInputBody: Swift.Equatable { - let filter: [EC2ClientTypes.Filter]? - let hostIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeHostsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "filter" - case hostIds = "hostId" - case maxResults = "maxResults" - case nextToken = "nextToken" - } +extension DescribeHostsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filter) { - struct KeyVal0{struct Filter{}} - let filterWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filter) - if let filterWrappedContainer = filterWrappedContainer { - let filterContainer = try filterWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filterBuffer:[EC2ClientTypes.Filter]? = nil - if let filterContainer = filterContainer { - filterBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filterContainer { - filterBuffer?.append(structureContainer0) - } - } - filter = filterBuffer - } else { - filter = [] - } - } else { - filter = nil - } - if containerValues.contains(.hostIds) { - struct KeyVal0{struct item{}} - let hostIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostIds) - if let hostIdsWrappedContainer = hostIdsWrappedContainer { - let hostIdsContainer = try hostIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostIdsBuffer:[Swift.String]? = nil - if let hostIdsContainer = hostIdsContainer { - hostIdsBuffer = [Swift.String]() - for stringContainer0 in hostIdsContainer { - hostIdsBuffer?.append(stringContainer0) - } - } - hostIds = hostIdsBuffer - } else { - hostIds = [] - } - } else { - hostIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeHostsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeHostsOutputBody = try responseDecoder.decode(responseBody: data) - self.hosts = output.hosts - self.nextToken = output.nextToken - } else { - self.hosts = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeHostsOutput() + value.hosts = try reader["hostSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Host.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -54725,48 +38467,18 @@ public struct DescribeHostsOutput: Swift.Equatable { } } -struct DescribeHostsOutputBody: Swift.Equatable { - let hosts: [EC2ClientTypes.Host]? - let nextToken: Swift.String? -} - -extension DescribeHostsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hosts = "hostSet" - case nextToken = "nextToken" - } +enum DescribeHostsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.hosts) { - struct KeyVal0{struct item{}} - let hostsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hosts) - if let hostsWrappedContainer = hostsWrappedContainer { - let hostsContainer = try hostsWrappedContainer.decodeIfPresent([EC2ClientTypes.Host].self, forKey: .member) - var hostsBuffer:[EC2ClientTypes.Host]? = nil - if let hostsContainer = hostsContainer { - hostsBuffer = [EC2ClientTypes.Host]() - for structureContainer0 in hostsContainer { - hostsBuffer?.append(structureContainer0) - } - } - hosts = hostsBuffer - } else { - hosts = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - hosts = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeHostsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -54844,78 +38556,16 @@ public struct DescribeIamInstanceProfileAssociationsInput: Swift.Equatable { } } -struct DescribeIamInstanceProfileAssociationsInputBody: Swift.Equatable { - let associationIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeIamInstanceProfileAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationIds = "AssociationId" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeIamInstanceProfileAssociationsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.associationIds) { - struct KeyVal0{struct AssociationId{}} - let associationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associationIds) - if let associationIdsWrappedContainer = associationIdsWrappedContainer { - let associationIdsContainer = try associationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var associationIdsBuffer:[Swift.String]? = nil - if let associationIdsContainer = associationIdsContainer { - associationIdsBuffer = [Swift.String]() - for stringContainer0 in associationIdsContainer { - associationIdsBuffer?.append(stringContainer0) - } - } - associationIds = associationIdsBuffer - } else { - associationIds = [] - } - } else { - associationIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeIamInstanceProfileAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIamInstanceProfileAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.iamInstanceProfileAssociations = output.iamInstanceProfileAssociations - self.nextToken = output.nextToken - } else { - self.iamInstanceProfileAssociations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIamInstanceProfileAssociationsOutput() + value.iamInstanceProfileAssociations = try reader["iamInstanceProfileAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IamInstanceProfileAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -54936,48 +38586,18 @@ public struct DescribeIamInstanceProfileAssociationsOutput: Swift.Equatable { } } -struct DescribeIamInstanceProfileAssociationsOutputBody: Swift.Equatable { - let iamInstanceProfileAssociations: [EC2ClientTypes.IamInstanceProfileAssociation]? - let nextToken: Swift.String? -} - -extension DescribeIamInstanceProfileAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamInstanceProfileAssociations = "iamInstanceProfileAssociationSet" - case nextToken = "nextToken" - } +enum DescribeIamInstanceProfileAssociationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.iamInstanceProfileAssociations) { - struct KeyVal0{struct item{}} - let iamInstanceProfileAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .iamInstanceProfileAssociations) - if let iamInstanceProfileAssociationsWrappedContainer = iamInstanceProfileAssociationsWrappedContainer { - let iamInstanceProfileAssociationsContainer = try iamInstanceProfileAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.IamInstanceProfileAssociation].self, forKey: .member) - var iamInstanceProfileAssociationsBuffer:[EC2ClientTypes.IamInstanceProfileAssociation]? = nil - if let iamInstanceProfileAssociationsContainer = iamInstanceProfileAssociationsContainer { - iamInstanceProfileAssociationsBuffer = [EC2ClientTypes.IamInstanceProfileAssociation]() - for structureContainer0 in iamInstanceProfileAssociationsContainer { - iamInstanceProfileAssociationsBuffer?.append(structureContainer0) - } - } - iamInstanceProfileAssociations = iamInstanceProfileAssociationsBuffer - } else { - iamInstanceProfileAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - iamInstanceProfileAssociations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeIamInstanceProfileAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -55012,30 +38632,15 @@ public struct DescribeIdFormatInput: Swift.Equatable { } } -struct DescribeIdFormatInputBody: Swift.Equatable { - let resource: Swift.String? -} - -extension DescribeIdFormatInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resource = "Resource" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resource) - resource = resourceDecoded - } -} +extension DescribeIdFormatOutput { -extension DescribeIdFormatOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIdFormatOutputBody = try responseDecoder.decode(responseBody: data) - self.statuses = output.statuses - } else { - self.statuses = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIdFormatOutput() + value.statuses = try reader["statusSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IdFormat.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -55052,44 +38657,18 @@ public struct DescribeIdFormatOutput: Swift.Equatable { } } -struct DescribeIdFormatOutputBody: Swift.Equatable { - let statuses: [EC2ClientTypes.IdFormat]? -} - -extension DescribeIdFormatOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case statuses = "statusSet" - } +enum DescribeIdFormatOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.statuses) { - struct KeyVal0{struct item{}} - let statusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statuses) - if let statusesWrappedContainer = statusesWrappedContainer { - let statusesContainer = try statusesWrappedContainer.decodeIfPresent([EC2ClientTypes.IdFormat].self, forKey: .member) - var statusesBuffer:[EC2ClientTypes.IdFormat]? = nil - if let statusesContainer = statusesContainer { - statusesBuffer = [EC2ClientTypes.IdFormat]() - for structureContainer0 in statusesContainer { - statusesBuffer?.append(structureContainer0) - } - } - statuses = statusesBuffer - } else { - statuses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - statuses = nil - } - } -} - -enum DescribeIdFormatOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -55132,34 +38711,15 @@ public struct DescribeIdentityIdFormatInput: Swift.Equatable { } } -struct DescribeIdentityIdFormatInputBody: Swift.Equatable { - let principalArn: Swift.String? - let resource: Swift.String? -} - -extension DescribeIdentityIdFormatInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case principalArn = "principalArn" - case resource = "resource" - } +extension DescribeIdentityIdFormatOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let principalArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .principalArn) - principalArn = principalArnDecoded - let resourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resource) - resource = resourceDecoded - } -} - -extension DescribeIdentityIdFormatOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIdentityIdFormatOutputBody = try responseDecoder.decode(responseBody: data) - self.statuses = output.statuses - } else { - self.statuses = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIdentityIdFormatOutput() + value.statuses = try reader["statusSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IdFormat.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -55176,44 +38736,18 @@ public struct DescribeIdentityIdFormatOutput: Swift.Equatable { } } -struct DescribeIdentityIdFormatOutputBody: Swift.Equatable { - let statuses: [EC2ClientTypes.IdFormat]? -} - -extension DescribeIdentityIdFormatOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case statuses = "statusSet" - } +enum DescribeIdentityIdFormatOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.statuses) { - struct KeyVal0{struct item{}} - let statusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statuses) - if let statusesWrappedContainer = statusesWrappedContainer { - let statusesContainer = try statusesWrappedContainer.decodeIfPresent([EC2ClientTypes.IdFormat].self, forKey: .member) - var statusesBuffer:[EC2ClientTypes.IdFormat]? = nil - if let statusesContainer = statusesContainer { - statusesBuffer = [EC2ClientTypes.IdFormat]() - for structureContainer0 in statusesContainer { - statusesBuffer?.append(structureContainer0) - } - } - statuses = statusesBuffer - } else { - statuses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - statuses = nil - } - } -} - -enum DescribeIdentityIdFormatOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -55265,62 +38799,27 @@ public struct DescribeImageAttributeInput: Swift.Equatable { } } -struct DescribeImageAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.ImageAttributeName? - let imageId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeImageAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case dryRun = "dryRun" - case imageId = "ImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImageAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeImageAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeImageAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.blockDeviceMappings = output.blockDeviceMappings - self.bootMode = output.bootMode - self.description = output.description - self.imageId = output.imageId - self.imdsSupport = output.imdsSupport - self.kernelId = output.kernelId - self.lastLaunchedTime = output.lastLaunchedTime - self.launchPermissions = output.launchPermissions - self.productCodes = output.productCodes - self.ramdiskId = output.ramdiskId - self.sriovNetSupport = output.sriovNetSupport - self.tpmSupport = output.tpmSupport - self.uefiData = output.uefiData - } else { - self.blockDeviceMappings = nil - self.bootMode = nil - self.description = nil - self.imageId = nil - self.imdsSupport = nil - self.kernelId = nil - self.lastLaunchedTime = nil - self.launchPermissions = nil - self.productCodes = nil - self.ramdiskId = nil - self.sriovNetSupport = nil - self.tpmSupport = nil - self.uefiData = nil +extension DescribeImageAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeImageAttributeOutput() + value.blockDeviceMappings = try reader["blockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.BlockDeviceMapping.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.bootMode = try reader["bootMode"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.description = try reader["description"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.imageId = try reader["imageId"].readIfPresent() + value.imdsSupport = try reader["imdsSupport"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.kernelId = try reader["kernel"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.lastLaunchedTime = try reader["lastLaunchedTime"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.launchPermissions = try reader["launchPermission"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.productCodes = try reader["productCodes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ProductCode.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ramdiskId = try reader["ramdisk"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.sriovNetSupport = try reader["sriovNetSupport"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.tpmSupport = try reader["tpmSupport"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.uefiData = try reader["uefiData"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + return value } } } @@ -55386,126 +38885,18 @@ public struct DescribeImageAttributeOutput: Swift.Equatable { } } -struct DescribeImageAttributeOutputBody: Swift.Equatable { - let blockDeviceMappings: [EC2ClientTypes.BlockDeviceMapping]? - let imageId: Swift.String? - let launchPermissions: [EC2ClientTypes.LaunchPermission]? - let productCodes: [EC2ClientTypes.ProductCode]? - let description: EC2ClientTypes.AttributeValue? - let kernelId: EC2ClientTypes.AttributeValue? - let ramdiskId: EC2ClientTypes.AttributeValue? - let sriovNetSupport: EC2ClientTypes.AttributeValue? - let bootMode: EC2ClientTypes.AttributeValue? - let tpmSupport: EC2ClientTypes.AttributeValue? - let uefiData: EC2ClientTypes.AttributeValue? - let lastLaunchedTime: EC2ClientTypes.AttributeValue? - let imdsSupport: EC2ClientTypes.AttributeValue? -} - -extension DescribeImageAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDeviceMappings = "blockDeviceMapping" - case bootMode = "bootMode" - case description = "description" - case imageId = "imageId" - case imdsSupport = "imdsSupport" - case kernelId = "kernel" - case lastLaunchedTime = "lastLaunchedTime" - case launchPermissions = "launchPermission" - case productCodes = "productCodes" - case ramdiskId = "ramdisk" - case sriovNetSupport = "sriovNetSupport" - case tpmSupport = "tpmSupport" - case uefiData = "uefiData" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - if containerValues.contains(.launchPermissions) { - struct KeyVal0{struct item{}} - let launchPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchPermissions) - if let launchPermissionsWrappedContainer = launchPermissionsWrappedContainer { - let launchPermissionsContainer = try launchPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchPermission].self, forKey: .member) - var launchPermissionsBuffer:[EC2ClientTypes.LaunchPermission]? = nil - if let launchPermissionsContainer = launchPermissionsContainer { - launchPermissionsBuffer = [EC2ClientTypes.LaunchPermission]() - for structureContainer0 in launchPermissionsContainer { - launchPermissionsBuffer?.append(structureContainer0) - } - } - launchPermissions = launchPermissionsBuffer - } else { - launchPermissions = [] - } - } else { - launchPermissions = nil - } - if containerValues.contains(.productCodes) { - struct KeyVal0{struct item{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ProductCode].self, forKey: .member) - var productCodesBuffer:[EC2ClientTypes.ProductCode]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [EC2ClientTypes.ProductCode]() - for structureContainer0 in productCodesContainer { - productCodesBuffer?.append(structureContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil - } - let descriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .description) - description = descriptionDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - let sriovNetSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .sriovNetSupport) - sriovNetSupport = sriovNetSupportDecoded - let bootModeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .bootMode) - bootMode = bootModeDecoded - let tpmSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .tpmSupport) - tpmSupport = tpmSupportDecoded - let uefiDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .uefiData) - uefiData = uefiDataDecoded - let lastLaunchedTimeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .lastLaunchedTime) - lastLaunchedTime = lastLaunchedTimeDecoded - let imdsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .imdsSupport) - imdsSupport = imdsSupportDecoded - } -} - -enum DescribeImageAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DescribeImageAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -55704,132 +39095,16 @@ public struct DescribeImagesInput: Swift.Equatable { } } -struct DescribeImagesInputBody: Swift.Equatable { - let executableUsers: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let imageIds: [Swift.String]? - let owners: [Swift.String]? - let includeDeprecated: Swift.Bool? - let includeDisabled: Swift.Bool? - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeImagesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case executableUsers = "ExecutableBy" - case filters = "Filter" - case imageIds = "ImageId" - case includeDeprecated = "IncludeDeprecated" - case includeDisabled = "IncludeDisabled" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case owners = "Owner" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.executableUsers) { - struct KeyVal0{struct ExecutableBy{}} - let executableUsersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .executableUsers) - if let executableUsersWrappedContainer = executableUsersWrappedContainer { - let executableUsersContainer = try executableUsersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var executableUsersBuffer:[Swift.String]? = nil - if let executableUsersContainer = executableUsersContainer { - executableUsersBuffer = [Swift.String]() - for stringContainer0 in executableUsersContainer { - executableUsersBuffer?.append(stringContainer0) - } - } - executableUsers = executableUsersBuffer - } else { - executableUsers = [] - } - } else { - executableUsers = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.imageIds) { - struct KeyVal0{struct ImageId{}} - let imageIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .imageIds) - if let imageIdsWrappedContainer = imageIdsWrappedContainer { - let imageIdsContainer = try imageIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var imageIdsBuffer:[Swift.String]? = nil - if let imageIdsContainer = imageIdsContainer { - imageIdsBuffer = [Swift.String]() - for stringContainer0 in imageIdsContainer { - imageIdsBuffer?.append(stringContainer0) - } - } - imageIds = imageIdsBuffer - } else { - imageIds = [] - } - } else { - imageIds = nil - } - if containerValues.contains(.owners) { - struct KeyVal0{struct Owner{}} - let ownersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .owners) - if let ownersWrappedContainer = ownersWrappedContainer { - let ownersContainer = try ownersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ownersBuffer:[Swift.String]? = nil - if let ownersContainer = ownersContainer { - ownersBuffer = [Swift.String]() - for stringContainer0 in ownersContainer { - ownersBuffer?.append(stringContainer0) - } - } - owners = ownersBuffer - } else { - owners = [] - } - } else { - owners = nil - } - let includeDeprecatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeDeprecated) - includeDeprecated = includeDeprecatedDecoded - let includeDisabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeDisabled) - includeDisabled = includeDisabledDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeImagesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeImagesOutputBody = try responseDecoder.decode(responseBody: data) - self.images = output.images - self.nextToken = output.nextToken - } else { - self.images = nil - self.nextToken = nil +extension DescribeImagesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeImagesOutput() + value.images = try reader["imagesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Image.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -55850,48 +39125,18 @@ public struct DescribeImagesOutput: Swift.Equatable { } } -struct DescribeImagesOutputBody: Swift.Equatable { - let images: [EC2ClientTypes.Image]? - let nextToken: Swift.String? -} +enum DescribeImagesOutputError { -extension DescribeImagesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case images = "imagesSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.images) { - struct KeyVal0{struct item{}} - let imagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .images) - if let imagesWrappedContainer = imagesWrappedContainer { - let imagesContainer = try imagesWrappedContainer.decodeIfPresent([EC2ClientTypes.Image].self, forKey: .member) - var imagesBuffer:[EC2ClientTypes.Image]? = nil - if let imagesContainer = imagesContainer { - imagesBuffer = [EC2ClientTypes.Image]() - for structureContainer0 in imagesContainer { - imagesBuffer?.append(structureContainer0) - } - } - images = imagesBuffer - } else { - images = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - images = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeImagesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -55972,82 +39217,16 @@ public struct DescribeImportImageTasksInput: Swift.Equatable { } } -struct DescribeImportImageTasksInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let importTaskIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeImportImageTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filters" - case importTaskIds = "ImportTaskId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.importTaskIds) { - struct KeyVal0{struct ImportTaskId{}} - let importTaskIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importTaskIds) - if let importTaskIdsWrappedContainer = importTaskIdsWrappedContainer { - let importTaskIdsContainer = try importTaskIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importTaskIdsBuffer:[Swift.String]? = nil - if let importTaskIdsContainer = importTaskIdsContainer { - importTaskIdsBuffer = [Swift.String]() - for stringContainer0 in importTaskIdsContainer { - importTaskIdsBuffer?.append(stringContainer0) - } - } - importTaskIds = importTaskIdsBuffer - } else { - importTaskIds = [] - } - } else { - importTaskIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeImportImageTasksOutput { -extension DescribeImportImageTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeImportImageTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.importImageTasks = output.importImageTasks - self.nextToken = output.nextToken - } else { - self.importImageTasks = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeImportImageTasksOutput() + value.importImageTasks = try reader["importImageTaskSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ImportImageTask.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -56068,48 +39247,18 @@ public struct DescribeImportImageTasksOutput: Swift.Equatable { } } -struct DescribeImportImageTasksOutputBody: Swift.Equatable { - let importImageTasks: [EC2ClientTypes.ImportImageTask]? - let nextToken: Swift.String? -} +enum DescribeImportImageTasksOutputError { -extension DescribeImportImageTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case importImageTasks = "importImageTaskSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.importImageTasks) { - struct KeyVal0{struct item{}} - let importImageTasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importImageTasks) - if let importImageTasksWrappedContainer = importImageTasksWrappedContainer { - let importImageTasksContainer = try importImageTasksWrappedContainer.decodeIfPresent([EC2ClientTypes.ImportImageTask].self, forKey: .member) - var importImageTasksBuffer:[EC2ClientTypes.ImportImageTask]? = nil - if let importImageTasksContainer = importImageTasksContainer { - importImageTasksBuffer = [EC2ClientTypes.ImportImageTask]() - for structureContainer0 in importImageTasksContainer { - importImageTasksBuffer?.append(structureContainer0) - } - } - importImageTasks = importImageTasksBuffer - } else { - importImageTasks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - importImageTasks = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeImportImageTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -56190,82 +39339,16 @@ public struct DescribeImportSnapshotTasksInput: Swift.Equatable { } } -struct DescribeImportSnapshotTasksInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let importTaskIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeImportSnapshotTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filters" - case importTaskIds = "ImportTaskId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.importTaskIds) { - struct KeyVal0{struct ImportTaskId{}} - let importTaskIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importTaskIds) - if let importTaskIdsWrappedContainer = importTaskIdsWrappedContainer { - let importTaskIdsContainer = try importTaskIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importTaskIdsBuffer:[Swift.String]? = nil - if let importTaskIdsContainer = importTaskIdsContainer { - importTaskIdsBuffer = [Swift.String]() - for stringContainer0 in importTaskIdsContainer { - importTaskIdsBuffer?.append(stringContainer0) - } - } - importTaskIds = importTaskIdsBuffer - } else { - importTaskIds = [] - } - } else { - importTaskIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeImportSnapshotTasksOutput { -extension DescribeImportSnapshotTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeImportSnapshotTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.importSnapshotTasks = output.importSnapshotTasks - self.nextToken = output.nextToken - } else { - self.importSnapshotTasks = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeImportSnapshotTasksOutput() + value.importSnapshotTasks = try reader["importSnapshotTaskSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ImportSnapshotTask.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -56286,48 +39369,18 @@ public struct DescribeImportSnapshotTasksOutput: Swift.Equatable { } } -struct DescribeImportSnapshotTasksOutputBody: Swift.Equatable { - let importSnapshotTasks: [EC2ClientTypes.ImportSnapshotTask]? - let nextToken: Swift.String? -} +enum DescribeImportSnapshotTasksOutputError { -extension DescribeImportSnapshotTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case importSnapshotTasks = "importSnapshotTaskSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.importSnapshotTasks) { - struct KeyVal0{struct item{}} - let importSnapshotTasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importSnapshotTasks) - if let importSnapshotTasksWrappedContainer = importSnapshotTasksWrappedContainer { - let importSnapshotTasksContainer = try importSnapshotTasksWrappedContainer.decodeIfPresent([EC2ClientTypes.ImportSnapshotTask].self, forKey: .member) - var importSnapshotTasksBuffer:[EC2ClientTypes.ImportSnapshotTask]? = nil - if let importSnapshotTasksContainer = importSnapshotTasksContainer { - importSnapshotTasksBuffer = [EC2ClientTypes.ImportSnapshotTask]() - for structureContainer0 in importSnapshotTasksContainer { - importSnapshotTasksBuffer?.append(structureContainer0) - } - } - importSnapshotTasks = importSnapshotTasksBuffer - } else { - importSnapshotTasks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - importSnapshotTasks = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeImportSnapshotTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -56378,70 +39431,31 @@ public struct DescribeInstanceAttributeInput: Swift.Equatable { } } -struct DescribeInstanceAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.InstanceAttributeName? - let dryRun: Swift.Bool? - let instanceId: Swift.String? -} - -extension DescribeInstanceAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "attribute" - case dryRun = "dryRun" - case instanceId = "instanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - } -} - -extension DescribeInstanceAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.blockDeviceMappings = output.blockDeviceMappings - self.disableApiStop = output.disableApiStop - self.disableApiTermination = output.disableApiTermination - self.ebsOptimized = output.ebsOptimized - self.enaSupport = output.enaSupport - self.enclaveOptions = output.enclaveOptions - self.groups = output.groups - self.instanceId = output.instanceId - self.instanceInitiatedShutdownBehavior = output.instanceInitiatedShutdownBehavior - self.instanceType = output.instanceType - self.kernelId = output.kernelId - self.productCodes = output.productCodes - self.ramdiskId = output.ramdiskId - self.rootDeviceName = output.rootDeviceName - self.sourceDestCheck = output.sourceDestCheck - self.sriovNetSupport = output.sriovNetSupport - self.userData = output.userData - } else { - self.blockDeviceMappings = nil - self.disableApiStop = nil - self.disableApiTermination = nil - self.ebsOptimized = nil - self.enaSupport = nil - self.enclaveOptions = nil - self.groups = nil - self.instanceId = nil - self.instanceInitiatedShutdownBehavior = nil - self.instanceType = nil - self.kernelId = nil - self.productCodes = nil - self.ramdiskId = nil - self.rootDeviceName = nil - self.sourceDestCheck = nil - self.sriovNetSupport = nil - self.userData = nil +extension DescribeInstanceAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceAttributeOutput() + value.blockDeviceMappings = try reader["blockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceBlockDeviceMapping.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.disableApiStop = try reader["disableApiStop"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.disableApiTermination = try reader["disableApiTermination"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.ebsOptimized = try reader["ebsOptimized"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.enaSupport = try reader["enaSupport"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.enclaveOptions = try reader["enclaveOptions"].readIfPresent(readingClosure: EC2ClientTypes.EnclaveOptions.readingClosure) + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceInitiatedShutdownBehavior = try reader["instanceInitiatedShutdownBehavior"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.instanceType = try reader["instanceType"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.kernelId = try reader["kernel"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.productCodes = try reader["productCodes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ProductCode.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ramdiskId = try reader["ramdisk"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.rootDeviceName = try reader["rootDeviceName"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.sourceDestCheck = try reader["sourceDestCheck"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.sriovNetSupport = try reader["sriovNetSupport"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.userData = try reader["userData"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + return value } } } @@ -56523,142 +39537,18 @@ public struct DescribeInstanceAttributeOutput: Swift.Equatable { } } -struct DescribeInstanceAttributeOutputBody: Swift.Equatable { - let groups: [EC2ClientTypes.GroupIdentifier]? - let blockDeviceMappings: [EC2ClientTypes.InstanceBlockDeviceMapping]? - let disableApiTermination: EC2ClientTypes.AttributeBooleanValue? - let enaSupport: EC2ClientTypes.AttributeBooleanValue? - let enclaveOptions: EC2ClientTypes.EnclaveOptions? - let ebsOptimized: EC2ClientTypes.AttributeBooleanValue? - let instanceId: Swift.String? - let instanceInitiatedShutdownBehavior: EC2ClientTypes.AttributeValue? - let instanceType: EC2ClientTypes.AttributeValue? - let kernelId: EC2ClientTypes.AttributeValue? - let productCodes: [EC2ClientTypes.ProductCode]? - let ramdiskId: EC2ClientTypes.AttributeValue? - let rootDeviceName: EC2ClientTypes.AttributeValue? - let sourceDestCheck: EC2ClientTypes.AttributeBooleanValue? - let sriovNetSupport: EC2ClientTypes.AttributeValue? - let userData: EC2ClientTypes.AttributeValue? - let disableApiStop: EC2ClientTypes.AttributeBooleanValue? -} - -extension DescribeInstanceAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDeviceMappings = "blockDeviceMapping" - case disableApiStop = "disableApiStop" - case disableApiTermination = "disableApiTermination" - case ebsOptimized = "ebsOptimized" - case enaSupport = "enaSupport" - case enclaveOptions = "enclaveOptions" - case groups = "groupSet" - case instanceId = "instanceId" - case instanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior" - case instanceType = "instanceType" - case kernelId = "kernel" - case productCodes = "productCodes" - case ramdiskId = "ramdisk" - case rootDeviceName = "rootDeviceName" - case sourceDestCheck = "sourceDestCheck" - case sriovNetSupport = "sriovNetSupport" - case userData = "userData" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.groups) { - struct KeyVal0{struct item{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var groupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceBlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.InstanceBlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.InstanceBlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let disableApiTerminationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .disableApiTermination) - disableApiTermination = disableApiTerminationDecoded - let enaSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enaSupport) - enaSupport = enaSupportDecoded - let enclaveOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnclaveOptions.self, forKey: .enclaveOptions) - enclaveOptions = enclaveOptionsDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceInitiatedShutdownBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .instanceInitiatedShutdownBehavior) - instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehaviorDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .kernelId) - kernelId = kernelIdDecoded - if containerValues.contains(.productCodes) { - struct KeyVal0{struct item{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ProductCode].self, forKey: .member) - var productCodesBuffer:[EC2ClientTypes.ProductCode]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [EC2ClientTypes.ProductCode]() - for structureContainer0 in productCodesContainer { - productCodesBuffer?.append(structureContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil - } - let ramdiskIdDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - let rootDeviceNameDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .rootDeviceName) - rootDeviceName = rootDeviceNameDecoded - let sourceDestCheckDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .sourceDestCheck) - sourceDestCheck = sourceDestCheckDecoded - let sriovNetSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .sriovNetSupport) - sriovNetSupport = sriovNetSupportDecoded - let userDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .userData) - userData = userDataDecoded - let disableApiStopDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .disableApiStop) - disableApiStop = disableApiStopDecoded - } -} - -enum DescribeInstanceAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DescribeInstanceAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -56753,82 +39643,16 @@ public struct DescribeInstanceConnectEndpointsInput: Swift.Equatable { } } -struct DescribeInstanceConnectEndpointsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let instanceConnectEndpointIds: [Swift.String]? -} +extension DescribeInstanceConnectEndpointsOutput { -extension DescribeInstanceConnectEndpointsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case instanceConnectEndpointIds = "InstanceConnectEndpointId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.instanceConnectEndpointIds) { - struct KeyVal0{struct item{}} - let instanceConnectEndpointIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceConnectEndpointIds) - if let instanceConnectEndpointIdsWrappedContainer = instanceConnectEndpointIdsWrappedContainer { - let instanceConnectEndpointIdsContainer = try instanceConnectEndpointIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceConnectEndpointIdsBuffer:[Swift.String]? = nil - if let instanceConnectEndpointIdsContainer = instanceConnectEndpointIdsContainer { - instanceConnectEndpointIdsBuffer = [Swift.String]() - for stringContainer0 in instanceConnectEndpointIdsContainer { - instanceConnectEndpointIdsBuffer?.append(stringContainer0) - } - } - instanceConnectEndpointIds = instanceConnectEndpointIdsBuffer - } else { - instanceConnectEndpointIds = [] - } - } else { - instanceConnectEndpointIds = nil - } - } -} - -extension DescribeInstanceConnectEndpointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceConnectEndpointsOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceConnectEndpoints = output.instanceConnectEndpoints - self.nextToken = output.nextToken - } else { - self.instanceConnectEndpoints = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceConnectEndpointsOutput() + value.instanceConnectEndpoints = try reader["instanceConnectEndpointSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ec2InstanceConnectEndpoint.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -56849,48 +39673,18 @@ public struct DescribeInstanceConnectEndpointsOutput: Swift.Equatable { } } -struct DescribeInstanceConnectEndpointsOutputBody: Swift.Equatable { - let instanceConnectEndpoints: [EC2ClientTypes.Ec2InstanceConnectEndpoint]? - let nextToken: Swift.String? -} - -extension DescribeInstanceConnectEndpointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceConnectEndpoints = "instanceConnectEndpointSet" - case nextToken = "nextToken" - } +enum DescribeInstanceConnectEndpointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceConnectEndpoints) { - struct KeyVal0{struct item{}} - let instanceConnectEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceConnectEndpoints) - if let instanceConnectEndpointsWrappedContainer = instanceConnectEndpointsWrappedContainer { - let instanceConnectEndpointsContainer = try instanceConnectEndpointsWrappedContainer.decodeIfPresent([EC2ClientTypes.Ec2InstanceConnectEndpoint].self, forKey: .member) - var instanceConnectEndpointsBuffer:[EC2ClientTypes.Ec2InstanceConnectEndpoint]? = nil - if let instanceConnectEndpointsContainer = instanceConnectEndpointsContainer { - instanceConnectEndpointsBuffer = [EC2ClientTypes.Ec2InstanceConnectEndpoint]() - for structureContainer0 in instanceConnectEndpointsContainer { - instanceConnectEndpointsBuffer?.append(structureContainer0) - } - } - instanceConnectEndpoints = instanceConnectEndpointsBuffer - } else { - instanceConnectEndpoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceConnectEndpoints = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInstanceConnectEndpointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -56973,82 +39767,16 @@ public struct DescribeInstanceCreditSpecificationsInput: Swift.Equatable { } } -struct DescribeInstanceCreditSpecificationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let instanceIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} +extension DescribeInstanceCreditSpecificationsOutput { -extension DescribeInstanceCreditSpecificationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case instanceIds = "InstanceId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeInstanceCreditSpecificationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceCreditSpecificationsOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceCreditSpecifications = output.instanceCreditSpecifications - self.nextToken = output.nextToken - } else { - self.instanceCreditSpecifications = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceCreditSpecificationsOutput() + value.instanceCreditSpecifications = try reader["instanceCreditSpecificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceCreditSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -57069,48 +39797,18 @@ public struct DescribeInstanceCreditSpecificationsOutput: Swift.Equatable { } } -struct DescribeInstanceCreditSpecificationsOutputBody: Swift.Equatable { - let instanceCreditSpecifications: [EC2ClientTypes.InstanceCreditSpecification]? - let nextToken: Swift.String? -} +enum DescribeInstanceCreditSpecificationsOutputError { -extension DescribeInstanceCreditSpecificationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceCreditSpecifications = "instanceCreditSpecificationSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceCreditSpecifications) { - struct KeyVal0{struct item{}} - let instanceCreditSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceCreditSpecifications) - if let instanceCreditSpecificationsWrappedContainer = instanceCreditSpecificationsWrappedContainer { - let instanceCreditSpecificationsContainer = try instanceCreditSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceCreditSpecification].self, forKey: .member) - var instanceCreditSpecificationsBuffer:[EC2ClientTypes.InstanceCreditSpecification]? = nil - if let instanceCreditSpecificationsContainer = instanceCreditSpecificationsContainer { - instanceCreditSpecificationsBuffer = [EC2ClientTypes.InstanceCreditSpecification]() - for structureContainer0 in instanceCreditSpecificationsContainer { - instanceCreditSpecificationsBuffer?.append(structureContainer0) - } - } - instanceCreditSpecifications = instanceCreditSpecificationsBuffer - } else { - instanceCreditSpecifications = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceCreditSpecifications = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInstanceCreditSpecificationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -57145,30 +39843,15 @@ public struct DescribeInstanceEventNotificationAttributesInput: Swift.Equatable } } -struct DescribeInstanceEventNotificationAttributesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} +extension DescribeInstanceEventNotificationAttributesOutput { -extension DescribeInstanceEventNotificationAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeInstanceEventNotificationAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceEventNotificationAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceTagAttribute = output.instanceTagAttribute - } else { - self.instanceTagAttribute = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceEventNotificationAttributesOutput() + value.instanceTagAttribute = try reader["instanceTagAttribute"].readIfPresent(readingClosure: EC2ClientTypes.InstanceTagNotificationAttribute.readingClosure) + return value } } } @@ -57185,27 +39868,18 @@ public struct DescribeInstanceEventNotificationAttributesOutput: Swift.Equatable } } -struct DescribeInstanceEventNotificationAttributesOutputBody: Swift.Equatable { - let instanceTagAttribute: EC2ClientTypes.InstanceTagNotificationAttribute? -} - -extension DescribeInstanceEventNotificationAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceTagAttribute = "instanceTagAttribute" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTagAttributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceTagNotificationAttribute.self, forKey: .instanceTagAttribute) - instanceTagAttribute = instanceTagAttributeDecoded - } -} +enum DescribeInstanceEventNotificationAttributesOutputError { -enum DescribeInstanceEventNotificationAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -57305,82 +39979,16 @@ public struct DescribeInstanceEventWindowsInput: Swift.Equatable { } } -struct DescribeInstanceEventWindowsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceEventWindowIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} +extension DescribeInstanceEventWindowsOutput { -extension DescribeInstanceEventWindowsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case instanceEventWindowIds = "InstanceEventWindowId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.instanceEventWindowIds) { - struct KeyVal0{struct InstanceEventWindowId{}} - let instanceEventWindowIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceEventWindowIds) - if let instanceEventWindowIdsWrappedContainer = instanceEventWindowIdsWrappedContainer { - let instanceEventWindowIdsContainer = try instanceEventWindowIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceEventWindowIdsBuffer:[Swift.String]? = nil - if let instanceEventWindowIdsContainer = instanceEventWindowIdsContainer { - instanceEventWindowIdsBuffer = [Swift.String]() - for stringContainer0 in instanceEventWindowIdsContainer { - instanceEventWindowIdsBuffer?.append(stringContainer0) - } - } - instanceEventWindowIds = instanceEventWindowIdsBuffer - } else { - instanceEventWindowIds = [] - } - } else { - instanceEventWindowIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeInstanceEventWindowsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceEventWindowsOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceEventWindows = output.instanceEventWindows - self.nextToken = output.nextToken - } else { - self.instanceEventWindows = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceEventWindowsOutput() + value.instanceEventWindows = try reader["instanceEventWindowSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceEventWindow.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -57401,48 +40009,18 @@ public struct DescribeInstanceEventWindowsOutput: Swift.Equatable { } } -struct DescribeInstanceEventWindowsOutputBody: Swift.Equatable { - let instanceEventWindows: [EC2ClientTypes.InstanceEventWindow]? - let nextToken: Swift.String? -} - -extension DescribeInstanceEventWindowsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceEventWindows = "instanceEventWindowSet" - case nextToken = "nextToken" - } +enum DescribeInstanceEventWindowsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceEventWindows) { - struct KeyVal0{struct item{}} - let instanceEventWindowsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceEventWindows) - if let instanceEventWindowsWrappedContainer = instanceEventWindowsWrappedContainer { - let instanceEventWindowsContainer = try instanceEventWindowsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceEventWindow].self, forKey: .member) - var instanceEventWindowsBuffer:[EC2ClientTypes.InstanceEventWindow]? = nil - if let instanceEventWindowsContainer = instanceEventWindowsContainer { - instanceEventWindowsBuffer = [EC2ClientTypes.InstanceEventWindow]() - for structureContainer0 in instanceEventWindowsContainer { - instanceEventWindowsBuffer?.append(structureContainer0) - } - } - instanceEventWindows = instanceEventWindowsBuffer - } else { - instanceEventWindows = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceEventWindows = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInstanceEventWindowsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -57556,86 +40134,16 @@ public struct DescribeInstanceStatusInput: Swift.Equatable { } } -struct DescribeInstanceStatusInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let instanceIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? - let includeAllInstances: Swift.Bool? -} - -extension DescribeInstanceStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case includeAllInstances = "includeAllInstances" - case instanceIds = "InstanceId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let includeAllInstancesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeAllInstances) - includeAllInstances = includeAllInstancesDecoded - } -} - -extension DescribeInstanceStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceStatuses = output.instanceStatuses - self.nextToken = output.nextToken - } else { - self.instanceStatuses = nil - self.nextToken = nil +extension DescribeInstanceStatusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceStatusOutput() + value.instanceStatuses = try reader["instanceStatusSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceStatus.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -57656,48 +40164,18 @@ public struct DescribeInstanceStatusOutput: Swift.Equatable { } } -struct DescribeInstanceStatusOutputBody: Swift.Equatable { - let instanceStatuses: [EC2ClientTypes.InstanceStatus]? - let nextToken: Swift.String? -} +enum DescribeInstanceStatusOutputError { -extension DescribeInstanceStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceStatuses = "instanceStatusSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceStatuses) { - struct KeyVal0{struct item{}} - let instanceStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceStatuses) - if let instanceStatusesWrappedContainer = instanceStatusesWrappedContainer { - let instanceStatusesContainer = try instanceStatusesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceStatus].self, forKey: .member) - var instanceStatusesBuffer:[EC2ClientTypes.InstanceStatus]? = nil - if let instanceStatusesContainer = instanceStatusesContainer { - instanceStatusesBuffer = [EC2ClientTypes.InstanceStatus]() - for structureContainer0 in instanceStatusesContainer { - instanceStatusesBuffer?.append(structureContainer0) - } - } - instanceStatuses = instanceStatusesBuffer - } else { - instanceStatuses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceStatuses = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInstanceStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -57800,103 +40278,16 @@ public struct DescribeInstanceTopologyInput: Swift.Equatable { } } -struct DescribeInstanceTopologyInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let instanceIds: [Swift.String]? - let groupNames: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? -} - -extension DescribeInstanceTopologyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case groupNames = "GroupName" - case instanceIds = "InstanceId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct member{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - if containerValues.contains(.groupNames) { - struct KeyVal0{struct member{}} - let groupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupNames) - if let groupNamesWrappedContainer = groupNamesWrappedContainer { - let groupNamesContainer = try groupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupNamesBuffer:[Swift.String]? = nil - if let groupNamesContainer = groupNamesContainer { - groupNamesBuffer = [Swift.String]() - for stringContainer0 in groupNamesContainer { - groupNamesBuffer?.append(stringContainer0) - } - } - groupNames = groupNamesBuffer - } else { - groupNames = [] - } - } else { - groupNames = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} - -extension DescribeInstanceTopologyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceTopologyOutputBody = try responseDecoder.decode(responseBody: data) - self.instances = output.instances - self.nextToken = output.nextToken - } else { - self.instances = nil - self.nextToken = nil +extension DescribeInstanceTopologyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceTopologyOutput() + value.instances = try reader["instanceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceTopology.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -57917,48 +40308,18 @@ public struct DescribeInstanceTopologyOutput: Swift.Equatable { } } -struct DescribeInstanceTopologyOutputBody: Swift.Equatable { - let instances: [EC2ClientTypes.InstanceTopology]? - let nextToken: Swift.String? -} - -extension DescribeInstanceTopologyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instances = "instanceSet" - case nextToken = "nextToken" - } +enum DescribeInstanceTopologyOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instances) { - struct KeyVal0{struct item{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceTopology].self, forKey: .member) - var instancesBuffer:[EC2ClientTypes.InstanceTopology]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [EC2ClientTypes.InstanceTopology]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instances = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInstanceTopologyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -58034,65 +40395,16 @@ public struct DescribeInstanceTypeOfferingsInput: Swift.Equatable { } } -struct DescribeInstanceTypeOfferingsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let locationType: EC2ClientTypes.LocationType? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} +extension DescribeInstanceTypeOfferingsOutput { -extension DescribeInstanceTypeOfferingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case locationType = "LocationType" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let locationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocationType.self, forKey: .locationType) - locationType = locationTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeInstanceTypeOfferingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceTypeOfferingsOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceTypeOfferings = output.instanceTypeOfferings - self.nextToken = output.nextToken - } else { - self.instanceTypeOfferings = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceTypeOfferingsOutput() + value.instanceTypeOfferings = try reader["instanceTypeOfferingSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceTypeOffering.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -58113,48 +40425,18 @@ public struct DescribeInstanceTypeOfferingsOutput: Swift.Equatable { } } -struct DescribeInstanceTypeOfferingsOutputBody: Swift.Equatable { - let instanceTypeOfferings: [EC2ClientTypes.InstanceTypeOffering]? - let nextToken: Swift.String? -} +enum DescribeInstanceTypeOfferingsOutputError { -extension DescribeInstanceTypeOfferingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceTypeOfferings = "instanceTypeOfferingSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceTypeOfferings) { - struct KeyVal0{struct item{}} - let instanceTypeOfferingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypeOfferings) - if let instanceTypeOfferingsWrappedContainer = instanceTypeOfferingsWrappedContainer { - let instanceTypeOfferingsContainer = try instanceTypeOfferingsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceTypeOffering].self, forKey: .member) - var instanceTypeOfferingsBuffer:[EC2ClientTypes.InstanceTypeOffering]? = nil - if let instanceTypeOfferingsContainer = instanceTypeOfferingsContainer { - instanceTypeOfferingsBuffer = [EC2ClientTypes.InstanceTypeOffering]() - for structureContainer0 in instanceTypeOfferingsContainer { - instanceTypeOfferingsBuffer?.append(structureContainer0) - } - } - instanceTypeOfferings = instanceTypeOfferingsBuffer - } else { - instanceTypeOfferings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceTypeOfferings = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInstanceTypeOfferingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -58335,82 +40617,16 @@ public struct DescribeInstanceTypesInput: Swift.Equatable { } } -struct DescribeInstanceTypesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceTypes: [EC2ClientTypes.InstanceType]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeInstanceTypesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case instanceTypes = "InstanceType" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.instanceTypes) { - struct KeyVal0{struct member{}} - let instanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypes) - if let instanceTypesWrappedContainer = instanceTypesWrappedContainer { - let instanceTypesContainer = try instanceTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceType].self, forKey: .member) - var instanceTypesBuffer:[EC2ClientTypes.InstanceType]? = nil - if let instanceTypesContainer = instanceTypesContainer { - instanceTypesBuffer = [EC2ClientTypes.InstanceType]() - for enumContainer0 in instanceTypesContainer { - instanceTypesBuffer?.append(enumContainer0) - } - } - instanceTypes = instanceTypesBuffer - } else { - instanceTypes = [] - } - } else { - instanceTypes = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeInstanceTypesOutput { -extension DescribeInstanceTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceTypes = output.instanceTypes - self.nextToken = output.nextToken - } else { - self.instanceTypes = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstanceTypesOutput() + value.instanceTypes = try reader["instanceTypeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceTypeInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -58431,48 +40647,18 @@ public struct DescribeInstanceTypesOutput: Swift.Equatable { } } -struct DescribeInstanceTypesOutputBody: Swift.Equatable { - let instanceTypes: [EC2ClientTypes.InstanceTypeInfo]? - let nextToken: Swift.String? -} - -extension DescribeInstanceTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceTypes = "instanceTypeSet" - case nextToken = "nextToken" - } +enum DescribeInstanceTypesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceTypes) { - struct KeyVal0{struct item{}} - let instanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypes) - if let instanceTypesWrappedContainer = instanceTypesWrappedContainer { - let instanceTypesContainer = try instanceTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceTypeInfo].self, forKey: .member) - var instanceTypesBuffer:[EC2ClientTypes.InstanceTypeInfo]? = nil - if let instanceTypesContainer = instanceTypesContainer { - instanceTypesBuffer = [EC2ClientTypes.InstanceTypeInfo]() - for structureContainer0 in instanceTypesContainer { - instanceTypesBuffer?.append(structureContainer0) - } - } - instanceTypes = instanceTypesBuffer - } else { - instanceTypes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceTypes = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInstanceTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -58815,82 +41001,16 @@ public struct DescribeInstancesInput: Swift.Equatable { } } -struct DescribeInstancesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let instanceIds: [Swift.String]? - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case instanceIds = "InstanceId" - case maxResults = "maxResults" - case nextToken = "nextToken" - } +extension DescribeInstancesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.reservations = output.reservations - } else { - self.nextToken = nil - self.reservations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInstancesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.reservations = try reader["reservationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Reservation.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -58911,48 +41031,18 @@ public struct DescribeInstancesOutput: Swift.Equatable { } } -struct DescribeInstancesOutputBody: Swift.Equatable { - let reservations: [EC2ClientTypes.Reservation]? - let nextToken: Swift.String? -} - -extension DescribeInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case reservations = "reservationSet" - } +enum DescribeInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.reservations) { - struct KeyVal0{struct item{}} - let reservationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservations) - if let reservationsWrappedContainer = reservationsWrappedContainer { - let reservationsContainer = try reservationsWrappedContainer.decodeIfPresent([EC2ClientTypes.Reservation].self, forKey: .member) - var reservationsBuffer:[EC2ClientTypes.Reservation]? = nil - if let reservationsContainer = reservationsContainer { - reservationsBuffer = [EC2ClientTypes.Reservation]() - for structureContainer0 in reservationsContainer { - reservationsBuffer?.append(structureContainer0) - } - } - reservations = reservationsBuffer - } else { - reservations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - reservations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -59045,82 +41135,16 @@ public struct DescribeInternetGatewaysInput: Swift.Equatable { } } -struct DescribeInternetGatewaysInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let internetGatewayIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeInternetGatewaysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case internetGatewayIds = "internetGatewayId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeInternetGatewaysOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.internetGatewayIds) { - struct KeyVal0{struct item{}} - let internetGatewayIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .internetGatewayIds) - if let internetGatewayIdsWrappedContainer = internetGatewayIdsWrappedContainer { - let internetGatewayIdsContainer = try internetGatewayIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var internetGatewayIdsBuffer:[Swift.String]? = nil - if let internetGatewayIdsContainer = internetGatewayIdsContainer { - internetGatewayIdsBuffer = [Swift.String]() - for stringContainer0 in internetGatewayIdsContainer { - internetGatewayIdsBuffer?.append(stringContainer0) - } - } - internetGatewayIds = internetGatewayIdsBuffer - } else { - internetGatewayIds = [] - } - } else { - internetGatewayIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeInternetGatewaysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInternetGatewaysOutputBody = try responseDecoder.decode(responseBody: data) - self.internetGateways = output.internetGateways - self.nextToken = output.nextToken - } else { - self.internetGateways = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeInternetGatewaysOutput() + value.internetGateways = try reader["internetGatewaySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InternetGateway.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -59141,48 +41165,18 @@ public struct DescribeInternetGatewaysOutput: Swift.Equatable { } } -struct DescribeInternetGatewaysOutputBody: Swift.Equatable { - let internetGateways: [EC2ClientTypes.InternetGateway]? - let nextToken: Swift.String? -} - -extension DescribeInternetGatewaysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case internetGateways = "internetGatewaySet" - case nextToken = "nextToken" - } +enum DescribeInternetGatewaysOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.internetGateways) { - struct KeyVal0{struct item{}} - let internetGatewaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .internetGateways) - if let internetGatewaysWrappedContainer = internetGatewaysWrappedContainer { - let internetGatewaysContainer = try internetGatewaysWrappedContainer.decodeIfPresent([EC2ClientTypes.InternetGateway].self, forKey: .member) - var internetGatewaysBuffer:[EC2ClientTypes.InternetGateway]? = nil - if let internetGatewaysContainer = internetGatewaysContainer { - internetGatewaysBuffer = [EC2ClientTypes.InternetGateway]() - for structureContainer0 in internetGatewaysContainer { - internetGatewaysBuffer?.append(structureContainer0) - } - } - internetGateways = internetGatewaysBuffer - } else { - internetGateways = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - internetGateways = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeInternetGatewaysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -59231,40 +41225,16 @@ public struct DescribeIpamByoasnInput: Swift.Equatable { } } -struct DescribeIpamByoasnInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeIpamByoasnInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeIpamByoasnOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeIpamByoasnOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIpamByoasnOutputBody = try responseDecoder.decode(responseBody: data) - self.byoasns = output.byoasns - self.nextToken = output.nextToken - } else { - self.byoasns = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIpamByoasnOutput() + value.byoasns = try reader["byoasnSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Byoasn.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -59285,48 +41255,18 @@ public struct DescribeIpamByoasnOutput: Swift.Equatable { } } -struct DescribeIpamByoasnOutputBody: Swift.Equatable { - let byoasns: [EC2ClientTypes.Byoasn]? - let nextToken: Swift.String? -} - -extension DescribeIpamByoasnOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoasns = "byoasnSet" - case nextToken = "nextToken" - } +enum DescribeIpamByoasnOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.byoasns) { - struct KeyVal0{struct item{}} - let byoasnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .byoasns) - if let byoasnsWrappedContainer = byoasnsWrappedContainer { - let byoasnsContainer = try byoasnsWrappedContainer.decodeIfPresent([EC2ClientTypes.Byoasn].self, forKey: .member) - var byoasnsBuffer:[EC2ClientTypes.Byoasn]? = nil - if let byoasnsContainer = byoasnsContainer { - byoasnsBuffer = [EC2ClientTypes.Byoasn]() - for structureContainer0 in byoasnsContainer { - byoasnsBuffer?.append(structureContainer0) - } - } - byoasns = byoasnsBuffer - } else { - byoasns = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - byoasns = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeIpamByoasnOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -59407,82 +41347,16 @@ public struct DescribeIpamPoolsInput: Swift.Equatable { } } -struct DescribeIpamPoolsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let ipamPoolIds: [Swift.String]? -} - -extension DescribeIpamPoolsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamPoolIds = "IpamPoolId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeIpamPoolsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.ipamPoolIds) { - struct KeyVal0{struct item{}} - let ipamPoolIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamPoolIds) - if let ipamPoolIdsWrappedContainer = ipamPoolIdsWrappedContainer { - let ipamPoolIdsContainer = try ipamPoolIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipamPoolIdsBuffer:[Swift.String]? = nil - if let ipamPoolIdsContainer = ipamPoolIdsContainer { - ipamPoolIdsBuffer = [Swift.String]() - for stringContainer0 in ipamPoolIdsContainer { - ipamPoolIdsBuffer?.append(stringContainer0) - } - } - ipamPoolIds = ipamPoolIdsBuffer - } else { - ipamPoolIds = [] - } - } else { - ipamPoolIds = nil - } - } -} - -extension DescribeIpamPoolsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIpamPoolsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPools = output.ipamPools - self.nextToken = output.nextToken - } else { - self.ipamPools = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIpamPoolsOutput() + value.ipamPools = try reader["ipamPoolSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamPool.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -59503,48 +41377,18 @@ public struct DescribeIpamPoolsOutput: Swift.Equatable { } } -struct DescribeIpamPoolsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let ipamPools: [EC2ClientTypes.IpamPool]? -} - -extension DescribeIpamPoolsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPools = "ipamPoolSet" - case nextToken = "nextToken" - } +enum DescribeIpamPoolsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.ipamPools) { - struct KeyVal0{struct item{}} - let ipamPoolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamPools) - if let ipamPoolsWrappedContainer = ipamPoolsWrappedContainer { - let ipamPoolsContainer = try ipamPoolsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamPool].self, forKey: .member) - var ipamPoolsBuffer:[EC2ClientTypes.IpamPool]? = nil - if let ipamPoolsContainer = ipamPoolsContainer { - ipamPoolsBuffer = [EC2ClientTypes.IpamPool]() - for structureContainer0 in ipamPoolsContainer { - ipamPoolsBuffer?.append(structureContainer0) - } - } - ipamPools = ipamPoolsBuffer - } else { - ipamPools = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamPools = nil - } - } -} - -enum DescribeIpamPoolsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -59625,82 +41469,16 @@ public struct DescribeIpamResourceDiscoveriesInput: Swift.Equatable { } } -struct DescribeIpamResourceDiscoveriesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamResourceDiscoveryIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let filters: [EC2ClientTypes.Filter]? -} +extension DescribeIpamResourceDiscoveriesOutput { -extension DescribeIpamResourceDiscoveriesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamResourceDiscoveryIds = "IpamResourceDiscoveryId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.ipamResourceDiscoveryIds) { - struct KeyVal0{struct item{}} - let ipamResourceDiscoveryIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamResourceDiscoveryIds) - if let ipamResourceDiscoveryIdsWrappedContainer = ipamResourceDiscoveryIdsWrappedContainer { - let ipamResourceDiscoveryIdsContainer = try ipamResourceDiscoveryIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipamResourceDiscoveryIdsBuffer:[Swift.String]? = nil - if let ipamResourceDiscoveryIdsContainer = ipamResourceDiscoveryIdsContainer { - ipamResourceDiscoveryIdsBuffer = [Swift.String]() - for stringContainer0 in ipamResourceDiscoveryIdsContainer { - ipamResourceDiscoveryIdsBuffer?.append(stringContainer0) - } - } - ipamResourceDiscoveryIds = ipamResourceDiscoveryIdsBuffer - } else { - ipamResourceDiscoveryIds = [] - } - } else { - ipamResourceDiscoveryIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} - -extension DescribeIpamResourceDiscoveriesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIpamResourceDiscoveriesOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceDiscoveries = output.ipamResourceDiscoveries - self.nextToken = output.nextToken - } else { - self.ipamResourceDiscoveries = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIpamResourceDiscoveriesOutput() + value.ipamResourceDiscoveries = try reader["ipamResourceDiscoverySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamResourceDiscovery.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -59721,48 +41499,18 @@ public struct DescribeIpamResourceDiscoveriesOutput: Swift.Equatable { } } -struct DescribeIpamResourceDiscoveriesOutputBody: Swift.Equatable { - let ipamResourceDiscoveries: [EC2ClientTypes.IpamResourceDiscovery]? - let nextToken: Swift.String? -} - -extension DescribeIpamResourceDiscoveriesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceDiscoveries = "ipamResourceDiscoverySet" - case nextToken = "nextToken" - } +enum DescribeIpamResourceDiscoveriesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipamResourceDiscoveries) { - struct KeyVal0{struct item{}} - let ipamResourceDiscoveriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamResourceDiscoveries) - if let ipamResourceDiscoveriesWrappedContainer = ipamResourceDiscoveriesWrappedContainer { - let ipamResourceDiscoveriesContainer = try ipamResourceDiscoveriesWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamResourceDiscovery].self, forKey: .member) - var ipamResourceDiscoveriesBuffer:[EC2ClientTypes.IpamResourceDiscovery]? = nil - if let ipamResourceDiscoveriesContainer = ipamResourceDiscoveriesContainer { - ipamResourceDiscoveriesBuffer = [EC2ClientTypes.IpamResourceDiscovery]() - for structureContainer0 in ipamResourceDiscoveriesContainer { - ipamResourceDiscoveriesBuffer?.append(structureContainer0) - } - } - ipamResourceDiscoveries = ipamResourceDiscoveriesBuffer - } else { - ipamResourceDiscoveries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamResourceDiscoveries = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeIpamResourceDiscoveriesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -59843,82 +41591,16 @@ public struct DescribeIpamResourceDiscoveryAssociationsInput: Swift.Equatable { } } -struct DescribeIpamResourceDiscoveryAssociationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamResourceDiscoveryAssociationIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let filters: [EC2ClientTypes.Filter]? -} - -extension DescribeIpamResourceDiscoveryAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamResourceDiscoveryAssociationIds = "IpamResourceDiscoveryAssociationId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.ipamResourceDiscoveryAssociationIds) { - struct KeyVal0{struct item{}} - let ipamResourceDiscoveryAssociationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamResourceDiscoveryAssociationIds) - if let ipamResourceDiscoveryAssociationIdsWrappedContainer = ipamResourceDiscoveryAssociationIdsWrappedContainer { - let ipamResourceDiscoveryAssociationIdsContainer = try ipamResourceDiscoveryAssociationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipamResourceDiscoveryAssociationIdsBuffer:[Swift.String]? = nil - if let ipamResourceDiscoveryAssociationIdsContainer = ipamResourceDiscoveryAssociationIdsContainer { - ipamResourceDiscoveryAssociationIdsBuffer = [Swift.String]() - for stringContainer0 in ipamResourceDiscoveryAssociationIdsContainer { - ipamResourceDiscoveryAssociationIdsBuffer?.append(stringContainer0) - } - } - ipamResourceDiscoveryAssociationIds = ipamResourceDiscoveryAssociationIdsBuffer - } else { - ipamResourceDiscoveryAssociationIds = [] - } - } else { - ipamResourceDiscoveryAssociationIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension DescribeIpamResourceDiscoveryAssociationsOutput { -extension DescribeIpamResourceDiscoveryAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIpamResourceDiscoveryAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceDiscoveryAssociations = output.ipamResourceDiscoveryAssociations - self.nextToken = output.nextToken - } else { - self.ipamResourceDiscoveryAssociations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIpamResourceDiscoveryAssociationsOutput() + value.ipamResourceDiscoveryAssociations = try reader["ipamResourceDiscoveryAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamResourceDiscoveryAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -59939,48 +41621,18 @@ public struct DescribeIpamResourceDiscoveryAssociationsOutput: Swift.Equatable { } } -struct DescribeIpamResourceDiscoveryAssociationsOutputBody: Swift.Equatable { - let ipamResourceDiscoveryAssociations: [EC2ClientTypes.IpamResourceDiscoveryAssociation]? - let nextToken: Swift.String? -} - -extension DescribeIpamResourceDiscoveryAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceDiscoveryAssociations = "ipamResourceDiscoveryAssociationSet" - case nextToken = "nextToken" - } +enum DescribeIpamResourceDiscoveryAssociationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipamResourceDiscoveryAssociations) { - struct KeyVal0{struct item{}} - let ipamResourceDiscoveryAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamResourceDiscoveryAssociations) - if let ipamResourceDiscoveryAssociationsWrappedContainer = ipamResourceDiscoveryAssociationsWrappedContainer { - let ipamResourceDiscoveryAssociationsContainer = try ipamResourceDiscoveryAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamResourceDiscoveryAssociation].self, forKey: .member) - var ipamResourceDiscoveryAssociationsBuffer:[EC2ClientTypes.IpamResourceDiscoveryAssociation]? = nil - if let ipamResourceDiscoveryAssociationsContainer = ipamResourceDiscoveryAssociationsContainer { - ipamResourceDiscoveryAssociationsBuffer = [EC2ClientTypes.IpamResourceDiscoveryAssociation]() - for structureContainer0 in ipamResourceDiscoveryAssociationsContainer { - ipamResourceDiscoveryAssociationsBuffer?.append(structureContainer0) - } - } - ipamResourceDiscoveryAssociations = ipamResourceDiscoveryAssociationsBuffer - } else { - ipamResourceDiscoveryAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamResourceDiscoveryAssociations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeIpamResourceDiscoveryAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -60061,82 +41713,16 @@ public struct DescribeIpamScopesInput: Swift.Equatable { } } -struct DescribeIpamScopesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let ipamScopeIds: [Swift.String]? -} +extension DescribeIpamScopesOutput { -extension DescribeIpamScopesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamScopeIds = "IpamScopeId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.ipamScopeIds) { - struct KeyVal0{struct item{}} - let ipamScopeIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamScopeIds) - if let ipamScopeIdsWrappedContainer = ipamScopeIdsWrappedContainer { - let ipamScopeIdsContainer = try ipamScopeIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipamScopeIdsBuffer:[Swift.String]? = nil - if let ipamScopeIdsContainer = ipamScopeIdsContainer { - ipamScopeIdsBuffer = [Swift.String]() - for stringContainer0 in ipamScopeIdsContainer { - ipamScopeIdsBuffer?.append(stringContainer0) - } - } - ipamScopeIds = ipamScopeIdsBuffer - } else { - ipamScopeIds = [] - } - } else { - ipamScopeIds = nil - } - } -} - -extension DescribeIpamScopesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIpamScopesOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamScopes = output.ipamScopes - self.nextToken = output.nextToken - } else { - self.ipamScopes = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIpamScopesOutput() + value.ipamScopes = try reader["ipamScopeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamScope.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -60157,48 +41743,18 @@ public struct DescribeIpamScopesOutput: Swift.Equatable { } } -struct DescribeIpamScopesOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let ipamScopes: [EC2ClientTypes.IpamScope]? -} - -extension DescribeIpamScopesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamScopes = "ipamScopeSet" - case nextToken = "nextToken" - } +enum DescribeIpamScopesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.ipamScopes) { - struct KeyVal0{struct item{}} - let ipamScopesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamScopes) - if let ipamScopesWrappedContainer = ipamScopesWrappedContainer { - let ipamScopesContainer = try ipamScopesWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamScope].self, forKey: .member) - var ipamScopesBuffer:[EC2ClientTypes.IpamScope]? = nil - if let ipamScopesContainer = ipamScopesContainer { - ipamScopesBuffer = [EC2ClientTypes.IpamScope]() - for structureContainer0 in ipamScopesContainer { - ipamScopesBuffer?.append(structureContainer0) - } - } - ipamScopes = ipamScopesBuffer - } else { - ipamScopes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamScopes = nil - } - } -} - -enum DescribeIpamScopesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -60279,82 +41835,16 @@ public struct DescribeIpamsInput: Swift.Equatable { } } -struct DescribeIpamsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let ipamIds: [Swift.String]? -} - -extension DescribeIpamsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamIds = "IpamId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeIpamsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.ipamIds) { - struct KeyVal0{struct item{}} - let ipamIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamIds) - if let ipamIdsWrappedContainer = ipamIdsWrappedContainer { - let ipamIdsContainer = try ipamIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipamIdsBuffer:[Swift.String]? = nil - if let ipamIdsContainer = ipamIdsContainer { - ipamIdsBuffer = [Swift.String]() - for stringContainer0 in ipamIdsContainer { - ipamIdsBuffer?.append(stringContainer0) - } - } - ipamIds = ipamIdsBuffer - } else { - ipamIds = [] - } - } else { - ipamIds = nil - } - } -} - -extension DescribeIpamsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIpamsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipams = output.ipams - self.nextToken = output.nextToken - } else { - self.ipams = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIpamsOutput() + value.ipams = try reader["ipamSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipam.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -60375,48 +41865,18 @@ public struct DescribeIpamsOutput: Swift.Equatable { } } -struct DescribeIpamsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let ipams: [EC2ClientTypes.Ipam]? -} - -extension DescribeIpamsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipams = "ipamSet" - case nextToken = "nextToken" - } +enum DescribeIpamsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.ipams) { - struct KeyVal0{struct item{}} - let ipamsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipams) - if let ipamsWrappedContainer = ipamsWrappedContainer { - let ipamsContainer = try ipamsWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipam].self, forKey: .member) - var ipamsBuffer:[EC2ClientTypes.Ipam]? = nil - if let ipamsContainer = ipamsContainer { - ipamsBuffer = [EC2ClientTypes.Ipam]() - for structureContainer0 in ipamsContainer { - ipamsBuffer?.append(structureContainer0) - } - } - ipams = ipamsBuffer - } else { - ipams = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipams = nil - } - } -} - -enum DescribeIpamsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -60501,82 +41961,16 @@ public struct DescribeIpv6PoolsInput: Swift.Equatable { } } -struct DescribeIpv6PoolsInputBody: Swift.Equatable { - let poolIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? -} - -extension DescribeIpv6PoolsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case poolIds = "PoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.poolIds) { - struct KeyVal0{struct item{}} - let poolIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .poolIds) - if let poolIdsWrappedContainer = poolIdsWrappedContainer { - let poolIdsContainer = try poolIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var poolIdsBuffer:[Swift.String]? = nil - if let poolIdsContainer = poolIdsContainer { - poolIdsBuffer = [Swift.String]() - for stringContainer0 in poolIdsContainer { - poolIdsBuffer?.append(stringContainer0) - } - } - poolIds = poolIdsBuffer - } else { - poolIds = [] - } - } else { - poolIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension DescribeIpv6PoolsOutput { -extension DescribeIpv6PoolsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIpv6PoolsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipv6Pools = output.ipv6Pools - self.nextToken = output.nextToken - } else { - self.ipv6Pools = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeIpv6PoolsOutput() + value.ipv6Pools = try reader["ipv6PoolSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv6Pool.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -60597,48 +41991,18 @@ public struct DescribeIpv6PoolsOutput: Swift.Equatable { } } -struct DescribeIpv6PoolsOutputBody: Swift.Equatable { - let ipv6Pools: [EC2ClientTypes.Ipv6Pool]? - let nextToken: Swift.String? -} - -extension DescribeIpv6PoolsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Pools = "ipv6PoolSet" - case nextToken = "nextToken" - } +enum DescribeIpv6PoolsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipv6Pools) { - struct KeyVal0{struct item{}} - let ipv6PoolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Pools) - if let ipv6PoolsWrappedContainer = ipv6PoolsWrappedContainer { - let ipv6PoolsContainer = try ipv6PoolsWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6Pool].self, forKey: .member) - var ipv6PoolsBuffer:[EC2ClientTypes.Ipv6Pool]? = nil - if let ipv6PoolsContainer = ipv6PoolsContainer { - ipv6PoolsBuffer = [EC2ClientTypes.Ipv6Pool]() - for structureContainer0 in ipv6PoolsContainer { - ipv6PoolsBuffer?.append(structureContainer0) - } - } - ipv6Pools = ipv6PoolsBuffer - } else { - ipv6Pools = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipv6Pools = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeIpv6PoolsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -60738,97 +42102,15 @@ public struct DescribeKeyPairsInput: Swift.Equatable { } } -struct DescribeKeyPairsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let keyNames: [Swift.String]? - let keyPairIds: [Swift.String]? - let dryRun: Swift.Bool? - let includePublicKey: Swift.Bool? -} - -extension DescribeKeyPairsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case includePublicKey = "IncludePublicKey" - case keyNames = "KeyName" - case keyPairIds = "KeyPairId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.keyNames) { - struct KeyVal0{struct KeyName{}} - let keyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .keyNames) - if let keyNamesWrappedContainer = keyNamesWrappedContainer { - let keyNamesContainer = try keyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var keyNamesBuffer:[Swift.String]? = nil - if let keyNamesContainer = keyNamesContainer { - keyNamesBuffer = [Swift.String]() - for stringContainer0 in keyNamesContainer { - keyNamesBuffer?.append(stringContainer0) - } - } - keyNames = keyNamesBuffer - } else { - keyNames = [] - } - } else { - keyNames = nil - } - if containerValues.contains(.keyPairIds) { - struct KeyVal0{struct KeyPairId{}} - let keyPairIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .keyPairIds) - if let keyPairIdsWrappedContainer = keyPairIdsWrappedContainer { - let keyPairIdsContainer = try keyPairIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var keyPairIdsBuffer:[Swift.String]? = nil - if let keyPairIdsContainer = keyPairIdsContainer { - keyPairIdsBuffer = [Swift.String]() - for stringContainer0 in keyPairIdsContainer { - keyPairIdsBuffer?.append(stringContainer0) - } - } - keyPairIds = keyPairIdsBuffer - } else { - keyPairIds = [] - } - } else { - keyPairIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let includePublicKeyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includePublicKey) - includePublicKey = includePublicKeyDecoded - } -} - -extension DescribeKeyPairsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeKeyPairsOutputBody = try responseDecoder.decode(responseBody: data) - self.keyPairs = output.keyPairs - } else { - self.keyPairs = nil +extension DescribeKeyPairsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeKeyPairsOutput() + value.keyPairs = try reader["keySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.KeyPairInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -60845,44 +42127,18 @@ public struct DescribeKeyPairsOutput: Swift.Equatable { } } -struct DescribeKeyPairsOutputBody: Swift.Equatable { - let keyPairs: [EC2ClientTypes.KeyPairInfo]? -} +enum DescribeKeyPairsOutputError { -extension DescribeKeyPairsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyPairs = "keySet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.keyPairs) { - struct KeyVal0{struct item{}} - let keyPairsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .keyPairs) - if let keyPairsWrappedContainer = keyPairsWrappedContainer { - let keyPairsContainer = try keyPairsWrappedContainer.decodeIfPresent([EC2ClientTypes.KeyPairInfo].self, forKey: .member) - var keyPairsBuffer:[EC2ClientTypes.KeyPairInfo]? = nil - if let keyPairsContainer = keyPairsContainer { - keyPairsBuffer = [EC2ClientTypes.KeyPairInfo]() - for structureContainer0 in keyPairsContainer { - keyPairsBuffer?.append(structureContainer0) - } - } - keyPairs = keyPairsBuffer - } else { - keyPairs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - keyPairs = nil - } - } -} - -enum DescribeKeyPairsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -61026,102 +42282,16 @@ public struct DescribeLaunchTemplateVersionsInput: Swift.Equatable { } } -struct DescribeLaunchTemplateVersionsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let launchTemplateId: Swift.String? - let launchTemplateName: Swift.String? - let versions: [Swift.String]? - let minVersion: Swift.String? - let maxVersion: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let filters: [EC2ClientTypes.Filter]? - let resolveAlias: Swift.Bool? -} - -extension DescribeLaunchTemplateVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case launchTemplateId = "LaunchTemplateId" - case launchTemplateName = "LaunchTemplateName" - case maxResults = "MaxResults" - case maxVersion = "MaxVersion" - case minVersion = "MinVersion" - case nextToken = "NextToken" - case resolveAlias = "ResolveAlias" - case versions = "LaunchTemplateVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - if containerValues.contains(.versions) { - struct KeyVal0{struct item{}} - let versionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .versions) - if let versionsWrappedContainer = versionsWrappedContainer { - let versionsContainer = try versionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var versionsBuffer:[Swift.String]? = nil - if let versionsContainer = versionsContainer { - versionsBuffer = [Swift.String]() - for stringContainer0 in versionsContainer { - versionsBuffer?.append(stringContainer0) - } - } - versions = versionsBuffer - } else { - versions = [] - } - } else { - versions = nil - } - let minVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minVersion) - minVersion = minVersionDecoded - let maxVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxVersion) - maxVersion = maxVersionDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let resolveAliasDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resolveAlias) - resolveAlias = resolveAliasDecoded - } -} - -extension DescribeLaunchTemplateVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLaunchTemplateVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.launchTemplateVersions = output.launchTemplateVersions - self.nextToken = output.nextToken - } else { - self.launchTemplateVersions = nil - self.nextToken = nil +extension DescribeLaunchTemplateVersionsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLaunchTemplateVersionsOutput() + value.launchTemplateVersions = try reader["launchTemplateVersionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateVersion.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -61142,48 +42312,18 @@ public struct DescribeLaunchTemplateVersionsOutput: Swift.Equatable { } } -struct DescribeLaunchTemplateVersionsOutputBody: Swift.Equatable { - let launchTemplateVersions: [EC2ClientTypes.LaunchTemplateVersion]? - let nextToken: Swift.String? -} - -extension DescribeLaunchTemplateVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateVersions = "launchTemplateVersionSet" - case nextToken = "nextToken" - } +enum DescribeLaunchTemplateVersionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.launchTemplateVersions) { - struct KeyVal0{struct item{}} - let launchTemplateVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplateVersions) - if let launchTemplateVersionsWrappedContainer = launchTemplateVersionsWrappedContainer { - let launchTemplateVersionsContainer = try launchTemplateVersionsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateVersion].self, forKey: .member) - var launchTemplateVersionsBuffer:[EC2ClientTypes.LaunchTemplateVersion]? = nil - if let launchTemplateVersionsContainer = launchTemplateVersionsContainer { - launchTemplateVersionsBuffer = [EC2ClientTypes.LaunchTemplateVersion]() - for structureContainer0 in launchTemplateVersionsContainer { - launchTemplateVersionsBuffer?.append(structureContainer0) - } - } - launchTemplateVersions = launchTemplateVersionsBuffer - } else { - launchTemplateVersions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - launchTemplateVersions = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLaunchTemplateVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -61288,103 +42428,16 @@ public struct DescribeLaunchTemplatesInput: Swift.Equatable { } } -struct DescribeLaunchTemplatesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let launchTemplateIds: [Swift.String]? - let launchTemplateNames: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeLaunchTemplatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case launchTemplateIds = "LaunchTemplateId" - case launchTemplateNames = "LaunchTemplateName" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.launchTemplateIds) { - struct KeyVal0{struct item{}} - let launchTemplateIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplateIds) - if let launchTemplateIdsWrappedContainer = launchTemplateIdsWrappedContainer { - let launchTemplateIdsContainer = try launchTemplateIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var launchTemplateIdsBuffer:[Swift.String]? = nil - if let launchTemplateIdsContainer = launchTemplateIdsContainer { - launchTemplateIdsBuffer = [Swift.String]() - for stringContainer0 in launchTemplateIdsContainer { - launchTemplateIdsBuffer?.append(stringContainer0) - } - } - launchTemplateIds = launchTemplateIdsBuffer - } else { - launchTemplateIds = [] - } - } else { - launchTemplateIds = nil - } - if containerValues.contains(.launchTemplateNames) { - struct KeyVal0{struct item{}} - let launchTemplateNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplateNames) - if let launchTemplateNamesWrappedContainer = launchTemplateNamesWrappedContainer { - let launchTemplateNamesContainer = try launchTemplateNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var launchTemplateNamesBuffer:[Swift.String]? = nil - if let launchTemplateNamesContainer = launchTemplateNamesContainer { - launchTemplateNamesBuffer = [Swift.String]() - for stringContainer0 in launchTemplateNamesContainer { - launchTemplateNamesBuffer?.append(stringContainer0) - } - } - launchTemplateNames = launchTemplateNamesBuffer - } else { - launchTemplateNames = [] - } - } else { - launchTemplateNames = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeLaunchTemplatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLaunchTemplatesOutputBody = try responseDecoder.decode(responseBody: data) - self.launchTemplates = output.launchTemplates - self.nextToken = output.nextToken - } else { - self.launchTemplates = nil - self.nextToken = nil +extension DescribeLaunchTemplatesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLaunchTemplatesOutput() + value.launchTemplates = try reader["launchTemplates"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplate.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -61405,48 +42458,18 @@ public struct DescribeLaunchTemplatesOutput: Swift.Equatable { } } -struct DescribeLaunchTemplatesOutputBody: Swift.Equatable { - let launchTemplates: [EC2ClientTypes.LaunchTemplate]? - let nextToken: Swift.String? -} - -extension DescribeLaunchTemplatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplates = "launchTemplates" - case nextToken = "nextToken" - } +enum DescribeLaunchTemplatesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.launchTemplates) { - struct KeyVal0{struct item{}} - let launchTemplatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplates) - if let launchTemplatesWrappedContainer = launchTemplatesWrappedContainer { - let launchTemplatesContainer = try launchTemplatesWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplate].self, forKey: .member) - var launchTemplatesBuffer:[EC2ClientTypes.LaunchTemplate]? = nil - if let launchTemplatesContainer = launchTemplatesContainer { - launchTemplatesBuffer = [EC2ClientTypes.LaunchTemplate]() - for structureContainer0 in launchTemplatesContainer { - launchTemplatesBuffer?.append(structureContainer0) - } - } - launchTemplates = launchTemplatesBuffer - } else { - launchTemplates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - launchTemplates = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLaunchTemplatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -61541,82 +42564,16 @@ public struct DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInp } } -struct DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInputBody: Swift.Equatable { - let localGatewayRouteTableVirtualInterfaceGroupAssociationIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case localGatewayRouteTableVirtualInterfaceGroupAssociationIds = "LocalGatewayRouteTableVirtualInterfaceGroupAssociationId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayRouteTableVirtualInterfaceGroupAssociationIds) { - struct KeyVal0{struct item{}} - let localGatewayRouteTableVirtualInterfaceGroupAssociationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayRouteTableVirtualInterfaceGroupAssociationIds) - if let localGatewayRouteTableVirtualInterfaceGroupAssociationIdsWrappedContainer = localGatewayRouteTableVirtualInterfaceGroupAssociationIdsWrappedContainer { - let localGatewayRouteTableVirtualInterfaceGroupAssociationIdsContainer = try localGatewayRouteTableVirtualInterfaceGroupAssociationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var localGatewayRouteTableVirtualInterfaceGroupAssociationIdsBuffer:[Swift.String]? = nil - if let localGatewayRouteTableVirtualInterfaceGroupAssociationIdsContainer = localGatewayRouteTableVirtualInterfaceGroupAssociationIdsContainer { - localGatewayRouteTableVirtualInterfaceGroupAssociationIdsBuffer = [Swift.String]() - for stringContainer0 in localGatewayRouteTableVirtualInterfaceGroupAssociationIdsContainer { - localGatewayRouteTableVirtualInterfaceGroupAssociationIdsBuffer?.append(stringContainer0) - } - } - localGatewayRouteTableVirtualInterfaceGroupAssociationIds = localGatewayRouteTableVirtualInterfaceGroupAssociationIdsBuffer - } else { - localGatewayRouteTableVirtualInterfaceGroupAssociationIds = [] - } - } else { - localGatewayRouteTableVirtualInterfaceGroupAssociationIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTableVirtualInterfaceGroupAssociations = output.localGatewayRouteTableVirtualInterfaceGroupAssociations - self.nextToken = output.nextToken - } else { - self.localGatewayRouteTableVirtualInterfaceGroupAssociations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput() + value.localGatewayRouteTableVirtualInterfaceGroupAssociations = try reader["localGatewayRouteTableVirtualInterfaceGroupAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -61637,48 +42594,18 @@ public struct DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOut } } -struct DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutputBody: Swift.Equatable { - let localGatewayRouteTableVirtualInterfaceGroupAssociations: [EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation]? - let nextToken: Swift.String? -} - -extension DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTableVirtualInterfaceGroupAssociations = "localGatewayRouteTableVirtualInterfaceGroupAssociationSet" - case nextToken = "nextToken" - } +enum DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayRouteTableVirtualInterfaceGroupAssociations) { - struct KeyVal0{struct item{}} - let localGatewayRouteTableVirtualInterfaceGroupAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayRouteTableVirtualInterfaceGroupAssociations) - if let localGatewayRouteTableVirtualInterfaceGroupAssociationsWrappedContainer = localGatewayRouteTableVirtualInterfaceGroupAssociationsWrappedContainer { - let localGatewayRouteTableVirtualInterfaceGroupAssociationsContainer = try localGatewayRouteTableVirtualInterfaceGroupAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation].self, forKey: .member) - var localGatewayRouteTableVirtualInterfaceGroupAssociationsBuffer:[EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation]? = nil - if let localGatewayRouteTableVirtualInterfaceGroupAssociationsContainer = localGatewayRouteTableVirtualInterfaceGroupAssociationsContainer { - localGatewayRouteTableVirtualInterfaceGroupAssociationsBuffer = [EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation]() - for structureContainer0 in localGatewayRouteTableVirtualInterfaceGroupAssociationsContainer { - localGatewayRouteTableVirtualInterfaceGroupAssociationsBuffer?.append(structureContainer0) - } - } - localGatewayRouteTableVirtualInterfaceGroupAssociations = localGatewayRouteTableVirtualInterfaceGroupAssociationsBuffer - } else { - localGatewayRouteTableVirtualInterfaceGroupAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - localGatewayRouteTableVirtualInterfaceGroupAssociations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -61773,82 +42700,16 @@ public struct DescribeLocalGatewayRouteTableVpcAssociationsInput: Swift.Equatabl } } -struct DescribeLocalGatewayRouteTableVpcAssociationsInputBody: Swift.Equatable { - let localGatewayRouteTableVpcAssociationIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeLocalGatewayRouteTableVpcAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case localGatewayRouteTableVpcAssociationIds = "LocalGatewayRouteTableVpcAssociationId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayRouteTableVpcAssociationIds) { - struct KeyVal0{struct item{}} - let localGatewayRouteTableVpcAssociationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayRouteTableVpcAssociationIds) - if let localGatewayRouteTableVpcAssociationIdsWrappedContainer = localGatewayRouteTableVpcAssociationIdsWrappedContainer { - let localGatewayRouteTableVpcAssociationIdsContainer = try localGatewayRouteTableVpcAssociationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var localGatewayRouteTableVpcAssociationIdsBuffer:[Swift.String]? = nil - if let localGatewayRouteTableVpcAssociationIdsContainer = localGatewayRouteTableVpcAssociationIdsContainer { - localGatewayRouteTableVpcAssociationIdsBuffer = [Swift.String]() - for stringContainer0 in localGatewayRouteTableVpcAssociationIdsContainer { - localGatewayRouteTableVpcAssociationIdsBuffer?.append(stringContainer0) - } - } - localGatewayRouteTableVpcAssociationIds = localGatewayRouteTableVpcAssociationIdsBuffer - } else { - localGatewayRouteTableVpcAssociationIds = [] - } - } else { - localGatewayRouteTableVpcAssociationIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeLocalGatewayRouteTableVpcAssociationsOutput { -extension DescribeLocalGatewayRouteTableVpcAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLocalGatewayRouteTableVpcAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTableVpcAssociations = output.localGatewayRouteTableVpcAssociations - self.nextToken = output.nextToken - } else { - self.localGatewayRouteTableVpcAssociations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLocalGatewayRouteTableVpcAssociationsOutput() + value.localGatewayRouteTableVpcAssociations = try reader["localGatewayRouteTableVpcAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalGatewayRouteTableVpcAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -61869,48 +42730,18 @@ public struct DescribeLocalGatewayRouteTableVpcAssociationsOutput: Swift.Equatab } } -struct DescribeLocalGatewayRouteTableVpcAssociationsOutputBody: Swift.Equatable { - let localGatewayRouteTableVpcAssociations: [EC2ClientTypes.LocalGatewayRouteTableVpcAssociation]? - let nextToken: Swift.String? -} - -extension DescribeLocalGatewayRouteTableVpcAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTableVpcAssociations = "localGatewayRouteTableVpcAssociationSet" - case nextToken = "nextToken" - } +enum DescribeLocalGatewayRouteTableVpcAssociationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayRouteTableVpcAssociations) { - struct KeyVal0{struct item{}} - let localGatewayRouteTableVpcAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayRouteTableVpcAssociations) - if let localGatewayRouteTableVpcAssociationsWrappedContainer = localGatewayRouteTableVpcAssociationsWrappedContainer { - let localGatewayRouteTableVpcAssociationsContainer = try localGatewayRouteTableVpcAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalGatewayRouteTableVpcAssociation].self, forKey: .member) - var localGatewayRouteTableVpcAssociationsBuffer:[EC2ClientTypes.LocalGatewayRouteTableVpcAssociation]? = nil - if let localGatewayRouteTableVpcAssociationsContainer = localGatewayRouteTableVpcAssociationsContainer { - localGatewayRouteTableVpcAssociationsBuffer = [EC2ClientTypes.LocalGatewayRouteTableVpcAssociation]() - for structureContainer0 in localGatewayRouteTableVpcAssociationsContainer { - localGatewayRouteTableVpcAssociationsBuffer?.append(structureContainer0) - } - } - localGatewayRouteTableVpcAssociations = localGatewayRouteTableVpcAssociationsBuffer - } else { - localGatewayRouteTableVpcAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - localGatewayRouteTableVpcAssociations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLocalGatewayRouteTableVpcAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -62003,82 +42834,16 @@ public struct DescribeLocalGatewayRouteTablesInput: Swift.Equatable { } } -struct DescribeLocalGatewayRouteTablesInputBody: Swift.Equatable { - let localGatewayRouteTableIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeLocalGatewayRouteTablesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case localGatewayRouteTableIds = "LocalGatewayRouteTableId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayRouteTableIds) { - struct KeyVal0{struct item{}} - let localGatewayRouteTableIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayRouteTableIds) - if let localGatewayRouteTableIdsWrappedContainer = localGatewayRouteTableIdsWrappedContainer { - let localGatewayRouteTableIdsContainer = try localGatewayRouteTableIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var localGatewayRouteTableIdsBuffer:[Swift.String]? = nil - if let localGatewayRouteTableIdsContainer = localGatewayRouteTableIdsContainer { - localGatewayRouteTableIdsBuffer = [Swift.String]() - for stringContainer0 in localGatewayRouteTableIdsContainer { - localGatewayRouteTableIdsBuffer?.append(stringContainer0) - } - } - localGatewayRouteTableIds = localGatewayRouteTableIdsBuffer - } else { - localGatewayRouteTableIds = [] - } - } else { - localGatewayRouteTableIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeLocalGatewayRouteTablesOutput { -extension DescribeLocalGatewayRouteTablesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLocalGatewayRouteTablesOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayRouteTables = output.localGatewayRouteTables - self.nextToken = output.nextToken - } else { - self.localGatewayRouteTables = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLocalGatewayRouteTablesOutput() + value.localGatewayRouteTables = try reader["localGatewayRouteTableSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalGatewayRouteTable.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -62099,48 +42864,18 @@ public struct DescribeLocalGatewayRouteTablesOutput: Swift.Equatable { } } -struct DescribeLocalGatewayRouteTablesOutputBody: Swift.Equatable { - let localGatewayRouteTables: [EC2ClientTypes.LocalGatewayRouteTable]? - let nextToken: Swift.String? -} - -extension DescribeLocalGatewayRouteTablesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayRouteTables = "localGatewayRouteTableSet" - case nextToken = "nextToken" - } +enum DescribeLocalGatewayRouteTablesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayRouteTables) { - struct KeyVal0{struct item{}} - let localGatewayRouteTablesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayRouteTables) - if let localGatewayRouteTablesWrappedContainer = localGatewayRouteTablesWrappedContainer { - let localGatewayRouteTablesContainer = try localGatewayRouteTablesWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalGatewayRouteTable].self, forKey: .member) - var localGatewayRouteTablesBuffer:[EC2ClientTypes.LocalGatewayRouteTable]? = nil - if let localGatewayRouteTablesContainer = localGatewayRouteTablesContainer { - localGatewayRouteTablesBuffer = [EC2ClientTypes.LocalGatewayRouteTable]() - for structureContainer0 in localGatewayRouteTablesContainer { - localGatewayRouteTablesBuffer?.append(structureContainer0) - } - } - localGatewayRouteTables = localGatewayRouteTablesBuffer - } else { - localGatewayRouteTables = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - localGatewayRouteTables = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLocalGatewayRouteTablesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -62229,82 +42964,16 @@ public struct DescribeLocalGatewayVirtualInterfaceGroupsInput: Swift.Equatable { } } -struct DescribeLocalGatewayVirtualInterfaceGroupsInputBody: Swift.Equatable { - let localGatewayVirtualInterfaceGroupIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeLocalGatewayVirtualInterfaceGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case localGatewayVirtualInterfaceGroupIds = "LocalGatewayVirtualInterfaceGroupId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeLocalGatewayVirtualInterfaceGroupsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayVirtualInterfaceGroupIds) { - struct KeyVal0{struct item{}} - let localGatewayVirtualInterfaceGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayVirtualInterfaceGroupIds) - if let localGatewayVirtualInterfaceGroupIdsWrappedContainer = localGatewayVirtualInterfaceGroupIdsWrappedContainer { - let localGatewayVirtualInterfaceGroupIdsContainer = try localGatewayVirtualInterfaceGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var localGatewayVirtualInterfaceGroupIdsBuffer:[Swift.String]? = nil - if let localGatewayVirtualInterfaceGroupIdsContainer = localGatewayVirtualInterfaceGroupIdsContainer { - localGatewayVirtualInterfaceGroupIdsBuffer = [Swift.String]() - for stringContainer0 in localGatewayVirtualInterfaceGroupIdsContainer { - localGatewayVirtualInterfaceGroupIdsBuffer?.append(stringContainer0) - } - } - localGatewayVirtualInterfaceGroupIds = localGatewayVirtualInterfaceGroupIdsBuffer - } else { - localGatewayVirtualInterfaceGroupIds = [] - } - } else { - localGatewayVirtualInterfaceGroupIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeLocalGatewayVirtualInterfaceGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLocalGatewayVirtualInterfaceGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayVirtualInterfaceGroups = output.localGatewayVirtualInterfaceGroups - self.nextToken = output.nextToken - } else { - self.localGatewayVirtualInterfaceGroups = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLocalGatewayVirtualInterfaceGroupsOutput() + value.localGatewayVirtualInterfaceGroups = try reader["localGatewayVirtualInterfaceGroupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalGatewayVirtualInterfaceGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -62325,48 +42994,18 @@ public struct DescribeLocalGatewayVirtualInterfaceGroupsOutput: Swift.Equatable } } -struct DescribeLocalGatewayVirtualInterfaceGroupsOutputBody: Swift.Equatable { - let localGatewayVirtualInterfaceGroups: [EC2ClientTypes.LocalGatewayVirtualInterfaceGroup]? - let nextToken: Swift.String? -} - -extension DescribeLocalGatewayVirtualInterfaceGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayVirtualInterfaceGroups = "localGatewayVirtualInterfaceGroupSet" - case nextToken = "nextToken" - } +enum DescribeLocalGatewayVirtualInterfaceGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayVirtualInterfaceGroups) { - struct KeyVal0{struct item{}} - let localGatewayVirtualInterfaceGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayVirtualInterfaceGroups) - if let localGatewayVirtualInterfaceGroupsWrappedContainer = localGatewayVirtualInterfaceGroupsWrappedContainer { - let localGatewayVirtualInterfaceGroupsContainer = try localGatewayVirtualInterfaceGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalGatewayVirtualInterfaceGroup].self, forKey: .member) - var localGatewayVirtualInterfaceGroupsBuffer:[EC2ClientTypes.LocalGatewayVirtualInterfaceGroup]? = nil - if let localGatewayVirtualInterfaceGroupsContainer = localGatewayVirtualInterfaceGroupsContainer { - localGatewayVirtualInterfaceGroupsBuffer = [EC2ClientTypes.LocalGatewayVirtualInterfaceGroup]() - for structureContainer0 in localGatewayVirtualInterfaceGroupsContainer { - localGatewayVirtualInterfaceGroupsBuffer?.append(structureContainer0) - } - } - localGatewayVirtualInterfaceGroups = localGatewayVirtualInterfaceGroupsBuffer - } else { - localGatewayVirtualInterfaceGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - localGatewayVirtualInterfaceGroups = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLocalGatewayVirtualInterfaceGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -62463,82 +43102,16 @@ public struct DescribeLocalGatewayVirtualInterfacesInput: Swift.Equatable { } } -struct DescribeLocalGatewayVirtualInterfacesInputBody: Swift.Equatable { - let localGatewayVirtualInterfaceIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeLocalGatewayVirtualInterfacesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case localGatewayVirtualInterfaceIds = "LocalGatewayVirtualInterfaceId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayVirtualInterfaceIds) { - struct KeyVal0{struct item{}} - let localGatewayVirtualInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayVirtualInterfaceIds) - if let localGatewayVirtualInterfaceIdsWrappedContainer = localGatewayVirtualInterfaceIdsWrappedContainer { - let localGatewayVirtualInterfaceIdsContainer = try localGatewayVirtualInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var localGatewayVirtualInterfaceIdsBuffer:[Swift.String]? = nil - if let localGatewayVirtualInterfaceIdsContainer = localGatewayVirtualInterfaceIdsContainer { - localGatewayVirtualInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in localGatewayVirtualInterfaceIdsContainer { - localGatewayVirtualInterfaceIdsBuffer?.append(stringContainer0) - } - } - localGatewayVirtualInterfaceIds = localGatewayVirtualInterfaceIdsBuffer - } else { - localGatewayVirtualInterfaceIds = [] - } - } else { - localGatewayVirtualInterfaceIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeLocalGatewayVirtualInterfacesOutput { -extension DescribeLocalGatewayVirtualInterfacesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLocalGatewayVirtualInterfacesOutputBody = try responseDecoder.decode(responseBody: data) - self.localGatewayVirtualInterfaces = output.localGatewayVirtualInterfaces - self.nextToken = output.nextToken - } else { - self.localGatewayVirtualInterfaces = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLocalGatewayVirtualInterfacesOutput() + value.localGatewayVirtualInterfaces = try reader["localGatewayVirtualInterfaceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalGatewayVirtualInterface.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -62559,48 +43132,18 @@ public struct DescribeLocalGatewayVirtualInterfacesOutput: Swift.Equatable { } } -struct DescribeLocalGatewayVirtualInterfacesOutputBody: Swift.Equatable { - let localGatewayVirtualInterfaces: [EC2ClientTypes.LocalGatewayVirtualInterface]? - let nextToken: Swift.String? -} - -extension DescribeLocalGatewayVirtualInterfacesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayVirtualInterfaces = "localGatewayVirtualInterfaceSet" - case nextToken = "nextToken" - } +enum DescribeLocalGatewayVirtualInterfacesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayVirtualInterfaces) { - struct KeyVal0{struct item{}} - let localGatewayVirtualInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayVirtualInterfaces) - if let localGatewayVirtualInterfacesWrappedContainer = localGatewayVirtualInterfacesWrappedContainer { - let localGatewayVirtualInterfacesContainer = try localGatewayVirtualInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalGatewayVirtualInterface].self, forKey: .member) - var localGatewayVirtualInterfacesBuffer:[EC2ClientTypes.LocalGatewayVirtualInterface]? = nil - if let localGatewayVirtualInterfacesContainer = localGatewayVirtualInterfacesContainer { - localGatewayVirtualInterfacesBuffer = [EC2ClientTypes.LocalGatewayVirtualInterface]() - for structureContainer0 in localGatewayVirtualInterfacesContainer { - localGatewayVirtualInterfacesBuffer?.append(structureContainer0) - } - } - localGatewayVirtualInterfaces = localGatewayVirtualInterfacesBuffer - } else { - localGatewayVirtualInterfaces = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - localGatewayVirtualInterfaces = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLocalGatewayVirtualInterfacesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -62689,82 +43232,16 @@ public struct DescribeLocalGatewaysInput: Swift.Equatable { } } -struct DescribeLocalGatewaysInputBody: Swift.Equatable { - let localGatewayIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeLocalGatewaysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case localGatewayIds = "LocalGatewayId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGatewayIds) { - struct KeyVal0{struct item{}} - let localGatewayIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayIds) - if let localGatewayIdsWrappedContainer = localGatewayIdsWrappedContainer { - let localGatewayIdsContainer = try localGatewayIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var localGatewayIdsBuffer:[Swift.String]? = nil - if let localGatewayIdsContainer = localGatewayIdsContainer { - localGatewayIdsBuffer = [Swift.String]() - for stringContainer0 in localGatewayIdsContainer { - localGatewayIdsBuffer?.append(stringContainer0) - } - } - localGatewayIds = localGatewayIdsBuffer - } else { - localGatewayIds = [] - } - } else { - localGatewayIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeLocalGatewaysOutput { -extension DescribeLocalGatewaysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLocalGatewaysOutputBody = try responseDecoder.decode(responseBody: data) - self.localGateways = output.localGateways - self.nextToken = output.nextToken - } else { - self.localGateways = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLocalGatewaysOutput() + value.localGateways = try reader["localGatewaySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalGateway.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -62785,48 +43262,18 @@ public struct DescribeLocalGatewaysOutput: Swift.Equatable { } } -struct DescribeLocalGatewaysOutputBody: Swift.Equatable { - let localGateways: [EC2ClientTypes.LocalGateway]? - let nextToken: Swift.String? -} +enum DescribeLocalGatewaysOutputError { -extension DescribeLocalGatewaysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGateways = "localGatewaySet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.localGateways) { - struct KeyVal0{struct item{}} - let localGatewaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGateways) - if let localGatewaysWrappedContainer = localGatewaysWrappedContainer { - let localGatewaysContainer = try localGatewaysWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalGateway].self, forKey: .member) - var localGatewaysBuffer:[EC2ClientTypes.LocalGateway]? = nil - if let localGatewaysContainer = localGatewaysContainer { - localGatewaysBuffer = [EC2ClientTypes.LocalGateway]() - for structureContainer0 in localGatewaysContainer { - localGatewaysBuffer?.append(structureContainer0) - } - } - localGateways = localGatewaysBuffer - } else { - localGateways = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - localGateways = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLocalGatewaysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -62909,82 +43356,16 @@ public struct DescribeLockedSnapshotsInput: Swift.Equatable { } } -struct DescribeLockedSnapshotsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let snapshotIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DescribeLockedSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case snapshotIds = "SnapshotId" - } +extension DescribeLockedSnapshotsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.snapshotIds) { - struct KeyVal0{struct SnapshotId{}} - let snapshotIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotIds) - if let snapshotIdsWrappedContainer = snapshotIdsWrappedContainer { - let snapshotIdsContainer = try snapshotIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var snapshotIdsBuffer:[Swift.String]? = nil - if let snapshotIdsContainer = snapshotIdsContainer { - snapshotIdsBuffer = [Swift.String]() - for stringContainer0 in snapshotIdsContainer { - snapshotIdsBuffer?.append(stringContainer0) - } - } - snapshotIds = snapshotIdsBuffer - } else { - snapshotIds = [] - } - } else { - snapshotIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeLockedSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLockedSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.snapshots = output.snapshots - } else { - self.nextToken = nil - self.snapshots = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeLockedSnapshotsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.snapshots = try reader["snapshotSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LockedSnapshotsInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -63005,48 +43386,18 @@ public struct DescribeLockedSnapshotsOutput: Swift.Equatable { } } -struct DescribeLockedSnapshotsOutputBody: Swift.Equatable { - let snapshots: [EC2ClientTypes.LockedSnapshotsInfo]? - let nextToken: Swift.String? -} - -extension DescribeLockedSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case snapshots = "snapshotSet" - } +enum DescribeLockedSnapshotsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.snapshots) { - struct KeyVal0{struct item{}} - let snapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshots) - if let snapshotsWrappedContainer = snapshotsWrappedContainer { - let snapshotsContainer = try snapshotsWrappedContainer.decodeIfPresent([EC2ClientTypes.LockedSnapshotsInfo].self, forKey: .member) - var snapshotsBuffer:[EC2ClientTypes.LockedSnapshotsInfo]? = nil - if let snapshotsContainer = snapshotsContainer { - snapshotsBuffer = [EC2ClientTypes.LockedSnapshotsInfo]() - for structureContainer0 in snapshotsContainer { - snapshotsBuffer?.append(structureContainer0) - } - } - snapshots = snapshotsBuffer - } else { - snapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - snapshots = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeLockedSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -63133,82 +43484,16 @@ public struct DescribeManagedPrefixListsInput: Swift.Equatable { } } -struct DescribeManagedPrefixListsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let prefixListIds: [Swift.String]? -} - -extension DescribeManagedPrefixListsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case prefixListIds = "PrefixListId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.prefixListIds) { - struct KeyVal0{struct item{}} - let prefixListIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .prefixListIds) - if let prefixListIdsWrappedContainer = prefixListIdsWrappedContainer { - let prefixListIdsContainer = try prefixListIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var prefixListIdsBuffer:[Swift.String]? = nil - if let prefixListIdsContainer = prefixListIdsContainer { - prefixListIdsBuffer = [Swift.String]() - for stringContainer0 in prefixListIdsContainer { - prefixListIdsBuffer?.append(stringContainer0) - } - } - prefixListIds = prefixListIdsBuffer - } else { - prefixListIds = [] - } - } else { - prefixListIds = nil - } - } -} +extension DescribeManagedPrefixListsOutput { -extension DescribeManagedPrefixListsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeManagedPrefixListsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.prefixLists = output.prefixLists - } else { - self.nextToken = nil - self.prefixLists = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeManagedPrefixListsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.prefixLists = try reader["prefixListSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ManagedPrefixList.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -63229,48 +43514,18 @@ public struct DescribeManagedPrefixListsOutput: Swift.Equatable { } } -struct DescribeManagedPrefixListsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let prefixLists: [EC2ClientTypes.ManagedPrefixList]? -} - -extension DescribeManagedPrefixListsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case prefixLists = "prefixListSet" - } +enum DescribeManagedPrefixListsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.prefixLists) { - struct KeyVal0{struct item{}} - let prefixListsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .prefixLists) - if let prefixListsWrappedContainer = prefixListsWrappedContainer { - let prefixListsContainer = try prefixListsWrappedContainer.decodeIfPresent([EC2ClientTypes.ManagedPrefixList].self, forKey: .member) - var prefixListsBuffer:[EC2ClientTypes.ManagedPrefixList]? = nil - if let prefixListsContainer = prefixListsContainer { - prefixListsBuffer = [EC2ClientTypes.ManagedPrefixList]() - for structureContainer0 in prefixListsContainer { - prefixListsBuffer?.append(structureContainer0) - } - } - prefixLists = prefixListsBuffer - } else { - prefixLists = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - prefixLists = nil - } - } -} - -enum DescribeManagedPrefixListsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -63353,82 +43608,16 @@ public struct DescribeMovingAddressesInput: Swift.Equatable { } } -struct DescribeMovingAddressesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let publicIps: [Swift.String]? -} - -extension DescribeMovingAddressesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "filter" - case maxResults = "maxResults" - case nextToken = "nextToken" - case publicIps = "publicIp" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.publicIps) { - struct KeyVal0{struct item{}} - let publicIpsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .publicIps) - if let publicIpsWrappedContainer = publicIpsWrappedContainer { - let publicIpsContainer = try publicIpsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var publicIpsBuffer:[Swift.String]? = nil - if let publicIpsContainer = publicIpsContainer { - publicIpsBuffer = [Swift.String]() - for stringContainer0 in publicIpsContainer { - publicIpsBuffer?.append(stringContainer0) - } - } - publicIps = publicIpsBuffer - } else { - publicIps = [] - } - } else { - publicIps = nil - } - } -} +extension DescribeMovingAddressesOutput { -extension DescribeMovingAddressesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeMovingAddressesOutputBody = try responseDecoder.decode(responseBody: data) - self.movingAddressStatuses = output.movingAddressStatuses - self.nextToken = output.nextToken - } else { - self.movingAddressStatuses = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeMovingAddressesOutput() + value.movingAddressStatuses = try reader["movingAddressStatusSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.MovingAddressStatus.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -63449,48 +43638,18 @@ public struct DescribeMovingAddressesOutput: Swift.Equatable { } } -struct DescribeMovingAddressesOutputBody: Swift.Equatable { - let movingAddressStatuses: [EC2ClientTypes.MovingAddressStatus]? - let nextToken: Swift.String? -} +enum DescribeMovingAddressesOutputError { -extension DescribeMovingAddressesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case movingAddressStatuses = "movingAddressStatusSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.movingAddressStatuses) { - struct KeyVal0{struct item{}} - let movingAddressStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .movingAddressStatuses) - if let movingAddressStatusesWrappedContainer = movingAddressStatusesWrappedContainer { - let movingAddressStatusesContainer = try movingAddressStatusesWrappedContainer.decodeIfPresent([EC2ClientTypes.MovingAddressStatus].self, forKey: .member) - var movingAddressStatusesBuffer:[EC2ClientTypes.MovingAddressStatus]? = nil - if let movingAddressStatusesContainer = movingAddressStatusesContainer { - movingAddressStatusesBuffer = [EC2ClientTypes.MovingAddressStatus]() - for structureContainer0 in movingAddressStatusesContainer { - movingAddressStatusesBuffer?.append(structureContainer0) - } - } - movingAddressStatuses = movingAddressStatusesBuffer - } else { - movingAddressStatuses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - movingAddressStatuses = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeMovingAddressesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -63583,82 +43742,16 @@ public struct DescribeNatGatewaysInput: Swift.Equatable { } } -struct DescribeNatGatewaysInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filter: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let natGatewayIds: [Swift.String]? - let nextToken: Swift.String? -} - -extension DescribeNatGatewaysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filter = "Filter" - case maxResults = "MaxResults" - case natGatewayIds = "NatGatewayId" - case nextToken = "NextToken" - } +extension DescribeNatGatewaysOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filter) { - struct KeyVal0{struct Filter{}} - let filterWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filter) - if let filterWrappedContainer = filterWrappedContainer { - let filterContainer = try filterWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filterBuffer:[EC2ClientTypes.Filter]? = nil - if let filterContainer = filterContainer { - filterBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filterContainer { - filterBuffer?.append(structureContainer0) - } - } - filter = filterBuffer - } else { - filter = [] - } - } else { - filter = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.natGatewayIds) { - struct KeyVal0{struct item{}} - let natGatewayIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .natGatewayIds) - if let natGatewayIdsWrappedContainer = natGatewayIdsWrappedContainer { - let natGatewayIdsContainer = try natGatewayIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var natGatewayIdsBuffer:[Swift.String]? = nil - if let natGatewayIdsContainer = natGatewayIdsContainer { - natGatewayIdsBuffer = [Swift.String]() - for stringContainer0 in natGatewayIdsContainer { - natGatewayIdsBuffer?.append(stringContainer0) - } - } - natGatewayIds = natGatewayIdsBuffer - } else { - natGatewayIds = [] - } - } else { - natGatewayIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeNatGatewaysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNatGatewaysOutputBody = try responseDecoder.decode(responseBody: data) - self.natGateways = output.natGateways - self.nextToken = output.nextToken - } else { - self.natGateways = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNatGatewaysOutput() + value.natGateways = try reader["natGatewaySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NatGateway.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -63679,48 +43772,18 @@ public struct DescribeNatGatewaysOutput: Swift.Equatable { } } -struct DescribeNatGatewaysOutputBody: Swift.Equatable { - let natGateways: [EC2ClientTypes.NatGateway]? - let nextToken: Swift.String? -} - -extension DescribeNatGatewaysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case natGateways = "natGatewaySet" - case nextToken = "nextToken" - } +enum DescribeNatGatewaysOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.natGateways) { - struct KeyVal0{struct item{}} - let natGatewaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .natGateways) - if let natGatewaysWrappedContainer = natGatewaysWrappedContainer { - let natGatewaysContainer = try natGatewaysWrappedContainer.decodeIfPresent([EC2ClientTypes.NatGateway].self, forKey: .member) - var natGatewaysBuffer:[EC2ClientTypes.NatGateway]? = nil - if let natGatewaysContainer = natGatewaysContainer { - natGatewaysBuffer = [EC2ClientTypes.NatGateway]() - for structureContainer0 in natGatewaysContainer { - natGatewaysBuffer?.append(structureContainer0) - } - } - natGateways = natGatewaysBuffer - } else { - natGateways = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - natGateways = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeNatGatewaysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -63839,82 +43902,16 @@ public struct DescribeNetworkAclsInput: Swift.Equatable { } } -struct DescribeNetworkAclsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let networkAclIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeNetworkAclsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case networkAclIds = "NetworkAclId" - case nextToken = "NextToken" - } +extension DescribeNetworkAclsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.networkAclIds) { - struct KeyVal0{struct item{}} - let networkAclIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkAclIds) - if let networkAclIdsWrappedContainer = networkAclIdsWrappedContainer { - let networkAclIdsContainer = try networkAclIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkAclIdsBuffer:[Swift.String]? = nil - if let networkAclIdsContainer = networkAclIdsContainer { - networkAclIdsBuffer = [Swift.String]() - for stringContainer0 in networkAclIdsContainer { - networkAclIdsBuffer?.append(stringContainer0) - } - } - networkAclIds = networkAclIdsBuffer - } else { - networkAclIds = [] - } - } else { - networkAclIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeNetworkAclsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNetworkAclsOutputBody = try responseDecoder.decode(responseBody: data) - self.networkAcls = output.networkAcls - self.nextToken = output.nextToken - } else { - self.networkAcls = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNetworkAclsOutput() + value.networkAcls = try reader["networkAclSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkAcl.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -63935,48 +43932,18 @@ public struct DescribeNetworkAclsOutput: Swift.Equatable { } } -struct DescribeNetworkAclsOutputBody: Swift.Equatable { - let networkAcls: [EC2ClientTypes.NetworkAcl]? - let nextToken: Swift.String? -} +enum DescribeNetworkAclsOutputError { -extension DescribeNetworkAclsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkAcls = "networkAclSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkAcls) { - struct KeyVal0{struct item{}} - let networkAclsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkAcls) - if let networkAclsWrappedContainer = networkAclsWrappedContainer { - let networkAclsContainer = try networkAclsWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkAcl].self, forKey: .member) - var networkAclsBuffer:[EC2ClientTypes.NetworkAcl]? = nil - if let networkAclsContainer = networkAclsContainer { - networkAclsBuffer = [EC2ClientTypes.NetworkAcl]() - for structureContainer0 in networkAclsContainer { - networkAclsBuffer?.append(structureContainer0) - } - } - networkAcls = networkAclsBuffer - } else { - networkAcls = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - networkAcls = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeNetworkAclsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -64078,94 +44045,16 @@ public struct DescribeNetworkInsightsAccessScopeAnalysesInput: Swift.Equatable { } } -struct DescribeNetworkInsightsAccessScopeAnalysesInputBody: Swift.Equatable { - let networkInsightsAccessScopeAnalysisIds: [Swift.String]? - let networkInsightsAccessScopeId: Swift.String? - let analysisStartTimeBegin: ClientRuntime.Date? - let analysisStartTimeEnd: ClientRuntime.Date? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? - let nextToken: Swift.String? -} - -extension DescribeNetworkInsightsAccessScopeAnalysesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisStartTimeBegin = "AnalysisStartTimeBegin" - case analysisStartTimeEnd = "AnalysisStartTimeEnd" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case networkInsightsAccessScopeAnalysisIds = "NetworkInsightsAccessScopeAnalysisId" - case networkInsightsAccessScopeId = "NetworkInsightsAccessScopeId" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInsightsAccessScopeAnalysisIds) { - struct KeyVal0{struct item{}} - let networkInsightsAccessScopeAnalysisIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInsightsAccessScopeAnalysisIds) - if let networkInsightsAccessScopeAnalysisIdsWrappedContainer = networkInsightsAccessScopeAnalysisIdsWrappedContainer { - let networkInsightsAccessScopeAnalysisIdsContainer = try networkInsightsAccessScopeAnalysisIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInsightsAccessScopeAnalysisIdsBuffer:[Swift.String]? = nil - if let networkInsightsAccessScopeAnalysisIdsContainer = networkInsightsAccessScopeAnalysisIdsContainer { - networkInsightsAccessScopeAnalysisIdsBuffer = [Swift.String]() - for stringContainer0 in networkInsightsAccessScopeAnalysisIdsContainer { - networkInsightsAccessScopeAnalysisIdsBuffer?.append(stringContainer0) - } - } - networkInsightsAccessScopeAnalysisIds = networkInsightsAccessScopeAnalysisIdsBuffer - } else { - networkInsightsAccessScopeAnalysisIds = [] - } - } else { - networkInsightsAccessScopeAnalysisIds = nil - } - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - let analysisStartTimeBeginDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .analysisStartTimeBegin) - analysisStartTimeBegin = analysisStartTimeBeginDecoded - let analysisStartTimeEndDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .analysisStartTimeEnd) - analysisStartTimeEnd = analysisStartTimeEndDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeNetworkInsightsAccessScopeAnalysesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNetworkInsightsAccessScopeAnalysesOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAccessScopeAnalyses = output.networkInsightsAccessScopeAnalyses - self.nextToken = output.nextToken - } else { - self.networkInsightsAccessScopeAnalyses = nil - self.nextToken = nil +extension DescribeNetworkInsightsAccessScopeAnalysesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNetworkInsightsAccessScopeAnalysesOutput() + value.networkInsightsAccessScopeAnalyses = try reader["networkInsightsAccessScopeAnalysisSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkInsightsAccessScopeAnalysis.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -64186,48 +44075,18 @@ public struct DescribeNetworkInsightsAccessScopeAnalysesOutput: Swift.Equatable } } -struct DescribeNetworkInsightsAccessScopeAnalysesOutputBody: Swift.Equatable { - let networkInsightsAccessScopeAnalyses: [EC2ClientTypes.NetworkInsightsAccessScopeAnalysis]? - let nextToken: Swift.String? -} - -extension DescribeNetworkInsightsAccessScopeAnalysesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAccessScopeAnalyses = "networkInsightsAccessScopeAnalysisSet" - case nextToken = "nextToken" - } +enum DescribeNetworkInsightsAccessScopeAnalysesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInsightsAccessScopeAnalyses) { - struct KeyVal0{struct item{}} - let networkInsightsAccessScopeAnalysesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInsightsAccessScopeAnalyses) - if let networkInsightsAccessScopeAnalysesWrappedContainer = networkInsightsAccessScopeAnalysesWrappedContainer { - let networkInsightsAccessScopeAnalysesContainer = try networkInsightsAccessScopeAnalysesWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkInsightsAccessScopeAnalysis].self, forKey: .member) - var networkInsightsAccessScopeAnalysesBuffer:[EC2ClientTypes.NetworkInsightsAccessScopeAnalysis]? = nil - if let networkInsightsAccessScopeAnalysesContainer = networkInsightsAccessScopeAnalysesContainer { - networkInsightsAccessScopeAnalysesBuffer = [EC2ClientTypes.NetworkInsightsAccessScopeAnalysis]() - for structureContainer0 in networkInsightsAccessScopeAnalysesContainer { - networkInsightsAccessScopeAnalysesBuffer?.append(structureContainer0) - } - } - networkInsightsAccessScopeAnalyses = networkInsightsAccessScopeAnalysesBuffer - } else { - networkInsightsAccessScopeAnalyses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - networkInsightsAccessScopeAnalyses = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeNetworkInsightsAccessScopeAnalysesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -64308,82 +44167,16 @@ public struct DescribeNetworkInsightsAccessScopesInput: Swift.Equatable { } } -struct DescribeNetworkInsightsAccessScopesInputBody: Swift.Equatable { - let networkInsightsAccessScopeIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? - let nextToken: Swift.String? -} +extension DescribeNetworkInsightsAccessScopesOutput { -extension DescribeNetworkInsightsAccessScopesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case networkInsightsAccessScopeIds = "NetworkInsightsAccessScopeId" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInsightsAccessScopeIds) { - struct KeyVal0{struct item{}} - let networkInsightsAccessScopeIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInsightsAccessScopeIds) - if let networkInsightsAccessScopeIdsWrappedContainer = networkInsightsAccessScopeIdsWrappedContainer { - let networkInsightsAccessScopeIdsContainer = try networkInsightsAccessScopeIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInsightsAccessScopeIdsBuffer:[Swift.String]? = nil - if let networkInsightsAccessScopeIdsContainer = networkInsightsAccessScopeIdsContainer { - networkInsightsAccessScopeIdsBuffer = [Swift.String]() - for stringContainer0 in networkInsightsAccessScopeIdsContainer { - networkInsightsAccessScopeIdsBuffer?.append(stringContainer0) - } - } - networkInsightsAccessScopeIds = networkInsightsAccessScopeIdsBuffer - } else { - networkInsightsAccessScopeIds = [] - } - } else { - networkInsightsAccessScopeIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeNetworkInsightsAccessScopesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNetworkInsightsAccessScopesOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAccessScopes = output.networkInsightsAccessScopes - self.nextToken = output.nextToken - } else { - self.networkInsightsAccessScopes = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNetworkInsightsAccessScopesOutput() + value.networkInsightsAccessScopes = try reader["networkInsightsAccessScopeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkInsightsAccessScope.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -64404,48 +44197,18 @@ public struct DescribeNetworkInsightsAccessScopesOutput: Swift.Equatable { } } -struct DescribeNetworkInsightsAccessScopesOutputBody: Swift.Equatable { - let networkInsightsAccessScopes: [EC2ClientTypes.NetworkInsightsAccessScope]? - let nextToken: Swift.String? -} +enum DescribeNetworkInsightsAccessScopesOutputError { -extension DescribeNetworkInsightsAccessScopesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAccessScopes = "networkInsightsAccessScopeSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInsightsAccessScopes) { - struct KeyVal0{struct item{}} - let networkInsightsAccessScopesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInsightsAccessScopes) - if let networkInsightsAccessScopesWrappedContainer = networkInsightsAccessScopesWrappedContainer { - let networkInsightsAccessScopesContainer = try networkInsightsAccessScopesWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkInsightsAccessScope].self, forKey: .member) - var networkInsightsAccessScopesBuffer:[EC2ClientTypes.NetworkInsightsAccessScope]? = nil - if let networkInsightsAccessScopesContainer = networkInsightsAccessScopesContainer { - networkInsightsAccessScopesBuffer = [EC2ClientTypes.NetworkInsightsAccessScope]() - for structureContainer0 in networkInsightsAccessScopesContainer { - networkInsightsAccessScopesBuffer?.append(structureContainer0) - } - } - networkInsightsAccessScopes = networkInsightsAccessScopesBuffer - } else { - networkInsightsAccessScopes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - networkInsightsAccessScopes = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeNetworkInsightsAccessScopesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -64551,94 +44314,16 @@ public struct DescribeNetworkInsightsAnalysesInput: Swift.Equatable { } } -struct DescribeNetworkInsightsAnalysesInputBody: Swift.Equatable { - let networkInsightsAnalysisIds: [Swift.String]? - let networkInsightsPathId: Swift.String? - let analysisStartTime: ClientRuntime.Date? - let analysisEndTime: ClientRuntime.Date? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? - let nextToken: Swift.String? -} - -extension DescribeNetworkInsightsAnalysesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisEndTime = "AnalysisEndTime" - case analysisStartTime = "AnalysisStartTime" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case networkInsightsAnalysisIds = "NetworkInsightsAnalysisId" - case networkInsightsPathId = "NetworkInsightsPathId" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInsightsAnalysisIds) { - struct KeyVal0{struct item{}} - let networkInsightsAnalysisIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInsightsAnalysisIds) - if let networkInsightsAnalysisIdsWrappedContainer = networkInsightsAnalysisIdsWrappedContainer { - let networkInsightsAnalysisIdsContainer = try networkInsightsAnalysisIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInsightsAnalysisIdsBuffer:[Swift.String]? = nil - if let networkInsightsAnalysisIdsContainer = networkInsightsAnalysisIdsContainer { - networkInsightsAnalysisIdsBuffer = [Swift.String]() - for stringContainer0 in networkInsightsAnalysisIdsContainer { - networkInsightsAnalysisIdsBuffer?.append(stringContainer0) - } - } - networkInsightsAnalysisIds = networkInsightsAnalysisIdsBuffer - } else { - networkInsightsAnalysisIds = [] - } - } else { - networkInsightsAnalysisIds = nil - } - let networkInsightsPathIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsPathId) - networkInsightsPathId = networkInsightsPathIdDecoded - let analysisStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .analysisStartTime) - analysisStartTime = analysisStartTimeDecoded - let analysisEndTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .analysisEndTime) - analysisEndTime = analysisEndTimeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeNetworkInsightsAnalysesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNetworkInsightsAnalysesOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAnalyses = output.networkInsightsAnalyses - self.nextToken = output.nextToken - } else { - self.networkInsightsAnalyses = nil - self.nextToken = nil +extension DescribeNetworkInsightsAnalysesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNetworkInsightsAnalysesOutput() + value.networkInsightsAnalyses = try reader["networkInsightsAnalysisSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkInsightsAnalysis.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -64659,48 +44344,18 @@ public struct DescribeNetworkInsightsAnalysesOutput: Swift.Equatable { } } -struct DescribeNetworkInsightsAnalysesOutputBody: Swift.Equatable { - let networkInsightsAnalyses: [EC2ClientTypes.NetworkInsightsAnalysis]? - let nextToken: Swift.String? -} +enum DescribeNetworkInsightsAnalysesOutputError { -extension DescribeNetworkInsightsAnalysesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAnalyses = "networkInsightsAnalysisSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInsightsAnalyses) { - struct KeyVal0{struct item{}} - let networkInsightsAnalysesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInsightsAnalyses) - if let networkInsightsAnalysesWrappedContainer = networkInsightsAnalysesWrappedContainer { - let networkInsightsAnalysesContainer = try networkInsightsAnalysesWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkInsightsAnalysis].self, forKey: .member) - var networkInsightsAnalysesBuffer:[EC2ClientTypes.NetworkInsightsAnalysis]? = nil - if let networkInsightsAnalysesContainer = networkInsightsAnalysesContainer { - networkInsightsAnalysesBuffer = [EC2ClientTypes.NetworkInsightsAnalysis]() - for structureContainer0 in networkInsightsAnalysesContainer { - networkInsightsAnalysesBuffer?.append(structureContainer0) - } - } - networkInsightsAnalyses = networkInsightsAnalysesBuffer - } else { - networkInsightsAnalyses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - networkInsightsAnalyses = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeNetworkInsightsAnalysesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -64803,82 +44458,16 @@ public struct DescribeNetworkInsightsPathsInput: Swift.Equatable { } } -struct DescribeNetworkInsightsPathsInputBody: Swift.Equatable { - let networkInsightsPathIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? - let nextToken: Swift.String? -} - -extension DescribeNetworkInsightsPathsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case networkInsightsPathIds = "NetworkInsightsPathId" - case nextToken = "NextToken" - } +extension DescribeNetworkInsightsPathsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInsightsPathIds) { - struct KeyVal0{struct item{}} - let networkInsightsPathIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInsightsPathIds) - if let networkInsightsPathIdsWrappedContainer = networkInsightsPathIdsWrappedContainer { - let networkInsightsPathIdsContainer = try networkInsightsPathIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInsightsPathIdsBuffer:[Swift.String]? = nil - if let networkInsightsPathIdsContainer = networkInsightsPathIdsContainer { - networkInsightsPathIdsBuffer = [Swift.String]() - for stringContainer0 in networkInsightsPathIdsContainer { - networkInsightsPathIdsBuffer?.append(stringContainer0) - } - } - networkInsightsPathIds = networkInsightsPathIdsBuffer - } else { - networkInsightsPathIds = [] - } - } else { - networkInsightsPathIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeNetworkInsightsPathsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNetworkInsightsPathsOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsPaths = output.networkInsightsPaths - self.nextToken = output.nextToken - } else { - self.networkInsightsPaths = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNetworkInsightsPathsOutput() + value.networkInsightsPaths = try reader["networkInsightsPathSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkInsightsPath.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -64899,48 +44488,18 @@ public struct DescribeNetworkInsightsPathsOutput: Swift.Equatable { } } -struct DescribeNetworkInsightsPathsOutputBody: Swift.Equatable { - let networkInsightsPaths: [EC2ClientTypes.NetworkInsightsPath]? - let nextToken: Swift.String? -} - -extension DescribeNetworkInsightsPathsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsPaths = "networkInsightsPathSet" - case nextToken = "nextToken" - } +enum DescribeNetworkInsightsPathsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInsightsPaths) { - struct KeyVal0{struct item{}} - let networkInsightsPathsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInsightsPaths) - if let networkInsightsPathsWrappedContainer = networkInsightsPathsWrappedContainer { - let networkInsightsPathsContainer = try networkInsightsPathsWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkInsightsPath].self, forKey: .member) - var networkInsightsPathsBuffer:[EC2ClientTypes.NetworkInsightsPath]? = nil - if let networkInsightsPathsContainer = networkInsightsPathsContainer { - networkInsightsPathsBuffer = [EC2ClientTypes.NetworkInsightsPath]() - for structureContainer0 in networkInsightsPathsContainer { - networkInsightsPathsBuffer?.append(structureContainer0) - } - } - networkInsightsPaths = networkInsightsPathsBuffer - } else { - networkInsightsPaths = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - networkInsightsPaths = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeNetworkInsightsPathsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -64991,46 +44550,19 @@ public struct DescribeNetworkInterfaceAttributeInput: Swift.Equatable { } } -struct DescribeNetworkInterfaceAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.NetworkInterfaceAttribute? - let dryRun: Swift.Bool? - let networkInterfaceId: Swift.String? -} - -extension DescribeNetworkInterfaceAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "attribute" - case dryRun = "dryRun" - case networkInterfaceId = "networkInterfaceId" - } +extension DescribeNetworkInterfaceAttributeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceAttribute.self, forKey: .attribute) - attribute = attributeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - } -} - -extension DescribeNetworkInterfaceAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNetworkInterfaceAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.attachment = output.attachment - self.description = output.description - self.groups = output.groups - self.networkInterfaceId = output.networkInterfaceId - self.sourceDestCheck = output.sourceDestCheck - } else { - self.attachment = nil - self.description = nil - self.groups = nil - self.networkInterfaceId = nil - self.sourceDestCheck = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNetworkInterfaceAttributeOutput() + value.attachment = try reader["attachment"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterfaceAttachment.readingClosure) + value.description = try reader["description"].readIfPresent(readingClosure: EC2ClientTypes.AttributeValue.readingClosure) + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.sourceDestCheck = try reader["sourceDestCheck"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + return value } } } @@ -65064,60 +44596,18 @@ public struct DescribeNetworkInterfaceAttributeOutput: Swift.Equatable { } } -struct DescribeNetworkInterfaceAttributeOutputBody: Swift.Equatable { - let attachment: EC2ClientTypes.NetworkInterfaceAttachment? - let description: EC2ClientTypes.AttributeValue? - let groups: [EC2ClientTypes.GroupIdentifier]? - let networkInterfaceId: Swift.String? - let sourceDestCheck: EC2ClientTypes.AttributeBooleanValue? -} - -extension DescribeNetworkInterfaceAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachment = "attachment" - case description = "description" - case groups = "groupSet" - case networkInterfaceId = "networkInterfaceId" - case sourceDestCheck = "sourceDestCheck" - } +enum DescribeNetworkInterfaceAttributeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceAttachment.self, forKey: .attachment) - attachment = attachmentDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct item{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var groupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - groups = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let sourceDestCheckDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .sourceDestCheck) - sourceDestCheck = sourceDestCheckDecoded - } -} - -enum DescribeNetworkInterfaceAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -65202,78 +44692,16 @@ public struct DescribeNetworkInterfacePermissionsInput: Swift.Equatable { } } -struct DescribeNetworkInterfacePermissionsInputBody: Swift.Equatable { - let networkInterfacePermissionIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeNetworkInterfacePermissionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filter" - case maxResults = "MaxResults" - case networkInterfacePermissionIds = "NetworkInterfacePermissionId" - case nextToken = "NextToken" - } +extension DescribeNetworkInterfacePermissionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInterfacePermissionIds) { - struct KeyVal0{struct member{}} - let networkInterfacePermissionIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfacePermissionIds) - if let networkInterfacePermissionIdsWrappedContainer = networkInterfacePermissionIdsWrappedContainer { - let networkInterfacePermissionIdsContainer = try networkInterfacePermissionIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInterfacePermissionIdsBuffer:[Swift.String]? = nil - if let networkInterfacePermissionIdsContainer = networkInterfacePermissionIdsContainer { - networkInterfacePermissionIdsBuffer = [Swift.String]() - for stringContainer0 in networkInterfacePermissionIdsContainer { - networkInterfacePermissionIdsBuffer?.append(stringContainer0) - } - } - networkInterfacePermissionIds = networkInterfacePermissionIdsBuffer - } else { - networkInterfacePermissionIds = [] - } - } else { - networkInterfacePermissionIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeNetworkInterfacePermissionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNetworkInterfacePermissionsOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInterfacePermissions = output.networkInterfacePermissions - self.nextToken = output.nextToken - } else { - self.networkInterfacePermissions = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNetworkInterfacePermissionsOutput() + value.networkInterfacePermissions = try reader["networkInterfacePermissions"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkInterfacePermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -65295,48 +44723,18 @@ public struct DescribeNetworkInterfacePermissionsOutput: Swift.Equatable { } } -struct DescribeNetworkInterfacePermissionsOutputBody: Swift.Equatable { - let networkInterfacePermissions: [EC2ClientTypes.NetworkInterfacePermission]? - let nextToken: Swift.String? -} - -extension DescribeNetworkInterfacePermissionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInterfacePermissions = "networkInterfacePermissions" - case nextToken = "nextToken" - } +enum DescribeNetworkInterfacePermissionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInterfacePermissions) { - struct KeyVal0{struct item{}} - let networkInterfacePermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfacePermissions) - if let networkInterfacePermissionsWrappedContainer = networkInterfacePermissionsWrappedContainer { - let networkInterfacePermissionsContainer = try networkInterfacePermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkInterfacePermission].self, forKey: .member) - var networkInterfacePermissionsBuffer:[EC2ClientTypes.NetworkInterfacePermission]? = nil - if let networkInterfacePermissionsContainer = networkInterfacePermissionsContainer { - networkInterfacePermissionsBuffer = [EC2ClientTypes.NetworkInterfacePermission]() - for structureContainer0 in networkInterfacePermissionsContainer { - networkInterfacePermissionsBuffer?.append(structureContainer0) - } - } - networkInterfacePermissions = networkInterfacePermissionsBuffer - } else { - networkInterfacePermissions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - networkInterfacePermissions = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeNetworkInterfacePermissionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -65486,82 +44884,16 @@ public struct DescribeNetworkInterfacesInput: Swift.Equatable { } } -struct DescribeNetworkInterfacesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let networkInterfaceIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeNetworkInterfacesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "filter" - case maxResults = "MaxResults" - case networkInterfaceIds = "NetworkInterfaceId" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.networkInterfaceIds) { - struct KeyVal0{struct item{}} - let networkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaceIds) - if let networkInterfaceIdsWrappedContainer = networkInterfaceIdsWrappedContainer { - let networkInterfaceIdsContainer = try networkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInterfaceIdsBuffer:[Swift.String]? = nil - if let networkInterfaceIdsContainer = networkInterfaceIdsContainer { - networkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in networkInterfaceIdsContainer { - networkInterfaceIdsBuffer?.append(stringContainer0) - } - } - networkInterfaceIds = networkInterfaceIdsBuffer - } else { - networkInterfaceIds = [] - } - } else { - networkInterfaceIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeNetworkInterfacesOutput { -extension DescribeNetworkInterfacesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNetworkInterfacesOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInterfaces = output.networkInterfaces - self.nextToken = output.nextToken - } else { - self.networkInterfaces = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeNetworkInterfacesOutput() + value.networkInterfaces = try reader["networkInterfaceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkInterface.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -65582,48 +44914,18 @@ public struct DescribeNetworkInterfacesOutput: Swift.Equatable { } } -struct DescribeNetworkInterfacesOutputBody: Swift.Equatable { - let networkInterfaces: [EC2ClientTypes.NetworkInterface]? - let nextToken: Swift.String? -} - -extension DescribeNetworkInterfacesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInterfaces = "networkInterfaceSet" - case nextToken = "nextToken" - } +enum DescribeNetworkInterfacesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct item{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkInterface].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.NetworkInterface]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.NetworkInterface]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - networkInterfaces = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeNetworkInterfacesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -65720,93 +45022,15 @@ public struct DescribePlacementGroupsInput: Swift.Equatable { } } -struct DescribePlacementGroupsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let groupNames: [Swift.String]? - let groupIds: [Swift.String]? -} - -extension DescribePlacementGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case groupIds = "GroupId" - case groupNames = "groupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.groupNames) { - struct KeyVal0{struct member{}} - let groupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupNames) - if let groupNamesWrappedContainer = groupNamesWrappedContainer { - let groupNamesContainer = try groupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupNamesBuffer:[Swift.String]? = nil - if let groupNamesContainer = groupNamesContainer { - groupNamesBuffer = [Swift.String]() - for stringContainer0 in groupNamesContainer { - groupNamesBuffer?.append(stringContainer0) - } - } - groupNames = groupNamesBuffer - } else { - groupNames = [] - } - } else { - groupNames = nil - } - if containerValues.contains(.groupIds) { - struct KeyVal0{struct GroupId{}} - let groupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupIds) - if let groupIdsWrappedContainer = groupIdsWrappedContainer { - let groupIdsContainer = try groupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupIdsBuffer:[Swift.String]? = nil - if let groupIdsContainer = groupIdsContainer { - groupIdsBuffer = [Swift.String]() - for stringContainer0 in groupIdsContainer { - groupIdsBuffer?.append(stringContainer0) - } - } - groupIds = groupIdsBuffer - } else { - groupIds = [] - } - } else { - groupIds = nil - } - } -} +extension DescribePlacementGroupsOutput { -extension DescribePlacementGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePlacementGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.placementGroups = output.placementGroups - } else { - self.placementGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribePlacementGroupsOutput() + value.placementGroups = try reader["placementGroupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PlacementGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -65823,44 +45047,18 @@ public struct DescribePlacementGroupsOutput: Swift.Equatable { } } -struct DescribePlacementGroupsOutputBody: Swift.Equatable { - let placementGroups: [EC2ClientTypes.PlacementGroup]? -} - -extension DescribePlacementGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case placementGroups = "placementGroupSet" - } +enum DescribePlacementGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.placementGroups) { - struct KeyVal0{struct item{}} - let placementGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .placementGroups) - if let placementGroupsWrappedContainer = placementGroupsWrappedContainer { - let placementGroupsContainer = try placementGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.PlacementGroup].self, forKey: .member) - var placementGroupsBuffer:[EC2ClientTypes.PlacementGroup]? = nil - if let placementGroupsContainer = placementGroupsContainer { - placementGroupsBuffer = [EC2ClientTypes.PlacementGroup]() - for structureContainer0 in placementGroupsContainer { - placementGroupsBuffer?.append(structureContainer0) - } - } - placementGroups = placementGroupsBuffer - } else { - placementGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - placementGroups = nil - } - } -} - -enum DescribePlacementGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -65945,82 +45143,16 @@ public struct DescribePrefixListsInput: Swift.Equatable { } } -struct DescribePrefixListsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let prefixListIds: [Swift.String]? -} - -extension DescribePrefixListsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case prefixListIds = "PrefixListId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.prefixListIds) { - struct KeyVal0{struct item{}} - let prefixListIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .prefixListIds) - if let prefixListIdsWrappedContainer = prefixListIdsWrappedContainer { - let prefixListIdsContainer = try prefixListIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var prefixListIdsBuffer:[Swift.String]? = nil - if let prefixListIdsContainer = prefixListIdsContainer { - prefixListIdsBuffer = [Swift.String]() - for stringContainer0 in prefixListIdsContainer { - prefixListIdsBuffer?.append(stringContainer0) - } - } - prefixListIds = prefixListIdsBuffer - } else { - prefixListIds = [] - } - } else { - prefixListIds = nil - } - } -} +extension DescribePrefixListsOutput { -extension DescribePrefixListsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePrefixListsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.prefixLists = output.prefixLists - } else { - self.nextToken = nil - self.prefixLists = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribePrefixListsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.prefixLists = try reader["prefixListSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrefixList.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -66041,48 +45173,18 @@ public struct DescribePrefixListsOutput: Swift.Equatable { } } -struct DescribePrefixListsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let prefixLists: [EC2ClientTypes.PrefixList]? -} - -extension DescribePrefixListsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case prefixLists = "prefixListSet" - } +enum DescribePrefixListsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.prefixLists) { - struct KeyVal0{struct item{}} - let prefixListsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .prefixLists) - if let prefixListsWrappedContainer = prefixListsWrappedContainer { - let prefixListsContainer = try prefixListsWrappedContainer.decodeIfPresent([EC2ClientTypes.PrefixList].self, forKey: .member) - var prefixListsBuffer:[EC2ClientTypes.PrefixList]? = nil - if let prefixListsContainer = prefixListsContainer { - prefixListsBuffer = [EC2ClientTypes.PrefixList]() - for structureContainer0 in prefixListsContainer { - prefixListsBuffer?.append(structureContainer0) - } - } - prefixLists = prefixListsBuffer - } else { - prefixLists = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - prefixLists = nil - } - } -} - -enum DescribePrefixListsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -66147,61 +45249,16 @@ public struct DescribePrincipalIdFormatInput: Swift.Equatable { } } -struct DescribePrincipalIdFormatInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let resources: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribePrincipalIdFormatInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case resources = "Resource" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.resources) { - struct KeyVal0{struct item{}} - let resourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resources) - if let resourcesWrappedContainer = resourcesWrappedContainer { - let resourcesContainer = try resourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesBuffer:[Swift.String]? = nil - if let resourcesContainer = resourcesContainer { - resourcesBuffer = [Swift.String]() - for stringContainer0 in resourcesContainer { - resourcesBuffer?.append(stringContainer0) - } - } - resources = resourcesBuffer - } else { - resources = [] - } - } else { - resources = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribePrincipalIdFormatOutput { -extension DescribePrincipalIdFormatOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePrincipalIdFormatOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.principals = output.principals - } else { - self.nextToken = nil - self.principals = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribePrincipalIdFormatOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.principals = try reader["principalSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrincipalIdFormat.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -66222,48 +45279,18 @@ public struct DescribePrincipalIdFormatOutput: Swift.Equatable { } } -struct DescribePrincipalIdFormatOutputBody: Swift.Equatable { - let principals: [EC2ClientTypes.PrincipalIdFormat]? - let nextToken: Swift.String? -} - -extension DescribePrincipalIdFormatOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case principals = "principalSet" - } +enum DescribePrincipalIdFormatOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.principals) { - struct KeyVal0{struct item{}} - let principalsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .principals) - if let principalsWrappedContainer = principalsWrappedContainer { - let principalsContainer = try principalsWrappedContainer.decodeIfPresent([EC2ClientTypes.PrincipalIdFormat].self, forKey: .member) - var principalsBuffer:[EC2ClientTypes.PrincipalIdFormat]? = nil - if let principalsContainer = principalsContainer { - principalsBuffer = [EC2ClientTypes.PrincipalIdFormat]() - for structureContainer0 in principalsContainer { - principalsBuffer?.append(structureContainer0) - } - } - principals = principalsBuffer - } else { - principals = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - principals = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribePrincipalIdFormatOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -66341,78 +45368,16 @@ public struct DescribePublicIpv4PoolsInput: Swift.Equatable { } } -struct DescribePublicIpv4PoolsInputBody: Swift.Equatable { - let poolIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let filters: [EC2ClientTypes.Filter]? -} - -extension DescribePublicIpv4PoolsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case poolIds = "PoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.poolIds) { - struct KeyVal0{struct item{}} - let poolIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .poolIds) - if let poolIdsWrappedContainer = poolIdsWrappedContainer { - let poolIdsContainer = try poolIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var poolIdsBuffer:[Swift.String]? = nil - if let poolIdsContainer = poolIdsContainer { - poolIdsBuffer = [Swift.String]() - for stringContainer0 in poolIdsContainer { - poolIdsBuffer?.append(stringContainer0) - } - } - poolIds = poolIdsBuffer - } else { - poolIds = [] - } - } else { - poolIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension DescribePublicIpv4PoolsOutput { -extension DescribePublicIpv4PoolsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePublicIpv4PoolsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.publicIpv4Pools = output.publicIpv4Pools - } else { - self.nextToken = nil - self.publicIpv4Pools = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribePublicIpv4PoolsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.publicIpv4Pools = try reader["publicIpv4PoolSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PublicIpv4Pool.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -66433,48 +45398,18 @@ public struct DescribePublicIpv4PoolsOutput: Swift.Equatable { } } -struct DescribePublicIpv4PoolsOutputBody: Swift.Equatable { - let publicIpv4Pools: [EC2ClientTypes.PublicIpv4Pool]? - let nextToken: Swift.String? -} - -extension DescribePublicIpv4PoolsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case publicIpv4Pools = "publicIpv4PoolSet" - } +enum DescribePublicIpv4PoolsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.publicIpv4Pools) { - struct KeyVal0{struct item{}} - let publicIpv4PoolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .publicIpv4Pools) - if let publicIpv4PoolsWrappedContainer = publicIpv4PoolsWrappedContainer { - let publicIpv4PoolsContainer = try publicIpv4PoolsWrappedContainer.decodeIfPresent([EC2ClientTypes.PublicIpv4Pool].self, forKey: .member) - var publicIpv4PoolsBuffer:[EC2ClientTypes.PublicIpv4Pool]? = nil - if let publicIpv4PoolsContainer = publicIpv4PoolsContainer { - publicIpv4PoolsBuffer = [EC2ClientTypes.PublicIpv4Pool]() - for structureContainer0 in publicIpv4PoolsContainer { - publicIpv4PoolsBuffer?.append(structureContainer0) - } - } - publicIpv4Pools = publicIpv4PoolsBuffer - } else { - publicIpv4Pools = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - publicIpv4Pools = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribePublicIpv4PoolsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -66554,76 +45489,15 @@ public struct DescribeRegionsInput: Swift.Equatable { } } -struct DescribeRegionsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let regionNames: [Swift.String]? - let dryRun: Swift.Bool? - let allRegions: Swift.Bool? -} - -extension DescribeRegionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allRegions = "AllRegions" - case dryRun = "dryRun" - case filters = "Filter" - case regionNames = "RegionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.regionNames) { - struct KeyVal0{struct RegionName{}} - let regionNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regionNames) - if let regionNamesWrappedContainer = regionNamesWrappedContainer { - let regionNamesContainer = try regionNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionNamesBuffer:[Swift.String]? = nil - if let regionNamesContainer = regionNamesContainer { - regionNamesBuffer = [Swift.String]() - for stringContainer0 in regionNamesContainer { - regionNamesBuffer?.append(stringContainer0) - } - } - regionNames = regionNamesBuffer - } else { - regionNames = [] - } - } else { - regionNames = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let allRegionsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allRegions) - allRegions = allRegionsDecoded - } -} +extension DescribeRegionsOutput { -extension DescribeRegionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeRegionsOutputBody = try responseDecoder.decode(responseBody: data) - self.regions = output.regions - } else { - self.regions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeRegionsOutput() + value.regions = try reader["regionInfo"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Region.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -66640,44 +45514,18 @@ public struct DescribeRegionsOutput: Swift.Equatable { } } -struct DescribeRegionsOutputBody: Swift.Equatable { - let regions: [EC2ClientTypes.Region]? -} - -extension DescribeRegionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case regions = "regionInfo" - } +enum DescribeRegionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.regions) { - struct KeyVal0{struct item{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([EC2ClientTypes.Region].self, forKey: .member) - var regionsBuffer:[EC2ClientTypes.Region]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [EC2ClientTypes.Region]() - for structureContainer0 in regionsContainer { - regionsBuffer?.append(structureContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - regions = nil - } - } -} - -enum DescribeRegionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -66760,82 +45608,16 @@ public struct DescribeReplaceRootVolumeTasksInput: Swift.Equatable { } } -struct DescribeReplaceRootVolumeTasksInputBody: Swift.Equatable { - let replaceRootVolumeTaskIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeReplaceRootVolumeTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case replaceRootVolumeTaskIds = "ReplaceRootVolumeTaskId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.replaceRootVolumeTaskIds) { - struct KeyVal0{struct ReplaceRootVolumeTaskId{}} - let replaceRootVolumeTaskIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replaceRootVolumeTaskIds) - if let replaceRootVolumeTaskIdsWrappedContainer = replaceRootVolumeTaskIdsWrappedContainer { - let replaceRootVolumeTaskIdsContainer = try replaceRootVolumeTaskIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replaceRootVolumeTaskIdsBuffer:[Swift.String]? = nil - if let replaceRootVolumeTaskIdsContainer = replaceRootVolumeTaskIdsContainer { - replaceRootVolumeTaskIdsBuffer = [Swift.String]() - for stringContainer0 in replaceRootVolumeTaskIdsContainer { - replaceRootVolumeTaskIdsBuffer?.append(stringContainer0) - } - } - replaceRootVolumeTaskIds = replaceRootVolumeTaskIdsBuffer - } else { - replaceRootVolumeTaskIds = [] - } - } else { - replaceRootVolumeTaskIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeReplaceRootVolumeTasksOutput { -extension DescribeReplaceRootVolumeTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReplaceRootVolumeTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.replaceRootVolumeTasks = output.replaceRootVolumeTasks - } else { - self.nextToken = nil - self.replaceRootVolumeTasks = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeReplaceRootVolumeTasksOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.replaceRootVolumeTasks = try reader["replaceRootVolumeTaskSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReplaceRootVolumeTask.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -66856,48 +45638,18 @@ public struct DescribeReplaceRootVolumeTasksOutput: Swift.Equatable { } } -struct DescribeReplaceRootVolumeTasksOutputBody: Swift.Equatable { - let replaceRootVolumeTasks: [EC2ClientTypes.ReplaceRootVolumeTask]? - let nextToken: Swift.String? -} +enum DescribeReplaceRootVolumeTasksOutputError { -extension DescribeReplaceRootVolumeTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case replaceRootVolumeTasks = "replaceRootVolumeTaskSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.replaceRootVolumeTasks) { - struct KeyVal0{struct item{}} - let replaceRootVolumeTasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replaceRootVolumeTasks) - if let replaceRootVolumeTasksWrappedContainer = replaceRootVolumeTasksWrappedContainer { - let replaceRootVolumeTasksContainer = try replaceRootVolumeTasksWrappedContainer.decodeIfPresent([EC2ClientTypes.ReplaceRootVolumeTask].self, forKey: .member) - var replaceRootVolumeTasksBuffer:[EC2ClientTypes.ReplaceRootVolumeTask]? = nil - if let replaceRootVolumeTasksContainer = replaceRootVolumeTasksContainer { - replaceRootVolumeTasksBuffer = [EC2ClientTypes.ReplaceRootVolumeTask]() - for structureContainer0 in replaceRootVolumeTasksContainer { - replaceRootVolumeTasksBuffer?.append(structureContainer0) - } - } - replaceRootVolumeTasks = replaceRootVolumeTasksBuffer - } else { - replaceRootVolumeTasks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - replaceRootVolumeTasks = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeReplaceRootVolumeTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -67005,72 +45757,6 @@ public struct DescribeReservedInstancesInput: Swift.Equatable { } } -struct DescribeReservedInstancesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let offeringClass: EC2ClientTypes.OfferingClassType? - let reservedInstancesIds: [Swift.String]? - let dryRun: Swift.Bool? - let offeringType: EC2ClientTypes.OfferingTypeValues? -} - -extension DescribeReservedInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case offeringClass = "OfferingClass" - case offeringType = "offeringType" - case reservedInstancesIds = "ReservedInstancesId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let offeringClassDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OfferingClassType.self, forKey: .offeringClass) - offeringClass = offeringClassDecoded - if containerValues.contains(.reservedInstancesIds) { - struct KeyVal0{struct ReservedInstancesId{}} - let reservedInstancesIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesIds) - if let reservedInstancesIdsWrappedContainer = reservedInstancesIdsWrappedContainer { - let reservedInstancesIdsContainer = try reservedInstancesIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var reservedInstancesIdsBuffer:[Swift.String]? = nil - if let reservedInstancesIdsContainer = reservedInstancesIdsContainer { - reservedInstancesIdsBuffer = [Swift.String]() - for stringContainer0 in reservedInstancesIdsContainer { - reservedInstancesIdsBuffer?.append(stringContainer0) - } - } - reservedInstancesIds = reservedInstancesIdsBuffer - } else { - reservedInstancesIds = [] - } - } else { - reservedInstancesIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OfferingTypeValues.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - } -} - extension DescribeReservedInstancesListingsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -67133,55 +45819,15 @@ public struct DescribeReservedInstancesListingsInput: Swift.Equatable { } } -struct DescribeReservedInstancesListingsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let reservedInstancesId: Swift.String? - let reservedInstancesListingId: Swift.String? -} +extension DescribeReservedInstancesListingsOutput { -extension DescribeReservedInstancesListingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filter" - case reservedInstancesId = "reservedInstancesId" - case reservedInstancesListingId = "reservedInstancesListingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded - let reservedInstancesListingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesListingId) - reservedInstancesListingId = reservedInstancesListingIdDecoded - } -} - -extension DescribeReservedInstancesListingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedInstancesListingsOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedInstancesListings = output.reservedInstancesListings - } else { - self.reservedInstancesListings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeReservedInstancesListingsOutput() + value.reservedInstancesListings = try reader["reservedInstancesListingsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstancesListing.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -67199,44 +45845,18 @@ public struct DescribeReservedInstancesListingsOutput: Swift.Equatable { } } -struct DescribeReservedInstancesListingsOutputBody: Swift.Equatable { - let reservedInstancesListings: [EC2ClientTypes.ReservedInstancesListing]? -} - -extension DescribeReservedInstancesListingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesListings = "reservedInstancesListingsSet" - } +enum DescribeReservedInstancesListingsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.reservedInstancesListings) { - struct KeyVal0{struct item{}} - let reservedInstancesListingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesListings) - if let reservedInstancesListingsWrappedContainer = reservedInstancesListingsWrappedContainer { - let reservedInstancesListingsContainer = try reservedInstancesListingsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstancesListing].self, forKey: .member) - var reservedInstancesListingsBuffer:[EC2ClientTypes.ReservedInstancesListing]? = nil - if let reservedInstancesListingsContainer = reservedInstancesListingsContainer { - reservedInstancesListingsBuffer = [EC2ClientTypes.ReservedInstancesListing]() - for structureContainer0 in reservedInstancesListingsContainer { - reservedInstancesListingsBuffer?.append(structureContainer0) - } - } - reservedInstancesListings = reservedInstancesListingsBuffer - } else { - reservedInstancesListings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - reservedInstancesListings = nil - } - } -} - -enum DescribeReservedInstancesListingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -67328,74 +45948,16 @@ public struct DescribeReservedInstancesModificationsInput: Swift.Equatable { } } -struct DescribeReservedInstancesModificationsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let reservedInstancesModificationIds: [Swift.String]? - let nextToken: Swift.String? -} +extension DescribeReservedInstancesModificationsOutput { -extension DescribeReservedInstancesModificationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filter" - case nextToken = "nextToken" - case reservedInstancesModificationIds = "ReservedInstancesModificationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.reservedInstancesModificationIds) { - struct KeyVal0{struct ReservedInstancesModificationId{}} - let reservedInstancesModificationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesModificationIds) - if let reservedInstancesModificationIdsWrappedContainer = reservedInstancesModificationIdsWrappedContainer { - let reservedInstancesModificationIdsContainer = try reservedInstancesModificationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var reservedInstancesModificationIdsBuffer:[Swift.String]? = nil - if let reservedInstancesModificationIdsContainer = reservedInstancesModificationIdsContainer { - reservedInstancesModificationIdsBuffer = [Swift.String]() - for stringContainer0 in reservedInstancesModificationIdsContainer { - reservedInstancesModificationIdsBuffer?.append(stringContainer0) - } - } - reservedInstancesModificationIds = reservedInstancesModificationIdsBuffer - } else { - reservedInstancesModificationIds = [] - } - } else { - reservedInstancesModificationIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeReservedInstancesModificationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedInstancesModificationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.reservedInstancesModifications = output.reservedInstancesModifications - } else { - self.nextToken = nil - self.reservedInstancesModifications = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeReservedInstancesModificationsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.reservedInstancesModifications = try reader["reservedInstancesModificationsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstancesModification.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -67417,48 +45979,18 @@ public struct DescribeReservedInstancesModificationsOutput: Swift.Equatable { } } -struct DescribeReservedInstancesModificationsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let reservedInstancesModifications: [EC2ClientTypes.ReservedInstancesModification]? -} - -extension DescribeReservedInstancesModificationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case reservedInstancesModifications = "reservedInstancesModificationsSet" - } +enum DescribeReservedInstancesModificationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.reservedInstancesModifications) { - struct KeyVal0{struct item{}} - let reservedInstancesModificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesModifications) - if let reservedInstancesModificationsWrappedContainer = reservedInstancesModificationsWrappedContainer { - let reservedInstancesModificationsContainer = try reservedInstancesModificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstancesModification].self, forKey: .member) - var reservedInstancesModificationsBuffer:[EC2ClientTypes.ReservedInstancesModification]? = nil - if let reservedInstancesModificationsContainer = reservedInstancesModificationsContainer { - reservedInstancesModificationsBuffer = [EC2ClientTypes.ReservedInstancesModification]() - for structureContainer0 in reservedInstancesModificationsContainer { - reservedInstancesModificationsBuffer?.append(structureContainer0) - } - } - reservedInstancesModifications = reservedInstancesModificationsBuffer - } else { - reservedInstancesModifications = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - reservedInstancesModifications = nil - } - } -} - -enum DescribeReservedInstancesModificationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -67628,122 +46160,16 @@ public struct DescribeReservedInstancesOfferingsInput: Swift.Equatable { } } -struct DescribeReservedInstancesOfferingsInputBody: Swift.Equatable { - let availabilityZone: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let includeMarketplace: Swift.Bool? - let instanceType: EC2ClientTypes.InstanceType? - let maxDuration: Swift.Int? - let maxInstanceCount: Swift.Int? - let minDuration: Swift.Int? - let offeringClass: EC2ClientTypes.OfferingClassType? - let productDescription: EC2ClientTypes.RIProductDescription? - let reservedInstancesOfferingIds: [Swift.String]? - let dryRun: Swift.Bool? - let instanceTenancy: EC2ClientTypes.Tenancy? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let offeringType: EC2ClientTypes.OfferingTypeValues? -} - -extension DescribeReservedInstancesOfferingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "AvailabilityZone" - case dryRun = "dryRun" - case filters = "Filter" - case includeMarketplace = "IncludeMarketplace" - case instanceTenancy = "instanceTenancy" - case instanceType = "InstanceType" - case maxDuration = "MaxDuration" - case maxInstanceCount = "MaxInstanceCount" - case maxResults = "maxResults" - case minDuration = "MinDuration" - case nextToken = "nextToken" - case offeringClass = "OfferingClass" - case offeringType = "offeringType" - case productDescription = "ProductDescription" - case reservedInstancesOfferingIds = "ReservedInstancesOfferingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let includeMarketplaceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeMarketplace) - includeMarketplace = includeMarketplaceDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let maxDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxDuration) - maxDuration = maxDurationDecoded - let maxInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxInstanceCount) - maxInstanceCount = maxInstanceCountDecoded - let minDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minDuration) - minDuration = minDurationDecoded - let offeringClassDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OfferingClassType.self, forKey: .offeringClass) - offeringClass = offeringClassDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RIProductDescription.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - if containerValues.contains(.reservedInstancesOfferingIds) { - struct KeyVal0{struct member{}} - let reservedInstancesOfferingIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesOfferingIds) - if let reservedInstancesOfferingIdsWrappedContainer = reservedInstancesOfferingIdsWrappedContainer { - let reservedInstancesOfferingIdsContainer = try reservedInstancesOfferingIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var reservedInstancesOfferingIdsBuffer:[Swift.String]? = nil - if let reservedInstancesOfferingIdsContainer = reservedInstancesOfferingIdsContainer { - reservedInstancesOfferingIdsBuffer = [Swift.String]() - for stringContainer0 in reservedInstancesOfferingIdsContainer { - reservedInstancesOfferingIdsBuffer?.append(stringContainer0) - } - } - reservedInstancesOfferingIds = reservedInstancesOfferingIdsBuffer - } else { - reservedInstancesOfferingIds = [] - } - } else { - reservedInstancesOfferingIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceTenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .instanceTenancy) - instanceTenancy = instanceTenancyDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OfferingTypeValues.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - } -} - -extension DescribeReservedInstancesOfferingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedInstancesOfferingsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.reservedInstancesOfferings = output.reservedInstancesOfferings - } else { - self.nextToken = nil - self.reservedInstancesOfferings = nil +extension DescribeReservedInstancesOfferingsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeReservedInstancesOfferingsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.reservedInstancesOfferings = try reader["reservedInstancesOfferingsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstancesOffering.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -67765,60 +46191,31 @@ public struct DescribeReservedInstancesOfferingsOutput: Swift.Equatable { } } -struct DescribeReservedInstancesOfferingsOutputBody: Swift.Equatable { - let reservedInstancesOfferings: [EC2ClientTypes.ReservedInstancesOffering]? - let nextToken: Swift.String? -} - -extension DescribeReservedInstancesOfferingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case reservedInstancesOfferings = "reservedInstancesOfferingsSet" - } +enum DescribeReservedInstancesOfferingsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.reservedInstancesOfferings) { - struct KeyVal0{struct item{}} - let reservedInstancesOfferingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesOfferings) - if let reservedInstancesOfferingsWrappedContainer = reservedInstancesOfferingsWrappedContainer { - let reservedInstancesOfferingsContainer = try reservedInstancesOfferingsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstancesOffering].self, forKey: .member) - var reservedInstancesOfferingsBuffer:[EC2ClientTypes.ReservedInstancesOffering]? = nil - if let reservedInstancesOfferingsContainer = reservedInstancesOfferingsContainer { - reservedInstancesOfferingsBuffer = [EC2ClientTypes.ReservedInstancesOffering]() - for structureContainer0 in reservedInstancesOfferingsContainer { - reservedInstancesOfferingsBuffer?.append(structureContainer0) - } - } - reservedInstancesOfferings = reservedInstancesOfferingsBuffer - } else { - reservedInstancesOfferings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - reservedInstancesOfferings = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeReservedInstancesOfferingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} +extension DescribeReservedInstancesOutput { -extension DescribeReservedInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedInstances = output.reservedInstances - } else { - self.reservedInstances = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeReservedInstancesOutput() + value.reservedInstances = try reader["reservedInstancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstances.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -67836,44 +46233,18 @@ public struct DescribeReservedInstancesOutput: Swift.Equatable { } } -struct DescribeReservedInstancesOutputBody: Swift.Equatable { - let reservedInstances: [EC2ClientTypes.ReservedInstances]? -} - -extension DescribeReservedInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstances = "reservedInstancesSet" - } +enum DescribeReservedInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.reservedInstances) { - struct KeyVal0{struct item{}} - let reservedInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstances) - if let reservedInstancesWrappedContainer = reservedInstancesWrappedContainer { - let reservedInstancesContainer = try reservedInstancesWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstances].self, forKey: .member) - var reservedInstancesBuffer:[EC2ClientTypes.ReservedInstances]? = nil - if let reservedInstancesContainer = reservedInstancesContainer { - reservedInstancesBuffer = [EC2ClientTypes.ReservedInstances]() - for structureContainer0 in reservedInstancesContainer { - reservedInstancesBuffer?.append(structureContainer0) - } - } - reservedInstances = reservedInstancesBuffer - } else { - reservedInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - reservedInstances = nil - } - } -} - -enum DescribeReservedInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -67994,82 +46365,16 @@ public struct DescribeRouteTablesInput: Swift.Equatable { } } -struct DescribeRouteTablesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let routeTableIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} +extension DescribeRouteTablesOutput { -extension DescribeRouteTablesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case routeTableIds = "RouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.routeTableIds) { - struct KeyVal0{struct item{}} - let routeTableIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routeTableIds) - if let routeTableIdsWrappedContainer = routeTableIdsWrappedContainer { - let routeTableIdsContainer = try routeTableIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var routeTableIdsBuffer:[Swift.String]? = nil - if let routeTableIdsContainer = routeTableIdsContainer { - routeTableIdsBuffer = [Swift.String]() - for stringContainer0 in routeTableIdsContainer { - routeTableIdsBuffer?.append(stringContainer0) - } - } - routeTableIds = routeTableIdsBuffer - } else { - routeTableIds = [] - } - } else { - routeTableIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeRouteTablesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeRouteTablesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.routeTables = output.routeTables - } else { - self.nextToken = nil - self.routeTables = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeRouteTablesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.routeTables = try reader["routeTableSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RouteTable.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -68091,48 +46396,18 @@ public struct DescribeRouteTablesOutput: Swift.Equatable { } } -struct DescribeRouteTablesOutputBody: Swift.Equatable { - let routeTables: [EC2ClientTypes.RouteTable]? - let nextToken: Swift.String? -} +enum DescribeRouteTablesOutputError { -extension DescribeRouteTablesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case routeTables = "routeTableSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.routeTables) { - struct KeyVal0{struct item{}} - let routeTablesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routeTables) - if let routeTablesWrappedContainer = routeTablesWrappedContainer { - let routeTablesContainer = try routeTablesWrappedContainer.decodeIfPresent([EC2ClientTypes.RouteTable].self, forKey: .member) - var routeTablesBuffer:[EC2ClientTypes.RouteTable]? = nil - if let routeTablesContainer = routeTablesContainer { - routeTablesBuffer = [EC2ClientTypes.RouteTable]() - for structureContainer0 in routeTablesContainer { - routeTablesBuffer?.append(structureContainer0) - } - } - routeTables = routeTablesBuffer - } else { - routeTables = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - routeTables = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeRouteTablesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -68234,77 +46509,16 @@ public struct DescribeScheduledInstanceAvailabilityInput: Swift.Equatable { } } -struct DescribeScheduledInstanceAvailabilityInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let firstSlotStartTimeRange: EC2ClientTypes.SlotDateTimeRangeRequest? - let maxResults: Swift.Int? - let maxSlotDurationInHours: Swift.Int? - let minSlotDurationInHours: Swift.Int? - let nextToken: Swift.String? - let recurrence: EC2ClientTypes.ScheduledInstanceRecurrenceRequest? -} - -extension DescribeScheduledInstanceAvailabilityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case firstSlotStartTimeRange = "FirstSlotStartTimeRange" - case maxResults = "MaxResults" - case maxSlotDurationInHours = "MaxSlotDurationInHours" - case minSlotDurationInHours = "MinSlotDurationInHours" - case nextToken = "NextToken" - case recurrence = "Recurrence" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let firstSlotStartTimeRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SlotDateTimeRangeRequest.self, forKey: .firstSlotStartTimeRange) - firstSlotStartTimeRange = firstSlotStartTimeRangeDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let maxSlotDurationInHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSlotDurationInHours) - maxSlotDurationInHours = maxSlotDurationInHoursDecoded - let minSlotDurationInHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minSlotDurationInHours) - minSlotDurationInHours = minSlotDurationInHoursDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let recurrenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ScheduledInstanceRecurrenceRequest.self, forKey: .recurrence) - recurrence = recurrenceDecoded - } -} - -extension DescribeScheduledInstanceAvailabilityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeScheduledInstanceAvailabilityOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.scheduledInstanceAvailabilitySet = output.scheduledInstanceAvailabilitySet - } else { - self.nextToken = nil - self.scheduledInstanceAvailabilitySet = nil +extension DescribeScheduledInstanceAvailabilityOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeScheduledInstanceAvailabilityOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.scheduledInstanceAvailabilitySet = try reader["scheduledInstanceAvailabilitySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ScheduledInstanceAvailability.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -68326,48 +46540,18 @@ public struct DescribeScheduledInstanceAvailabilityOutput: Swift.Equatable { } } -struct DescribeScheduledInstanceAvailabilityOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let scheduledInstanceAvailabilitySet: [EC2ClientTypes.ScheduledInstanceAvailability]? -} - -extension DescribeScheduledInstanceAvailabilityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case scheduledInstanceAvailabilitySet = "scheduledInstanceAvailabilitySet" - } +enum DescribeScheduledInstanceAvailabilityOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.scheduledInstanceAvailabilitySet) { - struct KeyVal0{struct item{}} - let scheduledInstanceAvailabilitySetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledInstanceAvailabilitySet) - if let scheduledInstanceAvailabilitySetWrappedContainer = scheduledInstanceAvailabilitySetWrappedContainer { - let scheduledInstanceAvailabilitySetContainer = try scheduledInstanceAvailabilitySetWrappedContainer.decodeIfPresent([EC2ClientTypes.ScheduledInstanceAvailability].self, forKey: .member) - var scheduledInstanceAvailabilitySetBuffer:[EC2ClientTypes.ScheduledInstanceAvailability]? = nil - if let scheduledInstanceAvailabilitySetContainer = scheduledInstanceAvailabilitySetContainer { - scheduledInstanceAvailabilitySetBuffer = [EC2ClientTypes.ScheduledInstanceAvailability]() - for structureContainer0 in scheduledInstanceAvailabilitySetContainer { - scheduledInstanceAvailabilitySetBuffer?.append(structureContainer0) - } - } - scheduledInstanceAvailabilitySet = scheduledInstanceAvailabilitySetBuffer - } else { - scheduledInstanceAvailabilitySet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - scheduledInstanceAvailabilitySet = nil - } - } -} - -enum DescribeScheduledInstanceAvailabilityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -68462,86 +46646,16 @@ public struct DescribeScheduledInstancesInput: Swift.Equatable { } } -struct DescribeScheduledInstancesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let scheduledInstanceIds: [Swift.String]? - let slotStartTimeRange: EC2ClientTypes.SlotStartTimeRangeRequest? -} - -extension DescribeScheduledInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case scheduledInstanceIds = "ScheduledInstanceId" - case slotStartTimeRange = "SlotStartTimeRange" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.scheduledInstanceIds) { - struct KeyVal0{struct ScheduledInstanceId{}} - let scheduledInstanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledInstanceIds) - if let scheduledInstanceIdsWrappedContainer = scheduledInstanceIdsWrappedContainer { - let scheduledInstanceIdsContainer = try scheduledInstanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scheduledInstanceIdsBuffer:[Swift.String]? = nil - if let scheduledInstanceIdsContainer = scheduledInstanceIdsContainer { - scheduledInstanceIdsBuffer = [Swift.String]() - for stringContainer0 in scheduledInstanceIdsContainer { - scheduledInstanceIdsBuffer?.append(stringContainer0) - } - } - scheduledInstanceIds = scheduledInstanceIdsBuffer - } else { - scheduledInstanceIds = [] - } - } else { - scheduledInstanceIds = nil - } - let slotStartTimeRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SlotStartTimeRangeRequest.self, forKey: .slotStartTimeRange) - slotStartTimeRange = slotStartTimeRangeDecoded - } -} - -extension DescribeScheduledInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeScheduledInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.scheduledInstanceSet = output.scheduledInstanceSet - } else { - self.nextToken = nil - self.scheduledInstanceSet = nil +extension DescribeScheduledInstancesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeScheduledInstancesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.scheduledInstanceSet = try reader["scheduledInstanceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ScheduledInstance.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -68563,48 +46677,18 @@ public struct DescribeScheduledInstancesOutput: Swift.Equatable { } } -struct DescribeScheduledInstancesOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let scheduledInstanceSet: [EC2ClientTypes.ScheduledInstance]? -} - -extension DescribeScheduledInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case scheduledInstanceSet = "scheduledInstanceSet" - } +enum DescribeScheduledInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.scheduledInstanceSet) { - struct KeyVal0{struct item{}} - let scheduledInstanceSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledInstanceSet) - if let scheduledInstanceSetWrappedContainer = scheduledInstanceSetWrappedContainer { - let scheduledInstanceSetContainer = try scheduledInstanceSetWrappedContainer.decodeIfPresent([EC2ClientTypes.ScheduledInstance].self, forKey: .member) - var scheduledInstanceSetBuffer:[EC2ClientTypes.ScheduledInstance]? = nil - if let scheduledInstanceSetContainer = scheduledInstanceSetContainer { - scheduledInstanceSetBuffer = [EC2ClientTypes.ScheduledInstance]() - for structureContainer0 in scheduledInstanceSetContainer { - scheduledInstanceSetBuffer?.append(structureContainer0) - } - } - scheduledInstanceSet = scheduledInstanceSetBuffer - } else { - scheduledInstanceSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - scheduledInstanceSet = nil - } - } -} - -enum DescribeScheduledInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -68656,51 +46740,15 @@ public struct DescribeSecurityGroupReferencesInput: Swift.Equatable { } } -struct DescribeSecurityGroupReferencesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let groupId: [Swift.String]? -} - -extension DescribeSecurityGroupReferencesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupId = "GroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.groupId) { - struct KeyVal0{struct item{}} - let groupIdWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupId) - if let groupIdWrappedContainer = groupIdWrappedContainer { - let groupIdContainer = try groupIdWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupIdBuffer:[Swift.String]? = nil - if let groupIdContainer = groupIdContainer { - groupIdBuffer = [Swift.String]() - for stringContainer0 in groupIdContainer { - groupIdBuffer?.append(stringContainer0) - } - } - groupId = groupIdBuffer - } else { - groupId = [] - } - } else { - groupId = nil - } - } -} +extension DescribeSecurityGroupReferencesOutput { -extension DescribeSecurityGroupReferencesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSecurityGroupReferencesOutputBody = try responseDecoder.decode(responseBody: data) - self.securityGroupReferenceSet = output.securityGroupReferenceSet - } else { - self.securityGroupReferenceSet = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSecurityGroupReferencesOutput() + value.securityGroupReferenceSet = try reader["securityGroupReferenceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SecurityGroupReference.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -68717,44 +46765,18 @@ public struct DescribeSecurityGroupReferencesOutput: Swift.Equatable { } } -struct DescribeSecurityGroupReferencesOutputBody: Swift.Equatable { - let securityGroupReferenceSet: [EC2ClientTypes.SecurityGroupReference]? -} - -extension DescribeSecurityGroupReferencesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case securityGroupReferenceSet = "securityGroupReferenceSet" - } +enum DescribeSecurityGroupReferencesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.securityGroupReferenceSet) { - struct KeyVal0{struct item{}} - let securityGroupReferenceSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupReferenceSet) - if let securityGroupReferenceSetWrappedContainer = securityGroupReferenceSetWrappedContainer { - let securityGroupReferenceSetContainer = try securityGroupReferenceSetWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupReference].self, forKey: .member) - var securityGroupReferenceSetBuffer:[EC2ClientTypes.SecurityGroupReference]? = nil - if let securityGroupReferenceSetContainer = securityGroupReferenceSetContainer { - securityGroupReferenceSetBuffer = [EC2ClientTypes.SecurityGroupReference]() - for structureContainer0 in securityGroupReferenceSetContainer { - securityGroupReferenceSetBuffer?.append(structureContainer0) - } - } - securityGroupReferenceSet = securityGroupReferenceSetBuffer - } else { - securityGroupReferenceSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - securityGroupReferenceSet = nil - } - } -} - -enum DescribeSecurityGroupReferencesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -68841,82 +46863,16 @@ public struct DescribeSecurityGroupRulesInput: Swift.Equatable { } } -struct DescribeSecurityGroupRulesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let securityGroupRuleIds: [Swift.String]? - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeSecurityGroupRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case securityGroupRuleIds = "SecurityGroupRuleId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.securityGroupRuleIds) { - struct KeyVal0{struct item{}} - let securityGroupRuleIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRuleIds) - if let securityGroupRuleIdsWrappedContainer = securityGroupRuleIdsWrappedContainer { - let securityGroupRuleIdsContainer = try securityGroupRuleIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupRuleIdsBuffer:[Swift.String]? = nil - if let securityGroupRuleIdsContainer = securityGroupRuleIdsContainer { - securityGroupRuleIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupRuleIdsContainer { - securityGroupRuleIdsBuffer?.append(stringContainer0) - } - } - securityGroupRuleIds = securityGroupRuleIdsBuffer - } else { - securityGroupRuleIds = [] - } - } else { - securityGroupRuleIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeSecurityGroupRulesOutput { -extension DescribeSecurityGroupRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSecurityGroupRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.securityGroupRules = output.securityGroupRules - } else { - self.nextToken = nil - self.securityGroupRules = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSecurityGroupRulesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.securityGroupRules = try reader["securityGroupRuleSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SecurityGroupRule.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -68937,48 +46893,18 @@ public struct DescribeSecurityGroupRulesOutput: Swift.Equatable { } } -struct DescribeSecurityGroupRulesOutputBody: Swift.Equatable { - let securityGroupRules: [EC2ClientTypes.SecurityGroupRule]? - let nextToken: Swift.String? -} - -extension DescribeSecurityGroupRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case securityGroupRules = "securityGroupRuleSet" - } +enum DescribeSecurityGroupRulesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.securityGroupRules) { - struct KeyVal0{struct item{}} - let securityGroupRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRules) - if let securityGroupRulesWrappedContainer = securityGroupRulesWrappedContainer { - let securityGroupRulesContainer = try securityGroupRulesWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupRule].self, forKey: .member) - var securityGroupRulesBuffer:[EC2ClientTypes.SecurityGroupRule]? = nil - if let securityGroupRulesContainer = securityGroupRulesContainer { - securityGroupRulesBuffer = [EC2ClientTypes.SecurityGroupRule]() - for structureContainer0 in securityGroupRulesContainer { - securityGroupRulesBuffer?.append(structureContainer0) - } - } - securityGroupRules = securityGroupRulesBuffer - } else { - securityGroupRules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - securityGroupRules = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeSecurityGroupRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -69125,103 +47051,16 @@ public struct DescribeSecurityGroupsInput: Swift.Equatable { } } -struct DescribeSecurityGroupsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let groupIds: [Swift.String]? - let groupNames: [Swift.String]? - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeSecurityGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case groupIds = "GroupId" - case groupNames = "GroupName" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.groupIds) { - struct KeyVal0{struct groupId{}} - let groupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupIds) - if let groupIdsWrappedContainer = groupIdsWrappedContainer { - let groupIdsContainer = try groupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupIdsBuffer:[Swift.String]? = nil - if let groupIdsContainer = groupIdsContainer { - groupIdsBuffer = [Swift.String]() - for stringContainer0 in groupIdsContainer { - groupIdsBuffer?.append(stringContainer0) - } - } - groupIds = groupIdsBuffer - } else { - groupIds = [] - } - } else { - groupIds = nil - } - if containerValues.contains(.groupNames) { - struct KeyVal0{struct GroupName{}} - let groupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupNames) - if let groupNamesWrappedContainer = groupNamesWrappedContainer { - let groupNamesContainer = try groupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupNamesBuffer:[Swift.String]? = nil - if let groupNamesContainer = groupNamesContainer { - groupNamesBuffer = [Swift.String]() - for stringContainer0 in groupNamesContainer { - groupNamesBuffer?.append(stringContainer0) - } - } - groupNames = groupNamesBuffer - } else { - groupNames = [] - } - } else { - groupNames = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeSecurityGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSecurityGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.securityGroups = output.securityGroups - } else { - self.nextToken = nil - self.securityGroups = nil +extension DescribeSecurityGroupsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSecurityGroupsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.securityGroups = try reader["securityGroupInfo"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SecurityGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -69242,48 +47081,18 @@ public struct DescribeSecurityGroupsOutput: Swift.Equatable { } } -struct DescribeSecurityGroupsOutputBody: Swift.Equatable { - let securityGroups: [EC2ClientTypes.SecurityGroup]? - let nextToken: Swift.String? -} - -extension DescribeSecurityGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case securityGroups = "securityGroupInfo" - } +enum DescribeSecurityGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroup].self, forKey: .member) - var securityGroupsBuffer:[EC2ClientTypes.SecurityGroup]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [EC2ClientTypes.SecurityGroup]() - for structureContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(structureContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - securityGroups = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeSecurityGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -69334,42 +47143,17 @@ public struct DescribeSnapshotAttributeInput: Swift.Equatable { } } -struct DescribeSnapshotAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.SnapshotAttributeName? - let snapshotId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeSnapshotAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case dryRun = "dryRun" - case snapshotId = "SnapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeSnapshotAttributeOutput { -extension DescribeSnapshotAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSnapshotAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.createVolumePermissions = output.createVolumePermissions - self.productCodes = output.productCodes - self.snapshotId = output.snapshotId - } else { - self.createVolumePermissions = nil - self.productCodes = nil - self.snapshotId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSnapshotAttributeOutput() + value.createVolumePermissions = try reader["createVolumePermission"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CreateVolumePermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.productCodes = try reader["productCodes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ProductCode.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.snapshotId = try reader["snapshotId"].readIfPresent() + return value } } } @@ -69394,69 +47178,18 @@ public struct DescribeSnapshotAttributeOutput: Swift.Equatable { } } -struct DescribeSnapshotAttributeOutputBody: Swift.Equatable { - let createVolumePermissions: [EC2ClientTypes.CreateVolumePermission]? - let productCodes: [EC2ClientTypes.ProductCode]? - let snapshotId: Swift.String? -} - -extension DescribeSnapshotAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createVolumePermissions = "createVolumePermission" - case productCodes = "productCodes" - case snapshotId = "snapshotId" - } +enum DescribeSnapshotAttributeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.createVolumePermissions) { - struct KeyVal0{struct item{}} - let createVolumePermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .createVolumePermissions) - if let createVolumePermissionsWrappedContainer = createVolumePermissionsWrappedContainer { - let createVolumePermissionsContainer = try createVolumePermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.CreateVolumePermission].self, forKey: .member) - var createVolumePermissionsBuffer:[EC2ClientTypes.CreateVolumePermission]? = nil - if let createVolumePermissionsContainer = createVolumePermissionsContainer { - createVolumePermissionsBuffer = [EC2ClientTypes.CreateVolumePermission]() - for structureContainer0 in createVolumePermissionsContainer { - createVolumePermissionsBuffer?.append(structureContainer0) - } - } - createVolumePermissions = createVolumePermissionsBuffer - } else { - createVolumePermissions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - createVolumePermissions = nil - } - if containerValues.contains(.productCodes) { - struct KeyVal0{struct item{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ProductCode].self, forKey: .member) - var productCodesBuffer:[EC2ClientTypes.ProductCode]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [EC2ClientTypes.ProductCode]() - for structureContainer0 in productCodesContainer { - productCodesBuffer?.append(structureContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil - } - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - } -} - -enum DescribeSnapshotAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -69527,61 +47260,16 @@ public struct DescribeSnapshotTierStatusInput: Swift.Equatable { } } -struct DescribeSnapshotTierStatusInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeSnapshotTierStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeSnapshotTierStatusOutput { -extension DescribeSnapshotTierStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSnapshotTierStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.snapshotTierStatuses = output.snapshotTierStatuses - } else { - self.nextToken = nil - self.snapshotTierStatuses = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSnapshotTierStatusOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.snapshotTierStatuses = try reader["snapshotTierStatusSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SnapshotTierStatus.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -69602,48 +47290,18 @@ public struct DescribeSnapshotTierStatusOutput: Swift.Equatable { } } -struct DescribeSnapshotTierStatusOutputBody: Swift.Equatable { - let snapshotTierStatuses: [EC2ClientTypes.SnapshotTierStatus]? - let nextToken: Swift.String? -} - -extension DescribeSnapshotTierStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case snapshotTierStatuses = "snapshotTierStatusSet" - } +enum DescribeSnapshotTierStatusOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.snapshotTierStatuses) { - struct KeyVal0{struct item{}} - let snapshotTierStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotTierStatuses) - if let snapshotTierStatusesWrappedContainer = snapshotTierStatusesWrappedContainer { - let snapshotTierStatusesContainer = try snapshotTierStatusesWrappedContainer.decodeIfPresent([EC2ClientTypes.SnapshotTierStatus].self, forKey: .member) - var snapshotTierStatusesBuffer:[EC2ClientTypes.SnapshotTierStatus]? = nil - if let snapshotTierStatusesContainer = snapshotTierStatusesContainer { - snapshotTierStatusesBuffer = [EC2ClientTypes.SnapshotTierStatus]() - for structureContainer0 in snapshotTierStatusesContainer { - snapshotTierStatusesBuffer?.append(structureContainer0) - } - } - snapshotTierStatuses = snapshotTierStatusesBuffer - } else { - snapshotTierStatuses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - snapshotTierStatuses = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeSnapshotTierStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -69782,124 +47440,16 @@ public struct DescribeSnapshotsInput: Swift.Equatable { } } -struct DescribeSnapshotsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let ownerIds: [Swift.String]? - let restorableByUserIds: [Swift.String]? - let snapshotIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DescribeSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case ownerIds = "Owner" - case restorableByUserIds = "RestorableBy" - case snapshotIds = "SnapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.ownerIds) { - struct KeyVal0{struct Owner{}} - let ownerIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ownerIds) - if let ownerIdsWrappedContainer = ownerIdsWrappedContainer { - let ownerIdsContainer = try ownerIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ownerIdsBuffer:[Swift.String]? = nil - if let ownerIdsContainer = ownerIdsContainer { - ownerIdsBuffer = [Swift.String]() - for stringContainer0 in ownerIdsContainer { - ownerIdsBuffer?.append(stringContainer0) - } - } - ownerIds = ownerIdsBuffer - } else { - ownerIds = [] - } - } else { - ownerIds = nil - } - if containerValues.contains(.restorableByUserIds) { - struct KeyVal0{struct member{}} - let restorableByUserIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .restorableByUserIds) - if let restorableByUserIdsWrappedContainer = restorableByUserIdsWrappedContainer { - let restorableByUserIdsContainer = try restorableByUserIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var restorableByUserIdsBuffer:[Swift.String]? = nil - if let restorableByUserIdsContainer = restorableByUserIdsContainer { - restorableByUserIdsBuffer = [Swift.String]() - for stringContainer0 in restorableByUserIdsContainer { - restorableByUserIdsBuffer?.append(stringContainer0) - } - } - restorableByUserIds = restorableByUserIdsBuffer - } else { - restorableByUserIds = [] - } - } else { - restorableByUserIds = nil - } - if containerValues.contains(.snapshotIds) { - struct KeyVal0{struct SnapshotId{}} - let snapshotIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotIds) - if let snapshotIdsWrappedContainer = snapshotIdsWrappedContainer { - let snapshotIdsContainer = try snapshotIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var snapshotIdsBuffer:[Swift.String]? = nil - if let snapshotIdsContainer = snapshotIdsContainer { - snapshotIdsBuffer = [Swift.String]() - for stringContainer0 in snapshotIdsContainer { - snapshotIdsBuffer?.append(stringContainer0) - } - } - snapshotIds = snapshotIdsBuffer - } else { - snapshotIds = [] - } - } else { - snapshotIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.snapshots = output.snapshots - } else { - self.nextToken = nil - self.snapshots = nil +extension DescribeSnapshotsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSnapshotsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.snapshots = try reader["snapshotSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Snapshot.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -69920,48 +47470,18 @@ public struct DescribeSnapshotsOutput: Swift.Equatable { } } -struct DescribeSnapshotsOutputBody: Swift.Equatable { - let snapshots: [EC2ClientTypes.Snapshot]? - let nextToken: Swift.String? -} - -extension DescribeSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case snapshots = "snapshotSet" - } +enum DescribeSnapshotsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.snapshots) { - struct KeyVal0{struct item{}} - let snapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshots) - if let snapshotsWrappedContainer = snapshotsWrappedContainer { - let snapshotsContainer = try snapshotsWrappedContainer.decodeIfPresent([EC2ClientTypes.Snapshot].self, forKey: .member) - var snapshotsBuffer:[EC2ClientTypes.Snapshot]? = nil - if let snapshotsContainer = snapshotsContainer { - snapshotsBuffer = [EC2ClientTypes.Snapshot]() - for structureContainer0 in snapshotsContainer { - snapshotsBuffer?.append(structureContainer0) - } - } - snapshots = snapshotsBuffer - } else { - snapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - snapshots = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -69997,30 +47517,15 @@ public struct DescribeSpotDatafeedSubscriptionInput: Swift.Equatable { } } -struct DescribeSpotDatafeedSubscriptionInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension DescribeSpotDatafeedSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - } +extension DescribeSpotDatafeedSubscriptionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeSpotDatafeedSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSpotDatafeedSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.spotDatafeedSubscription = output.spotDatafeedSubscription - } else { - self.spotDatafeedSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSpotDatafeedSubscriptionOutput() + value.spotDatafeedSubscription = try reader["spotDatafeedSubscription"].readIfPresent(readingClosure: EC2ClientTypes.SpotDatafeedSubscription.readingClosure) + return value } } } @@ -70038,27 +47543,18 @@ public struct DescribeSpotDatafeedSubscriptionOutput: Swift.Equatable { } } -struct DescribeSpotDatafeedSubscriptionOutputBody: Swift.Equatable { - let spotDatafeedSubscription: EC2ClientTypes.SpotDatafeedSubscription? -} - -extension DescribeSpotDatafeedSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case spotDatafeedSubscription = "spotDatafeedSubscription" - } +enum DescribeSpotDatafeedSubscriptionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let spotDatafeedSubscriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotDatafeedSubscription.self, forKey: .spotDatafeedSubscription) - spotDatafeedSubscription = spotDatafeedSubscriptionDecoded - } -} - -enum DescribeSpotDatafeedSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -70116,46 +47612,17 @@ public struct DescribeSpotFleetInstancesInput: Swift.Equatable { } } -struct DescribeSpotFleetInstancesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let spotFleetRequestId: Swift.String? -} - -extension DescribeSpotFleetInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case maxResults = "maxResults" - case nextToken = "nextToken" - case spotFleetRequestId = "spotFleetRequestId" - } +extension DescribeSpotFleetInstancesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded - } -} - -extension DescribeSpotFleetInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSpotFleetInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.activeInstances = output.activeInstances - self.nextToken = output.nextToken - self.spotFleetRequestId = output.spotFleetRequestId - } else { - self.activeInstances = nil - self.nextToken = nil - self.spotFleetRequestId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSpotFleetInstancesOutput() + value.activeInstances = try reader["activeInstanceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ActiveInstance.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + value.spotFleetRequestId = try reader["spotFleetRequestId"].readIfPresent() + return value } } } @@ -70181,52 +47648,18 @@ public struct DescribeSpotFleetInstancesOutput: Swift.Equatable { } } -struct DescribeSpotFleetInstancesOutputBody: Swift.Equatable { - let activeInstances: [EC2ClientTypes.ActiveInstance]? - let nextToken: Swift.String? - let spotFleetRequestId: Swift.String? -} - -extension DescribeSpotFleetInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activeInstances = "activeInstanceSet" - case nextToken = "nextToken" - case spotFleetRequestId = "spotFleetRequestId" - } +enum DescribeSpotFleetInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.activeInstances) { - struct KeyVal0{struct item{}} - let activeInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .activeInstances) - if let activeInstancesWrappedContainer = activeInstancesWrappedContainer { - let activeInstancesContainer = try activeInstancesWrappedContainer.decodeIfPresent([EC2ClientTypes.ActiveInstance].self, forKey: .member) - var activeInstancesBuffer:[EC2ClientTypes.ActiveInstance]? = nil - if let activeInstancesContainer = activeInstancesContainer { - activeInstancesBuffer = [EC2ClientTypes.ActiveInstance]() - for structureContainer0 in activeInstancesContainer { - activeInstancesBuffer?.append(structureContainer0) - } - } - activeInstances = activeInstancesBuffer - } else { - activeInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - activeInstances = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded - } -} - -enum DescribeSpotFleetInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -70299,58 +47732,19 @@ public struct DescribeSpotFleetRequestHistoryInput: Swift.Equatable { } } -struct DescribeSpotFleetRequestHistoryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let eventType: EC2ClientTypes.EventType? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let spotFleetRequestId: Swift.String? - let startTime: ClientRuntime.Date? -} - -extension DescribeSpotFleetRequestHistoryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case eventType = "eventType" - case maxResults = "maxResults" - case nextToken = "nextToken" - case spotFleetRequestId = "spotFleetRequestId" - case startTime = "startTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let eventTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EventType.self, forKey: .eventType) - eventType = eventTypeDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - } -} +extension DescribeSpotFleetRequestHistoryOutput { -extension DescribeSpotFleetRequestHistoryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSpotFleetRequestHistoryOutputBody = try responseDecoder.decode(responseBody: data) - self.historyRecords = output.historyRecords - self.lastEvaluatedTime = output.lastEvaluatedTime - self.nextToken = output.nextToken - self.spotFleetRequestId = output.spotFleetRequestId - self.startTime = output.startTime - } else { - self.historyRecords = nil - self.lastEvaluatedTime = nil - self.nextToken = nil - self.spotFleetRequestId = nil - self.startTime = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSpotFleetRequestHistoryOutput() + value.historyRecords = try reader["historyRecordSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.HistoryRecord.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.lastEvaluatedTime = try reader["lastEvaluatedTime"].readTimestampIfPresent(format: .dateTime) + value.nextToken = try reader["nextToken"].readIfPresent() + value.spotFleetRequestId = try reader["spotFleetRequestId"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -70384,60 +47778,18 @@ public struct DescribeSpotFleetRequestHistoryOutput: Swift.Equatable { } } -struct DescribeSpotFleetRequestHistoryOutputBody: Swift.Equatable { - let historyRecords: [EC2ClientTypes.HistoryRecord]? - let lastEvaluatedTime: ClientRuntime.Date? - let nextToken: Swift.String? - let spotFleetRequestId: Swift.String? - let startTime: ClientRuntime.Date? -} - -extension DescribeSpotFleetRequestHistoryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case historyRecords = "historyRecordSet" - case lastEvaluatedTime = "lastEvaluatedTime" - case nextToken = "nextToken" - case spotFleetRequestId = "spotFleetRequestId" - case startTime = "startTime" - } +enum DescribeSpotFleetRequestHistoryOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.historyRecords) { - struct KeyVal0{struct item{}} - let historyRecordsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .historyRecords) - if let historyRecordsWrappedContainer = historyRecordsWrappedContainer { - let historyRecordsContainer = try historyRecordsWrappedContainer.decodeIfPresent([EC2ClientTypes.HistoryRecord].self, forKey: .member) - var historyRecordsBuffer:[EC2ClientTypes.HistoryRecord]? = nil - if let historyRecordsContainer = historyRecordsContainer { - historyRecordsBuffer = [EC2ClientTypes.HistoryRecord]() - for structureContainer0 in historyRecordsContainer { - historyRecordsBuffer?.append(structureContainer0) - } - } - historyRecords = historyRecordsBuffer - } else { - historyRecords = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - historyRecords = nil - } - let lastEvaluatedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastEvaluatedTime) - lastEvaluatedTime = lastEvaluatedTimeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - } -} - -enum DescribeSpotFleetRequestHistoryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -70503,61 +47855,16 @@ public struct DescribeSpotFleetRequestsInput: Swift.Equatable { } } -struct DescribeSpotFleetRequestsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let spotFleetRequestIds: [Swift.String]? -} - -extension DescribeSpotFleetRequestsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case maxResults = "maxResults" - case nextToken = "nextToken" - case spotFleetRequestIds = "spotFleetRequestId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.spotFleetRequestIds) { - struct KeyVal0{struct item{}} - let spotFleetRequestIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotFleetRequestIds) - if let spotFleetRequestIdsWrappedContainer = spotFleetRequestIdsWrappedContainer { - let spotFleetRequestIdsContainer = try spotFleetRequestIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var spotFleetRequestIdsBuffer:[Swift.String]? = nil - if let spotFleetRequestIdsContainer = spotFleetRequestIdsContainer { - spotFleetRequestIdsBuffer = [Swift.String]() - for stringContainer0 in spotFleetRequestIdsContainer { - spotFleetRequestIdsBuffer?.append(stringContainer0) - } - } - spotFleetRequestIds = spotFleetRequestIdsBuffer - } else { - spotFleetRequestIds = [] - } - } else { - spotFleetRequestIds = nil - } - } -} +extension DescribeSpotFleetRequestsOutput { -extension DescribeSpotFleetRequestsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSpotFleetRequestsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.spotFleetRequestConfigs = output.spotFleetRequestConfigs - } else { - self.nextToken = nil - self.spotFleetRequestConfigs = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSpotFleetRequestsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.spotFleetRequestConfigs = try reader["spotFleetRequestConfigSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SpotFleetRequestConfig.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -70579,48 +47886,18 @@ public struct DescribeSpotFleetRequestsOutput: Swift.Equatable { } } -struct DescribeSpotFleetRequestsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let spotFleetRequestConfigs: [EC2ClientTypes.SpotFleetRequestConfig]? -} - -extension DescribeSpotFleetRequestsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case spotFleetRequestConfigs = "spotFleetRequestConfigSet" - } +enum DescribeSpotFleetRequestsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.spotFleetRequestConfigs) { - struct KeyVal0{struct item{}} - let spotFleetRequestConfigsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotFleetRequestConfigs) - if let spotFleetRequestConfigsWrappedContainer = spotFleetRequestConfigsWrappedContainer { - let spotFleetRequestConfigsContainer = try spotFleetRequestConfigsWrappedContainer.decodeIfPresent([EC2ClientTypes.SpotFleetRequestConfig].self, forKey: .member) - var spotFleetRequestConfigsBuffer:[EC2ClientTypes.SpotFleetRequestConfig]? = nil - if let spotFleetRequestConfigsContainer = spotFleetRequestConfigsContainer { - spotFleetRequestConfigsBuffer = [EC2ClientTypes.SpotFleetRequestConfig]() - for structureContainer0 in spotFleetRequestConfigsContainer { - spotFleetRequestConfigsBuffer?.append(structureContainer0) - } - } - spotFleetRequestConfigs = spotFleetRequestConfigsBuffer - } else { - spotFleetRequestConfigs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - spotFleetRequestConfigs = nil - } - } -} - -enum DescribeSpotFleetRequestsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -70780,82 +48057,16 @@ public struct DescribeSpotInstanceRequestsInput: Swift.Equatable { } } -struct DescribeSpotInstanceRequestsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let spotInstanceRequestIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeSpotInstanceRequestsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case spotInstanceRequestIds = "SpotInstanceRequestId" - } +extension DescribeSpotInstanceRequestsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.spotInstanceRequestIds) { - struct KeyVal0{struct SpotInstanceRequestId{}} - let spotInstanceRequestIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotInstanceRequestIds) - if let spotInstanceRequestIdsWrappedContainer = spotInstanceRequestIdsWrappedContainer { - let spotInstanceRequestIdsContainer = try spotInstanceRequestIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var spotInstanceRequestIdsBuffer:[Swift.String]? = nil - if let spotInstanceRequestIdsContainer = spotInstanceRequestIdsContainer { - spotInstanceRequestIdsBuffer = [Swift.String]() - for stringContainer0 in spotInstanceRequestIdsContainer { - spotInstanceRequestIdsBuffer?.append(stringContainer0) - } - } - spotInstanceRequestIds = spotInstanceRequestIdsBuffer - } else { - spotInstanceRequestIds = [] - } - } else { - spotInstanceRequestIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeSpotInstanceRequestsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSpotInstanceRequestsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.spotInstanceRequests = output.spotInstanceRequests - } else { - self.nextToken = nil - self.spotInstanceRequests = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSpotInstanceRequestsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.spotInstanceRequests = try reader["spotInstanceRequestSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SpotInstanceRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -70877,48 +48088,18 @@ public struct DescribeSpotInstanceRequestsOutput: Swift.Equatable { } } -struct DescribeSpotInstanceRequestsOutputBody: Swift.Equatable { - let spotInstanceRequests: [EC2ClientTypes.SpotInstanceRequest]? - let nextToken: Swift.String? -} - -extension DescribeSpotInstanceRequestsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case spotInstanceRequests = "spotInstanceRequestSet" - } +enum DescribeSpotInstanceRequestsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.spotInstanceRequests) { - struct KeyVal0{struct item{}} - let spotInstanceRequestsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotInstanceRequests) - if let spotInstanceRequestsWrappedContainer = spotInstanceRequestsWrappedContainer { - let spotInstanceRequestsContainer = try spotInstanceRequestsWrappedContainer.decodeIfPresent([EC2ClientTypes.SpotInstanceRequest].self, forKey: .member) - var spotInstanceRequestsBuffer:[EC2ClientTypes.SpotInstanceRequest]? = nil - if let spotInstanceRequestsContainer = spotInstanceRequestsContainer { - spotInstanceRequestsBuffer = [EC2ClientTypes.SpotInstanceRequest]() - for structureContainer0 in spotInstanceRequestsContainer { - spotInstanceRequestsBuffer?.append(structureContainer0) - } - } - spotInstanceRequests = spotInstanceRequestsBuffer - } else { - spotInstanceRequests = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - spotInstanceRequests = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeSpotInstanceRequestsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -71047,115 +48228,16 @@ public struct DescribeSpotPriceHistoryInput: Swift.Equatable { } } -struct DescribeSpotPriceHistoryInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let availabilityZone: Swift.String? - let dryRun: Swift.Bool? - let endTime: ClientRuntime.Date? - let instanceTypes: [EC2ClientTypes.InstanceType]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let productDescriptions: [Swift.String]? - let startTime: ClientRuntime.Date? -} - -extension DescribeSpotPriceHistoryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case dryRun = "dryRun" - case endTime = "endTime" - case filters = "Filter" - case instanceTypes = "InstanceType" - case maxResults = "maxResults" - case nextToken = "nextToken" - case productDescriptions = "ProductDescription" - case startTime = "startTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - if containerValues.contains(.instanceTypes) { - struct KeyVal0{struct member{}} - let instanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypes) - if let instanceTypesWrappedContainer = instanceTypesWrappedContainer { - let instanceTypesContainer = try instanceTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceType].self, forKey: .member) - var instanceTypesBuffer:[EC2ClientTypes.InstanceType]? = nil - if let instanceTypesContainer = instanceTypesContainer { - instanceTypesBuffer = [EC2ClientTypes.InstanceType]() - for enumContainer0 in instanceTypesContainer { - instanceTypesBuffer?.append(enumContainer0) - } - } - instanceTypes = instanceTypesBuffer - } else { - instanceTypes = [] - } - } else { - instanceTypes = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.productDescriptions) { - struct KeyVal0{struct member{}} - let productDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productDescriptions) - if let productDescriptionsWrappedContainer = productDescriptionsWrappedContainer { - let productDescriptionsContainer = try productDescriptionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var productDescriptionsBuffer:[Swift.String]? = nil - if let productDescriptionsContainer = productDescriptionsContainer { - productDescriptionsBuffer = [Swift.String]() - for stringContainer0 in productDescriptionsContainer { - productDescriptionsBuffer?.append(stringContainer0) - } - } - productDescriptions = productDescriptionsBuffer - } else { - productDescriptions = [] - } - } else { - productDescriptions = nil - } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - } -} - -extension DescribeSpotPriceHistoryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSpotPriceHistoryOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.spotPriceHistory = output.spotPriceHistory - } else { - self.nextToken = nil - self.spotPriceHistory = nil +extension DescribeSpotPriceHistoryOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSpotPriceHistoryOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.spotPriceHistory = try reader["spotPriceHistorySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SpotPrice.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -71177,48 +48259,18 @@ public struct DescribeSpotPriceHistoryOutput: Swift.Equatable { } } -struct DescribeSpotPriceHistoryOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let spotPriceHistory: [EC2ClientTypes.SpotPrice]? -} - -extension DescribeSpotPriceHistoryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case spotPriceHistory = "spotPriceHistorySet" - } +enum DescribeSpotPriceHistoryOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.spotPriceHistory) { - struct KeyVal0{struct item{}} - let spotPriceHistoryWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotPriceHistory) - if let spotPriceHistoryWrappedContainer = spotPriceHistoryWrappedContainer { - let spotPriceHistoryContainer = try spotPriceHistoryWrappedContainer.decodeIfPresent([EC2ClientTypes.SpotPrice].self, forKey: .member) - var spotPriceHistoryBuffer:[EC2ClientTypes.SpotPrice]? = nil - if let spotPriceHistoryContainer = spotPriceHistoryContainer { - spotPriceHistoryBuffer = [EC2ClientTypes.SpotPrice]() - for structureContainer0 in spotPriceHistoryContainer { - spotPriceHistoryBuffer?.append(structureContainer0) - } - } - spotPriceHistory = spotPriceHistoryBuffer - } else { - spotPriceHistory = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - spotPriceHistory = nil - } - } -} - -enum DescribeSpotPriceHistoryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -71275,44 +48327,16 @@ public struct DescribeStaleSecurityGroupsInput: Swift.Equatable { } } -struct DescribeStaleSecurityGroupsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let vpcId: Swift.String? -} - -extension DescribeStaleSecurityGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} +extension DescribeStaleSecurityGroupsOutput { -extension DescribeStaleSecurityGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStaleSecurityGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.staleSecurityGroupSet = output.staleSecurityGroupSet - } else { - self.nextToken = nil - self.staleSecurityGroupSet = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeStaleSecurityGroupsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.staleSecurityGroupSet = try reader["staleSecurityGroupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.StaleSecurityGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -71333,48 +48357,18 @@ public struct DescribeStaleSecurityGroupsOutput: Swift.Equatable { } } -struct DescribeStaleSecurityGroupsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let staleSecurityGroupSet: [EC2ClientTypes.StaleSecurityGroup]? -} - -extension DescribeStaleSecurityGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case staleSecurityGroupSet = "staleSecurityGroupSet" - } +enum DescribeStaleSecurityGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.staleSecurityGroupSet) { - struct KeyVal0{struct item{}} - let staleSecurityGroupSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staleSecurityGroupSet) - if let staleSecurityGroupSetWrappedContainer = staleSecurityGroupSetWrappedContainer { - let staleSecurityGroupSetContainer = try staleSecurityGroupSetWrappedContainer.decodeIfPresent([EC2ClientTypes.StaleSecurityGroup].self, forKey: .member) - var staleSecurityGroupSetBuffer:[EC2ClientTypes.StaleSecurityGroup]? = nil - if let staleSecurityGroupSetContainer = staleSecurityGroupSetContainer { - staleSecurityGroupSetBuffer = [EC2ClientTypes.StaleSecurityGroup]() - for structureContainer0 in staleSecurityGroupSetContainer { - staleSecurityGroupSetBuffer?.append(structureContainer0) - } - } - staleSecurityGroupSet = staleSecurityGroupSetBuffer - } else { - staleSecurityGroupSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - staleSecurityGroupSet = nil - } - } -} - -enum DescribeStaleSecurityGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -71462,82 +48456,16 @@ public struct DescribeStoreImageTasksInput: Swift.Equatable { } } -struct DescribeStoreImageTasksInputBody: Swift.Equatable { - let imageIds: [Swift.String]? - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeStoreImageTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case imageIds = "ImageId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.imageIds) { - struct KeyVal0{struct item{}} - let imageIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .imageIds) - if let imageIdsWrappedContainer = imageIdsWrappedContainer { - let imageIdsContainer = try imageIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var imageIdsBuffer:[Swift.String]? = nil - if let imageIdsContainer = imageIdsContainer { - imageIdsBuffer = [Swift.String]() - for stringContainer0 in imageIdsContainer { - imageIdsBuffer?.append(stringContainer0) - } - } - imageIds = imageIdsBuffer - } else { - imageIds = [] - } - } else { - imageIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeStoreImageTasksOutput { -extension DescribeStoreImageTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStoreImageTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.storeImageTaskResults = output.storeImageTaskResults - } else { - self.nextToken = nil - self.storeImageTaskResults = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeStoreImageTasksOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.storeImageTaskResults = try reader["storeImageTaskResultSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.StoreImageTaskResult.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -71558,48 +48486,18 @@ public struct DescribeStoreImageTasksOutput: Swift.Equatable { } } -struct DescribeStoreImageTasksOutputBody: Swift.Equatable { - let storeImageTaskResults: [EC2ClientTypes.StoreImageTaskResult]? - let nextToken: Swift.String? -} - -extension DescribeStoreImageTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case storeImageTaskResults = "storeImageTaskResultSet" - } +enum DescribeStoreImageTasksOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.storeImageTaskResults) { - struct KeyVal0{struct item{}} - let storeImageTaskResultsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .storeImageTaskResults) - if let storeImageTaskResultsWrappedContainer = storeImageTaskResultsWrappedContainer { - let storeImageTaskResultsContainer = try storeImageTaskResultsWrappedContainer.decodeIfPresent([EC2ClientTypes.StoreImageTaskResult].self, forKey: .member) - var storeImageTaskResultsBuffer:[EC2ClientTypes.StoreImageTaskResult]? = nil - if let storeImageTaskResultsContainer = storeImageTaskResultsContainer { - storeImageTaskResultsBuffer = [EC2ClientTypes.StoreImageTaskResult]() - for structureContainer0 in storeImageTaskResultsContainer { - storeImageTaskResultsBuffer?.append(structureContainer0) - } - } - storeImageTaskResults = storeImageTaskResultsBuffer - } else { - storeImageTaskResults = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - storeImageTaskResults = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeStoreImageTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -71730,82 +48628,16 @@ public struct DescribeSubnetsInput: Swift.Equatable { } } -struct DescribeSubnetsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let subnetIds: [Swift.String]? - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeSubnetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case subnetIds = "SubnetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetId{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeSubnetsOutput { -extension DescribeSubnetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSubnetsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.subnets = output.subnets - } else { - self.nextToken = nil - self.subnets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeSubnetsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.subnets = try reader["subnetSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Subnet.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -71826,48 +48658,18 @@ public struct DescribeSubnetsOutput: Swift.Equatable { } } -struct DescribeSubnetsOutputBody: Swift.Equatable { - let subnets: [EC2ClientTypes.Subnet]? - let nextToken: Swift.String? -} +enum DescribeSubnetsOutputError { -extension DescribeSubnetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case subnets = "subnetSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.subnets) { - struct KeyVal0{struct item{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([EC2ClientTypes.Subnet].self, forKey: .member) - var subnetsBuffer:[EC2ClientTypes.Subnet]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [EC2ClientTypes.Subnet]() - for structureContainer0 in subnetsContainer { - subnetsBuffer?.append(structureContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - subnets = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeSubnetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -71942,61 +48744,16 @@ public struct DescribeTagsInput: Swift.Equatable { } } -struct DescribeTagsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "maxResults" - case nextToken = "nextToken" - } +extension DescribeTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.tags = output.tags - } else { - self.nextToken = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTagsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TagDescription.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -72017,48 +48774,18 @@ public struct DescribeTagsOutput: Swift.Equatable { } } -struct DescribeTagsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let tags: [EC2ClientTypes.TagDescription]? -} - -extension DescribeTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case tags = "tagSet" - } +enum DescribeTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagDescription].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.TagDescription]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.TagDescription]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - tags = nil - } - } -} - -enum DescribeTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -72143,82 +48870,16 @@ public struct DescribeTrafficMirrorFiltersInput: Swift.Equatable { } } -struct DescribeTrafficMirrorFiltersInputBody: Swift.Equatable { - let trafficMirrorFilterIds: [Swift.String]? - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeTrafficMirrorFiltersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case trafficMirrorFilterIds = "TrafficMirrorFilterId" - } +extension DescribeTrafficMirrorFiltersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficMirrorFilterIds) { - struct KeyVal0{struct item{}} - let trafficMirrorFilterIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficMirrorFilterIds) - if let trafficMirrorFilterIdsWrappedContainer = trafficMirrorFilterIdsWrappedContainer { - let trafficMirrorFilterIdsContainer = try trafficMirrorFilterIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var trafficMirrorFilterIdsBuffer:[Swift.String]? = nil - if let trafficMirrorFilterIdsContainer = trafficMirrorFilterIdsContainer { - trafficMirrorFilterIdsBuffer = [Swift.String]() - for stringContainer0 in trafficMirrorFilterIdsContainer { - trafficMirrorFilterIdsBuffer?.append(stringContainer0) - } - } - trafficMirrorFilterIds = trafficMirrorFilterIdsBuffer - } else { - trafficMirrorFilterIds = [] - } - } else { - trafficMirrorFilterIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeTrafficMirrorFiltersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTrafficMirrorFiltersOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.trafficMirrorFilters = output.trafficMirrorFilters - } else { - self.nextToken = nil - self.trafficMirrorFilters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTrafficMirrorFiltersOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.trafficMirrorFilters = try reader["trafficMirrorFilterSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TrafficMirrorFilter.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -72239,48 +48900,18 @@ public struct DescribeTrafficMirrorFiltersOutput: Swift.Equatable { } } -struct DescribeTrafficMirrorFiltersOutputBody: Swift.Equatable { - let trafficMirrorFilters: [EC2ClientTypes.TrafficMirrorFilter]? - let nextToken: Swift.String? -} - -extension DescribeTrafficMirrorFiltersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case trafficMirrorFilters = "trafficMirrorFilterSet" - } +enum DescribeTrafficMirrorFiltersOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficMirrorFilters) { - struct KeyVal0{struct item{}} - let trafficMirrorFiltersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficMirrorFilters) - if let trafficMirrorFiltersWrappedContainer = trafficMirrorFiltersWrappedContainer { - let trafficMirrorFiltersContainer = try trafficMirrorFiltersWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorFilter].self, forKey: .member) - var trafficMirrorFiltersBuffer:[EC2ClientTypes.TrafficMirrorFilter]? = nil - if let trafficMirrorFiltersContainer = trafficMirrorFiltersContainer { - trafficMirrorFiltersBuffer = [EC2ClientTypes.TrafficMirrorFilter]() - for structureContainer0 in trafficMirrorFiltersContainer { - trafficMirrorFiltersBuffer?.append(structureContainer0) - } - } - trafficMirrorFilters = trafficMirrorFiltersBuffer - } else { - trafficMirrorFilters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - trafficMirrorFilters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTrafficMirrorFiltersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -72379,82 +49010,16 @@ public struct DescribeTrafficMirrorSessionsInput: Swift.Equatable { } } -struct DescribeTrafficMirrorSessionsInputBody: Swift.Equatable { - let trafficMirrorSessionIds: [Swift.String]? - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeTrafficMirrorSessionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case trafficMirrorSessionIds = "TrafficMirrorSessionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficMirrorSessionIds) { - struct KeyVal0{struct item{}} - let trafficMirrorSessionIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficMirrorSessionIds) - if let trafficMirrorSessionIdsWrappedContainer = trafficMirrorSessionIdsWrappedContainer { - let trafficMirrorSessionIdsContainer = try trafficMirrorSessionIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var trafficMirrorSessionIdsBuffer:[Swift.String]? = nil - if let trafficMirrorSessionIdsContainer = trafficMirrorSessionIdsContainer { - trafficMirrorSessionIdsBuffer = [Swift.String]() - for stringContainer0 in trafficMirrorSessionIdsContainer { - trafficMirrorSessionIdsBuffer?.append(stringContainer0) - } - } - trafficMirrorSessionIds = trafficMirrorSessionIdsBuffer - } else { - trafficMirrorSessionIds = [] - } - } else { - trafficMirrorSessionIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeTrafficMirrorSessionsOutput { -extension DescribeTrafficMirrorSessionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTrafficMirrorSessionsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.trafficMirrorSessions = output.trafficMirrorSessions - } else { - self.nextToken = nil - self.trafficMirrorSessions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTrafficMirrorSessionsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.trafficMirrorSessions = try reader["trafficMirrorSessionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TrafficMirrorSession.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -72475,48 +49040,18 @@ public struct DescribeTrafficMirrorSessionsOutput: Swift.Equatable { } } -struct DescribeTrafficMirrorSessionsOutputBody: Swift.Equatable { - let trafficMirrorSessions: [EC2ClientTypes.TrafficMirrorSession]? - let nextToken: Swift.String? -} - -extension DescribeTrafficMirrorSessionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case trafficMirrorSessions = "trafficMirrorSessionSet" - } +enum DescribeTrafficMirrorSessionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficMirrorSessions) { - struct KeyVal0{struct item{}} - let trafficMirrorSessionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficMirrorSessions) - if let trafficMirrorSessionsWrappedContainer = trafficMirrorSessionsWrappedContainer { - let trafficMirrorSessionsContainer = try trafficMirrorSessionsWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorSession].self, forKey: .member) - var trafficMirrorSessionsBuffer:[EC2ClientTypes.TrafficMirrorSession]? = nil - if let trafficMirrorSessionsContainer = trafficMirrorSessionsContainer { - trafficMirrorSessionsBuffer = [EC2ClientTypes.TrafficMirrorSession]() - for structureContainer0 in trafficMirrorSessionsContainer { - trafficMirrorSessionsBuffer?.append(structureContainer0) - } - } - trafficMirrorSessions = trafficMirrorSessionsBuffer - } else { - trafficMirrorSessions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - trafficMirrorSessions = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTrafficMirrorSessionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -72607,82 +49142,16 @@ public struct DescribeTrafficMirrorTargetsInput: Swift.Equatable { } } -struct DescribeTrafficMirrorTargetsInputBody: Swift.Equatable { - let trafficMirrorTargetIds: [Swift.String]? - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeTrafficMirrorTargetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case trafficMirrorTargetIds = "TrafficMirrorTargetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficMirrorTargetIds) { - struct KeyVal0{struct item{}} - let trafficMirrorTargetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficMirrorTargetIds) - if let trafficMirrorTargetIdsWrappedContainer = trafficMirrorTargetIdsWrappedContainer { - let trafficMirrorTargetIdsContainer = try trafficMirrorTargetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var trafficMirrorTargetIdsBuffer:[Swift.String]? = nil - if let trafficMirrorTargetIdsContainer = trafficMirrorTargetIdsContainer { - trafficMirrorTargetIdsBuffer = [Swift.String]() - for stringContainer0 in trafficMirrorTargetIdsContainer { - trafficMirrorTargetIdsBuffer?.append(stringContainer0) - } - } - trafficMirrorTargetIds = trafficMirrorTargetIdsBuffer - } else { - trafficMirrorTargetIds = [] - } - } else { - trafficMirrorTargetIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeTrafficMirrorTargetsOutput { -extension DescribeTrafficMirrorTargetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTrafficMirrorTargetsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.trafficMirrorTargets = output.trafficMirrorTargets - } else { - self.nextToken = nil - self.trafficMirrorTargets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTrafficMirrorTargetsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.trafficMirrorTargets = try reader["trafficMirrorTargetSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TrafficMirrorTarget.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -72703,48 +49172,18 @@ public struct DescribeTrafficMirrorTargetsOutput: Swift.Equatable { } } -struct DescribeTrafficMirrorTargetsOutputBody: Swift.Equatable { - let trafficMirrorTargets: [EC2ClientTypes.TrafficMirrorTarget]? - let nextToken: Swift.String? -} - -extension DescribeTrafficMirrorTargetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case trafficMirrorTargets = "trafficMirrorTargetSet" - } +enum DescribeTrafficMirrorTargetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficMirrorTargets) { - struct KeyVal0{struct item{}} - let trafficMirrorTargetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficMirrorTargets) - if let trafficMirrorTargetsWrappedContainer = trafficMirrorTargetsWrappedContainer { - let trafficMirrorTargetsContainer = try trafficMirrorTargetsWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorTarget].self, forKey: .member) - var trafficMirrorTargetsBuffer:[EC2ClientTypes.TrafficMirrorTarget]? = nil - if let trafficMirrorTargetsContainer = trafficMirrorTargetsContainer { - trafficMirrorTargetsBuffer = [EC2ClientTypes.TrafficMirrorTarget]() - for structureContainer0 in trafficMirrorTargetsContainer { - trafficMirrorTargetsBuffer?.append(structureContainer0) - } - } - trafficMirrorTargets = trafficMirrorTargetsBuffer - } else { - trafficMirrorTargets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - trafficMirrorTargets = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTrafficMirrorTargetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -72843,82 +49282,16 @@ public struct DescribeTransitGatewayAttachmentsInput: Swift.Equatable { } } -struct DescribeTransitGatewayAttachmentsInputBody: Swift.Equatable { - let transitGatewayAttachmentIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayAttachmentsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayAttachmentIds = "TransitGatewayAttachmentIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayAttachmentIds) { - struct KeyVal0{struct member{}} - let transitGatewayAttachmentIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayAttachmentIds) - if let transitGatewayAttachmentIdsWrappedContainer = transitGatewayAttachmentIdsWrappedContainer { - let transitGatewayAttachmentIdsContainer = try transitGatewayAttachmentIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayAttachmentIdsBuffer:[Swift.String]? = nil - if let transitGatewayAttachmentIdsContainer = transitGatewayAttachmentIdsContainer { - transitGatewayAttachmentIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayAttachmentIdsContainer { - transitGatewayAttachmentIdsBuffer?.append(stringContainer0) - } - } - transitGatewayAttachmentIds = transitGatewayAttachmentIdsBuffer - } else { - transitGatewayAttachmentIds = [] - } - } else { - transitGatewayAttachmentIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeTransitGatewayAttachmentsOutput { -extension DescribeTransitGatewayAttachmentsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayAttachmentsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayAttachments = output.transitGatewayAttachments - } else { - self.nextToken = nil - self.transitGatewayAttachments = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayAttachmentsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayAttachments = try reader["transitGatewayAttachments"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -72939,48 +49312,18 @@ public struct DescribeTransitGatewayAttachmentsOutput: Swift.Equatable { } } -struct DescribeTransitGatewayAttachmentsOutputBody: Swift.Equatable { - let transitGatewayAttachments: [EC2ClientTypes.TransitGatewayAttachment]? - let nextToken: Swift.String? -} - -extension DescribeTransitGatewayAttachmentsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayAttachments = "transitGatewayAttachments" - } +enum DescribeTransitGatewayAttachmentsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayAttachments) { - struct KeyVal0{struct item{}} - let transitGatewayAttachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayAttachments) - if let transitGatewayAttachmentsWrappedContainer = transitGatewayAttachmentsWrappedContainer { - let transitGatewayAttachmentsContainer = try transitGatewayAttachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayAttachment].self, forKey: .member) - var transitGatewayAttachmentsBuffer:[EC2ClientTypes.TransitGatewayAttachment]? = nil - if let transitGatewayAttachmentsContainer = transitGatewayAttachmentsContainer { - transitGatewayAttachmentsBuffer = [EC2ClientTypes.TransitGatewayAttachment]() - for structureContainer0 in transitGatewayAttachmentsContainer { - transitGatewayAttachmentsBuffer?.append(structureContainer0) - } - } - transitGatewayAttachments = transitGatewayAttachmentsBuffer - } else { - transitGatewayAttachments = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayAttachments = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayAttachmentsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -73067,82 +49410,16 @@ public struct DescribeTransitGatewayConnectPeersInput: Swift.Equatable { } } -struct DescribeTransitGatewayConnectPeersInputBody: Swift.Equatable { - let transitGatewayConnectPeerIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayConnectPeersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayConnectPeerIds = "TransitGatewayConnectPeerIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayConnectPeerIds) { - struct KeyVal0{struct item{}} - let transitGatewayConnectPeerIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayConnectPeerIds) - if let transitGatewayConnectPeerIdsWrappedContainer = transitGatewayConnectPeerIdsWrappedContainer { - let transitGatewayConnectPeerIdsContainer = try transitGatewayConnectPeerIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayConnectPeerIdsBuffer:[Swift.String]? = nil - if let transitGatewayConnectPeerIdsContainer = transitGatewayConnectPeerIdsContainer { - transitGatewayConnectPeerIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayConnectPeerIdsContainer { - transitGatewayConnectPeerIdsBuffer?.append(stringContainer0) - } - } - transitGatewayConnectPeerIds = transitGatewayConnectPeerIdsBuffer - } else { - transitGatewayConnectPeerIds = [] - } - } else { - transitGatewayConnectPeerIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeTransitGatewayConnectPeersOutput { -extension DescribeTransitGatewayConnectPeersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayConnectPeersOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayConnectPeers = output.transitGatewayConnectPeers - } else { - self.nextToken = nil - self.transitGatewayConnectPeers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayConnectPeersOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayConnectPeers = try reader["transitGatewayConnectPeerSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayConnectPeer.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -73163,48 +49440,18 @@ public struct DescribeTransitGatewayConnectPeersOutput: Swift.Equatable { } } -struct DescribeTransitGatewayConnectPeersOutputBody: Swift.Equatable { - let transitGatewayConnectPeers: [EC2ClientTypes.TransitGatewayConnectPeer]? - let nextToken: Swift.String? -} - -extension DescribeTransitGatewayConnectPeersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayConnectPeers = "transitGatewayConnectPeerSet" - } +enum DescribeTransitGatewayConnectPeersOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayConnectPeers) { - struct KeyVal0{struct item{}} - let transitGatewayConnectPeersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayConnectPeers) - if let transitGatewayConnectPeersWrappedContainer = transitGatewayConnectPeersWrappedContainer { - let transitGatewayConnectPeersContainer = try transitGatewayConnectPeersWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayConnectPeer].self, forKey: .member) - var transitGatewayConnectPeersBuffer:[EC2ClientTypes.TransitGatewayConnectPeer]? = nil - if let transitGatewayConnectPeersContainer = transitGatewayConnectPeersContainer { - transitGatewayConnectPeersBuffer = [EC2ClientTypes.TransitGatewayConnectPeer]() - for structureContainer0 in transitGatewayConnectPeersContainer { - transitGatewayConnectPeersBuffer?.append(structureContainer0) - } - } - transitGatewayConnectPeers = transitGatewayConnectPeersBuffer - } else { - transitGatewayConnectPeers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayConnectPeers = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayConnectPeersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -73295,82 +49542,16 @@ public struct DescribeTransitGatewayConnectsInput: Swift.Equatable { } } -struct DescribeTransitGatewayConnectsInputBody: Swift.Equatable { - let transitGatewayAttachmentIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayConnectsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayAttachmentIds = "TransitGatewayAttachmentIds" - } +extension DescribeTransitGatewayConnectsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayAttachmentIds) { - struct KeyVal0{struct member{}} - let transitGatewayAttachmentIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayAttachmentIds) - if let transitGatewayAttachmentIdsWrappedContainer = transitGatewayAttachmentIdsWrappedContainer { - let transitGatewayAttachmentIdsContainer = try transitGatewayAttachmentIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayAttachmentIdsBuffer:[Swift.String]? = nil - if let transitGatewayAttachmentIdsContainer = transitGatewayAttachmentIdsContainer { - transitGatewayAttachmentIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayAttachmentIdsContainer { - transitGatewayAttachmentIdsBuffer?.append(stringContainer0) - } - } - transitGatewayAttachmentIds = transitGatewayAttachmentIdsBuffer - } else { - transitGatewayAttachmentIds = [] - } - } else { - transitGatewayAttachmentIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeTransitGatewayConnectsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayConnectsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayConnects = output.transitGatewayConnects - } else { - self.nextToken = nil - self.transitGatewayConnects = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayConnectsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayConnects = try reader["transitGatewayConnectSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayConnect.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -73391,48 +49572,18 @@ public struct DescribeTransitGatewayConnectsOutput: Swift.Equatable { } } -struct DescribeTransitGatewayConnectsOutputBody: Swift.Equatable { - let transitGatewayConnects: [EC2ClientTypes.TransitGatewayConnect]? - let nextToken: Swift.String? -} - -extension DescribeTransitGatewayConnectsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayConnects = "transitGatewayConnectSet" - } +enum DescribeTransitGatewayConnectsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayConnects) { - struct KeyVal0{struct item{}} - let transitGatewayConnectsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayConnects) - if let transitGatewayConnectsWrappedContainer = transitGatewayConnectsWrappedContainer { - let transitGatewayConnectsContainer = try transitGatewayConnectsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayConnect].self, forKey: .member) - var transitGatewayConnectsBuffer:[EC2ClientTypes.TransitGatewayConnect]? = nil - if let transitGatewayConnectsContainer = transitGatewayConnectsContainer { - transitGatewayConnectsBuffer = [EC2ClientTypes.TransitGatewayConnect]() - for structureContainer0 in transitGatewayConnectsContainer { - transitGatewayConnectsBuffer?.append(structureContainer0) - } - } - transitGatewayConnects = transitGatewayConnectsBuffer - } else { - transitGatewayConnects = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayConnects = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayConnectsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -73519,82 +49670,16 @@ public struct DescribeTransitGatewayMulticastDomainsInput: Swift.Equatable { } } -struct DescribeTransitGatewayMulticastDomainsInputBody: Swift.Equatable { - let transitGatewayMulticastDomainIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayMulticastDomainsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayMulticastDomainIds = "TransitGatewayMulticastDomainIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayMulticastDomainIds) { - struct KeyVal0{struct item{}} - let transitGatewayMulticastDomainIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayMulticastDomainIds) - if let transitGatewayMulticastDomainIdsWrappedContainer = transitGatewayMulticastDomainIdsWrappedContainer { - let transitGatewayMulticastDomainIdsContainer = try transitGatewayMulticastDomainIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayMulticastDomainIdsBuffer:[Swift.String]? = nil - if let transitGatewayMulticastDomainIdsContainer = transitGatewayMulticastDomainIdsContainer { - transitGatewayMulticastDomainIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayMulticastDomainIdsContainer { - transitGatewayMulticastDomainIdsBuffer?.append(stringContainer0) - } - } - transitGatewayMulticastDomainIds = transitGatewayMulticastDomainIdsBuffer - } else { - transitGatewayMulticastDomainIds = [] - } - } else { - transitGatewayMulticastDomainIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeTransitGatewayMulticastDomainsOutput { -extension DescribeTransitGatewayMulticastDomainsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayMulticastDomainsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayMulticastDomains = output.transitGatewayMulticastDomains - } else { - self.nextToken = nil - self.transitGatewayMulticastDomains = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayMulticastDomainsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayMulticastDomains = try reader["transitGatewayMulticastDomains"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayMulticastDomain.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -73615,48 +49700,18 @@ public struct DescribeTransitGatewayMulticastDomainsOutput: Swift.Equatable { } } -struct DescribeTransitGatewayMulticastDomainsOutputBody: Swift.Equatable { - let transitGatewayMulticastDomains: [EC2ClientTypes.TransitGatewayMulticastDomain]? - let nextToken: Swift.String? -} +enum DescribeTransitGatewayMulticastDomainsOutputError { -extension DescribeTransitGatewayMulticastDomainsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayMulticastDomains = "transitGatewayMulticastDomains" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayMulticastDomains) { - struct KeyVal0{struct item{}} - let transitGatewayMulticastDomainsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayMulticastDomains) - if let transitGatewayMulticastDomainsWrappedContainer = transitGatewayMulticastDomainsWrappedContainer { - let transitGatewayMulticastDomainsContainer = try transitGatewayMulticastDomainsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayMulticastDomain].self, forKey: .member) - var transitGatewayMulticastDomainsBuffer:[EC2ClientTypes.TransitGatewayMulticastDomain]? = nil - if let transitGatewayMulticastDomainsContainer = transitGatewayMulticastDomainsContainer { - transitGatewayMulticastDomainsBuffer = [EC2ClientTypes.TransitGatewayMulticastDomain]() - for structureContainer0 in transitGatewayMulticastDomainsContainer { - transitGatewayMulticastDomainsBuffer?.append(structureContainer0) - } - } - transitGatewayMulticastDomains = transitGatewayMulticastDomainsBuffer - } else { - transitGatewayMulticastDomains = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayMulticastDomains = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayMulticastDomainsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -73751,82 +49806,16 @@ public struct DescribeTransitGatewayPeeringAttachmentsInput: Swift.Equatable { } } -struct DescribeTransitGatewayPeeringAttachmentsInputBody: Swift.Equatable { - let transitGatewayAttachmentIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayPeeringAttachmentsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayAttachmentIds = "TransitGatewayAttachmentIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayAttachmentIds) { - struct KeyVal0{struct member{}} - let transitGatewayAttachmentIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayAttachmentIds) - if let transitGatewayAttachmentIdsWrappedContainer = transitGatewayAttachmentIdsWrappedContainer { - let transitGatewayAttachmentIdsContainer = try transitGatewayAttachmentIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayAttachmentIdsBuffer:[Swift.String]? = nil - if let transitGatewayAttachmentIdsContainer = transitGatewayAttachmentIdsContainer { - transitGatewayAttachmentIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayAttachmentIdsContainer { - transitGatewayAttachmentIdsBuffer?.append(stringContainer0) - } - } - transitGatewayAttachmentIds = transitGatewayAttachmentIdsBuffer - } else { - transitGatewayAttachmentIds = [] - } - } else { - transitGatewayAttachmentIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeTransitGatewayPeeringAttachmentsOutput { -extension DescribeTransitGatewayPeeringAttachmentsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayPeeringAttachmentsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayPeeringAttachments = output.transitGatewayPeeringAttachments - } else { - self.nextToken = nil - self.transitGatewayPeeringAttachments = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayPeeringAttachmentsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayPeeringAttachments = try reader["transitGatewayPeeringAttachments"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayPeeringAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -73847,48 +49836,18 @@ public struct DescribeTransitGatewayPeeringAttachmentsOutput: Swift.Equatable { } } -struct DescribeTransitGatewayPeeringAttachmentsOutputBody: Swift.Equatable { - let transitGatewayPeeringAttachments: [EC2ClientTypes.TransitGatewayPeeringAttachment]? - let nextToken: Swift.String? -} - -extension DescribeTransitGatewayPeeringAttachmentsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayPeeringAttachments = "transitGatewayPeeringAttachments" - } +enum DescribeTransitGatewayPeeringAttachmentsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayPeeringAttachments) { - struct KeyVal0{struct item{}} - let transitGatewayPeeringAttachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayPeeringAttachments) - if let transitGatewayPeeringAttachmentsWrappedContainer = transitGatewayPeeringAttachmentsWrappedContainer { - let transitGatewayPeeringAttachmentsContainer = try transitGatewayPeeringAttachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayPeeringAttachment].self, forKey: .member) - var transitGatewayPeeringAttachmentsBuffer:[EC2ClientTypes.TransitGatewayPeeringAttachment]? = nil - if let transitGatewayPeeringAttachmentsContainer = transitGatewayPeeringAttachmentsContainer { - transitGatewayPeeringAttachmentsBuffer = [EC2ClientTypes.TransitGatewayPeeringAttachment]() - for structureContainer0 in transitGatewayPeeringAttachmentsContainer { - transitGatewayPeeringAttachmentsBuffer?.append(structureContainer0) - } - } - transitGatewayPeeringAttachments = transitGatewayPeeringAttachmentsBuffer - } else { - transitGatewayPeeringAttachments = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayPeeringAttachments = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayPeeringAttachmentsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -73969,82 +49928,16 @@ public struct DescribeTransitGatewayPolicyTablesInput: Swift.Equatable { } } -struct DescribeTransitGatewayPolicyTablesInputBody: Swift.Equatable { - let transitGatewayPolicyTableIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayPolicyTablesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayPolicyTableIds = "TransitGatewayPolicyTableIds" - } +extension DescribeTransitGatewayPolicyTablesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayPolicyTableIds) { - struct KeyVal0{struct item{}} - let transitGatewayPolicyTableIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayPolicyTableIds) - if let transitGatewayPolicyTableIdsWrappedContainer = transitGatewayPolicyTableIdsWrappedContainer { - let transitGatewayPolicyTableIdsContainer = try transitGatewayPolicyTableIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayPolicyTableIdsBuffer:[Swift.String]? = nil - if let transitGatewayPolicyTableIdsContainer = transitGatewayPolicyTableIdsContainer { - transitGatewayPolicyTableIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayPolicyTableIdsContainer { - transitGatewayPolicyTableIdsBuffer?.append(stringContainer0) - } - } - transitGatewayPolicyTableIds = transitGatewayPolicyTableIdsBuffer - } else { - transitGatewayPolicyTableIds = [] - } - } else { - transitGatewayPolicyTableIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeTransitGatewayPolicyTablesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayPolicyTablesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayPolicyTables = output.transitGatewayPolicyTables - } else { - self.nextToken = nil - self.transitGatewayPolicyTables = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayPolicyTablesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayPolicyTables = try reader["transitGatewayPolicyTables"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayPolicyTable.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -74065,48 +49958,18 @@ public struct DescribeTransitGatewayPolicyTablesOutput: Swift.Equatable { } } -struct DescribeTransitGatewayPolicyTablesOutputBody: Swift.Equatable { - let transitGatewayPolicyTables: [EC2ClientTypes.TransitGatewayPolicyTable]? - let nextToken: Swift.String? -} - -extension DescribeTransitGatewayPolicyTablesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayPolicyTables = "transitGatewayPolicyTables" - } +enum DescribeTransitGatewayPolicyTablesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayPolicyTables) { - struct KeyVal0{struct item{}} - let transitGatewayPolicyTablesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayPolicyTables) - if let transitGatewayPolicyTablesWrappedContainer = transitGatewayPolicyTablesWrappedContainer { - let transitGatewayPolicyTablesContainer = try transitGatewayPolicyTablesWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayPolicyTable].self, forKey: .member) - var transitGatewayPolicyTablesBuffer:[EC2ClientTypes.TransitGatewayPolicyTable]? = nil - if let transitGatewayPolicyTablesContainer = transitGatewayPolicyTablesContainer { - transitGatewayPolicyTablesBuffer = [EC2ClientTypes.TransitGatewayPolicyTable]() - for structureContainer0 in transitGatewayPolicyTablesContainer { - transitGatewayPolicyTablesBuffer?.append(structureContainer0) - } - } - transitGatewayPolicyTables = transitGatewayPolicyTablesBuffer - } else { - transitGatewayPolicyTables = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayPolicyTables = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayPolicyTablesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -74187,82 +50050,16 @@ public struct DescribeTransitGatewayRouteTableAnnouncementsInput: Swift.Equatabl } } -struct DescribeTransitGatewayRouteTableAnnouncementsInputBody: Swift.Equatable { - let transitGatewayRouteTableAnnouncementIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayRouteTableAnnouncementsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayRouteTableAnnouncementIds = "TransitGatewayRouteTableAnnouncementIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayRouteTableAnnouncementIds) { - struct KeyVal0{struct item{}} - let transitGatewayRouteTableAnnouncementIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayRouteTableAnnouncementIds) - if let transitGatewayRouteTableAnnouncementIdsWrappedContainer = transitGatewayRouteTableAnnouncementIdsWrappedContainer { - let transitGatewayRouteTableAnnouncementIdsContainer = try transitGatewayRouteTableAnnouncementIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayRouteTableAnnouncementIdsBuffer:[Swift.String]? = nil - if let transitGatewayRouteTableAnnouncementIdsContainer = transitGatewayRouteTableAnnouncementIdsContainer { - transitGatewayRouteTableAnnouncementIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayRouteTableAnnouncementIdsContainer { - transitGatewayRouteTableAnnouncementIdsBuffer?.append(stringContainer0) - } - } - transitGatewayRouteTableAnnouncementIds = transitGatewayRouteTableAnnouncementIdsBuffer - } else { - transitGatewayRouteTableAnnouncementIds = [] - } - } else { - transitGatewayRouteTableAnnouncementIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeTransitGatewayRouteTableAnnouncementsOutput { -extension DescribeTransitGatewayRouteTableAnnouncementsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayRouteTableAnnouncementsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayRouteTableAnnouncements = output.transitGatewayRouteTableAnnouncements - } else { - self.nextToken = nil - self.transitGatewayRouteTableAnnouncements = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayRouteTableAnnouncementsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayRouteTableAnnouncements = try reader["transitGatewayRouteTableAnnouncements"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayRouteTableAnnouncement.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -74283,48 +50080,18 @@ public struct DescribeTransitGatewayRouteTableAnnouncementsOutput: Swift.Equatab } } -struct DescribeTransitGatewayRouteTableAnnouncementsOutputBody: Swift.Equatable { - let transitGatewayRouteTableAnnouncements: [EC2ClientTypes.TransitGatewayRouteTableAnnouncement]? - let nextToken: Swift.String? -} - -extension DescribeTransitGatewayRouteTableAnnouncementsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayRouteTableAnnouncements = "transitGatewayRouteTableAnnouncements" - } +enum DescribeTransitGatewayRouteTableAnnouncementsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayRouteTableAnnouncements) { - struct KeyVal0{struct item{}} - let transitGatewayRouteTableAnnouncementsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayRouteTableAnnouncements) - if let transitGatewayRouteTableAnnouncementsWrappedContainer = transitGatewayRouteTableAnnouncementsWrappedContainer { - let transitGatewayRouteTableAnnouncementsContainer = try transitGatewayRouteTableAnnouncementsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayRouteTableAnnouncement].self, forKey: .member) - var transitGatewayRouteTableAnnouncementsBuffer:[EC2ClientTypes.TransitGatewayRouteTableAnnouncement]? = nil - if let transitGatewayRouteTableAnnouncementsContainer = transitGatewayRouteTableAnnouncementsContainer { - transitGatewayRouteTableAnnouncementsBuffer = [EC2ClientTypes.TransitGatewayRouteTableAnnouncement]() - for structureContainer0 in transitGatewayRouteTableAnnouncementsContainer { - transitGatewayRouteTableAnnouncementsBuffer?.append(structureContainer0) - } - } - transitGatewayRouteTableAnnouncements = transitGatewayRouteTableAnnouncementsBuffer - } else { - transitGatewayRouteTableAnnouncements = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayRouteTableAnnouncements = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayRouteTableAnnouncementsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -74415,82 +50182,16 @@ public struct DescribeTransitGatewayRouteTablesInput: Swift.Equatable { } } -struct DescribeTransitGatewayRouteTablesInputBody: Swift.Equatable { - let transitGatewayRouteTableIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayRouteTablesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayRouteTableIds = "TransitGatewayRouteTableIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayRouteTableIds) { - struct KeyVal0{struct item{}} - let transitGatewayRouteTableIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayRouteTableIds) - if let transitGatewayRouteTableIdsWrappedContainer = transitGatewayRouteTableIdsWrappedContainer { - let transitGatewayRouteTableIdsContainer = try transitGatewayRouteTableIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayRouteTableIdsBuffer:[Swift.String]? = nil - if let transitGatewayRouteTableIdsContainer = transitGatewayRouteTableIdsContainer { - transitGatewayRouteTableIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayRouteTableIdsContainer { - transitGatewayRouteTableIdsBuffer?.append(stringContainer0) - } - } - transitGatewayRouteTableIds = transitGatewayRouteTableIdsBuffer - } else { - transitGatewayRouteTableIds = [] - } - } else { - transitGatewayRouteTableIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeTransitGatewayRouteTablesOutput { -extension DescribeTransitGatewayRouteTablesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayRouteTablesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayRouteTables = output.transitGatewayRouteTables - } else { - self.nextToken = nil - self.transitGatewayRouteTables = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayRouteTablesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayRouteTables = try reader["transitGatewayRouteTables"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayRouteTable.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -74511,48 +50212,18 @@ public struct DescribeTransitGatewayRouteTablesOutput: Swift.Equatable { } } -struct DescribeTransitGatewayRouteTablesOutputBody: Swift.Equatable { - let transitGatewayRouteTables: [EC2ClientTypes.TransitGatewayRouteTable]? - let nextToken: Swift.String? -} - -extension DescribeTransitGatewayRouteTablesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayRouteTables = "transitGatewayRouteTables" - } +enum DescribeTransitGatewayRouteTablesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayRouteTables) { - struct KeyVal0{struct item{}} - let transitGatewayRouteTablesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayRouteTables) - if let transitGatewayRouteTablesWrappedContainer = transitGatewayRouteTablesWrappedContainer { - let transitGatewayRouteTablesContainer = try transitGatewayRouteTablesWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayRouteTable].self, forKey: .member) - var transitGatewayRouteTablesBuffer:[EC2ClientTypes.TransitGatewayRouteTable]? = nil - if let transitGatewayRouteTablesContainer = transitGatewayRouteTablesContainer { - transitGatewayRouteTablesBuffer = [EC2ClientTypes.TransitGatewayRouteTable]() - for structureContainer0 in transitGatewayRouteTablesContainer { - transitGatewayRouteTablesBuffer?.append(structureContainer0) - } - } - transitGatewayRouteTables = transitGatewayRouteTablesBuffer - } else { - transitGatewayRouteTables = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayRouteTables = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayRouteTablesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -74641,82 +50312,16 @@ public struct DescribeTransitGatewayVpcAttachmentsInput: Swift.Equatable { } } -struct DescribeTransitGatewayVpcAttachmentsInputBody: Swift.Equatable { - let transitGatewayAttachmentIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewayVpcAttachmentsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayAttachmentIds = "TransitGatewayAttachmentIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayAttachmentIds) { - struct KeyVal0{struct member{}} - let transitGatewayAttachmentIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayAttachmentIds) - if let transitGatewayAttachmentIdsWrappedContainer = transitGatewayAttachmentIdsWrappedContainer { - let transitGatewayAttachmentIdsContainer = try transitGatewayAttachmentIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayAttachmentIdsBuffer:[Swift.String]? = nil - if let transitGatewayAttachmentIdsContainer = transitGatewayAttachmentIdsContainer { - transitGatewayAttachmentIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayAttachmentIdsContainer { - transitGatewayAttachmentIdsBuffer?.append(stringContainer0) - } - } - transitGatewayAttachmentIds = transitGatewayAttachmentIdsBuffer - } else { - transitGatewayAttachmentIds = [] - } - } else { - transitGatewayAttachmentIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeTransitGatewayVpcAttachmentsOutput { -extension DescribeTransitGatewayVpcAttachmentsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewayVpcAttachmentsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayVpcAttachments = output.transitGatewayVpcAttachments - } else { - self.nextToken = nil - self.transitGatewayVpcAttachments = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewayVpcAttachmentsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayVpcAttachments = try reader["transitGatewayVpcAttachments"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayVpcAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -74737,48 +50342,18 @@ public struct DescribeTransitGatewayVpcAttachmentsOutput: Swift.Equatable { } } -struct DescribeTransitGatewayVpcAttachmentsOutputBody: Swift.Equatable { - let transitGatewayVpcAttachments: [EC2ClientTypes.TransitGatewayVpcAttachment]? - let nextToken: Swift.String? -} +enum DescribeTransitGatewayVpcAttachmentsOutputError { -extension DescribeTransitGatewayVpcAttachmentsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayVpcAttachments = "transitGatewayVpcAttachments" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayVpcAttachments) { - struct KeyVal0{struct item{}} - let transitGatewayVpcAttachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayVpcAttachments) - if let transitGatewayVpcAttachmentsWrappedContainer = transitGatewayVpcAttachmentsWrappedContainer { - let transitGatewayVpcAttachmentsContainer = try transitGatewayVpcAttachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayVpcAttachment].self, forKey: .member) - var transitGatewayVpcAttachmentsBuffer:[EC2ClientTypes.TransitGatewayVpcAttachment]? = nil - if let transitGatewayVpcAttachmentsContainer = transitGatewayVpcAttachmentsContainer { - transitGatewayVpcAttachmentsBuffer = [EC2ClientTypes.TransitGatewayVpcAttachment]() - for structureContainer0 in transitGatewayVpcAttachmentsContainer { - transitGatewayVpcAttachmentsBuffer?.append(structureContainer0) - } - } - transitGatewayVpcAttachments = transitGatewayVpcAttachmentsBuffer - } else { - transitGatewayVpcAttachments = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayVpcAttachments = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewayVpcAttachmentsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -74881,82 +50456,16 @@ public struct DescribeTransitGatewaysInput: Swift.Equatable { } } -struct DescribeTransitGatewaysInputBody: Swift.Equatable { - let transitGatewayIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeTransitGatewaysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayIds = "TransitGatewayIds" - } +extension DescribeTransitGatewaysOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayIds) { - struct KeyVal0{struct item{}} - let transitGatewayIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayIds) - if let transitGatewayIdsWrappedContainer = transitGatewayIdsWrappedContainer { - let transitGatewayIdsContainer = try transitGatewayIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayIdsBuffer:[Swift.String]? = nil - if let transitGatewayIdsContainer = transitGatewayIdsContainer { - transitGatewayIdsBuffer = [Swift.String]() - for stringContainer0 in transitGatewayIdsContainer { - transitGatewayIdsBuffer?.append(stringContainer0) - } - } - transitGatewayIds = transitGatewayIdsBuffer - } else { - transitGatewayIds = [] - } - } else { - transitGatewayIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeTransitGatewaysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTransitGatewaysOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGateways = output.transitGateways - } else { - self.nextToken = nil - self.transitGateways = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTransitGatewaysOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGateways = try reader["transitGatewaySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGateway.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -74977,48 +50486,18 @@ public struct DescribeTransitGatewaysOutput: Swift.Equatable { } } -struct DescribeTransitGatewaysOutputBody: Swift.Equatable { - let transitGateways: [EC2ClientTypes.TransitGateway]? - let nextToken: Swift.String? -} - -extension DescribeTransitGatewaysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGateways = "transitGatewaySet" - } +enum DescribeTransitGatewaysOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGateways) { - struct KeyVal0{struct item{}} - let transitGatewaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGateways) - if let transitGatewaysWrappedContainer = transitGatewaysWrappedContainer { - let transitGatewaysContainer = try transitGatewaysWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGateway].self, forKey: .member) - var transitGatewaysBuffer:[EC2ClientTypes.TransitGateway]? = nil - if let transitGatewaysContainer = transitGatewaysContainer { - transitGatewaysBuffer = [EC2ClientTypes.TransitGateway]() - for structureContainer0 in transitGatewaysContainer { - transitGatewaysBuffer?.append(structureContainer0) - } - } - transitGateways = transitGatewaysBuffer - } else { - transitGateways = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGateways = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTransitGatewaysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -75103,82 +50582,16 @@ public struct DescribeTrunkInterfaceAssociationsInput: Swift.Equatable { } } -struct DescribeTrunkInterfaceAssociationsInputBody: Swift.Equatable { - let associationIds: [Swift.String]? - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} +extension DescribeTrunkInterfaceAssociationsOutput { -extension DescribeTrunkInterfaceAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationIds = "AssociationId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.associationIds) { - struct KeyVal0{struct item{}} - let associationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associationIds) - if let associationIdsWrappedContainer = associationIdsWrappedContainer { - let associationIdsContainer = try associationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var associationIdsBuffer:[Swift.String]? = nil - if let associationIdsContainer = associationIdsContainer { - associationIdsBuffer = [Swift.String]() - for stringContainer0 in associationIdsContainer { - associationIdsBuffer?.append(stringContainer0) - } - } - associationIds = associationIdsBuffer - } else { - associationIds = [] - } - } else { - associationIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeTrunkInterfaceAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTrunkInterfaceAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.interfaceAssociations = output.interfaceAssociations - self.nextToken = output.nextToken - } else { - self.interfaceAssociations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeTrunkInterfaceAssociationsOutput() + value.interfaceAssociations = try reader["interfaceAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TrunkInterfaceAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -75199,48 +50612,18 @@ public struct DescribeTrunkInterfaceAssociationsOutput: Swift.Equatable { } } -struct DescribeTrunkInterfaceAssociationsOutputBody: Swift.Equatable { - let interfaceAssociations: [EC2ClientTypes.TrunkInterfaceAssociation]? - let nextToken: Swift.String? -} - -extension DescribeTrunkInterfaceAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case interfaceAssociations = "interfaceAssociationSet" - case nextToken = "nextToken" - } +enum DescribeTrunkInterfaceAssociationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.interfaceAssociations) { - struct KeyVal0{struct item{}} - let interfaceAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .interfaceAssociations) - if let interfaceAssociationsWrappedContainer = interfaceAssociationsWrappedContainer { - let interfaceAssociationsContainer = try interfaceAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TrunkInterfaceAssociation].self, forKey: .member) - var interfaceAssociationsBuffer:[EC2ClientTypes.TrunkInterfaceAssociation]? = nil - if let interfaceAssociationsContainer = interfaceAssociationsContainer { - interfaceAssociationsBuffer = [EC2ClientTypes.TrunkInterfaceAssociation]() - for structureContainer0 in interfaceAssociationsContainer { - interfaceAssociationsBuffer?.append(structureContainer0) - } - } - interfaceAssociations = interfaceAssociationsBuffer - } else { - interfaceAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - interfaceAssociations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeTrunkInterfaceAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -75335,90 +50718,16 @@ public struct DescribeVerifiedAccessEndpointsInput: Swift.Equatable { } } -struct DescribeVerifiedAccessEndpointsInputBody: Swift.Equatable { - let verifiedAccessEndpointIds: [Swift.String]? - let verifiedAccessInstanceId: Swift.String? - let verifiedAccessGroupId: Swift.String? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeVerifiedAccessEndpointsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case verifiedAccessEndpointIds = "VerifiedAccessEndpointId" - case verifiedAccessGroupId = "VerifiedAccessGroupId" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessEndpointIds) { - struct KeyVal0{struct item{}} - let verifiedAccessEndpointIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessEndpointIds) - if let verifiedAccessEndpointIdsWrappedContainer = verifiedAccessEndpointIdsWrappedContainer { - let verifiedAccessEndpointIdsContainer = try verifiedAccessEndpointIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var verifiedAccessEndpointIdsBuffer:[Swift.String]? = nil - if let verifiedAccessEndpointIdsContainer = verifiedAccessEndpointIdsContainer { - verifiedAccessEndpointIdsBuffer = [Swift.String]() - for stringContainer0 in verifiedAccessEndpointIdsContainer { - verifiedAccessEndpointIdsBuffer?.append(stringContainer0) - } - } - verifiedAccessEndpointIds = verifiedAccessEndpointIdsBuffer - } else { - verifiedAccessEndpointIds = [] - } - } else { - verifiedAccessEndpointIds = nil - } - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeVerifiedAccessEndpointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVerifiedAccessEndpointsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.verifiedAccessEndpoints = output.verifiedAccessEndpoints - } else { - self.nextToken = nil - self.verifiedAccessEndpoints = nil +extension DescribeVerifiedAccessEndpointsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVerifiedAccessEndpointsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.verifiedAccessEndpoints = try reader["verifiedAccessEndpointSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VerifiedAccessEndpoint.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -75439,48 +50748,18 @@ public struct DescribeVerifiedAccessEndpointsOutput: Swift.Equatable { } } -struct DescribeVerifiedAccessEndpointsOutputBody: Swift.Equatable { - let verifiedAccessEndpoints: [EC2ClientTypes.VerifiedAccessEndpoint]? - let nextToken: Swift.String? -} - -extension DescribeVerifiedAccessEndpointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case verifiedAccessEndpoints = "verifiedAccessEndpointSet" - } +enum DescribeVerifiedAccessEndpointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessEndpoints) { - struct KeyVal0{struct item{}} - let verifiedAccessEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessEndpoints) - if let verifiedAccessEndpointsWrappedContainer = verifiedAccessEndpointsWrappedContainer { - let verifiedAccessEndpointsContainer = try verifiedAccessEndpointsWrappedContainer.decodeIfPresent([EC2ClientTypes.VerifiedAccessEndpoint].self, forKey: .member) - var verifiedAccessEndpointsBuffer:[EC2ClientTypes.VerifiedAccessEndpoint]? = nil - if let verifiedAccessEndpointsContainer = verifiedAccessEndpointsContainer { - verifiedAccessEndpointsBuffer = [EC2ClientTypes.VerifiedAccessEndpoint]() - for structureContainer0 in verifiedAccessEndpointsContainer { - verifiedAccessEndpointsBuffer?.append(structureContainer0) - } - } - verifiedAccessEndpoints = verifiedAccessEndpointsBuffer - } else { - verifiedAccessEndpoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - verifiedAccessEndpoints = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVerifiedAccessEndpointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -75568,86 +50847,16 @@ public struct DescribeVerifiedAccessGroupsInput: Swift.Equatable { } } -struct DescribeVerifiedAccessGroupsInputBody: Swift.Equatable { - let verifiedAccessGroupIds: [Swift.String]? - let verifiedAccessInstanceId: Swift.String? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeVerifiedAccessGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case verifiedAccessGroupIds = "VerifiedAccessGroupId" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessGroupIds) { - struct KeyVal0{struct item{}} - let verifiedAccessGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessGroupIds) - if let verifiedAccessGroupIdsWrappedContainer = verifiedAccessGroupIdsWrappedContainer { - let verifiedAccessGroupIdsContainer = try verifiedAccessGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var verifiedAccessGroupIdsBuffer:[Swift.String]? = nil - if let verifiedAccessGroupIdsContainer = verifiedAccessGroupIdsContainer { - verifiedAccessGroupIdsBuffer = [Swift.String]() - for stringContainer0 in verifiedAccessGroupIdsContainer { - verifiedAccessGroupIdsBuffer?.append(stringContainer0) - } - } - verifiedAccessGroupIds = verifiedAccessGroupIdsBuffer - } else { - verifiedAccessGroupIds = [] - } - } else { - verifiedAccessGroupIds = nil - } - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeVerifiedAccessGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVerifiedAccessGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.verifiedAccessGroups = output.verifiedAccessGroups - } else { - self.nextToken = nil - self.verifiedAccessGroups = nil +extension DescribeVerifiedAccessGroupsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVerifiedAccessGroupsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.verifiedAccessGroups = try reader["verifiedAccessGroupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VerifiedAccessGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -75668,48 +50877,18 @@ public struct DescribeVerifiedAccessGroupsOutput: Swift.Equatable { } } -struct DescribeVerifiedAccessGroupsOutputBody: Swift.Equatable { - let verifiedAccessGroups: [EC2ClientTypes.VerifiedAccessGroup]? - let nextToken: Swift.String? -} - -extension DescribeVerifiedAccessGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case verifiedAccessGroups = "verifiedAccessGroupSet" - } +enum DescribeVerifiedAccessGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessGroups) { - struct KeyVal0{struct item{}} - let verifiedAccessGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessGroups) - if let verifiedAccessGroupsWrappedContainer = verifiedAccessGroupsWrappedContainer { - let verifiedAccessGroupsContainer = try verifiedAccessGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.VerifiedAccessGroup].self, forKey: .member) - var verifiedAccessGroupsBuffer:[EC2ClientTypes.VerifiedAccessGroup]? = nil - if let verifiedAccessGroupsContainer = verifiedAccessGroupsContainer { - verifiedAccessGroupsBuffer = [EC2ClientTypes.VerifiedAccessGroup]() - for structureContainer0 in verifiedAccessGroupsContainer { - verifiedAccessGroupsBuffer?.append(structureContainer0) - } - } - verifiedAccessGroups = verifiedAccessGroupsBuffer - } else { - verifiedAccessGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - verifiedAccessGroups = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVerifiedAccessGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -75790,82 +50969,16 @@ public struct DescribeVerifiedAccessInstanceLoggingConfigurationsInput: Swift.Eq } } -struct DescribeVerifiedAccessInstanceLoggingConfigurationsInputBody: Swift.Equatable { - let verifiedAccessInstanceIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeVerifiedAccessInstanceLoggingConfigurationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case verifiedAccessInstanceIds = "VerifiedAccessInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessInstanceIds) { - struct KeyVal0{struct item{}} - let verifiedAccessInstanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessInstanceIds) - if let verifiedAccessInstanceIdsWrappedContainer = verifiedAccessInstanceIdsWrappedContainer { - let verifiedAccessInstanceIdsContainer = try verifiedAccessInstanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var verifiedAccessInstanceIdsBuffer:[Swift.String]? = nil - if let verifiedAccessInstanceIdsContainer = verifiedAccessInstanceIdsContainer { - verifiedAccessInstanceIdsBuffer = [Swift.String]() - for stringContainer0 in verifiedAccessInstanceIdsContainer { - verifiedAccessInstanceIdsBuffer?.append(stringContainer0) - } - } - verifiedAccessInstanceIds = verifiedAccessInstanceIdsBuffer - } else { - verifiedAccessInstanceIds = [] - } - } else { - verifiedAccessInstanceIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeVerifiedAccessInstanceLoggingConfigurationsOutput { -extension DescribeVerifiedAccessInstanceLoggingConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVerifiedAccessInstanceLoggingConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.loggingConfigurations = output.loggingConfigurations - self.nextToken = output.nextToken - } else { - self.loggingConfigurations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVerifiedAccessInstanceLoggingConfigurationsOutput() + value.loggingConfigurations = try reader["loggingConfigurationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -75886,48 +50999,18 @@ public struct DescribeVerifiedAccessInstanceLoggingConfigurationsOutput: Swift.E } } -struct DescribeVerifiedAccessInstanceLoggingConfigurationsOutputBody: Swift.Equatable { - let loggingConfigurations: [EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration]? - let nextToken: Swift.String? -} - -extension DescribeVerifiedAccessInstanceLoggingConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loggingConfigurations = "loggingConfigurationSet" - case nextToken = "nextToken" - } +enum DescribeVerifiedAccessInstanceLoggingConfigurationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.loggingConfigurations) { - struct KeyVal0{struct item{}} - let loggingConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loggingConfigurations) - if let loggingConfigurationsWrappedContainer = loggingConfigurationsWrappedContainer { - let loggingConfigurationsContainer = try loggingConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration].self, forKey: .member) - var loggingConfigurationsBuffer:[EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration]? = nil - if let loggingConfigurationsContainer = loggingConfigurationsContainer { - loggingConfigurationsBuffer = [EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration]() - for structureContainer0 in loggingConfigurationsContainer { - loggingConfigurationsBuffer?.append(structureContainer0) - } - } - loggingConfigurations = loggingConfigurationsBuffer - } else { - loggingConfigurations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - loggingConfigurations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVerifiedAccessInstanceLoggingConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -76008,82 +51091,16 @@ public struct DescribeVerifiedAccessInstancesInput: Swift.Equatable { } } -struct DescribeVerifiedAccessInstancesInputBody: Swift.Equatable { - let verifiedAccessInstanceIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeVerifiedAccessInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case verifiedAccessInstanceIds = "VerifiedAccessInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessInstanceIds) { - struct KeyVal0{struct item{}} - let verifiedAccessInstanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessInstanceIds) - if let verifiedAccessInstanceIdsWrappedContainer = verifiedAccessInstanceIdsWrappedContainer { - let verifiedAccessInstanceIdsContainer = try verifiedAccessInstanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var verifiedAccessInstanceIdsBuffer:[Swift.String]? = nil - if let verifiedAccessInstanceIdsContainer = verifiedAccessInstanceIdsContainer { - verifiedAccessInstanceIdsBuffer = [Swift.String]() - for stringContainer0 in verifiedAccessInstanceIdsContainer { - verifiedAccessInstanceIdsBuffer?.append(stringContainer0) - } - } - verifiedAccessInstanceIds = verifiedAccessInstanceIdsBuffer - } else { - verifiedAccessInstanceIds = [] - } - } else { - verifiedAccessInstanceIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeVerifiedAccessInstancesOutput { -extension DescribeVerifiedAccessInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVerifiedAccessInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.verifiedAccessInstances = output.verifiedAccessInstances - } else { - self.nextToken = nil - self.verifiedAccessInstances = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVerifiedAccessInstancesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.verifiedAccessInstances = try reader["verifiedAccessInstanceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VerifiedAccessInstance.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -76104,48 +51121,18 @@ public struct DescribeVerifiedAccessInstancesOutput: Swift.Equatable { } } -struct DescribeVerifiedAccessInstancesOutputBody: Swift.Equatable { - let verifiedAccessInstances: [EC2ClientTypes.VerifiedAccessInstance]? - let nextToken: Swift.String? -} - -extension DescribeVerifiedAccessInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case verifiedAccessInstances = "verifiedAccessInstanceSet" - } +enum DescribeVerifiedAccessInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessInstances) { - struct KeyVal0{struct item{}} - let verifiedAccessInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessInstances) - if let verifiedAccessInstancesWrappedContainer = verifiedAccessInstancesWrappedContainer { - let verifiedAccessInstancesContainer = try verifiedAccessInstancesWrappedContainer.decodeIfPresent([EC2ClientTypes.VerifiedAccessInstance].self, forKey: .member) - var verifiedAccessInstancesBuffer:[EC2ClientTypes.VerifiedAccessInstance]? = nil - if let verifiedAccessInstancesContainer = verifiedAccessInstancesContainer { - verifiedAccessInstancesBuffer = [EC2ClientTypes.VerifiedAccessInstance]() - for structureContainer0 in verifiedAccessInstancesContainer { - verifiedAccessInstancesBuffer?.append(structureContainer0) - } - } - verifiedAccessInstances = verifiedAccessInstancesBuffer - } else { - verifiedAccessInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - verifiedAccessInstances = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVerifiedAccessInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -76226,82 +51213,16 @@ public struct DescribeVerifiedAccessTrustProvidersInput: Swift.Equatable { } } -struct DescribeVerifiedAccessTrustProvidersInputBody: Swift.Equatable { - let verifiedAccessTrustProviderIds: [Swift.String]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} - -extension DescribeVerifiedAccessTrustProvidersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case verifiedAccessTrustProviderIds = "VerifiedAccessTrustProviderId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessTrustProviderIds) { - struct KeyVal0{struct item{}} - let verifiedAccessTrustProviderIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessTrustProviderIds) - if let verifiedAccessTrustProviderIdsWrappedContainer = verifiedAccessTrustProviderIdsWrappedContainer { - let verifiedAccessTrustProviderIdsContainer = try verifiedAccessTrustProviderIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var verifiedAccessTrustProviderIdsBuffer:[Swift.String]? = nil - if let verifiedAccessTrustProviderIdsContainer = verifiedAccessTrustProviderIdsContainer { - verifiedAccessTrustProviderIdsBuffer = [Swift.String]() - for stringContainer0 in verifiedAccessTrustProviderIdsContainer { - verifiedAccessTrustProviderIdsBuffer?.append(stringContainer0) - } - } - verifiedAccessTrustProviderIds = verifiedAccessTrustProviderIdsBuffer - } else { - verifiedAccessTrustProviderIds = [] - } - } else { - verifiedAccessTrustProviderIds = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeVerifiedAccessTrustProvidersOutput { -extension DescribeVerifiedAccessTrustProvidersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVerifiedAccessTrustProvidersOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.verifiedAccessTrustProviders = output.verifiedAccessTrustProviders - } else { - self.nextToken = nil - self.verifiedAccessTrustProviders = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVerifiedAccessTrustProvidersOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.verifiedAccessTrustProviders = try reader["verifiedAccessTrustProviderSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VerifiedAccessTrustProvider.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -76322,48 +51243,18 @@ public struct DescribeVerifiedAccessTrustProvidersOutput: Swift.Equatable { } } -struct DescribeVerifiedAccessTrustProvidersOutputBody: Swift.Equatable { - let verifiedAccessTrustProviders: [EC2ClientTypes.VerifiedAccessTrustProvider]? - let nextToken: Swift.String? -} - -extension DescribeVerifiedAccessTrustProvidersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case verifiedAccessTrustProviders = "verifiedAccessTrustProviderSet" - } +enum DescribeVerifiedAccessTrustProvidersOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.verifiedAccessTrustProviders) { - struct KeyVal0{struct item{}} - let verifiedAccessTrustProvidersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessTrustProviders) - if let verifiedAccessTrustProvidersWrappedContainer = verifiedAccessTrustProvidersWrappedContainer { - let verifiedAccessTrustProvidersContainer = try verifiedAccessTrustProvidersWrappedContainer.decodeIfPresent([EC2ClientTypes.VerifiedAccessTrustProvider].self, forKey: .member) - var verifiedAccessTrustProvidersBuffer:[EC2ClientTypes.VerifiedAccessTrustProvider]? = nil - if let verifiedAccessTrustProvidersContainer = verifiedAccessTrustProvidersContainer { - verifiedAccessTrustProvidersBuffer = [EC2ClientTypes.VerifiedAccessTrustProvider]() - for structureContainer0 in verifiedAccessTrustProvidersContainer { - verifiedAccessTrustProvidersBuffer?.append(structureContainer0) - } - } - verifiedAccessTrustProviders = verifiedAccessTrustProvidersBuffer - } else { - verifiedAccessTrustProviders = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - verifiedAccessTrustProviders = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVerifiedAccessTrustProvidersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -76414,42 +51305,17 @@ public struct DescribeVolumeAttributeInput: Swift.Equatable { } } -struct DescribeVolumeAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.VolumeAttributeName? - let volumeId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeVolumeAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case dryRun = "dryRun" - case volumeId = "VolumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeVolumeAttributeOutput { -extension DescribeVolumeAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVolumeAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.autoEnableIO = output.autoEnableIO - self.productCodes = output.productCodes - self.volumeId = output.volumeId - } else { - self.autoEnableIO = nil - self.productCodes = nil - self.volumeId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVolumeAttributeOutput() + value.autoEnableIO = try reader["autoEnableIO"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.productCodes = try reader["productCodes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ProductCode.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.volumeId = try reader["volumeId"].readIfPresent() + return value } } } @@ -76474,52 +51340,18 @@ public struct DescribeVolumeAttributeOutput: Swift.Equatable { } } -struct DescribeVolumeAttributeOutputBody: Swift.Equatable { - let autoEnableIO: EC2ClientTypes.AttributeBooleanValue? - let productCodes: [EC2ClientTypes.ProductCode]? - let volumeId: Swift.String? -} +enum DescribeVolumeAttributeOutputError { -extension DescribeVolumeAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoEnableIO = "autoEnableIO" - case productCodes = "productCodes" - case volumeId = "volumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoEnableIODecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .autoEnableIO) - autoEnableIO = autoEnableIODecoded - if containerValues.contains(.productCodes) { - struct KeyVal0{struct item{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ProductCode].self, forKey: .member) - var productCodesBuffer:[EC2ClientTypes.ProductCode]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [EC2ClientTypes.ProductCode]() - for structureContainer0 in productCodesContainer { - productCodesBuffer?.append(structureContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - productCodes = nil - } - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - } -} - -enum DescribeVolumeAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -76624,82 +51456,16 @@ public struct DescribeVolumeStatusInput: Swift.Equatable { } } -struct DescribeVolumeStatusInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let volumeIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DescribeVolumeStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case volumeIds = "VolumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.volumeIds) { - struct KeyVal0{struct VolumeId{}} - let volumeIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .volumeIds) - if let volumeIdsWrappedContainer = volumeIdsWrappedContainer { - let volumeIdsContainer = try volumeIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var volumeIdsBuffer:[Swift.String]? = nil - if let volumeIdsContainer = volumeIdsContainer { - volumeIdsBuffer = [Swift.String]() - for stringContainer0 in volumeIdsContainer { - volumeIdsBuffer?.append(stringContainer0) - } - } - volumeIds = volumeIdsBuffer - } else { - volumeIds = [] - } - } else { - volumeIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeVolumeStatusOutput { -extension DescribeVolumeStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVolumeStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.volumeStatuses = output.volumeStatuses - } else { - self.nextToken = nil - self.volumeStatuses = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVolumeStatusOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.volumeStatuses = try reader["volumeStatusSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VolumeStatusItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -76720,48 +51486,18 @@ public struct DescribeVolumeStatusOutput: Swift.Equatable { } } -struct DescribeVolumeStatusOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let volumeStatuses: [EC2ClientTypes.VolumeStatusItem]? -} +enum DescribeVolumeStatusOutputError { -extension DescribeVolumeStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case volumeStatuses = "volumeStatusSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.volumeStatuses) { - struct KeyVal0{struct item{}} - let volumeStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .volumeStatuses) - if let volumeStatusesWrappedContainer = volumeStatusesWrappedContainer { - let volumeStatusesContainer = try volumeStatusesWrappedContainer.decodeIfPresent([EC2ClientTypes.VolumeStatusItem].self, forKey: .member) - var volumeStatusesBuffer:[EC2ClientTypes.VolumeStatusItem]? = nil - if let volumeStatusesContainer = volumeStatusesContainer { - volumeStatusesBuffer = [EC2ClientTypes.VolumeStatusItem]() - for structureContainer0 in volumeStatusesContainer { - volumeStatusesBuffer?.append(structureContainer0) - } - } - volumeStatuses = volumeStatusesBuffer - } else { - volumeStatuses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - volumeStatuses = nil - } - } -} - -enum DescribeVolumeStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -76876,72 +51612,6 @@ public struct DescribeVolumesInput: Swift.Equatable { } } -struct DescribeVolumesInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let volumeIds: [Swift.String]? - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeVolumesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "maxResults" - case nextToken = "nextToken" - case volumeIds = "VolumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.volumeIds) { - struct KeyVal0{struct VolumeId{}} - let volumeIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .volumeIds) - if let volumeIdsWrappedContainer = volumeIdsWrappedContainer { - let volumeIdsContainer = try volumeIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var volumeIdsBuffer:[Swift.String]? = nil - if let volumeIdsContainer = volumeIdsContainer { - volumeIdsBuffer = [Swift.String]() - for stringContainer0 in volumeIdsContainer { - volumeIdsBuffer?.append(stringContainer0) - } - } - volumeIds = volumeIdsBuffer - } else { - volumeIds = [] - } - } else { - volumeIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - extension DescribeVolumesModificationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -77040,82 +51710,16 @@ public struct DescribeVolumesModificationsInput: Swift.Equatable { } } -struct DescribeVolumesModificationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let volumeIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeVolumesModificationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case volumeIds = "VolumeId" - } +extension DescribeVolumesModificationsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.volumeIds) { - struct KeyVal0{struct VolumeId{}} - let volumeIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .volumeIds) - if let volumeIdsWrappedContainer = volumeIdsWrappedContainer { - let volumeIdsContainer = try volumeIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var volumeIdsBuffer:[Swift.String]? = nil - if let volumeIdsContainer = volumeIdsContainer { - volumeIdsBuffer = [Swift.String]() - for stringContainer0 in volumeIdsContainer { - volumeIdsBuffer?.append(stringContainer0) - } - } - volumeIds = volumeIdsBuffer - } else { - volumeIds = [] - } - } else { - volumeIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeVolumesModificationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVolumesModificationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.volumesModifications = output.volumesModifications - } else { - self.nextToken = nil - self.volumesModifications = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVolumesModificationsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.volumesModifications = try reader["volumeModificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VolumeModification.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -77136,62 +51740,32 @@ public struct DescribeVolumesModificationsOutput: Swift.Equatable { } } -struct DescribeVolumesModificationsOutputBody: Swift.Equatable { - let volumesModifications: [EC2ClientTypes.VolumeModification]? - let nextToken: Swift.String? -} - -extension DescribeVolumesModificationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case volumesModifications = "volumeModificationSet" - } +enum DescribeVolumesModificationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.volumesModifications) { - struct KeyVal0{struct item{}} - let volumesModificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .volumesModifications) - if let volumesModificationsWrappedContainer = volumesModificationsWrappedContainer { - let volumesModificationsContainer = try volumesModificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.VolumeModification].self, forKey: .member) - var volumesModificationsBuffer:[EC2ClientTypes.VolumeModification]? = nil - if let volumesModificationsContainer = volumesModificationsContainer { - volumesModificationsBuffer = [EC2ClientTypes.VolumeModification]() - for structureContainer0 in volumesModificationsContainer { - volumesModificationsBuffer?.append(structureContainer0) - } - } - volumesModifications = volumesModificationsBuffer - } else { - volumesModifications = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - volumesModifications = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeVolumesModificationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} +extension DescribeVolumesOutput { -extension DescribeVolumesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVolumesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.volumes = output.volumes - } else { - self.nextToken = nil - self.volumes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVolumesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.volumes = try reader["volumeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Volume.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -77212,48 +51786,18 @@ public struct DescribeVolumesOutput: Swift.Equatable { } } -struct DescribeVolumesOutputBody: Swift.Equatable { - let volumes: [EC2ClientTypes.Volume]? - let nextToken: Swift.String? -} +enum DescribeVolumesOutputError { -extension DescribeVolumesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case volumes = "volumeSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.volumes) { - struct KeyVal0{struct item{}} - let volumesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .volumes) - if let volumesWrappedContainer = volumesWrappedContainer { - let volumesContainer = try volumesWrappedContainer.decodeIfPresent([EC2ClientTypes.Volume].self, forKey: .member) - var volumesBuffer:[EC2ClientTypes.Volume]? = nil - if let volumesContainer = volumesContainer { - volumesBuffer = [EC2ClientTypes.Volume]() - for structureContainer0 in volumesContainer { - volumesBuffer?.append(structureContainer0) - } - } - volumes = volumesBuffer - } else { - volumes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - volumes = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVolumesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -77304,44 +51848,18 @@ public struct DescribeVpcAttributeInput: Swift.Equatable { } } -struct DescribeVpcAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.VpcAttributeName? - let vpcId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DescribeVpcAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case dryRun = "dryRun" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeVpcAttributeOutput { -extension DescribeVpcAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.enableDnsHostnames = output.enableDnsHostnames - self.enableDnsSupport = output.enableDnsSupport - self.enableNetworkAddressUsageMetrics = output.enableNetworkAddressUsageMetrics - self.vpcId = output.vpcId - } else { - self.enableDnsHostnames = nil - self.enableDnsSupport = nil - self.enableNetworkAddressUsageMetrics = nil - self.vpcId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcAttributeOutput() + value.enableDnsHostnames = try reader["enableDnsHostnames"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.enableDnsSupport = try reader["enableDnsSupport"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.enableNetworkAddressUsageMetrics = try reader["enableNetworkAddressUsageMetrics"].readIfPresent(readingClosure: EC2ClientTypes.AttributeBooleanValue.readingClosure) + value.vpcId = try reader["vpcId"].readIfPresent() + return value } } } @@ -77370,39 +51888,18 @@ public struct DescribeVpcAttributeOutput: Swift.Equatable { } } -struct DescribeVpcAttributeOutputBody: Swift.Equatable { - let vpcId: Swift.String? - let enableDnsHostnames: EC2ClientTypes.AttributeBooleanValue? - let enableDnsSupport: EC2ClientTypes.AttributeBooleanValue? - let enableNetworkAddressUsageMetrics: EC2ClientTypes.AttributeBooleanValue? -} - -extension DescribeVpcAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableDnsHostnames = "enableDnsHostnames" - case enableDnsSupport = "enableDnsSupport" - case enableNetworkAddressUsageMetrics = "enableNetworkAddressUsageMetrics" - case vpcId = "vpcId" - } +enum DescribeVpcAttributeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let enableDnsHostnamesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableDnsHostnames) - enableDnsHostnames = enableDnsHostnamesDecoded - let enableDnsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableDnsSupport) - enableDnsSupport = enableDnsSupportDecoded - let enableNetworkAddressUsageMetricsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableNetworkAddressUsageMetrics) - enableNetworkAddressUsageMetrics = enableNetworkAddressUsageMetricsDecoded - } -} - -enum DescribeVpcAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -77460,57 +51957,16 @@ public struct DescribeVpcClassicLinkDnsSupportInput: Swift.Equatable { } } -struct DescribeVpcClassicLinkDnsSupportInputBody: Swift.Equatable { - let maxResults: Swift.Int? - let nextToken: Swift.String? - let vpcIds: [Swift.String]? -} +extension DescribeVpcClassicLinkDnsSupportOutput { -extension DescribeVpcClassicLinkDnsSupportInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "maxResults" - case nextToken = "nextToken" - case vpcIds = "VpcIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.vpcIds) { - struct KeyVal0{struct VpcId{}} - let vpcIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcIds) - if let vpcIdsWrappedContainer = vpcIdsWrappedContainer { - let vpcIdsContainer = try vpcIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcIdsBuffer:[Swift.String]? = nil - if let vpcIdsContainer = vpcIdsContainer { - vpcIdsBuffer = [Swift.String]() - for stringContainer0 in vpcIdsContainer { - vpcIdsBuffer?.append(stringContainer0) - } - } - vpcIds = vpcIdsBuffer - } else { - vpcIds = [] - } - } else { - vpcIds = nil - } - } -} - -extension DescribeVpcClassicLinkDnsSupportOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcClassicLinkDnsSupportOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.vpcs = output.vpcs - } else { - self.nextToken = nil - self.vpcs = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcClassicLinkDnsSupportOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.vpcs = try reader["vpcs"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ClassicLinkDnsSupport.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -77531,48 +51987,18 @@ public struct DescribeVpcClassicLinkDnsSupportOutput: Swift.Equatable { } } -struct DescribeVpcClassicLinkDnsSupportOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let vpcs: [EC2ClientTypes.ClassicLinkDnsSupport]? -} - -extension DescribeVpcClassicLinkDnsSupportOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case vpcs = "vpcs" - } +enum DescribeVpcClassicLinkDnsSupportOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.vpcs) { - struct KeyVal0{struct item{}} - let vpcsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcs) - if let vpcsWrappedContainer = vpcsWrappedContainer { - let vpcsContainer = try vpcsWrappedContainer.decodeIfPresent([EC2ClientTypes.ClassicLinkDnsSupport].self, forKey: .member) - var vpcsBuffer:[EC2ClientTypes.ClassicLinkDnsSupport]? = nil - if let vpcsContainer = vpcsContainer { - vpcsBuffer = [EC2ClientTypes.ClassicLinkDnsSupport]() - for structureContainer0 in vpcsContainer { - vpcsBuffer?.append(structureContainer0) - } - } - vpcs = vpcsBuffer - } else { - vpcs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpcs = nil - } - } -} - -enum DescribeVpcClassicLinkDnsSupportOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -77645,72 +52071,15 @@ public struct DescribeVpcClassicLinkInput: Swift.Equatable { } } -struct DescribeVpcClassicLinkInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let vpcIds: [Swift.String]? -} - -extension DescribeVpcClassicLinkInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case vpcIds = "VpcId" - } +extension DescribeVpcClassicLinkOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.vpcIds) { - struct KeyVal0{struct VpcId{}} - let vpcIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcIds) - if let vpcIdsWrappedContainer = vpcIdsWrappedContainer { - let vpcIdsContainer = try vpcIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcIdsBuffer:[Swift.String]? = nil - if let vpcIdsContainer = vpcIdsContainer { - vpcIdsBuffer = [Swift.String]() - for stringContainer0 in vpcIdsContainer { - vpcIdsBuffer?.append(stringContainer0) - } - } - vpcIds = vpcIdsBuffer - } else { - vpcIds = [] - } - } else { - vpcIds = nil - } - } -} - -extension DescribeVpcClassicLinkOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcClassicLinkOutputBody = try responseDecoder.decode(responseBody: data) - self.vpcs = output.vpcs - } else { - self.vpcs = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcClassicLinkOutput() + value.vpcs = try reader["vpcSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpcClassicLink.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -77727,44 +52096,18 @@ public struct DescribeVpcClassicLinkOutput: Swift.Equatable { } } -struct DescribeVpcClassicLinkOutputBody: Swift.Equatable { - let vpcs: [EC2ClientTypes.VpcClassicLink]? -} - -extension DescribeVpcClassicLinkOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpcs = "vpcSet" - } +enum DescribeVpcClassicLinkOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.vpcs) { - struct KeyVal0{struct item{}} - let vpcsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcs) - if let vpcsWrappedContainer = vpcsWrappedContainer { - let vpcsContainer = try vpcsWrappedContainer.decodeIfPresent([EC2ClientTypes.VpcClassicLink].self, forKey: .member) - var vpcsBuffer:[EC2ClientTypes.VpcClassicLink]? = nil - if let vpcsContainer = vpcsContainer { - vpcsBuffer = [EC2ClientTypes.VpcClassicLink]() - for structureContainer0 in vpcsContainer { - vpcsBuffer?.append(structureContainer0) - } - } - vpcs = vpcsBuffer - } else { - vpcs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpcs = nil - } - } -} - -enum DescribeVpcClassicLinkOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -77848,65 +52191,16 @@ public struct DescribeVpcEndpointConnectionNotificationsInput: Swift.Equatable { } } -struct DescribeVpcEndpointConnectionNotificationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let connectionNotificationId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointConnectionNotificationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectionNotificationId = "ConnectionNotificationId" - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let connectionNotificationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionNotificationId) - connectionNotificationId = connectionNotificationIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeVpcEndpointConnectionNotificationsOutput { -extension DescribeVpcEndpointConnectionNotificationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcEndpointConnectionNotificationsOutputBody = try responseDecoder.decode(responseBody: data) - self.connectionNotificationSet = output.connectionNotificationSet - self.nextToken = output.nextToken - } else { - self.connectionNotificationSet = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcEndpointConnectionNotificationsOutput() + value.connectionNotificationSet = try reader["connectionNotificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ConnectionNotification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -77927,48 +52221,18 @@ public struct DescribeVpcEndpointConnectionNotificationsOutput: Swift.Equatable } } -struct DescribeVpcEndpointConnectionNotificationsOutputBody: Swift.Equatable { - let connectionNotificationSet: [EC2ClientTypes.ConnectionNotification]? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointConnectionNotificationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectionNotificationSet = "connectionNotificationSet" - case nextToken = "nextToken" - } +enum DescribeVpcEndpointConnectionNotificationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.connectionNotificationSet) { - struct KeyVal0{struct item{}} - let connectionNotificationSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .connectionNotificationSet) - if let connectionNotificationSetWrappedContainer = connectionNotificationSetWrappedContainer { - let connectionNotificationSetContainer = try connectionNotificationSetWrappedContainer.decodeIfPresent([EC2ClientTypes.ConnectionNotification].self, forKey: .member) - var connectionNotificationSetBuffer:[EC2ClientTypes.ConnectionNotification]? = nil - if let connectionNotificationSetContainer = connectionNotificationSetContainer { - connectionNotificationSetBuffer = [EC2ClientTypes.ConnectionNotification]() - for structureContainer0 in connectionNotificationSetContainer { - connectionNotificationSetBuffer?.append(structureContainer0) - } - } - connectionNotificationSet = connectionNotificationSetBuffer - } else { - connectionNotificationSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - connectionNotificationSet = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVpcEndpointConnectionNotificationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -78043,61 +52307,16 @@ public struct DescribeVpcEndpointConnectionsInput: Swift.Equatable { } } -struct DescribeVpcEndpointConnectionsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointConnectionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension DescribeVpcEndpointConnectionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeVpcEndpointConnectionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcEndpointConnectionsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.vpcEndpointConnections = output.vpcEndpointConnections - } else { - self.nextToken = nil - self.vpcEndpointConnections = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcEndpointConnectionsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.vpcEndpointConnections = try reader["vpcEndpointConnectionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpcEndpointConnection.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -78118,48 +52337,18 @@ public struct DescribeVpcEndpointConnectionsOutput: Swift.Equatable { } } -struct DescribeVpcEndpointConnectionsOutputBody: Swift.Equatable { - let vpcEndpointConnections: [EC2ClientTypes.VpcEndpointConnection]? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointConnectionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case vpcEndpointConnections = "vpcEndpointConnectionSet" - } +enum DescribeVpcEndpointConnectionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.vpcEndpointConnections) { - struct KeyVal0{struct item{}} - let vpcEndpointConnectionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcEndpointConnections) - if let vpcEndpointConnectionsWrappedContainer = vpcEndpointConnectionsWrappedContainer { - let vpcEndpointConnectionsContainer = try vpcEndpointConnectionsWrappedContainer.decodeIfPresent([EC2ClientTypes.VpcEndpointConnection].self, forKey: .member) - var vpcEndpointConnectionsBuffer:[EC2ClientTypes.VpcEndpointConnection]? = nil - if let vpcEndpointConnectionsContainer = vpcEndpointConnectionsContainer { - vpcEndpointConnectionsBuffer = [EC2ClientTypes.VpcEndpointConnection]() - for structureContainer0 in vpcEndpointConnectionsContainer { - vpcEndpointConnectionsBuffer?.append(structureContainer0) - } - } - vpcEndpointConnections = vpcEndpointConnectionsBuffer - } else { - vpcEndpointConnections = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpcEndpointConnections = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVpcEndpointConnectionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -78252,82 +52441,16 @@ public struct DescribeVpcEndpointServiceConfigurationsInput: Swift.Equatable { } } -struct DescribeVpcEndpointServiceConfigurationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointServiceConfigurationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case serviceIds = "ServiceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.serviceIds) { - struct KeyVal0{struct item{}} - let serviceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceIds) - if let serviceIdsWrappedContainer = serviceIdsWrappedContainer { - let serviceIdsContainer = try serviceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serviceIdsBuffer:[Swift.String]? = nil - if let serviceIdsContainer = serviceIdsContainer { - serviceIdsBuffer = [Swift.String]() - for stringContainer0 in serviceIdsContainer { - serviceIdsBuffer?.append(stringContainer0) - } - } - serviceIds = serviceIdsBuffer - } else { - serviceIds = [] - } - } else { - serviceIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeVpcEndpointServiceConfigurationsOutput { -extension DescribeVpcEndpointServiceConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcEndpointServiceConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.serviceConfigurations = output.serviceConfigurations - } else { - self.nextToken = nil - self.serviceConfigurations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcEndpointServiceConfigurationsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.serviceConfigurations = try reader["serviceConfigurationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ServiceConfiguration.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -78348,48 +52471,18 @@ public struct DescribeVpcEndpointServiceConfigurationsOutput: Swift.Equatable { } } -struct DescribeVpcEndpointServiceConfigurationsOutputBody: Swift.Equatable { - let serviceConfigurations: [EC2ClientTypes.ServiceConfiguration]? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointServiceConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case serviceConfigurations = "serviceConfigurationSet" - } +enum DescribeVpcEndpointServiceConfigurationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.serviceConfigurations) { - struct KeyVal0{struct item{}} - let serviceConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceConfigurations) - if let serviceConfigurationsWrappedContainer = serviceConfigurationsWrappedContainer { - let serviceConfigurationsContainer = try serviceConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ServiceConfiguration].self, forKey: .member) - var serviceConfigurationsBuffer:[EC2ClientTypes.ServiceConfiguration]? = nil - if let serviceConfigurationsContainer = serviceConfigurationsContainer { - serviceConfigurationsBuffer = [EC2ClientTypes.ServiceConfiguration]() - for structureContainer0 in serviceConfigurationsContainer { - serviceConfigurationsBuffer?.append(structureContainer0) - } - } - serviceConfigurations = serviceConfigurationsBuffer - } else { - serviceConfigurations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - serviceConfigurations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVpcEndpointServiceConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -78466,65 +52559,16 @@ public struct DescribeVpcEndpointServicePermissionsInput: Swift.Equatable { } } -struct DescribeVpcEndpointServicePermissionsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointServicePermissionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case serviceId = "ServiceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeVpcEndpointServicePermissionsOutput { -extension DescribeVpcEndpointServicePermissionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcEndpointServicePermissionsOutputBody = try responseDecoder.decode(responseBody: data) - self.allowedPrincipals = output.allowedPrincipals - self.nextToken = output.nextToken - } else { - self.allowedPrincipals = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcEndpointServicePermissionsOutput() + value.allowedPrincipals = try reader["allowedPrincipals"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AllowedPrincipal.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -78545,48 +52589,18 @@ public struct DescribeVpcEndpointServicePermissionsOutput: Swift.Equatable { } } -struct DescribeVpcEndpointServicePermissionsOutputBody: Swift.Equatable { - let allowedPrincipals: [EC2ClientTypes.AllowedPrincipal]? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointServicePermissionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowedPrincipals = "allowedPrincipals" - case nextToken = "nextToken" - } +enum DescribeVpcEndpointServicePermissionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.allowedPrincipals) { - struct KeyVal0{struct item{}} - let allowedPrincipalsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedPrincipals) - if let allowedPrincipalsWrappedContainer = allowedPrincipalsWrappedContainer { - let allowedPrincipalsContainer = try allowedPrincipalsWrappedContainer.decodeIfPresent([EC2ClientTypes.AllowedPrincipal].self, forKey: .member) - var allowedPrincipalsBuffer:[EC2ClientTypes.AllowedPrincipal]? = nil - if let allowedPrincipalsContainer = allowedPrincipalsContainer { - allowedPrincipalsBuffer = [EC2ClientTypes.AllowedPrincipal]() - for structureContainer0 in allowedPrincipalsContainer { - allowedPrincipalsBuffer?.append(structureContainer0) - } - } - allowedPrincipals = allowedPrincipalsBuffer - } else { - allowedPrincipals = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - allowedPrincipals = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVpcEndpointServicePermissionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -78679,84 +52693,17 @@ public struct DescribeVpcEndpointServicesInput: Swift.Equatable { } } -struct DescribeVpcEndpointServicesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceNames: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointServicesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case serviceNames = "ServiceName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.serviceNames) { - struct KeyVal0{struct item{}} - let serviceNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceNames) - if let serviceNamesWrappedContainer = serviceNamesWrappedContainer { - let serviceNamesContainer = try serviceNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serviceNamesBuffer:[Swift.String]? = nil - if let serviceNamesContainer = serviceNamesContainer { - serviceNamesBuffer = [Swift.String]() - for stringContainer0 in serviceNamesContainer { - serviceNamesBuffer?.append(stringContainer0) - } - } - serviceNames = serviceNamesBuffer - } else { - serviceNames = [] - } - } else { - serviceNames = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeVpcEndpointServicesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcEndpointServicesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.serviceDetails = output.serviceDetails - self.serviceNames = output.serviceNames - } else { - self.nextToken = nil - self.serviceDetails = nil - self.serviceNames = nil +extension DescribeVpcEndpointServicesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcEndpointServicesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.serviceDetails = try reader["serviceDetailSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ServiceDetail.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.serviceNames = try reader["serviceNameSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -78781,69 +52728,18 @@ public struct DescribeVpcEndpointServicesOutput: Swift.Equatable { } } -struct DescribeVpcEndpointServicesOutputBody: Swift.Equatable { - let serviceNames: [Swift.String]? - let serviceDetails: [EC2ClientTypes.ServiceDetail]? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointServicesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case serviceDetails = "serviceDetailSet" - case serviceNames = "serviceNameSet" - } +enum DescribeVpcEndpointServicesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.serviceNames) { - struct KeyVal0{struct item{}} - let serviceNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceNames) - if let serviceNamesWrappedContainer = serviceNamesWrappedContainer { - let serviceNamesContainer = try serviceNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serviceNamesBuffer:[Swift.String]? = nil - if let serviceNamesContainer = serviceNamesContainer { - serviceNamesBuffer = [Swift.String]() - for stringContainer0 in serviceNamesContainer { - serviceNamesBuffer?.append(stringContainer0) - } - } - serviceNames = serviceNamesBuffer - } else { - serviceNames = [] - } - } else { - serviceNames = nil - } - if containerValues.contains(.serviceDetails) { - struct KeyVal0{struct item{}} - let serviceDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceDetails) - if let serviceDetailsWrappedContainer = serviceDetailsWrappedContainer { - let serviceDetailsContainer = try serviceDetailsWrappedContainer.decodeIfPresent([EC2ClientTypes.ServiceDetail].self, forKey: .member) - var serviceDetailsBuffer:[EC2ClientTypes.ServiceDetail]? = nil - if let serviceDetailsContainer = serviceDetailsContainer { - serviceDetailsBuffer = [EC2ClientTypes.ServiceDetail]() - for structureContainer0 in serviceDetailsContainer { - serviceDetailsBuffer?.append(structureContainer0) - } - } - serviceDetails = serviceDetailsBuffer - } else { - serviceDetails = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - serviceDetails = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVpcEndpointServicesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -78940,82 +52836,16 @@ public struct DescribeVpcEndpointsInput: Swift.Equatable { } } -struct DescribeVpcEndpointsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcEndpointIds: [Swift.String]? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case vpcEndpointIds = "VpcEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.vpcEndpointIds) { - struct KeyVal0{struct item{}} - let vpcEndpointIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcEndpointIds) - if let vpcEndpointIdsWrappedContainer = vpcEndpointIdsWrappedContainer { - let vpcEndpointIdsContainer = try vpcEndpointIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcEndpointIdsBuffer:[Swift.String]? = nil - if let vpcEndpointIdsContainer = vpcEndpointIdsContainer { - vpcEndpointIdsBuffer = [Swift.String]() - for stringContainer0 in vpcEndpointIdsContainer { - vpcEndpointIdsBuffer?.append(stringContainer0) - } - } - vpcEndpointIds = vpcEndpointIdsBuffer - } else { - vpcEndpointIds = [] - } - } else { - vpcEndpointIds = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeVpcEndpointsOutput { -extension DescribeVpcEndpointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcEndpointsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.vpcEndpoints = output.vpcEndpoints - } else { - self.nextToken = nil - self.vpcEndpoints = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcEndpointsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.vpcEndpoints = try reader["vpcEndpointSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpcEndpoint.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -79036,48 +52866,18 @@ public struct DescribeVpcEndpointsOutput: Swift.Equatable { } } -struct DescribeVpcEndpointsOutputBody: Swift.Equatable { - let vpcEndpoints: [EC2ClientTypes.VpcEndpoint]? - let nextToken: Swift.String? -} - -extension DescribeVpcEndpointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case vpcEndpoints = "vpcEndpointSet" - } +enum DescribeVpcEndpointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.vpcEndpoints) { - struct KeyVal0{struct item{}} - let vpcEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcEndpoints) - if let vpcEndpointsWrappedContainer = vpcEndpointsWrappedContainer { - let vpcEndpointsContainer = try vpcEndpointsWrappedContainer.decodeIfPresent([EC2ClientTypes.VpcEndpoint].self, forKey: .member) - var vpcEndpointsBuffer:[EC2ClientTypes.VpcEndpoint]? = nil - if let vpcEndpointsContainer = vpcEndpointsContainer { - vpcEndpointsBuffer = [EC2ClientTypes.VpcEndpoint]() - for structureContainer0 in vpcEndpointsContainer { - vpcEndpointsBuffer?.append(structureContainer0) - } - } - vpcEndpoints = vpcEndpointsBuffer - } else { - vpcEndpoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpcEndpoints = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVpcEndpointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -79182,82 +52982,16 @@ public struct DescribeVpcPeeringConnectionsInput: Swift.Equatable { } } -struct DescribeVpcPeeringConnectionsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? - let vpcPeeringConnectionIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeVpcPeeringConnectionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case vpcPeeringConnectionIds = "VpcPeeringConnectionId" - } +extension DescribeVpcPeeringConnectionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.vpcPeeringConnectionIds) { - struct KeyVal0{struct item{}} - let vpcPeeringConnectionIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcPeeringConnectionIds) - if let vpcPeeringConnectionIdsWrappedContainer = vpcPeeringConnectionIdsWrappedContainer { - let vpcPeeringConnectionIdsContainer = try vpcPeeringConnectionIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcPeeringConnectionIdsBuffer:[Swift.String]? = nil - if let vpcPeeringConnectionIdsContainer = vpcPeeringConnectionIdsContainer { - vpcPeeringConnectionIdsBuffer = [Swift.String]() - for stringContainer0 in vpcPeeringConnectionIdsContainer { - vpcPeeringConnectionIdsBuffer?.append(stringContainer0) - } - } - vpcPeeringConnectionIds = vpcPeeringConnectionIdsBuffer - } else { - vpcPeeringConnectionIds = [] - } - } else { - vpcPeeringConnectionIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension DescribeVpcPeeringConnectionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcPeeringConnectionsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.vpcPeeringConnections = output.vpcPeeringConnections - } else { - self.nextToken = nil - self.vpcPeeringConnections = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcPeeringConnectionsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.vpcPeeringConnections = try reader["vpcPeeringConnectionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpcPeeringConnection.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -79278,48 +53012,18 @@ public struct DescribeVpcPeeringConnectionsOutput: Swift.Equatable { } } -struct DescribeVpcPeeringConnectionsOutputBody: Swift.Equatable { - let vpcPeeringConnections: [EC2ClientTypes.VpcPeeringConnection]? - let nextToken: Swift.String? -} - -extension DescribeVpcPeeringConnectionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case vpcPeeringConnections = "vpcPeeringConnectionSet" - } +enum DescribeVpcPeeringConnectionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.vpcPeeringConnections) { - struct KeyVal0{struct item{}} - let vpcPeeringConnectionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcPeeringConnections) - if let vpcPeeringConnectionsWrappedContainer = vpcPeeringConnectionsWrappedContainer { - let vpcPeeringConnectionsContainer = try vpcPeeringConnectionsWrappedContainer.decodeIfPresent([EC2ClientTypes.VpcPeeringConnection].self, forKey: .member) - var vpcPeeringConnectionsBuffer:[EC2ClientTypes.VpcPeeringConnection]? = nil - if let vpcPeeringConnectionsContainer = vpcPeeringConnectionsContainer { - vpcPeeringConnectionsBuffer = [EC2ClientTypes.VpcPeeringConnection]() - for structureContainer0 in vpcPeeringConnectionsContainer { - vpcPeeringConnectionsBuffer?.append(structureContainer0) - } - } - vpcPeeringConnections = vpcPeeringConnectionsBuffer - } else { - vpcPeeringConnections = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpcPeeringConnections = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVpcPeeringConnectionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -79430,82 +53134,16 @@ public struct DescribeVpcsInput: Swift.Equatable { } } -struct DescribeVpcsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let vpcIds: [Swift.String]? - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeVpcsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case vpcIds = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.vpcIds) { - struct KeyVal0{struct VpcId{}} - let vpcIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcIds) - if let vpcIdsWrappedContainer = vpcIdsWrappedContainer { - let vpcIdsContainer = try vpcIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcIdsBuffer:[Swift.String]? = nil - if let vpcIdsContainer = vpcIdsContainer { - vpcIdsBuffer = [Swift.String]() - for stringContainer0 in vpcIdsContainer { - vpcIdsBuffer?.append(stringContainer0) - } - } - vpcIds = vpcIdsBuffer - } else { - vpcIds = [] - } - } else { - vpcIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeVpcsOutput { -extension DescribeVpcsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpcsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.vpcs = output.vpcs - } else { - self.nextToken = nil - self.vpcs = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpcsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.vpcs = try reader["vpcSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Vpc.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -79526,48 +53164,18 @@ public struct DescribeVpcsOutput: Swift.Equatable { } } -struct DescribeVpcsOutputBody: Swift.Equatable { - let vpcs: [EC2ClientTypes.Vpc]? - let nextToken: Swift.String? -} - -extension DescribeVpcsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case vpcs = "vpcSet" - } +enum DescribeVpcsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.vpcs) { - struct KeyVal0{struct item{}} - let vpcsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcs) - if let vpcsWrappedContainer = vpcsWrappedContainer { - let vpcsContainer = try vpcsWrappedContainer.decodeIfPresent([EC2ClientTypes.Vpc].self, forKey: .member) - var vpcsBuffer:[EC2ClientTypes.Vpc]? = nil - if let vpcsContainer = vpcsContainer { - vpcsBuffer = [EC2ClientTypes.Vpc]() - for structureContainer0 in vpcsContainer { - vpcsBuffer?.append(structureContainer0) - } - } - vpcs = vpcsBuffer - } else { - vpcs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpcs = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum DescribeVpcsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -79659,72 +53267,15 @@ public struct DescribeVpnConnectionsInput: Swift.Equatable { } } -struct DescribeVpnConnectionsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let vpnConnectionIds: [Swift.String]? - let dryRun: Swift.Bool? -} +extension DescribeVpnConnectionsOutput { -extension DescribeVpnConnectionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case vpnConnectionIds = "VpnConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.vpnConnectionIds) { - struct KeyVal0{struct VpnConnectionId{}} - let vpnConnectionIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpnConnectionIds) - if let vpnConnectionIdsWrappedContainer = vpnConnectionIdsWrappedContainer { - let vpnConnectionIdsContainer = try vpnConnectionIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpnConnectionIdsBuffer:[Swift.String]? = nil - if let vpnConnectionIdsContainer = vpnConnectionIdsContainer { - vpnConnectionIdsBuffer = [Swift.String]() - for stringContainer0 in vpnConnectionIdsContainer { - vpnConnectionIdsBuffer?.append(stringContainer0) - } - } - vpnConnectionIds = vpnConnectionIdsBuffer - } else { - vpnConnectionIds = [] - } - } else { - vpnConnectionIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DescribeVpnConnectionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpnConnectionsOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnConnections = output.vpnConnections - } else { - self.vpnConnections = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpnConnectionsOutput() + value.vpnConnections = try reader["vpnConnectionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpnConnection.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -79742,44 +53293,18 @@ public struct DescribeVpnConnectionsOutput: Swift.Equatable { } } -struct DescribeVpnConnectionsOutputBody: Swift.Equatable { - let vpnConnections: [EC2ClientTypes.VpnConnection]? -} +enum DescribeVpnConnectionsOutputError { -extension DescribeVpnConnectionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnConnections = "vpnConnectionSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.vpnConnections) { - struct KeyVal0{struct item{}} - let vpnConnectionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpnConnections) - if let vpnConnectionsWrappedContainer = vpnConnectionsWrappedContainer { - let vpnConnectionsContainer = try vpnConnectionsWrappedContainer.decodeIfPresent([EC2ClientTypes.VpnConnection].self, forKey: .member) - var vpnConnectionsBuffer:[EC2ClientTypes.VpnConnection]? = nil - if let vpnConnectionsContainer = vpnConnectionsContainer { - vpnConnectionsBuffer = [EC2ClientTypes.VpnConnection]() - for structureContainer0 in vpnConnectionsContainer { - vpnConnectionsBuffer?.append(structureContainer0) - } - } - vpnConnections = vpnConnectionsBuffer - } else { - vpnConnections = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpnConnections = nil - } - } -} - -enum DescribeVpnConnectionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -79865,72 +53390,15 @@ public struct DescribeVpnGatewaysInput: Swift.Equatable { } } -struct DescribeVpnGatewaysInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let vpnGatewayIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DescribeVpnGatewaysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case filters = "Filter" - case vpnGatewayIds = "VpnGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - if containerValues.contains(.vpnGatewayIds) { - struct KeyVal0{struct VpnGatewayId{}} - let vpnGatewayIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpnGatewayIds) - if let vpnGatewayIdsWrappedContainer = vpnGatewayIdsWrappedContainer { - let vpnGatewayIdsContainer = try vpnGatewayIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpnGatewayIdsBuffer:[Swift.String]? = nil - if let vpnGatewayIdsContainer = vpnGatewayIdsContainer { - vpnGatewayIdsBuffer = [Swift.String]() - for stringContainer0 in vpnGatewayIdsContainer { - vpnGatewayIdsBuffer?.append(stringContainer0) - } - } - vpnGatewayIds = vpnGatewayIdsBuffer - } else { - vpnGatewayIds = [] - } - } else { - vpnGatewayIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DescribeVpnGatewaysOutput { -extension DescribeVpnGatewaysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeVpnGatewaysOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnGateways = output.vpnGateways - } else { - self.vpnGateways = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeVpnGatewaysOutput() + value.vpnGateways = try reader["vpnGatewaySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpnGateway.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -79948,44 +53416,18 @@ public struct DescribeVpnGatewaysOutput: Swift.Equatable { } } -struct DescribeVpnGatewaysOutputBody: Swift.Equatable { - let vpnGateways: [EC2ClientTypes.VpnGateway]? -} - -extension DescribeVpnGatewaysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnGateways = "vpnGatewaySet" - } +enum DescribeVpnGatewaysOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.vpnGateways) { - struct KeyVal0{struct item{}} - let vpnGatewaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpnGateways) - if let vpnGatewaysWrappedContainer = vpnGatewaysWrappedContainer { - let vpnGatewaysContainer = try vpnGatewaysWrappedContainer.decodeIfPresent([EC2ClientTypes.VpnGateway].self, forKey: .member) - var vpnGatewaysBuffer:[EC2ClientTypes.VpnGateway]? = nil - if let vpnGatewaysContainer = vpnGatewaysContainer { - vpnGatewaysBuffer = [EC2ClientTypes.VpnGateway]() - for structureContainer0 in vpnGatewaysContainer { - vpnGatewaysBuffer?.append(structureContainer0) - } - } - vpnGateways = vpnGatewaysBuffer - } else { - vpnGateways = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpnGateways = nil - } - } -} - -enum DescribeVpnGatewaysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -80022,12 +53464,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.DestinationOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fileFormat = "FileFormat" - case hiveCompatiblePartitions = "HiveCompatiblePartitions" - case perHourPartition = "PerHourPartition" - } +extension EC2ClientTypes.DestinationOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -80042,14 +53479,15 @@ extension EC2ClientTypes.DestinationOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fileFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DestinationFileFormat.self, forKey: .fileFormat) - fileFormat = fileFormatDecoded - let hiveCompatiblePartitionsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .hiveCompatiblePartitions) - hiveCompatiblePartitions = hiveCompatiblePartitionsDecoded - let perHourPartitionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .perHourPartition) - perHourPartition = perHourPartitionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DestinationOptionsRequest() + value.fileFormat = try reader["FileFormat"].readIfPresent() + value.hiveCompatiblePartitions = try reader["HiveCompatiblePartitions"].readIfPresent() + value.perHourPartition = try reader["PerHourPartition"].readIfPresent() + return value + } } } @@ -80077,12 +53515,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DestinationOptionsResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fileFormat = "fileFormat" - case hiveCompatiblePartitions = "hiveCompatiblePartitions" - case perHourPartition = "perHourPartition" - } +extension EC2ClientTypes.DestinationOptionsResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -80097,14 +53530,15 @@ extension EC2ClientTypes.DestinationOptionsResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fileFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DestinationFileFormat.self, forKey: .fileFormat) - fileFormat = fileFormatDecoded - let hiveCompatiblePartitionsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .hiveCompatiblePartitions) - hiveCompatiblePartitions = hiveCompatiblePartitionsDecoded - let perHourPartitionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .perHourPartition) - perHourPartition = perHourPartitionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DestinationOptionsResponse() + value.fileFormat = try reader["fileFormat"].readIfPresent() + value.hiveCompatiblePartitions = try reader["hiveCompatiblePartitions"].readIfPresent() + value.perHourPartition = try reader["perHourPartition"].readIfPresent() + return value + } } } @@ -80178,38 +53612,15 @@ public struct DetachClassicLinkVpcInput: Swift.Equatable { } } -struct DetachClassicLinkVpcInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceId: Swift.String? - let vpcId: Swift.String? -} +extension DetachClassicLinkVpcOutput { -extension DetachClassicLinkVpcInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceId = "instanceId" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} - -extension DetachClassicLinkVpcOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DetachClassicLinkVpcOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DetachClassicLinkVpcOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -80226,27 +53637,18 @@ public struct DetachClassicLinkVpcOutput: Swift.Equatable { } } -struct DetachClassicLinkVpcOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension DetachClassicLinkVpcOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } +enum DetachClassicLinkVpcOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum DetachClassicLinkVpcOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -80297,32 +53699,12 @@ public struct DetachInternetGatewayInput: Swift.Equatable { } } -struct DetachInternetGatewayInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let internetGatewayId: Swift.String? - let vpcId: Swift.String? -} - -extension DetachInternetGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case internetGatewayId = "internetGatewayId" - case vpcId = "vpcId" - } +extension DetachInternetGatewayOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let internetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .internetGatewayId) - internetGatewayId = internetGatewayIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} - -extension DetachInternetGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachInternetGatewayOutput() + } } } @@ -80331,11 +53713,18 @@ public struct DetachInternetGatewayOutput: Swift.Equatable { public init() { } } -enum DetachInternetGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DetachInternetGatewayOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -80392,32 +53781,12 @@ public struct DetachNetworkInterfaceInput: Swift.Equatable { } } -struct DetachNetworkInterfaceInputBody: Swift.Equatable { - let attachmentId: Swift.String? - let dryRun: Swift.Bool? - let force: Swift.Bool? -} - -extension DetachNetworkInterfaceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachmentId = "attachmentId" - case dryRun = "dryRun" - case force = "force" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attachmentId) - attachmentId = attachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - } -} +extension DetachNetworkInterfaceOutput { -extension DetachNetworkInterfaceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachNetworkInterfaceOutput() + } } } @@ -80426,11 +53795,18 @@ public struct DetachNetworkInterfaceOutput: Swift.Equatable { public init() { } } -enum DetachNetworkInterfaceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DetachNetworkInterfaceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -80488,44 +53864,16 @@ public struct DetachVerifiedAccessTrustProviderInput: Swift.Equatable { } } -struct DetachVerifiedAccessTrustProviderInputBody: Swift.Equatable { - let verifiedAccessInstanceId: Swift.String? - let verifiedAccessTrustProviderId: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DetachVerifiedAccessTrustProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - case verifiedAccessTrustProviderId = "VerifiedAccessTrustProviderId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let verifiedAccessTrustProviderIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessTrustProviderId) - verifiedAccessTrustProviderId = verifiedAccessTrustProviderIdDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DetachVerifiedAccessTrustProviderOutput { -extension DetachVerifiedAccessTrustProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DetachVerifiedAccessTrustProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessInstance = output.verifiedAccessInstance - self.verifiedAccessTrustProvider = output.verifiedAccessTrustProvider - } else { - self.verifiedAccessInstance = nil - self.verifiedAccessTrustProvider = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DetachVerifiedAccessTrustProviderOutput() + value.verifiedAccessInstance = try reader["verifiedAccessInstance"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessInstance.readingClosure) + value.verifiedAccessTrustProvider = try reader["verifiedAccessTrustProvider"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessTrustProvider.readingClosure) + return value } } } @@ -80546,31 +53894,18 @@ public struct DetachVerifiedAccessTrustProviderOutput: Swift.Equatable { } } -struct DetachVerifiedAccessTrustProviderOutputBody: Swift.Equatable { - let verifiedAccessTrustProvider: EC2ClientTypes.VerifiedAccessTrustProvider? - let verifiedAccessInstance: EC2ClientTypes.VerifiedAccessInstance? -} - -extension DetachVerifiedAccessTrustProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessInstance = "verifiedAccessInstance" - case verifiedAccessTrustProvider = "verifiedAccessTrustProvider" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessTrustProvider.self, forKey: .verifiedAccessTrustProvider) - verifiedAccessTrustProvider = verifiedAccessTrustProviderDecoded - let verifiedAccessInstanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessInstance.self, forKey: .verifiedAccessInstance) - verifiedAccessInstance = verifiedAccessInstanceDecoded - } -} +enum DetachVerifiedAccessTrustProviderOutputError { -enum DetachVerifiedAccessTrustProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -80634,60 +53969,22 @@ public struct DetachVolumeInput: Swift.Equatable { } } -struct DetachVolumeInputBody: Swift.Equatable { - let device: Swift.String? - let force: Swift.Bool? - let instanceId: Swift.String? - let volumeId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DetachVolumeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case device = "Device" - case dryRun = "dryRun" - case force = "Force" - case instanceId = "InstanceId" - case volumeId = "VolumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .device) - device = deviceDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DetachVolumeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DetachVolumeOutputBody = try responseDecoder.decode(responseBody: data) - self.associatedResource = output.associatedResource - self.attachTime = output.attachTime - self.deleteOnTermination = output.deleteOnTermination - self.device = output.device - self.instanceId = output.instanceId - self.instanceOwningService = output.instanceOwningService - self.state = output.state - self.volumeId = output.volumeId - } else { - self.associatedResource = nil - self.attachTime = nil - self.deleteOnTermination = nil - self.device = nil - self.instanceId = nil - self.instanceOwningService = nil - self.state = nil - self.volumeId = nil +extension DetachVolumeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DetachVolumeOutput() + value.associatedResource = try reader["associatedResource"].readIfPresent() + value.attachTime = try reader["attachTime"].readTimestampIfPresent(format: .dateTime) + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.device = try reader["device"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceOwningService = try reader["instanceOwningService"].readIfPresent() + value.state = try reader["status"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + return value } } } @@ -80733,55 +54030,18 @@ public struct DetachVolumeOutput: Swift.Equatable { } } -struct DetachVolumeOutputBody: Swift.Equatable { - let attachTime: ClientRuntime.Date? - let device: Swift.String? - let instanceId: Swift.String? - let state: EC2ClientTypes.VolumeAttachmentState? - let volumeId: Swift.String? - let deleteOnTermination: Swift.Bool? - let associatedResource: Swift.String? - let instanceOwningService: Swift.String? -} +enum DetachVolumeOutputError { -extension DetachVolumeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedResource = "associatedResource" - case attachTime = "attachTime" - case deleteOnTermination = "deleteOnTermination" - case device = "device" - case instanceId = "instanceId" - case instanceOwningService = "instanceOwningService" - case state = "status" - case volumeId = "volumeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .attachTime) - attachTime = attachTimeDecoded - let deviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .device) - device = deviceDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeAttachmentState.self, forKey: .state) - state = stateDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) - associatedResource = associatedResourceDecoded - let instanceOwningServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceOwningService) - instanceOwningService = instanceOwningServiceDecoded - } -} - -enum DetachVolumeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -80833,32 +54093,12 @@ public struct DetachVpnGatewayInput: Swift.Equatable { } } -struct DetachVpnGatewayInputBody: Swift.Equatable { - let vpcId: Swift.String? - let vpnGatewayId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DetachVpnGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpcId = "VpcId" - case vpnGatewayId = "VpnGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let vpnGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnGatewayId) - vpnGatewayId = vpnGatewayIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DetachVpnGatewayOutput { -extension DetachVpnGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachVpnGatewayOutput() + } } } @@ -80867,20 +54107,23 @@ public struct DetachVpnGatewayOutput: Swift.Equatable { public init() { } } -enum DetachVpnGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DetachVpnGatewayOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.DeviceOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicSigningKeyUrl = "publicSigningKeyUrl" - case tenantId = "tenantId" - } +extension EC2ClientTypes.DeviceOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -80892,12 +54135,14 @@ extension EC2ClientTypes.DeviceOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tenantIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantId) - tenantId = tenantIdDecoded - let publicSigningKeyUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicSigningKeyUrl) - publicSigningKeyUrl = publicSigningKeyUrlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DeviceOptions() + value.tenantId = try reader["tenantId"].readIfPresent() + value.publicSigningKeyUrl = try reader["publicSigningKeyUrl"].readIfPresent() + return value + } } } @@ -80988,11 +54233,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.DhcpConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "key" - case values = "valueSet" - } +extension EC2ClientTypes.DhcpConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -81013,28 +54254,13 @@ extension EC2ClientTypes.DhcpConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct item{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([EC2ClientTypes.AttributeValue].self, forKey: .member) - var valuesBuffer:[EC2ClientTypes.AttributeValue]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [EC2ClientTypes.AttributeValue]() - for structureContainer0 in valuesContainer { - valuesBuffer?.append(structureContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DhcpConfiguration() + value.key = try reader["key"].readIfPresent() + value.values = try reader["valueSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AttributeValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -81059,13 +54285,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DhcpOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dhcpConfigurations = "dhcpConfigurationSet" - case dhcpOptionsId = "dhcpOptionsId" - case ownerId = "ownerId" - case tags = "tagSet" - } +extension EC2ClientTypes.DhcpOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -81101,49 +54321,15 @@ extension EC2ClientTypes.DhcpOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dhcpConfigurations) { - struct KeyVal0{struct item{}} - let dhcpConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dhcpConfigurations) - if let dhcpConfigurationsWrappedContainer = dhcpConfigurationsWrappedContainer { - let dhcpConfigurationsContainer = try dhcpConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.DhcpConfiguration].self, forKey: .member) - var dhcpConfigurationsBuffer:[EC2ClientTypes.DhcpConfiguration]? = nil - if let dhcpConfigurationsContainer = dhcpConfigurationsContainer { - dhcpConfigurationsBuffer = [EC2ClientTypes.DhcpConfiguration]() - for structureContainer0 in dhcpConfigurationsContainer { - dhcpConfigurationsBuffer?.append(structureContainer0) - } - } - dhcpConfigurations = dhcpConfigurationsBuffer - } else { - dhcpConfigurations = [] - } - } else { - dhcpConfigurations = nil - } - let dhcpOptionsIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dhcpOptionsId) - dhcpOptionsId = dhcpOptionsIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DhcpOptions() + value.dhcpConfigurations = try reader["dhcpConfigurationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DhcpConfiguration.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.dhcpOptionsId = try reader["dhcpOptionsId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -81176,10 +54362,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DirectoryServiceAuthentication: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case directoryId = "directoryId" - } +extension EC2ClientTypes.DirectoryServiceAuthentication: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -81188,10 +54371,13 @@ extension EC2ClientTypes.DirectoryServiceAuthentication: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let directoryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .directoryId) - directoryId = directoryIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DirectoryServiceAuthentication() + value.directoryId = try reader["directoryId"].readIfPresent() + return value + } } } @@ -81211,10 +54397,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DirectoryServiceAuthenticationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case directoryId = "DirectoryId" - } +extension EC2ClientTypes.DirectoryServiceAuthenticationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -81223,10 +54406,13 @@ extension EC2ClientTypes.DirectoryServiceAuthenticationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let directoryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .directoryId) - directoryId = directoryIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DirectoryServiceAuthenticationRequest() + value.directoryId = try reader["DirectoryId"].readIfPresent() + return value + } } } @@ -81284,34 +54470,15 @@ public struct DisableAddressTransferInput: Swift.Equatable { } } -struct DisableAddressTransferInputBody: Swift.Equatable { - let allocationId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DisableAddressTransferInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "AllocationId" - case dryRun = "DryRun" - } +extension DisableAddressTransferOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisableAddressTransferOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableAddressTransferOutputBody = try responseDecoder.decode(responseBody: data) - self.addressTransfer = output.addressTransfer - } else { - self.addressTransfer = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableAddressTransferOutput() + value.addressTransfer = try reader["addressTransfer"].readIfPresent(readingClosure: EC2ClientTypes.AddressTransfer.readingClosure) + return value } } } @@ -81328,27 +54495,18 @@ public struct DisableAddressTransferOutput: Swift.Equatable { } } -struct DisableAddressTransferOutputBody: Swift.Equatable { - let addressTransfer: EC2ClientTypes.AddressTransfer? -} +enum DisableAddressTransferOutputError { -extension DisableAddressTransferOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressTransfer = "addressTransfer" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressTransferDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressTransfer.self, forKey: .addressTransfer) - addressTransfer = addressTransferDecoded - } -} - -enum DisableAddressTransferOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -81411,46 +54569,15 @@ public struct DisableAwsNetworkPerformanceMetricSubscriptionInput: Swift.Equatab } } -struct DisableAwsNetworkPerformanceMetricSubscriptionInputBody: Swift.Equatable { - let source: Swift.String? - let destination: Swift.String? - let metric: EC2ClientTypes.MetricType? - let statistic: EC2ClientTypes.StatisticType? - let dryRun: Swift.Bool? -} - -extension DisableAwsNetworkPerformanceMetricSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "Destination" - case dryRun = "DryRun" - case metric = "Metric" - case source = "Source" - case statistic = "Statistic" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) - destination = destinationDecoded - let metricDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MetricType.self, forKey: .metric) - metric = metricDecoded - let statisticDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StatisticType.self, forKey: .statistic) - statistic = statisticDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisableAwsNetworkPerformanceMetricSubscriptionOutput { -extension DisableAwsNetworkPerformanceMetricSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableAwsNetworkPerformanceMetricSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.output = output.output - } else { - self.output = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableAwsNetworkPerformanceMetricSubscriptionOutput() + value.output = try reader["output"].readIfPresent() + return value } } } @@ -81467,27 +54594,18 @@ public struct DisableAwsNetworkPerformanceMetricSubscriptionOutput: Swift.Equata } } -struct DisableAwsNetworkPerformanceMetricSubscriptionOutputBody: Swift.Equatable { - let output: Swift.Bool? -} - -extension DisableAwsNetworkPerformanceMetricSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case output = "output" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let outputDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .output) - output = outputDecoded - } -} +enum DisableAwsNetworkPerformanceMetricSubscriptionOutputError { -enum DisableAwsNetworkPerformanceMetricSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -81522,30 +54640,15 @@ public struct DisableEbsEncryptionByDefaultInput: Swift.Equatable { } } -struct DisableEbsEncryptionByDefaultInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension DisableEbsEncryptionByDefaultInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisableEbsEncryptionByDefaultOutput { -extension DisableEbsEncryptionByDefaultOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableEbsEncryptionByDefaultOutputBody = try responseDecoder.decode(responseBody: data) - self.ebsEncryptionByDefault = output.ebsEncryptionByDefault - } else { - self.ebsEncryptionByDefault = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableEbsEncryptionByDefaultOutput() + value.ebsEncryptionByDefault = try reader["ebsEncryptionByDefault"].readIfPresent() + return value } } } @@ -81562,27 +54665,18 @@ public struct DisableEbsEncryptionByDefaultOutput: Swift.Equatable { } } -struct DisableEbsEncryptionByDefaultOutputBody: Swift.Equatable { - let ebsEncryptionByDefault: Swift.Bool? -} - -extension DisableEbsEncryptionByDefaultOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ebsEncryptionByDefault = "ebsEncryptionByDefault" - } +enum DisableEbsEncryptionByDefaultOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ebsEncryptionByDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsEncryptionByDefault) - ebsEncryptionByDefault = ebsEncryptionByDefaultDecoded - } -} - -enum DisableEbsEncryptionByDefaultOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -81632,54 +54726,23 @@ public struct DisableFastLaunchInput: Swift.Equatable { } } -struct DisableFastLaunchInputBody: Swift.Equatable { - let imageId: Swift.String? - let force: Swift.Bool? - let dryRun: Swift.Bool? -} - -extension DisableFastLaunchInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case force = "Force" - case imageId = "ImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisableFastLaunchOutput { -extension DisableFastLaunchOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableFastLaunchOutputBody = try responseDecoder.decode(responseBody: data) - self.imageId = output.imageId - self.launchTemplate = output.launchTemplate - self.maxParallelLaunches = output.maxParallelLaunches - self.ownerId = output.ownerId - self.resourceType = output.resourceType - self.snapshotConfiguration = output.snapshotConfiguration - self.state = output.state - self.stateTransitionReason = output.stateTransitionReason - self.stateTransitionTime = output.stateTransitionTime - } else { - self.imageId = nil - self.launchTemplate = nil - self.maxParallelLaunches = nil - self.ownerId = nil - self.resourceType = nil - self.snapshotConfiguration = nil - self.state = nil - self.stateTransitionReason = nil - self.stateTransitionTime = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableFastLaunchOutput() + value.imageId = try reader["imageId"].readIfPresent() + value.launchTemplate = try reader["launchTemplate"].readIfPresent(readingClosure: EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse.readingClosure) + value.maxParallelLaunches = try reader["maxParallelLaunches"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.snapshotConfiguration = try reader["snapshotConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.FastLaunchSnapshotConfigurationResponse.readingClosure) + value.state = try reader["state"].readIfPresent() + value.stateTransitionReason = try reader["stateTransitionReason"].readIfPresent() + value.stateTransitionTime = try reader["stateTransitionTime"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -81728,68 +54791,23 @@ public struct DisableFastLaunchOutput: Swift.Equatable { } } -struct DisableFastLaunchOutputBody: Swift.Equatable { - let imageId: Swift.String? - let resourceType: EC2ClientTypes.FastLaunchResourceType? - let snapshotConfiguration: EC2ClientTypes.FastLaunchSnapshotConfigurationResponse? - let launchTemplate: EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse? - let maxParallelLaunches: Swift.Int? - let ownerId: Swift.String? - let state: EC2ClientTypes.FastLaunchStateCode? - let stateTransitionReason: Swift.String? - let stateTransitionTime: ClientRuntime.Date? -} - -extension DisableFastLaunchOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageId = "imageId" - case launchTemplate = "launchTemplate" - case maxParallelLaunches = "maxParallelLaunches" - case ownerId = "ownerId" - case resourceType = "resourceType" - case snapshotConfiguration = "snapshotConfiguration" - case state = "state" - case stateTransitionReason = "stateTransitionReason" - case stateTransitionTime = "stateTransitionTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let snapshotConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchSnapshotConfigurationResponse.self, forKey: .snapshotConfiguration) - snapshotConfiguration = snapshotConfigurationDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let maxParallelLaunchesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxParallelLaunches) - maxParallelLaunches = maxParallelLaunchesDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchStateCode.self, forKey: .state) - state = stateDecoded - let stateTransitionReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateTransitionReason) - stateTransitionReason = stateTransitionReasonDecoded - let stateTransitionTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .stateTransitionTime) - stateTransitionTime = stateTransitionTimeDecoded - } -} +enum DisableFastLaunchOutputError { -enum DisableFastLaunchOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.DisableFastSnapshotRestoreErrorItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fastSnapshotRestoreStateErrors = "fastSnapshotRestoreStateErrorSet" - case snapshotId = "snapshotId" - } +extension EC2ClientTypes.DisableFastSnapshotRestoreErrorItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -81810,28 +54828,13 @@ extension EC2ClientTypes.DisableFastSnapshotRestoreErrorItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - if containerValues.contains(.fastSnapshotRestoreStateErrors) { - struct KeyVal0{struct item{}} - let fastSnapshotRestoreStateErrorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fastSnapshotRestoreStateErrors) - if let fastSnapshotRestoreStateErrorsWrappedContainer = fastSnapshotRestoreStateErrorsWrappedContainer { - let fastSnapshotRestoreStateErrorsContainer = try fastSnapshotRestoreStateErrorsWrappedContainer.decodeIfPresent([EC2ClientTypes.DisableFastSnapshotRestoreStateErrorItem].self, forKey: .member) - var fastSnapshotRestoreStateErrorsBuffer:[EC2ClientTypes.DisableFastSnapshotRestoreStateErrorItem]? = nil - if let fastSnapshotRestoreStateErrorsContainer = fastSnapshotRestoreStateErrorsContainer { - fastSnapshotRestoreStateErrorsBuffer = [EC2ClientTypes.DisableFastSnapshotRestoreStateErrorItem]() - for structureContainer0 in fastSnapshotRestoreStateErrorsContainer { - fastSnapshotRestoreStateErrorsBuffer?.append(structureContainer0) - } - } - fastSnapshotRestoreStateErrors = fastSnapshotRestoreStateErrorsBuffer - } else { - fastSnapshotRestoreStateErrors = [] - } - } else { - fastSnapshotRestoreStateErrors = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DisableFastSnapshotRestoreErrorItem() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.fastSnapshotRestoreStateErrors = try reader["fastSnapshotRestoreStateErrorSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DisableFastSnapshotRestoreStateErrorItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -81856,11 +54859,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DisableFastSnapshotRestoreStateError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.DisableFastSnapshotRestoreStateError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -81872,12 +54871,14 @@ extension EC2ClientTypes.DisableFastSnapshotRestoreStateError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DisableFastSnapshotRestoreStateError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -81901,11 +54902,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DisableFastSnapshotRestoreStateErrorItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case error = "error" - } +extension EC2ClientTypes.DisableFastSnapshotRestoreStateErrorItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -81917,12 +54914,14 @@ extension EC2ClientTypes.DisableFastSnapshotRestoreStateErrorItem: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let errorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DisableFastSnapshotRestoreStateError.self, forKey: .error) - error = errorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DisableFastSnapshotRestoreStateErrorItem() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.error = try reader["error"].readIfPresent(readingClosure: EC2ClientTypes.DisableFastSnapshotRestoreStateError.readingClosure) + return value + } } } @@ -81946,20 +54945,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case disabledTime = "disabledTime" - case disablingTime = "disablingTime" - case enabledTime = "enabledTime" - case enablingTime = "enablingTime" - case optimizingTime = "optimizingTime" - case ownerAlias = "ownerAlias" - case ownerId = "ownerId" - case snapshotId = "snapshotId" - case state = "state" - case stateTransitionReason = "stateTransitionReason" - } +extension EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -81998,30 +54984,23 @@ extension EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastSnapshotRestoreStateCode.self, forKey: .state) - state = stateDecoded - let stateTransitionReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateTransitionReason) - stateTransitionReason = stateTransitionReasonDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ownerAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAlias) - ownerAlias = ownerAliasDecoded - let enablingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enablingTime) - enablingTime = enablingTimeDecoded - let optimizingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .optimizingTime) - optimizingTime = optimizingTimeDecoded - let enabledTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enabledTime) - enabledTime = enabledTimeDecoded - let disablingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .disablingTime) - disablingTime = disablingTimeDecoded - let disabledTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .disabledTime) - disabledTime = disabledTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.stateTransitionReason = try reader["stateTransitionReason"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.ownerAlias = try reader["ownerAlias"].readIfPresent() + value.enablingTime = try reader["enablingTime"].readTimestampIfPresent(format: .dateTime) + value.optimizingTime = try reader["optimizingTime"].readTimestampIfPresent(format: .dateTime) + value.enabledTime = try reader["enabledTime"].readTimestampIfPresent(format: .dateTime) + value.disablingTime = try reader["disablingTime"].readTimestampIfPresent(format: .dateTime) + value.disabledTime = try reader["disabledTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -82149,74 +55128,16 @@ public struct DisableFastSnapshotRestoresInput: Swift.Equatable { } } -struct DisableFastSnapshotRestoresInputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let sourceSnapshotIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DisableFastSnapshotRestoresInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZone" - case dryRun = "DryRun" - case sourceSnapshotIds = "SourceSnapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - if containerValues.contains(.sourceSnapshotIds) { - struct KeyVal0{struct SnapshotId{}} - let sourceSnapshotIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceSnapshotIds) - if let sourceSnapshotIdsWrappedContainer = sourceSnapshotIdsWrappedContainer { - let sourceSnapshotIdsContainer = try sourceSnapshotIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceSnapshotIdsBuffer:[Swift.String]? = nil - if let sourceSnapshotIdsContainer = sourceSnapshotIdsContainer { - sourceSnapshotIdsBuffer = [Swift.String]() - for stringContainer0 in sourceSnapshotIdsContainer { - sourceSnapshotIdsBuffer?.append(stringContainer0) - } - } - sourceSnapshotIds = sourceSnapshotIdsBuffer - } else { - sourceSnapshotIds = [] - } - } else { - sourceSnapshotIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisableFastSnapshotRestoresOutput { -extension DisableFastSnapshotRestoresOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableFastSnapshotRestoresOutputBody = try responseDecoder.decode(responseBody: data) - self.successful = output.successful - self.unsuccessful = output.unsuccessful - } else { - self.successful = nil - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableFastSnapshotRestoresOutput() + value.successful = try reader["successful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DisableFastSnapshotRestoreErrorItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -82237,65 +55158,18 @@ public struct DisableFastSnapshotRestoresOutput: Swift.Equatable { } } -struct DisableFastSnapshotRestoresOutputBody: Swift.Equatable { - let successful: [EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem]? - let unsuccessful: [EC2ClientTypes.DisableFastSnapshotRestoreErrorItem]? -} - -extension DisableFastSnapshotRestoresOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case successful = "successful" - case unsuccessful = "unsuccessful" - } +enum DisableFastSnapshotRestoresOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successful) { - struct KeyVal0{struct item{}} - let successfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successful) - if let successfulWrappedContainer = successfulWrappedContainer { - let successfulContainer = try successfulWrappedContainer.decodeIfPresent([EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem].self, forKey: .member) - var successfulBuffer:[EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem]? = nil - if let successfulContainer = successfulContainer { - successfulBuffer = [EC2ClientTypes.DisableFastSnapshotRestoreSuccessItem]() - for structureContainer0 in successfulContainer { - successfulBuffer?.append(structureContainer0) - } - } - successful = successfulBuffer - } else { - successful = [] - } - } else { - successful = nil - } - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.DisableFastSnapshotRestoreErrorItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.DisableFastSnapshotRestoreErrorItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.DisableFastSnapshotRestoreErrorItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum DisableFastSnapshotRestoresOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -82330,30 +55204,15 @@ public struct DisableImageBlockPublicAccessInput: Swift.Equatable { } } -struct DisableImageBlockPublicAccessInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension DisableImageBlockPublicAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisableImageBlockPublicAccessOutput { -extension DisableImageBlockPublicAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableImageBlockPublicAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.imageBlockPublicAccessState = output.imageBlockPublicAccessState - } else { - self.imageBlockPublicAccessState = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableImageBlockPublicAccessOutput() + value.imageBlockPublicAccessState = try reader["imageBlockPublicAccessState"].readIfPresent() + return value } } } @@ -82370,27 +55229,18 @@ public struct DisableImageBlockPublicAccessOutput: Swift.Equatable { } } -struct DisableImageBlockPublicAccessOutputBody: Swift.Equatable { - let imageBlockPublicAccessState: EC2ClientTypes.ImageBlockPublicAccessDisabledState? -} - -extension DisableImageBlockPublicAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageBlockPublicAccessState = "imageBlockPublicAccessState" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageBlockPublicAccessStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImageBlockPublicAccessDisabledState.self, forKey: .imageBlockPublicAccessState) - imageBlockPublicAccessState = imageBlockPublicAccessStateDecoded - } -} +enum DisableImageBlockPublicAccessOutputError { -enum DisableImageBlockPublicAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -82433,34 +55283,15 @@ public struct DisableImageDeprecationInput: Swift.Equatable { } } -struct DisableImageDeprecationInputBody: Swift.Equatable { - let imageId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DisableImageDeprecationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case imageId = "ImageId" - } +extension DisableImageDeprecationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisableImageDeprecationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableImageDeprecationOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableImageDeprecationOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -82477,27 +55308,18 @@ public struct DisableImageDeprecationOutput: Swift.Equatable { } } -struct DisableImageDeprecationOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension DisableImageDeprecationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum DisableImageDeprecationOutputError { -enum DisableImageDeprecationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -82540,34 +55362,15 @@ public struct DisableImageInput: Swift.Equatable { } } -struct DisableImageInputBody: Swift.Equatable { - let imageId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DisableImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case imageId = "ImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisableImageOutput { -extension DisableImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableImageOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableImageOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -82584,27 +55387,18 @@ public struct DisableImageOutput: Swift.Equatable { } } -struct DisableImageOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension DisableImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum DisableImageOutputError { -enum DisableImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -82647,34 +55441,15 @@ public struct DisableIpamOrganizationAdminAccountInput: Swift.Equatable { } } -struct DisableIpamOrganizationAdminAccountInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let delegatedAdminAccountId: Swift.String? -} - -extension DisableIpamOrganizationAdminAccountInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delegatedAdminAccountId = "DelegatedAdminAccountId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let delegatedAdminAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .delegatedAdminAccountId) - delegatedAdminAccountId = delegatedAdminAccountIdDecoded - } -} +extension DisableIpamOrganizationAdminAccountOutput { -extension DisableIpamOrganizationAdminAccountOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableIpamOrganizationAdminAccountOutputBody = try responseDecoder.decode(responseBody: data) - self.success = output.success - } else { - self.success = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableIpamOrganizationAdminAccountOutput() + value.success = try reader["success"].readIfPresent() + return value } } } @@ -82691,27 +55466,18 @@ public struct DisableIpamOrganizationAdminAccountOutput: Swift.Equatable { } } -struct DisableIpamOrganizationAdminAccountOutputBody: Swift.Equatable { - let success: Swift.Bool? -} - -extension DisableIpamOrganizationAdminAccountOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case success = "success" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let successDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .success) - success = successDecoded - } -} +enum DisableIpamOrganizationAdminAccountOutputError { -enum DisableIpamOrganizationAdminAccountOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -82746,30 +55512,15 @@ public struct DisableSerialConsoleAccessInput: Swift.Equatable { } } -struct DisableSerialConsoleAccessInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} +extension DisableSerialConsoleAccessOutput { -extension DisableSerialConsoleAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisableSerialConsoleAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableSerialConsoleAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.serialConsoleAccessEnabled = output.serialConsoleAccessEnabled - } else { - self.serialConsoleAccessEnabled = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableSerialConsoleAccessOutput() + value.serialConsoleAccessEnabled = try reader["serialConsoleAccessEnabled"].readIfPresent() + return value } } } @@ -82786,27 +55537,18 @@ public struct DisableSerialConsoleAccessOutput: Swift.Equatable { } } -struct DisableSerialConsoleAccessOutputBody: Swift.Equatable { - let serialConsoleAccessEnabled: Swift.Bool? -} - -extension DisableSerialConsoleAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serialConsoleAccessEnabled = "serialConsoleAccessEnabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialConsoleAccessEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .serialConsoleAccessEnabled) - serialConsoleAccessEnabled = serialConsoleAccessEnabledDecoded - } -} +enum DisableSerialConsoleAccessOutputError { -enum DisableSerialConsoleAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -82841,30 +55583,15 @@ public struct DisableSnapshotBlockPublicAccessInput: Swift.Equatable { } } -struct DisableSnapshotBlockPublicAccessInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension DisableSnapshotBlockPublicAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisableSnapshotBlockPublicAccessOutput { -extension DisableSnapshotBlockPublicAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableSnapshotBlockPublicAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.state = output.state - } else { - self.state = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableSnapshotBlockPublicAccessOutput() + value.state = try reader["state"].readIfPresent() + return value } } } @@ -82881,27 +55608,18 @@ public struct DisableSnapshotBlockPublicAccessOutput: Swift.Equatable { } } -struct DisableSnapshotBlockPublicAccessOutputBody: Swift.Equatable { - let state: EC2ClientTypes.SnapshotBlockPublicAccessState? -} - -extension DisableSnapshotBlockPublicAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotBlockPublicAccessState.self, forKey: .state) - state = stateDecoded - } -} +enum DisableSnapshotBlockPublicAccessOutputError { -enum DisableSnapshotBlockPublicAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -82958,42 +55676,15 @@ public struct DisableTransitGatewayRouteTablePropagationInput: Swift.Equatable { } } -struct DisableTransitGatewayRouteTablePropagationInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? - let transitGatewayRouteTableAnnouncementId: Swift.String? -} - -extension DisableTransitGatewayRouteTablePropagationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayRouteTableAnnouncementId = "TransitGatewayRouteTableAnnouncementId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } +extension DisableTransitGatewayRouteTablePropagationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let transitGatewayRouteTableAnnouncementIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableAnnouncementId) - transitGatewayRouteTableAnnouncementId = transitGatewayRouteTableAnnouncementIdDecoded - } -} - -extension DisableTransitGatewayRouteTablePropagationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableTransitGatewayRouteTablePropagationOutputBody = try responseDecoder.decode(responseBody: data) - self.propagation = output.propagation - } else { - self.propagation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableTransitGatewayRouteTablePropagationOutput() + value.propagation = try reader["propagation"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPropagation.readingClosure) + return value } } } @@ -83010,27 +55701,18 @@ public struct DisableTransitGatewayRouteTablePropagationOutput: Swift.Equatable } } -struct DisableTransitGatewayRouteTablePropagationOutputBody: Swift.Equatable { - let propagation: EC2ClientTypes.TransitGatewayPropagation? -} - -extension DisableTransitGatewayRouteTablePropagationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case propagation = "propagation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let propagationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPropagation.self, forKey: .propagation) - propagation = propagationDecoded - } -} +enum DisableTransitGatewayRouteTablePropagationOutputError { -enum DisableTransitGatewayRouteTablePropagationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83082,32 +55764,12 @@ public struct DisableVgwRoutePropagationInput: Swift.Equatable { } } -struct DisableVgwRoutePropagationInputBody: Swift.Equatable { - let gatewayId: Swift.String? - let routeTableId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DisableVgwRoutePropagationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case gatewayId = "GatewayId" - case routeTableId = "RouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisableVgwRoutePropagationOutput { -extension DisableVgwRoutePropagationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DisableVgwRoutePropagationOutput() + } } } @@ -83116,11 +55778,18 @@ public struct DisableVgwRoutePropagationOutput: Swift.Equatable { public init() { } } -enum DisableVgwRoutePropagationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DisableVgwRoutePropagationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83155,30 +55824,15 @@ public struct DisableVpcClassicLinkDnsSupportInput: Swift.Equatable { } } -struct DisableVpcClassicLinkDnsSupportInputBody: Swift.Equatable { - let vpcId: Swift.String? -} - -extension DisableVpcClassicLinkDnsSupportInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} +extension DisableVpcClassicLinkDnsSupportOutput { -extension DisableVpcClassicLinkDnsSupportOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableVpcClassicLinkDnsSupportOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableVpcClassicLinkDnsSupportOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -83195,27 +55849,18 @@ public struct DisableVpcClassicLinkDnsSupportOutput: Swift.Equatable { } } -struct DisableVpcClassicLinkDnsSupportOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension DisableVpcClassicLinkDnsSupportOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum DisableVpcClassicLinkDnsSupportOutputError { -enum DisableVpcClassicLinkDnsSupportOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83258,34 +55903,15 @@ public struct DisableVpcClassicLinkInput: Swift.Equatable { } } -struct DisableVpcClassicLinkInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcId: Swift.String? -} - -extension DisableVpcClassicLinkInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpcId = "vpcId" - } +extension DisableVpcClassicLinkOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} - -extension DisableVpcClassicLinkOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableVpcClassicLinkOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableVpcClassicLinkOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -83302,27 +55928,18 @@ public struct DisableVpcClassicLinkOutput: Swift.Equatable { } } -struct DisableVpcClassicLinkOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension DisableVpcClassicLinkOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } +enum DisableVpcClassicLinkOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum DisableVpcClassicLinkOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83371,32 +55988,12 @@ public struct DisassociateAddressInput: Swift.Equatable { } } -struct DisassociateAddressInputBody: Swift.Equatable { - let associationId: Swift.String? - let publicIp: Swift.String? - let dryRun: Swift.Bool? -} - -extension DisassociateAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "AssociationId" - case dryRun = "dryRun" - case publicIp = "PublicIp" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension DisassociateAddressOutput { -extension DisassociateAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DisassociateAddressOutput() + } } } @@ -83405,11 +56002,18 @@ public struct DisassociateAddressOutput: Swift.Equatable { public init() { } } -enum DisassociateAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DisassociateAddressOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83460,40 +56064,16 @@ public struct DisassociateClientVpnTargetNetworkInput: Swift.Equatable { } } -struct DisassociateClientVpnTargetNetworkInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let associationId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DisassociateClientVpnTargetNetworkInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "AssociationId" - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - } +extension DisassociateClientVpnTargetNetworkOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisassociateClientVpnTargetNetworkOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateClientVpnTargetNetworkOutputBody = try responseDecoder.decode(responseBody: data) - self.associationId = output.associationId - self.status = output.status - } else { - self.associationId = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateClientVpnTargetNetworkOutput() + value.associationId = try reader["associationId"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.AssociationStatus.readingClosure) + return value } } } @@ -83514,31 +56094,18 @@ public struct DisassociateClientVpnTargetNetworkOutput: Swift.Equatable { } } -struct DisassociateClientVpnTargetNetworkOutputBody: Swift.Equatable { - let associationId: Swift.String? - let status: EC2ClientTypes.AssociationStatus? -} - -extension DisassociateClientVpnTargetNetworkOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AssociationStatus.self, forKey: .status) - status = statusDecoded - } -} +enum DisassociateClientVpnTargetNetworkOutputError { -enum DisassociateClientVpnTargetNetworkOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83589,38 +56156,15 @@ public struct DisassociateEnclaveCertificateIamRoleInput: Swift.Equatable { } } -struct DisassociateEnclaveCertificateIamRoleInputBody: Swift.Equatable { - let certificateArn: Swift.String? - let roleArn: Swift.String? - let dryRun: Swift.Bool? -} +extension DisassociateEnclaveCertificateIamRoleOutput { -extension DisassociateEnclaveCertificateIamRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateArn = "CertificateArn" - case dryRun = "DryRun" - case roleArn = "RoleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisassociateEnclaveCertificateIamRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateEnclaveCertificateIamRoleOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateEnclaveCertificateIamRoleOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -83637,27 +56181,18 @@ public struct DisassociateEnclaveCertificateIamRoleOutput: Swift.Equatable { } } -struct DisassociateEnclaveCertificateIamRoleOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} +enum DisassociateEnclaveCertificateIamRoleOutputError { -extension DisassociateEnclaveCertificateIamRoleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum DisassociateEnclaveCertificateIamRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83693,30 +56228,15 @@ public struct DisassociateIamInstanceProfileInput: Swift.Equatable { } } -struct DisassociateIamInstanceProfileInputBody: Swift.Equatable { - let associationId: Swift.String? -} - -extension DisassociateIamInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "AssociationId" - } +extension DisassociateIamInstanceProfileOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - } -} - -extension DisassociateIamInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateIamInstanceProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.iamInstanceProfileAssociation = output.iamInstanceProfileAssociation - } else { - self.iamInstanceProfileAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateIamInstanceProfileOutput() + value.iamInstanceProfileAssociation = try reader["iamInstanceProfileAssociation"].readIfPresent(readingClosure: EC2ClientTypes.IamInstanceProfileAssociation.readingClosure) + return value } } } @@ -83733,27 +56253,18 @@ public struct DisassociateIamInstanceProfileOutput: Swift.Equatable { } } -struct DisassociateIamInstanceProfileOutputBody: Swift.Equatable { - let iamInstanceProfileAssociation: EC2ClientTypes.IamInstanceProfileAssociation? -} - -extension DisassociateIamInstanceProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamInstanceProfileAssociation = "iamInstanceProfileAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let iamInstanceProfileAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileAssociation.self, forKey: .iamInstanceProfileAssociation) - iamInstanceProfileAssociation = iamInstanceProfileAssociationDecoded - } -} +enum DisassociateIamInstanceProfileOutputError { -enum DisassociateIamInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83804,38 +56315,15 @@ public struct DisassociateInstanceEventWindowInput: Swift.Equatable { } } -struct DisassociateInstanceEventWindowInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceEventWindowId: Swift.String? - let associationTarget: EC2ClientTypes.InstanceEventWindowDisassociationRequest? -} - -extension DisassociateInstanceEventWindowInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationTarget = "AssociationTarget" - case dryRun = "DryRun" - case instanceEventWindowId = "InstanceEventWindowId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceEventWindowIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceEventWindowId) - instanceEventWindowId = instanceEventWindowIdDecoded - let associationTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindowDisassociationRequest.self, forKey: .associationTarget) - associationTarget = associationTargetDecoded - } -} +extension DisassociateInstanceEventWindowOutput { -extension DisassociateInstanceEventWindowOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateInstanceEventWindowOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceEventWindow = output.instanceEventWindow - } else { - self.instanceEventWindow = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateInstanceEventWindowOutput() + value.instanceEventWindow = try reader["instanceEventWindow"].readIfPresent(readingClosure: EC2ClientTypes.InstanceEventWindow.readingClosure) + return value } } } @@ -83852,27 +56340,18 @@ public struct DisassociateInstanceEventWindowOutput: Swift.Equatable { } } -struct DisassociateInstanceEventWindowOutputBody: Swift.Equatable { - let instanceEventWindow: EC2ClientTypes.InstanceEventWindow? -} - -extension DisassociateInstanceEventWindowOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceEventWindow = "instanceEventWindow" - } +enum DisassociateInstanceEventWindowOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceEventWindowDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindow.self, forKey: .instanceEventWindow) - instanceEventWindow = instanceEventWindowDecoded - } -} - -enum DisassociateInstanceEventWindowOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -83923,38 +56402,15 @@ public struct DisassociateIpamByoasnInput: Swift.Equatable { } } -struct DisassociateIpamByoasnInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let asn: Swift.String? - let cidr: Swift.String? -} +extension DisassociateIpamByoasnOutput { -extension DisassociateIpamByoasnInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asn = "Asn" - case cidr = "Cidr" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let asnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .asn) - asn = asnDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - } -} - -extension DisassociateIpamByoasnOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateIpamByoasnOutputBody = try responseDecoder.decode(responseBody: data) - self.asnAssociation = output.asnAssociation - } else { - self.asnAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateIpamByoasnOutput() + value.asnAssociation = try reader["asnAssociation"].readIfPresent(readingClosure: EC2ClientTypes.AsnAssociation.readingClosure) + return value } } } @@ -83971,27 +56427,18 @@ public struct DisassociateIpamByoasnOutput: Swift.Equatable { } } -struct DisassociateIpamByoasnOutputBody: Swift.Equatable { - let asnAssociation: EC2ClientTypes.AsnAssociation? -} - -extension DisassociateIpamByoasnOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asnAssociation = "asnAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let asnAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AsnAssociation.self, forKey: .asnAssociation) - asnAssociation = asnAssociationDecoded - } -} +enum DisassociateIpamByoasnOutputError { -enum DisassociateIpamByoasnOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -84034,34 +56481,15 @@ public struct DisassociateIpamResourceDiscoveryInput: Swift.Equatable { } } -struct DisassociateIpamResourceDiscoveryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamResourceDiscoveryAssociationId: Swift.String? -} - -extension DisassociateIpamResourceDiscoveryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case ipamResourceDiscoveryAssociationId = "IpamResourceDiscoveryAssociationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamResourceDiscoveryAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryAssociationId) - ipamResourceDiscoveryAssociationId = ipamResourceDiscoveryAssociationIdDecoded - } -} +extension DisassociateIpamResourceDiscoveryOutput { -extension DisassociateIpamResourceDiscoveryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateIpamResourceDiscoveryOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceDiscoveryAssociation = output.ipamResourceDiscoveryAssociation - } else { - self.ipamResourceDiscoveryAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateIpamResourceDiscoveryOutput() + value.ipamResourceDiscoveryAssociation = try reader["ipamResourceDiscoveryAssociation"].readIfPresent(readingClosure: EC2ClientTypes.IpamResourceDiscoveryAssociation.readingClosure) + return value } } } @@ -84078,27 +56506,18 @@ public struct DisassociateIpamResourceDiscoveryOutput: Swift.Equatable { } } -struct DisassociateIpamResourceDiscoveryOutputBody: Swift.Equatable { - let ipamResourceDiscoveryAssociation: EC2ClientTypes.IpamResourceDiscoveryAssociation? -} - -extension DisassociateIpamResourceDiscoveryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceDiscoveryAssociation = "ipamResourceDiscoveryAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamResourceDiscoveryAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceDiscoveryAssociation.self, forKey: .ipamResourceDiscoveryAssociation) - ipamResourceDiscoveryAssociation = ipamResourceDiscoveryAssociationDecoded - } -} +enum DisassociateIpamResourceDiscoveryOutputError { -enum DisassociateIpamResourceDiscoveryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -84165,61 +56584,16 @@ public struct DisassociateNatGatewayAddressInput: Swift.Equatable { } } -struct DisassociateNatGatewayAddressInputBody: Swift.Equatable { - let natGatewayId: Swift.String? - let associationIds: [Swift.String]? - let maxDrainDurationSeconds: Swift.Int? - let dryRun: Swift.Bool? -} +extension DisassociateNatGatewayAddressOutput { -extension DisassociateNatGatewayAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationIds = "AssociationId" - case dryRun = "DryRun" - case maxDrainDurationSeconds = "MaxDrainDurationSeconds" - case natGatewayId = "NatGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - if containerValues.contains(.associationIds) { - struct KeyVal0{struct item{}} - let associationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associationIds) - if let associationIdsWrappedContainer = associationIdsWrappedContainer { - let associationIdsContainer = try associationIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var associationIdsBuffer:[Swift.String]? = nil - if let associationIdsContainer = associationIdsContainer { - associationIdsBuffer = [Swift.String]() - for stringContainer0 in associationIdsContainer { - associationIdsBuffer?.append(stringContainer0) - } - } - associationIds = associationIdsBuffer - } else { - associationIds = [] - } - } else { - associationIds = nil - } - let maxDrainDurationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxDrainDurationSeconds) - maxDrainDurationSeconds = maxDrainDurationSecondsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisassociateNatGatewayAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateNatGatewayAddressOutputBody = try responseDecoder.decode(responseBody: data) - self.natGatewayAddresses = output.natGatewayAddresses - self.natGatewayId = output.natGatewayId - } else { - self.natGatewayAddresses = nil - self.natGatewayId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateNatGatewayAddressOutput() + value.natGatewayAddresses = try reader["natGatewayAddressSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NatGatewayAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.natGatewayId = try reader["natGatewayId"].readIfPresent() + return value } } } @@ -84240,48 +56614,18 @@ public struct DisassociateNatGatewayAddressOutput: Swift.Equatable { } } -struct DisassociateNatGatewayAddressOutputBody: Swift.Equatable { - let natGatewayId: Swift.String? - let natGatewayAddresses: [EC2ClientTypes.NatGatewayAddress]? -} +enum DisassociateNatGatewayAddressOutputError { -extension DisassociateNatGatewayAddressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case natGatewayAddresses = "natGatewayAddressSet" - case natGatewayId = "natGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - if containerValues.contains(.natGatewayAddresses) { - struct KeyVal0{struct item{}} - let natGatewayAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .natGatewayAddresses) - if let natGatewayAddressesWrappedContainer = natGatewayAddressesWrappedContainer { - let natGatewayAddressesContainer = try natGatewayAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.NatGatewayAddress].self, forKey: .member) - var natGatewayAddressesBuffer:[EC2ClientTypes.NatGatewayAddress]? = nil - if let natGatewayAddressesContainer = natGatewayAddressesContainer { - natGatewayAddressesBuffer = [EC2ClientTypes.NatGatewayAddress]() - for structureContainer0 in natGatewayAddressesContainer { - natGatewayAddressesBuffer?.append(structureContainer0) - } - } - natGatewayAddresses = natGatewayAddressesBuffer - } else { - natGatewayAddresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - natGatewayAddresses = nil - } - } -} - -enum DisassociateNatGatewayAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -84324,28 +56668,12 @@ public struct DisassociateRouteTableInput: Swift.Equatable { } } -struct DisassociateRouteTableInputBody: Swift.Equatable { - let associationId: Swift.String? - let dryRun: Swift.Bool? -} +extension DisassociateRouteTableOutput { -extension DisassociateRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case dryRun = "dryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisassociateRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DisassociateRouteTableOutput() + } } } @@ -84354,11 +56682,18 @@ public struct DisassociateRouteTableOutput: Swift.Equatable { public init() { } } -enum DisassociateRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum DisassociateRouteTableOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -84394,32 +56729,16 @@ public struct DisassociateSubnetCidrBlockInput: Swift.Equatable { } } -struct DisassociateSubnetCidrBlockInputBody: Swift.Equatable { - let associationId: Swift.String? -} - -extension DisassociateSubnetCidrBlockInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - } -} +extension DisassociateSubnetCidrBlockOutput { -extension DisassociateSubnetCidrBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateSubnetCidrBlockOutputBody = try responseDecoder.decode(responseBody: data) - self.ipv6CidrBlockAssociation = output.ipv6CidrBlockAssociation - self.subnetId = output.subnetId - } else { - self.ipv6CidrBlockAssociation = nil - self.subnetId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateSubnetCidrBlockOutput() + value.ipv6CidrBlockAssociation = try reader["ipv6CidrBlockAssociation"].readIfPresent(readingClosure: EC2ClientTypes.SubnetIpv6CidrBlockAssociation.readingClosure) + value.subnetId = try reader["subnetId"].readIfPresent() + return value } } } @@ -84440,31 +56759,18 @@ public struct DisassociateSubnetCidrBlockOutput: Swift.Equatable { } } -struct DisassociateSubnetCidrBlockOutputBody: Swift.Equatable { - let ipv6CidrBlockAssociation: EC2ClientTypes.SubnetIpv6CidrBlockAssociation? - let subnetId: Swift.String? -} - -extension DisassociateSubnetCidrBlockOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6CidrBlockAssociation = "ipv6CidrBlockAssociation" - case subnetId = "subnetId" - } +enum DisassociateSubnetCidrBlockOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6CidrBlockAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetIpv6CidrBlockAssociation.self, forKey: .ipv6CidrBlockAssociation) - ipv6CidrBlockAssociation = ipv6CidrBlockAssociationDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - } -} - -enum DisassociateSubnetCidrBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -84532,59 +56838,15 @@ public struct DisassociateTransitGatewayMulticastDomainInput: Swift.Equatable { } } -struct DisassociateTransitGatewayMulticastDomainInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let subnetIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension DisassociateTransitGatewayMulticastDomainInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case subnetIds = "SubnetIds" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } +extension DisassociateTransitGatewayMulticastDomainOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisassociateTransitGatewayMulticastDomainOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateTransitGatewayMulticastDomainOutputBody = try responseDecoder.decode(responseBody: data) - self.associations = output.associations - } else { - self.associations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateTransitGatewayMulticastDomainOutput() + value.associations = try reader["associations"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDomainAssociations.readingClosure) + return value } } } @@ -84601,27 +56863,18 @@ public struct DisassociateTransitGatewayMulticastDomainOutput: Swift.Equatable { } } -struct DisassociateTransitGatewayMulticastDomainOutputBody: Swift.Equatable { - let associations: EC2ClientTypes.TransitGatewayMulticastDomainAssociations? -} - -extension DisassociateTransitGatewayMulticastDomainOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "associations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDomainAssociations.self, forKey: .associations) - associations = associationsDecoded - } -} +enum DisassociateTransitGatewayMulticastDomainOutputError { -enum DisassociateTransitGatewayMulticastDomainOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -84672,38 +56925,15 @@ public struct DisassociateTransitGatewayPolicyTableInput: Swift.Equatable { } } -struct DisassociateTransitGatewayPolicyTableInputBody: Swift.Equatable { - let transitGatewayPolicyTableId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} +extension DisassociateTransitGatewayPolicyTableOutput { -extension DisassociateTransitGatewayPolicyTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayPolicyTableId = "TransitGatewayPolicyTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayPolicyTableId) - transitGatewayPolicyTableId = transitGatewayPolicyTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisassociateTransitGatewayPolicyTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateTransitGatewayPolicyTableOutputBody = try responseDecoder.decode(responseBody: data) - self.association = output.association - } else { - self.association = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateTransitGatewayPolicyTableOutput() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPolicyTableAssociation.readingClosure) + return value } } } @@ -84720,27 +56950,18 @@ public struct DisassociateTransitGatewayPolicyTableOutput: Swift.Equatable { } } -struct DisassociateTransitGatewayPolicyTableOutputBody: Swift.Equatable { - let association: EC2ClientTypes.TransitGatewayPolicyTableAssociation? -} - -extension DisassociateTransitGatewayPolicyTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPolicyTableAssociation.self, forKey: .association) - association = associationDecoded - } -} +enum DisassociateTransitGatewayPolicyTableOutputError { -enum DisassociateTransitGatewayPolicyTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -84791,38 +57012,15 @@ public struct DisassociateTransitGatewayRouteTableInput: Swift.Equatable { } } -struct DisassociateTransitGatewayRouteTableInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension DisassociateTransitGatewayRouteTableInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } +extension DisassociateTransitGatewayRouteTableOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisassociateTransitGatewayRouteTableOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateTransitGatewayRouteTableOutputBody = try responseDecoder.decode(responseBody: data) - self.association = output.association - } else { - self.association = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateTransitGatewayRouteTableOutput() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayAssociation.readingClosure) + return value } } } @@ -84839,27 +57037,18 @@ public struct DisassociateTransitGatewayRouteTableOutput: Swift.Equatable { } } -struct DisassociateTransitGatewayRouteTableOutputBody: Swift.Equatable { - let association: EC2ClientTypes.TransitGatewayAssociation? -} - -extension DisassociateTransitGatewayRouteTableOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - } +enum DisassociateTransitGatewayRouteTableOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAssociation.self, forKey: .association) - association = associationDecoded - } -} - -enum DisassociateTransitGatewayRouteTableOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -84909,40 +57098,16 @@ public struct DisassociateTrunkInterfaceInput: Swift.Equatable { } } -struct DisassociateTrunkInterfaceInputBody: Swift.Equatable { - let associationId: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension DisassociateTrunkInterfaceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "AssociationId" - case clientToken = "ClientToken" - case dryRun = "DryRun" - } +extension DisassociateTrunkInterfaceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension DisassociateTrunkInterfaceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateTrunkInterfaceOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - self.clientToken = output.clientToken - } else { - self.clientToken = nil - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateTrunkInterfaceOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -84963,31 +57128,18 @@ public struct DisassociateTrunkInterfaceOutput: Swift.Equatable { } } -struct DisassociateTrunkInterfaceOutputBody: Swift.Equatable { - let `return`: Swift.Bool? - let clientToken: Swift.String? -} - -extension DisassociateTrunkInterfaceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +enum DisassociateTrunkInterfaceOutputError { -enum DisassociateTrunkInterfaceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -85023,34 +57175,17 @@ public struct DisassociateVpcCidrBlockInput: Swift.Equatable { } } -struct DisassociateVpcCidrBlockInputBody: Swift.Equatable { - let associationId: Swift.String? -} - -extension DisassociateVpcCidrBlockInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - } -} +extension DisassociateVpcCidrBlockOutput { -extension DisassociateVpcCidrBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateVpcCidrBlockOutputBody = try responseDecoder.decode(responseBody: data) - self.cidrBlockAssociation = output.cidrBlockAssociation - self.ipv6CidrBlockAssociation = output.ipv6CidrBlockAssociation - self.vpcId = output.vpcId - } else { - self.cidrBlockAssociation = nil - self.ipv6CidrBlockAssociation = nil - self.vpcId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateVpcCidrBlockOutput() + value.cidrBlockAssociation = try reader["cidrBlockAssociation"].readIfPresent(readingClosure: EC2ClientTypes.VpcCidrBlockAssociation.readingClosure) + value.ipv6CidrBlockAssociation = try reader["ipv6CidrBlockAssociation"].readIfPresent(readingClosure: EC2ClientTypes.VpcIpv6CidrBlockAssociation.readingClosure) + value.vpcId = try reader["vpcId"].readIfPresent() + return value } } } @@ -85075,45 +57210,23 @@ public struct DisassociateVpcCidrBlockOutput: Swift.Equatable { } } -struct DisassociateVpcCidrBlockOutputBody: Swift.Equatable { - let ipv6CidrBlockAssociation: EC2ClientTypes.VpcIpv6CidrBlockAssociation? - let cidrBlockAssociation: EC2ClientTypes.VpcCidrBlockAssociation? - let vpcId: Swift.String? -} - -extension DisassociateVpcCidrBlockOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlockAssociation = "cidrBlockAssociation" - case ipv6CidrBlockAssociation = "ipv6CidrBlockAssociation" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6CidrBlockAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcIpv6CidrBlockAssociation.self, forKey: .ipv6CidrBlockAssociation) - ipv6CidrBlockAssociation = ipv6CidrBlockAssociationDecoded - let cidrBlockAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcCidrBlockAssociation.self, forKey: .cidrBlockAssociation) - cidrBlockAssociation = cidrBlockAssociationDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} +enum DisassociateVpcCidrBlockOutputError { -enum DisassociateVpcCidrBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.DiskImage: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case image = "Image" - case volume = "Volume" - } +extension EC2ClientTypes.DiskImage: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85128,14 +57241,15 @@ extension EC2ClientTypes.DiskImage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let imageDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageDetail.self, forKey: .image) - image = imageDecoded - let volumeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeDetail.self, forKey: .volume) - volume = volumeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DiskImage() + value.description = try reader["Description"].readIfPresent() + value.image = try reader["Image"].readIfPresent(readingClosure: EC2ClientTypes.DiskImageDetail.readingClosure) + value.volume = try reader["Volume"].readIfPresent(readingClosure: EC2ClientTypes.VolumeDetail.readingClosure) + return value + } } } @@ -85163,13 +57277,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DiskImageDescription: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksum = "checksum" - case format = "format" - case importManifestUrl = "importManifestUrl" - case size = "size" - } +extension EC2ClientTypes.DiskImageDescription: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85187,16 +57295,16 @@ extension EC2ClientTypes.DiskImageDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let checksumDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksum) - checksum = checksumDecoded - let formatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageFormat.self, forKey: .format) - format = formatDecoded - let importManifestUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importManifestUrl) - importManifestUrl = importManifestUrlDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DiskImageDescription() + value.checksum = try reader["checksum"].readIfPresent() + value.format = try reader["format"].readIfPresent() + value.importManifestUrl = try reader["importManifestUrl"].readIfPresent() + value.size = try reader["size"].readIfPresent() + return value + } } } @@ -85233,12 +57341,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DiskImageDetail: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bytes = "bytes" - case format = "format" - case importManifestUrl = "importManifestUrl" - } +extension EC2ClientTypes.DiskImageDetail: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85253,14 +57356,15 @@ extension EC2ClientTypes.DiskImageDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytes) - bytes = bytesDecoded - let formatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageFormat.self, forKey: .format) - format = formatDecoded - let importManifestUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importManifestUrl) - importManifestUrl = importManifestUrlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DiskImageDetail() + value.bytes = try reader["bytes"].readIfPresent() + value.format = try reader["format"].readIfPresent() + value.importManifestUrl = try reader["importManifestUrl"].readIfPresent() + return value + } } } @@ -85331,11 +57435,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.DiskImageVolumeDescription: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case id = "id" - case size = "size" - } +extension EC2ClientTypes.DiskImageVolumeDescription: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85347,12 +57447,14 @@ extension EC2ClientTypes.DiskImageVolumeDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DiskImageVolumeDescription() + value.id = try reader["id"].readIfPresent() + value.size = try reader["size"].readIfPresent() + return value + } } } @@ -85376,12 +57478,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DiskInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "count" - case sizeInGB = "sizeInGB" - case type = "type" - } +extension EC2ClientTypes.DiskInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85396,14 +57493,15 @@ extension EC2ClientTypes.DiskInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sizeInGBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sizeInGB) - sizeInGB = sizeInGBDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskType.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DiskInfo() + value.sizeInGB = try reader["sizeInGB"].readIfPresent() + value.count = try reader["count"].readIfPresent() + value.type = try reader["type"].readIfPresent() + return value + } } } @@ -85463,11 +57561,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.DnsEntry: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dnsName = "dnsName" - case hostedZoneId = "hostedZoneId" - } +extension EC2ClientTypes.DnsEntry: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85479,12 +57573,14 @@ extension EC2ClientTypes.DnsEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DnsEntry() + value.dnsName = try reader["dnsName"].readIfPresent() + value.hostedZoneId = try reader["hostedZoneId"].readIfPresent() + return value + } } } @@ -85543,11 +57639,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.DnsOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dnsRecordIpType = "dnsRecordIpType" - case privateDnsOnlyForInboundResolverEndpoint = "privateDnsOnlyForInboundResolverEndpoint" - } +extension EC2ClientTypes.DnsOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85559,12 +57651,14 @@ extension EC2ClientTypes.DnsOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dnsRecordIpTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsRecordIpType.self, forKey: .dnsRecordIpType) - dnsRecordIpType = dnsRecordIpTypeDecoded - let privateDnsOnlyForInboundResolverEndpointDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .privateDnsOnlyForInboundResolverEndpoint) - privateDnsOnlyForInboundResolverEndpoint = privateDnsOnlyForInboundResolverEndpointDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DnsOptions() + value.dnsRecordIpType = try reader["dnsRecordIpType"].readIfPresent() + value.privateDnsOnlyForInboundResolverEndpoint = try reader["privateDnsOnlyForInboundResolverEndpoint"].readIfPresent() + return value + } } } @@ -85588,11 +57682,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.DnsOptionsSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dnsRecordIpType = "DnsRecordIpType" - case privateDnsOnlyForInboundResolverEndpoint = "PrivateDnsOnlyForInboundResolverEndpoint" - } +extension EC2ClientTypes.DnsOptionsSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85604,12 +57694,14 @@ extension EC2ClientTypes.DnsOptionsSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dnsRecordIpTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsRecordIpType.self, forKey: .dnsRecordIpType) - dnsRecordIpType = dnsRecordIpTypeDecoded - let privateDnsOnlyForInboundResolverEndpointDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .privateDnsOnlyForInboundResolverEndpoint) - privateDnsOnlyForInboundResolverEndpoint = privateDnsOnlyForInboundResolverEndpointDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DnsOptionsSpecification() + value.dnsRecordIpType = try reader["DnsRecordIpType"].readIfPresent() + value.privateDnsOnlyForInboundResolverEndpoint = try reader["PrivateDnsOnlyForInboundResolverEndpoint"].readIfPresent() + return value + } } } @@ -85671,11 +57763,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.DnsServersOptionsModifyStructure: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customDnsServers = "CustomDnsServers" - case enabled = "Enabled" - } +extension EC2ClientTypes.DnsServersOptionsModifyStructure: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85696,29 +57784,14 @@ extension EC2ClientTypes.DnsServersOptionsModifyStructure: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.customDnsServers) { - struct KeyVal0{struct item{}} - let customDnsServersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .customDnsServers) - if let customDnsServersWrappedContainer = customDnsServersWrappedContainer { - let customDnsServersContainer = try customDnsServersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var customDnsServersBuffer:[Swift.String]? = nil - if let customDnsServersContainer = customDnsServersContainer { - customDnsServersBuffer = [Swift.String]() - for stringContainer0 in customDnsServersContainer { - customDnsServersBuffer?.append(stringContainer0) - } - } - customDnsServers = customDnsServersBuffer - } else { - customDnsServers = [] - } - } else { - customDnsServers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.DnsServersOptionsModifyStructure() + value.customDnsServers = try reader["CustomDnsServers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.enabled = try reader["Enabled"].readIfPresent() + return value } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded } } @@ -85840,18 +57913,7 @@ extension EC2ClientTypes { public enum EC2ClientTypes {} -extension EC2ClientTypes.EbsBlockDevice: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deleteOnTermination = "deleteOnTermination" - case encrypted = "encrypted" - case iops = "iops" - case kmsKeyId = "kmsKeyId" - case outpostArn = "outpostArn" - case snapshotId = "snapshotId" - case throughput = "throughput" - case volumeSize = "volumeSize" - case volumeType = "volumeType" - } +extension EC2ClientTypes.EbsBlockDevice: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -85884,26 +57946,21 @@ extension EC2ClientTypes.EbsBlockDevice: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let volumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .volumeType) - volumeType = volumeTypeDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) - throughput = throughputDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EbsBlockDevice() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.iops = try reader["iops"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.volumeSize = try reader["volumeSize"].readIfPresent() + value.volumeType = try reader["volumeType"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.throughput = try reader["throughput"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.encrypted = try reader["encrypted"].readIfPresent() + return value + } } } @@ -86014,13 +58071,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.EbsInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ebsOptimizedInfo = "ebsOptimizedInfo" - case ebsOptimizedSupport = "ebsOptimizedSupport" - case encryptionSupport = "encryptionSupport" - case nvmeSupport = "nvmeSupport" - } +extension EC2ClientTypes.EbsInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86038,16 +58089,16 @@ extension EC2ClientTypes.EbsInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ebsOptimizedSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EbsOptimizedSupport.self, forKey: .ebsOptimizedSupport) - ebsOptimizedSupport = ebsOptimizedSupportDecoded - let encryptionSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EbsEncryptionSupport.self, forKey: .encryptionSupport) - encryptionSupport = encryptionSupportDecoded - let ebsOptimizedInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EbsOptimizedInfo.self, forKey: .ebsOptimizedInfo) - ebsOptimizedInfo = ebsOptimizedInfoDecoded - let nvmeSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EbsNvmeSupport.self, forKey: .nvmeSupport) - nvmeSupport = nvmeSupportDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EbsInfo() + value.ebsOptimizedSupport = try reader["ebsOptimizedSupport"].readIfPresent() + value.encryptionSupport = try reader["encryptionSupport"].readIfPresent() + value.ebsOptimizedInfo = try reader["ebsOptimizedInfo"].readIfPresent(readingClosure: EC2ClientTypes.EbsOptimizedInfo.readingClosure) + value.nvmeSupport = try reader["nvmeSupport"].readIfPresent() + return value + } } } @@ -86079,15 +58130,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EbsInstanceBlockDevice: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedResource = "associatedResource" - case attachTime = "attachTime" - case deleteOnTermination = "deleteOnTermination" - case status = "status" - case volumeId = "volumeId" - case volumeOwnerId = "volumeOwnerId" - } +extension EC2ClientTypes.EbsInstanceBlockDevice: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86111,20 +58154,18 @@ extension EC2ClientTypes.EbsInstanceBlockDevice: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .attachTime) - attachTime = attachTimeDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttachmentStatus.self, forKey: .status) - status = statusDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) - associatedResource = associatedResourceDecoded - let volumeOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeOwnerId) - volumeOwnerId = volumeOwnerIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EbsInstanceBlockDevice() + value.attachTime = try reader["attachTime"].readTimestampIfPresent(format: .dateTime) + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + value.associatedResource = try reader["associatedResource"].readIfPresent() + value.volumeOwnerId = try reader["volumeOwnerId"].readIfPresent() + return value + } } } @@ -86164,11 +58205,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EbsInstanceBlockDeviceSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deleteOnTermination = "deleteOnTermination" - case volumeId = "volumeId" - } +extension EC2ClientTypes.EbsInstanceBlockDeviceSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86180,12 +58217,14 @@ extension EC2ClientTypes.EbsInstanceBlockDeviceSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EbsInstanceBlockDeviceSpecification() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + return value + } } } @@ -86244,15 +58283,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.EbsOptimizedInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case baselineBandwidthInMbps = "baselineBandwidthInMbps" - case baselineIops = "baselineIops" - case baselineThroughputInMBps = "baselineThroughputInMBps" - case maximumBandwidthInMbps = "maximumBandwidthInMbps" - case maximumIops = "maximumIops" - case maximumThroughputInMBps = "maximumThroughputInMBps" - } +extension EC2ClientTypes.EbsOptimizedInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86276,20 +58307,18 @@ extension EC2ClientTypes.EbsOptimizedInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let baselineBandwidthInMbpsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .baselineBandwidthInMbps) - baselineBandwidthInMbps = baselineBandwidthInMbpsDecoded - let baselineThroughputInMBpsDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .baselineThroughputInMBps) - baselineThroughputInMBps = baselineThroughputInMBpsDecoded - let baselineIopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .baselineIops) - baselineIops = baselineIopsDecoded - let maximumBandwidthInMbpsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumBandwidthInMbps) - maximumBandwidthInMbps = maximumBandwidthInMbpsDecoded - let maximumThroughputInMBpsDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maximumThroughputInMBps) - maximumThroughputInMBps = maximumThroughputInMBpsDecoded - let maximumIopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumIops) - maximumIops = maximumIopsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EbsOptimizedInfo() + value.baselineBandwidthInMbps = try reader["baselineBandwidthInMbps"].readIfPresent() + value.baselineThroughputInMBps = try reader["baselineThroughputInMBps"].readIfPresent() + value.baselineIops = try reader["baselineIops"].readIfPresent() + value.maximumBandwidthInMbps = try reader["maximumBandwidthInMbps"].readIfPresent() + value.maximumThroughputInMBps = try reader["maximumThroughputInMBps"].readIfPresent() + value.maximumIops = try reader["maximumIops"].readIfPresent() + return value + } } } @@ -86364,24 +58393,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Ec2InstanceConnectEndpoint: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case createdAt = "createdAt" - case dnsName = "dnsName" - case fipsDnsName = "fipsDnsName" - case instanceConnectEndpointArn = "instanceConnectEndpointArn" - case instanceConnectEndpointId = "instanceConnectEndpointId" - case networkInterfaceIds = "networkInterfaceIdSet" - case ownerId = "ownerId" - case preserveClientIp = "preserveClientIp" - case securityGroupIds = "securityGroupIdSet" - case state = "state" - case stateMessage = "stateMessage" - case subnetId = "subnetId" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.Ec2InstanceConnectEndpoint: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86459,88 +58471,26 @@ extension EC2ClientTypes.Ec2InstanceConnectEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let instanceConnectEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceConnectEndpointId) - instanceConnectEndpointId = instanceConnectEndpointIdDecoded - let instanceConnectEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceConnectEndpointArn) - instanceConnectEndpointArn = instanceConnectEndpointArnDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ec2InstanceConnectEndpointState.self, forKey: .state) - state = stateDecoded - let stateMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateMessage) - stateMessage = stateMessageDecoded - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - let fipsDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fipsDnsName) - fipsDnsName = fipsDnsNameDecoded - if containerValues.contains(.networkInterfaceIds) { - struct KeyVal0{struct item{}} - let networkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaceIds) - if let networkInterfaceIdsWrappedContainer = networkInterfaceIdsWrappedContainer { - let networkInterfaceIdsContainer = try networkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInterfaceIdsBuffer:[Swift.String]? = nil - if let networkInterfaceIdsContainer = networkInterfaceIdsContainer { - networkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in networkInterfaceIdsContainer { - networkInterfaceIdsBuffer?.append(stringContainer0) - } - } - networkInterfaceIds = networkInterfaceIdsBuffer - } else { - networkInterfaceIds = [] - } - } else { - networkInterfaceIds = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let preserveClientIpDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .preserveClientIp) - preserveClientIp = preserveClientIpDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ec2InstanceConnectEndpoint() + value.ownerId = try reader["ownerId"].readIfPresent() + value.instanceConnectEndpointId = try reader["instanceConnectEndpointId"].readIfPresent() + value.instanceConnectEndpointArn = try reader["instanceConnectEndpointArn"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.stateMessage = try reader["stateMessage"].readIfPresent() + value.dnsName = try reader["dnsName"].readIfPresent() + value.fipsDnsName = try reader["fipsDnsName"].readIfPresent() + value.networkInterfaceIds = try reader["networkInterfaceIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.createdAt = try reader["createdAt"].readTimestampIfPresent(format: .dateTime) + value.subnetId = try reader["subnetId"].readIfPresent() + value.preserveClientIp = try reader["preserveClientIp"].readIfPresent() + value.securityGroupIds = try reader["securityGroupIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -86668,10 +58618,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.EfaInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maximumEfaInterfaces = "maximumEfaInterfaces" - } +extension EC2ClientTypes.EfaInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86680,10 +58627,13 @@ extension EC2ClientTypes.EfaInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maximumEfaInterfacesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumEfaInterfaces) - maximumEfaInterfaces = maximumEfaInterfacesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EfaInfo() + value.maximumEfaInterfaces = try reader["maximumEfaInterfaces"].readIfPresent() + return value + } } } @@ -86703,12 +58653,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EgressOnlyInternetGateway: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachments = "attachmentSet" - case egressOnlyInternetGatewayId = "egressOnlyInternetGatewayId" - case tags = "tagSet" - } +extension EC2ClientTypes.EgressOnlyInternetGateway: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86741,47 +58686,14 @@ extension EC2ClientTypes.EgressOnlyInternetGateway: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.attachments) { - struct KeyVal0{struct item{}} - let attachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachments) - if let attachmentsWrappedContainer = attachmentsWrappedContainer { - let attachmentsContainer = try attachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.InternetGatewayAttachment].self, forKey: .member) - var attachmentsBuffer:[EC2ClientTypes.InternetGatewayAttachment]? = nil - if let attachmentsContainer = attachmentsContainer { - attachmentsBuffer = [EC2ClientTypes.InternetGatewayAttachment]() - for structureContainer0 in attachmentsContainer { - attachmentsBuffer?.append(structureContainer0) - } - } - attachments = attachmentsBuffer - } else { - attachments = [] - } - } else { - attachments = nil - } - let egressOnlyInternetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .egressOnlyInternetGatewayId) - egressOnlyInternetGatewayId = egressOnlyInternetGatewayIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EgressOnlyInternetGateway() + value.attachments = try reader["attachmentSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InternetGatewayAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.egressOnlyInternetGatewayId = try reader["egressOnlyInternetGatewayId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -86810,13 +58722,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ElasticGpuAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case elasticGpuAssociationId = "elasticGpuAssociationId" - case elasticGpuAssociationState = "elasticGpuAssociationState" - case elasticGpuAssociationTime = "elasticGpuAssociationTime" - case elasticGpuId = "elasticGpuId" - } +extension EC2ClientTypes.ElasticGpuAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86834,16 +58740,16 @@ extension EC2ClientTypes.ElasticGpuAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let elasticGpuIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticGpuId) - elasticGpuId = elasticGpuIdDecoded - let elasticGpuAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticGpuAssociationId) - elasticGpuAssociationId = elasticGpuAssociationIdDecoded - let elasticGpuAssociationStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticGpuAssociationState) - elasticGpuAssociationState = elasticGpuAssociationStateDecoded - let elasticGpuAssociationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticGpuAssociationTime) - elasticGpuAssociationTime = elasticGpuAssociationTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ElasticGpuAssociation() + value.elasticGpuId = try reader["elasticGpuId"].readIfPresent() + value.elasticGpuAssociationId = try reader["elasticGpuAssociationId"].readIfPresent() + value.elasticGpuAssociationState = try reader["elasticGpuAssociationState"].readIfPresent() + value.elasticGpuAssociationTime = try reader["elasticGpuAssociationTime"].readIfPresent() + return value + } } } @@ -86875,10 +58781,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ElasticGpuHealth: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "status" - } +extension EC2ClientTypes.ElasticGpuHealth: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86887,10 +58790,13 @@ extension EC2ClientTypes.ElasticGpuHealth: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ElasticGpuStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ElasticGpuHealth() + value.status = try reader["status"].readIfPresent() + return value + } } } @@ -86910,10 +58816,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ElasticGpuSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case type = "Type" - } +extension EC2ClientTypes.ElasticGpuSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86922,10 +58825,13 @@ extension EC2ClientTypes.ElasticGpuSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ElasticGpuSpecification() + value.type = try reader["Type"].readIfPresent() + return value + } } } @@ -86946,10 +58852,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ElasticGpuSpecificationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case type = "type" - } +extension EC2ClientTypes.ElasticGpuSpecificationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -86958,10 +58861,13 @@ extension EC2ClientTypes.ElasticGpuSpecificationResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ElasticGpuSpecificationResponse() + value.type = try reader["type"].readIfPresent() + return value + } } } @@ -87042,16 +58948,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ElasticGpus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case elasticGpuHealth = "elasticGpuHealth" - case elasticGpuId = "elasticGpuId" - case elasticGpuState = "elasticGpuState" - case elasticGpuType = "elasticGpuType" - case instanceId = "instanceId" - case tags = "tagSet" - } +extension EC2ClientTypes.ElasticGpus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -87087,38 +58984,18 @@ extension EC2ClientTypes.ElasticGpus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let elasticGpuIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticGpuId) - elasticGpuId = elasticGpuIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let elasticGpuTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticGpuType) - elasticGpuType = elasticGpuTypeDecoded - let elasticGpuHealthDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ElasticGpuHealth.self, forKey: .elasticGpuHealth) - elasticGpuHealth = elasticGpuHealthDecoded - let elasticGpuStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ElasticGpuState.self, forKey: .elasticGpuState) - elasticGpuState = elasticGpuStateDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ElasticGpus() + value.elasticGpuId = try reader["elasticGpuId"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.elasticGpuType = try reader["elasticGpuType"].readIfPresent() + value.elasticGpuHealth = try reader["elasticGpuHealth"].readIfPresent(readingClosure: EC2ClientTypes.ElasticGpuHealth.readingClosure) + value.elasticGpuState = try reader["elasticGpuState"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -87163,11 +59040,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ElasticInferenceAccelerator: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "Count" - case type = "Type" - } +extension EC2ClientTypes.ElasticInferenceAccelerator: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -87179,12 +59052,14 @@ extension EC2ClientTypes.ElasticInferenceAccelerator: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ElasticInferenceAccelerator() + value.type = try reader["Type"].readIfPresent() + value.count = try reader["Count"].readIfPresent() + return value + } } } @@ -87209,13 +59084,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ElasticInferenceAcceleratorAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case elasticInferenceAcceleratorArn = "elasticInferenceAcceleratorArn" - case elasticInferenceAcceleratorAssociationId = "elasticInferenceAcceleratorAssociationId" - case elasticInferenceAcceleratorAssociationState = "elasticInferenceAcceleratorAssociationState" - case elasticInferenceAcceleratorAssociationTime = "elasticInferenceAcceleratorAssociationTime" - } +extension EC2ClientTypes.ElasticInferenceAcceleratorAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -87233,16 +59102,16 @@ extension EC2ClientTypes.ElasticInferenceAcceleratorAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let elasticInferenceAcceleratorArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticInferenceAcceleratorArn) - elasticInferenceAcceleratorArn = elasticInferenceAcceleratorArnDecoded - let elasticInferenceAcceleratorAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticInferenceAcceleratorAssociationId) - elasticInferenceAcceleratorAssociationId = elasticInferenceAcceleratorAssociationIdDecoded - let elasticInferenceAcceleratorAssociationStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticInferenceAcceleratorAssociationState) - elasticInferenceAcceleratorAssociationState = elasticInferenceAcceleratorAssociationStateDecoded - let elasticInferenceAcceleratorAssociationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .elasticInferenceAcceleratorAssociationTime) - elasticInferenceAcceleratorAssociationTime = elasticInferenceAcceleratorAssociationTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ElasticInferenceAcceleratorAssociation() + value.elasticInferenceAcceleratorArn = try reader["elasticInferenceAcceleratorArn"].readIfPresent() + value.elasticInferenceAcceleratorAssociationId = try reader["elasticInferenceAcceleratorAssociationId"].readIfPresent() + value.elasticInferenceAcceleratorAssociationState = try reader["elasticInferenceAcceleratorAssociationState"].readIfPresent() + value.elasticInferenceAcceleratorAssociationTime = try reader["elasticInferenceAcceleratorAssociationTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -87274,11 +59143,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EnaSrdSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdEnabled = "EnaSrdEnabled" - case enaSrdUdpSpecification = "EnaSrdUdpSpecification" - } +extension EC2ClientTypes.EnaSrdSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -87290,12 +59155,14 @@ extension EC2ClientTypes.EnaSrdSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdEnabled) - enaSrdEnabled = enaSrdEnabledDecoded - let enaSrdUdpSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnaSrdUdpSpecification.self, forKey: .enaSrdUdpSpecification) - enaSrdUdpSpecification = enaSrdUdpSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnaSrdSpecification() + value.enaSrdEnabled = try reader["EnaSrdEnabled"].readIfPresent() + value.enaSrdUdpSpecification = try reader["EnaSrdUdpSpecification"].readIfPresent(readingClosure: EC2ClientTypes.EnaSrdUdpSpecification.readingClosure) + return value + } } } @@ -87319,11 +59186,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EnaSrdSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdEnabled = "EnaSrdEnabled" - case enaSrdUdpSpecification = "EnaSrdUdpSpecification" - } +extension EC2ClientTypes.EnaSrdSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -87335,12 +59198,14 @@ extension EC2ClientTypes.EnaSrdSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdEnabled) - enaSrdEnabled = enaSrdEnabledDecoded - let enaSrdUdpSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnaSrdUdpSpecificationRequest.self, forKey: .enaSrdUdpSpecification) - enaSrdUdpSpecification = enaSrdUdpSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnaSrdSpecificationRequest() + value.enaSrdEnabled = try reader["EnaSrdEnabled"].readIfPresent() + value.enaSrdUdpSpecification = try reader["EnaSrdUdpSpecification"].readIfPresent(readingClosure: EC2ClientTypes.EnaSrdUdpSpecificationRequest.readingClosure) + return value + } } } @@ -87364,10 +59229,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EnaSrdUdpSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdUdpEnabled = "EnaSrdUdpEnabled" - } +extension EC2ClientTypes.EnaSrdUdpSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -87376,10 +59238,13 @@ extension EC2ClientTypes.EnaSrdUdpSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdUdpEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdUdpEnabled) - enaSrdUdpEnabled = enaSrdUdpEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnaSrdUdpSpecification() + value.enaSrdUdpEnabled = try reader["EnaSrdUdpEnabled"].readIfPresent() + return value + } } } @@ -87399,10 +59264,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EnaSrdUdpSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdUdpEnabled = "EnaSrdUdpEnabled" - } +extension EC2ClientTypes.EnaSrdUdpSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -87411,10 +59273,13 @@ extension EC2ClientTypes.EnaSrdUdpSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdUdpEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdUdpEnabled) - enaSrdUdpEnabled = enaSrdUdpEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnaSrdUdpSpecificationRequest() + value.enaSrdUdpEnabled = try reader["EnaSrdUdpEnabled"].readIfPresent() + return value + } } } @@ -87515,38 +59380,15 @@ public struct EnableAddressTransferInput: Swift.Equatable { } } -struct EnableAddressTransferInputBody: Swift.Equatable { - let allocationId: Swift.String? - let transferAccountId: Swift.String? - let dryRun: Swift.Bool? -} - -extension EnableAddressTransferInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "AllocationId" - case dryRun = "DryRun" - case transferAccountId = "TransferAccountId" - } +extension EnableAddressTransferOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let transferAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transferAccountId) - transferAccountId = transferAccountIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EnableAddressTransferOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableAddressTransferOutputBody = try responseDecoder.decode(responseBody: data) - self.addressTransfer = output.addressTransfer - } else { - self.addressTransfer = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableAddressTransferOutput() + value.addressTransfer = try reader["addressTransfer"].readIfPresent(readingClosure: EC2ClientTypes.AddressTransfer.readingClosure) + return value } } } @@ -87563,27 +59405,18 @@ public struct EnableAddressTransferOutput: Swift.Equatable { } } -struct EnableAddressTransferOutputBody: Swift.Equatable { - let addressTransfer: EC2ClientTypes.AddressTransfer? -} - -extension EnableAddressTransferOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressTransfer = "addressTransfer" - } +enum EnableAddressTransferOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressTransferDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressTransfer.self, forKey: .addressTransfer) - addressTransfer = addressTransferDecoded - } -} - -enum EnableAddressTransferOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -87646,46 +59479,15 @@ public struct EnableAwsNetworkPerformanceMetricSubscriptionInput: Swift.Equatabl } } -struct EnableAwsNetworkPerformanceMetricSubscriptionInputBody: Swift.Equatable { - let source: Swift.String? - let destination: Swift.String? - let metric: EC2ClientTypes.MetricType? - let statistic: EC2ClientTypes.StatisticType? - let dryRun: Swift.Bool? -} - -extension EnableAwsNetworkPerformanceMetricSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "Destination" - case dryRun = "DryRun" - case metric = "Metric" - case source = "Source" - case statistic = "Statistic" - } +extension EnableAwsNetworkPerformanceMetricSubscriptionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) - destination = destinationDecoded - let metricDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MetricType.self, forKey: .metric) - metric = metricDecoded - let statisticDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StatisticType.self, forKey: .statistic) - statistic = statisticDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EnableAwsNetworkPerformanceMetricSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableAwsNetworkPerformanceMetricSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.output = output.output - } else { - self.output = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableAwsNetworkPerformanceMetricSubscriptionOutput() + value.output = try reader["output"].readIfPresent() + return value } } } @@ -87702,27 +59504,18 @@ public struct EnableAwsNetworkPerformanceMetricSubscriptionOutput: Swift.Equatab } } -struct EnableAwsNetworkPerformanceMetricSubscriptionOutputBody: Swift.Equatable { - let output: Swift.Bool? -} - -extension EnableAwsNetworkPerformanceMetricSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case output = "output" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let outputDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .output) - output = outputDecoded - } -} +enum EnableAwsNetworkPerformanceMetricSubscriptionOutputError { -enum EnableAwsNetworkPerformanceMetricSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -87757,30 +59550,15 @@ public struct EnableEbsEncryptionByDefaultInput: Swift.Equatable { } } -struct EnableEbsEncryptionByDefaultInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension EnableEbsEncryptionByDefaultInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension EnableEbsEncryptionByDefaultOutput { -extension EnableEbsEncryptionByDefaultOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableEbsEncryptionByDefaultOutputBody = try responseDecoder.decode(responseBody: data) - self.ebsEncryptionByDefault = output.ebsEncryptionByDefault - } else { - self.ebsEncryptionByDefault = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableEbsEncryptionByDefaultOutput() + value.ebsEncryptionByDefault = try reader["ebsEncryptionByDefault"].readIfPresent() + return value } } } @@ -87797,27 +59575,18 @@ public struct EnableEbsEncryptionByDefaultOutput: Swift.Equatable { } } -struct EnableEbsEncryptionByDefaultOutputBody: Swift.Equatable { - let ebsEncryptionByDefault: Swift.Bool? -} - -extension EnableEbsEncryptionByDefaultOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ebsEncryptionByDefault = "ebsEncryptionByDefault" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ebsEncryptionByDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsEncryptionByDefault) - ebsEncryptionByDefault = ebsEncryptionByDefaultDecoded - } -} +enum EnableEbsEncryptionByDefaultOutputError { -enum EnableEbsEncryptionByDefaultOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -87888,66 +59657,23 @@ public struct EnableFastLaunchInput: Swift.Equatable { } } -struct EnableFastLaunchInputBody: Swift.Equatable { - let imageId: Swift.String? - let resourceType: Swift.String? - let snapshotConfiguration: EC2ClientTypes.FastLaunchSnapshotConfigurationRequest? - let launchTemplate: EC2ClientTypes.FastLaunchLaunchTemplateSpecificationRequest? - let maxParallelLaunches: Swift.Int? - let dryRun: Swift.Bool? -} - -extension EnableFastLaunchInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case imageId = "ImageId" - case launchTemplate = "LaunchTemplate" - case maxParallelLaunches = "MaxParallelLaunches" - case resourceType = "ResourceType" - case snapshotConfiguration = "SnapshotConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let snapshotConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchSnapshotConfigurationRequest.self, forKey: .snapshotConfiguration) - snapshotConfiguration = snapshotConfigurationDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchLaunchTemplateSpecificationRequest.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let maxParallelLaunchesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxParallelLaunches) - maxParallelLaunches = maxParallelLaunchesDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EnableFastLaunchOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableFastLaunchOutputBody = try responseDecoder.decode(responseBody: data) - self.imageId = output.imageId - self.launchTemplate = output.launchTemplate - self.maxParallelLaunches = output.maxParallelLaunches - self.ownerId = output.ownerId - self.resourceType = output.resourceType - self.snapshotConfiguration = output.snapshotConfiguration - self.state = output.state - self.stateTransitionReason = output.stateTransitionReason - self.stateTransitionTime = output.stateTransitionTime - } else { - self.imageId = nil - self.launchTemplate = nil - self.maxParallelLaunches = nil - self.ownerId = nil - self.resourceType = nil - self.snapshotConfiguration = nil - self.state = nil - self.stateTransitionReason = nil - self.stateTransitionTime = nil +extension EnableFastLaunchOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableFastLaunchOutput() + value.imageId = try reader["imageId"].readIfPresent() + value.launchTemplate = try reader["launchTemplate"].readIfPresent(readingClosure: EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse.readingClosure) + value.maxParallelLaunches = try reader["maxParallelLaunches"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.snapshotConfiguration = try reader["snapshotConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.FastLaunchSnapshotConfigurationResponse.readingClosure) + value.state = try reader["state"].readIfPresent() + value.stateTransitionReason = try reader["stateTransitionReason"].readIfPresent() + value.stateTransitionTime = try reader["stateTransitionTime"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -87996,68 +59722,23 @@ public struct EnableFastLaunchOutput: Swift.Equatable { } } -struct EnableFastLaunchOutputBody: Swift.Equatable { - let imageId: Swift.String? - let resourceType: EC2ClientTypes.FastLaunchResourceType? - let snapshotConfiguration: EC2ClientTypes.FastLaunchSnapshotConfigurationResponse? - let launchTemplate: EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse? - let maxParallelLaunches: Swift.Int? - let ownerId: Swift.String? - let state: EC2ClientTypes.FastLaunchStateCode? - let stateTransitionReason: Swift.String? - let stateTransitionTime: ClientRuntime.Date? -} +enum EnableFastLaunchOutputError { -extension EnableFastLaunchOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageId = "imageId" - case launchTemplate = "launchTemplate" - case maxParallelLaunches = "maxParallelLaunches" - case ownerId = "ownerId" - case resourceType = "resourceType" - case snapshotConfiguration = "snapshotConfiguration" - case state = "state" - case stateTransitionReason = "stateTransitionReason" - case stateTransitionTime = "stateTransitionTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let snapshotConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchSnapshotConfigurationResponse.self, forKey: .snapshotConfiguration) - snapshotConfiguration = snapshotConfigurationDecoded - let launchTemplateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let maxParallelLaunchesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxParallelLaunches) - maxParallelLaunches = maxParallelLaunchesDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastLaunchStateCode.self, forKey: .state) - state = stateDecoded - let stateTransitionReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateTransitionReason) - stateTransitionReason = stateTransitionReasonDecoded - let stateTransitionTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .stateTransitionTime) - stateTransitionTime = stateTransitionTimeDecoded - } -} - -enum EnableFastLaunchOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.EnableFastSnapshotRestoreErrorItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fastSnapshotRestoreStateErrors = "fastSnapshotRestoreStateErrorSet" - case snapshotId = "snapshotId" - } +extension EC2ClientTypes.EnableFastSnapshotRestoreErrorItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -88078,28 +59759,13 @@ extension EC2ClientTypes.EnableFastSnapshotRestoreErrorItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - if containerValues.contains(.fastSnapshotRestoreStateErrors) { - struct KeyVal0{struct item{}} - let fastSnapshotRestoreStateErrorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fastSnapshotRestoreStateErrors) - if let fastSnapshotRestoreStateErrorsWrappedContainer = fastSnapshotRestoreStateErrorsWrappedContainer { - let fastSnapshotRestoreStateErrorsContainer = try fastSnapshotRestoreStateErrorsWrappedContainer.decodeIfPresent([EC2ClientTypes.EnableFastSnapshotRestoreStateErrorItem].self, forKey: .member) - var fastSnapshotRestoreStateErrorsBuffer:[EC2ClientTypes.EnableFastSnapshotRestoreStateErrorItem]? = nil - if let fastSnapshotRestoreStateErrorsContainer = fastSnapshotRestoreStateErrorsContainer { - fastSnapshotRestoreStateErrorsBuffer = [EC2ClientTypes.EnableFastSnapshotRestoreStateErrorItem]() - for structureContainer0 in fastSnapshotRestoreStateErrorsContainer { - fastSnapshotRestoreStateErrorsBuffer?.append(structureContainer0) - } - } - fastSnapshotRestoreStateErrors = fastSnapshotRestoreStateErrorsBuffer - } else { - fastSnapshotRestoreStateErrors = [] - } - } else { - fastSnapshotRestoreStateErrors = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnableFastSnapshotRestoreErrorItem() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.fastSnapshotRestoreStateErrors = try reader["fastSnapshotRestoreStateErrorSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.EnableFastSnapshotRestoreStateErrorItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -88124,11 +59790,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EnableFastSnapshotRestoreStateError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.EnableFastSnapshotRestoreStateError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -88140,12 +59802,14 @@ extension EC2ClientTypes.EnableFastSnapshotRestoreStateError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnableFastSnapshotRestoreStateError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -88169,11 +59833,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EnableFastSnapshotRestoreStateErrorItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case error = "error" - } +extension EC2ClientTypes.EnableFastSnapshotRestoreStateErrorItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -88185,12 +59845,14 @@ extension EC2ClientTypes.EnableFastSnapshotRestoreStateErrorItem: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let errorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnableFastSnapshotRestoreStateError.self, forKey: .error) - error = errorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnableFastSnapshotRestoreStateErrorItem() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.error = try reader["error"].readIfPresent(readingClosure: EC2ClientTypes.EnableFastSnapshotRestoreStateError.readingClosure) + return value + } } } @@ -88214,20 +59876,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case disabledTime = "disabledTime" - case disablingTime = "disablingTime" - case enabledTime = "enabledTime" - case enablingTime = "enablingTime" - case optimizingTime = "optimizingTime" - case ownerAlias = "ownerAlias" - case ownerId = "ownerId" - case snapshotId = "snapshotId" - case state = "state" - case stateTransitionReason = "stateTransitionReason" - } +extension EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -88266,30 +59915,23 @@ extension EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FastSnapshotRestoreStateCode.self, forKey: .state) - state = stateDecoded - let stateTransitionReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateTransitionReason) - stateTransitionReason = stateTransitionReasonDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ownerAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAlias) - ownerAlias = ownerAliasDecoded - let enablingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enablingTime) - enablingTime = enablingTimeDecoded - let optimizingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .optimizingTime) - optimizingTime = optimizingTimeDecoded - let enabledTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enabledTime) - enabledTime = enabledTimeDecoded - let disablingTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .disablingTime) - disablingTime = disablingTimeDecoded - let disabledTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .disabledTime) - disabledTime = disabledTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.stateTransitionReason = try reader["stateTransitionReason"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.ownerAlias = try reader["ownerAlias"].readIfPresent() + value.enablingTime = try reader["enablingTime"].readTimestampIfPresent(format: .dateTime) + value.optimizingTime = try reader["optimizingTime"].readTimestampIfPresent(format: .dateTime) + value.enabledTime = try reader["enabledTime"].readTimestampIfPresent(format: .dateTime) + value.disablingTime = try reader["disablingTime"].readTimestampIfPresent(format: .dateTime) + value.disabledTime = try reader["disabledTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -88417,74 +60059,16 @@ public struct EnableFastSnapshotRestoresInput: Swift.Equatable { } } -struct EnableFastSnapshotRestoresInputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let sourceSnapshotIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension EnableFastSnapshotRestoresInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZone" - case dryRun = "DryRun" - case sourceSnapshotIds = "SourceSnapshotId" - } +extension EnableFastSnapshotRestoresOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - if containerValues.contains(.sourceSnapshotIds) { - struct KeyVal0{struct SnapshotId{}} - let sourceSnapshotIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceSnapshotIds) - if let sourceSnapshotIdsWrappedContainer = sourceSnapshotIdsWrappedContainer { - let sourceSnapshotIdsContainer = try sourceSnapshotIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceSnapshotIdsBuffer:[Swift.String]? = nil - if let sourceSnapshotIdsContainer = sourceSnapshotIdsContainer { - sourceSnapshotIdsBuffer = [Swift.String]() - for stringContainer0 in sourceSnapshotIdsContainer { - sourceSnapshotIdsBuffer?.append(stringContainer0) - } - } - sourceSnapshotIds = sourceSnapshotIdsBuffer - } else { - sourceSnapshotIds = [] - } - } else { - sourceSnapshotIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EnableFastSnapshotRestoresOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableFastSnapshotRestoresOutputBody = try responseDecoder.decode(responseBody: data) - self.successful = output.successful - self.unsuccessful = output.unsuccessful - } else { - self.successful = nil - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableFastSnapshotRestoresOutput() + value.successful = try reader["successful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.EnableFastSnapshotRestoreErrorItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -88505,65 +60089,18 @@ public struct EnableFastSnapshotRestoresOutput: Swift.Equatable { } } -struct EnableFastSnapshotRestoresOutputBody: Swift.Equatable { - let successful: [EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem]? - let unsuccessful: [EC2ClientTypes.EnableFastSnapshotRestoreErrorItem]? -} - -extension EnableFastSnapshotRestoresOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case successful = "successful" - case unsuccessful = "unsuccessful" - } +enum EnableFastSnapshotRestoresOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successful) { - struct KeyVal0{struct item{}} - let successfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successful) - if let successfulWrappedContainer = successfulWrappedContainer { - let successfulContainer = try successfulWrappedContainer.decodeIfPresent([EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem].self, forKey: .member) - var successfulBuffer:[EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem]? = nil - if let successfulContainer = successfulContainer { - successfulBuffer = [EC2ClientTypes.EnableFastSnapshotRestoreSuccessItem]() - for structureContainer0 in successfulContainer { - successfulBuffer?.append(structureContainer0) - } - } - successful = successfulBuffer - } else { - successful = [] - } - } else { - successful = nil - } - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.EnableFastSnapshotRestoreErrorItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.EnableFastSnapshotRestoreErrorItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.EnableFastSnapshotRestoreErrorItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum EnableFastSnapshotRestoresOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -88606,34 +60143,15 @@ public struct EnableImageBlockPublicAccessInput: Swift.Equatable { } } -struct EnableImageBlockPublicAccessInputBody: Swift.Equatable { - let imageBlockPublicAccessState: EC2ClientTypes.ImageBlockPublicAccessEnabledState? - let dryRun: Swift.Bool? -} - -extension EnableImageBlockPublicAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case imageBlockPublicAccessState = "ImageBlockPublicAccessState" - } +extension EnableImageBlockPublicAccessOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageBlockPublicAccessStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImageBlockPublicAccessEnabledState.self, forKey: .imageBlockPublicAccessState) - imageBlockPublicAccessState = imageBlockPublicAccessStateDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EnableImageBlockPublicAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableImageBlockPublicAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.imageBlockPublicAccessState = output.imageBlockPublicAccessState - } else { - self.imageBlockPublicAccessState = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableImageBlockPublicAccessOutput() + value.imageBlockPublicAccessState = try reader["imageBlockPublicAccessState"].readIfPresent() + return value } } } @@ -88650,27 +60168,18 @@ public struct EnableImageBlockPublicAccessOutput: Swift.Equatable { } } -struct EnableImageBlockPublicAccessOutputBody: Swift.Equatable { - let imageBlockPublicAccessState: EC2ClientTypes.ImageBlockPublicAccessEnabledState? -} - -extension EnableImageBlockPublicAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageBlockPublicAccessState = "imageBlockPublicAccessState" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageBlockPublicAccessStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImageBlockPublicAccessEnabledState.self, forKey: .imageBlockPublicAccessState) - imageBlockPublicAccessState = imageBlockPublicAccessStateDecoded - } -} +enum EnableImageBlockPublicAccessOutputError { -enum EnableImageBlockPublicAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -88721,38 +60230,15 @@ public struct EnableImageDeprecationInput: Swift.Equatable { } } -struct EnableImageDeprecationInputBody: Swift.Equatable { - let imageId: Swift.String? - let deprecateAt: ClientRuntime.Date? - let dryRun: Swift.Bool? -} - -extension EnableImageDeprecationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deprecateAt = "DeprecateAt" - case dryRun = "DryRun" - case imageId = "ImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let deprecateAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deprecateAt) - deprecateAt = deprecateAtDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension EnableImageDeprecationOutput { -extension EnableImageDeprecationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableImageDeprecationOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableImageDeprecationOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -88769,27 +60255,18 @@ public struct EnableImageDeprecationOutput: Swift.Equatable { } } -struct EnableImageDeprecationOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} +enum EnableImageDeprecationOutputError { -extension EnableImageDeprecationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum EnableImageDeprecationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -88832,34 +60309,15 @@ public struct EnableImageInput: Swift.Equatable { } } -struct EnableImageInputBody: Swift.Equatable { - let imageId: Swift.String? - let dryRun: Swift.Bool? -} - -extension EnableImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case imageId = "ImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension EnableImageOutput { -extension EnableImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableImageOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableImageOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -88876,27 +60334,18 @@ public struct EnableImageOutput: Swift.Equatable { } } -struct EnableImageOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension EnableImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum EnableImageOutputError { -enum EnableImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -88939,34 +60388,15 @@ public struct EnableIpamOrganizationAdminAccountInput: Swift.Equatable { } } -struct EnableIpamOrganizationAdminAccountInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let delegatedAdminAccountId: Swift.String? -} - -extension EnableIpamOrganizationAdminAccountInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delegatedAdminAccountId = "DelegatedAdminAccountId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let delegatedAdminAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .delegatedAdminAccountId) - delegatedAdminAccountId = delegatedAdminAccountIdDecoded - } -} +extension EnableIpamOrganizationAdminAccountOutput { -extension EnableIpamOrganizationAdminAccountOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableIpamOrganizationAdminAccountOutputBody = try responseDecoder.decode(responseBody: data) - self.success = output.success - } else { - self.success = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableIpamOrganizationAdminAccountOutput() + value.success = try reader["success"].readIfPresent() + return value } } } @@ -88983,27 +60413,18 @@ public struct EnableIpamOrganizationAdminAccountOutput: Swift.Equatable { } } -struct EnableIpamOrganizationAdminAccountOutputBody: Swift.Equatable { - let success: Swift.Bool? -} - -extension EnableIpamOrganizationAdminAccountOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case success = "success" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let successDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .success) - success = successDecoded - } -} +enum EnableIpamOrganizationAdminAccountOutputError { -enum EnableIpamOrganizationAdminAccountOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -89038,30 +60459,15 @@ public struct EnableReachabilityAnalyzerOrganizationSharingInput: Swift.Equatabl } } -struct EnableReachabilityAnalyzerOrganizationSharingInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension EnableReachabilityAnalyzerOrganizationSharingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } +extension EnableReachabilityAnalyzerOrganizationSharingOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EnableReachabilityAnalyzerOrganizationSharingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableReachabilityAnalyzerOrganizationSharingOutputBody = try responseDecoder.decode(responseBody: data) - self.returnValue = output.returnValue - } else { - self.returnValue = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableReachabilityAnalyzerOrganizationSharingOutput() + value.returnValue = try reader["returnValue"].readIfPresent() + return value } } } @@ -89078,27 +60484,18 @@ public struct EnableReachabilityAnalyzerOrganizationSharingOutput: Swift.Equatab } } -struct EnableReachabilityAnalyzerOrganizationSharingOutputBody: Swift.Equatable { - let returnValue: Swift.Bool? -} - -extension EnableReachabilityAnalyzerOrganizationSharingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case returnValue = "returnValue" - } +enum EnableReachabilityAnalyzerOrganizationSharingOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnValueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnValue) - returnValue = returnValueDecoded - } -} - -enum EnableReachabilityAnalyzerOrganizationSharingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -89133,30 +60530,15 @@ public struct EnableSerialConsoleAccessInput: Swift.Equatable { } } -struct EnableSerialConsoleAccessInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension EnableSerialConsoleAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } +extension EnableSerialConsoleAccessOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EnableSerialConsoleAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableSerialConsoleAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.serialConsoleAccessEnabled = output.serialConsoleAccessEnabled - } else { - self.serialConsoleAccessEnabled = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableSerialConsoleAccessOutput() + value.serialConsoleAccessEnabled = try reader["serialConsoleAccessEnabled"].readIfPresent() + return value } } } @@ -89173,27 +60555,18 @@ public struct EnableSerialConsoleAccessOutput: Swift.Equatable { } } -struct EnableSerialConsoleAccessOutputBody: Swift.Equatable { - let serialConsoleAccessEnabled: Swift.Bool? -} - -extension EnableSerialConsoleAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serialConsoleAccessEnabled = "serialConsoleAccessEnabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialConsoleAccessEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .serialConsoleAccessEnabled) - serialConsoleAccessEnabled = serialConsoleAccessEnabledDecoded - } -} +enum EnableSerialConsoleAccessOutputError { -enum EnableSerialConsoleAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -89243,34 +60616,15 @@ public struct EnableSnapshotBlockPublicAccessInput: Swift.Equatable { } } -struct EnableSnapshotBlockPublicAccessInputBody: Swift.Equatable { - let state: EC2ClientTypes.SnapshotBlockPublicAccessState? - let dryRun: Swift.Bool? -} - -extension EnableSnapshotBlockPublicAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case state = "State" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotBlockPublicAccessState.self, forKey: .state) - state = stateDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension EnableSnapshotBlockPublicAccessOutput { -extension EnableSnapshotBlockPublicAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableSnapshotBlockPublicAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.state = output.state - } else { - self.state = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableSnapshotBlockPublicAccessOutput() + value.state = try reader["state"].readIfPresent() + return value } } } @@ -89287,27 +60641,18 @@ public struct EnableSnapshotBlockPublicAccessOutput: Swift.Equatable { } } -struct EnableSnapshotBlockPublicAccessOutputBody: Swift.Equatable { - let state: EC2ClientTypes.SnapshotBlockPublicAccessState? -} - -extension EnableSnapshotBlockPublicAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotBlockPublicAccessState.self, forKey: .state) - state = stateDecoded - } -} +enum EnableSnapshotBlockPublicAccessOutputError { -enum EnableSnapshotBlockPublicAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -89364,42 +60709,15 @@ public struct EnableTransitGatewayRouteTablePropagationInput: Swift.Equatable { } } -struct EnableTransitGatewayRouteTablePropagationInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? - let transitGatewayRouteTableAnnouncementId: Swift.String? -} - -extension EnableTransitGatewayRouteTablePropagationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayRouteTableAnnouncementId = "TransitGatewayRouteTableAnnouncementId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } +extension EnableTransitGatewayRouteTablePropagationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let transitGatewayRouteTableAnnouncementIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableAnnouncementId) - transitGatewayRouteTableAnnouncementId = transitGatewayRouteTableAnnouncementIdDecoded - } -} - -extension EnableTransitGatewayRouteTablePropagationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableTransitGatewayRouteTablePropagationOutputBody = try responseDecoder.decode(responseBody: data) - self.propagation = output.propagation - } else { - self.propagation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableTransitGatewayRouteTablePropagationOutput() + value.propagation = try reader["propagation"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPropagation.readingClosure) + return value } } } @@ -89416,27 +60734,18 @@ public struct EnableTransitGatewayRouteTablePropagationOutput: Swift.Equatable { } } -struct EnableTransitGatewayRouteTablePropagationOutputBody: Swift.Equatable { - let propagation: EC2ClientTypes.TransitGatewayPropagation? -} - -extension EnableTransitGatewayRouteTablePropagationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case propagation = "propagation" - } +enum EnableTransitGatewayRouteTablePropagationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let propagationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPropagation.self, forKey: .propagation) - propagation = propagationDecoded - } -} - -enum EnableTransitGatewayRouteTablePropagationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -89488,32 +60797,12 @@ public struct EnableVgwRoutePropagationInput: Swift.Equatable { } } -struct EnableVgwRoutePropagationInputBody: Swift.Equatable { - let gatewayId: Swift.String? - let routeTableId: Swift.String? - let dryRun: Swift.Bool? -} - -extension EnableVgwRoutePropagationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case gatewayId = "GatewayId" - case routeTableId = "RouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension EnableVgwRoutePropagationOutput { -extension EnableVgwRoutePropagationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return EnableVgwRoutePropagationOutput() + } } } @@ -89522,11 +60811,18 @@ public struct EnableVgwRoutePropagationOutput: Swift.Equatable { public init() { } } -enum EnableVgwRoutePropagationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum EnableVgwRoutePropagationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -89569,28 +60865,12 @@ public struct EnableVolumeIOInput: Swift.Equatable { } } -struct EnableVolumeIOInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let volumeId: Swift.String? -} - -extension EnableVolumeIOInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case volumeId = "volumeId" - } +extension EnableVolumeIOOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - } -} - -extension EnableVolumeIOOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return EnableVolumeIOOutput() + } } } @@ -89599,11 +60879,18 @@ public struct EnableVolumeIOOutput: Swift.Equatable { public init() { } } -enum EnableVolumeIOOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum EnableVolumeIOOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -89638,30 +60925,15 @@ public struct EnableVpcClassicLinkDnsSupportInput: Swift.Equatable { } } -struct EnableVpcClassicLinkDnsSupportInputBody: Swift.Equatable { - let vpcId: Swift.String? -} +extension EnableVpcClassicLinkDnsSupportOutput { -extension EnableVpcClassicLinkDnsSupportInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} - -extension EnableVpcClassicLinkDnsSupportOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableVpcClassicLinkDnsSupportOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableVpcClassicLinkDnsSupportOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -89678,27 +60950,18 @@ public struct EnableVpcClassicLinkDnsSupportOutput: Swift.Equatable { } } -struct EnableVpcClassicLinkDnsSupportOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension EnableVpcClassicLinkDnsSupportOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum EnableVpcClassicLinkDnsSupportOutputError { -enum EnableVpcClassicLinkDnsSupportOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -89741,34 +61004,15 @@ public struct EnableVpcClassicLinkInput: Swift.Equatable { } } -struct EnableVpcClassicLinkInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcId: Swift.String? -} - -extension EnableVpcClassicLinkInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - } -} +extension EnableVpcClassicLinkOutput { -extension EnableVpcClassicLinkOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableVpcClassicLinkOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableVpcClassicLinkOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -89785,35 +61029,23 @@ public struct EnableVpcClassicLinkOutput: Swift.Equatable { } } -struct EnableVpcClassicLinkOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension EnableVpcClassicLinkOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum EnableVpcClassicLinkOutputError { -enum EnableVpcClassicLinkOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.EnclaveOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "enabled" - } +extension EC2ClientTypes.EnclaveOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -89822,10 +61054,13 @@ extension EC2ClientTypes.EnclaveOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnclaveOptions() + value.enabled = try reader["enabled"].readIfPresent() + return value + } } } @@ -89845,10 +61080,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.EnclaveOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - } +extension EC2ClientTypes.EnclaveOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -89857,10 +61089,13 @@ extension EC2ClientTypes.EnclaveOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EnclaveOptionsRequest() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -89988,12 +61223,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.EventInformation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventDescription = "eventDescription" - case eventSubType = "eventSubType" - case instanceId = "instanceId" - } +extension EC2ClientTypes.EventInformation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -90008,14 +61238,15 @@ extension EC2ClientTypes.EventInformation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eventDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventDescription) - eventDescription = eventDescriptionDecoded - let eventSubTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventSubType) - eventSubType = eventSubTypeDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.EventInformation() + value.eventDescription = try reader["eventDescription"].readIfPresent() + value.eventSubType = try reader["eventSubType"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + return value + } } } @@ -90162,62 +61393,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Explanation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acl = "acl" - case aclRule = "aclRule" - case address = "address" - case addresses = "addressSet" - case attachedTo = "attachedTo" - case availabilityZones = "availabilityZoneSet" - case cidrs = "cidrSet" - case classicLoadBalancerListener = "classicLoadBalancerListener" - case component = "component" - case componentAccount = "componentAccount" - case componentRegion = "componentRegion" - case customerGateway = "customerGateway" - case destination = "destination" - case destinationVpc = "destinationVpc" - case direction = "direction" - case elasticLoadBalancerListener = "elasticLoadBalancerListener" - case explanationCode = "explanationCode" - case firewallStatefulRule = "firewallStatefulRule" - case firewallStatelessRule = "firewallStatelessRule" - case ingressRouteTable = "ingressRouteTable" - case internetGateway = "internetGateway" - case loadBalancerArn = "loadBalancerArn" - case loadBalancerListenerPort = "loadBalancerListenerPort" - case loadBalancerTarget = "loadBalancerTarget" - case loadBalancerTargetGroup = "loadBalancerTargetGroup" - case loadBalancerTargetGroups = "loadBalancerTargetGroupSet" - case loadBalancerTargetPort = "loadBalancerTargetPort" - case missingComponent = "missingComponent" - case natGateway = "natGateway" - case networkInterface = "networkInterface" - case packetField = "packetField" - case port = "port" - case portRanges = "portRangeSet" - case prefixList = "prefixList" - case protocols = "protocolSet" - case routeTable = "routeTable" - case routeTableRoute = "routeTableRoute" - case securityGroup = "securityGroup" - case securityGroupRule = "securityGroupRule" - case securityGroups = "securityGroupSet" - case sourceVpc = "sourceVpc" - case state = "state" - case subnet = "subnet" - case subnetRouteTable = "subnetRouteTable" - case transitGateway = "transitGateway" - case transitGatewayAttachment = "transitGatewayAttachment" - case transitGatewayRouteTable = "transitGatewayRouteTable" - case transitGatewayRouteTableRoute = "transitGatewayRouteTableRoute" - case vpc = "vpc" - case vpcEndpoint = "vpcEndpoint" - case vpcPeeringConnection = "vpcPeeringConnection" - case vpnConnection = "vpnConnection" - case vpnGateway = "vpnGateway" - } +extension EC2ClientTypes.Explanation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -90445,233 +61621,65 @@ extension EC2ClientTypes.Explanation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let aclDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .acl) - acl = aclDecoded - let aclRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisAclRule.self, forKey: .aclRule) - aclRule = aclRuleDecoded - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - if containerValues.contains(.addresses) { - struct KeyVal0{struct item{}} - let addressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addresses) - if let addressesWrappedContainer = addressesWrappedContainer { - let addressesContainer = try addressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addressesBuffer:[Swift.String]? = nil - if let addressesContainer = addressesContainer { - addressesBuffer = [Swift.String]() - for stringContainer0 in addressesContainer { - addressesBuffer?.append(stringContainer0) - } - } - addresses = addressesBuffer - } else { - addresses = [] - } - } else { - addresses = nil - } - let attachedToDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .attachedTo) - attachedTo = attachedToDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct item{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - if containerValues.contains(.cidrs) { - struct KeyVal0{struct item{}} - let cidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cidrs) - if let cidrsWrappedContainer = cidrsWrappedContainer { - let cidrsContainer = try cidrsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cidrsBuffer:[Swift.String]? = nil - if let cidrsContainer = cidrsContainer { - cidrsBuffer = [Swift.String]() - for stringContainer0 in cidrsContainer { - cidrsBuffer?.append(stringContainer0) - } - } - cidrs = cidrsBuffer - } else { - cidrs = [] - } - } else { - cidrs = nil - } - let componentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .component) - component = componentDecoded - let customerGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .customerGateway) - customerGateway = customerGatewayDecoded - let destinationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .destination) - destination = destinationDecoded - let destinationVpcDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .destinationVpc) - destinationVpc = destinationVpcDecoded - let directionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .direction) - direction = directionDecoded - let explanationCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .explanationCode) - explanationCode = explanationCodeDecoded - let ingressRouteTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .ingressRouteTable) - ingressRouteTable = ingressRouteTableDecoded - let internetGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .internetGateway) - internetGateway = internetGatewayDecoded - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - let classicLoadBalancerListenerDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisLoadBalancerListener.self, forKey: .classicLoadBalancerListener) - classicLoadBalancerListener = classicLoadBalancerListenerDecoded - let loadBalancerListenerPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .loadBalancerListenerPort) - loadBalancerListenerPort = loadBalancerListenerPortDecoded - let loadBalancerTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisLoadBalancerTarget.self, forKey: .loadBalancerTarget) - loadBalancerTarget = loadBalancerTargetDecoded - let loadBalancerTargetGroupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .loadBalancerTargetGroup) - loadBalancerTargetGroup = loadBalancerTargetGroupDecoded - if containerValues.contains(.loadBalancerTargetGroups) { - struct KeyVal0{struct item{}} - let loadBalancerTargetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerTargetGroups) - if let loadBalancerTargetGroupsWrappedContainer = loadBalancerTargetGroupsWrappedContainer { - let loadBalancerTargetGroupsContainer = try loadBalancerTargetGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.AnalysisComponent].self, forKey: .member) - var loadBalancerTargetGroupsBuffer:[EC2ClientTypes.AnalysisComponent]? = nil - if let loadBalancerTargetGroupsContainer = loadBalancerTargetGroupsContainer { - loadBalancerTargetGroupsBuffer = [EC2ClientTypes.AnalysisComponent]() - for structureContainer0 in loadBalancerTargetGroupsContainer { - loadBalancerTargetGroupsBuffer?.append(structureContainer0) - } - } - loadBalancerTargetGroups = loadBalancerTargetGroupsBuffer - } else { - loadBalancerTargetGroups = [] - } - } else { - loadBalancerTargetGroups = nil - } - let loadBalancerTargetPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .loadBalancerTargetPort) - loadBalancerTargetPort = loadBalancerTargetPortDecoded - let elasticLoadBalancerListenerDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .elasticLoadBalancerListener) - elasticLoadBalancerListener = elasticLoadBalancerListenerDecoded - let missingComponentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .missingComponent) - missingComponent = missingComponentDecoded - let natGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .natGateway) - natGateway = natGatewayDecoded - let networkInterfaceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .networkInterface) - networkInterface = networkInterfaceDecoded - let packetFieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .packetField) - packetField = packetFieldDecoded - let vpcPeeringConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .vpcPeeringConnection) - vpcPeeringConnection = vpcPeeringConnectionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - if containerValues.contains(.portRanges) { - struct KeyVal0{struct item{}} - let portRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .portRanges) - if let portRangesWrappedContainer = portRangesWrappedContainer { - let portRangesContainer = try portRangesWrappedContainer.decodeIfPresent([EC2ClientTypes.PortRange].self, forKey: .member) - var portRangesBuffer:[EC2ClientTypes.PortRange]? = nil - if let portRangesContainer = portRangesContainer { - portRangesBuffer = [EC2ClientTypes.PortRange]() - for structureContainer0 in portRangesContainer { - portRangesBuffer?.append(structureContainer0) - } - } - portRanges = portRangesBuffer - } else { - portRanges = [] - } - } else { - portRanges = nil - } - let prefixListDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .prefixList) - prefixList = prefixListDecoded - if containerValues.contains(.protocols) { - struct KeyVal0{struct item{}} - let protocolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .protocols) - if let protocolsWrappedContainer = protocolsWrappedContainer { - let protocolsContainer = try protocolsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var protocolsBuffer:[Swift.String]? = nil - if let protocolsContainer = protocolsContainer { - protocolsBuffer = [Swift.String]() - for stringContainer0 in protocolsContainer { - protocolsBuffer?.append(stringContainer0) - } - } - protocols = protocolsBuffer - } else { - protocols = [] - } - } else { - protocols = nil - } - let routeTableRouteDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisRouteTableRoute.self, forKey: .routeTableRoute) - routeTableRoute = routeTableRouteDecoded - let routeTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .routeTable) - routeTable = routeTableDecoded - let securityGroupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .securityGroup) - securityGroup = securityGroupDecoded - let securityGroupRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisSecurityGroupRule.self, forKey: .securityGroupRule) - securityGroupRule = securityGroupRuleDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.AnalysisComponent].self, forKey: .member) - var securityGroupsBuffer:[EC2ClientTypes.AnalysisComponent]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [EC2ClientTypes.AnalysisComponent]() - for structureContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(structureContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let sourceVpcDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .sourceVpc) - sourceVpc = sourceVpcDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let subnetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .subnet) - subnet = subnetDecoded - let subnetRouteTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .subnetRouteTable) - subnetRouteTable = subnetRouteTableDecoded - let vpcDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .vpc) - vpc = vpcDecoded - let vpcEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .vpcEndpoint) - vpcEndpoint = vpcEndpointDecoded - let vpnConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .vpnConnection) - vpnConnection = vpnConnectionDecoded - let vpnGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .vpnGateway) - vpnGateway = vpnGatewayDecoded - let transitGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .transitGateway) - transitGateway = transitGatewayDecoded - let transitGatewayRouteTableDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .transitGatewayRouteTable) - transitGatewayRouteTable = transitGatewayRouteTableDecoded - let transitGatewayRouteTableRouteDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTableRoute.self, forKey: .transitGatewayRouteTableRoute) - transitGatewayRouteTableRoute = transitGatewayRouteTableRouteDecoded - let transitGatewayAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .transitGatewayAttachment) - transitGatewayAttachment = transitGatewayAttachmentDecoded - let componentAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .componentAccount) - componentAccount = componentAccountDecoded - let componentRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .componentRegion) - componentRegion = componentRegionDecoded - let firewallStatelessRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FirewallStatelessRule.self, forKey: .firewallStatelessRule) - firewallStatelessRule = firewallStatelessRuleDecoded - let firewallStatefulRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FirewallStatefulRule.self, forKey: .firewallStatefulRule) - firewallStatefulRule = firewallStatefulRuleDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Explanation() + value.acl = try reader["acl"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.aclRule = try reader["aclRule"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisAclRule.readingClosure) + value.address = try reader["address"].readIfPresent() + value.addresses = try reader["addressSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.attachedTo = try reader["attachedTo"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.availabilityZones = try reader["availabilityZoneSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.cidrs = try reader["cidrSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.component = try reader["component"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.customerGateway = try reader["customerGateway"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.destination = try reader["destination"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.destinationVpc = try reader["destinationVpc"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.direction = try reader["direction"].readIfPresent() + value.explanationCode = try reader["explanationCode"].readIfPresent() + value.ingressRouteTable = try reader["ingressRouteTable"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.internetGateway = try reader["internetGateway"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.loadBalancerArn = try reader["loadBalancerArn"].readIfPresent() + value.classicLoadBalancerListener = try reader["classicLoadBalancerListener"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisLoadBalancerListener.readingClosure) + value.loadBalancerListenerPort = try reader["loadBalancerListenerPort"].readIfPresent() + value.loadBalancerTarget = try reader["loadBalancerTarget"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisLoadBalancerTarget.readingClosure) + value.loadBalancerTargetGroup = try reader["loadBalancerTargetGroup"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.loadBalancerTargetGroups = try reader["loadBalancerTargetGroupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AnalysisComponent.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.loadBalancerTargetPort = try reader["loadBalancerTargetPort"].readIfPresent() + value.elasticLoadBalancerListener = try reader["elasticLoadBalancerListener"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.missingComponent = try reader["missingComponent"].readIfPresent() + value.natGateway = try reader["natGateway"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.networkInterface = try reader["networkInterface"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.packetField = try reader["packetField"].readIfPresent() + value.vpcPeeringConnection = try reader["vpcPeeringConnection"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.port = try reader["port"].readIfPresent() + value.portRanges = try reader["portRangeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PortRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.prefixList = try reader["prefixList"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.protocols = try reader["protocolSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.routeTableRoute = try reader["routeTableRoute"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisRouteTableRoute.readingClosure) + value.routeTable = try reader["routeTable"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.securityGroup = try reader["securityGroup"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.securityGroupRule = try reader["securityGroupRule"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisSecurityGroupRule.readingClosure) + value.securityGroups = try reader["securityGroupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AnalysisComponent.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourceVpc = try reader["sourceVpc"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.state = try reader["state"].readIfPresent() + value.subnet = try reader["subnet"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.subnetRouteTable = try reader["subnetRouteTable"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.vpc = try reader["vpc"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.vpcEndpoint = try reader["vpcEndpoint"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.vpnConnection = try reader["vpnConnection"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.vpnGateway = try reader["vpnGateway"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.transitGateway = try reader["transitGateway"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.transitGatewayRouteTable = try reader["transitGatewayRouteTable"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.transitGatewayRouteTableRoute = try reader["transitGatewayRouteTableRoute"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRouteTableRoute.readingClosure) + value.transitGatewayAttachment = try reader["transitGatewayAttachment"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.componentAccount = try reader["componentAccount"].readIfPresent() + value.componentRegion = try reader["componentRegion"].readIfPresent() + value.firewallStatelessRule = try reader["firewallStatelessRule"].readIfPresent(readingClosure: EC2ClientTypes.FirewallStatelessRule.readingClosure) + value.firewallStatefulRule = try reader["firewallStatefulRule"].readIfPresent(readingClosure: EC2ClientTypes.FirewallStatefulRule.readingClosure) + return value + } } } @@ -90941,36 +61949,16 @@ public struct ExportClientVpnClientCertificateRevocationListInput: Swift.Equatab } } -struct ExportClientVpnClientCertificateRevocationListInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let dryRun: Swift.Bool? -} - -extension ExportClientVpnClientCertificateRevocationListInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ExportClientVpnClientCertificateRevocationListOutput { -extension ExportClientVpnClientCertificateRevocationListOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ExportClientVpnClientCertificateRevocationListOutputBody = try responseDecoder.decode(responseBody: data) - self.certificateRevocationList = output.certificateRevocationList - self.status = output.status - } else { - self.certificateRevocationList = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ExportClientVpnClientCertificateRevocationListOutput() + value.certificateRevocationList = try reader["certificateRevocationList"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientCertificateRevocationListStatus.readingClosure) + return value } } } @@ -90991,31 +61979,18 @@ public struct ExportClientVpnClientCertificateRevocationListOutput: Swift.Equata } } -struct ExportClientVpnClientCertificateRevocationListOutputBody: Swift.Equatable { - let certificateRevocationList: Swift.String? - let status: EC2ClientTypes.ClientCertificateRevocationListStatus? -} - -extension ExportClientVpnClientCertificateRevocationListOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateRevocationList = "certificateRevocationList" - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateRevocationListDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateRevocationList) - certificateRevocationList = certificateRevocationListDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientCertificateRevocationListStatus.self, forKey: .status) - status = statusDecoded - } -} +enum ExportClientVpnClientCertificateRevocationListOutputError { -enum ExportClientVpnClientCertificateRevocationListOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -91058,34 +62033,15 @@ public struct ExportClientVpnClientConfigurationInput: Swift.Equatable { } } -struct ExportClientVpnClientConfigurationInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let dryRun: Swift.Bool? -} - -extension ExportClientVpnClientConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ExportClientVpnClientConfigurationOutput { -extension ExportClientVpnClientConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ExportClientVpnClientConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.clientConfiguration = output.clientConfiguration - } else { - self.clientConfiguration = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ExportClientVpnClientConfigurationOutput() + value.clientConfiguration = try reader["clientConfiguration"].readIfPresent() + return value } } } @@ -91102,27 +62058,18 @@ public struct ExportClientVpnClientConfigurationOutput: Swift.Equatable { } } -struct ExportClientVpnClientConfigurationOutputBody: Swift.Equatable { - let clientConfiguration: Swift.String? -} - -extension ExportClientVpnClientConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientConfiguration = "clientConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientConfigurationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientConfiguration) - clientConfiguration = clientConfigurationDecoded - } -} +enum ExportClientVpnClientConfigurationOutputError { -enum ExportClientVpnClientConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -91253,93 +62200,24 @@ public struct ExportImageInput: Swift.Equatable { } } -struct ExportImageInputBody: Swift.Equatable { - let clientToken: Swift.String? - let description: Swift.String? - let diskImageFormat: EC2ClientTypes.DiskImageFormat? - let dryRun: Swift.Bool? - let imageId: Swift.String? - let s3ExportLocation: EC2ClientTypes.ExportTaskS3LocationRequest? - let roleName: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension ExportImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case diskImageFormat = "DiskImageFormat" - case dryRun = "DryRun" - case imageId = "ImageId" - case roleName = "RoleName" - case s3ExportLocation = "S3ExportLocation" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let diskImageFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageFormat.self, forKey: .diskImageFormat) - diskImageFormat = diskImageFormatDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let s3ExportLocationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportTaskS3LocationRequest.self, forKey: .s3ExportLocation) - s3ExportLocation = s3ExportLocationDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension ExportImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ExportImageOutputBody = try responseDecoder.decode(responseBody: data) - self.description = output.description - self.diskImageFormat = output.diskImageFormat - self.exportImageTaskId = output.exportImageTaskId - self.imageId = output.imageId - self.progress = output.progress - self.roleName = output.roleName - self.s3ExportLocation = output.s3ExportLocation - self.status = output.status - self.statusMessage = output.statusMessage - self.tags = output.tags - } else { - self.description = nil - self.diskImageFormat = nil - self.exportImageTaskId = nil - self.imageId = nil - self.progress = nil - self.roleName = nil - self.s3ExportLocation = nil - self.status = nil - self.statusMessage = nil - self.tags = nil +extension ExportImageOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ExportImageOutput() + value.description = try reader["description"].readIfPresent() + value.diskImageFormat = try reader["diskImageFormat"].readIfPresent() + value.exportImageTaskId = try reader["exportImageTaskId"].readIfPresent() + value.imageId = try reader["imageId"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.roleName = try reader["roleName"].readIfPresent() + value.s3ExportLocation = try reader["s3ExportLocation"].readIfPresent(readingClosure: EC2ClientTypes.ExportTaskS3Location.readingClosure) + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -91392,95 +62270,23 @@ public struct ExportImageOutput: Swift.Equatable { } } -struct ExportImageOutputBody: Swift.Equatable { - let description: Swift.String? - let diskImageFormat: EC2ClientTypes.DiskImageFormat? - let exportImageTaskId: Swift.String? - let imageId: Swift.String? - let roleName: Swift.String? - let progress: Swift.String? - let s3ExportLocation: EC2ClientTypes.ExportTaskS3Location? - let status: Swift.String? - let statusMessage: Swift.String? - let tags: [EC2ClientTypes.Tag]? -} - -extension ExportImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case diskImageFormat = "diskImageFormat" - case exportImageTaskId = "exportImageTaskId" - case imageId = "imageId" - case progress = "progress" - case roleName = "roleName" - case s3ExportLocation = "s3ExportLocation" - case status = "status" - case statusMessage = "statusMessage" - case tags = "tagSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let diskImageFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageFormat.self, forKey: .diskImageFormat) - diskImageFormat = diskImageFormatDecoded - let exportImageTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportImageTaskId) - exportImageTaskId = exportImageTaskIdDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let s3ExportLocationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportTaskS3Location.self, forKey: .s3ExportLocation) - s3ExportLocation = s3ExportLocationDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -enum ExportImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.ExportImageTask: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case exportImageTaskId = "exportImageTaskId" - case imageId = "imageId" - case progress = "progress" - case s3ExportLocation = "s3ExportLocation" - case status = "status" - case statusMessage = "statusMessage" - case tags = "tagSet" +enum ExportImageOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } + } } +} + +extension EC2ClientTypes.ExportImageTask: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -91519,40 +62325,19 @@ extension EC2ClientTypes.ExportImageTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let exportImageTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportImageTaskId) - exportImageTaskId = exportImageTaskIdDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let s3ExportLocationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportTaskS3Location.self, forKey: .s3ExportLocation) - s3ExportLocation = s3ExportLocationDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ExportImageTask() + value.description = try reader["description"].readIfPresent() + value.exportImageTaskId = try reader["exportImageTaskId"].readIfPresent() + value.imageId = try reader["imageId"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.s3ExportLocation = try reader["s3ExportLocation"].readIfPresent(readingClosure: EC2ClientTypes.ExportTaskS3Location.readingClosure) + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -91601,16 +62386,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ExportTask: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case exportTaskId = "exportTaskId" - case exportToS3Task = "exportToS3" - case instanceExportDetails = "instanceExport" - case state = "state" - case statusMessage = "statusMessage" - case tags = "tagSet" - } +extension EC2ClientTypes.ExportTask: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -91646,38 +62422,18 @@ extension EC2ClientTypes.ExportTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let exportTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportTaskId) - exportTaskId = exportTaskIdDecoded - let exportToS3TaskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportToS3Task.self, forKey: .exportToS3Task) - exportToS3Task = exportToS3TaskDecoded - let instanceExportDetailsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceExportDetails.self, forKey: .instanceExportDetails) - instanceExportDetails = instanceExportDetailsDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportTaskState.self, forKey: .state) - state = stateDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ExportTask() + value.description = try reader["description"].readIfPresent() + value.exportTaskId = try reader["exportTaskId"].readIfPresent() + value.exportToS3Task = try reader["exportToS3"].readIfPresent(readingClosure: EC2ClientTypes.ExportToS3Task.readingClosure) + value.instanceExportDetails = try reader["instanceExport"].readIfPresent(readingClosure: EC2ClientTypes.InstanceExportDetails.readingClosure) + value.state = try reader["state"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -91722,11 +62478,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ExportTaskS3Location: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3Bucket = "s3Bucket" - case s3Prefix = "s3Prefix" - } +extension EC2ClientTypes.ExportTaskS3Location: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -91738,12 +62490,14 @@ extension EC2ClientTypes.ExportTaskS3Location: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ExportTaskS3Location() + value.s3Bucket = try reader["s3Bucket"].readIfPresent() + value.s3Prefix = try reader["s3Prefix"].readIfPresent() + return value + } } } @@ -91767,11 +62521,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ExportTaskS3LocationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3Bucket = "S3Bucket" - case s3Prefix = "S3Prefix" - } +extension EC2ClientTypes.ExportTaskS3LocationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -91783,12 +62533,14 @@ extension EC2ClientTypes.ExportTaskS3LocationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ExportTaskS3LocationRequest() + value.s3Bucket = try reader["S3Bucket"].readIfPresent() + value.s3Prefix = try reader["S3Prefix"].readIfPresent() + return value + } } } @@ -91851,13 +62603,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ExportToS3Task: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case containerFormat = "containerFormat" - case diskImageFormat = "diskImageFormat" - case s3Bucket = "s3Bucket" - case s3Key = "s3Key" - } +extension EC2ClientTypes.ExportToS3Task: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -91875,16 +62621,16 @@ extension EC2ClientTypes.ExportToS3Task: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let containerFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ContainerFormat.self, forKey: .containerFormat) - containerFormat = containerFormatDecoded - let diskImageFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageFormat.self, forKey: .diskImageFormat) - diskImageFormat = diskImageFormatDecoded - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3KeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Key) - s3Key = s3KeyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ExportToS3Task() + value.containerFormat = try reader["containerFormat"].readIfPresent() + value.diskImageFormat = try reader["diskImageFormat"].readIfPresent() + value.s3Bucket = try reader["s3Bucket"].readIfPresent() + value.s3Key = try reader["s3Key"].readIfPresent() + return value + } } } @@ -91916,13 +62662,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ExportToS3TaskSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case containerFormat = "containerFormat" - case diskImageFormat = "diskImageFormat" - case s3Bucket = "s3Bucket" - case s3Prefix = "s3Prefix" - } +extension EC2ClientTypes.ExportToS3TaskSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -91940,16 +62680,16 @@ extension EC2ClientTypes.ExportToS3TaskSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let containerFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ContainerFormat.self, forKey: .containerFormat) - containerFormat = containerFormatDecoded - let diskImageFormatDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageFormat.self, forKey: .diskImageFormat) - diskImageFormat = diskImageFormatDecoded - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ExportToS3TaskSpecification() + value.containerFormat = try reader["containerFormat"].readIfPresent() + value.diskImageFormat = try reader["diskImageFormat"].readIfPresent() + value.s3Bucket = try reader["s3Bucket"].readIfPresent() + value.s3Prefix = try reader["s3Prefix"].readIfPresent() + return value + } } } @@ -92061,59 +62801,15 @@ public struct ExportTransitGatewayRoutesInput: Swift.Equatable { } } -struct ExportTransitGatewayRoutesInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let s3Bucket: Swift.String? - let dryRun: Swift.Bool? -} - -extension ExportTransitGatewayRoutesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case s3Bucket = "S3Bucket" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ExportTransitGatewayRoutesOutput { -extension ExportTransitGatewayRoutesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ExportTransitGatewayRoutesOutputBody = try responseDecoder.decode(responseBody: data) - self.s3Location = output.s3Location - } else { - self.s3Location = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ExportTransitGatewayRoutesOutput() + value.s3Location = try reader["s3Location"].readIfPresent() + return value } } } @@ -92130,36 +62826,23 @@ public struct ExportTransitGatewayRoutesOutput: Swift.Equatable { } } -struct ExportTransitGatewayRoutesOutputBody: Swift.Equatable { - let s3Location: Swift.String? -} - -extension ExportTransitGatewayRoutesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3Location = "s3Location" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3LocationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Location) - s3Location = s3LocationDecoded - } -} +enum ExportTransitGatewayRoutesOutputError { -enum ExportTransitGatewayRoutesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.FailedCapacityReservationFleetCancellationResult: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cancelCapacityReservationFleetError = "cancelCapacityReservationFleetError" - case capacityReservationFleetId = "capacityReservationFleetId" - } +extension EC2ClientTypes.FailedCapacityReservationFleetCancellationResult: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92171,12 +62854,14 @@ extension EC2ClientTypes.FailedCapacityReservationFleetCancellationResult: Swift } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationFleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationFleetId) - capacityReservationFleetId = capacityReservationFleetIdDecoded - let cancelCapacityReservationFleetErrorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CancelCapacityReservationFleetError.self, forKey: .cancelCapacityReservationFleetError) - cancelCapacityReservationFleetError = cancelCapacityReservationFleetErrorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FailedCapacityReservationFleetCancellationResult() + value.capacityReservationFleetId = try reader["capacityReservationFleetId"].readIfPresent() + value.cancelCapacityReservationFleetError = try reader["cancelCapacityReservationFleetError"].readIfPresent(readingClosure: EC2ClientTypes.CancelCapacityReservationFleetError.readingClosure) + return value + } } } @@ -92200,11 +62885,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FailedQueuedPurchaseDeletion: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case error = "error" - case reservedInstancesId = "reservedInstancesId" - } +extension EC2ClientTypes.FailedQueuedPurchaseDeletion: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92216,12 +62897,14 @@ extension EC2ClientTypes.FailedQueuedPurchaseDeletion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeleteQueuedReservedInstancesError.self, forKey: .error) - error = errorDecoded - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FailedQueuedPurchaseDeletion() + value.error = try reader["error"].readIfPresent(readingClosure: EC2ClientTypes.DeleteQueuedReservedInstancesError.readingClosure) + value.reservedInstancesId = try reader["reservedInstancesId"].readIfPresent() + return value + } } } @@ -92245,12 +62928,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FastLaunchLaunchTemplateSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateId = "LaunchTemplateId" - case launchTemplateName = "LaunchTemplateName" - case version = "Version" - } +extension EC2ClientTypes.FastLaunchLaunchTemplateSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92265,14 +62943,15 @@ extension EC2ClientTypes.FastLaunchLaunchTemplateSpecificationRequest: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FastLaunchLaunchTemplateSpecificationRequest() + value.launchTemplateId = try reader["LaunchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["LaunchTemplateName"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -92301,12 +62980,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateId = "launchTemplateId" - case launchTemplateName = "launchTemplateName" - case version = "version" - } +extension EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92321,14 +62995,15 @@ extension EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FastLaunchLaunchTemplateSpecificationResponse() + value.launchTemplateId = try reader["launchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["launchTemplateName"].readIfPresent() + value.version = try reader["version"].readIfPresent() + return value + } } } @@ -92385,10 +63060,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FastLaunchSnapshotConfigurationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetResourceCount = "TargetResourceCount" - } +extension EC2ClientTypes.FastLaunchSnapshotConfigurationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92397,10 +63069,13 @@ extension EC2ClientTypes.FastLaunchSnapshotConfigurationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetResourceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetResourceCount) - targetResourceCount = targetResourceCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FastLaunchSnapshotConfigurationRequest() + value.targetResourceCount = try reader["TargetResourceCount"].readIfPresent() + return value + } } } @@ -92420,10 +63095,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FastLaunchSnapshotConfigurationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetResourceCount = "targetResourceCount" - } +extension EC2ClientTypes.FastLaunchSnapshotConfigurationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92432,10 +63104,13 @@ extension EC2ClientTypes.FastLaunchSnapshotConfigurationResponse: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetResourceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetResourceCount) - targetResourceCount = targetResourceCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FastLaunchSnapshotConfigurationResponse() + value.targetResourceCount = try reader["targetResourceCount"].readIfPresent() + return value + } } } @@ -92540,11 +63215,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FederatedAuthentication: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderArn = "samlProviderArn" - case selfServiceSamlProviderArn = "selfServiceSamlProviderArn" - } +extension EC2ClientTypes.FederatedAuthentication: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92556,12 +63227,14 @@ extension EC2ClientTypes.FederatedAuthentication: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - let selfServiceSamlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .selfServiceSamlProviderArn) - selfServiceSamlProviderArn = selfServiceSamlProviderArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FederatedAuthentication() + value.samlProviderArn = try reader["samlProviderArn"].readIfPresent() + value.selfServiceSamlProviderArn = try reader["selfServiceSamlProviderArn"].readIfPresent() + return value + } } } @@ -92585,11 +63258,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FederatedAuthenticationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderArn = "SAMLProviderArn" - case selfServiceSAMLProviderArn = "SelfServiceSAMLProviderArn" - } +extension EC2ClientTypes.FederatedAuthenticationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92601,12 +63270,14 @@ extension EC2ClientTypes.FederatedAuthenticationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - let selfServiceSAMLProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .selfServiceSAMLProviderArn) - selfServiceSAMLProviderArn = selfServiceSAMLProviderArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FederatedAuthenticationRequest() + value.samlProviderArn = try reader["SAMLProviderArn"].readIfPresent() + value.selfServiceSAMLProviderArn = try reader["SelfServiceSAMLProviderArn"].readIfPresent() + return value + } } } @@ -92630,11 +63301,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Filter: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case values = "Value" - } +extension EC2ClientTypes.Filter: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92655,28 +63322,13 @@ extension EC2ClientTypes.Filter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct item{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Filter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Value"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -92701,11 +63353,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FilterPortRange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fromPort = "fromPort" - case toPort = "toPort" - } +extension EC2ClientTypes.FilterPortRange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92717,12 +63365,14 @@ extension EC2ClientTypes.FilterPortRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FilterPortRange() + value.fromPort = try reader["fromPort"].readIfPresent() + value.toPort = try reader["toPort"].readIfPresent() + return value + } } } @@ -92781,17 +63431,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FirewallStatefulRule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationPorts = "destinationPortSet" - case destinations = "destinationSet" - case direction = "direction" - case `protocol` = "protocol" - case ruleAction = "ruleAction" - case ruleGroupArn = "ruleGroupArn" - case sourcePorts = "sourcePortSet" - case sources = "sourceSet" - } +extension EC2ClientTypes.FirewallStatefulRule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -92857,92 +63497,20 @@ extension EC2ClientTypes.FirewallStatefulRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleGroupArn) - ruleGroupArn = ruleGroupArnDecoded - if containerValues.contains(.sources) { - struct KeyVal0{struct item{}} - let sourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sources) - if let sourcesWrappedContainer = sourcesWrappedContainer { - let sourcesContainer = try sourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourcesBuffer:[Swift.String]? = nil - if let sourcesContainer = sourcesContainer { - sourcesBuffer = [Swift.String]() - for stringContainer0 in sourcesContainer { - sourcesBuffer?.append(stringContainer0) - } - } - sources = sourcesBuffer - } else { - sources = [] - } - } else { - sources = nil - } - if containerValues.contains(.destinations) { - struct KeyVal0{struct item{}} - let destinationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinations) - if let destinationsWrappedContainer = destinationsWrappedContainer { - let destinationsContainer = try destinationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationsBuffer:[Swift.String]? = nil - if let destinationsContainer = destinationsContainer { - destinationsBuffer = [Swift.String]() - for stringContainer0 in destinationsContainer { - destinationsBuffer?.append(stringContainer0) - } - } - destinations = destinationsBuffer - } else { - destinations = [] - } - } else { - destinations = nil - } - if containerValues.contains(.sourcePorts) { - struct KeyVal0{struct item{}} - let sourcePortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourcePorts) - if let sourcePortsWrappedContainer = sourcePortsWrappedContainer { - let sourcePortsContainer = try sourcePortsWrappedContainer.decodeIfPresent([EC2ClientTypes.PortRange].self, forKey: .member) - var sourcePortsBuffer:[EC2ClientTypes.PortRange]? = nil - if let sourcePortsContainer = sourcePortsContainer { - sourcePortsBuffer = [EC2ClientTypes.PortRange]() - for structureContainer0 in sourcePortsContainer { - sourcePortsBuffer?.append(structureContainer0) - } - } - sourcePorts = sourcePortsBuffer - } else { - sourcePorts = [] - } - } else { - sourcePorts = nil - } - if containerValues.contains(.destinationPorts) { - struct KeyVal0{struct item{}} - let destinationPortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationPorts) - if let destinationPortsWrappedContainer = destinationPortsWrappedContainer { - let destinationPortsContainer = try destinationPortsWrappedContainer.decodeIfPresent([EC2ClientTypes.PortRange].self, forKey: .member) - var destinationPortsBuffer:[EC2ClientTypes.PortRange]? = nil - if let destinationPortsContainer = destinationPortsContainer { - destinationPortsBuffer = [EC2ClientTypes.PortRange]() - for structureContainer0 in destinationPortsContainer { - destinationPortsBuffer?.append(structureContainer0) - } - } - destinationPorts = destinationPortsBuffer - } else { - destinationPorts = [] - } - } else { - destinationPorts = nil - } - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let ruleActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let directionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .direction) - direction = directionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FirewallStatefulRule() + value.ruleGroupArn = try reader["ruleGroupArn"].readIfPresent() + value.sources = try reader["sourceSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinations = try reader["destinationSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourcePorts = try reader["sourcePortSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PortRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationPorts = try reader["destinationPortSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PortRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.`protocol` = try reader["protocol"].readIfPresent() + value.ruleAction = try reader["ruleAction"].readIfPresent() + value.direction = try reader["direction"].readIfPresent() + return value + } } } @@ -92990,17 +63558,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FirewallStatelessRule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationPorts = "destinationPortSet" - case destinations = "destinationSet" - case priority = "priority" - case protocols = "protocolSet" - case ruleAction = "ruleAction" - case ruleGroupArn = "ruleGroupArn" - case sourcePorts = "sourcePortSet" - case sources = "sourceSet" - } +extension EC2ClientTypes.FirewallStatelessRule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -93075,109 +63633,20 @@ extension EC2ClientTypes.FirewallStatelessRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleGroupArn) - ruleGroupArn = ruleGroupArnDecoded - if containerValues.contains(.sources) { - struct KeyVal0{struct item{}} - let sourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sources) - if let sourcesWrappedContainer = sourcesWrappedContainer { - let sourcesContainer = try sourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourcesBuffer:[Swift.String]? = nil - if let sourcesContainer = sourcesContainer { - sourcesBuffer = [Swift.String]() - for stringContainer0 in sourcesContainer { - sourcesBuffer?.append(stringContainer0) - } - } - sources = sourcesBuffer - } else { - sources = [] - } - } else { - sources = nil - } - if containerValues.contains(.destinations) { - struct KeyVal0{struct item{}} - let destinationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinations) - if let destinationsWrappedContainer = destinationsWrappedContainer { - let destinationsContainer = try destinationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationsBuffer:[Swift.String]? = nil - if let destinationsContainer = destinationsContainer { - destinationsBuffer = [Swift.String]() - for stringContainer0 in destinationsContainer { - destinationsBuffer?.append(stringContainer0) - } - } - destinations = destinationsBuffer - } else { - destinations = [] - } - } else { - destinations = nil - } - if containerValues.contains(.sourcePorts) { - struct KeyVal0{struct item{}} - let sourcePortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourcePorts) - if let sourcePortsWrappedContainer = sourcePortsWrappedContainer { - let sourcePortsContainer = try sourcePortsWrappedContainer.decodeIfPresent([EC2ClientTypes.PortRange].self, forKey: .member) - var sourcePortsBuffer:[EC2ClientTypes.PortRange]? = nil - if let sourcePortsContainer = sourcePortsContainer { - sourcePortsBuffer = [EC2ClientTypes.PortRange]() - for structureContainer0 in sourcePortsContainer { - sourcePortsBuffer?.append(structureContainer0) - } - } - sourcePorts = sourcePortsBuffer - } else { - sourcePorts = [] - } - } else { - sourcePorts = nil - } - if containerValues.contains(.destinationPorts) { - struct KeyVal0{struct item{}} - let destinationPortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationPorts) - if let destinationPortsWrappedContainer = destinationPortsWrappedContainer { - let destinationPortsContainer = try destinationPortsWrappedContainer.decodeIfPresent([EC2ClientTypes.PortRange].self, forKey: .member) - var destinationPortsBuffer:[EC2ClientTypes.PortRange]? = nil - if let destinationPortsContainer = destinationPortsContainer { - destinationPortsBuffer = [EC2ClientTypes.PortRange]() - for structureContainer0 in destinationPortsContainer { - destinationPortsBuffer?.append(structureContainer0) - } - } - destinationPorts = destinationPortsBuffer - } else { - destinationPorts = [] - } - } else { - destinationPorts = nil - } - if containerValues.contains(.protocols) { - struct KeyVal0{struct item{}} - let protocolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .protocols) - if let protocolsWrappedContainer = protocolsWrappedContainer { - let protocolsContainer = try protocolsWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var protocolsBuffer:[Swift.Int]? = nil - if let protocolsContainer = protocolsContainer { - protocolsBuffer = [Swift.Int]() - for integerContainer0 in protocolsContainer { - protocolsBuffer?.append(integerContainer0) - } - } - protocols = protocolsBuffer - } else { - protocols = [] - } - } else { - protocols = nil - } - let ruleActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) - priority = priorityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FirewallStatelessRule() + value.ruleGroupArn = try reader["ruleGroupArn"].readIfPresent() + value.sources = try reader["sourceSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinations = try reader["destinationSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourcePorts = try reader["sourcePortSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PortRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationPorts = try reader["destinationPortSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PortRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.protocols = try reader["protocolSet"].readListIfPresent(memberReadingClosure: Swift.Int.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ruleAction = try reader["ruleAction"].readIfPresent() + value.priority = try reader["priority"].readIfPresent() + return value + } } } @@ -93263,20 +63732,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FleetCapacityReservation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case availabilityZoneId = "availabilityZoneId" - case capacityReservationId = "capacityReservationId" - case createDate = "createDate" - case ebsOptimized = "ebsOptimized" - case fulfilledCapacity = "fulfilledCapacity" - case instancePlatform = "instancePlatform" - case instanceType = "instanceType" - case priority = "priority" - case totalInstanceCount = "totalInstanceCount" - case weight = "weight" - } +extension EC2ClientTypes.FleetCapacityReservation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -93315,30 +63771,23 @@ extension EC2ClientTypes.FleetCapacityReservation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let availabilityZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneId) - availabilityZoneId = availabilityZoneIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let instancePlatformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationInstancePlatform.self, forKey: .instancePlatform) - instancePlatform = instancePlatformDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let totalInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalInstanceCount) - totalInstanceCount = totalInstanceCountDecoded - let fulfilledCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fulfilledCapacity) - fulfilledCapacity = fulfilledCapacityDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let weightDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .weight) - weight = weightDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) - priority = priorityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetCapacityReservation() + value.capacityReservationId = try reader["capacityReservationId"].readIfPresent() + value.availabilityZoneId = try reader["availabilityZoneId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.instancePlatform = try reader["instancePlatform"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.totalInstanceCount = try reader["totalInstanceCount"].readIfPresent() + value.fulfilledCapacity = try reader["fulfilledCapacity"].readIfPresent() + value.ebsOptimized = try reader["ebsOptimized"].readIfPresent() + value.createDate = try reader["createDate"].readTimestampIfPresent(format: .dateTime) + value.weight = try reader["weight"].readIfPresent() + value.priority = try reader["priority"].readIfPresent() + return value + } } } @@ -93456,30 +63905,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FleetData: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activityStatus = "activityStatus" - case clientToken = "clientToken" - case context = "context" - case createTime = "createTime" - case errors = "errorSet" - case excessCapacityTerminationPolicy = "excessCapacityTerminationPolicy" - case fleetId = "fleetId" - case fleetState = "fleetState" - case fulfilledCapacity = "fulfilledCapacity" - case fulfilledOnDemandCapacity = "fulfilledOnDemandCapacity" - case instances = "fleetInstanceSet" - case launchTemplateConfigs = "launchTemplateConfigs" - case onDemandOptions = "onDemandOptions" - case replaceUnhealthyInstances = "replaceUnhealthyInstances" - case spotOptions = "spotOptions" - case tags = "tagSet" - case targetCapacitySpecification = "targetCapacitySpecification" - case terminateInstancesWithExpiration = "terminateInstancesWithExpiration" - case type = "type" - case validFrom = "validFrom" - case validUntil = "validUntil" - } +extension EC2ClientTypes.FleetData: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -93584,118 +64010,33 @@ extension EC2ClientTypes.FleetData: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let activityStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetActivityStatus.self, forKey: .activityStatus) - activityStatus = activityStatusDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded - let fleetStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetStateCode.self, forKey: .fleetState) - fleetState = fleetStateDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let excessCapacityTerminationPolicyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetExcessCapacityTerminationPolicy.self, forKey: .excessCapacityTerminationPolicy) - excessCapacityTerminationPolicy = excessCapacityTerminationPolicyDecoded - let fulfilledCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fulfilledCapacity) - fulfilledCapacity = fulfilledCapacityDecoded - let fulfilledOnDemandCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fulfilledOnDemandCapacity) - fulfilledOnDemandCapacity = fulfilledOnDemandCapacityDecoded - if containerValues.contains(.launchTemplateConfigs) { - struct KeyVal0{struct item{}} - let launchTemplateConfigsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplateConfigs) - if let launchTemplateConfigsWrappedContainer = launchTemplateConfigsWrappedContainer { - let launchTemplateConfigsContainer = try launchTemplateConfigsWrappedContainer.decodeIfPresent([EC2ClientTypes.FleetLaunchTemplateConfig].self, forKey: .member) - var launchTemplateConfigsBuffer:[EC2ClientTypes.FleetLaunchTemplateConfig]? = nil - if let launchTemplateConfigsContainer = launchTemplateConfigsContainer { - launchTemplateConfigsBuffer = [EC2ClientTypes.FleetLaunchTemplateConfig]() - for structureContainer0 in launchTemplateConfigsContainer { - launchTemplateConfigsBuffer?.append(structureContainer0) - } - } - launchTemplateConfigs = launchTemplateConfigsBuffer - } else { - launchTemplateConfigs = [] - } - } else { - launchTemplateConfigs = nil - } - let targetCapacitySpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetCapacitySpecification.self, forKey: .targetCapacitySpecification) - targetCapacitySpecification = targetCapacitySpecificationDecoded - let terminateInstancesWithExpirationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .terminateInstancesWithExpiration) - terminateInstancesWithExpiration = terminateInstancesWithExpirationDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetType.self, forKey: .type) - type = typeDecoded - let validFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validFrom) - validFrom = validFromDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - let replaceUnhealthyInstancesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .replaceUnhealthyInstances) - replaceUnhealthyInstances = replaceUnhealthyInstancesDecoded - let spotOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotOptions.self, forKey: .spotOptions) - spotOptions = spotOptionsDecoded - let onDemandOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OnDemandOptions.self, forKey: .onDemandOptions) - onDemandOptions = onDemandOptionsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.errors) { - struct KeyVal0{struct item{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([EC2ClientTypes.DescribeFleetError].self, forKey: .member) - var errorsBuffer:[EC2ClientTypes.DescribeFleetError]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [EC2ClientTypes.DescribeFleetError]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] - } - } else { - errors = nil - } - if containerValues.contains(.instances) { - struct KeyVal0{struct item{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([EC2ClientTypes.DescribeFleetsInstances].self, forKey: .member) - var instancesBuffer:[EC2ClientTypes.DescribeFleetsInstances]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [EC2ClientTypes.DescribeFleetsInstances]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - let contextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .context) - context = contextDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetData() + value.activityStatus = try reader["activityStatus"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.fleetId = try reader["fleetId"].readIfPresent() + value.fleetState = try reader["fleetState"].readIfPresent() + value.clientToken = try reader["clientToken"].readIfPresent() + value.excessCapacityTerminationPolicy = try reader["excessCapacityTerminationPolicy"].readIfPresent() + value.fulfilledCapacity = try reader["fulfilledCapacity"].readIfPresent() + value.fulfilledOnDemandCapacity = try reader["fulfilledOnDemandCapacity"].readIfPresent() + value.launchTemplateConfigs = try reader["launchTemplateConfigs"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FleetLaunchTemplateConfig.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.targetCapacitySpecification = try reader["targetCapacitySpecification"].readIfPresent(readingClosure: EC2ClientTypes.TargetCapacitySpecification.readingClosure) + value.terminateInstancesWithExpiration = try reader["terminateInstancesWithExpiration"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.validFrom = try reader["validFrom"].readTimestampIfPresent(format: .dateTime) + value.validUntil = try reader["validUntil"].readTimestampIfPresent(format: .dateTime) + value.replaceUnhealthyInstances = try reader["replaceUnhealthyInstances"].readIfPresent() + value.spotOptions = try reader["spotOptions"].readIfPresent(readingClosure: EC2ClientTypes.SpotOptions.readingClosure) + value.onDemandOptions = try reader["onDemandOptions"].readIfPresent(readingClosure: EC2ClientTypes.OnDemandOptions.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.errors = try reader["errorSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DescribeFleetError.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instances = try reader["fleetInstanceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DescribeFleetsInstances.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.context = try reader["context"].readIfPresent() + return value + } } } @@ -93891,11 +64232,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FleetLaunchTemplateConfig: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateSpecification = "launchTemplateSpecification" - case overrides = "overrides" - } +extension EC2ClientTypes.FleetLaunchTemplateConfig: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -93916,28 +64253,13 @@ extension EC2ClientTypes.FleetLaunchTemplateConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetLaunchTemplateSpecification.self, forKey: .launchTemplateSpecification) - launchTemplateSpecification = launchTemplateSpecificationDecoded - if containerValues.contains(.overrides) { - struct KeyVal0{struct item{}} - let overridesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .overrides) - if let overridesWrappedContainer = overridesWrappedContainer { - let overridesContainer = try overridesWrappedContainer.decodeIfPresent([EC2ClientTypes.FleetLaunchTemplateOverrides].self, forKey: .member) - var overridesBuffer:[EC2ClientTypes.FleetLaunchTemplateOverrides]? = nil - if let overridesContainer = overridesContainer { - overridesBuffer = [EC2ClientTypes.FleetLaunchTemplateOverrides]() - for structureContainer0 in overridesContainer { - overridesBuffer?.append(structureContainer0) - } - } - overrides = overridesBuffer - } else { - overrides = [] - } - } else { - overrides = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetLaunchTemplateConfig() + value.launchTemplateSpecification = try reader["launchTemplateSpecification"].readIfPresent(readingClosure: EC2ClientTypes.FleetLaunchTemplateSpecification.readingClosure) + value.overrides = try reader["overrides"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FleetLaunchTemplateOverrides.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -93962,11 +64284,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FleetLaunchTemplateConfigRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateSpecification = "LaunchTemplateSpecification" - case overrides = "Overrides" - } +extension EC2ClientTypes.FleetLaunchTemplateConfigRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -93987,28 +64305,13 @@ extension EC2ClientTypes.FleetLaunchTemplateConfigRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetLaunchTemplateSpecificationRequest.self, forKey: .launchTemplateSpecification) - launchTemplateSpecification = launchTemplateSpecificationDecoded - if containerValues.contains(.overrides) { - struct KeyVal0{struct item{}} - let overridesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .overrides) - if let overridesWrappedContainer = overridesWrappedContainer { - let overridesContainer = try overridesWrappedContainer.decodeIfPresent([EC2ClientTypes.FleetLaunchTemplateOverridesRequest].self, forKey: .member) - var overridesBuffer:[EC2ClientTypes.FleetLaunchTemplateOverridesRequest]? = nil - if let overridesContainer = overridesContainer { - overridesBuffer = [EC2ClientTypes.FleetLaunchTemplateOverridesRequest]() - for structureContainer0 in overridesContainer { - overridesBuffer?.append(structureContainer0) - } - } - overrides = overridesBuffer - } else { - overrides = [] - } - } else { - overrides = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetLaunchTemplateConfigRequest() + value.launchTemplateSpecification = try reader["LaunchTemplateSpecification"].readIfPresent(readingClosure: EC2ClientTypes.FleetLaunchTemplateSpecificationRequest.readingClosure) + value.overrides = try reader["Overrides"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FleetLaunchTemplateOverridesRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -94033,18 +64336,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FleetLaunchTemplateOverrides: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case imageId = "imageId" - case instanceRequirements = "instanceRequirements" - case instanceType = "instanceType" - case maxPrice = "maxPrice" - case placement = "placement" - case priority = "priority" - case subnetId = "subnetId" - case weightedCapacity = "weightedCapacity" - } +extension EC2ClientTypes.FleetLaunchTemplateOverrides: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94077,26 +64369,21 @@ extension EC2ClientTypes.FleetLaunchTemplateOverrides: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let maxPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxPrice) - maxPrice = maxPriceDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let weightedCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .weightedCapacity) - weightedCapacity = weightedCapacityDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .priority) - priority = priorityDecoded - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlacementResponse.self, forKey: .placement) - placement = placementDecoded - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirements.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetLaunchTemplateOverrides() + value.instanceType = try reader["instanceType"].readIfPresent() + value.maxPrice = try reader["maxPrice"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.weightedCapacity = try reader["weightedCapacity"].readIfPresent() + value.priority = try reader["priority"].readIfPresent() + value.placement = try reader["placement"].readIfPresent(readingClosure: EC2ClientTypes.PlacementResponse.readingClosure) + value.instanceRequirements = try reader["instanceRequirements"].readIfPresent(readingClosure: EC2ClientTypes.InstanceRequirements.readingClosure) + value.imageId = try reader["imageId"].readIfPresent() + return value + } } } @@ -94148,18 +64435,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FleetLaunchTemplateOverridesRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "AvailabilityZone" - case imageId = "ImageId" - case instanceRequirements = "InstanceRequirements" - case instanceType = "InstanceType" - case maxPrice = "MaxPrice" - case placement = "Placement" - case priority = "Priority" - case subnetId = "SubnetId" - case weightedCapacity = "WeightedCapacity" - } +extension EC2ClientTypes.FleetLaunchTemplateOverridesRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94192,26 +64468,21 @@ extension EC2ClientTypes.FleetLaunchTemplateOverridesRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let maxPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxPrice) - maxPrice = maxPriceDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let weightedCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .weightedCapacity) - weightedCapacity = weightedCapacityDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .priority) - priority = priorityDecoded - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Placement.self, forKey: .placement) - placement = placementDecoded - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirementsRequest.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetLaunchTemplateOverridesRequest() + value.instanceType = try reader["InstanceType"].readIfPresent() + value.maxPrice = try reader["MaxPrice"].readIfPresent() + value.subnetId = try reader["SubnetId"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.weightedCapacity = try reader["WeightedCapacity"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() + value.placement = try reader["Placement"].readIfPresent(readingClosure: EC2ClientTypes.Placement.readingClosure) + value.instanceRequirements = try reader["InstanceRequirements"].readIfPresent(readingClosure: EC2ClientTypes.InstanceRequirementsRequest.readingClosure) + value.imageId = try reader["ImageId"].readIfPresent() + return value + } } } @@ -94263,12 +64534,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FleetLaunchTemplateSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateId = "launchTemplateId" - case launchTemplateName = "launchTemplateName" - case version = "version" - } +extension EC2ClientTypes.FleetLaunchTemplateSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94283,14 +64549,15 @@ extension EC2ClientTypes.FleetLaunchTemplateSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetLaunchTemplateSpecification() + value.launchTemplateId = try reader["launchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["launchTemplateName"].readIfPresent() + value.version = try reader["version"].readIfPresent() + return value + } } } @@ -94318,12 +64585,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FleetLaunchTemplateSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateId = "LaunchTemplateId" - case launchTemplateName = "LaunchTemplateName" - case version = "Version" - } +extension EC2ClientTypes.FleetLaunchTemplateSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94338,14 +64600,15 @@ extension EC2ClientTypes.FleetLaunchTemplateSpecificationRequest: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetLaunchTemplateSpecificationRequest() + value.launchTemplateId = try reader["LaunchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["LaunchTemplateName"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -94437,11 +64700,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FleetSpotCapacityRebalance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replacementStrategy = "replacementStrategy" - case terminationDelay = "terminationDelay" - } +extension EC2ClientTypes.FleetSpotCapacityRebalance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94453,12 +64712,14 @@ extension EC2ClientTypes.FleetSpotCapacityRebalance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replacementStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetReplacementStrategy.self, forKey: .replacementStrategy) - replacementStrategy = replacementStrategyDecoded - let terminationDelayDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .terminationDelay) - terminationDelay = terminationDelayDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetSpotCapacityRebalance() + value.replacementStrategy = try reader["replacementStrategy"].readIfPresent() + value.terminationDelay = try reader["terminationDelay"].readIfPresent() + return value + } } } @@ -94482,11 +64743,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FleetSpotCapacityRebalanceRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replacementStrategy = "ReplacementStrategy" - case terminationDelay = "TerminationDelay" - } +extension EC2ClientTypes.FleetSpotCapacityRebalanceRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94498,12 +64755,14 @@ extension EC2ClientTypes.FleetSpotCapacityRebalanceRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replacementStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetReplacementStrategy.self, forKey: .replacementStrategy) - replacementStrategy = replacementStrategyDecoded - let terminationDelayDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .terminationDelay) - terminationDelay = terminationDelayDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetSpotCapacityRebalanceRequest() + value.replacementStrategy = try reader["ReplacementStrategy"].readIfPresent() + value.terminationDelay = try reader["TerminationDelay"].readIfPresent() + return value + } } } @@ -94527,10 +64786,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FleetSpotMaintenanceStrategies: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityRebalance = "capacityRebalance" - } +extension EC2ClientTypes.FleetSpotMaintenanceStrategies: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94539,10 +64795,13 @@ extension EC2ClientTypes.FleetSpotMaintenanceStrategies: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityRebalanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetSpotCapacityRebalance.self, forKey: .capacityRebalance) - capacityRebalance = capacityRebalanceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetSpotMaintenanceStrategies() + value.capacityRebalance = try reader["capacityRebalance"].readIfPresent(readingClosure: EC2ClientTypes.FleetSpotCapacityRebalance.readingClosure) + return value + } } } @@ -94562,10 +64821,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FleetSpotMaintenanceStrategiesRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityRebalance = "CapacityRebalance" - } +extension EC2ClientTypes.FleetSpotMaintenanceStrategiesRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94574,10 +64830,13 @@ extension EC2ClientTypes.FleetSpotMaintenanceStrategiesRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityRebalanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetSpotCapacityRebalanceRequest.self, forKey: .capacityRebalance) - capacityRebalance = capacityRebalanceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FleetSpotMaintenanceStrategiesRequest() + value.capacityRebalance = try reader["CapacityRebalance"].readIfPresent(readingClosure: EC2ClientTypes.FleetSpotCapacityRebalanceRequest.readingClosure) + return value + } } } @@ -94679,25 +64938,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FlowLog: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case deliverCrossAccountRole = "deliverCrossAccountRole" - case deliverLogsErrorMessage = "deliverLogsErrorMessage" - case deliverLogsPermissionArn = "deliverLogsPermissionArn" - case deliverLogsStatus = "deliverLogsStatus" - case destinationOptions = "destinationOptions" - case flowLogId = "flowLogId" - case flowLogStatus = "flowLogStatus" - case logDestination = "logDestination" - case logDestinationType = "logDestinationType" - case logFormat = "logFormat" - case logGroupName = "logGroupName" - case maxAggregationInterval = "maxAggregationInterval" - case resourceId = "resourceId" - case tags = "tagSet" - case trafficType = "trafficType" - } +extension EC2ClientTypes.FlowLog: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94760,57 +65001,28 @@ extension EC2ClientTypes.FlowLog: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let deliverLogsErrorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliverLogsErrorMessage) - deliverLogsErrorMessage = deliverLogsErrorMessageDecoded - let deliverLogsPermissionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliverLogsPermissionArn) - deliverLogsPermissionArn = deliverLogsPermissionArnDecoded - let deliverCrossAccountRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliverCrossAccountRole) - deliverCrossAccountRole = deliverCrossAccountRoleDecoded - let deliverLogsStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliverLogsStatus) - deliverLogsStatus = deliverLogsStatusDecoded - let flowLogIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .flowLogId) - flowLogId = flowLogIdDecoded - let flowLogStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .flowLogStatus) - flowLogStatus = flowLogStatusDecoded - let logGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logGroupName) - logGroupName = logGroupNameDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let trafficTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficType.self, forKey: .trafficType) - trafficType = trafficTypeDecoded - let logDestinationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LogDestinationType.self, forKey: .logDestinationType) - logDestinationType = logDestinationTypeDecoded - let logDestinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logDestination) - logDestination = logDestinationDecoded - let logFormatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logFormat) - logFormat = logFormatDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let maxAggregationIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAggregationInterval) - maxAggregationInterval = maxAggregationIntervalDecoded - let destinationOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DestinationOptionsResponse.self, forKey: .destinationOptions) - destinationOptions = destinationOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FlowLog() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.deliverLogsErrorMessage = try reader["deliverLogsErrorMessage"].readIfPresent() + value.deliverLogsPermissionArn = try reader["deliverLogsPermissionArn"].readIfPresent() + value.deliverCrossAccountRole = try reader["deliverCrossAccountRole"].readIfPresent() + value.deliverLogsStatus = try reader["deliverLogsStatus"].readIfPresent() + value.flowLogId = try reader["flowLogId"].readIfPresent() + value.flowLogStatus = try reader["flowLogStatus"].readIfPresent() + value.logGroupName = try reader["logGroupName"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.trafficType = try reader["trafficType"].readIfPresent() + value.logDestinationType = try reader["logDestinationType"].readIfPresent() + value.logDestination = try reader["logDestination"].readIfPresent() + value.logFormat = try reader["logFormat"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.maxAggregationInterval = try reader["maxAggregationInterval"].readIfPresent() + value.destinationOptions = try reader["destinationOptions"].readIfPresent(readingClosure: EC2ClientTypes.DestinationOptionsResponse.readingClosure) + return value + } } } @@ -94931,13 +65143,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FpgaDeviceInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "count" - case manufacturer = "manufacturer" - case memoryInfo = "memoryInfo" - case name = "name" - } +extension EC2ClientTypes.FpgaDeviceInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -94955,16 +65161,16 @@ extension EC2ClientTypes.FpgaDeviceInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let manufacturerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .manufacturer) - manufacturer = manufacturerDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded - let memoryInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FpgaDeviceMemoryInfo.self, forKey: .memoryInfo) - memoryInfo = memoryInfoDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FpgaDeviceInfo() + value.name = try reader["name"].readIfPresent() + value.manufacturer = try reader["manufacturer"].readIfPresent() + value.count = try reader["count"].readIfPresent() + value.memoryInfo = try reader["memoryInfo"].readIfPresent(readingClosure: EC2ClientTypes.FpgaDeviceMemoryInfo.readingClosure) + return value + } } } @@ -94996,10 +65202,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FpgaDeviceMemoryInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sizeInMiB = "sizeInMiB" - } +extension EC2ClientTypes.FpgaDeviceMemoryInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -95008,10 +65211,13 @@ extension EC2ClientTypes.FpgaDeviceMemoryInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sizeInMiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sizeInMiB) - sizeInMiB = sizeInMiBDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FpgaDeviceMemoryInfo() + value.sizeInMiB = try reader["sizeInMiB"].readIfPresent() + return value + } } } @@ -95031,25 +65237,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FpgaImage: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "createTime" - case dataRetentionSupport = "dataRetentionSupport" - case description = "description" - case fpgaImageGlobalId = "fpgaImageGlobalId" - case fpgaImageId = "fpgaImageId" - case instanceTypes = "instanceTypes" - case name = "name" - case ownerAlias = "ownerAlias" - case ownerId = "ownerId" - case pciId = "pciId" - case productCodes = "productCodes" - case `public` = "public" - case shellVersion = "shellVersion" - case state = "state" - case tags = "tags" - case updateTime = "updateTime" - } +extension EC2ClientTypes.FpgaImage: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -95130,90 +65318,27 @@ extension EC2ClientTypes.FpgaImage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageId) - fpgaImageId = fpgaImageIdDecoded - let fpgaImageGlobalIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageGlobalId) - fpgaImageGlobalId = fpgaImageGlobalIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let shellVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .shellVersion) - shellVersion = shellVersionDecoded - let pciIdDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PciId.self, forKey: .pciId) - pciId = pciIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FpgaImageState.self, forKey: .state) - state = stateDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let updateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateTime) - updateTime = updateTimeDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ownerAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAlias) - ownerAlias = ownerAliasDecoded - if containerValues.contains(.productCodes) { - struct KeyVal0{struct item{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ProductCode].self, forKey: .member) - var productCodesBuffer:[EC2ClientTypes.ProductCode]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [EC2ClientTypes.ProductCode]() - for structureContainer0 in productCodesContainer { - productCodesBuffer?.append(structureContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let publicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .public) - `public` = publicDecoded - let dataRetentionSupportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dataRetentionSupport) - dataRetentionSupport = dataRetentionSupportDecoded - if containerValues.contains(.instanceTypes) { - struct KeyVal0{struct item{}} - let instanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypes) - if let instanceTypesWrappedContainer = instanceTypesWrappedContainer { - let instanceTypesContainer = try instanceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceTypesBuffer:[Swift.String]? = nil - if let instanceTypesContainer = instanceTypesContainer { - instanceTypesBuffer = [Swift.String]() - for stringContainer0 in instanceTypesContainer { - instanceTypesBuffer?.append(stringContainer0) - } - } - instanceTypes = instanceTypesBuffer - } else { - instanceTypes = [] - } - } else { - instanceTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FpgaImage() + value.fpgaImageId = try reader["fpgaImageId"].readIfPresent() + value.fpgaImageGlobalId = try reader["fpgaImageGlobalId"].readIfPresent() + value.name = try reader["name"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.shellVersion = try reader["shellVersion"].readIfPresent() + value.pciId = try reader["pciId"].readIfPresent(readingClosure: EC2ClientTypes.PciId.readingClosure) + value.state = try reader["state"].readIfPresent(readingClosure: EC2ClientTypes.FpgaImageState.readingClosure) + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.updateTime = try reader["updateTime"].readTimestampIfPresent(format: .dateTime) + value.ownerId = try reader["ownerId"].readIfPresent() + value.ownerAlias = try reader["ownerAlias"].readIfPresent() + value.productCodes = try reader["productCodes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ProductCode.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tags"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.`public` = try reader["public"].readIfPresent() + value.dataRetentionSupport = try reader["dataRetentionSupport"].readIfPresent() + value.instanceTypes = try reader["instanceTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -95294,14 +65419,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.FpgaImageAttribute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case fpgaImageId = "fpgaImageId" - case loadPermissions = "loadPermissions" - case name = "name" - case productCodes = "productCodes" - } +extension EC2ClientTypes.FpgaImageAttribute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -95340,51 +65458,16 @@ extension EC2ClientTypes.FpgaImageAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageId) - fpgaImageId = fpgaImageIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.loadPermissions) { - struct KeyVal0{struct item{}} - let loadPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadPermissions) - if let loadPermissionsWrappedContainer = loadPermissionsWrappedContainer { - let loadPermissionsContainer = try loadPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.LoadPermission].self, forKey: .member) - var loadPermissionsBuffer:[EC2ClientTypes.LoadPermission]? = nil - if let loadPermissionsContainer = loadPermissionsContainer { - loadPermissionsBuffer = [EC2ClientTypes.LoadPermission]() - for structureContainer0 in loadPermissionsContainer { - loadPermissionsBuffer?.append(structureContainer0) - } - } - loadPermissions = loadPermissionsBuffer - } else { - loadPermissions = [] - } - } else { - loadPermissions = nil - } - if containerValues.contains(.productCodes) { - struct KeyVal0{struct item{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ProductCode].self, forKey: .member) - var productCodesBuffer:[EC2ClientTypes.ProductCode]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [EC2ClientTypes.ProductCode]() - for structureContainer0 in productCodesContainer { - productCodesBuffer?.append(structureContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FpgaImageAttribute() + value.fpgaImageId = try reader["fpgaImageId"].readIfPresent() + value.name = try reader["name"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.loadPermissions = try reader["loadPermissions"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LoadPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.productCodes = try reader["productCodes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ProductCode.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -95459,11 +65542,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FpgaImageState: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.FpgaImageState: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -95475,12 +65554,14 @@ extension EC2ClientTypes.FpgaImageState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FpgaImageStateCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FpgaImageState() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -95550,11 +65631,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.FpgaInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fpgas = "fpgas" - case totalFpgaMemoryInMiB = "totalFpgaMemoryInMiB" - } +extension EC2ClientTypes.FpgaInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -95575,29 +65652,14 @@ extension EC2ClientTypes.FpgaInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.fpgas) { - struct KeyVal0{struct item{}} - let fpgasWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fpgas) - if let fpgasWrappedContainer = fpgasWrappedContainer { - let fpgasContainer = try fpgasWrappedContainer.decodeIfPresent([EC2ClientTypes.FpgaDeviceInfo].self, forKey: .member) - var fpgasBuffer:[EC2ClientTypes.FpgaDeviceInfo]? = nil - if let fpgasContainer = fpgasContainer { - fpgasBuffer = [EC2ClientTypes.FpgaDeviceInfo]() - for structureContainer0 in fpgasContainer { - fpgasBuffer?.append(structureContainer0) - } - } - fpgas = fpgasBuffer - } else { - fpgas = [] - } - } else { - fpgas = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.FpgaInfo() + value.fpgas = try reader["fpgas"].readListIfPresent(memberReadingClosure: EC2ClientTypes.FpgaDeviceInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.totalFpgaMemoryInMiB = try reader["totalFpgaMemoryInMiB"].readIfPresent() + return value } - let totalFpgaMemoryInMiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalFpgaMemoryInMiB) - totalFpgaMemoryInMiB = totalFpgaMemoryInMiBDecoded } } @@ -95726,34 +65788,15 @@ public struct GetAssociatedEnclaveCertificateIamRolesInput: Swift.Equatable { } } -struct GetAssociatedEnclaveCertificateIamRolesInputBody: Swift.Equatable { - let certificateArn: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetAssociatedEnclaveCertificateIamRolesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateArn = "CertificateArn" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetAssociatedEnclaveCertificateIamRolesOutput { -extension GetAssociatedEnclaveCertificateIamRolesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAssociatedEnclaveCertificateIamRolesOutputBody = try responseDecoder.decode(responseBody: data) - self.associatedRoles = output.associatedRoles - } else { - self.associatedRoles = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAssociatedEnclaveCertificateIamRolesOutput() + value.associatedRoles = try reader["associatedRoleSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AssociatedRole.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -95770,44 +65813,18 @@ public struct GetAssociatedEnclaveCertificateIamRolesOutput: Swift.Equatable { } } -struct GetAssociatedEnclaveCertificateIamRolesOutputBody: Swift.Equatable { - let associatedRoles: [EC2ClientTypes.AssociatedRole]? -} - -extension GetAssociatedEnclaveCertificateIamRolesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedRoles = "associatedRoleSet" - } +enum GetAssociatedEnclaveCertificateIamRolesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.associatedRoles) { - struct KeyVal0{struct item{}} - let associatedRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedRoles) - if let associatedRolesWrappedContainer = associatedRolesWrappedContainer { - let associatedRolesContainer = try associatedRolesWrappedContainer.decodeIfPresent([EC2ClientTypes.AssociatedRole].self, forKey: .member) - var associatedRolesBuffer:[EC2ClientTypes.AssociatedRole]? = nil - if let associatedRolesContainer = associatedRolesContainer { - associatedRolesBuffer = [EC2ClientTypes.AssociatedRole]() - for structureContainer0 in associatedRolesContainer { - associatedRolesBuffer?.append(structureContainer0) - } - } - associatedRoles = associatedRolesBuffer - } else { - associatedRoles = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - associatedRoles = nil - } - } -} - -enum GetAssociatedEnclaveCertificateIamRolesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -95864,44 +65881,16 @@ public struct GetAssociatedIpv6PoolCidrsInput: Swift.Equatable { } } -struct GetAssociatedIpv6PoolCidrsInputBody: Swift.Equatable { - let poolId: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? -} - -extension GetAssociatedIpv6PoolCidrsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case poolId = "PoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetAssociatedIpv6PoolCidrsOutput { -extension GetAssociatedIpv6PoolCidrsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAssociatedIpv6PoolCidrsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipv6CidrAssociations = output.ipv6CidrAssociations - self.nextToken = output.nextToken - } else { - self.ipv6CidrAssociations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAssociatedIpv6PoolCidrsOutput() + value.ipv6CidrAssociations = try reader["ipv6CidrAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv6CidrAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -95922,48 +65911,18 @@ public struct GetAssociatedIpv6PoolCidrsOutput: Swift.Equatable { } } -struct GetAssociatedIpv6PoolCidrsOutputBody: Swift.Equatable { - let ipv6CidrAssociations: [EC2ClientTypes.Ipv6CidrAssociation]? - let nextToken: Swift.String? -} - -extension GetAssociatedIpv6PoolCidrsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6CidrAssociations = "ipv6CidrAssociationSet" - case nextToken = "nextToken" - } +enum GetAssociatedIpv6PoolCidrsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipv6CidrAssociations) { - struct KeyVal0{struct item{}} - let ipv6CidrAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6CidrAssociations) - if let ipv6CidrAssociationsWrappedContainer = ipv6CidrAssociationsWrappedContainer { - let ipv6CidrAssociationsContainer = try ipv6CidrAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6CidrAssociation].self, forKey: .member) - var ipv6CidrAssociationsBuffer:[EC2ClientTypes.Ipv6CidrAssociation]? = nil - if let ipv6CidrAssociationsContainer = ipv6CidrAssociationsContainer { - ipv6CidrAssociationsBuffer = [EC2ClientTypes.Ipv6CidrAssociation]() - for structureContainer0 in ipv6CidrAssociationsContainer { - ipv6CidrAssociationsBuffer?.append(structureContainer0) - } - } - ipv6CidrAssociations = ipv6CidrAssociationsBuffer - } else { - ipv6CidrAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipv6CidrAssociations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetAssociatedIpv6PoolCidrsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -96042,69 +66001,16 @@ public struct GetAwsNetworkPerformanceDataInput: Swift.Equatable { } } -struct GetAwsNetworkPerformanceDataInputBody: Swift.Equatable { - let dataQueries: [EC2ClientTypes.DataQuery]? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetAwsNetworkPerformanceDataInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataQueries = "DataQuery" - case dryRun = "DryRun" - case endTime = "EndTime" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dataQueries) { - struct KeyVal0{struct member{}} - let dataQueriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataQueries) - if let dataQueriesWrappedContainer = dataQueriesWrappedContainer { - let dataQueriesContainer = try dataQueriesWrappedContainer.decodeIfPresent([EC2ClientTypes.DataQuery].self, forKey: .member) - var dataQueriesBuffer:[EC2ClientTypes.DataQuery]? = nil - if let dataQueriesContainer = dataQueriesContainer { - dataQueriesBuffer = [EC2ClientTypes.DataQuery]() - for structureContainer0 in dataQueriesContainer { - dataQueriesBuffer?.append(structureContainer0) - } - } - dataQueries = dataQueriesBuffer - } else { - dataQueries = [] - } - } else { - dataQueries = nil - } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetAwsNetworkPerformanceDataOutput { -extension GetAwsNetworkPerformanceDataOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAwsNetworkPerformanceDataOutputBody = try responseDecoder.decode(responseBody: data) - self.dataResponses = output.dataResponses - self.nextToken = output.nextToken - } else { - self.dataResponses = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAwsNetworkPerformanceDataOutput() + value.dataResponses = try reader["dataResponseSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DataResponse.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -96125,48 +66031,18 @@ public struct GetAwsNetworkPerformanceDataOutput: Swift.Equatable { } } -struct GetAwsNetworkPerformanceDataOutputBody: Swift.Equatable { - let dataResponses: [EC2ClientTypes.DataResponse]? - let nextToken: Swift.String? -} - -extension GetAwsNetworkPerformanceDataOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataResponses = "dataResponseSet" - case nextToken = "nextToken" - } +enum GetAwsNetworkPerformanceDataOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dataResponses) { - struct KeyVal0{struct item{}} - let dataResponsesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataResponses) - if let dataResponsesWrappedContainer = dataResponsesWrappedContainer { - let dataResponsesContainer = try dataResponsesWrappedContainer.decodeIfPresent([EC2ClientTypes.DataResponse].self, forKey: .member) - var dataResponsesBuffer:[EC2ClientTypes.DataResponse]? = nil - if let dataResponsesContainer = dataResponsesContainer { - dataResponsesBuffer = [EC2ClientTypes.DataResponse]() - for structureContainer0 in dataResponsesContainer { - dataResponsesBuffer?.append(structureContainer0) - } - } - dataResponses = dataResponsesBuffer - } else { - dataResponses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - dataResponses = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetAwsNetworkPerformanceDataOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -96223,54 +66099,21 @@ public struct GetCapacityReservationUsageInput: Swift.Equatable { } } -struct GetCapacityReservationUsageInputBody: Swift.Equatable { - let capacityReservationId: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? -} - -extension GetCapacityReservationUsageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationId = "CapacityReservationId" - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetCapacityReservationUsageOutput { -extension GetCapacityReservationUsageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetCapacityReservationUsageOutputBody = try responseDecoder.decode(responseBody: data) - self.availableInstanceCount = output.availableInstanceCount - self.capacityReservationId = output.capacityReservationId - self.instanceType = output.instanceType - self.instanceUsages = output.instanceUsages - self.nextToken = output.nextToken - self.state = output.state - self.totalInstanceCount = output.totalInstanceCount - } else { - self.availableInstanceCount = nil - self.capacityReservationId = nil - self.instanceType = nil - self.instanceUsages = nil - self.nextToken = nil - self.state = nil - self.totalInstanceCount = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetCapacityReservationUsageOutput() + value.availableInstanceCount = try reader["availableInstanceCount"].readIfPresent() + value.capacityReservationId = try reader["capacityReservationId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.instanceUsages = try reader["instanceUsageSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceUsage.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.totalInstanceCount = try reader["totalInstanceCount"].readIfPresent() + return value } } } @@ -96321,68 +66164,18 @@ public struct GetCapacityReservationUsageOutput: Swift.Equatable { } } -struct GetCapacityReservationUsageOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let capacityReservationId: Swift.String? - let instanceType: Swift.String? - let totalInstanceCount: Swift.Int? - let availableInstanceCount: Swift.Int? - let state: EC2ClientTypes.CapacityReservationState? - let instanceUsages: [EC2ClientTypes.InstanceUsage]? -} - -extension GetCapacityReservationUsageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availableInstanceCount = "availableInstanceCount" - case capacityReservationId = "capacityReservationId" - case instanceType = "instanceType" - case instanceUsages = "instanceUsageSet" - case nextToken = "nextToken" - case state = "state" - case totalInstanceCount = "totalInstanceCount" - } +enum GetCapacityReservationUsageOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let totalInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalInstanceCount) - totalInstanceCount = totalInstanceCountDecoded - let availableInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .availableInstanceCount) - availableInstanceCount = availableInstanceCountDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.instanceUsages) { - struct KeyVal0{struct item{}} - let instanceUsagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceUsages) - if let instanceUsagesWrappedContainer = instanceUsagesWrappedContainer { - let instanceUsagesContainer = try instanceUsagesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceUsage].self, forKey: .member) - var instanceUsagesBuffer:[EC2ClientTypes.InstanceUsage]? = nil - if let instanceUsagesContainer = instanceUsagesContainer { - instanceUsagesBuffer = [EC2ClientTypes.InstanceUsage]() - for structureContainer0 in instanceUsagesContainer { - instanceUsagesBuffer?.append(structureContainer0) - } - } - instanceUsages = instanceUsagesBuffer - } else { - instanceUsages = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceUsages = nil - } - } -} - -enum GetCapacityReservationUsageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -96463,69 +66256,18 @@ public struct GetCoipPoolUsageInput: Swift.Equatable { } } -struct GetCoipPoolUsageInputBody: Swift.Equatable { - let poolId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetCoipPoolUsageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case poolId = "PoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetCoipPoolUsageOutput { -extension GetCoipPoolUsageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetCoipPoolUsageOutputBody = try responseDecoder.decode(responseBody: data) - self.coipAddressUsages = output.coipAddressUsages - self.coipPoolId = output.coipPoolId - self.localGatewayRouteTableId = output.localGatewayRouteTableId - self.nextToken = output.nextToken - } else { - self.coipAddressUsages = nil - self.coipPoolId = nil - self.localGatewayRouteTableId = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetCoipPoolUsageOutput() + value.coipAddressUsages = try reader["coipAddressUsageSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CoipAddressUsage.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.coipPoolId = try reader["coipPoolId"].readIfPresent() + value.localGatewayRouteTableId = try reader["localGatewayRouteTableId"].readIfPresent() + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -96554,56 +66296,18 @@ public struct GetCoipPoolUsageOutput: Swift.Equatable { } } -struct GetCoipPoolUsageOutputBody: Swift.Equatable { - let coipPoolId: Swift.String? - let coipAddressUsages: [EC2ClientTypes.CoipAddressUsage]? - let localGatewayRouteTableId: Swift.String? - let nextToken: Swift.String? -} - -extension GetCoipPoolUsageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coipAddressUsages = "coipAddressUsageSet" - case coipPoolId = "coipPoolId" - case localGatewayRouteTableId = "localGatewayRouteTableId" - case nextToken = "nextToken" - } +enum GetCoipPoolUsageOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coipPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coipPoolId) - coipPoolId = coipPoolIdDecoded - if containerValues.contains(.coipAddressUsages) { - struct KeyVal0{struct item{}} - let coipAddressUsagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .coipAddressUsages) - if let coipAddressUsagesWrappedContainer = coipAddressUsagesWrappedContainer { - let coipAddressUsagesContainer = try coipAddressUsagesWrappedContainer.decodeIfPresent([EC2ClientTypes.CoipAddressUsage].self, forKey: .member) - var coipAddressUsagesBuffer:[EC2ClientTypes.CoipAddressUsage]? = nil - if let coipAddressUsagesContainer = coipAddressUsagesContainer { - coipAddressUsagesBuffer = [EC2ClientTypes.CoipAddressUsage]() - for structureContainer0 in coipAddressUsagesContainer { - coipAddressUsagesBuffer?.append(structureContainer0) - } - } - coipAddressUsages = coipAddressUsagesBuffer - } else { - coipAddressUsages = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - coipAddressUsages = nil - } - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetCoipPoolUsageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -96653,42 +66357,17 @@ public struct GetConsoleOutputInput: Swift.Equatable { } } -struct GetConsoleOutputInputBody: Swift.Equatable { - let instanceId: Swift.String? - let dryRun: Swift.Bool? - let latest: Swift.Bool? -} - -extension GetConsoleOutputInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceId = "InstanceId" - case latest = "Latest" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let latestDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .latest) - latest = latestDecoded - } -} +extension GetConsoleOutputOutput { -extension GetConsoleOutputOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetConsoleOutputOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceId = output.instanceId - self.output = output.output - self.timestamp = output.timestamp - } else { - self.instanceId = nil - self.output = nil - self.timestamp = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetConsoleOutputOutput() + value.instanceId = try reader["instanceId"].readIfPresent() + value.output = try reader["output"].readIfPresent() + value.timestamp = try reader["timestamp"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -96713,35 +66392,18 @@ public struct GetConsoleOutputOutput: Swift.Equatable { } } -struct GetConsoleOutputOutputBody: Swift.Equatable { - let instanceId: Swift.String? - let output: Swift.String? - let timestamp: ClientRuntime.Date? -} - -extension GetConsoleOutputOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - case output = "output" - case timestamp = "timestamp" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let outputDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .output) - output = outputDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - } -} +enum GetConsoleOutputOutputError { -enum GetConsoleOutputOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -96791,40 +66453,16 @@ public struct GetConsoleScreenshotInput: Swift.Equatable { } } -struct GetConsoleScreenshotInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceId: Swift.String? - let wakeUp: Swift.Bool? -} - -extension GetConsoleScreenshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceId = "InstanceId" - case wakeUp = "WakeUp" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let wakeUpDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .wakeUp) - wakeUp = wakeUpDecoded - } -} +extension GetConsoleScreenshotOutput { -extension GetConsoleScreenshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetConsoleScreenshotOutputBody = try responseDecoder.decode(responseBody: data) - self.imageData = output.imageData - self.instanceId = output.instanceId - } else { - self.imageData = nil - self.instanceId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetConsoleScreenshotOutput() + value.imageData = try reader["imageData"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + return value } } } @@ -96845,31 +66483,18 @@ public struct GetConsoleScreenshotOutput: Swift.Equatable { } } -struct GetConsoleScreenshotOutputBody: Swift.Equatable { - let imageData: Swift.String? - let instanceId: Swift.String? -} - -extension GetConsoleScreenshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageData = "imageData" - case instanceId = "instanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageData) - imageData = imageDataDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - } -} +enum GetConsoleScreenshotOutputError { -enum GetConsoleScreenshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -96912,34 +66537,15 @@ public struct GetDefaultCreditSpecificationInput: Swift.Equatable { } } -struct GetDefaultCreditSpecificationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceFamily: EC2ClientTypes.UnlimitedSupportedInstanceFamily? -} - -extension GetDefaultCreditSpecificationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceFamily = "InstanceFamily" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceFamilyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UnlimitedSupportedInstanceFamily.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - } -} +extension GetDefaultCreditSpecificationOutput { -extension GetDefaultCreditSpecificationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetDefaultCreditSpecificationOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceFamilyCreditSpecification = output.instanceFamilyCreditSpecification - } else { - self.instanceFamilyCreditSpecification = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetDefaultCreditSpecificationOutput() + value.instanceFamilyCreditSpecification = try reader["instanceFamilyCreditSpecification"].readIfPresent(readingClosure: EC2ClientTypes.InstanceFamilyCreditSpecification.readingClosure) + return value } } } @@ -96956,27 +66562,18 @@ public struct GetDefaultCreditSpecificationOutput: Swift.Equatable { } } -struct GetDefaultCreditSpecificationOutputBody: Swift.Equatable { - let instanceFamilyCreditSpecification: EC2ClientTypes.InstanceFamilyCreditSpecification? -} - -extension GetDefaultCreditSpecificationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceFamilyCreditSpecification = "instanceFamilyCreditSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceFamilyCreditSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceFamilyCreditSpecification.self, forKey: .instanceFamilyCreditSpecification) - instanceFamilyCreditSpecification = instanceFamilyCreditSpecificationDecoded - } -} +enum GetDefaultCreditSpecificationOutputError { -enum GetDefaultCreditSpecificationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -97011,30 +66608,15 @@ public struct GetEbsDefaultKmsKeyIdInput: Swift.Equatable { } } -struct GetEbsDefaultKmsKeyIdInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension GetEbsDefaultKmsKeyIdInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetEbsDefaultKmsKeyIdOutput { -extension GetEbsDefaultKmsKeyIdOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetEbsDefaultKmsKeyIdOutputBody = try responseDecoder.decode(responseBody: data) - self.kmsKeyId = output.kmsKeyId - } else { - self.kmsKeyId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetEbsDefaultKmsKeyIdOutput() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + return value } } } @@ -97051,27 +66633,18 @@ public struct GetEbsDefaultKmsKeyIdOutput: Swift.Equatable { } } -struct GetEbsDefaultKmsKeyIdOutputBody: Swift.Equatable { - let kmsKeyId: Swift.String? -} - -extension GetEbsDefaultKmsKeyIdOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kmsKeyId = "kmsKeyId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - } -} +enum GetEbsDefaultKmsKeyIdOutputError { -enum GetEbsDefaultKmsKeyIdOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -97106,32 +66679,16 @@ public struct GetEbsEncryptionByDefaultInput: Swift.Equatable { } } -struct GetEbsEncryptionByDefaultInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension GetEbsEncryptionByDefaultInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetEbsEncryptionByDefaultOutput { -extension GetEbsEncryptionByDefaultOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetEbsEncryptionByDefaultOutputBody = try responseDecoder.decode(responseBody: data) - self.ebsEncryptionByDefault = output.ebsEncryptionByDefault - self.sseType = output.sseType - } else { - self.ebsEncryptionByDefault = nil - self.sseType = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetEbsEncryptionByDefaultOutput() + value.ebsEncryptionByDefault = try reader["ebsEncryptionByDefault"].readIfPresent() + value.sseType = try reader["sseType"].readIfPresent() + return value } } } @@ -97152,31 +66709,18 @@ public struct GetEbsEncryptionByDefaultOutput: Swift.Equatable { } } -struct GetEbsEncryptionByDefaultOutputBody: Swift.Equatable { - let ebsEncryptionByDefault: Swift.Bool? - let sseType: EC2ClientTypes.SSEType? -} - -extension GetEbsEncryptionByDefaultOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ebsEncryptionByDefault = "ebsEncryptionByDefault" - case sseType = "sseType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ebsEncryptionByDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsEncryptionByDefault) - ebsEncryptionByDefault = ebsEncryptionByDefaultDecoded - let sseTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SSEType.self, forKey: .sseType) - sseType = sseTypeDecoded - } -} +enum GetEbsEncryptionByDefaultOutputError { -enum GetEbsEncryptionByDefaultOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -97235,42 +66779,15 @@ public struct GetFlowLogsIntegrationTemplateInput: Swift.Equatable { } } -struct GetFlowLogsIntegrationTemplateInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let flowLogId: Swift.String? - let configDeliveryS3DestinationArn: Swift.String? - let integrateServices: EC2ClientTypes.IntegrateServices? -} - -extension GetFlowLogsIntegrationTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configDeliveryS3DestinationArn = "ConfigDeliveryS3DestinationArn" - case dryRun = "DryRun" - case flowLogId = "FlowLogId" - case integrateServices = "IntegrateService" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let flowLogIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .flowLogId) - flowLogId = flowLogIdDecoded - let configDeliveryS3DestinationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configDeliveryS3DestinationArn) - configDeliveryS3DestinationArn = configDeliveryS3DestinationArnDecoded - let integrateServicesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IntegrateServices.self, forKey: .integrateServices) - integrateServices = integrateServicesDecoded - } -} +extension GetFlowLogsIntegrationTemplateOutput { -extension GetFlowLogsIntegrationTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetFlowLogsIntegrationTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.result = output.result - } else { - self.result = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetFlowLogsIntegrationTemplateOutput() + value.result = try reader["result"].readIfPresent() + return value } } } @@ -97287,27 +66804,18 @@ public struct GetFlowLogsIntegrationTemplateOutput: Swift.Equatable { } } -struct GetFlowLogsIntegrationTemplateOutputBody: Swift.Equatable { - let result: Swift.String? -} - -extension GetFlowLogsIntegrationTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case result = "result" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resultDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .result) - result = resultDecoded - } -} +enum GetFlowLogsIntegrationTemplateOutputError { -enum GetFlowLogsIntegrationTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -97364,44 +66872,16 @@ public struct GetGroupsForCapacityReservationInput: Swift.Equatable { } } -struct GetGroupsForCapacityReservationInputBody: Swift.Equatable { - let capacityReservationId: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? -} - -extension GetGroupsForCapacityReservationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationId = "CapacityReservationId" - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension GetGroupsForCapacityReservationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension GetGroupsForCapacityReservationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetGroupsForCapacityReservationOutputBody = try responseDecoder.decode(responseBody: data) - self.capacityReservationGroups = output.capacityReservationGroups - self.nextToken = output.nextToken - } else { - self.capacityReservationGroups = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetGroupsForCapacityReservationOutput() + value.capacityReservationGroups = try reader["capacityReservationGroupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CapacityReservationGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -97422,48 +66902,18 @@ public struct GetGroupsForCapacityReservationOutput: Swift.Equatable { } } -struct GetGroupsForCapacityReservationOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let capacityReservationGroups: [EC2ClientTypes.CapacityReservationGroup]? -} - -extension GetGroupsForCapacityReservationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationGroups = "capacityReservationGroupSet" - case nextToken = "nextToken" - } +enum GetGroupsForCapacityReservationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.capacityReservationGroups) { - struct KeyVal0{struct item{}} - let capacityReservationGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .capacityReservationGroups) - if let capacityReservationGroupsWrappedContainer = capacityReservationGroupsWrappedContainer { - let capacityReservationGroupsContainer = try capacityReservationGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.CapacityReservationGroup].self, forKey: .member) - var capacityReservationGroupsBuffer:[EC2ClientTypes.CapacityReservationGroup]? = nil - if let capacityReservationGroupsContainer = capacityReservationGroupsContainer { - capacityReservationGroupsBuffer = [EC2ClientTypes.CapacityReservationGroup]() - for structureContainer0 in capacityReservationGroupsContainer { - capacityReservationGroupsBuffer?.append(structureContainer0) - } - } - capacityReservationGroups = capacityReservationGroupsBuffer - } else { - capacityReservationGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - capacityReservationGroups = nil - } - } -} - -enum GetGroupsForCapacityReservationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -97516,57 +66966,18 @@ public struct GetHostReservationPurchasePreviewInput: Swift.Equatable { } } -struct GetHostReservationPurchasePreviewInputBody: Swift.Equatable { - let hostIdSet: [Swift.String]? - let offeringId: Swift.String? -} - -extension GetHostReservationPurchasePreviewInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostIdSet = "HostIdSet" - case offeringId = "OfferingId" - } +extension GetHostReservationPurchasePreviewOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.hostIdSet) { - struct KeyVal0{struct item{}} - let hostIdSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostIdSet) - if let hostIdSetWrappedContainer = hostIdSetWrappedContainer { - let hostIdSetContainer = try hostIdSetWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostIdSetBuffer:[Swift.String]? = nil - if let hostIdSetContainer = hostIdSetContainer { - hostIdSetBuffer = [Swift.String]() - for stringContainer0 in hostIdSetContainer { - hostIdSetBuffer?.append(stringContainer0) - } - } - hostIdSet = hostIdSetBuffer - } else { - hostIdSet = [] - } - } else { - hostIdSet = nil - } - let offeringIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringId) - offeringId = offeringIdDecoded - } -} - -extension GetHostReservationPurchasePreviewOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetHostReservationPurchasePreviewOutputBody = try responseDecoder.decode(responseBody: data) - self.currencyCode = output.currencyCode - self.purchase = output.purchase - self.totalHourlyPrice = output.totalHourlyPrice - self.totalUpfrontPrice = output.totalUpfrontPrice - } else { - self.currencyCode = nil - self.purchase = nil - self.totalHourlyPrice = nil - self.totalUpfrontPrice = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetHostReservationPurchasePreviewOutput() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.purchase = try reader["purchase"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Purchase.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.totalHourlyPrice = try reader["totalHourlyPrice"].readIfPresent() + value.totalUpfrontPrice = try reader["totalUpfrontPrice"].readIfPresent() + return value } } } @@ -97595,56 +67006,18 @@ public struct GetHostReservationPurchasePreviewOutput: Swift.Equatable { } } -struct GetHostReservationPurchasePreviewOutputBody: Swift.Equatable { - let currencyCode: EC2ClientTypes.CurrencyCodeValues? - let purchase: [EC2ClientTypes.Purchase]? - let totalHourlyPrice: Swift.String? - let totalUpfrontPrice: Swift.String? -} - -extension GetHostReservationPurchasePreviewOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currencyCode = "currencyCode" - case purchase = "purchase" - case totalHourlyPrice = "totalHourlyPrice" - case totalUpfrontPrice = "totalUpfrontPrice" - } +enum GetHostReservationPurchasePreviewOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - if containerValues.contains(.purchase) { - struct KeyVal0{struct item{}} - let purchaseWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .purchase) - if let purchaseWrappedContainer = purchaseWrappedContainer { - let purchaseContainer = try purchaseWrappedContainer.decodeIfPresent([EC2ClientTypes.Purchase].self, forKey: .member) - var purchaseBuffer:[EC2ClientTypes.Purchase]? = nil - if let purchaseContainer = purchaseContainer { - purchaseBuffer = [EC2ClientTypes.Purchase]() - for structureContainer0 in purchaseContainer { - purchaseBuffer?.append(structureContainer0) - } - } - purchase = purchaseBuffer - } else { - purchase = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - purchase = nil - } - let totalHourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .totalHourlyPrice) - totalHourlyPrice = totalHourlyPriceDecoded - let totalUpfrontPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .totalUpfrontPrice) - totalUpfrontPrice = totalUpfrontPriceDecoded - } -} - -enum GetHostReservationPurchasePreviewOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -97679,30 +67052,15 @@ public struct GetImageBlockPublicAccessStateInput: Swift.Equatable { } } -struct GetImageBlockPublicAccessStateInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension GetImageBlockPublicAccessStateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } +extension GetImageBlockPublicAccessStateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension GetImageBlockPublicAccessStateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetImageBlockPublicAccessStateOutputBody = try responseDecoder.decode(responseBody: data) - self.imageBlockPublicAccessState = output.imageBlockPublicAccessState - } else { - self.imageBlockPublicAccessState = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetImageBlockPublicAccessStateOutput() + value.imageBlockPublicAccessState = try reader["imageBlockPublicAccessState"].readIfPresent() + return value } } } @@ -97723,27 +67081,18 @@ public struct GetImageBlockPublicAccessStateOutput: Swift.Equatable { } } -struct GetImageBlockPublicAccessStateOutputBody: Swift.Equatable { - let imageBlockPublicAccessState: Swift.String? -} +enum GetImageBlockPublicAccessStateOutputError { -extension GetImageBlockPublicAccessStateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageBlockPublicAccessState = "imageBlockPublicAccessState" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageBlockPublicAccessStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageBlockPublicAccessState) - imageBlockPublicAccessState = imageBlockPublicAccessStateDecoded - } -} - -enum GetImageBlockPublicAccessStateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -97834,86 +67183,16 @@ public struct GetInstanceTypesFromInstanceRequirementsInput: Swift.Equatable { } } -struct GetInstanceTypesFromInstanceRequirementsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let architectureTypes: [EC2ClientTypes.ArchitectureType]? - let virtualizationTypes: [EC2ClientTypes.VirtualizationType]? - let instanceRequirements: EC2ClientTypes.InstanceRequirementsRequest? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension GetInstanceTypesFromInstanceRequirementsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case architectureTypes = "ArchitectureType" - case dryRun = "DryRun" - case instanceRequirements = "InstanceRequirements" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case virtualizationTypes = "VirtualizationType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.architectureTypes) { - struct KeyVal0{struct item{}} - let architectureTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .architectureTypes) - if let architectureTypesWrappedContainer = architectureTypesWrappedContainer { - let architectureTypesContainer = try architectureTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.ArchitectureType].self, forKey: .member) - var architectureTypesBuffer:[EC2ClientTypes.ArchitectureType]? = nil - if let architectureTypesContainer = architectureTypesContainer { - architectureTypesBuffer = [EC2ClientTypes.ArchitectureType]() - for enumContainer0 in architectureTypesContainer { - architectureTypesBuffer?.append(enumContainer0) - } - } - architectureTypes = architectureTypesBuffer - } else { - architectureTypes = [] - } - } else { - architectureTypes = nil - } - if containerValues.contains(.virtualizationTypes) { - struct KeyVal0{struct item{}} - let virtualizationTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .virtualizationTypes) - if let virtualizationTypesWrappedContainer = virtualizationTypesWrappedContainer { - let virtualizationTypesContainer = try virtualizationTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.VirtualizationType].self, forKey: .member) - var virtualizationTypesBuffer:[EC2ClientTypes.VirtualizationType]? = nil - if let virtualizationTypesContainer = virtualizationTypesContainer { - virtualizationTypesBuffer = [EC2ClientTypes.VirtualizationType]() - for enumContainer0 in virtualizationTypesContainer { - virtualizationTypesBuffer?.append(enumContainer0) - } - } - virtualizationTypes = virtualizationTypesBuffer - } else { - virtualizationTypes = [] - } - } else { - virtualizationTypes = nil - } - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirementsRequest.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension GetInstanceTypesFromInstanceRequirementsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetInstanceTypesFromInstanceRequirementsOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceTypes = output.instanceTypes - self.nextToken = output.nextToken - } else { - self.instanceTypes = nil - self.nextToken = nil +extension GetInstanceTypesFromInstanceRequirementsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetInstanceTypesFromInstanceRequirementsOutput() + value.instanceTypes = try reader["instanceTypeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -97934,48 +67213,18 @@ public struct GetInstanceTypesFromInstanceRequirementsOutput: Swift.Equatable { } } -struct GetInstanceTypesFromInstanceRequirementsOutputBody: Swift.Equatable { - let instanceTypes: [EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements]? - let nextToken: Swift.String? -} - -extension GetInstanceTypesFromInstanceRequirementsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceTypes = "instanceTypeSet" - case nextToken = "nextToken" - } +enum GetInstanceTypesFromInstanceRequirementsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceTypes) { - struct KeyVal0{struct item{}} - let instanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypes) - if let instanceTypesWrappedContainer = instanceTypesWrappedContainer { - let instanceTypesContainer = try instanceTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements].self, forKey: .member) - var instanceTypesBuffer:[EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements]? = nil - if let instanceTypesContainer = instanceTypesContainer { - instanceTypesBuffer = [EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements]() - for structureContainer0 in instanceTypesContainer { - instanceTypesBuffer?.append(structureContainer0) - } - } - instanceTypes = instanceTypesBuffer - } else { - instanceTypes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceTypes = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetInstanceTypesFromInstanceRequirementsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -98018,36 +67267,16 @@ public struct GetInstanceUefiDataInput: Swift.Equatable { } } -struct GetInstanceUefiDataInputBody: Swift.Equatable { - let instanceId: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetInstanceUefiDataInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceId = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetInstanceUefiDataOutput { -extension GetInstanceUefiDataOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetInstanceUefiDataOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceId = output.instanceId - self.uefiData = output.uefiData - } else { - self.instanceId = nil - self.uefiData = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetInstanceUefiDataOutput() + value.instanceId = try reader["instanceId"].readIfPresent() + value.uefiData = try reader["uefiData"].readIfPresent() + return value } } } @@ -98068,31 +67297,18 @@ public struct GetInstanceUefiDataOutput: Swift.Equatable { } } -struct GetInstanceUefiDataOutputBody: Swift.Equatable { - let instanceId: Swift.String? - let uefiData: Swift.String? -} - -extension GetInstanceUefiDataOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - case uefiData = "uefiData" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let uefiDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uefiData) - uefiData = uefiDataDecoded - } -} +enum GetInstanceUefiDataOutputError { -enum GetInstanceUefiDataOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -98178,60 +67394,16 @@ public struct GetIpamAddressHistoryInput: Swift.Equatable { } } -struct GetIpamAddressHistoryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let cidr: Swift.String? - let ipamScopeId: Swift.String? - let vpcId: Swift.String? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension GetIpamAddressHistoryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case dryRun = "DryRun" - case endTime = "EndTime" - case ipamScopeId = "IpamScopeId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case startTime = "StartTime" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let ipamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeId) - ipamScopeId = ipamScopeIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension GetIpamAddressHistoryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIpamAddressHistoryOutputBody = try responseDecoder.decode(responseBody: data) - self.historyRecords = output.historyRecords - self.nextToken = output.nextToken - } else { - self.historyRecords = nil - self.nextToken = nil +extension GetIpamAddressHistoryOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetIpamAddressHistoryOutput() + value.historyRecords = try reader["historyRecordSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamAddressHistoryRecord.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -98252,48 +67424,18 @@ public struct GetIpamAddressHistoryOutput: Swift.Equatable { } } -struct GetIpamAddressHistoryOutputBody: Swift.Equatable { - let historyRecords: [EC2ClientTypes.IpamAddressHistoryRecord]? - let nextToken: Swift.String? -} +enum GetIpamAddressHistoryOutputError { -extension GetIpamAddressHistoryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case historyRecords = "historyRecordSet" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.historyRecords) { - struct KeyVal0{struct item{}} - let historyRecordsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .historyRecords) - if let historyRecordsWrappedContainer = historyRecordsWrappedContainer { - let historyRecordsContainer = try historyRecordsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamAddressHistoryRecord].self, forKey: .member) - var historyRecordsBuffer:[EC2ClientTypes.IpamAddressHistoryRecord]? = nil - if let historyRecordsContainer = historyRecordsContainer { - historyRecordsBuffer = [EC2ClientTypes.IpamAddressHistoryRecord]() - for structureContainer0 in historyRecordsContainer { - historyRecordsBuffer?.append(structureContainer0) - } - } - historyRecords = historyRecordsBuffer - } else { - historyRecords = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - historyRecords = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetIpamAddressHistoryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -98374,69 +67516,16 @@ public struct GetIpamDiscoveredAccountsInput: Swift.Equatable { } } -struct GetIpamDiscoveredAccountsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamResourceDiscoveryId: Swift.String? - let discoveryRegion: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension GetIpamDiscoveredAccountsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case discoveryRegion = "DiscoveryRegion" - case dryRun = "DryRun" - case filters = "Filter" - case ipamResourceDiscoveryId = "IpamResourceDiscoveryId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension GetIpamDiscoveredAccountsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - let discoveryRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .discoveryRegion) - discoveryRegion = discoveryRegionDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension GetIpamDiscoveredAccountsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIpamDiscoveredAccountsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamDiscoveredAccounts = output.ipamDiscoveredAccounts - self.nextToken = output.nextToken - } else { - self.ipamDiscoveredAccounts = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetIpamDiscoveredAccountsOutput() + value.ipamDiscoveredAccounts = try reader["ipamDiscoveredAccountSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamDiscoveredAccount.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -98457,48 +67546,18 @@ public struct GetIpamDiscoveredAccountsOutput: Swift.Equatable { } } -struct GetIpamDiscoveredAccountsOutputBody: Swift.Equatable { - let ipamDiscoveredAccounts: [EC2ClientTypes.IpamDiscoveredAccount]? - let nextToken: Swift.String? -} - -extension GetIpamDiscoveredAccountsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamDiscoveredAccounts = "ipamDiscoveredAccountSet" - case nextToken = "nextToken" - } +enum GetIpamDiscoveredAccountsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipamDiscoveredAccounts) { - struct KeyVal0{struct item{}} - let ipamDiscoveredAccountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamDiscoveredAccounts) - if let ipamDiscoveredAccountsWrappedContainer = ipamDiscoveredAccountsWrappedContainer { - let ipamDiscoveredAccountsContainer = try ipamDiscoveredAccountsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamDiscoveredAccount].self, forKey: .member) - var ipamDiscoveredAccountsBuffer:[EC2ClientTypes.IpamDiscoveredAccount]? = nil - if let ipamDiscoveredAccountsContainer = ipamDiscoveredAccountsContainer { - ipamDiscoveredAccountsBuffer = [EC2ClientTypes.IpamDiscoveredAccount]() - for structureContainer0 in ipamDiscoveredAccountsContainer { - ipamDiscoveredAccountsBuffer?.append(structureContainer0) - } - } - ipamDiscoveredAccounts = ipamDiscoveredAccountsBuffer - } else { - ipamDiscoveredAccounts = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamDiscoveredAccounts = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetIpamDiscoveredAccountsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -98579,71 +67638,17 @@ public struct GetIpamDiscoveredPublicAddressesInput: Swift.Equatable { } } -struct GetIpamDiscoveredPublicAddressesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamResourceDiscoveryId: Swift.String? - let addressRegion: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension GetIpamDiscoveredPublicAddressesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressRegion = "AddressRegion" - case dryRun = "DryRun" - case filters = "Filter" - case ipamResourceDiscoveryId = "IpamResourceDiscoveryId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - let addressRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressRegion) - addressRegion = addressRegionDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension GetIpamDiscoveredPublicAddressesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIpamDiscoveredPublicAddressesOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamDiscoveredPublicAddresses = output.ipamDiscoveredPublicAddresses - self.nextToken = output.nextToken - self.oldestSampleTime = output.oldestSampleTime - } else { - self.ipamDiscoveredPublicAddresses = nil - self.nextToken = nil - self.oldestSampleTime = nil +extension GetIpamDiscoveredPublicAddressesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetIpamDiscoveredPublicAddressesOutput() + value.ipamDiscoveredPublicAddresses = try reader["ipamDiscoveredPublicAddressSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamDiscoveredPublicAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + value.oldestSampleTime = try reader["oldestSampleTime"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -98668,52 +67673,18 @@ public struct GetIpamDiscoveredPublicAddressesOutput: Swift.Equatable { } } -struct GetIpamDiscoveredPublicAddressesOutputBody: Swift.Equatable { - let ipamDiscoveredPublicAddresses: [EC2ClientTypes.IpamDiscoveredPublicAddress]? - let oldestSampleTime: ClientRuntime.Date? - let nextToken: Swift.String? -} - -extension GetIpamDiscoveredPublicAddressesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamDiscoveredPublicAddresses = "ipamDiscoveredPublicAddressSet" - case nextToken = "nextToken" - case oldestSampleTime = "oldestSampleTime" - } +enum GetIpamDiscoveredPublicAddressesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipamDiscoveredPublicAddresses) { - struct KeyVal0{struct item{}} - let ipamDiscoveredPublicAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamDiscoveredPublicAddresses) - if let ipamDiscoveredPublicAddressesWrappedContainer = ipamDiscoveredPublicAddressesWrappedContainer { - let ipamDiscoveredPublicAddressesContainer = try ipamDiscoveredPublicAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamDiscoveredPublicAddress].self, forKey: .member) - var ipamDiscoveredPublicAddressesBuffer:[EC2ClientTypes.IpamDiscoveredPublicAddress]? = nil - if let ipamDiscoveredPublicAddressesContainer = ipamDiscoveredPublicAddressesContainer { - ipamDiscoveredPublicAddressesBuffer = [EC2ClientTypes.IpamDiscoveredPublicAddress]() - for structureContainer0 in ipamDiscoveredPublicAddressesContainer { - ipamDiscoveredPublicAddressesBuffer?.append(structureContainer0) - } - } - ipamDiscoveredPublicAddresses = ipamDiscoveredPublicAddressesBuffer - } else { - ipamDiscoveredPublicAddresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamDiscoveredPublicAddresses = nil - } - let oldestSampleTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .oldestSampleTime) - oldestSampleTime = oldestSampleTimeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetIpamDiscoveredPublicAddressesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -98794,69 +67765,16 @@ public struct GetIpamDiscoveredResourceCidrsInput: Swift.Equatable { } } -struct GetIpamDiscoveredResourceCidrsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamResourceDiscoveryId: Swift.String? - let resourceRegion: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension GetIpamDiscoveredResourceCidrsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamResourceDiscoveryId = "IpamResourceDiscoveryId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case resourceRegion = "ResourceRegion" - } +extension GetIpamDiscoveredResourceCidrsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - let resourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceRegion) - resourceRegion = resourceRegionDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension GetIpamDiscoveredResourceCidrsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIpamDiscoveredResourceCidrsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamDiscoveredResourceCidrs = output.ipamDiscoveredResourceCidrs - self.nextToken = output.nextToken - } else { - self.ipamDiscoveredResourceCidrs = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetIpamDiscoveredResourceCidrsOutput() + value.ipamDiscoveredResourceCidrs = try reader["ipamDiscoveredResourceCidrSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamDiscoveredResourceCidr.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -98877,48 +67795,18 @@ public struct GetIpamDiscoveredResourceCidrsOutput: Swift.Equatable { } } -struct GetIpamDiscoveredResourceCidrsOutputBody: Swift.Equatable { - let ipamDiscoveredResourceCidrs: [EC2ClientTypes.IpamDiscoveredResourceCidr]? - let nextToken: Swift.String? -} - -extension GetIpamDiscoveredResourceCidrsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamDiscoveredResourceCidrs = "ipamDiscoveredResourceCidrSet" - case nextToken = "nextToken" - } +enum GetIpamDiscoveredResourceCidrsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipamDiscoveredResourceCidrs) { - struct KeyVal0{struct item{}} - let ipamDiscoveredResourceCidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamDiscoveredResourceCidrs) - if let ipamDiscoveredResourceCidrsWrappedContainer = ipamDiscoveredResourceCidrsWrappedContainer { - let ipamDiscoveredResourceCidrsContainer = try ipamDiscoveredResourceCidrsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamDiscoveredResourceCidr].self, forKey: .member) - var ipamDiscoveredResourceCidrsBuffer:[EC2ClientTypes.IpamDiscoveredResourceCidr]? = nil - if let ipamDiscoveredResourceCidrsContainer = ipamDiscoveredResourceCidrsContainer { - ipamDiscoveredResourceCidrsBuffer = [EC2ClientTypes.IpamDiscoveredResourceCidr]() - for structureContainer0 in ipamDiscoveredResourceCidrsContainer { - ipamDiscoveredResourceCidrsBuffer?.append(structureContainer0) - } - } - ipamDiscoveredResourceCidrs = ipamDiscoveredResourceCidrsBuffer - } else { - ipamDiscoveredResourceCidrs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamDiscoveredResourceCidrs = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetIpamDiscoveredResourceCidrsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -98998,69 +67886,16 @@ public struct GetIpamPoolAllocationsInput: Swift.Equatable { } } -struct GetIpamPoolAllocationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let ipamPoolAllocationId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension GetIpamPoolAllocationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamPoolAllocationId = "IpamPoolAllocationId" - case ipamPoolId = "IpamPoolId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let ipamPoolAllocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolAllocationId) - ipamPoolAllocationId = ipamPoolAllocationIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension GetIpamPoolAllocationsOutput { -extension GetIpamPoolAllocationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIpamPoolAllocationsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPoolAllocations = output.ipamPoolAllocations - self.nextToken = output.nextToken - } else { - self.ipamPoolAllocations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetIpamPoolAllocationsOutput() + value.ipamPoolAllocations = try reader["ipamPoolAllocationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamPoolAllocation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -99081,48 +67916,18 @@ public struct GetIpamPoolAllocationsOutput: Swift.Equatable { } } -struct GetIpamPoolAllocationsOutputBody: Swift.Equatable { - let ipamPoolAllocations: [EC2ClientTypes.IpamPoolAllocation]? - let nextToken: Swift.String? -} - -extension GetIpamPoolAllocationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPoolAllocations = "ipamPoolAllocationSet" - case nextToken = "nextToken" - } +enum GetIpamPoolAllocationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipamPoolAllocations) { - struct KeyVal0{struct item{}} - let ipamPoolAllocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamPoolAllocations) - if let ipamPoolAllocationsWrappedContainer = ipamPoolAllocationsWrappedContainer { - let ipamPoolAllocationsContainer = try ipamPoolAllocationsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamPoolAllocation].self, forKey: .member) - var ipamPoolAllocationsBuffer:[EC2ClientTypes.IpamPoolAllocation]? = nil - if let ipamPoolAllocationsContainer = ipamPoolAllocationsContainer { - ipamPoolAllocationsBuffer = [EC2ClientTypes.IpamPoolAllocation]() - for structureContainer0 in ipamPoolAllocationsContainer { - ipamPoolAllocationsBuffer?.append(structureContainer0) - } - } - ipamPoolAllocations = ipamPoolAllocationsBuffer - } else { - ipamPoolAllocations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamPoolAllocations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetIpamPoolAllocationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -99195,65 +68000,16 @@ public struct GetIpamPoolCidrsInput: Swift.Equatable { } } -struct GetIpamPoolCidrsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} +extension GetIpamPoolCidrsOutput { -extension GetIpamPoolCidrsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamPoolId = "IpamPoolId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension GetIpamPoolCidrsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIpamPoolCidrsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPoolCidrs = output.ipamPoolCidrs - self.nextToken = output.nextToken - } else { - self.ipamPoolCidrs = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetIpamPoolCidrsOutput() + value.ipamPoolCidrs = try reader["ipamPoolCidrSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamPoolCidr.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -99274,48 +68030,18 @@ public struct GetIpamPoolCidrsOutput: Swift.Equatable { } } -struct GetIpamPoolCidrsOutputBody: Swift.Equatable { - let ipamPoolCidrs: [EC2ClientTypes.IpamPoolCidr]? - let nextToken: Swift.String? -} - -extension GetIpamPoolCidrsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPoolCidrs = "ipamPoolCidrSet" - case nextToken = "nextToken" - } +enum GetIpamPoolCidrsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipamPoolCidrs) { - struct KeyVal0{struct item{}} - let ipamPoolCidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamPoolCidrs) - if let ipamPoolCidrsWrappedContainer = ipamPoolCidrsWrappedContainer { - let ipamPoolCidrsContainer = try ipamPoolCidrsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamPoolCidr].self, forKey: .member) - var ipamPoolCidrsBuffer:[EC2ClientTypes.IpamPoolCidr]? = nil - if let ipamPoolCidrsContainer = ipamPoolCidrsContainer { - ipamPoolCidrsBuffer = [EC2ClientTypes.IpamPoolCidr]() - for structureContainer0 in ipamPoolCidrsContainer { - ipamPoolCidrsBuffer?.append(structureContainer0) - } - } - ipamPoolCidrs = ipamPoolCidrsBuffer - } else { - ipamPoolCidrs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamPoolCidrs = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetIpamPoolCidrsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -99423,85 +68149,16 @@ public struct GetIpamResourceCidrsInput: Swift.Equatable { } } -struct GetIpamResourceCidrsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let ipamScopeId: Swift.String? - let ipamPoolId: Swift.String? - let resourceId: Swift.String? - let resourceType: EC2ClientTypes.IpamResourceType? - let resourceTag: EC2ClientTypes.RequestIpamResourceTag? - let resourceOwner: Swift.String? -} - -extension GetIpamResourceCidrsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case ipamPoolId = "IpamPoolId" - case ipamScopeId = "IpamScopeId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case resourceId = "ResourceId" - case resourceOwner = "ResourceOwner" - case resourceTag = "ResourceTag" - case resourceType = "ResourceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let ipamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeId) - ipamScopeId = ipamScopeIdDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceTagDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RequestIpamResourceTag.self, forKey: .resourceTag) - resourceTag = resourceTagDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - } -} - -extension GetIpamResourceCidrsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIpamResourceCidrsOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceCidrs = output.ipamResourceCidrs - self.nextToken = output.nextToken - } else { - self.ipamResourceCidrs = nil - self.nextToken = nil +extension GetIpamResourceCidrsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetIpamResourceCidrsOutput() + value.ipamResourceCidrs = try reader["ipamResourceCidrSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamResourceCidr.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -99522,48 +68179,18 @@ public struct GetIpamResourceCidrsOutput: Swift.Equatable { } } -struct GetIpamResourceCidrsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let ipamResourceCidrs: [EC2ClientTypes.IpamResourceCidr]? -} - -extension GetIpamResourceCidrsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceCidrs = "ipamResourceCidrSet" - case nextToken = "nextToken" - } +enum GetIpamResourceCidrsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.ipamResourceCidrs) { - struct KeyVal0{struct item{}} - let ipamResourceCidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipamResourceCidrs) - if let ipamResourceCidrsWrappedContainer = ipamResourceCidrsWrappedContainer { - let ipamResourceCidrsContainer = try ipamResourceCidrsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamResourceCidr].self, forKey: .member) - var ipamResourceCidrsBuffer:[EC2ClientTypes.IpamResourceCidr]? = nil - if let ipamResourceCidrsContainer = ipamResourceCidrsContainer { - ipamResourceCidrsBuffer = [EC2ClientTypes.IpamResourceCidr]() - for structureContainer0 in ipamResourceCidrsContainer { - ipamResourceCidrsBuffer?.append(structureContainer0) - } - } - ipamResourceCidrs = ipamResourceCidrsBuffer - } else { - ipamResourceCidrs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - ipamResourceCidrs = nil - } - } -} - -enum GetIpamResourceCidrsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -99606,34 +68233,15 @@ public struct GetLaunchTemplateDataInput: Swift.Equatable { } } -struct GetLaunchTemplateDataInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceId: Swift.String? -} - -extension GetLaunchTemplateDataInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceId = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - } -} +extension GetLaunchTemplateDataOutput { -extension GetLaunchTemplateDataOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetLaunchTemplateDataOutputBody = try responseDecoder.decode(responseBody: data) - self.launchTemplateData = output.launchTemplateData - } else { - self.launchTemplateData = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetLaunchTemplateDataOutput() + value.launchTemplateData = try reader["launchTemplateData"].readIfPresent(readingClosure: EC2ClientTypes.ResponseLaunchTemplateData.readingClosure) + return value } } } @@ -99650,27 +68258,18 @@ public struct GetLaunchTemplateDataOutput: Swift.Equatable { } } -struct GetLaunchTemplateDataOutputBody: Swift.Equatable { - let launchTemplateData: EC2ClientTypes.ResponseLaunchTemplateData? -} - -extension GetLaunchTemplateDataOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateData = "launchTemplateData" - } +enum GetLaunchTemplateDataOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResponseLaunchTemplateData.self, forKey: .launchTemplateData) - launchTemplateData = launchTemplateDataDecoded - } -} - -enum GetLaunchTemplateDataOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -99727,44 +68326,16 @@ public struct GetManagedPrefixListAssociationsInput: Swift.Equatable { } } -struct GetManagedPrefixListAssociationsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let prefixListId: Swift.String? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension GetManagedPrefixListAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case prefixListId = "PrefixListId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension GetManagedPrefixListAssociationsOutput { -extension GetManagedPrefixListAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetManagedPrefixListAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.prefixListAssociations = output.prefixListAssociations - } else { - self.nextToken = nil - self.prefixListAssociations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetManagedPrefixListAssociationsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.prefixListAssociations = try reader["prefixListAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrefixListAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -99785,48 +68356,18 @@ public struct GetManagedPrefixListAssociationsOutput: Swift.Equatable { } } -struct GetManagedPrefixListAssociationsOutputBody: Swift.Equatable { - let prefixListAssociations: [EC2ClientTypes.PrefixListAssociation]? - let nextToken: Swift.String? -} +enum GetManagedPrefixListAssociationsOutputError { -extension GetManagedPrefixListAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case prefixListAssociations = "prefixListAssociationSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.prefixListAssociations) { - struct KeyVal0{struct item{}} - let prefixListAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .prefixListAssociations) - if let prefixListAssociationsWrappedContainer = prefixListAssociationsWrappedContainer { - let prefixListAssociationsContainer = try prefixListAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.PrefixListAssociation].self, forKey: .member) - var prefixListAssociationsBuffer:[EC2ClientTypes.PrefixListAssociation]? = nil - if let prefixListAssociationsContainer = prefixListAssociationsContainer { - prefixListAssociationsBuffer = [EC2ClientTypes.PrefixListAssociation]() - for structureContainer0 in prefixListAssociationsContainer { - prefixListAssociationsBuffer?.append(structureContainer0) - } - } - prefixListAssociations = prefixListAssociationsBuffer - } else { - prefixListAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - prefixListAssociations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetManagedPrefixListAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -99890,48 +68431,16 @@ public struct GetManagedPrefixListEntriesInput: Swift.Equatable { } } -struct GetManagedPrefixListEntriesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let prefixListId: Swift.String? - let targetVersion: Swift.Int? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension GetManagedPrefixListEntriesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case prefixListId = "PrefixListId" - case targetVersion = "TargetVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let targetVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetVersion) - targetVersion = targetVersionDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension GetManagedPrefixListEntriesOutput { -extension GetManagedPrefixListEntriesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetManagedPrefixListEntriesOutputBody = try responseDecoder.decode(responseBody: data) - self.entries = output.entries - self.nextToken = output.nextToken - } else { - self.entries = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetManagedPrefixListEntriesOutput() + value.entries = try reader["entrySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrefixListEntry.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -99952,48 +68461,18 @@ public struct GetManagedPrefixListEntriesOutput: Swift.Equatable { } } -struct GetManagedPrefixListEntriesOutputBody: Swift.Equatable { - let entries: [EC2ClientTypes.PrefixListEntry]? - let nextToken: Swift.String? -} - -extension GetManagedPrefixListEntriesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case entries = "entrySet" - case nextToken = "nextToken" - } +enum GetManagedPrefixListEntriesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.entries) { - struct KeyVal0{struct item{}} - let entriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .entries) - if let entriesWrappedContainer = entriesWrappedContainer { - let entriesContainer = try entriesWrappedContainer.decodeIfPresent([EC2ClientTypes.PrefixListEntry].self, forKey: .member) - var entriesBuffer:[EC2ClientTypes.PrefixListEntry]? = nil - if let entriesContainer = entriesContainer { - entriesBuffer = [EC2ClientTypes.PrefixListEntry]() - for structureContainer0 in entriesContainer { - entriesBuffer?.append(structureContainer0) - } - } - entries = entriesBuffer - } else { - entries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - entries = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetManagedPrefixListEntriesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -100050,48 +68529,18 @@ public struct GetNetworkInsightsAccessScopeAnalysisFindingsInput: Swift.Equatabl } } -struct GetNetworkInsightsAccessScopeAnalysisFindingsInputBody: Swift.Equatable { - let networkInsightsAccessScopeAnalysisId: Swift.String? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} +extension GetNetworkInsightsAccessScopeAnalysisFindingsOutput { -extension GetNetworkInsightsAccessScopeAnalysisFindingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case networkInsightsAccessScopeAnalysisId = "NetworkInsightsAccessScopeAnalysisId" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeAnalysisId) - networkInsightsAccessScopeAnalysisId = networkInsightsAccessScopeAnalysisIdDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension GetNetworkInsightsAccessScopeAnalysisFindingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetNetworkInsightsAccessScopeAnalysisFindingsOutputBody = try responseDecoder.decode(responseBody: data) - self.analysisFindings = output.analysisFindings - self.analysisStatus = output.analysisStatus - self.networkInsightsAccessScopeAnalysisId = output.networkInsightsAccessScopeAnalysisId - self.nextToken = output.nextToken - } else { - self.analysisFindings = nil - self.analysisStatus = nil - self.networkInsightsAccessScopeAnalysisId = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetNetworkInsightsAccessScopeAnalysisFindingsOutput() + value.analysisFindings = try reader["analysisFindingSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AccessScopeAnalysisFinding.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.analysisStatus = try reader["analysisStatus"].readIfPresent() + value.networkInsightsAccessScopeAnalysisId = try reader["networkInsightsAccessScopeAnalysisId"].readIfPresent() + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -100120,56 +68569,18 @@ public struct GetNetworkInsightsAccessScopeAnalysisFindingsOutput: Swift.Equatab } } -struct GetNetworkInsightsAccessScopeAnalysisFindingsOutputBody: Swift.Equatable { - let networkInsightsAccessScopeAnalysisId: Swift.String? - let analysisStatus: EC2ClientTypes.AnalysisStatus? - let analysisFindings: [EC2ClientTypes.AccessScopeAnalysisFinding]? - let nextToken: Swift.String? -} - -extension GetNetworkInsightsAccessScopeAnalysisFindingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analysisFindings = "analysisFindingSet" - case analysisStatus = "analysisStatus" - case networkInsightsAccessScopeAnalysisId = "networkInsightsAccessScopeAnalysisId" - case nextToken = "nextToken" - } +enum GetNetworkInsightsAccessScopeAnalysisFindingsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeAnalysisId) - networkInsightsAccessScopeAnalysisId = networkInsightsAccessScopeAnalysisIdDecoded - let analysisStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisStatus.self, forKey: .analysisStatus) - analysisStatus = analysisStatusDecoded - if containerValues.contains(.analysisFindings) { - struct KeyVal0{struct item{}} - let analysisFindingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .analysisFindings) - if let analysisFindingsWrappedContainer = analysisFindingsWrappedContainer { - let analysisFindingsContainer = try analysisFindingsWrappedContainer.decodeIfPresent([EC2ClientTypes.AccessScopeAnalysisFinding].self, forKey: .member) - var analysisFindingsBuffer:[EC2ClientTypes.AccessScopeAnalysisFinding]? = nil - if let analysisFindingsContainer = analysisFindingsContainer { - analysisFindingsBuffer = [EC2ClientTypes.AccessScopeAnalysisFinding]() - for structureContainer0 in analysisFindingsContainer { - analysisFindingsBuffer?.append(structureContainer0) - } - } - analysisFindings = analysisFindingsBuffer - } else { - analysisFindings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - analysisFindings = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetNetworkInsightsAccessScopeAnalysisFindingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -100212,34 +68623,15 @@ public struct GetNetworkInsightsAccessScopeContentInput: Swift.Equatable { } } -struct GetNetworkInsightsAccessScopeContentInputBody: Swift.Equatable { - let networkInsightsAccessScopeId: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetNetworkInsightsAccessScopeContentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case networkInsightsAccessScopeId = "NetworkInsightsAccessScopeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetNetworkInsightsAccessScopeContentOutput { -extension GetNetworkInsightsAccessScopeContentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetNetworkInsightsAccessScopeContentOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAccessScopeContent = output.networkInsightsAccessScopeContent - } else { - self.networkInsightsAccessScopeContent = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetNetworkInsightsAccessScopeContentOutput() + value.networkInsightsAccessScopeContent = try reader["networkInsightsAccessScopeContent"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInsightsAccessScopeContent.readingClosure) + return value } } } @@ -100256,27 +68648,18 @@ public struct GetNetworkInsightsAccessScopeContentOutput: Swift.Equatable { } } -struct GetNetworkInsightsAccessScopeContentOutputBody: Swift.Equatable { - let networkInsightsAccessScopeContent: EC2ClientTypes.NetworkInsightsAccessScopeContent? -} - -extension GetNetworkInsightsAccessScopeContentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAccessScopeContent = "networkInsightsAccessScopeContent" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeContentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInsightsAccessScopeContent.self, forKey: .networkInsightsAccessScopeContent) - networkInsightsAccessScopeContent = networkInsightsAccessScopeContentDecoded - } -} +enum GetNetworkInsightsAccessScopeContentOutputError { -enum GetNetworkInsightsAccessScopeContentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -100319,43 +68702,22 @@ public struct GetPasswordDataInput: Swift.Equatable { } } -struct GetPasswordDataInputBody: Swift.Equatable { - let instanceId: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetPasswordDataInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceId = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - extension GetPasswordDataOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { "GetPasswordDataOutput(instanceId: \(Swift.String(describing: instanceId)), timestamp: \(Swift.String(describing: timestamp)), passwordData: \"CONTENT_REDACTED\")"} } -extension GetPasswordDataOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetPasswordDataOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceId = output.instanceId - self.passwordData = output.passwordData - self.timestamp = output.timestamp - } else { - self.instanceId = nil - self.passwordData = nil - self.timestamp = nil +extension GetPasswordDataOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetPasswordDataOutput() + value.instanceId = try reader["instanceId"].readIfPresent() + value.passwordData = try reader["passwordData"].readIfPresent() + value.timestamp = try reader["timestamp"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -100380,35 +68742,18 @@ public struct GetPasswordDataOutput: Swift.Equatable { } } -struct GetPasswordDataOutputBody: Swift.Equatable { - let instanceId: Swift.String? - let passwordData: Swift.String? - let timestamp: ClientRuntime.Date? -} - -extension GetPasswordDataOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - case passwordData = "passwordData" - case timestamp = "timestamp" - } +enum GetPasswordDataOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let passwordDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .passwordData) - passwordData = passwordDataDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - } -} - -enum GetPasswordDataOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -100477,88 +68822,23 @@ public struct GetReservedInstancesExchangeQuoteInput: Swift.Equatable { } } -struct GetReservedInstancesExchangeQuoteInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let reservedInstanceIds: [Swift.String]? - let targetConfigurations: [EC2ClientTypes.TargetConfigurationRequest]? -} - -extension GetReservedInstancesExchangeQuoteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case reservedInstanceIds = "ReservedInstanceId" - case targetConfigurations = "TargetConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.reservedInstanceIds) { - struct KeyVal0{struct ReservedInstanceId{}} - let reservedInstanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstanceIds) - if let reservedInstanceIdsWrappedContainer = reservedInstanceIdsWrappedContainer { - let reservedInstanceIdsContainer = try reservedInstanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var reservedInstanceIdsBuffer:[Swift.String]? = nil - if let reservedInstanceIdsContainer = reservedInstanceIdsContainer { - reservedInstanceIdsBuffer = [Swift.String]() - for stringContainer0 in reservedInstanceIdsContainer { - reservedInstanceIdsBuffer?.append(stringContainer0) - } - } - reservedInstanceIds = reservedInstanceIdsBuffer - } else { - reservedInstanceIds = [] - } - } else { - reservedInstanceIds = nil - } - if containerValues.contains(.targetConfigurations) { - struct KeyVal0{struct TargetConfigurationRequest{}} - let targetConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetConfigurations) - if let targetConfigurationsWrappedContainer = targetConfigurationsWrappedContainer { - let targetConfigurationsContainer = try targetConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TargetConfigurationRequest].self, forKey: .member) - var targetConfigurationsBuffer:[EC2ClientTypes.TargetConfigurationRequest]? = nil - if let targetConfigurationsContainer = targetConfigurationsContainer { - targetConfigurationsBuffer = [EC2ClientTypes.TargetConfigurationRequest]() - for structureContainer0 in targetConfigurationsContainer { - targetConfigurationsBuffer?.append(structureContainer0) - } - } - targetConfigurations = targetConfigurationsBuffer - } else { - targetConfigurations = [] - } - } else { - targetConfigurations = nil - } - } -} - -extension GetReservedInstancesExchangeQuoteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetReservedInstancesExchangeQuoteOutputBody = try responseDecoder.decode(responseBody: data) - self.currencyCode = output.currencyCode - self.isValidExchange = output.isValidExchange - self.outputReservedInstancesWillExpireAt = output.outputReservedInstancesWillExpireAt - self.paymentDue = output.paymentDue - self.reservedInstanceValueRollup = output.reservedInstanceValueRollup - self.reservedInstanceValueSet = output.reservedInstanceValueSet - self.targetConfigurationValueRollup = output.targetConfigurationValueRollup - self.targetConfigurationValueSet = output.targetConfigurationValueSet - self.validationFailureReason = output.validationFailureReason - } else { - self.currencyCode = nil - self.isValidExchange = nil - self.outputReservedInstancesWillExpireAt = nil - self.paymentDue = nil - self.reservedInstanceValueRollup = nil - self.reservedInstanceValueSet = nil - self.targetConfigurationValueRollup = nil - self.targetConfigurationValueSet = nil - self.validationFailureReason = nil +extension GetReservedInstancesExchangeQuoteOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetReservedInstancesExchangeQuoteOutput() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.isValidExchange = try reader["isValidExchange"].readIfPresent() + value.outputReservedInstancesWillExpireAt = try reader["outputReservedInstancesWillExpireAt"].readTimestampIfPresent(format: .dateTime) + value.paymentDue = try reader["paymentDue"].readIfPresent() + value.reservedInstanceValueRollup = try reader["reservedInstanceValueRollup"].readIfPresent(readingClosure: EC2ClientTypes.ReservationValue.readingClosure) + value.reservedInstanceValueSet = try reader["reservedInstanceValueSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstanceReservationValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.targetConfigurationValueRollup = try reader["targetConfigurationValueRollup"].readIfPresent(readingClosure: EC2ClientTypes.ReservationValue.readingClosure) + value.targetConfigurationValueSet = try reader["targetConfigurationValueSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TargetReservationValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.validationFailureReason = try reader["validationFailureReason"].readIfPresent() + return value } } } @@ -100608,93 +68888,18 @@ public struct GetReservedInstancesExchangeQuoteOutput: Swift.Equatable { } } -struct GetReservedInstancesExchangeQuoteOutputBody: Swift.Equatable { - let currencyCode: Swift.String? - let isValidExchange: Swift.Bool? - let outputReservedInstancesWillExpireAt: ClientRuntime.Date? - let paymentDue: Swift.String? - let reservedInstanceValueRollup: EC2ClientTypes.ReservationValue? - let reservedInstanceValueSet: [EC2ClientTypes.ReservedInstanceReservationValue]? - let targetConfigurationValueRollup: EC2ClientTypes.ReservationValue? - let targetConfigurationValueSet: [EC2ClientTypes.TargetReservationValue]? - let validationFailureReason: Swift.String? -} - -extension GetReservedInstancesExchangeQuoteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currencyCode = "currencyCode" - case isValidExchange = "isValidExchange" - case outputReservedInstancesWillExpireAt = "outputReservedInstancesWillExpireAt" - case paymentDue = "paymentDue" - case reservedInstanceValueRollup = "reservedInstanceValueRollup" - case reservedInstanceValueSet = "reservedInstanceValueSet" - case targetConfigurationValueRollup = "targetConfigurationValueRollup" - case targetConfigurationValueSet = "targetConfigurationValueSet" - case validationFailureReason = "validationFailureReason" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currencyCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let isValidExchangeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isValidExchange) - isValidExchange = isValidExchangeDecoded - let outputReservedInstancesWillExpireAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .outputReservedInstancesWillExpireAt) - outputReservedInstancesWillExpireAt = outputReservedInstancesWillExpireAtDecoded - let paymentDueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .paymentDue) - paymentDue = paymentDueDecoded - let reservedInstanceValueRollupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReservationValue.self, forKey: .reservedInstanceValueRollup) - reservedInstanceValueRollup = reservedInstanceValueRollupDecoded - if containerValues.contains(.reservedInstanceValueSet) { - struct KeyVal0{struct item{}} - let reservedInstanceValueSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstanceValueSet) - if let reservedInstanceValueSetWrappedContainer = reservedInstanceValueSetWrappedContainer { - let reservedInstanceValueSetContainer = try reservedInstanceValueSetWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstanceReservationValue].self, forKey: .member) - var reservedInstanceValueSetBuffer:[EC2ClientTypes.ReservedInstanceReservationValue]? = nil - if let reservedInstanceValueSetContainer = reservedInstanceValueSetContainer { - reservedInstanceValueSetBuffer = [EC2ClientTypes.ReservedInstanceReservationValue]() - for structureContainer0 in reservedInstanceValueSetContainer { - reservedInstanceValueSetBuffer?.append(structureContainer0) - } - } - reservedInstanceValueSet = reservedInstanceValueSetBuffer - } else { - reservedInstanceValueSet = [] - } - } else { - reservedInstanceValueSet = nil - } - let targetConfigurationValueRollupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReservationValue.self, forKey: .targetConfigurationValueRollup) - targetConfigurationValueRollup = targetConfigurationValueRollupDecoded - if containerValues.contains(.targetConfigurationValueSet) { - struct KeyVal0{struct item{}} - let targetConfigurationValueSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetConfigurationValueSet) - if let targetConfigurationValueSetWrappedContainer = targetConfigurationValueSetWrappedContainer { - let targetConfigurationValueSetContainer = try targetConfigurationValueSetWrappedContainer.decodeIfPresent([EC2ClientTypes.TargetReservationValue].self, forKey: .member) - var targetConfigurationValueSetBuffer:[EC2ClientTypes.TargetReservationValue]? = nil - if let targetConfigurationValueSetContainer = targetConfigurationValueSetContainer { - targetConfigurationValueSetBuffer = [EC2ClientTypes.TargetReservationValue]() - for structureContainer0 in targetConfigurationValueSetContainer { - targetConfigurationValueSetBuffer?.append(structureContainer0) - } - } - targetConfigurationValueSet = targetConfigurationValueSetBuffer - } else { - targetConfigurationValueSet = [] - } - } else { - targetConfigurationValueSet = nil - } - let validationFailureReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .validationFailureReason) - validationFailureReason = validationFailureReasonDecoded - } -} - -enum GetReservedInstancesExchangeQuoteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum GetReservedInstancesExchangeQuoteOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -100777,65 +68982,16 @@ public struct GetSecurityGroupsForVpcInput: Swift.Equatable { } } -struct GetSecurityGroupsForVpcInputBody: Swift.Equatable { - let vpcId: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let filters: [EC2ClientTypes.Filter]? - let dryRun: Swift.Bool? -} +extension GetSecurityGroupsForVpcOutput { -extension GetSecurityGroupsForVpcInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension GetSecurityGroupsForVpcOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSecurityGroupsForVpcOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.securityGroupForVpcs = output.securityGroupForVpcs - } else { - self.nextToken = nil - self.securityGroupForVpcs = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetSecurityGroupsForVpcOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.securityGroupForVpcs = try reader["securityGroupForVpcSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SecurityGroupForVpc.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -100856,48 +69012,18 @@ public struct GetSecurityGroupsForVpcOutput: Swift.Equatable { } } -struct GetSecurityGroupsForVpcOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let securityGroupForVpcs: [EC2ClientTypes.SecurityGroupForVpc]? -} - -extension GetSecurityGroupsForVpcOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case securityGroupForVpcs = "securityGroupForVpcSet" - } +enum GetSecurityGroupsForVpcOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.securityGroupForVpcs) { - struct KeyVal0{struct item{}} - let securityGroupForVpcsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupForVpcs) - if let securityGroupForVpcsWrappedContainer = securityGroupForVpcsWrappedContainer { - let securityGroupForVpcsContainer = try securityGroupForVpcsWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupForVpc].self, forKey: .member) - var securityGroupForVpcsBuffer:[EC2ClientTypes.SecurityGroupForVpc]? = nil - if let securityGroupForVpcsContainer = securityGroupForVpcsContainer { - securityGroupForVpcsBuffer = [EC2ClientTypes.SecurityGroupForVpc]() - for structureContainer0 in securityGroupForVpcsContainer { - securityGroupForVpcsBuffer?.append(structureContainer0) - } - } - securityGroupForVpcs = securityGroupForVpcsBuffer - } else { - securityGroupForVpcs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - securityGroupForVpcs = nil - } - } -} - -enum GetSecurityGroupsForVpcOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -100932,30 +69058,15 @@ public struct GetSerialConsoleAccessStatusInput: Swift.Equatable { } } -struct GetSerialConsoleAccessStatusInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension GetSerialConsoleAccessStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } +extension GetSerialConsoleAccessStatusOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension GetSerialConsoleAccessStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSerialConsoleAccessStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.serialConsoleAccessEnabled = output.serialConsoleAccessEnabled - } else { - self.serialConsoleAccessEnabled = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetSerialConsoleAccessStatusOutput() + value.serialConsoleAccessEnabled = try reader["serialConsoleAccessEnabled"].readIfPresent() + return value } } } @@ -100972,27 +69083,18 @@ public struct GetSerialConsoleAccessStatusOutput: Swift.Equatable { } } -struct GetSerialConsoleAccessStatusOutputBody: Swift.Equatable { - let serialConsoleAccessEnabled: Swift.Bool? -} - -extension GetSerialConsoleAccessStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serialConsoleAccessEnabled = "serialConsoleAccessEnabled" - } +enum GetSerialConsoleAccessStatusOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialConsoleAccessEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .serialConsoleAccessEnabled) - serialConsoleAccessEnabled = serialConsoleAccessEnabledDecoded - } -} - -enum GetSerialConsoleAccessStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -101027,30 +69129,15 @@ public struct GetSnapshotBlockPublicAccessStateInput: Swift.Equatable { } } -struct GetSnapshotBlockPublicAccessStateInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension GetSnapshotBlockPublicAccessStateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } +extension GetSnapshotBlockPublicAccessStateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension GetSnapshotBlockPublicAccessStateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSnapshotBlockPublicAccessStateOutputBody = try responseDecoder.decode(responseBody: data) - self.state = output.state - } else { - self.state = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetSnapshotBlockPublicAccessStateOutput() + value.state = try reader["state"].readIfPresent() + return value } } } @@ -101073,27 +69160,18 @@ public struct GetSnapshotBlockPublicAccessStateOutput: Swift.Equatable { } } -struct GetSnapshotBlockPublicAccessStateOutputBody: Swift.Equatable { - let state: EC2ClientTypes.SnapshotBlockPublicAccessState? -} - -extension GetSnapshotBlockPublicAccessStateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotBlockPublicAccessState.self, forKey: .state) - state = stateDecoded - } -} +enum GetSnapshotBlockPublicAccessStateOutputError { -enum GetSnapshotBlockPublicAccessStateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -101203,98 +69281,16 @@ public struct GetSpotPlacementScoresInput: Swift.Equatable { } } -struct GetSpotPlacementScoresInputBody: Swift.Equatable { - let instanceTypes: [Swift.String]? - let targetCapacity: Swift.Int? - let targetCapacityUnitType: EC2ClientTypes.TargetCapacityUnitType? - let singleAvailabilityZone: Swift.Bool? - let regionNames: [Swift.String]? - let instanceRequirementsWithMetadata: EC2ClientTypes.InstanceRequirementsWithMetadataRequest? - let dryRun: Swift.Bool? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension GetSpotPlacementScoresInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceRequirementsWithMetadata = "InstanceRequirementsWithMetadata" - case instanceTypes = "InstanceType" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case regionNames = "RegionName" - case singleAvailabilityZone = "SingleAvailabilityZone" - case targetCapacity = "TargetCapacity" - case targetCapacityUnitType = "TargetCapacityUnitType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceTypes) { - struct KeyVal0{struct member{}} - let instanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTypes) - if let instanceTypesWrappedContainer = instanceTypesWrappedContainer { - let instanceTypesContainer = try instanceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceTypesBuffer:[Swift.String]? = nil - if let instanceTypesContainer = instanceTypesContainer { - instanceTypesBuffer = [Swift.String]() - for stringContainer0 in instanceTypesContainer { - instanceTypesBuffer?.append(stringContainer0) - } - } - instanceTypes = instanceTypesBuffer - } else { - instanceTypes = [] - } - } else { - instanceTypes = nil - } - let targetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetCapacity) - targetCapacity = targetCapacityDecoded - let targetCapacityUnitTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetCapacityUnitType.self, forKey: .targetCapacityUnitType) - targetCapacityUnitType = targetCapacityUnitTypeDecoded - let singleAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleAvailabilityZone) - singleAvailabilityZone = singleAvailabilityZoneDecoded - if containerValues.contains(.regionNames) { - struct KeyVal0{struct member{}} - let regionNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regionNames) - if let regionNamesWrappedContainer = regionNamesWrappedContainer { - let regionNamesContainer = try regionNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionNamesBuffer:[Swift.String]? = nil - if let regionNamesContainer = regionNamesContainer { - regionNamesBuffer = [Swift.String]() - for stringContainer0 in regionNamesContainer { - regionNamesBuffer?.append(stringContainer0) - } - } - regionNames = regionNamesBuffer - } else { - regionNames = [] - } - } else { - regionNames = nil - } - let instanceRequirementsWithMetadataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirementsWithMetadataRequest.self, forKey: .instanceRequirementsWithMetadata) - instanceRequirementsWithMetadata = instanceRequirementsWithMetadataDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension GetSpotPlacementScoresOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSpotPlacementScoresOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.spotPlacementScores = output.spotPlacementScores - } else { - self.nextToken = nil - self.spotPlacementScores = nil +extension GetSpotPlacementScoresOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetSpotPlacementScoresOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.spotPlacementScores = try reader["spotPlacementScoreSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SpotPlacementScore.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -101315,48 +69311,18 @@ public struct GetSpotPlacementScoresOutput: Swift.Equatable { } } -struct GetSpotPlacementScoresOutputBody: Swift.Equatable { - let spotPlacementScores: [EC2ClientTypes.SpotPlacementScore]? - let nextToken: Swift.String? -} - -extension GetSpotPlacementScoresOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case spotPlacementScores = "spotPlacementScoreSet" - } +enum GetSpotPlacementScoresOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.spotPlacementScores) { - struct KeyVal0{struct item{}} - let spotPlacementScoresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotPlacementScores) - if let spotPlacementScoresWrappedContainer = spotPlacementScoresWrappedContainer { - let spotPlacementScoresContainer = try spotPlacementScoresWrappedContainer.decodeIfPresent([EC2ClientTypes.SpotPlacementScore].self, forKey: .member) - var spotPlacementScoresBuffer:[EC2ClientTypes.SpotPlacementScore]? = nil - if let spotPlacementScoresContainer = spotPlacementScoresContainer { - spotPlacementScoresBuffer = [EC2ClientTypes.SpotPlacementScore]() - for structureContainer0 in spotPlacementScoresContainer { - spotPlacementScoresBuffer?.append(structureContainer0) - } - } - spotPlacementScores = spotPlacementScoresBuffer - } else { - spotPlacementScores = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - spotPlacementScores = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetSpotPlacementScoresOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -101437,67 +69403,17 @@ public struct GetSubnetCidrReservationsInput: Swift.Equatable { } } -struct GetSubnetCidrReservationsInputBody: Swift.Equatable { - let filters: [EC2ClientTypes.Filter]? - let subnetId: Swift.String? - let dryRun: Swift.Bool? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension GetSubnetCidrReservationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case subnetId = "SubnetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension GetSubnetCidrReservationsOutput { -extension GetSubnetCidrReservationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSubnetCidrReservationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.subnetIpv4CidrReservations = output.subnetIpv4CidrReservations - self.subnetIpv6CidrReservations = output.subnetIpv6CidrReservations - } else { - self.nextToken = nil - self.subnetIpv4CidrReservations = nil - self.subnetIpv6CidrReservations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetSubnetCidrReservationsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.subnetIpv4CidrReservations = try reader["subnetIpv4CidrReservationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SubnetCidrReservation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.subnetIpv6CidrReservations = try reader["subnetIpv6CidrReservationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SubnetCidrReservation.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -101522,69 +69438,18 @@ public struct GetSubnetCidrReservationsOutput: Swift.Equatable { } } -struct GetSubnetCidrReservationsOutputBody: Swift.Equatable { - let subnetIpv4CidrReservations: [EC2ClientTypes.SubnetCidrReservation]? - let subnetIpv6CidrReservations: [EC2ClientTypes.SubnetCidrReservation]? - let nextToken: Swift.String? -} - -extension GetSubnetCidrReservationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case subnetIpv4CidrReservations = "subnetIpv4CidrReservationSet" - case subnetIpv6CidrReservations = "subnetIpv6CidrReservationSet" - } +enum GetSubnetCidrReservationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.subnetIpv4CidrReservations) { - struct KeyVal0{struct item{}} - let subnetIpv4CidrReservationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIpv4CidrReservations) - if let subnetIpv4CidrReservationsWrappedContainer = subnetIpv4CidrReservationsWrappedContainer { - let subnetIpv4CidrReservationsContainer = try subnetIpv4CidrReservationsWrappedContainer.decodeIfPresent([EC2ClientTypes.SubnetCidrReservation].self, forKey: .member) - var subnetIpv4CidrReservationsBuffer:[EC2ClientTypes.SubnetCidrReservation]? = nil - if let subnetIpv4CidrReservationsContainer = subnetIpv4CidrReservationsContainer { - subnetIpv4CidrReservationsBuffer = [EC2ClientTypes.SubnetCidrReservation]() - for structureContainer0 in subnetIpv4CidrReservationsContainer { - subnetIpv4CidrReservationsBuffer?.append(structureContainer0) - } - } - subnetIpv4CidrReservations = subnetIpv4CidrReservationsBuffer - } else { - subnetIpv4CidrReservations = [] - } - } else { - subnetIpv4CidrReservations = nil - } - if containerValues.contains(.subnetIpv6CidrReservations) { - struct KeyVal0{struct item{}} - let subnetIpv6CidrReservationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIpv6CidrReservations) - if let subnetIpv6CidrReservationsWrappedContainer = subnetIpv6CidrReservationsWrappedContainer { - let subnetIpv6CidrReservationsContainer = try subnetIpv6CidrReservationsWrappedContainer.decodeIfPresent([EC2ClientTypes.SubnetCidrReservation].self, forKey: .member) - var subnetIpv6CidrReservationsBuffer:[EC2ClientTypes.SubnetCidrReservation]? = nil - if let subnetIpv6CidrReservationsContainer = subnetIpv6CidrReservationsContainer { - subnetIpv6CidrReservationsBuffer = [EC2ClientTypes.SubnetCidrReservation]() - for structureContainer0 in subnetIpv6CidrReservationsContainer { - subnetIpv6CidrReservationsBuffer?.append(structureContainer0) - } - } - subnetIpv6CidrReservations = subnetIpv6CidrReservationsBuffer - } else { - subnetIpv6CidrReservations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - subnetIpv6CidrReservations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetSubnetCidrReservationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -101659,65 +69524,16 @@ public struct GetTransitGatewayAttachmentPropagationsInput: Swift.Equatable { } } -struct GetTransitGatewayAttachmentPropagationsInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetTransitGatewayAttachmentPropagationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetTransitGatewayAttachmentPropagationsOutput { -extension GetTransitGatewayAttachmentPropagationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTransitGatewayAttachmentPropagationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayAttachmentPropagations = output.transitGatewayAttachmentPropagations - } else { - self.nextToken = nil - self.transitGatewayAttachmentPropagations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTransitGatewayAttachmentPropagationsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayAttachmentPropagations = try reader["transitGatewayAttachmentPropagations"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayAttachmentPropagation.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -101738,48 +69554,18 @@ public struct GetTransitGatewayAttachmentPropagationsOutput: Swift.Equatable { } } -struct GetTransitGatewayAttachmentPropagationsOutputBody: Swift.Equatable { - let transitGatewayAttachmentPropagations: [EC2ClientTypes.TransitGatewayAttachmentPropagation]? - let nextToken: Swift.String? -} +enum GetTransitGatewayAttachmentPropagationsOutputError { -extension GetTransitGatewayAttachmentPropagationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayAttachmentPropagations = "transitGatewayAttachmentPropagations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayAttachmentPropagations) { - struct KeyVal0{struct item{}} - let transitGatewayAttachmentPropagationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayAttachmentPropagations) - if let transitGatewayAttachmentPropagationsWrappedContainer = transitGatewayAttachmentPropagationsWrappedContainer { - let transitGatewayAttachmentPropagationsContainer = try transitGatewayAttachmentPropagationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayAttachmentPropagation].self, forKey: .member) - var transitGatewayAttachmentPropagationsBuffer:[EC2ClientTypes.TransitGatewayAttachmentPropagation]? = nil - if let transitGatewayAttachmentPropagationsContainer = transitGatewayAttachmentPropagationsContainer { - transitGatewayAttachmentPropagationsBuffer = [EC2ClientTypes.TransitGatewayAttachmentPropagation]() - for structureContainer0 in transitGatewayAttachmentPropagationsContainer { - transitGatewayAttachmentPropagationsBuffer?.append(structureContainer0) - } - } - transitGatewayAttachmentPropagations = transitGatewayAttachmentPropagationsBuffer - } else { - transitGatewayAttachmentPropagations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayAttachmentPropagations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetTransitGatewayAttachmentPropagationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -101862,65 +69648,16 @@ public struct GetTransitGatewayMulticastDomainAssociationsInput: Swift.Equatable } } -struct GetTransitGatewayMulticastDomainAssociationsInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetTransitGatewayMulticastDomainAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetTransitGatewayMulticastDomainAssociationsOutput { -extension GetTransitGatewayMulticastDomainAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTransitGatewayMulticastDomainAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.multicastDomainAssociations = output.multicastDomainAssociations - self.nextToken = output.nextToken - } else { - self.multicastDomainAssociations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTransitGatewayMulticastDomainAssociationsOutput() + value.multicastDomainAssociations = try reader["multicastDomainAssociations"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayMulticastDomainAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -101941,48 +69678,18 @@ public struct GetTransitGatewayMulticastDomainAssociationsOutput: Swift.Equatabl } } -struct GetTransitGatewayMulticastDomainAssociationsOutputBody: Swift.Equatable { - let multicastDomainAssociations: [EC2ClientTypes.TransitGatewayMulticastDomainAssociation]? - let nextToken: Swift.String? -} - -extension GetTransitGatewayMulticastDomainAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case multicastDomainAssociations = "multicastDomainAssociations" - case nextToken = "nextToken" - } +enum GetTransitGatewayMulticastDomainAssociationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.multicastDomainAssociations) { - struct KeyVal0{struct item{}} - let multicastDomainAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .multicastDomainAssociations) - if let multicastDomainAssociationsWrappedContainer = multicastDomainAssociationsWrappedContainer { - let multicastDomainAssociationsContainer = try multicastDomainAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayMulticastDomainAssociation].self, forKey: .member) - var multicastDomainAssociationsBuffer:[EC2ClientTypes.TransitGatewayMulticastDomainAssociation]? = nil - if let multicastDomainAssociationsContainer = multicastDomainAssociationsContainer { - multicastDomainAssociationsBuffer = [EC2ClientTypes.TransitGatewayMulticastDomainAssociation]() - for structureContainer0 in multicastDomainAssociationsContainer { - multicastDomainAssociationsBuffer?.append(structureContainer0) - } - } - multicastDomainAssociations = multicastDomainAssociationsBuffer - } else { - multicastDomainAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - multicastDomainAssociations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetTransitGatewayMulticastDomainAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -102055,65 +69762,16 @@ public struct GetTransitGatewayPolicyTableAssociationsInput: Swift.Equatable { } } -struct GetTransitGatewayPolicyTableAssociationsInputBody: Swift.Equatable { - let transitGatewayPolicyTableId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetTransitGatewayPolicyTableAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayPolicyTableId = "TransitGatewayPolicyTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayPolicyTableId) - transitGatewayPolicyTableId = transitGatewayPolicyTableIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetTransitGatewayPolicyTableAssociationsOutput { -extension GetTransitGatewayPolicyTableAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTransitGatewayPolicyTableAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.associations = output.associations - self.nextToken = output.nextToken - } else { - self.associations = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTransitGatewayPolicyTableAssociationsOutput() + value.associations = try reader["associations"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayPolicyTableAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -102134,48 +69792,18 @@ public struct GetTransitGatewayPolicyTableAssociationsOutput: Swift.Equatable { } } -struct GetTransitGatewayPolicyTableAssociationsOutputBody: Swift.Equatable { - let associations: [EC2ClientTypes.TransitGatewayPolicyTableAssociation]? - let nextToken: Swift.String? -} - -extension GetTransitGatewayPolicyTableAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "associations" - case nextToken = "nextToken" - } +enum GetTransitGatewayPolicyTableAssociationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.associations) { - struct KeyVal0{struct item{}} - let associationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associations) - if let associationsWrappedContainer = associationsWrappedContainer { - let associationsContainer = try associationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayPolicyTableAssociation].self, forKey: .member) - var associationsBuffer:[EC2ClientTypes.TransitGatewayPolicyTableAssociation]? = nil - if let associationsContainer = associationsContainer { - associationsBuffer = [EC2ClientTypes.TransitGatewayPolicyTableAssociation]() - for structureContainer0 in associationsContainer { - associationsBuffer?.append(structureContainer0) - } - } - associations = associationsBuffer - } else { - associations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - associations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetTransitGatewayPolicyTableAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -102248,63 +69876,15 @@ public struct GetTransitGatewayPolicyTableEntriesInput: Swift.Equatable { } } -struct GetTransitGatewayPolicyTableEntriesInputBody: Swift.Equatable { - let transitGatewayPolicyTableId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetTransitGatewayPolicyTableEntriesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayPolicyTableId = "TransitGatewayPolicyTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayPolicyTableId) - transitGatewayPolicyTableId = transitGatewayPolicyTableIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetTransitGatewayPolicyTableEntriesOutput { -extension GetTransitGatewayPolicyTableEntriesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTransitGatewayPolicyTableEntriesOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPolicyTableEntries = output.transitGatewayPolicyTableEntries - } else { - self.transitGatewayPolicyTableEntries = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTransitGatewayPolicyTableEntriesOutput() + value.transitGatewayPolicyTableEntries = try reader["transitGatewayPolicyTableEntries"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayPolicyTableEntry.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -102321,44 +69901,18 @@ public struct GetTransitGatewayPolicyTableEntriesOutput: Swift.Equatable { } } -struct GetTransitGatewayPolicyTableEntriesOutputBody: Swift.Equatable { - let transitGatewayPolicyTableEntries: [EC2ClientTypes.TransitGatewayPolicyTableEntry]? -} - -extension GetTransitGatewayPolicyTableEntriesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPolicyTableEntries = "transitGatewayPolicyTableEntries" - } +enum GetTransitGatewayPolicyTableEntriesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayPolicyTableEntries) { - struct KeyVal0{struct item{}} - let transitGatewayPolicyTableEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayPolicyTableEntries) - if let transitGatewayPolicyTableEntriesWrappedContainer = transitGatewayPolicyTableEntriesWrappedContainer { - let transitGatewayPolicyTableEntriesContainer = try transitGatewayPolicyTableEntriesWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayPolicyTableEntry].self, forKey: .member) - var transitGatewayPolicyTableEntriesBuffer:[EC2ClientTypes.TransitGatewayPolicyTableEntry]? = nil - if let transitGatewayPolicyTableEntriesContainer = transitGatewayPolicyTableEntriesContainer { - transitGatewayPolicyTableEntriesBuffer = [EC2ClientTypes.TransitGatewayPolicyTableEntry]() - for structureContainer0 in transitGatewayPolicyTableEntriesContainer { - transitGatewayPolicyTableEntriesBuffer?.append(structureContainer0) - } - } - transitGatewayPolicyTableEntries = transitGatewayPolicyTableEntriesBuffer - } else { - transitGatewayPolicyTableEntries = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayPolicyTableEntries = nil - } - } -} - -enum GetTransitGatewayPolicyTableEntriesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -102445,65 +69999,16 @@ public struct GetTransitGatewayPrefixListReferencesInput: Swift.Equatable { } } -struct GetTransitGatewayPrefixListReferencesInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetTransitGatewayPrefixListReferencesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetTransitGatewayPrefixListReferencesOutput { -extension GetTransitGatewayPrefixListReferencesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTransitGatewayPrefixListReferencesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayPrefixListReferences = output.transitGatewayPrefixListReferences - } else { - self.nextToken = nil - self.transitGatewayPrefixListReferences = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTransitGatewayPrefixListReferencesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayPrefixListReferences = try reader["transitGatewayPrefixListReferenceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayPrefixListReference.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -102524,48 +70029,18 @@ public struct GetTransitGatewayPrefixListReferencesOutput: Swift.Equatable { } } -struct GetTransitGatewayPrefixListReferencesOutputBody: Swift.Equatable { - let transitGatewayPrefixListReferences: [EC2ClientTypes.TransitGatewayPrefixListReference]? - let nextToken: Swift.String? -} +enum GetTransitGatewayPrefixListReferencesOutputError { -extension GetTransitGatewayPrefixListReferencesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayPrefixListReferences = "transitGatewayPrefixListReferenceSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayPrefixListReferences) { - struct KeyVal0{struct item{}} - let transitGatewayPrefixListReferencesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayPrefixListReferences) - if let transitGatewayPrefixListReferencesWrappedContainer = transitGatewayPrefixListReferencesWrappedContainer { - let transitGatewayPrefixListReferencesContainer = try transitGatewayPrefixListReferencesWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayPrefixListReference].self, forKey: .member) - var transitGatewayPrefixListReferencesBuffer:[EC2ClientTypes.TransitGatewayPrefixListReference]? = nil - if let transitGatewayPrefixListReferencesContainer = transitGatewayPrefixListReferencesContainer { - transitGatewayPrefixListReferencesBuffer = [EC2ClientTypes.TransitGatewayPrefixListReference]() - for structureContainer0 in transitGatewayPrefixListReferencesContainer { - transitGatewayPrefixListReferencesBuffer?.append(structureContainer0) - } - } - transitGatewayPrefixListReferences = transitGatewayPrefixListReferencesBuffer - } else { - transitGatewayPrefixListReferences = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayPrefixListReferences = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetTransitGatewayPrefixListReferencesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -102597,218 +70072,19 @@ extension GetTransitGatewayRouteTableAssociationsInput: Swift.Encodable { if let transitGatewayRouteTableId = transitGatewayRouteTableId { try container.encode(transitGatewayRouteTableId, forKey: ClientRuntime.Key("TransitGatewayRouteTableId")) } - try container.encode("GetTransitGatewayRouteTableAssociations", forKey:ClientRuntime.Key("Action")) - try container.encode("2016-11-15", forKey:ClientRuntime.Key("Version")) - } -} - -extension GetTransitGatewayRouteTableAssociationsInput { - - static func urlPathProvider(_ value: GetTransitGatewayRouteTableAssociationsInput) -> Swift.String? { - return "/" - } -} - -public struct GetTransitGatewayRouteTableAssociationsInput: Swift.Equatable { - /// Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. - public var dryRun: Swift.Bool? - /// One or more filters. The possible values are: - /// - /// * resource-id - The ID of the resource. - /// - /// * resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect. - /// - /// * transit-gateway-attachment-id - The ID of the attachment. - public var filters: [EC2ClientTypes.Filter]? - /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. - public var maxResults: Swift.Int? - /// The token for the next page of results. - public var nextToken: Swift.String? - /// The ID of the transit gateway route table. - /// This member is required. - public var transitGatewayRouteTableId: Swift.String? - - public init( - dryRun: Swift.Bool? = nil, - filters: [EC2ClientTypes.Filter]? = nil, - maxResults: Swift.Int? = nil, - nextToken: Swift.String? = nil, - transitGatewayRouteTableId: Swift.String? = nil - ) - { - self.dryRun = dryRun - self.filters = filters - self.maxResults = maxResults - self.nextToken = nextToken - self.transitGatewayRouteTableId = transitGatewayRouteTableId - } -} - -struct GetTransitGatewayRouteTableAssociationsInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetTransitGatewayRouteTableAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension GetTransitGatewayRouteTableAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTransitGatewayRouteTableAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.associations = output.associations - self.nextToken = output.nextToken - } else { - self.associations = nil - self.nextToken = nil - } - } -} - -public struct GetTransitGatewayRouteTableAssociationsOutput: Swift.Equatable { - /// Information about the associations. - public var associations: [EC2ClientTypes.TransitGatewayRouteTableAssociation]? - /// The token to use to retrieve the next page of results. This value is null when there are no more results to return. - public var nextToken: Swift.String? - - public init( - associations: [EC2ClientTypes.TransitGatewayRouteTableAssociation]? = nil, - nextToken: Swift.String? = nil - ) - { - self.associations = associations - self.nextToken = nextToken - } -} - -struct GetTransitGatewayRouteTableAssociationsOutputBody: Swift.Equatable { - let associations: [EC2ClientTypes.TransitGatewayRouteTableAssociation]? - let nextToken: Swift.String? -} - -extension GetTransitGatewayRouteTableAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "associations" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.associations) { - struct KeyVal0{struct item{}} - let associationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associations) - if let associationsWrappedContainer = associationsWrappedContainer { - let associationsContainer = try associationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayRouteTableAssociation].self, forKey: .member) - var associationsBuffer:[EC2ClientTypes.TransitGatewayRouteTableAssociation]? = nil - if let associationsContainer = associationsContainer { - associationsBuffer = [EC2ClientTypes.TransitGatewayRouteTableAssociation]() - for structureContainer0 in associationsContainer { - associationsBuffer?.append(structureContainer0) - } - } - associations = associationsBuffer - } else { - associations = [] - } - } else { - associations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetTransitGatewayRouteTableAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension GetTransitGatewayRouteTablePropagationsInput: Swift.Encodable { - public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let dryRun = dryRun { - try container.encode(dryRun, forKey: ClientRuntime.Key("DryRun")) - } - if let filters = filters { - if !filters.isEmpty { - for (index0, filter0) in filters.enumerated() { - var filtersContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Filter.\(index0.advanced(by: 1))")) - try filtersContainer0.encode(filter0, forKey: ClientRuntime.Key("")) - } - } - else { - var filtersContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Filter")) - try filtersContainer.encode("", forKey: ClientRuntime.Key("")) - } - } - if let maxResults = maxResults { - try container.encode(maxResults, forKey: ClientRuntime.Key("MaxResults")) - } - if let nextToken = nextToken { - try container.encode(nextToken, forKey: ClientRuntime.Key("NextToken")) - } - if let transitGatewayRouteTableId = transitGatewayRouteTableId { - try container.encode(transitGatewayRouteTableId, forKey: ClientRuntime.Key("TransitGatewayRouteTableId")) - } - try container.encode("GetTransitGatewayRouteTablePropagations", forKey:ClientRuntime.Key("Action")) + try container.encode("GetTransitGatewayRouteTableAssociations", forKey:ClientRuntime.Key("Action")) try container.encode("2016-11-15", forKey:ClientRuntime.Key("Version")) } } -extension GetTransitGatewayRouteTablePropagationsInput { +extension GetTransitGatewayRouteTableAssociationsInput { - static func urlPathProvider(_ value: GetTransitGatewayRouteTablePropagationsInput) -> Swift.String? { + static func urlPathProvider(_ value: GetTransitGatewayRouteTableAssociationsInput) -> Swift.String? { return "/" } } -public struct GetTransitGatewayRouteTablePropagationsInput: Swift.Equatable { +public struct GetTransitGatewayRouteTableAssociationsInput: Swift.Equatable { /// Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. public var dryRun: Swift.Bool? /// One or more filters. The possible values are: @@ -102843,65 +70119,136 @@ public struct GetTransitGatewayRouteTablePropagationsInput: Swift.Equatable { } } -struct GetTransitGatewayRouteTablePropagationsInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? +extension GetTransitGatewayRouteTableAssociationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTransitGatewayRouteTableAssociationsOutput() + value.associations = try reader["associations"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayRouteTableAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value + } + } } -extension GetTransitGatewayRouteTablePropagationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" +public struct GetTransitGatewayRouteTableAssociationsOutput: Swift.Equatable { + /// Information about the associations. + public var associations: [EC2ClientTypes.TransitGatewayRouteTableAssociation]? + /// The token to use to retrieve the next page of results. This value is null when there are no more results to return. + public var nextToken: Swift.String? + + public init( + associations: [EC2ClientTypes.TransitGatewayRouteTableAssociation]? = nil, + nextToken: Swift.String? = nil + ) + { + self.associations = associations + self.nextToken = nextToken + } +} + +enum GetTransitGatewayRouteTableAssociationsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } + } } +} - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } +extension GetTransitGatewayRouteTablePropagationsInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { + var container = encoder.container(keyedBy: ClientRuntime.Key.self) + if let dryRun = dryRun { + try container.encode(dryRun, forKey: ClientRuntime.Key("DryRun")) + } + if let filters = filters { + if !filters.isEmpty { + for (index0, filter0) in filters.enumerated() { + var filtersContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Filter.\(index0.advanced(by: 1))")) + try filtersContainer0.encode(filter0, forKey: ClientRuntime.Key("")) } - filters = filtersBuffer - } else { - filters = [] } - } else { - filters = nil + else { + var filtersContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Filter")) + try filtersContainer.encode("", forKey: ClientRuntime.Key("")) + } + } + if let maxResults = maxResults { + try container.encode(maxResults, forKey: ClientRuntime.Key("MaxResults")) } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded + if let nextToken = nextToken { + try container.encode(nextToken, forKey: ClientRuntime.Key("NextToken")) + } + if let transitGatewayRouteTableId = transitGatewayRouteTableId { + try container.encode(transitGatewayRouteTableId, forKey: ClientRuntime.Key("TransitGatewayRouteTableId")) + } + try container.encode("GetTransitGatewayRouteTablePropagations", forKey:ClientRuntime.Key("Action")) + try container.encode("2016-11-15", forKey:ClientRuntime.Key("Version")) } } -extension GetTransitGatewayRouteTablePropagationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTransitGatewayRouteTablePropagationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.transitGatewayRouteTablePropagations = output.transitGatewayRouteTablePropagations - } else { - self.nextToken = nil - self.transitGatewayRouteTablePropagations = nil +extension GetTransitGatewayRouteTablePropagationsInput { + + static func urlPathProvider(_ value: GetTransitGatewayRouteTablePropagationsInput) -> Swift.String? { + return "/" + } +} + +public struct GetTransitGatewayRouteTablePropagationsInput: Swift.Equatable { + /// Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. + public var dryRun: Swift.Bool? + /// One or more filters. The possible values are: + /// + /// * resource-id - The ID of the resource. + /// + /// * resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway | peering | connect. + /// + /// * transit-gateway-attachment-id - The ID of the attachment. + public var filters: [EC2ClientTypes.Filter]? + /// The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value. + public var maxResults: Swift.Int? + /// The token for the next page of results. + public var nextToken: Swift.String? + /// The ID of the transit gateway route table. + /// This member is required. + public var transitGatewayRouteTableId: Swift.String? + + public init( + dryRun: Swift.Bool? = nil, + filters: [EC2ClientTypes.Filter]? = nil, + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil, + transitGatewayRouteTableId: Swift.String? = nil + ) + { + self.dryRun = dryRun + self.filters = filters + self.maxResults = maxResults + self.nextToken = nextToken + self.transitGatewayRouteTableId = transitGatewayRouteTableId + } +} + +extension GetTransitGatewayRouteTablePropagationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTransitGatewayRouteTablePropagationsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.transitGatewayRouteTablePropagations = try reader["transitGatewayRouteTablePropagations"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayRouteTablePropagation.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -102922,48 +70269,18 @@ public struct GetTransitGatewayRouteTablePropagationsOutput: Swift.Equatable { } } -struct GetTransitGatewayRouteTablePropagationsOutputBody: Swift.Equatable { - let transitGatewayRouteTablePropagations: [EC2ClientTypes.TransitGatewayRouteTablePropagation]? - let nextToken: Swift.String? -} - -extension GetTransitGatewayRouteTablePropagationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case transitGatewayRouteTablePropagations = "transitGatewayRouteTablePropagations" - } +enum GetTransitGatewayRouteTablePropagationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.transitGatewayRouteTablePropagations) { - struct KeyVal0{struct item{}} - let transitGatewayRouteTablePropagationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayRouteTablePropagations) - if let transitGatewayRouteTablePropagationsWrappedContainer = transitGatewayRouteTablePropagationsWrappedContainer { - let transitGatewayRouteTablePropagationsContainer = try transitGatewayRouteTablePropagationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayRouteTablePropagation].self, forKey: .member) - var transitGatewayRouteTablePropagationsBuffer:[EC2ClientTypes.TransitGatewayRouteTablePropagation]? = nil - if let transitGatewayRouteTablePropagationsContainer = transitGatewayRouteTablePropagationsContainer { - transitGatewayRouteTablePropagationsBuffer = [EC2ClientTypes.TransitGatewayRouteTablePropagation]() - for structureContainer0 in transitGatewayRouteTablePropagationsContainer { - transitGatewayRouteTablePropagationsBuffer?.append(structureContainer0) - } - } - transitGatewayRouteTablePropagations = transitGatewayRouteTablePropagationsBuffer - } else { - transitGatewayRouteTablePropagations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - transitGatewayRouteTablePropagations = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetTransitGatewayRouteTablePropagationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -103006,36 +70323,16 @@ public struct GetVerifiedAccessEndpointPolicyInput: Swift.Equatable { } } -struct GetVerifiedAccessEndpointPolicyInputBody: Swift.Equatable { - let verifiedAccessEndpointId: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetVerifiedAccessEndpointPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case verifiedAccessEndpointId = "VerifiedAccessEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessEndpointId) - verifiedAccessEndpointId = verifiedAccessEndpointIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetVerifiedAccessEndpointPolicyOutput { -extension GetVerifiedAccessEndpointPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetVerifiedAccessEndpointPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policyDocument = output.policyDocument - self.policyEnabled = output.policyEnabled - } else { - self.policyDocument = nil - self.policyEnabled = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetVerifiedAccessEndpointPolicyOutput() + value.policyDocument = try reader["policyDocument"].readIfPresent() + value.policyEnabled = try reader["policyEnabled"].readIfPresent() + return value } } } @@ -103056,31 +70353,18 @@ public struct GetVerifiedAccessEndpointPolicyOutput: Swift.Equatable { } } -struct GetVerifiedAccessEndpointPolicyOutputBody: Swift.Equatable { - let policyEnabled: Swift.Bool? - let policyDocument: Swift.String? -} - -extension GetVerifiedAccessEndpointPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "policyDocument" - case policyEnabled = "policyEnabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .policyEnabled) - policyEnabled = policyEnabledDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} +enum GetVerifiedAccessEndpointPolicyOutputError { -enum GetVerifiedAccessEndpointPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -103123,36 +70407,16 @@ public struct GetVerifiedAccessGroupPolicyInput: Swift.Equatable { } } -struct GetVerifiedAccessGroupPolicyInputBody: Swift.Equatable { - let verifiedAccessGroupId: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetVerifiedAccessGroupPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case verifiedAccessGroupId = "VerifiedAccessGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetVerifiedAccessGroupPolicyOutput { -extension GetVerifiedAccessGroupPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetVerifiedAccessGroupPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policyDocument = output.policyDocument - self.policyEnabled = output.policyEnabled - } else { - self.policyDocument = nil - self.policyEnabled = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetVerifiedAccessGroupPolicyOutput() + value.policyDocument = try reader["policyDocument"].readIfPresent() + value.policyEnabled = try reader["policyEnabled"].readIfPresent() + return value } } } @@ -103173,31 +70437,18 @@ public struct GetVerifiedAccessGroupPolicyOutput: Swift.Equatable { } } -struct GetVerifiedAccessGroupPolicyOutputBody: Swift.Equatable { - let policyEnabled: Swift.Bool? - let policyDocument: Swift.String? -} - -extension GetVerifiedAccessGroupPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "policyDocument" - case policyEnabled = "policyEnabled" - } +enum GetVerifiedAccessGroupPolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .policyEnabled) - policyEnabled = policyEnabledDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} - -enum GetVerifiedAccessGroupPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -103255,47 +70506,20 @@ public struct GetVpnConnectionDeviceSampleConfigurationInput: Swift.Equatable { } } -struct GetVpnConnectionDeviceSampleConfigurationInputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let vpnConnectionDeviceTypeId: Swift.String? - let internetKeyExchangeVersion: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetVpnConnectionDeviceSampleConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case internetKeyExchangeVersion = "InternetKeyExchangeVersion" - case vpnConnectionDeviceTypeId = "VpnConnectionDeviceTypeId" - case vpnConnectionId = "VpnConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let vpnConnectionDeviceTypeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionDeviceTypeId) - vpnConnectionDeviceTypeId = vpnConnectionDeviceTypeIdDecoded - let internetKeyExchangeVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .internetKeyExchangeVersion) - internetKeyExchangeVersion = internetKeyExchangeVersionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - extension GetVpnConnectionDeviceSampleConfigurationOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { "GetVpnConnectionDeviceSampleConfigurationOutput(vpnConnectionDeviceSampleConfiguration: \"CONTENT_REDACTED\")"} } -extension GetVpnConnectionDeviceSampleConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetVpnConnectionDeviceSampleConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnConnectionDeviceSampleConfiguration = output.vpnConnectionDeviceSampleConfiguration - } else { - self.vpnConnectionDeviceSampleConfiguration = nil +extension GetVpnConnectionDeviceSampleConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetVpnConnectionDeviceSampleConfigurationOutput() + value.vpnConnectionDeviceSampleConfiguration = try reader["vpnConnectionDeviceSampleConfiguration"].readIfPresent() + return value } } } @@ -103312,27 +70536,18 @@ public struct GetVpnConnectionDeviceSampleConfigurationOutput: Swift.Equatable { } } -struct GetVpnConnectionDeviceSampleConfigurationOutputBody: Swift.Equatable { - let vpnConnectionDeviceSampleConfiguration: Swift.String? -} - -extension GetVpnConnectionDeviceSampleConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnConnectionDeviceSampleConfiguration = "vpnConnectionDeviceSampleConfiguration" - } +enum GetVpnConnectionDeviceSampleConfigurationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionDeviceSampleConfigurationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionDeviceSampleConfiguration) - vpnConnectionDeviceSampleConfiguration = vpnConnectionDeviceSampleConfigurationDecoded - } -} - -enum GetVpnConnectionDeviceSampleConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -103381,40 +70596,16 @@ public struct GetVpnConnectionDeviceTypesInput: Swift.Equatable { } } -struct GetVpnConnectionDeviceTypesInputBody: Swift.Equatable { - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetVpnConnectionDeviceTypesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetVpnConnectionDeviceTypesOutput { -extension GetVpnConnectionDeviceTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetVpnConnectionDeviceTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.vpnConnectionDeviceTypes = output.vpnConnectionDeviceTypes - } else { - self.nextToken = nil - self.vpnConnectionDeviceTypes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetVpnConnectionDeviceTypesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.vpnConnectionDeviceTypes = try reader["vpnConnectionDeviceTypeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpnConnectionDeviceType.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -103435,48 +70626,18 @@ public struct GetVpnConnectionDeviceTypesOutput: Swift.Equatable { } } -struct GetVpnConnectionDeviceTypesOutputBody: Swift.Equatable { - let vpnConnectionDeviceTypes: [EC2ClientTypes.VpnConnectionDeviceType]? - let nextToken: Swift.String? -} - -extension GetVpnConnectionDeviceTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case vpnConnectionDeviceTypes = "vpnConnectionDeviceTypeSet" - } +enum GetVpnConnectionDeviceTypesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.vpnConnectionDeviceTypes) { - struct KeyVal0{struct item{}} - let vpnConnectionDeviceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpnConnectionDeviceTypes) - if let vpnConnectionDeviceTypesWrappedContainer = vpnConnectionDeviceTypesWrappedContainer { - let vpnConnectionDeviceTypesContainer = try vpnConnectionDeviceTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.VpnConnectionDeviceType].self, forKey: .member) - var vpnConnectionDeviceTypesBuffer:[EC2ClientTypes.VpnConnectionDeviceType]? = nil - if let vpnConnectionDeviceTypesContainer = vpnConnectionDeviceTypesContainer { - vpnConnectionDeviceTypesBuffer = [EC2ClientTypes.VpnConnectionDeviceType]() - for structureContainer0 in vpnConnectionDeviceTypesContainer { - vpnConnectionDeviceTypesBuffer?.append(structureContainer0) - } - } - vpnConnectionDeviceTypes = vpnConnectionDeviceTypesBuffer - } else { - vpnConnectionDeviceTypes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - vpnConnectionDeviceTypes = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum GetVpnConnectionDeviceTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -103527,48 +70688,20 @@ public struct GetVpnTunnelReplacementStatusInput: Swift.Equatable { } } -struct GetVpnTunnelReplacementStatusInputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let vpnTunnelOutsideIpAddress: Swift.String? - let dryRun: Swift.Bool? -} - -extension GetVpnTunnelReplacementStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case vpnConnectionId = "VpnConnectionId" - case vpnTunnelOutsideIpAddress = "VpnTunnelOutsideIpAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let vpnTunnelOutsideIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnTunnelOutsideIpAddress) - vpnTunnelOutsideIpAddress = vpnTunnelOutsideIpAddressDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension GetVpnTunnelReplacementStatusOutput { -extension GetVpnTunnelReplacementStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetVpnTunnelReplacementStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.customerGatewayId = output.customerGatewayId - self.maintenanceDetails = output.maintenanceDetails - self.transitGatewayId = output.transitGatewayId - self.vpnConnectionId = output.vpnConnectionId - self.vpnGatewayId = output.vpnGatewayId - self.vpnTunnelOutsideIpAddress = output.vpnTunnelOutsideIpAddress - } else { - self.customerGatewayId = nil - self.maintenanceDetails = nil - self.transitGatewayId = nil - self.vpnConnectionId = nil - self.vpnGatewayId = nil - self.vpnTunnelOutsideIpAddress = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetVpnTunnelReplacementStatusOutput() + value.customerGatewayId = try reader["customerGatewayId"].readIfPresent() + value.maintenanceDetails = try reader["maintenanceDetails"].readIfPresent(readingClosure: EC2ClientTypes.MaintenanceDetails.readingClosure) + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.vpnConnectionId = try reader["vpnConnectionId"].readIfPresent() + value.vpnGatewayId = try reader["vpnGatewayId"].readIfPresent() + value.vpnTunnelOutsideIpAddress = try reader["vpnTunnelOutsideIpAddress"].readIfPresent() + return value } } } @@ -103605,58 +70738,23 @@ public struct GetVpnTunnelReplacementStatusOutput: Swift.Equatable { } } -struct GetVpnTunnelReplacementStatusOutputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let transitGatewayId: Swift.String? - let customerGatewayId: Swift.String? - let vpnGatewayId: Swift.String? - let vpnTunnelOutsideIpAddress: Swift.String? - let maintenanceDetails: EC2ClientTypes.MaintenanceDetails? -} - -extension GetVpnTunnelReplacementStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerGatewayId = "customerGatewayId" - case maintenanceDetails = "maintenanceDetails" - case transitGatewayId = "transitGatewayId" - case vpnConnectionId = "vpnConnectionId" - case vpnGatewayId = "vpnGatewayId" - case vpnTunnelOutsideIpAddress = "vpnTunnelOutsideIpAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let customerGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerGatewayId) - customerGatewayId = customerGatewayIdDecoded - let vpnGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnGatewayId) - vpnGatewayId = vpnGatewayIdDecoded - let vpnTunnelOutsideIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnTunnelOutsideIpAddress) - vpnTunnelOutsideIpAddress = vpnTunnelOutsideIpAddressDecoded - let maintenanceDetailsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MaintenanceDetails.self, forKey: .maintenanceDetails) - maintenanceDetails = maintenanceDetailsDecoded - } -} +enum GetVpnTunnelReplacementStatusOutputError { -enum GetVpnTunnelReplacementStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.GpuDeviceInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "count" - case manufacturer = "manufacturer" - case memoryInfo = "memoryInfo" - case name = "name" - } +extension EC2ClientTypes.GpuDeviceInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -103674,16 +70772,16 @@ extension EC2ClientTypes.GpuDeviceInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let manufacturerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .manufacturer) - manufacturer = manufacturerDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded - let memoryInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.GpuDeviceMemoryInfo.self, forKey: .memoryInfo) - memoryInfo = memoryInfoDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.GpuDeviceInfo() + value.name = try reader["name"].readIfPresent() + value.manufacturer = try reader["manufacturer"].readIfPresent() + value.count = try reader["count"].readIfPresent() + value.memoryInfo = try reader["memoryInfo"].readIfPresent(readingClosure: EC2ClientTypes.GpuDeviceMemoryInfo.readingClosure) + return value + } } } @@ -103715,10 +70813,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.GpuDeviceMemoryInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sizeInMiB = "sizeInMiB" - } +extension EC2ClientTypes.GpuDeviceMemoryInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -103727,10 +70822,13 @@ extension EC2ClientTypes.GpuDeviceMemoryInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sizeInMiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sizeInMiB) - sizeInMiB = sizeInMiBDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.GpuDeviceMemoryInfo() + value.sizeInMiB = try reader["sizeInMiB"].readIfPresent() + return value + } } } @@ -103750,11 +70848,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.GpuInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case gpus = "gpus" - case totalGpuMemoryInMiB = "totalGpuMemoryInMiB" - } +extension EC2ClientTypes.GpuInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -103775,29 +70869,14 @@ extension EC2ClientTypes.GpuInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.gpus) { - struct KeyVal0{struct item{}} - let gpusWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .gpus) - if let gpusWrappedContainer = gpusWrappedContainer { - let gpusContainer = try gpusWrappedContainer.decodeIfPresent([EC2ClientTypes.GpuDeviceInfo].self, forKey: .member) - var gpusBuffer:[EC2ClientTypes.GpuDeviceInfo]? = nil - if let gpusContainer = gpusContainer { - gpusBuffer = [EC2ClientTypes.GpuDeviceInfo]() - for structureContainer0 in gpusContainer { - gpusBuffer?.append(structureContainer0) - } - } - gpus = gpusBuffer - } else { - gpus = [] - } - } else { - gpus = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.GpuInfo() + value.gpus = try reader["gpus"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GpuDeviceInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.totalGpuMemoryInMiB = try reader["totalGpuMemoryInMiB"].readIfPresent() + return value } - let totalGpuMemoryInMiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalGpuMemoryInMiB) - totalGpuMemoryInMiB = totalGpuMemoryInMiBDecoded } } @@ -103821,11 +70900,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.GroupIdentifier: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupId = "groupId" - case groupName = "groupName" - } +extension EC2ClientTypes.GroupIdentifier: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -103837,12 +70912,14 @@ extension EC2ClientTypes.GroupIdentifier: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.GroupIdentifier() + value.groupName = try reader["groupName"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + return value + } } } @@ -103866,10 +70943,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.HibernationOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configured = "configured" - } +extension EC2ClientTypes.HibernationOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -103878,10 +70952,13 @@ extension EC2ClientTypes.HibernationOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configuredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .configured) - configured = configuredDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.HibernationOptions() + value.configured = try reader["configured"].readIfPresent() + return value + } } } @@ -103901,10 +70978,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.HibernationOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configured = "Configured" - } +extension EC2ClientTypes.HibernationOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -103913,10 +70987,13 @@ extension EC2ClientTypes.HibernationOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configuredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .configured) - configured = configuredDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.HibernationOptionsRequest() + value.configured = try reader["Configured"].readIfPresent() + return value + } } } @@ -103943,12 +71020,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.HistoryRecord: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventInformation = "eventInformation" - case eventType = "eventType" - case timestamp = "timestamp" - } +extension EC2ClientTypes.HistoryRecord: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -103963,14 +71035,15 @@ extension EC2ClientTypes.HistoryRecord: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eventInformationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EventInformation.self, forKey: .eventInformation) - eventInformation = eventInformationDecoded - let eventTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EventType.self, forKey: .eventType) - eventType = eventTypeDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.HistoryRecord() + value.eventInformation = try reader["eventInformation"].readIfPresent(readingClosure: EC2ClientTypes.EventInformation.readingClosure) + value.eventType = try reader["eventType"].readIfPresent() + value.timestamp = try reader["timestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -104006,12 +71079,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.HistoryRecordEntry: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventInformation = "eventInformation" - case eventType = "eventType" - case timestamp = "timestamp" - } +extension EC2ClientTypes.HistoryRecordEntry: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -104026,14 +71094,15 @@ extension EC2ClientTypes.HistoryRecordEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eventInformationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EventInformation.self, forKey: .eventInformation) - eventInformation = eventInformationDecoded - let eventTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetEventType.self, forKey: .eventType) - eventType = eventTypeDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.HistoryRecordEntry() + value.eventInformation = try reader["eventInformation"].readIfPresent(readingClosure: EC2ClientTypes.EventInformation.readingClosure) + value.eventType = try reader["eventType"].readIfPresent() + value.timestamp = try reader["timestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -104061,29 +71130,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Host: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationTime = "allocationTime" - case allowsMultipleInstanceTypes = "allowsMultipleInstanceTypes" - case assetId = "assetId" - case autoPlacement = "autoPlacement" - case availabilityZone = "availabilityZone" - case availabilityZoneId = "availabilityZoneId" - case availableCapacity = "availableCapacity" - case clientToken = "clientToken" - case hostId = "hostId" - case hostMaintenance = "hostMaintenance" - case hostProperties = "hostProperties" - case hostRecovery = "hostRecovery" - case hostReservationId = "hostReservationId" - case instances = "instances" - case memberOfServiceLinkedResourceGroup = "memberOfServiceLinkedResourceGroup" - case outpostArn = "outpostArn" - case ownerId = "ownerId" - case releaseTime = "releaseTime" - case state = "state" - case tags = "tagSet" - } +extension EC2ClientTypes.Host: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -104167,82 +71214,32 @@ extension EC2ClientTypes.Host: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoPlacementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AutoPlacement.self, forKey: .autoPlacement) - autoPlacement = autoPlacementDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let availableCapacityDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AvailableCapacity.self, forKey: .availableCapacity) - availableCapacity = availableCapacityDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let hostIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostId) - hostId = hostIdDecoded - let hostPropertiesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostProperties.self, forKey: .hostProperties) - hostProperties = hostPropertiesDecoded - let hostReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostReservationId) - hostReservationId = hostReservationIdDecoded - if containerValues.contains(.instances) { - struct KeyVal0{struct item{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([EC2ClientTypes.HostInstance].self, forKey: .member) - var instancesBuffer:[EC2ClientTypes.HostInstance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [EC2ClientTypes.HostInstance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AllocationState.self, forKey: .state) - state = stateDecoded - let allocationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .allocationTime) - allocationTime = allocationTimeDecoded - let releaseTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .releaseTime) - releaseTime = releaseTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let hostRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostRecovery.self, forKey: .hostRecovery) - hostRecovery = hostRecoveryDecoded - let allowsMultipleInstanceTypesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AllowsMultipleInstanceTypes.self, forKey: .allowsMultipleInstanceTypes) - allowsMultipleInstanceTypes = allowsMultipleInstanceTypesDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let availabilityZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneId) - availabilityZoneId = availabilityZoneIdDecoded - let memberOfServiceLinkedResourceGroupDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .memberOfServiceLinkedResourceGroup) - memberOfServiceLinkedResourceGroup = memberOfServiceLinkedResourceGroupDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let hostMaintenanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostMaintenance.self, forKey: .hostMaintenance) - hostMaintenance = hostMaintenanceDecoded - let assetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .assetId) - assetId = assetIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Host() + value.autoPlacement = try reader["autoPlacement"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.availableCapacity = try reader["availableCapacity"].readIfPresent(readingClosure: EC2ClientTypes.AvailableCapacity.readingClosure) + value.clientToken = try reader["clientToken"].readIfPresent() + value.hostId = try reader["hostId"].readIfPresent() + value.hostProperties = try reader["hostProperties"].readIfPresent(readingClosure: EC2ClientTypes.HostProperties.readingClosure) + value.hostReservationId = try reader["hostReservationId"].readIfPresent() + value.instances = try reader["instances"].readListIfPresent(memberReadingClosure: EC2ClientTypes.HostInstance.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.state = try reader["state"].readIfPresent() + value.allocationTime = try reader["allocationTime"].readTimestampIfPresent(format: .dateTime) + value.releaseTime = try reader["releaseTime"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.hostRecovery = try reader["hostRecovery"].readIfPresent() + value.allowsMultipleInstanceTypes = try reader["allowsMultipleInstanceTypes"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.availabilityZoneId = try reader["availabilityZoneId"].readIfPresent() + value.memberOfServiceLinkedResourceGroup = try reader["memberOfServiceLinkedResourceGroup"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.hostMaintenance = try reader["hostMaintenance"].readIfPresent() + value.assetId = try reader["assetId"].readIfPresent() + return value + } } } @@ -104338,12 +71335,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.HostInstance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - case instanceType = "instanceType" - case ownerId = "ownerId" - } +extension EC2ClientTypes.HostInstance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -104358,14 +71350,15 @@ extension EC2ClientTypes.HostInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.HostInstance() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + return value + } } } @@ -104425,16 +71418,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.HostOffering: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currencyCode = "currencyCode" - case duration = "duration" - case hourlyPrice = "hourlyPrice" - case instanceFamily = "instanceFamily" - case offeringId = "offeringId" - case paymentOption = "paymentOption" - case upfrontPrice = "upfrontPrice" - } +extension EC2ClientTypes.HostOffering: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -104461,22 +71445,19 @@ extension EC2ClientTypes.HostOffering: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let hourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hourlyPrice) - hourlyPrice = hourlyPriceDecoded - let instanceFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - let offeringIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringId) - offeringId = offeringIdDecoded - let paymentOptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PaymentOption.self, forKey: .paymentOption) - paymentOption = paymentOptionDecoded - let upfrontPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .upfrontPrice) - upfrontPrice = upfrontPriceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.HostOffering() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.duration = try reader["duration"].readIfPresent() + value.hourlyPrice = try reader["hourlyPrice"].readIfPresent() + value.instanceFamily = try reader["instanceFamily"].readIfPresent() + value.offeringId = try reader["offeringId"].readIfPresent() + value.paymentOption = try reader["paymentOption"].readIfPresent() + value.upfrontPrice = try reader["upfrontPrice"].readIfPresent() + return value + } } } @@ -104520,14 +71501,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.HostProperties: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cores = "cores" - case instanceFamily = "instanceFamily" - case instanceType = "instanceType" - case sockets = "sockets" - case totalVCpus = "totalVCpus" - } +extension EC2ClientTypes.HostProperties: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -104548,18 +71522,17 @@ extension EC2ClientTypes.HostProperties: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coresDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .cores) - cores = coresDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let instanceFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - let socketsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sockets) - sockets = socketsDecoded - let totalVCpusDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalVCpus) - totalVCpus = totalVCpusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.HostProperties() + value.cores = try reader["cores"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.instanceFamily = try reader["instanceFamily"].readIfPresent() + value.sockets = try reader["sockets"].readIfPresent() + value.totalVCpus = try reader["totalVCpus"].readIfPresent() + return value + } } } @@ -104627,23 +71600,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.HostReservation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "count" - case currencyCode = "currencyCode" - case duration = "duration" - case end = "end" - case hostIdSet = "hostIdSet" - case hostReservationId = "hostReservationId" - case hourlyPrice = "hourlyPrice" - case instanceFamily = "instanceFamily" - case offeringId = "offeringId" - case paymentOption = "paymentOption" - case start = "start" - case state = "state" - case tags = "tagSet" - case upfrontPrice = "upfrontPrice" - } +extension EC2ClientTypes.HostReservation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -104709,69 +71666,25 @@ extension EC2ClientTypes.HostReservation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let endDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .end) - end = endDecoded - if containerValues.contains(.hostIdSet) { - struct KeyVal0{struct item{}} - let hostIdSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostIdSet) - if let hostIdSetWrappedContainer = hostIdSetWrappedContainer { - let hostIdSetContainer = try hostIdSetWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostIdSetBuffer:[Swift.String]? = nil - if let hostIdSetContainer = hostIdSetContainer { - hostIdSetBuffer = [Swift.String]() - for stringContainer0 in hostIdSetContainer { - hostIdSetBuffer?.append(stringContainer0) - } - } - hostIdSet = hostIdSetBuffer - } else { - hostIdSet = [] - } - } else { - hostIdSet = nil - } - let hostReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostReservationId) - hostReservationId = hostReservationIdDecoded - let hourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hourlyPrice) - hourlyPrice = hourlyPriceDecoded - let instanceFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - let offeringIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringId) - offeringId = offeringIdDecoded - let paymentOptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PaymentOption.self, forKey: .paymentOption) - paymentOption = paymentOptionDecoded - let startDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .start) - start = startDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReservationState.self, forKey: .state) - state = stateDecoded - let upfrontPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .upfrontPrice) - upfrontPrice = upfrontPriceDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.HostReservation() + value.count = try reader["count"].readIfPresent() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.duration = try reader["duration"].readIfPresent() + value.end = try reader["end"].readTimestampIfPresent(format: .dateTime) + value.hostIdSet = try reader["hostIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.hostReservationId = try reader["hostReservationId"].readIfPresent() + value.hourlyPrice = try reader["hourlyPrice"].readIfPresent() + value.instanceFamily = try reader["instanceFamily"].readIfPresent() + value.offeringId = try reader["offeringId"].readIfPresent() + value.paymentOption = try reader["paymentOption"].readIfPresent() + value.start = try reader["start"].readTimestampIfPresent(format: .dateTime) + value.state = try reader["state"].readIfPresent() + value.upfrontPrice = try reader["upfrontPrice"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -104972,10 +71885,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IKEVersionsListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.IKEVersionsListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -104984,10 +71894,13 @@ extension EC2ClientTypes.IKEVersionsListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IKEVersionsListValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -105007,10 +71920,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IKEVersionsRequestListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "Value" - } +extension EC2ClientTypes.IKEVersionsRequestListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -105019,10 +71929,13 @@ extension EC2ClientTypes.IKEVersionsRequestListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IKEVersionsRequestListValue() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -105042,11 +71955,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IamInstanceProfile: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "arn" - case id = "id" - } +extension EC2ClientTypes.IamInstanceProfile: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -105058,12 +71967,14 @@ extension EC2ClientTypes.IamInstanceProfile: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IamInstanceProfile() + value.arn = try reader["arn"].readIfPresent() + value.id = try reader["id"].readIfPresent() + return value + } } } @@ -105087,14 +71998,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IamInstanceProfileAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case iamInstanceProfile = "iamInstanceProfile" - case instanceId = "instanceId" - case state = "state" - case timestamp = "timestamp" - } +extension EC2ClientTypes.IamInstanceProfileAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -105115,18 +72019,17 @@ extension EC2ClientTypes.IamInstanceProfileAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfile.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileAssociationState.self, forKey: .state) - state = stateDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IamInstanceProfileAssociation() + value.associationId = try reader["associationId"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.iamInstanceProfile = try reader["iamInstanceProfile"].readIfPresent(readingClosure: EC2ClientTypes.IamInstanceProfile.readingClosure) + value.state = try reader["state"].readIfPresent() + value.timestamp = try reader["timestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -105200,11 +72103,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IamInstanceProfileSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "arn" - case name = "name" - } +extension EC2ClientTypes.IamInstanceProfileSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -105216,12 +72115,14 @@ extension EC2ClientTypes.IamInstanceProfileSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IamInstanceProfileSpecification() + value.arn = try reader["arn"].readIfPresent() + value.name = try reader["name"].readIfPresent() + return value + } } } @@ -105245,11 +72146,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IcmpTypeCode: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case type = "type" - } +extension EC2ClientTypes.IcmpTypeCode: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -105261,12 +72158,14 @@ extension EC2ClientTypes.IcmpTypeCode: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .code) - code = codeDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IcmpTypeCode() + value.code = try reader["code"].readIfPresent() + value.type = try reader["type"].readIfPresent() + return value + } } } @@ -105290,12 +72189,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IdFormat: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deadline = "deadline" - case resource = "resource" - case useLongIds = "useLongIds" - } +extension EC2ClientTypes.IdFormat: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -105310,14 +72204,15 @@ extension EC2ClientTypes.IdFormat: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deadlineDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deadline) - deadline = deadlineDecoded - let resourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resource) - resource = resourceDecoded - let useLongIdsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useLongIds) - useLongIds = useLongIdsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IdFormat() + value.deadline = try reader["deadline"].readTimestampIfPresent(format: .dateTime) + value.resource = try reader["resource"].readIfPresent() + value.useLongIds = try reader["useLongIds"].readIfPresent() + return value + } } } @@ -105377,40 +72272,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Image: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case architecture = "architecture" - case blockDeviceMappings = "blockDeviceMapping" - case bootMode = "bootMode" - case creationDate = "creationDate" - case deprecationTime = "deprecationTime" - case description = "description" - case enaSupport = "enaSupport" - case hypervisor = "hypervisor" - case imageId = "imageId" - case imageLocation = "imageLocation" - case imageOwnerAlias = "imageOwnerAlias" - case imageType = "imageType" - case imdsSupport = "imdsSupport" - case kernelId = "kernelId" - case name = "name" - case ownerId = "imageOwnerId" - case platform = "platform" - case platformDetails = "platformDetails" - case productCodes = "productCodes" - case `public` = "isPublic" - case ramdiskId = "ramdiskId" - case rootDeviceName = "rootDeviceName" - case rootDeviceType = "rootDeviceType" - case sourceInstanceId = "sourceInstanceId" - case sriovNetSupport = "sriovNetSupport" - case state = "imageState" - case stateReason = "stateReason" - case tags = "tagSet" - case tpmSupport = "tpmSupport" - case usageOperation = "usageOperation" - case virtualizationType = "virtualizationType" - } +extension EC2ClientTypes.Image: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -105536,121 +72398,43 @@ extension EC2ClientTypes.Image: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let architectureDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ArchitectureValues.self, forKey: .architecture) - architecture = architectureDecoded - let creationDateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .creationDate) - creationDate = creationDateDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let imageLocationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageLocation) - imageLocation = imageLocationDecoded - let imageTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImageTypeValues.self, forKey: .imageType) - imageType = imageTypeDecoded - let publicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .public) - `public` = publicDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let platformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlatformValues.self, forKey: .platform) - platform = platformDecoded - let platformDetailsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformDetails) - platformDetails = platformDetailsDecoded - let usageOperationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageOperation) - usageOperation = usageOperationDecoded - if containerValues.contains(.productCodes) { - struct KeyVal0{struct item{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ProductCode].self, forKey: .member) - var productCodesBuffer:[EC2ClientTypes.ProductCode]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [EC2ClientTypes.ProductCode]() - for structureContainer0 in productCodesContainer { - productCodesBuffer?.append(structureContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil - } - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImageState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let enaSupportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSupport) - enaSupport = enaSupportDecoded - let hypervisorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HypervisorType.self, forKey: .hypervisor) - hypervisor = hypervisorDecoded - let imageOwnerAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageOwnerAlias) - imageOwnerAlias = imageOwnerAliasDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let rootDeviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rootDeviceName) - rootDeviceName = rootDeviceNameDecoded - let rootDeviceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeviceType.self, forKey: .rootDeviceType) - rootDeviceType = rootDeviceTypeDecoded - let sriovNetSupportDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sriovNetSupport) - sriovNetSupport = sriovNetSupportDecoded - let stateReasonDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StateReason.self, forKey: .stateReason) - stateReason = stateReasonDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let virtualizationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VirtualizationType.self, forKey: .virtualizationType) - virtualizationType = virtualizationTypeDecoded - let bootModeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BootModeValues.self, forKey: .bootMode) - bootMode = bootModeDecoded - let tpmSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TpmSupportValues.self, forKey: .tpmSupport) - tpmSupport = tpmSupportDecoded - let deprecationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deprecationTime) - deprecationTime = deprecationTimeDecoded - let imdsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImdsSupportValues.self, forKey: .imdsSupport) - imdsSupport = imdsSupportDecoded - let sourceInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceInstanceId) - sourceInstanceId = sourceInstanceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Image() + value.architecture = try reader["architecture"].readIfPresent() + value.creationDate = try reader["creationDate"].readIfPresent() + value.imageId = try reader["imageId"].readIfPresent() + value.imageLocation = try reader["imageLocation"].readIfPresent() + value.imageType = try reader["imageType"].readIfPresent() + value.`public` = try reader["isPublic"].readIfPresent() + value.kernelId = try reader["kernelId"].readIfPresent() + value.ownerId = try reader["imageOwnerId"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + value.platformDetails = try reader["platformDetails"].readIfPresent() + value.usageOperation = try reader["usageOperation"].readIfPresent() + value.productCodes = try reader["productCodes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ProductCode.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ramdiskId = try reader["ramdiskId"].readIfPresent() + value.state = try reader["imageState"].readIfPresent() + value.blockDeviceMappings = try reader["blockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.BlockDeviceMapping.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.description = try reader["description"].readIfPresent() + value.enaSupport = try reader["enaSupport"].readIfPresent() + value.hypervisor = try reader["hypervisor"].readIfPresent() + value.imageOwnerAlias = try reader["imageOwnerAlias"].readIfPresent() + value.name = try reader["name"].readIfPresent() + value.rootDeviceName = try reader["rootDeviceName"].readIfPresent() + value.rootDeviceType = try reader["rootDeviceType"].readIfPresent() + value.sriovNetSupport = try reader["sriovNetSupport"].readIfPresent() + value.stateReason = try reader["stateReason"].readIfPresent(readingClosure: EC2ClientTypes.StateReason.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.virtualizationType = try reader["virtualizationType"].readIfPresent() + value.bootMode = try reader["bootMode"].readIfPresent() + value.tpmSupport = try reader["tpmSupport"].readIfPresent() + value.deprecationTime = try reader["deprecationTime"].readIfPresent() + value.imdsSupport = try reader["imdsSupport"].readIfPresent() + value.sourceInstanceId = try reader["sourceInstanceId"].readIfPresent() + return value + } } } @@ -105910,15 +72694,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ImageDiskContainer: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case deviceName = "DeviceName" - case format = "Format" - case snapshotId = "SnapshotId" - case url = "Url" - case userBucket = "UserBucket" - } +extension EC2ClientTypes.ImageDiskContainer: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -105942,20 +72718,18 @@ extension EC2ClientTypes.ImageDiskContainer: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let formatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .format) - format = formatDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded - let userBucketDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UserBucket.self, forKey: .userBucket) - userBucket = userBucketDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImageDiskContainer() + value.description = try reader["Description"].readIfPresent() + value.deviceName = try reader["DeviceName"].readIfPresent() + value.format = try reader["Format"].readIfPresent() + value.snapshotId = try reader["SnapshotId"].readIfPresent() + value.url = try reader["Url"].readIfPresent() + value.userBucket = try reader["UserBucket"].readIfPresent(readingClosure: EC2ClientTypes.UserBucket.readingClosure) + return value + } } } @@ -106000,14 +72774,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ImageRecycleBinInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case imageId = "imageId" - case name = "name" - case recycleBinEnterTime = "recycleBinEnterTime" - case recycleBinExitTime = "recycleBinExitTime" - } +extension EC2ClientTypes.ImageRecycleBinInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -106028,18 +72795,17 @@ extension EC2ClientTypes.ImageRecycleBinInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let recycleBinEnterTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .recycleBinEnterTime) - recycleBinEnterTime = recycleBinEnterTimeDecoded - let recycleBinExitTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .recycleBinExitTime) - recycleBinExitTime = recycleBinExitTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImageRecycleBinInfo() + value.imageId = try reader["imageId"].readIfPresent() + value.name = try reader["name"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.recycleBinEnterTime = try reader["recycleBinEnterTime"].readTimestampIfPresent(format: .dateTime) + value.recycleBinExitTime = try reader["recycleBinExitTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -106235,38 +73001,15 @@ public struct ImportClientVpnClientCertificateRevocationListInput: Swift.Equatab } } -struct ImportClientVpnClientCertificateRevocationListInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let certificateRevocationList: Swift.String? - let dryRun: Swift.Bool? -} - -extension ImportClientVpnClientCertificateRevocationListInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateRevocationList = "CertificateRevocationList" - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let certificateRevocationListDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateRevocationList) - certificateRevocationList = certificateRevocationListDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ImportClientVpnClientCertificateRevocationListOutput { -extension ImportClientVpnClientCertificateRevocationListOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ImportClientVpnClientCertificateRevocationListOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ImportClientVpnClientCertificateRevocationListOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -106283,27 +73026,18 @@ public struct ImportClientVpnClientCertificateRevocationListOutput: Swift.Equata } } -struct ImportClientVpnClientCertificateRevocationListOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ImportClientVpnClientCertificateRevocationListOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ImportClientVpnClientCertificateRevocationListOutputError { -enum ImportClientVpnClientCertificateRevocationListOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -106481,137 +73215,7 @@ public struct ImportImageInput: Swift.Equatable { } } -struct ImportImageInputBody: Swift.Equatable { - let architecture: Swift.String? - let clientData: EC2ClientTypes.ClientData? - let clientToken: Swift.String? - let description: Swift.String? - let diskContainers: [EC2ClientTypes.ImageDiskContainer]? - let dryRun: Swift.Bool? - let encrypted: Swift.Bool? - let hypervisor: Swift.String? - let kmsKeyId: Swift.String? - let licenseType: Swift.String? - let platform: Swift.String? - let roleName: Swift.String? - let licenseSpecifications: [EC2ClientTypes.ImportImageLicenseConfigurationRequest]? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let usageOperation: Swift.String? - let bootMode: EC2ClientTypes.BootModeValues? -} - -extension ImportImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case architecture = "Architecture" - case bootMode = "BootMode" - case clientData = "ClientData" - case clientToken = "ClientToken" - case description = "Description" - case diskContainers = "DiskContainer" - case dryRun = "DryRun" - case encrypted = "Encrypted" - case hypervisor = "Hypervisor" - case kmsKeyId = "KmsKeyId" - case licenseSpecifications = "LicenseSpecifications" - case licenseType = "LicenseType" - case platform = "Platform" - case roleName = "RoleName" - case tagSpecifications = "TagSpecification" - case usageOperation = "UsageOperation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let architectureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .architecture) - architecture = architectureDecoded - let clientDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientData.self, forKey: .clientData) - clientData = clientDataDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.diskContainers) { - struct KeyVal0{struct item{}} - let diskContainersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .diskContainers) - if let diskContainersWrappedContainer = diskContainersWrappedContainer { - let diskContainersContainer = try diskContainersWrappedContainer.decodeIfPresent([EC2ClientTypes.ImageDiskContainer].self, forKey: .member) - var diskContainersBuffer:[EC2ClientTypes.ImageDiskContainer]? = nil - if let diskContainersContainer = diskContainersContainer { - diskContainersBuffer = [EC2ClientTypes.ImageDiskContainer]() - for structureContainer0 in diskContainersContainer { - diskContainersBuffer?.append(structureContainer0) - } - } - diskContainers = diskContainersBuffer - } else { - diskContainers = [] - } - } else { - diskContainers = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let hypervisorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hypervisor) - hypervisor = hypervisorDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let licenseTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseType) - licenseType = licenseTypeDecoded - let platformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platform) - platform = platformDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - if containerValues.contains(.licenseSpecifications) { - struct KeyVal0{struct item{}} - let licenseSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .licenseSpecifications) - if let licenseSpecificationsWrappedContainer = licenseSpecificationsWrappedContainer { - let licenseSpecificationsContainer = try licenseSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ImportImageLicenseConfigurationRequest].self, forKey: .member) - var licenseSpecificationsBuffer:[EC2ClientTypes.ImportImageLicenseConfigurationRequest]? = nil - if let licenseSpecificationsContainer = licenseSpecificationsContainer { - licenseSpecificationsBuffer = [EC2ClientTypes.ImportImageLicenseConfigurationRequest]() - for structureContainer0 in licenseSpecificationsContainer { - licenseSpecificationsBuffer?.append(structureContainer0) - } - } - licenseSpecifications = licenseSpecificationsBuffer - } else { - licenseSpecifications = [] - } - } else { - licenseSpecifications = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let usageOperationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageOperation) - usageOperation = usageOperationDecoded - let bootModeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BootModeValues.self, forKey: .bootMode) - bootMode = bootModeDecoded - } -} - -extension EC2ClientTypes.ImportImageLicenseConfigurationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case licenseConfigurationArn = "LicenseConfigurationArn" - } +extension EC2ClientTypes.ImportImageLicenseConfigurationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -106620,10 +73224,13 @@ extension EC2ClientTypes.ImportImageLicenseConfigurationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let licenseConfigurationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseConfigurationArn) - licenseConfigurationArn = licenseConfigurationArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImportImageLicenseConfigurationRequest() + value.licenseConfigurationArn = try reader["LicenseConfigurationArn"].readIfPresent() + return value + } } } @@ -106643,10 +73250,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ImportImageLicenseConfigurationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case licenseConfigurationArn = "licenseConfigurationArn" - } +extension EC2ClientTypes.ImportImageLicenseConfigurationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -106655,10 +73259,13 @@ extension EC2ClientTypes.ImportImageLicenseConfigurationResponse: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let licenseConfigurationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseConfigurationArn) - licenseConfigurationArn = licenseConfigurationArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImportImageLicenseConfigurationResponse() + value.licenseConfigurationArn = try reader["licenseConfigurationArn"].readIfPresent() + return value + } } } @@ -106678,44 +73285,30 @@ extension EC2ClientTypes { } -extension ImportImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ImportImageOutputBody = try responseDecoder.decode(responseBody: data) - self.architecture = output.architecture - self.description = output.description - self.encrypted = output.encrypted - self.hypervisor = output.hypervisor - self.imageId = output.imageId - self.importTaskId = output.importTaskId - self.kmsKeyId = output.kmsKeyId - self.licenseSpecifications = output.licenseSpecifications - self.licenseType = output.licenseType - self.platform = output.platform - self.progress = output.progress - self.snapshotDetails = output.snapshotDetails - self.status = output.status - self.statusMessage = output.statusMessage - self.tags = output.tags - self.usageOperation = output.usageOperation - } else { - self.architecture = nil - self.description = nil - self.encrypted = nil - self.hypervisor = nil - self.imageId = nil - self.importTaskId = nil - self.kmsKeyId = nil - self.licenseSpecifications = nil - self.licenseType = nil - self.platform = nil - self.progress = nil - self.snapshotDetails = nil - self.status = nil - self.statusMessage = nil - self.tags = nil - self.usageOperation = nil +extension ImportImageOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ImportImageOutput() + value.architecture = try reader["architecture"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.encrypted = try reader["encrypted"].readIfPresent() + value.hypervisor = try reader["hypervisor"].readIfPresent() + value.imageId = try reader["imageId"].readIfPresent() + value.importTaskId = try reader["importTaskId"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.licenseSpecifications = try reader["licenseSpecifications"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ImportImageLicenseConfigurationResponse.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.licenseType = try reader["licenseType"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.snapshotDetails = try reader["snapshotDetailSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SnapshotDetail.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.usageOperation = try reader["usageOperation"].readIfPresent() + return value } } } @@ -106792,162 +73385,23 @@ public struct ImportImageOutput: Swift.Equatable { } } -struct ImportImageOutputBody: Swift.Equatable { - let architecture: Swift.String? - let description: Swift.String? - let encrypted: Swift.Bool? - let hypervisor: Swift.String? - let imageId: Swift.String? - let importTaskId: Swift.String? - let kmsKeyId: Swift.String? - let licenseType: Swift.String? - let platform: Swift.String? - let progress: Swift.String? - let snapshotDetails: [EC2ClientTypes.SnapshotDetail]? - let status: Swift.String? - let statusMessage: Swift.String? - let licenseSpecifications: [EC2ClientTypes.ImportImageLicenseConfigurationResponse]? - let tags: [EC2ClientTypes.Tag]? - let usageOperation: Swift.String? -} - -extension ImportImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case architecture = "architecture" - case description = "description" - case encrypted = "encrypted" - case hypervisor = "hypervisor" - case imageId = "imageId" - case importTaskId = "importTaskId" - case kmsKeyId = "kmsKeyId" - case licenseSpecifications = "licenseSpecifications" - case licenseType = "licenseType" - case platform = "platform" - case progress = "progress" - case snapshotDetails = "snapshotDetailSet" - case status = "status" - case statusMessage = "statusMessage" - case tags = "tagSet" - case usageOperation = "usageOperation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let architectureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .architecture) - architecture = architectureDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let hypervisorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hypervisor) - hypervisor = hypervisorDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let importTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importTaskId) - importTaskId = importTaskIdDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let licenseTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseType) - licenseType = licenseTypeDecoded - let platformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platform) - platform = platformDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - if containerValues.contains(.snapshotDetails) { - struct KeyVal0{struct item{}} - let snapshotDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotDetails) - if let snapshotDetailsWrappedContainer = snapshotDetailsWrappedContainer { - let snapshotDetailsContainer = try snapshotDetailsWrappedContainer.decodeIfPresent([EC2ClientTypes.SnapshotDetail].self, forKey: .member) - var snapshotDetailsBuffer:[EC2ClientTypes.SnapshotDetail]? = nil - if let snapshotDetailsContainer = snapshotDetailsContainer { - snapshotDetailsBuffer = [EC2ClientTypes.SnapshotDetail]() - for structureContainer0 in snapshotDetailsContainer { - snapshotDetailsBuffer?.append(structureContainer0) - } - } - snapshotDetails = snapshotDetailsBuffer - } else { - snapshotDetails = [] - } - } else { - snapshotDetails = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - if containerValues.contains(.licenseSpecifications) { - struct KeyVal0{struct item{}} - let licenseSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .licenseSpecifications) - if let licenseSpecificationsWrappedContainer = licenseSpecificationsWrappedContainer { - let licenseSpecificationsContainer = try licenseSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ImportImageLicenseConfigurationResponse].self, forKey: .member) - var licenseSpecificationsBuffer:[EC2ClientTypes.ImportImageLicenseConfigurationResponse]? = nil - if let licenseSpecificationsContainer = licenseSpecificationsContainer { - licenseSpecificationsBuffer = [EC2ClientTypes.ImportImageLicenseConfigurationResponse]() - for structureContainer0 in licenseSpecificationsContainer { - licenseSpecificationsBuffer?.append(structureContainer0) - } - } - licenseSpecifications = licenseSpecificationsBuffer - } else { - licenseSpecifications = [] - } - } else { - licenseSpecifications = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let usageOperationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageOperation) - usageOperation = usageOperationDecoded - } -} - -enum ImportImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.ImportImageTask: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case architecture = "architecture" - case bootMode = "bootMode" - case description = "description" - case encrypted = "encrypted" - case hypervisor = "hypervisor" - case imageId = "imageId" - case importTaskId = "importTaskId" - case kmsKeyId = "kmsKeyId" - case licenseSpecifications = "licenseSpecifications" - case licenseType = "licenseType" - case platform = "platform" - case progress = "progress" - case snapshotDetails = "snapshotDetailSet" - case status = "status" - case statusMessage = "statusMessage" - case tags = "tagSet" - case usageOperation = "usageOperation" +enum ImportImageOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } + } } +} + +extension EC2ClientTypes.ImportImageTask: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -107031,93 +73485,29 @@ extension EC2ClientTypes.ImportImageTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let architectureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .architecture) - architecture = architectureDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let hypervisorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hypervisor) - hypervisor = hypervisorDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let importTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importTaskId) - importTaskId = importTaskIdDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let licenseTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseType) - licenseType = licenseTypeDecoded - let platformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platform) - platform = platformDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - if containerValues.contains(.snapshotDetails) { - struct KeyVal0{struct item{}} - let snapshotDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotDetails) - if let snapshotDetailsWrappedContainer = snapshotDetailsWrappedContainer { - let snapshotDetailsContainer = try snapshotDetailsWrappedContainer.decodeIfPresent([EC2ClientTypes.SnapshotDetail].self, forKey: .member) - var snapshotDetailsBuffer:[EC2ClientTypes.SnapshotDetail]? = nil - if let snapshotDetailsContainer = snapshotDetailsContainer { - snapshotDetailsBuffer = [EC2ClientTypes.SnapshotDetail]() - for structureContainer0 in snapshotDetailsContainer { - snapshotDetailsBuffer?.append(structureContainer0) - } - } - snapshotDetails = snapshotDetailsBuffer - } else { - snapshotDetails = [] - } - } else { - snapshotDetails = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.licenseSpecifications) { - struct KeyVal0{struct item{}} - let licenseSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .licenseSpecifications) - if let licenseSpecificationsWrappedContainer = licenseSpecificationsWrappedContainer { - let licenseSpecificationsContainer = try licenseSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ImportImageLicenseConfigurationResponse].self, forKey: .member) - var licenseSpecificationsBuffer:[EC2ClientTypes.ImportImageLicenseConfigurationResponse]? = nil - if let licenseSpecificationsContainer = licenseSpecificationsContainer { - licenseSpecificationsBuffer = [EC2ClientTypes.ImportImageLicenseConfigurationResponse]() - for structureContainer0 in licenseSpecificationsContainer { - licenseSpecificationsBuffer?.append(structureContainer0) - } - } - licenseSpecifications = licenseSpecificationsBuffer - } else { - licenseSpecifications = [] - } - } else { - licenseSpecifications = nil - } - let usageOperationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageOperation) - usageOperation = usageOperationDecoded - let bootModeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BootModeValues.self, forKey: .bootMode) - bootMode = bootModeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImportImageTask() + value.architecture = try reader["architecture"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.encrypted = try reader["encrypted"].readIfPresent() + value.hypervisor = try reader["hypervisor"].readIfPresent() + value.imageId = try reader["imageId"].readIfPresent() + value.importTaskId = try reader["importTaskId"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.licenseType = try reader["licenseType"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.snapshotDetails = try reader["snapshotDetailSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SnapshotDetail.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.licenseSpecifications = try reader["licenseSpecifications"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ImportImageLicenseConfigurationResponse.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.usageOperation = try reader["usageOperation"].readIfPresent() + value.bootMode = try reader["bootMode"].readIfPresent() + return value + } } } @@ -107269,69 +73659,7 @@ public struct ImportInstanceInput: Swift.Equatable { } } -struct ImportInstanceInputBody: Swift.Equatable { - let description: Swift.String? - let diskImages: [EC2ClientTypes.DiskImage]? - let dryRun: Swift.Bool? - let launchSpecification: EC2ClientTypes.ImportInstanceLaunchSpecification? - let platform: EC2ClientTypes.PlatformValues? -} - -extension ImportInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case diskImages = "diskImage" - case dryRun = "dryRun" - case launchSpecification = "launchSpecification" - case platform = "platform" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.diskImages) { - struct KeyVal0{struct member{}} - let diskImagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .diskImages) - if let diskImagesWrappedContainer = diskImagesWrappedContainer { - let diskImagesContainer = try diskImagesWrappedContainer.decodeIfPresent([EC2ClientTypes.DiskImage].self, forKey: .member) - var diskImagesBuffer:[EC2ClientTypes.DiskImage]? = nil - if let diskImagesContainer = diskImagesContainer { - diskImagesBuffer = [EC2ClientTypes.DiskImage]() - for structureContainer0 in diskImagesContainer { - diskImagesBuffer?.append(structureContainer0) - } - } - diskImages = diskImagesBuffer - } else { - diskImages = [] - } - } else { - diskImages = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let launchSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImportInstanceLaunchSpecification.self, forKey: .launchSpecification) - launchSpecification = launchSpecificationDecoded - let platformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlatformValues.self, forKey: .platform) - platform = platformDecoded - } -} - -extension EC2ClientTypes.ImportInstanceLaunchSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalInfo = "additionalInfo" - case architecture = "architecture" - case groupIds = "GroupId" - case groupNames = "GroupName" - case instanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior" - case instanceType = "instanceType" - case monitoring = "monitoring" - case placement = "placement" - case privateIpAddress = "privateIpAddress" - case subnetId = "subnetId" - case userData = "userData" - } +extension EC2ClientTypes.ImportInstanceLaunchSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -107388,64 +73716,23 @@ extension EC2ClientTypes.ImportInstanceLaunchSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let additionalInfoDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .additionalInfo) - additionalInfo = additionalInfoDecoded - let architectureDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ArchitectureValues.self, forKey: .architecture) - architecture = architectureDecoded - if containerValues.contains(.groupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let groupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupIds) - if let groupIdsWrappedContainer = groupIdsWrappedContainer { - let groupIdsContainer = try groupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupIdsBuffer:[Swift.String]? = nil - if let groupIdsContainer = groupIdsContainer { - groupIdsBuffer = [Swift.String]() - for stringContainer0 in groupIdsContainer { - groupIdsBuffer?.append(stringContainer0) - } - } - groupIds = groupIdsBuffer - } else { - groupIds = [] - } - } else { - groupIds = nil - } - if containerValues.contains(.groupNames) { - struct KeyVal0{struct SecurityGroup{}} - let groupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupNames) - if let groupNamesWrappedContainer = groupNamesWrappedContainer { - let groupNamesContainer = try groupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupNamesBuffer:[Swift.String]? = nil - if let groupNamesContainer = groupNamesContainer { - groupNamesBuffer = [Swift.String]() - for stringContainer0 in groupNamesContainer { - groupNamesBuffer?.append(stringContainer0) - } - } - groupNames = groupNamesBuffer - } else { - groupNames = [] - } - } else { - groupNames = nil - } - let instanceInitiatedShutdownBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ShutdownBehavior.self, forKey: .instanceInitiatedShutdownBehavior) - instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehaviorDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .monitoring) - monitoring = monitoringDecoded - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Placement.self, forKey: .placement) - placement = placementDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let userDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UserData.self, forKey: .userData) - userData = userDataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImportInstanceLaunchSpecification() + value.additionalInfo = try reader["additionalInfo"].readIfPresent() + value.architecture = try reader["architecture"].readIfPresent() + value.groupIds = try reader["GroupId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroupId", isFlattened: false) + value.groupNames = try reader["GroupName"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroup", isFlattened: false) + value.instanceInitiatedShutdownBehavior = try reader["instanceInitiatedShutdownBehavior"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.monitoring = try reader["monitoring"].readIfPresent() + value.placement = try reader["placement"].readIfPresent(readingClosure: EC2ClientTypes.Placement.readingClosure) + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.userData = try reader["userData"].readIfPresent(readingClosure: EC2ClientTypes.UserData.readingClosure) + return value + } } } @@ -107510,14 +73797,15 @@ extension EC2ClientTypes { } -extension ImportInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ImportInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.conversionTask = output.conversionTask - } else { - self.conversionTask = nil +extension ImportInstanceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ImportInstanceOutput() + value.conversionTask = try reader["conversionTask"].readIfPresent(readingClosure: EC2ClientTypes.ConversionTask.readingClosure) + return value } } } @@ -107534,38 +73822,23 @@ public struct ImportInstanceOutput: Swift.Equatable { } } -struct ImportInstanceOutputBody: Swift.Equatable { - let conversionTask: EC2ClientTypes.ConversionTask? -} +enum ImportInstanceOutputError { -extension ImportInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case conversionTask = "conversionTask" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let conversionTaskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConversionTask.self, forKey: .conversionTask) - conversionTask = conversionTaskDecoded - } -} - -enum ImportInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ImportInstanceTaskDetails: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case instanceId = "instanceId" - case platform = "platform" - case volumes = "volumes" - } +extension EC2ClientTypes.ImportInstanceTaskDetails: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -107592,32 +73865,15 @@ extension EC2ClientTypes.ImportInstanceTaskDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let platformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlatformValues.self, forKey: .platform) - platform = platformDecoded - if containerValues.contains(.volumes) { - struct KeyVal0{struct item{}} - let volumesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .volumes) - if let volumesWrappedContainer = volumesWrappedContainer { - let volumesContainer = try volumesWrappedContainer.decodeIfPresent([EC2ClientTypes.ImportInstanceVolumeDetailItem].self, forKey: .member) - var volumesBuffer:[EC2ClientTypes.ImportInstanceVolumeDetailItem]? = nil - if let volumesContainer = volumesContainer { - volumesBuffer = [EC2ClientTypes.ImportInstanceVolumeDetailItem]() - for structureContainer0 in volumesContainer { - volumesBuffer?.append(structureContainer0) - } - } - volumes = volumesBuffer - } else { - volumes = [] - } - } else { - volumes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImportInstanceTaskDetails() + value.description = try reader["description"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + value.volumes = try reader["volumes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ImportInstanceVolumeDetailItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -107650,16 +73906,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ImportInstanceVolumeDetailItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case bytesConverted = "bytesConverted" - case description = "description" - case image = "image" - case status = "status" - case statusMessage = "statusMessage" - case volume = "volume" - } +extension EC2ClientTypes.ImportInstanceVolumeDetailItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -107686,22 +73933,19 @@ extension EC2ClientTypes.ImportInstanceVolumeDetailItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let bytesConvertedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesConverted) - bytesConverted = bytesConvertedDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let imageDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageDescription.self, forKey: .image) - image = imageDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let volumeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageVolumeDescription.self, forKey: .volume) - volume = volumeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImportInstanceVolumeDetailItem() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.bytesConverted = try reader["bytesConverted"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.image = try reader["image"].readIfPresent(readingClosure: EC2ClientTypes.DiskImageDescription.readingClosure) + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.volume = try reader["volume"].readIfPresent(readingClosure: EC2ClientTypes.DiskImageVolumeDescription.readingClosure) + return value + } } } @@ -107807,73 +74051,18 @@ public struct ImportKeyPairInput: Swift.Equatable { } } -struct ImportKeyPairInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let keyName: Swift.String? - let publicKeyMaterial: ClientRuntime.Data? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension ImportKeyPairInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case keyName = "keyName" - case publicKeyMaterial = "publicKeyMaterial" - case tagSpecifications = "TagSpecification" - } +extension ImportKeyPairOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - if containerValues.contains(.publicKeyMaterial) { - do { - let publicKeyMaterialDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .publicKeyMaterial) - publicKeyMaterial = publicKeyMaterialDecoded - } catch { - publicKeyMaterial = "".data(using: .utf8) - } - } else { - publicKeyMaterial = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension ImportKeyPairOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ImportKeyPairOutputBody = try responseDecoder.decode(responseBody: data) - self.keyFingerprint = output.keyFingerprint - self.keyName = output.keyName - self.keyPairId = output.keyPairId - self.tags = output.tags - } else { - self.keyFingerprint = nil - self.keyName = nil - self.keyPairId = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ImportKeyPairOutput() + value.keyFingerprint = try reader["keyFingerprint"].readIfPresent() + value.keyName = try reader["keyName"].readIfPresent() + value.keyPairId = try reader["keyPairId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -107904,56 +74093,18 @@ public struct ImportKeyPairOutput: Swift.Equatable { } } -struct ImportKeyPairOutputBody: Swift.Equatable { - let keyFingerprint: Swift.String? - let keyName: Swift.String? - let keyPairId: Swift.String? - let tags: [EC2ClientTypes.Tag]? -} - -extension ImportKeyPairOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyFingerprint = "keyFingerprint" - case keyName = "keyName" - case keyPairId = "keyPairId" - case tags = "tagSet" - } +enum ImportKeyPairOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyFingerprintDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyFingerprint) - keyFingerprint = keyFingerprintDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let keyPairIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyPairId) - keyPairId = keyPairIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - tags = nil - } - } -} - -enum ImportKeyPairOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -108064,85 +74215,18 @@ public struct ImportSnapshotInput: Swift.Equatable { } } -struct ImportSnapshotInputBody: Swift.Equatable { - let clientData: EC2ClientTypes.ClientData? - let clientToken: Swift.String? - let description: Swift.String? - let diskContainer: EC2ClientTypes.SnapshotDiskContainer? - let dryRun: Swift.Bool? - let encrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let roleName: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension ImportSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientData = "ClientData" - case clientToken = "ClientToken" - case description = "Description" - case diskContainer = "DiskContainer" - case dryRun = "DryRun" - case encrypted = "Encrypted" - case kmsKeyId = "KmsKeyId" - case roleName = "RoleName" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientData.self, forKey: .clientData) - clientData = clientDataDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let diskContainerDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotDiskContainer.self, forKey: .diskContainer) - diskContainer = diskContainerDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension ImportSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ImportSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.description = output.description - self.importTaskId = output.importTaskId - self.snapshotTaskDetail = output.snapshotTaskDetail - self.tags = output.tags - } else { - self.description = nil - self.importTaskId = nil - self.snapshotTaskDetail = nil - self.tags = nil +extension ImportSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ImportSnapshotOutput() + value.description = try reader["description"].readIfPresent() + value.importTaskId = try reader["importTaskId"].readIfPresent() + value.snapshotTaskDetail = try reader["snapshotTaskDetail"].readIfPresent(readingClosure: EC2ClientTypes.SnapshotTaskDetail.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -108171,67 +74255,23 @@ public struct ImportSnapshotOutput: Swift.Equatable { } } -struct ImportSnapshotOutputBody: Swift.Equatable { - let description: Swift.String? - let importTaskId: Swift.String? - let snapshotTaskDetail: EC2ClientTypes.SnapshotTaskDetail? - let tags: [EC2ClientTypes.Tag]? -} - -extension ImportSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case importTaskId = "importTaskId" - case snapshotTaskDetail = "snapshotTaskDetail" - case tags = "tagSet" - } +enum ImportSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let importTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importTaskId) - importTaskId = importTaskIdDecoded - let snapshotTaskDetailDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotTaskDetail.self, forKey: .snapshotTaskDetail) - snapshotTaskDetail = snapshotTaskDetailDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - tags = nil } } } -enum ImportSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.ImportSnapshotTask: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case importTaskId = "importTaskId" - case snapshotTaskDetail = "snapshotTaskDetail" - case tags = "tagSet" - } +extension EC2ClientTypes.ImportSnapshotTask: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -108258,32 +74298,15 @@ extension EC2ClientTypes.ImportSnapshotTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let importTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .importTaskId) - importTaskId = importTaskIdDecoded - let snapshotTaskDetailDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotTaskDetail.self, forKey: .snapshotTaskDetail) - snapshotTaskDetail = snapshotTaskDetailDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImportSnapshotTask() + value.description = try reader["description"].readIfPresent() + value.importTaskId = try reader["importTaskId"].readIfPresent() + value.snapshotTaskDetail = try reader["snapshotTaskDetail"].readIfPresent(readingClosure: EC2ClientTypes.SnapshotTaskDetail.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -108377,46 +74400,15 @@ public struct ImportVolumeInput: Swift.Equatable { } } -struct ImportVolumeInputBody: Swift.Equatable { - let availabilityZone: Swift.String? - let description: Swift.String? - let dryRun: Swift.Bool? - let image: EC2ClientTypes.DiskImageDetail? - let volume: EC2ClientTypes.VolumeDetail? -} - -extension ImportVolumeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case description = "description" - case dryRun = "dryRun" - case image = "image" - case volume = "volume" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let imageDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageDetail.self, forKey: .image) - image = imageDecoded - let volumeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeDetail.self, forKey: .volume) - volume = volumeDecoded - } -} +extension ImportVolumeOutput { -extension ImportVolumeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ImportVolumeOutputBody = try responseDecoder.decode(responseBody: data) - self.conversionTask = output.conversionTask - } else { - self.conversionTask = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ImportVolumeOutput() + value.conversionTask = try reader["conversionTask"].readIfPresent(readingClosure: EC2ClientTypes.ConversionTask.readingClosure) + return value } } } @@ -108433,39 +74425,23 @@ public struct ImportVolumeOutput: Swift.Equatable { } } -struct ImportVolumeOutputBody: Swift.Equatable { - let conversionTask: EC2ClientTypes.ConversionTask? -} - -extension ImportVolumeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case conversionTask = "conversionTask" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let conversionTaskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConversionTask.self, forKey: .conversionTask) - conversionTask = conversionTaskDecoded - } -} +enum ImportVolumeOutputError { -enum ImportVolumeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ImportVolumeTaskDetails: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case bytesConverted = "bytesConverted" - case description = "description" - case image = "image" - case volume = "volume" - } +extension EC2ClientTypes.ImportVolumeTaskDetails: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -108486,18 +74462,17 @@ extension EC2ClientTypes.ImportVolumeTaskDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let bytesConvertedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesConverted) - bytesConverted = bytesConvertedDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let imageDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageDescription.self, forKey: .image) - image = imageDecoded - let volumeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DiskImageVolumeDescription.self, forKey: .volume) - volume = volumeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ImportVolumeTaskDetails() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.bytesConverted = try reader["bytesConverted"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.image = try reader["image"].readIfPresent(readingClosure: EC2ClientTypes.DiskImageDescription.readingClosure) + value.volume = try reader["volume"].readIfPresent(readingClosure: EC2ClientTypes.DiskImageVolumeDescription.readingClosure) + return value + } } } @@ -108533,11 +74508,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InferenceAcceleratorInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accelerators = "accelerators" - case totalInferenceMemoryInMiB = "totalInferenceMemoryInMiB" - } +extension EC2ClientTypes.InferenceAcceleratorInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -108558,29 +74529,14 @@ extension EC2ClientTypes.InferenceAcceleratorInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.accelerators) { - struct KeyVal0{struct member{}} - let acceleratorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accelerators) - if let acceleratorsWrappedContainer = acceleratorsWrappedContainer { - let acceleratorsContainer = try acceleratorsWrappedContainer.decodeIfPresent([EC2ClientTypes.InferenceDeviceInfo].self, forKey: .member) - var acceleratorsBuffer:[EC2ClientTypes.InferenceDeviceInfo]? = nil - if let acceleratorsContainer = acceleratorsContainer { - acceleratorsBuffer = [EC2ClientTypes.InferenceDeviceInfo]() - for structureContainer0 in acceleratorsContainer { - acceleratorsBuffer?.append(structureContainer0) - } - } - accelerators = acceleratorsBuffer - } else { - accelerators = [] - } - } else { - accelerators = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InferenceAcceleratorInfo() + value.accelerators = try reader["accelerators"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InferenceDeviceInfo.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.totalInferenceMemoryInMiB = try reader["totalInferenceMemoryInMiB"].readIfPresent() + return value } - let totalInferenceMemoryInMiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalInferenceMemoryInMiB) - totalInferenceMemoryInMiB = totalInferenceMemoryInMiBDecoded } } @@ -108604,13 +74560,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InferenceDeviceInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "count" - case manufacturer = "manufacturer" - case memoryInfo = "memoryInfo" - case name = "name" - } +extension EC2ClientTypes.InferenceDeviceInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -108628,16 +74578,16 @@ extension EC2ClientTypes.InferenceDeviceInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let manufacturerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .manufacturer) - manufacturer = manufacturerDecoded - let memoryInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InferenceDeviceMemoryInfo.self, forKey: .memoryInfo) - memoryInfo = memoryInfoDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InferenceDeviceInfo() + value.count = try reader["count"].readIfPresent() + value.name = try reader["name"].readIfPresent() + value.manufacturer = try reader["manufacturer"].readIfPresent() + value.memoryInfo = try reader["memoryInfo"].readIfPresent(readingClosure: EC2ClientTypes.InferenceDeviceMemoryInfo.readingClosure) + return value + } } } @@ -108669,10 +74619,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InferenceDeviceMemoryInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sizeInMiB = "sizeInMiB" - } +extension EC2ClientTypes.InferenceDeviceMemoryInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -108681,10 +74628,13 @@ extension EC2ClientTypes.InferenceDeviceMemoryInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sizeInMiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sizeInMiB) - sizeInMiB = sizeInMiBDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InferenceDeviceMemoryInfo() + value.sizeInMiB = try reader["sizeInMiB"].readIfPresent() + return value + } } } @@ -108704,66 +74654,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Instance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amiLaunchIndex = "amiLaunchIndex" - case architecture = "architecture" - case blockDeviceMappings = "blockDeviceMapping" - case bootMode = "bootMode" - case capacityReservationId = "capacityReservationId" - case capacityReservationSpecification = "capacityReservationSpecification" - case clientToken = "clientToken" - case cpuOptions = "cpuOptions" - case currentInstanceBootMode = "currentInstanceBootMode" - case ebsOptimized = "ebsOptimized" - case elasticGpuAssociations = "elasticGpuAssociationSet" - case elasticInferenceAcceleratorAssociations = "elasticInferenceAcceleratorAssociationSet" - case enaSupport = "enaSupport" - case enclaveOptions = "enclaveOptions" - case hibernationOptions = "hibernationOptions" - case hypervisor = "hypervisor" - case iamInstanceProfile = "iamInstanceProfile" - case imageId = "imageId" - case instanceId = "instanceId" - case instanceLifecycle = "instanceLifecycle" - case instanceType = "instanceType" - case ipv6Address = "ipv6Address" - case kernelId = "kernelId" - case keyName = "keyName" - case launchTime = "launchTime" - case licenses = "licenseSet" - case maintenanceOptions = "maintenanceOptions" - case metadataOptions = "metadataOptions" - case monitoring = "monitoring" - case networkInterfaces = "networkInterfaceSet" - case outpostArn = "outpostArn" - case placement = "placement" - case platform = "platform" - case platformDetails = "platformDetails" - case privateDnsName = "privateDnsName" - case privateDnsNameOptions = "privateDnsNameOptions" - case privateIpAddress = "privateIpAddress" - case productCodes = "productCodes" - case publicDnsName = "dnsName" - case publicIpAddress = "ipAddress" - case ramdiskId = "ramdiskId" - case rootDeviceName = "rootDeviceName" - case rootDeviceType = "rootDeviceType" - case securityGroups = "groupSet" - case sourceDestCheck = "sourceDestCheck" - case spotInstanceRequestId = "spotInstanceRequestId" - case sriovNetSupport = "sriovNetSupport" - case state = "instanceState" - case stateReason = "stateReason" - case stateTransitionReason = "reason" - case subnetId = "subnetId" - case tags = "tagSet" - case tpmSupport = "tpmSupport" - case usageOperation = "usageOperation" - case usageOperationUpdateTime = "usageOperationUpdateTime" - case virtualizationType = "virtualizationType" - case vpcId = "vpcId" - } +extension EC2ClientTypes.Instance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109012,258 +74903,69 @@ extension EC2ClientTypes.Instance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let amiLaunchIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amiLaunchIndex) - amiLaunchIndex = amiLaunchIndexDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let launchTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .launchTime) - launchTime = launchTimeDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Monitoring.self, forKey: .monitoring) - monitoring = monitoringDecoded - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Placement.self, forKey: .placement) - placement = placementDecoded - let platformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlatformValues.self, forKey: .platform) - platform = platformDecoded - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.productCodes) { - struct KeyVal0{struct item{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ProductCode].self, forKey: .member) - var productCodesBuffer:[EC2ClientTypes.ProductCode]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [EC2ClientTypes.ProductCode]() - for structureContainer0 in productCodesContainer { - productCodesBuffer?.append(structureContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil - } - let publicDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicDnsName) - publicDnsName = publicDnsNameDecoded - let publicIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIpAddress) - publicIpAddress = publicIpAddressDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceState.self, forKey: .state) - state = stateDecoded - let stateTransitionReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateTransitionReason) - stateTransitionReason = stateTransitionReasonDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let architectureDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ArchitectureValues.self, forKey: .architecture) - architecture = architectureDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceBlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.InstanceBlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.InstanceBlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let enaSupportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSupport) - enaSupport = enaSupportDecoded - let hypervisorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HypervisorType.self, forKey: .hypervisor) - hypervisor = hypervisorDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfile.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let instanceLifecycleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceLifecycleType.self, forKey: .instanceLifecycle) - instanceLifecycle = instanceLifecycleDecoded - if containerValues.contains(.elasticGpuAssociations) { - struct KeyVal0{struct item{}} - let elasticGpuAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticGpuAssociations) - if let elasticGpuAssociationsWrappedContainer = elasticGpuAssociationsWrappedContainer { - let elasticGpuAssociationsContainer = try elasticGpuAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ElasticGpuAssociation].self, forKey: .member) - var elasticGpuAssociationsBuffer:[EC2ClientTypes.ElasticGpuAssociation]? = nil - if let elasticGpuAssociationsContainer = elasticGpuAssociationsContainer { - elasticGpuAssociationsBuffer = [EC2ClientTypes.ElasticGpuAssociation]() - for structureContainer0 in elasticGpuAssociationsContainer { - elasticGpuAssociationsBuffer?.append(structureContainer0) - } - } - elasticGpuAssociations = elasticGpuAssociationsBuffer - } else { - elasticGpuAssociations = [] - } - } else { - elasticGpuAssociations = nil - } - if containerValues.contains(.elasticInferenceAcceleratorAssociations) { - struct KeyVal0{struct item{}} - let elasticInferenceAcceleratorAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticInferenceAcceleratorAssociations) - if let elasticInferenceAcceleratorAssociationsWrappedContainer = elasticInferenceAcceleratorAssociationsWrappedContainer { - let elasticInferenceAcceleratorAssociationsContainer = try elasticInferenceAcceleratorAssociationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ElasticInferenceAcceleratorAssociation].self, forKey: .member) - var elasticInferenceAcceleratorAssociationsBuffer:[EC2ClientTypes.ElasticInferenceAcceleratorAssociation]? = nil - if let elasticInferenceAcceleratorAssociationsContainer = elasticInferenceAcceleratorAssociationsContainer { - elasticInferenceAcceleratorAssociationsBuffer = [EC2ClientTypes.ElasticInferenceAcceleratorAssociation]() - for structureContainer0 in elasticInferenceAcceleratorAssociationsContainer { - elasticInferenceAcceleratorAssociationsBuffer?.append(structureContainer0) - } - } - elasticInferenceAcceleratorAssociations = elasticInferenceAcceleratorAssociationsBuffer - } else { - elasticInferenceAcceleratorAssociations = [] - } - } else { - elasticInferenceAcceleratorAssociations = nil - } - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct item{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceNetworkInterface].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.InstanceNetworkInterface]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.InstanceNetworkInterface]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil - } - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let rootDeviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rootDeviceName) - rootDeviceName = rootDeviceNameDecoded - let rootDeviceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeviceType.self, forKey: .rootDeviceType) - rootDeviceType = rootDeviceTypeDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var securityGroupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(structureContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let sourceDestCheckDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sourceDestCheck) - sourceDestCheck = sourceDestCheckDecoded - let spotInstanceRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotInstanceRequestId) - spotInstanceRequestId = spotInstanceRequestIdDecoded - let sriovNetSupportDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sriovNetSupport) - sriovNetSupport = sriovNetSupportDecoded - let stateReasonDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StateReason.self, forKey: .stateReason) - stateReason = stateReasonDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let virtualizationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VirtualizationType.self, forKey: .virtualizationType) - virtualizationType = virtualizationTypeDecoded - let cpuOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CpuOptions.self, forKey: .cpuOptions) - cpuOptions = cpuOptionsDecoded - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let capacityReservationSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationSpecificationResponse.self, forKey: .capacityReservationSpecification) - capacityReservationSpecification = capacityReservationSpecificationDecoded - let hibernationOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HibernationOptions.self, forKey: .hibernationOptions) - hibernationOptions = hibernationOptionsDecoded - if containerValues.contains(.licenses) { - struct KeyVal0{struct item{}} - let licensesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .licenses) - if let licensesWrappedContainer = licensesWrappedContainer { - let licensesContainer = try licensesWrappedContainer.decodeIfPresent([EC2ClientTypes.LicenseConfiguration].self, forKey: .member) - var licensesBuffer:[EC2ClientTypes.LicenseConfiguration]? = nil - if let licensesContainer = licensesContainer { - licensesBuffer = [EC2ClientTypes.LicenseConfiguration]() - for structureContainer0 in licensesContainer { - licensesBuffer?.append(structureContainer0) - } - } - licenses = licensesBuffer - } else { - licenses = [] - } - } else { - licenses = nil - } - let metadataOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataOptionsResponse.self, forKey: .metadataOptions) - metadataOptions = metadataOptionsDecoded - let enclaveOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnclaveOptions.self, forKey: .enclaveOptions) - enclaveOptions = enclaveOptionsDecoded - let bootModeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BootModeValues.self, forKey: .bootMode) - bootMode = bootModeDecoded - let platformDetailsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformDetails) - platformDetails = platformDetailsDecoded - let usageOperationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageOperation) - usageOperation = usageOperationDecoded - let usageOperationUpdateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .usageOperationUpdateTime) - usageOperationUpdateTime = usageOperationUpdateTimeDecoded - let privateDnsNameOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PrivateDnsNameOptionsResponse.self, forKey: .privateDnsNameOptions) - privateDnsNameOptions = privateDnsNameOptionsDecoded - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded - let tpmSupportDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tpmSupport) - tpmSupport = tpmSupportDecoded - let maintenanceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMaintenanceOptions.self, forKey: .maintenanceOptions) - maintenanceOptions = maintenanceOptionsDecoded - let currentInstanceBootModeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceBootModeValues.self, forKey: .currentInstanceBootMode) - currentInstanceBootMode = currentInstanceBootModeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Instance() + value.amiLaunchIndex = try reader["amiLaunchIndex"].readIfPresent() + value.imageId = try reader["imageId"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.kernelId = try reader["kernelId"].readIfPresent() + value.keyName = try reader["keyName"].readIfPresent() + value.launchTime = try reader["launchTime"].readTimestampIfPresent(format: .dateTime) + value.monitoring = try reader["monitoring"].readIfPresent(readingClosure: EC2ClientTypes.Monitoring.readingClosure) + value.placement = try reader["placement"].readIfPresent(readingClosure: EC2ClientTypes.Placement.readingClosure) + value.platform = try reader["platform"].readIfPresent() + value.privateDnsName = try reader["privateDnsName"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + value.productCodes = try reader["productCodes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ProductCode.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.publicDnsName = try reader["dnsName"].readIfPresent() + value.publicIpAddress = try reader["ipAddress"].readIfPresent() + value.ramdiskId = try reader["ramdiskId"].readIfPresent() + value.state = try reader["instanceState"].readIfPresent(readingClosure: EC2ClientTypes.InstanceState.readingClosure) + value.stateTransitionReason = try reader["reason"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.architecture = try reader["architecture"].readIfPresent() + value.blockDeviceMappings = try reader["blockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceBlockDeviceMapping.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.clientToken = try reader["clientToken"].readIfPresent() + value.ebsOptimized = try reader["ebsOptimized"].readIfPresent() + value.enaSupport = try reader["enaSupport"].readIfPresent() + value.hypervisor = try reader["hypervisor"].readIfPresent() + value.iamInstanceProfile = try reader["iamInstanceProfile"].readIfPresent(readingClosure: EC2ClientTypes.IamInstanceProfile.readingClosure) + value.instanceLifecycle = try reader["instanceLifecycle"].readIfPresent() + value.elasticGpuAssociations = try reader["elasticGpuAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ElasticGpuAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.elasticInferenceAcceleratorAssociations = try reader["elasticInferenceAcceleratorAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ElasticInferenceAcceleratorAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkInterfaces = try reader["networkInterfaceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceNetworkInterface.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.rootDeviceName = try reader["rootDeviceName"].readIfPresent() + value.rootDeviceType = try reader["rootDeviceType"].readIfPresent() + value.securityGroups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourceDestCheck = try reader["sourceDestCheck"].readIfPresent() + value.spotInstanceRequestId = try reader["spotInstanceRequestId"].readIfPresent() + value.sriovNetSupport = try reader["sriovNetSupport"].readIfPresent() + value.stateReason = try reader["stateReason"].readIfPresent(readingClosure: EC2ClientTypes.StateReason.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.virtualizationType = try reader["virtualizationType"].readIfPresent() + value.cpuOptions = try reader["cpuOptions"].readIfPresent(readingClosure: EC2ClientTypes.CpuOptions.readingClosure) + value.capacityReservationId = try reader["capacityReservationId"].readIfPresent() + value.capacityReservationSpecification = try reader["capacityReservationSpecification"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservationSpecificationResponse.readingClosure) + value.hibernationOptions = try reader["hibernationOptions"].readIfPresent(readingClosure: EC2ClientTypes.HibernationOptions.readingClosure) + value.licenses = try reader["licenseSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LicenseConfiguration.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.metadataOptions = try reader["metadataOptions"].readIfPresent(readingClosure: EC2ClientTypes.InstanceMetadataOptionsResponse.readingClosure) + value.enclaveOptions = try reader["enclaveOptions"].readIfPresent(readingClosure: EC2ClientTypes.EnclaveOptions.readingClosure) + value.bootMode = try reader["bootMode"].readIfPresent() + value.platformDetails = try reader["platformDetails"].readIfPresent() + value.usageOperation = try reader["usageOperation"].readIfPresent() + value.usageOperationUpdateTime = try reader["usageOperationUpdateTime"].readTimestampIfPresent(format: .dateTime) + value.privateDnsNameOptions = try reader["privateDnsNameOptions"].readIfPresent(readingClosure: EC2ClientTypes.PrivateDnsNameOptionsResponse.readingClosure) + value.ipv6Address = try reader["ipv6Address"].readIfPresent() + value.tpmSupport = try reader["tpmSupport"].readIfPresent() + value.maintenanceOptions = try reader["maintenanceOptions"].readIfPresent(readingClosure: EC2ClientTypes.InstanceMaintenanceOptions.readingClosure) + value.currentInstanceBootMode = try reader["currentInstanceBootMode"].readIfPresent() + return value + } } } @@ -109507,11 +75209,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceAttachmentEnaSrdSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdEnabled = "enaSrdEnabled" - case enaSrdUdpSpecification = "enaSrdUdpSpecification" - } +extension EC2ClientTypes.InstanceAttachmentEnaSrdSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109523,12 +75221,14 @@ extension EC2ClientTypes.InstanceAttachmentEnaSrdSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdEnabled) - enaSrdEnabled = enaSrdEnabledDecoded - let enaSrdUdpSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAttachmentEnaSrdUdpSpecification.self, forKey: .enaSrdUdpSpecification) - enaSrdUdpSpecification = enaSrdUdpSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceAttachmentEnaSrdSpecification() + value.enaSrdEnabled = try reader["enaSrdEnabled"].readIfPresent() + value.enaSrdUdpSpecification = try reader["enaSrdUdpSpecification"].readIfPresent(readingClosure: EC2ClientTypes.InstanceAttachmentEnaSrdUdpSpecification.readingClosure) + return value + } } } @@ -109552,10 +75252,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceAttachmentEnaSrdUdpSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdUdpEnabled = "enaSrdUdpEnabled" - } +extension EC2ClientTypes.InstanceAttachmentEnaSrdUdpSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109564,10 +75261,13 @@ extension EC2ClientTypes.InstanceAttachmentEnaSrdUdpSpecification: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdUdpEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdUdpEnabled) - enaSrdUdpEnabled = enaSrdUdpEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceAttachmentEnaSrdUdpSpecification() + value.enaSrdUdpEnabled = try reader["enaSrdUdpEnabled"].readIfPresent() + return value + } } } @@ -109693,11 +75393,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceBlockDeviceMapping: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deviceName = "deviceName" - case ebs = "ebs" - } +extension EC2ClientTypes.InstanceBlockDeviceMapping: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109709,12 +75405,14 @@ extension EC2ClientTypes.InstanceBlockDeviceMapping: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let ebsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EbsInstanceBlockDevice.self, forKey: .ebs) - ebs = ebsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceBlockDeviceMapping() + value.deviceName = try reader["deviceName"].readIfPresent() + value.ebs = try reader["ebs"].readIfPresent(readingClosure: EC2ClientTypes.EbsInstanceBlockDevice.readingClosure) + return value + } } } @@ -109738,13 +75436,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceBlockDeviceMappingSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deviceName = "deviceName" - case ebs = "ebs" - case noDevice = "noDevice" - case virtualName = "virtualName" - } +extension EC2ClientTypes.InstanceBlockDeviceMappingSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109762,16 +75454,16 @@ extension EC2ClientTypes.InstanceBlockDeviceMappingSpecification: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let ebsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EbsInstanceBlockDeviceSpecification.self, forKey: .ebs) - ebs = ebsDecoded - let noDeviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .noDevice) - noDevice = noDeviceDecoded - let virtualNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualName) - virtualName = virtualNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceBlockDeviceMappingSpecification() + value.deviceName = try reader["deviceName"].readIfPresent() + value.ebs = try reader["ebs"].readIfPresent(readingClosure: EC2ClientTypes.EbsInstanceBlockDeviceSpecification.readingClosure) + value.noDevice = try reader["noDevice"].readIfPresent() + value.virtualName = try reader["virtualName"].readIfPresent() + return value + } } } @@ -109835,12 +75527,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceCapacity: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availableCapacity = "availableCapacity" - case instanceType = "instanceType" - case totalCapacity = "totalCapacity" - } +extension EC2ClientTypes.InstanceCapacity: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109855,14 +75542,15 @@ extension EC2ClientTypes.InstanceCapacity: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availableCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .availableCapacity) - availableCapacity = availableCapacityDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let totalCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalCapacity) - totalCapacity = totalCapacityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceCapacity() + value.availableCapacity = try reader["availableCapacity"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.totalCapacity = try reader["totalCapacity"].readIfPresent() + return value + } } } @@ -109890,11 +75578,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceCount: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceCount = "instanceCount" - case state = "state" - } +extension EC2ClientTypes.InstanceCount: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109906,12 +75590,14 @@ extension EC2ClientTypes.InstanceCount: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ListingState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceCount() + value.instanceCount = try reader["instanceCount"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -109935,11 +75621,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceCreditSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cpuCredits = "cpuCredits" - case instanceId = "instanceId" - } +extension EC2ClientTypes.InstanceCreditSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109951,12 +75633,14 @@ extension EC2ClientTypes.InstanceCreditSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let cpuCreditsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cpuCredits) - cpuCredits = cpuCreditsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceCreditSpecification() + value.instanceId = try reader["instanceId"].readIfPresent() + value.cpuCredits = try reader["cpuCredits"].readIfPresent() + return value + } } } @@ -109980,11 +75664,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceCreditSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cpuCredits = "CpuCredits" - case instanceId = "InstanceId" - } +extension EC2ClientTypes.InstanceCreditSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -109996,12 +75676,14 @@ extension EC2ClientTypes.InstanceCreditSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let cpuCreditsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cpuCredits) - cpuCredits = cpuCreditsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceCreditSpecificationRequest() + value.instanceId = try reader["InstanceId"].readIfPresent() + value.cpuCredits = try reader["CpuCredits"].readIfPresent() + return value + } } } @@ -110026,16 +75708,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceEventWindow: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationTarget = "associationTarget" - case cronExpression = "cronExpression" - case instanceEventWindowId = "instanceEventWindowId" - case name = "name" - case state = "state" - case tags = "tagSet" - case timeRanges = "timeRangeSet" - } +extension EC2ClientTypes.InstanceEventWindow: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110080,55 +75753,18 @@ extension EC2ClientTypes.InstanceEventWindow: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceEventWindowIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceEventWindowId) - instanceEventWindowId = instanceEventWindowIdDecoded - if containerValues.contains(.timeRanges) { - struct KeyVal0{struct item{}} - let timeRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .timeRanges) - if let timeRangesWrappedContainer = timeRangesWrappedContainer { - let timeRangesContainer = try timeRangesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceEventWindowTimeRange].self, forKey: .member) - var timeRangesBuffer:[EC2ClientTypes.InstanceEventWindowTimeRange]? = nil - if let timeRangesContainer = timeRangesContainer { - timeRangesBuffer = [EC2ClientTypes.InstanceEventWindowTimeRange]() - for structureContainer0 in timeRangesContainer { - timeRangesBuffer?.append(structureContainer0) - } - } - timeRanges = timeRangesBuffer - } else { - timeRanges = [] - } - } else { - timeRanges = nil - } - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let cronExpressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cronExpression) - cronExpression = cronExpressionDecoded - let associationTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindowAssociationTarget.self, forKey: .associationTarget) - associationTarget = associationTargetDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindowState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceEventWindow() + value.instanceEventWindowId = try reader["instanceEventWindowId"].readIfPresent() + value.timeRanges = try reader["timeRangeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceEventWindowTimeRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.name = try reader["name"].readIfPresent() + value.cronExpression = try reader["cronExpression"].readIfPresent() + value.associationTarget = try reader["associationTarget"].readIfPresent(readingClosure: EC2ClientTypes.InstanceEventWindowAssociationTarget.readingClosure) + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -110173,12 +75809,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceEventWindowAssociationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dedicatedHostIds = "DedicatedHostId" - case instanceIds = "InstanceId" - case instanceTags = "InstanceTag" - } +extension EC2ClientTypes.InstanceEventWindowAssociationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110220,64 +75851,14 @@ extension EC2ClientTypes.InstanceEventWindowAssociationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct item{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - if containerValues.contains(.instanceTags) { - struct KeyVal0{struct item{}} - let instanceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTags) - if let instanceTagsWrappedContainer = instanceTagsWrappedContainer { - let instanceTagsContainer = try instanceTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var instanceTagsBuffer:[EC2ClientTypes.Tag]? = nil - if let instanceTagsContainer = instanceTagsContainer { - instanceTagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in instanceTagsContainer { - instanceTagsBuffer?.append(structureContainer0) - } - } - instanceTags = instanceTagsBuffer - } else { - instanceTags = [] - } - } else { - instanceTags = nil - } - if containerValues.contains(.dedicatedHostIds) { - struct KeyVal0{struct item{}} - let dedicatedHostIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dedicatedHostIds) - if let dedicatedHostIdsWrappedContainer = dedicatedHostIdsWrappedContainer { - let dedicatedHostIdsContainer = try dedicatedHostIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dedicatedHostIdsBuffer:[Swift.String]? = nil - if let dedicatedHostIdsContainer = dedicatedHostIdsContainer { - dedicatedHostIdsBuffer = [Swift.String]() - for stringContainer0 in dedicatedHostIdsContainer { - dedicatedHostIdsBuffer?.append(stringContainer0) - } - } - dedicatedHostIds = dedicatedHostIdsBuffer - } else { - dedicatedHostIds = [] - } - } else { - dedicatedHostIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceEventWindowAssociationRequest() + value.instanceIds = try reader["InstanceId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceTags = try reader["InstanceTag"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.dedicatedHostIds = try reader["DedicatedHostId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -110306,12 +75887,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceEventWindowAssociationTarget: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dedicatedHostIds = "dedicatedHostIdSet" - case instanceIds = "instanceIdSet" - case tags = "tagSet" - } +extension EC2ClientTypes.InstanceEventWindowAssociationTarget: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110353,64 +75929,14 @@ extension EC2ClientTypes.InstanceEventWindowAssociationTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct item{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.dedicatedHostIds) { - struct KeyVal0{struct item{}} - let dedicatedHostIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dedicatedHostIds) - if let dedicatedHostIdsWrappedContainer = dedicatedHostIdsWrappedContainer { - let dedicatedHostIdsContainer = try dedicatedHostIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dedicatedHostIdsBuffer:[Swift.String]? = nil - if let dedicatedHostIdsContainer = dedicatedHostIdsContainer { - dedicatedHostIdsBuffer = [Swift.String]() - for stringContainer0 in dedicatedHostIdsContainer { - dedicatedHostIdsBuffer?.append(stringContainer0) - } - } - dedicatedHostIds = dedicatedHostIdsBuffer - } else { - dedicatedHostIds = [] - } - } else { - dedicatedHostIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceEventWindowAssociationTarget() + value.instanceIds = try reader["instanceIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.dedicatedHostIds = try reader["dedicatedHostIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -110439,12 +75965,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceEventWindowDisassociationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dedicatedHostIds = "DedicatedHostId" - case instanceIds = "InstanceId" - case instanceTags = "InstanceTag" - } +extension EC2ClientTypes.InstanceEventWindowDisassociationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110486,64 +76007,14 @@ extension EC2ClientTypes.InstanceEventWindowDisassociationRequest: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct item{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - if containerValues.contains(.instanceTags) { - struct KeyVal0{struct item{}} - let instanceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTags) - if let instanceTagsWrappedContainer = instanceTagsWrappedContainer { - let instanceTagsContainer = try instanceTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var instanceTagsBuffer:[EC2ClientTypes.Tag]? = nil - if let instanceTagsContainer = instanceTagsContainer { - instanceTagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in instanceTagsContainer { - instanceTagsBuffer?.append(structureContainer0) - } - } - instanceTags = instanceTagsBuffer - } else { - instanceTags = [] - } - } else { - instanceTags = nil - } - if containerValues.contains(.dedicatedHostIds) { - struct KeyVal0{struct item{}} - let dedicatedHostIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dedicatedHostIds) - if let dedicatedHostIdsWrappedContainer = dedicatedHostIdsWrappedContainer { - let dedicatedHostIdsContainer = try dedicatedHostIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dedicatedHostIdsBuffer:[Swift.String]? = nil - if let dedicatedHostIdsContainer = dedicatedHostIdsContainer { - dedicatedHostIdsBuffer = [Swift.String]() - for stringContainer0 in dedicatedHostIdsContainer { - dedicatedHostIdsBuffer?.append(stringContainer0) - } - } - dedicatedHostIds = dedicatedHostIdsBuffer - } else { - dedicatedHostIds = [] - } - } else { - dedicatedHostIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceEventWindowDisassociationRequest() + value.instanceIds = try reader["InstanceId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceTags = try reader["InstanceTag"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.dedicatedHostIds = try reader["DedicatedHostId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -110610,11 +76081,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceEventWindowStateChange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceEventWindowId = "instanceEventWindowId" - case state = "state" - } +extension EC2ClientTypes.InstanceEventWindowStateChange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110626,12 +76093,14 @@ extension EC2ClientTypes.InstanceEventWindowStateChange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceEventWindowIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceEventWindowId) - instanceEventWindowId = instanceEventWindowIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindowState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceEventWindowStateChange() + value.instanceEventWindowId = try reader["instanceEventWindowId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -110655,13 +76124,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceEventWindowTimeRange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endHour = "endHour" - case endWeekDay = "endWeekDay" - case startHour = "startHour" - case startWeekDay = "startWeekDay" - } +extension EC2ClientTypes.InstanceEventWindowTimeRange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110679,16 +76142,16 @@ extension EC2ClientTypes.InstanceEventWindowTimeRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let startWeekDayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.WeekDay.self, forKey: .startWeekDay) - startWeekDay = startWeekDayDecoded - let startHourDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .startHour) - startHour = startHourDecoded - let endWeekDayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.WeekDay.self, forKey: .endWeekDay) - endWeekDay = endWeekDayDecoded - let endHourDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .endHour) - endHour = endHourDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceEventWindowTimeRange() + value.startWeekDay = try reader["startWeekDay"].readIfPresent() + value.startHour = try reader["startHour"].readIfPresent() + value.endWeekDay = try reader["endWeekDay"].readIfPresent() + value.endHour = try reader["endHour"].readIfPresent() + return value + } } } @@ -110720,13 +76183,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceEventWindowTimeRangeRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endHour = "EndHour" - case endWeekDay = "EndWeekDay" - case startHour = "StartHour" - case startWeekDay = "StartWeekDay" - } +extension EC2ClientTypes.InstanceEventWindowTimeRangeRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110744,16 +76201,16 @@ extension EC2ClientTypes.InstanceEventWindowTimeRangeRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let startWeekDayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.WeekDay.self, forKey: .startWeekDay) - startWeekDay = startWeekDayDecoded - let startHourDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .startHour) - startHour = startHourDecoded - let endWeekDayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.WeekDay.self, forKey: .endWeekDay) - endWeekDay = endWeekDayDecoded - let endHourDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .endHour) - endHour = endHourDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceEventWindowTimeRangeRequest() + value.startWeekDay = try reader["StartWeekDay"].readIfPresent() + value.startHour = try reader["StartHour"].readIfPresent() + value.endWeekDay = try reader["EndWeekDay"].readIfPresent() + value.endHour = try reader["EndHour"].readIfPresent() + return value + } } } @@ -110785,11 +76242,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceExportDetails: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - case targetEnvironment = "targetEnvironment" - } +extension EC2ClientTypes.InstanceExportDetails: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110801,12 +76254,14 @@ extension EC2ClientTypes.InstanceExportDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let targetEnvironmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExportEnvironment.self, forKey: .targetEnvironment) - targetEnvironment = targetEnvironmentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceExportDetails() + value.instanceId = try reader["instanceId"].readIfPresent() + value.targetEnvironment = try reader["targetEnvironment"].readIfPresent() + return value + } } } @@ -110830,11 +76285,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceFamilyCreditSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cpuCredits = "cpuCredits" - case instanceFamily = "instanceFamily" - } +extension EC2ClientTypes.InstanceFamilyCreditSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110846,12 +76297,14 @@ extension EC2ClientTypes.InstanceFamilyCreditSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceFamilyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UnlimitedSupportedInstanceFamily.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - let cpuCreditsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cpuCredits) - cpuCredits = cpuCreditsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceFamilyCreditSpecification() + value.instanceFamily = try reader["instanceFamily"].readIfPresent() + value.cpuCredits = try reader["cpuCredits"].readIfPresent() + return value + } } } @@ -110974,10 +76427,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceIpv4Prefix: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv4Prefix = "ipv4Prefix" - } +extension EC2ClientTypes.InstanceIpv4Prefix: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -110986,10 +76436,13 @@ extension EC2ClientTypes.InstanceIpv4Prefix: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv4PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv4Prefix) - ipv4Prefix = ipv4PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceIpv4Prefix() + value.ipv4Prefix = try reader["ipv4Prefix"].readIfPresent() + return value + } } } @@ -111009,11 +76462,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceIpv6Address: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Address = "ipv6Address" - case isPrimaryIpv6 = "isPrimaryIpv6" - } +extension EC2ClientTypes.InstanceIpv6Address: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111025,12 +76474,14 @@ extension EC2ClientTypes.InstanceIpv6Address: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded - let isPrimaryIpv6Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isPrimaryIpv6) - isPrimaryIpv6 = isPrimaryIpv6Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceIpv6Address() + value.ipv6Address = try reader["ipv6Address"].readIfPresent() + value.isPrimaryIpv6 = try reader["isPrimaryIpv6"].readIfPresent() + return value + } } } @@ -111054,10 +76505,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceIpv6AddressRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Address = "Ipv6Address" - } +extension EC2ClientTypes.InstanceIpv6AddressRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111066,10 +76514,13 @@ extension EC2ClientTypes.InstanceIpv6AddressRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceIpv6AddressRequest() + value.ipv6Address = try reader["Ipv6Address"].readIfPresent() + return value + } } } @@ -111089,10 +76540,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceIpv6Prefix: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Prefix = "ipv6Prefix" - } +extension EC2ClientTypes.InstanceIpv6Prefix: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111101,10 +76549,13 @@ extension EC2ClientTypes.InstanceIpv6Prefix: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Prefix) - ipv6Prefix = ipv6PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceIpv6Prefix() + value.ipv6Prefix = try reader["ipv6Prefix"].readIfPresent() + return value + } } } @@ -111191,10 +76642,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceMaintenanceOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoRecovery = "autoRecovery" - } +extension EC2ClientTypes.InstanceMaintenanceOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111203,10 +76651,13 @@ extension EC2ClientTypes.InstanceMaintenanceOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAutoRecoveryState.self, forKey: .autoRecovery) - autoRecovery = autoRecoveryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceMaintenanceOptions() + value.autoRecovery = try reader["autoRecovery"].readIfPresent() + return value + } } } @@ -111226,10 +76677,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceMaintenanceOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoRecovery = "AutoRecovery" - } +extension EC2ClientTypes.InstanceMaintenanceOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111238,10 +76686,13 @@ extension EC2ClientTypes.InstanceMaintenanceOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAutoRecoveryState.self, forKey: .autoRecovery) - autoRecovery = autoRecoveryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceMaintenanceOptionsRequest() + value.autoRecovery = try reader["AutoRecovery"].readIfPresent() + return value + } } } @@ -111261,11 +76712,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceMarketOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marketType = "MarketType" - case spotOptions = "SpotOptions" - } +extension EC2ClientTypes.InstanceMarketOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111277,12 +76724,14 @@ extension EC2ClientTypes.InstanceMarketOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let marketTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MarketType.self, forKey: .marketType) - marketType = marketTypeDecoded - let spotOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotMarketOptions.self, forKey: .spotOptions) - spotOptions = spotOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceMarketOptionsRequest() + value.marketType = try reader["MarketType"].readIfPresent() + value.spotOptions = try reader["SpotOptions"].readIfPresent(readingClosure: EC2ClientTypes.SpotMarketOptions.readingClosure) + return value + } } } @@ -111370,14 +76819,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceMetadataOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case httpEndpoint = "HttpEndpoint" - case httpProtocolIpv6 = "HttpProtocolIpv6" - case httpPutResponseHopLimit = "HttpPutResponseHopLimit" - case httpTokens = "HttpTokens" - case instanceMetadataTags = "InstanceMetadataTags" - } +extension EC2ClientTypes.InstanceMetadataOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111398,18 +76840,17 @@ extension EC2ClientTypes.InstanceMetadataOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let httpTokensDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HttpTokensState.self, forKey: .httpTokens) - httpTokens = httpTokensDecoded - let httpPutResponseHopLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .httpPutResponseHopLimit) - httpPutResponseHopLimit = httpPutResponseHopLimitDecoded - let httpEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataEndpointState.self, forKey: .httpEndpoint) - httpEndpoint = httpEndpointDecoded - let httpProtocolIpv6Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataProtocolState.self, forKey: .httpProtocolIpv6) - httpProtocolIpv6 = httpProtocolIpv6Decoded - let instanceMetadataTagsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataTagsState.self, forKey: .instanceMetadataTags) - instanceMetadataTags = instanceMetadataTagsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceMetadataOptionsRequest() + value.httpTokens = try reader["HttpTokens"].readIfPresent() + value.httpPutResponseHopLimit = try reader["HttpPutResponseHopLimit"].readIfPresent() + value.httpEndpoint = try reader["HttpEndpoint"].readIfPresent() + value.httpProtocolIpv6 = try reader["HttpProtocolIpv6"].readIfPresent() + value.instanceMetadataTags = try reader["InstanceMetadataTags"].readIfPresent() + return value + } } } @@ -111452,15 +76893,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceMetadataOptionsResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case httpEndpoint = "httpEndpoint" - case httpProtocolIpv6 = "httpProtocolIpv6" - case httpPutResponseHopLimit = "httpPutResponseHopLimit" - case httpTokens = "httpTokens" - case instanceMetadataTags = "instanceMetadataTags" - case state = "state" - } +extension EC2ClientTypes.InstanceMetadataOptionsResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111484,20 +76917,18 @@ extension EC2ClientTypes.InstanceMetadataOptionsResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataOptionsState.self, forKey: .state) - state = stateDecoded - let httpTokensDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HttpTokensState.self, forKey: .httpTokens) - httpTokens = httpTokensDecoded - let httpPutResponseHopLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .httpPutResponseHopLimit) - httpPutResponseHopLimit = httpPutResponseHopLimitDecoded - let httpEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataEndpointState.self, forKey: .httpEndpoint) - httpEndpoint = httpEndpointDecoded - let httpProtocolIpv6Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataProtocolState.self, forKey: .httpProtocolIpv6) - httpProtocolIpv6 = httpProtocolIpv6Decoded - let instanceMetadataTagsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataTagsState.self, forKey: .instanceMetadataTags) - instanceMetadataTags = instanceMetadataTagsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceMetadataOptionsResponse() + value.state = try reader["state"].readIfPresent() + value.httpTokens = try reader["httpTokens"].readIfPresent() + value.httpPutResponseHopLimit = try reader["httpPutResponseHopLimit"].readIfPresent() + value.httpEndpoint = try reader["httpEndpoint"].readIfPresent() + value.httpProtocolIpv6 = try reader["httpProtocolIpv6"].readIfPresent() + value.instanceMetadataTags = try reader["instanceMetadataTags"].readIfPresent() + return value + } } } @@ -111637,11 +77068,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceMonitoring: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - case monitoring = "monitoring" - } +extension EC2ClientTypes.InstanceMonitoring: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111653,12 +77080,14 @@ extension EC2ClientTypes.InstanceMonitoring: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Monitoring.self, forKey: .monitoring) - monitoring = monitoringDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceMonitoring() + value.instanceId = try reader["instanceId"].readIfPresent() + value.monitoring = try reader["monitoring"].readIfPresent(readingClosure: EC2ClientTypes.Monitoring.readingClosure) + return value + } } } @@ -111682,28 +77111,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceNetworkInterface: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - case attachment = "attachment" - case connectionTrackingConfiguration = "connectionTrackingConfiguration" - case description = "description" - case groups = "groupSet" - case interfaceType = "interfaceType" - case ipv4Prefixes = "ipv4PrefixSet" - case ipv6Addresses = "ipv6AddressesSet" - case ipv6Prefixes = "ipv6PrefixSet" - case macAddress = "macAddress" - case networkInterfaceId = "networkInterfaceId" - case ownerId = "ownerId" - case privateDnsName = "privateDnsName" - case privateIpAddress = "privateIpAddress" - case privateIpAddresses = "privateIpAddressesSet" - case sourceDestCheck = "sourceDestCheck" - case status = "status" - case subnetId = "subnetId" - case vpcId = "vpcId" - } +extension EC2ClientTypes.InstanceNetworkInterface: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -111811,131 +77219,31 @@ extension EC2ClientTypes.InstanceNetworkInterface: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceNetworkInterfaceAssociation.self, forKey: .association) - association = associationDecoded - let attachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceNetworkInterfaceAttachment.self, forKey: .attachment) - attachment = attachmentDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct item{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var groupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct item{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceIpv6Address].self, forKey: .member) - var ipv6AddressesBuffer:[EC2ClientTypes.InstanceIpv6Address]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [EC2ClientTypes.InstanceIpv6Address]() - for structureContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(structureContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let macAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .macAddress) - macAddress = macAddressDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstancePrivateIpAddress].self, forKey: .member) - var privateIpAddressesBuffer:[EC2ClientTypes.InstancePrivateIpAddress]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [EC2ClientTypes.InstancePrivateIpAddress]() - for structureContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(structureContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let sourceDestCheckDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sourceDestCheck) - sourceDestCheck = sourceDestCheckDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceStatus.self, forKey: .status) - status = statusDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let interfaceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .interfaceType) - interfaceType = interfaceTypeDecoded - if containerValues.contains(.ipv4Prefixes) { - struct KeyVal0{struct item{}} - let ipv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv4Prefixes) - if let ipv4PrefixesWrappedContainer = ipv4PrefixesWrappedContainer { - let ipv4PrefixesContainer = try ipv4PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceIpv4Prefix].self, forKey: .member) - var ipv4PrefixesBuffer:[EC2ClientTypes.InstanceIpv4Prefix]? = nil - if let ipv4PrefixesContainer = ipv4PrefixesContainer { - ipv4PrefixesBuffer = [EC2ClientTypes.InstanceIpv4Prefix]() - for structureContainer0 in ipv4PrefixesContainer { - ipv4PrefixesBuffer?.append(structureContainer0) - } - } - ipv4Prefixes = ipv4PrefixesBuffer - } else { - ipv4Prefixes = [] - } - } else { - ipv4Prefixes = nil - } - if containerValues.contains(.ipv6Prefixes) { - struct KeyVal0{struct item{}} - let ipv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Prefixes) - if let ipv6PrefixesWrappedContainer = ipv6PrefixesWrappedContainer { - let ipv6PrefixesContainer = try ipv6PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceIpv6Prefix].self, forKey: .member) - var ipv6PrefixesBuffer:[EC2ClientTypes.InstanceIpv6Prefix]? = nil - if let ipv6PrefixesContainer = ipv6PrefixesContainer { - ipv6PrefixesBuffer = [EC2ClientTypes.InstanceIpv6Prefix]() - for structureContainer0 in ipv6PrefixesContainer { - ipv6PrefixesBuffer?.append(structureContainer0) - } - } - ipv6Prefixes = ipv6PrefixesBuffer - } else { - ipv6Prefixes = [] - } - } else { - ipv6Prefixes = nil - } - let connectionTrackingConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionTrackingSpecificationResponse.self, forKey: .connectionTrackingConfiguration) - connectionTrackingConfiguration = connectionTrackingConfigurationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceNetworkInterface() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.InstanceNetworkInterfaceAssociation.readingClosure) + value.attachment = try reader["attachment"].readIfPresent(readingClosure: EC2ClientTypes.InstanceNetworkInterfaceAttachment.readingClosure) + value.description = try reader["description"].readIfPresent() + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv6Addresses = try reader["ipv6AddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceIpv6Address.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.macAddress = try reader["macAddress"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.privateDnsName = try reader["privateDnsName"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + value.privateIpAddresses = try reader["privateIpAddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstancePrivateIpAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourceDestCheck = try reader["sourceDestCheck"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.interfaceType = try reader["interfaceType"].readIfPresent() + value.ipv4Prefixes = try reader["ipv4PrefixSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceIpv4Prefix.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv6Prefixes = try reader["ipv6PrefixSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceIpv6Prefix.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.connectionTrackingConfiguration = try reader["connectionTrackingConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.ConnectionTrackingSpecificationResponse.readingClosure) + return value + } } } @@ -112027,14 +77335,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceNetworkInterfaceAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierIp = "carrierIp" - case customerOwnedIp = "customerOwnedIp" - case ipOwnerId = "ipOwnerId" - case publicDnsName = "publicDnsName" - case publicIp = "publicIp" - } +extension EC2ClientTypes.InstanceNetworkInterfaceAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -112055,18 +77356,17 @@ extension EC2ClientTypes.InstanceNetworkInterfaceAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let carrierIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierIp) - carrierIp = carrierIpDecoded - let customerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIp) - customerOwnedIp = customerOwnedIpDecoded - let ipOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipOwnerId) - ipOwnerId = ipOwnerIdDecoded - let publicDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicDnsName) - publicDnsName = publicDnsNameDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceNetworkInterfaceAssociation() + value.carrierIp = try reader["carrierIp"].readIfPresent() + value.customerOwnedIp = try reader["customerOwnedIp"].readIfPresent() + value.ipOwnerId = try reader["ipOwnerId"].readIfPresent() + value.publicDnsName = try reader["publicDnsName"].readIfPresent() + value.publicIp = try reader["publicIp"].readIfPresent() + return value + } } } @@ -112102,16 +77402,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceNetworkInterfaceAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachTime = "attachTime" - case attachmentId = "attachmentId" - case deleteOnTermination = "deleteOnTermination" - case deviceIndex = "deviceIndex" - case enaSrdSpecification = "enaSrdSpecification" - case networkCardIndex = "networkCardIndex" - case status = "status" - } +extension EC2ClientTypes.InstanceNetworkInterfaceAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -112138,22 +77429,19 @@ extension EC2ClientTypes.InstanceNetworkInterfaceAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .attachTime) - attachTime = attachTimeDecoded - let attachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attachmentId) - attachmentId = attachmentIdDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let deviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deviceIndex) - deviceIndex = deviceIndexDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttachmentStatus.self, forKey: .status) - status = statusDecoded - let networkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .networkCardIndex) - networkCardIndex = networkCardIndexDecoded - let enaSrdSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAttachmentEnaSrdSpecification.self, forKey: .enaSrdSpecification) - enaSrdSpecification = enaSrdSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceNetworkInterfaceAttachment() + value.attachTime = try reader["attachTime"].readTimestampIfPresent(format: .dateTime) + value.attachmentId = try reader["attachmentId"].readIfPresent() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.deviceIndex = try reader["deviceIndex"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.networkCardIndex = try reader["networkCardIndex"].readIfPresent() + value.enaSrdSpecification = try reader["enaSrdSpecification"].readIfPresent(readingClosure: EC2ClientTypes.InstanceAttachmentEnaSrdSpecification.readingClosure) + return value + } } } @@ -112197,31 +77485,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceNetworkInterfaceSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associateCarrierIpAddress = "AssociateCarrierIpAddress" - case associatePublicIpAddress = "associatePublicIpAddress" - case connectionTrackingSpecification = "ConnectionTrackingSpecification" - case deleteOnTermination = "deleteOnTermination" - case description = "description" - case deviceIndex = "deviceIndex" - case enaSrdSpecification = "EnaSrdSpecification" - case groups = "SecurityGroupId" - case interfaceType = "InterfaceType" - case ipv4PrefixCount = "Ipv4PrefixCount" - case ipv4Prefixes = "Ipv4Prefix" - case ipv6AddressCount = "ipv6AddressCount" - case ipv6Addresses = "ipv6AddressesSet" - case ipv6PrefixCount = "Ipv6PrefixCount" - case ipv6Prefixes = "Ipv6Prefix" - case networkCardIndex = "NetworkCardIndex" - case networkInterfaceId = "networkInterfaceId" - case primaryIpv6 = "PrimaryIpv6" - case privateIpAddress = "privateIpAddress" - case privateIpAddresses = "privateIpAddressesSet" - case secondaryPrivateIpAddressCount = "secondaryPrivateIpAddressCount" - case subnetId = "subnetId" - } +extension EC2ClientTypes.InstanceNetworkInterfaceSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -112338,137 +77602,34 @@ extension EC2ClientTypes.InstanceNetworkInterfaceSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associatePublicIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associatePublicIpAddress) - associatePublicIpAddress = associatePublicIpAddressDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let deviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deviceIndex) - deviceIndex = deviceIndexDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct SecurityGroupId{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupsBuffer:[Swift.String]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [Swift.String]() - for stringContainer0 in groupsContainer { - groupsBuffer?.append(stringContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let ipv6AddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6AddressCount) - ipv6AddressCount = ipv6AddressCountDecoded - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct item{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceIpv6Address].self, forKey: .member) - var ipv6AddressesBuffer:[EC2ClientTypes.InstanceIpv6Address]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [EC2ClientTypes.InstanceIpv6Address]() - for structureContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(structureContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.PrivateIpAddressSpecification].self, forKey: .member) - var privateIpAddressesBuffer:[EC2ClientTypes.PrivateIpAddressSpecification]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [EC2ClientTypes.PrivateIpAddressSpecification]() - for structureContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(structureContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let secondaryPrivateIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondaryPrivateIpAddressCount) - secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCountDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let associateCarrierIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associateCarrierIpAddress) - associateCarrierIpAddress = associateCarrierIpAddressDecoded - let interfaceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .interfaceType) - interfaceType = interfaceTypeDecoded - let networkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .networkCardIndex) - networkCardIndex = networkCardIndexDecoded - if containerValues.contains(.ipv4Prefixes) { - struct KeyVal0{struct item{}} - let ipv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv4Prefixes) - if let ipv4PrefixesWrappedContainer = ipv4PrefixesWrappedContainer { - let ipv4PrefixesContainer = try ipv4PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv4PrefixSpecificationRequest].self, forKey: .member) - var ipv4PrefixesBuffer:[EC2ClientTypes.Ipv4PrefixSpecificationRequest]? = nil - if let ipv4PrefixesContainer = ipv4PrefixesContainer { - ipv4PrefixesBuffer = [EC2ClientTypes.Ipv4PrefixSpecificationRequest]() - for structureContainer0 in ipv4PrefixesContainer { - ipv4PrefixesBuffer?.append(structureContainer0) - } - } - ipv4Prefixes = ipv4PrefixesBuffer - } else { - ipv4Prefixes = [] - } - } else { - ipv4Prefixes = nil - } - let ipv4PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4PrefixCount) - ipv4PrefixCount = ipv4PrefixCountDecoded - if containerValues.contains(.ipv6Prefixes) { - struct KeyVal0{struct item{}} - let ipv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Prefixes) - if let ipv6PrefixesWrappedContainer = ipv6PrefixesWrappedContainer { - let ipv6PrefixesContainer = try ipv6PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6PrefixSpecificationRequest].self, forKey: .member) - var ipv6PrefixesBuffer:[EC2ClientTypes.Ipv6PrefixSpecificationRequest]? = nil - if let ipv6PrefixesContainer = ipv6PrefixesContainer { - ipv6PrefixesBuffer = [EC2ClientTypes.Ipv6PrefixSpecificationRequest]() - for structureContainer0 in ipv6PrefixesContainer { - ipv6PrefixesBuffer?.append(structureContainer0) - } - } - ipv6Prefixes = ipv6PrefixesBuffer - } else { - ipv6Prefixes = [] - } - } else { - ipv6Prefixes = nil - } - let ipv6PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6PrefixCount) - ipv6PrefixCount = ipv6PrefixCountDecoded - let primaryIpv6Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .primaryIpv6) - primaryIpv6 = primaryIpv6Decoded - let enaSrdSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnaSrdSpecificationRequest.self, forKey: .enaSrdSpecification) - enaSrdSpecification = enaSrdSpecificationDecoded - let connectionTrackingSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionTrackingSpecificationRequest.self, forKey: .connectionTrackingSpecification) - connectionTrackingSpecification = connectionTrackingSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceNetworkInterfaceSpecification() + value.associatePublicIpAddress = try reader["associatePublicIpAddress"].readIfPresent() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.deviceIndex = try reader["deviceIndex"].readIfPresent() + value.groups = try reader["SecurityGroupId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroupId", isFlattened: false) + value.ipv6AddressCount = try reader["ipv6AddressCount"].readIfPresent() + value.ipv6Addresses = try reader["ipv6AddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceIpv6Address.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + value.privateIpAddresses = try reader["privateIpAddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrivateIpAddressSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.secondaryPrivateIpAddressCount = try reader["secondaryPrivateIpAddressCount"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.associateCarrierIpAddress = try reader["AssociateCarrierIpAddress"].readIfPresent() + value.interfaceType = try reader["InterfaceType"].readIfPresent() + value.networkCardIndex = try reader["NetworkCardIndex"].readIfPresent() + value.ipv4Prefixes = try reader["Ipv4Prefix"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv4PrefixSpecificationRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv4PrefixCount = try reader["Ipv4PrefixCount"].readIfPresent() + value.ipv6Prefixes = try reader["Ipv6Prefix"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv6PrefixSpecificationRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv6PrefixCount = try reader["Ipv6PrefixCount"].readIfPresent() + value.primaryIpv6 = try reader["PrimaryIpv6"].readIfPresent() + value.enaSrdSpecification = try reader["EnaSrdSpecification"].readIfPresent(readingClosure: EC2ClientTypes.EnaSrdSpecificationRequest.readingClosure) + value.connectionTrackingSpecification = try reader["ConnectionTrackingSpecification"].readIfPresent(readingClosure: EC2ClientTypes.ConnectionTrackingSpecificationRequest.readingClosure) + return value + } } } @@ -112572,13 +77733,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstancePrivateIpAddress: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - case primary = "primary" - case privateDnsName = "privateDnsName" - case privateIpAddress = "privateIpAddress" - } +extension EC2ClientTypes.InstancePrivateIpAddress: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -112596,16 +77751,16 @@ extension EC2ClientTypes.InstancePrivateIpAddress: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceNetworkInterfaceAssociation.self, forKey: .association) - association = associationDecoded - let primaryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .primary) - primary = primaryDecoded - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstancePrivateIpAddress() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.InstanceNetworkInterfaceAssociation.readingClosure) + value.primary = try reader["primary"].readIfPresent() + value.privateDnsName = try reader["privateDnsName"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + return value + } } } @@ -112637,32 +77792,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceRequirements: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acceleratorCount = "acceleratorCount" - case acceleratorManufacturers = "acceleratorManufacturerSet" - case acceleratorNames = "acceleratorNameSet" - case acceleratorTotalMemoryMiB = "acceleratorTotalMemoryMiB" - case acceleratorTypes = "acceleratorTypeSet" - case allowedInstanceTypes = "allowedInstanceTypeSet" - case bareMetal = "bareMetal" - case baselineEbsBandwidthMbps = "baselineEbsBandwidthMbps" - case burstablePerformance = "burstablePerformance" - case cpuManufacturers = "cpuManufacturerSet" - case excludedInstanceTypes = "excludedInstanceTypeSet" - case instanceGenerations = "instanceGenerationSet" - case localStorage = "localStorage" - case localStorageTypes = "localStorageTypeSet" - case memoryGiBPerVCpu = "memoryGiBPerVCpu" - case memoryMiB = "memoryMiB" - case networkBandwidthGbps = "networkBandwidthGbps" - case networkInterfaceCount = "networkInterfaceCount" - case onDemandMaxPricePercentageOverLowestPrice = "onDemandMaxPricePercentageOverLowestPrice" - case requireHibernateSupport = "requireHibernateSupport" - case spotMaxPricePercentageOverLowestPrice = "spotMaxPricePercentageOverLowestPrice" - case totalLocalStorageGB = "totalLocalStorageGB" - case vCpuCount = "vCpuCount" - } +extension EC2ClientTypes.InstanceRequirements: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -112809,189 +77939,34 @@ extension EC2ClientTypes.InstanceRequirements: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vCpuCountDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VCpuCountRange.self, forKey: .vCpuCount) - vCpuCount = vCpuCountDecoded - let memoryMiBDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MemoryMiB.self, forKey: .memoryMiB) - memoryMiB = memoryMiBDecoded - if containerValues.contains(.cpuManufacturers) { - struct KeyVal0{struct item{}} - let cpuManufacturersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cpuManufacturers) - if let cpuManufacturersWrappedContainer = cpuManufacturersWrappedContainer { - let cpuManufacturersContainer = try cpuManufacturersWrappedContainer.decodeIfPresent([EC2ClientTypes.CpuManufacturer].self, forKey: .member) - var cpuManufacturersBuffer:[EC2ClientTypes.CpuManufacturer]? = nil - if let cpuManufacturersContainer = cpuManufacturersContainer { - cpuManufacturersBuffer = [EC2ClientTypes.CpuManufacturer]() - for enumContainer0 in cpuManufacturersContainer { - cpuManufacturersBuffer?.append(enumContainer0) - } - } - cpuManufacturers = cpuManufacturersBuffer - } else { - cpuManufacturers = [] - } - } else { - cpuManufacturers = nil - } - let memoryGiBPerVCpuDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MemoryGiBPerVCpu.self, forKey: .memoryGiBPerVCpu) - memoryGiBPerVCpu = memoryGiBPerVCpuDecoded - if containerValues.contains(.excludedInstanceTypes) { - struct KeyVal0{struct item{}} - let excludedInstanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedInstanceTypes) - if let excludedInstanceTypesWrappedContainer = excludedInstanceTypesWrappedContainer { - let excludedInstanceTypesContainer = try excludedInstanceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedInstanceTypesBuffer:[Swift.String]? = nil - if let excludedInstanceTypesContainer = excludedInstanceTypesContainer { - excludedInstanceTypesBuffer = [Swift.String]() - for stringContainer0 in excludedInstanceTypesContainer { - excludedInstanceTypesBuffer?.append(stringContainer0) - } - } - excludedInstanceTypes = excludedInstanceTypesBuffer - } else { - excludedInstanceTypes = [] - } - } else { - excludedInstanceTypes = nil - } - if containerValues.contains(.instanceGenerations) { - struct KeyVal0{struct item{}} - let instanceGenerationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceGenerations) - if let instanceGenerationsWrappedContainer = instanceGenerationsWrappedContainer { - let instanceGenerationsContainer = try instanceGenerationsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceGeneration].self, forKey: .member) - var instanceGenerationsBuffer:[EC2ClientTypes.InstanceGeneration]? = nil - if let instanceGenerationsContainer = instanceGenerationsContainer { - instanceGenerationsBuffer = [EC2ClientTypes.InstanceGeneration]() - for enumContainer0 in instanceGenerationsContainer { - instanceGenerationsBuffer?.append(enumContainer0) - } - } - instanceGenerations = instanceGenerationsBuffer - } else { - instanceGenerations = [] - } - } else { - instanceGenerations = nil - } - let spotMaxPricePercentageOverLowestPriceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .spotMaxPricePercentageOverLowestPrice) - spotMaxPricePercentageOverLowestPrice = spotMaxPricePercentageOverLowestPriceDecoded - let onDemandMaxPricePercentageOverLowestPriceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandMaxPricePercentageOverLowestPrice) - onDemandMaxPricePercentageOverLowestPrice = onDemandMaxPricePercentageOverLowestPriceDecoded - let bareMetalDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BareMetal.self, forKey: .bareMetal) - bareMetal = bareMetalDecoded - let burstablePerformanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BurstablePerformance.self, forKey: .burstablePerformance) - burstablePerformance = burstablePerformanceDecoded - let requireHibernateSupportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireHibernateSupport) - requireHibernateSupport = requireHibernateSupportDecoded - let networkInterfaceCountDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceCount.self, forKey: .networkInterfaceCount) - networkInterfaceCount = networkInterfaceCountDecoded - let localStorageDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalStorage.self, forKey: .localStorage) - localStorage = localStorageDecoded - if containerValues.contains(.localStorageTypes) { - struct KeyVal0{struct item{}} - let localStorageTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localStorageTypes) - if let localStorageTypesWrappedContainer = localStorageTypesWrappedContainer { - let localStorageTypesContainer = try localStorageTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalStorageType].self, forKey: .member) - var localStorageTypesBuffer:[EC2ClientTypes.LocalStorageType]? = nil - if let localStorageTypesContainer = localStorageTypesContainer { - localStorageTypesBuffer = [EC2ClientTypes.LocalStorageType]() - for enumContainer0 in localStorageTypesContainer { - localStorageTypesBuffer?.append(enumContainer0) - } - } - localStorageTypes = localStorageTypesBuffer - } else { - localStorageTypes = [] - } - } else { - localStorageTypes = nil - } - let totalLocalStorageGBDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TotalLocalStorageGB.self, forKey: .totalLocalStorageGB) - totalLocalStorageGB = totalLocalStorageGBDecoded - let baselineEbsBandwidthMbpsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BaselineEbsBandwidthMbps.self, forKey: .baselineEbsBandwidthMbps) - baselineEbsBandwidthMbps = baselineEbsBandwidthMbpsDecoded - if containerValues.contains(.acceleratorTypes) { - struct KeyVal0{struct item{}} - let acceleratorTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorTypes) - if let acceleratorTypesWrappedContainer = acceleratorTypesWrappedContainer { - let acceleratorTypesContainer = try acceleratorTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.AcceleratorType].self, forKey: .member) - var acceleratorTypesBuffer:[EC2ClientTypes.AcceleratorType]? = nil - if let acceleratorTypesContainer = acceleratorTypesContainer { - acceleratorTypesBuffer = [EC2ClientTypes.AcceleratorType]() - for enumContainer0 in acceleratorTypesContainer { - acceleratorTypesBuffer?.append(enumContainer0) - } - } - acceleratorTypes = acceleratorTypesBuffer - } else { - acceleratorTypes = [] - } - } else { - acceleratorTypes = nil - } - let acceleratorCountDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AcceleratorCount.self, forKey: .acceleratorCount) - acceleratorCount = acceleratorCountDecoded - if containerValues.contains(.acceleratorManufacturers) { - struct KeyVal0{struct item{}} - let acceleratorManufacturersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorManufacturers) - if let acceleratorManufacturersWrappedContainer = acceleratorManufacturersWrappedContainer { - let acceleratorManufacturersContainer = try acceleratorManufacturersWrappedContainer.decodeIfPresent([EC2ClientTypes.AcceleratorManufacturer].self, forKey: .member) - var acceleratorManufacturersBuffer:[EC2ClientTypes.AcceleratorManufacturer]? = nil - if let acceleratorManufacturersContainer = acceleratorManufacturersContainer { - acceleratorManufacturersBuffer = [EC2ClientTypes.AcceleratorManufacturer]() - for enumContainer0 in acceleratorManufacturersContainer { - acceleratorManufacturersBuffer?.append(enumContainer0) - } - } - acceleratorManufacturers = acceleratorManufacturersBuffer - } else { - acceleratorManufacturers = [] - } - } else { - acceleratorManufacturers = nil - } - if containerValues.contains(.acceleratorNames) { - struct KeyVal0{struct item{}} - let acceleratorNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorNames) - if let acceleratorNamesWrappedContainer = acceleratorNamesWrappedContainer { - let acceleratorNamesContainer = try acceleratorNamesWrappedContainer.decodeIfPresent([EC2ClientTypes.AcceleratorName].self, forKey: .member) - var acceleratorNamesBuffer:[EC2ClientTypes.AcceleratorName]? = nil - if let acceleratorNamesContainer = acceleratorNamesContainer { - acceleratorNamesBuffer = [EC2ClientTypes.AcceleratorName]() - for enumContainer0 in acceleratorNamesContainer { - acceleratorNamesBuffer?.append(enumContainer0) - } - } - acceleratorNames = acceleratorNamesBuffer - } else { - acceleratorNames = [] - } - } else { - acceleratorNames = nil - } - let acceleratorTotalMemoryMiBDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AcceleratorTotalMemoryMiB.self, forKey: .acceleratorTotalMemoryMiB) - acceleratorTotalMemoryMiB = acceleratorTotalMemoryMiBDecoded - let networkBandwidthGbpsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkBandwidthGbps.self, forKey: .networkBandwidthGbps) - networkBandwidthGbps = networkBandwidthGbpsDecoded - if containerValues.contains(.allowedInstanceTypes) { - struct KeyVal0{struct item{}} - let allowedInstanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedInstanceTypes) - if let allowedInstanceTypesWrappedContainer = allowedInstanceTypesWrappedContainer { - let allowedInstanceTypesContainer = try allowedInstanceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allowedInstanceTypesBuffer:[Swift.String]? = nil - if let allowedInstanceTypesContainer = allowedInstanceTypesContainer { - allowedInstanceTypesBuffer = [Swift.String]() - for stringContainer0 in allowedInstanceTypesContainer { - allowedInstanceTypesBuffer?.append(stringContainer0) - } - } - allowedInstanceTypes = allowedInstanceTypesBuffer - } else { - allowedInstanceTypes = [] - } - } else { - allowedInstanceTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceRequirements() + value.vCpuCount = try reader["vCpuCount"].readIfPresent(readingClosure: EC2ClientTypes.VCpuCountRange.readingClosure) + value.memoryMiB = try reader["memoryMiB"].readIfPresent(readingClosure: EC2ClientTypes.MemoryMiB.readingClosure) + value.cpuManufacturers = try reader["cpuManufacturerSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CpuManufacturer.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.memoryGiBPerVCpu = try reader["memoryGiBPerVCpu"].readIfPresent(readingClosure: EC2ClientTypes.MemoryGiBPerVCpu.readingClosure) + value.excludedInstanceTypes = try reader["excludedInstanceTypeSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceGenerations = try reader["instanceGenerationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceGeneration.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.spotMaxPricePercentageOverLowestPrice = try reader["spotMaxPricePercentageOverLowestPrice"].readIfPresent() + value.onDemandMaxPricePercentageOverLowestPrice = try reader["onDemandMaxPricePercentageOverLowestPrice"].readIfPresent() + value.bareMetal = try reader["bareMetal"].readIfPresent() + value.burstablePerformance = try reader["burstablePerformance"].readIfPresent() + value.requireHibernateSupport = try reader["requireHibernateSupport"].readIfPresent() + value.networkInterfaceCount = try reader["networkInterfaceCount"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterfaceCount.readingClosure) + value.localStorage = try reader["localStorage"].readIfPresent() + value.localStorageTypes = try reader["localStorageTypeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalStorageType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.totalLocalStorageGB = try reader["totalLocalStorageGB"].readIfPresent(readingClosure: EC2ClientTypes.TotalLocalStorageGB.readingClosure) + value.baselineEbsBandwidthMbps = try reader["baselineEbsBandwidthMbps"].readIfPresent(readingClosure: EC2ClientTypes.BaselineEbsBandwidthMbps.readingClosure) + value.acceleratorTypes = try reader["acceleratorTypeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AcceleratorType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.acceleratorCount = try reader["acceleratorCount"].readIfPresent(readingClosure: EC2ClientTypes.AcceleratorCount.readingClosure) + value.acceleratorManufacturers = try reader["acceleratorManufacturerSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AcceleratorManufacturer.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.acceleratorNames = try reader["acceleratorNameSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AcceleratorName.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.acceleratorTotalMemoryMiB = try reader["acceleratorTotalMemoryMiB"].readIfPresent(readingClosure: EC2ClientTypes.AcceleratorTotalMemoryMiB.readingClosure) + value.networkBandwidthGbps = try reader["networkBandwidthGbps"].readIfPresent(readingClosure: EC2ClientTypes.NetworkBandwidthGbps.readingClosure) + value.allowedInstanceTypes = try reader["allowedInstanceTypeSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -113199,32 +78174,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceRequirementsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acceleratorCount = "AcceleratorCount" - case acceleratorManufacturers = "AcceleratorManufacturer" - case acceleratorNames = "AcceleratorName" - case acceleratorTotalMemoryMiB = "AcceleratorTotalMemoryMiB" - case acceleratorTypes = "AcceleratorType" - case allowedInstanceTypes = "AllowedInstanceType" - case bareMetal = "BareMetal" - case baselineEbsBandwidthMbps = "BaselineEbsBandwidthMbps" - case burstablePerformance = "BurstablePerformance" - case cpuManufacturers = "CpuManufacturer" - case excludedInstanceTypes = "ExcludedInstanceType" - case instanceGenerations = "InstanceGeneration" - case localStorage = "LocalStorage" - case localStorageTypes = "LocalStorageType" - case memoryGiBPerVCpu = "MemoryGiBPerVCpu" - case memoryMiB = "MemoryMiB" - case networkBandwidthGbps = "NetworkBandwidthGbps" - case networkInterfaceCount = "NetworkInterfaceCount" - case onDemandMaxPricePercentageOverLowestPrice = "OnDemandMaxPricePercentageOverLowestPrice" - case requireHibernateSupport = "RequireHibernateSupport" - case spotMaxPricePercentageOverLowestPrice = "SpotMaxPricePercentageOverLowestPrice" - case totalLocalStorageGB = "TotalLocalStorageGB" - case vCpuCount = "VCpuCount" - } +extension EC2ClientTypes.InstanceRequirementsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -113371,189 +78321,34 @@ extension EC2ClientTypes.InstanceRequirementsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vCpuCountDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VCpuCountRangeRequest.self, forKey: .vCpuCount) - vCpuCount = vCpuCountDecoded - let memoryMiBDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MemoryMiBRequest.self, forKey: .memoryMiB) - memoryMiB = memoryMiBDecoded - if containerValues.contains(.cpuManufacturers) { - struct KeyVal0{struct item{}} - let cpuManufacturersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cpuManufacturers) - if let cpuManufacturersWrappedContainer = cpuManufacturersWrappedContainer { - let cpuManufacturersContainer = try cpuManufacturersWrappedContainer.decodeIfPresent([EC2ClientTypes.CpuManufacturer].self, forKey: .member) - var cpuManufacturersBuffer:[EC2ClientTypes.CpuManufacturer]? = nil - if let cpuManufacturersContainer = cpuManufacturersContainer { - cpuManufacturersBuffer = [EC2ClientTypes.CpuManufacturer]() - for enumContainer0 in cpuManufacturersContainer { - cpuManufacturersBuffer?.append(enumContainer0) - } - } - cpuManufacturers = cpuManufacturersBuffer - } else { - cpuManufacturers = [] - } - } else { - cpuManufacturers = nil - } - let memoryGiBPerVCpuDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MemoryGiBPerVCpuRequest.self, forKey: .memoryGiBPerVCpu) - memoryGiBPerVCpu = memoryGiBPerVCpuDecoded - if containerValues.contains(.excludedInstanceTypes) { - struct KeyVal0{struct item{}} - let excludedInstanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedInstanceTypes) - if let excludedInstanceTypesWrappedContainer = excludedInstanceTypesWrappedContainer { - let excludedInstanceTypesContainer = try excludedInstanceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedInstanceTypesBuffer:[Swift.String]? = nil - if let excludedInstanceTypesContainer = excludedInstanceTypesContainer { - excludedInstanceTypesBuffer = [Swift.String]() - for stringContainer0 in excludedInstanceTypesContainer { - excludedInstanceTypesBuffer?.append(stringContainer0) - } - } - excludedInstanceTypes = excludedInstanceTypesBuffer - } else { - excludedInstanceTypes = [] - } - } else { - excludedInstanceTypes = nil - } - if containerValues.contains(.instanceGenerations) { - struct KeyVal0{struct item{}} - let instanceGenerationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceGenerations) - if let instanceGenerationsWrappedContainer = instanceGenerationsWrappedContainer { - let instanceGenerationsContainer = try instanceGenerationsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceGeneration].self, forKey: .member) - var instanceGenerationsBuffer:[EC2ClientTypes.InstanceGeneration]? = nil - if let instanceGenerationsContainer = instanceGenerationsContainer { - instanceGenerationsBuffer = [EC2ClientTypes.InstanceGeneration]() - for enumContainer0 in instanceGenerationsContainer { - instanceGenerationsBuffer?.append(enumContainer0) - } - } - instanceGenerations = instanceGenerationsBuffer - } else { - instanceGenerations = [] - } - } else { - instanceGenerations = nil - } - let spotMaxPricePercentageOverLowestPriceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .spotMaxPricePercentageOverLowestPrice) - spotMaxPricePercentageOverLowestPrice = spotMaxPricePercentageOverLowestPriceDecoded - let onDemandMaxPricePercentageOverLowestPriceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandMaxPricePercentageOverLowestPrice) - onDemandMaxPricePercentageOverLowestPrice = onDemandMaxPricePercentageOverLowestPriceDecoded - let bareMetalDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BareMetal.self, forKey: .bareMetal) - bareMetal = bareMetalDecoded - let burstablePerformanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BurstablePerformance.self, forKey: .burstablePerformance) - burstablePerformance = burstablePerformanceDecoded - let requireHibernateSupportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireHibernateSupport) - requireHibernateSupport = requireHibernateSupportDecoded - let networkInterfaceCountDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceCountRequest.self, forKey: .networkInterfaceCount) - networkInterfaceCount = networkInterfaceCountDecoded - let localStorageDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalStorage.self, forKey: .localStorage) - localStorage = localStorageDecoded - if containerValues.contains(.localStorageTypes) { - struct KeyVal0{struct item{}} - let localStorageTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localStorageTypes) - if let localStorageTypesWrappedContainer = localStorageTypesWrappedContainer { - let localStorageTypesContainer = try localStorageTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalStorageType].self, forKey: .member) - var localStorageTypesBuffer:[EC2ClientTypes.LocalStorageType]? = nil - if let localStorageTypesContainer = localStorageTypesContainer { - localStorageTypesBuffer = [EC2ClientTypes.LocalStorageType]() - for enumContainer0 in localStorageTypesContainer { - localStorageTypesBuffer?.append(enumContainer0) - } - } - localStorageTypes = localStorageTypesBuffer - } else { - localStorageTypes = [] - } - } else { - localStorageTypes = nil - } - let totalLocalStorageGBDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TotalLocalStorageGBRequest.self, forKey: .totalLocalStorageGB) - totalLocalStorageGB = totalLocalStorageGBDecoded - let baselineEbsBandwidthMbpsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BaselineEbsBandwidthMbpsRequest.self, forKey: .baselineEbsBandwidthMbps) - baselineEbsBandwidthMbps = baselineEbsBandwidthMbpsDecoded - if containerValues.contains(.acceleratorTypes) { - struct KeyVal0{struct item{}} - let acceleratorTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorTypes) - if let acceleratorTypesWrappedContainer = acceleratorTypesWrappedContainer { - let acceleratorTypesContainer = try acceleratorTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.AcceleratorType].self, forKey: .member) - var acceleratorTypesBuffer:[EC2ClientTypes.AcceleratorType]? = nil - if let acceleratorTypesContainer = acceleratorTypesContainer { - acceleratorTypesBuffer = [EC2ClientTypes.AcceleratorType]() - for enumContainer0 in acceleratorTypesContainer { - acceleratorTypesBuffer?.append(enumContainer0) - } - } - acceleratorTypes = acceleratorTypesBuffer - } else { - acceleratorTypes = [] - } - } else { - acceleratorTypes = nil - } - let acceleratorCountDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AcceleratorCountRequest.self, forKey: .acceleratorCount) - acceleratorCount = acceleratorCountDecoded - if containerValues.contains(.acceleratorManufacturers) { - struct KeyVal0{struct item{}} - let acceleratorManufacturersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorManufacturers) - if let acceleratorManufacturersWrappedContainer = acceleratorManufacturersWrappedContainer { - let acceleratorManufacturersContainer = try acceleratorManufacturersWrappedContainer.decodeIfPresent([EC2ClientTypes.AcceleratorManufacturer].self, forKey: .member) - var acceleratorManufacturersBuffer:[EC2ClientTypes.AcceleratorManufacturer]? = nil - if let acceleratorManufacturersContainer = acceleratorManufacturersContainer { - acceleratorManufacturersBuffer = [EC2ClientTypes.AcceleratorManufacturer]() - for enumContainer0 in acceleratorManufacturersContainer { - acceleratorManufacturersBuffer?.append(enumContainer0) - } - } - acceleratorManufacturers = acceleratorManufacturersBuffer - } else { - acceleratorManufacturers = [] - } - } else { - acceleratorManufacturers = nil - } - if containerValues.contains(.acceleratorNames) { - struct KeyVal0{struct item{}} - let acceleratorNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .acceleratorNames) - if let acceleratorNamesWrappedContainer = acceleratorNamesWrappedContainer { - let acceleratorNamesContainer = try acceleratorNamesWrappedContainer.decodeIfPresent([EC2ClientTypes.AcceleratorName].self, forKey: .member) - var acceleratorNamesBuffer:[EC2ClientTypes.AcceleratorName]? = nil - if let acceleratorNamesContainer = acceleratorNamesContainer { - acceleratorNamesBuffer = [EC2ClientTypes.AcceleratorName]() - for enumContainer0 in acceleratorNamesContainer { - acceleratorNamesBuffer?.append(enumContainer0) - } - } - acceleratorNames = acceleratorNamesBuffer - } else { - acceleratorNames = [] - } - } else { - acceleratorNames = nil - } - let acceleratorTotalMemoryMiBDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AcceleratorTotalMemoryMiBRequest.self, forKey: .acceleratorTotalMemoryMiB) - acceleratorTotalMemoryMiB = acceleratorTotalMemoryMiBDecoded - let networkBandwidthGbpsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkBandwidthGbpsRequest.self, forKey: .networkBandwidthGbps) - networkBandwidthGbps = networkBandwidthGbpsDecoded - if containerValues.contains(.allowedInstanceTypes) { - struct KeyVal0{struct item{}} - let allowedInstanceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedInstanceTypes) - if let allowedInstanceTypesWrappedContainer = allowedInstanceTypesWrappedContainer { - let allowedInstanceTypesContainer = try allowedInstanceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allowedInstanceTypesBuffer:[Swift.String]? = nil - if let allowedInstanceTypesContainer = allowedInstanceTypesContainer { - allowedInstanceTypesBuffer = [Swift.String]() - for stringContainer0 in allowedInstanceTypesContainer { - allowedInstanceTypesBuffer?.append(stringContainer0) - } - } - allowedInstanceTypes = allowedInstanceTypesBuffer - } else { - allowedInstanceTypes = [] - } - } else { - allowedInstanceTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceRequirementsRequest() + value.vCpuCount = try reader["VCpuCount"].readIfPresent(readingClosure: EC2ClientTypes.VCpuCountRangeRequest.readingClosure) + value.memoryMiB = try reader["MemoryMiB"].readIfPresent(readingClosure: EC2ClientTypes.MemoryMiBRequest.readingClosure) + value.cpuManufacturers = try reader["CpuManufacturer"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CpuManufacturer.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.memoryGiBPerVCpu = try reader["MemoryGiBPerVCpu"].readIfPresent(readingClosure: EC2ClientTypes.MemoryGiBPerVCpuRequest.readingClosure) + value.excludedInstanceTypes = try reader["ExcludedInstanceType"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceGenerations = try reader["InstanceGeneration"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceGeneration.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.spotMaxPricePercentageOverLowestPrice = try reader["SpotMaxPricePercentageOverLowestPrice"].readIfPresent() + value.onDemandMaxPricePercentageOverLowestPrice = try reader["OnDemandMaxPricePercentageOverLowestPrice"].readIfPresent() + value.bareMetal = try reader["BareMetal"].readIfPresent() + value.burstablePerformance = try reader["BurstablePerformance"].readIfPresent() + value.requireHibernateSupport = try reader["RequireHibernateSupport"].readIfPresent() + value.networkInterfaceCount = try reader["NetworkInterfaceCount"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterfaceCountRequest.readingClosure) + value.localStorage = try reader["LocalStorage"].readIfPresent() + value.localStorageTypes = try reader["LocalStorageType"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalStorageType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.totalLocalStorageGB = try reader["TotalLocalStorageGB"].readIfPresent(readingClosure: EC2ClientTypes.TotalLocalStorageGBRequest.readingClosure) + value.baselineEbsBandwidthMbps = try reader["BaselineEbsBandwidthMbps"].readIfPresent(readingClosure: EC2ClientTypes.BaselineEbsBandwidthMbpsRequest.readingClosure) + value.acceleratorTypes = try reader["AcceleratorType"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AcceleratorType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.acceleratorCount = try reader["AcceleratorCount"].readIfPresent(readingClosure: EC2ClientTypes.AcceleratorCountRequest.readingClosure) + value.acceleratorManufacturers = try reader["AcceleratorManufacturer"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AcceleratorManufacturer.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.acceleratorNames = try reader["AcceleratorName"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AcceleratorName.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.acceleratorTotalMemoryMiB = try reader["AcceleratorTotalMemoryMiB"].readIfPresent(readingClosure: EC2ClientTypes.AcceleratorTotalMemoryMiBRequest.readingClosure) + value.networkBandwidthGbps = try reader["NetworkBandwidthGbps"].readIfPresent(readingClosure: EC2ClientTypes.NetworkBandwidthGbpsRequest.readingClosure) + value.allowedInstanceTypes = try reader["AllowedInstanceType"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -113763,12 +78558,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceRequirementsWithMetadataRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case architectureTypes = "ArchitectureType" - case instanceRequirements = "InstanceRequirements" - case virtualizationTypes = "VirtualizationType" - } +extension EC2ClientTypes.InstanceRequirementsWithMetadataRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -113801,48 +78591,15 @@ extension EC2ClientTypes.InstanceRequirementsWithMetadataRequest: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.architectureTypes) { - struct KeyVal0{struct item{}} - let architectureTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .architectureTypes) - if let architectureTypesWrappedContainer = architectureTypesWrappedContainer { - let architectureTypesContainer = try architectureTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.ArchitectureType].self, forKey: .member) - var architectureTypesBuffer:[EC2ClientTypes.ArchitectureType]? = nil - if let architectureTypesContainer = architectureTypesContainer { - architectureTypesBuffer = [EC2ClientTypes.ArchitectureType]() - for enumContainer0 in architectureTypesContainer { - architectureTypesBuffer?.append(enumContainer0) - } - } - architectureTypes = architectureTypesBuffer - } else { - architectureTypes = [] - } - } else { - architectureTypes = nil - } - if containerValues.contains(.virtualizationTypes) { - struct KeyVal0{struct item{}} - let virtualizationTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .virtualizationTypes) - if let virtualizationTypesWrappedContainer = virtualizationTypesWrappedContainer { - let virtualizationTypesContainer = try virtualizationTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.VirtualizationType].self, forKey: .member) - var virtualizationTypesBuffer:[EC2ClientTypes.VirtualizationType]? = nil - if let virtualizationTypesContainer = virtualizationTypesContainer { - virtualizationTypesBuffer = [EC2ClientTypes.VirtualizationType]() - for enumContainer0 in virtualizationTypesContainer { - virtualizationTypesBuffer?.append(enumContainer0) - } - } - virtualizationTypes = virtualizationTypesBuffer - } else { - virtualizationTypes = [] - } - } else { - virtualizationTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceRequirementsWithMetadataRequest() + value.architectureTypes = try reader["ArchitectureType"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ArchitectureType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.virtualizationTypes = try reader["VirtualizationType"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VirtualizationType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceRequirements = try reader["InstanceRequirements"].readIfPresent(readingClosure: EC2ClientTypes.InstanceRequirementsRequest.readingClosure) + return value } - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirementsRequest.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded } } @@ -113870,12 +78627,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case excludeBootVolume = "ExcludeBootVolume" - case excludeDataVolumeIds = "ExcludeDataVolumeId" - case instanceId = "InstanceId" - } +extension EC2ClientTypes.InstanceSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -113899,30 +78651,14 @@ extension EC2ClientTypes.InstanceSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let excludeBootVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .excludeBootVolume) - excludeBootVolume = excludeBootVolumeDecoded - if containerValues.contains(.excludeDataVolumeIds) { - struct KeyVal0{struct VolumeId{}} - let excludeDataVolumeIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludeDataVolumeIds) - if let excludeDataVolumeIdsWrappedContainer = excludeDataVolumeIdsWrappedContainer { - let excludeDataVolumeIdsContainer = try excludeDataVolumeIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludeDataVolumeIdsBuffer:[Swift.String]? = nil - if let excludeDataVolumeIdsContainer = excludeDataVolumeIdsContainer { - excludeDataVolumeIdsBuffer = [Swift.String]() - for stringContainer0 in excludeDataVolumeIdsContainer { - excludeDataVolumeIdsBuffer?.append(stringContainer0) - } - } - excludeDataVolumeIds = excludeDataVolumeIdsBuffer - } else { - excludeDataVolumeIds = [] - } - } else { - excludeDataVolumeIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceSpecification() + value.instanceId = try reader["InstanceId"].readIfPresent() + value.excludeBootVolume = try reader["ExcludeBootVolume"].readIfPresent() + value.excludeDataVolumeIds = try reader["ExcludeDataVolumeId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "VolumeId", isFlattened: false) + return value } } } @@ -113952,11 +78688,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceState: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case name = "name" - } +extension EC2ClientTypes.InstanceState: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -113968,12 +78700,14 @@ extension EC2ClientTypes.InstanceState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .code) - code = codeDecoded - let nameDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceStateName.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceState() + value.code = try reader["code"].readIfPresent() + value.name = try reader["name"].readIfPresent() + return value + } } } @@ -114012,12 +78746,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceStateChange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currentState = "currentState" - case instanceId = "instanceId" - case previousState = "previousState" - } +extension EC2ClientTypes.InstanceStateChange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -114032,14 +78761,15 @@ extension EC2ClientTypes.InstanceStateChange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currentStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceState.self, forKey: .currentState) - currentState = currentStateDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let previousStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceState.self, forKey: .previousState) - previousState = previousStateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceStateChange() + value.currentState = try reader["currentState"].readIfPresent(readingClosure: EC2ClientTypes.InstanceState.readingClosure) + value.instanceId = try reader["instanceId"].readIfPresent() + value.previousState = try reader["previousState"].readIfPresent(readingClosure: EC2ClientTypes.InstanceState.readingClosure) + return value + } } } @@ -114111,16 +78841,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case events = "eventsSet" - case instanceId = "instanceId" - case instanceState = "instanceState" - case instanceStatus = "instanceStatus" - case outpostArn = "outpostArn" - case systemStatus = "systemStatus" - } +extension EC2ClientTypes.InstanceStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -114156,39 +78877,19 @@ extension EC2ClientTypes.InstanceStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - if containerValues.contains(.events) { - struct KeyVal0{struct item{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceStatusEvent].self, forKey: .member) - var eventsBuffer:[EC2ClientTypes.InstanceStatusEvent]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [EC2ClientTypes.InstanceStatusEvent]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] - } - } else { - events = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceStatus() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.events = try reader["eventsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceStatusEvent.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceState = try reader["instanceState"].readIfPresent(readingClosure: EC2ClientTypes.InstanceState.readingClosure) + value.instanceStatus = try reader["instanceStatus"].readIfPresent(readingClosure: EC2ClientTypes.InstanceStatusSummary.readingClosure) + value.systemStatus = try reader["systemStatus"].readIfPresent(readingClosure: EC2ClientTypes.InstanceStatusSummary.readingClosure) + return value } - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceState.self, forKey: .instanceState) - instanceState = instanceStateDecoded - let instanceStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceStatusSummary.self, forKey: .instanceStatus) - instanceStatus = instanceStatusDecoded - let systemStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceStatusSummary.self, forKey: .systemStatus) - systemStatus = systemStatusDecoded } } @@ -114232,12 +78933,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceStatusDetails: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case impairedSince = "impairedSince" - case name = "name" - case status = "status" - } +extension EC2ClientTypes.InstanceStatusDetails: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -114252,14 +78948,15 @@ extension EC2ClientTypes.InstanceStatusDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let impairedSinceDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .impairedSince) - impairedSince = impairedSinceDecoded - let nameDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StatusName.self, forKey: .name) - name = nameDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StatusType.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceStatusDetails() + value.impairedSince = try reader["impairedSince"].readTimestampIfPresent(format: .dateTime) + value.name = try reader["name"].readIfPresent() + value.status = try reader["status"].readIfPresent() + return value + } } } @@ -114287,15 +78984,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceStatusEvent: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case description = "description" - case instanceEventId = "instanceEventId" - case notAfter = "notAfter" - case notBefore = "notBefore" - case notBeforeDeadline = "notBeforeDeadline" - } +extension EC2ClientTypes.InstanceStatusEvent: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -114319,20 +79008,18 @@ extension EC2ClientTypes.InstanceStatusEvent: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceEventIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceEventId) - instanceEventId = instanceEventIdDecoded - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EventCode.self, forKey: .code) - code = codeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let notAfterDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .notAfter) - notAfter = notAfterDecoded - let notBeforeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .notBefore) - notBefore = notBeforeDecoded - let notBeforeDeadlineDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .notBeforeDeadline) - notBeforeDeadline = notBeforeDeadlineDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceStatusEvent() + value.instanceEventId = try reader["instanceEventId"].readIfPresent() + value.code = try reader["code"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.notAfter = try reader["notAfter"].readTimestampIfPresent(format: .dateTime) + value.notBefore = try reader["notBefore"].readTimestampIfPresent(format: .dateTime) + value.notBeforeDeadline = try reader["notBeforeDeadline"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -114372,11 +79059,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceStatusSummary: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case details = "details" - case status = "status" - } +extension EC2ClientTypes.InstanceStatusSummary: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -114397,29 +79080,14 @@ extension EC2ClientTypes.InstanceStatusSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.details) { - struct KeyVal0{struct item{}} - let detailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .details) - if let detailsWrappedContainer = detailsWrappedContainer { - let detailsContainer = try detailsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceStatusDetails].self, forKey: .member) - var detailsBuffer:[EC2ClientTypes.InstanceStatusDetails]? = nil - if let detailsContainer = detailsContainer { - detailsBuffer = [EC2ClientTypes.InstanceStatusDetails]() - for structureContainer0 in detailsContainer { - detailsBuffer?.append(structureContainer0) - } - } - details = detailsBuffer - } else { - details = [] - } - } else { - details = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceStatusSummary() + value.details = try reader["details"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceStatusDetails.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.status = try reader["status"].readIfPresent() + return value } - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SummaryStatus.self, forKey: .status) - status = statusDecoded } } @@ -114475,13 +79143,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceStorageInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case disks = "disks" - case encryptionSupport = "encryptionSupport" - case nvmeSupport = "nvmeSupport" - case totalSizeInGB = "totalSizeInGB" - } +extension EC2ClientTypes.InstanceStorageInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -114508,33 +79170,16 @@ extension EC2ClientTypes.InstanceStorageInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let totalSizeInGBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalSizeInGB) - totalSizeInGB = totalSizeInGBDecoded - if containerValues.contains(.disks) { - struct KeyVal0{struct item{}} - let disksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .disks) - if let disksWrappedContainer = disksWrappedContainer { - let disksContainer = try disksWrappedContainer.decodeIfPresent([EC2ClientTypes.DiskInfo].self, forKey: .member) - var disksBuffer:[EC2ClientTypes.DiskInfo]? = nil - if let disksContainer = disksContainer { - disksBuffer = [EC2ClientTypes.DiskInfo]() - for structureContainer0 in disksContainer { - disksBuffer?.append(structureContainer0) - } - } - disks = disksBuffer - } else { - disks = [] - } - } else { - disks = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceStorageInfo() + value.totalSizeInGB = try reader["totalSizeInGB"].readIfPresent() + value.disks = try reader["disks"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DiskInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nvmeSupport = try reader["nvmeSupport"].readIfPresent() + value.encryptionSupport = try reader["encryptionSupport"].readIfPresent() + return value } - let nvmeSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EphemeralNvmeSupport.self, forKey: .nvmeSupport) - nvmeSupport = nvmeSupportDecoded - let encryptionSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceStorageEncryptionSupport.self, forKey: .encryptionSupport) - encryptionSupport = encryptionSupportDecoded } } @@ -114566,11 +79211,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceTagNotificationAttribute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case includeAllTagsOfInstance = "includeAllTagsOfInstance" - case instanceTagKeys = "instanceTagKeySet" - } +extension EC2ClientTypes.InstanceTagNotificationAttribute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -114591,29 +79232,14 @@ extension EC2ClientTypes.InstanceTagNotificationAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceTagKeys) { - struct KeyVal0{struct item{}} - let instanceTagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTagKeys) - if let instanceTagKeysWrappedContainer = instanceTagKeysWrappedContainer { - let instanceTagKeysContainer = try instanceTagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceTagKeysBuffer:[Swift.String]? = nil - if let instanceTagKeysContainer = instanceTagKeysContainer { - instanceTagKeysBuffer = [Swift.String]() - for stringContainer0 in instanceTagKeysContainer { - instanceTagKeysBuffer?.append(stringContainer0) - } - } - instanceTagKeys = instanceTagKeysBuffer - } else { - instanceTagKeys = [] - } - } else { - instanceTagKeys = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceTagNotificationAttribute() + value.instanceTagKeys = try reader["instanceTagKeySet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.includeAllTagsOfInstance = try reader["includeAllTagsOfInstance"].readIfPresent() + return value } - let includeAllTagsOfInstanceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeAllTagsOfInstance) - includeAllTagsOfInstance = includeAllTagsOfInstanceDecoded } } @@ -114637,15 +79263,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceTopology: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case groupName = "groupName" - case instanceId = "instanceId" - case instanceType = "instanceType" - case networkNodes = "networkNodeSet" - case zoneId = "zoneId" - } +extension EC2ClientTypes.InstanceTopology: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -114678,37 +79296,18 @@ extension EC2ClientTypes.InstanceTopology: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - if containerValues.contains(.networkNodes) { - struct KeyVal0{struct item{}} - let networkNodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkNodes) - if let networkNodesWrappedContainer = networkNodesWrappedContainer { - let networkNodesContainer = try networkNodesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkNodesBuffer:[Swift.String]? = nil - if let networkNodesContainer = networkNodesContainer { - networkNodesBuffer = [Swift.String]() - for stringContainer0 in networkNodesContainer { - networkNodesBuffer?.append(stringContainer0) - } - } - networkNodes = networkNodesBuffer - } else { - networkNodes = [] - } - } else { - networkNodes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceTopology() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.networkNodes = try reader["networkNodeSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.zoneId = try reader["zoneId"].readIfPresent() + return value } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let zoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .zoneId) - zoneId = zoneIdDecoded } } @@ -117155,36 +81754,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InstanceTypeInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoRecoverySupported = "autoRecoverySupported" - case bareMetal = "bareMetal" - case burstablePerformanceSupported = "burstablePerformanceSupported" - case currentGeneration = "currentGeneration" - case dedicatedHostsSupported = "dedicatedHostsSupported" - case ebsInfo = "ebsInfo" - case fpgaInfo = "fpgaInfo" - case freeTierEligible = "freeTierEligible" - case gpuInfo = "gpuInfo" - case hibernationSupported = "hibernationSupported" - case hypervisor = "hypervisor" - case inferenceAcceleratorInfo = "inferenceAcceleratorInfo" - case instanceStorageInfo = "instanceStorageInfo" - case instanceStorageSupported = "instanceStorageSupported" - case instanceType = "instanceType" - case memoryInfo = "memoryInfo" - case networkInfo = "networkInfo" - case nitroEnclavesSupport = "nitroEnclavesSupport" - case nitroTpmInfo = "nitroTpmInfo" - case nitroTpmSupport = "nitroTpmSupport" - case placementGroupInfo = "placementGroupInfo" - case processorInfo = "processorInfo" - case supportedBootModes = "supportedBootModes" - case supportedRootDeviceTypes = "supportedRootDeviceTypes" - case supportedUsageClasses = "supportedUsageClasses" - case supportedVirtualizationTypes = "supportedVirtualizationTypes" - case vCpuInfo = "vCpuInfo" - } +extension EC2ClientTypes.InstanceTypeInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -117307,130 +81877,39 @@ extension EC2ClientTypes.InstanceTypeInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let currentGenerationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .currentGeneration) - currentGeneration = currentGenerationDecoded - let freeTierEligibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .freeTierEligible) - freeTierEligible = freeTierEligibleDecoded - if containerValues.contains(.supportedUsageClasses) { - struct KeyVal0{struct item{}} - let supportedUsageClassesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedUsageClasses) - if let supportedUsageClassesWrappedContainer = supportedUsageClassesWrappedContainer { - let supportedUsageClassesContainer = try supportedUsageClassesWrappedContainer.decodeIfPresent([EC2ClientTypes.UsageClassType].self, forKey: .member) - var supportedUsageClassesBuffer:[EC2ClientTypes.UsageClassType]? = nil - if let supportedUsageClassesContainer = supportedUsageClassesContainer { - supportedUsageClassesBuffer = [EC2ClientTypes.UsageClassType]() - for enumContainer0 in supportedUsageClassesContainer { - supportedUsageClassesBuffer?.append(enumContainer0) - } - } - supportedUsageClasses = supportedUsageClassesBuffer - } else { - supportedUsageClasses = [] - } - } else { - supportedUsageClasses = nil - } - if containerValues.contains(.supportedRootDeviceTypes) { - struct KeyVal0{struct item{}} - let supportedRootDeviceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedRootDeviceTypes) - if let supportedRootDeviceTypesWrappedContainer = supportedRootDeviceTypesWrappedContainer { - let supportedRootDeviceTypesContainer = try supportedRootDeviceTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.RootDeviceType].self, forKey: .member) - var supportedRootDeviceTypesBuffer:[EC2ClientTypes.RootDeviceType]? = nil - if let supportedRootDeviceTypesContainer = supportedRootDeviceTypesContainer { - supportedRootDeviceTypesBuffer = [EC2ClientTypes.RootDeviceType]() - for enumContainer0 in supportedRootDeviceTypesContainer { - supportedRootDeviceTypesBuffer?.append(enumContainer0) - } - } - supportedRootDeviceTypes = supportedRootDeviceTypesBuffer - } else { - supportedRootDeviceTypes = [] - } - } else { - supportedRootDeviceTypes = nil - } - if containerValues.contains(.supportedVirtualizationTypes) { - struct KeyVal0{struct item{}} - let supportedVirtualizationTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedVirtualizationTypes) - if let supportedVirtualizationTypesWrappedContainer = supportedVirtualizationTypesWrappedContainer { - let supportedVirtualizationTypesContainer = try supportedVirtualizationTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.VirtualizationType].self, forKey: .member) - var supportedVirtualizationTypesBuffer:[EC2ClientTypes.VirtualizationType]? = nil - if let supportedVirtualizationTypesContainer = supportedVirtualizationTypesContainer { - supportedVirtualizationTypesBuffer = [EC2ClientTypes.VirtualizationType]() - for enumContainer0 in supportedVirtualizationTypesContainer { - supportedVirtualizationTypesBuffer?.append(enumContainer0) - } - } - supportedVirtualizationTypes = supportedVirtualizationTypesBuffer - } else { - supportedVirtualizationTypes = [] - } - } else { - supportedVirtualizationTypes = nil - } - let bareMetalDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .bareMetal) - bareMetal = bareMetalDecoded - let hypervisorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceTypeHypervisor.self, forKey: .hypervisor) - hypervisor = hypervisorDecoded - let processorInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ProcessorInfo.self, forKey: .processorInfo) - processorInfo = processorInfoDecoded - let vCpuInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VCpuInfo.self, forKey: .vCpuInfo) - vCpuInfo = vCpuInfoDecoded - let memoryInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MemoryInfo.self, forKey: .memoryInfo) - memoryInfo = memoryInfoDecoded - let instanceStorageSupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .instanceStorageSupported) - instanceStorageSupported = instanceStorageSupportedDecoded - let instanceStorageInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceStorageInfo.self, forKey: .instanceStorageInfo) - instanceStorageInfo = instanceStorageInfoDecoded - let ebsInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EbsInfo.self, forKey: .ebsInfo) - ebsInfo = ebsInfoDecoded - let networkInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInfo.self, forKey: .networkInfo) - networkInfo = networkInfoDecoded - let gpuInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.GpuInfo.self, forKey: .gpuInfo) - gpuInfo = gpuInfoDecoded - let fpgaInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FpgaInfo.self, forKey: .fpgaInfo) - fpgaInfo = fpgaInfoDecoded - let placementGroupInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlacementGroupInfo.self, forKey: .placementGroupInfo) - placementGroupInfo = placementGroupInfoDecoded - let inferenceAcceleratorInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InferenceAcceleratorInfo.self, forKey: .inferenceAcceleratorInfo) - inferenceAcceleratorInfo = inferenceAcceleratorInfoDecoded - let hibernationSupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .hibernationSupported) - hibernationSupported = hibernationSupportedDecoded - let burstablePerformanceSupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .burstablePerformanceSupported) - burstablePerformanceSupported = burstablePerformanceSupportedDecoded - let dedicatedHostsSupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedHostsSupported) - dedicatedHostsSupported = dedicatedHostsSupportedDecoded - let autoRecoverySupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoRecoverySupported) - autoRecoverySupported = autoRecoverySupportedDecoded - if containerValues.contains(.supportedBootModes) { - struct KeyVal0{struct item{}} - let supportedBootModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedBootModes) - if let supportedBootModesWrappedContainer = supportedBootModesWrappedContainer { - let supportedBootModesContainer = try supportedBootModesWrappedContainer.decodeIfPresent([EC2ClientTypes.BootModeType].self, forKey: .member) - var supportedBootModesBuffer:[EC2ClientTypes.BootModeType]? = nil - if let supportedBootModesContainer = supportedBootModesContainer { - supportedBootModesBuffer = [EC2ClientTypes.BootModeType]() - for enumContainer0 in supportedBootModesContainer { - supportedBootModesBuffer?.append(enumContainer0) - } - } - supportedBootModes = supportedBootModesBuffer - } else { - supportedBootModes = [] - } - } else { - supportedBootModes = nil - } - let nitroEnclavesSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NitroEnclavesSupport.self, forKey: .nitroEnclavesSupport) - nitroEnclavesSupport = nitroEnclavesSupportDecoded - let nitroTpmSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NitroTpmSupport.self, forKey: .nitroTpmSupport) - nitroTpmSupport = nitroTpmSupportDecoded - let nitroTpmInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NitroTpmInfo.self, forKey: .nitroTpmInfo) - nitroTpmInfo = nitroTpmInfoDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceTypeInfo() + value.instanceType = try reader["instanceType"].readIfPresent() + value.currentGeneration = try reader["currentGeneration"].readIfPresent() + value.freeTierEligible = try reader["freeTierEligible"].readIfPresent() + value.supportedUsageClasses = try reader["supportedUsageClasses"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UsageClassType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.supportedRootDeviceTypes = try reader["supportedRootDeviceTypes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RootDeviceType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.supportedVirtualizationTypes = try reader["supportedVirtualizationTypes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VirtualizationType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.bareMetal = try reader["bareMetal"].readIfPresent() + value.hypervisor = try reader["hypervisor"].readIfPresent() + value.processorInfo = try reader["processorInfo"].readIfPresent(readingClosure: EC2ClientTypes.ProcessorInfo.readingClosure) + value.vCpuInfo = try reader["vCpuInfo"].readIfPresent(readingClosure: EC2ClientTypes.VCpuInfo.readingClosure) + value.memoryInfo = try reader["memoryInfo"].readIfPresent(readingClosure: EC2ClientTypes.MemoryInfo.readingClosure) + value.instanceStorageSupported = try reader["instanceStorageSupported"].readIfPresent() + value.instanceStorageInfo = try reader["instanceStorageInfo"].readIfPresent(readingClosure: EC2ClientTypes.InstanceStorageInfo.readingClosure) + value.ebsInfo = try reader["ebsInfo"].readIfPresent(readingClosure: EC2ClientTypes.EbsInfo.readingClosure) + value.networkInfo = try reader["networkInfo"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInfo.readingClosure) + value.gpuInfo = try reader["gpuInfo"].readIfPresent(readingClosure: EC2ClientTypes.GpuInfo.readingClosure) + value.fpgaInfo = try reader["fpgaInfo"].readIfPresent(readingClosure: EC2ClientTypes.FpgaInfo.readingClosure) + value.placementGroupInfo = try reader["placementGroupInfo"].readIfPresent(readingClosure: EC2ClientTypes.PlacementGroupInfo.readingClosure) + value.inferenceAcceleratorInfo = try reader["inferenceAcceleratorInfo"].readIfPresent(readingClosure: EC2ClientTypes.InferenceAcceleratorInfo.readingClosure) + value.hibernationSupported = try reader["hibernationSupported"].readIfPresent() + value.burstablePerformanceSupported = try reader["burstablePerformanceSupported"].readIfPresent() + value.dedicatedHostsSupported = try reader["dedicatedHostsSupported"].readIfPresent() + value.autoRecoverySupported = try reader["autoRecoverySupported"].readIfPresent() + value.supportedBootModes = try reader["supportedBootModes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.BootModeType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nitroEnclavesSupport = try reader["nitroEnclavesSupport"].readIfPresent() + value.nitroTpmSupport = try reader["nitroTpmSupport"].readIfPresent() + value.nitroTpmInfo = try reader["nitroTpmInfo"].readIfPresent(readingClosure: EC2ClientTypes.NitroTpmInfo.readingClosure) + return value + } } } @@ -117554,10 +82033,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceType = "instanceType" - } +extension EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -117566,10 +82042,13 @@ extension EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceTypeInfoFromInstanceRequirements() + value.instanceType = try reader["instanceType"].readIfPresent() + return value + } } } @@ -117589,12 +82068,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceTypeOffering: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceType = "instanceType" - case location = "location" - case locationType = "locationType" - } +extension EC2ClientTypes.InstanceTypeOffering: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -117609,14 +82083,15 @@ extension EC2ClientTypes.InstanceTypeOffering: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let locationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocationType.self, forKey: .locationType) - locationType = locationTypeDecoded - let locationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .location) - location = locationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceTypeOffering() + value.instanceType = try reader["instanceType"].readIfPresent() + value.locationType = try reader["locationType"].readIfPresent() + value.location = try reader["location"].readIfPresent() + return value + } } } @@ -117644,11 +82119,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InstanceUsage: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "accountId" - case usedInstanceCount = "usedInstanceCount" - } +extension EC2ClientTypes.InstanceUsage: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -117660,12 +82131,14 @@ extension EC2ClientTypes.InstanceUsage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let usedInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .usedInstanceCount) - usedInstanceCount = usedInstanceCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InstanceUsage() + value.accountId = try reader["accountId"].readIfPresent() + value.usedInstanceCount = try reader["usedInstanceCount"].readIfPresent() + return value + } } } @@ -117689,10 +82162,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IntegrateServices: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case athenaIntegrations = "AthenaIntegration" - } +extension EC2ClientTypes.IntegrateServices: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -117710,26 +82180,12 @@ extension EC2ClientTypes.IntegrateServices: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.athenaIntegrations) { - struct KeyVal0{struct item{}} - let athenaIntegrationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .athenaIntegrations) - if let athenaIntegrationsWrappedContainer = athenaIntegrationsWrappedContainer { - let athenaIntegrationsContainer = try athenaIntegrationsWrappedContainer.decodeIfPresent([EC2ClientTypes.AthenaIntegration].self, forKey: .member) - var athenaIntegrationsBuffer:[EC2ClientTypes.AthenaIntegration]? = nil - if let athenaIntegrationsContainer = athenaIntegrationsContainer { - athenaIntegrationsBuffer = [EC2ClientTypes.AthenaIntegration]() - for structureContainer0 in athenaIntegrationsContainer { - athenaIntegrationsBuffer?.append(structureContainer0) - } - } - athenaIntegrations = athenaIntegrationsBuffer - } else { - athenaIntegrations = [] - } - } else { - athenaIntegrations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IntegrateServices() + value.athenaIntegrations = try reader["AthenaIntegration"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AthenaIntegration.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -117814,13 +82270,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.InternetGateway: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachments = "attachmentSet" - case internetGatewayId = "internetGatewayId" - case ownerId = "ownerId" - case tags = "tagSet" - } +extension EC2ClientTypes.InternetGateway: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -117856,49 +82306,15 @@ extension EC2ClientTypes.InternetGateway: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.attachments) { - struct KeyVal0{struct item{}} - let attachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachments) - if let attachmentsWrappedContainer = attachmentsWrappedContainer { - let attachmentsContainer = try attachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.InternetGatewayAttachment].self, forKey: .member) - var attachmentsBuffer:[EC2ClientTypes.InternetGatewayAttachment]? = nil - if let attachmentsContainer = attachmentsContainer { - attachmentsBuffer = [EC2ClientTypes.InternetGatewayAttachment]() - for structureContainer0 in attachmentsContainer { - attachmentsBuffer?.append(structureContainer0) - } - } - attachments = attachmentsBuffer - } else { - attachments = [] - } - } else { - attachments = nil - } - let internetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .internetGatewayId) - internetGatewayId = internetGatewayIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InternetGateway() + value.attachments = try reader["attachmentSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InternetGatewayAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.internetGatewayId = try reader["internetGatewayId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -117931,11 +82347,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.InternetGatewayAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case vpcId = "vpcId" - } +extension EC2ClientTypes.InternetGatewayAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -117947,12 +82359,14 @@ extension EC2ClientTypes.InternetGatewayAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttachmentStatus.self, forKey: .state) - state = stateDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.InternetGatewayAttachment() + value.state = try reader["state"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + return value + } } } @@ -118011,16 +82425,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpPermission: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fromPort = "fromPort" - case ipProtocol = "ipProtocol" - case ipRanges = "ipRanges" - case ipv6Ranges = "ipv6Ranges" - case prefixListIds = "prefixListIds" - case toPort = "toPort" - case userIdGroupPairs = "groups" - } +extension EC2ClientTypes.IpPermission: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -118083,89 +82488,18 @@ extension EC2ClientTypes.IpPermission: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let ipProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipProtocol) - ipProtocol = ipProtocolDecoded - if containerValues.contains(.ipRanges) { - struct KeyVal0{struct item{}} - let ipRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipRanges) - if let ipRangesWrappedContainer = ipRangesWrappedContainer { - let ipRangesContainer = try ipRangesWrappedContainer.decodeIfPresent([EC2ClientTypes.IpRange].self, forKey: .member) - var ipRangesBuffer:[EC2ClientTypes.IpRange]? = nil - if let ipRangesContainer = ipRangesContainer { - ipRangesBuffer = [EC2ClientTypes.IpRange]() - for structureContainer0 in ipRangesContainer { - ipRangesBuffer?.append(structureContainer0) - } - } - ipRanges = ipRangesBuffer - } else { - ipRanges = [] - } - } else { - ipRanges = nil - } - if containerValues.contains(.ipv6Ranges) { - struct KeyVal0{struct item{}} - let ipv6RangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Ranges) - if let ipv6RangesWrappedContainer = ipv6RangesWrappedContainer { - let ipv6RangesContainer = try ipv6RangesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6Range].self, forKey: .member) - var ipv6RangesBuffer:[EC2ClientTypes.Ipv6Range]? = nil - if let ipv6RangesContainer = ipv6RangesContainer { - ipv6RangesBuffer = [EC2ClientTypes.Ipv6Range]() - for structureContainer0 in ipv6RangesContainer { - ipv6RangesBuffer?.append(structureContainer0) - } - } - ipv6Ranges = ipv6RangesBuffer - } else { - ipv6Ranges = [] - } - } else { - ipv6Ranges = nil - } - if containerValues.contains(.prefixListIds) { - struct KeyVal0{struct item{}} - let prefixListIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .prefixListIds) - if let prefixListIdsWrappedContainer = prefixListIdsWrappedContainer { - let prefixListIdsContainer = try prefixListIdsWrappedContainer.decodeIfPresent([EC2ClientTypes.PrefixListId].self, forKey: .member) - var prefixListIdsBuffer:[EC2ClientTypes.PrefixListId]? = nil - if let prefixListIdsContainer = prefixListIdsContainer { - prefixListIdsBuffer = [EC2ClientTypes.PrefixListId]() - for structureContainer0 in prefixListIdsContainer { - prefixListIdsBuffer?.append(structureContainer0) - } - } - prefixListIds = prefixListIdsBuffer - } else { - prefixListIds = [] - } - } else { - prefixListIds = nil - } - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded - if containerValues.contains(.userIdGroupPairs) { - struct KeyVal0{struct item{}} - let userIdGroupPairsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIdGroupPairs) - if let userIdGroupPairsWrappedContainer = userIdGroupPairsWrappedContainer { - let userIdGroupPairsContainer = try userIdGroupPairsWrappedContainer.decodeIfPresent([EC2ClientTypes.UserIdGroupPair].self, forKey: .member) - var userIdGroupPairsBuffer:[EC2ClientTypes.UserIdGroupPair]? = nil - if let userIdGroupPairsContainer = userIdGroupPairsContainer { - userIdGroupPairsBuffer = [EC2ClientTypes.UserIdGroupPair]() - for structureContainer0 in userIdGroupPairsContainer { - userIdGroupPairsBuffer?.append(structureContainer0) - } - } - userIdGroupPairs = userIdGroupPairsBuffer - } else { - userIdGroupPairs = [] - } - } else { - userIdGroupPairs = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpPermission() + value.fromPort = try reader["fromPort"].readIfPresent() + value.ipProtocol = try reader["ipProtocol"].readIfPresent() + value.ipRanges = try reader["ipRanges"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv6Ranges = try reader["ipv6Ranges"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv6Range.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.prefixListIds = try reader["prefixListIds"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrefixListId.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.toPort = try reader["toPort"].readIfPresent() + value.userIdGroupPairs = try reader["groups"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UserIdGroupPair.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -118210,11 +82544,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpRange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrIp = "cidrIp" - case description = "description" - } +extension EC2ClientTypes.IpRange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -118226,12 +82556,14 @@ extension EC2ClientTypes.IpRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIp) - cidrIp = cidrIpDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpRange() + value.cidrIp = try reader["cidrIp"].readIfPresent() + value.description = try reader["description"].readIfPresent() + return value + } } } @@ -118255,25 +82587,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipam: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case defaultResourceDiscoveryAssociationId = "defaultResourceDiscoveryAssociationId" - case defaultResourceDiscoveryId = "defaultResourceDiscoveryId" - case description = "description" - case ipamArn = "ipamArn" - case ipamId = "ipamId" - case ipamRegion = "ipamRegion" - case operatingRegions = "operatingRegionSet" - case ownerId = "ownerId" - case privateDefaultScopeId = "privateDefaultScopeId" - case publicDefaultScopeId = "publicDefaultScopeId" - case resourceDiscoveryAssociationCount = "resourceDiscoveryAssociationCount" - case scopeCount = "scopeCount" - case state = "state" - case stateMessage = "stateMessage" - case tags = "tagSet" - case tier = "tier" - } +extension EC2ClientTypes.Ipam: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -118345,74 +82659,28 @@ extension EC2ClientTypes.Ipam: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let ipamArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamArn) - ipamArn = ipamArnDecoded - let ipamRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamRegion) - ipamRegion = ipamRegionDecoded - let publicDefaultScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicDefaultScopeId) - publicDefaultScopeId = publicDefaultScopeIdDecoded - let privateDefaultScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDefaultScopeId) - privateDefaultScopeId = privateDefaultScopeIdDecoded - let scopeCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .scopeCount) - scopeCount = scopeCountDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.operatingRegions) { - struct KeyVal0{struct item{}} - let operatingRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .operatingRegions) - if let operatingRegionsWrappedContainer = operatingRegionsWrappedContainer { - let operatingRegionsContainer = try operatingRegionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamOperatingRegion].self, forKey: .member) - var operatingRegionsBuffer:[EC2ClientTypes.IpamOperatingRegion]? = nil - if let operatingRegionsContainer = operatingRegionsContainer { - operatingRegionsBuffer = [EC2ClientTypes.IpamOperatingRegion]() - for structureContainer0 in operatingRegionsContainer { - operatingRegionsBuffer?.append(structureContainer0) - } - } - operatingRegions = operatingRegionsBuffer - } else { - operatingRegions = [] - } - } else { - operatingRegions = nil - } - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let defaultResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultResourceDiscoveryId) - defaultResourceDiscoveryId = defaultResourceDiscoveryIdDecoded - let defaultResourceDiscoveryAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultResourceDiscoveryAssociationId) - defaultResourceDiscoveryAssociationId = defaultResourceDiscoveryAssociationIdDecoded - let resourceDiscoveryAssociationCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .resourceDiscoveryAssociationCount) - resourceDiscoveryAssociationCount = resourceDiscoveryAssociationCountDecoded - let stateMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateMessage) - stateMessage = stateMessageDecoded - let tierDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamTier.self, forKey: .tier) - tier = tierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipam() + value.ownerId = try reader["ownerId"].readIfPresent() + value.ipamId = try reader["ipamId"].readIfPresent() + value.ipamArn = try reader["ipamArn"].readIfPresent() + value.ipamRegion = try reader["ipamRegion"].readIfPresent() + value.publicDefaultScopeId = try reader["publicDefaultScopeId"].readIfPresent() + value.privateDefaultScopeId = try reader["privateDefaultScopeId"].readIfPresent() + value.scopeCount = try reader["scopeCount"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.operatingRegions = try reader["operatingRegionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamOperatingRegion.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.defaultResourceDiscoveryId = try reader["defaultResourceDiscoveryId"].readIfPresent() + value.defaultResourceDiscoveryAssociationId = try reader["defaultResourceDiscoveryAssociationId"].readIfPresent() + value.resourceDiscoveryAssociationCount = try reader["resourceDiscoveryAssociationCount"].readIfPresent() + value.stateMessage = try reader["stateMessage"].readIfPresent() + value.tier = try reader["tier"].readIfPresent() + return value + } } } @@ -118492,20 +82760,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamAddressHistoryRecord: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceCidr = "resourceCidr" - case resourceComplianceStatus = "resourceComplianceStatus" - case resourceId = "resourceId" - case resourceName = "resourceName" - case resourceOverlapStatus = "resourceOverlapStatus" - case resourceOwnerId = "resourceOwnerId" - case resourceRegion = "resourceRegion" - case resourceType = "resourceType" - case sampledEndTime = "sampledEndTime" - case sampledStartTime = "sampledStartTime" - case vpcId = "vpcId" - } +extension EC2ClientTypes.IpamAddressHistoryRecord: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -118544,30 +82799,23 @@ extension EC2ClientTypes.IpamAddressHistoryRecord: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwnerId) - resourceOwnerId = resourceOwnerIdDecoded - let resourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceRegion) - resourceRegion = resourceRegionDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamAddressHistoryResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceCidr) - resourceCidr = resourceCidrDecoded - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - let resourceComplianceStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamComplianceStatus.self, forKey: .resourceComplianceStatus) - resourceComplianceStatus = resourceComplianceStatusDecoded - let resourceOverlapStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamOverlapStatus.self, forKey: .resourceOverlapStatus) - resourceOverlapStatus = resourceOverlapStatusDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let sampledStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .sampledStartTime) - sampledStartTime = sampledStartTimeDecoded - let sampledEndTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .sampledEndTime) - sampledEndTime = sampledEndTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamAddressHistoryRecord() + value.resourceOwnerId = try reader["resourceOwnerId"].readIfPresent() + value.resourceRegion = try reader["resourceRegion"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceCidr = try reader["resourceCidr"].readIfPresent() + value.resourceName = try reader["resourceName"].readIfPresent() + value.resourceComplianceStatus = try reader["resourceComplianceStatus"].readIfPresent() + value.resourceOverlapStatus = try reader["resourceOverlapStatus"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.sampledStartTime = try reader["sampledStartTime"].readTimestampIfPresent(format: .dateTime) + value.sampledEndTime = try reader["sampledEndTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -118700,11 +82948,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamCidrAuthorizationContext: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - case signature = "Signature" - } +extension EC2ClientTypes.IpamCidrAuthorizationContext: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -118716,12 +82960,14 @@ extension EC2ClientTypes.IpamCidrAuthorizationContext: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let signatureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .signature) - signature = signatureDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamCidrAuthorizationContext() + value.message = try reader["Message"].readIfPresent() + value.signature = try reader["Signature"].readIfPresent() + return value + } } } @@ -118783,14 +83029,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamDiscoveredAccount: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "accountId" - case discoveryRegion = "discoveryRegion" - case failureReason = "failureReason" - case lastAttemptedDiscoveryTime = "lastAttemptedDiscoveryTime" - case lastSuccessfulDiscoveryTime = "lastSuccessfulDiscoveryTime" - } +extension EC2ClientTypes.IpamDiscoveredAccount: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -118811,18 +83050,17 @@ extension EC2ClientTypes.IpamDiscoveredAccount: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let discoveryRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .discoveryRegion) - discoveryRegion = discoveryRegionDecoded - let failureReasonDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamDiscoveryFailureReason.self, forKey: .failureReason) - failureReason = failureReasonDecoded - let lastAttemptedDiscoveryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastAttemptedDiscoveryTime) - lastAttemptedDiscoveryTime = lastAttemptedDiscoveryTimeDecoded - let lastSuccessfulDiscoveryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastSuccessfulDiscoveryTime) - lastSuccessfulDiscoveryTime = lastSuccessfulDiscoveryTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamDiscoveredAccount() + value.accountId = try reader["accountId"].readIfPresent() + value.discoveryRegion = try reader["discoveryRegion"].readIfPresent() + value.failureReason = try reader["failureReason"].readIfPresent(readingClosure: EC2ClientTypes.IpamDiscoveryFailureReason.readingClosure) + value.lastAttemptedDiscoveryTime = try reader["lastAttemptedDiscoveryTime"].readTimestampIfPresent(format: .dateTime) + value.lastSuccessfulDiscoveryTime = try reader["lastSuccessfulDiscoveryTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -118858,28 +83096,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamDiscoveredPublicAddress: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "address" - case addressAllocationId = "addressAllocationId" - case addressOwnerId = "addressOwnerId" - case addressRegion = "addressRegion" - case addressType = "addressType" - case associationStatus = "associationStatus" - case instanceId = "instanceId" - case ipamResourceDiscoveryId = "ipamResourceDiscoveryId" - case networkBorderGroup = "networkBorderGroup" - case networkInterfaceDescription = "networkInterfaceDescription" - case networkInterfaceId = "networkInterfaceId" - case publicIpv4PoolId = "publicIpv4PoolId" - case sampleTime = "sampleTime" - case securityGroups = "securityGroupSet" - case service = "service" - case serviceResource = "serviceResource" - case subnetId = "subnetId" - case tags = "tags" - case vpcId = "vpcId" - } +extension EC2ClientTypes.IpamDiscoveredPublicAddress: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -118951,63 +83168,31 @@ extension EC2ClientTypes.IpamDiscoveredPublicAddress: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - let addressRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressRegion) - addressRegion = addressRegionDecoded - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let addressOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressOwnerId) - addressOwnerId = addressOwnerIdDecoded - let addressAllocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressAllocationId) - addressAllocationId = addressAllocationIdDecoded - let associationStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPublicAddressAssociationStatus.self, forKey: .associationStatus) - associationStatus = associationStatusDecoded - let addressTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPublicAddressType.self, forKey: .addressType) - addressType = addressTypeDecoded - let serviceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPublicAddressAwsService.self, forKey: .service) - service = serviceDecoded - let serviceResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceResource) - serviceResource = serviceResourceDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let publicIpv4PoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIpv4PoolId) - publicIpv4PoolId = publicIpv4PoolIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let networkInterfaceDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceDescription) - networkInterfaceDescription = networkInterfaceDescriptionDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let tagsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPublicAddressTags.self, forKey: .tags) - tags = tagsDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamPublicAddressSecurityGroup].self, forKey: .member) - var securityGroupsBuffer:[EC2ClientTypes.IpamPublicAddressSecurityGroup]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [EC2ClientTypes.IpamPublicAddressSecurityGroup]() - for structureContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(structureContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let sampleTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .sampleTime) - sampleTime = sampleTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamDiscoveredPublicAddress() + value.ipamResourceDiscoveryId = try reader["ipamResourceDiscoveryId"].readIfPresent() + value.addressRegion = try reader["addressRegion"].readIfPresent() + value.address = try reader["address"].readIfPresent() + value.addressOwnerId = try reader["addressOwnerId"].readIfPresent() + value.addressAllocationId = try reader["addressAllocationId"].readIfPresent() + value.associationStatus = try reader["associationStatus"].readIfPresent() + value.addressType = try reader["addressType"].readIfPresent() + value.service = try reader["service"].readIfPresent() + value.serviceResource = try reader["serviceResource"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.publicIpv4PoolId = try reader["publicIpv4PoolId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.networkInterfaceDescription = try reader["networkInterfaceDescription"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.tags = try reader["tags"].readIfPresent(readingClosure: EC2ClientTypes.IpamPublicAddressTags.readingClosure) + value.networkBorderGroup = try reader["networkBorderGroup"].readIfPresent() + value.securityGroups = try reader["securityGroupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamPublicAddressSecurityGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sampleTime = try reader["sampleTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -119099,19 +83284,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamDiscoveredResourceCidr: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipUsage = "ipUsage" - case ipamResourceDiscoveryId = "ipamResourceDiscoveryId" - case resourceCidr = "resourceCidr" - case resourceId = "resourceId" - case resourceOwnerId = "resourceOwnerId" - case resourceRegion = "resourceRegion" - case resourceTags = "resourceTagSet" - case resourceType = "resourceType" - case sampleTime = "sampleTime" - case vpcId = "vpcId" - } +extension EC2ClientTypes.IpamDiscoveredResourceCidr: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -119156,45 +83329,22 @@ extension EC2ClientTypes.IpamDiscoveredResourceCidr: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - let resourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceRegion) - resourceRegion = resourceRegionDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwnerId) - resourceOwnerId = resourceOwnerIdDecoded - let resourceCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceCidr) - resourceCidr = resourceCidrDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - if containerValues.contains(.resourceTags) { - struct KeyVal0{struct item{}} - let resourceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTags) - if let resourceTagsWrappedContainer = resourceTagsWrappedContainer { - let resourceTagsContainer = try resourceTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamResourceTag].self, forKey: .member) - var resourceTagsBuffer:[EC2ClientTypes.IpamResourceTag]? = nil - if let resourceTagsContainer = resourceTagsContainer { - resourceTagsBuffer = [EC2ClientTypes.IpamResourceTag]() - for structureContainer0 in resourceTagsContainer { - resourceTagsBuffer?.append(structureContainer0) - } - } - resourceTags = resourceTagsBuffer - } else { - resourceTags = [] - } - } else { - resourceTags = nil - } - let ipUsageDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .ipUsage) - ipUsage = ipUsageDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let sampleTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .sampleTime) - sampleTime = sampleTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamDiscoveredResourceCidr() + value.ipamResourceDiscoveryId = try reader["ipamResourceDiscoveryId"].readIfPresent() + value.resourceRegion = try reader["resourceRegion"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceOwnerId = try reader["resourceOwnerId"].readIfPresent() + value.resourceCidr = try reader["resourceCidr"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceTags = try reader["resourceTagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamResourceTag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipUsage = try reader["ipUsage"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.sampleTime = try reader["sampleTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -119291,11 +83441,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamDiscoveryFailureReason: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.IpamDiscoveryFailureReason: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -119307,12 +83453,14 @@ extension EC2ClientTypes.IpamDiscoveryFailureReason: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamDiscoveryFailureCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamDiscoveryFailureReason() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -119386,10 +83534,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamOperatingRegion: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case regionName = "regionName" - } +extension EC2ClientTypes.IpamOperatingRegion: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -119398,10 +83543,13 @@ extension EC2ClientTypes.IpamOperatingRegion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .regionName) - regionName = regionNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamOperatingRegion() + value.regionName = try reader["regionName"].readIfPresent() + return value + } } } @@ -119456,33 +83604,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamPool: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressFamily = "addressFamily" - case allocationDefaultNetmaskLength = "allocationDefaultNetmaskLength" - case allocationMaxNetmaskLength = "allocationMaxNetmaskLength" - case allocationMinNetmaskLength = "allocationMinNetmaskLength" - case allocationResourceTags = "allocationResourceTagSet" - case autoImport = "autoImport" - case awsService = "awsService" - case description = "description" - case ipamArn = "ipamArn" - case ipamPoolArn = "ipamPoolArn" - case ipamPoolId = "ipamPoolId" - case ipamRegion = "ipamRegion" - case ipamScopeArn = "ipamScopeArn" - case ipamScopeType = "ipamScopeType" - case locale = "locale" - case ownerId = "ownerId" - case poolDepth = "poolDepth" - case publicIpSource = "publicIpSource" - case publiclyAdvertisable = "publiclyAdvertisable" - case sourceIpamPoolId = "sourceIpamPoolId" - case sourceResource = "sourceResource" - case state = "state" - case stateMessage = "stateMessage" - case tags = "tagSet" - } +extension EC2ClientTypes.IpamPool: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -119578,90 +83700,36 @@ extension EC2ClientTypes.IpamPool: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let sourceIpamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIpamPoolId) - sourceIpamPoolId = sourceIpamPoolIdDecoded - let ipamPoolArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolArn) - ipamPoolArn = ipamPoolArnDecoded - let ipamScopeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeArn) - ipamScopeArn = ipamScopeArnDecoded - let ipamScopeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamScopeType.self, forKey: .ipamScopeType) - ipamScopeType = ipamScopeTypeDecoded - let ipamArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamArn) - ipamArn = ipamArnDecoded - let ipamRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamRegion) - ipamRegion = ipamRegionDecoded - let localeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locale) - locale = localeDecoded - let poolDepthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .poolDepth) - poolDepth = poolDepthDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolState.self, forKey: .state) - state = stateDecoded - let stateMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateMessage) - stateMessage = stateMessageDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let autoImportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoImport) - autoImport = autoImportDecoded - let publiclyAdvertisableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAdvertisable) - publiclyAdvertisable = publiclyAdvertisableDecoded - let addressFamilyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressFamily.self, forKey: .addressFamily) - addressFamily = addressFamilyDecoded - let allocationMinNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationMinNetmaskLength) - allocationMinNetmaskLength = allocationMinNetmaskLengthDecoded - let allocationMaxNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationMaxNetmaskLength) - allocationMaxNetmaskLength = allocationMaxNetmaskLengthDecoded - let allocationDefaultNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationDefaultNetmaskLength) - allocationDefaultNetmaskLength = allocationDefaultNetmaskLengthDecoded - if containerValues.contains(.allocationResourceTags) { - struct KeyVal0{struct item{}} - let allocationResourceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allocationResourceTags) - if let allocationResourceTagsWrappedContainer = allocationResourceTagsWrappedContainer { - let allocationResourceTagsContainer = try allocationResourceTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamResourceTag].self, forKey: .member) - var allocationResourceTagsBuffer:[EC2ClientTypes.IpamResourceTag]? = nil - if let allocationResourceTagsContainer = allocationResourceTagsContainer { - allocationResourceTagsBuffer = [EC2ClientTypes.IpamResourceTag]() - for structureContainer0 in allocationResourceTagsContainer { - allocationResourceTagsBuffer?.append(structureContainer0) - } - } - allocationResourceTags = allocationResourceTagsBuffer - } else { - allocationResourceTags = [] - } - } else { - allocationResourceTags = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let awsServiceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolAwsService.self, forKey: .awsService) - awsService = awsServiceDecoded - let publicIpSourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolPublicIpSource.self, forKey: .publicIpSource) - publicIpSource = publicIpSourceDecoded - let sourceResourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolSourceResource.self, forKey: .sourceResource) - sourceResource = sourceResourceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPool() + value.ownerId = try reader["ownerId"].readIfPresent() + value.ipamPoolId = try reader["ipamPoolId"].readIfPresent() + value.sourceIpamPoolId = try reader["sourceIpamPoolId"].readIfPresent() + value.ipamPoolArn = try reader["ipamPoolArn"].readIfPresent() + value.ipamScopeArn = try reader["ipamScopeArn"].readIfPresent() + value.ipamScopeType = try reader["ipamScopeType"].readIfPresent() + value.ipamArn = try reader["ipamArn"].readIfPresent() + value.ipamRegion = try reader["ipamRegion"].readIfPresent() + value.locale = try reader["locale"].readIfPresent() + value.poolDepth = try reader["poolDepth"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.stateMessage = try reader["stateMessage"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.autoImport = try reader["autoImport"].readIfPresent() + value.publiclyAdvertisable = try reader["publiclyAdvertisable"].readIfPresent() + value.addressFamily = try reader["addressFamily"].readIfPresent() + value.allocationMinNetmaskLength = try reader["allocationMinNetmaskLength"].readIfPresent() + value.allocationMaxNetmaskLength = try reader["allocationMaxNetmaskLength"].readIfPresent() + value.allocationDefaultNetmaskLength = try reader["allocationDefaultNetmaskLength"].readIfPresent() + value.allocationResourceTags = try reader["allocationResourceTagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamResourceTag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.awsService = try reader["awsService"].readIfPresent() + value.publicIpSource = try reader["publicIpSource"].readIfPresent() + value.sourceResource = try reader["sourceResource"].readIfPresent(readingClosure: EC2ClientTypes.IpamPoolSourceResource.readingClosure) + return value + } } } @@ -119773,16 +83841,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamPoolAllocation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "cidr" - case description = "description" - case ipamPoolAllocationId = "ipamPoolAllocationId" - case resourceId = "resourceId" - case resourceOwner = "resourceOwner" - case resourceRegion = "resourceRegion" - case resourceType = "resourceType" - } +extension EC2ClientTypes.IpamPoolAllocation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -119809,22 +83868,19 @@ extension EC2ClientTypes.IpamPoolAllocation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let ipamPoolAllocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolAllocationId) - ipamPoolAllocationId = ipamPoolAllocationIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolAllocationResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceRegion) - resourceRegion = resourceRegionDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPoolAllocation() + value.cidr = try reader["cidr"].readIfPresent() + value.ipamPoolAllocationId = try reader["ipamPoolAllocationId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceRegion = try reader["resourceRegion"].readIfPresent() + value.resourceOwner = try reader["resourceOwner"].readIfPresent() + return value + } } } @@ -119938,14 +83994,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamPoolCidr: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "cidr" - case failureReason = "failureReason" - case ipamPoolCidrId = "ipamPoolCidrId" - case netmaskLength = "netmaskLength" - case state = "state" - } +extension EC2ClientTypes.IpamPoolCidr: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -119966,18 +84015,17 @@ extension EC2ClientTypes.IpamPoolCidr: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolCidrState.self, forKey: .state) - state = stateDecoded - let failureReasonDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolCidrFailureReason.self, forKey: .failureReason) - failureReason = failureReasonDecoded - let ipamPoolCidrIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolCidrId) - ipamPoolCidrId = ipamPoolCidrIdDecoded - let netmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .netmaskLength) - netmaskLength = netmaskLengthDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPoolCidr() + value.cidr = try reader["cidr"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.failureReason = try reader["failureReason"].readIfPresent(readingClosure: EC2ClientTypes.IpamPoolCidrFailureReason.readingClosure) + value.ipamPoolCidrId = try reader["ipamPoolCidrId"].readIfPresent() + value.netmaskLength = try reader["netmaskLength"].readIfPresent() + return value + } } } @@ -120045,11 +84093,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamPoolCidrFailureReason: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.IpamPoolCidrFailureReason: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -120061,12 +84105,14 @@ extension EC2ClientTypes.IpamPoolCidrFailureReason: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolCidrFailureCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPoolCidrFailureReason() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -120172,13 +84218,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamPoolSourceResource: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceOwner = "resourceOwner" - case resourceRegion = "resourceRegion" - case resourceType = "resourceType" - } +extension EC2ClientTypes.IpamPoolSourceResource: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -120196,16 +84236,16 @@ extension EC2ClientTypes.IpamPoolSourceResource: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolSourceResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceRegion) - resourceRegion = resourceRegionDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPoolSourceResource() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceRegion = try reader["resourceRegion"].readIfPresent() + value.resourceOwner = try reader["resourceOwner"].readIfPresent() + return value + } } } @@ -120237,13 +84277,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamPoolSourceResourceRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "ResourceId" - case resourceOwner = "ResourceOwner" - case resourceRegion = "ResourceRegion" - case resourceType = "ResourceType" - } +extension EC2ClientTypes.IpamPoolSourceResourceRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -120261,16 +84295,16 @@ extension EC2ClientTypes.IpamPoolSourceResourceRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolSourceResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceRegion) - resourceRegion = resourceRegionDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPoolSourceResourceRequest() + value.resourceId = try reader["ResourceId"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.resourceRegion = try reader["ResourceRegion"].readIfPresent() + value.resourceOwner = try reader["ResourceOwner"].readIfPresent() + return value + } } } @@ -120478,11 +84512,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamPublicAddressSecurityGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupId = "groupId" - case groupName = "groupName" - } +extension EC2ClientTypes.IpamPublicAddressSecurityGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -120494,12 +84524,14 @@ extension EC2ClientTypes.IpamPublicAddressSecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPublicAddressSecurityGroup() + value.groupName = try reader["groupName"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + return value + } } } @@ -120523,11 +84555,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamPublicAddressTag: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "key" - case value = "value" - } +extension EC2ClientTypes.IpamPublicAddressTag: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -120539,12 +84567,14 @@ extension EC2ClientTypes.IpamPublicAddressTag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPublicAddressTag() + value.key = try reader["key"].readIfPresent() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -120568,10 +84598,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamPublicAddressTags: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eipTags = "eipTagSet" - } +extension EC2ClientTypes.IpamPublicAddressTags: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -120589,26 +84616,12 @@ extension EC2ClientTypes.IpamPublicAddressTags: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.eipTags) { - struct KeyVal0{struct item{}} - let eipTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eipTags) - if let eipTagsWrappedContainer = eipTagsWrappedContainer { - let eipTagsContainer = try eipTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamPublicAddressTag].self, forKey: .member) - var eipTagsBuffer:[EC2ClientTypes.IpamPublicAddressTag]? = nil - if let eipTagsContainer = eipTagsContainer { - eipTagsBuffer = [EC2ClientTypes.IpamPublicAddressTag]() - for structureContainer0 in eipTagsContainer { - eipTagsBuffer?.append(structureContainer0) - } - } - eipTags = eipTagsBuffer - } else { - eipTags = [] - } - } else { - eipTags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamPublicAddressTags() + value.eipTags = try reader["eipTagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamPublicAddressTag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -120670,24 +84683,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamResourceCidr: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case complianceStatus = "complianceStatus" - case ipUsage = "ipUsage" - case ipamId = "ipamId" - case ipamPoolId = "ipamPoolId" - case ipamScopeId = "ipamScopeId" - case managementState = "managementState" - case overlapStatus = "overlapStatus" - case resourceCidr = "resourceCidr" - case resourceId = "resourceId" - case resourceName = "resourceName" - case resourceOwnerId = "resourceOwnerId" - case resourceRegion = "resourceRegion" - case resourceTags = "resourceTagSet" - case resourceType = "resourceType" - case vpcId = "vpcId" - } +extension EC2ClientTypes.IpamResourceCidr: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -120747,55 +84743,27 @@ extension EC2ClientTypes.IpamResourceCidr: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let ipamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeId) - ipamScopeId = ipamScopeIdDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let resourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceRegion) - resourceRegion = resourceRegionDecoded - let resourceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwnerId) - resourceOwnerId = resourceOwnerIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - let resourceCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceCidr) - resourceCidr = resourceCidrDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - if containerValues.contains(.resourceTags) { - struct KeyVal0{struct item{}} - let resourceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTags) - if let resourceTagsWrappedContainer = resourceTagsWrappedContainer { - let resourceTagsContainer = try resourceTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamResourceTag].self, forKey: .member) - var resourceTagsBuffer:[EC2ClientTypes.IpamResourceTag]? = nil - if let resourceTagsContainer = resourceTagsContainer { - resourceTagsBuffer = [EC2ClientTypes.IpamResourceTag]() - for structureContainer0 in resourceTagsContainer { - resourceTagsBuffer?.append(structureContainer0) - } - } - resourceTags = resourceTagsBuffer - } else { - resourceTags = [] - } - } else { - resourceTags = nil - } - let ipUsageDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .ipUsage) - ipUsage = ipUsageDecoded - let complianceStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamComplianceStatus.self, forKey: .complianceStatus) - complianceStatus = complianceStatusDecoded - let managementStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamManagementState.self, forKey: .managementState) - managementState = managementStateDecoded - let overlapStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamOverlapStatus.self, forKey: .overlapStatus) - overlapStatus = overlapStatusDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamResourceCidr() + value.ipamId = try reader["ipamId"].readIfPresent() + value.ipamScopeId = try reader["ipamScopeId"].readIfPresent() + value.ipamPoolId = try reader["ipamPoolId"].readIfPresent() + value.resourceRegion = try reader["resourceRegion"].readIfPresent() + value.resourceOwnerId = try reader["resourceOwnerId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceName = try reader["resourceName"].readIfPresent() + value.resourceCidr = try reader["resourceCidr"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceTags = try reader["resourceTagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamResourceTag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipUsage = try reader["ipUsage"].readIfPresent() + value.complianceStatus = try reader["complianceStatus"].readIfPresent() + value.managementState = try reader["managementState"].readIfPresent() + value.overlapStatus = try reader["overlapStatus"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + return value + } } } @@ -120877,18 +84845,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamResourceDiscovery: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case ipamResourceDiscoveryArn = "ipamResourceDiscoveryArn" - case ipamResourceDiscoveryId = "ipamResourceDiscoveryId" - case ipamResourceDiscoveryRegion = "ipamResourceDiscoveryRegion" - case isDefault = "isDefault" - case operatingRegions = "operatingRegionSet" - case ownerId = "ownerId" - case state = "state" - case tags = "tagSet" - } +extension EC2ClientTypes.IpamResourceDiscovery: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -120939,59 +84896,20 @@ extension EC2ClientTypes.IpamResourceDiscovery: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - let ipamResourceDiscoveryArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryArn) - ipamResourceDiscoveryArn = ipamResourceDiscoveryArnDecoded - let ipamResourceDiscoveryRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryRegion) - ipamResourceDiscoveryRegion = ipamResourceDiscoveryRegionDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.operatingRegions) { - struct KeyVal0{struct item{}} - let operatingRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .operatingRegions) - if let operatingRegionsWrappedContainer = operatingRegionsWrappedContainer { - let operatingRegionsContainer = try operatingRegionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpamOperatingRegion].self, forKey: .member) - var operatingRegionsBuffer:[EC2ClientTypes.IpamOperatingRegion]? = nil - if let operatingRegionsContainer = operatingRegionsContainer { - operatingRegionsBuffer = [EC2ClientTypes.IpamOperatingRegion]() - for structureContainer0 in operatingRegionsContainer { - operatingRegionsBuffer?.append(structureContainer0) - } - } - operatingRegions = operatingRegionsBuffer - } else { - operatingRegions = [] - } - } else { - operatingRegions = nil - } - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceDiscoveryState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamResourceDiscovery() + value.ownerId = try reader["ownerId"].readIfPresent() + value.ipamResourceDiscoveryId = try reader["ipamResourceDiscoveryId"].readIfPresent() + value.ipamResourceDiscoveryArn = try reader["ipamResourceDiscoveryArn"].readIfPresent() + value.ipamResourceDiscoveryRegion = try reader["ipamResourceDiscoveryRegion"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.operatingRegions = try reader["operatingRegionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpamOperatingRegion.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.isDefault = try reader["isDefault"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -121068,20 +84986,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.IpamResourceDiscoveryAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamArn = "ipamArn" - case ipamId = "ipamId" - case ipamRegion = "ipamRegion" - case ipamResourceDiscoveryAssociationArn = "ipamResourceDiscoveryAssociationArn" - case ipamResourceDiscoveryAssociationId = "ipamResourceDiscoveryAssociationId" - case ipamResourceDiscoveryId = "ipamResourceDiscoveryId" - case isDefault = "isDefault" - case ownerId = "ownerId" - case resourceDiscoveryStatus = "resourceDiscoveryStatus" - case state = "state" - case tags = "tagSet" - } +extension EC2ClientTypes.IpamResourceDiscoveryAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -121129,46 +85034,22 @@ extension EC2ClientTypes.IpamResourceDiscoveryAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ipamResourceDiscoveryAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryAssociationId) - ipamResourceDiscoveryAssociationId = ipamResourceDiscoveryAssociationIdDecoded - let ipamResourceDiscoveryAssociationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryAssociationArn) - ipamResourceDiscoveryAssociationArn = ipamResourceDiscoveryAssociationArnDecoded - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let ipamArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamArn) - ipamArn = ipamArnDecoded - let ipamRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamRegion) - ipamRegion = ipamRegionDecoded - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded - let resourceDiscoveryStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamAssociatedResourceDiscoveryStatus.self, forKey: .resourceDiscoveryStatus) - resourceDiscoveryStatus = resourceDiscoveryStatusDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceDiscoveryAssociationState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamResourceDiscoveryAssociation() + value.ownerId = try reader["ownerId"].readIfPresent() + value.ipamResourceDiscoveryAssociationId = try reader["ipamResourceDiscoveryAssociationId"].readIfPresent() + value.ipamResourceDiscoveryAssociationArn = try reader["ipamResourceDiscoveryAssociationArn"].readIfPresent() + value.ipamResourceDiscoveryId = try reader["ipamResourceDiscoveryId"].readIfPresent() + value.ipamId = try reader["ipamId"].readIfPresent() + value.ipamArn = try reader["ipamArn"].readIfPresent() + value.ipamRegion = try reader["ipamRegion"].readIfPresent() + value.isDefault = try reader["isDefault"].readIfPresent() + value.resourceDiscoveryStatus = try reader["resourceDiscoveryStatus"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -121366,11 +85247,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamResourceTag: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "key" - case value = "value" - } +extension EC2ClientTypes.IpamResourceTag: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -121382,12 +85259,14 @@ extension EC2ClientTypes.IpamResourceTag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamResourceTag() + value.key = try reader["key"].readIfPresent() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -121455,20 +85334,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.IpamScope: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case ipamArn = "ipamArn" - case ipamRegion = "ipamRegion" - case ipamScopeArn = "ipamScopeArn" - case ipamScopeId = "ipamScopeId" - case ipamScopeType = "ipamScopeType" - case isDefault = "isDefault" - case ownerId = "ownerId" - case poolCount = "poolCount" - case state = "state" - case tags = "tagSet" - } +extension EC2ClientTypes.IpamScope: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -121516,46 +85382,22 @@ extension EC2ClientTypes.IpamScope: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let ipamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeId) - ipamScopeId = ipamScopeIdDecoded - let ipamScopeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeArn) - ipamScopeArn = ipamScopeArnDecoded - let ipamArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamArn) - ipamArn = ipamArnDecoded - let ipamRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamRegion) - ipamRegion = ipamRegionDecoded - let ipamScopeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamScopeType.self, forKey: .ipamScopeType) - ipamScopeType = ipamScopeTypeDecoded - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let poolCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .poolCount) - poolCount = poolCountDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamScopeState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.IpamScope() + value.ownerId = try reader["ownerId"].readIfPresent() + value.ipamScopeId = try reader["ipamScopeId"].readIfPresent() + value.ipamScopeArn = try reader["ipamScopeArn"].readIfPresent() + value.ipamArn = try reader["ipamArn"].readIfPresent() + value.ipamRegion = try reader["ipamRegion"].readIfPresent() + value.ipamScopeType = try reader["ipamScopeType"].readIfPresent() + value.isDefault = try reader["isDefault"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.poolCount = try reader["poolCount"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -121804,10 +85646,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Ipv4PrefixSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv4Prefix = "ipv4Prefix" - } +extension EC2ClientTypes.Ipv4PrefixSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -121816,10 +85655,13 @@ extension EC2ClientTypes.Ipv4PrefixSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv4PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv4Prefix) - ipv4Prefix = ipv4PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv4PrefixSpecification() + value.ipv4Prefix = try reader["ipv4Prefix"].readIfPresent() + return value + } } } @@ -121839,10 +85681,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv4PrefixSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv4Prefix = "Ipv4Prefix" - } +extension EC2ClientTypes.Ipv4PrefixSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -121851,10 +85690,13 @@ extension EC2ClientTypes.Ipv4PrefixSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv4PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv4Prefix) - ipv4Prefix = ipv4PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv4PrefixSpecificationRequest() + value.ipv4Prefix = try reader["Ipv4Prefix"].readIfPresent() + return value + } } } @@ -121874,10 +85716,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv4PrefixSpecificationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv4Prefix = "ipv4Prefix" - } +extension EC2ClientTypes.Ipv4PrefixSpecificationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -121886,10 +85725,13 @@ extension EC2ClientTypes.Ipv4PrefixSpecificationResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv4PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv4Prefix) - ipv4Prefix = ipv4PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv4PrefixSpecificationResponse() + value.ipv4Prefix = try reader["ipv4Prefix"].readIfPresent() + return value + } } } @@ -121909,11 +85751,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv6CidrAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedResource = "associatedResource" - case ipv6Cidr = "ipv6Cidr" - } +extension EC2ClientTypes.Ipv6CidrAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -121925,12 +85763,14 @@ extension EC2ClientTypes.Ipv6CidrAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6CidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Cidr) - ipv6Cidr = ipv6CidrDecoded - let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) - associatedResource = associatedResourceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv6CidrAssociation() + value.ipv6Cidr = try reader["ipv6Cidr"].readIfPresent() + value.associatedResource = try reader["associatedResource"].readIfPresent() + return value + } } } @@ -121954,10 +85794,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv6CidrBlock: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6CidrBlock = "ipv6CidrBlock" - } +extension EC2ClientTypes.Ipv6CidrBlock: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -121966,10 +85803,13 @@ extension EC2ClientTypes.Ipv6CidrBlock: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv6CidrBlock() + value.ipv6CidrBlock = try reader["ipv6CidrBlock"].readIfPresent() + return value + } } } @@ -121989,13 +85829,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv6Pool: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case poolCidrBlocks = "poolCidrBlockSet" - case poolId = "poolId" - case tags = "tagSet" - } +extension EC2ClientTypes.Ipv6Pool: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122031,49 +85865,15 @@ extension EC2ClientTypes.Ipv6Pool: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.poolCidrBlocks) { - struct KeyVal0{struct item{}} - let poolCidrBlocksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .poolCidrBlocks) - if let poolCidrBlocksWrappedContainer = poolCidrBlocksWrappedContainer { - let poolCidrBlocksContainer = try poolCidrBlocksWrappedContainer.decodeIfPresent([EC2ClientTypes.PoolCidrBlock].self, forKey: .member) - var poolCidrBlocksBuffer:[EC2ClientTypes.PoolCidrBlock]? = nil - if let poolCidrBlocksContainer = poolCidrBlocksContainer { - poolCidrBlocksBuffer = [EC2ClientTypes.PoolCidrBlock]() - for structureContainer0 in poolCidrBlocksContainer { - poolCidrBlocksBuffer?.append(structureContainer0) - } - } - poolCidrBlocks = poolCidrBlocksBuffer - } else { - poolCidrBlocks = [] - } - } else { - poolCidrBlocks = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv6Pool() + value.poolId = try reader["poolId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.poolCidrBlocks = try reader["poolCidrBlockSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PoolCidrBlock.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -122106,10 +85906,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv6PrefixSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Prefix = "ipv6Prefix" - } +extension EC2ClientTypes.Ipv6PrefixSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122118,10 +85915,13 @@ extension EC2ClientTypes.Ipv6PrefixSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Prefix) - ipv6Prefix = ipv6PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv6PrefixSpecification() + value.ipv6Prefix = try reader["ipv6Prefix"].readIfPresent() + return value + } } } @@ -122141,10 +85941,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv6PrefixSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Prefix = "Ipv6Prefix" - } +extension EC2ClientTypes.Ipv6PrefixSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122153,10 +85950,13 @@ extension EC2ClientTypes.Ipv6PrefixSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Prefix) - ipv6Prefix = ipv6PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv6PrefixSpecificationRequest() + value.ipv6Prefix = try reader["Ipv6Prefix"].readIfPresent() + return value + } } } @@ -122176,10 +85976,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv6PrefixSpecificationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Prefix = "ipv6Prefix" - } +extension EC2ClientTypes.Ipv6PrefixSpecificationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122188,10 +85985,13 @@ extension EC2ClientTypes.Ipv6PrefixSpecificationResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Prefix) - ipv6Prefix = ipv6PrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv6PrefixSpecificationResponse() + value.ipv6Prefix = try reader["ipv6Prefix"].readIfPresent() + return value + } } } @@ -122211,11 +86011,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Ipv6Range: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrIpv6 = "cidrIpv6" - case description = "description" - } +extension EC2ClientTypes.Ipv6Range: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122227,12 +86023,14 @@ extension EC2ClientTypes.Ipv6Range: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrIpv6Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIpv6) - cidrIpv6 = cidrIpv6Decoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Ipv6Range() + value.cidrIpv6 = try reader["cidrIpv6"].readIfPresent() + value.description = try reader["description"].readIfPresent() + return value + } } } @@ -122320,16 +86118,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.KeyPairInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "createTime" - case keyFingerprint = "keyFingerprint" - case keyName = "keyName" - case keyPairId = "keyPairId" - case keyType = "keyType" - case publicKey = "publicKey" - case tags = "tagSet" - } +extension EC2ClientTypes.KeyPairInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122365,39 +86154,19 @@ extension EC2ClientTypes.KeyPairInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyPairIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyPairId) - keyPairId = keyPairIdDecoded - let keyFingerprintDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyFingerprint) - keyFingerprint = keyFingerprintDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let keyTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.KeyType.self, forKey: .keyType) - keyType = keyTypeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.KeyPairInfo() + value.keyPairId = try reader["keyPairId"].readIfPresent() + value.keyFingerprint = try reader["keyFingerprint"].readIfPresent() + value.keyName = try reader["keyName"].readIfPresent() + value.keyType = try reader["keyType"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.publicKey = try reader["publicKey"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + return value } - let publicKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicKey) - publicKey = publicKeyDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded } } @@ -122484,11 +86253,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LastError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.LastError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122500,12 +86265,14 @@ extension EC2ClientTypes.LastError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LastError() + value.message = try reader["message"].readIfPresent() + value.code = try reader["code"].readIfPresent() + return value + } } } @@ -122529,13 +86296,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchPermission: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case group = "group" - case organizationArn = "organizationArn" - case organizationalUnitArn = "organizationalUnitArn" - case userId = "userId" - } +extension EC2ClientTypes.LaunchPermission: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122553,16 +86314,16 @@ extension EC2ClientTypes.LaunchPermission: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PermissionGroup.self, forKey: .group) - group = groupDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let organizationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organizationArn) - organizationArn = organizationArnDecoded - let organizationalUnitArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organizationalUnitArn) - organizationalUnitArn = organizationalUnitArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchPermission() + value.group = try reader["group"].readIfPresent() + value.userId = try reader["userId"].readIfPresent() + value.organizationArn = try reader["organizationArn"].readIfPresent() + value.organizationalUnitArn = try reader["organizationalUnitArn"].readIfPresent() + return value + } } } @@ -122594,11 +86355,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchPermissionModifications: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case add = "Add" - case remove = "Remove" - } +extension EC2ClientTypes.LaunchPermissionModifications: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122628,45 +86385,13 @@ extension EC2ClientTypes.LaunchPermissionModifications: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.add) { - struct KeyVal0{struct item{}} - let addWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .add) - if let addWrappedContainer = addWrappedContainer { - let addContainer = try addWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchPermission].self, forKey: .member) - var addBuffer:[EC2ClientTypes.LaunchPermission]? = nil - if let addContainer = addContainer { - addBuffer = [EC2ClientTypes.LaunchPermission]() - for structureContainer0 in addContainer { - addBuffer?.append(structureContainer0) - } - } - add = addBuffer - } else { - add = [] - } - } else { - add = nil - } - if containerValues.contains(.remove) { - struct KeyVal0{struct item{}} - let removeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .remove) - if let removeWrappedContainer = removeWrappedContainer { - let removeContainer = try removeWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchPermission].self, forKey: .member) - var removeBuffer:[EC2ClientTypes.LaunchPermission]? = nil - if let removeContainer = removeContainer { - removeBuffer = [EC2ClientTypes.LaunchPermission]() - for structureContainer0 in removeContainer { - removeBuffer?.append(structureContainer0) - } - } - remove = removeBuffer - } else { - remove = [] - } - } else { - remove = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchPermissionModifications() + value.add = try reader["Add"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.remove = try reader["Remove"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -122691,24 +86416,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressingType = "addressingType" - case blockDeviceMappings = "blockDeviceMapping" - case ebsOptimized = "ebsOptimized" - case iamInstanceProfile = "iamInstanceProfile" - case imageId = "imageId" - case instanceType = "instanceType" - case kernelId = "kernelId" - case keyName = "keyName" - case monitoring = "monitoring" - case networkInterfaces = "networkInterfaceSet" - case placement = "placement" - case ramdiskId = "ramdiskId" - case securityGroups = "groupSet" - case subnetId = "subnetId" - case userData = "userData" - } +extension EC2ClientTypes.LaunchSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122786,89 +86494,27 @@ extension EC2ClientTypes.LaunchSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var securityGroupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(structureContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let addressingTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressingType) - addressingType = addressingTypeDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileSpecification.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct item{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceNetworkInterfaceSpecification].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.InstanceNetworkInterfaceSpecification]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.InstanceNetworkInterfaceSpecification]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil - } - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotPlacement.self, forKey: .placement) - placement = placementDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RunInstancesMonitoringEnabled.self, forKey: .monitoring) - monitoring = monitoringDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchSpecification() + value.userData = try reader["userData"].readIfPresent() + value.securityGroups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.addressingType = try reader["addressingType"].readIfPresent() + value.blockDeviceMappings = try reader["blockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.BlockDeviceMapping.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ebsOptimized = try reader["ebsOptimized"].readIfPresent() + value.iamInstanceProfile = try reader["iamInstanceProfile"].readIfPresent(readingClosure: EC2ClientTypes.IamInstanceProfileSpecification.readingClosure) + value.imageId = try reader["imageId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.kernelId = try reader["kernelId"].readIfPresent() + value.keyName = try reader["keyName"].readIfPresent() + value.networkInterfaces = try reader["networkInterfaceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceNetworkInterfaceSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.placement = try reader["placement"].readIfPresent(readingClosure: EC2ClientTypes.SpotPlacement.readingClosure) + value.ramdiskId = try reader["ramdiskId"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.monitoring = try reader["monitoring"].readIfPresent(readingClosure: EC2ClientTypes.RunInstancesMonitoringEnabled.readingClosure) + return value + } } } @@ -122949,16 +86595,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplate: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "createTime" - case createdBy = "createdBy" - case defaultVersionNumber = "defaultVersionNumber" - case latestVersionNumber = "latestVersionNumber" - case launchTemplateId = "launchTemplateId" - case launchTemplateName = "launchTemplateName" - case tags = "tagSet" - } +extension EC2ClientTypes.LaunchTemplate: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -122994,38 +86631,18 @@ extension EC2ClientTypes.LaunchTemplate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let createdByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .createdBy) - createdBy = createdByDecoded - let defaultVersionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultVersionNumber) - defaultVersionNumber = defaultVersionNumberDecoded - let latestVersionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .latestVersionNumber) - latestVersionNumber = latestVersionNumberDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplate() + value.launchTemplateId = try reader["launchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["launchTemplateName"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.createdBy = try reader["createdBy"].readIfPresent() + value.defaultVersionNumber = try reader["defaultVersionNumber"].readIfPresent() + value.latestVersionNumber = try reader["latestVersionNumber"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -123070,11 +86687,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateAndOverridesResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateSpecification = "launchTemplateSpecification" - case overrides = "overrides" - } +extension EC2ClientTypes.LaunchTemplateAndOverridesResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123086,12 +86699,14 @@ extension EC2ClientTypes.LaunchTemplateAndOverridesResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetLaunchTemplateSpecification.self, forKey: .launchTemplateSpecification) - launchTemplateSpecification = launchTemplateSpecificationDecoded - let overridesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetLaunchTemplateOverrides.self, forKey: .overrides) - overrides = overridesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateAndOverridesResponse() + value.launchTemplateSpecification = try reader["launchTemplateSpecification"].readIfPresent(readingClosure: EC2ClientTypes.FleetLaunchTemplateSpecification.readingClosure) + value.overrides = try reader["overrides"].readIfPresent(readingClosure: EC2ClientTypes.FleetLaunchTemplateOverrides.readingClosure) + return value + } } } @@ -123147,13 +86762,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LaunchTemplateBlockDeviceMapping: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deviceName = "deviceName" - case ebs = "ebs" - case noDevice = "noDevice" - case virtualName = "virtualName" - } +extension EC2ClientTypes.LaunchTemplateBlockDeviceMapping: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123171,16 +86780,16 @@ extension EC2ClientTypes.LaunchTemplateBlockDeviceMapping: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let virtualNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualName) - virtualName = virtualNameDecoded - let ebsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateEbsBlockDevice.self, forKey: .ebs) - ebs = ebsDecoded - let noDeviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .noDevice) - noDevice = noDeviceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateBlockDeviceMapping() + value.deviceName = try reader["deviceName"].readIfPresent() + value.virtualName = try reader["virtualName"].readIfPresent() + value.ebs = try reader["ebs"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateEbsBlockDevice.readingClosure) + value.noDevice = try reader["noDevice"].readIfPresent() + return value + } } } @@ -123212,13 +86821,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateBlockDeviceMappingRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deviceName = "DeviceName" - case ebs = "Ebs" - case noDevice = "NoDevice" - case virtualName = "VirtualName" - } +extension EC2ClientTypes.LaunchTemplateBlockDeviceMappingRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123236,16 +86839,16 @@ extension EC2ClientTypes.LaunchTemplateBlockDeviceMappingRequest: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let virtualNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualName) - virtualName = virtualNameDecoded - let ebsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateEbsBlockDeviceRequest.self, forKey: .ebs) - ebs = ebsDecoded - let noDeviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .noDevice) - noDevice = noDeviceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateBlockDeviceMappingRequest() + value.deviceName = try reader["DeviceName"].readIfPresent() + value.virtualName = try reader["VirtualName"].readIfPresent() + value.ebs = try reader["Ebs"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateEbsBlockDeviceRequest.readingClosure) + value.noDevice = try reader["NoDevice"].readIfPresent() + return value + } } } @@ -123277,11 +86880,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationPreference = "CapacityReservationPreference" - case capacityReservationTarget = "CapacityReservationTarget" - } +extension EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123293,12 +86892,14 @@ extension EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationRequest: } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationPreferenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationPreference.self, forKey: .capacityReservationPreference) - capacityReservationPreference = capacityReservationPreferenceDecoded - let capacityReservationTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationTarget.self, forKey: .capacityReservationTarget) - capacityReservationTarget = capacityReservationTargetDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationRequest() + value.capacityReservationPreference = try reader["CapacityReservationPreference"].readIfPresent() + value.capacityReservationTarget = try reader["CapacityReservationTarget"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservationTarget.readingClosure) + return value + } } } @@ -123326,11 +86927,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationPreference = "capacityReservationPreference" - case capacityReservationTarget = "capacityReservationTarget" - } +extension EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123342,12 +86939,14 @@ extension EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationResponse: } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationPreferenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationPreference.self, forKey: .capacityReservationPreference) - capacityReservationPreference = capacityReservationPreferenceDecoded - let capacityReservationTargetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationTargetResponse.self, forKey: .capacityReservationTarget) - capacityReservationTarget = capacityReservationTargetDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationResponse() + value.capacityReservationPreference = try reader["capacityReservationPreference"].readIfPresent() + value.capacityReservationTarget = try reader["capacityReservationTarget"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservationTargetResponse.readingClosure) + return value + } } } @@ -123375,11 +86974,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateConfig: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateSpecification = "launchTemplateSpecification" - case overrides = "overrides" - } +extension EC2ClientTypes.LaunchTemplateConfig: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123400,28 +86995,13 @@ extension EC2ClientTypes.LaunchTemplateConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetLaunchTemplateSpecification.self, forKey: .launchTemplateSpecification) - launchTemplateSpecification = launchTemplateSpecificationDecoded - if containerValues.contains(.overrides) { - struct KeyVal0{struct item{}} - let overridesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .overrides) - if let overridesWrappedContainer = overridesWrappedContainer { - let overridesContainer = try overridesWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateOverrides].self, forKey: .member) - var overridesBuffer:[EC2ClientTypes.LaunchTemplateOverrides]? = nil - if let overridesContainer = overridesContainer { - overridesBuffer = [EC2ClientTypes.LaunchTemplateOverrides]() - for structureContainer0 in overridesContainer { - overridesBuffer?.append(structureContainer0) - } - } - overrides = overridesBuffer - } else { - overrides = [] - } - } else { - overrides = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateConfig() + value.launchTemplateSpecification = try reader["launchTemplateSpecification"].readIfPresent(readingClosure: EC2ClientTypes.FleetLaunchTemplateSpecification.readingClosure) + value.overrides = try reader["overrides"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateOverrides.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -123446,12 +87026,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateCpuOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amdSevSnp = "amdSevSnp" - case coreCount = "coreCount" - case threadsPerCore = "threadsPerCore" - } +extension EC2ClientTypes.LaunchTemplateCpuOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123466,14 +87041,15 @@ extension EC2ClientTypes.LaunchTemplateCpuOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coreCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .coreCount) - coreCount = coreCountDecoded - let threadsPerCoreDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .threadsPerCore) - threadsPerCore = threadsPerCoreDecoded - let amdSevSnpDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AmdSevSnpSpecification.self, forKey: .amdSevSnp) - amdSevSnp = amdSevSnpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateCpuOptions() + value.coreCount = try reader["coreCount"].readIfPresent() + value.threadsPerCore = try reader["threadsPerCore"].readIfPresent() + value.amdSevSnp = try reader["amdSevSnp"].readIfPresent() + return value + } } } @@ -123501,12 +87077,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateCpuOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amdSevSnp = "AmdSevSnp" - case coreCount = "CoreCount" - case threadsPerCore = "ThreadsPerCore" - } +extension EC2ClientTypes.LaunchTemplateCpuOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123521,14 +87092,15 @@ extension EC2ClientTypes.LaunchTemplateCpuOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let coreCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .coreCount) - coreCount = coreCountDecoded - let threadsPerCoreDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .threadsPerCore) - threadsPerCore = threadsPerCoreDecoded - let amdSevSnpDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AmdSevSnpSpecification.self, forKey: .amdSevSnp) - amdSevSnp = amdSevSnpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateCpuOptionsRequest() + value.coreCount = try reader["CoreCount"].readIfPresent() + value.threadsPerCore = try reader["ThreadsPerCore"].readIfPresent() + value.amdSevSnp = try reader["AmdSevSnp"].readIfPresent() + return value + } } } @@ -123556,17 +87128,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateEbsBlockDevice: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deleteOnTermination = "deleteOnTermination" - case encrypted = "encrypted" - case iops = "iops" - case kmsKeyId = "kmsKeyId" - case snapshotId = "snapshotId" - case throughput = "throughput" - case volumeSize = "volumeSize" - case volumeType = "volumeType" - } +extension EC2ClientTypes.LaunchTemplateEbsBlockDevice: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123596,24 +87158,20 @@ extension EC2ClientTypes.LaunchTemplateEbsBlockDevice: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let volumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .volumeType) - volumeType = volumeTypeDecoded - let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) - throughput = throughputDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateEbsBlockDevice() + value.encrypted = try reader["encrypted"].readIfPresent() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.iops = try reader["iops"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.volumeSize = try reader["volumeSize"].readIfPresent() + value.volumeType = try reader["volumeType"].readIfPresent() + value.throughput = try reader["throughput"].readIfPresent() + return value + } } } @@ -123661,17 +87219,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateEbsBlockDeviceRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deleteOnTermination = "DeleteOnTermination" - case encrypted = "Encrypted" - case iops = "Iops" - case kmsKeyId = "KmsKeyId" - case snapshotId = "SnapshotId" - case throughput = "Throughput" - case volumeSize = "VolumeSize" - case volumeType = "VolumeType" - } +extension EC2ClientTypes.LaunchTemplateEbsBlockDeviceRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123701,24 +87249,20 @@ extension EC2ClientTypes.LaunchTemplateEbsBlockDeviceRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let volumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .volumeType) - volumeType = volumeTypeDecoded - let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) - throughput = throughputDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateEbsBlockDeviceRequest() + value.encrypted = try reader["Encrypted"].readIfPresent() + value.deleteOnTermination = try reader["DeleteOnTermination"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.snapshotId = try reader["SnapshotId"].readIfPresent() + value.volumeSize = try reader["VolumeSize"].readIfPresent() + value.volumeType = try reader["VolumeType"].readIfPresent() + value.throughput = try reader["Throughput"].readIfPresent() + return value + } } } @@ -123785,11 +87329,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateElasticInferenceAccelerator: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "Count" - case type = "Type" - } +extension EC2ClientTypes.LaunchTemplateElasticInferenceAccelerator: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123801,12 +87341,14 @@ extension EC2ClientTypes.LaunchTemplateElasticInferenceAccelerator: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateElasticInferenceAccelerator() + value.type = try reader["Type"].readIfPresent() + value.count = try reader["Count"].readIfPresent() + return value + } } } @@ -123831,11 +87373,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateElasticInferenceAcceleratorResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "count" - case type = "type" - } +extension EC2ClientTypes.LaunchTemplateElasticInferenceAcceleratorResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123847,12 +87385,14 @@ extension EC2ClientTypes.LaunchTemplateElasticInferenceAcceleratorResponse: Swif } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateElasticInferenceAcceleratorResponse() + value.type = try reader["type"].readIfPresent() + value.count = try reader["count"].readIfPresent() + return value + } } } @@ -123876,11 +87416,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateEnaSrdSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdEnabled = "enaSrdEnabled" - case enaSrdUdpSpecification = "enaSrdUdpSpecification" - } +extension EC2ClientTypes.LaunchTemplateEnaSrdSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123892,12 +87428,14 @@ extension EC2ClientTypes.LaunchTemplateEnaSrdSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdEnabled) - enaSrdEnabled = enaSrdEnabledDecoded - let enaSrdUdpSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateEnaSrdUdpSpecification.self, forKey: .enaSrdUdpSpecification) - enaSrdUdpSpecification = enaSrdUdpSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateEnaSrdSpecification() + value.enaSrdEnabled = try reader["enaSrdEnabled"].readIfPresent() + value.enaSrdUdpSpecification = try reader["enaSrdUdpSpecification"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateEnaSrdUdpSpecification.readingClosure) + return value + } } } @@ -123921,10 +87459,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateEnaSrdUdpSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enaSrdUdpEnabled = "enaSrdUdpEnabled" - } +extension EC2ClientTypes.LaunchTemplateEnaSrdUdpSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123933,10 +87468,13 @@ extension EC2ClientTypes.LaunchTemplateEnaSrdUdpSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enaSrdUdpEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdUdpEnabled) - enaSrdUdpEnabled = enaSrdUdpEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateEnaSrdUdpSpecification() + value.enaSrdUdpEnabled = try reader["enaSrdUdpEnabled"].readIfPresent() + return value + } } } @@ -123956,10 +87494,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateEnclaveOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "enabled" - } +extension EC2ClientTypes.LaunchTemplateEnclaveOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -123968,10 +87503,13 @@ extension EC2ClientTypes.LaunchTemplateEnclaveOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateEnclaveOptions() + value.enabled = try reader["enabled"].readIfPresent() + return value + } } } @@ -123991,10 +87529,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateEnclaveOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - } +extension EC2ClientTypes.LaunchTemplateEnclaveOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124003,10 +87538,13 @@ extension EC2ClientTypes.LaunchTemplateEnclaveOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateEnclaveOptionsRequest() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -124070,10 +87608,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LaunchTemplateHibernationOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configured = "configured" - } +extension EC2ClientTypes.LaunchTemplateHibernationOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124082,10 +87617,13 @@ extension EC2ClientTypes.LaunchTemplateHibernationOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configuredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .configured) - configured = configuredDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateHibernationOptions() + value.configured = try reader["configured"].readIfPresent() + return value + } } } @@ -124105,10 +87643,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateHibernationOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configured = "Configured" - } +extension EC2ClientTypes.LaunchTemplateHibernationOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124117,10 +87652,13 @@ extension EC2ClientTypes.LaunchTemplateHibernationOptionsRequest: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configuredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .configured) - configured = configuredDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateHibernationOptionsRequest() + value.configured = try reader["Configured"].readIfPresent() + return value + } } } @@ -124172,11 +87710,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "arn" - case name = "name" - } +extension EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124188,12 +87722,14 @@ extension EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecification: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecification() + value.arn = try reader["arn"].readIfPresent() + value.name = try reader["name"].readIfPresent() + return value + } } } @@ -124217,11 +87753,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case name = "Name" - } +extension EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124233,12 +87765,14 @@ extension EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecificationRequest: S } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecificationRequest() + value.arn = try reader["Arn"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -124262,10 +87796,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoRecovery = "autoRecovery" - } +extension EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124274,10 +87805,13 @@ extension EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptions: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateAutoRecoveryState.self, forKey: .autoRecovery) - autoRecovery = autoRecoveryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptions() + value.autoRecovery = try reader["autoRecovery"].readIfPresent() + return value + } } } @@ -124297,10 +87831,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoRecovery = "AutoRecovery" - } +extension EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124309,10 +87840,13 @@ extension EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptionsRequest: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateAutoRecoveryState.self, forKey: .autoRecovery) - autoRecovery = autoRecoveryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptionsRequest() + value.autoRecovery = try reader["AutoRecovery"].readIfPresent() + return value + } } } @@ -124332,11 +87866,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateInstanceMarketOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marketType = "marketType" - case spotOptions = "spotOptions" - } +extension EC2ClientTypes.LaunchTemplateInstanceMarketOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124348,12 +87878,14 @@ extension EC2ClientTypes.LaunchTemplateInstanceMarketOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let marketTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MarketType.self, forKey: .marketType) - marketType = marketTypeDecoded - let spotOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateSpotMarketOptions.self, forKey: .spotOptions) - spotOptions = spotOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateInstanceMarketOptions() + value.marketType = try reader["marketType"].readIfPresent() + value.spotOptions = try reader["spotOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateSpotMarketOptions.readingClosure) + return value + } } } @@ -124377,11 +87909,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateInstanceMarketOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marketType = "MarketType" - case spotOptions = "SpotOptions" - } +extension EC2ClientTypes.LaunchTemplateInstanceMarketOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124393,12 +87921,14 @@ extension EC2ClientTypes.LaunchTemplateInstanceMarketOptionsRequest: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let marketTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MarketType.self, forKey: .marketType) - marketType = marketTypeDecoded - let spotOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateSpotMarketOptionsRequest.self, forKey: .spotOptions) - spotOptions = spotOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateInstanceMarketOptionsRequest() + value.marketType = try reader["MarketType"].readIfPresent() + value.spotOptions = try reader["SpotOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateSpotMarketOptionsRequest.readingClosure) + return value + } } } @@ -124454,15 +87984,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LaunchTemplateInstanceMetadataOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case httpEndpoint = "httpEndpoint" - case httpProtocolIpv6 = "httpProtocolIpv6" - case httpPutResponseHopLimit = "httpPutResponseHopLimit" - case httpTokens = "httpTokens" - case instanceMetadataTags = "instanceMetadataTags" - case state = "state" - } +extension EC2ClientTypes.LaunchTemplateInstanceMetadataOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124486,20 +88008,18 @@ extension EC2ClientTypes.LaunchTemplateInstanceMetadataOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataOptionsState.self, forKey: .state) - state = stateDecoded - let httpTokensDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateHttpTokensState.self, forKey: .httpTokens) - httpTokens = httpTokensDecoded - let httpPutResponseHopLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .httpPutResponseHopLimit) - httpPutResponseHopLimit = httpPutResponseHopLimitDecoded - let httpEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataEndpointState.self, forKey: .httpEndpoint) - httpEndpoint = httpEndpointDecoded - let httpProtocolIpv6Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataProtocolIpv6.self, forKey: .httpProtocolIpv6) - httpProtocolIpv6 = httpProtocolIpv6Decoded - let instanceMetadataTagsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataTagsState.self, forKey: .instanceMetadataTags) - instanceMetadataTags = instanceMetadataTagsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateInstanceMetadataOptions() + value.state = try reader["state"].readIfPresent() + value.httpTokens = try reader["httpTokens"].readIfPresent() + value.httpPutResponseHopLimit = try reader["httpPutResponseHopLimit"].readIfPresent() + value.httpEndpoint = try reader["httpEndpoint"].readIfPresent() + value.httpProtocolIpv6 = try reader["httpProtocolIpv6"].readIfPresent() + value.instanceMetadataTags = try reader["instanceMetadataTags"].readIfPresent() + return value + } } } @@ -124543,14 +88063,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateInstanceMetadataOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case httpEndpoint = "HttpEndpoint" - case httpProtocolIpv6 = "HttpProtocolIpv6" - case httpPutResponseHopLimit = "HttpPutResponseHopLimit" - case httpTokens = "HttpTokens" - case instanceMetadataTags = "InstanceMetadataTags" - } +extension EC2ClientTypes.LaunchTemplateInstanceMetadataOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124571,18 +88084,17 @@ extension EC2ClientTypes.LaunchTemplateInstanceMetadataOptionsRequest: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let httpTokensDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateHttpTokensState.self, forKey: .httpTokens) - httpTokens = httpTokensDecoded - let httpPutResponseHopLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .httpPutResponseHopLimit) - httpPutResponseHopLimit = httpPutResponseHopLimitDecoded - let httpEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataEndpointState.self, forKey: .httpEndpoint) - httpEndpoint = httpEndpointDecoded - let httpProtocolIpv6Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataProtocolIpv6.self, forKey: .httpProtocolIpv6) - httpProtocolIpv6 = httpProtocolIpv6Decoded - let instanceMetadataTagsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataTagsState.self, forKey: .instanceMetadataTags) - instanceMetadataTags = instanceMetadataTagsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateInstanceMetadataOptionsRequest() + value.httpTokens = try reader["HttpTokens"].readIfPresent() + value.httpPutResponseHopLimit = try reader["HttpPutResponseHopLimit"].readIfPresent() + value.httpEndpoint = try reader["HttpEndpoint"].readIfPresent() + value.httpProtocolIpv6 = try reader["HttpProtocolIpv6"].readIfPresent() + value.instanceMetadataTags = try reader["InstanceMetadataTags"].readIfPresent() + return value + } } } @@ -124721,31 +88233,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associateCarrierIpAddress = "associateCarrierIpAddress" - case associatePublicIpAddress = "associatePublicIpAddress" - case connectionTrackingSpecification = "connectionTrackingSpecification" - case deleteOnTermination = "deleteOnTermination" - case description = "description" - case deviceIndex = "deviceIndex" - case enaSrdSpecification = "enaSrdSpecification" - case groups = "groupSet" - case interfaceType = "interfaceType" - case ipv4PrefixCount = "ipv4PrefixCount" - case ipv4Prefixes = "ipv4PrefixSet" - case ipv6AddressCount = "ipv6AddressCount" - case ipv6Addresses = "ipv6AddressesSet" - case ipv6PrefixCount = "ipv6PrefixCount" - case ipv6Prefixes = "ipv6PrefixSet" - case networkCardIndex = "networkCardIndex" - case networkInterfaceId = "networkInterfaceId" - case primaryIpv6 = "primaryIpv6" - case privateIpAddress = "privateIpAddress" - case privateIpAddresses = "privateIpAddressesSet" - case secondaryPrivateIpAddressCount = "secondaryPrivateIpAddressCount" - case subnetId = "subnetId" - } +extension EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -124862,137 +88350,34 @@ extension EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecification: Sw } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associateCarrierIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associateCarrierIpAddress) - associateCarrierIpAddress = associateCarrierIpAddressDecoded - let associatePublicIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associatePublicIpAddress) - associatePublicIpAddress = associatePublicIpAddressDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let deviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deviceIndex) - deviceIndex = deviceIndexDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct groupId{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupsBuffer:[Swift.String]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [Swift.String]() - for stringContainer0 in groupsContainer { - groupsBuffer?.append(stringContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let interfaceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .interfaceType) - interfaceType = interfaceTypeDecoded - let ipv6AddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6AddressCount) - ipv6AddressCount = ipv6AddressCountDecoded - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct item{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceIpv6Address].self, forKey: .member) - var ipv6AddressesBuffer:[EC2ClientTypes.InstanceIpv6Address]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [EC2ClientTypes.InstanceIpv6Address]() - for structureContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(structureContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.PrivateIpAddressSpecification].self, forKey: .member) - var privateIpAddressesBuffer:[EC2ClientTypes.PrivateIpAddressSpecification]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [EC2ClientTypes.PrivateIpAddressSpecification]() - for structureContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(structureContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let secondaryPrivateIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondaryPrivateIpAddressCount) - secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCountDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let networkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .networkCardIndex) - networkCardIndex = networkCardIndexDecoded - if containerValues.contains(.ipv4Prefixes) { - struct KeyVal0{struct item{}} - let ipv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv4Prefixes) - if let ipv4PrefixesWrappedContainer = ipv4PrefixesWrappedContainer { - let ipv4PrefixesContainer = try ipv4PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv4PrefixSpecificationResponse].self, forKey: .member) - var ipv4PrefixesBuffer:[EC2ClientTypes.Ipv4PrefixSpecificationResponse]? = nil - if let ipv4PrefixesContainer = ipv4PrefixesContainer { - ipv4PrefixesBuffer = [EC2ClientTypes.Ipv4PrefixSpecificationResponse]() - for structureContainer0 in ipv4PrefixesContainer { - ipv4PrefixesBuffer?.append(structureContainer0) - } - } - ipv4Prefixes = ipv4PrefixesBuffer - } else { - ipv4Prefixes = [] - } - } else { - ipv4Prefixes = nil - } - let ipv4PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4PrefixCount) - ipv4PrefixCount = ipv4PrefixCountDecoded - if containerValues.contains(.ipv6Prefixes) { - struct KeyVal0{struct item{}} - let ipv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Prefixes) - if let ipv6PrefixesWrappedContainer = ipv6PrefixesWrappedContainer { - let ipv6PrefixesContainer = try ipv6PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6PrefixSpecificationResponse].self, forKey: .member) - var ipv6PrefixesBuffer:[EC2ClientTypes.Ipv6PrefixSpecificationResponse]? = nil - if let ipv6PrefixesContainer = ipv6PrefixesContainer { - ipv6PrefixesBuffer = [EC2ClientTypes.Ipv6PrefixSpecificationResponse]() - for structureContainer0 in ipv6PrefixesContainer { - ipv6PrefixesBuffer?.append(structureContainer0) - } - } - ipv6Prefixes = ipv6PrefixesBuffer - } else { - ipv6Prefixes = [] - } - } else { - ipv6Prefixes = nil - } - let ipv6PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6PrefixCount) - ipv6PrefixCount = ipv6PrefixCountDecoded - let primaryIpv6Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .primaryIpv6) - primaryIpv6 = primaryIpv6Decoded - let enaSrdSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateEnaSrdSpecification.self, forKey: .enaSrdSpecification) - enaSrdSpecification = enaSrdSpecificationDecoded - let connectionTrackingSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionTrackingSpecification.self, forKey: .connectionTrackingSpecification) - connectionTrackingSpecification = connectionTrackingSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecification() + value.associateCarrierIpAddress = try reader["associateCarrierIpAddress"].readIfPresent() + value.associatePublicIpAddress = try reader["associatePublicIpAddress"].readIfPresent() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.deviceIndex = try reader["deviceIndex"].readIfPresent() + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "groupId", isFlattened: false) + value.interfaceType = try reader["interfaceType"].readIfPresent() + value.ipv6AddressCount = try reader["ipv6AddressCount"].readIfPresent() + value.ipv6Addresses = try reader["ipv6AddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceIpv6Address.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + value.privateIpAddresses = try reader["privateIpAddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrivateIpAddressSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.secondaryPrivateIpAddressCount = try reader["secondaryPrivateIpAddressCount"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.networkCardIndex = try reader["networkCardIndex"].readIfPresent() + value.ipv4Prefixes = try reader["ipv4PrefixSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv4PrefixSpecificationResponse.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv4PrefixCount = try reader["ipv4PrefixCount"].readIfPresent() + value.ipv6Prefixes = try reader["ipv6PrefixSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv6PrefixSpecificationResponse.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv6PrefixCount = try reader["ipv6PrefixCount"].readIfPresent() + value.primaryIpv6 = try reader["primaryIpv6"].readIfPresent() + value.enaSrdSpecification = try reader["enaSrdSpecification"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateEnaSrdSpecification.readingClosure) + value.connectionTrackingSpecification = try reader["connectionTrackingSpecification"].readIfPresent(readingClosure: EC2ClientTypes.ConnectionTrackingSpecification.readingClosure) + return value + } } } @@ -125096,31 +88481,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associateCarrierIpAddress = "AssociateCarrierIpAddress" - case associatePublicIpAddress = "AssociatePublicIpAddress" - case connectionTrackingSpecification = "ConnectionTrackingSpecification" - case deleteOnTermination = "DeleteOnTermination" - case description = "Description" - case deviceIndex = "DeviceIndex" - case enaSrdSpecification = "EnaSrdSpecification" - case groups = "SecurityGroupId" - case interfaceType = "InterfaceType" - case ipv4PrefixCount = "Ipv4PrefixCount" - case ipv4Prefixes = "Ipv4Prefix" - case ipv6AddressCount = "Ipv6AddressCount" - case ipv6Addresses = "Ipv6Addresses" - case ipv6PrefixCount = "Ipv6PrefixCount" - case ipv6Prefixes = "Ipv6Prefix" - case networkCardIndex = "NetworkCardIndex" - case networkInterfaceId = "NetworkInterfaceId" - case primaryIpv6 = "PrimaryIpv6" - case privateIpAddress = "PrivateIpAddress" - case privateIpAddresses = "PrivateIpAddresses" - case secondaryPrivateIpAddressCount = "SecondaryPrivateIpAddressCount" - case subnetId = "SubnetId" - } +extension EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125237,137 +88598,34 @@ extension EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecificationRequ } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associateCarrierIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associateCarrierIpAddress) - associateCarrierIpAddress = associateCarrierIpAddressDecoded - let associatePublicIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associatePublicIpAddress) - associatePublicIpAddress = associatePublicIpAddressDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let deviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deviceIndex) - deviceIndex = deviceIndexDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct SecurityGroupId{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupsBuffer:[Swift.String]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [Swift.String]() - for stringContainer0 in groupsContainer { - groupsBuffer?.append(stringContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let interfaceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .interfaceType) - interfaceType = interfaceTypeDecoded - let ipv6AddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6AddressCount) - ipv6AddressCount = ipv6AddressCountDecoded - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct InstanceIpv6Address{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceIpv6AddressRequest].self, forKey: .member) - var ipv6AddressesBuffer:[EC2ClientTypes.InstanceIpv6AddressRequest]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [EC2ClientTypes.InstanceIpv6AddressRequest]() - for structureContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(structureContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.PrivateIpAddressSpecification].self, forKey: .member) - var privateIpAddressesBuffer:[EC2ClientTypes.PrivateIpAddressSpecification]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [EC2ClientTypes.PrivateIpAddressSpecification]() - for structureContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(structureContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let secondaryPrivateIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondaryPrivateIpAddressCount) - secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCountDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let networkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .networkCardIndex) - networkCardIndex = networkCardIndexDecoded - if containerValues.contains(.ipv4Prefixes) { - struct KeyVal0{struct item{}} - let ipv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv4Prefixes) - if let ipv4PrefixesWrappedContainer = ipv4PrefixesWrappedContainer { - let ipv4PrefixesContainer = try ipv4PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv4PrefixSpecificationRequest].self, forKey: .member) - var ipv4PrefixesBuffer:[EC2ClientTypes.Ipv4PrefixSpecificationRequest]? = nil - if let ipv4PrefixesContainer = ipv4PrefixesContainer { - ipv4PrefixesBuffer = [EC2ClientTypes.Ipv4PrefixSpecificationRequest]() - for structureContainer0 in ipv4PrefixesContainer { - ipv4PrefixesBuffer?.append(structureContainer0) - } - } - ipv4Prefixes = ipv4PrefixesBuffer - } else { - ipv4Prefixes = [] - } - } else { - ipv4Prefixes = nil - } - let ipv4PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4PrefixCount) - ipv4PrefixCount = ipv4PrefixCountDecoded - if containerValues.contains(.ipv6Prefixes) { - struct KeyVal0{struct item{}} - let ipv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Prefixes) - if let ipv6PrefixesWrappedContainer = ipv6PrefixesWrappedContainer { - let ipv6PrefixesContainer = try ipv6PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6PrefixSpecificationRequest].self, forKey: .member) - var ipv6PrefixesBuffer:[EC2ClientTypes.Ipv6PrefixSpecificationRequest]? = nil - if let ipv6PrefixesContainer = ipv6PrefixesContainer { - ipv6PrefixesBuffer = [EC2ClientTypes.Ipv6PrefixSpecificationRequest]() - for structureContainer0 in ipv6PrefixesContainer { - ipv6PrefixesBuffer?.append(structureContainer0) - } - } - ipv6Prefixes = ipv6PrefixesBuffer - } else { - ipv6Prefixes = [] - } - } else { - ipv6Prefixes = nil - } - let ipv6PrefixCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6PrefixCount) - ipv6PrefixCount = ipv6PrefixCountDecoded - let primaryIpv6Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .primaryIpv6) - primaryIpv6 = primaryIpv6Decoded - let enaSrdSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnaSrdSpecificationRequest.self, forKey: .enaSrdSpecification) - enaSrdSpecification = enaSrdSpecificationDecoded - let connectionTrackingSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionTrackingSpecificationRequest.self, forKey: .connectionTrackingSpecification) - connectionTrackingSpecification = connectionTrackingSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest() + value.associateCarrierIpAddress = try reader["AssociateCarrierIpAddress"].readIfPresent() + value.associatePublicIpAddress = try reader["AssociatePublicIpAddress"].readIfPresent() + value.deleteOnTermination = try reader["DeleteOnTermination"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.deviceIndex = try reader["DeviceIndex"].readIfPresent() + value.groups = try reader["SecurityGroupId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroupId", isFlattened: false) + value.interfaceType = try reader["InterfaceType"].readIfPresent() + value.ipv6AddressCount = try reader["Ipv6AddressCount"].readIfPresent() + value.ipv6Addresses = try reader["Ipv6Addresses"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceIpv6AddressRequest.readingClosure, memberNodeInfo: "InstanceIpv6Address", isFlattened: false) + value.networkInterfaceId = try reader["NetworkInterfaceId"].readIfPresent() + value.privateIpAddress = try reader["PrivateIpAddress"].readIfPresent() + value.privateIpAddresses = try reader["PrivateIpAddresses"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrivateIpAddressSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.secondaryPrivateIpAddressCount = try reader["SecondaryPrivateIpAddressCount"].readIfPresent() + value.subnetId = try reader["SubnetId"].readIfPresent() + value.networkCardIndex = try reader["NetworkCardIndex"].readIfPresent() + value.ipv4Prefixes = try reader["Ipv4Prefix"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv4PrefixSpecificationRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv4PrefixCount = try reader["Ipv4PrefixCount"].readIfPresent() + value.ipv6Prefixes = try reader["Ipv6Prefix"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv6PrefixSpecificationRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv6PrefixCount = try reader["Ipv6PrefixCount"].readIfPresent() + value.primaryIpv6 = try reader["PrimaryIpv6"].readIfPresent() + value.enaSrdSpecification = try reader["EnaSrdSpecification"].readIfPresent(readingClosure: EC2ClientTypes.EnaSrdSpecificationRequest.readingClosure) + value.connectionTrackingSpecification = try reader["ConnectionTrackingSpecification"].readIfPresent(readingClosure: EC2ClientTypes.ConnectionTrackingSpecificationRequest.readingClosure) + return value + } } } @@ -125471,10 +88729,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateLicenseConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case licenseConfigurationArn = "licenseConfigurationArn" - } +extension EC2ClientTypes.LaunchTemplateLicenseConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125483,10 +88738,13 @@ extension EC2ClientTypes.LaunchTemplateLicenseConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let licenseConfigurationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseConfigurationArn) - licenseConfigurationArn = licenseConfigurationArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateLicenseConfiguration() + value.licenseConfigurationArn = try reader["licenseConfigurationArn"].readIfPresent() + return value + } } } @@ -125506,10 +88764,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateLicenseConfigurationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case licenseConfigurationArn = "LicenseConfigurationArn" - } +extension EC2ClientTypes.LaunchTemplateLicenseConfigurationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125518,10 +88773,13 @@ extension EC2ClientTypes.LaunchTemplateLicenseConfigurationRequest: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let licenseConfigurationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseConfigurationArn) - licenseConfigurationArn = licenseConfigurationArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateLicenseConfigurationRequest() + value.licenseConfigurationArn = try reader["LicenseConfigurationArn"].readIfPresent() + return value + } } } @@ -125541,16 +88799,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateOverrides: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case instanceRequirements = "instanceRequirements" - case instanceType = "instanceType" - case priority = "priority" - case spotPrice = "spotPrice" - case subnetId = "subnetId" - case weightedCapacity = "weightedCapacity" - } +extension EC2ClientTypes.LaunchTemplateOverrides: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125577,22 +88826,19 @@ extension EC2ClientTypes.LaunchTemplateOverrides: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let spotPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotPrice) - spotPrice = spotPriceDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let weightedCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .weightedCapacity) - weightedCapacity = weightedCapacityDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .priority) - priority = priorityDecoded - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirements.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateOverrides() + value.instanceType = try reader["instanceType"].readIfPresent() + value.spotPrice = try reader["spotPrice"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.weightedCapacity = try reader["weightedCapacity"].readIfPresent() + value.priority = try reader["priority"].readIfPresent() + value.instanceRequirements = try reader["instanceRequirements"].readIfPresent(readingClosure: EC2ClientTypes.InstanceRequirements.readingClosure) + return value + } } } @@ -125636,18 +88882,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplatePlacement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case affinity = "affinity" - case availabilityZone = "availabilityZone" - case groupId = "groupId" - case groupName = "groupName" - case hostId = "hostId" - case hostResourceGroupArn = "hostResourceGroupArn" - case partitionNumber = "partitionNumber" - case spreadDomain = "spreadDomain" - case tenancy = "tenancy" - } +extension EC2ClientTypes.LaunchTemplatePlacement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125680,26 +88915,21 @@ extension EC2ClientTypes.LaunchTemplatePlacement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let affinityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .affinity) - affinity = affinityDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let hostIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostId) - hostId = hostIdDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - let spreadDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spreadDomain) - spreadDomain = spreadDomainDecoded - let hostResourceGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostResourceGroupArn) - hostResourceGroupArn = hostResourceGroupArnDecoded - let partitionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partitionNumber) - partitionNumber = partitionNumberDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplatePlacement() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.affinity = try reader["affinity"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.hostId = try reader["hostId"].readIfPresent() + value.tenancy = try reader["tenancy"].readIfPresent() + value.spreadDomain = try reader["spreadDomain"].readIfPresent() + value.hostResourceGroupArn = try reader["hostResourceGroupArn"].readIfPresent() + value.partitionNumber = try reader["partitionNumber"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + return value + } } } @@ -125751,18 +88981,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplatePlacementRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case affinity = "Affinity" - case availabilityZone = "AvailabilityZone" - case groupId = "GroupId" - case groupName = "GroupName" - case hostId = "HostId" - case hostResourceGroupArn = "HostResourceGroupArn" - case partitionNumber = "PartitionNumber" - case spreadDomain = "SpreadDomain" - case tenancy = "Tenancy" - } +extension EC2ClientTypes.LaunchTemplatePlacementRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125795,26 +89014,21 @@ extension EC2ClientTypes.LaunchTemplatePlacementRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let affinityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .affinity) - affinity = affinityDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let hostIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostId) - hostId = hostIdDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - let spreadDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spreadDomain) - spreadDomain = spreadDomainDecoded - let hostResourceGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostResourceGroupArn) - hostResourceGroupArn = hostResourceGroupArnDecoded - let partitionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partitionNumber) - partitionNumber = partitionNumberDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplatePlacementRequest() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.affinity = try reader["Affinity"].readIfPresent() + value.groupName = try reader["GroupName"].readIfPresent() + value.hostId = try reader["HostId"].readIfPresent() + value.tenancy = try reader["Tenancy"].readIfPresent() + value.spreadDomain = try reader["SpreadDomain"].readIfPresent() + value.hostResourceGroupArn = try reader["HostResourceGroupArn"].readIfPresent() + value.partitionNumber = try reader["PartitionNumber"].readIfPresent() + value.groupId = try reader["GroupId"].readIfPresent() + return value + } } } @@ -125866,12 +89080,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplatePrivateDnsNameOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableResourceNameDnsAAAARecord = "enableResourceNameDnsAAAARecord" - case enableResourceNameDnsARecord = "enableResourceNameDnsARecord" - case hostnameType = "hostnameType" - } +extension EC2ClientTypes.LaunchTemplatePrivateDnsNameOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125886,14 +89095,15 @@ extension EC2ClientTypes.LaunchTemplatePrivateDnsNameOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostnameTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostnameType.self, forKey: .hostnameType) - hostnameType = hostnameTypeDecoded - let enableResourceNameDnsARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsARecord) - enableResourceNameDnsARecord = enableResourceNameDnsARecordDecoded - let enableResourceNameDnsAAAARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsAAAARecord) - enableResourceNameDnsAAAARecord = enableResourceNameDnsAAAARecordDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplatePrivateDnsNameOptions() + value.hostnameType = try reader["hostnameType"].readIfPresent() + value.enableResourceNameDnsARecord = try reader["enableResourceNameDnsARecord"].readIfPresent() + value.enableResourceNameDnsAAAARecord = try reader["enableResourceNameDnsAAAARecord"].readIfPresent() + return value + } } } @@ -125921,12 +89131,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplatePrivateDnsNameOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableResourceNameDnsAAAARecord = "EnableResourceNameDnsAAAARecord" - case enableResourceNameDnsARecord = "EnableResourceNameDnsARecord" - case hostnameType = "HostnameType" - } +extension EC2ClientTypes.LaunchTemplatePrivateDnsNameOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125941,14 +89146,15 @@ extension EC2ClientTypes.LaunchTemplatePrivateDnsNameOptionsRequest: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostnameTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostnameType.self, forKey: .hostnameType) - hostnameType = hostnameTypeDecoded - let enableResourceNameDnsARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsARecord) - enableResourceNameDnsARecord = enableResourceNameDnsARecordDecoded - let enableResourceNameDnsAAAARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsAAAARecord) - enableResourceNameDnsAAAARecord = enableResourceNameDnsAAAARecordDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplatePrivateDnsNameOptionsRequest() + value.hostnameType = try reader["HostnameType"].readIfPresent() + value.enableResourceNameDnsARecord = try reader["EnableResourceNameDnsARecord"].readIfPresent() + value.enableResourceNameDnsAAAARecord = try reader["EnableResourceNameDnsAAAARecord"].readIfPresent() + return value + } } } @@ -125976,12 +89182,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplateId = "LaunchTemplateId" - case launchTemplateName = "LaunchTemplateName" - case version = "Version" - } +extension EC2ClientTypes.LaunchTemplateSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -125996,14 +89197,15 @@ extension EC2ClientTypes.LaunchTemplateSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateSpecification() + value.launchTemplateId = try reader["LaunchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["LaunchTemplateName"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -126031,14 +89233,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateSpotMarketOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDurationMinutes = "blockDurationMinutes" - case instanceInterruptionBehavior = "instanceInterruptionBehavior" - case maxPrice = "maxPrice" - case spotInstanceType = "spotInstanceType" - case validUntil = "validUntil" - } +extension EC2ClientTypes.LaunchTemplateSpotMarketOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126059,18 +89254,17 @@ extension EC2ClientTypes.LaunchTemplateSpotMarketOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxPrice) - maxPrice = maxPriceDecoded - let spotInstanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceType.self, forKey: .spotInstanceType) - spotInstanceType = spotInstanceTypeDecoded - let blockDurationMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .blockDurationMinutes) - blockDurationMinutes = blockDurationMinutesDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - let instanceInterruptionBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceInterruptionBehavior.self, forKey: .instanceInterruptionBehavior) - instanceInterruptionBehavior = instanceInterruptionBehaviorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateSpotMarketOptions() + value.maxPrice = try reader["maxPrice"].readIfPresent() + value.spotInstanceType = try reader["spotInstanceType"].readIfPresent() + value.blockDurationMinutes = try reader["blockDurationMinutes"].readIfPresent() + value.validUntil = try reader["validUntil"].readTimestampIfPresent(format: .dateTime) + value.instanceInterruptionBehavior = try reader["instanceInterruptionBehavior"].readIfPresent() + return value + } } } @@ -126106,14 +89300,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateSpotMarketOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDurationMinutes = "BlockDurationMinutes" - case instanceInterruptionBehavior = "InstanceInterruptionBehavior" - case maxPrice = "MaxPrice" - case spotInstanceType = "SpotInstanceType" - case validUntil = "ValidUntil" - } +extension EC2ClientTypes.LaunchTemplateSpotMarketOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126134,18 +89321,17 @@ extension EC2ClientTypes.LaunchTemplateSpotMarketOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxPrice) - maxPrice = maxPriceDecoded - let spotInstanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceType.self, forKey: .spotInstanceType) - spotInstanceType = spotInstanceTypeDecoded - let blockDurationMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .blockDurationMinutes) - blockDurationMinutes = blockDurationMinutesDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - let instanceInterruptionBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceInterruptionBehavior.self, forKey: .instanceInterruptionBehavior) - instanceInterruptionBehavior = instanceInterruptionBehaviorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateSpotMarketOptionsRequest() + value.maxPrice = try reader["MaxPrice"].readIfPresent() + value.spotInstanceType = try reader["SpotInstanceType"].readIfPresent() + value.blockDurationMinutes = try reader["BlockDurationMinutes"].readIfPresent() + value.validUntil = try reader["ValidUntil"].readTimestampIfPresent(format: .dateTime) + value.instanceInterruptionBehavior = try reader["InstanceInterruptionBehavior"].readIfPresent() + return value + } } } @@ -126188,11 +89374,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateTagSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceType = "resourceType" - case tags = "tagSet" - } +extension EC2ClientTypes.LaunchTemplateTagSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126213,28 +89395,13 @@ extension EC2ClientTypes.LaunchTemplateTagSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateTagSpecification() + value.resourceType = try reader["resourceType"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -126259,11 +89426,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateTagSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceType = "ResourceType" - case tags = "Tag" - } +extension EC2ClientTypes.LaunchTemplateTagSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126284,28 +89447,13 @@ extension EC2ClientTypes.LaunchTemplateTagSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateTagSpecificationRequest() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.tags = try reader["Tag"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -126330,17 +89478,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplateVersion: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "createTime" - case createdBy = "createdBy" - case defaultVersion = "defaultVersion" - case launchTemplateData = "launchTemplateData" - case launchTemplateId = "launchTemplateId" - case launchTemplateName = "launchTemplateName" - case versionDescription = "versionDescription" - case versionNumber = "versionNumber" - } +extension EC2ClientTypes.LaunchTemplateVersion: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126370,24 +89508,20 @@ extension EC2ClientTypes.LaunchTemplateVersion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let versionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .versionNumber) - versionNumber = versionNumberDecoded - let versionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionDescription) - versionDescription = versionDescriptionDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let createdByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .createdBy) - createdBy = createdByDecoded - let defaultVersionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .defaultVersion) - defaultVersion = defaultVersionDecoded - let launchTemplateDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResponseLaunchTemplateData.self, forKey: .launchTemplateData) - launchTemplateData = launchTemplateDataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplateVersion() + value.launchTemplateId = try reader["launchTemplateId"].readIfPresent() + value.launchTemplateName = try reader["launchTemplateName"].readIfPresent() + value.versionNumber = try reader["versionNumber"].readIfPresent() + value.versionDescription = try reader["versionDescription"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.createdBy = try reader["createdBy"].readIfPresent() + value.defaultVersion = try reader["defaultVersion"].readIfPresent() + value.launchTemplateData = try reader["launchTemplateData"].readIfPresent(readingClosure: EC2ClientTypes.ResponseLaunchTemplateData.readingClosure) + return value + } } } @@ -126435,10 +89569,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplatesMonitoring: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "enabled" - } +extension EC2ClientTypes.LaunchTemplatesMonitoring: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126447,10 +89578,13 @@ extension EC2ClientTypes.LaunchTemplatesMonitoring: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplatesMonitoring() + value.enabled = try reader["enabled"].readIfPresent() + return value + } } } @@ -126470,10 +89604,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LaunchTemplatesMonitoringRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - } +extension EC2ClientTypes.LaunchTemplatesMonitoringRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126482,10 +89613,13 @@ extension EC2ClientTypes.LaunchTemplatesMonitoringRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LaunchTemplatesMonitoringRequest() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -126505,10 +89639,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LicenseConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case licenseConfigurationArn = "licenseConfigurationArn" - } +extension EC2ClientTypes.LicenseConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126517,10 +89648,13 @@ extension EC2ClientTypes.LicenseConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let licenseConfigurationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseConfigurationArn) - licenseConfigurationArn = licenseConfigurationArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LicenseConfiguration() + value.licenseConfigurationArn = try reader["licenseConfigurationArn"].readIfPresent() + return value + } } } @@ -126540,10 +89674,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LicenseConfigurationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case licenseConfigurationArn = "LicenseConfigurationArn" - } +extension EC2ClientTypes.LicenseConfigurationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -126552,10 +89683,13 @@ extension EC2ClientTypes.LicenseConfigurationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let licenseConfigurationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseConfigurationArn) - licenseConfigurationArn = licenseConfigurationArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LicenseConfigurationRequest() + value.licenseConfigurationArn = try reader["LicenseConfigurationArn"].readIfPresent() + return value + } } } @@ -126635,61 +89769,16 @@ public struct ListImagesInRecycleBinInput: Swift.Equatable { } } -struct ListImagesInRecycleBinInputBody: Swift.Equatable { - let imageIds: [Swift.String]? - let nextToken: Swift.String? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? -} - -extension ListImagesInRecycleBinInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case imageIds = "ImageId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } +extension ListImagesInRecycleBinOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.imageIds) { - struct KeyVal0{struct ImageId{}} - let imageIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .imageIds) - if let imageIdsWrappedContainer = imageIdsWrappedContainer { - let imageIdsContainer = try imageIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var imageIdsBuffer:[Swift.String]? = nil - if let imageIdsContainer = imageIdsContainer { - imageIdsBuffer = [Swift.String]() - for stringContainer0 in imageIdsContainer { - imageIdsBuffer?.append(stringContainer0) - } - } - imageIds = imageIdsBuffer - } else { - imageIds = [] - } - } else { - imageIds = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ListImagesInRecycleBinOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListImagesInRecycleBinOutputBody = try responseDecoder.decode(responseBody: data) - self.images = output.images - self.nextToken = output.nextToken - } else { - self.images = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListImagesInRecycleBinOutput() + value.images = try reader["imageSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ImageRecycleBinInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -126710,48 +89799,18 @@ public struct ListImagesInRecycleBinOutput: Swift.Equatable { } } -struct ListImagesInRecycleBinOutputBody: Swift.Equatable { - let images: [EC2ClientTypes.ImageRecycleBinInfo]? - let nextToken: Swift.String? -} - -extension ListImagesInRecycleBinOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case images = "imageSet" - case nextToken = "nextToken" - } +enum ListImagesInRecycleBinOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.images) { - struct KeyVal0{struct item{}} - let imagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .images) - if let imagesWrappedContainer = imagesWrappedContainer { - let imagesContainer = try imagesWrappedContainer.decodeIfPresent([EC2ClientTypes.ImageRecycleBinInfo].self, forKey: .member) - var imagesBuffer:[EC2ClientTypes.ImageRecycleBinInfo]? = nil - if let imagesContainer = imagesContainer { - imagesBuffer = [EC2ClientTypes.ImageRecycleBinInfo]() - for structureContainer0 in imagesContainer { - imagesBuffer?.append(structureContainer0) - } - } - images = imagesBuffer - } else { - images = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - images = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListImagesInRecycleBinOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -126816,61 +89875,16 @@ public struct ListSnapshotsInRecycleBinInput: Swift.Equatable { } } -struct ListSnapshotsInRecycleBinInputBody: Swift.Equatable { - let maxResults: Swift.Int? - let nextToken: Swift.String? - let snapshotIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension ListSnapshotsInRecycleBinInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case snapshotIds = "SnapshotId" - } +extension ListSnapshotsInRecycleBinOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.snapshotIds) { - struct KeyVal0{struct SnapshotId{}} - let snapshotIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotIds) - if let snapshotIdsWrappedContainer = snapshotIdsWrappedContainer { - let snapshotIdsContainer = try snapshotIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var snapshotIdsBuffer:[Swift.String]? = nil - if let snapshotIdsContainer = snapshotIdsContainer { - snapshotIdsBuffer = [Swift.String]() - for stringContainer0 in snapshotIdsContainer { - snapshotIdsBuffer?.append(stringContainer0) - } - } - snapshotIds = snapshotIdsBuffer - } else { - snapshotIds = [] - } - } else { - snapshotIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ListSnapshotsInRecycleBinOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListSnapshotsInRecycleBinOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.snapshots = output.snapshots - } else { - self.nextToken = nil - self.snapshots = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListSnapshotsInRecycleBinOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.snapshots = try reader["snapshotSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SnapshotRecycleBinInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -126891,48 +89905,18 @@ public struct ListSnapshotsInRecycleBinOutput: Swift.Equatable { } } -struct ListSnapshotsInRecycleBinOutputBody: Swift.Equatable { - let snapshots: [EC2ClientTypes.SnapshotRecycleBinInfo]? - let nextToken: Swift.String? -} - -extension ListSnapshotsInRecycleBinOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case snapshots = "snapshotSet" - } +enum ListSnapshotsInRecycleBinOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.snapshots) { - struct KeyVal0{struct item{}} - let snapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshots) - if let snapshotsWrappedContainer = snapshotsWrappedContainer { - let snapshotsContainer = try snapshotsWrappedContainer.decodeIfPresent([EC2ClientTypes.SnapshotRecycleBinInfo].self, forKey: .member) - var snapshotsBuffer:[EC2ClientTypes.SnapshotRecycleBinInfo]? = nil - if let snapshotsContainer = snapshotsContainer { - snapshotsBuffer = [EC2ClientTypes.SnapshotRecycleBinInfo]() - for structureContainer0 in snapshotsContainer { - snapshotsBuffer?.append(structureContainer0) - } - } - snapshots = snapshotsBuffer - } else { - snapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - snapshots = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListSnapshotsInRecycleBinOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -127013,11 +89997,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LoadBalancersConfig: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case classicLoadBalancersConfig = "classicLoadBalancersConfig" - case targetGroupsConfig = "targetGroupsConfig" - } +extension EC2ClientTypes.LoadBalancersConfig: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127029,12 +90009,14 @@ extension EC2ClientTypes.LoadBalancersConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let classicLoadBalancersConfigDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClassicLoadBalancersConfig.self, forKey: .classicLoadBalancersConfig) - classicLoadBalancersConfig = classicLoadBalancersConfigDecoded - let targetGroupsConfigDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetGroupsConfig.self, forKey: .targetGroupsConfig) - targetGroupsConfig = targetGroupsConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LoadBalancersConfig() + value.classicLoadBalancersConfig = try reader["classicLoadBalancersConfig"].readIfPresent(readingClosure: EC2ClientTypes.ClassicLoadBalancersConfig.readingClosure) + value.targetGroupsConfig = try reader["targetGroupsConfig"].readIfPresent(readingClosure: EC2ClientTypes.TargetGroupsConfig.readingClosure) + return value + } } } @@ -127058,11 +90040,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LoadPermission: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case group = "group" - case userId = "userId" - } +extension EC2ClientTypes.LoadPermission: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127074,12 +90052,14 @@ extension EC2ClientTypes.LoadPermission: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let groupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PermissionGroup.self, forKey: .group) - group = groupDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LoadPermission() + value.userId = try reader["userId"].readIfPresent() + value.group = try reader["group"].readIfPresent() + return value + } } } @@ -127103,11 +90083,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LoadPermissionModifications: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case add = "Add" - case remove = "Remove" - } +extension EC2ClientTypes.LoadPermissionModifications: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127137,45 +90113,13 @@ extension EC2ClientTypes.LoadPermissionModifications: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.add) { - struct KeyVal0{struct item{}} - let addWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .add) - if let addWrappedContainer = addWrappedContainer { - let addContainer = try addWrappedContainer.decodeIfPresent([EC2ClientTypes.LoadPermissionRequest].self, forKey: .member) - var addBuffer:[EC2ClientTypes.LoadPermissionRequest]? = nil - if let addContainer = addContainer { - addBuffer = [EC2ClientTypes.LoadPermissionRequest]() - for structureContainer0 in addContainer { - addBuffer?.append(structureContainer0) - } - } - add = addBuffer - } else { - add = [] - } - } else { - add = nil - } - if containerValues.contains(.remove) { - struct KeyVal0{struct item{}} - let removeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .remove) - if let removeWrappedContainer = removeWrappedContainer { - let removeContainer = try removeWrappedContainer.decodeIfPresent([EC2ClientTypes.LoadPermissionRequest].self, forKey: .member) - var removeBuffer:[EC2ClientTypes.LoadPermissionRequest]? = nil - if let removeContainer = removeContainer { - removeBuffer = [EC2ClientTypes.LoadPermissionRequest]() - for structureContainer0 in removeContainer { - removeBuffer?.append(structureContainer0) - } - } - remove = removeBuffer - } else { - remove = [] - } - } else { - remove = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LoadPermissionModifications() + value.add = try reader["Add"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LoadPermissionRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.remove = try reader["Remove"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LoadPermissionRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -127200,11 +90144,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LoadPermissionRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case group = "Group" - case userId = "UserId" - } +extension EC2ClientTypes.LoadPermissionRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127216,12 +90156,14 @@ extension EC2ClientTypes.LoadPermissionRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PermissionGroup.self, forKey: .group) - group = groupDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LoadPermissionRequest() + value.group = try reader["Group"].readIfPresent() + value.userId = try reader["UserId"].readIfPresent() + return value + } } } @@ -127245,14 +90187,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LocalGateway: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayId = "localGatewayId" - case outpostArn = "outpostArn" - case ownerId = "ownerId" - case state = "state" - case tags = "tagSet" - } +extension EC2ClientTypes.LocalGateway: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127282,34 +90217,16 @@ extension EC2ClientTypes.LocalGateway: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LocalGateway() + value.localGatewayId = try reader["localGatewayId"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -127346,20 +90263,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LocalGatewayRoute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coipPoolId = "coipPoolId" - case destinationCidrBlock = "destinationCidrBlock" - case destinationPrefixListId = "destinationPrefixListId" - case localGatewayRouteTableArn = "localGatewayRouteTableArn" - case localGatewayRouteTableId = "localGatewayRouteTableId" - case localGatewayVirtualInterfaceGroupId = "localGatewayVirtualInterfaceGroupId" - case networkInterfaceId = "networkInterfaceId" - case ownerId = "ownerId" - case state = "state" - case subnetId = "subnetId" - case type = "type" - } +extension EC2ClientTypes.LocalGatewayRoute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127398,30 +90302,23 @@ extension EC2ClientTypes.LocalGatewayRoute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let localGatewayVirtualInterfaceGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayVirtualInterfaceGroupId) - localGatewayVirtualInterfaceGroupId = localGatewayVirtualInterfaceGroupIdDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteType.self, forKey: .type) - type = typeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteState.self, forKey: .state) - state = stateDecoded - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let localGatewayRouteTableArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableArn) - localGatewayRouteTableArn = localGatewayRouteTableArnDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let coipPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coipPoolId) - coipPoolId = coipPoolIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LocalGatewayRoute() + value.destinationCidrBlock = try reader["destinationCidrBlock"].readIfPresent() + value.localGatewayVirtualInterfaceGroupId = try reader["localGatewayVirtualInterfaceGroupId"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.localGatewayRouteTableId = try reader["localGatewayRouteTableId"].readIfPresent() + value.localGatewayRouteTableArn = try reader["localGatewayRouteTableArn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.coipPoolId = try reader["coipPoolId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.destinationPrefixListId = try reader["destinationPrefixListId"].readIfPresent() + return value + } } } @@ -127522,18 +90419,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LocalGatewayRouteTable: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayId = "localGatewayId" - case localGatewayRouteTableArn = "localGatewayRouteTableArn" - case localGatewayRouteTableId = "localGatewayRouteTableId" - case mode = "mode" - case outpostArn = "outpostArn" - case ownerId = "ownerId" - case state = "state" - case stateReason = "stateReason" - case tags = "tagSet" - } +extension EC2ClientTypes.LocalGatewayRouteTable: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127575,43 +90461,21 @@ extension EC2ClientTypes.LocalGatewayRouteTable: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let localGatewayRouteTableArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableArn) - localGatewayRouteTableArn = localGatewayRouteTableArnDecoded - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LocalGatewayRouteTable() + value.localGatewayRouteTableId = try reader["localGatewayRouteTableId"].readIfPresent() + value.localGatewayRouteTableArn = try reader["localGatewayRouteTableArn"].readIfPresent() + value.localGatewayId = try reader["localGatewayId"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.mode = try reader["mode"].readIfPresent() + value.stateReason = try reader["stateReason"].readIfPresent(readingClosure: EC2ClientTypes.StateReason.readingClosure) + return value } - let modeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRouteTableMode.self, forKey: .mode) - mode = modeDecoded - let stateReasonDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StateReason.self, forKey: .stateReason) - stateReason = stateReasonDecoded } } @@ -127695,17 +90559,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayId = "localGatewayId" - case localGatewayRouteTableArn = "localGatewayRouteTableArn" - case localGatewayRouteTableId = "localGatewayRouteTableId" - case localGatewayRouteTableVirtualInterfaceGroupAssociationId = "localGatewayRouteTableVirtualInterfaceGroupAssociationId" - case localGatewayVirtualInterfaceGroupId = "localGatewayVirtualInterfaceGroupId" - case ownerId = "ownerId" - case state = "state" - case tags = "tagSet" - } +extension EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127744,40 +90598,19 @@ extension EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation: } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableVirtualInterfaceGroupAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableVirtualInterfaceGroupAssociationId) - localGatewayRouteTableVirtualInterfaceGroupAssociationId = localGatewayRouteTableVirtualInterfaceGroupAssociationIdDecoded - let localGatewayVirtualInterfaceGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayVirtualInterfaceGroupId) - localGatewayVirtualInterfaceGroupId = localGatewayVirtualInterfaceGroupIdDecoded - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let localGatewayRouteTableArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableArn) - localGatewayRouteTableArn = localGatewayRouteTableArnDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LocalGatewayRouteTableVirtualInterfaceGroupAssociation() + value.localGatewayRouteTableVirtualInterfaceGroupAssociationId = try reader["localGatewayRouteTableVirtualInterfaceGroupAssociationId"].readIfPresent() + value.localGatewayVirtualInterfaceGroupId = try reader["localGatewayVirtualInterfaceGroupId"].readIfPresent() + value.localGatewayId = try reader["localGatewayId"].readIfPresent() + value.localGatewayRouteTableId = try reader["localGatewayRouteTableId"].readIfPresent() + value.localGatewayRouteTableArn = try reader["localGatewayRouteTableArn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -127826,17 +90659,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LocalGatewayRouteTableVpcAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayId = "localGatewayId" - case localGatewayRouteTableArn = "localGatewayRouteTableArn" - case localGatewayRouteTableId = "localGatewayRouteTableId" - case localGatewayRouteTableVpcAssociationId = "localGatewayRouteTableVpcAssociationId" - case ownerId = "ownerId" - case state = "state" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.LocalGatewayRouteTableVpcAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -127875,40 +90698,19 @@ extension EC2ClientTypes.LocalGatewayRouteTableVpcAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableVpcAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableVpcAssociationId) - localGatewayRouteTableVpcAssociationId = localGatewayRouteTableVpcAssociationIdDecoded - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let localGatewayRouteTableArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableArn) - localGatewayRouteTableArn = localGatewayRouteTableArnDecoded - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LocalGatewayRouteTableVpcAssociation() + value.localGatewayRouteTableVpcAssociationId = try reader["localGatewayRouteTableVpcAssociationId"].readIfPresent() + value.localGatewayRouteTableId = try reader["localGatewayRouteTableId"].readIfPresent() + value.localGatewayRouteTableArn = try reader["localGatewayRouteTableArn"].readIfPresent() + value.localGatewayId = try reader["localGatewayId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -127989,18 +90791,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LocalGatewayVirtualInterface: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localAddress = "localAddress" - case localBgpAsn = "localBgpAsn" - case localGatewayId = "localGatewayId" - case localGatewayVirtualInterfaceId = "localGatewayVirtualInterfaceId" - case ownerId = "ownerId" - case peerAddress = "peerAddress" - case peerBgpAsn = "peerBgpAsn" - case tags = "tagSet" - case vlan = "vlan" - } +extension EC2ClientTypes.LocalGatewayVirtualInterface: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -128042,42 +90833,20 @@ extension EC2ClientTypes.LocalGatewayVirtualInterface: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayVirtualInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayVirtualInterfaceId) - localGatewayVirtualInterfaceId = localGatewayVirtualInterfaceIdDecoded - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let vlanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .vlan) - vlan = vlanDecoded - let localAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localAddress) - localAddress = localAddressDecoded - let peerAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerAddress) - peerAddress = peerAddressDecoded - let localBgpAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .localBgpAsn) - localBgpAsn = localBgpAsnDecoded - let peerBgpAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .peerBgpAsn) - peerBgpAsn = peerBgpAsnDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LocalGatewayVirtualInterface() + value.localGatewayVirtualInterfaceId = try reader["localGatewayVirtualInterfaceId"].readIfPresent() + value.localGatewayId = try reader["localGatewayId"].readIfPresent() + value.vlan = try reader["vlan"].readIfPresent() + value.localAddress = try reader["localAddress"].readIfPresent() + value.peerAddress = try reader["peerAddress"].readIfPresent() + value.localBgpAsn = try reader["localBgpAsn"].readIfPresent() + value.peerBgpAsn = try reader["peerBgpAsn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -128130,14 +90899,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.LocalGatewayVirtualInterfaceGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case localGatewayId = "localGatewayId" - case localGatewayVirtualInterfaceGroupId = "localGatewayVirtualInterfaceGroupId" - case localGatewayVirtualInterfaceIds = "localGatewayVirtualInterfaceIdSet" - case ownerId = "ownerId" - case tags = "tagSet" - } +extension EC2ClientTypes.LocalGatewayVirtualInterfaceGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -128176,51 +90938,16 @@ extension EC2ClientTypes.LocalGatewayVirtualInterfaceGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayVirtualInterfaceGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayVirtualInterfaceGroupId) - localGatewayVirtualInterfaceGroupId = localGatewayVirtualInterfaceGroupIdDecoded - if containerValues.contains(.localGatewayVirtualInterfaceIds) { - struct KeyVal0{struct item{}} - let localGatewayVirtualInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .localGatewayVirtualInterfaceIds) - if let localGatewayVirtualInterfaceIdsWrappedContainer = localGatewayVirtualInterfaceIdsWrappedContainer { - let localGatewayVirtualInterfaceIdsContainer = try localGatewayVirtualInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var localGatewayVirtualInterfaceIdsBuffer:[Swift.String]? = nil - if let localGatewayVirtualInterfaceIdsContainer = localGatewayVirtualInterfaceIdsContainer { - localGatewayVirtualInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in localGatewayVirtualInterfaceIdsContainer { - localGatewayVirtualInterfaceIdsBuffer?.append(stringContainer0) - } - } - localGatewayVirtualInterfaceIds = localGatewayVirtualInterfaceIdsBuffer - } else { - localGatewayVirtualInterfaceIds = [] - } - } else { - localGatewayVirtualInterfaceIds = nil - } - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LocalGatewayVirtualInterfaceGroup() + value.localGatewayVirtualInterfaceGroupId = try reader["localGatewayVirtualInterfaceGroupId"].readIfPresent() + value.localGatewayVirtualInterfaceIds = try reader["localGatewayVirtualInterfaceIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.localGatewayId = try reader["localGatewayId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -128472,64 +91199,22 @@ public struct LockSnapshotInput: Swift.Equatable { } } -struct LockSnapshotInputBody: Swift.Equatable { - let snapshotId: Swift.String? - let dryRun: Swift.Bool? - let lockMode: EC2ClientTypes.LockMode? - let coolOffPeriod: Swift.Int? - let lockDuration: Swift.Int? - let expirationDate: ClientRuntime.Date? -} - -extension LockSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coolOffPeriod = "CoolOffPeriod" - case dryRun = "DryRun" - case expirationDate = "ExpirationDate" - case lockDuration = "LockDuration" - case lockMode = "LockMode" - case snapshotId = "SnapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let lockModeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LockMode.self, forKey: .lockMode) - lockMode = lockModeDecoded - let coolOffPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .coolOffPeriod) - coolOffPeriod = coolOffPeriodDecoded - let lockDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .lockDuration) - lockDuration = lockDurationDecoded - let expirationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expirationDate) - expirationDate = expirationDateDecoded - } -} - -extension LockSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: LockSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.coolOffPeriod = output.coolOffPeriod - self.coolOffPeriodExpiresOn = output.coolOffPeriodExpiresOn - self.lockCreatedOn = output.lockCreatedOn - self.lockDuration = output.lockDuration - self.lockDurationStartTime = output.lockDurationStartTime - self.lockExpiresOn = output.lockExpiresOn - self.lockState = output.lockState - self.snapshotId = output.snapshotId - } else { - self.coolOffPeriod = nil - self.coolOffPeriodExpiresOn = nil - self.lockCreatedOn = nil - self.lockDuration = nil - self.lockDurationStartTime = nil - self.lockExpiresOn = nil - self.lockState = nil - self.snapshotId = nil +extension LockSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = LockSnapshotOutput() + value.coolOffPeriod = try reader["coolOffPeriod"].readIfPresent() + value.coolOffPeriodExpiresOn = try reader["coolOffPeriodExpiresOn"].readTimestampIfPresent(format: .dateTime) + value.lockCreatedOn = try reader["lockCreatedOn"].readTimestampIfPresent(format: .dateTime) + value.lockDuration = try reader["lockDuration"].readIfPresent() + value.lockDurationStartTime = try reader["lockDurationStartTime"].readTimestampIfPresent(format: .dateTime) + value.lockExpiresOn = try reader["lockExpiresOn"].readTimestampIfPresent(format: .dateTime) + value.lockState = try reader["lockState"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + return value } } } @@ -128582,55 +91267,18 @@ public struct LockSnapshotOutput: Swift.Equatable { } } -struct LockSnapshotOutputBody: Swift.Equatable { - let snapshotId: Swift.String? - let lockState: EC2ClientTypes.LockState? - let lockDuration: Swift.Int? - let coolOffPeriod: Swift.Int? - let coolOffPeriodExpiresOn: ClientRuntime.Date? - let lockCreatedOn: ClientRuntime.Date? - let lockExpiresOn: ClientRuntime.Date? - let lockDurationStartTime: ClientRuntime.Date? -} - -extension LockSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coolOffPeriod = "coolOffPeriod" - case coolOffPeriodExpiresOn = "coolOffPeriodExpiresOn" - case lockCreatedOn = "lockCreatedOn" - case lockDuration = "lockDuration" - case lockDurationStartTime = "lockDurationStartTime" - case lockExpiresOn = "lockExpiresOn" - case lockState = "lockState" - case snapshotId = "snapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let lockStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LockState.self, forKey: .lockState) - lockState = lockStateDecoded - let lockDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .lockDuration) - lockDuration = lockDurationDecoded - let coolOffPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .coolOffPeriod) - coolOffPeriod = coolOffPeriodDecoded - let coolOffPeriodExpiresOnDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .coolOffPeriodExpiresOn) - coolOffPeriodExpiresOn = coolOffPeriodExpiresOnDecoded - let lockCreatedOnDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lockCreatedOn) - lockCreatedOn = lockCreatedOnDecoded - let lockExpiresOnDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lockExpiresOn) - lockExpiresOn = lockExpiresOnDecoded - let lockDurationStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lockDurationStartTime) - lockDurationStartTime = lockDurationStartTimeDecoded - } -} +enum LockSnapshotOutputError { -enum LockSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -128673,18 +91321,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.LockedSnapshotsInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coolOffPeriod = "coolOffPeriod" - case coolOffPeriodExpiresOn = "coolOffPeriodExpiresOn" - case lockCreatedOn = "lockCreatedOn" - case lockDuration = "lockDuration" - case lockDurationStartTime = "lockDurationStartTime" - case lockExpiresOn = "lockExpiresOn" - case lockState = "lockState" - case ownerId = "ownerId" - case snapshotId = "snapshotId" - } +extension EC2ClientTypes.LockedSnapshotsInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -128717,26 +91354,21 @@ extension EC2ClientTypes.LockedSnapshotsInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let lockStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LockState.self, forKey: .lockState) - lockState = lockStateDecoded - let lockDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .lockDuration) - lockDuration = lockDurationDecoded - let coolOffPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .coolOffPeriod) - coolOffPeriod = coolOffPeriodDecoded - let coolOffPeriodExpiresOnDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .coolOffPeriodExpiresOn) - coolOffPeriodExpiresOn = coolOffPeriodExpiresOnDecoded - let lockCreatedOnDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lockCreatedOn) - lockCreatedOn = lockCreatedOnDecoded - let lockDurationStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lockDurationStartTime) - lockDurationStartTime = lockDurationStartTimeDecoded - let lockExpiresOnDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lockExpiresOn) - lockExpiresOn = lockExpiresOnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.LockedSnapshotsInfo() + value.ownerId = try reader["ownerId"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.lockState = try reader["lockState"].readIfPresent() + value.lockDuration = try reader["lockDuration"].readIfPresent() + value.coolOffPeriod = try reader["coolOffPeriod"].readIfPresent() + value.coolOffPeriodExpiresOn = try reader["coolOffPeriodExpiresOn"].readTimestampIfPresent(format: .dateTime) + value.lockCreatedOn = try reader["lockCreatedOn"].readTimestampIfPresent(format: .dateTime) + value.lockDurationStartTime = try reader["lockDurationStartTime"].readTimestampIfPresent(format: .dateTime) + value.lockExpiresOn = try reader["lockExpiresOn"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -128831,12 +91463,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.MaintenanceDetails: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case lastMaintenanceApplied = "lastMaintenanceApplied" - case maintenanceAutoAppliedAfter = "maintenanceAutoAppliedAfter" - case pendingMaintenance = "pendingMaintenance" - } +extension EC2ClientTypes.MaintenanceDetails: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -128851,14 +91478,15 @@ extension EC2ClientTypes.MaintenanceDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pendingMaintenanceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pendingMaintenance) - pendingMaintenance = pendingMaintenanceDecoded - let maintenanceAutoAppliedAfterDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .maintenanceAutoAppliedAfter) - maintenanceAutoAppliedAfter = maintenanceAutoAppliedAfterDecoded - let lastMaintenanceAppliedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastMaintenanceApplied) - lastMaintenanceApplied = lastMaintenanceAppliedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.MaintenanceDetails() + value.pendingMaintenance = try reader["pendingMaintenance"].readIfPresent() + value.maintenanceAutoAppliedAfter = try reader["maintenanceAutoAppliedAfter"].readTimestampIfPresent(format: .dateTime) + value.lastMaintenanceApplied = try reader["lastMaintenanceApplied"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -128886,19 +91514,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ManagedPrefixList: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressFamily = "addressFamily" - case maxEntries = "maxEntries" - case ownerId = "ownerId" - case prefixListArn = "prefixListArn" - case prefixListId = "prefixListId" - case prefixListName = "prefixListName" - case state = "state" - case stateMessage = "stateMessage" - case tags = "tagSet" - case version = "version" - } +extension EC2ClientTypes.ManagedPrefixList: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -128943,45 +91559,22 @@ extension EC2ClientTypes.ManagedPrefixList: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let addressFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressFamily) - addressFamily = addressFamilyDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PrefixListState.self, forKey: .state) - state = stateDecoded - let stateMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateMessage) - stateMessage = stateMessageDecoded - let prefixListArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListArn) - prefixListArn = prefixListArnDecoded - let prefixListNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListName) - prefixListName = prefixListNameDecoded - let maxEntriesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxEntries) - maxEntries = maxEntriesDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .version) - version = versionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ManagedPrefixList() + value.prefixListId = try reader["prefixListId"].readIfPresent() + value.addressFamily = try reader["addressFamily"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.stateMessage = try reader["stateMessage"].readIfPresent() + value.prefixListArn = try reader["prefixListArn"].readIfPresent() + value.prefixListName = try reader["prefixListName"].readIfPresent() + value.maxEntries = try reader["maxEntries"].readIfPresent() + value.version = try reader["version"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ownerId = try reader["ownerId"].readIfPresent() + return value + } } } @@ -129101,11 +91694,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.MemoryGiBPerVCpu: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.MemoryGiBPerVCpu: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -129117,12 +91706,14 @@ extension EC2ClientTypes.MemoryGiBPerVCpu: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.MemoryGiBPerVCpu() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -129146,11 +91737,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.MemoryGiBPerVCpuRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.MemoryGiBPerVCpuRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -129162,12 +91749,14 @@ extension EC2ClientTypes.MemoryGiBPerVCpuRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.MemoryGiBPerVCpuRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -129191,10 +91780,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.MemoryInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sizeInMiB = "sizeInMiB" - } +extension EC2ClientTypes.MemoryInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -129203,10 +91789,13 @@ extension EC2ClientTypes.MemoryInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sizeInMiBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sizeInMiB) - sizeInMiB = sizeInMiBDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.MemoryInfo() + value.sizeInMiB = try reader["sizeInMiB"].readIfPresent() + return value + } } } @@ -129226,11 +91815,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.MemoryMiB: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.MemoryMiB: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -129242,12 +91827,14 @@ extension EC2ClientTypes.MemoryMiB: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.MemoryMiB() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -129271,11 +91858,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.MemoryMiBRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.MemoryMiBRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -129287,12 +91870,14 @@ extension EC2ClientTypes.MemoryMiBRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.MemoryMiBRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -129317,13 +91902,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.MetricPoint: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endDate = "endDate" - case startDate = "startDate" - case status = "status" - case value = "value" - } +extension EC2ClientTypes.MetricPoint: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -129341,16 +91920,16 @@ extension EC2ClientTypes.MetricPoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let startDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startDate) - startDate = startDateDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.Float.self, forKey: .value) - value = valueDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.MetricPoint() + value.startDate = try reader["startDate"].readTimestampIfPresent(format: .dateTime) + value.endDate = try reader["endDate"].readTimestampIfPresent(format: .dateTime) + value.value = try reader["value"].readIfPresent() + value.status = try reader["status"].readIfPresent() + return value + } } } @@ -129455,38 +92034,15 @@ public struct ModifyAddressAttributeInput: Swift.Equatable { } } -struct ModifyAddressAttributeInputBody: Swift.Equatable { - let allocationId: Swift.String? - let domainName: Swift.String? - let dryRun: Swift.Bool? -} - -extension ModifyAddressAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "AllocationId" - case domainName = "DomainName" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let domainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainName) - domainName = domainNameDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ModifyAddressAttributeOutput { -extension ModifyAddressAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyAddressAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.address = output.address - } else { - self.address = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyAddressAttributeOutput() + value.address = try reader["address"].readIfPresent(readingClosure: EC2ClientTypes.AddressAttribute.readingClosure) + return value } } } @@ -129503,27 +92059,18 @@ public struct ModifyAddressAttributeOutput: Swift.Equatable { } } -struct ModifyAddressAttributeOutputBody: Swift.Equatable { - let address: EC2ClientTypes.AddressAttribute? -} - -extension ModifyAddressAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "address" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressAttribute.self, forKey: .address) - address = addressDecoded - } -} +enum ModifyAddressAttributeOutputError { -enum ModifyAddressAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -129574,38 +92121,15 @@ public struct ModifyAvailabilityZoneGroupInput: Swift.Equatable { } } -struct ModifyAvailabilityZoneGroupInputBody: Swift.Equatable { - let groupName: Swift.String? - let optInStatus: EC2ClientTypes.ModifyAvailabilityZoneOptInStatus? - let dryRun: Swift.Bool? -} - -extension ModifyAvailabilityZoneGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupName = "GroupName" - case optInStatus = "OptInStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let optInStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModifyAvailabilityZoneOptInStatus.self, forKey: .optInStatus) - optInStatus = optInStatusDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ModifyAvailabilityZoneGroupOutput { -extension ModifyAvailabilityZoneGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyAvailabilityZoneGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyAvailabilityZoneGroupOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -129622,27 +92146,18 @@ public struct ModifyAvailabilityZoneGroupOutput: Swift.Equatable { } } -struct ModifyAvailabilityZoneGroupOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyAvailabilityZoneGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyAvailabilityZoneGroupOutputError { -enum ModifyAvailabilityZoneGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -129738,46 +92253,15 @@ public struct ModifyCapacityReservationFleetInput: Swift.Equatable { } } -struct ModifyCapacityReservationFleetInputBody: Swift.Equatable { - let capacityReservationFleetId: Swift.String? - let totalTargetCapacity: Swift.Int? - let endDate: ClientRuntime.Date? - let dryRun: Swift.Bool? - let removeEndDate: Swift.Bool? -} - -extension ModifyCapacityReservationFleetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationFleetId = "CapacityReservationFleetId" - case dryRun = "DryRun" - case endDate = "EndDate" - case removeEndDate = "RemoveEndDate" - case totalTargetCapacity = "TotalTargetCapacity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationFleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationFleetId) - capacityReservationFleetId = capacityReservationFleetIdDecoded - let totalTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalTargetCapacity) - totalTargetCapacity = totalTargetCapacityDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let removeEndDateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .removeEndDate) - removeEndDate = removeEndDateDecoded - } -} +extension ModifyCapacityReservationFleetOutput { -extension ModifyCapacityReservationFleetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCapacityReservationFleetOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyCapacityReservationFleetOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -129794,27 +92278,18 @@ public struct ModifyCapacityReservationFleetOutput: Swift.Equatable { } } -struct ModifyCapacityReservationFleetOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyCapacityReservationFleetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyCapacityReservationFleetOutputError { -enum ModifyCapacityReservationFleetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -129896,54 +92371,15 @@ public struct ModifyCapacityReservationInput: Swift.Equatable { } } -struct ModifyCapacityReservationInputBody: Swift.Equatable { - let capacityReservationId: Swift.String? - let instanceCount: Swift.Int? - let endDate: ClientRuntime.Date? - let endDateType: EC2ClientTypes.EndDateType? - let accept: Swift.Bool? - let dryRun: Swift.Bool? - let additionalInfo: Swift.String? -} - -extension ModifyCapacityReservationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accept = "Accept" - case additionalInfo = "AdditionalInfo" - case capacityReservationId = "CapacityReservationId" - case dryRun = "DryRun" - case endDate = "EndDate" - case endDateType = "EndDateType" - case instanceCount = "InstanceCount" - } +extension ModifyCapacityReservationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityReservationId) - capacityReservationId = capacityReservationIdDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let endDateTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EndDateType.self, forKey: .endDateType) - endDateType = endDateTypeDecoded - let acceptDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .accept) - accept = acceptDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let additionalInfoDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .additionalInfo) - additionalInfo = additionalInfoDecoded - } -} - -extension ModifyCapacityReservationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCapacityReservationOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyCapacityReservationOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -129960,27 +92396,18 @@ public struct ModifyCapacityReservationOutput: Swift.Equatable { } } -struct ModifyCapacityReservationOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyCapacityReservationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } +enum ModifyCapacityReservationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum ModifyCapacityReservationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -130124,99 +92551,15 @@ public struct ModifyClientVpnEndpointInput: Swift.Equatable { } } -struct ModifyClientVpnEndpointInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let serverCertificateArn: Swift.String? - let connectionLogOptions: EC2ClientTypes.ConnectionLogOptions? - let dnsServers: EC2ClientTypes.DnsServersOptionsModifyStructure? - let vpnPort: Swift.Int? - let description: Swift.String? - let splitTunnel: Swift.Bool? - let dryRun: Swift.Bool? - let securityGroupIds: [Swift.String]? - let vpcId: Swift.String? - let selfServicePortal: EC2ClientTypes.SelfServicePortal? - let clientConnectOptions: EC2ClientTypes.ClientConnectOptions? - let sessionTimeoutHours: Swift.Int? - let clientLoginBannerOptions: EC2ClientTypes.ClientLoginBannerOptions? -} - -extension ModifyClientVpnEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientConnectOptions = "ClientConnectOptions" - case clientLoginBannerOptions = "ClientLoginBannerOptions" - case clientVpnEndpointId = "ClientVpnEndpointId" - case connectionLogOptions = "ConnectionLogOptions" - case description = "Description" - case dnsServers = "DnsServers" - case dryRun = "DryRun" - case securityGroupIds = "SecurityGroupId" - case selfServicePortal = "SelfServicePortal" - case serverCertificateArn = "ServerCertificateArn" - case sessionTimeoutHours = "SessionTimeoutHours" - case splitTunnel = "SplitTunnel" - case vpcId = "VpcId" - case vpnPort = "VpnPort" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let serverCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateArn) - serverCertificateArn = serverCertificateArnDecoded - let connectionLogOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionLogOptions.self, forKey: .connectionLogOptions) - connectionLogOptions = connectionLogOptionsDecoded - let dnsServersDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsServersOptionsModifyStructure.self, forKey: .dnsServers) - dnsServers = dnsServersDecoded - let vpnPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .vpnPort) - vpnPort = vpnPortDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let splitTunnelDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .splitTunnel) - splitTunnel = splitTunnelDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let selfServicePortalDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SelfServicePortal.self, forKey: .selfServicePortal) - selfServicePortal = selfServicePortalDecoded - let clientConnectOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientConnectOptions.self, forKey: .clientConnectOptions) - clientConnectOptions = clientConnectOptionsDecoded - let sessionTimeoutHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sessionTimeoutHours) - sessionTimeoutHours = sessionTimeoutHoursDecoded - let clientLoginBannerOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientLoginBannerOptions.self, forKey: .clientLoginBannerOptions) - clientLoginBannerOptions = clientLoginBannerOptionsDecoded - } -} - -extension ModifyClientVpnEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyClientVpnEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil +extension ModifyClientVpnEndpointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyClientVpnEndpointOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -130233,27 +92576,18 @@ public struct ModifyClientVpnEndpointOutput: Swift.Equatable { } } -struct ModifyClientVpnEndpointOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyClientVpnEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyClientVpnEndpointOutputError { -enum ModifyClientVpnEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -130304,38 +92638,15 @@ public struct ModifyDefaultCreditSpecificationInput: Swift.Equatable { } } -struct ModifyDefaultCreditSpecificationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceFamily: EC2ClientTypes.UnlimitedSupportedInstanceFamily? - let cpuCredits: Swift.String? -} +extension ModifyDefaultCreditSpecificationOutput { -extension ModifyDefaultCreditSpecificationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cpuCredits = "CpuCredits" - case dryRun = "DryRun" - case instanceFamily = "InstanceFamily" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceFamilyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UnlimitedSupportedInstanceFamily.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - let cpuCreditsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cpuCredits) - cpuCredits = cpuCreditsDecoded - } -} - -extension ModifyDefaultCreditSpecificationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDefaultCreditSpecificationOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceFamilyCreditSpecification = output.instanceFamilyCreditSpecification - } else { - self.instanceFamilyCreditSpecification = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyDefaultCreditSpecificationOutput() + value.instanceFamilyCreditSpecification = try reader["instanceFamilyCreditSpecification"].readIfPresent(readingClosure: EC2ClientTypes.InstanceFamilyCreditSpecification.readingClosure) + return value } } } @@ -130352,27 +92663,18 @@ public struct ModifyDefaultCreditSpecificationOutput: Swift.Equatable { } } -struct ModifyDefaultCreditSpecificationOutputBody: Swift.Equatable { - let instanceFamilyCreditSpecification: EC2ClientTypes.InstanceFamilyCreditSpecification? -} - -extension ModifyDefaultCreditSpecificationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceFamilyCreditSpecification = "instanceFamilyCreditSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceFamilyCreditSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceFamilyCreditSpecification.self, forKey: .instanceFamilyCreditSpecification) - instanceFamilyCreditSpecification = instanceFamilyCreditSpecificationDecoded - } -} +enum ModifyDefaultCreditSpecificationOutputError { -enum ModifyDefaultCreditSpecificationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -130426,34 +92728,15 @@ public struct ModifyEbsDefaultKmsKeyIdInput: Swift.Equatable { } } -struct ModifyEbsDefaultKmsKeyIdInputBody: Swift.Equatable { - let kmsKeyId: Swift.String? - let dryRun: Swift.Bool? -} - -extension ModifyEbsDefaultKmsKeyIdInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case kmsKeyId = "KmsKeyId" - } +extension ModifyEbsDefaultKmsKeyIdOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifyEbsDefaultKmsKeyIdOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyEbsDefaultKmsKeyIdOutputBody = try responseDecoder.decode(responseBody: data) - self.kmsKeyId = output.kmsKeyId - } else { - self.kmsKeyId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyEbsDefaultKmsKeyIdOutput() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + return value } } } @@ -130470,27 +92753,18 @@ public struct ModifyEbsDefaultKmsKeyIdOutput: Swift.Equatable { } } -struct ModifyEbsDefaultKmsKeyIdOutputBody: Swift.Equatable { - let kmsKeyId: Swift.String? -} - -extension ModifyEbsDefaultKmsKeyIdOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kmsKeyId = "kmsKeyId" - } +enum ModifyEbsDefaultKmsKeyIdOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - } -} - -enum ModifyEbsDefaultKmsKeyIdOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -130570,67 +92844,15 @@ public struct ModifyFleetInput: Swift.Equatable { } } -struct ModifyFleetInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let excessCapacityTerminationPolicy: EC2ClientTypes.FleetExcessCapacityTerminationPolicy? - let launchTemplateConfigs: [EC2ClientTypes.FleetLaunchTemplateConfigRequest]? - let fleetId: Swift.String? - let targetCapacitySpecification: EC2ClientTypes.TargetCapacitySpecificationRequest? - let context: Swift.String? -} - -extension ModifyFleetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case context = "Context" - case dryRun = "DryRun" - case excessCapacityTerminationPolicy = "ExcessCapacityTerminationPolicy" - case fleetId = "FleetId" - case launchTemplateConfigs = "LaunchTemplateConfig" - case targetCapacitySpecification = "TargetCapacitySpecification" - } +extension ModifyFleetOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let excessCapacityTerminationPolicyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetExcessCapacityTerminationPolicy.self, forKey: .excessCapacityTerminationPolicy) - excessCapacityTerminationPolicy = excessCapacityTerminationPolicyDecoded - if containerValues.contains(.launchTemplateConfigs) { - struct KeyVal0{struct item{}} - let launchTemplateConfigsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplateConfigs) - if let launchTemplateConfigsWrappedContainer = launchTemplateConfigsWrappedContainer { - let launchTemplateConfigsContainer = try launchTemplateConfigsWrappedContainer.decodeIfPresent([EC2ClientTypes.FleetLaunchTemplateConfigRequest].self, forKey: .member) - var launchTemplateConfigsBuffer:[EC2ClientTypes.FleetLaunchTemplateConfigRequest]? = nil - if let launchTemplateConfigsContainer = launchTemplateConfigsContainer { - launchTemplateConfigsBuffer = [EC2ClientTypes.FleetLaunchTemplateConfigRequest]() - for structureContainer0 in launchTemplateConfigsContainer { - launchTemplateConfigsBuffer?.append(structureContainer0) - } - } - launchTemplateConfigs = launchTemplateConfigsBuffer - } else { - launchTemplateConfigs = [] - } - } else { - launchTemplateConfigs = nil - } - let fleetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fleetId) - fleetId = fleetIdDecoded - let targetCapacitySpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetCapacitySpecificationRequest.self, forKey: .targetCapacitySpecification) - targetCapacitySpecification = targetCapacitySpecificationDecoded - let contextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .context) - context = contextDecoded - } -} - -extension ModifyFleetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyFleetOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyFleetOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -130647,27 +92869,18 @@ public struct ModifyFleetOutput: Swift.Equatable { } } -struct ModifyFleetOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyFleetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyFleetOutputError { -enum ModifyFleetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -130793,117 +93006,15 @@ public struct ModifyFpgaImageAttributeInput: Swift.Equatable { } } -struct ModifyFpgaImageAttributeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let fpgaImageId: Swift.String? - let attribute: EC2ClientTypes.FpgaImageAttributeName? - let operationType: EC2ClientTypes.OperationType? - let userIds: [Swift.String]? - let userGroups: [Swift.String]? - let productCodes: [Swift.String]? - let loadPermission: EC2ClientTypes.LoadPermissionModifications? - let description: Swift.String? - let name: Swift.String? -} - -extension ModifyFpgaImageAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case description = "Description" - case dryRun = "DryRun" - case fpgaImageId = "FpgaImageId" - case loadPermission = "LoadPermission" - case name = "Name" - case operationType = "OperationType" - case productCodes = "ProductCode" - case userGroups = "UserGroup" - case userIds = "UserId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let fpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageId) - fpgaImageId = fpgaImageIdDecoded - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FpgaImageAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let operationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OperationType.self, forKey: .operationType) - operationType = operationTypeDecoded - if containerValues.contains(.userIds) { - struct KeyVal0{struct UserId{}} - let userIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIds) - if let userIdsWrappedContainer = userIdsWrappedContainer { - let userIdsContainer = try userIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsBuffer:[Swift.String]? = nil - if let userIdsContainer = userIdsContainer { - userIdsBuffer = [Swift.String]() - for stringContainer0 in userIdsContainer { - userIdsBuffer?.append(stringContainer0) - } - } - userIds = userIdsBuffer - } else { - userIds = [] - } - } else { - userIds = nil - } - if containerValues.contains(.userGroups) { - struct KeyVal0{struct UserGroup{}} - let userGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroups) - if let userGroupsWrappedContainer = userGroupsWrappedContainer { - let userGroupsContainer = try userGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupsBuffer:[Swift.String]? = nil - if let userGroupsContainer = userGroupsContainer { - userGroupsBuffer = [Swift.String]() - for stringContainer0 in userGroupsContainer { - userGroupsBuffer?.append(stringContainer0) - } - } - userGroups = userGroupsBuffer - } else { - userGroups = [] - } - } else { - userGroups = nil - } - if containerValues.contains(.productCodes) { - struct KeyVal0{struct ProductCode{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var productCodesBuffer:[Swift.String]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [Swift.String]() - for stringContainer0 in productCodesContainer { - productCodesBuffer?.append(stringContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil - } - let loadPermissionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LoadPermissionModifications.self, forKey: .loadPermission) - loadPermission = loadPermissionDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - } -} - -extension ModifyFpgaImageAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyFpgaImageAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.fpgaImageAttribute = output.fpgaImageAttribute - } else { - self.fpgaImageAttribute = nil +extension ModifyFpgaImageAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyFpgaImageAttributeOutput() + value.fpgaImageAttribute = try reader["fpgaImageAttribute"].readIfPresent(readingClosure: EC2ClientTypes.FpgaImageAttribute.readingClosure) + return value } } } @@ -130920,27 +93031,18 @@ public struct ModifyFpgaImageAttributeOutput: Swift.Equatable { } } -struct ModifyFpgaImageAttributeOutputBody: Swift.Equatable { - let fpgaImageAttribute: EC2ClientTypes.FpgaImageAttribute? -} - -extension ModifyFpgaImageAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fpgaImageAttribute = "fpgaImageAttribute" - } +enum ModifyFpgaImageAttributeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fpgaImageAttributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FpgaImageAttribute.self, forKey: .fpgaImageAttribute) - fpgaImageAttribute = fpgaImageAttributeDecoded - } -} - -enum ModifyFpgaImageAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -131020,69 +93122,16 @@ public struct ModifyHostsInput: Swift.Equatable { } } -struct ModifyHostsInputBody: Swift.Equatable { - let autoPlacement: EC2ClientTypes.AutoPlacement? - let hostIds: [Swift.String]? - let hostRecovery: EC2ClientTypes.HostRecovery? - let instanceType: Swift.String? - let instanceFamily: Swift.String? - let hostMaintenance: EC2ClientTypes.HostMaintenance? -} +extension ModifyHostsOutput { -extension ModifyHostsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoPlacement = "autoPlacement" - case hostIds = "hostId" - case hostMaintenance = "HostMaintenance" - case hostRecovery = "HostRecovery" - case instanceFamily = "InstanceFamily" - case instanceType = "InstanceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoPlacementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AutoPlacement.self, forKey: .autoPlacement) - autoPlacement = autoPlacementDecoded - if containerValues.contains(.hostIds) { - struct KeyVal0{struct item{}} - let hostIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostIds) - if let hostIdsWrappedContainer = hostIdsWrappedContainer { - let hostIdsContainer = try hostIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostIdsBuffer:[Swift.String]? = nil - if let hostIdsContainer = hostIdsContainer { - hostIdsBuffer = [Swift.String]() - for stringContainer0 in hostIdsContainer { - hostIdsBuffer?.append(stringContainer0) - } - } - hostIds = hostIdsBuffer - } else { - hostIds = [] - } - } else { - hostIds = nil - } - let hostRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostRecovery.self, forKey: .hostRecovery) - hostRecovery = hostRecoveryDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let instanceFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - let hostMaintenanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostMaintenance.self, forKey: .hostMaintenance) - hostMaintenance = hostMaintenanceDecoded - } -} - -extension ModifyHostsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyHostsOutputBody = try responseDecoder.decode(responseBody: data) - self.successful = output.successful - self.unsuccessful = output.unsuccessful - } else { - self.successful = nil - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyHostsOutput() + value.successful = try reader["successful"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -131103,65 +93152,18 @@ public struct ModifyHostsOutput: Swift.Equatable { } } -struct ModifyHostsOutputBody: Swift.Equatable { - let successful: [Swift.String]? - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension ModifyHostsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case successful = "successful" - case unsuccessful = "unsuccessful" - } +enum ModifyHostsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successful) { - struct KeyVal0{struct item{}} - let successfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successful) - if let successfulWrappedContainer = successfulWrappedContainer { - let successfulContainer = try successfulWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var successfulBuffer:[Swift.String]? = nil - if let successfulContainer = successfulContainer { - successfulBuffer = [Swift.String]() - for stringContainer0 in successfulContainer { - successfulBuffer?.append(stringContainer0) - } - } - successful = successfulBuffer - } else { - successful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - successful = nil - } - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] - } - } else { - unsuccessful = nil - } - } -} - -enum ModifyHostsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -131205,28 +93207,12 @@ public struct ModifyIdFormatInput: Swift.Equatable { } } -struct ModifyIdFormatInputBody: Swift.Equatable { - let resource: Swift.String? - let useLongIds: Swift.Bool? -} - -extension ModifyIdFormatInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resource = "Resource" - case useLongIds = "UseLongIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resource) - resource = resourceDecoded - let useLongIdsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useLongIds) - useLongIds = useLongIdsDecoded - } -} +extension ModifyIdFormatOutput { -extension ModifyIdFormatOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifyIdFormatOutput() + } } } @@ -131235,11 +93221,18 @@ public struct ModifyIdFormatOutput: Swift.Equatable { public init() { } } -enum ModifyIdFormatOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifyIdFormatOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -131291,32 +93284,12 @@ public struct ModifyIdentityIdFormatInput: Swift.Equatable { } } -struct ModifyIdentityIdFormatInputBody: Swift.Equatable { - let principalArn: Swift.String? - let resource: Swift.String? - let useLongIds: Swift.Bool? -} - -extension ModifyIdentityIdFormatInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case principalArn = "principalArn" - case resource = "resource" - case useLongIds = "useLongIds" - } +extension ModifyIdentityIdFormatOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let principalArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .principalArn) - principalArn = principalArnDecoded - let resourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resource) - resource = resourceDecoded - let useLongIdsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useLongIds) - useLongIds = useLongIdsDecoded - } -} - -extension ModifyIdentityIdFormatOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifyIdentityIdFormatOutput() + } } } @@ -131325,11 +93298,18 @@ public struct ModifyIdentityIdFormatOutput: Swift.Equatable { public init() { } } -enum ModifyIdentityIdFormatOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifyIdentityIdFormatOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -131495,157 +93475,12 @@ public struct ModifyImageAttributeInput: Swift.Equatable { } } -struct ModifyImageAttributeInputBody: Swift.Equatable { - let attribute: Swift.String? - let description: EC2ClientTypes.AttributeValue? - let imageId: Swift.String? - let launchPermission: EC2ClientTypes.LaunchPermissionModifications? - let operationType: EC2ClientTypes.OperationType? - let productCodes: [Swift.String]? - let userGroups: [Swift.String]? - let userIds: [Swift.String]? - let value: Swift.String? - let dryRun: Swift.Bool? - let organizationArns: [Swift.String]? - let organizationalUnitArns: [Swift.String]? - let imdsSupport: EC2ClientTypes.AttributeValue? -} - -extension ModifyImageAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case description = "Description" - case dryRun = "dryRun" - case imageId = "ImageId" - case imdsSupport = "ImdsSupport" - case launchPermission = "LaunchPermission" - case operationType = "OperationType" - case organizationArns = "OrganizationArn" - case organizationalUnitArns = "OrganizationalUnitArn" - case productCodes = "ProductCode" - case userGroups = "UserGroup" - case userIds = "UserId" - case value = "Value" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attribute) - attribute = attributeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .description) - description = descriptionDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let launchPermissionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchPermissionModifications.self, forKey: .launchPermission) - launchPermission = launchPermissionDecoded - let operationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OperationType.self, forKey: .operationType) - operationType = operationTypeDecoded - if containerValues.contains(.productCodes) { - struct KeyVal0{struct ProductCode{}} - let productCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .productCodes) - if let productCodesWrappedContainer = productCodesWrappedContainer { - let productCodesContainer = try productCodesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var productCodesBuffer:[Swift.String]? = nil - if let productCodesContainer = productCodesContainer { - productCodesBuffer = [Swift.String]() - for stringContainer0 in productCodesContainer { - productCodesBuffer?.append(stringContainer0) - } - } - productCodes = productCodesBuffer - } else { - productCodes = [] - } - } else { - productCodes = nil - } - if containerValues.contains(.userGroups) { - struct KeyVal0{struct UserGroup{}} - let userGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroups) - if let userGroupsWrappedContainer = userGroupsWrappedContainer { - let userGroupsContainer = try userGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupsBuffer:[Swift.String]? = nil - if let userGroupsContainer = userGroupsContainer { - userGroupsBuffer = [Swift.String]() - for stringContainer0 in userGroupsContainer { - userGroupsBuffer?.append(stringContainer0) - } - } - userGroups = userGroupsBuffer - } else { - userGroups = [] - } - } else { - userGroups = nil - } - if containerValues.contains(.userIds) { - struct KeyVal0{struct UserId{}} - let userIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIds) - if let userIdsWrappedContainer = userIdsWrappedContainer { - let userIdsContainer = try userIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsBuffer:[Swift.String]? = nil - if let userIdsContainer = userIdsContainer { - userIdsBuffer = [Swift.String]() - for stringContainer0 in userIdsContainer { - userIdsBuffer?.append(stringContainer0) - } - } - userIds = userIdsBuffer - } else { - userIds = [] - } - } else { - userIds = nil - } - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.organizationArns) { - struct KeyVal0{struct OrganizationArn{}} - let organizationArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .organizationArns) - if let organizationArnsWrappedContainer = organizationArnsWrappedContainer { - let organizationArnsContainer = try organizationArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var organizationArnsBuffer:[Swift.String]? = nil - if let organizationArnsContainer = organizationArnsContainer { - organizationArnsBuffer = [Swift.String]() - for stringContainer0 in organizationArnsContainer { - organizationArnsBuffer?.append(stringContainer0) - } - } - organizationArns = organizationArnsBuffer - } else { - organizationArns = [] - } - } else { - organizationArns = nil - } - if containerValues.contains(.organizationalUnitArns) { - struct KeyVal0{struct OrganizationalUnitArn{}} - let organizationalUnitArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .organizationalUnitArns) - if let organizationalUnitArnsWrappedContainer = organizationalUnitArnsWrappedContainer { - let organizationalUnitArnsContainer = try organizationalUnitArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var organizationalUnitArnsBuffer:[Swift.String]? = nil - if let organizationalUnitArnsContainer = organizationalUnitArnsContainer { - organizationalUnitArnsBuffer = [Swift.String]() - for stringContainer0 in organizationalUnitArnsContainer { - organizationalUnitArnsBuffer?.append(stringContainer0) - } - } - organizationalUnitArns = organizationalUnitArnsBuffer - } else { - organizationalUnitArns = [] - } - } else { - organizationalUnitArns = nil - } - let imdsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .imdsSupport) - imdsSupport = imdsSupportDecoded - } -} - -extension ModifyImageAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ModifyImageAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifyImageAttributeOutput() + } } } @@ -131654,11 +93489,18 @@ public struct ModifyImageAttributeOutput: Swift.Equatable { public init() { } } -enum ModifyImageAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifyImageAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -131824,122 +93666,12 @@ public struct ModifyInstanceAttributeInput: Swift.Equatable { } } -struct ModifyInstanceAttributeInputBody: Swift.Equatable { - let sourceDestCheck: EC2ClientTypes.AttributeBooleanValue? - let attribute: EC2ClientTypes.InstanceAttributeName? - let blockDeviceMappings: [EC2ClientTypes.InstanceBlockDeviceMappingSpecification]? - let disableApiTermination: EC2ClientTypes.AttributeBooleanValue? - let dryRun: Swift.Bool? - let ebsOptimized: EC2ClientTypes.AttributeBooleanValue? - let enaSupport: EC2ClientTypes.AttributeBooleanValue? - let groups: [Swift.String]? - let instanceId: Swift.String? - let instanceInitiatedShutdownBehavior: EC2ClientTypes.AttributeValue? - let instanceType: EC2ClientTypes.AttributeValue? - let kernel: EC2ClientTypes.AttributeValue? - let ramdisk: EC2ClientTypes.AttributeValue? - let sriovNetSupport: EC2ClientTypes.AttributeValue? - let userData: EC2ClientTypes.BlobAttributeValue? - let value: Swift.String? - let disableApiStop: EC2ClientTypes.AttributeBooleanValue? -} - -extension ModifyInstanceAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "attribute" - case blockDeviceMappings = "blockDeviceMapping" - case disableApiStop = "DisableApiStop" - case disableApiTermination = "disableApiTermination" - case dryRun = "dryRun" - case ebsOptimized = "ebsOptimized" - case enaSupport = "enaSupport" - case groups = "GroupId" - case instanceId = "instanceId" - case instanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior" - case instanceType = "instanceType" - case kernel = "kernel" - case ramdisk = "ramdisk" - case sourceDestCheck = "SourceDestCheck" - case sriovNetSupport = "sriovNetSupport" - case userData = "userData" - case value = "value" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDestCheckDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .sourceDestCheck) - sourceDestCheck = sourceDestCheckDecoded - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceBlockDeviceMappingSpecification].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.InstanceBlockDeviceMappingSpecification]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.InstanceBlockDeviceMappingSpecification]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let disableApiTerminationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .disableApiTermination) - disableApiTermination = disableApiTerminationDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let enaSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enaSupport) - enaSupport = enaSupportDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct groupId{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupsBuffer:[Swift.String]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [Swift.String]() - for stringContainer0 in groupsContainer { - groupsBuffer?.append(stringContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceInitiatedShutdownBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .instanceInitiatedShutdownBehavior) - instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehaviorDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .kernel) - kernel = kernelDecoded - let ramdiskDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .ramdisk) - ramdisk = ramdiskDecoded - let sriovNetSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .sriovNetSupport) - sriovNetSupport = sriovNetSupportDecoded - let userDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BlobAttributeValue.self, forKey: .userData) - userData = userDataDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let disableApiStopDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .disableApiStop) - disableApiStop = disableApiStopDecoded - } -} - -extension ModifyInstanceAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ModifyInstanceAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifyInstanceAttributeOutput() + } } } @@ -131948,11 +93680,18 @@ public struct ModifyInstanceAttributeOutput: Swift.Equatable { public init() { } } -enum ModifyInstanceAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifyInstanceAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -132003,38 +93742,15 @@ public struct ModifyInstanceCapacityReservationAttributesInput: Swift.Equatable } } -struct ModifyInstanceCapacityReservationAttributesInputBody: Swift.Equatable { - let instanceId: Swift.String? - let capacityReservationSpecification: EC2ClientTypes.CapacityReservationSpecification? - let dryRun: Swift.Bool? -} - -extension ModifyInstanceCapacityReservationAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservationSpecification = "CapacityReservationSpecification" - case dryRun = "DryRun" - case instanceId = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let capacityReservationSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationSpecification.self, forKey: .capacityReservationSpecification) - capacityReservationSpecification = capacityReservationSpecificationDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ModifyInstanceCapacityReservationAttributesOutput { -extension ModifyInstanceCapacityReservationAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyInstanceCapacityReservationAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyInstanceCapacityReservationAttributesOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -132051,27 +93767,18 @@ public struct ModifyInstanceCapacityReservationAttributesOutput: Swift.Equatable } } -struct ModifyInstanceCapacityReservationAttributesOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyInstanceCapacityReservationAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyInstanceCapacityReservationAttributesOutputError { -enum ModifyInstanceCapacityReservationAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -132130,57 +93837,16 @@ public struct ModifyInstanceCreditSpecificationInput: Swift.Equatable { } } -struct ModifyInstanceCreditSpecificationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let instanceCreditSpecifications: [EC2ClientTypes.InstanceCreditSpecificationRequest]? -} - -extension ModifyInstanceCreditSpecificationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case instanceCreditSpecifications = "InstanceCreditSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.instanceCreditSpecifications) { - struct KeyVal0{struct item{}} - let instanceCreditSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceCreditSpecifications) - if let instanceCreditSpecificationsWrappedContainer = instanceCreditSpecificationsWrappedContainer { - let instanceCreditSpecificationsContainer = try instanceCreditSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceCreditSpecificationRequest].self, forKey: .member) - var instanceCreditSpecificationsBuffer:[EC2ClientTypes.InstanceCreditSpecificationRequest]? = nil - if let instanceCreditSpecificationsContainer = instanceCreditSpecificationsContainer { - instanceCreditSpecificationsBuffer = [EC2ClientTypes.InstanceCreditSpecificationRequest]() - for structureContainer0 in instanceCreditSpecificationsContainer { - instanceCreditSpecificationsBuffer?.append(structureContainer0) - } - } - instanceCreditSpecifications = instanceCreditSpecificationsBuffer - } else { - instanceCreditSpecifications = [] - } - } else { - instanceCreditSpecifications = nil - } - } -} +extension ModifyInstanceCreditSpecificationOutput { -extension ModifyInstanceCreditSpecificationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyInstanceCreditSpecificationOutputBody = try responseDecoder.decode(responseBody: data) - self.successfulInstanceCreditSpecifications = output.successfulInstanceCreditSpecifications - self.unsuccessfulInstanceCreditSpecifications = output.unsuccessfulInstanceCreditSpecifications - } else { - self.successfulInstanceCreditSpecifications = nil - self.unsuccessfulInstanceCreditSpecifications = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyInstanceCreditSpecificationOutput() + value.successfulInstanceCreditSpecifications = try reader["successfulInstanceCreditSpecificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessfulInstanceCreditSpecifications = try reader["unsuccessfulInstanceCreditSpecificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -132201,65 +93867,18 @@ public struct ModifyInstanceCreditSpecificationOutput: Swift.Equatable { } } -struct ModifyInstanceCreditSpecificationOutputBody: Swift.Equatable { - let successfulInstanceCreditSpecifications: [EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem]? - let unsuccessfulInstanceCreditSpecifications: [EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem]? -} - -extension ModifyInstanceCreditSpecificationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case successfulInstanceCreditSpecifications = "successfulInstanceCreditSpecificationSet" - case unsuccessfulInstanceCreditSpecifications = "unsuccessfulInstanceCreditSpecificationSet" - } +enum ModifyInstanceCreditSpecificationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successfulInstanceCreditSpecifications) { - struct KeyVal0{struct item{}} - let successfulInstanceCreditSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successfulInstanceCreditSpecifications) - if let successfulInstanceCreditSpecificationsWrappedContainer = successfulInstanceCreditSpecificationsWrappedContainer { - let successfulInstanceCreditSpecificationsContainer = try successfulInstanceCreditSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem].self, forKey: .member) - var successfulInstanceCreditSpecificationsBuffer:[EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem]? = nil - if let successfulInstanceCreditSpecificationsContainer = successfulInstanceCreditSpecificationsContainer { - successfulInstanceCreditSpecificationsBuffer = [EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem]() - for structureContainer0 in successfulInstanceCreditSpecificationsContainer { - successfulInstanceCreditSpecificationsBuffer?.append(structureContainer0) - } - } - successfulInstanceCreditSpecifications = successfulInstanceCreditSpecificationsBuffer - } else { - successfulInstanceCreditSpecifications = [] - } - } else { - successfulInstanceCreditSpecifications = nil - } - if containerValues.contains(.unsuccessfulInstanceCreditSpecifications) { - struct KeyVal0{struct item{}} - let unsuccessfulInstanceCreditSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessfulInstanceCreditSpecifications) - if let unsuccessfulInstanceCreditSpecificationsWrappedContainer = unsuccessfulInstanceCreditSpecificationsWrappedContainer { - let unsuccessfulInstanceCreditSpecificationsContainer = try unsuccessfulInstanceCreditSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem].self, forKey: .member) - var unsuccessfulInstanceCreditSpecificationsBuffer:[EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem]? = nil - if let unsuccessfulInstanceCreditSpecificationsContainer = unsuccessfulInstanceCreditSpecificationsContainer { - unsuccessfulInstanceCreditSpecificationsBuffer = [EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem]() - for structureContainer0 in unsuccessfulInstanceCreditSpecificationsContainer { - unsuccessfulInstanceCreditSpecificationsBuffer?.append(structureContainer0) - } - } - unsuccessfulInstanceCreditSpecifications = unsuccessfulInstanceCreditSpecificationsBuffer - } else { - unsuccessfulInstanceCreditSpecifications = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessfulInstanceCreditSpecifications = nil - } - } -} - -enum ModifyInstanceCreditSpecificationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -132318,42 +93937,15 @@ public struct ModifyInstanceEventStartTimeInput: Swift.Equatable { } } -struct ModifyInstanceEventStartTimeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceId: Swift.String? - let instanceEventId: Swift.String? - let notBefore: ClientRuntime.Date? -} - -extension ModifyInstanceEventStartTimeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceEventId = "InstanceEventId" - case instanceId = "InstanceId" - case notBefore = "NotBefore" - } +extension ModifyInstanceEventStartTimeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceEventIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceEventId) - instanceEventId = instanceEventIdDecoded - let notBeforeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .notBefore) - notBefore = notBeforeDecoded - } -} - -extension ModifyInstanceEventStartTimeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyInstanceEventStartTimeOutputBody = try responseDecoder.decode(responseBody: data) - self.event = output.event - } else { - self.event = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyInstanceEventStartTimeOutput() + value.event = try reader["event"].readIfPresent(readingClosure: EC2ClientTypes.InstanceStatusEvent.readingClosure) + return value } } } @@ -132370,27 +93962,18 @@ public struct ModifyInstanceEventStartTimeOutput: Swift.Equatable { } } -struct ModifyInstanceEventStartTimeOutputBody: Swift.Equatable { - let event: EC2ClientTypes.InstanceStatusEvent? -} - -extension ModifyInstanceEventStartTimeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case event = "event" - } +enum ModifyInstanceEventStartTimeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eventDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceStatusEvent.self, forKey: .event) - event = eventDecoded - } -} - -enum ModifyInstanceEventStartTimeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -132478,63 +94061,15 @@ public struct ModifyInstanceEventWindowInput: Swift.Equatable { } } -struct ModifyInstanceEventWindowInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let name: Swift.String? - let instanceEventWindowId: Swift.String? - let timeRanges: [EC2ClientTypes.InstanceEventWindowTimeRangeRequest]? - let cronExpression: Swift.String? -} - -extension ModifyInstanceEventWindowInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cronExpression = "CronExpression" - case dryRun = "DryRun" - case instanceEventWindowId = "InstanceEventWindowId" - case name = "Name" - case timeRanges = "TimeRange" - } +extension ModifyInstanceEventWindowOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let instanceEventWindowIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceEventWindowId) - instanceEventWindowId = instanceEventWindowIdDecoded - if containerValues.contains(.timeRanges) { - struct KeyVal0{struct member{}} - let timeRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .timeRanges) - if let timeRangesWrappedContainer = timeRangesWrappedContainer { - let timeRangesContainer = try timeRangesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceEventWindowTimeRangeRequest].self, forKey: .member) - var timeRangesBuffer:[EC2ClientTypes.InstanceEventWindowTimeRangeRequest]? = nil - if let timeRangesContainer = timeRangesContainer { - timeRangesBuffer = [EC2ClientTypes.InstanceEventWindowTimeRangeRequest]() - for structureContainer0 in timeRangesContainer { - timeRangesBuffer?.append(structureContainer0) - } - } - timeRanges = timeRangesBuffer - } else { - timeRanges = [] - } - } else { - timeRanges = nil - } - let cronExpressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cronExpression) - cronExpression = cronExpressionDecoded - } -} - -extension ModifyInstanceEventWindowOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyInstanceEventWindowOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceEventWindow = output.instanceEventWindow - } else { - self.instanceEventWindow = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyInstanceEventWindowOutput() + value.instanceEventWindow = try reader["instanceEventWindow"].readIfPresent(readingClosure: EC2ClientTypes.InstanceEventWindow.readingClosure) + return value } } } @@ -132551,27 +94086,18 @@ public struct ModifyInstanceEventWindowOutput: Swift.Equatable { } } -struct ModifyInstanceEventWindowOutputBody: Swift.Equatable { - let instanceEventWindow: EC2ClientTypes.InstanceEventWindow? -} - -extension ModifyInstanceEventWindowOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceEventWindow = "instanceEventWindow" - } +enum ModifyInstanceEventWindowOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceEventWindowDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceEventWindow.self, forKey: .instanceEventWindow) - instanceEventWindow = instanceEventWindowDecoded - } -} - -enum ModifyInstanceEventWindowOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -132621,40 +94147,16 @@ public struct ModifyInstanceMaintenanceOptionsInput: Swift.Equatable { } } -struct ModifyInstanceMaintenanceOptionsInputBody: Swift.Equatable { - let instanceId: Swift.String? - let autoRecovery: EC2ClientTypes.InstanceAutoRecoveryState? - let dryRun: Swift.Bool? -} - -extension ModifyInstanceMaintenanceOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoRecovery = "AutoRecovery" - case dryRun = "DryRun" - case instanceId = "InstanceId" - } +extension ModifyInstanceMaintenanceOptionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let autoRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAutoRecoveryState.self, forKey: .autoRecovery) - autoRecovery = autoRecoveryDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifyInstanceMaintenanceOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyInstanceMaintenanceOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.autoRecovery = output.autoRecovery - self.instanceId = output.instanceId - } else { - self.autoRecovery = nil - self.instanceId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyInstanceMaintenanceOptionsOutput() + value.autoRecovery = try reader["autoRecovery"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + return value } } } @@ -132675,31 +94177,18 @@ public struct ModifyInstanceMaintenanceOptionsOutput: Swift.Equatable { } } -struct ModifyInstanceMaintenanceOptionsOutputBody: Swift.Equatable { - let instanceId: Swift.String? - let autoRecovery: EC2ClientTypes.InstanceAutoRecoveryState? -} - -extension ModifyInstanceMaintenanceOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoRecovery = "autoRecovery" - case instanceId = "instanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let autoRecoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAutoRecoveryState.self, forKey: .autoRecovery) - autoRecovery = autoRecoveryDecoded - } -} +enum ModifyInstanceMaintenanceOptionsOutputError { -enum ModifyInstanceMaintenanceOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -132784,56 +94273,16 @@ public struct ModifyInstanceMetadataOptionsInput: Swift.Equatable { } } -struct ModifyInstanceMetadataOptionsInputBody: Swift.Equatable { - let instanceId: Swift.String? - let httpTokens: EC2ClientTypes.HttpTokensState? - let httpPutResponseHopLimit: Swift.Int? - let httpEndpoint: EC2ClientTypes.InstanceMetadataEndpointState? - let dryRun: Swift.Bool? - let httpProtocolIpv6: EC2ClientTypes.InstanceMetadataProtocolState? - let instanceMetadataTags: EC2ClientTypes.InstanceMetadataTagsState? -} - -extension ModifyInstanceMetadataOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case httpEndpoint = "HttpEndpoint" - case httpProtocolIpv6 = "HttpProtocolIpv6" - case httpPutResponseHopLimit = "HttpPutResponseHopLimit" - case httpTokens = "HttpTokens" - case instanceId = "InstanceId" - case instanceMetadataTags = "InstanceMetadataTags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let httpTokensDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HttpTokensState.self, forKey: .httpTokens) - httpTokens = httpTokensDecoded - let httpPutResponseHopLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .httpPutResponseHopLimit) - httpPutResponseHopLimit = httpPutResponseHopLimitDecoded - let httpEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataEndpointState.self, forKey: .httpEndpoint) - httpEndpoint = httpEndpointDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let httpProtocolIpv6Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataProtocolState.self, forKey: .httpProtocolIpv6) - httpProtocolIpv6 = httpProtocolIpv6Decoded - let instanceMetadataTagsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataTagsState.self, forKey: .instanceMetadataTags) - instanceMetadataTags = instanceMetadataTagsDecoded - } -} +extension ModifyInstanceMetadataOptionsOutput { -extension ModifyInstanceMetadataOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyInstanceMetadataOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceId = output.instanceId - self.instanceMetadataOptions = output.instanceMetadataOptions - } else { - self.instanceId = nil - self.instanceMetadataOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyInstanceMetadataOptionsOutput() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceMetadataOptions = try reader["instanceMetadataOptions"].readIfPresent(readingClosure: EC2ClientTypes.InstanceMetadataOptionsResponse.readingClosure) + return value } } } @@ -132854,31 +94303,18 @@ public struct ModifyInstanceMetadataOptionsOutput: Swift.Equatable { } } -struct ModifyInstanceMetadataOptionsOutputBody: Swift.Equatable { - let instanceId: Swift.String? - let instanceMetadataOptions: EC2ClientTypes.InstanceMetadataOptionsResponse? -} +enum ModifyInstanceMetadataOptionsOutputError { -extension ModifyInstanceMetadataOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - case instanceMetadataOptions = "instanceMetadataOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceMetadataOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataOptionsResponse.self, forKey: .instanceMetadataOptions) - instanceMetadataOptions = instanceMetadataOptionsDecoded - } -} - -enum ModifyInstanceMetadataOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -132963,58 +94399,15 @@ public struct ModifyInstancePlacementInput: Swift.Equatable { } } -struct ModifyInstancePlacementInputBody: Swift.Equatable { - let affinity: EC2ClientTypes.Affinity? - let groupName: Swift.String? - let hostId: Swift.String? - let instanceId: Swift.String? - let tenancy: EC2ClientTypes.HostTenancy? - let partitionNumber: Swift.Int? - let hostResourceGroupArn: Swift.String? - let groupId: Swift.String? -} - -extension ModifyInstancePlacementInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case affinity = "affinity" - case groupId = "GroupId" - case groupName = "GroupName" - case hostId = "hostId" - case hostResourceGroupArn = "HostResourceGroupArn" - case instanceId = "instanceId" - case partitionNumber = "PartitionNumber" - case tenancy = "tenancy" - } +extension ModifyInstancePlacementOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let affinityDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Affinity.self, forKey: .affinity) - affinity = affinityDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let hostIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostId) - hostId = hostIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostTenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - let partitionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partitionNumber) - partitionNumber = partitionNumberDecoded - let hostResourceGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostResourceGroupArn) - hostResourceGroupArn = hostResourceGroupArnDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - } -} - -extension ModifyInstancePlacementOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyInstancePlacementOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyInstancePlacementOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -133031,27 +94424,18 @@ public struct ModifyInstancePlacementOutput: Swift.Equatable { } } -struct ModifyInstancePlacementOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyInstancePlacementOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyInstancePlacementOutputError { -enum ModifyInstancePlacementOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -133140,84 +94524,15 @@ public struct ModifyIpamInput: Swift.Equatable { } } -struct ModifyIpamInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamId: Swift.String? - let description: Swift.String? - let addOperatingRegions: [EC2ClientTypes.AddIpamOperatingRegion]? - let removeOperatingRegions: [EC2ClientTypes.RemoveIpamOperatingRegion]? - let tier: EC2ClientTypes.IpamTier? -} - -extension ModifyIpamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addOperatingRegions = "AddOperatingRegion" - case description = "Description" - case dryRun = "DryRun" - case ipamId = "IpamId" - case removeOperatingRegions = "RemoveOperatingRegion" - case tier = "Tier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.addOperatingRegions) { - struct KeyVal0{struct member{}} - let addOperatingRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addOperatingRegions) - if let addOperatingRegionsWrappedContainer = addOperatingRegionsWrappedContainer { - let addOperatingRegionsContainer = try addOperatingRegionsWrappedContainer.decodeIfPresent([EC2ClientTypes.AddIpamOperatingRegion].self, forKey: .member) - var addOperatingRegionsBuffer:[EC2ClientTypes.AddIpamOperatingRegion]? = nil - if let addOperatingRegionsContainer = addOperatingRegionsContainer { - addOperatingRegionsBuffer = [EC2ClientTypes.AddIpamOperatingRegion]() - for structureContainer0 in addOperatingRegionsContainer { - addOperatingRegionsBuffer?.append(structureContainer0) - } - } - addOperatingRegions = addOperatingRegionsBuffer - } else { - addOperatingRegions = [] - } - } else { - addOperatingRegions = nil - } - if containerValues.contains(.removeOperatingRegions) { - struct KeyVal0{struct member{}} - let removeOperatingRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeOperatingRegions) - if let removeOperatingRegionsWrappedContainer = removeOperatingRegionsWrappedContainer { - let removeOperatingRegionsContainer = try removeOperatingRegionsWrappedContainer.decodeIfPresent([EC2ClientTypes.RemoveIpamOperatingRegion].self, forKey: .member) - var removeOperatingRegionsBuffer:[EC2ClientTypes.RemoveIpamOperatingRegion]? = nil - if let removeOperatingRegionsContainer = removeOperatingRegionsContainer { - removeOperatingRegionsBuffer = [EC2ClientTypes.RemoveIpamOperatingRegion]() - for structureContainer0 in removeOperatingRegionsContainer { - removeOperatingRegionsBuffer?.append(structureContainer0) - } - } - removeOperatingRegions = removeOperatingRegionsBuffer - } else { - removeOperatingRegions = [] - } - } else { - removeOperatingRegions = nil - } - let tierDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamTier.self, forKey: .tier) - tier = tierDecoded - } -} - -extension ModifyIpamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyIpamOutputBody = try responseDecoder.decode(responseBody: data) - self.ipam = output.ipam - } else { - self.ipam = nil +extension ModifyIpamOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyIpamOutput() + value.ipam = try reader["ipam"].readIfPresent(readingClosure: EC2ClientTypes.Ipam.readingClosure) + return value } } } @@ -133234,27 +94549,18 @@ public struct ModifyIpamOutput: Swift.Equatable { } } -struct ModifyIpamOutputBody: Swift.Equatable { - let ipam: EC2ClientTypes.Ipam? -} - -extension ModifyIpamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipam = "ipam" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ipam.self, forKey: .ipam) - ipam = ipamDecoded - } -} +enum ModifyIpamOutputError { -enum ModifyIpamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -133371,100 +94677,15 @@ public struct ModifyIpamPoolInput: Swift.Equatable { } } -struct ModifyIpamPoolInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let description: Swift.String? - let autoImport: Swift.Bool? - let allocationMinNetmaskLength: Swift.Int? - let allocationMaxNetmaskLength: Swift.Int? - let allocationDefaultNetmaskLength: Swift.Int? - let clearAllocationDefaultNetmaskLength: Swift.Bool? - let addAllocationResourceTags: [EC2ClientTypes.RequestIpamResourceTag]? - let removeAllocationResourceTags: [EC2ClientTypes.RequestIpamResourceTag]? -} - -extension ModifyIpamPoolInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addAllocationResourceTags = "AddAllocationResourceTag" - case allocationDefaultNetmaskLength = "AllocationDefaultNetmaskLength" - case allocationMaxNetmaskLength = "AllocationMaxNetmaskLength" - case allocationMinNetmaskLength = "AllocationMinNetmaskLength" - case autoImport = "AutoImport" - case clearAllocationDefaultNetmaskLength = "ClearAllocationDefaultNetmaskLength" - case description = "Description" - case dryRun = "DryRun" - case ipamPoolId = "IpamPoolId" - case removeAllocationResourceTags = "RemoveAllocationResourceTag" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let autoImportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoImport) - autoImport = autoImportDecoded - let allocationMinNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationMinNetmaskLength) - allocationMinNetmaskLength = allocationMinNetmaskLengthDecoded - let allocationMaxNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationMaxNetmaskLength) - allocationMaxNetmaskLength = allocationMaxNetmaskLengthDecoded - let allocationDefaultNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocationDefaultNetmaskLength) - allocationDefaultNetmaskLength = allocationDefaultNetmaskLengthDecoded - let clearAllocationDefaultNetmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .clearAllocationDefaultNetmaskLength) - clearAllocationDefaultNetmaskLength = clearAllocationDefaultNetmaskLengthDecoded - if containerValues.contains(.addAllocationResourceTags) { - struct KeyVal0{struct item{}} - let addAllocationResourceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addAllocationResourceTags) - if let addAllocationResourceTagsWrappedContainer = addAllocationResourceTagsWrappedContainer { - let addAllocationResourceTagsContainer = try addAllocationResourceTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.RequestIpamResourceTag].self, forKey: .member) - var addAllocationResourceTagsBuffer:[EC2ClientTypes.RequestIpamResourceTag]? = nil - if let addAllocationResourceTagsContainer = addAllocationResourceTagsContainer { - addAllocationResourceTagsBuffer = [EC2ClientTypes.RequestIpamResourceTag]() - for structureContainer0 in addAllocationResourceTagsContainer { - addAllocationResourceTagsBuffer?.append(structureContainer0) - } - } - addAllocationResourceTags = addAllocationResourceTagsBuffer - } else { - addAllocationResourceTags = [] - } - } else { - addAllocationResourceTags = nil - } - if containerValues.contains(.removeAllocationResourceTags) { - struct KeyVal0{struct item{}} - let removeAllocationResourceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeAllocationResourceTags) - if let removeAllocationResourceTagsWrappedContainer = removeAllocationResourceTagsWrappedContainer { - let removeAllocationResourceTagsContainer = try removeAllocationResourceTagsWrappedContainer.decodeIfPresent([EC2ClientTypes.RequestIpamResourceTag].self, forKey: .member) - var removeAllocationResourceTagsBuffer:[EC2ClientTypes.RequestIpamResourceTag]? = nil - if let removeAllocationResourceTagsContainer = removeAllocationResourceTagsContainer { - removeAllocationResourceTagsBuffer = [EC2ClientTypes.RequestIpamResourceTag]() - for structureContainer0 in removeAllocationResourceTagsContainer { - removeAllocationResourceTagsBuffer?.append(structureContainer0) - } - } - removeAllocationResourceTags = removeAllocationResourceTagsBuffer - } else { - removeAllocationResourceTags = [] - } - } else { - removeAllocationResourceTags = nil - } - } -} - -extension ModifyIpamPoolOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyIpamPoolOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPool = output.ipamPool - } else { - self.ipamPool = nil +extension ModifyIpamPoolOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyIpamPoolOutput() + value.ipamPool = try reader["ipamPool"].readIfPresent(readingClosure: EC2ClientTypes.IpamPool.readingClosure) + return value } } } @@ -133481,27 +94702,18 @@ public struct ModifyIpamPoolOutput: Swift.Equatable { } } -struct ModifyIpamPoolOutputBody: Swift.Equatable { - let ipamPool: EC2ClientTypes.IpamPool? -} - -extension ModifyIpamPoolOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPool = "ipamPool" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamPoolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPool.self, forKey: .ipamPool) - ipamPool = ipamPoolDecoded - } -} +enum ModifyIpamPoolOutputError { -enum ModifyIpamPoolOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -133583,54 +94795,15 @@ public struct ModifyIpamResourceCidrInput: Swift.Equatable { } } -struct ModifyIpamResourceCidrInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let resourceId: Swift.String? - let resourceCidr: Swift.String? - let resourceRegion: Swift.String? - let currentIpamScopeId: Swift.String? - let destinationIpamScopeId: Swift.String? - let monitored: Swift.Bool? -} +extension ModifyIpamResourceCidrOutput { -extension ModifyIpamResourceCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currentIpamScopeId = "CurrentIpamScopeId" - case destinationIpamScopeId = "DestinationIpamScopeId" - case dryRun = "DryRun" - case monitored = "Monitored" - case resourceCidr = "ResourceCidr" - case resourceId = "ResourceId" - case resourceRegion = "ResourceRegion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceCidr) - resourceCidr = resourceCidrDecoded - let resourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceRegion) - resourceRegion = resourceRegionDecoded - let currentIpamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currentIpamScopeId) - currentIpamScopeId = currentIpamScopeIdDecoded - let destinationIpamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationIpamScopeId) - destinationIpamScopeId = destinationIpamScopeIdDecoded - let monitoredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .monitored) - monitored = monitoredDecoded - } -} - -extension ModifyIpamResourceCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyIpamResourceCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceCidr = output.ipamResourceCidr - } else { - self.ipamResourceCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyIpamResourceCidrOutput() + value.ipamResourceCidr = try reader["ipamResourceCidr"].readIfPresent(readingClosure: EC2ClientTypes.IpamResourceCidr.readingClosure) + return value } } } @@ -133647,27 +94820,18 @@ public struct ModifyIpamResourceCidrOutput: Swift.Equatable { } } -struct ModifyIpamResourceCidrOutputBody: Swift.Equatable { - let ipamResourceCidr: EC2ClientTypes.IpamResourceCidr? -} +enum ModifyIpamResourceCidrOutputError { -extension ModifyIpamResourceCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceCidr = "ipamResourceCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamResourceCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceCidr.self, forKey: .ipamResourceCidr) - ipamResourceCidr = ipamResourceCidrDecoded - } -} - -enum ModifyIpamResourceCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -133749,80 +94913,15 @@ public struct ModifyIpamResourceDiscoveryInput: Swift.Equatable { } } -struct ModifyIpamResourceDiscoveryInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamResourceDiscoveryId: Swift.String? - let description: Swift.String? - let addOperatingRegions: [EC2ClientTypes.AddIpamOperatingRegion]? - let removeOperatingRegions: [EC2ClientTypes.RemoveIpamOperatingRegion]? -} - -extension ModifyIpamResourceDiscoveryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addOperatingRegions = "AddOperatingRegion" - case description = "Description" - case dryRun = "DryRun" - case ipamResourceDiscoveryId = "IpamResourceDiscoveryId" - case removeOperatingRegions = "RemoveOperatingRegion" - } +extension ModifyIpamResourceDiscoveryOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamResourceDiscoveryIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamResourceDiscoveryId) - ipamResourceDiscoveryId = ipamResourceDiscoveryIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.addOperatingRegions) { - struct KeyVal0{struct member{}} - let addOperatingRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addOperatingRegions) - if let addOperatingRegionsWrappedContainer = addOperatingRegionsWrappedContainer { - let addOperatingRegionsContainer = try addOperatingRegionsWrappedContainer.decodeIfPresent([EC2ClientTypes.AddIpamOperatingRegion].self, forKey: .member) - var addOperatingRegionsBuffer:[EC2ClientTypes.AddIpamOperatingRegion]? = nil - if let addOperatingRegionsContainer = addOperatingRegionsContainer { - addOperatingRegionsBuffer = [EC2ClientTypes.AddIpamOperatingRegion]() - for structureContainer0 in addOperatingRegionsContainer { - addOperatingRegionsBuffer?.append(structureContainer0) - } - } - addOperatingRegions = addOperatingRegionsBuffer - } else { - addOperatingRegions = [] - } - } else { - addOperatingRegions = nil - } - if containerValues.contains(.removeOperatingRegions) { - struct KeyVal0{struct member{}} - let removeOperatingRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeOperatingRegions) - if let removeOperatingRegionsWrappedContainer = removeOperatingRegionsWrappedContainer { - let removeOperatingRegionsContainer = try removeOperatingRegionsWrappedContainer.decodeIfPresent([EC2ClientTypes.RemoveIpamOperatingRegion].self, forKey: .member) - var removeOperatingRegionsBuffer:[EC2ClientTypes.RemoveIpamOperatingRegion]? = nil - if let removeOperatingRegionsContainer = removeOperatingRegionsContainer { - removeOperatingRegionsBuffer = [EC2ClientTypes.RemoveIpamOperatingRegion]() - for structureContainer0 in removeOperatingRegionsContainer { - removeOperatingRegionsBuffer?.append(structureContainer0) - } - } - removeOperatingRegions = removeOperatingRegionsBuffer - } else { - removeOperatingRegions = [] - } - } else { - removeOperatingRegions = nil - } - } -} - -extension ModifyIpamResourceDiscoveryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyIpamResourceDiscoveryOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamResourceDiscovery = output.ipamResourceDiscovery - } else { - self.ipamResourceDiscovery = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyIpamResourceDiscoveryOutput() + value.ipamResourceDiscovery = try reader["ipamResourceDiscovery"].readIfPresent(readingClosure: EC2ClientTypes.IpamResourceDiscovery.readingClosure) + return value } } } @@ -133839,27 +94938,18 @@ public struct ModifyIpamResourceDiscoveryOutput: Swift.Equatable { } } -struct ModifyIpamResourceDiscoveryOutputBody: Swift.Equatable { - let ipamResourceDiscovery: EC2ClientTypes.IpamResourceDiscovery? -} - -extension ModifyIpamResourceDiscoveryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamResourceDiscovery = "ipamResourceDiscovery" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamResourceDiscoveryDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamResourceDiscovery.self, forKey: .ipamResourceDiscovery) - ipamResourceDiscovery = ipamResourceDiscoveryDecoded - } -} +enum ModifyIpamResourceDiscoveryOutputError { -enum ModifyIpamResourceDiscoveryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -133909,38 +94999,15 @@ public struct ModifyIpamScopeInput: Swift.Equatable { } } -struct ModifyIpamScopeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamScopeId: Swift.String? - let description: Swift.String? -} - -extension ModifyIpamScopeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case dryRun = "DryRun" - case ipamScopeId = "IpamScopeId" - } +extension ModifyIpamScopeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamScopeId) - ipamScopeId = ipamScopeIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - } -} - -extension ModifyIpamScopeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyIpamScopeOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamScope = output.ipamScope - } else { - self.ipamScope = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyIpamScopeOutput() + value.ipamScope = try reader["ipamScope"].readIfPresent(readingClosure: EC2ClientTypes.IpamScope.readingClosure) + return value } } } @@ -133957,27 +95024,18 @@ public struct ModifyIpamScopeOutput: Swift.Equatable { } } -struct ModifyIpamScopeOutputBody: Swift.Equatable { - let ipamScope: EC2ClientTypes.IpamScope? -} - -extension ModifyIpamScopeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamScope = "ipamScope" - } +enum ModifyIpamScopeOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamScopeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamScope.self, forKey: .ipamScope) - ipamScope = ipamScopeDecoded - } -} - -enum ModifyIpamScopeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -134040,46 +95098,15 @@ public struct ModifyLaunchTemplateInput: Swift.Equatable { } } -struct ModifyLaunchTemplateInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let launchTemplateId: Swift.String? - let launchTemplateName: Swift.String? - let defaultVersion: Swift.String? -} - -extension ModifyLaunchTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case defaultVersion = "SetDefaultVersion" - case dryRun = "DryRun" - case launchTemplateId = "LaunchTemplateId" - case launchTemplateName = "LaunchTemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let launchTemplateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateId) - launchTemplateId = launchTemplateIdDecoded - let launchTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchTemplateName) - launchTemplateName = launchTemplateNameDecoded - let defaultVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultVersion) - defaultVersion = defaultVersionDecoded - } -} +extension ModifyLaunchTemplateOutput { -extension ModifyLaunchTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyLaunchTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.launchTemplate = output.launchTemplate - } else { - self.launchTemplate = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyLaunchTemplateOutput() + value.launchTemplate = try reader["launchTemplate"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplate.readingClosure) + return value } } } @@ -134096,27 +95123,18 @@ public struct ModifyLaunchTemplateOutput: Swift.Equatable { } } -struct ModifyLaunchTemplateOutputBody: Swift.Equatable { - let launchTemplate: EC2ClientTypes.LaunchTemplate? -} - -extension ModifyLaunchTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case launchTemplate = "launchTemplate" - } +enum ModifyLaunchTemplateOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let launchTemplateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplate.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - } -} - -enum ModifyLaunchTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -134187,50 +95205,15 @@ public struct ModifyLocalGatewayRouteInput: Swift.Equatable { } } -struct ModifyLocalGatewayRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let localGatewayRouteTableId: Swift.String? - let localGatewayVirtualInterfaceGroupId: Swift.String? - let networkInterfaceId: Swift.String? - let dryRun: Swift.Bool? - let destinationPrefixListId: Swift.String? -} - -extension ModifyLocalGatewayRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "DestinationCidrBlock" - case destinationPrefixListId = "DestinationPrefixListId" - case dryRun = "DryRun" - case localGatewayRouteTableId = "LocalGatewayRouteTableId" - case localGatewayVirtualInterfaceGroupId = "LocalGatewayVirtualInterfaceGroupId" - case networkInterfaceId = "NetworkInterfaceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - let localGatewayVirtualInterfaceGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayVirtualInterfaceGroupId) - localGatewayVirtualInterfaceGroupId = localGatewayVirtualInterfaceGroupIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded - } -} +extension ModifyLocalGatewayRouteOutput { -extension ModifyLocalGatewayRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyLocalGatewayRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.route = output.route - } else { - self.route = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyLocalGatewayRouteOutput() + value.route = try reader["route"].readIfPresent(readingClosure: EC2ClientTypes.LocalGatewayRoute.readingClosure) + return value } } } @@ -134247,27 +95230,18 @@ public struct ModifyLocalGatewayRouteOutput: Swift.Equatable { } } -struct ModifyLocalGatewayRouteOutputBody: Swift.Equatable { - let route: EC2ClientTypes.LocalGatewayRoute? -} +enum ModifyLocalGatewayRouteOutputError { -extension ModifyLocalGatewayRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case route = "route" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let routeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LocalGatewayRoute.self, forKey: .route) - route = routeDecoded - } -} - -enum ModifyLocalGatewayRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -134363,88 +95337,15 @@ public struct ModifyManagedPrefixListInput: Swift.Equatable { } } -struct ModifyManagedPrefixListInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let prefixListId: Swift.String? - let currentVersion: Swift.Int? - let prefixListName: Swift.String? - let addEntries: [EC2ClientTypes.AddPrefixListEntry]? - let removeEntries: [EC2ClientTypes.RemovePrefixListEntry]? - let maxEntries: Swift.Int? -} - -extension ModifyManagedPrefixListInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addEntries = "AddEntry" - case currentVersion = "CurrentVersion" - case dryRun = "DryRun" - case maxEntries = "MaxEntries" - case prefixListId = "PrefixListId" - case prefixListName = "PrefixListName" - case removeEntries = "RemoveEntry" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let currentVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .currentVersion) - currentVersion = currentVersionDecoded - let prefixListNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListName) - prefixListName = prefixListNameDecoded - if containerValues.contains(.addEntries) { - struct KeyVal0{struct member{}} - let addEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addEntries) - if let addEntriesWrappedContainer = addEntriesWrappedContainer { - let addEntriesContainer = try addEntriesWrappedContainer.decodeIfPresent([EC2ClientTypes.AddPrefixListEntry].self, forKey: .member) - var addEntriesBuffer:[EC2ClientTypes.AddPrefixListEntry]? = nil - if let addEntriesContainer = addEntriesContainer { - addEntriesBuffer = [EC2ClientTypes.AddPrefixListEntry]() - for structureContainer0 in addEntriesContainer { - addEntriesBuffer?.append(structureContainer0) - } - } - addEntries = addEntriesBuffer - } else { - addEntries = [] - } - } else { - addEntries = nil - } - if containerValues.contains(.removeEntries) { - struct KeyVal0{struct member{}} - let removeEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeEntries) - if let removeEntriesWrappedContainer = removeEntriesWrappedContainer { - let removeEntriesContainer = try removeEntriesWrappedContainer.decodeIfPresent([EC2ClientTypes.RemovePrefixListEntry].self, forKey: .member) - var removeEntriesBuffer:[EC2ClientTypes.RemovePrefixListEntry]? = nil - if let removeEntriesContainer = removeEntriesContainer { - removeEntriesBuffer = [EC2ClientTypes.RemovePrefixListEntry]() - for structureContainer0 in removeEntriesContainer { - removeEntriesBuffer?.append(structureContainer0) - } - } - removeEntries = removeEntriesBuffer - } else { - removeEntries = [] - } - } else { - removeEntries = nil - } - let maxEntriesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxEntries) - maxEntries = maxEntriesDecoded - } -} - -extension ModifyManagedPrefixListOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyManagedPrefixListOutputBody = try responseDecoder.decode(responseBody: data) - self.prefixList = output.prefixList - } else { - self.prefixList = nil +extension ModifyManagedPrefixListOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyManagedPrefixListOutput() + value.prefixList = try reader["prefixList"].readIfPresent(readingClosure: EC2ClientTypes.ManagedPrefixList.readingClosure) + return value } } } @@ -134461,27 +95362,18 @@ public struct ModifyManagedPrefixListOutput: Swift.Equatable { } } -struct ModifyManagedPrefixListOutputBody: Swift.Equatable { - let prefixList: EC2ClientTypes.ManagedPrefixList? -} - -extension ModifyManagedPrefixListOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case prefixList = "prefixList" - } +enum ModifyManagedPrefixListOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixListDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ManagedPrefixList.self, forKey: .prefixList) - prefixList = prefixListDecoded - } -} - -enum ModifyManagedPrefixListOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -134583,73 +95475,12 @@ public struct ModifyNetworkInterfaceAttributeInput: Swift.Equatable { } } -struct ModifyNetworkInterfaceAttributeInputBody: Swift.Equatable { - let attachment: EC2ClientTypes.NetworkInterfaceAttachmentChanges? - let description: EC2ClientTypes.AttributeValue? - let dryRun: Swift.Bool? - let groups: [Swift.String]? - let networkInterfaceId: Swift.String? - let sourceDestCheck: EC2ClientTypes.AttributeBooleanValue? - let enaSrdSpecification: EC2ClientTypes.EnaSrdSpecification? - let enablePrimaryIpv6: Swift.Bool? - let connectionTrackingSpecification: EC2ClientTypes.ConnectionTrackingSpecificationRequest? -} - -extension ModifyNetworkInterfaceAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachment = "attachment" - case connectionTrackingSpecification = "ConnectionTrackingSpecification" - case description = "description" - case dryRun = "dryRun" - case enaSrdSpecification = "EnaSrdSpecification" - case enablePrimaryIpv6 = "EnablePrimaryIpv6" - case groups = "SecurityGroupId" - case networkInterfaceId = "networkInterfaceId" - case sourceDestCheck = "sourceDestCheck" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceAttachmentChanges.self, forKey: .attachment) - attachment = attachmentDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeValue.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct SecurityGroupId{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupsBuffer:[Swift.String]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [Swift.String]() - for stringContainer0 in groupsContainer { - groupsBuffer?.append(stringContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let sourceDestCheckDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .sourceDestCheck) - sourceDestCheck = sourceDestCheckDecoded - let enaSrdSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnaSrdSpecification.self, forKey: .enaSrdSpecification) - enaSrdSpecification = enaSrdSpecificationDecoded - let enablePrimaryIpv6Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePrimaryIpv6) - enablePrimaryIpv6 = enablePrimaryIpv6Decoded - let connectionTrackingSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionTrackingSpecificationRequest.self, forKey: .connectionTrackingSpecification) - connectionTrackingSpecification = connectionTrackingSpecificationDecoded - } -} - -extension ModifyNetworkInterfaceAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ModifyNetworkInterfaceAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifyNetworkInterfaceAttributeOutput() + } } } @@ -134658,11 +95489,18 @@ public struct ModifyNetworkInterfaceAttributeOutput: Swift.Equatable { public init() { } } -enum ModifyNetworkInterfaceAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifyNetworkInterfaceAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -134726,46 +95564,15 @@ public struct ModifyPrivateDnsNameOptionsInput: Swift.Equatable { } } -struct ModifyPrivateDnsNameOptionsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceId: Swift.String? - let privateDnsHostnameType: EC2ClientTypes.HostnameType? - let enableResourceNameDnsARecord: Swift.Bool? - let enableResourceNameDnsAAAARecord: Swift.Bool? -} - -extension ModifyPrivateDnsNameOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case enableResourceNameDnsAAAARecord = "EnableResourceNameDnsAAAARecord" - case enableResourceNameDnsARecord = "EnableResourceNameDnsARecord" - case instanceId = "InstanceId" - case privateDnsHostnameType = "PrivateDnsHostnameType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let privateDnsHostnameTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostnameType.self, forKey: .privateDnsHostnameType) - privateDnsHostnameType = privateDnsHostnameTypeDecoded - let enableResourceNameDnsARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsARecord) - enableResourceNameDnsARecord = enableResourceNameDnsARecordDecoded - let enableResourceNameDnsAAAARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsAAAARecord) - enableResourceNameDnsAAAARecord = enableResourceNameDnsAAAARecordDecoded - } -} +extension ModifyPrivateDnsNameOptionsOutput { -extension ModifyPrivateDnsNameOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyPrivateDnsNameOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyPrivateDnsNameOptionsOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -134782,27 +95589,18 @@ public struct ModifyPrivateDnsNameOptionsOutput: Swift.Equatable { } } -struct ModifyPrivateDnsNameOptionsOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyPrivateDnsNameOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyPrivateDnsNameOptionsOutputError { -enum ModifyPrivateDnsNameOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -134872,72 +95670,15 @@ public struct ModifyReservedInstancesInput: Swift.Equatable { } } -struct ModifyReservedInstancesInputBody: Swift.Equatable { - let reservedInstancesIds: [Swift.String]? - let clientToken: Swift.String? - let targetConfigurations: [EC2ClientTypes.ReservedInstancesConfiguration]? -} - -extension ModifyReservedInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case reservedInstancesIds = "ReservedInstancesId" - case targetConfigurations = "ReservedInstancesConfigurationSetItemType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.reservedInstancesIds) { - struct KeyVal0{struct ReservedInstancesId{}} - let reservedInstancesIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesIds) - if let reservedInstancesIdsWrappedContainer = reservedInstancesIdsWrappedContainer { - let reservedInstancesIdsContainer = try reservedInstancesIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var reservedInstancesIdsBuffer:[Swift.String]? = nil - if let reservedInstancesIdsContainer = reservedInstancesIdsContainer { - reservedInstancesIdsBuffer = [Swift.String]() - for stringContainer0 in reservedInstancesIdsContainer { - reservedInstancesIdsBuffer?.append(stringContainer0) - } - } - reservedInstancesIds = reservedInstancesIdsBuffer - } else { - reservedInstancesIds = [] - } - } else { - reservedInstancesIds = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - if containerValues.contains(.targetConfigurations) { - struct KeyVal0{struct item{}} - let targetConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetConfigurations) - if let targetConfigurationsWrappedContainer = targetConfigurationsWrappedContainer { - let targetConfigurationsContainer = try targetConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstancesConfiguration].self, forKey: .member) - var targetConfigurationsBuffer:[EC2ClientTypes.ReservedInstancesConfiguration]? = nil - if let targetConfigurationsContainer = targetConfigurationsContainer { - targetConfigurationsBuffer = [EC2ClientTypes.ReservedInstancesConfiguration]() - for structureContainer0 in targetConfigurationsContainer { - targetConfigurationsBuffer?.append(structureContainer0) - } - } - targetConfigurations = targetConfigurationsBuffer - } else { - targetConfigurations = [] - } - } else { - targetConfigurations = nil - } - } -} +extension ModifyReservedInstancesOutput { -extension ModifyReservedInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyReservedInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedInstancesModificationId = output.reservedInstancesModificationId - } else { - self.reservedInstancesModificationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyReservedInstancesOutput() + value.reservedInstancesModificationId = try reader["reservedInstancesModificationId"].readIfPresent() + return value } } } @@ -134955,27 +95696,18 @@ public struct ModifyReservedInstancesOutput: Swift.Equatable { } } -struct ModifyReservedInstancesOutputBody: Swift.Equatable { - let reservedInstancesModificationId: Swift.String? -} - -extension ModifyReservedInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesModificationId = "reservedInstancesModificationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedInstancesModificationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesModificationId) - reservedInstancesModificationId = reservedInstancesModificationIdDecoded - } -} +enum ModifyReservedInstancesOutputError { -enum ModifyReservedInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -135035,55 +95767,15 @@ public struct ModifySecurityGroupRulesInput: Swift.Equatable { } } -struct ModifySecurityGroupRulesInputBody: Swift.Equatable { - let groupId: Swift.String? - let securityGroupRules: [EC2ClientTypes.SecurityGroupRuleUpdate]? - let dryRun: Swift.Bool? -} - -extension ModifySecurityGroupRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupId = "GroupId" - case securityGroupRules = "SecurityGroupRule" - } +extension ModifySecurityGroupRulesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - if containerValues.contains(.securityGroupRules) { - struct KeyVal0{struct item{}} - let securityGroupRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRules) - if let securityGroupRulesWrappedContainer = securityGroupRulesWrappedContainer { - let securityGroupRulesContainer = try securityGroupRulesWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupRuleUpdate].self, forKey: .member) - var securityGroupRulesBuffer:[EC2ClientTypes.SecurityGroupRuleUpdate]? = nil - if let securityGroupRulesContainer = securityGroupRulesContainer { - securityGroupRulesBuffer = [EC2ClientTypes.SecurityGroupRuleUpdate]() - for structureContainer0 in securityGroupRulesContainer { - securityGroupRulesBuffer?.append(structureContainer0) - } - } - securityGroupRules = securityGroupRulesBuffer - } else { - securityGroupRules = [] - } - } else { - securityGroupRules = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifySecurityGroupRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifySecurityGroupRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifySecurityGroupRulesOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -135100,27 +95792,18 @@ public struct ModifySecurityGroupRulesOutput: Swift.Equatable { } } -struct ModifySecurityGroupRulesOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} +enum ModifySecurityGroupRulesOutputError { -extension ModifySecurityGroupRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum ModifySecurityGroupRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -135216,82 +95899,12 @@ public struct ModifySnapshotAttributeInput: Swift.Equatable { } } -struct ModifySnapshotAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.SnapshotAttributeName? - let createVolumePermission: EC2ClientTypes.CreateVolumePermissionModifications? - let groupNames: [Swift.String]? - let operationType: EC2ClientTypes.OperationType? - let snapshotId: Swift.String? - let userIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension ModifySnapshotAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case createVolumePermission = "CreateVolumePermission" - case dryRun = "dryRun" - case groupNames = "UserGroup" - case operationType = "OperationType" - case snapshotId = "SnapshotId" - case userIds = "UserId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let createVolumePermissionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreateVolumePermissionModifications.self, forKey: .createVolumePermission) - createVolumePermission = createVolumePermissionDecoded - if containerValues.contains(.groupNames) { - struct KeyVal0{struct GroupName{}} - let groupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupNames) - if let groupNamesWrappedContainer = groupNamesWrappedContainer { - let groupNamesContainer = try groupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupNamesBuffer:[Swift.String]? = nil - if let groupNamesContainer = groupNamesContainer { - groupNamesBuffer = [Swift.String]() - for stringContainer0 in groupNamesContainer { - groupNamesBuffer?.append(stringContainer0) - } - } - groupNames = groupNamesBuffer - } else { - groupNames = [] - } - } else { - groupNames = nil - } - let operationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OperationType.self, forKey: .operationType) - operationType = operationTypeDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - if containerValues.contains(.userIds) { - struct KeyVal0{struct UserId{}} - let userIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIds) - if let userIdsWrappedContainer = userIdsWrappedContainer { - let userIdsContainer = try userIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsBuffer:[Swift.String]? = nil - if let userIdsContainer = userIdsContainer { - userIdsBuffer = [Swift.String]() - for stringContainer0 in userIdsContainer { - userIdsBuffer?.append(stringContainer0) - } - } - userIds = userIdsBuffer - } else { - userIds = [] - } - } else { - userIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifySnapshotAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ModifySnapshotAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifySnapshotAttributeOutput() + } } } @@ -135300,11 +95913,18 @@ public struct ModifySnapshotAttributeOutput: Swift.Equatable { public init() { } } -enum ModifySnapshotAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifySnapshotAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -135354,40 +95974,16 @@ public struct ModifySnapshotTierInput: Swift.Equatable { } } -struct ModifySnapshotTierInputBody: Swift.Equatable { - let snapshotId: Swift.String? - let storageTier: EC2ClientTypes.TargetStorageTier? - let dryRun: Swift.Bool? -} - -extension ModifySnapshotTierInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case snapshotId = "SnapshotId" - case storageTier = "StorageTier" - } +extension ModifySnapshotTierOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let storageTierDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetStorageTier.self, forKey: .storageTier) - storageTier = storageTierDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifySnapshotTierOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifySnapshotTierOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshotId = output.snapshotId - self.tieringStartTime = output.tieringStartTime - } else { - self.snapshotId = nil - self.tieringStartTime = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifySnapshotTierOutput() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.tieringStartTime = try reader["tieringStartTime"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -135408,31 +96004,18 @@ public struct ModifySnapshotTierOutput: Swift.Equatable { } } -struct ModifySnapshotTierOutputBody: Swift.Equatable { - let snapshotId: Swift.String? - let tieringStartTime: ClientRuntime.Date? -} +enum ModifySnapshotTierOutputError { -extension ModifySnapshotTierOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshotId = "snapshotId" - case tieringStartTime = "tieringStartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let tieringStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .tieringStartTime) - tieringStartTime = tieringStartTimeDecoded - } -} - -enum ModifySnapshotTierOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -135513,67 +96096,15 @@ public struct ModifySpotFleetRequestInput: Swift.Equatable { } } -struct ModifySpotFleetRequestInputBody: Swift.Equatable { - let excessCapacityTerminationPolicy: EC2ClientTypes.ExcessCapacityTerminationPolicy? - let launchTemplateConfigs: [EC2ClientTypes.LaunchTemplateConfig]? - let spotFleetRequestId: Swift.String? - let targetCapacity: Swift.Int? - let onDemandTargetCapacity: Swift.Int? - let context: Swift.String? -} +extension ModifySpotFleetRequestOutput { -extension ModifySpotFleetRequestInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case context = "Context" - case excessCapacityTerminationPolicy = "excessCapacityTerminationPolicy" - case launchTemplateConfigs = "LaunchTemplateConfig" - case onDemandTargetCapacity = "OnDemandTargetCapacity" - case spotFleetRequestId = "spotFleetRequestId" - case targetCapacity = "targetCapacity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let excessCapacityTerminationPolicyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExcessCapacityTerminationPolicy.self, forKey: .excessCapacityTerminationPolicy) - excessCapacityTerminationPolicy = excessCapacityTerminationPolicyDecoded - if containerValues.contains(.launchTemplateConfigs) { - struct KeyVal0{struct item{}} - let launchTemplateConfigsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplateConfigs) - if let launchTemplateConfigsWrappedContainer = launchTemplateConfigsWrappedContainer { - let launchTemplateConfigsContainer = try launchTemplateConfigsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateConfig].self, forKey: .member) - var launchTemplateConfigsBuffer:[EC2ClientTypes.LaunchTemplateConfig]? = nil - if let launchTemplateConfigsContainer = launchTemplateConfigsContainer { - launchTemplateConfigsBuffer = [EC2ClientTypes.LaunchTemplateConfig]() - for structureContainer0 in launchTemplateConfigsContainer { - launchTemplateConfigsBuffer?.append(structureContainer0) - } - } - launchTemplateConfigs = launchTemplateConfigsBuffer - } else { - launchTemplateConfigs = [] - } - } else { - launchTemplateConfigs = nil - } - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded - let targetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetCapacity) - targetCapacity = targetCapacityDecoded - let onDemandTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandTargetCapacity) - onDemandTargetCapacity = onDemandTargetCapacityDecoded - let contextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .context) - context = contextDecoded - } -} - -extension ModifySpotFleetRequestOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifySpotFleetRequestOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifySpotFleetRequestOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -135591,27 +96122,18 @@ public struct ModifySpotFleetRequestOutput: Swift.Equatable { } } -struct ModifySpotFleetRequestOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifySpotFleetRequestOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifySpotFleetRequestOutputError { -enum ModifySpotFleetRequestOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -135717,64 +96239,12 @@ public struct ModifySubnetAttributeInput: Swift.Equatable { } } -struct ModifySubnetAttributeInputBody: Swift.Equatable { - let assignIpv6AddressOnCreation: EC2ClientTypes.AttributeBooleanValue? - let mapPublicIpOnLaunch: EC2ClientTypes.AttributeBooleanValue? - let subnetId: Swift.String? - let mapCustomerOwnedIpOnLaunch: EC2ClientTypes.AttributeBooleanValue? - let customerOwnedIpv4Pool: Swift.String? - let enableDns64: EC2ClientTypes.AttributeBooleanValue? - let privateDnsHostnameTypeOnLaunch: EC2ClientTypes.HostnameType? - let enableResourceNameDnsARecordOnLaunch: EC2ClientTypes.AttributeBooleanValue? - let enableResourceNameDnsAAAARecordOnLaunch: EC2ClientTypes.AttributeBooleanValue? - let enableLniAtDeviceIndex: Swift.Int? - let disableLniAtDeviceIndex: EC2ClientTypes.AttributeBooleanValue? -} - -extension ModifySubnetAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assignIpv6AddressOnCreation = "AssignIpv6AddressOnCreation" - case customerOwnedIpv4Pool = "CustomerOwnedIpv4Pool" - case disableLniAtDeviceIndex = "DisableLniAtDeviceIndex" - case enableDns64 = "EnableDns64" - case enableLniAtDeviceIndex = "EnableLniAtDeviceIndex" - case enableResourceNameDnsAAAARecordOnLaunch = "EnableResourceNameDnsAAAARecordOnLaunch" - case enableResourceNameDnsARecordOnLaunch = "EnableResourceNameDnsARecordOnLaunch" - case mapCustomerOwnedIpOnLaunch = "MapCustomerOwnedIpOnLaunch" - case mapPublicIpOnLaunch = "MapPublicIpOnLaunch" - case privateDnsHostnameTypeOnLaunch = "PrivateDnsHostnameTypeOnLaunch" - case subnetId = "subnetId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let assignIpv6AddressOnCreationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .assignIpv6AddressOnCreation) - assignIpv6AddressOnCreation = assignIpv6AddressOnCreationDecoded - let mapPublicIpOnLaunchDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .mapPublicIpOnLaunch) - mapPublicIpOnLaunch = mapPublicIpOnLaunchDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let mapCustomerOwnedIpOnLaunchDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .mapCustomerOwnedIpOnLaunch) - mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunchDecoded - let customerOwnedIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIpv4Pool) - customerOwnedIpv4Pool = customerOwnedIpv4PoolDecoded - let enableDns64Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableDns64) - enableDns64 = enableDns64Decoded - let privateDnsHostnameTypeOnLaunchDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostnameType.self, forKey: .privateDnsHostnameTypeOnLaunch) - privateDnsHostnameTypeOnLaunch = privateDnsHostnameTypeOnLaunchDecoded - let enableResourceNameDnsARecordOnLaunchDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableResourceNameDnsARecordOnLaunch) - enableResourceNameDnsARecordOnLaunch = enableResourceNameDnsARecordOnLaunchDecoded - let enableResourceNameDnsAAAARecordOnLaunchDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableResourceNameDnsAAAARecordOnLaunch) - enableResourceNameDnsAAAARecordOnLaunch = enableResourceNameDnsAAAARecordOnLaunchDecoded - let enableLniAtDeviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .enableLniAtDeviceIndex) - enableLniAtDeviceIndex = enableLniAtDeviceIndexDecoded - let disableLniAtDeviceIndexDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .disableLniAtDeviceIndex) - disableLniAtDeviceIndex = disableLniAtDeviceIndexDecoded - } -} - -extension ModifySubnetAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ModifySubnetAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifySubnetAttributeOutput() + } } } @@ -135783,11 +96253,18 @@ public struct ModifySubnetAttributeOutput: Swift.Equatable { public init() { } } -enum ModifySubnetAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifySubnetAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -135862,76 +96339,15 @@ public struct ModifyTrafficMirrorFilterNetworkServicesInput: Swift.Equatable { } } -struct ModifyTrafficMirrorFilterNetworkServicesInputBody: Swift.Equatable { - let trafficMirrorFilterId: Swift.String? - let addNetworkServices: [EC2ClientTypes.TrafficMirrorNetworkService]? - let removeNetworkServices: [EC2ClientTypes.TrafficMirrorNetworkService]? - let dryRun: Swift.Bool? -} - -extension ModifyTrafficMirrorFilterNetworkServicesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addNetworkServices = "AddNetworkService" - case dryRun = "DryRun" - case removeNetworkServices = "RemoveNetworkService" - case trafficMirrorFilterId = "TrafficMirrorFilterId" - } +extension ModifyTrafficMirrorFilterNetworkServicesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - if containerValues.contains(.addNetworkServices) { - struct KeyVal0{struct item{}} - let addNetworkServicesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addNetworkServices) - if let addNetworkServicesWrappedContainer = addNetworkServicesWrappedContainer { - let addNetworkServicesContainer = try addNetworkServicesWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorNetworkService].self, forKey: .member) - var addNetworkServicesBuffer:[EC2ClientTypes.TrafficMirrorNetworkService]? = nil - if let addNetworkServicesContainer = addNetworkServicesContainer { - addNetworkServicesBuffer = [EC2ClientTypes.TrafficMirrorNetworkService]() - for enumContainer0 in addNetworkServicesContainer { - addNetworkServicesBuffer?.append(enumContainer0) - } - } - addNetworkServices = addNetworkServicesBuffer - } else { - addNetworkServices = [] - } - } else { - addNetworkServices = nil - } - if containerValues.contains(.removeNetworkServices) { - struct KeyVal0{struct item{}} - let removeNetworkServicesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeNetworkServices) - if let removeNetworkServicesWrappedContainer = removeNetworkServicesWrappedContainer { - let removeNetworkServicesContainer = try removeNetworkServicesWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorNetworkService].self, forKey: .member) - var removeNetworkServicesBuffer:[EC2ClientTypes.TrafficMirrorNetworkService]? = nil - if let removeNetworkServicesContainer = removeNetworkServicesContainer { - removeNetworkServicesBuffer = [EC2ClientTypes.TrafficMirrorNetworkService]() - for enumContainer0 in removeNetworkServicesContainer { - removeNetworkServicesBuffer?.append(enumContainer0) - } - } - removeNetworkServices = removeNetworkServicesBuffer - } else { - removeNetworkServices = [] - } - } else { - removeNetworkServices = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifyTrafficMirrorFilterNetworkServicesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTrafficMirrorFilterNetworkServicesOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficMirrorFilter = output.trafficMirrorFilter - } else { - self.trafficMirrorFilter = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyTrafficMirrorFilterNetworkServicesOutput() + value.trafficMirrorFilter = try reader["trafficMirrorFilter"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorFilter.readingClosure) + return value } } } @@ -135948,27 +96364,18 @@ public struct ModifyTrafficMirrorFilterNetworkServicesOutput: Swift.Equatable { } } -struct ModifyTrafficMirrorFilterNetworkServicesOutputBody: Swift.Equatable { - let trafficMirrorFilter: EC2ClientTypes.TrafficMirrorFilter? -} - -extension ModifyTrafficMirrorFilterNetworkServicesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficMirrorFilter = "trafficMirrorFilter" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorFilter.self, forKey: .trafficMirrorFilter) - trafficMirrorFilter = trafficMirrorFilterDecoded - } -} +enum ModifyTrafficMirrorFilterNetworkServicesOutputError { -enum ModifyTrafficMirrorFilterNetworkServicesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -136090,91 +96497,15 @@ public struct ModifyTrafficMirrorFilterRuleInput: Swift.Equatable { } } -struct ModifyTrafficMirrorFilterRuleInputBody: Swift.Equatable { - let trafficMirrorFilterRuleId: Swift.String? - let trafficDirection: EC2ClientTypes.TrafficDirection? - let ruleNumber: Swift.Int? - let ruleAction: EC2ClientTypes.TrafficMirrorRuleAction? - let destinationPortRange: EC2ClientTypes.TrafficMirrorPortRangeRequest? - let sourcePortRange: EC2ClientTypes.TrafficMirrorPortRangeRequest? - let `protocol`: Swift.Int? - let destinationCidrBlock: Swift.String? - let sourceCidrBlock: Swift.String? - let description: Swift.String? - let removeFields: [EC2ClientTypes.TrafficMirrorFilterRuleField]? - let dryRun: Swift.Bool? -} - -extension ModifyTrafficMirrorFilterRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case destinationCidrBlock = "DestinationCidrBlock" - case destinationPortRange = "DestinationPortRange" - case dryRun = "DryRun" - case `protocol` = "Protocol" - case removeFields = "RemoveField" - case ruleAction = "RuleAction" - case ruleNumber = "RuleNumber" - case sourceCidrBlock = "SourceCidrBlock" - case sourcePortRange = "SourcePortRange" - case trafficDirection = "TrafficDirection" - case trafficMirrorFilterRuleId = "TrafficMirrorFilterRuleId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterRuleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterRuleId) - trafficMirrorFilterRuleId = trafficMirrorFilterRuleIdDecoded - let trafficDirectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficDirection.self, forKey: .trafficDirection) - trafficDirection = trafficDirectionDecoded - let ruleNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ruleNumber) - ruleNumber = ruleNumberDecoded - let ruleActionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorRuleAction.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let destinationPortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorPortRangeRequest.self, forKey: .destinationPortRange) - destinationPortRange = destinationPortRangeDecoded - let sourcePortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorPortRangeRequest.self, forKey: .sourcePortRange) - sourcePortRange = sourcePortRangeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .protocol) - `protocol` = protocolDecoded - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let sourceCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceCidrBlock) - sourceCidrBlock = sourceCidrBlockDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.removeFields) { - struct KeyVal0{struct member{}} - let removeFieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeFields) - if let removeFieldsWrappedContainer = removeFieldsWrappedContainer { - let removeFieldsContainer = try removeFieldsWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorFilterRuleField].self, forKey: .member) - var removeFieldsBuffer:[EC2ClientTypes.TrafficMirrorFilterRuleField]? = nil - if let removeFieldsContainer = removeFieldsContainer { - removeFieldsBuffer = [EC2ClientTypes.TrafficMirrorFilterRuleField]() - for enumContainer0 in removeFieldsContainer { - removeFieldsBuffer?.append(enumContainer0) - } - } - removeFields = removeFieldsBuffer - } else { - removeFields = [] - } - } else { - removeFields = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifyTrafficMirrorFilterRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTrafficMirrorFilterRuleOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficMirrorFilterRule = output.trafficMirrorFilterRule - } else { - self.trafficMirrorFilterRule = nil +extension ModifyTrafficMirrorFilterRuleOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyTrafficMirrorFilterRuleOutput() + value.trafficMirrorFilterRule = try reader["trafficMirrorFilterRule"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorFilterRule.readingClosure) + return value } } } @@ -136191,27 +96522,18 @@ public struct ModifyTrafficMirrorFilterRuleOutput: Swift.Equatable { } } -struct ModifyTrafficMirrorFilterRuleOutputBody: Swift.Equatable { - let trafficMirrorFilterRule: EC2ClientTypes.TrafficMirrorFilterRule? -} - -extension ModifyTrafficMirrorFilterRuleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficMirrorFilterRule = "trafficMirrorFilterRule" - } +enum ModifyTrafficMirrorFilterRuleOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorFilterRule.self, forKey: .trafficMirrorFilterRule) - trafficMirrorFilterRule = trafficMirrorFilterRuleDecoded - } -} - -enum ModifyTrafficMirrorFilterRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -136312,79 +96634,15 @@ public struct ModifyTrafficMirrorSessionInput: Swift.Equatable { } } -struct ModifyTrafficMirrorSessionInputBody: Swift.Equatable { - let trafficMirrorSessionId: Swift.String? - let trafficMirrorTargetId: Swift.String? - let trafficMirrorFilterId: Swift.String? - let packetLength: Swift.Int? - let sessionNumber: Swift.Int? - let virtualNetworkId: Swift.Int? - let description: Swift.String? - let removeFields: [EC2ClientTypes.TrafficMirrorSessionField]? - let dryRun: Swift.Bool? -} - -extension ModifyTrafficMirrorSessionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case dryRun = "DryRun" - case packetLength = "PacketLength" - case removeFields = "RemoveField" - case sessionNumber = "SessionNumber" - case trafficMirrorFilterId = "TrafficMirrorFilterId" - case trafficMirrorSessionId = "TrafficMirrorSessionId" - case trafficMirrorTargetId = "TrafficMirrorTargetId" - case virtualNetworkId = "VirtualNetworkId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorSessionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorSessionId) - trafficMirrorSessionId = trafficMirrorSessionIdDecoded - let trafficMirrorTargetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorTargetId) - trafficMirrorTargetId = trafficMirrorTargetIdDecoded - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - let packetLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetLength) - packetLength = packetLengthDecoded - let sessionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sessionNumber) - sessionNumber = sessionNumberDecoded - let virtualNetworkIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .virtualNetworkId) - virtualNetworkId = virtualNetworkIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.removeFields) { - struct KeyVal0{struct member{}} - let removeFieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeFields) - if let removeFieldsWrappedContainer = removeFieldsWrappedContainer { - let removeFieldsContainer = try removeFieldsWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorSessionField].self, forKey: .member) - var removeFieldsBuffer:[EC2ClientTypes.TrafficMirrorSessionField]? = nil - if let removeFieldsContainer = removeFieldsContainer { - removeFieldsBuffer = [EC2ClientTypes.TrafficMirrorSessionField]() - for enumContainer0 in removeFieldsContainer { - removeFieldsBuffer?.append(enumContainer0) - } - } - removeFields = removeFieldsBuffer - } else { - removeFields = [] - } - } else { - removeFields = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifyTrafficMirrorSessionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTrafficMirrorSessionOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficMirrorSession = output.trafficMirrorSession - } else { - self.trafficMirrorSession = nil +extension ModifyTrafficMirrorSessionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyTrafficMirrorSessionOutput() + value.trafficMirrorSession = try reader["trafficMirrorSession"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorSession.readingClosure) + return value } } } @@ -136401,27 +96659,18 @@ public struct ModifyTrafficMirrorSessionOutput: Swift.Equatable { } } -struct ModifyTrafficMirrorSessionOutputBody: Swift.Equatable { - let trafficMirrorSession: EC2ClientTypes.TrafficMirrorSession? -} - -extension ModifyTrafficMirrorSessionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficMirrorSession = "trafficMirrorSession" - } +enum ModifyTrafficMirrorSessionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorSessionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorSession.self, forKey: .trafficMirrorSession) - trafficMirrorSession = trafficMirrorSessionDecoded - } -} - -enum ModifyTrafficMirrorSessionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -136478,48 +96727,7 @@ public struct ModifyTransitGatewayInput: Swift.Equatable { } } -struct ModifyTransitGatewayInputBody: Swift.Equatable { - let transitGatewayId: Swift.String? - let description: Swift.String? - let options: EC2ClientTypes.ModifyTransitGatewayOptions? - let dryRun: Swift.Bool? -} - -extension ModifyTransitGatewayInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case dryRun = "DryRun" - case options = "Options" - case transitGatewayId = "TransitGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModifyTransitGatewayOptions.self, forKey: .options) - options = optionsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EC2ClientTypes.ModifyTransitGatewayOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addTransitGatewayCidrBlocks = "AddTransitGatewayCidrBlocks" - case amazonSideAsn = "AmazonSideAsn" - case associationDefaultRouteTableId = "AssociationDefaultRouteTableId" - case autoAcceptSharedAttachments = "AutoAcceptSharedAttachments" - case defaultRouteTableAssociation = "DefaultRouteTableAssociation" - case defaultRouteTablePropagation = "DefaultRouteTablePropagation" - case dnsSupport = "DnsSupport" - case propagationDefaultRouteTableId = "PropagationDefaultRouteTableId" - case removeTransitGatewayCidrBlocks = "RemoveTransitGatewayCidrBlocks" - case securityGroupReferencingSupport = "SecurityGroupReferencingSupport" - case vpnEcmpSupport = "VpnEcmpSupport" - } +extension EC2ClientTypes.ModifyTransitGatewayOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -136576,64 +96784,23 @@ extension EC2ClientTypes.ModifyTransitGatewayOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.addTransitGatewayCidrBlocks) { - struct KeyVal0{struct item{}} - let addTransitGatewayCidrBlocksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addTransitGatewayCidrBlocks) - if let addTransitGatewayCidrBlocksWrappedContainer = addTransitGatewayCidrBlocksWrappedContainer { - let addTransitGatewayCidrBlocksContainer = try addTransitGatewayCidrBlocksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addTransitGatewayCidrBlocksBuffer:[Swift.String]? = nil - if let addTransitGatewayCidrBlocksContainer = addTransitGatewayCidrBlocksContainer { - addTransitGatewayCidrBlocksBuffer = [Swift.String]() - for stringContainer0 in addTransitGatewayCidrBlocksContainer { - addTransitGatewayCidrBlocksBuffer?.append(stringContainer0) - } - } - addTransitGatewayCidrBlocks = addTransitGatewayCidrBlocksBuffer - } else { - addTransitGatewayCidrBlocks = [] - } - } else { - addTransitGatewayCidrBlocks = nil - } - if containerValues.contains(.removeTransitGatewayCidrBlocks) { - struct KeyVal0{struct item{}} - let removeTransitGatewayCidrBlocksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeTransitGatewayCidrBlocks) - if let removeTransitGatewayCidrBlocksWrappedContainer = removeTransitGatewayCidrBlocksWrappedContainer { - let removeTransitGatewayCidrBlocksContainer = try removeTransitGatewayCidrBlocksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeTransitGatewayCidrBlocksBuffer:[Swift.String]? = nil - if let removeTransitGatewayCidrBlocksContainer = removeTransitGatewayCidrBlocksContainer { - removeTransitGatewayCidrBlocksBuffer = [Swift.String]() - for stringContainer0 in removeTransitGatewayCidrBlocksContainer { - removeTransitGatewayCidrBlocksBuffer?.append(stringContainer0) - } - } - removeTransitGatewayCidrBlocks = removeTransitGatewayCidrBlocksBuffer - } else { - removeTransitGatewayCidrBlocks = [] - } - } else { - removeTransitGatewayCidrBlocks = nil - } - let vpnEcmpSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnEcmpSupportValue.self, forKey: .vpnEcmpSupport) - vpnEcmpSupport = vpnEcmpSupportDecoded - let dnsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsSupportValue.self, forKey: .dnsSupport) - dnsSupport = dnsSupportDecoded - let securityGroupReferencingSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SecurityGroupReferencingSupportValue.self, forKey: .securityGroupReferencingSupport) - securityGroupReferencingSupport = securityGroupReferencingSupportDecoded - let autoAcceptSharedAttachmentsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AutoAcceptSharedAttachmentsValue.self, forKey: .autoAcceptSharedAttachments) - autoAcceptSharedAttachments = autoAcceptSharedAttachmentsDecoded - let defaultRouteTableAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DefaultRouteTableAssociationValue.self, forKey: .defaultRouteTableAssociation) - defaultRouteTableAssociation = defaultRouteTableAssociationDecoded - let associationDefaultRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationDefaultRouteTableId) - associationDefaultRouteTableId = associationDefaultRouteTableIdDecoded - let defaultRouteTablePropagationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DefaultRouteTablePropagationValue.self, forKey: .defaultRouteTablePropagation) - defaultRouteTablePropagation = defaultRouteTablePropagationDecoded - let propagationDefaultRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .propagationDefaultRouteTableId) - propagationDefaultRouteTableId = propagationDefaultRouteTableIdDecoded - let amazonSideAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amazonSideAsn) - amazonSideAsn = amazonSideAsnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ModifyTransitGatewayOptions() + value.addTransitGatewayCidrBlocks = try reader["AddTransitGatewayCidrBlocks"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.removeTransitGatewayCidrBlocks = try reader["RemoveTransitGatewayCidrBlocks"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpnEcmpSupport = try reader["VpnEcmpSupport"].readIfPresent() + value.dnsSupport = try reader["DnsSupport"].readIfPresent() + value.securityGroupReferencingSupport = try reader["SecurityGroupReferencingSupport"].readIfPresent() + value.autoAcceptSharedAttachments = try reader["AutoAcceptSharedAttachments"].readIfPresent() + value.defaultRouteTableAssociation = try reader["DefaultRouteTableAssociation"].readIfPresent() + value.associationDefaultRouteTableId = try reader["AssociationDefaultRouteTableId"].readIfPresent() + value.defaultRouteTablePropagation = try reader["DefaultRouteTablePropagation"].readIfPresent() + value.propagationDefaultRouteTableId = try reader["PropagationDefaultRouteTableId"].readIfPresent() + value.amazonSideAsn = try reader["AmazonSideAsn"].readIfPresent() + return value + } } } @@ -136693,14 +96860,15 @@ extension EC2ClientTypes { } -extension ModifyTransitGatewayOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTransitGatewayOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGateway = output.transitGateway - } else { - self.transitGateway = nil +extension ModifyTransitGatewayOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyTransitGatewayOutput() + value.transitGateway = try reader["transitGateway"].readIfPresent(readingClosure: EC2ClientTypes.TransitGateway.readingClosure) + return value } } } @@ -136717,27 +96885,18 @@ public struct ModifyTransitGatewayOutput: Swift.Equatable { } } -struct ModifyTransitGatewayOutputBody: Swift.Equatable { - let transitGateway: EC2ClientTypes.TransitGateway? -} - -extension ModifyTransitGatewayOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGateway = "transitGateway" - } +enum ModifyTransitGatewayOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGateway.self, forKey: .transitGateway) - transitGateway = transitGatewayDecoded - } -} - -enum ModifyTransitGatewayOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -136802,46 +96961,15 @@ public struct ModifyTransitGatewayPrefixListReferenceInput: Swift.Equatable { } } -struct ModifyTransitGatewayPrefixListReferenceInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let prefixListId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let blackhole: Swift.Bool? - let dryRun: Swift.Bool? -} - -extension ModifyTransitGatewayPrefixListReferenceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blackhole = "Blackhole" - case dryRun = "DryRun" - case prefixListId = "PrefixListId" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let blackholeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blackhole) - blackhole = blackholeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ModifyTransitGatewayPrefixListReferenceOutput { -extension ModifyTransitGatewayPrefixListReferenceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTransitGatewayPrefixListReferenceOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPrefixListReference = output.transitGatewayPrefixListReference - } else { - self.transitGatewayPrefixListReference = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyTransitGatewayPrefixListReferenceOutput() + value.transitGatewayPrefixListReference = try reader["transitGatewayPrefixListReference"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPrefixListReference.readingClosure) + return value } } } @@ -136858,27 +96986,18 @@ public struct ModifyTransitGatewayPrefixListReferenceOutput: Swift.Equatable { } } -struct ModifyTransitGatewayPrefixListReferenceOutputBody: Swift.Equatable { - let transitGatewayPrefixListReference: EC2ClientTypes.TransitGatewayPrefixListReference? -} - -extension ModifyTransitGatewayPrefixListReferenceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPrefixListReference = "transitGatewayPrefixListReference" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPrefixListReferenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPrefixListReference.self, forKey: .transitGatewayPrefixListReference) - transitGatewayPrefixListReference = transitGatewayPrefixListReferenceDecoded - } -} +enum ModifyTransitGatewayPrefixListReferenceOutputError { -enum ModifyTransitGatewayPrefixListReferenceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -136960,80 +97079,15 @@ public struct ModifyTransitGatewayVpcAttachmentInput: Swift.Equatable { } } -struct ModifyTransitGatewayVpcAttachmentInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let addSubnetIds: [Swift.String]? - let removeSubnetIds: [Swift.String]? - let options: EC2ClientTypes.ModifyTransitGatewayVpcAttachmentRequestOptions? - let dryRun: Swift.Bool? -} - -extension ModifyTransitGatewayVpcAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addSubnetIds = "AddSubnetIds" - case dryRun = "DryRun" - case options = "Options" - case removeSubnetIds = "RemoveSubnetIds" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } +extension ModifyTransitGatewayVpcAttachmentOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - if containerValues.contains(.addSubnetIds) { - struct KeyVal0{struct item{}} - let addSubnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addSubnetIds) - if let addSubnetIdsWrappedContainer = addSubnetIdsWrappedContainer { - let addSubnetIdsContainer = try addSubnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addSubnetIdsBuffer:[Swift.String]? = nil - if let addSubnetIdsContainer = addSubnetIdsContainer { - addSubnetIdsBuffer = [Swift.String]() - for stringContainer0 in addSubnetIdsContainer { - addSubnetIdsBuffer?.append(stringContainer0) - } - } - addSubnetIds = addSubnetIdsBuffer - } else { - addSubnetIds = [] - } - } else { - addSubnetIds = nil - } - if containerValues.contains(.removeSubnetIds) { - struct KeyVal0{struct item{}} - let removeSubnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeSubnetIds) - if let removeSubnetIdsWrappedContainer = removeSubnetIdsWrappedContainer { - let removeSubnetIdsContainer = try removeSubnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeSubnetIdsBuffer:[Swift.String]? = nil - if let removeSubnetIdsContainer = removeSubnetIdsContainer { - removeSubnetIdsBuffer = [Swift.String]() - for stringContainer0 in removeSubnetIdsContainer { - removeSubnetIdsBuffer?.append(stringContainer0) - } - } - removeSubnetIds = removeSubnetIdsBuffer - } else { - removeSubnetIds = [] - } - } else { - removeSubnetIds = nil - } - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModifyTransitGatewayVpcAttachmentRequestOptions.self, forKey: .options) - options = optionsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifyTransitGatewayVpcAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTransitGatewayVpcAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayVpcAttachment = output.transitGatewayVpcAttachment - } else { - self.transitGatewayVpcAttachment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyTransitGatewayVpcAttachmentOutput() + value.transitGatewayVpcAttachment = try reader["transitGatewayVpcAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayVpcAttachment.readingClosure) + return value } } } @@ -137050,38 +97104,23 @@ public struct ModifyTransitGatewayVpcAttachmentOutput: Swift.Equatable { } } -struct ModifyTransitGatewayVpcAttachmentOutputBody: Swift.Equatable { - let transitGatewayVpcAttachment: EC2ClientTypes.TransitGatewayVpcAttachment? -} - -extension ModifyTransitGatewayVpcAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayVpcAttachment = "transitGatewayVpcAttachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayVpcAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayVpcAttachment.self, forKey: .transitGatewayVpcAttachment) - transitGatewayVpcAttachment = transitGatewayVpcAttachmentDecoded - } -} +enum ModifyTransitGatewayVpcAttachmentOutputError { -enum ModifyTransitGatewayVpcAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ModifyTransitGatewayVpcAttachmentRequestOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applianceModeSupport = "ApplianceModeSupport" - case dnsSupport = "DnsSupport" - case ipv6Support = "Ipv6Support" - case securityGroupReferencingSupport = "SecurityGroupReferencingSupport" - } +extension EC2ClientTypes.ModifyTransitGatewayVpcAttachmentRequestOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -137099,16 +97138,16 @@ extension EC2ClientTypes.ModifyTransitGatewayVpcAttachmentRequestOptions: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dnsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsSupportValue.self, forKey: .dnsSupport) - dnsSupport = dnsSupportDecoded - let securityGroupReferencingSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SecurityGroupReferencingSupportValue.self, forKey: .securityGroupReferencingSupport) - securityGroupReferencingSupport = securityGroupReferencingSupportDecoded - let ipv6SupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ipv6SupportValue.self, forKey: .ipv6Support) - ipv6Support = ipv6SupportDecoded - let applianceModeSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ApplianceModeSupportValue.self, forKey: .applianceModeSupport) - applianceModeSupport = applianceModeSupportDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ModifyTransitGatewayVpcAttachmentRequestOptions() + value.dnsSupport = try reader["DnsSupport"].readIfPresent() + value.securityGroupReferencingSupport = try reader["SecurityGroupReferencingSupport"].readIfPresent() + value.ipv6Support = try reader["Ipv6Support"].readIfPresent() + value.applianceModeSupport = try reader["ApplianceModeSupport"].readIfPresent() + return value + } } } @@ -137140,11 +97179,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ModifyVerifiedAccessEndpointEniOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case port = "Port" - case `protocol` = "Protocol" - } +extension EC2ClientTypes.ModifyVerifiedAccessEndpointEniOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -137156,12 +97191,14 @@ extension EC2ClientTypes.ModifyVerifiedAccessEndpointEniOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ModifyVerifiedAccessEndpointEniOptions() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + return value + } } } @@ -137258,52 +97295,7 @@ public struct ModifyVerifiedAccessEndpointInput: Swift.Equatable { } } -struct ModifyVerifiedAccessEndpointInputBody: Swift.Equatable { - let verifiedAccessEndpointId: Swift.String? - let verifiedAccessGroupId: Swift.String? - let loadBalancerOptions: EC2ClientTypes.ModifyVerifiedAccessEndpointLoadBalancerOptions? - let networkInterfaceOptions: EC2ClientTypes.ModifyVerifiedAccessEndpointEniOptions? - let description: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension ModifyVerifiedAccessEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case loadBalancerOptions = "LoadBalancerOptions" - case networkInterfaceOptions = "NetworkInterfaceOptions" - case verifiedAccessEndpointId = "VerifiedAccessEndpointId" - case verifiedAccessGroupId = "VerifiedAccessGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessEndpointId) - verifiedAccessEndpointId = verifiedAccessEndpointIdDecoded - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let loadBalancerOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModifyVerifiedAccessEndpointLoadBalancerOptions.self, forKey: .loadBalancerOptions) - loadBalancerOptions = loadBalancerOptionsDecoded - let networkInterfaceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModifyVerifiedAccessEndpointEniOptions.self, forKey: .networkInterfaceOptions) - networkInterfaceOptions = networkInterfaceOptionsDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension EC2ClientTypes.ModifyVerifiedAccessEndpointLoadBalancerOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case port = "Port" - case `protocol` = "Protocol" - case subnetIds = "SubnetId" - } +extension EC2ClientTypes.ModifyVerifiedAccessEndpointLoadBalancerOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -137327,31 +97319,15 @@ extension EC2ClientTypes.ModifyVerifiedAccessEndpointLoadBalancerOptions: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ModifyVerifiedAccessEndpointLoadBalancerOptions() + value.subnetIds = try reader["SubnetId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.`protocol` = try reader["Protocol"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + return value } - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded } } @@ -137379,14 +97355,15 @@ extension EC2ClientTypes { } -extension ModifyVerifiedAccessEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVerifiedAccessEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessEndpoint = output.verifiedAccessEndpoint - } else { - self.verifiedAccessEndpoint = nil +extension ModifyVerifiedAccessEndpointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVerifiedAccessEndpointOutput() + value.verifiedAccessEndpoint = try reader["verifiedAccessEndpoint"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessEndpoint.readingClosure) + return value } } } @@ -137403,27 +97380,18 @@ public struct ModifyVerifiedAccessEndpointOutput: Swift.Equatable { } } -struct ModifyVerifiedAccessEndpointOutputBody: Swift.Equatable { - let verifiedAccessEndpoint: EC2ClientTypes.VerifiedAccessEndpoint? -} - -extension ModifyVerifiedAccessEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessEndpoint = "verifiedAccessEndpoint" - } +enum ModifyVerifiedAccessEndpointOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessEndpointDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpoint.self, forKey: .verifiedAccessEndpoint) - verifiedAccessEndpoint = verifiedAccessEndpointDecoded - } -} - -enum ModifyVerifiedAccessEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -137494,54 +97462,17 @@ public struct ModifyVerifiedAccessEndpointPolicyInput: Swift.Equatable { } } -struct ModifyVerifiedAccessEndpointPolicyInputBody: Swift.Equatable { - let verifiedAccessEndpointId: Swift.String? - let policyEnabled: Swift.Bool? - let policyDocument: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let sseSpecification: EC2ClientTypes.VerifiedAccessSseSpecificationRequest? -} +extension ModifyVerifiedAccessEndpointPolicyOutput { -extension ModifyVerifiedAccessEndpointPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case policyDocument = "PolicyDocument" - case policyEnabled = "PolicyEnabled" - case sseSpecification = "SseSpecification" - case verifiedAccessEndpointId = "VerifiedAccessEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessEndpointId) - verifiedAccessEndpointId = verifiedAccessEndpointIdDecoded - let policyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .policyEnabled) - policyEnabled = policyEnabledDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationRequest.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded - } -} - -extension ModifyVerifiedAccessEndpointPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVerifiedAccessEndpointPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policyDocument = output.policyDocument - self.policyEnabled = output.policyEnabled - self.sseSpecification = output.sseSpecification - } else { - self.policyDocument = nil - self.policyEnabled = nil - self.sseSpecification = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVerifiedAccessEndpointPolicyOutput() + value.policyDocument = try reader["policyDocument"].readIfPresent() + value.policyEnabled = try reader["policyEnabled"].readIfPresent() + value.sseSpecification = try reader["sseSpecification"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessSseSpecificationResponse.readingClosure) + return value } } } @@ -137566,35 +97497,18 @@ public struct ModifyVerifiedAccessEndpointPolicyOutput: Swift.Equatable { } } -struct ModifyVerifiedAccessEndpointPolicyOutputBody: Swift.Equatable { - let policyEnabled: Swift.Bool? - let policyDocument: Swift.String? - let sseSpecification: EC2ClientTypes.VerifiedAccessSseSpecificationResponse? -} - -extension ModifyVerifiedAccessEndpointPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "policyDocument" - case policyEnabled = "policyEnabled" - case sseSpecification = "sseSpecification" - } +enum ModifyVerifiedAccessEndpointPolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .policyEnabled) - policyEnabled = policyEnabledDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationResponse.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded - } -} - -enum ModifyVerifiedAccessEndpointPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -137658,46 +97572,15 @@ public struct ModifyVerifiedAccessGroupInput: Swift.Equatable { } } -struct ModifyVerifiedAccessGroupInputBody: Swift.Equatable { - let verifiedAccessGroupId: Swift.String? - let verifiedAccessInstanceId: Swift.String? - let description: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension ModifyVerifiedAccessGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case verifiedAccessGroupId = "VerifiedAccessGroupId" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ModifyVerifiedAccessGroupOutput { -extension ModifyVerifiedAccessGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVerifiedAccessGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessGroup = output.verifiedAccessGroup - } else { - self.verifiedAccessGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVerifiedAccessGroupOutput() + value.verifiedAccessGroup = try reader["verifiedAccessGroup"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessGroup.readingClosure) + return value } } } @@ -137714,27 +97597,18 @@ public struct ModifyVerifiedAccessGroupOutput: Swift.Equatable { } } -struct ModifyVerifiedAccessGroupOutputBody: Swift.Equatable { - let verifiedAccessGroup: EC2ClientTypes.VerifiedAccessGroup? -} - -extension ModifyVerifiedAccessGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessGroup = "verifiedAccessGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessGroup.self, forKey: .verifiedAccessGroup) - verifiedAccessGroup = verifiedAccessGroupDecoded - } -} +enum ModifyVerifiedAccessGroupOutputError { -enum ModifyVerifiedAccessGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -137805,54 +97679,17 @@ public struct ModifyVerifiedAccessGroupPolicyInput: Swift.Equatable { } } -struct ModifyVerifiedAccessGroupPolicyInputBody: Swift.Equatable { - let verifiedAccessGroupId: Swift.String? - let policyEnabled: Swift.Bool? - let policyDocument: Swift.String? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let sseSpecification: EC2ClientTypes.VerifiedAccessSseSpecificationRequest? -} - -extension ModifyVerifiedAccessGroupPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case policyDocument = "PolicyDocument" - case policyEnabled = "PolicyEnabled" - case sseSpecification = "SseSpecification" - case verifiedAccessGroupId = "VerifiedAccessGroupId" - } +extension ModifyVerifiedAccessGroupPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let policyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .policyEnabled) - policyEnabled = policyEnabledDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationRequest.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded - } -} - -extension ModifyVerifiedAccessGroupPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVerifiedAccessGroupPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policyDocument = output.policyDocument - self.policyEnabled = output.policyEnabled - self.sseSpecification = output.sseSpecification - } else { - self.policyDocument = nil - self.policyEnabled = nil - self.sseSpecification = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVerifiedAccessGroupPolicyOutput() + value.policyDocument = try reader["policyDocument"].readIfPresent() + value.policyEnabled = try reader["policyEnabled"].readIfPresent() + value.sseSpecification = try reader["sseSpecification"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessSseSpecificationResponse.readingClosure) + return value } } } @@ -137877,35 +97714,18 @@ public struct ModifyVerifiedAccessGroupPolicyOutput: Swift.Equatable { } } -struct ModifyVerifiedAccessGroupPolicyOutputBody: Swift.Equatable { - let policyEnabled: Swift.Bool? - let policyDocument: Swift.String? - let sseSpecification: EC2ClientTypes.VerifiedAccessSseSpecificationResponse? -} - -extension ModifyVerifiedAccessGroupPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "policyDocument" - case policyEnabled = "policyEnabled" - case sseSpecification = "sseSpecification" - } +enum ModifyVerifiedAccessGroupPolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .policyEnabled) - policyEnabled = policyEnabledDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationResponse.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded - } -} - -enum ModifyVerifiedAccessGroupPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -137962,34 +97782,6 @@ public struct ModifyVerifiedAccessInstanceInput: Swift.Equatable { } } -struct ModifyVerifiedAccessInstanceInputBody: Swift.Equatable { - let verifiedAccessInstanceId: Swift.String? - let description: Swift.String? - let dryRun: Swift.Bool? - let clientToken: Swift.String? -} - -extension ModifyVerifiedAccessInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case dryRun = "DryRun" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - extension ModifyVerifiedAccessInstanceLoggingConfigurationInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -138043,42 +97835,15 @@ public struct ModifyVerifiedAccessInstanceLoggingConfigurationInput: Swift.Equat } } -struct ModifyVerifiedAccessInstanceLoggingConfigurationInputBody: Swift.Equatable { - let verifiedAccessInstanceId: Swift.String? - let accessLogs: EC2ClientTypes.VerifiedAccessLogOptions? - let dryRun: Swift.Bool? - let clientToken: Swift.String? -} - -extension ModifyVerifiedAccessInstanceLoggingConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessLogs = "AccessLogs" - case clientToken = "ClientToken" - case dryRun = "DryRun" - case verifiedAccessInstanceId = "VerifiedAccessInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let accessLogsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogOptions.self, forKey: .accessLogs) - accessLogs = accessLogsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +extension ModifyVerifiedAccessInstanceLoggingConfigurationOutput { -extension ModifyVerifiedAccessInstanceLoggingConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVerifiedAccessInstanceLoggingConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.loggingConfiguration = output.loggingConfiguration - } else { - self.loggingConfiguration = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVerifiedAccessInstanceLoggingConfigurationOutput() + value.loggingConfiguration = try reader["loggingConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration.readingClosure) + return value } } } @@ -138095,39 +97860,31 @@ public struct ModifyVerifiedAccessInstanceLoggingConfigurationOutput: Swift.Equa } } -struct ModifyVerifiedAccessInstanceLoggingConfigurationOutputBody: Swift.Equatable { - let loggingConfiguration: EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration? -} - -extension ModifyVerifiedAccessInstanceLoggingConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loggingConfiguration = "loggingConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loggingConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration.self, forKey: .loggingConfiguration) - loggingConfiguration = loggingConfigurationDecoded - } -} +enum ModifyVerifiedAccessInstanceLoggingConfigurationOutputError { -enum ModifyVerifiedAccessInstanceLoggingConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension ModifyVerifiedAccessInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVerifiedAccessInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessInstance = output.verifiedAccessInstance - } else { - self.verifiedAccessInstance = nil +extension ModifyVerifiedAccessInstanceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVerifiedAccessInstanceOutput() + value.verifiedAccessInstance = try reader["verifiedAccessInstance"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessInstance.readingClosure) + return value } } } @@ -138144,35 +97901,23 @@ public struct ModifyVerifiedAccessInstanceOutput: Swift.Equatable { } } -struct ModifyVerifiedAccessInstanceOutputBody: Swift.Equatable { - let verifiedAccessInstance: EC2ClientTypes.VerifiedAccessInstance? -} - -extension ModifyVerifiedAccessInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessInstance = "verifiedAccessInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessInstance.self, forKey: .verifiedAccessInstance) - verifiedAccessInstance = verifiedAccessInstanceDecoded - } -} +enum ModifyVerifiedAccessInstanceOutputError { -enum ModifyVerifiedAccessInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ModifyVerifiedAccessTrustProviderDeviceOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicSigningKeyUrl = "PublicSigningKeyUrl" - } +extension EC2ClientTypes.ModifyVerifiedAccessTrustProviderDeviceOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -138181,10 +97926,13 @@ extension EC2ClientTypes.ModifyVerifiedAccessTrustProviderDeviceOptions: Swift.C } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicSigningKeyUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicSigningKeyUrl) - publicSigningKeyUrl = publicSigningKeyUrlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ModifyVerifiedAccessTrustProviderDeviceOptions() + value.publicSigningKeyUrl = try reader["PublicSigningKeyUrl"].readIfPresent() + return value + } } } @@ -138277,56 +98025,7 @@ public struct ModifyVerifiedAccessTrustProviderInput: Swift.Equatable { } } -struct ModifyVerifiedAccessTrustProviderInputBody: Swift.Equatable { - let verifiedAccessTrustProviderId: Swift.String? - let oidcOptions: EC2ClientTypes.ModifyVerifiedAccessTrustProviderOidcOptions? - let deviceOptions: EC2ClientTypes.ModifyVerifiedAccessTrustProviderDeviceOptions? - let description: Swift.String? - let dryRun: Swift.Bool? - let clientToken: Swift.String? - let sseSpecification: EC2ClientTypes.VerifiedAccessSseSpecificationRequest? -} - -extension ModifyVerifiedAccessTrustProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case description = "Description" - case deviceOptions = "DeviceOptions" - case dryRun = "DryRun" - case oidcOptions = "OidcOptions" - case sseSpecification = "SseSpecification" - case verifiedAccessTrustProviderId = "VerifiedAccessTrustProviderId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessTrustProviderId) - verifiedAccessTrustProviderId = verifiedAccessTrustProviderIdDecoded - let oidcOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModifyVerifiedAccessTrustProviderOidcOptions.self, forKey: .oidcOptions) - oidcOptions = oidcOptionsDecoded - let deviceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModifyVerifiedAccessTrustProviderDeviceOptions.self, forKey: .deviceOptions) - deviceOptions = deviceOptionsDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationRequest.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded - } -} - -extension EC2ClientTypes.ModifyVerifiedAccessTrustProviderOidcOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authorizationEndpoint = "AuthorizationEndpoint" - case clientId = "ClientId" - case clientSecret = "ClientSecret" - case issuer = "Issuer" - case scope = "Scope" - case tokenEndpoint = "TokenEndpoint" - case userInfoEndpoint = "UserInfoEndpoint" - } +extension EC2ClientTypes.ModifyVerifiedAccessTrustProviderOidcOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -138353,22 +98052,19 @@ extension EC2ClientTypes.ModifyVerifiedAccessTrustProviderOidcOptions: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let issuerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .issuer) - issuer = issuerDecoded - let authorizationEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authorizationEndpoint) - authorizationEndpoint = authorizationEndpointDecoded - let tokenEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tokenEndpoint) - tokenEndpoint = tokenEndpointDecoded - let userInfoEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userInfoEndpoint) - userInfoEndpoint = userInfoEndpointDecoded - let clientIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientId) - clientId = clientIdDecoded - let clientSecretDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientSecret) - clientSecret = clientSecretDecoded - let scopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scope) - scope = scopeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ModifyVerifiedAccessTrustProviderOidcOptions() + value.issuer = try reader["Issuer"].readIfPresent() + value.authorizationEndpoint = try reader["AuthorizationEndpoint"].readIfPresent() + value.tokenEndpoint = try reader["TokenEndpoint"].readIfPresent() + value.userInfoEndpoint = try reader["UserInfoEndpoint"].readIfPresent() + value.clientId = try reader["ClientId"].readIfPresent() + value.clientSecret = try reader["ClientSecret"].readIfPresent() + value.scope = try reader["Scope"].readIfPresent() + return value + } } } @@ -138417,14 +98113,15 @@ extension EC2ClientTypes { } -extension ModifyVerifiedAccessTrustProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVerifiedAccessTrustProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedAccessTrustProvider = output.verifiedAccessTrustProvider - } else { - self.verifiedAccessTrustProvider = nil +extension ModifyVerifiedAccessTrustProviderOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVerifiedAccessTrustProviderOutput() + value.verifiedAccessTrustProvider = try reader["verifiedAccessTrustProvider"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessTrustProvider.readingClosure) + return value } } } @@ -138441,27 +98138,18 @@ public struct ModifyVerifiedAccessTrustProviderOutput: Swift.Equatable { } } -struct ModifyVerifiedAccessTrustProviderOutputBody: Swift.Equatable { - let verifiedAccessTrustProvider: EC2ClientTypes.VerifiedAccessTrustProvider? -} - -extension ModifyVerifiedAccessTrustProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedAccessTrustProvider = "verifiedAccessTrustProvider" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessTrustProvider.self, forKey: .verifiedAccessTrustProvider) - verifiedAccessTrustProvider = verifiedAccessTrustProviderDecoded - } -} +enum ModifyVerifiedAccessTrustProviderOutputError { -enum ModifyVerifiedAccessTrustProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -138511,32 +98199,12 @@ public struct ModifyVolumeAttributeInput: Swift.Equatable { } } -struct ModifyVolumeAttributeInputBody: Swift.Equatable { - let autoEnableIO: EC2ClientTypes.AttributeBooleanValue? - let volumeId: Swift.String? - let dryRun: Swift.Bool? -} - -extension ModifyVolumeAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoEnableIO = "AutoEnableIO" - case dryRun = "dryRun" - case volumeId = "VolumeId" - } +extension ModifyVolumeAttributeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let autoEnableIODecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .autoEnableIO) - autoEnableIO = autoEnableIODecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ModifyVolumeAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifyVolumeAttributeOutput() + } } } @@ -138545,11 +98213,18 @@ public struct ModifyVolumeAttributeOutput: Swift.Equatable { public init() { } } -enum ModifyVolumeAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifyVolumeAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -138649,54 +98324,15 @@ public struct ModifyVolumeInput: Swift.Equatable { } } -struct ModifyVolumeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let volumeId: Swift.String? - let size: Swift.Int? - let volumeType: EC2ClientTypes.VolumeType? - let iops: Swift.Int? - let throughput: Swift.Int? - let multiAttachEnabled: Swift.Bool? -} - -extension ModifyVolumeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case iops = "Iops" - case multiAttachEnabled = "MultiAttachEnabled" - case size = "Size" - case throughput = "Throughput" - case volumeId = "VolumeId" - case volumeType = "VolumeType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded - let volumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .volumeType) - volumeType = volumeTypeDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) - throughput = throughputDecoded - let multiAttachEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAttachEnabled) - multiAttachEnabled = multiAttachEnabledDecoded - } -} +extension ModifyVolumeOutput { -extension ModifyVolumeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVolumeOutputBody = try responseDecoder.decode(responseBody: data) - self.volumeModification = output.volumeModification - } else { - self.volumeModification = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVolumeOutput() + value.volumeModification = try reader["volumeModification"].readIfPresent(readingClosure: EC2ClientTypes.VolumeModification.readingClosure) + return value } } } @@ -138713,27 +98349,18 @@ public struct ModifyVolumeOutput: Swift.Equatable { } } -struct ModifyVolumeOutputBody: Swift.Equatable { - let volumeModification: EC2ClientTypes.VolumeModification? -} - -extension ModifyVolumeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case volumeModification = "volumeModification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let volumeModificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeModification.self, forKey: .volumeModification) - volumeModification = volumeModificationDecoded - } -} +enum ModifyVolumeOutputError { -enum ModifyVolumeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -138790,36 +98417,12 @@ public struct ModifyVpcAttributeInput: Swift.Equatable { } } -struct ModifyVpcAttributeInputBody: Swift.Equatable { - let enableDnsHostnames: EC2ClientTypes.AttributeBooleanValue? - let enableDnsSupport: EC2ClientTypes.AttributeBooleanValue? - let vpcId: Swift.String? - let enableNetworkAddressUsageMetrics: EC2ClientTypes.AttributeBooleanValue? -} - -extension ModifyVpcAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableDnsHostnames = "EnableDnsHostnames" - case enableDnsSupport = "EnableDnsSupport" - case enableNetworkAddressUsageMetrics = "EnableNetworkAddressUsageMetrics" - case vpcId = "vpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enableDnsHostnamesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableDnsHostnames) - enableDnsHostnames = enableDnsHostnamesDecoded - let enableDnsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableDnsSupport) - enableDnsSupport = enableDnsSupportDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let enableNetworkAddressUsageMetricsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttributeBooleanValue.self, forKey: .enableNetworkAddressUsageMetrics) - enableNetworkAddressUsageMetrics = enableNetworkAddressUsageMetricsDecoded - } -} +extension ModifyVpcAttributeOutput { -extension ModifyVpcAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifyVpcAttributeOutput() + } } } @@ -138828,11 +98431,18 @@ public struct ModifyVpcAttributeOutput: Swift.Equatable { public init() { } } -enum ModifyVpcAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ModifyVpcAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -138898,59 +98508,15 @@ public struct ModifyVpcEndpointConnectionNotificationInput: Swift.Equatable { } } -struct ModifyVpcEndpointConnectionNotificationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let connectionNotificationId: Swift.String? - let connectionNotificationArn: Swift.String? - let connectionEvents: [Swift.String]? -} - -extension ModifyVpcEndpointConnectionNotificationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectionEvents = "ConnectionEvents" - case connectionNotificationArn = "ConnectionNotificationArn" - case connectionNotificationId = "ConnectionNotificationId" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let connectionNotificationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionNotificationId) - connectionNotificationId = connectionNotificationIdDecoded - let connectionNotificationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionNotificationArn) - connectionNotificationArn = connectionNotificationArnDecoded - if containerValues.contains(.connectionEvents) { - struct KeyVal0{struct item{}} - let connectionEventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .connectionEvents) - if let connectionEventsWrappedContainer = connectionEventsWrappedContainer { - let connectionEventsContainer = try connectionEventsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var connectionEventsBuffer:[Swift.String]? = nil - if let connectionEventsContainer = connectionEventsContainer { - connectionEventsBuffer = [Swift.String]() - for stringContainer0 in connectionEventsContainer { - connectionEventsBuffer?.append(stringContainer0) - } - } - connectionEvents = connectionEventsBuffer - } else { - connectionEvents = [] - } - } else { - connectionEvents = nil - } - } -} +extension ModifyVpcEndpointConnectionNotificationOutput { -extension ModifyVpcEndpointConnectionNotificationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpcEndpointConnectionNotificationOutputBody = try responseDecoder.decode(responseBody: data) - self.returnValue = output.returnValue - } else { - self.returnValue = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpcEndpointConnectionNotificationOutput() + value.returnValue = try reader["return"].readIfPresent() + return value } } } @@ -138967,27 +98533,18 @@ public struct ModifyVpcEndpointConnectionNotificationOutput: Swift.Equatable { } } -struct ModifyVpcEndpointConnectionNotificationOutputBody: Swift.Equatable { - let returnValue: Swift.Bool? -} - -extension ModifyVpcEndpointConnectionNotificationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case returnValue = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnValueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnValue) - returnValue = returnValueDecoded - } -} +enum ModifyVpcEndpointConnectionNotificationOutputError { -enum ModifyVpcEndpointConnectionNotificationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -139177,201 +98734,15 @@ public struct ModifyVpcEndpointInput: Swift.Equatable { } } -struct ModifyVpcEndpointInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcEndpointId: Swift.String? - let resetPolicy: Swift.Bool? - let policyDocument: Swift.String? - let addRouteTableIds: [Swift.String]? - let removeRouteTableIds: [Swift.String]? - let addSubnetIds: [Swift.String]? - let removeSubnetIds: [Swift.String]? - let addSecurityGroupIds: [Swift.String]? - let removeSecurityGroupIds: [Swift.String]? - let ipAddressType: EC2ClientTypes.IpAddressType? - let dnsOptions: EC2ClientTypes.DnsOptionsSpecification? - let privateDnsEnabled: Swift.Bool? - let subnetConfigurations: [EC2ClientTypes.SubnetConfiguration]? -} - -extension ModifyVpcEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addRouteTableIds = "AddRouteTableId" - case addSecurityGroupIds = "AddSecurityGroupId" - case addSubnetIds = "AddSubnetId" - case dnsOptions = "DnsOptions" - case dryRun = "DryRun" - case ipAddressType = "IpAddressType" - case policyDocument = "PolicyDocument" - case privateDnsEnabled = "PrivateDnsEnabled" - case removeRouteTableIds = "RemoveRouteTableId" - case removeSecurityGroupIds = "RemoveSecurityGroupId" - case removeSubnetIds = "RemoveSubnetId" - case resetPolicy = "ResetPolicy" - case subnetConfigurations = "SubnetConfiguration" - case vpcEndpointId = "VpcEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointId) - vpcEndpointId = vpcEndpointIdDecoded - let resetPolicyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resetPolicy) - resetPolicy = resetPolicyDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - if containerValues.contains(.addRouteTableIds) { - struct KeyVal0{struct item{}} - let addRouteTableIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addRouteTableIds) - if let addRouteTableIdsWrappedContainer = addRouteTableIdsWrappedContainer { - let addRouteTableIdsContainer = try addRouteTableIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addRouteTableIdsBuffer:[Swift.String]? = nil - if let addRouteTableIdsContainer = addRouteTableIdsContainer { - addRouteTableIdsBuffer = [Swift.String]() - for stringContainer0 in addRouteTableIdsContainer { - addRouteTableIdsBuffer?.append(stringContainer0) - } - } - addRouteTableIds = addRouteTableIdsBuffer - } else { - addRouteTableIds = [] - } - } else { - addRouteTableIds = nil - } - if containerValues.contains(.removeRouteTableIds) { - struct KeyVal0{struct item{}} - let removeRouteTableIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeRouteTableIds) - if let removeRouteTableIdsWrappedContainer = removeRouteTableIdsWrappedContainer { - let removeRouteTableIdsContainer = try removeRouteTableIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeRouteTableIdsBuffer:[Swift.String]? = nil - if let removeRouteTableIdsContainer = removeRouteTableIdsContainer { - removeRouteTableIdsBuffer = [Swift.String]() - for stringContainer0 in removeRouteTableIdsContainer { - removeRouteTableIdsBuffer?.append(stringContainer0) - } - } - removeRouteTableIds = removeRouteTableIdsBuffer - } else { - removeRouteTableIds = [] - } - } else { - removeRouteTableIds = nil - } - if containerValues.contains(.addSubnetIds) { - struct KeyVal0{struct item{}} - let addSubnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addSubnetIds) - if let addSubnetIdsWrappedContainer = addSubnetIdsWrappedContainer { - let addSubnetIdsContainer = try addSubnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addSubnetIdsBuffer:[Swift.String]? = nil - if let addSubnetIdsContainer = addSubnetIdsContainer { - addSubnetIdsBuffer = [Swift.String]() - for stringContainer0 in addSubnetIdsContainer { - addSubnetIdsBuffer?.append(stringContainer0) - } - } - addSubnetIds = addSubnetIdsBuffer - } else { - addSubnetIds = [] - } - } else { - addSubnetIds = nil - } - if containerValues.contains(.removeSubnetIds) { - struct KeyVal0{struct item{}} - let removeSubnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeSubnetIds) - if let removeSubnetIdsWrappedContainer = removeSubnetIdsWrappedContainer { - let removeSubnetIdsContainer = try removeSubnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeSubnetIdsBuffer:[Swift.String]? = nil - if let removeSubnetIdsContainer = removeSubnetIdsContainer { - removeSubnetIdsBuffer = [Swift.String]() - for stringContainer0 in removeSubnetIdsContainer { - removeSubnetIdsBuffer?.append(stringContainer0) - } - } - removeSubnetIds = removeSubnetIdsBuffer - } else { - removeSubnetIds = [] - } - } else { - removeSubnetIds = nil - } - if containerValues.contains(.addSecurityGroupIds) { - struct KeyVal0{struct item{}} - let addSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addSecurityGroupIds) - if let addSecurityGroupIdsWrappedContainer = addSecurityGroupIdsWrappedContainer { - let addSecurityGroupIdsContainer = try addSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addSecurityGroupIdsBuffer:[Swift.String]? = nil - if let addSecurityGroupIdsContainer = addSecurityGroupIdsContainer { - addSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in addSecurityGroupIdsContainer { - addSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - addSecurityGroupIds = addSecurityGroupIdsBuffer - } else { - addSecurityGroupIds = [] - } - } else { - addSecurityGroupIds = nil - } - if containerValues.contains(.removeSecurityGroupIds) { - struct KeyVal0{struct item{}} - let removeSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeSecurityGroupIds) - if let removeSecurityGroupIdsWrappedContainer = removeSecurityGroupIdsWrappedContainer { - let removeSecurityGroupIdsContainer = try removeSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeSecurityGroupIdsBuffer:[Swift.String]? = nil - if let removeSecurityGroupIdsContainer = removeSecurityGroupIdsContainer { - removeSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in removeSecurityGroupIdsContainer { - removeSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - removeSecurityGroupIds = removeSecurityGroupIdsBuffer - } else { - removeSecurityGroupIds = [] - } - } else { - removeSecurityGroupIds = nil - } - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let dnsOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsOptionsSpecification.self, forKey: .dnsOptions) - dnsOptions = dnsOptionsDecoded - let privateDnsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .privateDnsEnabled) - privateDnsEnabled = privateDnsEnabledDecoded - if containerValues.contains(.subnetConfigurations) { - struct KeyVal0{struct item{}} - let subnetConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetConfigurations) - if let subnetConfigurationsWrappedContainer = subnetConfigurationsWrappedContainer { - let subnetConfigurationsContainer = try subnetConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.SubnetConfiguration].self, forKey: .member) - var subnetConfigurationsBuffer:[EC2ClientTypes.SubnetConfiguration]? = nil - if let subnetConfigurationsContainer = subnetConfigurationsContainer { - subnetConfigurationsBuffer = [EC2ClientTypes.SubnetConfiguration]() - for structureContainer0 in subnetConfigurationsContainer { - subnetConfigurationsBuffer?.append(structureContainer0) - } - } - subnetConfigurations = subnetConfigurationsBuffer - } else { - subnetConfigurations = [] - } - } else { - subnetConfigurations = nil - } - } -} - -extension ModifyVpcEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpcEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil +extension ModifyVpcEndpointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpcEndpointOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -139388,27 +98759,18 @@ public struct ModifyVpcEndpointOutput: Swift.Equatable { } } -struct ModifyVpcEndpointOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyVpcEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyVpcEndpointOutputError { -enum ModifyVpcEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -139568,172 +98930,15 @@ public struct ModifyVpcEndpointServiceConfigurationInput: Swift.Equatable { } } -struct ModifyVpcEndpointServiceConfigurationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceId: Swift.String? - let privateDnsName: Swift.String? - let removePrivateDnsName: Swift.Bool? - let acceptanceRequired: Swift.Bool? - let addNetworkLoadBalancerArns: [Swift.String]? - let removeNetworkLoadBalancerArns: [Swift.String]? - let addGatewayLoadBalancerArns: [Swift.String]? - let removeGatewayLoadBalancerArns: [Swift.String]? - let addSupportedIpAddressTypes: [Swift.String]? - let removeSupportedIpAddressTypes: [Swift.String]? -} - -extension ModifyVpcEndpointServiceConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acceptanceRequired = "AcceptanceRequired" - case addGatewayLoadBalancerArns = "AddGatewayLoadBalancerArn" - case addNetworkLoadBalancerArns = "AddNetworkLoadBalancerArn" - case addSupportedIpAddressTypes = "AddSupportedIpAddressType" - case dryRun = "DryRun" - case privateDnsName = "PrivateDnsName" - case removeGatewayLoadBalancerArns = "RemoveGatewayLoadBalancerArn" - case removeNetworkLoadBalancerArns = "RemoveNetworkLoadBalancerArn" - case removePrivateDnsName = "RemovePrivateDnsName" - case removeSupportedIpAddressTypes = "RemoveSupportedIpAddressType" - case serviceId = "ServiceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - let removePrivateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .removePrivateDnsName) - removePrivateDnsName = removePrivateDnsNameDecoded - let acceptanceRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .acceptanceRequired) - acceptanceRequired = acceptanceRequiredDecoded - if containerValues.contains(.addNetworkLoadBalancerArns) { - struct KeyVal0{struct item{}} - let addNetworkLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addNetworkLoadBalancerArns) - if let addNetworkLoadBalancerArnsWrappedContainer = addNetworkLoadBalancerArnsWrappedContainer { - let addNetworkLoadBalancerArnsContainer = try addNetworkLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addNetworkLoadBalancerArnsBuffer:[Swift.String]? = nil - if let addNetworkLoadBalancerArnsContainer = addNetworkLoadBalancerArnsContainer { - addNetworkLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in addNetworkLoadBalancerArnsContainer { - addNetworkLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - addNetworkLoadBalancerArns = addNetworkLoadBalancerArnsBuffer - } else { - addNetworkLoadBalancerArns = [] - } - } else { - addNetworkLoadBalancerArns = nil - } - if containerValues.contains(.removeNetworkLoadBalancerArns) { - struct KeyVal0{struct item{}} - let removeNetworkLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeNetworkLoadBalancerArns) - if let removeNetworkLoadBalancerArnsWrappedContainer = removeNetworkLoadBalancerArnsWrappedContainer { - let removeNetworkLoadBalancerArnsContainer = try removeNetworkLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeNetworkLoadBalancerArnsBuffer:[Swift.String]? = nil - if let removeNetworkLoadBalancerArnsContainer = removeNetworkLoadBalancerArnsContainer { - removeNetworkLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in removeNetworkLoadBalancerArnsContainer { - removeNetworkLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - removeNetworkLoadBalancerArns = removeNetworkLoadBalancerArnsBuffer - } else { - removeNetworkLoadBalancerArns = [] - } - } else { - removeNetworkLoadBalancerArns = nil - } - if containerValues.contains(.addGatewayLoadBalancerArns) { - struct KeyVal0{struct item{}} - let addGatewayLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addGatewayLoadBalancerArns) - if let addGatewayLoadBalancerArnsWrappedContainer = addGatewayLoadBalancerArnsWrappedContainer { - let addGatewayLoadBalancerArnsContainer = try addGatewayLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addGatewayLoadBalancerArnsBuffer:[Swift.String]? = nil - if let addGatewayLoadBalancerArnsContainer = addGatewayLoadBalancerArnsContainer { - addGatewayLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in addGatewayLoadBalancerArnsContainer { - addGatewayLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - addGatewayLoadBalancerArns = addGatewayLoadBalancerArnsBuffer - } else { - addGatewayLoadBalancerArns = [] - } - } else { - addGatewayLoadBalancerArns = nil - } - if containerValues.contains(.removeGatewayLoadBalancerArns) { - struct KeyVal0{struct item{}} - let removeGatewayLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeGatewayLoadBalancerArns) - if let removeGatewayLoadBalancerArnsWrappedContainer = removeGatewayLoadBalancerArnsWrappedContainer { - let removeGatewayLoadBalancerArnsContainer = try removeGatewayLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeGatewayLoadBalancerArnsBuffer:[Swift.String]? = nil - if let removeGatewayLoadBalancerArnsContainer = removeGatewayLoadBalancerArnsContainer { - removeGatewayLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in removeGatewayLoadBalancerArnsContainer { - removeGatewayLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - removeGatewayLoadBalancerArns = removeGatewayLoadBalancerArnsBuffer - } else { - removeGatewayLoadBalancerArns = [] - } - } else { - removeGatewayLoadBalancerArns = nil - } - if containerValues.contains(.addSupportedIpAddressTypes) { - struct KeyVal0{struct item{}} - let addSupportedIpAddressTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addSupportedIpAddressTypes) - if let addSupportedIpAddressTypesWrappedContainer = addSupportedIpAddressTypesWrappedContainer { - let addSupportedIpAddressTypesContainer = try addSupportedIpAddressTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addSupportedIpAddressTypesBuffer:[Swift.String]? = nil - if let addSupportedIpAddressTypesContainer = addSupportedIpAddressTypesContainer { - addSupportedIpAddressTypesBuffer = [Swift.String]() - for stringContainer0 in addSupportedIpAddressTypesContainer { - addSupportedIpAddressTypesBuffer?.append(stringContainer0) - } - } - addSupportedIpAddressTypes = addSupportedIpAddressTypesBuffer - } else { - addSupportedIpAddressTypes = [] - } - } else { - addSupportedIpAddressTypes = nil - } - if containerValues.contains(.removeSupportedIpAddressTypes) { - struct KeyVal0{struct item{}} - let removeSupportedIpAddressTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeSupportedIpAddressTypes) - if let removeSupportedIpAddressTypesWrappedContainer = removeSupportedIpAddressTypesWrappedContainer { - let removeSupportedIpAddressTypesContainer = try removeSupportedIpAddressTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeSupportedIpAddressTypesBuffer:[Swift.String]? = nil - if let removeSupportedIpAddressTypesContainer = removeSupportedIpAddressTypesContainer { - removeSupportedIpAddressTypesBuffer = [Swift.String]() - for stringContainer0 in removeSupportedIpAddressTypesContainer { - removeSupportedIpAddressTypesBuffer?.append(stringContainer0) - } - } - removeSupportedIpAddressTypes = removeSupportedIpAddressTypesBuffer - } else { - removeSupportedIpAddressTypes = [] - } - } else { - removeSupportedIpAddressTypes = nil - } - } -} - -extension ModifyVpcEndpointServiceConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpcEndpointServiceConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil +extension ModifyVpcEndpointServiceConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpcEndpointServiceConfigurationOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -139750,27 +98955,18 @@ public struct ModifyVpcEndpointServiceConfigurationOutput: Swift.Equatable { } } -struct ModifyVpcEndpointServiceConfigurationOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ModifyVpcEndpointServiceConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ModifyVpcEndpointServiceConfigurationOutputError { -enum ModifyVpcEndpointServiceConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -139821,38 +99017,15 @@ public struct ModifyVpcEndpointServicePayerResponsibilityInput: Swift.Equatable } } -struct ModifyVpcEndpointServicePayerResponsibilityInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceId: Swift.String? - let payerResponsibility: EC2ClientTypes.PayerResponsibility? -} - -extension ModifyVpcEndpointServicePayerResponsibilityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case payerResponsibility = "PayerResponsibility" - case serviceId = "ServiceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - let payerResponsibilityDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PayerResponsibility.self, forKey: .payerResponsibility) - payerResponsibility = payerResponsibilityDecoded - } -} +extension ModifyVpcEndpointServicePayerResponsibilityOutput { -extension ModifyVpcEndpointServicePayerResponsibilityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpcEndpointServicePayerResponsibilityOutputBody = try responseDecoder.decode(responseBody: data) - self.returnValue = output.returnValue - } else { - self.returnValue = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpcEndpointServicePayerResponsibilityOutput() + value.returnValue = try reader["return"].readIfPresent() + return value } } } @@ -139869,27 +99042,18 @@ public struct ModifyVpcEndpointServicePayerResponsibilityOutput: Swift.Equatable } } -struct ModifyVpcEndpointServicePayerResponsibilityOutputBody: Swift.Equatable { - let returnValue: Swift.Bool? -} - -extension ModifyVpcEndpointServicePayerResponsibilityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case returnValue = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnValueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnValue) - returnValue = returnValueDecoded - } -} +enum ModifyVpcEndpointServicePayerResponsibilityOutputError { -enum ModifyVpcEndpointServicePayerResponsibilityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -139964,78 +99128,16 @@ public struct ModifyVpcEndpointServicePermissionsInput: Swift.Equatable { } } -struct ModifyVpcEndpointServicePermissionsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceId: Swift.String? - let addAllowedPrincipals: [Swift.String]? - let removeAllowedPrincipals: [Swift.String]? -} - -extension ModifyVpcEndpointServicePermissionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addAllowedPrincipals = "AddAllowedPrincipals" - case dryRun = "DryRun" - case removeAllowedPrincipals = "RemoveAllowedPrincipals" - case serviceId = "ServiceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - if containerValues.contains(.addAllowedPrincipals) { - struct KeyVal0{struct item{}} - let addAllowedPrincipalsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addAllowedPrincipals) - if let addAllowedPrincipalsWrappedContainer = addAllowedPrincipalsWrappedContainer { - let addAllowedPrincipalsContainer = try addAllowedPrincipalsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addAllowedPrincipalsBuffer:[Swift.String]? = nil - if let addAllowedPrincipalsContainer = addAllowedPrincipalsContainer { - addAllowedPrincipalsBuffer = [Swift.String]() - for stringContainer0 in addAllowedPrincipalsContainer { - addAllowedPrincipalsBuffer?.append(stringContainer0) - } - } - addAllowedPrincipals = addAllowedPrincipalsBuffer - } else { - addAllowedPrincipals = [] - } - } else { - addAllowedPrincipals = nil - } - if containerValues.contains(.removeAllowedPrincipals) { - struct KeyVal0{struct item{}} - let removeAllowedPrincipalsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeAllowedPrincipals) - if let removeAllowedPrincipalsWrappedContainer = removeAllowedPrincipalsWrappedContainer { - let removeAllowedPrincipalsContainer = try removeAllowedPrincipalsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeAllowedPrincipalsBuffer:[Swift.String]? = nil - if let removeAllowedPrincipalsContainer = removeAllowedPrincipalsContainer { - removeAllowedPrincipalsBuffer = [Swift.String]() - for stringContainer0 in removeAllowedPrincipalsContainer { - removeAllowedPrincipalsBuffer?.append(stringContainer0) - } - } - removeAllowedPrincipals = removeAllowedPrincipalsBuffer - } else { - removeAllowedPrincipals = [] - } - } else { - removeAllowedPrincipals = nil - } - } -} +extension ModifyVpcEndpointServicePermissionsOutput { -extension ModifyVpcEndpointServicePermissionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpcEndpointServicePermissionsOutputBody = try responseDecoder.decode(responseBody: data) - self.addedPrincipals = output.addedPrincipals - self.returnValue = output.returnValue - } else { - self.addedPrincipals = nil - self.returnValue = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpcEndpointServicePermissionsOutput() + value.addedPrincipals = try reader["addedPrincipalSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AddedPrincipal.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.returnValue = try reader["return"].readIfPresent() + return value } } } @@ -140056,48 +99158,18 @@ public struct ModifyVpcEndpointServicePermissionsOutput: Swift.Equatable { } } -struct ModifyVpcEndpointServicePermissionsOutputBody: Swift.Equatable { - let addedPrincipals: [EC2ClientTypes.AddedPrincipal]? - let returnValue: Swift.Bool? -} - -extension ModifyVpcEndpointServicePermissionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addedPrincipals = "addedPrincipalSet" - case returnValue = "return" - } +enum ModifyVpcEndpointServicePermissionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.addedPrincipals) { - struct KeyVal0{struct item{}} - let addedPrincipalsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addedPrincipals) - if let addedPrincipalsWrappedContainer = addedPrincipalsWrappedContainer { - let addedPrincipalsContainer = try addedPrincipalsWrappedContainer.decodeIfPresent([EC2ClientTypes.AddedPrincipal].self, forKey: .member) - var addedPrincipalsBuffer:[EC2ClientTypes.AddedPrincipal]? = nil - if let addedPrincipalsContainer = addedPrincipalsContainer { - addedPrincipalsBuffer = [EC2ClientTypes.AddedPrincipal]() - for structureContainer0 in addedPrincipalsContainer { - addedPrincipalsBuffer?.append(structureContainer0) - } - } - addedPrincipals = addedPrincipalsBuffer - } else { - addedPrincipals = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - addedPrincipals = nil - } - let returnValueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnValue) - returnValue = returnValueDecoded - } -} - -enum ModifyVpcEndpointServicePermissionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -140154,44 +99226,16 @@ public struct ModifyVpcPeeringConnectionOptionsInput: Swift.Equatable { } } -struct ModifyVpcPeeringConnectionOptionsInputBody: Swift.Equatable { - let accepterPeeringConnectionOptions: EC2ClientTypes.PeeringConnectionOptionsRequest? - let dryRun: Swift.Bool? - let requesterPeeringConnectionOptions: EC2ClientTypes.PeeringConnectionOptionsRequest? - let vpcPeeringConnectionId: Swift.String? -} - -extension ModifyVpcPeeringConnectionOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accepterPeeringConnectionOptions = "AccepterPeeringConnectionOptions" - case dryRun = "DryRun" - case requesterPeeringConnectionOptions = "RequesterPeeringConnectionOptions" - case vpcPeeringConnectionId = "VpcPeeringConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accepterPeeringConnectionOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeeringConnectionOptionsRequest.self, forKey: .accepterPeeringConnectionOptions) - accepterPeeringConnectionOptions = accepterPeeringConnectionOptionsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let requesterPeeringConnectionOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeeringConnectionOptionsRequest.self, forKey: .requesterPeeringConnectionOptions) - requesterPeeringConnectionOptions = requesterPeeringConnectionOptionsDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - } -} +extension ModifyVpcPeeringConnectionOptionsOutput { -extension ModifyVpcPeeringConnectionOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpcPeeringConnectionOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.accepterPeeringConnectionOptions = output.accepterPeeringConnectionOptions - self.requesterPeeringConnectionOptions = output.requesterPeeringConnectionOptions - } else { - self.accepterPeeringConnectionOptions = nil - self.requesterPeeringConnectionOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpcPeeringConnectionOptionsOutput() + value.accepterPeeringConnectionOptions = try reader["accepterPeeringConnectionOptions"].readIfPresent(readingClosure: EC2ClientTypes.PeeringConnectionOptions.readingClosure) + value.requesterPeeringConnectionOptions = try reader["requesterPeeringConnectionOptions"].readIfPresent(readingClosure: EC2ClientTypes.PeeringConnectionOptions.readingClosure) + return value } } } @@ -140212,31 +99256,18 @@ public struct ModifyVpcPeeringConnectionOptionsOutput: Swift.Equatable { } } -struct ModifyVpcPeeringConnectionOptionsOutputBody: Swift.Equatable { - let accepterPeeringConnectionOptions: EC2ClientTypes.PeeringConnectionOptions? - let requesterPeeringConnectionOptions: EC2ClientTypes.PeeringConnectionOptions? -} - -extension ModifyVpcPeeringConnectionOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accepterPeeringConnectionOptions = "accepterPeeringConnectionOptions" - case requesterPeeringConnectionOptions = "requesterPeeringConnectionOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accepterPeeringConnectionOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeeringConnectionOptions.self, forKey: .accepterPeeringConnectionOptions) - accepterPeeringConnectionOptions = accepterPeeringConnectionOptionsDecoded - let requesterPeeringConnectionOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeeringConnectionOptions.self, forKey: .requesterPeeringConnectionOptions) - requesterPeeringConnectionOptions = requesterPeeringConnectionOptionsDecoded - } -} +enum ModifyVpcPeeringConnectionOptionsOutputError { -enum ModifyVpcPeeringConnectionOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -140287,38 +99318,15 @@ public struct ModifyVpcTenancyInput: Swift.Equatable { } } -struct ModifyVpcTenancyInputBody: Swift.Equatable { - let vpcId: Swift.String? - let instanceTenancy: EC2ClientTypes.VpcTenancy? - let dryRun: Swift.Bool? -} - -extension ModifyVpcTenancyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceTenancy = "InstanceTenancy" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let instanceTenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcTenancy.self, forKey: .instanceTenancy) - instanceTenancy = instanceTenancyDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ModifyVpcTenancyOutput { -extension ModifyVpcTenancyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpcTenancyOutputBody = try responseDecoder.decode(responseBody: data) - self.returnValue = output.returnValue - } else { - self.returnValue = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpcTenancyOutput() + value.returnValue = try reader["return"].readIfPresent() + return value } } } @@ -140335,27 +99343,18 @@ public struct ModifyVpcTenancyOutput: Swift.Equatable { } } -struct ModifyVpcTenancyOutputBody: Swift.Equatable { - let returnValue: Swift.Bool? -} - -extension ModifyVpcTenancyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case returnValue = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnValueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnValue) - returnValue = returnValueDecoded - } -} +enum ModifyVpcTenancyOutputError { -enum ModifyVpcTenancyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -140419,38 +99418,6 @@ public struct ModifyVpnConnectionInput: Swift.Equatable { } } -struct ModifyVpnConnectionInputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let transitGatewayId: Swift.String? - let customerGatewayId: Swift.String? - let vpnGatewayId: Swift.String? - let dryRun: Swift.Bool? -} - -extension ModifyVpnConnectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerGatewayId = "CustomerGatewayId" - case dryRun = "DryRun" - case transitGatewayId = "TransitGatewayId" - case vpnConnectionId = "VpnConnectionId" - case vpnGatewayId = "VpnGatewayId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let customerGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerGatewayId) - customerGatewayId = customerGatewayIdDecoded - let vpnGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnGatewayId) - vpnGatewayId = vpnGatewayIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - extension ModifyVpnConnectionOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -140517,50 +99484,15 @@ public struct ModifyVpnConnectionOptionsInput: Swift.Equatable { } } -struct ModifyVpnConnectionOptionsInputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let localIpv4NetworkCidr: Swift.String? - let remoteIpv4NetworkCidr: Swift.String? - let localIpv6NetworkCidr: Swift.String? - let remoteIpv6NetworkCidr: Swift.String? - let dryRun: Swift.Bool? -} - -extension ModifyVpnConnectionOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case localIpv4NetworkCidr = "LocalIpv4NetworkCidr" - case localIpv6NetworkCidr = "LocalIpv6NetworkCidr" - case remoteIpv4NetworkCidr = "RemoteIpv4NetworkCidr" - case remoteIpv6NetworkCidr = "RemoteIpv6NetworkCidr" - case vpnConnectionId = "VpnConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let localIpv4NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localIpv4NetworkCidr) - localIpv4NetworkCidr = localIpv4NetworkCidrDecoded - let remoteIpv4NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remoteIpv4NetworkCidr) - remoteIpv4NetworkCidr = remoteIpv4NetworkCidrDecoded - let localIpv6NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localIpv6NetworkCidr) - localIpv6NetworkCidr = localIpv6NetworkCidrDecoded - let remoteIpv6NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remoteIpv6NetworkCidr) - remoteIpv6NetworkCidr = remoteIpv6NetworkCidrDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ModifyVpnConnectionOptionsOutput { -extension ModifyVpnConnectionOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpnConnectionOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnConnection = output.vpnConnection - } else { - self.vpnConnection = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpnConnectionOptionsOutput() + value.vpnConnection = try reader["vpnConnection"].readIfPresent(readingClosure: EC2ClientTypes.VpnConnection.readingClosure) + return value } } } @@ -140577,39 +99509,31 @@ public struct ModifyVpnConnectionOptionsOutput: Swift.Equatable { } } -struct ModifyVpnConnectionOptionsOutputBody: Swift.Equatable { - let vpnConnection: EC2ClientTypes.VpnConnection? -} - -extension ModifyVpnConnectionOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnConnection = "vpnConnection" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnConnection.self, forKey: .vpnConnection) - vpnConnection = vpnConnectionDecoded - } -} +enum ModifyVpnConnectionOptionsOutputError { -enum ModifyVpnConnectionOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension ModifyVpnConnectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpnConnectionOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnConnection = output.vpnConnection - } else { - self.vpnConnection = nil +extension ModifyVpnConnectionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpnConnectionOutput() + value.vpnConnection = try reader["vpnConnection"].readIfPresent(readingClosure: EC2ClientTypes.VpnConnection.readingClosure) + return value } } } @@ -140626,27 +99550,18 @@ public struct ModifyVpnConnectionOutput: Swift.Equatable { } } -struct ModifyVpnConnectionOutputBody: Swift.Equatable { - let vpnConnection: EC2ClientTypes.VpnConnection? -} - -extension ModifyVpnConnectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnConnection = "vpnConnection" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnConnection.self, forKey: .vpnConnection) - vpnConnection = vpnConnectionDecoded - } -} +enum ModifyVpnConnectionOutputError { -enum ModifyVpnConnectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -140697,38 +99612,15 @@ public struct ModifyVpnTunnelCertificateInput: Swift.Equatable { } } -struct ModifyVpnTunnelCertificateInputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let vpnTunnelOutsideIpAddress: Swift.String? - let dryRun: Swift.Bool? -} - -extension ModifyVpnTunnelCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case vpnConnectionId = "VpnConnectionId" - case vpnTunnelOutsideIpAddress = "VpnTunnelOutsideIpAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let vpnTunnelOutsideIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnTunnelOutsideIpAddress) - vpnTunnelOutsideIpAddress = vpnTunnelOutsideIpAddressDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ModifyVpnTunnelCertificateOutput { -extension ModifyVpnTunnelCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpnTunnelCertificateOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnConnection = output.vpnConnection - } else { - self.vpnConnection = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpnTunnelCertificateOutput() + value.vpnConnection = try reader["vpnConnection"].readIfPresent(readingClosure: EC2ClientTypes.VpnConnection.readingClosure) + return value } } } @@ -140745,27 +99637,18 @@ public struct ModifyVpnTunnelCertificateOutput: Swift.Equatable { } } -struct ModifyVpnTunnelCertificateOutputBody: Swift.Equatable { - let vpnConnection: EC2ClientTypes.VpnConnection? -} - -extension ModifyVpnTunnelCertificateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnConnection = "vpnConnection" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnConnection.self, forKey: .vpnConnection) - vpnConnection = vpnConnectionDecoded - } -} +enum ModifyVpnTunnelCertificateOutputError { -enum ModifyVpnTunnelCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -140836,46 +99719,15 @@ public struct ModifyVpnTunnelOptionsInput: Swift.Equatable { } } -struct ModifyVpnTunnelOptionsInputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let vpnTunnelOutsideIpAddress: Swift.String? - let tunnelOptions: EC2ClientTypes.ModifyVpnTunnelOptionsSpecification? - let dryRun: Swift.Bool? - let skipTunnelReplacement: Swift.Bool? -} - -extension ModifyVpnTunnelOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case skipTunnelReplacement = "SkipTunnelReplacement" - case tunnelOptions = "TunnelOptions" - case vpnConnectionId = "VpnConnectionId" - case vpnTunnelOutsideIpAddress = "VpnTunnelOutsideIpAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let vpnTunnelOutsideIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnTunnelOutsideIpAddress) - vpnTunnelOutsideIpAddress = vpnTunnelOutsideIpAddressDecoded - let tunnelOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModifyVpnTunnelOptionsSpecification.self, forKey: .tunnelOptions) - tunnelOptions = tunnelOptionsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let skipTunnelReplacementDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipTunnelReplacement) - skipTunnelReplacement = skipTunnelReplacementDecoded - } -} +extension ModifyVpnTunnelOptionsOutput { -extension ModifyVpnTunnelOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyVpnTunnelOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.vpnConnection = output.vpnConnection - } else { - self.vpnConnection = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ModifyVpnTunnelOptionsOutput() + value.vpnConnection = try reader["vpnConnection"].readIfPresent(readingClosure: EC2ClientTypes.VpnConnection.readingClosure) + return value } } } @@ -140892,54 +99744,23 @@ public struct ModifyVpnTunnelOptionsOutput: Swift.Equatable { } } -struct ModifyVpnTunnelOptionsOutputBody: Swift.Equatable { - let vpnConnection: EC2ClientTypes.VpnConnection? -} - -extension ModifyVpnTunnelOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpnConnection = "vpnConnection" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnConnection.self, forKey: .vpnConnection) - vpnConnection = vpnConnectionDecoded - } -} +enum ModifyVpnTunnelOptionsOutputError { -enum ModifyVpnTunnelOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ModifyVpnTunnelOptionsSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dpdTimeoutAction = "DPDTimeoutAction" - case dpdTimeoutSeconds = "DPDTimeoutSeconds" - case enableTunnelLifecycleControl = "EnableTunnelLifecycleControl" - case ikeVersions = "IKEVersion" - case logOptions = "LogOptions" - case phase1DHGroupNumbers = "Phase1DHGroupNumber" - case phase1EncryptionAlgorithms = "Phase1EncryptionAlgorithm" - case phase1IntegrityAlgorithms = "Phase1IntegrityAlgorithm" - case phase1LifetimeSeconds = "Phase1LifetimeSeconds" - case phase2DHGroupNumbers = "Phase2DHGroupNumber" - case phase2EncryptionAlgorithms = "Phase2EncryptionAlgorithm" - case phase2IntegrityAlgorithms = "Phase2IntegrityAlgorithm" - case phase2LifetimeSeconds = "Phase2LifetimeSeconds" - case preSharedKey = "PreSharedKey" - case rekeyFuzzPercentage = "RekeyFuzzPercentage" - case rekeyMarginTimeSeconds = "RekeyMarginTimeSeconds" - case replayWindowSize = "ReplayWindowSize" - case startupAction = "StartupAction" - case tunnelInsideCidr = "TunnelInsideCidr" - case tunnelInsideIpv6Cidr = "TunnelInsideIpv6Cidr" - } +extension EC2ClientTypes.ModifyVpnTunnelOptionsSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -141068,167 +99889,32 @@ extension EC2ClientTypes.ModifyVpnTunnelOptionsSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tunnelInsideCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tunnelInsideCidr) - tunnelInsideCidr = tunnelInsideCidrDecoded - let tunnelInsideIpv6CidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tunnelInsideIpv6Cidr) - tunnelInsideIpv6Cidr = tunnelInsideIpv6CidrDecoded - let preSharedKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSharedKey) - preSharedKey = preSharedKeyDecoded - let phase1LifetimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .phase1LifetimeSeconds) - phase1LifetimeSeconds = phase1LifetimeSecondsDecoded - let phase2LifetimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .phase2LifetimeSeconds) - phase2LifetimeSeconds = phase2LifetimeSecondsDecoded - let rekeyMarginTimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .rekeyMarginTimeSeconds) - rekeyMarginTimeSeconds = rekeyMarginTimeSecondsDecoded - let rekeyFuzzPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .rekeyFuzzPercentage) - rekeyFuzzPercentage = rekeyFuzzPercentageDecoded - let replayWindowSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .replayWindowSize) - replayWindowSize = replayWindowSizeDecoded - let dpdTimeoutSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dpdTimeoutSeconds) - dpdTimeoutSeconds = dpdTimeoutSecondsDecoded - let dpdTimeoutActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dpdTimeoutAction) - dpdTimeoutAction = dpdTimeoutActionDecoded - if containerValues.contains(.phase1EncryptionAlgorithms) { - struct KeyVal0{struct item{}} - let phase1EncryptionAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1EncryptionAlgorithms) - if let phase1EncryptionAlgorithmsWrappedContainer = phase1EncryptionAlgorithmsWrappedContainer { - let phase1EncryptionAlgorithmsContainer = try phase1EncryptionAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue].self, forKey: .member) - var phase1EncryptionAlgorithmsBuffer:[EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue]? = nil - if let phase1EncryptionAlgorithmsContainer = phase1EncryptionAlgorithmsContainer { - phase1EncryptionAlgorithmsBuffer = [EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue]() - for structureContainer0 in phase1EncryptionAlgorithmsContainer { - phase1EncryptionAlgorithmsBuffer?.append(structureContainer0) - } - } - phase1EncryptionAlgorithms = phase1EncryptionAlgorithmsBuffer - } else { - phase1EncryptionAlgorithms = [] - } - } else { - phase1EncryptionAlgorithms = nil - } - if containerValues.contains(.phase2EncryptionAlgorithms) { - struct KeyVal0{struct item{}} - let phase2EncryptionAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2EncryptionAlgorithms) - if let phase2EncryptionAlgorithmsWrappedContainer = phase2EncryptionAlgorithmsWrappedContainer { - let phase2EncryptionAlgorithmsContainer = try phase2EncryptionAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue].self, forKey: .member) - var phase2EncryptionAlgorithmsBuffer:[EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue]? = nil - if let phase2EncryptionAlgorithmsContainer = phase2EncryptionAlgorithmsContainer { - phase2EncryptionAlgorithmsBuffer = [EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue]() - for structureContainer0 in phase2EncryptionAlgorithmsContainer { - phase2EncryptionAlgorithmsBuffer?.append(structureContainer0) - } - } - phase2EncryptionAlgorithms = phase2EncryptionAlgorithmsBuffer - } else { - phase2EncryptionAlgorithms = [] - } - } else { - phase2EncryptionAlgorithms = nil - } - if containerValues.contains(.phase1IntegrityAlgorithms) { - struct KeyVal0{struct item{}} - let phase1IntegrityAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1IntegrityAlgorithms) - if let phase1IntegrityAlgorithmsWrappedContainer = phase1IntegrityAlgorithmsWrappedContainer { - let phase1IntegrityAlgorithmsContainer = try phase1IntegrityAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue].self, forKey: .member) - var phase1IntegrityAlgorithmsBuffer:[EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue]? = nil - if let phase1IntegrityAlgorithmsContainer = phase1IntegrityAlgorithmsContainer { - phase1IntegrityAlgorithmsBuffer = [EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue]() - for structureContainer0 in phase1IntegrityAlgorithmsContainer { - phase1IntegrityAlgorithmsBuffer?.append(structureContainer0) - } - } - phase1IntegrityAlgorithms = phase1IntegrityAlgorithmsBuffer - } else { - phase1IntegrityAlgorithms = [] - } - } else { - phase1IntegrityAlgorithms = nil - } - if containerValues.contains(.phase2IntegrityAlgorithms) { - struct KeyVal0{struct item{}} - let phase2IntegrityAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2IntegrityAlgorithms) - if let phase2IntegrityAlgorithmsWrappedContainer = phase2IntegrityAlgorithmsWrappedContainer { - let phase2IntegrityAlgorithmsContainer = try phase2IntegrityAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue].self, forKey: .member) - var phase2IntegrityAlgorithmsBuffer:[EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue]? = nil - if let phase2IntegrityAlgorithmsContainer = phase2IntegrityAlgorithmsContainer { - phase2IntegrityAlgorithmsBuffer = [EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue]() - for structureContainer0 in phase2IntegrityAlgorithmsContainer { - phase2IntegrityAlgorithmsBuffer?.append(structureContainer0) - } - } - phase2IntegrityAlgorithms = phase2IntegrityAlgorithmsBuffer - } else { - phase2IntegrityAlgorithms = [] - } - } else { - phase2IntegrityAlgorithms = nil - } - if containerValues.contains(.phase1DHGroupNumbers) { - struct KeyVal0{struct item{}} - let phase1DHGroupNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1DHGroupNumbers) - if let phase1DHGroupNumbersWrappedContainer = phase1DHGroupNumbersWrappedContainer { - let phase1DHGroupNumbersContainer = try phase1DHGroupNumbersWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1DHGroupNumbersRequestListValue].self, forKey: .member) - var phase1DHGroupNumbersBuffer:[EC2ClientTypes.Phase1DHGroupNumbersRequestListValue]? = nil - if let phase1DHGroupNumbersContainer = phase1DHGroupNumbersContainer { - phase1DHGroupNumbersBuffer = [EC2ClientTypes.Phase1DHGroupNumbersRequestListValue]() - for structureContainer0 in phase1DHGroupNumbersContainer { - phase1DHGroupNumbersBuffer?.append(structureContainer0) - } - } - phase1DHGroupNumbers = phase1DHGroupNumbersBuffer - } else { - phase1DHGroupNumbers = [] - } - } else { - phase1DHGroupNumbers = nil - } - if containerValues.contains(.phase2DHGroupNumbers) { - struct KeyVal0{struct item{}} - let phase2DHGroupNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2DHGroupNumbers) - if let phase2DHGroupNumbersWrappedContainer = phase2DHGroupNumbersWrappedContainer { - let phase2DHGroupNumbersContainer = try phase2DHGroupNumbersWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2DHGroupNumbersRequestListValue].self, forKey: .member) - var phase2DHGroupNumbersBuffer:[EC2ClientTypes.Phase2DHGroupNumbersRequestListValue]? = nil - if let phase2DHGroupNumbersContainer = phase2DHGroupNumbersContainer { - phase2DHGroupNumbersBuffer = [EC2ClientTypes.Phase2DHGroupNumbersRequestListValue]() - for structureContainer0 in phase2DHGroupNumbersContainer { - phase2DHGroupNumbersBuffer?.append(structureContainer0) - } - } - phase2DHGroupNumbers = phase2DHGroupNumbersBuffer - } else { - phase2DHGroupNumbers = [] - } - } else { - phase2DHGroupNumbers = nil - } - if containerValues.contains(.ikeVersions) { - struct KeyVal0{struct item{}} - let ikeVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ikeVersions) - if let ikeVersionsWrappedContainer = ikeVersionsWrappedContainer { - let ikeVersionsContainer = try ikeVersionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IKEVersionsRequestListValue].self, forKey: .member) - var ikeVersionsBuffer:[EC2ClientTypes.IKEVersionsRequestListValue]? = nil - if let ikeVersionsContainer = ikeVersionsContainer { - ikeVersionsBuffer = [EC2ClientTypes.IKEVersionsRequestListValue]() - for structureContainer0 in ikeVersionsContainer { - ikeVersionsBuffer?.append(structureContainer0) - } - } - ikeVersions = ikeVersionsBuffer - } else { - ikeVersions = [] - } - } else { - ikeVersions = nil - } - let startupActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .startupAction) - startupAction = startupActionDecoded - let logOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnTunnelLogOptionsSpecification.self, forKey: .logOptions) - logOptions = logOptionsDecoded - let enableTunnelLifecycleControlDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableTunnelLifecycleControl) - enableTunnelLifecycleControl = enableTunnelLifecycleControlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ModifyVpnTunnelOptionsSpecification() + value.tunnelInsideCidr = try reader["TunnelInsideCidr"].readIfPresent() + value.tunnelInsideIpv6Cidr = try reader["TunnelInsideIpv6Cidr"].readIfPresent() + value.preSharedKey = try reader["PreSharedKey"].readIfPresent() + value.phase1LifetimeSeconds = try reader["Phase1LifetimeSeconds"].readIfPresent() + value.phase2LifetimeSeconds = try reader["Phase2LifetimeSeconds"].readIfPresent() + value.rekeyMarginTimeSeconds = try reader["RekeyMarginTimeSeconds"].readIfPresent() + value.rekeyFuzzPercentage = try reader["RekeyFuzzPercentage"].readIfPresent() + value.replayWindowSize = try reader["ReplayWindowSize"].readIfPresent() + value.dpdTimeoutSeconds = try reader["DPDTimeoutSeconds"].readIfPresent() + value.dpdTimeoutAction = try reader["DPDTimeoutAction"].readIfPresent() + value.phase1EncryptionAlgorithms = try reader["Phase1EncryptionAlgorithm"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2EncryptionAlgorithms = try reader["Phase2EncryptionAlgorithm"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase1IntegrityAlgorithms = try reader["Phase1IntegrityAlgorithm"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2IntegrityAlgorithms = try reader["Phase2IntegrityAlgorithm"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase1DHGroupNumbers = try reader["Phase1DHGroupNumber"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1DHGroupNumbersRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2DHGroupNumbers = try reader["Phase2DHGroupNumber"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2DHGroupNumbersRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ikeVersions = try reader["IKEVersion"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IKEVersionsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.startupAction = try reader["StartupAction"].readIfPresent() + value.logOptions = try reader["LogOptions"].readIfPresent(readingClosure: EC2ClientTypes.VpnTunnelLogOptionsSpecification.readingClosure) + value.enableTunnelLifecycleControl = try reader["EnableTunnelLifecycleControl"].readIfPresent() + return value + } } } @@ -141391,51 +100077,15 @@ public struct MonitorInstancesInput: Swift.Equatable { } } -struct MonitorInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension MonitorInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceIds = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension MonitorInstancesOutput { -extension MonitorInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: MonitorInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceMonitorings = output.instanceMonitorings - } else { - self.instanceMonitorings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = MonitorInstancesOutput() + value.instanceMonitorings = try reader["instancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceMonitoring.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -141452,52 +100102,23 @@ public struct MonitorInstancesOutput: Swift.Equatable { } } -struct MonitorInstancesOutputBody: Swift.Equatable { - let instanceMonitorings: [EC2ClientTypes.InstanceMonitoring]? -} - -extension MonitorInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceMonitorings = "instancesSet" - } +enum MonitorInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceMonitorings) { - struct KeyVal0{struct item{}} - let instanceMonitoringsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceMonitorings) - if let instanceMonitoringsWrappedContainer = instanceMonitoringsWrappedContainer { - let instanceMonitoringsContainer = try instanceMonitoringsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceMonitoring].self, forKey: .member) - var instanceMonitoringsBuffer:[EC2ClientTypes.InstanceMonitoring]? = nil - if let instanceMonitoringsContainer = instanceMonitoringsContainer { - instanceMonitoringsBuffer = [EC2ClientTypes.InstanceMonitoring]() - for structureContainer0 in instanceMonitoringsContainer { - instanceMonitoringsBuffer?.append(structureContainer0) - } - } - instanceMonitorings = instanceMonitoringsBuffer - } else { - instanceMonitorings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceMonitorings = nil - } - } -} - -enum MonitorInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } -extension EC2ClientTypes.Monitoring: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - } +extension EC2ClientTypes.Monitoring: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -141506,10 +100127,13 @@ extension EC2ClientTypes.Monitoring: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MonitoringState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Monitoring() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -141605,36 +100229,16 @@ public struct MoveAddressToVpcInput: Swift.Equatable { } } -struct MoveAddressToVpcInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let publicIp: Swift.String? -} - -extension MoveAddressToVpcInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case publicIp = "publicIp" - } +extension MoveAddressToVpcOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - } -} - -extension MoveAddressToVpcOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: MoveAddressToVpcOutputBody = try responseDecoder.decode(responseBody: data) - self.allocationId = output.allocationId - self.status = output.status - } else { - self.allocationId = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = MoveAddressToVpcOutput() + value.allocationId = try reader["allocationId"].readIfPresent() + value.status = try reader["status"].readIfPresent() + return value } } } @@ -141655,31 +100259,18 @@ public struct MoveAddressToVpcOutput: Swift.Equatable { } } -struct MoveAddressToVpcOutputBody: Swift.Equatable { - let allocationId: Swift.String? - let status: EC2ClientTypes.Status? -} - -extension MoveAddressToVpcOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "allocationId" - case status = "status" - } +enum MoveAddressToVpcOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Status.self, forKey: .status) - status = statusDecoded - } -} - -enum MoveAddressToVpcOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -141738,42 +100329,15 @@ public struct MoveByoipCidrToIpamInput: Swift.Equatable { } } -struct MoveByoipCidrToIpamInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let cidr: Swift.String? - let ipamPoolId: Swift.String? - let ipamPoolOwner: Swift.String? -} - -extension MoveByoipCidrToIpamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case dryRun = "DryRun" - case ipamPoolId = "IpamPoolId" - case ipamPoolOwner = "IpamPoolOwner" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let ipamPoolOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolOwner) - ipamPoolOwner = ipamPoolOwnerDecoded - } -} +extension MoveByoipCidrToIpamOutput { -extension MoveByoipCidrToIpamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: MoveByoipCidrToIpamOutputBody = try responseDecoder.decode(responseBody: data) - self.byoipCidr = output.byoipCidr - } else { - self.byoipCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = MoveByoipCidrToIpamOutput() + value.byoipCidr = try reader["byoipCidr"].readIfPresent(readingClosure: EC2ClientTypes.ByoipCidr.readingClosure) + return value } } } @@ -141790,27 +100354,18 @@ public struct MoveByoipCidrToIpamOutput: Swift.Equatable { } } -struct MoveByoipCidrToIpamOutputBody: Swift.Equatable { - let byoipCidr: EC2ClientTypes.ByoipCidr? -} - -extension MoveByoipCidrToIpamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoipCidr = "byoipCidr" - } +enum MoveByoipCidrToIpamOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let byoipCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ByoipCidr.self, forKey: .byoipCidr) - byoipCidr = byoipCidrDecoded - } -} - -enum MoveByoipCidrToIpamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -141847,11 +100402,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.MovingAddressStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case moveStatus = "moveStatus" - case publicIp = "publicIp" - } +extension EC2ClientTypes.MovingAddressStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -141863,12 +100414,14 @@ extension EC2ClientTypes.MovingAddressStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let moveStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MoveStatus.self, forKey: .moveStatus) - moveStatus = moveStatusDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.MovingAddressStatus() + value.moveStatus = try reader["moveStatus"].readIfPresent() + value.publicIp = try reader["publicIp"].readIfPresent() + return value + } } } @@ -141924,21 +100477,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.NatGateway: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectivityType = "connectivityType" - case createTime = "createTime" - case deleteTime = "deleteTime" - case failureCode = "failureCode" - case failureMessage = "failureMessage" - case natGatewayAddresses = "natGatewayAddressSet" - case natGatewayId = "natGatewayId" - case provisionedBandwidth = "provisionedBandwidth" - case state = "state" - case subnetId = "subnetId" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.NatGateway: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -141998,66 +100537,24 @@ extension EC2ClientTypes.NatGateway: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let deleteTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deleteTime) - deleteTime = deleteTimeDecoded - let failureCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureCode) - failureCode = failureCodeDecoded - let failureMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureMessage) - failureMessage = failureMessageDecoded - if containerValues.contains(.natGatewayAddresses) { - struct KeyVal0{struct item{}} - let natGatewayAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .natGatewayAddresses) - if let natGatewayAddressesWrappedContainer = natGatewayAddressesWrappedContainer { - let natGatewayAddressesContainer = try natGatewayAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.NatGatewayAddress].self, forKey: .member) - var natGatewayAddressesBuffer:[EC2ClientTypes.NatGatewayAddress]? = nil - if let natGatewayAddressesContainer = natGatewayAddressesContainer { - natGatewayAddressesBuffer = [EC2ClientTypes.NatGatewayAddress]() - for structureContainer0 in natGatewayAddressesContainer { - natGatewayAddressesBuffer?.append(structureContainer0) - } - } - natGatewayAddresses = natGatewayAddressesBuffer - } else { - natGatewayAddresses = [] - } - } else { - natGatewayAddresses = nil - } - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - let provisionedBandwidthDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ProvisionedBandwidth.self, forKey: .provisionedBandwidth) - provisionedBandwidth = provisionedBandwidthDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NatGatewayState.self, forKey: .state) - state = stateDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let connectivityTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectivityType.self, forKey: .connectivityType) - connectivityType = connectivityTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NatGateway() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.deleteTime = try reader["deleteTime"].readTimestampIfPresent(format: .dateTime) + value.failureCode = try reader["failureCode"].readIfPresent() + value.failureMessage = try reader["failureMessage"].readIfPresent() + value.natGatewayAddresses = try reader["natGatewayAddressSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NatGatewayAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.natGatewayId = try reader["natGatewayId"].readIfPresent() + value.provisionedBandwidth = try reader["provisionedBandwidth"].readIfPresent(readingClosure: EC2ClientTypes.ProvisionedBandwidth.readingClosure) + value.state = try reader["state"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.connectivityType = try reader["connectivityType"].readIfPresent() + return value + } } } @@ -142143,17 +100640,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NatGatewayAddress: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "allocationId" - case associationId = "associationId" - case failureMessage = "failureMessage" - case isPrimary = "isPrimary" - case networkInterfaceId = "networkInterfaceId" - case privateIp = "privateIp" - case publicIp = "publicIp" - case status = "status" - } +extension EC2ClientTypes.NatGatewayAddress: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -142183,24 +100670,20 @@ extension EC2ClientTypes.NatGatewayAddress: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let privateIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIp) - privateIp = privateIpDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let isPrimaryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isPrimary) - isPrimary = isPrimaryDecoded - let failureMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureMessage) - failureMessage = failureMessageDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NatGatewayAddressStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NatGatewayAddress() + value.allocationId = try reader["allocationId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.privateIp = try reader["privateIp"].readIfPresent() + value.publicIp = try reader["publicIp"].readIfPresent() + value.associationId = try reader["associationId"].readIfPresent() + value.isPrimary = try reader["isPrimary"].readIfPresent() + value.failureMessage = try reader["failureMessage"].readIfPresent() + value.status = try reader["status"].readIfPresent() + return value + } } } @@ -142333,16 +100816,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.NetworkAcl: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "associationSet" - case entries = "entrySet" - case isDefault = "default" - case networkAclId = "networkAclId" - case ownerId = "ownerId" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.NetworkAcl: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -142396,73 +100870,19 @@ extension EC2ClientTypes.NetworkAcl: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.associations) { - struct KeyVal0{struct item{}} - let associationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associations) - if let associationsWrappedContainer = associationsWrappedContainer { - let associationsContainer = try associationsWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkAclAssociation].self, forKey: .member) - var associationsBuffer:[EC2ClientTypes.NetworkAclAssociation]? = nil - if let associationsContainer = associationsContainer { - associationsBuffer = [EC2ClientTypes.NetworkAclAssociation]() - for structureContainer0 in associationsContainer { - associationsBuffer?.append(structureContainer0) - } - } - associations = associationsBuffer - } else { - associations = [] - } - } else { - associations = nil - } - if containerValues.contains(.entries) { - struct KeyVal0{struct item{}} - let entriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .entries) - if let entriesWrappedContainer = entriesWrappedContainer { - let entriesContainer = try entriesWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkAclEntry].self, forKey: .member) - var entriesBuffer:[EC2ClientTypes.NetworkAclEntry]? = nil - if let entriesContainer = entriesContainer { - entriesBuffer = [EC2ClientTypes.NetworkAclEntry]() - for structureContainer0 in entriesContainer { - entriesBuffer?.append(structureContainer0) - } - } - entries = entriesBuffer - } else { - entries = [] - } - } else { - entries = nil - } - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded - let networkAclIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkAclId) - networkAclId = networkAclIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkAcl() + value.associations = try reader["associationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkAclAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.entries = try reader["entrySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkAclEntry.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.isDefault = try reader["default"].readIfPresent() + value.networkAclId = try reader["networkAclId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + return value + } } } @@ -142506,12 +100926,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkAclAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkAclAssociationId = "networkAclAssociationId" - case networkAclId = "networkAclId" - case subnetId = "subnetId" - } +extension EC2ClientTypes.NetworkAclAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -142526,14 +100941,15 @@ extension EC2ClientTypes.NetworkAclAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkAclAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkAclAssociationId) - networkAclAssociationId = networkAclAssociationIdDecoded - let networkAclIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkAclId) - networkAclId = networkAclIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkAclAssociation() + value.networkAclAssociationId = try reader["networkAclAssociationId"].readIfPresent() + value.networkAclId = try reader["networkAclId"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + return value + } } } @@ -142561,17 +100977,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkAclEntry: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlock = "cidrBlock" - case egress = "egress" - case icmpTypeCode = "icmpTypeCode" - case ipv6CidrBlock = "ipv6CidrBlock" - case portRange = "portRange" - case `protocol` = "protocol" - case ruleAction = "ruleAction" - case ruleNumber = "ruleNumber" - } +extension EC2ClientTypes.NetworkAclEntry: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -142601,24 +101007,20 @@ extension EC2ClientTypes.NetworkAclEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let egressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .egress) - egress = egressDecoded - let icmpTypeCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IcmpTypeCode.self, forKey: .icmpTypeCode) - icmpTypeCode = icmpTypeCodeDecoded - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let portRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PortRange.self, forKey: .portRange) - portRange = portRangeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let ruleActionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RuleAction.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let ruleNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ruleNumber) - ruleNumber = ruleNumberDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkAclEntry() + value.cidrBlock = try reader["cidrBlock"].readIfPresent() + value.egress = try reader["egress"].readIfPresent() + value.icmpTypeCode = try reader["icmpTypeCode"].readIfPresent(readingClosure: EC2ClientTypes.IcmpTypeCode.readingClosure) + value.ipv6CidrBlock = try reader["ipv6CidrBlock"].readIfPresent() + value.portRange = try reader["portRange"].readIfPresent(readingClosure: EC2ClientTypes.PortRange.readingClosure) + value.`protocol` = try reader["protocol"].readIfPresent() + value.ruleAction = try reader["ruleAction"].readIfPresent() + value.ruleNumber = try reader["ruleNumber"].readIfPresent() + return value + } } } @@ -142666,11 +101068,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkBandwidthGbps: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.NetworkBandwidthGbps: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -142682,12 +101080,14 @@ extension EC2ClientTypes.NetworkBandwidthGbps: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkBandwidthGbps() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -142711,11 +101111,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkBandwidthGbpsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.NetworkBandwidthGbpsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -142727,12 +101123,14 @@ extension EC2ClientTypes.NetworkBandwidthGbpsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkBandwidthGbpsRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -142756,14 +101154,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkCardInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case baselineBandwidthInGbps = "baselineBandwidthInGbps" - case maximumNetworkInterfaces = "maximumNetworkInterfaces" - case networkCardIndex = "networkCardIndex" - case networkPerformance = "networkPerformance" - case peakBandwidthInGbps = "peakBandwidthInGbps" - } +extension EC2ClientTypes.NetworkCardInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -142784,18 +101175,17 @@ extension EC2ClientTypes.NetworkCardInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .networkCardIndex) - networkCardIndex = networkCardIndexDecoded - let networkPerformanceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkPerformance) - networkPerformance = networkPerformanceDecoded - let maximumNetworkInterfacesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumNetworkInterfaces) - maximumNetworkInterfaces = maximumNetworkInterfacesDecoded - let baselineBandwidthInGbpsDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .baselineBandwidthInGbps) - baselineBandwidthInGbps = baselineBandwidthInGbpsDecoded - let peakBandwidthInGbpsDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .peakBandwidthInGbps) - peakBandwidthInGbps = peakBandwidthInGbpsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkCardInfo() + value.networkCardIndex = try reader["networkCardIndex"].readIfPresent() + value.networkPerformance = try reader["networkPerformance"].readIfPresent() + value.maximumNetworkInterfaces = try reader["maximumNetworkInterfaces"].readIfPresent() + value.baselineBandwidthInGbps = try reader["baselineBandwidthInGbps"].readIfPresent() + value.peakBandwidthInGbps = try reader["peakBandwidthInGbps"].readIfPresent() + return value + } } } @@ -142831,22 +101221,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case defaultNetworkCardIndex = "defaultNetworkCardIndex" - case efaInfo = "efaInfo" - case efaSupported = "efaSupported" - case enaSrdSupported = "enaSrdSupported" - case enaSupport = "enaSupport" - case encryptionInTransitSupported = "encryptionInTransitSupported" - case ipv4AddressesPerInterface = "ipv4AddressesPerInterface" - case ipv6AddressesPerInterface = "ipv6AddressesPerInterface" - case ipv6Supported = "ipv6Supported" - case maximumNetworkCards = "maximumNetworkCards" - case maximumNetworkInterfaces = "maximumNetworkInterfaces" - case networkCards = "networkCards" - case networkPerformance = "networkPerformance" - } +extension EC2ClientTypes.NetworkInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -142900,51 +101275,25 @@ extension EC2ClientTypes.NetworkInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkPerformanceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkPerformance) - networkPerformance = networkPerformanceDecoded - let maximumNetworkInterfacesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumNetworkInterfaces) - maximumNetworkInterfaces = maximumNetworkInterfacesDecoded - let maximumNetworkCardsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximumNetworkCards) - maximumNetworkCards = maximumNetworkCardsDecoded - let defaultNetworkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultNetworkCardIndex) - defaultNetworkCardIndex = defaultNetworkCardIndexDecoded - if containerValues.contains(.networkCards) { - struct KeyVal0{struct item{}} - let networkCardsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkCards) - if let networkCardsWrappedContainer = networkCardsWrappedContainer { - let networkCardsContainer = try networkCardsWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkCardInfo].self, forKey: .member) - var networkCardsBuffer:[EC2ClientTypes.NetworkCardInfo]? = nil - if let networkCardsContainer = networkCardsContainer { - networkCardsBuffer = [EC2ClientTypes.NetworkCardInfo]() - for structureContainer0 in networkCardsContainer { - networkCardsBuffer?.append(structureContainer0) - } - } - networkCards = networkCardsBuffer - } else { - networkCards = [] - } - } else { - networkCards = nil - } - let ipv4AddressesPerInterfaceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv4AddressesPerInterface) - ipv4AddressesPerInterface = ipv4AddressesPerInterfaceDecoded - let ipv6AddressesPerInterfaceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6AddressesPerInterface) - ipv6AddressesPerInterface = ipv6AddressesPerInterfaceDecoded - let ipv6SupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ipv6Supported) - ipv6Supported = ipv6SupportedDecoded - let enaSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnaSupport.self, forKey: .enaSupport) - enaSupport = enaSupportDecoded - let efaSupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .efaSupported) - efaSupported = efaSupportedDecoded - let efaInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EfaInfo.self, forKey: .efaInfo) - efaInfo = efaInfoDecoded - let encryptionInTransitSupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encryptionInTransitSupported) - encryptionInTransitSupported = encryptionInTransitSupportedDecoded - let enaSrdSupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSrdSupported) - enaSrdSupported = enaSrdSupportedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInfo() + value.networkPerformance = try reader["networkPerformance"].readIfPresent() + value.maximumNetworkInterfaces = try reader["maximumNetworkInterfaces"].readIfPresent() + value.maximumNetworkCards = try reader["maximumNetworkCards"].readIfPresent() + value.defaultNetworkCardIndex = try reader["defaultNetworkCardIndex"].readIfPresent() + value.networkCards = try reader["networkCards"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkCardInfo.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv4AddressesPerInterface = try reader["ipv4AddressesPerInterface"].readIfPresent() + value.ipv6AddressesPerInterface = try reader["ipv6AddressesPerInterface"].readIfPresent() + value.ipv6Supported = try reader["ipv6Supported"].readIfPresent() + value.enaSupport = try reader["enaSupport"].readIfPresent() + value.efaSupported = try reader["efaSupported"].readIfPresent() + value.efaInfo = try reader["efaInfo"].readIfPresent(readingClosure: EC2ClientTypes.EfaInfo.readingClosure) + value.encryptionInTransitSupported = try reader["encryptionInTransitSupported"].readIfPresent() + value.enaSrdSupported = try reader["enaSrdSupported"].readIfPresent() + return value + } } } @@ -143012,14 +101361,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInsightsAccessScope: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createdDate = "createdDate" - case networkInsightsAccessScopeArn = "networkInsightsAccessScopeArn" - case networkInsightsAccessScopeId = "networkInsightsAccessScopeId" - case tags = "tagSet" - case updatedDate = "updatedDate" - } +extension EC2ClientTypes.NetworkInsightsAccessScope: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -143049,34 +101391,16 @@ extension EC2ClientTypes.NetworkInsightsAccessScope: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - let networkInsightsAccessScopeArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeArn) - networkInsightsAccessScopeArn = networkInsightsAccessScopeArnDecoded - let createdDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdDate) - createdDate = createdDateDecoded - let updatedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updatedDate) - updatedDate = updatedDateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInsightsAccessScope() + value.networkInsightsAccessScopeId = try reader["networkInsightsAccessScopeId"].readIfPresent() + value.networkInsightsAccessScopeArn = try reader["networkInsightsAccessScopeArn"].readIfPresent() + value.createdDate = try reader["createdDate"].readTimestampIfPresent(format: .dateTime) + value.updatedDate = try reader["updatedDate"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -143113,20 +101437,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInsightsAccessScopeAnalysis: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analyzedEniCount = "analyzedEniCount" - case endDate = "endDate" - case findingsFound = "findingsFound" - case networkInsightsAccessScopeAnalysisArn = "networkInsightsAccessScopeAnalysisArn" - case networkInsightsAccessScopeAnalysisId = "networkInsightsAccessScopeAnalysisId" - case networkInsightsAccessScopeId = "networkInsightsAccessScopeId" - case startDate = "startDate" - case status = "status" - case statusMessage = "statusMessage" - case tags = "tagSet" - case warningMessage = "warningMessage" - } +extension EC2ClientTypes.NetworkInsightsAccessScopeAnalysis: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -143174,46 +101485,22 @@ extension EC2ClientTypes.NetworkInsightsAccessScopeAnalysis: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeAnalysisId) - networkInsightsAccessScopeAnalysisId = networkInsightsAccessScopeAnalysisIdDecoded - let networkInsightsAccessScopeAnalysisArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeAnalysisArn) - networkInsightsAccessScopeAnalysisArn = networkInsightsAccessScopeAnalysisArnDecoded - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisStatus.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let warningMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .warningMessage) - warningMessage = warningMessageDecoded - let startDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startDate) - startDate = startDateDecoded - let endDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endDate) - endDate = endDateDecoded - let findingsFoundDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FindingsFound.self, forKey: .findingsFound) - findingsFound = findingsFoundDecoded - let analyzedEniCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .analyzedEniCount) - analyzedEniCount = analyzedEniCountDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInsightsAccessScopeAnalysis() + value.networkInsightsAccessScopeAnalysisId = try reader["networkInsightsAccessScopeAnalysisId"].readIfPresent() + value.networkInsightsAccessScopeAnalysisArn = try reader["networkInsightsAccessScopeAnalysisArn"].readIfPresent() + value.networkInsightsAccessScopeId = try reader["networkInsightsAccessScopeId"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.warningMessage = try reader["warningMessage"].readIfPresent() + value.startDate = try reader["startDate"].readTimestampIfPresent(format: .dateTime) + value.endDate = try reader["endDate"].readTimestampIfPresent(format: .dateTime) + value.findingsFound = try reader["findingsFound"].readIfPresent() + value.analyzedEniCount = try reader["analyzedEniCount"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -143274,12 +101561,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInsightsAccessScopeContent: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case excludePaths = "excludePathSet" - case matchPaths = "matchPathSet" - case networkInsightsAccessScopeId = "networkInsightsAccessScopeId" - } +extension EC2ClientTypes.NetworkInsightsAccessScopeContent: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -143312,47 +101594,14 @@ extension EC2ClientTypes.NetworkInsightsAccessScopeContent: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - if containerValues.contains(.matchPaths) { - struct KeyVal0{struct item{}} - let matchPathsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchPaths) - if let matchPathsWrappedContainer = matchPathsWrappedContainer { - let matchPathsContainer = try matchPathsWrappedContainer.decodeIfPresent([EC2ClientTypes.AccessScopePath].self, forKey: .member) - var matchPathsBuffer:[EC2ClientTypes.AccessScopePath]? = nil - if let matchPathsContainer = matchPathsContainer { - matchPathsBuffer = [EC2ClientTypes.AccessScopePath]() - for structureContainer0 in matchPathsContainer { - matchPathsBuffer?.append(structureContainer0) - } - } - matchPaths = matchPathsBuffer - } else { - matchPaths = [] - } - } else { - matchPaths = nil - } - if containerValues.contains(.excludePaths) { - struct KeyVal0{struct item{}} - let excludePathsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludePaths) - if let excludePathsWrappedContainer = excludePathsWrappedContainer { - let excludePathsContainer = try excludePathsWrappedContainer.decodeIfPresent([EC2ClientTypes.AccessScopePath].self, forKey: .member) - var excludePathsBuffer:[EC2ClientTypes.AccessScopePath]? = nil - if let excludePathsContainer = excludePathsContainer { - excludePathsBuffer = [EC2ClientTypes.AccessScopePath]() - for structureContainer0 in excludePathsContainer { - excludePathsBuffer?.append(structureContainer0) - } - } - excludePaths = excludePathsBuffer - } else { - excludePaths = [] - } - } else { - excludePaths = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInsightsAccessScopeContent() + value.networkInsightsAccessScopeId = try reader["networkInsightsAccessScopeId"].readIfPresent() + value.matchPaths = try reader["matchPathSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AccessScopePath.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.excludePaths = try reader["excludePathSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AccessScopePath.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -143381,25 +101630,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInsightsAnalysis: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalAccounts = "additionalAccountSet" - case alternatePathHints = "alternatePathHintSet" - case explanations = "explanationSet" - case filterInArns = "filterInArnSet" - case forwardPathComponents = "forwardPathComponentSet" - case networkInsightsAnalysisArn = "networkInsightsAnalysisArn" - case networkInsightsAnalysisId = "networkInsightsAnalysisId" - case networkInsightsPathId = "networkInsightsPathId" - case networkPathFound = "networkPathFound" - case returnPathComponents = "returnPathComponentSet" - case startDate = "startDate" - case status = "status" - case statusMessage = "statusMessage" - case suggestedAccounts = "suggestedAccountSet" - case tags = "tagSet" - case warningMessage = "warningMessage" - } +extension EC2ClientTypes.NetworkInsightsAnalysis: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -143525,175 +101756,27 @@ extension EC2ClientTypes.NetworkInsightsAnalysis: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAnalysisIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAnalysisId) - networkInsightsAnalysisId = networkInsightsAnalysisIdDecoded - let networkInsightsAnalysisArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAnalysisArn) - networkInsightsAnalysisArn = networkInsightsAnalysisArnDecoded - let networkInsightsPathIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsPathId) - networkInsightsPathId = networkInsightsPathIdDecoded - if containerValues.contains(.additionalAccounts) { - struct KeyVal0{struct item{}} - let additionalAccountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .additionalAccounts) - if let additionalAccountsWrappedContainer = additionalAccountsWrappedContainer { - let additionalAccountsContainer = try additionalAccountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var additionalAccountsBuffer:[Swift.String]? = nil - if let additionalAccountsContainer = additionalAccountsContainer { - additionalAccountsBuffer = [Swift.String]() - for stringContainer0 in additionalAccountsContainer { - additionalAccountsBuffer?.append(stringContainer0) - } - } - additionalAccounts = additionalAccountsBuffer - } else { - additionalAccounts = [] - } - } else { - additionalAccounts = nil - } - if containerValues.contains(.filterInArns) { - struct KeyVal0{struct item{}} - let filterInArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filterInArns) - if let filterInArnsWrappedContainer = filterInArnsWrappedContainer { - let filterInArnsContainer = try filterInArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var filterInArnsBuffer:[Swift.String]? = nil - if let filterInArnsContainer = filterInArnsContainer { - filterInArnsBuffer = [Swift.String]() - for stringContainer0 in filterInArnsContainer { - filterInArnsBuffer?.append(stringContainer0) - } - } - filterInArns = filterInArnsBuffer - } else { - filterInArns = [] - } - } else { - filterInArns = nil - } - let startDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startDate) - startDate = startDateDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisStatus.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let warningMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .warningMessage) - warningMessage = warningMessageDecoded - let networkPathFoundDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .networkPathFound) - networkPathFound = networkPathFoundDecoded - if containerValues.contains(.forwardPathComponents) { - struct KeyVal0{struct item{}} - let forwardPathComponentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .forwardPathComponents) - if let forwardPathComponentsWrappedContainer = forwardPathComponentsWrappedContainer { - let forwardPathComponentsContainer = try forwardPathComponentsWrappedContainer.decodeIfPresent([EC2ClientTypes.PathComponent].self, forKey: .member) - var forwardPathComponentsBuffer:[EC2ClientTypes.PathComponent]? = nil - if let forwardPathComponentsContainer = forwardPathComponentsContainer { - forwardPathComponentsBuffer = [EC2ClientTypes.PathComponent]() - for structureContainer0 in forwardPathComponentsContainer { - forwardPathComponentsBuffer?.append(structureContainer0) - } - } - forwardPathComponents = forwardPathComponentsBuffer - } else { - forwardPathComponents = [] - } - } else { - forwardPathComponents = nil - } - if containerValues.contains(.returnPathComponents) { - struct KeyVal0{struct item{}} - let returnPathComponentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .returnPathComponents) - if let returnPathComponentsWrappedContainer = returnPathComponentsWrappedContainer { - let returnPathComponentsContainer = try returnPathComponentsWrappedContainer.decodeIfPresent([EC2ClientTypes.PathComponent].self, forKey: .member) - var returnPathComponentsBuffer:[EC2ClientTypes.PathComponent]? = nil - if let returnPathComponentsContainer = returnPathComponentsContainer { - returnPathComponentsBuffer = [EC2ClientTypes.PathComponent]() - for structureContainer0 in returnPathComponentsContainer { - returnPathComponentsBuffer?.append(structureContainer0) - } - } - returnPathComponents = returnPathComponentsBuffer - } else { - returnPathComponents = [] - } - } else { - returnPathComponents = nil - } - if containerValues.contains(.explanations) { - struct KeyVal0{struct item{}} - let explanationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .explanations) - if let explanationsWrappedContainer = explanationsWrappedContainer { - let explanationsContainer = try explanationsWrappedContainer.decodeIfPresent([EC2ClientTypes.Explanation].self, forKey: .member) - var explanationsBuffer:[EC2ClientTypes.Explanation]? = nil - if let explanationsContainer = explanationsContainer { - explanationsBuffer = [EC2ClientTypes.Explanation]() - for structureContainer0 in explanationsContainer { - explanationsBuffer?.append(structureContainer0) - } - } - explanations = explanationsBuffer - } else { - explanations = [] - } - } else { - explanations = nil - } - if containerValues.contains(.alternatePathHints) { - struct KeyVal0{struct item{}} - let alternatePathHintsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alternatePathHints) - if let alternatePathHintsWrappedContainer = alternatePathHintsWrappedContainer { - let alternatePathHintsContainer = try alternatePathHintsWrappedContainer.decodeIfPresent([EC2ClientTypes.AlternatePathHint].self, forKey: .member) - var alternatePathHintsBuffer:[EC2ClientTypes.AlternatePathHint]? = nil - if let alternatePathHintsContainer = alternatePathHintsContainer { - alternatePathHintsBuffer = [EC2ClientTypes.AlternatePathHint]() - for structureContainer0 in alternatePathHintsContainer { - alternatePathHintsBuffer?.append(structureContainer0) - } - } - alternatePathHints = alternatePathHintsBuffer - } else { - alternatePathHints = [] - } - } else { - alternatePathHints = nil - } - if containerValues.contains(.suggestedAccounts) { - struct KeyVal0{struct item{}} - let suggestedAccountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .suggestedAccounts) - if let suggestedAccountsWrappedContainer = suggestedAccountsWrappedContainer { - let suggestedAccountsContainer = try suggestedAccountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var suggestedAccountsBuffer:[Swift.String]? = nil - if let suggestedAccountsContainer = suggestedAccountsContainer { - suggestedAccountsBuffer = [Swift.String]() - for stringContainer0 in suggestedAccountsContainer { - suggestedAccountsBuffer?.append(stringContainer0) - } - } - suggestedAccounts = suggestedAccountsBuffer - } else { - suggestedAccounts = [] - } - } else { - suggestedAccounts = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInsightsAnalysis() + value.networkInsightsAnalysisId = try reader["networkInsightsAnalysisId"].readIfPresent() + value.networkInsightsAnalysisArn = try reader["networkInsightsAnalysisArn"].readIfPresent() + value.networkInsightsPathId = try reader["networkInsightsPathId"].readIfPresent() + value.additionalAccounts = try reader["additionalAccountSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.filterInArns = try reader["filterInArnSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.startDate = try reader["startDate"].readTimestampIfPresent(format: .dateTime) + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.warningMessage = try reader["warningMessage"].readIfPresent() + value.networkPathFound = try reader["networkPathFound"].readIfPresent() + value.forwardPathComponents = try reader["forwardPathComponentSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PathComponent.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.returnPathComponents = try reader["returnPathComponentSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PathComponent.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.explanations = try reader["explanationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Explanation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.alternatePathHints = try reader["alternatePathHintSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AlternatePathHint.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.suggestedAccounts = try reader["suggestedAccountSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -143774,23 +101857,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInsightsPath: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createdDate = "createdDate" - case destination = "destination" - case destinationArn = "destinationArn" - case destinationIp = "destinationIp" - case destinationPort = "destinationPort" - case filterAtDestination = "filterAtDestination" - case filterAtSource = "filterAtSource" - case networkInsightsPathArn = "networkInsightsPathArn" - case networkInsightsPathId = "networkInsightsPathId" - case `protocol` = "protocol" - case source = "source" - case sourceArn = "sourceArn" - case sourceIp = "sourceIp" - case tags = "tagSet" - } +extension EC2ClientTypes.NetworkInsightsPath: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -143847,53 +101914,26 @@ extension EC2ClientTypes.NetworkInsightsPath: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsPathIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsPathId) - networkInsightsPathId = networkInsightsPathIdDecoded - let networkInsightsPathArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsPathArn) - networkInsightsPathArn = networkInsightsPathArnDecoded - let createdDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdDate) - createdDate = createdDateDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) - destination = destinationDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let destinationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationArn) - destinationArn = destinationArnDecoded - let sourceIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIp) - sourceIp = sourceIpDecoded - let destinationIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationIp) - destinationIp = destinationIpDecoded - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ModelProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let destinationPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .destinationPort) - destinationPort = destinationPortDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let filterAtSourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PathFilter.self, forKey: .filterAtSource) - filterAtSource = filterAtSourceDecoded - let filterAtDestinationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PathFilter.self, forKey: .filterAtDestination) - filterAtDestination = filterAtDestinationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInsightsPath() + value.networkInsightsPathId = try reader["networkInsightsPathId"].readIfPresent() + value.networkInsightsPathArn = try reader["networkInsightsPathArn"].readIfPresent() + value.createdDate = try reader["createdDate"].readTimestampIfPresent(format: .dateTime) + value.source = try reader["source"].readIfPresent() + value.destination = try reader["destination"].readIfPresent() + value.sourceArn = try reader["sourceArn"].readIfPresent() + value.destinationArn = try reader["destinationArn"].readIfPresent() + value.sourceIp = try reader["sourceIp"].readIfPresent() + value.destinationIp = try reader["destinationIp"].readIfPresent() + value.`protocol` = try reader["protocol"].readIfPresent() + value.destinationPort = try reader["destinationPort"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.filterAtSource = try reader["filterAtSource"].readIfPresent(readingClosure: EC2ClientTypes.PathFilter.readingClosure) + value.filterAtDestination = try reader["filterAtDestination"].readIfPresent(readingClosure: EC2ClientTypes.PathFilter.readingClosure) + return value + } } } @@ -143965,36 +102005,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInterface: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - case attachment = "attachment" - case availabilityZone = "availabilityZone" - case connectionTrackingConfiguration = "connectionTrackingConfiguration" - case denyAllIgwTraffic = "denyAllIgwTraffic" - case description = "description" - case groups = "groupSet" - case interfaceType = "interfaceType" - case ipv4Prefixes = "ipv4PrefixSet" - case ipv6Address = "ipv6Address" - case ipv6Addresses = "ipv6AddressesSet" - case ipv6Native = "ipv6Native" - case ipv6Prefixes = "ipv6PrefixSet" - case macAddress = "macAddress" - case networkInterfaceId = "networkInterfaceId" - case outpostArn = "outpostArn" - case ownerId = "ownerId" - case privateDnsName = "privateDnsName" - case privateIpAddress = "privateIpAddress" - case privateIpAddresses = "privateIpAddressesSet" - case requesterId = "requesterId" - case requesterManaged = "requesterManaged" - case sourceDestCheck = "sourceDestCheck" - case status = "status" - case subnetId = "subnetId" - case tagSet = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.NetworkInterface: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144135,164 +102146,39 @@ extension EC2ClientTypes.NetworkInterface: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceAssociation.self, forKey: .association) - association = associationDecoded - let attachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceAttachment.self, forKey: .attachment) - attachment = attachmentDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let connectionTrackingConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ConnectionTrackingConfiguration.self, forKey: .connectionTrackingConfiguration) - connectionTrackingConfiguration = connectionTrackingConfigurationDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct item{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var groupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let interfaceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceType.self, forKey: .interfaceType) - interfaceType = interfaceTypeDecoded - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct item{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkInterfaceIpv6Address].self, forKey: .member) - var ipv6AddressesBuffer:[EC2ClientTypes.NetworkInterfaceIpv6Address]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [EC2ClientTypes.NetworkInterfaceIpv6Address]() - for structureContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(structureContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let macAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .macAddress) - macAddress = macAddressDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.NetworkInterfacePrivateIpAddress].self, forKey: .member) - var privateIpAddressesBuffer:[EC2ClientTypes.NetworkInterfacePrivateIpAddress]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [EC2ClientTypes.NetworkInterfacePrivateIpAddress]() - for structureContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(structureContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - if containerValues.contains(.ipv4Prefixes) { - struct KeyVal0{struct item{}} - let ipv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv4Prefixes) - if let ipv4PrefixesWrappedContainer = ipv4PrefixesWrappedContainer { - let ipv4PrefixesContainer = try ipv4PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv4PrefixSpecification].self, forKey: .member) - var ipv4PrefixesBuffer:[EC2ClientTypes.Ipv4PrefixSpecification]? = nil - if let ipv4PrefixesContainer = ipv4PrefixesContainer { - ipv4PrefixesBuffer = [EC2ClientTypes.Ipv4PrefixSpecification]() - for structureContainer0 in ipv4PrefixesContainer { - ipv4PrefixesBuffer?.append(structureContainer0) - } - } - ipv4Prefixes = ipv4PrefixesBuffer - } else { - ipv4Prefixes = [] - } - } else { - ipv4Prefixes = nil - } - if containerValues.contains(.ipv6Prefixes) { - struct KeyVal0{struct item{}} - let ipv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Prefixes) - if let ipv6PrefixesWrappedContainer = ipv6PrefixesWrappedContainer { - let ipv6PrefixesContainer = try ipv6PrefixesWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6PrefixSpecification].self, forKey: .member) - var ipv6PrefixesBuffer:[EC2ClientTypes.Ipv6PrefixSpecification]? = nil - if let ipv6PrefixesContainer = ipv6PrefixesContainer { - ipv6PrefixesBuffer = [EC2ClientTypes.Ipv6PrefixSpecification]() - for structureContainer0 in ipv6PrefixesContainer { - ipv6PrefixesBuffer?.append(structureContainer0) - } - } - ipv6Prefixes = ipv6PrefixesBuffer - } else { - ipv6Prefixes = [] - } - } else { - ipv6Prefixes = nil - } - let requesterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requesterId) - requesterId = requesterIdDecoded - let requesterManagedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requesterManaged) - requesterManaged = requesterManagedDecoded - let sourceDestCheckDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sourceDestCheck) - sourceDestCheck = sourceDestCheckDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceStatus.self, forKey: .status) - status = statusDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - if containerValues.contains(.tagSet) { - struct KeyVal0{struct item{}} - let tagSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSet) - if let tagSetWrappedContainer = tagSetWrappedContainer { - let tagSetContainer = try tagSetWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagSetBuffer:[EC2ClientTypes.Tag]? = nil - if let tagSetContainer = tagSetContainer { - tagSetBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagSetContainer { - tagSetBuffer?.append(structureContainer0) - } - } - tagSet = tagSetBuffer - } else { - tagSet = [] - } - } else { - tagSet = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let denyAllIgwTrafficDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .denyAllIgwTraffic) - denyAllIgwTraffic = denyAllIgwTrafficDecoded - let ipv6NativeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ipv6Native) - ipv6Native = ipv6NativeDecoded - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterface() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterfaceAssociation.readingClosure) + value.attachment = try reader["attachment"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterfaceAttachment.readingClosure) + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.connectionTrackingConfiguration = try reader["connectionTrackingConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.ConnectionTrackingConfiguration.readingClosure) + value.description = try reader["description"].readIfPresent() + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.interfaceType = try reader["interfaceType"].readIfPresent() + value.ipv6Addresses = try reader["ipv6AddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkInterfaceIpv6Address.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.macAddress = try reader["macAddress"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.privateDnsName = try reader["privateDnsName"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + value.privateIpAddresses = try reader["privateIpAddressesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NetworkInterfacePrivateIpAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv4Prefixes = try reader["ipv4PrefixSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv4PrefixSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipv6Prefixes = try reader["ipv6PrefixSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv6PrefixSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.requesterId = try reader["requesterId"].readIfPresent() + value.requesterManaged = try reader["requesterManaged"].readIfPresent() + value.sourceDestCheck = try reader["sourceDestCheck"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.tagSet = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + value.denyAllIgwTraffic = try reader["denyAllIgwTraffic"].readIfPresent() + value.ipv6Native = try reader["ipv6Native"].readIfPresent() + value.ipv6Address = try reader["ipv6Address"].readIfPresent() + return value + } } } @@ -144416,16 +102302,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInterfaceAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "allocationId" - case associationId = "associationId" - case carrierIp = "carrierIp" - case customerOwnedIp = "customerOwnedIp" - case ipOwnerId = "ipOwnerId" - case publicDnsName = "publicDnsName" - case publicIp = "publicIp" - } +extension EC2ClientTypes.NetworkInterfaceAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144452,22 +102329,19 @@ extension EC2ClientTypes.NetworkInterfaceAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let ipOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipOwnerId) - ipOwnerId = ipOwnerIdDecoded - let publicDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicDnsName) - publicDnsName = publicDnsNameDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let customerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIp) - customerOwnedIp = customerOwnedIpDecoded - let carrierIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierIp) - carrierIp = carrierIpDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfaceAssociation() + value.allocationId = try reader["allocationId"].readIfPresent() + value.associationId = try reader["associationId"].readIfPresent() + value.ipOwnerId = try reader["ipOwnerId"].readIfPresent() + value.publicDnsName = try reader["publicDnsName"].readIfPresent() + value.publicIp = try reader["publicIp"].readIfPresent() + value.customerOwnedIp = try reader["customerOwnedIp"].readIfPresent() + value.carrierIp = try reader["carrierIp"].readIfPresent() + return value + } } } @@ -144511,18 +102385,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInterfaceAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachTime = "attachTime" - case attachmentId = "attachmentId" - case deleteOnTermination = "deleteOnTermination" - case deviceIndex = "deviceIndex" - case enaSrdSpecification = "enaSrdSpecification" - case instanceId = "instanceId" - case instanceOwnerId = "instanceOwnerId" - case networkCardIndex = "networkCardIndex" - case status = "status" - } +extension EC2ClientTypes.NetworkInterfaceAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144555,26 +102418,21 @@ extension EC2ClientTypes.NetworkInterfaceAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .attachTime) - attachTime = attachTimeDecoded - let attachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attachmentId) - attachmentId = attachmentIdDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let deviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deviceIndex) - deviceIndex = deviceIndexDecoded - let networkCardIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .networkCardIndex) - networkCardIndex = networkCardIndexDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceOwnerId) - instanceOwnerId = instanceOwnerIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttachmentStatus.self, forKey: .status) - status = statusDecoded - let enaSrdSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttachmentEnaSrdSpecification.self, forKey: .enaSrdSpecification) - enaSrdSpecification = enaSrdSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfaceAttachment() + value.attachTime = try reader["attachTime"].readTimestampIfPresent(format: .dateTime) + value.attachmentId = try reader["attachmentId"].readIfPresent() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.deviceIndex = try reader["deviceIndex"].readIfPresent() + value.networkCardIndex = try reader["networkCardIndex"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceOwnerId = try reader["instanceOwnerId"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.enaSrdSpecification = try reader["enaSrdSpecification"].readIfPresent(readingClosure: EC2ClientTypes.AttachmentEnaSrdSpecification.readingClosure) + return value + } } } @@ -144626,11 +102484,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInterfaceAttachmentChanges: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachmentId = "attachmentId" - case deleteOnTermination = "deleteOnTermination" - } +extension EC2ClientTypes.NetworkInterfaceAttachmentChanges: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144642,12 +102496,14 @@ extension EC2ClientTypes.NetworkInterfaceAttachmentChanges: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attachmentId) - attachmentId = attachmentIdDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfaceAttachmentChanges() + value.attachmentId = try reader["attachmentId"].readIfPresent() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + return value + } } } @@ -144709,11 +102565,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.NetworkInterfaceCount: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.NetworkInterfaceCount: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144725,12 +102577,14 @@ extension EC2ClientTypes.NetworkInterfaceCount: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfaceCount() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -144754,11 +102608,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInterfaceCountRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.NetworkInterfaceCountRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144770,12 +102620,14 @@ extension EC2ClientTypes.NetworkInterfaceCountRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfaceCountRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -144834,11 +102686,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.NetworkInterfaceIpv6Address: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Address = "ipv6Address" - case isPrimaryIpv6 = "isPrimaryIpv6" - } +extension EC2ClientTypes.NetworkInterfaceIpv6Address: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144850,12 +102698,14 @@ extension EC2ClientTypes.NetworkInterfaceIpv6Address: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded - let isPrimaryIpv6Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isPrimaryIpv6) - isPrimaryIpv6 = isPrimaryIpv6Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfaceIpv6Address() + value.ipv6Address = try reader["ipv6Address"].readIfPresent() + value.isPrimaryIpv6 = try reader["isPrimaryIpv6"].readIfPresent() + return value + } } } @@ -144879,15 +102729,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInterfacePermission: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case awsAccountId = "awsAccountId" - case awsService = "awsService" - case networkInterfaceId = "networkInterfaceId" - case networkInterfacePermissionId = "networkInterfacePermissionId" - case permission = "permission" - case permissionState = "permissionState" - } +extension EC2ClientTypes.NetworkInterfacePermission: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144911,20 +102753,18 @@ extension EC2ClientTypes.NetworkInterfacePermission: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfacePermissionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfacePermissionId) - networkInterfacePermissionId = networkInterfacePermissionIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let awsAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsAccountId) - awsAccountId = awsAccountIdDecoded - let awsServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsService) - awsService = awsServiceDecoded - let permissionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InterfacePermissionType.self, forKey: .permission) - permission = permissionDecoded - let permissionStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfacePermissionState.self, forKey: .permissionState) - permissionState = permissionStateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfacePermission() + value.networkInterfacePermissionId = try reader["networkInterfacePermissionId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.awsAccountId = try reader["awsAccountId"].readIfPresent() + value.awsService = try reader["awsService"].readIfPresent() + value.permission = try reader["permission"].readIfPresent() + value.permissionState = try reader["permissionState"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterfacePermissionState.readingClosure) + return value + } } } @@ -144964,11 +102804,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.NetworkInterfacePermissionState: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case statusMessage = "statusMessage" - } +extension EC2ClientTypes.NetworkInterfacePermissionState: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -144980,12 +102816,14 @@ extension EC2ClientTypes.NetworkInterfacePermissionState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfacePermissionStateCode.self, forKey: .state) - state = stateDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfacePermissionState() + value.state = try reader["state"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + return value + } } } @@ -145047,13 +102885,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.NetworkInterfacePrivateIpAddress: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - case primary = "primary" - case privateDnsName = "privateDnsName" - case privateIpAddress = "privateIpAddress" - } +extension EC2ClientTypes.NetworkInterfacePrivateIpAddress: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -145071,16 +102903,16 @@ extension EC2ClientTypes.NetworkInterfacePrivateIpAddress: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInterfaceAssociation.self, forKey: .association) - association = associationDecoded - let primaryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .primary) - primary = primaryDecoded - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NetworkInterfacePrivateIpAddress() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInterfaceAssociation.readingClosure) + value.primary = try reader["primary"].readIfPresent() + value.privateDnsName = try reader["privateDnsName"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + return value + } } } @@ -145230,11 +103062,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.NewDhcpConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "key" - case values = "Value" - } +extension EC2ClientTypes.NewDhcpConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -145255,28 +103083,13 @@ extension EC2ClientTypes.NewDhcpConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct item{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NewDhcpConfiguration() + value.key = try reader["key"].readIfPresent() + value.values = try reader["Value"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -145333,10 +103146,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.NitroTpmInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case supportedVersions = "supportedVersions" - } +extension EC2ClientTypes.NitroTpmInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -145354,26 +103164,12 @@ extension EC2ClientTypes.NitroTpmInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.supportedVersions) { - struct KeyVal0{struct item{}} - let supportedVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedVersions) - if let supportedVersionsWrappedContainer = supportedVersionsWrappedContainer { - let supportedVersionsContainer = try supportedVersionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedVersionsBuffer:[Swift.String]? = nil - if let supportedVersionsContainer = supportedVersionsContainer { - supportedVersionsBuffer = [Swift.String]() - for stringContainer0 in supportedVersionsContainer { - supportedVersionsBuffer?.append(stringContainer0) - } - } - supportedVersions = supportedVersionsBuffer - } else { - supportedVersions = [] - } - } else { - supportedVersions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.NitroTpmInfo() + value.supportedVersions = try reader["supportedVersions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -145502,16 +103298,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.OidcOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authorizationEndpoint = "authorizationEndpoint" - case clientId = "clientId" - case clientSecret = "clientSecret" - case issuer = "issuer" - case scope = "scope" - case tokenEndpoint = "tokenEndpoint" - case userInfoEndpoint = "userInfoEndpoint" - } +extension EC2ClientTypes.OidcOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -145538,22 +103325,19 @@ extension EC2ClientTypes.OidcOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let issuerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .issuer) - issuer = issuerDecoded - let authorizationEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authorizationEndpoint) - authorizationEndpoint = authorizationEndpointDecoded - let tokenEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tokenEndpoint) - tokenEndpoint = tokenEndpointDecoded - let userInfoEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userInfoEndpoint) - userInfoEndpoint = userInfoEndpointDecoded - let clientIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientId) - clientId = clientIdDecoded - let clientSecretDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientSecret) - clientSecret = clientSecretDecoded - let scopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scope) - scope = scopeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.OidcOptions() + value.issuer = try reader["issuer"].readIfPresent() + value.authorizationEndpoint = try reader["authorizationEndpoint"].readIfPresent() + value.tokenEndpoint = try reader["tokenEndpoint"].readIfPresent() + value.userInfoEndpoint = try reader["userInfoEndpoint"].readIfPresent() + value.clientId = try reader["clientId"].readIfPresent() + value.clientSecret = try reader["clientSecret"].readIfPresent() + value.scope = try reader["scope"].readIfPresent() + return value + } } } @@ -145634,15 +103418,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.OnDemandOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationStrategy = "allocationStrategy" - case capacityReservationOptions = "capacityReservationOptions" - case maxTotalPrice = "maxTotalPrice" - case minTargetCapacity = "minTargetCapacity" - case singleAvailabilityZone = "singleAvailabilityZone" - case singleInstanceType = "singleInstanceType" - } +extension EC2ClientTypes.OnDemandOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -145666,20 +103442,18 @@ extension EC2ClientTypes.OnDemandOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetOnDemandAllocationStrategy.self, forKey: .allocationStrategy) - allocationStrategy = allocationStrategyDecoded - let capacityReservationOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationOptions.self, forKey: .capacityReservationOptions) - capacityReservationOptions = capacityReservationOptionsDecoded - let singleInstanceTypeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleInstanceType) - singleInstanceType = singleInstanceTypeDecoded - let singleAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleAvailabilityZone) - singleAvailabilityZone = singleAvailabilityZoneDecoded - let minTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minTargetCapacity) - minTargetCapacity = minTargetCapacityDecoded - let maxTotalPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxTotalPrice) - maxTotalPrice = maxTotalPriceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.OnDemandOptions() + value.allocationStrategy = try reader["allocationStrategy"].readIfPresent() + value.capacityReservationOptions = try reader["capacityReservationOptions"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservationOptions.readingClosure) + value.singleInstanceType = try reader["singleInstanceType"].readIfPresent() + value.singleAvailabilityZone = try reader["singleAvailabilityZone"].readIfPresent() + value.minTargetCapacity = try reader["minTargetCapacity"].readIfPresent() + value.maxTotalPrice = try reader["maxTotalPrice"].readIfPresent() + return value + } } } @@ -145719,15 +103493,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.OnDemandOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationStrategy = "AllocationStrategy" - case capacityReservationOptions = "CapacityReservationOptions" - case maxTotalPrice = "MaxTotalPrice" - case minTargetCapacity = "MinTargetCapacity" - case singleAvailabilityZone = "SingleAvailabilityZone" - case singleInstanceType = "SingleInstanceType" - } +extension EC2ClientTypes.OnDemandOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -145751,20 +103517,18 @@ extension EC2ClientTypes.OnDemandOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetOnDemandAllocationStrategy.self, forKey: .allocationStrategy) - allocationStrategy = allocationStrategyDecoded - let capacityReservationOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationOptionsRequest.self, forKey: .capacityReservationOptions) - capacityReservationOptions = capacityReservationOptionsDecoded - let singleInstanceTypeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleInstanceType) - singleInstanceType = singleInstanceTypeDecoded - let singleAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleAvailabilityZone) - singleAvailabilityZone = singleAvailabilityZoneDecoded - let minTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minTargetCapacity) - minTargetCapacity = minTargetCapacityDecoded - let maxTotalPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxTotalPrice) - maxTotalPrice = maxTotalPriceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.OnDemandOptionsRequest() + value.allocationStrategy = try reader["AllocationStrategy"].readIfPresent() + value.capacityReservationOptions = try reader["CapacityReservationOptions"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservationOptionsRequest.readingClosure) + value.singleInstanceType = try reader["SingleInstanceType"].readIfPresent() + value.singleAvailabilityZone = try reader["SingleAvailabilityZone"].readIfPresent() + value.minTargetCapacity = try reader["MinTargetCapacity"].readIfPresent() + value.maxTotalPrice = try reader["MaxTotalPrice"].readIfPresent() + return value + } } } @@ -145836,16 +103600,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.PacketHeaderStatement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationAddresses = "destinationAddressSet" - case destinationPorts = "destinationPortSet" - case destinationPrefixLists = "destinationPrefixListSet" - case protocols = "protocolSet" - case sourceAddresses = "sourceAddressSet" - case sourcePorts = "sourcePortSet" - case sourcePrefixLists = "sourcePrefixListSet" - } +extension EC2ClientTypes.PacketHeaderStatement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -145935,140 +103690,18 @@ extension EC2ClientTypes.PacketHeaderStatement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.sourceAddresses) { - struct KeyVal0{struct item{}} - let sourceAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceAddresses) - if let sourceAddressesWrappedContainer = sourceAddressesWrappedContainer { - let sourceAddressesContainer = try sourceAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceAddressesBuffer:[Swift.String]? = nil - if let sourceAddressesContainer = sourceAddressesContainer { - sourceAddressesBuffer = [Swift.String]() - for stringContainer0 in sourceAddressesContainer { - sourceAddressesBuffer?.append(stringContainer0) - } - } - sourceAddresses = sourceAddressesBuffer - } else { - sourceAddresses = [] - } - } else { - sourceAddresses = nil - } - if containerValues.contains(.destinationAddresses) { - struct KeyVal0{struct item{}} - let destinationAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationAddresses) - if let destinationAddressesWrappedContainer = destinationAddressesWrappedContainer { - let destinationAddressesContainer = try destinationAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationAddressesBuffer:[Swift.String]? = nil - if let destinationAddressesContainer = destinationAddressesContainer { - destinationAddressesBuffer = [Swift.String]() - for stringContainer0 in destinationAddressesContainer { - destinationAddressesBuffer?.append(stringContainer0) - } - } - destinationAddresses = destinationAddressesBuffer - } else { - destinationAddresses = [] - } - } else { - destinationAddresses = nil - } - if containerValues.contains(.sourcePorts) { - struct KeyVal0{struct item{}} - let sourcePortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourcePorts) - if let sourcePortsWrappedContainer = sourcePortsWrappedContainer { - let sourcePortsContainer = try sourcePortsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourcePortsBuffer:[Swift.String]? = nil - if let sourcePortsContainer = sourcePortsContainer { - sourcePortsBuffer = [Swift.String]() - for stringContainer0 in sourcePortsContainer { - sourcePortsBuffer?.append(stringContainer0) - } - } - sourcePorts = sourcePortsBuffer - } else { - sourcePorts = [] - } - } else { - sourcePorts = nil - } - if containerValues.contains(.destinationPorts) { - struct KeyVal0{struct item{}} - let destinationPortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationPorts) - if let destinationPortsWrappedContainer = destinationPortsWrappedContainer { - let destinationPortsContainer = try destinationPortsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationPortsBuffer:[Swift.String]? = nil - if let destinationPortsContainer = destinationPortsContainer { - destinationPortsBuffer = [Swift.String]() - for stringContainer0 in destinationPortsContainer { - destinationPortsBuffer?.append(stringContainer0) - } - } - destinationPorts = destinationPortsBuffer - } else { - destinationPorts = [] - } - } else { - destinationPorts = nil - } - if containerValues.contains(.sourcePrefixLists) { - struct KeyVal0{struct item{}} - let sourcePrefixListsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourcePrefixLists) - if let sourcePrefixListsWrappedContainer = sourcePrefixListsWrappedContainer { - let sourcePrefixListsContainer = try sourcePrefixListsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourcePrefixListsBuffer:[Swift.String]? = nil - if let sourcePrefixListsContainer = sourcePrefixListsContainer { - sourcePrefixListsBuffer = [Swift.String]() - for stringContainer0 in sourcePrefixListsContainer { - sourcePrefixListsBuffer?.append(stringContainer0) - } - } - sourcePrefixLists = sourcePrefixListsBuffer - } else { - sourcePrefixLists = [] - } - } else { - sourcePrefixLists = nil - } - if containerValues.contains(.destinationPrefixLists) { - struct KeyVal0{struct item{}} - let destinationPrefixListsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationPrefixLists) - if let destinationPrefixListsWrappedContainer = destinationPrefixListsWrappedContainer { - let destinationPrefixListsContainer = try destinationPrefixListsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationPrefixListsBuffer:[Swift.String]? = nil - if let destinationPrefixListsContainer = destinationPrefixListsContainer { - destinationPrefixListsBuffer = [Swift.String]() - for stringContainer0 in destinationPrefixListsContainer { - destinationPrefixListsBuffer?.append(stringContainer0) - } - } - destinationPrefixLists = destinationPrefixListsBuffer - } else { - destinationPrefixLists = [] - } - } else { - destinationPrefixLists = nil - } - if containerValues.contains(.protocols) { - struct KeyVal0{struct item{}} - let protocolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .protocols) - if let protocolsWrappedContainer = protocolsWrappedContainer { - let protocolsContainer = try protocolsWrappedContainer.decodeIfPresent([EC2ClientTypes.ModelProtocol].self, forKey: .member) - var protocolsBuffer:[EC2ClientTypes.ModelProtocol]? = nil - if let protocolsContainer = protocolsContainer { - protocolsBuffer = [EC2ClientTypes.ModelProtocol]() - for enumContainer0 in protocolsContainer { - protocolsBuffer?.append(enumContainer0) - } - } - protocols = protocolsBuffer - } else { - protocols = [] - } - } else { - protocols = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PacketHeaderStatement() + value.sourceAddresses = try reader["sourceAddressSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationAddresses = try reader["destinationAddressSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourcePorts = try reader["sourcePortSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationPorts = try reader["destinationPortSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourcePrefixLists = try reader["sourcePrefixListSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationPrefixLists = try reader["destinationPrefixListSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.protocols = try reader["protocolSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ModelProtocol.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -146113,16 +103746,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PacketHeaderStatementRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationAddresses = "DestinationAddress" - case destinationPorts = "DestinationPort" - case destinationPrefixLists = "DestinationPrefixList" - case protocols = "Protocol" - case sourceAddresses = "SourceAddress" - case sourcePorts = "SourcePort" - case sourcePrefixLists = "SourcePrefixList" - } +extension EC2ClientTypes.PacketHeaderStatementRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -146212,140 +103836,18 @@ extension EC2ClientTypes.PacketHeaderStatementRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.sourceAddresses) { - struct KeyVal0{struct item{}} - let sourceAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceAddresses) - if let sourceAddressesWrappedContainer = sourceAddressesWrappedContainer { - let sourceAddressesContainer = try sourceAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceAddressesBuffer:[Swift.String]? = nil - if let sourceAddressesContainer = sourceAddressesContainer { - sourceAddressesBuffer = [Swift.String]() - for stringContainer0 in sourceAddressesContainer { - sourceAddressesBuffer?.append(stringContainer0) - } - } - sourceAddresses = sourceAddressesBuffer - } else { - sourceAddresses = [] - } - } else { - sourceAddresses = nil - } - if containerValues.contains(.destinationAddresses) { - struct KeyVal0{struct item{}} - let destinationAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationAddresses) - if let destinationAddressesWrappedContainer = destinationAddressesWrappedContainer { - let destinationAddressesContainer = try destinationAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationAddressesBuffer:[Swift.String]? = nil - if let destinationAddressesContainer = destinationAddressesContainer { - destinationAddressesBuffer = [Swift.String]() - for stringContainer0 in destinationAddressesContainer { - destinationAddressesBuffer?.append(stringContainer0) - } - } - destinationAddresses = destinationAddressesBuffer - } else { - destinationAddresses = [] - } - } else { - destinationAddresses = nil - } - if containerValues.contains(.sourcePorts) { - struct KeyVal0{struct item{}} - let sourcePortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourcePorts) - if let sourcePortsWrappedContainer = sourcePortsWrappedContainer { - let sourcePortsContainer = try sourcePortsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourcePortsBuffer:[Swift.String]? = nil - if let sourcePortsContainer = sourcePortsContainer { - sourcePortsBuffer = [Swift.String]() - for stringContainer0 in sourcePortsContainer { - sourcePortsBuffer?.append(stringContainer0) - } - } - sourcePorts = sourcePortsBuffer - } else { - sourcePorts = [] - } - } else { - sourcePorts = nil - } - if containerValues.contains(.destinationPorts) { - struct KeyVal0{struct item{}} - let destinationPortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationPorts) - if let destinationPortsWrappedContainer = destinationPortsWrappedContainer { - let destinationPortsContainer = try destinationPortsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationPortsBuffer:[Swift.String]? = nil - if let destinationPortsContainer = destinationPortsContainer { - destinationPortsBuffer = [Swift.String]() - for stringContainer0 in destinationPortsContainer { - destinationPortsBuffer?.append(stringContainer0) - } - } - destinationPorts = destinationPortsBuffer - } else { - destinationPorts = [] - } - } else { - destinationPorts = nil - } - if containerValues.contains(.sourcePrefixLists) { - struct KeyVal0{struct item{}} - let sourcePrefixListsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourcePrefixLists) - if let sourcePrefixListsWrappedContainer = sourcePrefixListsWrappedContainer { - let sourcePrefixListsContainer = try sourcePrefixListsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourcePrefixListsBuffer:[Swift.String]? = nil - if let sourcePrefixListsContainer = sourcePrefixListsContainer { - sourcePrefixListsBuffer = [Swift.String]() - for stringContainer0 in sourcePrefixListsContainer { - sourcePrefixListsBuffer?.append(stringContainer0) - } - } - sourcePrefixLists = sourcePrefixListsBuffer - } else { - sourcePrefixLists = [] - } - } else { - sourcePrefixLists = nil - } - if containerValues.contains(.destinationPrefixLists) { - struct KeyVal0{struct item{}} - let destinationPrefixListsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinationPrefixLists) - if let destinationPrefixListsWrappedContainer = destinationPrefixListsWrappedContainer { - let destinationPrefixListsContainer = try destinationPrefixListsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationPrefixListsBuffer:[Swift.String]? = nil - if let destinationPrefixListsContainer = destinationPrefixListsContainer { - destinationPrefixListsBuffer = [Swift.String]() - for stringContainer0 in destinationPrefixListsContainer { - destinationPrefixListsBuffer?.append(stringContainer0) - } - } - destinationPrefixLists = destinationPrefixListsBuffer - } else { - destinationPrefixLists = [] - } - } else { - destinationPrefixLists = nil - } - if containerValues.contains(.protocols) { - struct KeyVal0{struct item{}} - let protocolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .protocols) - if let protocolsWrappedContainer = protocolsWrappedContainer { - let protocolsContainer = try protocolsWrappedContainer.decodeIfPresent([EC2ClientTypes.ModelProtocol].self, forKey: .member) - var protocolsBuffer:[EC2ClientTypes.ModelProtocol]? = nil - if let protocolsContainer = protocolsContainer { - protocolsBuffer = [EC2ClientTypes.ModelProtocol]() - for enumContainer0 in protocolsContainer { - protocolsBuffer?.append(enumContainer0) - } - } - protocols = protocolsBuffer - } else { - protocols = [] - } - } else { - protocols = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PacketHeaderStatementRequest() + value.sourceAddresses = try reader["SourceAddress"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationAddresses = try reader["DestinationAddress"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourcePorts = try reader["SourcePort"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationPorts = try reader["DestinationPort"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sourcePrefixLists = try reader["SourcePrefixList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.destinationPrefixLists = try reader["DestinationPrefixList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.protocols = try reader["Protocol"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ModelProtocol.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -146428,29 +103930,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.PathComponent: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case aclRule = "aclRule" - case additionalDetails = "additionalDetailSet" - case attachedTo = "attachedTo" - case component = "component" - case destinationVpc = "destinationVpc" - case elasticLoadBalancerListener = "elasticLoadBalancerListener" - case explanations = "explanationSet" - case firewallStatefulRule = "firewallStatefulRule" - case firewallStatelessRule = "firewallStatelessRule" - case inboundHeader = "inboundHeader" - case outboundHeader = "outboundHeader" - case routeTableRoute = "routeTableRoute" - case securityGroupRule = "securityGroupRule" - case sequenceNumber = "sequenceNumber" - case serviceName = "serviceName" - case sourceVpc = "sourceVpc" - case subnet = "subnet" - case transitGateway = "transitGateway" - case transitGatewayRouteTableRoute = "transitGatewayRouteTableRoute" - case vpc = "vpc" - } +extension EC2ClientTypes.PathComponent: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -146534,82 +104014,32 @@ extension EC2ClientTypes.PathComponent: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sequenceNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sequenceNumber) - sequenceNumber = sequenceNumberDecoded - let aclRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisAclRule.self, forKey: .aclRule) - aclRule = aclRuleDecoded - let attachedToDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .attachedTo) - attachedTo = attachedToDecoded - let componentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .component) - component = componentDecoded - let destinationVpcDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .destinationVpc) - destinationVpc = destinationVpcDecoded - let outboundHeaderDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisPacketHeader.self, forKey: .outboundHeader) - outboundHeader = outboundHeaderDecoded - let inboundHeaderDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisPacketHeader.self, forKey: .inboundHeader) - inboundHeader = inboundHeaderDecoded - let routeTableRouteDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisRouteTableRoute.self, forKey: .routeTableRoute) - routeTableRoute = routeTableRouteDecoded - let securityGroupRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisSecurityGroupRule.self, forKey: .securityGroupRule) - securityGroupRule = securityGroupRuleDecoded - let sourceVpcDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .sourceVpc) - sourceVpc = sourceVpcDecoded - let subnetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .subnet) - subnet = subnetDecoded - let vpcDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .vpc) - vpc = vpcDecoded - if containerValues.contains(.additionalDetails) { - struct KeyVal0{struct item{}} - let additionalDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .additionalDetails) - if let additionalDetailsWrappedContainer = additionalDetailsWrappedContainer { - let additionalDetailsContainer = try additionalDetailsWrappedContainer.decodeIfPresent([EC2ClientTypes.AdditionalDetail].self, forKey: .member) - var additionalDetailsBuffer:[EC2ClientTypes.AdditionalDetail]? = nil - if let additionalDetailsContainer = additionalDetailsContainer { - additionalDetailsBuffer = [EC2ClientTypes.AdditionalDetail]() - for structureContainer0 in additionalDetailsContainer { - additionalDetailsBuffer?.append(structureContainer0) - } - } - additionalDetails = additionalDetailsBuffer - } else { - additionalDetails = [] - } - } else { - additionalDetails = nil - } - let transitGatewayDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .transitGateway) - transitGateway = transitGatewayDecoded - let transitGatewayRouteTableRouteDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTableRoute.self, forKey: .transitGatewayRouteTableRoute) - transitGatewayRouteTableRoute = transitGatewayRouteTableRouteDecoded - if containerValues.contains(.explanations) { - struct KeyVal0{struct item{}} - let explanationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .explanations) - if let explanationsWrappedContainer = explanationsWrappedContainer { - let explanationsContainer = try explanationsWrappedContainer.decodeIfPresent([EC2ClientTypes.Explanation].self, forKey: .member) - var explanationsBuffer:[EC2ClientTypes.Explanation]? = nil - if let explanationsContainer = explanationsContainer { - explanationsBuffer = [EC2ClientTypes.Explanation]() - for structureContainer0 in explanationsContainer { - explanationsBuffer?.append(structureContainer0) - } - } - explanations = explanationsBuffer - } else { - explanations = [] - } - } else { - explanations = nil - } - let elasticLoadBalancerListenerDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AnalysisComponent.self, forKey: .elasticLoadBalancerListener) - elasticLoadBalancerListener = elasticLoadBalancerListenerDecoded - let firewallStatelessRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FirewallStatelessRule.self, forKey: .firewallStatelessRule) - firewallStatelessRule = firewallStatelessRuleDecoded - let firewallStatefulRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FirewallStatefulRule.self, forKey: .firewallStatefulRule) - firewallStatefulRule = firewallStatefulRuleDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PathComponent() + value.sequenceNumber = try reader["sequenceNumber"].readIfPresent() + value.aclRule = try reader["aclRule"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisAclRule.readingClosure) + value.attachedTo = try reader["attachedTo"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.component = try reader["component"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.destinationVpc = try reader["destinationVpc"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.outboundHeader = try reader["outboundHeader"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisPacketHeader.readingClosure) + value.inboundHeader = try reader["inboundHeader"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisPacketHeader.readingClosure) + value.routeTableRoute = try reader["routeTableRoute"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisRouteTableRoute.readingClosure) + value.securityGroupRule = try reader["securityGroupRule"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisSecurityGroupRule.readingClosure) + value.sourceVpc = try reader["sourceVpc"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.subnet = try reader["subnet"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.vpc = try reader["vpc"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.additionalDetails = try reader["additionalDetailSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.AdditionalDetail.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.transitGateway = try reader["transitGateway"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.transitGatewayRouteTableRoute = try reader["transitGatewayRouteTableRoute"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRouteTableRoute.readingClosure) + value.explanations = try reader["explanationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Explanation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.elasticLoadBalancerListener = try reader["elasticLoadBalancerListener"].readIfPresent(readingClosure: EC2ClientTypes.AnalysisComponent.readingClosure) + value.firewallStatelessRule = try reader["firewallStatelessRule"].readIfPresent(readingClosure: EC2ClientTypes.FirewallStatelessRule.readingClosure) + value.firewallStatefulRule = try reader["firewallStatefulRule"].readIfPresent(readingClosure: EC2ClientTypes.FirewallStatefulRule.readingClosure) + value.serviceName = try reader["serviceName"].readIfPresent() + return value + } } } @@ -146705,13 +104135,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PathFilter: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationAddress = "destinationAddress" - case destinationPortRange = "destinationPortRange" - case sourceAddress = "sourceAddress" - case sourcePortRange = "sourcePortRange" - } +extension EC2ClientTypes.PathFilter: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -146729,16 +104153,16 @@ extension EC2ClientTypes.PathFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceAddress) - sourceAddress = sourceAddressDecoded - let sourcePortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FilterPortRange.self, forKey: .sourcePortRange) - sourcePortRange = sourcePortRangeDecoded - let destinationAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationAddress) - destinationAddress = destinationAddressDecoded - let destinationPortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FilterPortRange.self, forKey: .destinationPortRange) - destinationPortRange = destinationPortRangeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PathFilter() + value.sourceAddress = try reader["sourceAddress"].readIfPresent() + value.sourcePortRange = try reader["sourcePortRange"].readIfPresent(readingClosure: EC2ClientTypes.FilterPortRange.readingClosure) + value.destinationAddress = try reader["destinationAddress"].readIfPresent() + value.destinationPortRange = try reader["destinationPortRange"].readIfPresent(readingClosure: EC2ClientTypes.FilterPortRange.readingClosure) + return value + } } } @@ -146770,13 +104194,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PathRequestFilter: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationAddress = "DestinationAddress" - case destinationPortRange = "DestinationPortRange" - case sourceAddress = "SourceAddress" - case sourcePortRange = "SourcePortRange" - } +extension EC2ClientTypes.PathRequestFilter: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -146794,16 +104212,16 @@ extension EC2ClientTypes.PathRequestFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceAddress) - sourceAddress = sourceAddressDecoded - let sourcePortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RequestFilterPortRange.self, forKey: .sourcePortRange) - sourcePortRange = sourcePortRangeDecoded - let destinationAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationAddress) - destinationAddress = destinationAddressDecoded - let destinationPortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RequestFilterPortRange.self, forKey: .destinationPortRange) - destinationPortRange = destinationPortRangeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PathRequestFilter() + value.sourceAddress = try reader["SourceAddress"].readIfPresent() + value.sourcePortRange = try reader["SourcePortRange"].readIfPresent(readingClosure: EC2ClientTypes.RequestFilterPortRange.readingClosure) + value.destinationAddress = try reader["DestinationAddress"].readIfPresent() + value.destinationPortRange = try reader["DestinationPortRange"].readIfPresent(readingClosure: EC2ClientTypes.RequestFilterPortRange.readingClosure) + return value + } } } @@ -146835,11 +104253,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PathStatement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case packetHeaderStatement = "packetHeaderStatement" - case resourceStatement = "resourceStatement" - } +extension EC2ClientTypes.PathStatement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -146851,12 +104265,14 @@ extension EC2ClientTypes.PathStatement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let packetHeaderStatementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PacketHeaderStatement.self, forKey: .packetHeaderStatement) - packetHeaderStatement = packetHeaderStatementDecoded - let resourceStatementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceStatement.self, forKey: .resourceStatement) - resourceStatement = resourceStatementDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PathStatement() + value.packetHeaderStatement = try reader["packetHeaderStatement"].readIfPresent(readingClosure: EC2ClientTypes.PacketHeaderStatement.readingClosure) + value.resourceStatement = try reader["resourceStatement"].readIfPresent(readingClosure: EC2ClientTypes.ResourceStatement.readingClosure) + return value + } } } @@ -146880,11 +104296,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PathStatementRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case packetHeaderStatement = "PacketHeaderStatement" - case resourceStatement = "ResourceStatement" - } +extension EC2ClientTypes.PathStatementRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -146896,12 +104308,14 @@ extension EC2ClientTypes.PathStatementRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let packetHeaderStatementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PacketHeaderStatementRequest.self, forKey: .packetHeaderStatement) - packetHeaderStatement = packetHeaderStatementDecoded - let resourceStatementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceStatementRequest.self, forKey: .resourceStatement) - resourceStatement = resourceStatementDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PathStatementRequest() + value.packetHeaderStatement = try reader["PacketHeaderStatement"].readIfPresent(readingClosure: EC2ClientTypes.PacketHeaderStatementRequest.readingClosure) + value.resourceStatement = try reader["ResourceStatement"].readIfPresent(readingClosure: EC2ClientTypes.ResourceStatementRequest.readingClosure) + return value + } } } @@ -146989,13 +104403,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.PciId: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deviceId = "DeviceId" - case subsystemId = "SubsystemId" - case subsystemVendorId = "SubsystemVendorId" - case vendorId = "VendorId" - } +extension EC2ClientTypes.PciId: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147013,16 +104421,16 @@ extension EC2ClientTypes.PciId: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceId) - deviceId = deviceIdDecoded - let vendorIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vendorId) - vendorId = vendorIdDecoded - let subsystemIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subsystemId) - subsystemId = subsystemIdDecoded - let subsystemVendorIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subsystemVendorId) - subsystemVendorId = subsystemVendorIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PciId() + value.deviceId = try reader["DeviceId"].readIfPresent() + value.vendorId = try reader["VendorId"].readIfPresent() + value.subsystemId = try reader["SubsystemId"].readIfPresent() + value.subsystemVendorId = try reader["SubsystemVendorId"].readIfPresent() + return value + } } } @@ -147054,11 +104462,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PeeringAttachmentStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.PeeringAttachmentStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147070,12 +104474,14 @@ extension EC2ClientTypes.PeeringAttachmentStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PeeringAttachmentStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -147099,12 +104505,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PeeringConnectionOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowDnsResolutionFromRemoteVpc = "allowDnsResolutionFromRemoteVpc" - case allowEgressFromLocalClassicLinkToRemoteVpc = "allowEgressFromLocalClassicLinkToRemoteVpc" - case allowEgressFromLocalVpcToRemoteClassicLink = "allowEgressFromLocalVpcToRemoteClassicLink" - } +extension EC2ClientTypes.PeeringConnectionOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147119,14 +104520,15 @@ extension EC2ClientTypes.PeeringConnectionOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allowDnsResolutionFromRemoteVpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowDnsResolutionFromRemoteVpc) - allowDnsResolutionFromRemoteVpc = allowDnsResolutionFromRemoteVpcDecoded - let allowEgressFromLocalClassicLinkToRemoteVpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowEgressFromLocalClassicLinkToRemoteVpc) - allowEgressFromLocalClassicLinkToRemoteVpc = allowEgressFromLocalClassicLinkToRemoteVpcDecoded - let allowEgressFromLocalVpcToRemoteClassicLinkDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowEgressFromLocalVpcToRemoteClassicLink) - allowEgressFromLocalVpcToRemoteClassicLink = allowEgressFromLocalVpcToRemoteClassicLinkDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PeeringConnectionOptions() + value.allowDnsResolutionFromRemoteVpc = try reader["allowDnsResolutionFromRemoteVpc"].readIfPresent() + value.allowEgressFromLocalClassicLinkToRemoteVpc = try reader["allowEgressFromLocalClassicLinkToRemoteVpc"].readIfPresent() + value.allowEgressFromLocalVpcToRemoteClassicLink = try reader["allowEgressFromLocalVpcToRemoteClassicLink"].readIfPresent() + return value + } } } @@ -147154,12 +104556,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PeeringConnectionOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowDnsResolutionFromRemoteVpc = "AllowDnsResolutionFromRemoteVpc" - case allowEgressFromLocalClassicLinkToRemoteVpc = "AllowEgressFromLocalClassicLinkToRemoteVpc" - case allowEgressFromLocalVpcToRemoteClassicLink = "AllowEgressFromLocalVpcToRemoteClassicLink" - } +extension EC2ClientTypes.PeeringConnectionOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147174,14 +104571,15 @@ extension EC2ClientTypes.PeeringConnectionOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allowDnsResolutionFromRemoteVpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowDnsResolutionFromRemoteVpc) - allowDnsResolutionFromRemoteVpc = allowDnsResolutionFromRemoteVpcDecoded - let allowEgressFromLocalClassicLinkToRemoteVpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowEgressFromLocalClassicLinkToRemoteVpc) - allowEgressFromLocalClassicLinkToRemoteVpc = allowEgressFromLocalClassicLinkToRemoteVpcDecoded - let allowEgressFromLocalVpcToRemoteClassicLinkDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowEgressFromLocalVpcToRemoteClassicLink) - allowEgressFromLocalVpcToRemoteClassicLink = allowEgressFromLocalVpcToRemoteClassicLinkDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PeeringConnectionOptionsRequest() + value.allowDnsResolutionFromRemoteVpc = try reader["AllowDnsResolutionFromRemoteVpc"].readIfPresent() + value.allowEgressFromLocalClassicLinkToRemoteVpc = try reader["AllowEgressFromLocalClassicLinkToRemoteVpc"].readIfPresent() + value.allowEgressFromLocalVpcToRemoteClassicLink = try reader["AllowEgressFromLocalVpcToRemoteClassicLink"].readIfPresent() + return value + } } } @@ -147209,13 +104607,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PeeringTgwInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case coreNetworkId = "coreNetworkId" - case ownerId = "ownerId" - case region = "region" - case transitGatewayId = "transitGatewayId" - } +extension EC2ClientTypes.PeeringTgwInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147233,16 +104625,16 @@ extension EC2ClientTypes.PeeringTgwInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let coreNetworkIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coreNetworkId) - coreNetworkId = coreNetworkIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PeeringTgwInfo() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.coreNetworkId = try reader["coreNetworkId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.region = try reader["region"].readIfPresent() + return value + } } } @@ -147347,10 +104739,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Phase1DHGroupNumbersListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.Phase1DHGroupNumbersListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147359,10 +104748,13 @@ extension EC2ClientTypes.Phase1DHGroupNumbersListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase1DHGroupNumbersListValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -147382,10 +104774,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase1DHGroupNumbersRequestListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "Value" - } +extension EC2ClientTypes.Phase1DHGroupNumbersRequestListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147394,10 +104783,13 @@ extension EC2ClientTypes.Phase1DHGroupNumbersRequestListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase1DHGroupNumbersRequestListValue() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -147417,10 +104809,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase1EncryptionAlgorithmsListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.Phase1EncryptionAlgorithmsListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147429,10 +104818,13 @@ extension EC2ClientTypes.Phase1EncryptionAlgorithmsListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase1EncryptionAlgorithmsListValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -147452,10 +104844,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "Value" - } +extension EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147464,10 +104853,13 @@ extension EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -147487,10 +104879,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase1IntegrityAlgorithmsListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.Phase1IntegrityAlgorithmsListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147499,10 +104888,13 @@ extension EC2ClientTypes.Phase1IntegrityAlgorithmsListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase1IntegrityAlgorithmsListValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -147522,10 +104914,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "Value" - } +extension EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147534,10 +104923,13 @@ extension EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -147557,10 +104949,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase2DHGroupNumbersListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.Phase2DHGroupNumbersListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147569,10 +104958,13 @@ extension EC2ClientTypes.Phase2DHGroupNumbersListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase2DHGroupNumbersListValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -147592,10 +104984,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase2DHGroupNumbersRequestListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "Value" - } +extension EC2ClientTypes.Phase2DHGroupNumbersRequestListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147604,10 +104993,13 @@ extension EC2ClientTypes.Phase2DHGroupNumbersRequestListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase2DHGroupNumbersRequestListValue() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -147627,10 +105019,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase2EncryptionAlgorithmsListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.Phase2EncryptionAlgorithmsListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147639,10 +105028,13 @@ extension EC2ClientTypes.Phase2EncryptionAlgorithmsListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase2EncryptionAlgorithmsListValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -147662,10 +105054,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "Value" - } +extension EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147674,10 +105063,13 @@ extension EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -147697,10 +105089,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase2IntegrityAlgorithmsListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "value" - } +extension EC2ClientTypes.Phase2IntegrityAlgorithmsListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147709,10 +105098,13 @@ extension EC2ClientTypes.Phase2IntegrityAlgorithmsListValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase2IntegrityAlgorithmsListValue() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -147732,10 +105124,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "Value" - } +extension EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147744,10 +105133,13 @@ extension EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -147767,18 +105159,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Placement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case affinity = "affinity" - case availabilityZone = "availabilityZone" - case groupId = "groupId" - case groupName = "groupName" - case hostId = "hostId" - case hostResourceGroupArn = "hostResourceGroupArn" - case partitionNumber = "partitionNumber" - case spreadDomain = "spreadDomain" - case tenancy = "tenancy" - } +extension EC2ClientTypes.Placement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147811,26 +105192,21 @@ extension EC2ClientTypes.Placement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let affinityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .affinity) - affinity = affinityDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let partitionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partitionNumber) - partitionNumber = partitionNumberDecoded - let hostIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostId) - hostId = hostIdDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded - let spreadDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spreadDomain) - spreadDomain = spreadDomainDecoded - let hostResourceGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostResourceGroupArn) - hostResourceGroupArn = hostResourceGroupArnDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Placement() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.affinity = try reader["affinity"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.partitionNumber = try reader["partitionNumber"].readIfPresent() + value.hostId = try reader["hostId"].readIfPresent() + value.tenancy = try reader["tenancy"].readIfPresent() + value.spreadDomain = try reader["spreadDomain"].readIfPresent() + value.hostResourceGroupArn = try reader["hostResourceGroupArn"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + return value + } } } @@ -147882,17 +105258,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PlacementGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupArn = "groupArn" - case groupId = "groupId" - case groupName = "groupName" - case partitionCount = "partitionCount" - case spreadLevel = "spreadLevel" - case state = "state" - case strategy = "strategy" - case tags = "tagSet" - } +extension EC2ClientTypes.PlacementGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -147931,41 +105297,20 @@ extension EC2ClientTypes.PlacementGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlacementGroupState.self, forKey: .state) - state = stateDecoded - let strategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PlacementStrategy.self, forKey: .strategy) - strategy = strategyDecoded - let partitionCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partitionCount) - partitionCount = partitionCountDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PlacementGroup() + value.groupName = try reader["groupName"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.strategy = try reader["strategy"].readIfPresent() + value.partitionCount = try reader["partitionCount"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.groupArn = try reader["groupArn"].readIfPresent() + value.spreadLevel = try reader["spreadLevel"].readIfPresent() + return value } - let groupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupArn) - groupArn = groupArnDecoded - let spreadLevelDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpreadLevel.self, forKey: .spreadLevel) - spreadLevel = spreadLevelDecoded } } @@ -148013,10 +105358,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PlacementGroupInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case supportedStrategies = "supportedStrategies" - } +extension EC2ClientTypes.PlacementGroupInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148034,26 +105376,12 @@ extension EC2ClientTypes.PlacementGroupInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.supportedStrategies) { - struct KeyVal0{struct item{}} - let supportedStrategiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedStrategies) - if let supportedStrategiesWrappedContainer = supportedStrategiesWrappedContainer { - let supportedStrategiesContainer = try supportedStrategiesWrappedContainer.decodeIfPresent([EC2ClientTypes.PlacementGroupStrategy].self, forKey: .member) - var supportedStrategiesBuffer:[EC2ClientTypes.PlacementGroupStrategy]? = nil - if let supportedStrategiesContainer = supportedStrategiesContainer { - supportedStrategiesBuffer = [EC2ClientTypes.PlacementGroupStrategy]() - for enumContainer0 in supportedStrategiesContainer { - supportedStrategiesBuffer?.append(enumContainer0) - } - } - supportedStrategies = supportedStrategiesBuffer - } else { - supportedStrategies = [] - } - } else { - supportedStrategies = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PlacementGroupInfo() + value.supportedStrategies = try reader["supportedStrategies"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PlacementGroupStrategy.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -148147,10 +105475,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.PlacementResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "groupName" - } +extension EC2ClientTypes.PlacementResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148159,10 +105484,13 @@ extension EC2ClientTypes.PlacementResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PlacementResponse() + value.groupName = try reader["groupName"].readIfPresent() + return value + } } } @@ -148246,10 +105574,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.PoolCidrBlock: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "poolCidrBlock" - } +extension EC2ClientTypes.PoolCidrBlock: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148258,10 +105583,13 @@ extension EC2ClientTypes.PoolCidrBlock: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PoolCidrBlock() + value.cidr = try reader["poolCidrBlock"].readIfPresent() + return value + } } } @@ -148281,11 +105609,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PortRange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case from = "from" - case to = "to" - } +extension EC2ClientTypes.PortRange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148297,12 +105621,14 @@ extension EC2ClientTypes.PortRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .from) - from = fromDecoded - let toDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .to) - to = toDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PortRange() + value.from = try reader["from"].readIfPresent() + value.to = try reader["to"].readIfPresent() + return value + } } } @@ -148326,12 +105652,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrefixList: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrs = "cidrSet" - case prefixListId = "prefixListId" - case prefixListName = "prefixListName" - } +extension EC2ClientTypes.PrefixList: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148355,31 +105676,15 @@ extension EC2ClientTypes.PrefixList: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.cidrs) { - struct KeyVal0{struct item{}} - let cidrsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cidrs) - if let cidrsWrappedContainer = cidrsWrappedContainer { - let cidrsContainer = try cidrsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cidrsBuffer:[Swift.String]? = nil - if let cidrsContainer = cidrsContainer { - cidrsBuffer = [Swift.String]() - for stringContainer0 in cidrsContainer { - cidrsBuffer?.append(stringContainer0) - } - } - cidrs = cidrsBuffer - } else { - cidrs = [] - } - } else { - cidrs = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrefixList() + value.cidrs = try reader["cidrSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.prefixListId = try reader["prefixListId"].readIfPresent() + value.prefixListName = try reader["prefixListName"].readIfPresent() + return value } - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let prefixListNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListName) - prefixListName = prefixListNameDecoded } } @@ -148407,11 +105712,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrefixListAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceOwner = "resourceOwner" - } +extension EC2ClientTypes.PrefixListAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148423,12 +105724,14 @@ extension EC2ClientTypes.PrefixListAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrefixListAssociation() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceOwner = try reader["resourceOwner"].readIfPresent() + return value + } } } @@ -148452,11 +105755,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrefixListEntry: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "cidr" - case description = "description" - } +extension EC2ClientTypes.PrefixListEntry: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148468,12 +105767,14 @@ extension EC2ClientTypes.PrefixListEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrefixListEntry() + value.cidr = try reader["cidr"].readIfPresent() + value.description = try reader["description"].readIfPresent() + return value + } } } @@ -148497,11 +105798,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrefixListId: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case prefixListId = "prefixListId" - } +extension EC2ClientTypes.PrefixListId: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148513,12 +105810,14 @@ extension EC2ClientTypes.PrefixListId: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrefixListId() + value.description = try reader["description"].readIfPresent() + value.prefixListId = try reader["prefixListId"].readIfPresent() + return value + } } } @@ -148604,13 +105903,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.PriceSchedule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case active = "active" - case currencyCode = "currencyCode" - case price = "price" - case term = "term" - } +extension EC2ClientTypes.PriceSchedule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148628,16 +105921,16 @@ extension EC2ClientTypes.PriceSchedule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let activeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .active) - active = activeDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let priceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .price) - price = priceDecoded - let termDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .term) - term = termDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PriceSchedule() + value.active = try reader["active"].readIfPresent() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.price = try reader["price"].readIfPresent() + value.term = try reader["term"].readIfPresent() + return value + } } } @@ -148669,12 +105962,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PriceScheduleSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currencyCode = "currencyCode" - case price = "price" - case term = "term" - } +extension EC2ClientTypes.PriceScheduleSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148689,14 +105977,15 @@ extension EC2ClientTypes.PriceScheduleSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let priceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .price) - price = priceDecoded - let termDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .term) - term = termDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PriceScheduleSpecification() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.price = try reader["price"].readIfPresent() + value.term = try reader["term"].readIfPresent() + return value + } } } @@ -148724,11 +106013,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PricingDetail: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "count" - case price = "price" - } +extension EC2ClientTypes.PricingDetail: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148740,12 +106025,14 @@ extension EC2ClientTypes.PricingDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) - count = countDecoded - let priceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .price) - price = priceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PricingDetail() + value.count = try reader["count"].readIfPresent() + value.price = try reader["price"].readIfPresent() + return value + } } } @@ -148769,11 +106056,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrincipalIdFormat: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "arn" - case statuses = "statusSet" - } +extension EC2ClientTypes.PrincipalIdFormat: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148794,28 +106077,13 @@ extension EC2ClientTypes.PrincipalIdFormat: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - if containerValues.contains(.statuses) { - struct KeyVal0{struct item{}} - let statusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statuses) - if let statusesWrappedContainer = statusesWrappedContainer { - let statusesContainer = try statusesWrappedContainer.decodeIfPresent([EC2ClientTypes.IdFormat].self, forKey: .member) - var statusesBuffer:[EC2ClientTypes.IdFormat]? = nil - if let statusesContainer = statusesContainer { - statusesBuffer = [EC2ClientTypes.IdFormat]() - for structureContainer0 in statusesContainer { - statusesBuffer?.append(structureContainer0) - } - } - statuses = statusesBuffer - } else { - statuses = [] - } - } else { - statuses = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrincipalIdFormat() + value.arn = try reader["arn"].readIfPresent() + value.statuses = try reader["statusSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IdFormat.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -148884,10 +106152,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.PrivateDnsDetails: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case privateDnsName = "privateDnsName" - } +extension EC2ClientTypes.PrivateDnsDetails: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148896,10 +106161,13 @@ extension EC2ClientTypes.PrivateDnsDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrivateDnsDetails() + value.privateDnsName = try reader["privateDnsName"].readIfPresent() + return value + } } } @@ -148919,13 +106187,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrivateDnsNameConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "name" - case state = "state" - case type = "type" - case value = "value" - } +extension EC2ClientTypes.PrivateDnsNameConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -148943,16 +106205,16 @@ extension EC2ClientTypes.PrivateDnsNameConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsNameState.self, forKey: .state) - state = stateDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrivateDnsNameConfiguration() + value.state = try reader["state"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.value = try reader["value"].readIfPresent() + value.name = try reader["name"].readIfPresent() + return value + } } } @@ -148984,12 +106246,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrivateDnsNameOptionsOnLaunch: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableResourceNameDnsAAAARecord = "enableResourceNameDnsAAAARecord" - case enableResourceNameDnsARecord = "enableResourceNameDnsARecord" - case hostnameType = "hostnameType" - } +extension EC2ClientTypes.PrivateDnsNameOptionsOnLaunch: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -149004,14 +106261,15 @@ extension EC2ClientTypes.PrivateDnsNameOptionsOnLaunch: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostnameTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostnameType.self, forKey: .hostnameType) - hostnameType = hostnameTypeDecoded - let enableResourceNameDnsARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsARecord) - enableResourceNameDnsARecord = enableResourceNameDnsARecordDecoded - let enableResourceNameDnsAAAARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsAAAARecord) - enableResourceNameDnsAAAARecord = enableResourceNameDnsAAAARecordDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrivateDnsNameOptionsOnLaunch() + value.hostnameType = try reader["hostnameType"].readIfPresent() + value.enableResourceNameDnsARecord = try reader["enableResourceNameDnsARecord"].readIfPresent() + value.enableResourceNameDnsAAAARecord = try reader["enableResourceNameDnsAAAARecord"].readIfPresent() + return value + } } } @@ -149039,12 +106297,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrivateDnsNameOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableResourceNameDnsAAAARecord = "EnableResourceNameDnsAAAARecord" - case enableResourceNameDnsARecord = "EnableResourceNameDnsARecord" - case hostnameType = "HostnameType" - } +extension EC2ClientTypes.PrivateDnsNameOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -149059,14 +106312,15 @@ extension EC2ClientTypes.PrivateDnsNameOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostnameTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostnameType.self, forKey: .hostnameType) - hostnameType = hostnameTypeDecoded - let enableResourceNameDnsARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsARecord) - enableResourceNameDnsARecord = enableResourceNameDnsARecordDecoded - let enableResourceNameDnsAAAARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsAAAARecord) - enableResourceNameDnsAAAARecord = enableResourceNameDnsAAAARecordDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrivateDnsNameOptionsRequest() + value.hostnameType = try reader["HostnameType"].readIfPresent() + value.enableResourceNameDnsARecord = try reader["EnableResourceNameDnsARecord"].readIfPresent() + value.enableResourceNameDnsAAAARecord = try reader["EnableResourceNameDnsAAAARecord"].readIfPresent() + return value + } } } @@ -149094,12 +106348,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrivateDnsNameOptionsResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableResourceNameDnsAAAARecord = "enableResourceNameDnsAAAARecord" - case enableResourceNameDnsARecord = "enableResourceNameDnsARecord" - case hostnameType = "hostnameType" - } +extension EC2ClientTypes.PrivateDnsNameOptionsResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -149114,14 +106363,15 @@ extension EC2ClientTypes.PrivateDnsNameOptionsResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostnameTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HostnameType.self, forKey: .hostnameType) - hostnameType = hostnameTypeDecoded - let enableResourceNameDnsARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsARecord) - enableResourceNameDnsARecord = enableResourceNameDnsARecordDecoded - let enableResourceNameDnsAAAARecordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableResourceNameDnsAAAARecord) - enableResourceNameDnsAAAARecord = enableResourceNameDnsAAAARecordDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrivateDnsNameOptionsResponse() + value.hostnameType = try reader["hostnameType"].readIfPresent() + value.enableResourceNameDnsARecord = try reader["enableResourceNameDnsARecord"].readIfPresent() + value.enableResourceNameDnsAAAARecord = try reader["enableResourceNameDnsAAAARecord"].readIfPresent() + return value + } } } @@ -149149,11 +106399,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PrivateIpAddressSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case primary = "primary" - case privateIpAddress = "privateIpAddress" - } +extension EC2ClientTypes.PrivateIpAddressSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -149165,12 +106411,14 @@ extension EC2ClientTypes.PrivateIpAddressSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let primaryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .primary) - primary = primaryDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PrivateIpAddressSpecification() + value.primary = try reader["primary"].readIfPresent() + value.privateIpAddress = try reader["privateIpAddress"].readIfPresent() + return value + } } } @@ -149194,13 +106442,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ProcessorInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case manufacturer = "manufacturer" - case supportedArchitectures = "supportedArchitectures" - case supportedFeatures = "supportedFeatures" - case sustainedClockSpeedInGhz = "sustainedClockSpeedInGhz" - } +extension EC2ClientTypes.ProcessorInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -149236,50 +106478,16 @@ extension EC2ClientTypes.ProcessorInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.supportedArchitectures) { - struct KeyVal0{struct item{}} - let supportedArchitecturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedArchitectures) - if let supportedArchitecturesWrappedContainer = supportedArchitecturesWrappedContainer { - let supportedArchitecturesContainer = try supportedArchitecturesWrappedContainer.decodeIfPresent([EC2ClientTypes.ArchitectureType].self, forKey: .member) - var supportedArchitecturesBuffer:[EC2ClientTypes.ArchitectureType]? = nil - if let supportedArchitecturesContainer = supportedArchitecturesContainer { - supportedArchitecturesBuffer = [EC2ClientTypes.ArchitectureType]() - for enumContainer0 in supportedArchitecturesContainer { - supportedArchitecturesBuffer?.append(enumContainer0) - } - } - supportedArchitectures = supportedArchitecturesBuffer - } else { - supportedArchitectures = [] - } - } else { - supportedArchitectures = nil - } - let sustainedClockSpeedInGhzDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .sustainedClockSpeedInGhz) - sustainedClockSpeedInGhz = sustainedClockSpeedInGhzDecoded - if containerValues.contains(.supportedFeatures) { - struct KeyVal0{struct item{}} - let supportedFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedFeatures) - if let supportedFeaturesWrappedContainer = supportedFeaturesWrappedContainer { - let supportedFeaturesContainer = try supportedFeaturesWrappedContainer.decodeIfPresent([EC2ClientTypes.SupportedAdditionalProcessorFeature].self, forKey: .member) - var supportedFeaturesBuffer:[EC2ClientTypes.SupportedAdditionalProcessorFeature]? = nil - if let supportedFeaturesContainer = supportedFeaturesContainer { - supportedFeaturesBuffer = [EC2ClientTypes.SupportedAdditionalProcessorFeature]() - for enumContainer0 in supportedFeaturesContainer { - supportedFeaturesBuffer?.append(enumContainer0) - } - } - supportedFeatures = supportedFeaturesBuffer - } else { - supportedFeatures = [] - } - } else { - supportedFeatures = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ProcessorInfo() + value.supportedArchitectures = try reader["supportedArchitectures"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ArchitectureType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sustainedClockSpeedInGhz = try reader["sustainedClockSpeedInGhz"].readIfPresent() + value.supportedFeatures = try reader["supportedFeatures"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SupportedAdditionalProcessorFeature.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.manufacturer = try reader["manufacturer"].readIfPresent() + return value } - let manufacturerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .manufacturer) - manufacturer = manufacturerDecoded } } @@ -149311,11 +106519,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ProductCode: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case productCodeId = "productCode" - case productCodeType = "type" - } +extension EC2ClientTypes.ProductCode: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -149327,12 +106531,14 @@ extension EC2ClientTypes.ProductCode: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let productCodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productCodeId) - productCodeId = productCodeIdDecoded - let productCodeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ProductCodeValues.self, forKey: .productCodeType) - productCodeType = productCodeTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ProductCode() + value.productCodeId = try reader["productCode"].readIfPresent() + value.productCodeType = try reader["type"].readIfPresent() + return value + } } } @@ -149388,10 +106594,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.PropagatingVgw: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case gatewayId = "gatewayId" - } +extension EC2ClientTypes.PropagatingVgw: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -149400,10 +106603,13 @@ extension EC2ClientTypes.PropagatingVgw: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PropagatingVgw() + value.gatewayId = try reader["gatewayId"].readIfPresent() + return value + } } } @@ -149582,75 +106788,15 @@ public struct ProvisionByoipCidrInput: Swift.Equatable { } } -struct ProvisionByoipCidrInputBody: Swift.Equatable { - let cidr: Swift.String? - let cidrAuthorizationContext: EC2ClientTypes.CidrAuthorizationContext? - let publiclyAdvertisable: Swift.Bool? - let description: Swift.String? - let dryRun: Swift.Bool? - let poolTagSpecifications: [EC2ClientTypes.TagSpecification]? - let multiRegion: Swift.Bool? - let networkBorderGroup: Swift.String? -} - -extension ProvisionByoipCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case cidrAuthorizationContext = "CidrAuthorizationContext" - case description = "Description" - case dryRun = "DryRun" - case multiRegion = "MultiRegion" - case networkBorderGroup = "NetworkBorderGroup" - case poolTagSpecifications = "PoolTagSpecification" - case publiclyAdvertisable = "PubliclyAdvertisable" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let cidrAuthorizationContextDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CidrAuthorizationContext.self, forKey: .cidrAuthorizationContext) - cidrAuthorizationContext = cidrAuthorizationContextDecoded - let publiclyAdvertisableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAdvertisable) - publiclyAdvertisable = publiclyAdvertisableDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.poolTagSpecifications) { - struct KeyVal0{struct item{}} - let poolTagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .poolTagSpecifications) - if let poolTagSpecificationsWrappedContainer = poolTagSpecificationsWrappedContainer { - let poolTagSpecificationsContainer = try poolTagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var poolTagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let poolTagSpecificationsContainer = poolTagSpecificationsContainer { - poolTagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in poolTagSpecificationsContainer { - poolTagSpecificationsBuffer?.append(structureContainer0) - } - } - poolTagSpecifications = poolTagSpecificationsBuffer - } else { - poolTagSpecifications = [] - } - } else { - poolTagSpecifications = nil - } - let multiRegionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiRegion) - multiRegion = multiRegionDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - } -} - -extension ProvisionByoipCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ProvisionByoipCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.byoipCidr = output.byoipCidr - } else { - self.byoipCidr = nil +extension ProvisionByoipCidrOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ProvisionByoipCidrOutput() + value.byoipCidr = try reader["byoipCidr"].readIfPresent(readingClosure: EC2ClientTypes.ByoipCidr.readingClosure) + return value } } } @@ -149667,27 +106813,18 @@ public struct ProvisionByoipCidrOutput: Swift.Equatable { } } -struct ProvisionByoipCidrOutputBody: Swift.Equatable { - let byoipCidr: EC2ClientTypes.ByoipCidr? -} - -extension ProvisionByoipCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoipCidr = "byoipCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let byoipCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ByoipCidr.self, forKey: .byoipCidr) - byoipCidr = byoipCidrDecoded - } -} +enum ProvisionByoipCidrOutputError { -enum ProvisionByoipCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -149746,42 +106883,15 @@ public struct ProvisionIpamByoasnInput: Swift.Equatable { } } -struct ProvisionIpamByoasnInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamId: Swift.String? - let asn: Swift.String? - let asnAuthorizationContext: EC2ClientTypes.AsnAuthorizationContext? -} - -extension ProvisionIpamByoasnInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asn = "Asn" - case asnAuthorizationContext = "AsnAuthorizationContext" - case dryRun = "DryRun" - case ipamId = "IpamId" - } +extension ProvisionIpamByoasnOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamId) - ipamId = ipamIdDecoded - let asnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .asn) - asn = asnDecoded - let asnAuthorizationContextDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AsnAuthorizationContext.self, forKey: .asnAuthorizationContext) - asnAuthorizationContext = asnAuthorizationContextDecoded - } -} - -extension ProvisionIpamByoasnOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ProvisionIpamByoasnOutputBody = try responseDecoder.decode(responseBody: data) - self.byoasn = output.byoasn - } else { - self.byoasn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ProvisionIpamByoasnOutput() + value.byoasn = try reader["byoasn"].readIfPresent(readingClosure: EC2ClientTypes.Byoasn.readingClosure) + return value } } } @@ -149798,27 +106908,18 @@ public struct ProvisionIpamByoasnOutput: Swift.Equatable { } } -struct ProvisionIpamByoasnOutputBody: Swift.Equatable { - let byoasn: EC2ClientTypes.Byoasn? -} - -extension ProvisionIpamByoasnOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoasn = "byoasn" - } +enum ProvisionIpamByoasnOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let byoasnDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Byoasn.self, forKey: .byoasn) - byoasn = byoasnDecoded - } -} - -enum ProvisionIpamByoasnOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -149889,50 +106990,15 @@ public struct ProvisionIpamPoolCidrInput: Swift.Equatable { } } -struct ProvisionIpamPoolCidrInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let cidr: Swift.String? - let cidrAuthorizationContext: EC2ClientTypes.IpamCidrAuthorizationContext? - let netmaskLength: Swift.Int? - let clientToken: Swift.String? -} - -extension ProvisionIpamPoolCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case cidrAuthorizationContext = "CidrAuthorizationContext" - case clientToken = "ClientToken" - case dryRun = "DryRun" - case ipamPoolId = "IpamPoolId" - case netmaskLength = "NetmaskLength" - } +extension ProvisionIpamPoolCidrOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let cidrAuthorizationContextDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamCidrAuthorizationContext.self, forKey: .cidrAuthorizationContext) - cidrAuthorizationContext = cidrAuthorizationContextDecoded - let netmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .netmaskLength) - netmaskLength = netmaskLengthDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension ProvisionIpamPoolCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ProvisionIpamPoolCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.ipamPoolCidr = output.ipamPoolCidr - } else { - self.ipamPoolCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ProvisionIpamPoolCidrOutput() + value.ipamPoolCidr = try reader["ipamPoolCidr"].readIfPresent(readingClosure: EC2ClientTypes.IpamPoolCidr.readingClosure) + return value } } } @@ -149949,27 +107015,18 @@ public struct ProvisionIpamPoolCidrOutput: Swift.Equatable { } } -struct ProvisionIpamPoolCidrOutputBody: Swift.Equatable { - let ipamPoolCidr: EC2ClientTypes.IpamPoolCidr? -} - -extension ProvisionIpamPoolCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipamPoolCidr = "ipamPoolCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipamPoolCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpamPoolCidr.self, forKey: .ipamPoolCidr) - ipamPoolCidr = ipamPoolCidrDecoded - } -} +enum ProvisionIpamPoolCidrOutputError { -enum ProvisionIpamPoolCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -150028,44 +107085,16 @@ public struct ProvisionPublicIpv4PoolCidrInput: Swift.Equatable { } } -struct ProvisionPublicIpv4PoolCidrInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let poolId: Swift.String? - let netmaskLength: Swift.Int? -} - -extension ProvisionPublicIpv4PoolCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case ipamPoolId = "IpamPoolId" - case netmaskLength = "NetmaskLength" - case poolId = "PoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - let netmaskLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .netmaskLength) - netmaskLength = netmaskLengthDecoded - } -} +extension ProvisionPublicIpv4PoolCidrOutput { -extension ProvisionPublicIpv4PoolCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ProvisionPublicIpv4PoolCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.poolAddressRange = output.poolAddressRange - self.poolId = output.poolId - } else { - self.poolAddressRange = nil - self.poolId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ProvisionPublicIpv4PoolCidrOutput() + value.poolAddressRange = try reader["poolAddressRange"].readIfPresent(readingClosure: EC2ClientTypes.PublicIpv4PoolRange.readingClosure) + value.poolId = try reader["poolId"].readIfPresent() + return value } } } @@ -150086,43 +107115,23 @@ public struct ProvisionPublicIpv4PoolCidrOutput: Swift.Equatable { } } -struct ProvisionPublicIpv4PoolCidrOutputBody: Swift.Equatable { - let poolId: Swift.String? - let poolAddressRange: EC2ClientTypes.PublicIpv4PoolRange? -} - -extension ProvisionPublicIpv4PoolCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case poolAddressRange = "poolAddressRange" - case poolId = "poolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - let poolAddressRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PublicIpv4PoolRange.self, forKey: .poolAddressRange) - poolAddressRange = poolAddressRangeDecoded - } -} +enum ProvisionPublicIpv4PoolCidrOutputError { -enum ProvisionPublicIpv4PoolCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ProvisionedBandwidth: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case provisionTime = "provisionTime" - case provisioned = "provisioned" - case requestTime = "requestTime" - case requested = "requested" - case status = "status" - } +extension EC2ClientTypes.ProvisionedBandwidth: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -150143,18 +107152,17 @@ extension EC2ClientTypes.ProvisionedBandwidth: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let provisionTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .provisionTime) - provisionTime = provisionTimeDecoded - let provisionedDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .provisioned) - provisioned = provisionedDecoded - let requestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .requestTime) - requestTime = requestTimeDecoded - let requestedDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requested) - requested = requestedDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ProvisionedBandwidth() + value.provisionTime = try reader["provisionTime"].readTimestampIfPresent(format: .dateTime) + value.provisioned = try reader["provisioned"].readIfPresent() + value.requestTime = try reader["requestTime"].readTimestampIfPresent(format: .dateTime) + value.requested = try reader["requested"].readIfPresent() + value.status = try reader["status"].readIfPresent() + return value + } } } @@ -150190,12 +107198,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PtrUpdateStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reason = "reason" - case status = "status" - case value = "value" - } +extension EC2ClientTypes.PtrUpdateStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -150210,14 +107213,15 @@ extension EC2ClientTypes.PtrUpdateStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let reasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reason) - reason = reasonDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PtrUpdateStatus() + value.value = try reader["value"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.reason = try reader["reason"].readIfPresent() + return value + } } } @@ -150245,16 +107249,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PublicIpv4Pool: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case networkBorderGroup = "networkBorderGroup" - case poolAddressRanges = "poolAddressRangeSet" - case poolId = "poolId" - case tags = "tagSet" - case totalAddressCount = "totalAddressCount" - case totalAvailableAddressCount = "totalAvailableAddressCount" - } +extension EC2ClientTypes.PublicIpv4Pool: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -150299,55 +107294,18 @@ extension EC2ClientTypes.PublicIpv4Pool: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let poolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .poolId) - poolId = poolIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.poolAddressRanges) { - struct KeyVal0{struct item{}} - let poolAddressRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .poolAddressRanges) - if let poolAddressRangesWrappedContainer = poolAddressRangesWrappedContainer { - let poolAddressRangesContainer = try poolAddressRangesWrappedContainer.decodeIfPresent([EC2ClientTypes.PublicIpv4PoolRange].self, forKey: .member) - var poolAddressRangesBuffer:[EC2ClientTypes.PublicIpv4PoolRange]? = nil - if let poolAddressRangesContainer = poolAddressRangesContainer { - poolAddressRangesBuffer = [EC2ClientTypes.PublicIpv4PoolRange]() - for structureContainer0 in poolAddressRangesContainer { - poolAddressRangesBuffer?.append(structureContainer0) - } - } - poolAddressRanges = poolAddressRangesBuffer - } else { - poolAddressRanges = [] - } - } else { - poolAddressRanges = nil - } - let totalAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalAddressCount) - totalAddressCount = totalAddressCountDecoded - let totalAvailableAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalAvailableAddressCount) - totalAvailableAddressCount = totalAvailableAddressCountDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PublicIpv4Pool() + value.poolId = try reader["poolId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.poolAddressRanges = try reader["poolAddressRangeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PublicIpv4PoolRange.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.totalAddressCount = try reader["totalAddressCount"].readIfPresent() + value.totalAvailableAddressCount = try reader["totalAvailableAddressCount"].readIfPresent() + value.networkBorderGroup = try reader["networkBorderGroup"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -150392,13 +107350,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.PublicIpv4PoolRange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressCount = "addressCount" - case availableAddressCount = "availableAddressCount" - case firstAddress = "firstAddress" - case lastAddress = "lastAddress" - } +extension EC2ClientTypes.PublicIpv4PoolRange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -150416,16 +107368,16 @@ extension EC2ClientTypes.PublicIpv4PoolRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let firstAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .firstAddress) - firstAddress = firstAddressDecoded - let lastAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastAddress) - lastAddress = lastAddressDecoded - let addressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .addressCount) - addressCount = addressCountDecoded - let availableAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .availableAddressCount) - availableAddressCount = availableAddressCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PublicIpv4PoolRange() + value.firstAddress = try reader["firstAddress"].readIfPresent() + value.lastAddress = try reader["lastAddress"].readIfPresent() + value.addressCount = try reader["addressCount"].readIfPresent() + value.availableAddressCount = try reader["availableAddressCount"].readIfPresent() + return value + } } } @@ -150457,17 +107409,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Purchase: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currencyCode = "currencyCode" - case duration = "duration" - case hostIdSet = "hostIdSet" - case hostReservationId = "hostReservationId" - case hourlyPrice = "hourlyPrice" - case instanceFamily = "instanceFamily" - case paymentOption = "paymentOption" - case upfrontPrice = "upfrontPrice" - } +extension EC2ClientTypes.Purchase: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -150506,41 +107448,20 @@ extension EC2ClientTypes.Purchase: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - if containerValues.contains(.hostIdSet) { - struct KeyVal0{struct item{}} - let hostIdSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostIdSet) - if let hostIdSetWrappedContainer = hostIdSetWrappedContainer { - let hostIdSetContainer = try hostIdSetWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostIdSetBuffer:[Swift.String]? = nil - if let hostIdSetContainer = hostIdSetContainer { - hostIdSetBuffer = [Swift.String]() - for stringContainer0 in hostIdSetContainer { - hostIdSetBuffer?.append(stringContainer0) - } - } - hostIdSet = hostIdSetBuffer - } else { - hostIdSet = [] - } - } else { - hostIdSet = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Purchase() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.duration = try reader["duration"].readIfPresent() + value.hostIdSet = try reader["hostIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.hostReservationId = try reader["hostReservationId"].readIfPresent() + value.hourlyPrice = try reader["hourlyPrice"].readIfPresent() + value.instanceFamily = try reader["instanceFamily"].readIfPresent() + value.paymentOption = try reader["paymentOption"].readIfPresent() + value.upfrontPrice = try reader["upfrontPrice"].readIfPresent() + return value } - let hostReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostReservationId) - hostReservationId = hostReservationIdDecoded - let hourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hourlyPrice) - hourlyPrice = hourlyPriceDecoded - let instanceFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceFamily) - instanceFamily = instanceFamilyDecoded - let paymentOptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PaymentOption.self, forKey: .paymentOption) - paymentOption = paymentOptionDecoded - let upfrontPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .upfrontPrice) - upfrontPrice = upfrontPriceDecoded } } @@ -150650,59 +107571,15 @@ public struct PurchaseCapacityBlockInput: Swift.Equatable { } } -struct PurchaseCapacityBlockInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let capacityBlockOfferingId: Swift.String? - let instancePlatform: EC2ClientTypes.CapacityReservationInstancePlatform? -} +extension PurchaseCapacityBlockOutput { -extension PurchaseCapacityBlockInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityBlockOfferingId = "CapacityBlockOfferingId" - case dryRun = "DryRun" - case instancePlatform = "InstancePlatform" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let capacityBlockOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .capacityBlockOfferingId) - capacityBlockOfferingId = capacityBlockOfferingIdDecoded - let instancePlatformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationInstancePlatform.self, forKey: .instancePlatform) - instancePlatform = instancePlatformDecoded - } -} - -extension PurchaseCapacityBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PurchaseCapacityBlockOutputBody = try responseDecoder.decode(responseBody: data) - self.capacityReservation = output.capacityReservation - } else { - self.capacityReservation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = PurchaseCapacityBlockOutput() + value.capacityReservation = try reader["capacityReservation"].readIfPresent(readingClosure: EC2ClientTypes.CapacityReservation.readingClosure) + return value } } } @@ -150719,27 +107596,18 @@ public struct PurchaseCapacityBlockOutput: Swift.Equatable { } } -struct PurchaseCapacityBlockOutputBody: Swift.Equatable { - let capacityReservation: EC2ClientTypes.CapacityReservation? -} - -extension PurchaseCapacityBlockOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityReservation = "capacityReservation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityReservationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservation.self, forKey: .capacityReservation) - capacityReservation = capacityReservationDecoded - } -} +enum PurchaseCapacityBlockOutputError { -enum PurchaseCapacityBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -150829,92 +107697,19 @@ public struct PurchaseHostReservationInput: Swift.Equatable { } } -struct PurchaseHostReservationInputBody: Swift.Equatable { - let clientToken: Swift.String? - let currencyCode: EC2ClientTypes.CurrencyCodeValues? - let hostIdSet: [Swift.String]? - let limitPrice: Swift.String? - let offeringId: Swift.String? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? -} - -extension PurchaseHostReservationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case currencyCode = "CurrencyCode" - case hostIdSet = "HostIdSet" - case limitPrice = "LimitPrice" - case offeringId = "OfferingId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - if containerValues.contains(.hostIdSet) { - struct KeyVal0{struct item{}} - let hostIdSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostIdSet) - if let hostIdSetWrappedContainer = hostIdSetWrappedContainer { - let hostIdSetContainer = try hostIdSetWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostIdSetBuffer:[Swift.String]? = nil - if let hostIdSetContainer = hostIdSetContainer { - hostIdSetBuffer = [Swift.String]() - for stringContainer0 in hostIdSetContainer { - hostIdSetBuffer?.append(stringContainer0) - } - } - hostIdSet = hostIdSetBuffer - } else { - hostIdSet = [] - } - } else { - hostIdSet = nil - } - let limitPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .limitPrice) - limitPrice = limitPriceDecoded - let offeringIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringId) - offeringId = offeringIdDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - } -} - -extension PurchaseHostReservationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PurchaseHostReservationOutputBody = try responseDecoder.decode(responseBody: data) - self.clientToken = output.clientToken - self.currencyCode = output.currencyCode - self.purchase = output.purchase - self.totalHourlyPrice = output.totalHourlyPrice - self.totalUpfrontPrice = output.totalUpfrontPrice - } else { - self.clientToken = nil - self.currencyCode = nil - self.purchase = nil - self.totalHourlyPrice = nil - self.totalUpfrontPrice = nil +extension PurchaseHostReservationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = PurchaseHostReservationOutput() + value.clientToken = try reader["clientToken"].readIfPresent() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.purchase = try reader["purchase"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Purchase.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.totalHourlyPrice = try reader["totalHourlyPrice"].readIfPresent() + value.totalUpfrontPrice = try reader["totalUpfrontPrice"].readIfPresent() + return value } } } @@ -150947,69 +107742,23 @@ public struct PurchaseHostReservationOutput: Swift.Equatable { } } -struct PurchaseHostReservationOutputBody: Swift.Equatable { - let clientToken: Swift.String? - let currencyCode: EC2ClientTypes.CurrencyCodeValues? - let purchase: [EC2ClientTypes.Purchase]? - let totalHourlyPrice: Swift.String? - let totalUpfrontPrice: Swift.String? -} - -extension PurchaseHostReservationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case currencyCode = "currencyCode" - case purchase = "purchase" - case totalHourlyPrice = "totalHourlyPrice" - case totalUpfrontPrice = "totalUpfrontPrice" - } +enum PurchaseHostReservationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - if containerValues.contains(.purchase) { - struct KeyVal0{struct item{}} - let purchaseWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .purchase) - if let purchaseWrappedContainer = purchaseWrappedContainer { - let purchaseContainer = try purchaseWrappedContainer.decodeIfPresent([EC2ClientTypes.Purchase].self, forKey: .member) - var purchaseBuffer:[EC2ClientTypes.Purchase]? = nil - if let purchaseContainer = purchaseContainer { - purchaseBuffer = [EC2ClientTypes.Purchase]() - for structureContainer0 in purchaseContainer { - purchaseBuffer?.append(structureContainer0) - } - } - purchase = purchaseBuffer - } else { - purchase = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - purchase = nil } - let totalHourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .totalHourlyPrice) - totalHourlyPrice = totalHourlyPriceDecoded - let totalUpfrontPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .totalUpfrontPrice) - totalUpfrontPrice = totalUpfrontPriceDecoded } } -enum PurchaseHostReservationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.PurchaseRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceCount = "InstanceCount" - case purchaseToken = "PurchaseToken" - } +extension EC2ClientTypes.PurchaseRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -151021,12 +107770,14 @@ extension EC2ClientTypes.PurchaseRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let purchaseTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .purchaseToken) - purchaseToken = purchaseTokenDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.PurchaseRequest() + value.instanceCount = try reader["InstanceCount"].readIfPresent() + value.purchaseToken = try reader["PurchaseToken"].readIfPresent() + return value + } } } @@ -151113,46 +107864,15 @@ public struct PurchaseReservedInstancesOfferingInput: Swift.Equatable { } } -struct PurchaseReservedInstancesOfferingInputBody: Swift.Equatable { - let instanceCount: Swift.Int? - let reservedInstancesOfferingId: Swift.String? - let dryRun: Swift.Bool? - let limitPrice: EC2ClientTypes.ReservedInstanceLimitPrice? - let purchaseTime: ClientRuntime.Date? -} - -extension PurchaseReservedInstancesOfferingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceCount = "InstanceCount" - case limitPrice = "limitPrice" - case purchaseTime = "PurchaseTime" - case reservedInstancesOfferingId = "ReservedInstancesOfferingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let reservedInstancesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesOfferingId) - reservedInstancesOfferingId = reservedInstancesOfferingIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let limitPriceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReservedInstanceLimitPrice.self, forKey: .limitPrice) - limitPrice = limitPriceDecoded - let purchaseTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .purchaseTime) - purchaseTime = purchaseTimeDecoded - } -} +extension PurchaseReservedInstancesOfferingOutput { -extension PurchaseReservedInstancesOfferingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PurchaseReservedInstancesOfferingOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedInstancesId = output.reservedInstancesId - } else { - self.reservedInstancesId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = PurchaseReservedInstancesOfferingOutput() + value.reservedInstancesId = try reader["reservedInstancesId"].readIfPresent() + return value } } } @@ -151170,27 +107890,18 @@ public struct PurchaseReservedInstancesOfferingOutput: Swift.Equatable { } } -struct PurchaseReservedInstancesOfferingOutputBody: Swift.Equatable { - let reservedInstancesId: Swift.String? -} +enum PurchaseReservedInstancesOfferingOutputError { -extension PurchaseReservedInstancesOfferingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesId = "reservedInstancesId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded - } -} - -enum PurchaseReservedInstancesOfferingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -151250,55 +107961,15 @@ public struct PurchaseScheduledInstancesInput: Swift.Equatable { } } -struct PurchaseScheduledInstancesInputBody: Swift.Equatable { - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let purchaseRequests: [EC2ClientTypes.PurchaseRequest]? -} - -extension PurchaseScheduledInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case purchaseRequests = "PurchaseRequest" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.purchaseRequests) { - struct KeyVal0{struct PurchaseRequest{}} - let purchaseRequestsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .purchaseRequests) - if let purchaseRequestsWrappedContainer = purchaseRequestsWrappedContainer { - let purchaseRequestsContainer = try purchaseRequestsWrappedContainer.decodeIfPresent([EC2ClientTypes.PurchaseRequest].self, forKey: .member) - var purchaseRequestsBuffer:[EC2ClientTypes.PurchaseRequest]? = nil - if let purchaseRequestsContainer = purchaseRequestsContainer { - purchaseRequestsBuffer = [EC2ClientTypes.PurchaseRequest]() - for structureContainer0 in purchaseRequestsContainer { - purchaseRequestsBuffer?.append(structureContainer0) - } - } - purchaseRequests = purchaseRequestsBuffer - } else { - purchaseRequests = [] - } - } else { - purchaseRequests = nil - } - } -} +extension PurchaseScheduledInstancesOutput { -extension PurchaseScheduledInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PurchaseScheduledInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.scheduledInstanceSet = output.scheduledInstanceSet - } else { - self.scheduledInstanceSet = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = PurchaseScheduledInstancesOutput() + value.scheduledInstanceSet = try reader["scheduledInstanceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ScheduledInstance.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -151316,44 +107987,18 @@ public struct PurchaseScheduledInstancesOutput: Swift.Equatable { } } -struct PurchaseScheduledInstancesOutputBody: Swift.Equatable { - let scheduledInstanceSet: [EC2ClientTypes.ScheduledInstance]? -} - -extension PurchaseScheduledInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case scheduledInstanceSet = "scheduledInstanceSet" - } +enum PurchaseScheduledInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.scheduledInstanceSet) { - struct KeyVal0{struct item{}} - let scheduledInstanceSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledInstanceSet) - if let scheduledInstanceSetWrappedContainer = scheduledInstanceSetWrappedContainer { - let scheduledInstanceSetContainer = try scheduledInstanceSetWrappedContainer.decodeIfPresent([EC2ClientTypes.ScheduledInstance].self, forKey: .member) - var scheduledInstanceSetBuffer:[EC2ClientTypes.ScheduledInstance]? = nil - if let scheduledInstanceSetContainer = scheduledInstanceSetContainer { - scheduledInstanceSetBuffer = [EC2ClientTypes.ScheduledInstance]() - for structureContainer0 in scheduledInstanceSetContainer { - scheduledInstanceSetBuffer?.append(structureContainer0) - } - } - scheduledInstanceSet = scheduledInstanceSetBuffer - } else { - scheduledInstanceSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - scheduledInstanceSet = nil - } - } -} - -enum PurchaseScheduledInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -151443,45 +108088,12 @@ public struct RebootInstancesInput: Swift.Equatable { } } -struct RebootInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let dryRun: Swift.Bool? -} +extension RebootInstancesOutput { -extension RebootInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceIds = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RebootInstancesOutput() } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension RebootInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -151490,20 +108102,23 @@ public struct RebootInstancesOutput: Swift.Equatable { public init() { } } -enum RebootInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum RebootInstancesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.RecurringCharge: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amount = "amount" - case frequency = "frequency" - } +extension EC2ClientTypes.RecurringCharge: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -151515,12 +108130,14 @@ extension EC2ClientTypes.RecurringCharge: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let amountDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .amount) - amount = amountDecoded - let frequencyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RecurringChargeFrequency.self, forKey: .frequency) - frequency = frequencyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RecurringCharge() + value.amount = try reader["amount"].readIfPresent() + value.frequency = try reader["frequency"].readIfPresent() + return value + } } } @@ -151573,14 +108190,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ReferencedSecurityGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupId = "groupId" - case peeringStatus = "peeringStatus" - case userId = "userId" - case vpcId = "vpcId" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } +extension EC2ClientTypes.ReferencedSecurityGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -151601,18 +108211,17 @@ extension EC2ClientTypes.ReferencedSecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let peeringStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peeringStatus) - peeringStatus = peeringStatusDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReferencedSecurityGroup() + value.groupId = try reader["groupId"].readIfPresent() + value.peeringStatus = try reader["peeringStatus"].readIfPresent() + value.userId = try reader["userId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.vpcPeeringConnectionId = try reader["vpcPeeringConnectionId"].readIfPresent() + return value + } } } @@ -151648,12 +108257,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Region: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpoint = "regionEndpoint" - case optInStatus = "optInStatus" - case regionName = "regionName" - } +extension EC2ClientTypes.Region: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -151668,14 +108272,15 @@ extension EC2ClientTypes.Region: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let regionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .regionName) - regionName = regionNameDecoded - let optInStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optInStatus) - optInStatus = optInStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Region() + value.endpoint = try reader["regionEndpoint"].readIfPresent() + value.regionName = try reader["regionName"].readIfPresent() + value.optInStatus = try reader["optInStatus"].readIfPresent() + return value + } } } @@ -151865,128 +108470,15 @@ public struct RegisterImageInput: Swift.Equatable { } } -struct RegisterImageInputBody: Swift.Equatable { - let imageLocation: Swift.String? - let architecture: EC2ClientTypes.ArchitectureValues? - let blockDeviceMappings: [EC2ClientTypes.BlockDeviceMapping]? - let description: Swift.String? - let dryRun: Swift.Bool? - let enaSupport: Swift.Bool? - let kernelId: Swift.String? - let name: Swift.String? - let billingProducts: [Swift.String]? - let ramdiskId: Swift.String? - let rootDeviceName: Swift.String? - let sriovNetSupport: Swift.String? - let virtualizationType: Swift.String? - let bootMode: EC2ClientTypes.BootModeValues? - let tpmSupport: EC2ClientTypes.TpmSupportValues? - let uefiData: Swift.String? - let imdsSupport: EC2ClientTypes.ImdsSupportValues? -} - -extension RegisterImageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case architecture = "architecture" - case billingProducts = "BillingProduct" - case blockDeviceMappings = "BlockDeviceMapping" - case bootMode = "BootMode" - case description = "description" - case dryRun = "dryRun" - case enaSupport = "enaSupport" - case imageLocation = "ImageLocation" - case imdsSupport = "ImdsSupport" - case kernelId = "kernelId" - case name = "name" - case ramdiskId = "ramdiskId" - case rootDeviceName = "rootDeviceName" - case sriovNetSupport = "sriovNetSupport" - case tpmSupport = "TpmSupport" - case uefiData = "UefiData" - case virtualizationType = "virtualizationType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageLocationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageLocation) - imageLocation = imageLocationDecoded - let architectureDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ArchitectureValues.self, forKey: .architecture) - architecture = architectureDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct BlockDeviceMapping{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let enaSupportDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enaSupport) - enaSupport = enaSupportDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.billingProducts) { - struct KeyVal0{struct item{}} - let billingProductsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .billingProducts) - if let billingProductsWrappedContainer = billingProductsWrappedContainer { - let billingProductsContainer = try billingProductsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var billingProductsBuffer:[Swift.String]? = nil - if let billingProductsContainer = billingProductsContainer { - billingProductsBuffer = [Swift.String]() - for stringContainer0 in billingProductsContainer { - billingProductsBuffer?.append(stringContainer0) - } - } - billingProducts = billingProductsBuffer - } else { - billingProducts = [] - } - } else { - billingProducts = nil - } - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - let rootDeviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rootDeviceName) - rootDeviceName = rootDeviceNameDecoded - let sriovNetSupportDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sriovNetSupport) - sriovNetSupport = sriovNetSupportDecoded - let virtualizationTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualizationType) - virtualizationType = virtualizationTypeDecoded - let bootModeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BootModeValues.self, forKey: .bootMode) - bootMode = bootModeDecoded - let tpmSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TpmSupportValues.self, forKey: .tpmSupport) - tpmSupport = tpmSupportDecoded - let uefiDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uefiData) - uefiData = uefiDataDecoded - let imdsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ImdsSupportValues.self, forKey: .imdsSupport) - imdsSupport = imdsSupportDecoded - } -} - -extension RegisterImageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RegisterImageOutputBody = try responseDecoder.decode(responseBody: data) - self.imageId = output.imageId - } else { - self.imageId = nil +extension RegisterImageOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RegisterImageOutput() + value.imageId = try reader["imageId"].readIfPresent() + return value } } } @@ -152004,27 +108496,18 @@ public struct RegisterImageOutput: Swift.Equatable { } } -struct RegisterImageOutputBody: Swift.Equatable { - let imageId: Swift.String? -} - -extension RegisterImageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case imageId = "imageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - } -} +enum RegisterImageOutputError { -enum RegisterImageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -152067,34 +108550,15 @@ public struct RegisterInstanceEventNotificationAttributesInput: Swift.Equatable } } -struct RegisterInstanceEventNotificationAttributesInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let instanceTagAttribute: EC2ClientTypes.RegisterInstanceTagAttributeRequest? -} +extension RegisterInstanceEventNotificationAttributesOutput { -extension RegisterInstanceEventNotificationAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceTagAttribute = "InstanceTagAttribute" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceTagAttributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RegisterInstanceTagAttributeRequest.self, forKey: .instanceTagAttribute) - instanceTagAttribute = instanceTagAttributeDecoded - } -} - -extension RegisterInstanceEventNotificationAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RegisterInstanceEventNotificationAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceTagAttribute = output.instanceTagAttribute - } else { - self.instanceTagAttribute = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RegisterInstanceEventNotificationAttributesOutput() + value.instanceTagAttribute = try reader["instanceTagAttribute"].readIfPresent(readingClosure: EC2ClientTypes.InstanceTagNotificationAttribute.readingClosure) + return value } } } @@ -152111,36 +108575,23 @@ public struct RegisterInstanceEventNotificationAttributesOutput: Swift.Equatable } } -struct RegisterInstanceEventNotificationAttributesOutputBody: Swift.Equatable { - let instanceTagAttribute: EC2ClientTypes.InstanceTagNotificationAttribute? -} +enum RegisterInstanceEventNotificationAttributesOutputError { -extension RegisterInstanceEventNotificationAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceTagAttribute = "instanceTagAttribute" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTagAttributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceTagNotificationAttribute.self, forKey: .instanceTagAttribute) - instanceTagAttribute = instanceTagAttributeDecoded - } -} - -enum RegisterInstanceEventNotificationAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.RegisterInstanceTagAttributeRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case includeAllTagsOfInstance = "IncludeAllTagsOfInstance" - case instanceTagKeys = "InstanceTagKey" - } +extension EC2ClientTypes.RegisterInstanceTagAttributeRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -152161,28 +108612,13 @@ extension EC2ClientTypes.RegisterInstanceTagAttributeRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let includeAllTagsOfInstanceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeAllTagsOfInstance) - includeAllTagsOfInstance = includeAllTagsOfInstanceDecoded - if containerValues.contains(.instanceTagKeys) { - struct KeyVal0{struct item{}} - let instanceTagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceTagKeys) - if let instanceTagKeysWrappedContainer = instanceTagKeysWrappedContainer { - let instanceTagKeysContainer = try instanceTagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceTagKeysBuffer:[Swift.String]? = nil - if let instanceTagKeysContainer = instanceTagKeysContainer { - instanceTagKeysBuffer = [Swift.String]() - for stringContainer0 in instanceTagKeysContainer { - instanceTagKeysBuffer?.append(stringContainer0) - } - } - instanceTagKeys = instanceTagKeysBuffer - } else { - instanceTagKeys = [] - } - } else { - instanceTagKeys = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RegisterInstanceTagAttributeRequest() + value.includeAllTagsOfInstance = try reader["IncludeAllTagsOfInstance"].readIfPresent() + value.instanceTagKeys = try reader["InstanceTagKey"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -152269,59 +108705,15 @@ public struct RegisterTransitGatewayMulticastGroupMembersInput: Swift.Equatable } } -struct RegisterTransitGatewayMulticastGroupMembersInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let groupIpAddress: Swift.String? - let networkInterfaceIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension RegisterTransitGatewayMulticastGroupMembersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupIpAddress = "GroupIpAddress" - case networkInterfaceIds = "NetworkInterfaceIds" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } +extension RegisterTransitGatewayMulticastGroupMembersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded - if containerValues.contains(.networkInterfaceIds) { - struct KeyVal0{struct item{}} - let networkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaceIds) - if let networkInterfaceIdsWrappedContainer = networkInterfaceIdsWrappedContainer { - let networkInterfaceIdsContainer = try networkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInterfaceIdsBuffer:[Swift.String]? = nil - if let networkInterfaceIdsContainer = networkInterfaceIdsContainer { - networkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in networkInterfaceIdsContainer { - networkInterfaceIdsBuffer?.append(stringContainer0) - } - } - networkInterfaceIds = networkInterfaceIdsBuffer - } else { - networkInterfaceIds = [] - } - } else { - networkInterfaceIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension RegisterTransitGatewayMulticastGroupMembersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RegisterTransitGatewayMulticastGroupMembersOutputBody = try responseDecoder.decode(responseBody: data) - self.registeredMulticastGroupMembers = output.registeredMulticastGroupMembers - } else { - self.registeredMulticastGroupMembers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RegisterTransitGatewayMulticastGroupMembersOutput() + value.registeredMulticastGroupMembers = try reader["registeredMulticastGroupMembers"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastRegisteredGroupMembers.readingClosure) + return value } } } @@ -152338,27 +108730,18 @@ public struct RegisterTransitGatewayMulticastGroupMembersOutput: Swift.Equatable } } -struct RegisterTransitGatewayMulticastGroupMembersOutputBody: Swift.Equatable { - let registeredMulticastGroupMembers: EC2ClientTypes.TransitGatewayMulticastRegisteredGroupMembers? -} - -extension RegisterTransitGatewayMulticastGroupMembersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case registeredMulticastGroupMembers = "registeredMulticastGroupMembers" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let registeredMulticastGroupMembersDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastRegisteredGroupMembers.self, forKey: .registeredMulticastGroupMembers) - registeredMulticastGroupMembers = registeredMulticastGroupMembersDecoded - } -} +enum RegisterTransitGatewayMulticastGroupMembersOutputError { -enum RegisterTransitGatewayMulticastGroupMembersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -152425,59 +108808,15 @@ public struct RegisterTransitGatewayMulticastGroupSourcesInput: Swift.Equatable } } -struct RegisterTransitGatewayMulticastGroupSourcesInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let groupIpAddress: Swift.String? - let networkInterfaceIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension RegisterTransitGatewayMulticastGroupSourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupIpAddress = "GroupIpAddress" - case networkInterfaceIds = "NetworkInterfaceIds" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } +extension RegisterTransitGatewayMulticastGroupSourcesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded - if containerValues.contains(.networkInterfaceIds) { - struct KeyVal0{struct item{}} - let networkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaceIds) - if let networkInterfaceIdsWrappedContainer = networkInterfaceIdsWrappedContainer { - let networkInterfaceIdsContainer = try networkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInterfaceIdsBuffer:[Swift.String]? = nil - if let networkInterfaceIdsContainer = networkInterfaceIdsContainer { - networkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in networkInterfaceIdsContainer { - networkInterfaceIdsBuffer?.append(stringContainer0) - } - } - networkInterfaceIds = networkInterfaceIdsBuffer - } else { - networkInterfaceIds = [] - } - } else { - networkInterfaceIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension RegisterTransitGatewayMulticastGroupSourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RegisterTransitGatewayMulticastGroupSourcesOutputBody = try responseDecoder.decode(responseBody: data) - self.registeredMulticastGroupSources = output.registeredMulticastGroupSources - } else { - self.registeredMulticastGroupSources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RegisterTransitGatewayMulticastGroupSourcesOutput() + value.registeredMulticastGroupSources = try reader["registeredMulticastGroupSources"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastRegisteredGroupSources.readingClosure) + return value } } } @@ -152494,27 +108833,18 @@ public struct RegisterTransitGatewayMulticastGroupSourcesOutput: Swift.Equatable } } -struct RegisterTransitGatewayMulticastGroupSourcesOutputBody: Swift.Equatable { - let registeredMulticastGroupSources: EC2ClientTypes.TransitGatewayMulticastRegisteredGroupSources? -} - -extension RegisterTransitGatewayMulticastGroupSourcesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case registeredMulticastGroupSources = "registeredMulticastGroupSources" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let registeredMulticastGroupSourcesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastRegisteredGroupSources.self, forKey: .registeredMulticastGroupSources) - registeredMulticastGroupSources = registeredMulticastGroupSourcesDecoded - } -} +enum RegisterTransitGatewayMulticastGroupSourcesOutputError { -enum RegisterTransitGatewayMulticastGroupSourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -152579,59 +108909,15 @@ public struct RejectTransitGatewayMulticastDomainAssociationsInput: Swift.Equata } } -struct RejectTransitGatewayMulticastDomainAssociationsInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let subnetIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension RejectTransitGatewayMulticastDomainAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case subnetIds = "SubnetIds" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension RejectTransitGatewayMulticastDomainAssociationsOutput { -extension RejectTransitGatewayMulticastDomainAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RejectTransitGatewayMulticastDomainAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.associations = output.associations - } else { - self.associations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RejectTransitGatewayMulticastDomainAssociationsOutput() + value.associations = try reader["associations"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDomainAssociations.readingClosure) + return value } } } @@ -152648,27 +108934,18 @@ public struct RejectTransitGatewayMulticastDomainAssociationsOutput: Swift.Equat } } -struct RejectTransitGatewayMulticastDomainAssociationsOutputBody: Swift.Equatable { - let associations: EC2ClientTypes.TransitGatewayMulticastDomainAssociations? -} - -extension RejectTransitGatewayMulticastDomainAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "associations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDomainAssociations.self, forKey: .associations) - associations = associationsDecoded - } -} +enum RejectTransitGatewayMulticastDomainAssociationsOutputError { -enum RejectTransitGatewayMulticastDomainAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -152711,34 +108988,15 @@ public struct RejectTransitGatewayPeeringAttachmentInput: Swift.Equatable { } } -struct RejectTransitGatewayPeeringAttachmentInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension RejectTransitGatewayPeeringAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension RejectTransitGatewayPeeringAttachmentOutput { -extension RejectTransitGatewayPeeringAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RejectTransitGatewayPeeringAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayPeeringAttachment = output.transitGatewayPeeringAttachment - } else { - self.transitGatewayPeeringAttachment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RejectTransitGatewayPeeringAttachmentOutput() + value.transitGatewayPeeringAttachment = try reader["transitGatewayPeeringAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPeeringAttachment.readingClosure) + return value } } } @@ -152755,27 +109013,18 @@ public struct RejectTransitGatewayPeeringAttachmentOutput: Swift.Equatable { } } -struct RejectTransitGatewayPeeringAttachmentOutputBody: Swift.Equatable { - let transitGatewayPeeringAttachment: EC2ClientTypes.TransitGatewayPeeringAttachment? -} - -extension RejectTransitGatewayPeeringAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayPeeringAttachment = "transitGatewayPeeringAttachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPeeringAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPeeringAttachment.self, forKey: .transitGatewayPeeringAttachment) - transitGatewayPeeringAttachment = transitGatewayPeeringAttachmentDecoded - } -} +enum RejectTransitGatewayPeeringAttachmentOutputError { -enum RejectTransitGatewayPeeringAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -152818,34 +109067,15 @@ public struct RejectTransitGatewayVpcAttachmentInput: Swift.Equatable { } } -struct RejectTransitGatewayVpcAttachmentInputBody: Swift.Equatable { - let transitGatewayAttachmentId: Swift.String? - let dryRun: Swift.Bool? -} - -extension RejectTransitGatewayVpcAttachmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension RejectTransitGatewayVpcAttachmentOutput { -extension RejectTransitGatewayVpcAttachmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RejectTransitGatewayVpcAttachmentOutputBody = try responseDecoder.decode(responseBody: data) - self.transitGatewayVpcAttachment = output.transitGatewayVpcAttachment - } else { - self.transitGatewayVpcAttachment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RejectTransitGatewayVpcAttachmentOutput() + value.transitGatewayVpcAttachment = try reader["transitGatewayVpcAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayVpcAttachment.readingClosure) + return value } } } @@ -152862,27 +109092,18 @@ public struct RejectTransitGatewayVpcAttachmentOutput: Swift.Equatable { } } -struct RejectTransitGatewayVpcAttachmentOutputBody: Swift.Equatable { - let transitGatewayVpcAttachment: EC2ClientTypes.TransitGatewayVpcAttachment? -} +enum RejectTransitGatewayVpcAttachmentOutputError { -extension RejectTransitGatewayVpcAttachmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case transitGatewayVpcAttachment = "transitGatewayVpcAttachment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayVpcAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayVpcAttachment.self, forKey: .transitGatewayVpcAttachment) - transitGatewayVpcAttachment = transitGatewayVpcAttachmentDecoded - } -} - -enum RejectTransitGatewayVpcAttachmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -152942,55 +109163,15 @@ public struct RejectVpcEndpointConnectionsInput: Swift.Equatable { } } -struct RejectVpcEndpointConnectionsInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceId: Swift.String? - let vpcEndpointIds: [Swift.String]? -} - -extension RejectVpcEndpointConnectionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case serviceId = "ServiceId" - case vpcEndpointIds = "VpcEndpointId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - if containerValues.contains(.vpcEndpointIds) { - struct KeyVal0{struct item{}} - let vpcEndpointIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcEndpointIds) - if let vpcEndpointIdsWrappedContainer = vpcEndpointIdsWrappedContainer { - let vpcEndpointIdsContainer = try vpcEndpointIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcEndpointIdsBuffer:[Swift.String]? = nil - if let vpcEndpointIdsContainer = vpcEndpointIdsContainer { - vpcEndpointIdsBuffer = [Swift.String]() - for stringContainer0 in vpcEndpointIdsContainer { - vpcEndpointIdsBuffer?.append(stringContainer0) - } - } - vpcEndpointIds = vpcEndpointIdsBuffer - } else { - vpcEndpointIds = [] - } - } else { - vpcEndpointIds = nil - } - } -} +extension RejectVpcEndpointConnectionsOutput { -extension RejectVpcEndpointConnectionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RejectVpcEndpointConnectionsOutputBody = try responseDecoder.decode(responseBody: data) - self.unsuccessful = output.unsuccessful - } else { - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RejectVpcEndpointConnectionsOutput() + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -153007,44 +109188,18 @@ public struct RejectVpcEndpointConnectionsOutput: Swift.Equatable { } } -struct RejectVpcEndpointConnectionsOutputBody: Swift.Equatable { - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension RejectVpcEndpointConnectionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case unsuccessful = "unsuccessful" - } +enum RejectVpcEndpointConnectionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unsuccessful = nil - } - } -} - -enum RejectVpcEndpointConnectionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -153087,34 +109242,15 @@ public struct RejectVpcPeeringConnectionInput: Swift.Equatable { } } -struct RejectVpcPeeringConnectionInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let vpcPeeringConnectionId: Swift.String? -} +extension RejectVpcPeeringConnectionOutput { -extension RejectVpcPeeringConnectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - } -} - -extension RejectVpcPeeringConnectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RejectVpcPeeringConnectionOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RejectVpcPeeringConnectionOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -153131,27 +109267,18 @@ public struct RejectVpcPeeringConnectionOutput: Swift.Equatable { } } -struct RejectVpcPeeringConnectionOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension RejectVpcPeeringConnectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } +enum RejectVpcPeeringConnectionOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum RejectVpcPeeringConnectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -153207,36 +109334,12 @@ public struct ReleaseAddressInput: Swift.Equatable { } } -struct ReleaseAddressInputBody: Swift.Equatable { - let allocationId: Swift.String? - let publicIp: Swift.String? - let networkBorderGroup: Swift.String? - let dryRun: Swift.Bool? -} - -extension ReleaseAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "AllocationId" - case dryRun = "dryRun" - case networkBorderGroup = "NetworkBorderGroup" - case publicIp = "PublicIp" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ReleaseAddressOutput { -extension ReleaseAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ReleaseAddressOutput() + } } } @@ -153245,11 +109348,18 @@ public struct ReleaseAddressOutput: Swift.Equatable { public init() { } } -enum ReleaseAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ReleaseAddressOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -153294,49 +109404,16 @@ public struct ReleaseHostsInput: Swift.Equatable { } } -struct ReleaseHostsInputBody: Swift.Equatable { - let hostIds: [Swift.String]? -} - -extension ReleaseHostsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostIds = "hostId" - } +extension ReleaseHostsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.hostIds) { - struct KeyVal0{struct item{}} - let hostIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostIds) - if let hostIdsWrappedContainer = hostIdsWrappedContainer { - let hostIdsContainer = try hostIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var hostIdsBuffer:[Swift.String]? = nil - if let hostIdsContainer = hostIdsContainer { - hostIdsBuffer = [Swift.String]() - for stringContainer0 in hostIdsContainer { - hostIdsBuffer?.append(stringContainer0) - } - } - hostIds = hostIdsBuffer - } else { - hostIds = [] - } - } else { - hostIds = nil - } - } -} - -extension ReleaseHostsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ReleaseHostsOutputBody = try responseDecoder.decode(responseBody: data) - self.successful = output.successful - self.unsuccessful = output.unsuccessful - } else { - self.successful = nil - self.unsuccessful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ReleaseHostsOutput() + value.successful = try reader["successful"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unsuccessful = try reader["unsuccessful"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UnsuccessfulItem.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -153357,65 +109434,18 @@ public struct ReleaseHostsOutput: Swift.Equatable { } } -struct ReleaseHostsOutputBody: Swift.Equatable { - let successful: [Swift.String]? - let unsuccessful: [EC2ClientTypes.UnsuccessfulItem]? -} - -extension ReleaseHostsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case successful = "successful" - case unsuccessful = "unsuccessful" - } +enum ReleaseHostsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.successful) { - struct KeyVal0{struct item{}} - let successfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successful) - if let successfulWrappedContainer = successfulWrappedContainer { - let successfulContainer = try successfulWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var successfulBuffer:[Swift.String]? = nil - if let successfulContainer = successfulContainer { - successfulBuffer = [Swift.String]() - for stringContainer0 in successfulContainer { - successfulBuffer?.append(stringContainer0) - } - } - successful = successfulBuffer - } else { - successful = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - successful = nil - } - if containerValues.contains(.unsuccessful) { - struct KeyVal0{struct item{}} - let unsuccessfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unsuccessful) - if let unsuccessfulWrappedContainer = unsuccessfulWrappedContainer { - let unsuccessfulContainer = try unsuccessfulWrappedContainer.decodeIfPresent([EC2ClientTypes.UnsuccessfulItem].self, forKey: .member) - var unsuccessfulBuffer:[EC2ClientTypes.UnsuccessfulItem]? = nil - if let unsuccessfulContainer = unsuccessfulContainer { - unsuccessfulBuffer = [EC2ClientTypes.UnsuccessfulItem]() - for structureContainer0 in unsuccessfulContainer { - unsuccessfulBuffer?.append(structureContainer0) - } - } - unsuccessful = unsuccessfulBuffer - } else { - unsuccessful = [] - } - } else { - unsuccessful = nil - } - } -} - -enum ReleaseHostsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -153474,42 +109504,15 @@ public struct ReleaseIpamPoolAllocationInput: Swift.Equatable { } } -struct ReleaseIpamPoolAllocationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let ipamPoolId: Swift.String? - let cidr: Swift.String? - let ipamPoolAllocationId: Swift.String? -} +extension ReleaseIpamPoolAllocationOutput { -extension ReleaseIpamPoolAllocationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case dryRun = "DryRun" - case ipamPoolAllocationId = "IpamPoolAllocationId" - case ipamPoolId = "IpamPoolId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ipamPoolIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolId) - ipamPoolId = ipamPoolIdDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let ipamPoolAllocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipamPoolAllocationId) - ipamPoolAllocationId = ipamPoolAllocationIdDecoded - } -} - -extension ReleaseIpamPoolAllocationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ReleaseIpamPoolAllocationOutputBody = try responseDecoder.decode(responseBody: data) - self.success = output.success - } else { - self.success = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ReleaseIpamPoolAllocationOutput() + value.success = try reader["success"].readIfPresent() + return value } } } @@ -153526,35 +109529,23 @@ public struct ReleaseIpamPoolAllocationOutput: Swift.Equatable { } } -struct ReleaseIpamPoolAllocationOutputBody: Swift.Equatable { - let success: Swift.Bool? -} - -extension ReleaseIpamPoolAllocationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case success = "success" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let successDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .success) - success = successDecoded - } -} +enum ReleaseIpamPoolAllocationOutputError { -enum ReleaseIpamPoolAllocationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.RemoveIpamOperatingRegion: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case regionName = "RegionName" - } +extension EC2ClientTypes.RemoveIpamOperatingRegion: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -153563,10 +109554,13 @@ extension EC2ClientTypes.RemoveIpamOperatingRegion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .regionName) - regionName = regionNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RemoveIpamOperatingRegion() + value.regionName = try reader["RegionName"].readIfPresent() + return value + } } } @@ -153586,10 +109580,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.RemovePrefixListEntry: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - } +extension EC2ClientTypes.RemovePrefixListEntry: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -153598,10 +109589,13 @@ extension EC2ClientTypes.RemovePrefixListEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RemovePrefixListEntry() + value.cidr = try reader["Cidr"].readIfPresent() + return value + } } } @@ -153661,34 +109655,15 @@ public struct ReplaceIamInstanceProfileAssociationInput: Swift.Equatable { } } -struct ReplaceIamInstanceProfileAssociationInputBody: Swift.Equatable { - let iamInstanceProfile: EC2ClientTypes.IamInstanceProfileSpecification? - let associationId: Swift.String? -} - -extension ReplaceIamInstanceProfileAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "AssociationId" - case iamInstanceProfile = "IamInstanceProfile" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileSpecification.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - } -} +extension ReplaceIamInstanceProfileAssociationOutput { -extension ReplaceIamInstanceProfileAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ReplaceIamInstanceProfileAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.iamInstanceProfileAssociation = output.iamInstanceProfileAssociation - } else { - self.iamInstanceProfileAssociation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ReplaceIamInstanceProfileAssociationOutput() + value.iamInstanceProfileAssociation = try reader["iamInstanceProfileAssociation"].readIfPresent(readingClosure: EC2ClientTypes.IamInstanceProfileAssociation.readingClosure) + return value } } } @@ -153705,27 +109680,18 @@ public struct ReplaceIamInstanceProfileAssociationOutput: Swift.Equatable { } } -struct ReplaceIamInstanceProfileAssociationOutputBody: Swift.Equatable { - let iamInstanceProfileAssociation: EC2ClientTypes.IamInstanceProfileAssociation? -} - -extension ReplaceIamInstanceProfileAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamInstanceProfileAssociation = "iamInstanceProfileAssociation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let iamInstanceProfileAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileAssociation.self, forKey: .iamInstanceProfileAssociation) - iamInstanceProfileAssociation = iamInstanceProfileAssociationDecoded - } -} +enum ReplaceIamInstanceProfileAssociationOutputError { -enum ReplaceIamInstanceProfileAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -153776,38 +109742,15 @@ public struct ReplaceNetworkAclAssociationInput: Swift.Equatable { } } -struct ReplaceNetworkAclAssociationInputBody: Swift.Equatable { - let associationId: Swift.String? - let dryRun: Swift.Bool? - let networkAclId: Swift.String? -} - -extension ReplaceNetworkAclAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case dryRun = "dryRun" - case networkAclId = "networkAclId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkAclIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkAclId) - networkAclId = networkAclIdDecoded - } -} +extension ReplaceNetworkAclAssociationOutput { -extension ReplaceNetworkAclAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ReplaceNetworkAclAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.newAssociationId = output.newAssociationId - } else { - self.newAssociationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ReplaceNetworkAclAssociationOutput() + value.newAssociationId = try reader["newAssociationId"].readIfPresent() + return value } } } @@ -153824,27 +109767,18 @@ public struct ReplaceNetworkAclAssociationOutput: Swift.Equatable { } } -struct ReplaceNetworkAclAssociationOutputBody: Swift.Equatable { - let newAssociationId: Swift.String? -} - -extension ReplaceNetworkAclAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case newAssociationId = "newAssociationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let newAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newAssociationId) - newAssociationId = newAssociationIdDecoded - } -} +enum ReplaceNetworkAclAssociationOutputError { -enum ReplaceNetworkAclAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -153947,60 +109881,12 @@ public struct ReplaceNetworkAclEntryInput: Swift.Equatable { } } -struct ReplaceNetworkAclEntryInputBody: Swift.Equatable { - let cidrBlock: Swift.String? - let dryRun: Swift.Bool? - let egress: Swift.Bool? - let icmpTypeCode: EC2ClientTypes.IcmpTypeCode? - let ipv6CidrBlock: Swift.String? - let networkAclId: Swift.String? - let portRange: EC2ClientTypes.PortRange? - let `protocol`: Swift.String? - let ruleAction: EC2ClientTypes.RuleAction? - let ruleNumber: Swift.Int? -} - -extension ReplaceNetworkAclEntryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlock = "cidrBlock" - case dryRun = "dryRun" - case egress = "egress" - case icmpTypeCode = "Icmp" - case ipv6CidrBlock = "ipv6CidrBlock" - case networkAclId = "networkAclId" - case portRange = "portRange" - case `protocol` = "protocol" - case ruleAction = "ruleAction" - case ruleNumber = "ruleNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let egressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .egress) - egress = egressDecoded - let icmpTypeCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IcmpTypeCode.self, forKey: .icmpTypeCode) - icmpTypeCode = icmpTypeCodeDecoded - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let networkAclIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkAclId) - networkAclId = networkAclIdDecoded - let portRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PortRange.self, forKey: .portRange) - portRange = portRangeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let ruleActionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RuleAction.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let ruleNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ruleNumber) - ruleNumber = ruleNumberDecoded - } -} - -extension ReplaceNetworkAclEntryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ReplaceNetworkAclEntryOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ReplaceNetworkAclEntryOutput() + } } } @@ -154009,27 +109895,23 @@ public struct ReplaceNetworkAclEntryOutput: Swift.Equatable { public init() { } } -enum ReplaceNetworkAclEntryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ReplaceNetworkAclEntryOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ReplaceRootVolumeTask: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case completeTime = "completeTime" - case deleteReplacedRootVolume = "deleteReplacedRootVolume" - case imageId = "imageId" - case instanceId = "instanceId" - case replaceRootVolumeTaskId = "replaceRootVolumeTaskId" - case snapshotId = "snapshotId" - case startTime = "startTime" - case tags = "tagSet" - case taskState = "taskState" - } +extension EC2ClientTypes.ReplaceRootVolumeTask: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -154071,43 +109953,21 @@ extension EC2ClientTypes.ReplaceRootVolumeTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replaceRootVolumeTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replaceRootVolumeTaskId) - replaceRootVolumeTaskId = replaceRootVolumeTaskIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let taskStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReplaceRootVolumeTaskState.self, forKey: .taskState) - taskState = taskStateDecoded - let startTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .startTime) - startTime = startTimeDecoded - let completeTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .completeTime) - completeTime = completeTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let deleteReplacedRootVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteReplacedRootVolume) - deleteReplacedRootVolume = deleteReplacedRootVolumeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReplaceRootVolumeTask() + value.replaceRootVolumeTaskId = try reader["replaceRootVolumeTaskId"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.taskState = try reader["taskState"].readIfPresent() + value.startTime = try reader["startTime"].readIfPresent() + value.completeTime = try reader["completeTime"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.imageId = try reader["imageId"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.deleteReplacedRootVolume = try reader["deleteReplacedRootVolume"].readIfPresent() + return value + } } } @@ -154360,88 +110220,12 @@ public struct ReplaceRouteInput: Swift.Equatable { } } -struct ReplaceRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let destinationIpv6CidrBlock: Swift.String? - let destinationPrefixListId: Swift.String? - let dryRun: Swift.Bool? - let vpcEndpointId: Swift.String? - let egressOnlyInternetGatewayId: Swift.String? - let gatewayId: Swift.String? - let instanceId: Swift.String? - let localTarget: Swift.Bool? - let natGatewayId: Swift.String? - let transitGatewayId: Swift.String? - let localGatewayId: Swift.String? - let carrierGatewayId: Swift.String? - let networkInterfaceId: Swift.String? - let routeTableId: Swift.String? - let vpcPeeringConnectionId: Swift.String? - let coreNetworkArn: Swift.String? -} - -extension ReplaceRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGatewayId = "CarrierGatewayId" - case coreNetworkArn = "CoreNetworkArn" - case destinationCidrBlock = "destinationCidrBlock" - case destinationIpv6CidrBlock = "destinationIpv6CidrBlock" - case destinationPrefixListId = "DestinationPrefixListId" - case dryRun = "dryRun" - case egressOnlyInternetGatewayId = "egressOnlyInternetGatewayId" - case gatewayId = "gatewayId" - case instanceId = "instanceId" - case localGatewayId = "LocalGatewayId" - case localTarget = "LocalTarget" - case natGatewayId = "natGatewayId" - case networkInterfaceId = "networkInterfaceId" - case routeTableId = "routeTableId" - case transitGatewayId = "TransitGatewayId" - case vpcEndpointId = "VpcEndpointId" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let destinationIpv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationIpv6CidrBlock) - destinationIpv6CidrBlock = destinationIpv6CidrBlockDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let vpcEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointId) - vpcEndpointId = vpcEndpointIdDecoded - let egressOnlyInternetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .egressOnlyInternetGatewayId) - egressOnlyInternetGatewayId = egressOnlyInternetGatewayIdDecoded - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let localTargetDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .localTarget) - localTarget = localTargetDecoded - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let carrierGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierGatewayId) - carrierGatewayId = carrierGatewayIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - let coreNetworkArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coreNetworkArn) - coreNetworkArn = coreNetworkArnDecoded - } -} - -extension ReplaceRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ReplaceRouteOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ReplaceRouteOutput() + } } } @@ -154450,11 +110234,18 @@ public struct ReplaceRouteOutput: Swift.Equatable { public init() { } } -enum ReplaceRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ReplaceRouteOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -154505,40 +110296,16 @@ public struct ReplaceRouteTableAssociationInput: Swift.Equatable { } } -struct ReplaceRouteTableAssociationInputBody: Swift.Equatable { - let associationId: Swift.String? - let dryRun: Swift.Bool? - let routeTableId: Swift.String? -} +extension ReplaceRouteTableAssociationOutput { -extension ReplaceRouteTableAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case dryRun = "dryRun" - case routeTableId = "routeTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - } -} - -extension ReplaceRouteTableAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ReplaceRouteTableAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.associationState = output.associationState - self.newAssociationId = output.newAssociationId - } else { - self.associationState = nil - self.newAssociationId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ReplaceRouteTableAssociationOutput() + value.associationState = try reader["associationState"].readIfPresent(readingClosure: EC2ClientTypes.RouteTableAssociationState.readingClosure) + value.newAssociationId = try reader["newAssociationId"].readIfPresent() + return value } } } @@ -154559,31 +110326,18 @@ public struct ReplaceRouteTableAssociationOutput: Swift.Equatable { } } -struct ReplaceRouteTableAssociationOutputBody: Swift.Equatable { - let newAssociationId: Swift.String? - let associationState: EC2ClientTypes.RouteTableAssociationState? -} - -extension ReplaceRouteTableAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationState = "associationState" - case newAssociationId = "newAssociationId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let newAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newAssociationId) - newAssociationId = newAssociationIdDecoded - let associationStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RouteTableAssociationState.self, forKey: .associationState) - associationState = associationStateDecoded - } -} +enum ReplaceRouteTableAssociationOutputError { -enum ReplaceRouteTableAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -154648,46 +110402,15 @@ public struct ReplaceTransitGatewayRouteInput: Swift.Equatable { } } -struct ReplaceTransitGatewayRouteInputBody: Swift.Equatable { - let destinationCidrBlock: Swift.String? - let transitGatewayRouteTableId: Swift.String? - let transitGatewayAttachmentId: Swift.String? - let blackhole: Swift.Bool? - let dryRun: Swift.Bool? -} - -extension ReplaceTransitGatewayRouteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blackhole = "Blackhole" - case destinationCidrBlock = "DestinationCidrBlock" - case dryRun = "DryRun" - case transitGatewayAttachmentId = "TransitGatewayAttachmentId" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let blackholeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blackhole) - blackhole = blackholeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ReplaceTransitGatewayRouteOutput { -extension ReplaceTransitGatewayRouteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ReplaceTransitGatewayRouteOutputBody = try responseDecoder.decode(responseBody: data) - self.route = output.route - } else { - self.route = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ReplaceTransitGatewayRouteOutput() + value.route = try reader["route"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayRoute.readingClosure) + return value } } } @@ -154704,27 +110427,18 @@ public struct ReplaceTransitGatewayRouteOutput: Swift.Equatable { } } -struct ReplaceTransitGatewayRouteOutputBody: Swift.Equatable { - let route: EC2ClientTypes.TransitGatewayRoute? -} - -extension ReplaceTransitGatewayRouteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case route = "route" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let routeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRoute.self, forKey: .route) - route = routeDecoded - } -} +enum ReplaceTransitGatewayRouteOutputError { -enum ReplaceTransitGatewayRouteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -154782,42 +110496,15 @@ public struct ReplaceVpnTunnelInput: Swift.Equatable { } } -struct ReplaceVpnTunnelInputBody: Swift.Equatable { - let vpnConnectionId: Swift.String? - let vpnTunnelOutsideIpAddress: Swift.String? - let applyPendingMaintenance: Swift.Bool? - let dryRun: Swift.Bool? -} - -extension ReplaceVpnTunnelInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyPendingMaintenance = "ApplyPendingMaintenance" - case dryRun = "DryRun" - case vpnConnectionId = "VpnConnectionId" - case vpnTunnelOutsideIpAddress = "VpnTunnelOutsideIpAddress" - } +extension ReplaceVpnTunnelOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let vpnTunnelOutsideIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnTunnelOutsideIpAddress) - vpnTunnelOutsideIpAddress = vpnTunnelOutsideIpAddressDecoded - let applyPendingMaintenanceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyPendingMaintenance) - applyPendingMaintenance = applyPendingMaintenanceDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension ReplaceVpnTunnelOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ReplaceVpnTunnelOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ReplaceVpnTunnelOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -154834,27 +110521,18 @@ public struct ReplaceVpnTunnelOutput: Swift.Equatable { } } -struct ReplaceVpnTunnelOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension ReplaceVpnTunnelOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum ReplaceVpnTunnelOutputError { -enum ReplaceVpnTunnelOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -155055,82 +110733,12 @@ public struct ReportInstanceStatusInput: Swift.Equatable { } } -struct ReportInstanceStatusInputBody: Swift.Equatable { - let description: Swift.String? - let dryRun: Swift.Bool? - let endTime: ClientRuntime.Date? - let instances: [Swift.String]? - let reasonCodes: [EC2ClientTypes.ReportInstanceReasonCodes]? - let startTime: ClientRuntime.Date? - let status: EC2ClientTypes.ReportStatusType? -} - -extension ReportInstanceStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case dryRun = "dryRun" - case endTime = "endTime" - case instances = "instanceId" - case reasonCodes = "reasonCode" - case startTime = "startTime" - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - if containerValues.contains(.instances) { - struct KeyVal0{struct InstanceId{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instancesBuffer:[Swift.String]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [Swift.String]() - for stringContainer0 in instancesContainer { - instancesBuffer?.append(stringContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - if containerValues.contains(.reasonCodes) { - struct KeyVal0{struct item{}} - let reasonCodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reasonCodes) - if let reasonCodesWrappedContainer = reasonCodesWrappedContainer { - let reasonCodesContainer = try reasonCodesWrappedContainer.decodeIfPresent([EC2ClientTypes.ReportInstanceReasonCodes].self, forKey: .member) - var reasonCodesBuffer:[EC2ClientTypes.ReportInstanceReasonCodes]? = nil - if let reasonCodesContainer = reasonCodesContainer { - reasonCodesBuffer = [EC2ClientTypes.ReportInstanceReasonCodes]() - for enumContainer0 in reasonCodesContainer { - reasonCodesBuffer?.append(enumContainer0) - } - } - reasonCodes = reasonCodesBuffer - } else { - reasonCodes = [] - } - } else { - reasonCodes = nil - } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReportStatusType.self, forKey: .status) - status = statusDecoded - } -} - -extension ReportInstanceStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ReportInstanceStatusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ReportInstanceStatusOutput() + } } } @@ -155139,11 +110747,18 @@ public struct ReportInstanceStatusOutput: Swift.Equatable { public init() { } } -enum ReportInstanceStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ReportInstanceStatusOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -155180,11 +110795,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.RequestFilterPortRange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fromPort = "FromPort" - case toPort = "ToPort" - } +extension EC2ClientTypes.RequestFilterPortRange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -155196,12 +110807,14 @@ extension EC2ClientTypes.RequestFilterPortRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RequestFilterPortRange() + value.fromPort = try reader["FromPort"].readIfPresent() + value.toPort = try reader["ToPort"].readIfPresent() + return value + } } } @@ -155225,11 +110838,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.RequestIpamResourceTag: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case value = "Value" - } +extension EC2ClientTypes.RequestIpamResourceTag: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -155241,12 +110850,14 @@ extension EC2ClientTypes.RequestIpamResourceTag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RequestIpamResourceTag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -155270,40 +110881,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.RequestLaunchTemplateData: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDeviceMappings = "BlockDeviceMapping" - case capacityReservationSpecification = "CapacityReservationSpecification" - case cpuOptions = "CpuOptions" - case creditSpecification = "CreditSpecification" - case disableApiStop = "DisableApiStop" - case disableApiTermination = "DisableApiTermination" - case ebsOptimized = "EbsOptimized" - case elasticGpuSpecifications = "ElasticGpuSpecification" - case elasticInferenceAccelerators = "ElasticInferenceAccelerator" - case enclaveOptions = "EnclaveOptions" - case hibernationOptions = "HibernationOptions" - case iamInstanceProfile = "IamInstanceProfile" - case imageId = "ImageId" - case instanceInitiatedShutdownBehavior = "InstanceInitiatedShutdownBehavior" - case instanceMarketOptions = "InstanceMarketOptions" - case instanceRequirements = "InstanceRequirements" - case instanceType = "InstanceType" - case kernelId = "KernelId" - case keyName = "KeyName" - case licenseSpecifications = "LicenseSpecification" - case maintenanceOptions = "MaintenanceOptions" - case metadataOptions = "MetadataOptions" - case monitoring = "Monitoring" - case networkInterfaces = "NetworkInterface" - case placement = "Placement" - case privateDnsNameOptions = "PrivateDnsNameOptions" - case ramDiskId = "RamDiskId" - case securityGroupIds = "SecurityGroupId" - case securityGroups = "SecurityGroup" - case tagSpecifications = "TagSpecification" - case userData = "UserData" - } +extension EC2ClientTypes.RequestLaunchTemplateData: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -155474,206 +111052,43 @@ extension EC2ClientTypes.RequestLaunchTemplateData: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecificationRequest.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct BlockDeviceMapping{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateBlockDeviceMappingRequest].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.LaunchTemplateBlockDeviceMappingRequest]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.LaunchTemplateBlockDeviceMappingRequest]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct InstanceNetworkInterfaceSpecification{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil - } - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplatesMonitoringRequest.self, forKey: .monitoring) - monitoring = monitoringDecoded - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplatePlacementRequest.self, forKey: .placement) - placement = placementDecoded - let ramDiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramDiskId) - ramDiskId = ramDiskIdDecoded - let disableApiTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableApiTermination) - disableApiTermination = disableApiTerminationDecoded - let instanceInitiatedShutdownBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ShutdownBehavior.self, forKey: .instanceInitiatedShutdownBehavior) - instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehaviorDecoded - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct LaunchTemplateTagSpecificationRequest{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateTagSpecificationRequest].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.LaunchTemplateTagSpecificationRequest]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.LaunchTemplateTagSpecificationRequest]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - if containerValues.contains(.elasticGpuSpecifications) { - struct KeyVal0{struct ElasticGpuSpecification{}} - let elasticGpuSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticGpuSpecifications) - if let elasticGpuSpecificationsWrappedContainer = elasticGpuSpecificationsWrappedContainer { - let elasticGpuSpecificationsContainer = try elasticGpuSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ElasticGpuSpecification].self, forKey: .member) - var elasticGpuSpecificationsBuffer:[EC2ClientTypes.ElasticGpuSpecification]? = nil - if let elasticGpuSpecificationsContainer = elasticGpuSpecificationsContainer { - elasticGpuSpecificationsBuffer = [EC2ClientTypes.ElasticGpuSpecification]() - for structureContainer0 in elasticGpuSpecificationsContainer { - elasticGpuSpecificationsBuffer?.append(structureContainer0) - } - } - elasticGpuSpecifications = elasticGpuSpecificationsBuffer - } else { - elasticGpuSpecifications = [] - } - } else { - elasticGpuSpecifications = nil - } - if containerValues.contains(.elasticInferenceAccelerators) { - struct KeyVal0{struct item{}} - let elasticInferenceAcceleratorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticInferenceAccelerators) - if let elasticInferenceAcceleratorsWrappedContainer = elasticInferenceAcceleratorsWrappedContainer { - let elasticInferenceAcceleratorsContainer = try elasticInferenceAcceleratorsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateElasticInferenceAccelerator].self, forKey: .member) - var elasticInferenceAcceleratorsBuffer:[EC2ClientTypes.LaunchTemplateElasticInferenceAccelerator]? = nil - if let elasticInferenceAcceleratorsContainer = elasticInferenceAcceleratorsContainer { - elasticInferenceAcceleratorsBuffer = [EC2ClientTypes.LaunchTemplateElasticInferenceAccelerator]() - for structureContainer0 in elasticInferenceAcceleratorsContainer { - elasticInferenceAcceleratorsBuffer?.append(structureContainer0) - } - } - elasticInferenceAccelerators = elasticInferenceAcceleratorsBuffer - } else { - elasticInferenceAccelerators = [] - } - } else { - elasticInferenceAccelerators = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct SecurityGroup{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let instanceMarketOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMarketOptionsRequest.self, forKey: .instanceMarketOptions) - instanceMarketOptions = instanceMarketOptionsDecoded - let creditSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreditSpecificationRequest.self, forKey: .creditSpecification) - creditSpecification = creditSpecificationDecoded - let cpuOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateCpuOptionsRequest.self, forKey: .cpuOptions) - cpuOptions = cpuOptionsDecoded - let capacityReservationSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationRequest.self, forKey: .capacityReservationSpecification) - capacityReservationSpecification = capacityReservationSpecificationDecoded - if containerValues.contains(.licenseSpecifications) { - struct KeyVal0{struct item{}} - let licenseSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .licenseSpecifications) - if let licenseSpecificationsWrappedContainer = licenseSpecificationsWrappedContainer { - let licenseSpecificationsContainer = try licenseSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateLicenseConfigurationRequest].self, forKey: .member) - var licenseSpecificationsBuffer:[EC2ClientTypes.LaunchTemplateLicenseConfigurationRequest]? = nil - if let licenseSpecificationsContainer = licenseSpecificationsContainer { - licenseSpecificationsBuffer = [EC2ClientTypes.LaunchTemplateLicenseConfigurationRequest]() - for structureContainer0 in licenseSpecificationsContainer { - licenseSpecificationsBuffer?.append(structureContainer0) - } - } - licenseSpecifications = licenseSpecificationsBuffer - } else { - licenseSpecifications = [] - } - } else { - licenseSpecifications = nil - } - let hibernationOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateHibernationOptionsRequest.self, forKey: .hibernationOptions) - hibernationOptions = hibernationOptionsDecoded - let metadataOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataOptionsRequest.self, forKey: .metadataOptions) - metadataOptions = metadataOptionsDecoded - let enclaveOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateEnclaveOptionsRequest.self, forKey: .enclaveOptions) - enclaveOptions = enclaveOptionsDecoded - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirementsRequest.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded - let privateDnsNameOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplatePrivateDnsNameOptionsRequest.self, forKey: .privateDnsNameOptions) - privateDnsNameOptions = privateDnsNameOptionsDecoded - let maintenanceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptionsRequest.self, forKey: .maintenanceOptions) - maintenanceOptions = maintenanceOptionsDecoded - let disableApiStopDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableApiStop) - disableApiStop = disableApiStopDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RequestLaunchTemplateData() + value.kernelId = try reader["KernelId"].readIfPresent() + value.ebsOptimized = try reader["EbsOptimized"].readIfPresent() + value.iamInstanceProfile = try reader["IamInstanceProfile"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecificationRequest.readingClosure) + value.blockDeviceMappings = try reader["BlockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateBlockDeviceMappingRequest.readingClosure, memberNodeInfo: "BlockDeviceMapping", isFlattened: false) + value.networkInterfaces = try reader["NetworkInterface"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest.readingClosure, memberNodeInfo: "InstanceNetworkInterfaceSpecification", isFlattened: false) + value.imageId = try reader["ImageId"].readIfPresent() + value.instanceType = try reader["InstanceType"].readIfPresent() + value.keyName = try reader["KeyName"].readIfPresent() + value.monitoring = try reader["Monitoring"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplatesMonitoringRequest.readingClosure) + value.placement = try reader["Placement"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplatePlacementRequest.readingClosure) + value.ramDiskId = try reader["RamDiskId"].readIfPresent() + value.disableApiTermination = try reader["DisableApiTermination"].readIfPresent() + value.instanceInitiatedShutdownBehavior = try reader["InstanceInitiatedShutdownBehavior"].readIfPresent() + value.userData = try reader["UserData"].readIfPresent() + value.tagSpecifications = try reader["TagSpecification"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateTagSpecificationRequest.readingClosure, memberNodeInfo: "LaunchTemplateTagSpecificationRequest", isFlattened: false) + value.elasticGpuSpecifications = try reader["ElasticGpuSpecification"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ElasticGpuSpecification.readingClosure, memberNodeInfo: "ElasticGpuSpecification", isFlattened: false) + value.elasticInferenceAccelerators = try reader["ElasticInferenceAccelerator"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateElasticInferenceAccelerator.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.securityGroupIds = try reader["SecurityGroupId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroupId", isFlattened: false) + value.securityGroups = try reader["SecurityGroup"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroup", isFlattened: false) + value.instanceMarketOptions = try reader["InstanceMarketOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateInstanceMarketOptionsRequest.readingClosure) + value.creditSpecification = try reader["CreditSpecification"].readIfPresent(readingClosure: EC2ClientTypes.CreditSpecificationRequest.readingClosure) + value.cpuOptions = try reader["CpuOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateCpuOptionsRequest.readingClosure) + value.capacityReservationSpecification = try reader["CapacityReservationSpecification"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationRequest.readingClosure) + value.licenseSpecifications = try reader["LicenseSpecification"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateLicenseConfigurationRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.hibernationOptions = try reader["HibernationOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateHibernationOptionsRequest.readingClosure) + value.metadataOptions = try reader["MetadataOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateInstanceMetadataOptionsRequest.readingClosure) + value.enclaveOptions = try reader["EnclaveOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateEnclaveOptionsRequest.readingClosure) + value.instanceRequirements = try reader["InstanceRequirements"].readIfPresent(readingClosure: EC2ClientTypes.InstanceRequirementsRequest.readingClosure) + value.privateDnsNameOptions = try reader["PrivateDnsNameOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplatePrivateDnsNameOptionsRequest.readingClosure) + value.maintenanceOptions = try reader["MaintenanceOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptionsRequest.readingClosure) + value.disableApiStop = try reader["DisableApiStop"].readIfPresent() + return value + } } } @@ -155877,34 +111292,15 @@ public struct RequestSpotFleetInput: Swift.Equatable { } } -struct RequestSpotFleetInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let spotFleetRequestConfig: EC2ClientTypes.SpotFleetRequestConfigData? -} - -extension RequestSpotFleetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case spotFleetRequestConfig = "spotFleetRequestConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let spotFleetRequestConfigDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotFleetRequestConfigData.self, forKey: .spotFleetRequestConfig) - spotFleetRequestConfig = spotFleetRequestConfigDecoded - } -} +extension RequestSpotFleetOutput { -extension RequestSpotFleetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RequestSpotFleetOutputBody = try responseDecoder.decode(responseBody: data) - self.spotFleetRequestId = output.spotFleetRequestId - } else { - self.spotFleetRequestId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RequestSpotFleetOutput() + value.spotFleetRequestId = try reader["spotFleetRequestId"].readIfPresent() + return value } } } @@ -155922,27 +111318,18 @@ public struct RequestSpotFleetOutput: Swift.Equatable { } } -struct RequestSpotFleetOutputBody: Swift.Equatable { - let spotFleetRequestId: Swift.String? -} - -extension RequestSpotFleetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case spotFleetRequestId = "spotFleetRequestId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded - } -} +enum RequestSpotFleetOutputError { -enum RequestSpotFleetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -156075,95 +111462,15 @@ public struct RequestSpotInstancesInput: Swift.Equatable { } } -struct RequestSpotInstancesInputBody: Swift.Equatable { - let availabilityZoneGroup: Swift.String? - let blockDurationMinutes: Swift.Int? - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let instanceCount: Swift.Int? - let launchGroup: Swift.String? - let launchSpecification: EC2ClientTypes.RequestSpotLaunchSpecification? - let spotPrice: Swift.String? - let type: EC2ClientTypes.SpotInstanceType? - let validFrom: ClientRuntime.Date? - let validUntil: ClientRuntime.Date? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let instanceInterruptionBehavior: EC2ClientTypes.InstanceInterruptionBehavior? -} - -extension RequestSpotInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZoneGroup = "availabilityZoneGroup" - case blockDurationMinutes = "blockDurationMinutes" - case clientToken = "clientToken" - case dryRun = "dryRun" - case instanceCount = "instanceCount" - case instanceInterruptionBehavior = "InstanceInterruptionBehavior" - case launchGroup = "launchGroup" - case launchSpecification = "LaunchSpecification" - case spotPrice = "spotPrice" - case tagSpecifications = "TagSpecification" - case type = "type" - case validFrom = "validFrom" - case validUntil = "validUntil" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneGroup) - availabilityZoneGroup = availabilityZoneGroupDecoded - let blockDurationMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .blockDurationMinutes) - blockDurationMinutes = blockDurationMinutesDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let launchGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchGroup) - launchGroup = launchGroupDecoded - let launchSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RequestSpotLaunchSpecification.self, forKey: .launchSpecification) - launchSpecification = launchSpecificationDecoded - let spotPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotPrice) - spotPrice = spotPriceDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceType.self, forKey: .type) - type = typeDecoded - let validFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validFrom) - validFrom = validFromDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let instanceInterruptionBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceInterruptionBehavior.self, forKey: .instanceInterruptionBehavior) - instanceInterruptionBehavior = instanceInterruptionBehaviorDecoded - } -} - -extension RequestSpotInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RequestSpotInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.spotInstanceRequests = output.spotInstanceRequests - } else { - self.spotInstanceRequests = nil +extension RequestSpotInstancesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RequestSpotInstancesOutput() + value.spotInstanceRequests = try reader["spotInstanceRequestSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SpotInstanceRequest.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -156181,67 +111488,23 @@ public struct RequestSpotInstancesOutput: Swift.Equatable { } } -struct RequestSpotInstancesOutputBody: Swift.Equatable { - let spotInstanceRequests: [EC2ClientTypes.SpotInstanceRequest]? -} - -extension RequestSpotInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case spotInstanceRequests = "spotInstanceRequestSet" - } +enum RequestSpotInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.spotInstanceRequests) { - struct KeyVal0{struct item{}} - let spotInstanceRequestsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .spotInstanceRequests) - if let spotInstanceRequestsWrappedContainer = spotInstanceRequestsWrappedContainer { - let spotInstanceRequestsContainer = try spotInstanceRequestsWrappedContainer.decodeIfPresent([EC2ClientTypes.SpotInstanceRequest].self, forKey: .member) - var spotInstanceRequestsBuffer:[EC2ClientTypes.SpotInstanceRequest]? = nil - if let spotInstanceRequestsContainer = spotInstanceRequestsContainer { - spotInstanceRequestsBuffer = [EC2ClientTypes.SpotInstanceRequest]() - for structureContainer0 in spotInstanceRequestsContainer { - spotInstanceRequestsBuffer?.append(structureContainer0) - } - } - spotInstanceRequests = spotInstanceRequestsBuffer - } else { - spotInstanceRequests = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - spotInstanceRequests = nil } } } -enum RequestSpotInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.RequestSpotLaunchSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressingType = "addressingType" - case blockDeviceMappings = "blockDeviceMapping" - case ebsOptimized = "ebsOptimized" - case iamInstanceProfile = "iamInstanceProfile" - case imageId = "imageId" - case instanceType = "instanceType" - case kernelId = "kernelId" - case keyName = "keyName" - case monitoring = "monitoring" - case networkInterfaces = "NetworkInterface" - case placement = "placement" - case ramdiskId = "ramdiskId" - case securityGroupIds = "SecurityGroupId" - case securityGroups = "SecurityGroup" - case subnetId = "subnetId" - case userData = "userData" - } +extension EC2ClientTypes.RequestSpotLaunchSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -156331,108 +111594,28 @@ extension EC2ClientTypes.RequestSpotLaunchSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let addressingTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressingType) - addressingType = addressingTypeDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileSpecification.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RunInstancesMonitoringEnabled.self, forKey: .monitoring) - monitoring = monitoringDecoded - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct item{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceNetworkInterfaceSpecification].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.InstanceNetworkInterfaceSpecification]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.InstanceNetworkInterfaceSpecification]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil - } - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotPlacement.self, forKey: .placement) - placement = placementDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RequestSpotLaunchSpecification() + value.securityGroupIds = try reader["SecurityGroupId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.securityGroups = try reader["SecurityGroup"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.addressingType = try reader["addressingType"].readIfPresent() + value.blockDeviceMappings = try reader["blockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.BlockDeviceMapping.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ebsOptimized = try reader["ebsOptimized"].readIfPresent() + value.iamInstanceProfile = try reader["iamInstanceProfile"].readIfPresent(readingClosure: EC2ClientTypes.IamInstanceProfileSpecification.readingClosure) + value.imageId = try reader["imageId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.kernelId = try reader["kernelId"].readIfPresent() + value.keyName = try reader["keyName"].readIfPresent() + value.monitoring = try reader["monitoring"].readIfPresent(readingClosure: EC2ClientTypes.RunInstancesMonitoringEnabled.readingClosure) + value.networkInterfaces = try reader["NetworkInterface"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceNetworkInterfaceSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.placement = try reader["placement"].readIfPresent(readingClosure: EC2ClientTypes.SpotPlacement.readingClosure) + value.ramdiskId = try reader["ramdiskId"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.userData = try reader["userData"].readIfPresent() + return value + } } } @@ -156517,14 +111700,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Reservation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groups = "groupSet" - case instances = "instancesSet" - case ownerId = "ownerId" - case requesterId = "requesterId" - case reservationId = "reservationId" - } +extension EC2ClientTypes.Reservation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -156563,52 +111739,17 @@ extension EC2ClientTypes.Reservation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.groups) { - struct KeyVal0{struct item{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var groupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Reservation() + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instances = try reader["instancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Instance.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ownerId = try reader["ownerId"].readIfPresent() + value.requesterId = try reader["requesterId"].readIfPresent() + value.reservationId = try reader["reservationId"].readIfPresent() + return value } - if containerValues.contains(.instances) { - struct KeyVal0{struct item{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([EC2ClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[EC2ClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [EC2ClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let requesterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requesterId) - requesterId = requesterIdDecoded - let reservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservationId) - reservationId = reservationIdDecoded } } @@ -156644,16 +111785,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservationFleetInstanceSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "AvailabilityZone" - case availabilityZoneId = "AvailabilityZoneId" - case ebsOptimized = "EbsOptimized" - case instancePlatform = "InstancePlatform" - case instanceType = "InstanceType" - case priority = "Priority" - case weight = "Weight" - } +extension EC2ClientTypes.ReservationFleetInstanceSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -156680,22 +111812,19 @@ extension EC2ClientTypes.ReservationFleetInstanceSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let instancePlatformDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationInstancePlatform.self, forKey: .instancePlatform) - instancePlatform = instancePlatformDecoded - let weightDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .weight) - weight = weightDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let availabilityZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneId) - availabilityZoneId = availabilityZoneIdDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) - priority = priorityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservationFleetInstanceSpecification() + value.instanceType = try reader["InstanceType"].readIfPresent() + value.instancePlatform = try reader["InstancePlatform"].readIfPresent() + value.weight = try reader["Weight"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.availabilityZoneId = try reader["AvailabilityZoneId"].readIfPresent() + value.ebsOptimized = try reader["EbsOptimized"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() + return value + } } } @@ -156777,12 +111906,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ReservationValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hourlyPrice = "hourlyPrice" - case remainingTotalValue = "remainingTotalValue" - case remainingUpfrontValue = "remainingUpfrontValue" - } +extension EC2ClientTypes.ReservationValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -156797,14 +111921,15 @@ extension EC2ClientTypes.ReservationValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hourlyPrice) - hourlyPrice = hourlyPriceDecoded - let remainingTotalValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remainingTotalValue) - remainingTotalValue = remainingTotalValueDecoded - let remainingUpfrontValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remainingUpfrontValue) - remainingUpfrontValue = remainingUpfrontValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservationValue() + value.hourlyPrice = try reader["hourlyPrice"].readIfPresent() + value.remainingTotalValue = try reader["remainingTotalValue"].readIfPresent() + value.remainingUpfrontValue = try reader["remainingUpfrontValue"].readIfPresent() + return value + } } } @@ -156832,11 +111957,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservedInstanceLimitPrice: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amount = "amount" - case currencyCode = "currencyCode" - } +extension EC2ClientTypes.ReservedInstanceLimitPrice: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -156848,12 +111969,14 @@ extension EC2ClientTypes.ReservedInstanceLimitPrice: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let amountDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .amount) - amount = amountDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstanceLimitPrice() + value.amount = try reader["amount"].readIfPresent() + value.currencyCode = try reader["currencyCode"].readIfPresent() + return value + } } } @@ -156877,11 +112000,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservedInstanceReservationValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservationValue = "reservationValue" - case reservedInstanceId = "reservedInstanceId" - } +extension EC2ClientTypes.ReservedInstanceReservationValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -156893,12 +112012,14 @@ extension EC2ClientTypes.ReservedInstanceReservationValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservationValueDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReservationValue.self, forKey: .reservationValue) - reservationValue = reservationValueDecoded - let reservedInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstanceId) - reservedInstanceId = reservedInstanceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstanceReservationValue() + value.reservationValue = try reader["reservationValue"].readIfPresent(readingClosure: EC2ClientTypes.ReservationValue.readingClosure) + value.reservedInstanceId = try reader["reservedInstanceId"].readIfPresent() + return value + } } } @@ -156966,27 +112087,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ReservedInstances: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case currencyCode = "currencyCode" - case duration = "duration" - case end = "end" - case fixedPrice = "fixedPrice" - case instanceCount = "instanceCount" - case instanceTenancy = "instanceTenancy" - case instanceType = "instanceType" - case offeringClass = "offeringClass" - case offeringType = "offeringType" - case productDescription = "productDescription" - case recurringCharges = "recurringCharges" - case reservedInstancesId = "reservedInstancesId" - case scope = "scope" - case start = "start" - case state = "state" - case tags = "tagSet" - case usagePrice = "usagePrice" - } +extension EC2ClientTypes.ReservedInstances: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -157064,77 +112165,29 @@ extension EC2ClientTypes.ReservedInstances: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let endDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .end) - end = endDecoded - let fixedPriceDecoded = try containerValues.decodeIfPresent(Swift.Float.self, forKey: .fixedPrice) - fixedPrice = fixedPriceDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RIProductDescription.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded - let startDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .start) - start = startDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReservedInstanceState.self, forKey: .state) - state = stateDecoded - let usagePriceDecoded = try containerValues.decodeIfPresent(Swift.Float.self, forKey: .usagePrice) - usagePrice = usagePriceDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let instanceTenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .instanceTenancy) - instanceTenancy = instanceTenancyDecoded - let offeringClassDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OfferingClassType.self, forKey: .offeringClass) - offeringClass = offeringClassDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OfferingTypeValues.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - if containerValues.contains(.recurringCharges) { - struct KeyVal0{struct item{}} - let recurringChargesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recurringCharges) - if let recurringChargesWrappedContainer = recurringChargesWrappedContainer { - let recurringChargesContainer = try recurringChargesWrappedContainer.decodeIfPresent([EC2ClientTypes.RecurringCharge].self, forKey: .member) - var recurringChargesBuffer:[EC2ClientTypes.RecurringCharge]? = nil - if let recurringChargesContainer = recurringChargesContainer { - recurringChargesBuffer = [EC2ClientTypes.RecurringCharge]() - for structureContainer0 in recurringChargesContainer { - recurringChargesBuffer?.append(structureContainer0) - } - } - recurringCharges = recurringChargesBuffer - } else { - recurringCharges = [] - } - } else { - recurringCharges = nil - } - let scopeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Scope.self, forKey: .scope) - scope = scopeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstances() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.duration = try reader["duration"].readIfPresent() + value.end = try reader["end"].readTimestampIfPresent(format: .dateTime) + value.fixedPrice = try reader["fixedPrice"].readIfPresent() + value.instanceCount = try reader["instanceCount"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.productDescription = try reader["productDescription"].readIfPresent() + value.reservedInstancesId = try reader["reservedInstancesId"].readIfPresent() + value.start = try reader["start"].readTimestampIfPresent(format: .dateTime) + value.state = try reader["state"].readIfPresent() + value.usagePrice = try reader["usagePrice"].readIfPresent() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.instanceTenancy = try reader["instanceTenancy"].readIfPresent() + value.offeringClass = try reader["offeringClass"].readIfPresent() + value.offeringType = try reader["offeringType"].readIfPresent() + value.recurringCharges = try reader["recurringCharges"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RecurringCharge.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.scope = try reader["scope"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -157223,14 +112276,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservedInstancesConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case instanceCount = "instanceCount" - case instanceType = "instanceType" - case platform = "platform" - case scope = "scope" - } +extension EC2ClientTypes.ReservedInstancesConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -157251,18 +112297,17 @@ extension EC2ClientTypes.ReservedInstancesConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let platformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platform) - platform = platformDecoded - let scopeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Scope.self, forKey: .scope) - scope = scopeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstancesConfiguration() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.instanceCount = try reader["instanceCount"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + value.scope = try reader["scope"].readIfPresent() + return value + } } } @@ -157298,10 +112343,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservedInstancesId: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesId = "reservedInstancesId" - } +extension EC2ClientTypes.ReservedInstancesId: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -157310,10 +112352,13 @@ extension EC2ClientTypes.ReservedInstancesId: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstancesId() + value.reservedInstancesId = try reader["reservedInstancesId"].readIfPresent() + return value + } } } @@ -157333,19 +112378,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservedInstancesListing: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case createDate = "createDate" - case instanceCounts = "instanceCounts" - case priceSchedules = "priceSchedules" - case reservedInstancesId = "reservedInstancesId" - case reservedInstancesListingId = "reservedInstancesListingId" - case status = "status" - case statusMessage = "statusMessage" - case tags = "tagSet" - case updateDate = "updateDate" - } +extension EC2ClientTypes.ReservedInstancesListing: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -157408,79 +112441,22 @@ extension EC2ClientTypes.ReservedInstancesListing: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - if containerValues.contains(.instanceCounts) { - struct KeyVal0{struct item{}} - let instanceCountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceCounts) - if let instanceCountsWrappedContainer = instanceCountsWrappedContainer { - let instanceCountsContainer = try instanceCountsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceCount].self, forKey: .member) - var instanceCountsBuffer:[EC2ClientTypes.InstanceCount]? = nil - if let instanceCountsContainer = instanceCountsContainer { - instanceCountsBuffer = [EC2ClientTypes.InstanceCount]() - for structureContainer0 in instanceCountsContainer { - instanceCountsBuffer?.append(structureContainer0) - } - } - instanceCounts = instanceCountsBuffer - } else { - instanceCounts = [] - } - } else { - instanceCounts = nil - } - if containerValues.contains(.priceSchedules) { - struct KeyVal0{struct item{}} - let priceSchedulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .priceSchedules) - if let priceSchedulesWrappedContainer = priceSchedulesWrappedContainer { - let priceSchedulesContainer = try priceSchedulesWrappedContainer.decodeIfPresent([EC2ClientTypes.PriceSchedule].self, forKey: .member) - var priceSchedulesBuffer:[EC2ClientTypes.PriceSchedule]? = nil - if let priceSchedulesContainer = priceSchedulesContainer { - priceSchedulesBuffer = [EC2ClientTypes.PriceSchedule]() - for structureContainer0 in priceSchedulesContainer { - priceSchedulesBuffer?.append(structureContainer0) - } - } - priceSchedules = priceSchedulesBuffer - } else { - priceSchedules = [] - } - } else { - priceSchedules = nil - } - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded - let reservedInstancesListingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesListingId) - reservedInstancesListingId = reservedInstancesListingIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ListingStatus.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let updateDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateDate) - updateDate = updateDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstancesListing() + value.clientToken = try reader["clientToken"].readIfPresent() + value.createDate = try reader["createDate"].readTimestampIfPresent(format: .dateTime) + value.instanceCounts = try reader["instanceCounts"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceCount.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.priceSchedules = try reader["priceSchedules"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PriceSchedule.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.reservedInstancesId = try reader["reservedInstancesId"].readIfPresent() + value.reservedInstancesListingId = try reader["reservedInstancesListingId"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.updateDate = try reader["updateDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -157536,18 +112512,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservedInstancesModification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "clientToken" - case createDate = "createDate" - case effectiveDate = "effectiveDate" - case modificationResults = "modificationResultSet" - case reservedInstancesIds = "reservedInstancesSet" - case reservedInstancesModificationId = "reservedInstancesModificationId" - case status = "status" - case statusMessage = "statusMessage" - case updateDate = "updateDate" - } +extension EC2ClientTypes.ReservedInstancesModification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -157598,60 +112563,21 @@ extension EC2ClientTypes.ReservedInstancesModification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let effectiveDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .effectiveDate) - effectiveDate = effectiveDateDecoded - if containerValues.contains(.modificationResults) { - struct KeyVal0{struct item{}} - let modificationResultsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .modificationResults) - if let modificationResultsWrappedContainer = modificationResultsWrappedContainer { - let modificationResultsContainer = try modificationResultsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstancesModificationResult].self, forKey: .member) - var modificationResultsBuffer:[EC2ClientTypes.ReservedInstancesModificationResult]? = nil - if let modificationResultsContainer = modificationResultsContainer { - modificationResultsBuffer = [EC2ClientTypes.ReservedInstancesModificationResult]() - for structureContainer0 in modificationResultsContainer { - modificationResultsBuffer?.append(structureContainer0) - } - } - modificationResults = modificationResultsBuffer - } else { - modificationResults = [] - } - } else { - modificationResults = nil - } - if containerValues.contains(.reservedInstancesIds) { - struct KeyVal0{struct item{}} - let reservedInstancesIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedInstancesIds) - if let reservedInstancesIdsWrappedContainer = reservedInstancesIdsWrappedContainer { - let reservedInstancesIdsContainer = try reservedInstancesIdsWrappedContainer.decodeIfPresent([EC2ClientTypes.ReservedInstancesId].self, forKey: .member) - var reservedInstancesIdsBuffer:[EC2ClientTypes.ReservedInstancesId]? = nil - if let reservedInstancesIdsContainer = reservedInstancesIdsContainer { - reservedInstancesIdsBuffer = [EC2ClientTypes.ReservedInstancesId]() - for structureContainer0 in reservedInstancesIdsContainer { - reservedInstancesIdsBuffer?.append(structureContainer0) - } - } - reservedInstancesIds = reservedInstancesIdsBuffer - } else { - reservedInstancesIds = [] - } - } else { - reservedInstancesIds = nil - } - let reservedInstancesModificationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesModificationId) - reservedInstancesModificationId = reservedInstancesModificationIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let updateDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateDate) - updateDate = updateDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstancesModification() + value.clientToken = try reader["clientToken"].readIfPresent() + value.createDate = try reader["createDate"].readTimestampIfPresent(format: .dateTime) + value.effectiveDate = try reader["effectiveDate"].readTimestampIfPresent(format: .dateTime) + value.modificationResults = try reader["modificationResultSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstancesModificationResult.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.reservedInstancesIds = try reader["reservedInstancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ReservedInstancesId.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.reservedInstancesModificationId = try reader["reservedInstancesModificationId"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.updateDate = try reader["updateDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -157703,11 +112629,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservedInstancesModificationResult: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesId = "reservedInstancesId" - case targetConfiguration = "targetConfiguration" - } +extension EC2ClientTypes.ReservedInstancesModificationResult: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -157719,12 +112641,14 @@ extension EC2ClientTypes.ReservedInstancesModificationResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded - let targetConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReservedInstancesConfiguration.self, forKey: .targetConfiguration) - targetConfiguration = targetConfigurationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstancesModificationResult() + value.reservedInstancesId = try reader["reservedInstancesId"].readIfPresent() + value.targetConfiguration = try reader["targetConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.ReservedInstancesConfiguration.readingClosure) + return value + } } } @@ -157748,24 +112672,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ReservedInstancesOffering: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case currencyCode = "currencyCode" - case duration = "duration" - case fixedPrice = "fixedPrice" - case instanceTenancy = "instanceTenancy" - case instanceType = "instanceType" - case marketplace = "marketplace" - case offeringClass = "offeringClass" - case offeringType = "offeringType" - case pricingDetails = "pricingDetailsSet" - case productDescription = "productDescription" - case recurringCharges = "recurringCharges" - case reservedInstancesOfferingId = "reservedInstancesOfferingId" - case scope = "scope" - case usagePrice = "usagePrice" - } +extension EC2ClientTypes.ReservedInstancesOffering: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -157834,72 +112741,27 @@ extension EC2ClientTypes.ReservedInstancesOffering: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let fixedPriceDecoded = try containerValues.decodeIfPresent(Swift.Float.self, forKey: .fixedPrice) - fixedPrice = fixedPriceDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RIProductDescription.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let reservedInstancesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesOfferingId) - reservedInstancesOfferingId = reservedInstancesOfferingIdDecoded - let usagePriceDecoded = try containerValues.decodeIfPresent(Swift.Float.self, forKey: .usagePrice) - usagePrice = usagePriceDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CurrencyCodeValues.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let instanceTenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .instanceTenancy) - instanceTenancy = instanceTenancyDecoded - let marketplaceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .marketplace) - marketplace = marketplaceDecoded - let offeringClassDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OfferingClassType.self, forKey: .offeringClass) - offeringClass = offeringClassDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OfferingTypeValues.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - if containerValues.contains(.pricingDetails) { - struct KeyVal0{struct item{}} - let pricingDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .pricingDetails) - if let pricingDetailsWrappedContainer = pricingDetailsWrappedContainer { - let pricingDetailsContainer = try pricingDetailsWrappedContainer.decodeIfPresent([EC2ClientTypes.PricingDetail].self, forKey: .member) - var pricingDetailsBuffer:[EC2ClientTypes.PricingDetail]? = nil - if let pricingDetailsContainer = pricingDetailsContainer { - pricingDetailsBuffer = [EC2ClientTypes.PricingDetail]() - for structureContainer0 in pricingDetailsContainer { - pricingDetailsBuffer?.append(structureContainer0) - } - } - pricingDetails = pricingDetailsBuffer - } else { - pricingDetails = [] - } - } else { - pricingDetails = nil - } - if containerValues.contains(.recurringCharges) { - struct KeyVal0{struct item{}} - let recurringChargesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recurringCharges) - if let recurringChargesWrappedContainer = recurringChargesWrappedContainer { - let recurringChargesContainer = try recurringChargesWrappedContainer.decodeIfPresent([EC2ClientTypes.RecurringCharge].self, forKey: .member) - var recurringChargesBuffer:[EC2ClientTypes.RecurringCharge]? = nil - if let recurringChargesContainer = recurringChargesContainer { - recurringChargesBuffer = [EC2ClientTypes.RecurringCharge]() - for structureContainer0 in recurringChargesContainer { - recurringChargesBuffer?.append(structureContainer0) - } - } - recurringCharges = recurringChargesBuffer - } else { - recurringCharges = [] - } - } else { - recurringCharges = nil - } - let scopeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Scope.self, forKey: .scope) - scope = scopeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ReservedInstancesOffering() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.duration = try reader["duration"].readIfPresent() + value.fixedPrice = try reader["fixedPrice"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.productDescription = try reader["productDescription"].readIfPresent() + value.reservedInstancesOfferingId = try reader["reservedInstancesOfferingId"].readIfPresent() + value.usagePrice = try reader["usagePrice"].readIfPresent() + value.currencyCode = try reader["currencyCode"].readIfPresent() + value.instanceTenancy = try reader["instanceTenancy"].readIfPresent() + value.marketplace = try reader["marketplace"].readIfPresent() + value.offeringClass = try reader["offeringClass"].readIfPresent() + value.offeringType = try reader["offeringType"].readIfPresent() + value.pricingDetails = try reader["pricingDetailsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PricingDetail.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.recurringCharges = try reader["recurringCharges"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RecurringCharge.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.scope = try reader["scope"].readIfPresent() + return value + } } } @@ -158021,38 +112883,15 @@ public struct ResetAddressAttributeInput: Swift.Equatable { } } -struct ResetAddressAttributeInputBody: Swift.Equatable { - let allocationId: Swift.String? - let attribute: EC2ClientTypes.AddressAttributeName? - let dryRun: Swift.Bool? -} - -extension ResetAddressAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationId = "AllocationId" - case attribute = "Attribute" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ResetAddressAttributeOutput { -extension ResetAddressAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetAddressAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.address = output.address - } else { - self.address = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ResetAddressAttributeOutput() + value.address = try reader["address"].readIfPresent(readingClosure: EC2ClientTypes.AddressAttribute.readingClosure) + return value } } } @@ -158069,27 +112908,18 @@ public struct ResetAddressAttributeOutput: Swift.Equatable { } } -struct ResetAddressAttributeOutputBody: Swift.Equatable { - let address: EC2ClientTypes.AddressAttribute? -} - -extension ResetAddressAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "address" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AddressAttribute.self, forKey: .address) - address = addressDecoded - } -} +enum ResetAddressAttributeOutputError { -enum ResetAddressAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -158124,30 +112954,15 @@ public struct ResetEbsDefaultKmsKeyIdInput: Swift.Equatable { } } -struct ResetEbsDefaultKmsKeyIdInputBody: Swift.Equatable { - let dryRun: Swift.Bool? -} - -extension ResetEbsDefaultKmsKeyIdInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ResetEbsDefaultKmsKeyIdOutput { -extension ResetEbsDefaultKmsKeyIdOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetEbsDefaultKmsKeyIdOutputBody = try responseDecoder.decode(responseBody: data) - self.kmsKeyId = output.kmsKeyId - } else { - self.kmsKeyId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ResetEbsDefaultKmsKeyIdOutput() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + return value } } } @@ -158164,27 +112979,18 @@ public struct ResetEbsDefaultKmsKeyIdOutput: Swift.Equatable { } } -struct ResetEbsDefaultKmsKeyIdOutputBody: Swift.Equatable { - let kmsKeyId: Swift.String? -} - -extension ResetEbsDefaultKmsKeyIdOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kmsKeyId = "kmsKeyId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - } -} +enum ResetEbsDefaultKmsKeyIdOutputError { -enum ResetEbsDefaultKmsKeyIdOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -158234,30 +113040,6 @@ public struct ResetFpgaImageAttributeInput: Swift.Equatable { } } -struct ResetFpgaImageAttributeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let fpgaImageId: Swift.String? - let attribute: EC2ClientTypes.ResetFpgaImageAttributeName? -} - -extension ResetFpgaImageAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case dryRun = "DryRun" - case fpgaImageId = "FpgaImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let fpgaImageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fpgaImageId) - fpgaImageId = fpgaImageIdDecoded - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResetFpgaImageAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - } -} - extension EC2ClientTypes { public enum ResetFpgaImageAttributeName: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case loadpermission @@ -158287,14 +113069,15 @@ extension EC2ClientTypes { } } -extension ResetFpgaImageAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetFpgaImageAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil +extension ResetFpgaImageAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ResetFpgaImageAttributeOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -158311,27 +113094,18 @@ public struct ResetFpgaImageAttributeOutput: Swift.Equatable { } } -struct ResetFpgaImageAttributeOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} +enum ResetFpgaImageAttributeOutputError { -extension ResetFpgaImageAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} - -enum ResetFpgaImageAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -158383,30 +113157,6 @@ public struct ResetImageAttributeInput: Swift.Equatable { } } -struct ResetImageAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.ResetImageAttributeName? - let imageId: Swift.String? - let dryRun: Swift.Bool? -} - -extension ResetImageAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case dryRun = "dryRun" - case imageId = "ImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResetImageAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - extension EC2ClientTypes { public enum ResetImageAttributeName: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case launchpermission @@ -158436,8 +113186,12 @@ extension EC2ClientTypes { } } -extension ResetImageAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension ResetImageAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ResetImageAttributeOutput() + } } } @@ -158446,11 +113200,18 @@ public struct ResetImageAttributeOutput: Swift.Equatable { public init() { } } -enum ResetImageAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ResetImageAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -158501,32 +113262,12 @@ public struct ResetInstanceAttributeInput: Swift.Equatable { } } -struct ResetInstanceAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.InstanceAttributeName? - let dryRun: Swift.Bool? - let instanceId: Swift.String? -} - -extension ResetInstanceAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "attribute" - case dryRun = "dryRun" - case instanceId = "instanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - } -} +extension ResetInstanceAttributeOutput { -extension ResetInstanceAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ResetInstanceAttributeOutput() + } } } @@ -158535,11 +113276,18 @@ public struct ResetInstanceAttributeOutput: Swift.Equatable { public init() { } } -enum ResetInstanceAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ResetInstanceAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -158590,32 +113338,12 @@ public struct ResetNetworkInterfaceAttributeInput: Swift.Equatable { } } -struct ResetNetworkInterfaceAttributeInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let networkInterfaceId: Swift.String? - let sourceDestCheck: Swift.String? -} - -extension ResetNetworkInterfaceAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case networkInterfaceId = "networkInterfaceId" - case sourceDestCheck = "sourceDestCheck" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let sourceDestCheckDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDestCheck) - sourceDestCheck = sourceDestCheckDecoded - } -} +extension ResetNetworkInterfaceAttributeOutput { -extension ResetNetworkInterfaceAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ResetNetworkInterfaceAttributeOutput() + } } } @@ -158624,11 +113352,18 @@ public struct ResetNetworkInterfaceAttributeOutput: Swift.Equatable { public init() { } } -enum ResetNetworkInterfaceAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ResetNetworkInterfaceAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -158679,32 +113414,12 @@ public struct ResetSnapshotAttributeInput: Swift.Equatable { } } -struct ResetSnapshotAttributeInputBody: Swift.Equatable { - let attribute: EC2ClientTypes.SnapshotAttributeName? - let snapshotId: Swift.String? - let dryRun: Swift.Bool? -} - -extension ResetSnapshotAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attribute = "Attribute" - case dryRun = "dryRun" - case snapshotId = "SnapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotAttributeName.self, forKey: .attribute) - attribute = attributeDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension ResetSnapshotAttributeOutput { -extension ResetSnapshotAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ResetSnapshotAttributeOutput() + } } } @@ -158713,20 +113428,23 @@ public struct ResetSnapshotAttributeOutput: Swift.Equatable { public init() { } } -enum ResetSnapshotAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum ResetSnapshotAttributeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ResourceStatement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceTypes = "resourceTypeSet" - case resources = "resourceSet" - } +extension EC2ClientTypes.ResourceStatement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -158756,45 +113474,13 @@ extension EC2ClientTypes.ResourceStatement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.resources) { - struct KeyVal0{struct item{}} - let resourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resources) - if let resourcesWrappedContainer = resourcesWrappedContainer { - let resourcesContainer = try resourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesBuffer:[Swift.String]? = nil - if let resourcesContainer = resourcesContainer { - resourcesBuffer = [Swift.String]() - for stringContainer0 in resourcesContainer { - resourcesBuffer?.append(stringContainer0) - } - } - resources = resourcesBuffer - } else { - resources = [] - } - } else { - resources = nil - } - if containerValues.contains(.resourceTypes) { - struct KeyVal0{struct item{}} - let resourceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTypes) - if let resourceTypesWrappedContainer = resourceTypesWrappedContainer { - let resourceTypesContainer = try resourceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceTypesBuffer:[Swift.String]? = nil - if let resourceTypesContainer = resourceTypesContainer { - resourceTypesBuffer = [Swift.String]() - for stringContainer0 in resourceTypesContainer { - resourceTypesBuffer?.append(stringContainer0) - } - } - resourceTypes = resourceTypesBuffer - } else { - resourceTypes = [] - } - } else { - resourceTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ResourceStatement() + value.resources = try reader["resourceSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.resourceTypes = try reader["resourceTypeSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -158819,11 +113505,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ResourceStatementRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceTypes = "ResourceType" - case resources = "Resource" - } +extension EC2ClientTypes.ResourceStatementRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -158853,45 +113535,13 @@ extension EC2ClientTypes.ResourceStatementRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.resources) { - struct KeyVal0{struct item{}} - let resourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resources) - if let resourcesWrappedContainer = resourcesWrappedContainer { - let resourcesContainer = try resourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesBuffer:[Swift.String]? = nil - if let resourcesContainer = resourcesContainer { - resourcesBuffer = [Swift.String]() - for stringContainer0 in resourcesContainer { - resourcesBuffer?.append(stringContainer0) - } - } - resources = resourcesBuffer - } else { - resources = [] - } - } else { - resources = nil - } - if containerValues.contains(.resourceTypes) { - struct KeyVal0{struct item{}} - let resourceTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTypes) - if let resourceTypesWrappedContainer = resourceTypesWrappedContainer { - let resourceTypesContainer = try resourceTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceTypesBuffer:[Swift.String]? = nil - if let resourceTypesContainer = resourceTypesContainer { - resourceTypesBuffer = [Swift.String]() - for stringContainer0 in resourceTypesContainer { - resourceTypesBuffer?.append(stringContainer0) - } - } - resourceTypes = resourceTypesBuffer - } else { - resourceTypes = [] - } - } else { - resourceTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ResourceStatementRequest() + value.resources = try reader["Resource"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.resourceTypes = try reader["ResourceType"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -159200,11 +113850,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ResponseError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.ResponseError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -159216,12 +113862,14 @@ extension EC2ClientTypes.ResponseError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateErrorCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ResponseError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -159245,40 +113893,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ResponseLaunchTemplateData: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDeviceMappings = "blockDeviceMappingSet" - case capacityReservationSpecification = "capacityReservationSpecification" - case cpuOptions = "cpuOptions" - case creditSpecification = "creditSpecification" - case disableApiStop = "disableApiStop" - case disableApiTermination = "disableApiTermination" - case ebsOptimized = "ebsOptimized" - case elasticGpuSpecifications = "elasticGpuSpecificationSet" - case elasticInferenceAccelerators = "elasticInferenceAcceleratorSet" - case enclaveOptions = "enclaveOptions" - case hibernationOptions = "hibernationOptions" - case iamInstanceProfile = "iamInstanceProfile" - case imageId = "imageId" - case instanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior" - case instanceMarketOptions = "instanceMarketOptions" - case instanceRequirements = "instanceRequirements" - case instanceType = "instanceType" - case kernelId = "kernelId" - case keyName = "keyName" - case licenseSpecifications = "licenseSet" - case maintenanceOptions = "maintenanceOptions" - case metadataOptions = "metadataOptions" - case monitoring = "monitoring" - case networkInterfaces = "networkInterfaceSet" - case placement = "placement" - case privateDnsNameOptions = "privateDnsNameOptions" - case ramDiskId = "ramDiskId" - case securityGroupIds = "securityGroupIdSet" - case securityGroups = "securityGroupSet" - case tagSpecifications = "tagSpecificationSet" - case userData = "userData" - } +extension EC2ClientTypes.ResponseLaunchTemplateData: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -159449,206 +114064,43 @@ extension EC2ClientTypes.ResponseLaunchTemplateData: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecification.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateBlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.LaunchTemplateBlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.LaunchTemplateBlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct item{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecification].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecification]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecification]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil - } - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplatesMonitoring.self, forKey: .monitoring) - monitoring = monitoringDecoded - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplatePlacement.self, forKey: .placement) - placement = placementDecoded - let ramDiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramDiskId) - ramDiskId = ramDiskIdDecoded - let disableApiTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableApiTermination) - disableApiTermination = disableApiTerminationDecoded - let instanceInitiatedShutdownBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ShutdownBehavior.self, forKey: .instanceInitiatedShutdownBehavior) - instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehaviorDecoded - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateTagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.LaunchTemplateTagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.LaunchTemplateTagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - if containerValues.contains(.elasticGpuSpecifications) { - struct KeyVal0{struct item{}} - let elasticGpuSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticGpuSpecifications) - if let elasticGpuSpecificationsWrappedContainer = elasticGpuSpecificationsWrappedContainer { - let elasticGpuSpecificationsContainer = try elasticGpuSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.ElasticGpuSpecificationResponse].self, forKey: .member) - var elasticGpuSpecificationsBuffer:[EC2ClientTypes.ElasticGpuSpecificationResponse]? = nil - if let elasticGpuSpecificationsContainer = elasticGpuSpecificationsContainer { - elasticGpuSpecificationsBuffer = [EC2ClientTypes.ElasticGpuSpecificationResponse]() - for structureContainer0 in elasticGpuSpecificationsContainer { - elasticGpuSpecificationsBuffer?.append(structureContainer0) - } - } - elasticGpuSpecifications = elasticGpuSpecificationsBuffer - } else { - elasticGpuSpecifications = [] - } - } else { - elasticGpuSpecifications = nil - } - if containerValues.contains(.elasticInferenceAccelerators) { - struct KeyVal0{struct item{}} - let elasticInferenceAcceleratorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticInferenceAccelerators) - if let elasticInferenceAcceleratorsWrappedContainer = elasticInferenceAcceleratorsWrappedContainer { - let elasticInferenceAcceleratorsContainer = try elasticInferenceAcceleratorsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateElasticInferenceAcceleratorResponse].self, forKey: .member) - var elasticInferenceAcceleratorsBuffer:[EC2ClientTypes.LaunchTemplateElasticInferenceAcceleratorResponse]? = nil - if let elasticInferenceAcceleratorsContainer = elasticInferenceAcceleratorsContainer { - elasticInferenceAcceleratorsBuffer = [EC2ClientTypes.LaunchTemplateElasticInferenceAcceleratorResponse]() - for structureContainer0 in elasticInferenceAcceleratorsContainer { - elasticInferenceAcceleratorsBuffer?.append(structureContainer0) - } - } - elasticInferenceAccelerators = elasticInferenceAcceleratorsBuffer - } else { - elasticInferenceAccelerators = [] - } - } else { - elasticInferenceAccelerators = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let instanceMarketOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMarketOptions.self, forKey: .instanceMarketOptions) - instanceMarketOptions = instanceMarketOptionsDecoded - let creditSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreditSpecification.self, forKey: .creditSpecification) - creditSpecification = creditSpecificationDecoded - let cpuOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateCpuOptions.self, forKey: .cpuOptions) - cpuOptions = cpuOptionsDecoded - let capacityReservationSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationResponse.self, forKey: .capacityReservationSpecification) - capacityReservationSpecification = capacityReservationSpecificationDecoded - if containerValues.contains(.licenseSpecifications) { - struct KeyVal0{struct item{}} - let licenseSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .licenseSpecifications) - if let licenseSpecificationsWrappedContainer = licenseSpecificationsWrappedContainer { - let licenseSpecificationsContainer = try licenseSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateLicenseConfiguration].self, forKey: .member) - var licenseSpecificationsBuffer:[EC2ClientTypes.LaunchTemplateLicenseConfiguration]? = nil - if let licenseSpecificationsContainer = licenseSpecificationsContainer { - licenseSpecificationsBuffer = [EC2ClientTypes.LaunchTemplateLicenseConfiguration]() - for structureContainer0 in licenseSpecificationsContainer { - licenseSpecificationsBuffer?.append(structureContainer0) - } - } - licenseSpecifications = licenseSpecificationsBuffer - } else { - licenseSpecifications = [] - } - } else { - licenseSpecifications = nil - } - let hibernationOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateHibernationOptions.self, forKey: .hibernationOptions) - hibernationOptions = hibernationOptionsDecoded - let metadataOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMetadataOptions.self, forKey: .metadataOptions) - metadataOptions = metadataOptionsDecoded - let enclaveOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateEnclaveOptions.self, forKey: .enclaveOptions) - enclaveOptions = enclaveOptionsDecoded - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirements.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded - let privateDnsNameOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplatePrivateDnsNameOptions.self, forKey: .privateDnsNameOptions) - privateDnsNameOptions = privateDnsNameOptionsDecoded - let maintenanceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptions.self, forKey: .maintenanceOptions) - maintenanceOptions = maintenanceOptionsDecoded - let disableApiStopDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableApiStop) - disableApiStop = disableApiStopDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ResponseLaunchTemplateData() + value.kernelId = try reader["kernelId"].readIfPresent() + value.ebsOptimized = try reader["ebsOptimized"].readIfPresent() + value.iamInstanceProfile = try reader["iamInstanceProfile"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateIamInstanceProfileSpecification.readingClosure) + value.blockDeviceMappings = try reader["blockDeviceMappingSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateBlockDeviceMapping.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkInterfaces = try reader["networkInterfaceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateInstanceNetworkInterfaceSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.imageId = try reader["imageId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.keyName = try reader["keyName"].readIfPresent() + value.monitoring = try reader["monitoring"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplatesMonitoring.readingClosure) + value.placement = try reader["placement"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplatePlacement.readingClosure) + value.ramDiskId = try reader["ramDiskId"].readIfPresent() + value.disableApiTermination = try reader["disableApiTermination"].readIfPresent() + value.instanceInitiatedShutdownBehavior = try reader["instanceInitiatedShutdownBehavior"].readIfPresent() + value.userData = try reader["userData"].readIfPresent() + value.tagSpecifications = try reader["tagSpecificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateTagSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.elasticGpuSpecifications = try reader["elasticGpuSpecificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ElasticGpuSpecificationResponse.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.elasticInferenceAccelerators = try reader["elasticInferenceAcceleratorSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateElasticInferenceAcceleratorResponse.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.securityGroupIds = try reader["securityGroupIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.securityGroups = try reader["securityGroupSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceMarketOptions = try reader["instanceMarketOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateInstanceMarketOptions.readingClosure) + value.creditSpecification = try reader["creditSpecification"].readIfPresent(readingClosure: EC2ClientTypes.CreditSpecification.readingClosure) + value.cpuOptions = try reader["cpuOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateCpuOptions.readingClosure) + value.capacityReservationSpecification = try reader["capacityReservationSpecification"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateCapacityReservationSpecificationResponse.readingClosure) + value.licenseSpecifications = try reader["licenseSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateLicenseConfiguration.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.hibernationOptions = try reader["hibernationOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateHibernationOptions.readingClosure) + value.metadataOptions = try reader["metadataOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateInstanceMetadataOptions.readingClosure) + value.enclaveOptions = try reader["enclaveOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateEnclaveOptions.readingClosure) + value.instanceRequirements = try reader["instanceRequirements"].readIfPresent(readingClosure: EC2ClientTypes.InstanceRequirements.readingClosure) + value.privateDnsNameOptions = try reader["privateDnsNameOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplatePrivateDnsNameOptions.readingClosure) + value.maintenanceOptions = try reader["maintenanceOptions"].readIfPresent(readingClosure: EC2ClientTypes.LaunchTemplateInstanceMaintenanceOptions.readingClosure) + value.disableApiStop = try reader["disableApiStop"].readIfPresent() + return value + } } } @@ -159840,36 +114292,16 @@ public struct RestoreAddressToClassicInput: Swift.Equatable { } } -struct RestoreAddressToClassicInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let publicIp: Swift.String? -} - -extension RestoreAddressToClassicInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case publicIp = "publicIp" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - } -} +extension RestoreAddressToClassicOutput { -extension RestoreAddressToClassicOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreAddressToClassicOutputBody = try responseDecoder.decode(responseBody: data) - self.publicIp = output.publicIp - self.status = output.status - } else { - self.publicIp = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RestoreAddressToClassicOutput() + value.publicIp = try reader["publicIp"].readIfPresent() + value.status = try reader["status"].readIfPresent() + return value } } } @@ -159890,31 +114322,18 @@ public struct RestoreAddressToClassicOutput: Swift.Equatable { } } -struct RestoreAddressToClassicOutputBody: Swift.Equatable { - let publicIp: Swift.String? - let status: EC2ClientTypes.Status? -} - -extension RestoreAddressToClassicOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicIp = "publicIp" - case status = "status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIp) - publicIp = publicIpDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Status.self, forKey: .status) - status = statusDecoded - } -} +enum RestoreAddressToClassicOutputError { -enum RestoreAddressToClassicOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -159957,34 +114376,15 @@ public struct RestoreImageFromRecycleBinInput: Swift.Equatable { } } -struct RestoreImageFromRecycleBinInputBody: Swift.Equatable { - let imageId: Swift.String? - let dryRun: Swift.Bool? -} - -extension RestoreImageFromRecycleBinInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case imageId = "ImageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension RestoreImageFromRecycleBinOutput { -extension RestoreImageFromRecycleBinOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreImageFromRecycleBinOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RestoreImageFromRecycleBinOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -160001,27 +114401,18 @@ public struct RestoreImageFromRecycleBinOutput: Swift.Equatable { } } -struct RestoreImageFromRecycleBinOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension RestoreImageFromRecycleBinOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum RestoreImageFromRecycleBinOutputError { -enum RestoreImageFromRecycleBinOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -160080,42 +114471,15 @@ public struct RestoreManagedPrefixListVersionInput: Swift.Equatable { } } -struct RestoreManagedPrefixListVersionInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let prefixListId: Swift.String? - let previousVersion: Swift.Int? - let currentVersion: Swift.Int? -} - -extension RestoreManagedPrefixListVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currentVersion = "CurrentVersion" - case dryRun = "DryRun" - case prefixListId = "PrefixListId" - case previousVersion = "PreviousVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let previousVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .previousVersion) - previousVersion = previousVersionDecoded - let currentVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .currentVersion) - currentVersion = currentVersionDecoded - } -} +extension RestoreManagedPrefixListVersionOutput { -extension RestoreManagedPrefixListVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreManagedPrefixListVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.prefixList = output.prefixList - } else { - self.prefixList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RestoreManagedPrefixListVersionOutput() + value.prefixList = try reader["prefixList"].readIfPresent(readingClosure: EC2ClientTypes.ManagedPrefixList.readingClosure) + return value } } } @@ -160132,27 +114496,18 @@ public struct RestoreManagedPrefixListVersionOutput: Swift.Equatable { } } -struct RestoreManagedPrefixListVersionOutputBody: Swift.Equatable { - let prefixList: EC2ClientTypes.ManagedPrefixList? -} - -extension RestoreManagedPrefixListVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case prefixList = "prefixList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixListDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ManagedPrefixList.self, forKey: .prefixList) - prefixList = prefixListDecoded - } -} +enum RestoreManagedPrefixListVersionOutputError { -enum RestoreManagedPrefixListVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -160195,54 +114550,25 @@ public struct RestoreSnapshotFromRecycleBinInput: Swift.Equatable { } } -struct RestoreSnapshotFromRecycleBinInputBody: Swift.Equatable { - let snapshotId: Swift.String? - let dryRun: Swift.Bool? -} - -extension RestoreSnapshotFromRecycleBinInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case snapshotId = "SnapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension RestoreSnapshotFromRecycleBinOutput { -extension RestoreSnapshotFromRecycleBinOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreSnapshotFromRecycleBinOutputBody = try responseDecoder.decode(responseBody: data) - self.description = output.description - self.encrypted = output.encrypted - self.outpostArn = output.outpostArn - self.ownerId = output.ownerId - self.progress = output.progress - self.snapshotId = output.snapshotId - self.sseType = output.sseType - self.startTime = output.startTime - self.state = output.state - self.volumeId = output.volumeId - self.volumeSize = output.volumeSize - } else { - self.description = nil - self.encrypted = nil - self.outpostArn = nil - self.ownerId = nil - self.progress = nil - self.snapshotId = nil - self.sseType = nil - self.startTime = nil - self.state = nil - self.volumeId = nil - self.volumeSize = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RestoreSnapshotFromRecycleBinOutput() + value.description = try reader["description"].readIfPresent() + value.encrypted = try reader["encrypted"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.sseType = try reader["sseType"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: .dateTime) + value.state = try reader["status"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + value.volumeSize = try reader["volumeSize"].readIfPresent() + return value } } } @@ -160299,67 +114625,18 @@ public struct RestoreSnapshotFromRecycleBinOutput: Swift.Equatable { } } -struct RestoreSnapshotFromRecycleBinOutputBody: Swift.Equatable { - let snapshotId: Swift.String? - let outpostArn: Swift.String? - let description: Swift.String? - let encrypted: Swift.Bool? - let ownerId: Swift.String? - let progress: Swift.String? - let startTime: ClientRuntime.Date? - let state: EC2ClientTypes.SnapshotState? - let volumeId: Swift.String? - let volumeSize: Swift.Int? - let sseType: EC2ClientTypes.SSEType? -} - -extension RestoreSnapshotFromRecycleBinOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case encrypted = "encrypted" - case outpostArn = "outpostArn" - case ownerId = "ownerId" - case progress = "progress" - case snapshotId = "snapshotId" - case sseType = "sseType" - case startTime = "startTime" - case state = "status" - case volumeId = "volumeId" - case volumeSize = "volumeSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotState.self, forKey: .state) - state = stateDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let sseTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SSEType.self, forKey: .sseType) - sseType = sseTypeDecoded - } -} - -enum RestoreSnapshotFromRecycleBinOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum RestoreSnapshotFromRecycleBinOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -160416,48 +114693,18 @@ public struct RestoreSnapshotTierInput: Swift.Equatable { } } -struct RestoreSnapshotTierInputBody: Swift.Equatable { - let snapshotId: Swift.String? - let temporaryRestoreDays: Swift.Int? - let permanentRestore: Swift.Bool? - let dryRun: Swift.Bool? -} - -extension RestoreSnapshotTierInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case permanentRestore = "PermanentRestore" - case snapshotId = "SnapshotId" - case temporaryRestoreDays = "TemporaryRestoreDays" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let temporaryRestoreDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .temporaryRestoreDays) - temporaryRestoreDays = temporaryRestoreDaysDecoded - let permanentRestoreDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .permanentRestore) - permanentRestore = permanentRestoreDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension RestoreSnapshotTierOutput { -extension RestoreSnapshotTierOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreSnapshotTierOutputBody = try responseDecoder.decode(responseBody: data) - self.isPermanentRestore = output.isPermanentRestore - self.restoreDuration = output.restoreDuration - self.restoreStartTime = output.restoreStartTime - self.snapshotId = output.snapshotId - } else { - self.isPermanentRestore = nil - self.restoreDuration = nil - self.restoreStartTime = nil - self.snapshotId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RestoreSnapshotTierOutput() + value.isPermanentRestore = try reader["isPermanentRestore"].readIfPresent() + value.restoreDuration = try reader["restoreDuration"].readIfPresent() + value.restoreStartTime = try reader["restoreStartTime"].readTimestampIfPresent(format: .dateTime) + value.snapshotId = try reader["snapshotId"].readIfPresent() + return value } } } @@ -160486,39 +114733,18 @@ public struct RestoreSnapshotTierOutput: Swift.Equatable { } } -struct RestoreSnapshotTierOutputBody: Swift.Equatable { - let snapshotId: Swift.String? - let restoreStartTime: ClientRuntime.Date? - let restoreDuration: Swift.Int? - let isPermanentRestore: Swift.Bool? -} - -extension RestoreSnapshotTierOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isPermanentRestore = "isPermanentRestore" - case restoreDuration = "restoreDuration" - case restoreStartTime = "restoreStartTime" - case snapshotId = "snapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let restoreStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreStartTime) - restoreStartTime = restoreStartTimeDecoded - let restoreDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .restoreDuration) - restoreDuration = restoreDurationDecoded - let isPermanentRestoreDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isPermanentRestore) - isPermanentRestore = isPermanentRestoreDecoded - } -} +enum RestoreSnapshotTierOutputError { -enum RestoreSnapshotTierOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -160583,46 +114809,15 @@ public struct RevokeClientVpnIngressInput: Swift.Equatable { } } -struct RevokeClientVpnIngressInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let targetNetworkCidr: Swift.String? - let accessGroupId: Swift.String? - let revokeAllGroups: Swift.Bool? - let dryRun: Swift.Bool? -} - -extension RevokeClientVpnIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGroupId = "AccessGroupId" - case clientVpnEndpointId = "ClientVpnEndpointId" - case dryRun = "DryRun" - case revokeAllGroups = "RevokeAllGroups" - case targetNetworkCidr = "TargetNetworkCidr" - } +extension RevokeClientVpnIngressOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let targetNetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetNetworkCidr) - targetNetworkCidr = targetNetworkCidrDecoded - let accessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGroupId) - accessGroupId = accessGroupIdDecoded - let revokeAllGroupsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .revokeAllGroups) - revokeAllGroups = revokeAllGroupsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension RevokeClientVpnIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RevokeClientVpnIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.status = output.status - } else { - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RevokeClientVpnIngressOutput() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnAuthorizationRuleStatus.readingClosure) + return value } } } @@ -160639,27 +114834,18 @@ public struct RevokeClientVpnIngressOutput: Swift.Equatable { } } -struct RevokeClientVpnIngressOutputBody: Swift.Equatable { - let status: EC2ClientTypes.ClientVpnAuthorizationRuleStatus? -} - -extension RevokeClientVpnIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "status" - } +enum RevokeClientVpnIngressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnAuthorizationRuleStatus.self, forKey: .status) - status = statusDecoded - } -} - -enum RevokeClientVpnIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -160776,102 +114962,16 @@ public struct RevokeSecurityGroupEgressInput: Swift.Equatable { } } -struct RevokeSecurityGroupEgressInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let groupId: Swift.String? - let ipPermissions: [EC2ClientTypes.IpPermission]? - let securityGroupRuleIds: [Swift.String]? - let cidrIp: Swift.String? - let fromPort: Swift.Int? - let ipProtocol: Swift.String? - let toPort: Swift.Int? - let sourceSecurityGroupName: Swift.String? - let sourceSecurityGroupOwnerId: Swift.String? -} - -extension RevokeSecurityGroupEgressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrIp = "cidrIp" - case dryRun = "dryRun" - case fromPort = "fromPort" - case groupId = "groupId" - case ipPermissions = "ipPermissions" - case ipProtocol = "ipProtocol" - case securityGroupRuleIds = "SecurityGroupRuleId" - case sourceSecurityGroupName = "sourceSecurityGroupName" - case sourceSecurityGroupOwnerId = "sourceSecurityGroupOwnerId" - case toPort = "toPort" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - if containerValues.contains(.ipPermissions) { - struct KeyVal0{struct item{}} - let ipPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipPermissions) - if let ipPermissionsWrappedContainer = ipPermissionsWrappedContainer { - let ipPermissionsContainer = try ipPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var ipPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let ipPermissionsContainer = ipPermissionsContainer { - ipPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in ipPermissionsContainer { - ipPermissionsBuffer?.append(structureContainer0) - } - } - ipPermissions = ipPermissionsBuffer - } else { - ipPermissions = [] - } - } else { - ipPermissions = nil - } - if containerValues.contains(.securityGroupRuleIds) { - struct KeyVal0{struct item{}} - let securityGroupRuleIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRuleIds) - if let securityGroupRuleIdsWrappedContainer = securityGroupRuleIdsWrappedContainer { - let securityGroupRuleIdsContainer = try securityGroupRuleIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupRuleIdsBuffer:[Swift.String]? = nil - if let securityGroupRuleIdsContainer = securityGroupRuleIdsContainer { - securityGroupRuleIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupRuleIdsContainer { - securityGroupRuleIdsBuffer?.append(stringContainer0) - } - } - securityGroupRuleIds = securityGroupRuleIdsBuffer - } else { - securityGroupRuleIds = [] - } - } else { - securityGroupRuleIds = nil - } - let cidrIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIp) - cidrIp = cidrIpDecoded - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let ipProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipProtocol) - ipProtocol = ipProtocolDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded - let sourceSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSecurityGroupName) - sourceSecurityGroupName = sourceSecurityGroupNameDecoded - let sourceSecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSecurityGroupOwnerId) - sourceSecurityGroupOwnerId = sourceSecurityGroupOwnerIdDecoded - } -} - -extension RevokeSecurityGroupEgressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RevokeSecurityGroupEgressOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - self.unknownIpPermissions = output.unknownIpPermissions - } else { - self.`return` = nil - self.unknownIpPermissions = nil +extension RevokeSecurityGroupEgressOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RevokeSecurityGroupEgressOutput() + value.`return` = try reader["return"].readIfPresent() + value.unknownIpPermissions = try reader["unknownIpPermissionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -160892,48 +114992,18 @@ public struct RevokeSecurityGroupEgressOutput: Swift.Equatable { } } -struct RevokeSecurityGroupEgressOutputBody: Swift.Equatable { - let `return`: Swift.Bool? - let unknownIpPermissions: [EC2ClientTypes.IpPermission]? -} - -extension RevokeSecurityGroupEgressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - case unknownIpPermissions = "unknownIpPermissionSet" - } +enum RevokeSecurityGroupEgressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - if containerValues.contains(.unknownIpPermissions) { - struct KeyVal0{struct item{}} - let unknownIpPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unknownIpPermissions) - if let unknownIpPermissionsWrappedContainer = unknownIpPermissionsWrappedContainer { - let unknownIpPermissionsContainer = try unknownIpPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var unknownIpPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let unknownIpPermissionsContainer = unknownIpPermissionsContainer { - unknownIpPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in unknownIpPermissionsContainer { - unknownIpPermissionsBuffer?.append(structureContainer0) - } - } - unknownIpPermissions = unknownIpPermissionsBuffer - } else { - unknownIpPermissions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unknownIpPermissions = nil - } - } -} - -enum RevokeSecurityGroupEgressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -161056,106 +115126,16 @@ public struct RevokeSecurityGroupIngressInput: Swift.Equatable { } } -struct RevokeSecurityGroupIngressInputBody: Swift.Equatable { - let cidrIp: Swift.String? - let fromPort: Swift.Int? - let groupId: Swift.String? - let groupName: Swift.String? - let ipPermissions: [EC2ClientTypes.IpPermission]? - let ipProtocol: Swift.String? - let sourceSecurityGroupName: Swift.String? - let sourceSecurityGroupOwnerId: Swift.String? - let toPort: Swift.Int? - let dryRun: Swift.Bool? - let securityGroupRuleIds: [Swift.String]? -} - -extension RevokeSecurityGroupIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrIp = "CidrIp" - case dryRun = "dryRun" - case fromPort = "FromPort" - case groupId = "GroupId" - case groupName = "GroupName" - case ipPermissions = "IpPermissions" - case ipProtocol = "IpProtocol" - case securityGroupRuleIds = "SecurityGroupRuleId" - case sourceSecurityGroupName = "SourceSecurityGroupName" - case sourceSecurityGroupOwnerId = "SourceSecurityGroupOwnerId" - case toPort = "ToPort" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIp) - cidrIp = cidrIpDecoded - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - if containerValues.contains(.ipPermissions) { - struct KeyVal0{struct item{}} - let ipPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipPermissions) - if let ipPermissionsWrappedContainer = ipPermissionsWrappedContainer { - let ipPermissionsContainer = try ipPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var ipPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let ipPermissionsContainer = ipPermissionsContainer { - ipPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in ipPermissionsContainer { - ipPermissionsBuffer?.append(structureContainer0) - } - } - ipPermissions = ipPermissionsBuffer - } else { - ipPermissions = [] - } - } else { - ipPermissions = nil - } - let ipProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipProtocol) - ipProtocol = ipProtocolDecoded - let sourceSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSecurityGroupName) - sourceSecurityGroupName = sourceSecurityGroupNameDecoded - let sourceSecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSecurityGroupOwnerId) - sourceSecurityGroupOwnerId = sourceSecurityGroupOwnerIdDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.securityGroupRuleIds) { - struct KeyVal0{struct item{}} - let securityGroupRuleIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRuleIds) - if let securityGroupRuleIdsWrappedContainer = securityGroupRuleIdsWrappedContainer { - let securityGroupRuleIdsContainer = try securityGroupRuleIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupRuleIdsBuffer:[Swift.String]? = nil - if let securityGroupRuleIdsContainer = securityGroupRuleIdsContainer { - securityGroupRuleIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupRuleIdsContainer { - securityGroupRuleIdsBuffer?.append(stringContainer0) - } - } - securityGroupRuleIds = securityGroupRuleIdsBuffer - } else { - securityGroupRuleIds = [] - } - } else { - securityGroupRuleIds = nil - } - } -} - -extension RevokeSecurityGroupIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RevokeSecurityGroupIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - self.unknownIpPermissions = output.unknownIpPermissions - } else { - self.`return` = nil - self.unknownIpPermissions = nil +extension RevokeSecurityGroupIngressOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RevokeSecurityGroupIngressOutput() + value.`return` = try reader["return"].readIfPresent() + value.unknownIpPermissions = try reader["unknownIpPermissionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -161176,48 +115156,18 @@ public struct RevokeSecurityGroupIngressOutput: Swift.Equatable { } } -struct RevokeSecurityGroupIngressOutputBody: Swift.Equatable { - let `return`: Swift.Bool? - let unknownIpPermissions: [EC2ClientTypes.IpPermission]? -} - -extension RevokeSecurityGroupIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - case unknownIpPermissions = "unknownIpPermissionSet" - } +enum RevokeSecurityGroupIngressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - if containerValues.contains(.unknownIpPermissions) { - struct KeyVal0{struct item{}} - let unknownIpPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unknownIpPermissions) - if let unknownIpPermissionsWrappedContainer = unknownIpPermissionsWrappedContainer { - let unknownIpPermissionsContainer = try unknownIpPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var unknownIpPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let unknownIpPermissionsContainer = unknownIpPermissionsContainer { - unknownIpPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in unknownIpPermissionsContainer { - unknownIpPermissionsBuffer?.append(structureContainer0) - } - } - unknownIpPermissions = unknownIpPermissionsBuffer - } else { - unknownIpPermissions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unknownIpPermissions = nil - } - } -} - -enum RevokeSecurityGroupIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -161254,25 +115204,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Route: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case carrierGatewayId = "carrierGatewayId" - case coreNetworkArn = "coreNetworkArn" - case destinationCidrBlock = "destinationCidrBlock" - case destinationIpv6CidrBlock = "destinationIpv6CidrBlock" - case destinationPrefixListId = "destinationPrefixListId" - case egressOnlyInternetGatewayId = "egressOnlyInternetGatewayId" - case gatewayId = "gatewayId" - case instanceId = "instanceId" - case instanceOwnerId = "instanceOwnerId" - case localGatewayId = "localGatewayId" - case natGatewayId = "natGatewayId" - case networkInterfaceId = "networkInterfaceId" - case origin = "origin" - case state = "state" - case transitGatewayId = "transitGatewayId" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } +extension EC2ClientTypes.Route: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -161326,40 +115258,28 @@ extension EC2ClientTypes.Route: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let destinationIpv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationIpv6CidrBlock) - destinationIpv6CidrBlock = destinationIpv6CidrBlockDecoded - let destinationPrefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPrefixListId) - destinationPrefixListId = destinationPrefixListIdDecoded - let egressOnlyInternetGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .egressOnlyInternetGatewayId) - egressOnlyInternetGatewayId = egressOnlyInternetGatewayIdDecoded - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let instanceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceOwnerId) - instanceOwnerId = instanceOwnerIdDecoded - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let localGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayId) - localGatewayId = localGatewayIdDecoded - let carrierGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .carrierGatewayId) - carrierGatewayId = carrierGatewayIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let originDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RouteOrigin.self, forKey: .origin) - origin = originDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RouteState.self, forKey: .state) - state = stateDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - let coreNetworkArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coreNetworkArn) - coreNetworkArn = coreNetworkArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Route() + value.destinationCidrBlock = try reader["destinationCidrBlock"].readIfPresent() + value.destinationIpv6CidrBlock = try reader["destinationIpv6CidrBlock"].readIfPresent() + value.destinationPrefixListId = try reader["destinationPrefixListId"].readIfPresent() + value.egressOnlyInternetGatewayId = try reader["egressOnlyInternetGatewayId"].readIfPresent() + value.gatewayId = try reader["gatewayId"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.instanceOwnerId = try reader["instanceOwnerId"].readIfPresent() + value.natGatewayId = try reader["natGatewayId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.localGatewayId = try reader["localGatewayId"].readIfPresent() + value.carrierGatewayId = try reader["carrierGatewayId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.origin = try reader["origin"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.vpcPeeringConnectionId = try reader["vpcPeeringConnectionId"].readIfPresent() + value.coreNetworkArn = try reader["coreNetworkArn"].readIfPresent() + return value + } } } @@ -161512,16 +115432,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.RouteTable: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "associationSet" - case ownerId = "ownerId" - case propagatingVgws = "propagatingVgwSet" - case routeTableId = "routeTableId" - case routes = "routeSet" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.RouteTable: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -161584,90 +115495,19 @@ extension EC2ClientTypes.RouteTable: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.associations) { - struct KeyVal0{struct item{}} - let associationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associations) - if let associationsWrappedContainer = associationsWrappedContainer { - let associationsContainer = try associationsWrappedContainer.decodeIfPresent([EC2ClientTypes.RouteTableAssociation].self, forKey: .member) - var associationsBuffer:[EC2ClientTypes.RouteTableAssociation]? = nil - if let associationsContainer = associationsContainer { - associationsBuffer = [EC2ClientTypes.RouteTableAssociation]() - for structureContainer0 in associationsContainer { - associationsBuffer?.append(structureContainer0) - } - } - associations = associationsBuffer - } else { - associations = [] - } - } else { - associations = nil - } - if containerValues.contains(.propagatingVgws) { - struct KeyVal0{struct item{}} - let propagatingVgwsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .propagatingVgws) - if let propagatingVgwsWrappedContainer = propagatingVgwsWrappedContainer { - let propagatingVgwsContainer = try propagatingVgwsWrappedContainer.decodeIfPresent([EC2ClientTypes.PropagatingVgw].self, forKey: .member) - var propagatingVgwsBuffer:[EC2ClientTypes.PropagatingVgw]? = nil - if let propagatingVgwsContainer = propagatingVgwsContainer { - propagatingVgwsBuffer = [EC2ClientTypes.PropagatingVgw]() - for structureContainer0 in propagatingVgwsContainer { - propagatingVgwsBuffer?.append(structureContainer0) - } - } - propagatingVgws = propagatingVgwsBuffer - } else { - propagatingVgws = [] - } - } else { - propagatingVgws = nil - } - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - if containerValues.contains(.routes) { - struct KeyVal0{struct item{}} - let routesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routes) - if let routesWrappedContainer = routesWrappedContainer { - let routesContainer = try routesWrappedContainer.decodeIfPresent([EC2ClientTypes.Route].self, forKey: .member) - var routesBuffer:[EC2ClientTypes.Route]? = nil - if let routesContainer = routesContainer { - routesBuffer = [EC2ClientTypes.Route]() - for structureContainer0 in routesContainer { - routesBuffer?.append(structureContainer0) - } - } - routes = routesBuffer - } else { - routes = [] - } - } else { - routes = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RouteTable() + value.associations = try reader["associationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RouteTableAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.propagatingVgws = try reader["propagatingVgwSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PropagatingVgw.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.routeTableId = try reader["routeTableId"].readIfPresent() + value.routes = try reader["routeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Route.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + return value + } } } @@ -161711,15 +115551,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.RouteTableAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationState = "associationState" - case gatewayId = "gatewayId" - case main = "main" - case routeTableAssociationId = "routeTableAssociationId" - case routeTableId = "routeTableId" - case subnetId = "subnetId" - } +extension EC2ClientTypes.RouteTableAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -161743,20 +115575,18 @@ extension EC2ClientTypes.RouteTableAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let mainDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .main) - main = mainDecoded - let routeTableAssociationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableAssociationId) - routeTableAssociationId = routeTableAssociationIdDecoded - let routeTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeTableId) - routeTableId = routeTableIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let gatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayId) - gatewayId = gatewayIdDecoded - let associationStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RouteTableAssociationState.self, forKey: .associationState) - associationState = associationStateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RouteTableAssociation() + value.main = try reader["main"].readIfPresent() + value.routeTableAssociationId = try reader["routeTableAssociationId"].readIfPresent() + value.routeTableId = try reader["routeTableId"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.gatewayId = try reader["gatewayId"].readIfPresent() + value.associationState = try reader["associationState"].readIfPresent(readingClosure: EC2ClientTypes.RouteTableAssociationState.readingClosure) + return value + } } } @@ -161796,11 +115626,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.RouteTableAssociationState: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case statusMessage = "statusMessage" - } +extension EC2ClientTypes.RouteTableAssociationState: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -161812,12 +115638,14 @@ extension EC2ClientTypes.RouteTableAssociationState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RouteTableAssociationStateCode.self, forKey: .state) - state = stateDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RouteTableAssociationState() + value.state = try reader["state"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + return value + } } } @@ -161914,11 +115742,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.RuleGroupRuleOptionsPair: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleGroupArn = "ruleGroupArn" - case ruleOptions = "ruleOptionSet" - } +extension EC2ClientTypes.RuleGroupRuleOptionsPair: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -161939,28 +115763,13 @@ extension EC2ClientTypes.RuleGroupRuleOptionsPair: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleGroupArn) - ruleGroupArn = ruleGroupArnDecoded - if containerValues.contains(.ruleOptions) { - struct KeyVal0{struct item{}} - let ruleOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleOptions) - if let ruleOptionsWrappedContainer = ruleOptionsWrappedContainer { - let ruleOptionsContainer = try ruleOptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.RuleOption].self, forKey: .member) - var ruleOptionsBuffer:[EC2ClientTypes.RuleOption]? = nil - if let ruleOptionsContainer = ruleOptionsContainer { - ruleOptionsBuffer = [EC2ClientTypes.RuleOption]() - for structureContainer0 in ruleOptionsContainer { - ruleOptionsBuffer?.append(structureContainer0) - } - } - ruleOptions = ruleOptionsBuffer - } else { - ruleOptions = [] - } - } else { - ruleOptions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RuleGroupRuleOptionsPair() + value.ruleGroupArn = try reader["ruleGroupArn"].readIfPresent() + value.ruleOptions = try reader["ruleOptionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.RuleOption.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -161985,11 +115794,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.RuleGroupTypePair: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleGroupArn = "ruleGroupArn" - case ruleGroupType = "ruleGroupType" - } +extension EC2ClientTypes.RuleGroupTypePair: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -162001,12 +115806,14 @@ extension EC2ClientTypes.RuleGroupTypePair: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleGroupArn) - ruleGroupArn = ruleGroupArnDecoded - let ruleGroupTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleGroupType) - ruleGroupType = ruleGroupTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RuleGroupTypePair() + value.ruleGroupArn = try reader["ruleGroupArn"].readIfPresent() + value.ruleGroupType = try reader["ruleGroupType"].readIfPresent() + return value + } } } @@ -162030,11 +115837,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.RuleOption: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyword = "keyword" - case settings = "settingSet" - } +extension EC2ClientTypes.RuleOption: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -162055,28 +115858,13 @@ extension EC2ClientTypes.RuleOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keywordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyword) - keyword = keywordDecoded - if containerValues.contains(.settings) { - struct KeyVal0{struct item{}} - let settingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .settings) - if let settingsWrappedContainer = settingsWrappedContainer { - let settingsContainer = try settingsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var settingsBuffer:[Swift.String]? = nil - if let settingsContainer = settingsContainer { - settingsBuffer = [Swift.String]() - for stringContainer0 in settingsContainer { - settingsBuffer?.append(stringContainer0) - } - } - settings = settingsBuffer - } else { - settings = [] - } - } else { - settings = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RuleOption() + value.keyword = try reader["keyword"].readIfPresent() + value.settings = try reader["settingSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -162512,339 +116300,7 @@ public struct RunInstancesInput: Swift.Equatable { } } -struct RunInstancesInputBody: Swift.Equatable { - let blockDeviceMappings: [EC2ClientTypes.BlockDeviceMapping]? - let imageId: Swift.String? - let instanceType: EC2ClientTypes.InstanceType? - let ipv6AddressCount: Swift.Int? - let ipv6Addresses: [EC2ClientTypes.InstanceIpv6Address]? - let kernelId: Swift.String? - let keyName: Swift.String? - let maxCount: Swift.Int? - let minCount: Swift.Int? - let monitoring: EC2ClientTypes.RunInstancesMonitoringEnabled? - let placement: EC2ClientTypes.Placement? - let ramdiskId: Swift.String? - let securityGroupIds: [Swift.String]? - let securityGroups: [Swift.String]? - let subnetId: Swift.String? - let userData: Swift.String? - let additionalInfo: Swift.String? - let clientToken: Swift.String? - let disableApiTermination: Swift.Bool? - let dryRun: Swift.Bool? - let ebsOptimized: Swift.Bool? - let iamInstanceProfile: EC2ClientTypes.IamInstanceProfileSpecification? - let instanceInitiatedShutdownBehavior: EC2ClientTypes.ShutdownBehavior? - let networkInterfaces: [EC2ClientTypes.InstanceNetworkInterfaceSpecification]? - let privateIpAddress: Swift.String? - let elasticGpuSpecification: [EC2ClientTypes.ElasticGpuSpecification]? - let elasticInferenceAccelerators: [EC2ClientTypes.ElasticInferenceAccelerator]? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let launchTemplate: EC2ClientTypes.LaunchTemplateSpecification? - let instanceMarketOptions: EC2ClientTypes.InstanceMarketOptionsRequest? - let creditSpecification: EC2ClientTypes.CreditSpecificationRequest? - let cpuOptions: EC2ClientTypes.CpuOptionsRequest? - let capacityReservationSpecification: EC2ClientTypes.CapacityReservationSpecification? - let hibernationOptions: EC2ClientTypes.HibernationOptionsRequest? - let licenseSpecifications: [EC2ClientTypes.LicenseConfigurationRequest]? - let metadataOptions: EC2ClientTypes.InstanceMetadataOptionsRequest? - let enclaveOptions: EC2ClientTypes.EnclaveOptionsRequest? - let privateDnsNameOptions: EC2ClientTypes.PrivateDnsNameOptionsRequest? - let maintenanceOptions: EC2ClientTypes.InstanceMaintenanceOptionsRequest? - let disableApiStop: Swift.Bool? - let enablePrimaryIpv6: Swift.Bool? -} - -extension RunInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalInfo = "additionalInfo" - case blockDeviceMappings = "BlockDeviceMapping" - case capacityReservationSpecification = "CapacityReservationSpecification" - case clientToken = "clientToken" - case cpuOptions = "CpuOptions" - case creditSpecification = "CreditSpecification" - case disableApiStop = "DisableApiStop" - case disableApiTermination = "disableApiTermination" - case dryRun = "dryRun" - case ebsOptimized = "ebsOptimized" - case elasticGpuSpecification = "ElasticGpuSpecification" - case elasticInferenceAccelerators = "ElasticInferenceAccelerator" - case enablePrimaryIpv6 = "EnablePrimaryIpv6" - case enclaveOptions = "EnclaveOptions" - case hibernationOptions = "HibernationOptions" - case iamInstanceProfile = "iamInstanceProfile" - case imageId = "ImageId" - case instanceInitiatedShutdownBehavior = "instanceInitiatedShutdownBehavior" - case instanceMarketOptions = "InstanceMarketOptions" - case instanceType = "InstanceType" - case ipv6AddressCount = "Ipv6AddressCount" - case ipv6Addresses = "Ipv6Address" - case kernelId = "KernelId" - case keyName = "KeyName" - case launchTemplate = "LaunchTemplate" - case licenseSpecifications = "LicenseSpecification" - case maintenanceOptions = "MaintenanceOptions" - case maxCount = "MaxCount" - case metadataOptions = "MetadataOptions" - case minCount = "MinCount" - case monitoring = "Monitoring" - case networkInterfaces = "networkInterface" - case placement = "Placement" - case privateDnsNameOptions = "PrivateDnsNameOptions" - case privateIpAddress = "privateIpAddress" - case ramdiskId = "RamdiskId" - case securityGroupIds = "SecurityGroupId" - case securityGroups = "SecurityGroup" - case subnetId = "SubnetId" - case tagSpecifications = "TagSpecification" - case userData = "UserData" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct BlockDeviceMapping{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let ipv6AddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6AddressCount) - ipv6AddressCount = ipv6AddressCountDecoded - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct item{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceIpv6Address].self, forKey: .member) - var ipv6AddressesBuffer:[EC2ClientTypes.InstanceIpv6Address]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [EC2ClientTypes.InstanceIpv6Address]() - for structureContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(structureContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let maxCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxCount) - maxCount = maxCountDecoded - let minCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minCount) - minCount = minCountDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RunInstancesMonitoringEnabled.self, forKey: .monitoring) - monitoring = monitoringDecoded - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Placement.self, forKey: .placement) - placement = placementDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct SecurityGroup{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded - let additionalInfoDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .additionalInfo) - additionalInfo = additionalInfoDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let disableApiTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableApiTermination) - disableApiTermination = disableApiTerminationDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileSpecification.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let instanceInitiatedShutdownBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ShutdownBehavior.self, forKey: .instanceInitiatedShutdownBehavior) - instanceInitiatedShutdownBehavior = instanceInitiatedShutdownBehaviorDecoded - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct item{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceNetworkInterfaceSpecification].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.InstanceNetworkInterfaceSpecification]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.InstanceNetworkInterfaceSpecification]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil - } - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.elasticGpuSpecification) { - struct KeyVal0{struct item{}} - let elasticGpuSpecificationWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticGpuSpecification) - if let elasticGpuSpecificationWrappedContainer = elasticGpuSpecificationWrappedContainer { - let elasticGpuSpecificationContainer = try elasticGpuSpecificationWrappedContainer.decodeIfPresent([EC2ClientTypes.ElasticGpuSpecification].self, forKey: .member) - var elasticGpuSpecificationBuffer:[EC2ClientTypes.ElasticGpuSpecification]? = nil - if let elasticGpuSpecificationContainer = elasticGpuSpecificationContainer { - elasticGpuSpecificationBuffer = [EC2ClientTypes.ElasticGpuSpecification]() - for structureContainer0 in elasticGpuSpecificationContainer { - elasticGpuSpecificationBuffer?.append(structureContainer0) - } - } - elasticGpuSpecification = elasticGpuSpecificationBuffer - } else { - elasticGpuSpecification = [] - } - } else { - elasticGpuSpecification = nil - } - if containerValues.contains(.elasticInferenceAccelerators) { - struct KeyVal0{struct item{}} - let elasticInferenceAcceleratorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .elasticInferenceAccelerators) - if let elasticInferenceAcceleratorsWrappedContainer = elasticInferenceAcceleratorsWrappedContainer { - let elasticInferenceAcceleratorsContainer = try elasticInferenceAcceleratorsWrappedContainer.decodeIfPresent([EC2ClientTypes.ElasticInferenceAccelerator].self, forKey: .member) - var elasticInferenceAcceleratorsBuffer:[EC2ClientTypes.ElasticInferenceAccelerator]? = nil - if let elasticInferenceAcceleratorsContainer = elasticInferenceAcceleratorsContainer { - elasticInferenceAcceleratorsBuffer = [EC2ClientTypes.ElasticInferenceAccelerator]() - for structureContainer0 in elasticInferenceAcceleratorsContainer { - elasticInferenceAcceleratorsBuffer?.append(structureContainer0) - } - } - elasticInferenceAccelerators = elasticInferenceAcceleratorsBuffer - } else { - elasticInferenceAccelerators = [] - } - } else { - elasticInferenceAccelerators = nil - } - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let launchTemplateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchTemplateSpecification.self, forKey: .launchTemplate) - launchTemplate = launchTemplateDecoded - let instanceMarketOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMarketOptionsRequest.self, forKey: .instanceMarketOptions) - instanceMarketOptions = instanceMarketOptionsDecoded - let creditSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CreditSpecificationRequest.self, forKey: .creditSpecification) - creditSpecification = creditSpecificationDecoded - let cpuOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CpuOptionsRequest.self, forKey: .cpuOptions) - cpuOptions = cpuOptionsDecoded - let capacityReservationSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CapacityReservationSpecification.self, forKey: .capacityReservationSpecification) - capacityReservationSpecification = capacityReservationSpecificationDecoded - let hibernationOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.HibernationOptionsRequest.self, forKey: .hibernationOptions) - hibernationOptions = hibernationOptionsDecoded - if containerValues.contains(.licenseSpecifications) { - struct KeyVal0{struct item{}} - let licenseSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .licenseSpecifications) - if let licenseSpecificationsWrappedContainer = licenseSpecificationsWrappedContainer { - let licenseSpecificationsContainer = try licenseSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.LicenseConfigurationRequest].self, forKey: .member) - var licenseSpecificationsBuffer:[EC2ClientTypes.LicenseConfigurationRequest]? = nil - if let licenseSpecificationsContainer = licenseSpecificationsContainer { - licenseSpecificationsBuffer = [EC2ClientTypes.LicenseConfigurationRequest]() - for structureContainer0 in licenseSpecificationsContainer { - licenseSpecificationsBuffer?.append(structureContainer0) - } - } - licenseSpecifications = licenseSpecificationsBuffer - } else { - licenseSpecifications = [] - } - } else { - licenseSpecifications = nil - } - let metadataOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMetadataOptionsRequest.self, forKey: .metadataOptions) - metadataOptions = metadataOptionsDecoded - let enclaveOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.EnclaveOptionsRequest.self, forKey: .enclaveOptions) - enclaveOptions = enclaveOptionsDecoded - let privateDnsNameOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PrivateDnsNameOptionsRequest.self, forKey: .privateDnsNameOptions) - privateDnsNameOptions = privateDnsNameOptionsDecoded - let maintenanceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceMaintenanceOptionsRequest.self, forKey: .maintenanceOptions) - maintenanceOptions = maintenanceOptionsDecoded - let disableApiStopDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableApiStop) - disableApiStop = disableApiStopDecoded - let enablePrimaryIpv6Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePrimaryIpv6) - enablePrimaryIpv6 = enablePrimaryIpv6Decoded - } -} - -extension EC2ClientTypes.RunInstancesMonitoringEnabled: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "enabled" - } +extension EC2ClientTypes.RunInstancesMonitoringEnabled: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -162853,10 +116309,13 @@ extension EC2ClientTypes.RunInstancesMonitoringEnabled: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.RunInstancesMonitoringEnabled() + value.enabled = try reader["enabled"].readIfPresent() + return value + } } } @@ -162877,22 +116336,19 @@ extension EC2ClientTypes { } -extension RunInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RunInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.groups = output.groups - self.instances = output.instances - self.ownerId = output.ownerId - self.requesterId = output.requesterId - self.reservationId = output.reservationId - } else { - self.groups = nil - self.instances = nil - self.ownerId = nil - self.requesterId = nil - self.reservationId = nil +extension RunInstancesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RunInstancesOutput() + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instances = try reader["instancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Instance.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ownerId = try reader["ownerId"].readIfPresent() + value.requesterId = try reader["requesterId"].readIfPresent() + value.reservationId = try reader["reservationId"].readIfPresent() + return value } } } @@ -162926,77 +116382,18 @@ public struct RunInstancesOutput: Swift.Equatable { } } -struct RunInstancesOutputBody: Swift.Equatable { - let groups: [EC2ClientTypes.GroupIdentifier]? - let instances: [EC2ClientTypes.Instance]? - let ownerId: Swift.String? - let requesterId: Swift.String? - let reservationId: Swift.String? -} - -extension RunInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groups = "groupSet" - case instances = "instancesSet" - case ownerId = "ownerId" - case requesterId = "requesterId" - case reservationId = "reservationId" - } +enum RunInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.groups) { - struct KeyVal0{struct item{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var groupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - groups = nil - } - if containerValues.contains(.instances) { - struct KeyVal0{struct item{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([EC2ClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[EC2ClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [EC2ClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let requesterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requesterId) - requesterId = requesterIdDecoded - let reservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservationId) - reservationId = reservationIdDecoded - } -} - -enum RunInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -163067,46 +116464,15 @@ public struct RunScheduledInstancesInput: Swift.Equatable { } } -struct RunScheduledInstancesInputBody: Swift.Equatable { - let clientToken: Swift.String? - let dryRun: Swift.Bool? - let instanceCount: Swift.Int? - let launchSpecification: EC2ClientTypes.ScheduledInstancesLaunchSpecification? - let scheduledInstanceId: Swift.String? -} - -extension RunScheduledInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case instanceCount = "InstanceCount" - case launchSpecification = "LaunchSpecification" - case scheduledInstanceId = "ScheduledInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let launchSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ScheduledInstancesLaunchSpecification.self, forKey: .launchSpecification) - launchSpecification = launchSpecificationDecoded - let scheduledInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledInstanceId) - scheduledInstanceId = scheduledInstanceIdDecoded - } -} +extension RunScheduledInstancesOutput { -extension RunScheduledInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RunScheduledInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceIdSet = output.instanceIdSet - } else { - self.instanceIdSet = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = RunScheduledInstancesOutput() + value.instanceIdSet = try reader["instanceIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -163124,53 +116490,23 @@ public struct RunScheduledInstancesOutput: Swift.Equatable { } } -struct RunScheduledInstancesOutputBody: Swift.Equatable { - let instanceIdSet: [Swift.String]? -} +enum RunScheduledInstancesOutputError { -extension RunScheduledInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceIdSet = "instanceIdSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIdSet) { - struct KeyVal0{struct item{}} - let instanceIdSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIdSet) - if let instanceIdSetWrappedContainer = instanceIdSetWrappedContainer { - let instanceIdSetContainer = try instanceIdSetWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdSetBuffer:[Swift.String]? = nil - if let instanceIdSetContainer = instanceIdSetContainer { - instanceIdSetBuffer = [Swift.String]() - for stringContainer0 in instanceIdSetContainer { - instanceIdSetBuffer?.append(stringContainer0) - } - } - instanceIdSet = instanceIdSetBuffer - } else { - instanceIdSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceIdSet = nil } } } -enum RunScheduledInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.S3ObjectTag: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case value = "Value" - } +extension EC2ClientTypes.S3ObjectTag: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -163182,12 +116518,14 @@ extension EC2ClientTypes.S3ObjectTag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.S3ObjectTag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -163211,14 +116549,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.S3Storage: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case awsAccessKeyId = "AWSAccessKeyId" - case bucket = "bucket" - case `prefix` = "prefix" - case uploadPolicy = "uploadPolicy" - case uploadPolicySignature = "uploadPolicySignature" - } +extension EC2ClientTypes.S3Storage: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -163239,26 +116570,17 @@ extension EC2ClientTypes.S3Storage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let awsAccessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsAccessKeyId) - awsAccessKeyId = awsAccessKeyIdDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - if containerValues.contains(.uploadPolicy) { - do { - let uploadPolicyDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .uploadPolicy) - uploadPolicy = uploadPolicyDecoded - } catch { - uploadPolicy = "".data(using: .utf8) - } - } else { - uploadPolicy = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.S3Storage() + value.awsAccessKeyId = try reader["AWSAccessKeyId"].readIfPresent() + value.bucket = try reader["bucket"].readIfPresent() + value.`prefix` = try reader["prefix"].readIfPresent() + value.uploadPolicy = try reader["uploadPolicy"].readIfPresent() + value.uploadPolicySignature = try reader["uploadPolicySignature"].readIfPresent() + return value } - let uploadPolicySignatureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uploadPolicySignature) - uploadPolicySignature = uploadPolicySignatureDecoded } } @@ -163334,24 +116656,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ScheduledInstance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case createDate = "createDate" - case hourlyPrice = "hourlyPrice" - case instanceCount = "instanceCount" - case instanceType = "instanceType" - case networkPlatform = "networkPlatform" - case nextSlotStartTime = "nextSlotStartTime" - case platform = "platform" - case previousSlotEndTime = "previousSlotEndTime" - case recurrence = "recurrence" - case scheduledInstanceId = "scheduledInstanceId" - case slotDurationInHours = "slotDurationInHours" - case termEndDate = "termEndDate" - case termStartDate = "termStartDate" - case totalScheduledInstanceHours = "totalScheduledInstanceHours" - } +extension EC2ClientTypes.ScheduledInstance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -163402,38 +116707,27 @@ extension EC2ClientTypes.ScheduledInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let hourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hourlyPrice) - hourlyPrice = hourlyPriceDecoded - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let networkPlatformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkPlatform) - networkPlatform = networkPlatformDecoded - let nextSlotStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nextSlotStartTime) - nextSlotStartTime = nextSlotStartTimeDecoded - let platformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platform) - platform = platformDecoded - let previousSlotEndTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .previousSlotEndTime) - previousSlotEndTime = previousSlotEndTimeDecoded - let recurrenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ScheduledInstanceRecurrence.self, forKey: .recurrence) - recurrence = recurrenceDecoded - let scheduledInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledInstanceId) - scheduledInstanceId = scheduledInstanceIdDecoded - let slotDurationInHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .slotDurationInHours) - slotDurationInHours = slotDurationInHoursDecoded - let termEndDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .termEndDate) - termEndDate = termEndDateDecoded - let termStartDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .termStartDate) - termStartDate = termStartDateDecoded - let totalScheduledInstanceHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalScheduledInstanceHours) - totalScheduledInstanceHours = totalScheduledInstanceHoursDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstance() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.createDate = try reader["createDate"].readTimestampIfPresent(format: .dateTime) + value.hourlyPrice = try reader["hourlyPrice"].readIfPresent() + value.instanceCount = try reader["instanceCount"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.networkPlatform = try reader["networkPlatform"].readIfPresent() + value.nextSlotStartTime = try reader["nextSlotStartTime"].readTimestampIfPresent(format: .dateTime) + value.platform = try reader["platform"].readIfPresent() + value.previousSlotEndTime = try reader["previousSlotEndTime"].readTimestampIfPresent(format: .dateTime) + value.recurrence = try reader["recurrence"].readIfPresent(readingClosure: EC2ClientTypes.ScheduledInstanceRecurrence.readingClosure) + value.scheduledInstanceId = try reader["scheduledInstanceId"].readIfPresent() + value.slotDurationInHours = try reader["slotDurationInHours"].readIfPresent() + value.termEndDate = try reader["termEndDate"].readTimestampIfPresent(format: .dateTime) + value.termStartDate = try reader["termStartDate"].readTimestampIfPresent(format: .dateTime) + value.totalScheduledInstanceHours = try reader["totalScheduledInstanceHours"].readIfPresent() + return value + } } } @@ -163509,22 +116803,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstanceAvailability: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case availableInstanceCount = "availableInstanceCount" - case firstSlotStartTime = "firstSlotStartTime" - case hourlyPrice = "hourlyPrice" - case instanceType = "instanceType" - case maxTermDurationInDays = "maxTermDurationInDays" - case minTermDurationInDays = "minTermDurationInDays" - case networkPlatform = "networkPlatform" - case platform = "platform" - case purchaseToken = "purchaseToken" - case recurrence = "recurrence" - case slotDurationInHours = "slotDurationInHours" - case totalScheduledInstanceHours = "totalScheduledInstanceHours" - } +extension EC2ClientTypes.ScheduledInstanceAvailability: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -163569,34 +116848,25 @@ extension EC2ClientTypes.ScheduledInstanceAvailability: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let availableInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .availableInstanceCount) - availableInstanceCount = availableInstanceCountDecoded - let firstSlotStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .firstSlotStartTime) - firstSlotStartTime = firstSlotStartTimeDecoded - let hourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hourlyPrice) - hourlyPrice = hourlyPriceDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let maxTermDurationInDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxTermDurationInDays) - maxTermDurationInDays = maxTermDurationInDaysDecoded - let minTermDurationInDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minTermDurationInDays) - minTermDurationInDays = minTermDurationInDaysDecoded - let networkPlatformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkPlatform) - networkPlatform = networkPlatformDecoded - let platformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platform) - platform = platformDecoded - let purchaseTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .purchaseToken) - purchaseToken = purchaseTokenDecoded - let recurrenceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ScheduledInstanceRecurrence.self, forKey: .recurrence) - recurrence = recurrenceDecoded - let slotDurationInHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .slotDurationInHours) - slotDurationInHours = slotDurationInHoursDecoded - let totalScheduledInstanceHoursDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalScheduledInstanceHours) - totalScheduledInstanceHours = totalScheduledInstanceHoursDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstanceAvailability() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.availableInstanceCount = try reader["availableInstanceCount"].readIfPresent() + value.firstSlotStartTime = try reader["firstSlotStartTime"].readTimestampIfPresent(format: .dateTime) + value.hourlyPrice = try reader["hourlyPrice"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.maxTermDurationInDays = try reader["maxTermDurationInDays"].readIfPresent() + value.minTermDurationInDays = try reader["minTermDurationInDays"].readIfPresent() + value.networkPlatform = try reader["networkPlatform"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + value.purchaseToken = try reader["purchaseToken"].readIfPresent() + value.recurrence = try reader["recurrence"].readIfPresent(readingClosure: EC2ClientTypes.ScheduledInstanceRecurrence.readingClosure) + value.slotDurationInHours = try reader["slotDurationInHours"].readIfPresent() + value.totalScheduledInstanceHours = try reader["totalScheduledInstanceHours"].readIfPresent() + return value + } } } @@ -163664,14 +116934,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstanceRecurrence: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case frequency = "frequency" - case interval = "interval" - case occurrenceDaySet = "occurrenceDaySet" - case occurrenceRelativeToEnd = "occurrenceRelativeToEnd" - case occurrenceUnit = "occurrenceUnit" - } +extension EC2ClientTypes.ScheduledInstanceRecurrence: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -163701,35 +116964,17 @@ extension EC2ClientTypes.ScheduledInstanceRecurrence: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let frequencyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .frequency) - frequency = frequencyDecoded - let intervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .interval) - interval = intervalDecoded - if containerValues.contains(.occurrenceDaySet) { - struct KeyVal0{struct item{}} - let occurrenceDaySetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .occurrenceDaySet) - if let occurrenceDaySetWrappedContainer = occurrenceDaySetWrappedContainer { - let occurrenceDaySetContainer = try occurrenceDaySetWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var occurrenceDaySetBuffer:[Swift.Int]? = nil - if let occurrenceDaySetContainer = occurrenceDaySetContainer { - occurrenceDaySetBuffer = [Swift.Int]() - for integerContainer0 in occurrenceDaySetContainer { - occurrenceDaySetBuffer?.append(integerContainer0) - } - } - occurrenceDaySet = occurrenceDaySetBuffer - } else { - occurrenceDaySet = [] - } - } else { - occurrenceDaySet = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstanceRecurrence() + value.frequency = try reader["frequency"].readIfPresent() + value.interval = try reader["interval"].readIfPresent() + value.occurrenceDaySet = try reader["occurrenceDaySet"].readListIfPresent(memberReadingClosure: Swift.Int.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.occurrenceRelativeToEnd = try reader["occurrenceRelativeToEnd"].readIfPresent() + value.occurrenceUnit = try reader["occurrenceUnit"].readIfPresent() + return value } - let occurrenceRelativeToEndDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .occurrenceRelativeToEnd) - occurrenceRelativeToEnd = occurrenceRelativeToEndDecoded - let occurrenceUnitDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .occurrenceUnit) - occurrenceUnit = occurrenceUnitDecoded } } @@ -163765,14 +117010,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstanceRecurrenceRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case frequency = "Frequency" - case interval = "Interval" - case occurrenceDays = "OccurrenceDay" - case occurrenceRelativeToEnd = "OccurrenceRelativeToEnd" - case occurrenceUnit = "OccurrenceUnit" - } +extension EC2ClientTypes.ScheduledInstanceRecurrenceRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -163802,35 +117040,17 @@ extension EC2ClientTypes.ScheduledInstanceRecurrenceRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let frequencyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .frequency) - frequency = frequencyDecoded - let intervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .interval) - interval = intervalDecoded - if containerValues.contains(.occurrenceDays) { - struct KeyVal0{struct OccurenceDay{}} - let occurrenceDaysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .occurrenceDays) - if let occurrenceDaysWrappedContainer = occurrenceDaysWrappedContainer { - let occurrenceDaysContainer = try occurrenceDaysWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var occurrenceDaysBuffer:[Swift.Int]? = nil - if let occurrenceDaysContainer = occurrenceDaysContainer { - occurrenceDaysBuffer = [Swift.Int]() - for integerContainer0 in occurrenceDaysContainer { - occurrenceDaysBuffer?.append(integerContainer0) - } - } - occurrenceDays = occurrenceDaysBuffer - } else { - occurrenceDays = [] - } - } else { - occurrenceDays = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstanceRecurrenceRequest() + value.frequency = try reader["Frequency"].readIfPresent() + value.interval = try reader["Interval"].readIfPresent() + value.occurrenceDays = try reader["OccurrenceDay"].readListIfPresent(memberReadingClosure: Swift.Int.readingClosure, memberNodeInfo: "OccurenceDay", isFlattened: false) + value.occurrenceRelativeToEnd = try reader["OccurrenceRelativeToEnd"].readIfPresent() + value.occurrenceUnit = try reader["OccurrenceUnit"].readIfPresent() + return value } - let occurrenceRelativeToEndDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .occurrenceRelativeToEnd) - occurrenceRelativeToEnd = occurrenceRelativeToEndDecoded - let occurrenceUnitDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .occurrenceUnit) - occurrenceUnit = occurrenceUnitDecoded } } @@ -163866,13 +117086,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesBlockDeviceMapping: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deviceName = "DeviceName" - case ebs = "Ebs" - case noDevice = "NoDevice" - case virtualName = "VirtualName" - } +extension EC2ClientTypes.ScheduledInstancesBlockDeviceMapping: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -163890,16 +117104,16 @@ extension EC2ClientTypes.ScheduledInstancesBlockDeviceMapping: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let ebsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ScheduledInstancesEbs.self, forKey: .ebs) - ebs = ebsDecoded - let noDeviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .noDevice) - noDevice = noDeviceDecoded - let virtualNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualName) - virtualName = virtualNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesBlockDeviceMapping() + value.deviceName = try reader["DeviceName"].readIfPresent() + value.ebs = try reader["Ebs"].readIfPresent(readingClosure: EC2ClientTypes.ScheduledInstancesEbs.readingClosure) + value.noDevice = try reader["NoDevice"].readIfPresent() + value.virtualName = try reader["VirtualName"].readIfPresent() + return value + } } } @@ -163931,15 +117145,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesEbs: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deleteOnTermination = "DeleteOnTermination" - case encrypted = "Encrypted" - case iops = "Iops" - case snapshotId = "SnapshotId" - case volumeSize = "VolumeSize" - case volumeType = "VolumeType" - } +extension EC2ClientTypes.ScheduledInstancesEbs: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -163963,20 +117169,18 @@ extension EC2ClientTypes.ScheduledInstancesEbs: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let volumeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeType) - volumeType = volumeTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesEbs() + value.deleteOnTermination = try reader["DeleteOnTermination"].readIfPresent() + value.encrypted = try reader["Encrypted"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.snapshotId = try reader["SnapshotId"].readIfPresent() + value.volumeSize = try reader["VolumeSize"].readIfPresent() + value.volumeType = try reader["VolumeType"].readIfPresent() + return value + } } } @@ -164016,11 +117220,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesIamInstanceProfile: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case name = "Name" - } +extension EC2ClientTypes.ScheduledInstancesIamInstanceProfile: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -164032,12 +117232,14 @@ extension EC2ClientTypes.ScheduledInstancesIamInstanceProfile: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesIamInstanceProfile() + value.arn = try reader["Arn"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -164061,10 +117263,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesIpv6Address: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Address = "Ipv6Address" - } +extension EC2ClientTypes.ScheduledInstancesIpv6Address: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -164073,10 +117272,13 @@ extension EC2ClientTypes.ScheduledInstancesIpv6Address: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesIpv6Address() + value.ipv6Address = try reader["Ipv6Address"].readIfPresent() + return value + } } } @@ -164096,23 +117298,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesLaunchSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDeviceMappings = "BlockDeviceMapping" - case ebsOptimized = "EbsOptimized" - case iamInstanceProfile = "IamInstanceProfile" - case imageId = "ImageId" - case instanceType = "InstanceType" - case kernelId = "KernelId" - case keyName = "KeyName" - case monitoring = "Monitoring" - case networkInterfaces = "NetworkInterface" - case placement = "Placement" - case ramdiskId = "RamdiskId" - case securityGroupIds = "SecurityGroupId" - case subnetId = "SubnetId" - case userData = "UserData" - } +extension EC2ClientTypes.ScheduledInstancesLaunchSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -164187,87 +117373,26 @@ extension EC2ClientTypes.ScheduledInstancesLaunchSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct BlockDeviceMapping{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.ScheduledInstancesBlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.ScheduledInstancesBlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.ScheduledInstancesBlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ScheduledInstancesIamInstanceProfile.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ScheduledInstancesMonitoring.self, forKey: .monitoring) - monitoring = monitoringDecoded - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct NetworkInterface{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.ScheduledInstancesNetworkInterface].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.ScheduledInstancesNetworkInterface]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.ScheduledInstancesNetworkInterface]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil - } - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ScheduledInstancesPlacement.self, forKey: .placement) - placement = placementDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesLaunchSpecification() + value.blockDeviceMappings = try reader["BlockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ScheduledInstancesBlockDeviceMapping.readingClosure, memberNodeInfo: "BlockDeviceMapping", isFlattened: false) + value.ebsOptimized = try reader["EbsOptimized"].readIfPresent() + value.iamInstanceProfile = try reader["IamInstanceProfile"].readIfPresent(readingClosure: EC2ClientTypes.ScheduledInstancesIamInstanceProfile.readingClosure) + value.imageId = try reader["ImageId"].readIfPresent() + value.instanceType = try reader["InstanceType"].readIfPresent() + value.kernelId = try reader["KernelId"].readIfPresent() + value.keyName = try reader["KeyName"].readIfPresent() + value.monitoring = try reader["Monitoring"].readIfPresent(readingClosure: EC2ClientTypes.ScheduledInstancesMonitoring.readingClosure) + value.networkInterfaces = try reader["NetworkInterface"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ScheduledInstancesNetworkInterface.readingClosure, memberNodeInfo: "NetworkInterface", isFlattened: false) + value.placement = try reader["Placement"].readIfPresent(readingClosure: EC2ClientTypes.ScheduledInstancesPlacement.readingClosure) + value.ramdiskId = try reader["RamdiskId"].readIfPresent() + value.securityGroupIds = try reader["SecurityGroupId"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroupId", isFlattened: false) + value.subnetId = try reader["SubnetId"].readIfPresent() + value.userData = try reader["UserData"].readIfPresent() + return value + } } } @@ -164346,10 +117471,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesMonitoring: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - } +extension EC2ClientTypes.ScheduledInstancesMonitoring: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -164358,10 +117480,13 @@ extension EC2ClientTypes.ScheduledInstancesMonitoring: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesMonitoring() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -164381,21 +117506,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesNetworkInterface: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatePublicIpAddress = "AssociatePublicIpAddress" - case deleteOnTermination = "DeleteOnTermination" - case description = "Description" - case deviceIndex = "DeviceIndex" - case groups = "Group" - case ipv6AddressCount = "Ipv6AddressCount" - case ipv6Addresses = "Ipv6Address" - case networkInterfaceId = "NetworkInterfaceId" - case privateIpAddress = "PrivateIpAddress" - case privateIpAddressConfigs = "PrivateIpAddressConfig" - case secondaryPrivateIpAddressCount = "SecondaryPrivateIpAddressCount" - case subnetId = "SubnetId" - } +extension EC2ClientTypes.ScheduledInstancesNetworkInterface: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -164464,83 +117575,24 @@ extension EC2ClientTypes.ScheduledInstancesNetworkInterface: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associatePublicIpAddressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associatePublicIpAddress) - associatePublicIpAddress = associatePublicIpAddressDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let deviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deviceIndex) - deviceIndex = deviceIndexDecoded - if containerValues.contains(.groups) { - struct KeyVal0{struct SecurityGroupId{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupsBuffer:[Swift.String]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [Swift.String]() - for stringContainer0 in groupsContainer { - groupsBuffer?.append(stringContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let ipv6AddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ipv6AddressCount) - ipv6AddressCount = ipv6AddressCountDecoded - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct Ipv6Address{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.ScheduledInstancesIpv6Address].self, forKey: .member) - var ipv6AddressesBuffer:[EC2ClientTypes.ScheduledInstancesIpv6Address]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [EC2ClientTypes.ScheduledInstancesIpv6Address]() - for structureContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(structureContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - if containerValues.contains(.privateIpAddressConfigs) { - struct KeyVal0{struct PrivateIpAddressConfigSet{}} - let privateIpAddressConfigsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddressConfigs) - if let privateIpAddressConfigsWrappedContainer = privateIpAddressConfigsWrappedContainer { - let privateIpAddressConfigsContainer = try privateIpAddressConfigsWrappedContainer.decodeIfPresent([EC2ClientTypes.ScheduledInstancesPrivateIpAddressConfig].self, forKey: .member) - var privateIpAddressConfigsBuffer:[EC2ClientTypes.ScheduledInstancesPrivateIpAddressConfig]? = nil - if let privateIpAddressConfigsContainer = privateIpAddressConfigsContainer { - privateIpAddressConfigsBuffer = [EC2ClientTypes.ScheduledInstancesPrivateIpAddressConfig]() - for structureContainer0 in privateIpAddressConfigsContainer { - privateIpAddressConfigsBuffer?.append(structureContainer0) - } - } - privateIpAddressConfigs = privateIpAddressConfigsBuffer - } else { - privateIpAddressConfigs = [] - } - } else { - privateIpAddressConfigs = nil - } - let secondaryPrivateIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondaryPrivateIpAddressCount) - secondaryPrivateIpAddressCount = secondaryPrivateIpAddressCountDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesNetworkInterface() + value.associatePublicIpAddress = try reader["AssociatePublicIpAddress"].readIfPresent() + value.deleteOnTermination = try reader["DeleteOnTermination"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.deviceIndex = try reader["DeviceIndex"].readIfPresent() + value.groups = try reader["Group"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroupId", isFlattened: false) + value.ipv6AddressCount = try reader["Ipv6AddressCount"].readIfPresent() + value.ipv6Addresses = try reader["Ipv6Address"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ScheduledInstancesIpv6Address.readingClosure, memberNodeInfo: "Ipv6Address", isFlattened: false) + value.networkInterfaceId = try reader["NetworkInterfaceId"].readIfPresent() + value.privateIpAddress = try reader["PrivateIpAddress"].readIfPresent() + value.privateIpAddressConfigs = try reader["PrivateIpAddressConfig"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ScheduledInstancesPrivateIpAddressConfig.readingClosure, memberNodeInfo: "PrivateIpAddressConfigSet", isFlattened: false) + value.secondaryPrivateIpAddressCount = try reader["SecondaryPrivateIpAddressCount"].readIfPresent() + value.subnetId = try reader["SubnetId"].readIfPresent() + return value + } } } @@ -164604,11 +117656,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesPlacement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "AvailabilityZone" - case groupName = "GroupName" - } +extension EC2ClientTypes.ScheduledInstancesPlacement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -164620,12 +117668,14 @@ extension EC2ClientTypes.ScheduledInstancesPlacement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesPlacement() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.groupName = try reader["GroupName"].readIfPresent() + return value + } } } @@ -164649,11 +117699,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ScheduledInstancesPrivateIpAddressConfig: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case primary = "Primary" - case privateIpAddress = "PrivateIpAddress" - } +extension EC2ClientTypes.ScheduledInstancesPrivateIpAddressConfig: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -164665,12 +117711,14 @@ extension EC2ClientTypes.ScheduledInstancesPrivateIpAddressConfig: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let primaryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .primary) - primary = primaryDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ScheduledInstancesPrivateIpAddressConfig() + value.primary = try reader["Primary"].readIfPresent() + value.privateIpAddress = try reader["PrivateIpAddress"].readIfPresent() + return value + } } } @@ -164808,65 +117856,16 @@ public struct SearchLocalGatewayRoutesInput: Swift.Equatable { } } -struct SearchLocalGatewayRoutesInputBody: Swift.Equatable { - let localGatewayRouteTableId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension SearchLocalGatewayRoutesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case localGatewayRouteTableId = "LocalGatewayRouteTableId" - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let localGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localGatewayRouteTableId) - localGatewayRouteTableId = localGatewayRouteTableIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension SearchLocalGatewayRoutesOutput { -extension SearchLocalGatewayRoutesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SearchLocalGatewayRoutesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.routes = output.routes - } else { - self.nextToken = nil - self.routes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = SearchLocalGatewayRoutesOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.routes = try reader["routeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LocalGatewayRoute.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -164887,48 +117886,18 @@ public struct SearchLocalGatewayRoutesOutput: Swift.Equatable { } } -struct SearchLocalGatewayRoutesOutputBody: Swift.Equatable { - let routes: [EC2ClientTypes.LocalGatewayRoute]? - let nextToken: Swift.String? -} - -extension SearchLocalGatewayRoutesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "nextToken" - case routes = "routeSet" - } +enum SearchLocalGatewayRoutesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.routes) { - struct KeyVal0{struct item{}} - let routesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routes) - if let routesWrappedContainer = routesWrappedContainer { - let routesContainer = try routesWrappedContainer.decodeIfPresent([EC2ClientTypes.LocalGatewayRoute].self, forKey: .member) - var routesBuffer:[EC2ClientTypes.LocalGatewayRoute]? = nil - if let routesContainer = routesContainer { - routesBuffer = [EC2ClientTypes.LocalGatewayRoute]() - for structureContainer0 in routesContainer { - routesBuffer?.append(structureContainer0) - } - } - routes = routesBuffer - } else { - routes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - routes = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum SearchLocalGatewayRoutesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -165019,65 +117988,16 @@ public struct SearchTransitGatewayMulticastGroupsInput: Swift.Equatable { } } -struct SearchTransitGatewayMulticastGroupsInputBody: Swift.Equatable { - let transitGatewayMulticastDomainId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let nextToken: Swift.String? - let dryRun: Swift.Bool? -} - -extension SearchTransitGatewayMulticastGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case nextToken = "NextToken" - case transitGatewayMulticastDomainId = "TransitGatewayMulticastDomainId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension SearchTransitGatewayMulticastGroupsOutput { -extension SearchTransitGatewayMulticastGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SearchTransitGatewayMulticastGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.multicastGroups = output.multicastGroups - self.nextToken = output.nextToken - } else { - self.multicastGroups = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = SearchTransitGatewayMulticastGroupsOutput() + value.multicastGroups = try reader["multicastGroups"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayMulticastGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.nextToken = try reader["nextToken"].readIfPresent() + return value } } } @@ -165098,48 +118018,18 @@ public struct SearchTransitGatewayMulticastGroupsOutput: Swift.Equatable { } } -struct SearchTransitGatewayMulticastGroupsOutputBody: Swift.Equatable { - let multicastGroups: [EC2ClientTypes.TransitGatewayMulticastGroup]? - let nextToken: Swift.String? -} +enum SearchTransitGatewayMulticastGroupsOutputError { -extension SearchTransitGatewayMulticastGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case multicastGroups = "multicastGroups" - case nextToken = "nextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.multicastGroups) { - struct KeyVal0{struct item{}} - let multicastGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .multicastGroups) - if let multicastGroupsWrappedContainer = multicastGroupsWrappedContainer { - let multicastGroupsContainer = try multicastGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayMulticastGroup].self, forKey: .member) - var multicastGroupsBuffer:[EC2ClientTypes.TransitGatewayMulticastGroup]? = nil - if let multicastGroupsContainer = multicastGroupsContainer { - multicastGroupsBuffer = [EC2ClientTypes.TransitGatewayMulticastGroup]() - for structureContainer0 in multicastGroupsContainer { - multicastGroupsBuffer?.append(structureContainer0) - } - } - multicastGroups = multicastGroupsBuffer - } else { - multicastGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - multicastGroups = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum SearchTransitGatewayMulticastGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -165226,61 +118116,16 @@ public struct SearchTransitGatewayRoutesInput: Swift.Equatable { } } -struct SearchTransitGatewayRoutesInputBody: Swift.Equatable { - let transitGatewayRouteTableId: Swift.String? - let filters: [EC2ClientTypes.Filter]? - let maxResults: Swift.Int? - let dryRun: Swift.Bool? -} - -extension SearchTransitGatewayRoutesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case filters = "Filter" - case maxResults = "MaxResults" - case transitGatewayRouteTableId = "TransitGatewayRouteTableId" - } +extension SearchTransitGatewayRoutesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([EC2ClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[EC2ClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [EC2ClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension SearchTransitGatewayRoutesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SearchTransitGatewayRoutesOutputBody = try responseDecoder.decode(responseBody: data) - self.additionalRoutesAvailable = output.additionalRoutesAvailable - self.routes = output.routes - } else { - self.additionalRoutesAvailable = nil - self.routes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = SearchTransitGatewayRoutesOutput() + value.additionalRoutesAvailable = try reader["additionalRoutesAvailable"].readIfPresent() + value.routes = try reader["routeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayRoute.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -165301,63 +118146,23 @@ public struct SearchTransitGatewayRoutesOutput: Swift.Equatable { } } -struct SearchTransitGatewayRoutesOutputBody: Swift.Equatable { - let routes: [EC2ClientTypes.TransitGatewayRoute]? - let additionalRoutesAvailable: Swift.Bool? -} - -extension SearchTransitGatewayRoutesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalRoutesAvailable = "additionalRoutesAvailable" - case routes = "routeSet" - } +enum SearchTransitGatewayRoutesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.routes) { - struct KeyVal0{struct item{}} - let routesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routes) - if let routesWrappedContainer = routesWrappedContainer { - let routesContainer = try routesWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayRoute].self, forKey: .member) - var routesBuffer:[EC2ClientTypes.TransitGatewayRoute]? = nil - if let routesContainer = routesContainer { - routesBuffer = [EC2ClientTypes.TransitGatewayRoute]() - for structureContainer0 in routesContainer { - routesBuffer?.append(structureContainer0) - } - } - routes = routesBuffer - } else { - routes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - routes = nil - } - let additionalRoutesAvailableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .additionalRoutesAvailable) - additionalRoutesAvailable = additionalRoutesAvailableDecoded - } -} - -enum SearchTransitGatewayRoutesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } -extension EC2ClientTypes.SecurityGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "groupDescription" - case groupId = "groupId" - case groupName = "groupName" - case ipPermissions = "ipPermissions" - case ipPermissionsEgress = "ipPermissionsEgress" - case ownerId = "ownerId" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.SecurityGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -165414,75 +118219,20 @@ extension EC2ClientTypes.SecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - if containerValues.contains(.ipPermissions) { - struct KeyVal0{struct item{}} - let ipPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipPermissions) - if let ipPermissionsWrappedContainer = ipPermissionsWrappedContainer { - let ipPermissionsContainer = try ipPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var ipPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let ipPermissionsContainer = ipPermissionsContainer { - ipPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in ipPermissionsContainer { - ipPermissionsBuffer?.append(structureContainer0) - } - } - ipPermissions = ipPermissionsBuffer - } else { - ipPermissions = [] - } - } else { - ipPermissions = nil - } - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - if containerValues.contains(.ipPermissionsEgress) { - struct KeyVal0{struct item{}} - let ipPermissionsEgressWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipPermissionsEgress) - if let ipPermissionsEgressWrappedContainer = ipPermissionsEgressWrappedContainer { - let ipPermissionsEgressContainer = try ipPermissionsEgressWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var ipPermissionsEgressBuffer:[EC2ClientTypes.IpPermission]? = nil - if let ipPermissionsEgressContainer = ipPermissionsEgressContainer { - ipPermissionsEgressBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in ipPermissionsEgressContainer { - ipPermissionsEgressBuffer?.append(structureContainer0) - } - } - ipPermissionsEgress = ipPermissionsEgressBuffer - } else { - ipPermissionsEgress = [] - } - } else { - ipPermissionsEgress = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SecurityGroup() + value.description = try reader["groupDescription"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.ipPermissions = try reader["ipPermissions"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ownerId = try reader["ownerId"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + value.ipPermissionsEgress = try reader["ipPermissionsEgress"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IpPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + return value + } } } @@ -165530,15 +118280,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SecurityGroupForVpc: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case groupId = "groupId" - case groupName = "groupName" - case ownerId = "ownerId" - case primaryVpcId = "primaryVpcId" - case tags = "tagSet" - } +extension EC2ClientTypes.SecurityGroupForVpc: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -165571,37 +118313,18 @@ extension EC2ClientTypes.SecurityGroupForVpc: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SecurityGroupForVpc() + value.description = try reader["description"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.primaryVpcId = try reader["primaryVpcId"].readIfPresent() + return value } - let primaryVpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryVpcId) - primaryVpcId = primaryVpcIdDecoded } } @@ -165641,11 +118364,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SecurityGroupIdentifier: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupId = "groupId" - case groupName = "groupName" - } +extension EC2ClientTypes.SecurityGroupIdentifier: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -165657,12 +118376,14 @@ extension EC2ClientTypes.SecurityGroupIdentifier: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SecurityGroupIdentifier() + value.groupId = try reader["groupId"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + return value + } } } @@ -165686,13 +118407,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SecurityGroupReference: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupId = "groupId" - case referencingVpcId = "referencingVpcId" - case transitGatewayId = "transitGatewayId" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } +extension EC2ClientTypes.SecurityGroupReference: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -165710,16 +118425,16 @@ extension EC2ClientTypes.SecurityGroupReference: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let referencingVpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .referencingVpcId) - referencingVpcId = referencingVpcIdDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SecurityGroupReference() + value.groupId = try reader["groupId"].readIfPresent() + value.referencingVpcId = try reader["referencingVpcId"].readIfPresent() + value.vpcPeeringConnectionId = try reader["vpcPeeringConnectionId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + return value + } } } @@ -165783,22 +118498,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SecurityGroupRule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrIpv4 = "cidrIpv4" - case cidrIpv6 = "cidrIpv6" - case description = "description" - case fromPort = "fromPort" - case groupId = "groupId" - case groupOwnerId = "groupOwnerId" - case ipProtocol = "ipProtocol" - case isEgress = "isEgress" - case prefixListId = "prefixListId" - case referencedGroupInfo = "referencedGroupInfo" - case securityGroupRuleId = "securityGroupRuleId" - case tags = "tagSet" - case toPort = "toPort" - } +extension EC2ClientTypes.SecurityGroupRule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -165852,50 +118552,24 @@ extension EC2ClientTypes.SecurityGroupRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let securityGroupRuleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .securityGroupRuleId) - securityGroupRuleId = securityGroupRuleIdDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupOwnerId) - groupOwnerId = groupOwnerIdDecoded - let isEgressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEgress) - isEgress = isEgressDecoded - let ipProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipProtocol) - ipProtocol = ipProtocolDecoded - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded - let cidrIpv4Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIpv4) - cidrIpv4 = cidrIpv4Decoded - let cidrIpv6Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIpv6) - cidrIpv6 = cidrIpv6Decoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let referencedGroupInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReferencedSecurityGroup.self, forKey: .referencedGroupInfo) - referencedGroupInfo = referencedGroupInfoDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SecurityGroupRule() + value.securityGroupRuleId = try reader["securityGroupRuleId"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + value.groupOwnerId = try reader["groupOwnerId"].readIfPresent() + value.isEgress = try reader["isEgress"].readIfPresent() + value.ipProtocol = try reader["ipProtocol"].readIfPresent() + value.fromPort = try reader["fromPort"].readIfPresent() + value.toPort = try reader["toPort"].readIfPresent() + value.cidrIpv4 = try reader["cidrIpv4"].readIfPresent() + value.cidrIpv6 = try reader["cidrIpv6"].readIfPresent() + value.prefixListId = try reader["prefixListId"].readIfPresent() + value.referencedGroupInfo = try reader["referencedGroupInfo"].readIfPresent(readingClosure: EC2ClientTypes.ReferencedSecurityGroup.readingClosure) + value.description = try reader["description"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -165964,11 +118638,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SecurityGroupRuleDescription: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case securityGroupRuleId = "SecurityGroupRuleId" - } +extension EC2ClientTypes.SecurityGroupRuleDescription: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -165980,12 +118650,14 @@ extension EC2ClientTypes.SecurityGroupRuleDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let securityGroupRuleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .securityGroupRuleId) - securityGroupRuleId = securityGroupRuleIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SecurityGroupRuleDescription() + value.securityGroupRuleId = try reader["SecurityGroupRuleId"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -166009,17 +118681,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SecurityGroupRuleRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrIpv4 = "CidrIpv4" - case cidrIpv6 = "CidrIpv6" - case description = "Description" - case fromPort = "FromPort" - case ipProtocol = "IpProtocol" - case prefixListId = "PrefixListId" - case referencedGroupId = "ReferencedGroupId" - case toPort = "ToPort" - } +extension EC2ClientTypes.SecurityGroupRuleRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -166049,24 +118711,20 @@ extension EC2ClientTypes.SecurityGroupRuleRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipProtocol) - ipProtocol = ipProtocolDecoded - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded - let cidrIpv4Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIpv4) - cidrIpv4 = cidrIpv4Decoded - let cidrIpv6Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrIpv6) - cidrIpv6 = cidrIpv6Decoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let referencedGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .referencedGroupId) - referencedGroupId = referencedGroupIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SecurityGroupRuleRequest() + value.ipProtocol = try reader["IpProtocol"].readIfPresent() + value.fromPort = try reader["FromPort"].readIfPresent() + value.toPort = try reader["ToPort"].readIfPresent() + value.cidrIpv4 = try reader["CidrIpv4"].readIfPresent() + value.cidrIpv6 = try reader["CidrIpv6"].readIfPresent() + value.prefixListId = try reader["PrefixListId"].readIfPresent() + value.referencedGroupId = try reader["ReferencedGroupId"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -166125,11 +118783,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SecurityGroupRuleUpdate: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case securityGroupRule = "SecurityGroupRule" - case securityGroupRuleId = "SecurityGroupRuleId" - } +extension EC2ClientTypes.SecurityGroupRuleUpdate: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -166141,12 +118795,14 @@ extension EC2ClientTypes.SecurityGroupRuleUpdate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let securityGroupRuleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .securityGroupRuleId) - securityGroupRuleId = securityGroupRuleIdDecoded - let securityGroupRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SecurityGroupRuleRequest.self, forKey: .securityGroupRule) - securityGroupRule = securityGroupRuleDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SecurityGroupRuleUpdate() + value.securityGroupRuleId = try reader["SecurityGroupRuleId"].readIfPresent() + value.securityGroupRule = try reader["SecurityGroupRule"].readIfPresent(readingClosure: EC2ClientTypes.SecurityGroupRuleRequest.readingClosure) + return value + } } } @@ -166241,28 +118897,12 @@ public struct SendDiagnosticInterruptInput: Swift.Equatable { } } -struct SendDiagnosticInterruptInputBody: Swift.Equatable { - let instanceId: Swift.String? - let dryRun: Swift.Bool? -} - -extension SendDiagnosticInterruptInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case instanceId = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension SendDiagnosticInterruptOutput { -extension SendDiagnosticInterruptOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SendDiagnosticInterruptOutput() + } } } @@ -166271,33 +118911,23 @@ public struct SendDiagnosticInterruptOutput: Swift.Equatable { public init() { } } -enum SendDiagnosticInterruptOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum SendDiagnosticInterruptOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } -extension EC2ClientTypes.ServiceConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acceptanceRequired = "acceptanceRequired" - case availabilityZones = "availabilityZoneSet" - case baseEndpointDnsNames = "baseEndpointDnsNameSet" - case gatewayLoadBalancerArns = "gatewayLoadBalancerArnSet" - case managesVpcEndpoints = "managesVpcEndpoints" - case networkLoadBalancerArns = "networkLoadBalancerArnSet" - case payerResponsibility = "payerResponsibility" - case privateDnsName = "privateDnsName" - case privateDnsNameConfiguration = "privateDnsNameConfiguration" - case serviceId = "serviceId" - case serviceName = "serviceName" - case serviceState = "serviceState" - case serviceType = "serviceType" - case supportedIpAddressTypes = "supportedIpAddressTypeSet" - case tags = "tagSet" - } +extension EC2ClientTypes.ServiceConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -166411,156 +119041,26 @@ extension EC2ClientTypes.ServiceConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.serviceType) { - struct KeyVal0{struct item{}} - let serviceTypeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceType) - if let serviceTypeWrappedContainer = serviceTypeWrappedContainer { - let serviceTypeContainer = try serviceTypeWrappedContainer.decodeIfPresent([EC2ClientTypes.ServiceTypeDetail].self, forKey: .member) - var serviceTypeBuffer:[EC2ClientTypes.ServiceTypeDetail]? = nil - if let serviceTypeContainer = serviceTypeContainer { - serviceTypeBuffer = [EC2ClientTypes.ServiceTypeDetail]() - for structureContainer0 in serviceTypeContainer { - serviceTypeBuffer?.append(structureContainer0) - } - } - serviceType = serviceTypeBuffer - } else { - serviceType = [] - } - } else { - serviceType = nil - } - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - let serviceStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ServiceState.self, forKey: .serviceState) - serviceState = serviceStateDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct item{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let acceptanceRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .acceptanceRequired) - acceptanceRequired = acceptanceRequiredDecoded - let managesVpcEndpointsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .managesVpcEndpoints) - managesVpcEndpoints = managesVpcEndpointsDecoded - if containerValues.contains(.networkLoadBalancerArns) { - struct KeyVal0{struct item{}} - let networkLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkLoadBalancerArns) - if let networkLoadBalancerArnsWrappedContainer = networkLoadBalancerArnsWrappedContainer { - let networkLoadBalancerArnsContainer = try networkLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkLoadBalancerArnsBuffer:[Swift.String]? = nil - if let networkLoadBalancerArnsContainer = networkLoadBalancerArnsContainer { - networkLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in networkLoadBalancerArnsContainer { - networkLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - networkLoadBalancerArns = networkLoadBalancerArnsBuffer - } else { - networkLoadBalancerArns = [] - } - } else { - networkLoadBalancerArns = nil - } - if containerValues.contains(.gatewayLoadBalancerArns) { - struct KeyVal0{struct item{}} - let gatewayLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .gatewayLoadBalancerArns) - if let gatewayLoadBalancerArnsWrappedContainer = gatewayLoadBalancerArnsWrappedContainer { - let gatewayLoadBalancerArnsContainer = try gatewayLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var gatewayLoadBalancerArnsBuffer:[Swift.String]? = nil - if let gatewayLoadBalancerArnsContainer = gatewayLoadBalancerArnsContainer { - gatewayLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in gatewayLoadBalancerArnsContainer { - gatewayLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - gatewayLoadBalancerArns = gatewayLoadBalancerArnsBuffer - } else { - gatewayLoadBalancerArns = [] - } - } else { - gatewayLoadBalancerArns = nil - } - if containerValues.contains(.supportedIpAddressTypes) { - struct KeyVal0{struct item{}} - let supportedIpAddressTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedIpAddressTypes) - if let supportedIpAddressTypesWrappedContainer = supportedIpAddressTypesWrappedContainer { - let supportedIpAddressTypesContainer = try supportedIpAddressTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.ServiceConnectivityType].self, forKey: .member) - var supportedIpAddressTypesBuffer:[EC2ClientTypes.ServiceConnectivityType]? = nil - if let supportedIpAddressTypesContainer = supportedIpAddressTypesContainer { - supportedIpAddressTypesBuffer = [EC2ClientTypes.ServiceConnectivityType]() - for enumContainer0 in supportedIpAddressTypesContainer { - supportedIpAddressTypesBuffer?.append(enumContainer0) - } - } - supportedIpAddressTypes = supportedIpAddressTypesBuffer - } else { - supportedIpAddressTypes = [] - } - } else { - supportedIpAddressTypes = nil - } - if containerValues.contains(.baseEndpointDnsNames) { - struct KeyVal0{struct item{}} - let baseEndpointDnsNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .baseEndpointDnsNames) - if let baseEndpointDnsNamesWrappedContainer = baseEndpointDnsNamesWrappedContainer { - let baseEndpointDnsNamesContainer = try baseEndpointDnsNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var baseEndpointDnsNamesBuffer:[Swift.String]? = nil - if let baseEndpointDnsNamesContainer = baseEndpointDnsNamesContainer { - baseEndpointDnsNamesBuffer = [Swift.String]() - for stringContainer0 in baseEndpointDnsNamesContainer { - baseEndpointDnsNamesBuffer?.append(stringContainer0) - } - } - baseEndpointDnsNames = baseEndpointDnsNamesBuffer - } else { - baseEndpointDnsNames = [] - } - } else { - baseEndpointDnsNames = nil - } - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - let privateDnsNameConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PrivateDnsNameConfiguration.self, forKey: .privateDnsNameConfiguration) - privateDnsNameConfiguration = privateDnsNameConfigurationDecoded - let payerResponsibilityDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PayerResponsibility.self, forKey: .payerResponsibility) - payerResponsibility = payerResponsibilityDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ServiceConfiguration() + value.serviceType = try reader["serviceType"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ServiceTypeDetail.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.serviceId = try reader["serviceId"].readIfPresent() + value.serviceName = try reader["serviceName"].readIfPresent() + value.serviceState = try reader["serviceState"].readIfPresent() + value.availabilityZones = try reader["availabilityZoneSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.acceptanceRequired = try reader["acceptanceRequired"].readIfPresent() + value.managesVpcEndpoints = try reader["managesVpcEndpoints"].readIfPresent() + value.networkLoadBalancerArns = try reader["networkLoadBalancerArnSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.gatewayLoadBalancerArns = try reader["gatewayLoadBalancerArnSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.supportedIpAddressTypes = try reader["supportedIpAddressTypeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ServiceConnectivityType.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.baseEndpointDnsNames = try reader["baseEndpointDnsNameSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.privateDnsName = try reader["privateDnsName"].readIfPresent() + value.privateDnsNameConfiguration = try reader["privateDnsNameConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.PrivateDnsNameConfiguration.readingClosure) + value.payerResponsibility = try reader["payerResponsibility"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -166669,24 +119169,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ServiceDetail: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acceptanceRequired = "acceptanceRequired" - case availabilityZones = "availabilityZoneSet" - case baseEndpointDnsNames = "baseEndpointDnsNameSet" - case managesVpcEndpoints = "managesVpcEndpoints" - case owner = "owner" - case payerResponsibility = "payerResponsibility" - case privateDnsName = "privateDnsName" - case privateDnsNameVerificationState = "privateDnsNameVerificationState" - case privateDnsNames = "privateDnsNameSet" - case serviceId = "serviceId" - case serviceName = "serviceName" - case serviceType = "serviceType" - case supportedIpAddressTypes = "supportedIpAddressTypeSet" - case tags = "tagSet" - case vpcEndpointPolicySupported = "vpcEndpointPolicySupported" - } +extension EC2ClientTypes.ServiceDetail: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -166791,139 +119274,26 @@ extension EC2ClientTypes.ServiceDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - if containerValues.contains(.serviceType) { - struct KeyVal0{struct item{}} - let serviceTypeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceType) - if let serviceTypeWrappedContainer = serviceTypeWrappedContainer { - let serviceTypeContainer = try serviceTypeWrappedContainer.decodeIfPresent([EC2ClientTypes.ServiceTypeDetail].self, forKey: .member) - var serviceTypeBuffer:[EC2ClientTypes.ServiceTypeDetail]? = nil - if let serviceTypeContainer = serviceTypeContainer { - serviceTypeBuffer = [EC2ClientTypes.ServiceTypeDetail]() - for structureContainer0 in serviceTypeContainer { - serviceTypeBuffer?.append(structureContainer0) - } - } - serviceType = serviceTypeBuffer - } else { - serviceType = [] - } - } else { - serviceType = nil - } - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct item{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let ownerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .owner) - owner = ownerDecoded - if containerValues.contains(.baseEndpointDnsNames) { - struct KeyVal0{struct item{}} - let baseEndpointDnsNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .baseEndpointDnsNames) - if let baseEndpointDnsNamesWrappedContainer = baseEndpointDnsNamesWrappedContainer { - let baseEndpointDnsNamesContainer = try baseEndpointDnsNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var baseEndpointDnsNamesBuffer:[Swift.String]? = nil - if let baseEndpointDnsNamesContainer = baseEndpointDnsNamesContainer { - baseEndpointDnsNamesBuffer = [Swift.String]() - for stringContainer0 in baseEndpointDnsNamesContainer { - baseEndpointDnsNamesBuffer?.append(stringContainer0) - } - } - baseEndpointDnsNames = baseEndpointDnsNamesBuffer - } else { - baseEndpointDnsNames = [] - } - } else { - baseEndpointDnsNames = nil - } - let privateDnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateDnsName) - privateDnsName = privateDnsNameDecoded - if containerValues.contains(.privateDnsNames) { - struct KeyVal0{struct item{}} - let privateDnsNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateDnsNames) - if let privateDnsNamesWrappedContainer = privateDnsNamesWrappedContainer { - let privateDnsNamesContainer = try privateDnsNamesWrappedContainer.decodeIfPresent([EC2ClientTypes.PrivateDnsDetails].self, forKey: .member) - var privateDnsNamesBuffer:[EC2ClientTypes.PrivateDnsDetails]? = nil - if let privateDnsNamesContainer = privateDnsNamesContainer { - privateDnsNamesBuffer = [EC2ClientTypes.PrivateDnsDetails]() - for structureContainer0 in privateDnsNamesContainer { - privateDnsNamesBuffer?.append(structureContainer0) - } - } - privateDnsNames = privateDnsNamesBuffer - } else { - privateDnsNames = [] - } - } else { - privateDnsNames = nil - } - let vpcEndpointPolicySupportedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .vpcEndpointPolicySupported) - vpcEndpointPolicySupported = vpcEndpointPolicySupportedDecoded - let acceptanceRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .acceptanceRequired) - acceptanceRequired = acceptanceRequiredDecoded - let managesVpcEndpointsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .managesVpcEndpoints) - managesVpcEndpoints = managesVpcEndpointsDecoded - let payerResponsibilityDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PayerResponsibility.self, forKey: .payerResponsibility) - payerResponsibility = payerResponsibilityDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let privateDnsNameVerificationStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsNameState.self, forKey: .privateDnsNameVerificationState) - privateDnsNameVerificationState = privateDnsNameVerificationStateDecoded - if containerValues.contains(.supportedIpAddressTypes) { - struct KeyVal0{struct item{}} - let supportedIpAddressTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedIpAddressTypes) - if let supportedIpAddressTypesWrappedContainer = supportedIpAddressTypesWrappedContainer { - let supportedIpAddressTypesContainer = try supportedIpAddressTypesWrappedContainer.decodeIfPresent([EC2ClientTypes.ServiceConnectivityType].self, forKey: .member) - var supportedIpAddressTypesBuffer:[EC2ClientTypes.ServiceConnectivityType]? = nil - if let supportedIpAddressTypesContainer = supportedIpAddressTypesContainer { - supportedIpAddressTypesBuffer = [EC2ClientTypes.ServiceConnectivityType]() - for enumContainer0 in supportedIpAddressTypesContainer { - supportedIpAddressTypesBuffer?.append(enumContainer0) - } - } - supportedIpAddressTypes = supportedIpAddressTypesBuffer - } else { - supportedIpAddressTypes = [] - } - } else { - supportedIpAddressTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ServiceDetail() + value.serviceName = try reader["serviceName"].readIfPresent() + value.serviceId = try reader["serviceId"].readIfPresent() + value.serviceType = try reader["serviceType"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ServiceTypeDetail.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.availabilityZones = try reader["availabilityZoneSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.owner = try reader["owner"].readIfPresent() + value.baseEndpointDnsNames = try reader["baseEndpointDnsNameSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.privateDnsName = try reader["privateDnsName"].readIfPresent() + value.privateDnsNames = try reader["privateDnsNameSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.PrivateDnsDetails.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcEndpointPolicySupported = try reader["vpcEndpointPolicySupported"].readIfPresent() + value.acceptanceRequired = try reader["acceptanceRequired"].readIfPresent() + value.managesVpcEndpoints = try reader["managesVpcEndpoints"].readIfPresent() + value.payerResponsibility = try reader["payerResponsibility"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.privateDnsNameVerificationState = try reader["privateDnsNameVerificationState"].readIfPresent() + value.supportedIpAddressTypes = try reader["supportedIpAddressTypeSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ServiceConnectivityType.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -167076,10 +119446,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.ServiceTypeDetail: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceType = "serviceType" - } +extension EC2ClientTypes.ServiceTypeDetail: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -167088,10 +119455,13 @@ extension EC2ClientTypes.ServiceTypeDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ServiceType.self, forKey: .serviceType) - serviceType = serviceTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ServiceTypeDetail() + value.serviceType = try reader["serviceType"].readIfPresent() + return value + } } } @@ -167143,11 +119513,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SlotDateTimeRangeRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case earliestTime = "EarliestTime" - case latestTime = "LatestTime" - } +extension EC2ClientTypes.SlotDateTimeRangeRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -167159,12 +119525,14 @@ extension EC2ClientTypes.SlotDateTimeRangeRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let earliestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .earliestTime) - earliestTime = earliestTimeDecoded - let latestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestTime) - latestTime = latestTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SlotDateTimeRangeRequest() + value.earliestTime = try reader["EarliestTime"].readTimestampIfPresent(format: .dateTime) + value.latestTime = try reader["LatestTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -167190,11 +119558,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SlotStartTimeRangeRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case earliestTime = "EarliestTime" - case latestTime = "LatestTime" - } +extension EC2ClientTypes.SlotStartTimeRangeRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -167206,12 +119570,14 @@ extension EC2ClientTypes.SlotStartTimeRangeRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let earliestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .earliestTime) - earliestTime = earliestTimeDecoded - let latestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestTime) - latestTime = latestTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SlotStartTimeRangeRequest() + value.earliestTime = try reader["EarliestTime"].readTimestampIfPresent(format: .dateTime) + value.latestTime = try reader["LatestTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -167235,27 +119601,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Snapshot: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataEncryptionKeyId = "dataEncryptionKeyId" - case description = "description" - case encrypted = "encrypted" - case kmsKeyId = "kmsKeyId" - case outpostArn = "outpostArn" - case ownerAlias = "ownerAlias" - case ownerId = "ownerId" - case progress = "progress" - case restoreExpiryTime = "restoreExpiryTime" - case snapshotId = "snapshotId" - case sseType = "sseType" - case startTime = "startTime" - case state = "status" - case stateMessage = "statusMessage" - case storageTier = "storageTier" - case tags = "tagSet" - case volumeId = "volumeId" - case volumeSize = "volumeSize" - } +extension EC2ClientTypes.Snapshot: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -167324,61 +119670,30 @@ extension EC2ClientTypes.Snapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataEncryptionKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataEncryptionKeyId) - dataEncryptionKeyId = dataEncryptionKeyIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotState.self, forKey: .state) - state = stateDecoded - let stateMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stateMessage) - stateMessage = stateMessageDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let ownerAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAlias) - ownerAlias = ownerAliasDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageTierDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StorageTier.self, forKey: .storageTier) - storageTier = storageTierDecoded - let restoreExpiryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreExpiryTime) - restoreExpiryTime = restoreExpiryTimeDecoded - let sseTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SSEType.self, forKey: .sseType) - sseType = sseTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Snapshot() + value.dataEncryptionKeyId = try reader["dataEncryptionKeyId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.encrypted = try reader["encrypted"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: .dateTime) + value.state = try reader["status"].readIfPresent() + value.stateMessage = try reader["statusMessage"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + value.volumeSize = try reader["volumeSize"].readIfPresent() + value.ownerAlias = try reader["ownerAlias"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.storageTier = try reader["storageTier"].readIfPresent() + value.restoreExpiryTime = try reader["restoreExpiryTime"].readTimestampIfPresent(format: .dateTime) + value.sseType = try reader["sseType"].readIfPresent() + return value + } } } @@ -167533,19 +119848,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SnapshotDetail: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case deviceName = "deviceName" - case diskImageSize = "diskImageSize" - case format = "format" - case progress = "progress" - case snapshotId = "snapshotId" - case status = "status" - case statusMessage = "statusMessage" - case url = "url" - case userBucket = "userBucket" - } +extension EC2ClientTypes.SnapshotDetail: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -167581,28 +119884,22 @@ extension EC2ClientTypes.SnapshotDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let deviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceName) - deviceName = deviceNameDecoded - let diskImageSizeDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .diskImageSize) - diskImageSize = diskImageSizeDecoded - let formatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .format) - format = formatDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded - let userBucketDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UserBucketDetails.self, forKey: .userBucket) - userBucket = userBucketDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SnapshotDetail() + value.description = try reader["description"].readIfPresent() + value.deviceName = try reader["deviceName"].readIfPresent() + value.diskImageSize = try reader["diskImageSize"].readIfPresent() + value.format = try reader["format"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.url = try reader["url"].readIfPresent() + value.userBucket = try reader["userBucket"].readIfPresent(readingClosure: EC2ClientTypes.UserBucketDetails.readingClosure) + return value + } } } @@ -167663,13 +119960,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SnapshotDiskContainer: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case format = "Format" - case url = "Url" - case userBucket = "UserBucket" - } +extension EC2ClientTypes.SnapshotDiskContainer: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -167687,16 +119978,16 @@ extension EC2ClientTypes.SnapshotDiskContainer: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let formatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .format) - format = formatDecoded - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded - let userBucketDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UserBucket.self, forKey: .userBucket) - userBucket = userBucketDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SnapshotDiskContainer() + value.description = try reader["Description"].readIfPresent() + value.format = try reader["Format"].readIfPresent() + value.url = try reader["Url"].readIfPresent() + value.userBucket = try reader["UserBucket"].readIfPresent(readingClosure: EC2ClientTypes.UserBucket.readingClosure) + return value + } } } @@ -167733,21 +120024,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SnapshotInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case encrypted = "encrypted" - case outpostArn = "outpostArn" - case ownerId = "ownerId" - case progress = "progress" - case snapshotId = "snapshotId" - case sseType = "sseType" - case startTime = "startTime" - case state = "state" - case tags = "tagSet" - case volumeId = "volumeId" - case volumeSize = "volumeSize" - } +extension EC2ClientTypes.SnapshotInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -167798,49 +120075,24 @@ extension EC2ClientTypes.SnapshotInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotState.self, forKey: .state) - state = stateDecoded - let volumeSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .volumeSize) - volumeSize = volumeSizeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let sseTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SSEType.self, forKey: .sseType) - sseType = sseTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SnapshotInfo() + value.description = try reader["description"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.encrypted = try reader["encrypted"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.volumeSize = try reader["volumeSize"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: .dateTime) + value.progress = try reader["progress"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.sseType = try reader["sseType"].readIfPresent() + return value + } } } @@ -167904,14 +120156,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SnapshotRecycleBinInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case recycleBinEnterTime = "recycleBinEnterTime" - case recycleBinExitTime = "recycleBinExitTime" - case snapshotId = "snapshotId" - case volumeId = "volumeId" - } +extension EC2ClientTypes.SnapshotRecycleBinInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -167932,18 +120177,17 @@ extension EC2ClientTypes.SnapshotRecycleBinInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let recycleBinEnterTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .recycleBinEnterTime) - recycleBinEnterTime = recycleBinEnterTimeDecoded - let recycleBinExitTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .recycleBinExitTime) - recycleBinExitTime = recycleBinExitTimeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SnapshotRecycleBinInfo() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.recycleBinEnterTime = try reader["recycleBinEnterTime"].readTimestampIfPresent(format: .dateTime) + value.recycleBinExitTime = try reader["recycleBinExitTime"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["description"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + return value + } } } @@ -168020,20 +120264,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SnapshotTaskDetail: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case diskImageSize = "diskImageSize" - case encrypted = "encrypted" - case format = "format" - case kmsKeyId = "kmsKeyId" - case progress = "progress" - case snapshotId = "snapshotId" - case status = "status" - case statusMessage = "statusMessage" - case url = "url" - case userBucket = "userBucket" - } +extension EC2ClientTypes.SnapshotTaskDetail: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -168072,30 +120303,23 @@ extension EC2ClientTypes.SnapshotTaskDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let diskImageSizeDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .diskImageSize) - diskImageSize = diskImageSizeDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let formatDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .format) - format = formatDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .progress) - progress = progressDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded - let userBucketDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UserBucketDetails.self, forKey: .userBucket) - userBucket = userBucketDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SnapshotTaskDetail() + value.description = try reader["description"].readIfPresent() + value.diskImageSize = try reader["diskImageSize"].readIfPresent() + value.encrypted = try reader["encrypted"].readIfPresent() + value.format = try reader["format"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.url = try reader["url"].readIfPresent() + value.userBucket = try reader["userBucket"].readIfPresent(readingClosure: EC2ClientTypes.UserBucketDetails.readingClosure) + return value + } } } @@ -168160,21 +120384,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SnapshotTierStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case archivalCompleteTime = "archivalCompleteTime" - case lastTieringOperationStatus = "lastTieringOperationStatus" - case lastTieringOperationStatusDetail = "lastTieringOperationStatusDetail" - case lastTieringProgress = "lastTieringProgress" - case lastTieringStartTime = "lastTieringStartTime" - case ownerId = "ownerId" - case restoreExpiryTime = "restoreExpiryTime" - case snapshotId = "snapshotId" - case status = "status" - case storageTier = "storageTier" - case tags = "tagSet" - case volumeId = "volumeId" - } +extension EC2ClientTypes.SnapshotTierStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -168225,49 +120435,24 @@ extension EC2ClientTypes.SnapshotTierStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SnapshotState.self, forKey: .status) - status = statusDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageTierDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StorageTier.self, forKey: .storageTier) - storageTier = storageTierDecoded - let lastTieringStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastTieringStartTime) - lastTieringStartTime = lastTieringStartTimeDecoded - let lastTieringProgressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .lastTieringProgress) - lastTieringProgress = lastTieringProgressDecoded - let lastTieringOperationStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TieringOperationStatus.self, forKey: .lastTieringOperationStatus) - lastTieringOperationStatus = lastTieringOperationStatusDecoded - let lastTieringOperationStatusDetailDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastTieringOperationStatusDetail) - lastTieringOperationStatusDetail = lastTieringOperationStatusDetailDecoded - let archivalCompleteTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .archivalCompleteTime) - archivalCompleteTime = archivalCompleteTimeDecoded - let restoreExpiryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreExpiryTime) - restoreExpiryTime = restoreExpiryTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SnapshotTierStatus() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.storageTier = try reader["storageTier"].readIfPresent() + value.lastTieringStartTime = try reader["lastTieringStartTime"].readTimestampIfPresent(format: .dateTime) + value.lastTieringProgress = try reader["lastTieringProgress"].readIfPresent() + value.lastTieringOperationStatus = try reader["lastTieringOperationStatus"].readIfPresent() + value.lastTieringOperationStatusDetail = try reader["lastTieringOperationStatusDetail"].readIfPresent() + value.archivalCompleteTime = try reader["archivalCompleteTime"].readTimestampIfPresent(format: .dateTime) + value.restoreExpiryTime = try reader["restoreExpiryTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -168372,11 +120557,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SpotCapacityRebalance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replacementStrategy = "replacementStrategy" - case terminationDelay = "terminationDelay" - } +extension EC2ClientTypes.SpotCapacityRebalance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -168388,12 +120569,14 @@ extension EC2ClientTypes.SpotCapacityRebalance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replacementStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReplacementStrategy.self, forKey: .replacementStrategy) - replacementStrategy = replacementStrategyDecoded - let terminationDelayDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .terminationDelay) - terminationDelay = terminationDelayDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotCapacityRebalance() + value.replacementStrategy = try reader["replacementStrategy"].readIfPresent() + value.terminationDelay = try reader["terminationDelay"].readIfPresent() + return value + } } } @@ -168417,14 +120600,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotDatafeedSubscription: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "bucket" - case fault = "fault" - case ownerId = "ownerId" - case `prefix` = "prefix" - case state = "state" - } +extension EC2ClientTypes.SpotDatafeedSubscription: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -168445,18 +120621,17 @@ extension EC2ClientTypes.SpotDatafeedSubscription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let faultDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceStateFault.self, forKey: .fault) - fault = faultDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DatafeedSubscriptionState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotDatafeedSubscription() + value.bucket = try reader["bucket"].readIfPresent() + value.fault = try reader["fault"].readIfPresent(readingClosure: EC2ClientTypes.SpotInstanceStateFault.readingClosure) + value.ownerId = try reader["ownerId"].readIfPresent() + value.`prefix` = try reader["prefix"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -168492,28 +120667,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotFleetLaunchSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addressingType = "addressingType" - case blockDeviceMappings = "blockDeviceMapping" - case ebsOptimized = "ebsOptimized" - case iamInstanceProfile = "iamInstanceProfile" - case imageId = "imageId" - case instanceRequirements = "instanceRequirements" - case instanceType = "instanceType" - case kernelId = "kernelId" - case keyName = "keyName" - case monitoring = "monitoring" - case networkInterfaces = "networkInterfaceSet" - case placement = "placement" - case ramdiskId = "ramdiskId" - case securityGroups = "groupSet" - case spotPrice = "spotPrice" - case subnetId = "subnetId" - case tagSpecifications = "tagSpecificationSet" - case userData = "userData" - case weightedCapacity = "weightedCapacity" - } +extension EC2ClientTypes.SpotFleetLaunchSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -168612,114 +120766,31 @@ extension EC2ClientTypes.SpotFleetLaunchSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.GroupIdentifier].self, forKey: .member) - var securityGroupsBuffer:[EC2ClientTypes.GroupIdentifier]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [EC2ClientTypes.GroupIdentifier]() - for structureContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(structureContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let addressingTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .addressingType) - addressingType = addressingTypeDecoded - if containerValues.contains(.blockDeviceMappings) { - struct KeyVal0{struct item{}} - let blockDeviceMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blockDeviceMappings) - if let blockDeviceMappingsWrappedContainer = blockDeviceMappingsWrappedContainer { - let blockDeviceMappingsContainer = try blockDeviceMappingsWrappedContainer.decodeIfPresent([EC2ClientTypes.BlockDeviceMapping].self, forKey: .member) - var blockDeviceMappingsBuffer:[EC2ClientTypes.BlockDeviceMapping]? = nil - if let blockDeviceMappingsContainer = blockDeviceMappingsContainer { - blockDeviceMappingsBuffer = [EC2ClientTypes.BlockDeviceMapping]() - for structureContainer0 in blockDeviceMappingsContainer { - blockDeviceMappingsBuffer?.append(structureContainer0) - } - } - blockDeviceMappings = blockDeviceMappingsBuffer - } else { - blockDeviceMappings = [] - } - } else { - blockDeviceMappings = nil - } - let ebsOptimizedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ebsOptimized) - ebsOptimized = ebsOptimizedDecoded - let iamInstanceProfileDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IamInstanceProfileSpecification.self, forKey: .iamInstanceProfile) - iamInstanceProfile = iamInstanceProfileDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let kernelIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kernelId) - kernelId = kernelIdDecoded - let keyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyName) - keyName = keyNameDecoded - let monitoringDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotFleetMonitoring.self, forKey: .monitoring) - monitoring = monitoringDecoded - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct item{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceNetworkInterfaceSpecification].self, forKey: .member) - var networkInterfacesBuffer:[EC2ClientTypes.InstanceNetworkInterfaceSpecification]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [EC2ClientTypes.InstanceNetworkInterfaceSpecification]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil - } - let placementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotPlacement.self, forKey: .placement) - placement = placementDecoded - let ramdiskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ramdiskId) - ramdiskId = ramdiskIdDecoded - let spotPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotPrice) - spotPrice = spotPriceDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let userDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userData) - userData = userDataDecoded - let weightedCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .weightedCapacity) - weightedCapacity = weightedCapacityDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.SpotFleetTagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.SpotFleetTagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.SpotFleetTagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let instanceRequirementsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceRequirements.self, forKey: .instanceRequirements) - instanceRequirements = instanceRequirementsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotFleetLaunchSpecification() + value.securityGroups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.GroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.addressingType = try reader["addressingType"].readIfPresent() + value.blockDeviceMappings = try reader["blockDeviceMapping"].readListIfPresent(memberReadingClosure: EC2ClientTypes.BlockDeviceMapping.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ebsOptimized = try reader["ebsOptimized"].readIfPresent() + value.iamInstanceProfile = try reader["iamInstanceProfile"].readIfPresent(readingClosure: EC2ClientTypes.IamInstanceProfileSpecification.readingClosure) + value.imageId = try reader["imageId"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.kernelId = try reader["kernelId"].readIfPresent() + value.keyName = try reader["keyName"].readIfPresent() + value.monitoring = try reader["monitoring"].readIfPresent(readingClosure: EC2ClientTypes.SpotFleetMonitoring.readingClosure) + value.networkInterfaces = try reader["networkInterfaceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceNetworkInterfaceSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.placement = try reader["placement"].readIfPresent(readingClosure: EC2ClientTypes.SpotPlacement.readingClosure) + value.ramdiskId = try reader["ramdiskId"].readIfPresent() + value.spotPrice = try reader["spotPrice"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.userData = try reader["userData"].readIfPresent() + value.weightedCapacity = try reader["weightedCapacity"].readIfPresent() + value.tagSpecifications = try reader["tagSpecificationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SpotFleetTagSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.instanceRequirements = try reader["instanceRequirements"].readIfPresent(readingClosure: EC2ClientTypes.InstanceRequirements.readingClosure) + return value + } } } @@ -168816,10 +120887,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotFleetMonitoring: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "enabled" - } +extension EC2ClientTypes.SpotFleetMonitoring: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -168828,10 +120896,13 @@ extension EC2ClientTypes.SpotFleetMonitoring: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotFleetMonitoring() + value.enabled = try reader["enabled"].readIfPresent() + return value + } } } @@ -168851,15 +120922,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotFleetRequestConfig: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activityStatus = "activityStatus" - case createTime = "createTime" - case spotFleetRequestConfig = "spotFleetRequestConfig" - case spotFleetRequestId = "spotFleetRequestId" - case spotFleetRequestState = "spotFleetRequestState" - case tags = "tagSet" - } +extension EC2ClientTypes.SpotFleetRequestConfig: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -168892,36 +120955,17 @@ extension EC2ClientTypes.SpotFleetRequestConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let activityStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ActivityStatus.self, forKey: .activityStatus) - activityStatus = activityStatusDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let spotFleetRequestConfigDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotFleetRequestConfigData.self, forKey: .spotFleetRequestConfig) - spotFleetRequestConfig = spotFleetRequestConfigDecoded - let spotFleetRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotFleetRequestId) - spotFleetRequestId = spotFleetRequestIdDecoded - let spotFleetRequestStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BatchState.self, forKey: .spotFleetRequestState) - spotFleetRequestState = spotFleetRequestStateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotFleetRequestConfig() + value.activityStatus = try reader["activityStatus"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.spotFleetRequestConfig = try reader["spotFleetRequestConfig"].readIfPresent(readingClosure: EC2ClientTypes.SpotFleetRequestConfigData.readingClosure) + value.spotFleetRequestId = try reader["spotFleetRequestId"].readIfPresent() + value.spotFleetRequestState = try reader["spotFleetRequestState"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -168962,35 +121006,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotFleetRequestConfigData: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationStrategy = "allocationStrategy" - case clientToken = "clientToken" - case context = "context" - case excessCapacityTerminationPolicy = "excessCapacityTerminationPolicy" - case fulfilledCapacity = "fulfilledCapacity" - case iamFleetRole = "iamFleetRole" - case instanceInterruptionBehavior = "instanceInterruptionBehavior" - case instancePoolsToUseCount = "instancePoolsToUseCount" - case launchSpecifications = "launchSpecifications" - case launchTemplateConfigs = "launchTemplateConfigs" - case loadBalancersConfig = "loadBalancersConfig" - case onDemandAllocationStrategy = "onDemandAllocationStrategy" - case onDemandFulfilledCapacity = "onDemandFulfilledCapacity" - case onDemandMaxTotalPrice = "onDemandMaxTotalPrice" - case onDemandTargetCapacity = "onDemandTargetCapacity" - case replaceUnhealthyInstances = "replaceUnhealthyInstances" - case spotMaintenanceStrategies = "spotMaintenanceStrategies" - case spotMaxTotalPrice = "spotMaxTotalPrice" - case spotPrice = "spotPrice" - case tagSpecifications = "TagSpecification" - case targetCapacity = "targetCapacity" - case targetCapacityUnitType = "targetCapacityUnitType" - case terminateInstancesWithExpiration = "terminateInstancesWithExpiration" - case type = "type" - case validFrom = "validFrom" - case validUntil = "validUntil" - } +extension EC2ClientTypes.SpotFleetRequestConfigData: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -169101,110 +121117,37 @@ extension EC2ClientTypes.SpotFleetRequestConfigData: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AllocationStrategy.self, forKey: .allocationStrategy) - allocationStrategy = allocationStrategyDecoded - let onDemandAllocationStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OnDemandAllocationStrategy.self, forKey: .onDemandAllocationStrategy) - onDemandAllocationStrategy = onDemandAllocationStrategyDecoded - let spotMaintenanceStrategiesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotMaintenanceStrategies.self, forKey: .spotMaintenanceStrategies) - spotMaintenanceStrategies = spotMaintenanceStrategiesDecoded - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let excessCapacityTerminationPolicyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ExcessCapacityTerminationPolicy.self, forKey: .excessCapacityTerminationPolicy) - excessCapacityTerminationPolicy = excessCapacityTerminationPolicyDecoded - let fulfilledCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fulfilledCapacity) - fulfilledCapacity = fulfilledCapacityDecoded - let onDemandFulfilledCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .onDemandFulfilledCapacity) - onDemandFulfilledCapacity = onDemandFulfilledCapacityDecoded - let iamFleetRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamFleetRole) - iamFleetRole = iamFleetRoleDecoded - if containerValues.contains(.launchSpecifications) { - struct KeyVal0{struct item{}} - let launchSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchSpecifications) - if let launchSpecificationsWrappedContainer = launchSpecificationsWrappedContainer { - let launchSpecificationsContainer = try launchSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.SpotFleetLaunchSpecification].self, forKey: .member) - var launchSpecificationsBuffer:[EC2ClientTypes.SpotFleetLaunchSpecification]? = nil - if let launchSpecificationsContainer = launchSpecificationsContainer { - launchSpecificationsBuffer = [EC2ClientTypes.SpotFleetLaunchSpecification]() - for structureContainer0 in launchSpecificationsContainer { - launchSpecificationsBuffer?.append(structureContainer0) - } - } - launchSpecifications = launchSpecificationsBuffer - } else { - launchSpecifications = [] - } - } else { - launchSpecifications = nil - } - if containerValues.contains(.launchTemplateConfigs) { - struct KeyVal0{struct item{}} - let launchTemplateConfigsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplateConfigs) - if let launchTemplateConfigsWrappedContainer = launchTemplateConfigsWrappedContainer { - let launchTemplateConfigsContainer = try launchTemplateConfigsWrappedContainer.decodeIfPresent([EC2ClientTypes.LaunchTemplateConfig].self, forKey: .member) - var launchTemplateConfigsBuffer:[EC2ClientTypes.LaunchTemplateConfig]? = nil - if let launchTemplateConfigsContainer = launchTemplateConfigsContainer { - launchTemplateConfigsBuffer = [EC2ClientTypes.LaunchTemplateConfig]() - for structureContainer0 in launchTemplateConfigsContainer { - launchTemplateConfigsBuffer?.append(structureContainer0) - } - } - launchTemplateConfigs = launchTemplateConfigsBuffer - } else { - launchTemplateConfigs = [] - } - } else { - launchTemplateConfigs = nil - } - let spotPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotPrice) - spotPrice = spotPriceDecoded - let targetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetCapacity) - targetCapacity = targetCapacityDecoded - let onDemandTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandTargetCapacity) - onDemandTargetCapacity = onDemandTargetCapacityDecoded - let onDemandMaxTotalPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .onDemandMaxTotalPrice) - onDemandMaxTotalPrice = onDemandMaxTotalPriceDecoded - let spotMaxTotalPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotMaxTotalPrice) - spotMaxTotalPrice = spotMaxTotalPriceDecoded - let terminateInstancesWithExpirationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .terminateInstancesWithExpiration) - terminateInstancesWithExpiration = terminateInstancesWithExpirationDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetType.self, forKey: .type) - type = typeDecoded - let validFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validFrom) - validFrom = validFromDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - let replaceUnhealthyInstancesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .replaceUnhealthyInstances) - replaceUnhealthyInstances = replaceUnhealthyInstancesDecoded - let instanceInterruptionBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceInterruptionBehavior.self, forKey: .instanceInterruptionBehavior) - instanceInterruptionBehavior = instanceInterruptionBehaviorDecoded - let loadBalancersConfigDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LoadBalancersConfig.self, forKey: .loadBalancersConfig) - loadBalancersConfig = loadBalancersConfigDecoded - let instancePoolsToUseCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancePoolsToUseCount) - instancePoolsToUseCount = instancePoolsToUseCountDecoded - let contextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .context) - context = contextDecoded - let targetCapacityUnitTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetCapacityUnitType.self, forKey: .targetCapacityUnitType) - targetCapacityUnitType = targetCapacityUnitTypeDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotFleetRequestConfigData() + value.allocationStrategy = try reader["allocationStrategy"].readIfPresent() + value.onDemandAllocationStrategy = try reader["onDemandAllocationStrategy"].readIfPresent() + value.spotMaintenanceStrategies = try reader["spotMaintenanceStrategies"].readIfPresent(readingClosure: EC2ClientTypes.SpotMaintenanceStrategies.readingClosure) + value.clientToken = try reader["clientToken"].readIfPresent() + value.excessCapacityTerminationPolicy = try reader["excessCapacityTerminationPolicy"].readIfPresent() + value.fulfilledCapacity = try reader["fulfilledCapacity"].readIfPresent() + value.onDemandFulfilledCapacity = try reader["onDemandFulfilledCapacity"].readIfPresent() + value.iamFleetRole = try reader["iamFleetRole"].readIfPresent() + value.launchSpecifications = try reader["launchSpecifications"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SpotFleetLaunchSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.launchTemplateConfigs = try reader["launchTemplateConfigs"].readListIfPresent(memberReadingClosure: EC2ClientTypes.LaunchTemplateConfig.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.spotPrice = try reader["spotPrice"].readIfPresent() + value.targetCapacity = try reader["targetCapacity"].readIfPresent() + value.onDemandTargetCapacity = try reader["onDemandTargetCapacity"].readIfPresent() + value.onDemandMaxTotalPrice = try reader["onDemandMaxTotalPrice"].readIfPresent() + value.spotMaxTotalPrice = try reader["spotMaxTotalPrice"].readIfPresent() + value.terminateInstancesWithExpiration = try reader["terminateInstancesWithExpiration"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.validFrom = try reader["validFrom"].readTimestampIfPresent(format: .dateTime) + value.validUntil = try reader["validUntil"].readTimestampIfPresent(format: .dateTime) + value.replaceUnhealthyInstances = try reader["replaceUnhealthyInstances"].readIfPresent() + value.instanceInterruptionBehavior = try reader["instanceInterruptionBehavior"].readIfPresent() + value.loadBalancersConfig = try reader["loadBalancersConfig"].readIfPresent(readingClosure: EC2ClientTypes.LoadBalancersConfig.readingClosure) + value.instancePoolsToUseCount = try reader["instancePoolsToUseCount"].readIfPresent() + value.context = try reader["context"].readIfPresent() + value.targetCapacityUnitType = try reader["targetCapacityUnitType"].readIfPresent() + value.tagSpecifications = try reader["TagSpecification"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TagSpecification.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -169327,11 +121270,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotFleetTagSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceType = "resourceType" - case tags = "tag" - } +extension EC2ClientTypes.SpotFleetTagSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -169352,28 +121291,13 @@ extension EC2ClientTypes.SpotFleetTagSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotFleetTagSpecification() + value.resourceType = try reader["resourceType"].readIfPresent() + value.tags = try reader["tag"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -169433,28 +121357,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SpotInstanceRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actualBlockHourlyPrice = "actualBlockHourlyPrice" - case availabilityZoneGroup = "availabilityZoneGroup" - case blockDurationMinutes = "blockDurationMinutes" - case createTime = "createTime" - case fault = "fault" - case instanceId = "instanceId" - case instanceInterruptionBehavior = "instanceInterruptionBehavior" - case launchGroup = "launchGroup" - case launchSpecification = "launchSpecification" - case launchedAvailabilityZone = "launchedAvailabilityZone" - case productDescription = "productDescription" - case spotInstanceRequestId = "spotInstanceRequestId" - case spotPrice = "spotPrice" - case state = "state" - case status = "status" - case tags = "tagSet" - case type = "type" - case validFrom = "validFrom" - case validUntil = "validUntil" - } +extension EC2ClientTypes.SpotInstanceRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -169526,63 +121429,31 @@ extension EC2ClientTypes.SpotInstanceRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actualBlockHourlyPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actualBlockHourlyPrice) - actualBlockHourlyPrice = actualBlockHourlyPriceDecoded - let availabilityZoneGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneGroup) - availabilityZoneGroup = availabilityZoneGroupDecoded - let blockDurationMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .blockDurationMinutes) - blockDurationMinutes = blockDurationMinutesDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let faultDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceStateFault.self, forKey: .fault) - fault = faultDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let launchGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchGroup) - launchGroup = launchGroupDecoded - let launchSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LaunchSpecification.self, forKey: .launchSpecification) - launchSpecification = launchSpecificationDecoded - let launchedAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .launchedAvailabilityZone) - launchedAvailabilityZone = launchedAvailabilityZoneDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RIProductDescription.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let spotInstanceRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotInstanceRequestId) - spotInstanceRequestId = spotInstanceRequestIdDecoded - let spotPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotPrice) - spotPrice = spotPriceDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceState.self, forKey: .state) - state = stateDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceType.self, forKey: .type) - type = typeDecoded - let validFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validFrom) - validFrom = validFromDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - let instanceInterruptionBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceInterruptionBehavior.self, forKey: .instanceInterruptionBehavior) - instanceInterruptionBehavior = instanceInterruptionBehaviorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotInstanceRequest() + value.actualBlockHourlyPrice = try reader["actualBlockHourlyPrice"].readIfPresent() + value.availabilityZoneGroup = try reader["availabilityZoneGroup"].readIfPresent() + value.blockDurationMinutes = try reader["blockDurationMinutes"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.fault = try reader["fault"].readIfPresent(readingClosure: EC2ClientTypes.SpotInstanceStateFault.readingClosure) + value.instanceId = try reader["instanceId"].readIfPresent() + value.launchGroup = try reader["launchGroup"].readIfPresent() + value.launchSpecification = try reader["launchSpecification"].readIfPresent(readingClosure: EC2ClientTypes.LaunchSpecification.readingClosure) + value.launchedAvailabilityZone = try reader["launchedAvailabilityZone"].readIfPresent() + value.productDescription = try reader["productDescription"].readIfPresent() + value.spotInstanceRequestId = try reader["spotInstanceRequestId"].readIfPresent() + value.spotPrice = try reader["spotPrice"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.SpotInstanceStatus.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.type = try reader["type"].readIfPresent() + value.validFrom = try reader["validFrom"].readTimestampIfPresent(format: .dateTime) + value.validUntil = try reader["validUntil"].readTimestampIfPresent(format: .dateTime) + value.instanceInterruptionBehavior = try reader["instanceInterruptionBehavior"].readIfPresent() + return value + } } } @@ -169722,11 +121593,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SpotInstanceStateFault: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.SpotInstanceStateFault: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -169738,12 +121605,14 @@ extension EC2ClientTypes.SpotInstanceStateFault: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotInstanceStateFault() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -169767,12 +121636,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotInstanceStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - case updateTime = "updateTime" - } +extension EC2ClientTypes.SpotInstanceStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -169787,14 +121651,15 @@ extension EC2ClientTypes.SpotInstanceStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let updateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateTime) - updateTime = updateTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotInstanceStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + value.updateTime = try reader["updateTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -169854,10 +121719,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SpotMaintenanceStrategies: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacityRebalance = "capacityRebalance" - } +extension EC2ClientTypes.SpotMaintenanceStrategies: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -169866,10 +121728,13 @@ extension EC2ClientTypes.SpotMaintenanceStrategies: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let capacityRebalanceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotCapacityRebalance.self, forKey: .capacityRebalance) - capacityRebalance = capacityRebalanceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotMaintenanceStrategies() + value.capacityRebalance = try reader["capacityRebalance"].readIfPresent(readingClosure: EC2ClientTypes.SpotCapacityRebalance.readingClosure) + return value + } } } @@ -169889,14 +121754,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotMarketOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockDurationMinutes = "BlockDurationMinutes" - case instanceInterruptionBehavior = "InstanceInterruptionBehavior" - case maxPrice = "MaxPrice" - case spotInstanceType = "SpotInstanceType" - case validUntil = "ValidUntil" - } +extension EC2ClientTypes.SpotMarketOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -169917,18 +121775,17 @@ extension EC2ClientTypes.SpotMarketOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxPrice) - maxPrice = maxPriceDecoded - let spotInstanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceType.self, forKey: .spotInstanceType) - spotInstanceType = spotInstanceTypeDecoded - let blockDurationMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .blockDurationMinutes) - blockDurationMinutes = blockDurationMinutesDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - let instanceInterruptionBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceInterruptionBehavior.self, forKey: .instanceInterruptionBehavior) - instanceInterruptionBehavior = instanceInterruptionBehaviorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotMarketOptions() + value.maxPrice = try reader["MaxPrice"].readIfPresent() + value.spotInstanceType = try reader["SpotInstanceType"].readIfPresent() + value.blockDurationMinutes = try reader["BlockDurationMinutes"].readIfPresent() + value.validUntil = try reader["ValidUntil"].readTimestampIfPresent(format: .dateTime) + value.instanceInterruptionBehavior = try reader["InstanceInterruptionBehavior"].readIfPresent() + return value + } } } @@ -169968,17 +121825,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationStrategy = "allocationStrategy" - case instanceInterruptionBehavior = "instanceInterruptionBehavior" - case instancePoolsToUseCount = "instancePoolsToUseCount" - case maintenanceStrategies = "maintenanceStrategies" - case maxTotalPrice = "maxTotalPrice" - case minTargetCapacity = "minTargetCapacity" - case singleAvailabilityZone = "singleAvailabilityZone" - case singleInstanceType = "singleInstanceType" - } +extension EC2ClientTypes.SpotOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -170008,24 +121855,20 @@ extension EC2ClientTypes.SpotOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotAllocationStrategy.self, forKey: .allocationStrategy) - allocationStrategy = allocationStrategyDecoded - let maintenanceStrategiesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetSpotMaintenanceStrategies.self, forKey: .maintenanceStrategies) - maintenanceStrategies = maintenanceStrategiesDecoded - let instanceInterruptionBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceInterruptionBehavior.self, forKey: .instanceInterruptionBehavior) - instanceInterruptionBehavior = instanceInterruptionBehaviorDecoded - let instancePoolsToUseCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancePoolsToUseCount) - instancePoolsToUseCount = instancePoolsToUseCountDecoded - let singleInstanceTypeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleInstanceType) - singleInstanceType = singleInstanceTypeDecoded - let singleAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleAvailabilityZone) - singleAvailabilityZone = singleAvailabilityZoneDecoded - let minTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minTargetCapacity) - minTargetCapacity = minTargetCapacityDecoded - let maxTotalPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxTotalPrice) - maxTotalPrice = maxTotalPriceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotOptions() + value.allocationStrategy = try reader["allocationStrategy"].readIfPresent() + value.maintenanceStrategies = try reader["maintenanceStrategies"].readIfPresent(readingClosure: EC2ClientTypes.FleetSpotMaintenanceStrategies.readingClosure) + value.instanceInterruptionBehavior = try reader["instanceInterruptionBehavior"].readIfPresent() + value.instancePoolsToUseCount = try reader["instancePoolsToUseCount"].readIfPresent() + value.singleInstanceType = try reader["singleInstanceType"].readIfPresent() + value.singleAvailabilityZone = try reader["singleAvailabilityZone"].readIfPresent() + value.minTargetCapacity = try reader["minTargetCapacity"].readIfPresent() + value.maxTotalPrice = try reader["maxTotalPrice"].readIfPresent() + return value + } } } @@ -170073,17 +121916,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotOptionsRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocationStrategy = "AllocationStrategy" - case instanceInterruptionBehavior = "InstanceInterruptionBehavior" - case instancePoolsToUseCount = "InstancePoolsToUseCount" - case maintenanceStrategies = "MaintenanceStrategies" - case maxTotalPrice = "MaxTotalPrice" - case minTargetCapacity = "MinTargetCapacity" - case singleAvailabilityZone = "SingleAvailabilityZone" - case singleInstanceType = "SingleInstanceType" - } +extension EC2ClientTypes.SpotOptionsRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -170113,24 +121946,20 @@ extension EC2ClientTypes.SpotOptionsRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocationStrategyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotAllocationStrategy.self, forKey: .allocationStrategy) - allocationStrategy = allocationStrategyDecoded - let maintenanceStrategiesDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.FleetSpotMaintenanceStrategiesRequest.self, forKey: .maintenanceStrategies) - maintenanceStrategies = maintenanceStrategiesDecoded - let instanceInterruptionBehaviorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SpotInstanceInterruptionBehavior.self, forKey: .instanceInterruptionBehavior) - instanceInterruptionBehavior = instanceInterruptionBehaviorDecoded - let instancePoolsToUseCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancePoolsToUseCount) - instancePoolsToUseCount = instancePoolsToUseCountDecoded - let singleInstanceTypeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleInstanceType) - singleInstanceType = singleInstanceTypeDecoded - let singleAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .singleAvailabilityZone) - singleAvailabilityZone = singleAvailabilityZoneDecoded - let minTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minTargetCapacity) - minTargetCapacity = minTargetCapacityDecoded - let maxTotalPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maxTotalPrice) - maxTotalPrice = maxTotalPriceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotOptionsRequest() + value.allocationStrategy = try reader["AllocationStrategy"].readIfPresent() + value.maintenanceStrategies = try reader["MaintenanceStrategies"].readIfPresent(readingClosure: EC2ClientTypes.FleetSpotMaintenanceStrategiesRequest.readingClosure) + value.instanceInterruptionBehavior = try reader["InstanceInterruptionBehavior"].readIfPresent() + value.instancePoolsToUseCount = try reader["InstancePoolsToUseCount"].readIfPresent() + value.singleInstanceType = try reader["SingleInstanceType"].readIfPresent() + value.singleAvailabilityZone = try reader["SingleAvailabilityZone"].readIfPresent() + value.minTargetCapacity = try reader["MinTargetCapacity"].readIfPresent() + value.maxTotalPrice = try reader["MaxTotalPrice"].readIfPresent() + return value + } } } @@ -170178,12 +122007,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotPlacement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case groupName = "groupName" - case tenancy = "tenancy" - } +extension EC2ClientTypes.SpotPlacement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -170198,14 +122022,15 @@ extension EC2ClientTypes.SpotPlacement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let tenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .tenancy) - tenancy = tenancyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotPlacement() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.tenancy = try reader["tenancy"].readIfPresent() + return value + } } } @@ -170233,12 +122058,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotPlacementScore: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZoneId = "availabilityZoneId" - case region = "region" - case score = "score" - } +extension EC2ClientTypes.SpotPlacementScore: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -170253,14 +122073,15 @@ extension EC2ClientTypes.SpotPlacementScore: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let availabilityZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneId) - availabilityZoneId = availabilityZoneIdDecoded - let scoreDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .score) - score = scoreDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotPlacementScore() + value.region = try reader["region"].readIfPresent() + value.availabilityZoneId = try reader["availabilityZoneId"].readIfPresent() + value.score = try reader["score"].readIfPresent() + return value + } } } @@ -170288,14 +122109,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SpotPrice: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZone = "availabilityZone" - case instanceType = "instanceType" - case productDescription = "productDescription" - case spotPrice = "spotPrice" - case timestamp = "timestamp" - } +extension EC2ClientTypes.SpotPrice: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -170316,18 +122130,17 @@ extension EC2ClientTypes.SpotPrice: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InstanceType.self, forKey: .instanceType) - instanceType = instanceTypeDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.RIProductDescription.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let spotPriceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .spotPrice) - spotPrice = spotPriceDecoded - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SpotPrice() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.instanceType = try reader["instanceType"].readIfPresent() + value.productDescription = try reader["productDescription"].readIfPresent() + value.spotPrice = try reader["spotPrice"].readIfPresent() + value.timestamp = try reader["timestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -170395,15 +122208,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.StaleIpPermission: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fromPort = "fromPort" - case ipProtocol = "ipProtocol" - case ipRanges = "ipRanges" - case prefixListIds = "prefixListIds" - case toPort = "toPort" - case userIdGroupPairs = "groups" - } +extension EC2ClientTypes.StaleIpPermission: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -170454,70 +122259,17 @@ extension EC2ClientTypes.StaleIpPermission: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let ipProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipProtocol) - ipProtocol = ipProtocolDecoded - if containerValues.contains(.ipRanges) { - struct KeyVal0{struct item{}} - let ipRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipRanges) - if let ipRangesWrappedContainer = ipRangesWrappedContainer { - let ipRangesContainer = try ipRangesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipRangesBuffer:[Swift.String]? = nil - if let ipRangesContainer = ipRangesContainer { - ipRangesBuffer = [Swift.String]() - for stringContainer0 in ipRangesContainer { - ipRangesBuffer?.append(stringContainer0) - } - } - ipRanges = ipRangesBuffer - } else { - ipRanges = [] - } - } else { - ipRanges = nil - } - if containerValues.contains(.prefixListIds) { - struct KeyVal0{struct item{}} - let prefixListIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .prefixListIds) - if let prefixListIdsWrappedContainer = prefixListIdsWrappedContainer { - let prefixListIdsContainer = try prefixListIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var prefixListIdsBuffer:[Swift.String]? = nil - if let prefixListIdsContainer = prefixListIdsContainer { - prefixListIdsBuffer = [Swift.String]() - for stringContainer0 in prefixListIdsContainer { - prefixListIdsBuffer?.append(stringContainer0) - } - } - prefixListIds = prefixListIdsBuffer - } else { - prefixListIds = [] - } - } else { - prefixListIds = nil - } - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded - if containerValues.contains(.userIdGroupPairs) { - struct KeyVal0{struct item{}} - let userIdGroupPairsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIdGroupPairs) - if let userIdGroupPairsWrappedContainer = userIdGroupPairsWrappedContainer { - let userIdGroupPairsContainer = try userIdGroupPairsWrappedContainer.decodeIfPresent([EC2ClientTypes.UserIdGroupPair].self, forKey: .member) - var userIdGroupPairsBuffer:[EC2ClientTypes.UserIdGroupPair]? = nil - if let userIdGroupPairsContainer = userIdGroupPairsContainer { - userIdGroupPairsBuffer = [EC2ClientTypes.UserIdGroupPair]() - for structureContainer0 in userIdGroupPairsContainer { - userIdGroupPairsBuffer?.append(structureContainer0) - } - } - userIdGroupPairs = userIdGroupPairsBuffer - } else { - userIdGroupPairs = [] - } - } else { - userIdGroupPairs = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.StaleIpPermission() + value.fromPort = try reader["fromPort"].readIfPresent() + value.ipProtocol = try reader["ipProtocol"].readIfPresent() + value.ipRanges = try reader["ipRanges"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.prefixListIds = try reader["prefixListIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.toPort = try reader["toPort"].readIfPresent() + value.userIdGroupPairs = try reader["groups"].readListIfPresent(memberReadingClosure: EC2ClientTypes.UserIdGroupPair.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -170558,15 +122310,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.StaleSecurityGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case groupId = "groupId" - case groupName = "groupName" - case staleIpPermissions = "staleIpPermissions" - case staleIpPermissionsEgress = "staleIpPermissionsEgress" - case vpcId = "vpcId" - } +extension EC2ClientTypes.StaleSecurityGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -170608,54 +122352,18 @@ extension EC2ClientTypes.StaleSecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - if containerValues.contains(.staleIpPermissions) { - struct KeyVal0{struct item{}} - let staleIpPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staleIpPermissions) - if let staleIpPermissionsWrappedContainer = staleIpPermissionsWrappedContainer { - let staleIpPermissionsContainer = try staleIpPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.StaleIpPermission].self, forKey: .member) - var staleIpPermissionsBuffer:[EC2ClientTypes.StaleIpPermission]? = nil - if let staleIpPermissionsContainer = staleIpPermissionsContainer { - staleIpPermissionsBuffer = [EC2ClientTypes.StaleIpPermission]() - for structureContainer0 in staleIpPermissionsContainer { - staleIpPermissionsBuffer?.append(structureContainer0) - } - } - staleIpPermissions = staleIpPermissionsBuffer - } else { - staleIpPermissions = [] - } - } else { - staleIpPermissions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.StaleSecurityGroup() + value.description = try reader["description"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.staleIpPermissions = try reader["staleIpPermissions"].readListIfPresent(memberReadingClosure: EC2ClientTypes.StaleIpPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.staleIpPermissionsEgress = try reader["staleIpPermissionsEgress"].readListIfPresent(memberReadingClosure: EC2ClientTypes.StaleIpPermission.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + return value } - if containerValues.contains(.staleIpPermissionsEgress) { - struct KeyVal0{struct item{}} - let staleIpPermissionsEgressWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staleIpPermissionsEgress) - if let staleIpPermissionsEgressWrappedContainer = staleIpPermissionsEgressWrappedContainer { - let staleIpPermissionsEgressContainer = try staleIpPermissionsEgressWrappedContainer.decodeIfPresent([EC2ClientTypes.StaleIpPermission].self, forKey: .member) - var staleIpPermissionsEgressBuffer:[EC2ClientTypes.StaleIpPermission]? = nil - if let staleIpPermissionsEgressContainer = staleIpPermissionsEgressContainer { - staleIpPermissionsEgressBuffer = [EC2ClientTypes.StaleIpPermission]() - for structureContainer0 in staleIpPermissionsEgressContainer { - staleIpPermissionsEgressBuffer?.append(structureContainer0) - } - } - staleIpPermissionsEgress = staleIpPermissionsEgressBuffer - } else { - staleIpPermissionsEgress = [] - } - } else { - staleIpPermissionsEgress = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded } } @@ -170749,55 +122457,15 @@ public struct StartInstancesInput: Swift.Equatable { } } -struct StartInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let additionalInfo: Swift.String? - let dryRun: Swift.Bool? -} +extension StartInstancesOutput { -extension StartInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalInfo = "additionalInfo" - case dryRun = "dryRun" - case instanceIds = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let additionalInfoDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .additionalInfo) - additionalInfo = additionalInfoDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension StartInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.startingInstances = output.startingInstances - } else { - self.startingInstances = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = StartInstancesOutput() + value.startingInstances = try reader["instancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceStateChange.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -170814,44 +122482,18 @@ public struct StartInstancesOutput: Swift.Equatable { } } -struct StartInstancesOutputBody: Swift.Equatable { - let startingInstances: [EC2ClientTypes.InstanceStateChange]? -} - -extension StartInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case startingInstances = "instancesSet" - } +enum StartInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.startingInstances) { - struct KeyVal0{struct item{}} - let startingInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .startingInstances) - if let startingInstancesWrappedContainer = startingInstancesWrappedContainer { - let startingInstancesContainer = try startingInstancesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceStateChange].self, forKey: .member) - var startingInstancesBuffer:[EC2ClientTypes.InstanceStateChange]? = nil - if let startingInstancesContainer = startingInstancesContainer { - startingInstancesBuffer = [EC2ClientTypes.InstanceStateChange]() - for structureContainer0 in startingInstancesContainer { - startingInstancesBuffer?.append(structureContainer0) - } - } - startingInstances = startingInstancesBuffer - } else { - startingInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - startingInstances = nil - } - } -} - -enum StartInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -170918,59 +122560,15 @@ public struct StartNetworkInsightsAccessScopeAnalysisInput: Swift.Equatable { } } -struct StartNetworkInsightsAccessScopeAnalysisInputBody: Swift.Equatable { - let networkInsightsAccessScopeId: Swift.String? - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? -} - -extension StartNetworkInsightsAccessScopeAnalysisInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case dryRun = "DryRun" - case networkInsightsAccessScopeId = "NetworkInsightsAccessScopeId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsAccessScopeId) - networkInsightsAccessScopeId = networkInsightsAccessScopeIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} +extension StartNetworkInsightsAccessScopeAnalysisOutput { -extension StartNetworkInsightsAccessScopeAnalysisOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartNetworkInsightsAccessScopeAnalysisOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAccessScopeAnalysis = output.networkInsightsAccessScopeAnalysis - } else { - self.networkInsightsAccessScopeAnalysis = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = StartNetworkInsightsAccessScopeAnalysisOutput() + value.networkInsightsAccessScopeAnalysis = try reader["networkInsightsAccessScopeAnalysis"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInsightsAccessScopeAnalysis.readingClosure) + return value } } } @@ -170987,27 +122585,18 @@ public struct StartNetworkInsightsAccessScopeAnalysisOutput: Swift.Equatable { } } -struct StartNetworkInsightsAccessScopeAnalysisOutputBody: Swift.Equatable { - let networkInsightsAccessScopeAnalysis: EC2ClientTypes.NetworkInsightsAccessScopeAnalysis? -} - -extension StartNetworkInsightsAccessScopeAnalysisOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAccessScopeAnalysis = "networkInsightsAccessScopeAnalysis" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAccessScopeAnalysisDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInsightsAccessScopeAnalysis.self, forKey: .networkInsightsAccessScopeAnalysis) - networkInsightsAccessScopeAnalysis = networkInsightsAccessScopeAnalysisDecoded - } -} +enum StartNetworkInsightsAccessScopeAnalysisOutputError { -enum StartNetworkInsightsAccessScopeAnalysisOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -171106,101 +122695,15 @@ public struct StartNetworkInsightsAnalysisInput: Swift.Equatable { } } -struct StartNetworkInsightsAnalysisInputBody: Swift.Equatable { - let networkInsightsPathId: Swift.String? - let additionalAccounts: [Swift.String]? - let filterInArns: [Swift.String]? - let dryRun: Swift.Bool? - let tagSpecifications: [EC2ClientTypes.TagSpecification]? - let clientToken: Swift.String? -} - -extension StartNetworkInsightsAnalysisInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalAccounts = "AdditionalAccount" - case clientToken = "ClientToken" - case dryRun = "DryRun" - case filterInArns = "FilterInArn" - case networkInsightsPathId = "NetworkInsightsPathId" - case tagSpecifications = "TagSpecification" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsPathIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInsightsPathId) - networkInsightsPathId = networkInsightsPathIdDecoded - if containerValues.contains(.additionalAccounts) { - struct KeyVal0{struct item{}} - let additionalAccountsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .additionalAccounts) - if let additionalAccountsWrappedContainer = additionalAccountsWrappedContainer { - let additionalAccountsContainer = try additionalAccountsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var additionalAccountsBuffer:[Swift.String]? = nil - if let additionalAccountsContainer = additionalAccountsContainer { - additionalAccountsBuffer = [Swift.String]() - for stringContainer0 in additionalAccountsContainer { - additionalAccountsBuffer?.append(stringContainer0) - } - } - additionalAccounts = additionalAccountsBuffer - } else { - additionalAccounts = [] - } - } else { - additionalAccounts = nil - } - if containerValues.contains(.filterInArns) { - struct KeyVal0{struct item{}} - let filterInArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filterInArns) - if let filterInArnsWrappedContainer = filterInArnsWrappedContainer { - let filterInArnsContainer = try filterInArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var filterInArnsBuffer:[Swift.String]? = nil - if let filterInArnsContainer = filterInArnsContainer { - filterInArnsBuffer = [Swift.String]() - for stringContainer0 in filterInArnsContainer { - filterInArnsBuffer?.append(stringContainer0) - } - } - filterInArns = filterInArnsBuffer - } else { - filterInArns = [] - } - } else { - filterInArns = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - if containerValues.contains(.tagSpecifications) { - struct KeyVal0{struct item{}} - let tagSpecificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSpecifications) - if let tagSpecificationsWrappedContainer = tagSpecificationsWrappedContainer { - let tagSpecificationsContainer = try tagSpecificationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TagSpecification].self, forKey: .member) - var tagSpecificationsBuffer:[EC2ClientTypes.TagSpecification]? = nil - if let tagSpecificationsContainer = tagSpecificationsContainer { - tagSpecificationsBuffer = [EC2ClientTypes.TagSpecification]() - for structureContainer0 in tagSpecificationsContainer { - tagSpecificationsBuffer?.append(structureContainer0) - } - } - tagSpecifications = tagSpecificationsBuffer - } else { - tagSpecifications = [] - } - } else { - tagSpecifications = nil - } - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - } -} - -extension StartNetworkInsightsAnalysisOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartNetworkInsightsAnalysisOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInsightsAnalysis = output.networkInsightsAnalysis - } else { - self.networkInsightsAnalysis = nil +extension StartNetworkInsightsAnalysisOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = StartNetworkInsightsAnalysisOutput() + value.networkInsightsAnalysis = try reader["networkInsightsAnalysis"].readIfPresent(readingClosure: EC2ClientTypes.NetworkInsightsAnalysis.readingClosure) + return value } } } @@ -171217,27 +122720,18 @@ public struct StartNetworkInsightsAnalysisOutput: Swift.Equatable { } } -struct StartNetworkInsightsAnalysisOutputBody: Swift.Equatable { - let networkInsightsAnalysis: EC2ClientTypes.NetworkInsightsAnalysis? -} - -extension StartNetworkInsightsAnalysisOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInsightsAnalysis = "networkInsightsAnalysis" - } +enum StartNetworkInsightsAnalysisOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInsightsAnalysisDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.NetworkInsightsAnalysis.self, forKey: .networkInsightsAnalysis) - networkInsightsAnalysis = networkInsightsAnalysisDecoded - } -} - -enum StartNetworkInsightsAnalysisOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -171280,34 +122774,15 @@ public struct StartVpcEndpointServicePrivateDnsVerificationInput: Swift.Equatabl } } -struct StartVpcEndpointServicePrivateDnsVerificationInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let serviceId: Swift.String? -} +extension StartVpcEndpointServicePrivateDnsVerificationOutput { -extension StartVpcEndpointServicePrivateDnsVerificationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case serviceId = "ServiceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - } -} - -extension StartVpcEndpointServicePrivateDnsVerificationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartVpcEndpointServicePrivateDnsVerificationOutputBody = try responseDecoder.decode(responseBody: data) - self.returnValue = output.returnValue - } else { - self.returnValue = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = StartVpcEndpointServicePrivateDnsVerificationOutput() + value.returnValue = try reader["return"].readIfPresent() + return value } } } @@ -171324,27 +122799,18 @@ public struct StartVpcEndpointServicePrivateDnsVerificationOutput: Swift.Equatab } } -struct StartVpcEndpointServicePrivateDnsVerificationOutputBody: Swift.Equatable { - let returnValue: Swift.Bool? -} - -extension StartVpcEndpointServicePrivateDnsVerificationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case returnValue = "return" - } +enum StartVpcEndpointServicePrivateDnsVerificationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnValueDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnValue) - returnValue = returnValueDecoded - } -} - -enum StartVpcEndpointServicePrivateDnsVerificationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -171399,11 +122865,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.StateReason: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.StateReason: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -171415,12 +122877,14 @@ extension EC2ClientTypes.StateReason: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.StateReason() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -171692,59 +123156,15 @@ public struct StopInstancesInput: Swift.Equatable { } } -struct StopInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let hibernate: Swift.Bool? - let dryRun: Swift.Bool? - let force: Swift.Bool? -} - -extension StopInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case force = "force" - case hibernate = "Hibernate" - case instanceIds = "InstanceId" - } +extension StopInstancesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let hibernateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .hibernate) - hibernate = hibernateDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - } -} - -extension StopInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StopInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.stoppingInstances = output.stoppingInstances - } else { - self.stoppingInstances = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = StopInstancesOutput() + value.stoppingInstances = try reader["instancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceStateChange.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -171761,52 +123181,23 @@ public struct StopInstancesOutput: Swift.Equatable { } } -struct StopInstancesOutputBody: Swift.Equatable { - let stoppingInstances: [EC2ClientTypes.InstanceStateChange]? -} - -extension StopInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case stoppingInstances = "instancesSet" - } +enum StopInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.stoppingInstances) { - struct KeyVal0{struct item{}} - let stoppingInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .stoppingInstances) - if let stoppingInstancesWrappedContainer = stoppingInstancesWrappedContainer { - let stoppingInstancesContainer = try stoppingInstancesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceStateChange].self, forKey: .member) - var stoppingInstancesBuffer:[EC2ClientTypes.InstanceStateChange]? = nil - if let stoppingInstancesContainer = stoppingInstancesContainer { - stoppingInstancesBuffer = [EC2ClientTypes.InstanceStateChange]() - for structureContainer0 in stoppingInstancesContainer { - stoppingInstancesBuffer?.append(structureContainer0) - } - } - stoppingInstances = stoppingInstancesBuffer - } else { - stoppingInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - stoppingInstances = nil - } - } -} - -enum StopInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } -extension EC2ClientTypes.Storage: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3 = "S3" - } +extension EC2ClientTypes.Storage: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -171815,10 +123206,13 @@ extension EC2ClientTypes.Storage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.S3Storage.self, forKey: .s3) - s3 = s3Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Storage() + value.s3 = try reader["S3"].readIfPresent(readingClosure: EC2ClientTypes.S3Storage.readingClosure) + return value + } } } @@ -171838,11 +123232,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.StorageLocation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case key = "Key" - } +extension EC2ClientTypes.StorageLocation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -171854,12 +123244,14 @@ extension EC2ClientTypes.StorageLocation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.StorageLocation() + value.bucket = try reader["Bucket"].readIfPresent() + value.key = try reader["Key"].readIfPresent() + return value + } } } @@ -171915,16 +123307,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.StoreImageTaskResult: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amiId = "amiId" - case bucket = "bucket" - case progressPercentage = "progressPercentage" - case s3objectKey = "s3objectKey" - case storeTaskFailureReason = "storeTaskFailureReason" - case storeTaskState = "storeTaskState" - case taskStartTime = "taskStartTime" - } +extension EC2ClientTypes.StoreImageTaskResult: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -171951,22 +123334,19 @@ extension EC2ClientTypes.StoreImageTaskResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let amiIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .amiId) - amiId = amiIdDecoded - let taskStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .taskStartTime) - taskStartTime = taskStartTimeDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let s3objectKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3objectKey) - s3objectKey = s3objectKeyDecoded - let progressPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .progressPercentage) - progressPercentage = progressPercentageDecoded - let storeTaskStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storeTaskState) - storeTaskState = storeTaskStateDecoded - let storeTaskFailureReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storeTaskFailureReason) - storeTaskFailureReason = storeTaskFailureReasonDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.StoreImageTaskResult() + value.amiId = try reader["amiId"].readIfPresent() + value.taskStartTime = try reader["taskStartTime"].readTimestampIfPresent(format: .dateTime) + value.bucket = try reader["bucket"].readIfPresent() + value.s3objectKey = try reader["s3objectKey"].readIfPresent() + value.progressPercentage = try reader["progressPercentage"].readIfPresent() + value.storeTaskState = try reader["storeTaskState"].readIfPresent() + value.storeTaskFailureReason = try reader["storeTaskFailureReason"].readIfPresent() + return value + } } } @@ -172010,30 +123390,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.Subnet: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assignIpv6AddressOnCreation = "assignIpv6AddressOnCreation" - case availabilityZone = "availabilityZone" - case availabilityZoneId = "availabilityZoneId" - case availableIpAddressCount = "availableIpAddressCount" - case cidrBlock = "cidrBlock" - case customerOwnedIpv4Pool = "customerOwnedIpv4Pool" - case defaultForAz = "defaultForAz" - case enableDns64 = "enableDns64" - case enableLniAtDeviceIndex = "enableLniAtDeviceIndex" - case ipv6CidrBlockAssociationSet = "ipv6CidrBlockAssociationSet" - case ipv6Native = "ipv6Native" - case mapCustomerOwnedIpOnLaunch = "mapCustomerOwnedIpOnLaunch" - case mapPublicIpOnLaunch = "mapPublicIpOnLaunch" - case outpostArn = "outpostArn" - case ownerId = "ownerId" - case privateDnsNameOptionsOnLaunch = "privateDnsNameOptionsOnLaunch" - case state = "state" - case subnetArn = "subnetArn" - case subnetId = "subnetId" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.Subnet: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172120,84 +123477,33 @@ extension EC2ClientTypes.Subnet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let availabilityZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneId) - availabilityZoneId = availabilityZoneIdDecoded - let availableIpAddressCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .availableIpAddressCount) - availableIpAddressCount = availableIpAddressCountDecoded - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let defaultForAzDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .defaultForAz) - defaultForAz = defaultForAzDecoded - let enableLniAtDeviceIndexDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .enableLniAtDeviceIndex) - enableLniAtDeviceIndex = enableLniAtDeviceIndexDecoded - let mapPublicIpOnLaunchDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .mapPublicIpOnLaunch) - mapPublicIpOnLaunch = mapPublicIpOnLaunchDecoded - let mapCustomerOwnedIpOnLaunchDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .mapCustomerOwnedIpOnLaunch) - mapCustomerOwnedIpOnLaunch = mapCustomerOwnedIpOnLaunchDecoded - let customerOwnedIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIpv4Pool) - customerOwnedIpv4Pool = customerOwnedIpv4PoolDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetState.self, forKey: .state) - state = stateDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let assignIpv6AddressOnCreationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .assignIpv6AddressOnCreation) - assignIpv6AddressOnCreation = assignIpv6AddressOnCreationDecoded - if containerValues.contains(.ipv6CidrBlockAssociationSet) { - struct KeyVal0{struct item{}} - let ipv6CidrBlockAssociationSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6CidrBlockAssociationSet) - if let ipv6CidrBlockAssociationSetWrappedContainer = ipv6CidrBlockAssociationSetWrappedContainer { - let ipv6CidrBlockAssociationSetContainer = try ipv6CidrBlockAssociationSetWrappedContainer.decodeIfPresent([EC2ClientTypes.SubnetIpv6CidrBlockAssociation].self, forKey: .member) - var ipv6CidrBlockAssociationSetBuffer:[EC2ClientTypes.SubnetIpv6CidrBlockAssociation]? = nil - if let ipv6CidrBlockAssociationSetContainer = ipv6CidrBlockAssociationSetContainer { - ipv6CidrBlockAssociationSetBuffer = [EC2ClientTypes.SubnetIpv6CidrBlockAssociation]() - for structureContainer0 in ipv6CidrBlockAssociationSetContainer { - ipv6CidrBlockAssociationSetBuffer?.append(structureContainer0) - } - } - ipv6CidrBlockAssociationSet = ipv6CidrBlockAssociationSetBuffer - } else { - ipv6CidrBlockAssociationSet = [] - } - } else { - ipv6CidrBlockAssociationSet = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let subnetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetArn) - subnetArn = subnetArnDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let enableDns64Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableDns64) - enableDns64 = enableDns64Decoded - let ipv6NativeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ipv6Native) - ipv6Native = ipv6NativeDecoded - let privateDnsNameOptionsOnLaunchDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PrivateDnsNameOptionsOnLaunch.self, forKey: .privateDnsNameOptionsOnLaunch) - privateDnsNameOptionsOnLaunch = privateDnsNameOptionsOnLaunchDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Subnet() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.availabilityZoneId = try reader["availabilityZoneId"].readIfPresent() + value.availableIpAddressCount = try reader["availableIpAddressCount"].readIfPresent() + value.cidrBlock = try reader["cidrBlock"].readIfPresent() + value.defaultForAz = try reader["defaultForAz"].readIfPresent() + value.enableLniAtDeviceIndex = try reader["enableLniAtDeviceIndex"].readIfPresent() + value.mapPublicIpOnLaunch = try reader["mapPublicIpOnLaunch"].readIfPresent() + value.mapCustomerOwnedIpOnLaunch = try reader["mapCustomerOwnedIpOnLaunch"].readIfPresent() + value.customerOwnedIpv4Pool = try reader["customerOwnedIpv4Pool"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.assignIpv6AddressOnCreation = try reader["assignIpv6AddressOnCreation"].readIfPresent() + value.ipv6CidrBlockAssociationSet = try reader["ipv6CidrBlockAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SubnetIpv6CidrBlockAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.subnetArn = try reader["subnetArn"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.enableDns64 = try reader["enableDns64"].readIfPresent() + value.ipv6Native = try reader["ipv6Native"].readIfPresent() + value.privateDnsNameOptionsOnLaunch = try reader["privateDnsNameOptionsOnLaunch"].readIfPresent(readingClosure: EC2ClientTypes.PrivateDnsNameOptionsOnLaunch.readingClosure) + return value + } } } @@ -172297,11 +123603,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SubnetAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case subnetId = "subnetId" - } +extension EC2ClientTypes.SubnetAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172313,12 +123615,14 @@ extension EC2ClientTypes.SubnetAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulitcastDomainAssociationState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SubnetAssociation() + value.subnetId = try reader["subnetId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -172342,11 +123646,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SubnetCidrBlockState: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case statusMessage = "statusMessage" - } +extension EC2ClientTypes.SubnetCidrBlockState: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172358,12 +123658,14 @@ extension EC2ClientTypes.SubnetCidrBlockState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetCidrBlockStateCode.self, forKey: .state) - state = stateDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SubnetCidrBlockState() + value.state = try reader["state"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + return value + } } } @@ -172431,16 +123733,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SubnetCidrReservation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "cidr" - case description = "description" - case ownerId = "ownerId" - case reservationType = "reservationType" - case subnetCidrReservationId = "subnetCidrReservationId" - case subnetId = "subnetId" - case tags = "tagSet" - } +extension EC2ClientTypes.SubnetCidrReservation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172476,38 +123769,18 @@ extension EC2ClientTypes.SubnetCidrReservation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetCidrReservationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetCidrReservationId) - subnetCidrReservationId = subnetCidrReservationIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let reservationTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetCidrReservationType.self, forKey: .reservationType) - reservationType = reservationTypeDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SubnetCidrReservation() + value.subnetCidrReservationId = try reader["subnetCidrReservationId"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.cidr = try reader["cidr"].readIfPresent() + value.reservationType = try reader["reservationType"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -172584,12 +123857,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.SubnetConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv4 = "Ipv4" - case ipv6 = "Ipv6" - case subnetId = "SubnetId" - } +extension EC2ClientTypes.SubnetConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172604,14 +123872,15 @@ extension EC2ClientTypes.SubnetConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let ipv4Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv4) - ipv4 = ipv4Decoded - let ipv6Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6) - ipv6 = ipv6Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SubnetConfiguration() + value.subnetId = try reader["SubnetId"].readIfPresent() + value.ipv4 = try reader["Ipv4"].readIfPresent() + value.ipv6 = try reader["Ipv6"].readIfPresent() + return value + } } } @@ -172639,12 +123908,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SubnetIpv6CidrBlockAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case ipv6CidrBlock = "ipv6CidrBlock" - case ipv6CidrBlockState = "ipv6CidrBlockState" - } +extension EC2ClientTypes.SubnetIpv6CidrBlockAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172659,14 +123923,15 @@ extension EC2ClientTypes.SubnetIpv6CidrBlockAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let ipv6CidrBlockStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetCidrBlockState.self, forKey: .ipv6CidrBlockState) - ipv6CidrBlockState = ipv6CidrBlockStateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SubnetIpv6CidrBlockAssociation() + value.associationId = try reader["associationId"].readIfPresent() + value.ipv6CidrBlock = try reader["ipv6CidrBlock"].readIfPresent() + value.ipv6CidrBlockState = try reader["ipv6CidrBlockState"].readIfPresent(readingClosure: EC2ClientTypes.SubnetCidrBlockState.readingClosure) + return value + } } } @@ -172726,14 +123991,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Subscription: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "destination" - case metric = "metric" - case period = "period" - case source = "source" - case statistic = "statistic" - } +extension EC2ClientTypes.Subscription: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172754,18 +124012,17 @@ extension EC2ClientTypes.Subscription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destination) - destination = destinationDecoded - let metricDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MetricType.self, forKey: .metric) - metric = metricDecoded - let statisticDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StatisticType.self, forKey: .statistic) - statistic = statisticDecoded - let periodDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeriodType.self, forKey: .period) - period = periodDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Subscription() + value.source = try reader["source"].readIfPresent() + value.destination = try reader["destination"].readIfPresent() + value.metric = try reader["metric"].readIfPresent() + value.statistic = try reader["statistic"].readIfPresent() + value.period = try reader["period"].readIfPresent() + return value + } } } @@ -172801,10 +124058,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - } +extension EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172813,10 +124067,13 @@ extension EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SuccessfulInstanceCreditSpecificationItem() + value.instanceId = try reader["instanceId"].readIfPresent() + return value + } } } @@ -172836,10 +124093,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.SuccessfulQueuedPurchaseDeletion: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedInstancesId = "reservedInstancesId" - } +extension EC2ClientTypes.SuccessfulQueuedPurchaseDeletion: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172848,10 +124102,13 @@ extension EC2ClientTypes.SuccessfulQueuedPurchaseDeletion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedInstancesIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedInstancesId) - reservedInstancesId = reservedInstancesIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.SuccessfulQueuedPurchaseDeletion() + value.reservedInstancesId = try reader["reservedInstancesId"].readIfPresent() + return value + } } } @@ -172941,11 +124198,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Tag: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "key" - case value = "value" - } +extension EC2ClientTypes.Tag: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -172957,12 +124210,14 @@ extension EC2ClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Tag() + value.key = try reader["key"].readIfPresent() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -172986,13 +124241,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TagDescription: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "key" - case resourceId = "resourceId" - case resourceType = "resourceType" - case value = "value" - } +extension EC2ClientTypes.TagDescription: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173010,16 +124259,16 @@ extension EC2ClientTypes.TagDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TagDescription() + value.key = try reader["key"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.value = try reader["value"].readIfPresent() + return value + } } } @@ -173051,11 +124300,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TagSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceType = "resourceType" - case tags = "Tag" - } +extension EC2ClientTypes.TagSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173076,28 +124321,13 @@ extension EC2ClientTypes.TagSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TagSpecification() + value.resourceType = try reader["resourceType"].readIfPresent() + value.tags = try reader["Tag"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -173122,14 +124352,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TargetCapacitySpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case defaultTargetCapacityType = "defaultTargetCapacityType" - case onDemandTargetCapacity = "onDemandTargetCapacity" - case spotTargetCapacity = "spotTargetCapacity" - case targetCapacityUnitType = "targetCapacityUnitType" - case totalTargetCapacity = "totalTargetCapacity" - } +extension EC2ClientTypes.TargetCapacitySpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173150,18 +124373,17 @@ extension EC2ClientTypes.TargetCapacitySpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let totalTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalTargetCapacity) - totalTargetCapacity = totalTargetCapacityDecoded - let onDemandTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandTargetCapacity) - onDemandTargetCapacity = onDemandTargetCapacityDecoded - let spotTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .spotTargetCapacity) - spotTargetCapacity = spotTargetCapacityDecoded - let defaultTargetCapacityTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DefaultTargetCapacityType.self, forKey: .defaultTargetCapacityType) - defaultTargetCapacityType = defaultTargetCapacityTypeDecoded - let targetCapacityUnitTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetCapacityUnitType.self, forKey: .targetCapacityUnitType) - targetCapacityUnitType = targetCapacityUnitTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TargetCapacitySpecification() + value.totalTargetCapacity = try reader["totalTargetCapacity"].readIfPresent() + value.onDemandTargetCapacity = try reader["onDemandTargetCapacity"].readIfPresent() + value.spotTargetCapacity = try reader["spotTargetCapacity"].readIfPresent() + value.defaultTargetCapacityType = try reader["defaultTargetCapacityType"].readIfPresent() + value.targetCapacityUnitType = try reader["targetCapacityUnitType"].readIfPresent() + return value + } } } @@ -173197,14 +124419,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TargetCapacitySpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case defaultTargetCapacityType = "DefaultTargetCapacityType" - case onDemandTargetCapacity = "OnDemandTargetCapacity" - case spotTargetCapacity = "SpotTargetCapacity" - case targetCapacityUnitType = "TargetCapacityUnitType" - case totalTargetCapacity = "TotalTargetCapacity" - } +extension EC2ClientTypes.TargetCapacitySpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173225,18 +124440,17 @@ extension EC2ClientTypes.TargetCapacitySpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let totalTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalTargetCapacity) - totalTargetCapacity = totalTargetCapacityDecoded - let onDemandTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .onDemandTargetCapacity) - onDemandTargetCapacity = onDemandTargetCapacityDecoded - let spotTargetCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .spotTargetCapacity) - spotTargetCapacity = spotTargetCapacityDecoded - let defaultTargetCapacityTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DefaultTargetCapacityType.self, forKey: .defaultTargetCapacityType) - defaultTargetCapacityType = defaultTargetCapacityTypeDecoded - let targetCapacityUnitTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetCapacityUnitType.self, forKey: .targetCapacityUnitType) - targetCapacityUnitType = targetCapacityUnitTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TargetCapacitySpecificationRequest() + value.totalTargetCapacity = try reader["TotalTargetCapacity"].readIfPresent() + value.onDemandTargetCapacity = try reader["OnDemandTargetCapacity"].readIfPresent() + value.spotTargetCapacity = try reader["SpotTargetCapacity"].readIfPresent() + value.defaultTargetCapacityType = try reader["DefaultTargetCapacityType"].readIfPresent() + value.targetCapacityUnitType = try reader["TargetCapacityUnitType"].readIfPresent() + return value + } } } @@ -173308,11 +124522,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TargetConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceCount = "instanceCount" - case offeringId = "offeringId" - } +extension EC2ClientTypes.TargetConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173324,12 +124534,14 @@ extension EC2ClientTypes.TargetConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let offeringIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringId) - offeringId = offeringIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TargetConfiguration() + value.instanceCount = try reader["instanceCount"].readIfPresent() + value.offeringId = try reader["offeringId"].readIfPresent() + return value + } } } @@ -173353,11 +124565,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TargetConfigurationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceCount = "InstanceCount" - case offeringId = "OfferingId" - } +extension EC2ClientTypes.TargetConfigurationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173369,12 +124577,14 @@ extension EC2ClientTypes.TargetConfigurationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instanceCount) - instanceCount = instanceCountDecoded - let offeringIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringId) - offeringId = offeringIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TargetConfigurationRequest() + value.instanceCount = try reader["InstanceCount"].readIfPresent() + value.offeringId = try reader["OfferingId"].readIfPresent() + return value + } } } @@ -173399,10 +124609,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TargetGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "arn" - } +extension EC2ClientTypes.TargetGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173411,10 +124618,13 @@ extension EC2ClientTypes.TargetGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TargetGroup() + value.arn = try reader["arn"].readIfPresent() + return value + } } } @@ -173434,10 +124644,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TargetGroupsConfig: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetGroups = "targetGroups" - } +extension EC2ClientTypes.TargetGroupsConfig: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173455,26 +124662,12 @@ extension EC2ClientTypes.TargetGroupsConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.targetGroups) { - struct KeyVal0{struct item{}} - let targetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroups) - if let targetGroupsWrappedContainer = targetGroupsWrappedContainer { - let targetGroupsContainer = try targetGroupsWrappedContainer.decodeIfPresent([EC2ClientTypes.TargetGroup].self, forKey: .member) - var targetGroupsBuffer:[EC2ClientTypes.TargetGroup]? = nil - if let targetGroupsContainer = targetGroupsContainer { - targetGroupsBuffer = [EC2ClientTypes.TargetGroup]() - for structureContainer0 in targetGroupsContainer { - targetGroupsBuffer?.append(structureContainer0) - } - } - targetGroups = targetGroupsBuffer - } else { - targetGroups = [] - } - } else { - targetGroups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TargetGroupsConfig() + value.targetGroups = try reader["targetGroups"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TargetGroup.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -173495,15 +124688,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TargetNetwork: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case clientVpnEndpointId = "clientVpnEndpointId" - case securityGroups = "securityGroups" - case status = "status" - case targetNetworkId = "targetNetworkId" - case vpcId = "vpcId" - } +extension EC2ClientTypes.TargetNetwork: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173536,36 +124721,17 @@ extension EC2ClientTypes.TargetNetwork: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let targetNetworkIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetNetworkId) - targetNetworkId = targetNetworkIdDecoded - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AssociationStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct item{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TargetNetwork() + value.associationId = try reader["associationId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.targetNetworkId = try reader["targetNetworkId"].readIfPresent() + value.clientVpnEndpointId = try reader["clientVpnEndpointId"].readIfPresent() + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.AssociationStatus.readingClosure) + value.securityGroups = try reader["securityGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -173606,11 +124772,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TargetReservationValue: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservationValue = "reservationValue" - case targetConfiguration = "targetConfiguration" - } +extension EC2ClientTypes.TargetReservationValue: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173622,12 +124784,14 @@ extension EC2ClientTypes.TargetReservationValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservationValueDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ReservationValue.self, forKey: .reservationValue) - reservationValue = reservationValueDecoded - let targetConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TargetConfiguration.self, forKey: .targetConfiguration) - targetConfiguration = targetConfigurationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TargetReservationValue() + value.reservationValue = try reader["reservationValue"].readIfPresent(readingClosure: EC2ClientTypes.ReservationValue.readingClosure) + value.targetConfiguration = try reader["targetConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.TargetConfiguration.readingClosure) + return value + } } } @@ -173799,46 +124963,17 @@ public struct TerminateClientVpnConnectionsInput: Swift.Equatable { } } -struct TerminateClientVpnConnectionsInputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let connectionId: Swift.String? - let username: Swift.String? - let dryRun: Swift.Bool? -} - -extension TerminateClientVpnConnectionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "ClientVpnEndpointId" - case connectionId = "ConnectionId" - case dryRun = "DryRun" - case username = "Username" - } +extension TerminateClientVpnConnectionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let connectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionId) - connectionId = connectionIdDecoded - let usernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .username) - username = usernameDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension TerminateClientVpnConnectionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TerminateClientVpnConnectionsOutputBody = try responseDecoder.decode(responseBody: data) - self.clientVpnEndpointId = output.clientVpnEndpointId - self.connectionStatuses = output.connectionStatuses - self.username = output.username - } else { - self.clientVpnEndpointId = nil - self.connectionStatuses = nil - self.username = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = TerminateClientVpnConnectionsOutput() + value.clientVpnEndpointId = try reader["clientVpnEndpointId"].readIfPresent() + value.connectionStatuses = try reader["connectionStatuses"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TerminateConnectionStatus.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.username = try reader["username"].readIfPresent() + return value } } } @@ -173863,62 +124998,23 @@ public struct TerminateClientVpnConnectionsOutput: Swift.Equatable { } } -struct TerminateClientVpnConnectionsOutputBody: Swift.Equatable { - let clientVpnEndpointId: Swift.String? - let username: Swift.String? - let connectionStatuses: [EC2ClientTypes.TerminateConnectionStatus]? -} - -extension TerminateClientVpnConnectionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientVpnEndpointId = "clientVpnEndpointId" - case connectionStatuses = "connectionStatuses" - case username = "username" - } +enum TerminateClientVpnConnectionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientVpnEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientVpnEndpointId) - clientVpnEndpointId = clientVpnEndpointIdDecoded - let usernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .username) - username = usernameDecoded - if containerValues.contains(.connectionStatuses) { - struct KeyVal0{struct item{}} - let connectionStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .connectionStatuses) - if let connectionStatusesWrappedContainer = connectionStatusesWrappedContainer { - let connectionStatusesContainer = try connectionStatusesWrappedContainer.decodeIfPresent([EC2ClientTypes.TerminateConnectionStatus].self, forKey: .member) - var connectionStatusesBuffer:[EC2ClientTypes.TerminateConnectionStatus]? = nil - if let connectionStatusesContainer = connectionStatusesContainer { - connectionStatusesBuffer = [EC2ClientTypes.TerminateConnectionStatus]() - for structureContainer0 in connectionStatusesContainer { - connectionStatusesBuffer?.append(structureContainer0) - } - } - connectionStatuses = connectionStatusesBuffer - } else { - connectionStatuses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - connectionStatuses = nil } } } -enum TerminateClientVpnConnectionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.TerminateConnectionStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectionId = "connectionId" - case currentStatus = "currentStatus" - case previousStatus = "previousStatus" - } +extension EC2ClientTypes.TerminateConnectionStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -173933,14 +125029,15 @@ extension EC2ClientTypes.TerminateConnectionStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let connectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .connectionId) - connectionId = connectionIdDecoded - let previousStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnConnectionStatus.self, forKey: .previousStatus) - previousStatus = previousStatusDecoded - let currentStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ClientVpnConnectionStatus.self, forKey: .currentStatus) - currentStatus = currentStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TerminateConnectionStatus() + value.connectionId = try reader["connectionId"].readIfPresent() + value.previousStatus = try reader["previousStatus"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnConnectionStatus.readingClosure) + value.currentStatus = try reader["currentStatus"].readIfPresent(readingClosure: EC2ClientTypes.ClientVpnConnectionStatus.readingClosure) + return value + } } } @@ -174015,51 +125112,15 @@ public struct TerminateInstancesInput: Swift.Equatable { } } -struct TerminateInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension TerminateInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceIds = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension TerminateInstancesOutput { -extension TerminateInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TerminateInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.terminatingInstances = output.terminatingInstances - } else { - self.terminatingInstances = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = TerminateInstancesOutput() + value.terminatingInstances = try reader["instancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceStateChange.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -174076,52 +125137,23 @@ public struct TerminateInstancesOutput: Swift.Equatable { } } -struct TerminateInstancesOutputBody: Swift.Equatable { - let terminatingInstances: [EC2ClientTypes.InstanceStateChange]? -} - -extension TerminateInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case terminatingInstances = "instancesSet" - } +enum TerminateInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.terminatingInstances) { - struct KeyVal0{struct item{}} - let terminatingInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .terminatingInstances) - if let terminatingInstancesWrappedContainer = terminatingInstancesWrappedContainer { - let terminatingInstancesContainer = try terminatingInstancesWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceStateChange].self, forKey: .member) - var terminatingInstancesBuffer:[EC2ClientTypes.InstanceStateChange]? = nil - if let terminatingInstancesContainer = terminatingInstancesContainer { - terminatingInstancesBuffer = [EC2ClientTypes.InstanceStateChange]() - for structureContainer0 in terminatingInstancesContainer { - terminatingInstancesBuffer?.append(structureContainer0) - } - } - terminatingInstances = terminatingInstancesBuffer - } else { - terminatingInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - terminatingInstances = nil } } } -enum TerminateInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) - } - } -} - -extension EC2ClientTypes.ThroughResourcesStatement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceStatement = "resourceStatement" - } +extension EC2ClientTypes.ThroughResourcesStatement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174130,10 +125162,13 @@ extension EC2ClientTypes.ThroughResourcesStatement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceStatementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceStatement.self, forKey: .resourceStatement) - resourceStatement = resourceStatementDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ThroughResourcesStatement() + value.resourceStatement = try reader["resourceStatement"].readIfPresent(readingClosure: EC2ClientTypes.ResourceStatement.readingClosure) + return value + } } } @@ -174153,10 +125188,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ThroughResourcesStatementRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceStatement = "ResourceStatement" - } +extension EC2ClientTypes.ThroughResourcesStatementRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174165,10 +125197,13 @@ extension EC2ClientTypes.ThroughResourcesStatementRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceStatementDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ResourceStatementRequest.self, forKey: .resourceStatement) - resourceStatement = resourceStatementDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ThroughResourcesStatementRequest() + value.resourceStatement = try reader["ResourceStatement"].readIfPresent(readingClosure: EC2ClientTypes.ResourceStatementRequest.readingClosure) + return value + } } } @@ -174241,11 +125276,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TotalLocalStorageGB: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.TotalLocalStorageGB: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174257,12 +125288,14 @@ extension EC2ClientTypes.TotalLocalStorageGB: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TotalLocalStorageGB() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -174286,11 +125319,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TotalLocalStorageGBRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.TotalLocalStorageGBRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174302,12 +125331,14 @@ extension EC2ClientTypes.TotalLocalStorageGBRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TotalLocalStorageGBRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -174392,15 +125423,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TrafficMirrorFilter: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case egressFilterRules = "egressFilterRuleSet" - case ingressFilterRules = "ingressFilterRuleSet" - case networkServices = "networkServiceSet" - case tags = "tagSet" - case trafficMirrorFilterId = "trafficMirrorFilterId" - } +extension EC2ClientTypes.TrafficMirrorFilter: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174460,87 +125483,17 @@ extension EC2ClientTypes.TrafficMirrorFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - if containerValues.contains(.ingressFilterRules) { - struct KeyVal0{struct item{}} - let ingressFilterRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ingressFilterRules) - if let ingressFilterRulesWrappedContainer = ingressFilterRulesWrappedContainer { - let ingressFilterRulesContainer = try ingressFilterRulesWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorFilterRule].self, forKey: .member) - var ingressFilterRulesBuffer:[EC2ClientTypes.TrafficMirrorFilterRule]? = nil - if let ingressFilterRulesContainer = ingressFilterRulesContainer { - ingressFilterRulesBuffer = [EC2ClientTypes.TrafficMirrorFilterRule]() - for structureContainer0 in ingressFilterRulesContainer { - ingressFilterRulesBuffer?.append(structureContainer0) - } - } - ingressFilterRules = ingressFilterRulesBuffer - } else { - ingressFilterRules = [] - } - } else { - ingressFilterRules = nil - } - if containerValues.contains(.egressFilterRules) { - struct KeyVal0{struct item{}} - let egressFilterRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .egressFilterRules) - if let egressFilterRulesWrappedContainer = egressFilterRulesWrappedContainer { - let egressFilterRulesContainer = try egressFilterRulesWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorFilterRule].self, forKey: .member) - var egressFilterRulesBuffer:[EC2ClientTypes.TrafficMirrorFilterRule]? = nil - if let egressFilterRulesContainer = egressFilterRulesContainer { - egressFilterRulesBuffer = [EC2ClientTypes.TrafficMirrorFilterRule]() - for structureContainer0 in egressFilterRulesContainer { - egressFilterRulesBuffer?.append(structureContainer0) - } - } - egressFilterRules = egressFilterRulesBuffer - } else { - egressFilterRules = [] - } - } else { - egressFilterRules = nil - } - if containerValues.contains(.networkServices) { - struct KeyVal0{struct item{}} - let networkServicesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkServices) - if let networkServicesWrappedContainer = networkServicesWrappedContainer { - let networkServicesContainer = try networkServicesWrappedContainer.decodeIfPresent([EC2ClientTypes.TrafficMirrorNetworkService].self, forKey: .member) - var networkServicesBuffer:[EC2ClientTypes.TrafficMirrorNetworkService]? = nil - if let networkServicesContainer = networkServicesContainer { - networkServicesBuffer = [EC2ClientTypes.TrafficMirrorNetworkService]() - for enumContainer0 in networkServicesContainer { - networkServicesBuffer?.append(enumContainer0) - } - } - networkServices = networkServicesBuffer - } else { - networkServices = [] - } - } else { - networkServices = nil - } - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TrafficMirrorFilter() + value.trafficMirrorFilterId = try reader["trafficMirrorFilterId"].readIfPresent() + value.ingressFilterRules = try reader["ingressFilterRuleSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TrafficMirrorFilterRule.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.egressFilterRules = try reader["egressFilterRuleSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TrafficMirrorFilterRule.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkServices = try reader["networkServiceSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TrafficMirrorNetworkService.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.description = try reader["description"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -174581,20 +125534,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TrafficMirrorFilterRule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case destinationCidrBlock = "destinationCidrBlock" - case destinationPortRange = "destinationPortRange" - case `protocol` = "protocol" - case ruleAction = "ruleAction" - case ruleNumber = "ruleNumber" - case sourceCidrBlock = "sourceCidrBlock" - case sourcePortRange = "sourcePortRange" - case trafficDirection = "trafficDirection" - case trafficMirrorFilterId = "trafficMirrorFilterId" - case trafficMirrorFilterRuleId = "trafficMirrorFilterRuleId" - } +extension EC2ClientTypes.TrafficMirrorFilterRule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174633,30 +125573,23 @@ extension EC2ClientTypes.TrafficMirrorFilterRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorFilterRuleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterRuleId) - trafficMirrorFilterRuleId = trafficMirrorFilterRuleIdDecoded - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - let trafficDirectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficDirection.self, forKey: .trafficDirection) - trafficDirection = trafficDirectionDecoded - let ruleNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ruleNumber) - ruleNumber = ruleNumberDecoded - let ruleActionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorRuleAction.self, forKey: .ruleAction) - ruleAction = ruleActionDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .protocol) - `protocol` = protocolDecoded - let destinationPortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorPortRange.self, forKey: .destinationPortRange) - destinationPortRange = destinationPortRangeDecoded - let sourcePortRangeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorPortRange.self, forKey: .sourcePortRange) - sourcePortRange = sourcePortRangeDecoded - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let sourceCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceCidrBlock) - sourceCidrBlock = sourceCidrBlockDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TrafficMirrorFilterRule() + value.trafficMirrorFilterRuleId = try reader["trafficMirrorFilterRuleId"].readIfPresent() + value.trafficMirrorFilterId = try reader["trafficMirrorFilterId"].readIfPresent() + value.trafficDirection = try reader["trafficDirection"].readIfPresent() + value.ruleNumber = try reader["ruleNumber"].readIfPresent() + value.ruleAction = try reader["ruleAction"].readIfPresent() + value.`protocol` = try reader["protocol"].readIfPresent() + value.destinationPortRange = try reader["destinationPortRange"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorPortRange.readingClosure) + value.sourcePortRange = try reader["sourcePortRange"].readIfPresent(readingClosure: EC2ClientTypes.TrafficMirrorPortRange.readingClosure) + value.destinationCidrBlock = try reader["destinationCidrBlock"].readIfPresent() + value.sourceCidrBlock = try reader["sourceCidrBlock"].readIfPresent() + value.description = try reader["description"].readIfPresent() + return value + } } } @@ -174783,11 +125716,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TrafficMirrorPortRange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fromPort = "fromPort" - case toPort = "toPort" - } +extension EC2ClientTypes.TrafficMirrorPortRange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174799,12 +125728,14 @@ extension EC2ClientTypes.TrafficMirrorPortRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TrafficMirrorPortRange() + value.fromPort = try reader["fromPort"].readIfPresent() + value.toPort = try reader["toPort"].readIfPresent() + return value + } } } @@ -174828,11 +125759,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TrafficMirrorPortRangeRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fromPort = "FromPort" - case toPort = "ToPort" - } +extension EC2ClientTypes.TrafficMirrorPortRangeRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174844,12 +125771,14 @@ extension EC2ClientTypes.TrafficMirrorPortRangeRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fromPort) - fromPort = fromPortDecoded - let toPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .toPort) - toPort = toPortDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TrafficMirrorPortRangeRequest() + value.fromPort = try reader["FromPort"].readIfPresent() + value.toPort = try reader["ToPort"].readIfPresent() + return value + } } } @@ -174905,19 +125834,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TrafficMirrorSession: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case networkInterfaceId = "networkInterfaceId" - case ownerId = "ownerId" - case packetLength = "packetLength" - case sessionNumber = "sessionNumber" - case tags = "tagSet" - case trafficMirrorFilterId = "trafficMirrorFilterId" - case trafficMirrorSessionId = "trafficMirrorSessionId" - case trafficMirrorTargetId = "trafficMirrorTargetId" - case virtualNetworkId = "virtualNetworkId" - } +extension EC2ClientTypes.TrafficMirrorSession: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -174962,44 +125879,21 @@ extension EC2ClientTypes.TrafficMirrorSession: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorSessionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorSessionId) - trafficMirrorSessionId = trafficMirrorSessionIdDecoded - let trafficMirrorTargetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorTargetId) - trafficMirrorTargetId = trafficMirrorTargetIdDecoded - let trafficMirrorFilterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorFilterId) - trafficMirrorFilterId = trafficMirrorFilterIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let packetLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packetLength) - packetLength = packetLengthDecoded - let sessionNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sessionNumber) - sessionNumber = sessionNumberDecoded - let virtualNetworkIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .virtualNetworkId) - virtualNetworkId = virtualNetworkIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TrafficMirrorSession() + value.trafficMirrorSessionId = try reader["trafficMirrorSessionId"].readIfPresent() + value.trafficMirrorTargetId = try reader["trafficMirrorTargetId"].readIfPresent() + value.trafficMirrorFilterId = try reader["trafficMirrorFilterId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.packetLength = try reader["packetLength"].readIfPresent() + value.sessionNumber = try reader["sessionNumber"].readIfPresent() + value.virtualNetworkId = try reader["virtualNetworkId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -175091,17 +125985,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TrafficMirrorTarget: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case gatewayLoadBalancerEndpointId = "gatewayLoadBalancerEndpointId" - case networkInterfaceId = "networkInterfaceId" - case networkLoadBalancerArn = "networkLoadBalancerArn" - case ownerId = "ownerId" - case tags = "tagSet" - case trafficMirrorTargetId = "trafficMirrorTargetId" - case type = "type" - } +extension EC2ClientTypes.TrafficMirrorTarget: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -175140,41 +126024,20 @@ extension EC2ClientTypes.TrafficMirrorTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficMirrorTargetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficMirrorTargetId) - trafficMirrorTargetId = trafficMirrorTargetIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let networkLoadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkLoadBalancerArn) - networkLoadBalancerArn = networkLoadBalancerArnDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrafficMirrorTargetType.self, forKey: .type) - type = typeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TrafficMirrorTarget() + value.trafficMirrorTargetId = try reader["trafficMirrorTargetId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.networkLoadBalancerArn = try reader["networkLoadBalancerArn"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.gatewayLoadBalancerEndpointId = try reader["gatewayLoadBalancerEndpointId"].readIfPresent() + return value } - let gatewayLoadBalancerEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .gatewayLoadBalancerEndpointId) - gatewayLoadBalancerEndpointId = gatewayLoadBalancerEndpointIdDecoded } } @@ -175292,17 +126155,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGateway: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case description = "description" - case options = "options" - case ownerId = "ownerId" - case state = "state" - case tags = "tagSet" - case transitGatewayArn = "transitGatewayArn" - case transitGatewayId = "transitGatewayId" - } +extension EC2ClientTypes.TransitGateway: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -175341,40 +126194,19 @@ extension EC2ClientTypes.TransitGateway: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let transitGatewayArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayArn) - transitGatewayArn = transitGatewayArnDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayState.self, forKey: .state) - state = stateDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGateway() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.transitGatewayArn = try reader["transitGatewayArn"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.options = try reader["options"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayOptions.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -175423,14 +126255,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceType = "resourceType" - case state = "state" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayRouteTableId = "transitGatewayRouteTableId" - } +extension EC2ClientTypes.TransitGatewayAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -175451,18 +126276,17 @@ extension EC2ClientTypes.TransitGatewayAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAssociationState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayAssociation() + value.transitGatewayRouteTableId = try reader["transitGatewayRouteTableId"].readIfPresent() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -175536,19 +126360,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case association = "association" - case creationTime = "creationTime" - case resourceId = "resourceId" - case resourceOwnerId = "resourceOwnerId" - case resourceType = "resourceType" - case state = "state" - case tags = "tagSet" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayId = "transitGatewayId" - case transitGatewayOwnerId = "transitGatewayOwnerId" - } +extension EC2ClientTypes.TransitGatewayAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -175593,44 +126405,21 @@ extension EC2ClientTypes.TransitGatewayAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let transitGatewayOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayOwnerId) - transitGatewayOwnerId = transitGatewayOwnerIdDecoded - let resourceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwnerId) - resourceOwnerId = resourceOwnerIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentState.self, forKey: .state) - state = stateDecoded - let associationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentAssociation.self, forKey: .association) - association = associationDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayAttachment() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.transitGatewayOwnerId = try reader["transitGatewayOwnerId"].readIfPresent() + value.resourceOwnerId = try reader["resourceOwnerId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.association = try reader["association"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayAttachmentAssociation.readingClosure) + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -175687,11 +126476,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayAttachmentAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case transitGatewayRouteTableId = "transitGatewayRouteTableId" - } +extension EC2ClientTypes.TransitGatewayAttachmentAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -175703,12 +126488,14 @@ extension EC2ClientTypes.TransitGatewayAttachmentAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAssociationState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayAttachmentAssociation() + value.transitGatewayRouteTableId = try reader["transitGatewayRouteTableId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -175732,14 +126519,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayAttachmentBgpConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bgpStatus = "bgpStatus" - case peerAddress = "peerAddress" - case peerAsn = "peerAsn" - case transitGatewayAddress = "transitGatewayAddress" - case transitGatewayAsn = "transitGatewayAsn" - } +extension EC2ClientTypes.TransitGatewayAttachmentBgpConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -175760,18 +126540,17 @@ extension EC2ClientTypes.TransitGatewayAttachmentBgpConfiguration: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .transitGatewayAsn) - transitGatewayAsn = transitGatewayAsnDecoded - let peerAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .peerAsn) - peerAsn = peerAsnDecoded - let transitGatewayAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAddress) - transitGatewayAddress = transitGatewayAddressDecoded - let peerAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerAddress) - peerAddress = peerAddressDecoded - let bgpStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.BgpStatus.self, forKey: .bgpStatus) - bgpStatus = bgpStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayAttachmentBgpConfiguration() + value.transitGatewayAsn = try reader["transitGatewayAsn"].readIfPresent() + value.peerAsn = try reader["peerAsn"].readIfPresent() + value.transitGatewayAddress = try reader["transitGatewayAddress"].readIfPresent() + value.peerAddress = try reader["peerAddress"].readIfPresent() + value.bgpStatus = try reader["bgpStatus"].readIfPresent() + return value + } } } @@ -175807,11 +126586,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayAttachmentPropagation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case transitGatewayRouteTableId = "transitGatewayRouteTableId" - } +extension EC2ClientTypes.TransitGatewayAttachmentPropagation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -175823,12 +126598,14 @@ extension EC2ClientTypes.TransitGatewayAttachmentPropagation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPropagationState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayAttachmentPropagation() + value.transitGatewayRouteTableId = try reader["transitGatewayRouteTableId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -175961,16 +126738,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayConnect: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case options = "options" - case state = "state" - case tags = "tagSet" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayId = "transitGatewayId" - case transportTransitGatewayAttachmentId = "transportTransitGatewayAttachmentId" - } +extension EC2ClientTypes.TransitGatewayConnect: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176006,38 +126774,18 @@ extension EC2ClientTypes.TransitGatewayConnect: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let transportTransitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transportTransitGatewayAttachmentId) - transportTransitGatewayAttachmentId = transportTransitGatewayAttachmentIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentState.self, forKey: .state) - state = stateDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayConnectOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayConnect() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.transportTransitGatewayAttachmentId = try reader["transportTransitGatewayAttachmentId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.options = try reader["options"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayConnectOptions.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -176082,10 +126830,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayConnectOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `protocol` = "protocol" - } +extension EC2ClientTypes.TransitGatewayConnectOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176094,10 +126839,13 @@ extension EC2ClientTypes.TransitGatewayConnectOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ProtocolValue.self, forKey: .protocol) - `protocol` = protocolDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayConnectOptions() + value.`protocol` = try reader["protocol"].readIfPresent() + return value + } } } @@ -176117,15 +126865,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayConnectPeer: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectPeerConfiguration = "connectPeerConfiguration" - case creationTime = "creationTime" - case state = "state" - case tags = "tagSet" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayConnectPeerId = "transitGatewayConnectPeerId" - } +extension EC2ClientTypes.TransitGatewayConnectPeer: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176158,36 +126898,17 @@ extension EC2ClientTypes.TransitGatewayConnectPeer: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let transitGatewayConnectPeerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayConnectPeerId) - transitGatewayConnectPeerId = transitGatewayConnectPeerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayConnectPeerState.self, forKey: .state) - state = stateDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let connectPeerConfigurationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayConnectPeerConfiguration.self, forKey: .connectPeerConfiguration) - connectPeerConfiguration = connectPeerConfigurationDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayConnectPeer() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.transitGatewayConnectPeerId = try reader["transitGatewayConnectPeerId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.connectPeerConfiguration = try reader["connectPeerConfiguration"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayConnectPeerConfiguration.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -176228,14 +126949,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayConnectPeerConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bgpConfigurations = "bgpConfigurations" - case insideCidrBlocks = "insideCidrBlocks" - case peerAddress = "peerAddress" - case `protocol` = "protocol" - case transitGatewayAddress = "transitGatewayAddress" - } +extension EC2ClientTypes.TransitGatewayConnectPeerConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176274,51 +126988,16 @@ extension EC2ClientTypes.TransitGatewayConnectPeerConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAddress) - transitGatewayAddress = transitGatewayAddressDecoded - let peerAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerAddress) - peerAddress = peerAddressDecoded - if containerValues.contains(.insideCidrBlocks) { - struct KeyVal0{struct item{}} - let insideCidrBlocksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .insideCidrBlocks) - if let insideCidrBlocksWrappedContainer = insideCidrBlocksWrappedContainer { - let insideCidrBlocksContainer = try insideCidrBlocksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var insideCidrBlocksBuffer:[Swift.String]? = nil - if let insideCidrBlocksContainer = insideCidrBlocksContainer { - insideCidrBlocksBuffer = [Swift.String]() - for stringContainer0 in insideCidrBlocksContainer { - insideCidrBlocksBuffer?.append(stringContainer0) - } - } - insideCidrBlocks = insideCidrBlocksBuffer - } else { - insideCidrBlocks = [] - } - } else { - insideCidrBlocks = nil - } - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ProtocolValue.self, forKey: .protocol) - `protocol` = protocolDecoded - if containerValues.contains(.bgpConfigurations) { - struct KeyVal0{struct item{}} - let bgpConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .bgpConfigurations) - if let bgpConfigurationsWrappedContainer = bgpConfigurationsWrappedContainer { - let bgpConfigurationsContainer = try bgpConfigurationsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayAttachmentBgpConfiguration].self, forKey: .member) - var bgpConfigurationsBuffer:[EC2ClientTypes.TransitGatewayAttachmentBgpConfiguration]? = nil - if let bgpConfigurationsContainer = bgpConfigurationsContainer { - bgpConfigurationsBuffer = [EC2ClientTypes.TransitGatewayAttachmentBgpConfiguration]() - for structureContainer0 in bgpConfigurationsContainer { - bgpConfigurationsBuffer?.append(structureContainer0) - } - } - bgpConfigurations = bgpConfigurationsBuffer - } else { - bgpConfigurations = [] - } - } else { - bgpConfigurations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayConnectPeerConfiguration() + value.transitGatewayAddress = try reader["transitGatewayAddress"].readIfPresent() + value.peerAddress = try reader["peerAddress"].readIfPresent() + value.insideCidrBlocks = try reader["insideCidrBlocks"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.`protocol` = try reader["protocol"].readIfPresent() + value.bgpConfigurations = try reader["bgpConfigurations"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayAttachmentBgpConfiguration.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -176393,10 +127072,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayConnectRequestBgpOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case peerAsn = "PeerAsn" - } +extension EC2ClientTypes.TransitGatewayConnectRequestBgpOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176405,10 +127081,13 @@ extension EC2ClientTypes.TransitGatewayConnectRequestBgpOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let peerAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .peerAsn) - peerAsn = peerAsnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayConnectRequestBgpOptions() + value.peerAsn = try reader["PeerAsn"].readIfPresent() + return value + } } } @@ -176475,12 +127154,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupMembers: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deregisteredNetworkInterfaceIds = "deregisteredNetworkInterfaceIds" - case groupIpAddress = "groupIpAddress" - case transitGatewayMulticastDomainId = "transitGatewayMulticastDomainId" - } +extension EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupMembers: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176504,31 +127178,15 @@ extension EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupMembers: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - if containerValues.contains(.deregisteredNetworkInterfaceIds) { - struct KeyVal0{struct item{}} - let deregisteredNetworkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .deregisteredNetworkInterfaceIds) - if let deregisteredNetworkInterfaceIdsWrappedContainer = deregisteredNetworkInterfaceIdsWrappedContainer { - let deregisteredNetworkInterfaceIdsContainer = try deregisteredNetworkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var deregisteredNetworkInterfaceIdsBuffer:[Swift.String]? = nil - if let deregisteredNetworkInterfaceIdsContainer = deregisteredNetworkInterfaceIdsContainer { - deregisteredNetworkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in deregisteredNetworkInterfaceIdsContainer { - deregisteredNetworkInterfaceIdsBuffer?.append(stringContainer0) - } - } - deregisteredNetworkInterfaceIds = deregisteredNetworkInterfaceIdsBuffer - } else { - deregisteredNetworkInterfaceIds = [] - } - } else { - deregisteredNetworkInterfaceIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupMembers() + value.transitGatewayMulticastDomainId = try reader["transitGatewayMulticastDomainId"].readIfPresent() + value.deregisteredNetworkInterfaceIds = try reader["deregisteredNetworkInterfaceIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.groupIpAddress = try reader["groupIpAddress"].readIfPresent() + return value } - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded } } @@ -176556,12 +127214,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupSources: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deregisteredNetworkInterfaceIds = "deregisteredNetworkInterfaceIds" - case groupIpAddress = "groupIpAddress" - case transitGatewayMulticastDomainId = "transitGatewayMulticastDomainId" - } +extension EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupSources: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176585,31 +127238,15 @@ extension EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupSources: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - if containerValues.contains(.deregisteredNetworkInterfaceIds) { - struct KeyVal0{struct item{}} - let deregisteredNetworkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .deregisteredNetworkInterfaceIds) - if let deregisteredNetworkInterfaceIdsWrappedContainer = deregisteredNetworkInterfaceIdsWrappedContainer { - let deregisteredNetworkInterfaceIdsContainer = try deregisteredNetworkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var deregisteredNetworkInterfaceIdsBuffer:[Swift.String]? = nil - if let deregisteredNetworkInterfaceIdsContainer = deregisteredNetworkInterfaceIdsContainer { - deregisteredNetworkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in deregisteredNetworkInterfaceIdsContainer { - deregisteredNetworkInterfaceIdsBuffer?.append(stringContainer0) - } - } - deregisteredNetworkInterfaceIds = deregisteredNetworkInterfaceIdsBuffer - } else { - deregisteredNetworkInterfaceIds = [] - } - } else { - deregisteredNetworkInterfaceIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastDeregisteredGroupSources() + value.transitGatewayMulticastDomainId = try reader["transitGatewayMulticastDomainId"].readIfPresent() + value.deregisteredNetworkInterfaceIds = try reader["deregisteredNetworkInterfaceIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.groupIpAddress = try reader["groupIpAddress"].readIfPresent() + return value } - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded } } @@ -176637,17 +127274,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayMulticastDomain: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case options = "options" - case ownerId = "ownerId" - case state = "state" - case tags = "tagSet" - case transitGatewayId = "transitGatewayId" - case transitGatewayMulticastDomainArn = "transitGatewayMulticastDomainArn" - case transitGatewayMulticastDomainId = "transitGatewayMulticastDomainId" - } +extension EC2ClientTypes.TransitGatewayMulticastDomain: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176686,40 +127313,19 @@ extension EC2ClientTypes.TransitGatewayMulticastDomain: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let transitGatewayMulticastDomainArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainArn) - transitGatewayMulticastDomainArn = transitGatewayMulticastDomainArnDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDomainOptions.self, forKey: .options) - options = optionsDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayMulticastDomainState.self, forKey: .state) - state = stateDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastDomain() + value.transitGatewayMulticastDomainId = try reader["transitGatewayMulticastDomainId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.transitGatewayMulticastDomainArn = try reader["transitGatewayMulticastDomainArn"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.options = try reader["options"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayMulticastDomainOptions.readingClosure) + value.state = try reader["state"].readIfPresent() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -176768,14 +127374,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayMulticastDomainAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceOwnerId = "resourceOwnerId" - case resourceType = "resourceType" - case subnet = "subnet" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - } +extension EC2ClientTypes.TransitGatewayMulticastDomainAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176796,18 +127395,17 @@ extension EC2ClientTypes.TransitGatewayMulticastDomainAssociation: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwnerId) - resourceOwnerId = resourceOwnerIdDecoded - let subnetDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SubnetAssociation.self, forKey: .subnet) - subnet = subnetDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastDomainAssociation() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceOwnerId = try reader["resourceOwnerId"].readIfPresent() + value.subnet = try reader["subnet"].readIfPresent(readingClosure: EC2ClientTypes.SubnetAssociation.readingClosure) + return value + } } } @@ -176843,15 +127441,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayMulticastDomainAssociations: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceOwnerId = "resourceOwnerId" - case resourceType = "resourceType" - case subnets = "subnets" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayMulticastDomainId = "transitGatewayMulticastDomainId" - } +extension EC2ClientTypes.TransitGatewayMulticastDomainAssociations: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176884,36 +127474,17 @@ extension EC2ClientTypes.TransitGatewayMulticastDomainAssociations: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwnerId) - resourceOwnerId = resourceOwnerIdDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct item{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([EC2ClientTypes.SubnetAssociation].self, forKey: .member) - var subnetsBuffer:[EC2ClientTypes.SubnetAssociation]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [EC2ClientTypes.SubnetAssociation]() - for structureContainer0 in subnetsContainer { - subnetsBuffer?.append(structureContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastDomainAssociations() + value.transitGatewayMulticastDomainId = try reader["transitGatewayMulticastDomainId"].readIfPresent() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceOwnerId = try reader["resourceOwnerId"].readIfPresent() + value.subnets = try reader["subnets"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SubnetAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -176954,12 +127525,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayMulticastDomainOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoAcceptSharedAssociations = "autoAcceptSharedAssociations" - case igmpv2Support = "igmpv2Support" - case staticSourcesSupport = "staticSourcesSupport" - } +extension EC2ClientTypes.TransitGatewayMulticastDomainOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -176974,14 +127540,15 @@ extension EC2ClientTypes.TransitGatewayMulticastDomainOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let igmpv2SupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Igmpv2SupportValue.self, forKey: .igmpv2Support) - igmpv2Support = igmpv2SupportDecoded - let staticSourcesSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.StaticSourcesSupportValue.self, forKey: .staticSourcesSupport) - staticSourcesSupport = staticSourcesSupportDecoded - let autoAcceptSharedAssociationsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AutoAcceptSharedAssociationsValue.self, forKey: .autoAcceptSharedAssociations) - autoAcceptSharedAssociations = autoAcceptSharedAssociationsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastDomainOptions() + value.igmpv2Support = try reader["igmpv2Support"].readIfPresent() + value.staticSourcesSupport = try reader["staticSourcesSupport"].readIfPresent() + value.autoAcceptSharedAssociations = try reader["autoAcceptSharedAssociations"].readIfPresent() + return value + } } } @@ -177047,20 +127614,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayMulticastGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupIpAddress = "groupIpAddress" - case groupMember = "groupMember" - case groupSource = "groupSource" - case memberType = "memberType" - case networkInterfaceId = "networkInterfaceId" - case resourceId = "resourceId" - case resourceOwnerId = "resourceOwnerId" - case resourceType = "resourceType" - case sourceType = "sourceType" - case subnetId = "subnetId" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - } +extension EC2ClientTypes.TransitGatewayMulticastGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177099,30 +127653,23 @@ extension EC2ClientTypes.TransitGatewayMulticastGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwnerId) - resourceOwnerId = resourceOwnerIdDecoded - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let groupMemberDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .groupMember) - groupMember = groupMemberDecoded - let groupSourceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .groupSource) - groupSource = groupSourceDecoded - let memberTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MembershipType.self, forKey: .memberType) - memberType = memberTypeDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MembershipType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastGroup() + value.groupIpAddress = try reader["groupIpAddress"].readIfPresent() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.subnetId = try reader["subnetId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceOwnerId = try reader["resourceOwnerId"].readIfPresent() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.groupMember = try reader["groupMember"].readIfPresent() + value.groupSource = try reader["groupSource"].readIfPresent() + value.memberType = try reader["memberType"].readIfPresent() + value.sourceType = try reader["sourceType"].readIfPresent() + return value + } } } @@ -177182,12 +127729,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayMulticastRegisteredGroupMembers: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupIpAddress = "groupIpAddress" - case registeredNetworkInterfaceIds = "registeredNetworkInterfaceIds" - case transitGatewayMulticastDomainId = "transitGatewayMulticastDomainId" - } +extension EC2ClientTypes.TransitGatewayMulticastRegisteredGroupMembers: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177211,31 +127753,15 @@ extension EC2ClientTypes.TransitGatewayMulticastRegisteredGroupMembers: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - if containerValues.contains(.registeredNetworkInterfaceIds) { - struct KeyVal0{struct item{}} - let registeredNetworkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .registeredNetworkInterfaceIds) - if let registeredNetworkInterfaceIdsWrappedContainer = registeredNetworkInterfaceIdsWrappedContainer { - let registeredNetworkInterfaceIdsContainer = try registeredNetworkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var registeredNetworkInterfaceIdsBuffer:[Swift.String]? = nil - if let registeredNetworkInterfaceIdsContainer = registeredNetworkInterfaceIdsContainer { - registeredNetworkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in registeredNetworkInterfaceIdsContainer { - registeredNetworkInterfaceIdsBuffer?.append(stringContainer0) - } - } - registeredNetworkInterfaceIds = registeredNetworkInterfaceIdsBuffer - } else { - registeredNetworkInterfaceIds = [] - } - } else { - registeredNetworkInterfaceIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastRegisteredGroupMembers() + value.transitGatewayMulticastDomainId = try reader["transitGatewayMulticastDomainId"].readIfPresent() + value.registeredNetworkInterfaceIds = try reader["registeredNetworkInterfaceIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.groupIpAddress = try reader["groupIpAddress"].readIfPresent() + return value } - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded } } @@ -177263,12 +127789,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayMulticastRegisteredGroupSources: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupIpAddress = "groupIpAddress" - case registeredNetworkInterfaceIds = "registeredNetworkInterfaceIds" - case transitGatewayMulticastDomainId = "transitGatewayMulticastDomainId" - } +extension EC2ClientTypes.TransitGatewayMulticastRegisteredGroupSources: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177292,31 +127813,15 @@ extension EC2ClientTypes.TransitGatewayMulticastRegisteredGroupSources: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - if containerValues.contains(.registeredNetworkInterfaceIds) { - struct KeyVal0{struct item{}} - let registeredNetworkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .registeredNetworkInterfaceIds) - if let registeredNetworkInterfaceIdsWrappedContainer = registeredNetworkInterfaceIdsWrappedContainer { - let registeredNetworkInterfaceIdsContainer = try registeredNetworkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var registeredNetworkInterfaceIdsBuffer:[Swift.String]? = nil - if let registeredNetworkInterfaceIdsContainer = registeredNetworkInterfaceIdsContainer { - registeredNetworkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in registeredNetworkInterfaceIdsContainer { - registeredNetworkInterfaceIdsBuffer?.append(stringContainer0) - } - } - registeredNetworkInterfaceIds = registeredNetworkInterfaceIdsBuffer - } else { - registeredNetworkInterfaceIds = [] - } - } else { - registeredNetworkInterfaceIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayMulticastRegisteredGroupSources() + value.transitGatewayMulticastDomainId = try reader["transitGatewayMulticastDomainId"].readIfPresent() + value.registeredNetworkInterfaceIds = try reader["registeredNetworkInterfaceIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.groupIpAddress = try reader["groupIpAddress"].readIfPresent() + return value } - let groupIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupIpAddress) - groupIpAddress = groupIpAddressDecoded } } @@ -177344,20 +127849,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amazonSideAsn = "amazonSideAsn" - case associationDefaultRouteTableId = "associationDefaultRouteTableId" - case autoAcceptSharedAttachments = "autoAcceptSharedAttachments" - case defaultRouteTableAssociation = "defaultRouteTableAssociation" - case defaultRouteTablePropagation = "defaultRouteTablePropagation" - case dnsSupport = "dnsSupport" - case multicastSupport = "multicastSupport" - case propagationDefaultRouteTableId = "propagationDefaultRouteTableId" - case securityGroupReferencingSupport = "securityGroupReferencingSupport" - case transitGatewayCidrBlocks = "transitGatewayCidrBlocks" - case vpnEcmpSupport = "vpnEcmpSupport" - } +extension EC2ClientTypes.TransitGatewayOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177405,47 +127897,23 @@ extension EC2ClientTypes.TransitGatewayOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let amazonSideAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amazonSideAsn) - amazonSideAsn = amazonSideAsnDecoded - if containerValues.contains(.transitGatewayCidrBlocks) { - struct KeyVal0{struct item{}} - let transitGatewayCidrBlocksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayCidrBlocks) - if let transitGatewayCidrBlocksWrappedContainer = transitGatewayCidrBlocksWrappedContainer { - let transitGatewayCidrBlocksContainer = try transitGatewayCidrBlocksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayCidrBlocksBuffer:[Swift.String]? = nil - if let transitGatewayCidrBlocksContainer = transitGatewayCidrBlocksContainer { - transitGatewayCidrBlocksBuffer = [Swift.String]() - for stringContainer0 in transitGatewayCidrBlocksContainer { - transitGatewayCidrBlocksBuffer?.append(stringContainer0) - } - } - transitGatewayCidrBlocks = transitGatewayCidrBlocksBuffer - } else { - transitGatewayCidrBlocks = [] - } - } else { - transitGatewayCidrBlocks = nil - } - let autoAcceptSharedAttachmentsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AutoAcceptSharedAttachmentsValue.self, forKey: .autoAcceptSharedAttachments) - autoAcceptSharedAttachments = autoAcceptSharedAttachmentsDecoded - let defaultRouteTableAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DefaultRouteTableAssociationValue.self, forKey: .defaultRouteTableAssociation) - defaultRouteTableAssociation = defaultRouteTableAssociationDecoded - let associationDefaultRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationDefaultRouteTableId) - associationDefaultRouteTableId = associationDefaultRouteTableIdDecoded - let defaultRouteTablePropagationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DefaultRouteTablePropagationValue.self, forKey: .defaultRouteTablePropagation) - defaultRouteTablePropagation = defaultRouteTablePropagationDecoded - let propagationDefaultRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .propagationDefaultRouteTableId) - propagationDefaultRouteTableId = propagationDefaultRouteTableIdDecoded - let vpnEcmpSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnEcmpSupportValue.self, forKey: .vpnEcmpSupport) - vpnEcmpSupport = vpnEcmpSupportDecoded - let dnsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsSupportValue.self, forKey: .dnsSupport) - dnsSupport = dnsSupportDecoded - let securityGroupReferencingSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SecurityGroupReferencingSupportValue.self, forKey: .securityGroupReferencingSupport) - securityGroupReferencingSupport = securityGroupReferencingSupportDecoded - let multicastSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MulticastSupportValue.self, forKey: .multicastSupport) - multicastSupport = multicastSupportDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayOptions() + value.amazonSideAsn = try reader["amazonSideAsn"].readIfPresent() + value.transitGatewayCidrBlocks = try reader["transitGatewayCidrBlocks"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.autoAcceptSharedAttachments = try reader["autoAcceptSharedAttachments"].readIfPresent() + value.defaultRouteTableAssociation = try reader["defaultRouteTableAssociation"].readIfPresent() + value.associationDefaultRouteTableId = try reader["associationDefaultRouteTableId"].readIfPresent() + value.defaultRouteTablePropagation = try reader["defaultRouteTablePropagation"].readIfPresent() + value.propagationDefaultRouteTableId = try reader["propagationDefaultRouteTableId"].readIfPresent() + value.vpnEcmpSupport = try reader["vpnEcmpSupport"].readIfPresent() + value.dnsSupport = try reader["dnsSupport"].readIfPresent() + value.securityGroupReferencingSupport = try reader["securityGroupReferencingSupport"].readIfPresent() + value.multicastSupport = try reader["multicastSupport"].readIfPresent() + return value + } } } @@ -177505,18 +127973,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayPeeringAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accepterTgwInfo = "accepterTgwInfo" - case accepterTransitGatewayAttachmentId = "accepterTransitGatewayAttachmentId" - case creationTime = "creationTime" - case options = "options" - case requesterTgwInfo = "requesterTgwInfo" - case state = "state" - case status = "status" - case tags = "tagSet" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - } +extension EC2ClientTypes.TransitGatewayPeeringAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177558,42 +128015,20 @@ extension EC2ClientTypes.TransitGatewayPeeringAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let accepterTransitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accepterTransitGatewayAttachmentId) - accepterTransitGatewayAttachmentId = accepterTransitGatewayAttachmentIdDecoded - let requesterTgwInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeeringTgwInfo.self, forKey: .requesterTgwInfo) - requesterTgwInfo = requesterTgwInfoDecoded - let accepterTgwInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeeringTgwInfo.self, forKey: .accepterTgwInfo) - accepterTgwInfo = accepterTgwInfoDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPeeringAttachmentOptions.self, forKey: .options) - options = optionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.PeeringAttachmentStatus.self, forKey: .status) - status = statusDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentState.self, forKey: .state) - state = stateDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPeeringAttachment() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.accepterTransitGatewayAttachmentId = try reader["accepterTransitGatewayAttachmentId"].readIfPresent() + value.requesterTgwInfo = try reader["requesterTgwInfo"].readIfPresent(readingClosure: EC2ClientTypes.PeeringTgwInfo.readingClosure) + value.accepterTgwInfo = try reader["accepterTgwInfo"].readIfPresent(readingClosure: EC2ClientTypes.PeeringTgwInfo.readingClosure) + value.options = try reader["options"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPeeringAttachmentOptions.readingClosure) + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.PeeringAttachmentStatus.readingClosure) + value.state = try reader["state"].readIfPresent() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -177646,10 +128081,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayPeeringAttachmentOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dynamicRouting = "dynamicRouting" - } +extension EC2ClientTypes.TransitGatewayPeeringAttachmentOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177658,10 +128090,13 @@ extension EC2ClientTypes.TransitGatewayPeeringAttachmentOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dynamicRoutingDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DynamicRoutingValue.self, forKey: .dynamicRouting) - dynamicRouting = dynamicRoutingDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPeeringAttachmentOptions() + value.dynamicRouting = try reader["dynamicRouting"].readIfPresent() + return value + } } } @@ -177681,15 +128116,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayPolicyRule: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "destinationCidrBlock" - case destinationPortRange = "destinationPortRange" - case metaData = "metaData" - case `protocol` = "protocol" - case sourceCidrBlock = "sourceCidrBlock" - case sourcePortRange = "sourcePortRange" - } +extension EC2ClientTypes.TransitGatewayPolicyRule: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177713,20 +128140,18 @@ extension EC2ClientTypes.TransitGatewayPolicyRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceCidrBlock) - sourceCidrBlock = sourceCidrBlockDecoded - let sourcePortRangeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourcePortRange) - sourcePortRange = sourcePortRangeDecoded - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let destinationPortRangeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationPortRange) - destinationPortRange = destinationPortRangeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let metaDataDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPolicyRuleMetaData.self, forKey: .metaData) - metaData = metaDataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPolicyRule() + value.sourceCidrBlock = try reader["sourceCidrBlock"].readIfPresent() + value.sourcePortRange = try reader["sourcePortRange"].readIfPresent() + value.destinationCidrBlock = try reader["destinationCidrBlock"].readIfPresent() + value.destinationPortRange = try reader["destinationPortRange"].readIfPresent() + value.`protocol` = try reader["protocol"].readIfPresent() + value.metaData = try reader["metaData"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPolicyRuleMetaData.readingClosure) + return value + } } } @@ -177766,11 +128191,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayPolicyRuleMetaData: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metaDataKey = "metaDataKey" - case metaDataValue = "metaDataValue" - } +extension EC2ClientTypes.TransitGatewayPolicyRuleMetaData: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177782,12 +128203,14 @@ extension EC2ClientTypes.TransitGatewayPolicyRuleMetaData: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metaDataKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metaDataKey) - metaDataKey = metaDataKeyDecoded - let metaDataValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metaDataValue) - metaDataValue = metaDataValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPolicyRuleMetaData() + value.metaDataKey = try reader["metaDataKey"].readIfPresent() + value.metaDataValue = try reader["metaDataValue"].readIfPresent() + return value + } } } @@ -177811,14 +128234,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayPolicyTable: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case state = "state" - case tags = "tagSet" - case transitGatewayId = "transitGatewayId" - case transitGatewayPolicyTableId = "transitGatewayPolicyTableId" - } +extension EC2ClientTypes.TransitGatewayPolicyTable: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177848,34 +128264,16 @@ extension EC2ClientTypes.TransitGatewayPolicyTable: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayPolicyTableId) - transitGatewayPolicyTableId = transitGatewayPolicyTableIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPolicyTableState.self, forKey: .state) - state = stateDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPolicyTable() + value.transitGatewayPolicyTableId = try reader["transitGatewayPolicyTableId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -177912,14 +128310,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayPolicyTableAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceType = "resourceType" - case state = "state" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayPolicyTableId = "transitGatewayPolicyTableId" - } +extension EC2ClientTypes.TransitGatewayPolicyTableAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -177940,18 +128331,17 @@ extension EC2ClientTypes.TransitGatewayPolicyTableAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayPolicyTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayPolicyTableId) - transitGatewayPolicyTableId = transitGatewayPolicyTableIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAssociationState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPolicyTableAssociation() + value.transitGatewayPolicyTableId = try reader["transitGatewayPolicyTableId"].readIfPresent() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -177987,12 +128377,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayPolicyTableEntry: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyRule = "policyRule" - case policyRuleNumber = "policyRuleNumber" - case targetRouteTableId = "targetRouteTableId" - } +extension EC2ClientTypes.TransitGatewayPolicyTableEntry: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178007,14 +128392,15 @@ extension EC2ClientTypes.TransitGatewayPolicyTableEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyRuleNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyRuleNumber) - policyRuleNumber = policyRuleNumberDecoded - let policyRuleDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPolicyRule.self, forKey: .policyRule) - policyRule = policyRuleDecoded - let targetRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetRouteTableId) - targetRouteTableId = targetRouteTableIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPolicyTableEntry() + value.policyRuleNumber = try reader["policyRuleNumber"].readIfPresent() + value.policyRule = try reader["policyRule"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPolicyRule.readingClosure) + value.targetRouteTableId = try reader["targetRouteTableId"].readIfPresent() + return value + } } } @@ -178080,12 +128466,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayPrefixListAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceType = "resourceType" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - } +extension EC2ClientTypes.TransitGatewayPrefixListAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178100,14 +128481,15 @@ extension EC2ClientTypes.TransitGatewayPrefixListAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPrefixListAttachment() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + return value + } } } @@ -178135,15 +128517,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayPrefixListReference: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blackhole = "blackhole" - case prefixListId = "prefixListId" - case prefixListOwnerId = "prefixListOwnerId" - case state = "state" - case transitGatewayAttachment = "transitGatewayAttachment" - case transitGatewayRouteTableId = "transitGatewayRouteTableId" - } +extension EC2ClientTypes.TransitGatewayPrefixListReference: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178167,20 +128541,18 @@ extension EC2ClientTypes.TransitGatewayPrefixListReference: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let prefixListOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListOwnerId) - prefixListOwnerId = prefixListOwnerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPrefixListReferenceState.self, forKey: .state) - state = stateDecoded - let blackholeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blackhole) - blackhole = blackholeDecoded - let transitGatewayAttachmentDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPrefixListAttachment.self, forKey: .transitGatewayAttachment) - transitGatewayAttachment = transitGatewayAttachmentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPrefixListReference() + value.transitGatewayRouteTableId = try reader["transitGatewayRouteTableId"].readIfPresent() + value.prefixListId = try reader["prefixListId"].readIfPresent() + value.prefixListOwnerId = try reader["prefixListOwnerId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.blackhole = try reader["blackhole"].readIfPresent() + value.transitGatewayAttachment = try reader["transitGatewayAttachment"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayPrefixListAttachment.readingClosure) + return value + } } } @@ -178258,15 +128630,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayPropagation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceType = "resourceType" - case state = "state" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayRouteTableAnnouncementId = "transitGatewayRouteTableAnnouncementId" - case transitGatewayRouteTableId = "transitGatewayRouteTableId" - } +extension EC2ClientTypes.TransitGatewayPropagation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178290,20 +128654,18 @@ extension EC2ClientTypes.TransitGatewayPropagation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPropagationState.self, forKey: .state) - state = stateDecoded - let transitGatewayRouteTableAnnouncementIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableAnnouncementId) - transitGatewayRouteTableAnnouncementId = transitGatewayRouteTableAnnouncementIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayPropagation() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.transitGatewayRouteTableId = try reader["transitGatewayRouteTableId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.transitGatewayRouteTableAnnouncementId = try reader["transitGatewayRouteTableAnnouncementId"].readIfPresent() + return value + } } } @@ -178381,18 +128743,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayRequestOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amazonSideAsn = "AmazonSideAsn" - case autoAcceptSharedAttachments = "AutoAcceptSharedAttachments" - case defaultRouteTableAssociation = "DefaultRouteTableAssociation" - case defaultRouteTablePropagation = "DefaultRouteTablePropagation" - case dnsSupport = "DnsSupport" - case multicastSupport = "MulticastSupport" - case securityGroupReferencingSupport = "SecurityGroupReferencingSupport" - case transitGatewayCidrBlocks = "TransitGatewayCidrBlocks" - case vpnEcmpSupport = "VpnEcmpSupport" - } +extension EC2ClientTypes.TransitGatewayRequestOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178434,42 +128785,20 @@ extension EC2ClientTypes.TransitGatewayRequestOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let amazonSideAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amazonSideAsn) - amazonSideAsn = amazonSideAsnDecoded - let autoAcceptSharedAttachmentsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AutoAcceptSharedAttachmentsValue.self, forKey: .autoAcceptSharedAttachments) - autoAcceptSharedAttachments = autoAcceptSharedAttachmentsDecoded - let defaultRouteTableAssociationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DefaultRouteTableAssociationValue.self, forKey: .defaultRouteTableAssociation) - defaultRouteTableAssociation = defaultRouteTableAssociationDecoded - let defaultRouteTablePropagationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DefaultRouteTablePropagationValue.self, forKey: .defaultRouteTablePropagation) - defaultRouteTablePropagation = defaultRouteTablePropagationDecoded - let vpnEcmpSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnEcmpSupportValue.self, forKey: .vpnEcmpSupport) - vpnEcmpSupport = vpnEcmpSupportDecoded - let dnsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsSupportValue.self, forKey: .dnsSupport) - dnsSupport = dnsSupportDecoded - let securityGroupReferencingSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SecurityGroupReferencingSupportValue.self, forKey: .securityGroupReferencingSupport) - securityGroupReferencingSupport = securityGroupReferencingSupportDecoded - let multicastSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.MulticastSupportValue.self, forKey: .multicastSupport) - multicastSupport = multicastSupportDecoded - if containerValues.contains(.transitGatewayCidrBlocks) { - struct KeyVal0{struct item{}} - let transitGatewayCidrBlocksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayCidrBlocks) - if let transitGatewayCidrBlocksWrappedContainer = transitGatewayCidrBlocksWrappedContainer { - let transitGatewayCidrBlocksContainer = try transitGatewayCidrBlocksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitGatewayCidrBlocksBuffer:[Swift.String]? = nil - if let transitGatewayCidrBlocksContainer = transitGatewayCidrBlocksContainer { - transitGatewayCidrBlocksBuffer = [Swift.String]() - for stringContainer0 in transitGatewayCidrBlocksContainer { - transitGatewayCidrBlocksBuffer?.append(stringContainer0) - } - } - transitGatewayCidrBlocks = transitGatewayCidrBlocksBuffer - } else { - transitGatewayCidrBlocks = [] - } - } else { - transitGatewayCidrBlocks = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayRequestOptions() + value.amazonSideAsn = try reader["AmazonSideAsn"].readIfPresent() + value.autoAcceptSharedAttachments = try reader["AutoAcceptSharedAttachments"].readIfPresent() + value.defaultRouteTableAssociation = try reader["DefaultRouteTableAssociation"].readIfPresent() + value.defaultRouteTablePropagation = try reader["DefaultRouteTablePropagation"].readIfPresent() + value.vpnEcmpSupport = try reader["VpnEcmpSupport"].readIfPresent() + value.dnsSupport = try reader["DnsSupport"].readIfPresent() + value.securityGroupReferencingSupport = try reader["SecurityGroupReferencingSupport"].readIfPresent() + value.multicastSupport = try reader["MulticastSupport"].readIfPresent() + value.transitGatewayCidrBlocks = try reader["TransitGatewayCidrBlocks"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -178522,15 +128851,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayRoute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "destinationCidrBlock" - case prefixListId = "prefixListId" - case state = "state" - case transitGatewayAttachments = "transitGatewayAttachments" - case transitGatewayRouteTableAnnouncementId = "transitGatewayRouteTableAnnouncementId" - case type = "type" - } +extension EC2ClientTypes.TransitGatewayRoute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178563,37 +128884,18 @@ extension EC2ClientTypes.TransitGatewayRoute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let transitGatewayRouteTableAnnouncementIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableAnnouncementId) - transitGatewayRouteTableAnnouncementId = transitGatewayRouteTableAnnouncementIdDecoded - if containerValues.contains(.transitGatewayAttachments) { - struct KeyVal0{struct item{}} - let transitGatewayAttachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitGatewayAttachments) - if let transitGatewayAttachmentsWrappedContainer = transitGatewayAttachmentsWrappedContainer { - let transitGatewayAttachmentsContainer = try transitGatewayAttachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.TransitGatewayRouteAttachment].self, forKey: .member) - var transitGatewayAttachmentsBuffer:[EC2ClientTypes.TransitGatewayRouteAttachment]? = nil - if let transitGatewayAttachmentsContainer = transitGatewayAttachmentsContainer { - transitGatewayAttachmentsBuffer = [EC2ClientTypes.TransitGatewayRouteAttachment]() - for structureContainer0 in transitGatewayAttachmentsContainer { - transitGatewayAttachmentsBuffer?.append(structureContainer0) - } - } - transitGatewayAttachments = transitGatewayAttachmentsBuffer - } else { - transitGatewayAttachments = [] - } - } else { - transitGatewayAttachments = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayRoute() + value.destinationCidrBlock = try reader["destinationCidrBlock"].readIfPresent() + value.prefixListId = try reader["prefixListId"].readIfPresent() + value.transitGatewayRouteTableAnnouncementId = try reader["transitGatewayRouteTableAnnouncementId"].readIfPresent() + value.transitGatewayAttachments = try reader["transitGatewayAttachments"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TransitGatewayRouteAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.type = try reader["type"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value } - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteType.self, forKey: .type) - type = typeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteState.self, forKey: .state) - state = stateDecoded } } @@ -178633,12 +128935,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayRouteAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceType = "resourceType" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - } +extension EC2ClientTypes.TransitGatewayRouteAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178653,14 +128950,15 @@ extension EC2ClientTypes.TransitGatewayRouteAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayRouteAttachment() + value.resourceId = try reader["resourceId"].readIfPresent() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + return value + } } } @@ -178729,16 +129027,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayRouteTable: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case defaultAssociationRouteTable = "defaultAssociationRouteTable" - case defaultPropagationRouteTable = "defaultPropagationRouteTable" - case state = "state" - case tags = "tagSet" - case transitGatewayId = "transitGatewayId" - case transitGatewayRouteTableId = "transitGatewayRouteTableId" - } +extension EC2ClientTypes.TransitGatewayRouteTable: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178774,38 +129063,18 @@ extension EC2ClientTypes.TransitGatewayRouteTable: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTableState.self, forKey: .state) - state = stateDecoded - let defaultAssociationRouteTableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .defaultAssociationRouteTable) - defaultAssociationRouteTable = defaultAssociationRouteTableDecoded - let defaultPropagationRouteTableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .defaultPropagationRouteTable) - defaultPropagationRouteTable = defaultPropagationRouteTableDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayRouteTable() + value.transitGatewayRouteTableId = try reader["transitGatewayRouteTableId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.defaultAssociationRouteTable = try reader["defaultAssociationRouteTable"].readIfPresent() + value.defaultPropagationRouteTable = try reader["defaultPropagationRouteTable"].readIfPresent() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -178850,20 +129119,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayRouteTableAnnouncement: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case announcementDirection = "announcementDirection" - case coreNetworkId = "coreNetworkId" - case creationTime = "creationTime" - case peerCoreNetworkId = "peerCoreNetworkId" - case peerTransitGatewayId = "peerTransitGatewayId" - case peeringAttachmentId = "peeringAttachmentId" - case state = "state" - case tags = "tagSet" - case transitGatewayId = "transitGatewayId" - case transitGatewayRouteTableAnnouncementId = "transitGatewayRouteTableAnnouncementId" - case transitGatewayRouteTableId = "transitGatewayRouteTableId" - } +extension EC2ClientTypes.TransitGatewayRouteTableAnnouncement: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -178911,46 +129167,22 @@ extension EC2ClientTypes.TransitGatewayRouteTableAnnouncement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayRouteTableAnnouncementIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableAnnouncementId) - transitGatewayRouteTableAnnouncementId = transitGatewayRouteTableAnnouncementIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let coreNetworkIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coreNetworkId) - coreNetworkId = coreNetworkIdDecoded - let peerTransitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerTransitGatewayId) - peerTransitGatewayId = peerTransitGatewayIdDecoded - let peerCoreNetworkIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peerCoreNetworkId) - peerCoreNetworkId = peerCoreNetworkIdDecoded - let peeringAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peeringAttachmentId) - peeringAttachmentId = peeringAttachmentIdDecoded - let announcementDirectionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTableAnnouncementDirection.self, forKey: .announcementDirection) - announcementDirection = announcementDirectionDecoded - let transitGatewayRouteTableIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableId) - transitGatewayRouteTableId = transitGatewayRouteTableIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayRouteTableAnnouncementState.self, forKey: .state) - state = stateDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayRouteTableAnnouncement() + value.transitGatewayRouteTableAnnouncementId = try reader["transitGatewayRouteTableAnnouncementId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.coreNetworkId = try reader["coreNetworkId"].readIfPresent() + value.peerTransitGatewayId = try reader["peerTransitGatewayId"].readIfPresent() + value.peerCoreNetworkId = try reader["peerCoreNetworkId"].readIfPresent() + value.peeringAttachmentId = try reader["peeringAttachmentId"].readIfPresent() + value.announcementDirection = try reader["announcementDirection"].readIfPresent() + value.transitGatewayRouteTableId = try reader["transitGatewayRouteTableId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -179087,13 +129319,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayRouteTableAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceType = "resourceType" - case state = "state" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - } +extension EC2ClientTypes.TransitGatewayRouteTableAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -179111,16 +129337,16 @@ extension EC2ClientTypes.TransitGatewayRouteTableAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAssociationState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayRouteTableAssociation() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -179152,14 +129378,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayRouteTablePropagation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "resourceId" - case resourceType = "resourceType" - case state = "state" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayRouteTableAnnouncementId = "transitGatewayRouteTableAnnouncementId" - } +extension EC2ClientTypes.TransitGatewayRouteTablePropagation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -179180,18 +129399,17 @@ extension EC2ClientTypes.TransitGatewayRouteTablePropagation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayPropagationState.self, forKey: .state) - state = stateDecoded - let transitGatewayRouteTableAnnouncementIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayRouteTableAnnouncementId) - transitGatewayRouteTableAnnouncementId = transitGatewayRouteTableAnnouncementIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayRouteTablePropagation() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.transitGatewayRouteTableAnnouncementId = try reader["transitGatewayRouteTableAnnouncementId"].readIfPresent() + return value + } } } @@ -179227,16 +129445,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayRouteTableRoute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachmentId = "attachmentId" - case destinationCidr = "destinationCidr" - case prefixListId = "prefixListId" - case resourceId = "resourceId" - case resourceType = "resourceType" - case routeOrigin = "routeOrigin" - case state = "state" - } +extension EC2ClientTypes.TransitGatewayRouteTableRoute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -179263,22 +129472,19 @@ extension EC2ClientTypes.TransitGatewayRouteTableRoute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidr) - destinationCidr = destinationCidrDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let routeOriginDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routeOrigin) - routeOrigin = routeOriginDecoded - let prefixListIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefixListId) - prefixListId = prefixListIdDecoded - let attachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attachmentId) - attachmentId = attachmentIdDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayRouteTableRoute() + value.destinationCidr = try reader["destinationCidr"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.routeOrigin = try reader["routeOrigin"].readIfPresent() + value.prefixListId = try reader["prefixListId"].readIfPresent() + value.attachmentId = try reader["attachmentId"].readIfPresent() + value.resourceId = try reader["resourceId"].readIfPresent() + value.resourceType = try reader["resourceType"].readIfPresent() + return value + } } } @@ -179437,18 +129643,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TransitGatewayVpcAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case options = "options" - case state = "state" - case subnetIds = "subnetIds" - case tags = "tagSet" - case transitGatewayAttachmentId = "transitGatewayAttachmentId" - case transitGatewayId = "transitGatewayId" - case vpcId = "vpcId" - case vpcOwnerId = "vpcOwnerId" - } +extension EC2ClientTypes.TransitGatewayVpcAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -179499,59 +129694,20 @@ extension EC2ClientTypes.TransitGatewayVpcAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let transitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayAttachmentId) - transitGatewayAttachmentId = transitGatewayAttachmentIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let vpcOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcOwnerId) - vpcOwnerId = vpcOwnerIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayAttachmentState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TransitGatewayVpcAttachmentOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayVpcAttachment() + value.transitGatewayAttachmentId = try reader["transitGatewayAttachmentId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.vpcOwnerId = try reader["vpcOwnerId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.subnetIds = try reader["subnetIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.creationTime = try reader["creationTime"].readTimestampIfPresent(format: .dateTime) + value.options = try reader["options"].readIfPresent(readingClosure: EC2ClientTypes.TransitGatewayVpcAttachmentOptions.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -179604,13 +129760,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.TransitGatewayVpcAttachmentOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applianceModeSupport = "applianceModeSupport" - case dnsSupport = "dnsSupport" - case ipv6Support = "ipv6Support" - case securityGroupReferencingSupport = "securityGroupReferencingSupport" - } +extension EC2ClientTypes.TransitGatewayVpcAttachmentOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -179628,16 +129778,16 @@ extension EC2ClientTypes.TransitGatewayVpcAttachmentOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dnsSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsSupportValue.self, forKey: .dnsSupport) - dnsSupport = dnsSupportDecoded - let securityGroupReferencingSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SecurityGroupReferencingSupportValue.self, forKey: .securityGroupReferencingSupport) - securityGroupReferencingSupport = securityGroupReferencingSupportDecoded - let ipv6SupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Ipv6SupportValue.self, forKey: .ipv6Support) - ipv6Support = ipv6SupportDecoded - let applianceModeSupportDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ApplianceModeSupportValue.self, forKey: .applianceModeSupport) - applianceModeSupport = applianceModeSupportDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TransitGatewayVpcAttachmentOptions() + value.dnsSupport = try reader["dnsSupport"].readIfPresent() + value.securityGroupReferencingSupport = try reader["securityGroupReferencingSupport"].readIfPresent() + value.ipv6Support = try reader["ipv6Support"].readIfPresent() + value.applianceModeSupport = try reader["applianceModeSupport"].readIfPresent() + return value + } } } @@ -179701,16 +129851,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TrunkInterfaceAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case branchInterfaceId = "branchInterfaceId" - case greKey = "greKey" - case interfaceProtocol = "interfaceProtocol" - case tags = "tagSet" - case trunkInterfaceId = "trunkInterfaceId" - case vlanId = "vlanId" - } +extension EC2ClientTypes.TrunkInterfaceAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -179746,38 +129887,18 @@ extension EC2ClientTypes.TrunkInterfaceAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let branchInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .branchInterfaceId) - branchInterfaceId = branchInterfaceIdDecoded - let trunkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trunkInterfaceId) - trunkInterfaceId = trunkInterfaceIdDecoded - let interfaceProtocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.InterfaceProtocolType.self, forKey: .interfaceProtocol) - interfaceProtocol = interfaceProtocolDecoded - let vlanIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .vlanId) - vlanId = vlanIdDecoded - let greKeyDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .greKey) - greKey = greKeyDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TrunkInterfaceAssociation() + value.associationId = try reader["associationId"].readIfPresent() + value.branchInterfaceId = try reader["branchInterfaceId"].readIfPresent() + value.trunkInterfaceId = try reader["trunkInterfaceId"].readIfPresent() + value.interfaceProtocol = try reader["interfaceProtocol"].readIfPresent() + value.vlanId = try reader["vlanId"].readIfPresent() + value.greKey = try reader["greKey"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -179886,30 +130007,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.TunnelOption: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dpdTimeoutAction = "dpdTimeoutAction" - case dpdTimeoutSeconds = "dpdTimeoutSeconds" - case enableTunnelLifecycleControl = "enableTunnelLifecycleControl" - case ikeVersions = "ikeVersionSet" - case logOptions = "logOptions" - case outsideIpAddress = "outsideIpAddress" - case phase1DHGroupNumbers = "phase1DHGroupNumberSet" - case phase1EncryptionAlgorithms = "phase1EncryptionAlgorithmSet" - case phase1IntegrityAlgorithms = "phase1IntegrityAlgorithmSet" - case phase1LifetimeSeconds = "phase1LifetimeSeconds" - case phase2DHGroupNumbers = "phase2DHGroupNumberSet" - case phase2EncryptionAlgorithms = "phase2EncryptionAlgorithmSet" - case phase2IntegrityAlgorithms = "phase2IntegrityAlgorithmSet" - case phase2LifetimeSeconds = "phase2LifetimeSeconds" - case preSharedKey = "preSharedKey" - case rekeyFuzzPercentage = "rekeyFuzzPercentage" - case rekeyMarginTimeSeconds = "rekeyMarginTimeSeconds" - case replayWindowSize = "replayWindowSize" - case startupAction = "startupAction" - case tunnelInsideCidr = "tunnelInsideCidr" - case tunnelInsideIpv6Cidr = "tunnelInsideIpv6Cidr" - } +extension EC2ClientTypes.TunnelOption: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -180041,169 +130139,33 @@ extension EC2ClientTypes.TunnelOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let outsideIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outsideIpAddress) - outsideIpAddress = outsideIpAddressDecoded - let tunnelInsideCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tunnelInsideCidr) - tunnelInsideCidr = tunnelInsideCidrDecoded - let tunnelInsideIpv6CidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tunnelInsideIpv6Cidr) - tunnelInsideIpv6Cidr = tunnelInsideIpv6CidrDecoded - let preSharedKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSharedKey) - preSharedKey = preSharedKeyDecoded - let phase1LifetimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .phase1LifetimeSeconds) - phase1LifetimeSeconds = phase1LifetimeSecondsDecoded - let phase2LifetimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .phase2LifetimeSeconds) - phase2LifetimeSeconds = phase2LifetimeSecondsDecoded - let rekeyMarginTimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .rekeyMarginTimeSeconds) - rekeyMarginTimeSeconds = rekeyMarginTimeSecondsDecoded - let rekeyFuzzPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .rekeyFuzzPercentage) - rekeyFuzzPercentage = rekeyFuzzPercentageDecoded - let replayWindowSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .replayWindowSize) - replayWindowSize = replayWindowSizeDecoded - let dpdTimeoutSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dpdTimeoutSeconds) - dpdTimeoutSeconds = dpdTimeoutSecondsDecoded - let dpdTimeoutActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dpdTimeoutAction) - dpdTimeoutAction = dpdTimeoutActionDecoded - if containerValues.contains(.phase1EncryptionAlgorithms) { - struct KeyVal0{struct item{}} - let phase1EncryptionAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1EncryptionAlgorithms) - if let phase1EncryptionAlgorithmsWrappedContainer = phase1EncryptionAlgorithmsWrappedContainer { - let phase1EncryptionAlgorithmsContainer = try phase1EncryptionAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1EncryptionAlgorithmsListValue].self, forKey: .member) - var phase1EncryptionAlgorithmsBuffer:[EC2ClientTypes.Phase1EncryptionAlgorithmsListValue]? = nil - if let phase1EncryptionAlgorithmsContainer = phase1EncryptionAlgorithmsContainer { - phase1EncryptionAlgorithmsBuffer = [EC2ClientTypes.Phase1EncryptionAlgorithmsListValue]() - for structureContainer0 in phase1EncryptionAlgorithmsContainer { - phase1EncryptionAlgorithmsBuffer?.append(structureContainer0) - } - } - phase1EncryptionAlgorithms = phase1EncryptionAlgorithmsBuffer - } else { - phase1EncryptionAlgorithms = [] - } - } else { - phase1EncryptionAlgorithms = nil - } - if containerValues.contains(.phase2EncryptionAlgorithms) { - struct KeyVal0{struct item{}} - let phase2EncryptionAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2EncryptionAlgorithms) - if let phase2EncryptionAlgorithmsWrappedContainer = phase2EncryptionAlgorithmsWrappedContainer { - let phase2EncryptionAlgorithmsContainer = try phase2EncryptionAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2EncryptionAlgorithmsListValue].self, forKey: .member) - var phase2EncryptionAlgorithmsBuffer:[EC2ClientTypes.Phase2EncryptionAlgorithmsListValue]? = nil - if let phase2EncryptionAlgorithmsContainer = phase2EncryptionAlgorithmsContainer { - phase2EncryptionAlgorithmsBuffer = [EC2ClientTypes.Phase2EncryptionAlgorithmsListValue]() - for structureContainer0 in phase2EncryptionAlgorithmsContainer { - phase2EncryptionAlgorithmsBuffer?.append(structureContainer0) - } - } - phase2EncryptionAlgorithms = phase2EncryptionAlgorithmsBuffer - } else { - phase2EncryptionAlgorithms = [] - } - } else { - phase2EncryptionAlgorithms = nil - } - if containerValues.contains(.phase1IntegrityAlgorithms) { - struct KeyVal0{struct item{}} - let phase1IntegrityAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1IntegrityAlgorithms) - if let phase1IntegrityAlgorithmsWrappedContainer = phase1IntegrityAlgorithmsWrappedContainer { - let phase1IntegrityAlgorithmsContainer = try phase1IntegrityAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1IntegrityAlgorithmsListValue].self, forKey: .member) - var phase1IntegrityAlgorithmsBuffer:[EC2ClientTypes.Phase1IntegrityAlgorithmsListValue]? = nil - if let phase1IntegrityAlgorithmsContainer = phase1IntegrityAlgorithmsContainer { - phase1IntegrityAlgorithmsBuffer = [EC2ClientTypes.Phase1IntegrityAlgorithmsListValue]() - for structureContainer0 in phase1IntegrityAlgorithmsContainer { - phase1IntegrityAlgorithmsBuffer?.append(structureContainer0) - } - } - phase1IntegrityAlgorithms = phase1IntegrityAlgorithmsBuffer - } else { - phase1IntegrityAlgorithms = [] - } - } else { - phase1IntegrityAlgorithms = nil - } - if containerValues.contains(.phase2IntegrityAlgorithms) { - struct KeyVal0{struct item{}} - let phase2IntegrityAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2IntegrityAlgorithms) - if let phase2IntegrityAlgorithmsWrappedContainer = phase2IntegrityAlgorithmsWrappedContainer { - let phase2IntegrityAlgorithmsContainer = try phase2IntegrityAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2IntegrityAlgorithmsListValue].self, forKey: .member) - var phase2IntegrityAlgorithmsBuffer:[EC2ClientTypes.Phase2IntegrityAlgorithmsListValue]? = nil - if let phase2IntegrityAlgorithmsContainer = phase2IntegrityAlgorithmsContainer { - phase2IntegrityAlgorithmsBuffer = [EC2ClientTypes.Phase2IntegrityAlgorithmsListValue]() - for structureContainer0 in phase2IntegrityAlgorithmsContainer { - phase2IntegrityAlgorithmsBuffer?.append(structureContainer0) - } - } - phase2IntegrityAlgorithms = phase2IntegrityAlgorithmsBuffer - } else { - phase2IntegrityAlgorithms = [] - } - } else { - phase2IntegrityAlgorithms = nil - } - if containerValues.contains(.phase1DHGroupNumbers) { - struct KeyVal0{struct item{}} - let phase1DHGroupNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1DHGroupNumbers) - if let phase1DHGroupNumbersWrappedContainer = phase1DHGroupNumbersWrappedContainer { - let phase1DHGroupNumbersContainer = try phase1DHGroupNumbersWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1DHGroupNumbersListValue].self, forKey: .member) - var phase1DHGroupNumbersBuffer:[EC2ClientTypes.Phase1DHGroupNumbersListValue]? = nil - if let phase1DHGroupNumbersContainer = phase1DHGroupNumbersContainer { - phase1DHGroupNumbersBuffer = [EC2ClientTypes.Phase1DHGroupNumbersListValue]() - for structureContainer0 in phase1DHGroupNumbersContainer { - phase1DHGroupNumbersBuffer?.append(structureContainer0) - } - } - phase1DHGroupNumbers = phase1DHGroupNumbersBuffer - } else { - phase1DHGroupNumbers = [] - } - } else { - phase1DHGroupNumbers = nil - } - if containerValues.contains(.phase2DHGroupNumbers) { - struct KeyVal0{struct item{}} - let phase2DHGroupNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2DHGroupNumbers) - if let phase2DHGroupNumbersWrappedContainer = phase2DHGroupNumbersWrappedContainer { - let phase2DHGroupNumbersContainer = try phase2DHGroupNumbersWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2DHGroupNumbersListValue].self, forKey: .member) - var phase2DHGroupNumbersBuffer:[EC2ClientTypes.Phase2DHGroupNumbersListValue]? = nil - if let phase2DHGroupNumbersContainer = phase2DHGroupNumbersContainer { - phase2DHGroupNumbersBuffer = [EC2ClientTypes.Phase2DHGroupNumbersListValue]() - for structureContainer0 in phase2DHGroupNumbersContainer { - phase2DHGroupNumbersBuffer?.append(structureContainer0) - } - } - phase2DHGroupNumbers = phase2DHGroupNumbersBuffer - } else { - phase2DHGroupNumbers = [] - } - } else { - phase2DHGroupNumbers = nil - } - if containerValues.contains(.ikeVersions) { - struct KeyVal0{struct item{}} - let ikeVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ikeVersions) - if let ikeVersionsWrappedContainer = ikeVersionsWrappedContainer { - let ikeVersionsContainer = try ikeVersionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IKEVersionsListValue].self, forKey: .member) - var ikeVersionsBuffer:[EC2ClientTypes.IKEVersionsListValue]? = nil - if let ikeVersionsContainer = ikeVersionsContainer { - ikeVersionsBuffer = [EC2ClientTypes.IKEVersionsListValue]() - for structureContainer0 in ikeVersionsContainer { - ikeVersionsBuffer?.append(structureContainer0) - } - } - ikeVersions = ikeVersionsBuffer - } else { - ikeVersions = [] - } - } else { - ikeVersions = nil - } - let startupActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .startupAction) - startupAction = startupActionDecoded - let logOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnTunnelLogOptions.self, forKey: .logOptions) - logOptions = logOptionsDecoded - let enableTunnelLifecycleControlDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableTunnelLifecycleControl) - enableTunnelLifecycleControl = enableTunnelLifecycleControlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.TunnelOption() + value.outsideIpAddress = try reader["outsideIpAddress"].readIfPresent() + value.tunnelInsideCidr = try reader["tunnelInsideCidr"].readIfPresent() + value.tunnelInsideIpv6Cidr = try reader["tunnelInsideIpv6Cidr"].readIfPresent() + value.preSharedKey = try reader["preSharedKey"].readIfPresent() + value.phase1LifetimeSeconds = try reader["phase1LifetimeSeconds"].readIfPresent() + value.phase2LifetimeSeconds = try reader["phase2LifetimeSeconds"].readIfPresent() + value.rekeyMarginTimeSeconds = try reader["rekeyMarginTimeSeconds"].readIfPresent() + value.rekeyFuzzPercentage = try reader["rekeyFuzzPercentage"].readIfPresent() + value.replayWindowSize = try reader["replayWindowSize"].readIfPresent() + value.dpdTimeoutSeconds = try reader["dpdTimeoutSeconds"].readIfPresent() + value.dpdTimeoutAction = try reader["dpdTimeoutAction"].readIfPresent() + value.phase1EncryptionAlgorithms = try reader["phase1EncryptionAlgorithmSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1EncryptionAlgorithmsListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2EncryptionAlgorithms = try reader["phase2EncryptionAlgorithmSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2EncryptionAlgorithmsListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase1IntegrityAlgorithms = try reader["phase1IntegrityAlgorithmSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1IntegrityAlgorithmsListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2IntegrityAlgorithms = try reader["phase2IntegrityAlgorithmSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2IntegrityAlgorithmsListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase1DHGroupNumbers = try reader["phase1DHGroupNumberSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1DHGroupNumbersListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2DHGroupNumbers = try reader["phase2DHGroupNumberSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2DHGroupNumbersListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ikeVersions = try reader["ikeVersionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IKEVersionsListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.startupAction = try reader["startupAction"].readIfPresent() + value.logOptions = try reader["logOptions"].readIfPresent(readingClosure: EC2ClientTypes.VpnTunnelLogOptions.readingClosure) + value.enableTunnelLifecycleControl = try reader["enableTunnelLifecycleControl"].readIfPresent() + return value + } } } @@ -180371,76 +130333,17 @@ public struct UnassignIpv6AddressesInput: Swift.Equatable { } } -struct UnassignIpv6AddressesInputBody: Swift.Equatable { - let ipv6Addresses: [Swift.String]? - let ipv6Prefixes: [Swift.String]? - let networkInterfaceId: Swift.String? -} - -extension UnassignIpv6AddressesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv6Addresses = "ipv6Addresses" - case ipv6Prefixes = "Ipv6Prefix" - case networkInterfaceId = "networkInterfaceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.ipv6Addresses) { - struct KeyVal0{struct item{}} - let ipv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Addresses) - if let ipv6AddressesWrappedContainer = ipv6AddressesWrappedContainer { - let ipv6AddressesContainer = try ipv6AddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipv6AddressesBuffer:[Swift.String]? = nil - if let ipv6AddressesContainer = ipv6AddressesContainer { - ipv6AddressesBuffer = [Swift.String]() - for stringContainer0 in ipv6AddressesContainer { - ipv6AddressesBuffer?.append(stringContainer0) - } - } - ipv6Addresses = ipv6AddressesBuffer - } else { - ipv6Addresses = [] - } - } else { - ipv6Addresses = nil - } - if containerValues.contains(.ipv6Prefixes) { - struct KeyVal0{struct item{}} - let ipv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6Prefixes) - if let ipv6PrefixesWrappedContainer = ipv6PrefixesWrappedContainer { - let ipv6PrefixesContainer = try ipv6PrefixesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipv6PrefixesBuffer:[Swift.String]? = nil - if let ipv6PrefixesContainer = ipv6PrefixesContainer { - ipv6PrefixesBuffer = [Swift.String]() - for stringContainer0 in ipv6PrefixesContainer { - ipv6PrefixesBuffer?.append(stringContainer0) - } - } - ipv6Prefixes = ipv6PrefixesBuffer - } else { - ipv6Prefixes = [] - } - } else { - ipv6Prefixes = nil - } - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - } -} +extension UnassignIpv6AddressesOutput { -extension UnassignIpv6AddressesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UnassignIpv6AddressesOutputBody = try responseDecoder.decode(responseBody: data) - self.networkInterfaceId = output.networkInterfaceId - self.unassignedIpv6Addresses = output.unassignedIpv6Addresses - self.unassignedIpv6Prefixes = output.unassignedIpv6Prefixes - } else { - self.networkInterfaceId = nil - self.unassignedIpv6Addresses = nil - self.unassignedIpv6Prefixes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UnassignIpv6AddressesOutput() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.unassignedIpv6Addresses = try reader["unassignedIpv6Addresses"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.unassignedIpv6Prefixes = try reader["unassignedIpv6PrefixSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -180465,69 +130368,18 @@ public struct UnassignIpv6AddressesOutput: Swift.Equatable { } } -struct UnassignIpv6AddressesOutputBody: Swift.Equatable { - let networkInterfaceId: Swift.String? - let unassignedIpv6Addresses: [Swift.String]? - let unassignedIpv6Prefixes: [Swift.String]? -} - -extension UnassignIpv6AddressesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInterfaceId = "networkInterfaceId" - case unassignedIpv6Addresses = "unassignedIpv6Addresses" - case unassignedIpv6Prefixes = "unassignedIpv6PrefixSet" - } +enum UnassignIpv6AddressesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - if containerValues.contains(.unassignedIpv6Addresses) { - struct KeyVal0{struct item{}} - let unassignedIpv6AddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unassignedIpv6Addresses) - if let unassignedIpv6AddressesWrappedContainer = unassignedIpv6AddressesWrappedContainer { - let unassignedIpv6AddressesContainer = try unassignedIpv6AddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var unassignedIpv6AddressesBuffer:[Swift.String]? = nil - if let unassignedIpv6AddressesContainer = unassignedIpv6AddressesContainer { - unassignedIpv6AddressesBuffer = [Swift.String]() - for stringContainer0 in unassignedIpv6AddressesContainer { - unassignedIpv6AddressesBuffer?.append(stringContainer0) - } - } - unassignedIpv6Addresses = unassignedIpv6AddressesBuffer - } else { - unassignedIpv6Addresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - unassignedIpv6Addresses = nil - } - if containerValues.contains(.unassignedIpv6Prefixes) { - struct KeyVal0{struct item{}} - let unassignedIpv6PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unassignedIpv6Prefixes) - if let unassignedIpv6PrefixesWrappedContainer = unassignedIpv6PrefixesWrappedContainer { - let unassignedIpv6PrefixesContainer = try unassignedIpv6PrefixesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var unassignedIpv6PrefixesBuffer:[Swift.String]? = nil - if let unassignedIpv6PrefixesContainer = unassignedIpv6PrefixesContainer { - unassignedIpv6PrefixesBuffer = [Swift.String]() - for stringContainer0 in unassignedIpv6PrefixesContainer { - unassignedIpv6PrefixesBuffer?.append(stringContainer0) - } - } - unassignedIpv6Prefixes = unassignedIpv6PrefixesBuffer - } else { - unassignedIpv6Prefixes = [] - } - } else { - unassignedIpv6Prefixes = nil - } - } -} - -enum UnassignIpv6AddressesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -180596,66 +130448,12 @@ public struct UnassignPrivateIpAddressesInput: Swift.Equatable { } } -struct UnassignPrivateIpAddressesInputBody: Swift.Equatable { - let networkInterfaceId: Swift.String? - let privateIpAddresses: [Swift.String]? - let ipv4Prefixes: [Swift.String]? -} - -extension UnassignPrivateIpAddressesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipv4Prefixes = "Ipv4Prefix" - case networkInterfaceId = "networkInterfaceId" - case privateIpAddresses = "privateIpAddress" - } +extension UnassignPrivateIpAddressesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct PrivateIpAddress{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var privateIpAddressesBuffer:[Swift.String]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [Swift.String]() - for stringContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(stringContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UnassignPrivateIpAddressesOutput() } - if containerValues.contains(.ipv4Prefixes) { - struct KeyVal0{struct item{}} - let ipv4PrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv4Prefixes) - if let ipv4PrefixesWrappedContainer = ipv4PrefixesWrappedContainer { - let ipv4PrefixesContainer = try ipv4PrefixesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ipv4PrefixesBuffer:[Swift.String]? = nil - if let ipv4PrefixesContainer = ipv4PrefixesContainer { - ipv4PrefixesBuffer = [Swift.String]() - for stringContainer0 in ipv4PrefixesContainer { - ipv4PrefixesBuffer?.append(stringContainer0) - } - } - ipv4Prefixes = ipv4PrefixesBuffer - } else { - ipv4Prefixes = [] - } - } else { - ipv4Prefixes = nil - } - } -} - -extension UnassignPrivateIpAddressesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { } } @@ -180664,11 +130462,18 @@ public struct UnassignPrivateIpAddressesOutput: Swift.Equatable { public init() { } } -enum UnassignPrivateIpAddressesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) +enum UnassignPrivateIpAddressesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -180735,61 +130540,16 @@ public struct UnassignPrivateNatGatewayAddressInput: Swift.Equatable { } } -struct UnassignPrivateNatGatewayAddressInputBody: Swift.Equatable { - let natGatewayId: Swift.String? - let privateIpAddresses: [Swift.String]? - let maxDrainDurationSeconds: Swift.Int? - let dryRun: Swift.Bool? -} - -extension UnassignPrivateNatGatewayAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case maxDrainDurationSeconds = "MaxDrainDurationSeconds" - case natGatewayId = "NatGatewayId" - case privateIpAddresses = "PrivateIpAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - if containerValues.contains(.privateIpAddresses) { - struct KeyVal0{struct item{}} - let privateIpAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .privateIpAddresses) - if let privateIpAddressesWrappedContainer = privateIpAddressesWrappedContainer { - let privateIpAddressesContainer = try privateIpAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var privateIpAddressesBuffer:[Swift.String]? = nil - if let privateIpAddressesContainer = privateIpAddressesContainer { - privateIpAddressesBuffer = [Swift.String]() - for stringContainer0 in privateIpAddressesContainer { - privateIpAddressesBuffer?.append(stringContainer0) - } - } - privateIpAddresses = privateIpAddressesBuffer - } else { - privateIpAddresses = [] - } - } else { - privateIpAddresses = nil - } - let maxDrainDurationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxDrainDurationSeconds) - maxDrainDurationSeconds = maxDrainDurationSecondsDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension UnassignPrivateNatGatewayAddressOutput { -extension UnassignPrivateNatGatewayAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UnassignPrivateNatGatewayAddressOutputBody = try responseDecoder.decode(responseBody: data) - self.natGatewayAddresses = output.natGatewayAddresses - self.natGatewayId = output.natGatewayId - } else { - self.natGatewayAddresses = nil - self.natGatewayId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UnassignPrivateNatGatewayAddressOutput() + value.natGatewayAddresses = try reader["natGatewayAddressSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.NatGatewayAddress.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.natGatewayId = try reader["natGatewayId"].readIfPresent() + return value } } } @@ -180810,48 +130570,18 @@ public struct UnassignPrivateNatGatewayAddressOutput: Swift.Equatable { } } -struct UnassignPrivateNatGatewayAddressOutputBody: Swift.Equatable { - let natGatewayId: Swift.String? - let natGatewayAddresses: [EC2ClientTypes.NatGatewayAddress]? -} - -extension UnassignPrivateNatGatewayAddressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case natGatewayAddresses = "natGatewayAddressSet" - case natGatewayId = "natGatewayId" - } +enum UnassignPrivateNatGatewayAddressOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let natGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .natGatewayId) - natGatewayId = natGatewayIdDecoded - if containerValues.contains(.natGatewayAddresses) { - struct KeyVal0{struct item{}} - let natGatewayAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .natGatewayAddresses) - if let natGatewayAddressesWrappedContainer = natGatewayAddressesWrappedContainer { - let natGatewayAddressesContainer = try natGatewayAddressesWrappedContainer.decodeIfPresent([EC2ClientTypes.NatGatewayAddress].self, forKey: .member) - var natGatewayAddressesBuffer:[EC2ClientTypes.NatGatewayAddress]? = nil - if let natGatewayAddressesContainer = natGatewayAddressesContainer { - natGatewayAddressesBuffer = [EC2ClientTypes.NatGatewayAddress]() - for structureContainer0 in natGatewayAddressesContainer { - natGatewayAddressesBuffer?.append(structureContainer0) - } - } - natGatewayAddresses = natGatewayAddressesBuffer - } else { - natGatewayAddresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - natGatewayAddresses = nil - } - } -} - -enum UnassignPrivateNatGatewayAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -180932,34 +130662,15 @@ public struct UnlockSnapshotInput: Swift.Equatable { } } -struct UnlockSnapshotInputBody: Swift.Equatable { - let snapshotId: Swift.String? - let dryRun: Swift.Bool? -} +extension UnlockSnapshotOutput { -extension UnlockSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case snapshotId = "SnapshotId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} - -extension UnlockSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UnlockSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshotId = output.snapshotId - } else { - self.snapshotId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UnlockSnapshotOutput() + value.snapshotId = try reader["snapshotId"].readIfPresent() + return value } } } @@ -180976,27 +130687,18 @@ public struct UnlockSnapshotOutput: Swift.Equatable { } } -struct UnlockSnapshotOutputBody: Swift.Equatable { - let snapshotId: Swift.String? -} - -extension UnlockSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshotId = "snapshotId" - } +enum UnlockSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - } -} - -enum UnlockSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -181048,51 +130750,15 @@ public struct UnmonitorInstancesInput: Swift.Equatable { } } -struct UnmonitorInstancesInputBody: Swift.Equatable { - let instanceIds: [Swift.String]? - let dryRun: Swift.Bool? -} - -extension UnmonitorInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "dryRun" - case instanceIds = "InstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceIds) { - struct KeyVal0{struct InstanceId{}} - let instanceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceIds) - if let instanceIdsWrappedContainer = instanceIdsWrappedContainer { - let instanceIdsContainer = try instanceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var instanceIdsBuffer:[Swift.String]? = nil - if let instanceIdsContainer = instanceIdsContainer { - instanceIdsBuffer = [Swift.String]() - for stringContainer0 in instanceIdsContainer { - instanceIdsBuffer?.append(stringContainer0) - } - } - instanceIds = instanceIdsBuffer - } else { - instanceIds = [] - } - } else { - instanceIds = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension UnmonitorInstancesOutput { -extension UnmonitorInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UnmonitorInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceMonitorings = output.instanceMonitorings - } else { - self.instanceMonitorings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UnmonitorInstancesOutput() + value.instanceMonitorings = try reader["instancesSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.InstanceMonitoring.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -181109,44 +130775,18 @@ public struct UnmonitorInstancesOutput: Swift.Equatable { } } -struct UnmonitorInstancesOutputBody: Swift.Equatable { - let instanceMonitorings: [EC2ClientTypes.InstanceMonitoring]? -} - -extension UnmonitorInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceMonitorings = "instancesSet" - } +enum UnmonitorInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.instanceMonitorings) { - struct KeyVal0{struct item{}} - let instanceMonitoringsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceMonitorings) - if let instanceMonitoringsWrappedContainer = instanceMonitoringsWrappedContainer { - let instanceMonitoringsContainer = try instanceMonitoringsWrappedContainer.decodeIfPresent([EC2ClientTypes.InstanceMonitoring].self, forKey: .member) - var instanceMonitoringsBuffer:[EC2ClientTypes.InstanceMonitoring]? = nil - if let instanceMonitoringsContainer = instanceMonitoringsContainer { - instanceMonitoringsBuffer = [EC2ClientTypes.InstanceMonitoring]() - for structureContainer0 in instanceMonitoringsContainer { - instanceMonitoringsBuffer?.append(structureContainer0) - } - } - instanceMonitorings = instanceMonitoringsBuffer - } else { - instanceMonitorings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) } - } else { - instanceMonitorings = nil - } - } -} - -enum UnmonitorInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) } } } @@ -181189,11 +130829,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case error = "error" - case instanceId = "instanceId" - } +extension EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -181205,12 +130841,14 @@ extension EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem: Swift.Coda } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let errorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItemError.self, forKey: .error) - error = errorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItem() + value.instanceId = try reader["instanceId"].readIfPresent() + value.error = try reader["error"].readIfPresent(readingClosure: EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItemError.readingClosure) + return value + } } } @@ -181234,11 +130872,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItemError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItemError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -181250,12 +130884,14 @@ extension EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItemError: Swift } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationErrorCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.UnsuccessfulInstanceCreditSpecificationItemError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -181279,11 +130915,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.UnsuccessfulItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case error = "error" - case resourceId = "resourceId" - } +extension EC2ClientTypes.UnsuccessfulItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -181295,12 +130927,14 @@ extension EC2ClientTypes.UnsuccessfulItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UnsuccessfulItemError.self, forKey: .error) - error = errorDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.UnsuccessfulItem() + value.error = try reader["error"].readIfPresent(readingClosure: EC2ClientTypes.UnsuccessfulItemError.readingClosure) + value.resourceId = try reader["resourceId"].readIfPresent() + return value + } } } @@ -181324,11 +130958,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.UnsuccessfulItemError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.UnsuccessfulItemError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -181340,12 +130970,14 @@ extension EC2ClientTypes.UnsuccessfulItemError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.UnsuccessfulItemError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -181445,80 +131077,15 @@ public struct UpdateSecurityGroupRuleDescriptionsEgressInput: Swift.Equatable { } } -struct UpdateSecurityGroupRuleDescriptionsEgressInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let groupId: Swift.String? - let groupName: Swift.String? - let ipPermissions: [EC2ClientTypes.IpPermission]? - let securityGroupRuleDescriptions: [EC2ClientTypes.SecurityGroupRuleDescription]? -} - -extension UpdateSecurityGroupRuleDescriptionsEgressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupId = "GroupId" - case groupName = "GroupName" - case ipPermissions = "IpPermissions" - case securityGroupRuleDescriptions = "SecurityGroupRuleDescription" - } +extension UpdateSecurityGroupRuleDescriptionsEgressOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - if containerValues.contains(.ipPermissions) { - struct KeyVal0{struct item{}} - let ipPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipPermissions) - if let ipPermissionsWrappedContainer = ipPermissionsWrappedContainer { - let ipPermissionsContainer = try ipPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var ipPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let ipPermissionsContainer = ipPermissionsContainer { - ipPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in ipPermissionsContainer { - ipPermissionsBuffer?.append(structureContainer0) - } - } - ipPermissions = ipPermissionsBuffer - } else { - ipPermissions = [] - } - } else { - ipPermissions = nil - } - if containerValues.contains(.securityGroupRuleDescriptions) { - struct KeyVal0{struct item{}} - let securityGroupRuleDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRuleDescriptions) - if let securityGroupRuleDescriptionsWrappedContainer = securityGroupRuleDescriptionsWrappedContainer { - let securityGroupRuleDescriptionsContainer = try securityGroupRuleDescriptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupRuleDescription].self, forKey: .member) - var securityGroupRuleDescriptionsBuffer:[EC2ClientTypes.SecurityGroupRuleDescription]? = nil - if let securityGroupRuleDescriptionsContainer = securityGroupRuleDescriptionsContainer { - securityGroupRuleDescriptionsBuffer = [EC2ClientTypes.SecurityGroupRuleDescription]() - for structureContainer0 in securityGroupRuleDescriptionsContainer { - securityGroupRuleDescriptionsBuffer?.append(structureContainer0) - } - } - securityGroupRuleDescriptions = securityGroupRuleDescriptionsBuffer - } else { - securityGroupRuleDescriptions = [] - } - } else { - securityGroupRuleDescriptions = nil - } - } -} - -extension UpdateSecurityGroupRuleDescriptionsEgressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateSecurityGroupRuleDescriptionsEgressOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateSecurityGroupRuleDescriptionsEgressOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -181535,27 +131102,18 @@ public struct UpdateSecurityGroupRuleDescriptionsEgressOutput: Swift.Equatable { } } -struct UpdateSecurityGroupRuleDescriptionsEgressOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension UpdateSecurityGroupRuleDescriptionsEgressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum UpdateSecurityGroupRuleDescriptionsEgressOutputError { -enum UpdateSecurityGroupRuleDescriptionsEgressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -181636,80 +131194,15 @@ public struct UpdateSecurityGroupRuleDescriptionsIngressInput: Swift.Equatable { } } -struct UpdateSecurityGroupRuleDescriptionsIngressInputBody: Swift.Equatable { - let dryRun: Swift.Bool? - let groupId: Swift.String? - let groupName: Swift.String? - let ipPermissions: [EC2ClientTypes.IpPermission]? - let securityGroupRuleDescriptions: [EC2ClientTypes.SecurityGroupRuleDescription]? -} +extension UpdateSecurityGroupRuleDescriptionsIngressOutput { -extension UpdateSecurityGroupRuleDescriptionsIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case groupId = "GroupId" - case groupName = "GroupName" - case ipPermissions = "IpPermissions" - case securityGroupRuleDescriptions = "SecurityGroupRuleDescription" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - if containerValues.contains(.ipPermissions) { - struct KeyVal0{struct item{}} - let ipPermissionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipPermissions) - if let ipPermissionsWrappedContainer = ipPermissionsWrappedContainer { - let ipPermissionsContainer = try ipPermissionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IpPermission].self, forKey: .member) - var ipPermissionsBuffer:[EC2ClientTypes.IpPermission]? = nil - if let ipPermissionsContainer = ipPermissionsContainer { - ipPermissionsBuffer = [EC2ClientTypes.IpPermission]() - for structureContainer0 in ipPermissionsContainer { - ipPermissionsBuffer?.append(structureContainer0) - } - } - ipPermissions = ipPermissionsBuffer - } else { - ipPermissions = [] - } - } else { - ipPermissions = nil - } - if containerValues.contains(.securityGroupRuleDescriptions) { - struct KeyVal0{struct item{}} - let securityGroupRuleDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupRuleDescriptions) - if let securityGroupRuleDescriptionsWrappedContainer = securityGroupRuleDescriptionsWrappedContainer { - let securityGroupRuleDescriptionsContainer = try securityGroupRuleDescriptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupRuleDescription].self, forKey: .member) - var securityGroupRuleDescriptionsBuffer:[EC2ClientTypes.SecurityGroupRuleDescription]? = nil - if let securityGroupRuleDescriptionsContainer = securityGroupRuleDescriptionsContainer { - securityGroupRuleDescriptionsBuffer = [EC2ClientTypes.SecurityGroupRuleDescription]() - for structureContainer0 in securityGroupRuleDescriptionsContainer { - securityGroupRuleDescriptionsBuffer?.append(structureContainer0) - } - } - securityGroupRuleDescriptions = securityGroupRuleDescriptionsBuffer - } else { - securityGroupRuleDescriptions = [] - } - } else { - securityGroupRuleDescriptions = nil - } - } -} - -extension UpdateSecurityGroupRuleDescriptionsIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateSecurityGroupRuleDescriptionsIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.`return` = output.`return` - } else { - self.`return` = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateSecurityGroupRuleDescriptionsIngressOutput() + value.`return` = try reader["return"].readIfPresent() + return value } } } @@ -181726,27 +131219,18 @@ public struct UpdateSecurityGroupRuleDescriptionsIngressOutput: Swift.Equatable } } -struct UpdateSecurityGroupRuleDescriptionsIngressOutputBody: Swift.Equatable { - let `return`: Swift.Bool? -} - -extension UpdateSecurityGroupRuleDescriptionsIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `return` = "return" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let returnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .return) - `return` = returnDecoded - } -} +enum UpdateSecurityGroupRuleDescriptionsIngressOutputError { -enum UpdateSecurityGroupRuleDescriptionsIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } @@ -181786,11 +131270,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.UserBucket: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3Bucket = "S3Bucket" - case s3Key = "S3Key" - } +extension EC2ClientTypes.UserBucket: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -181802,12 +131282,14 @@ extension EC2ClientTypes.UserBucket: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3KeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Key) - s3Key = s3KeyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.UserBucket() + value.s3Bucket = try reader["S3Bucket"].readIfPresent() + value.s3Key = try reader["S3Key"].readIfPresent() + return value + } } } @@ -181831,11 +131313,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.UserBucketDetails: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3Bucket = "s3Bucket" - case s3Key = "s3Key" - } +extension EC2ClientTypes.UserBucketDetails: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -181847,12 +131325,14 @@ extension EC2ClientTypes.UserBucketDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3KeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Key) - s3Key = s3KeyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.UserBucketDetails() + value.s3Bucket = try reader["s3Bucket"].readIfPresent() + value.s3Key = try reader["s3Key"].readIfPresent() + return value + } } } @@ -181876,10 +131356,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.UserData: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case data = "data" - } +extension EC2ClientTypes.UserData: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -181888,10 +131365,13 @@ extension EC2ClientTypes.UserData: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .data) - data = dataDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.UserData() + value.data = try reader["data"].readIfPresent() + return value + } } } @@ -181917,16 +131397,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.UserIdGroupPair: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case groupId = "groupId" - case groupName = "groupName" - case peeringStatus = "peeringStatus" - case userId = "userId" - case vpcId = "vpcId" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } +extension EC2ClientTypes.UserIdGroupPair: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -181953,22 +131424,19 @@ extension EC2ClientTypes.UserIdGroupPair: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let peeringStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .peeringStatus) - peeringStatus = peeringStatusDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.UserIdGroupPair() + value.description = try reader["description"].readIfPresent() + value.groupId = try reader["groupId"].readIfPresent() + value.groupName = try reader["groupName"].readIfPresent() + value.peeringStatus = try reader["peeringStatus"].readIfPresent() + value.userId = try reader["userId"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.vpcPeeringConnectionId = try reader["vpcPeeringConnectionId"].readIfPresent() + return value + } } } @@ -182044,11 +131512,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VCpuCountRange: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "max" - case min = "min" - } +extension EC2ClientTypes.VCpuCountRange: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182060,12 +131524,14 @@ extension EC2ClientTypes.VCpuCountRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VCpuCountRange() + value.min = try reader["min"].readIfPresent() + value.max = try reader["max"].readIfPresent() + return value + } } } @@ -182089,11 +131555,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VCpuCountRangeRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max = "Max" - case min = "Min" - } +extension EC2ClientTypes.VCpuCountRangeRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182105,12 +131567,14 @@ extension EC2ClientTypes.VCpuCountRangeRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .min) - min = minDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VCpuCountRangeRequest() + value.min = try reader["Min"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -182135,14 +131599,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VCpuInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case defaultCores = "defaultCores" - case defaultThreadsPerCore = "defaultThreadsPerCore" - case defaultVCpus = "defaultVCpus" - case validCores = "validCores" - case validThreadsPerCore = "validThreadsPerCore" - } +extension EC2ClientTypes.VCpuInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182181,51 +131638,16 @@ extension EC2ClientTypes.VCpuInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultVCpusDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultVCpus) - defaultVCpus = defaultVCpusDecoded - let defaultCoresDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultCores) - defaultCores = defaultCoresDecoded - let defaultThreadsPerCoreDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultThreadsPerCore) - defaultThreadsPerCore = defaultThreadsPerCoreDecoded - if containerValues.contains(.validCores) { - struct KeyVal0{struct item{}} - let validCoresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validCores) - if let validCoresWrappedContainer = validCoresWrappedContainer { - let validCoresContainer = try validCoresWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var validCoresBuffer:[Swift.Int]? = nil - if let validCoresContainer = validCoresContainer { - validCoresBuffer = [Swift.Int]() - for integerContainer0 in validCoresContainer { - validCoresBuffer?.append(integerContainer0) - } - } - validCores = validCoresBuffer - } else { - validCores = [] - } - } else { - validCores = nil - } - if containerValues.contains(.validThreadsPerCore) { - struct KeyVal0{struct item{}} - let validThreadsPerCoreWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validThreadsPerCore) - if let validThreadsPerCoreWrappedContainer = validThreadsPerCoreWrappedContainer { - let validThreadsPerCoreContainer = try validThreadsPerCoreWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var validThreadsPerCoreBuffer:[Swift.Int]? = nil - if let validThreadsPerCoreContainer = validThreadsPerCoreContainer { - validThreadsPerCoreBuffer = [Swift.Int]() - for integerContainer0 in validThreadsPerCoreContainer { - validThreadsPerCoreBuffer?.append(integerContainer0) - } - } - validThreadsPerCore = validThreadsPerCoreBuffer - } else { - validThreadsPerCore = [] - } - } else { - validThreadsPerCore = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VCpuInfo() + value.defaultVCpus = try reader["defaultVCpus"].readIfPresent() + value.defaultCores = try reader["defaultCores"].readIfPresent() + value.defaultThreadsPerCore = try reader["defaultThreadsPerCore"].readIfPresent() + value.validCores = try reader["validCores"].readListIfPresent(memberReadingClosure: Swift.Int.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.validThreadsPerCore = try reader["validThreadsPerCore"].readListIfPresent(memberReadingClosure: Swift.Int.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -182262,11 +131684,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ValidationError: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.ValidationError: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182278,12 +131696,14 @@ extension EC2ClientTypes.ValidationError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ValidationError() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -182307,10 +131727,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.ValidationWarning: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errors = "errorSet" - } +extension EC2ClientTypes.ValidationWarning: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182328,26 +131745,12 @@ extension EC2ClientTypes.ValidationWarning: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.errors) { - struct KeyVal0{struct item{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([EC2ClientTypes.ValidationError].self, forKey: .member) - var errorsBuffer:[EC2ClientTypes.ValidationError]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [EC2ClientTypes.ValidationError]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] - } - } else { - errors = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.ValidationWarning() + value.errors = try reader["errorSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.ValidationError.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -182368,28 +131771,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessEndpoint: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationDomain = "applicationDomain" - case attachmentType = "attachmentType" - case creationTime = "creationTime" - case deletionTime = "deletionTime" - case description = "description" - case deviceValidationDomain = "deviceValidationDomain" - case domainCertificateArn = "domainCertificateArn" - case endpointDomain = "endpointDomain" - case endpointType = "endpointType" - case lastUpdatedTime = "lastUpdatedTime" - case loadBalancerOptions = "loadBalancerOptions" - case networkInterfaceOptions = "networkInterfaceOptions" - case securityGroupIds = "securityGroupIdSet" - case sseSpecification = "sseSpecification" - case status = "status" - case tags = "tagSet" - case verifiedAccessEndpointId = "verifiedAccessEndpointId" - case verifiedAccessGroupId = "verifiedAccessGroupId" - case verifiedAccessInstanceId = "verifiedAccessInstanceId" - } +extension EC2ClientTypes.VerifiedAccessEndpoint: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182470,80 +131852,31 @@ extension EC2ClientTypes.VerifiedAccessEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let verifiedAccessEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessEndpointId) - verifiedAccessEndpointId = verifiedAccessEndpointIdDecoded - let applicationDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationDomain) - applicationDomain = applicationDomainDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointType.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let attachmentTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointAttachmentType.self, forKey: .attachmentType) - attachmentType = attachmentTypeDecoded - let domainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainCertificateArn) - domainCertificateArn = domainCertificateArnDecoded - let endpointDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointDomain) - endpointDomain = endpointDomainDecoded - let deviceValidationDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deviceValidationDomain) - deviceValidationDomain = deviceValidationDomainDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct item{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let loadBalancerOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointLoadBalancerOptions.self, forKey: .loadBalancerOptions) - loadBalancerOptions = loadBalancerOptionsDecoded - let networkInterfaceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointEniOptions.self, forKey: .networkInterfaceOptions) - networkInterfaceOptions = networkInterfaceOptionsDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointStatus.self, forKey: .status) - status = statusDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let creationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .creationTime) - creationTime = creationTimeDecoded - let lastUpdatedTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastUpdatedTime) - lastUpdatedTime = lastUpdatedTimeDecoded - let deletionTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deletionTime) - deletionTime = deletionTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationResponse.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessEndpoint() + value.verifiedAccessInstanceId = try reader["verifiedAccessInstanceId"].readIfPresent() + value.verifiedAccessGroupId = try reader["verifiedAccessGroupId"].readIfPresent() + value.verifiedAccessEndpointId = try reader["verifiedAccessEndpointId"].readIfPresent() + value.applicationDomain = try reader["applicationDomain"].readIfPresent() + value.endpointType = try reader["endpointType"].readIfPresent() + value.attachmentType = try reader["attachmentType"].readIfPresent() + value.domainCertificateArn = try reader["domainCertificateArn"].readIfPresent() + value.endpointDomain = try reader["endpointDomain"].readIfPresent() + value.deviceValidationDomain = try reader["deviceValidationDomain"].readIfPresent() + value.securityGroupIds = try reader["securityGroupIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.loadBalancerOptions = try reader["loadBalancerOptions"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessEndpointLoadBalancerOptions.readingClosure) + value.networkInterfaceOptions = try reader["networkInterfaceOptions"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessEndpointEniOptions.readingClosure) + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessEndpointStatus.readingClosure) + value.description = try reader["description"].readIfPresent() + value.creationTime = try reader["creationTime"].readIfPresent() + value.lastUpdatedTime = try reader["lastUpdatedTime"].readIfPresent() + value.deletionTime = try reader["deletionTime"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sseSpecification = try reader["sseSpecification"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessSseSpecificationResponse.readingClosure) + return value + } } } @@ -182664,12 +131997,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VerifiedAccessEndpointEniOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case networkInterfaceId = "networkInterfaceId" - case port = "port" - case `protocol` = "protocol" - } +extension EC2ClientTypes.VerifiedAccessEndpointEniOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182684,14 +132012,15 @@ extension EC2ClientTypes.VerifiedAccessEndpointEniOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessEndpointEniOptions() + value.networkInterfaceId = try reader["networkInterfaceId"].readIfPresent() + value.`protocol` = try reader["protocol"].readIfPresent() + value.port = try reader["port"].readIfPresent() + return value + } } } @@ -182719,13 +132048,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessEndpointLoadBalancerOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerArn = "loadBalancerArn" - case port = "port" - case `protocol` = "protocol" - case subnetIds = "subnetIdSet" - } +extension EC2ClientTypes.VerifiedAccessEndpointLoadBalancerOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182752,32 +132075,15 @@ extension EC2ClientTypes.VerifiedAccessEndpointLoadBalancerOptions: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let protocolDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessEndpointLoadBalancerOptions() + value.`protocol` = try reader["protocol"].readIfPresent() + value.port = try reader["port"].readIfPresent() + value.loadBalancerArn = try reader["loadBalancerArn"].readIfPresent() + value.subnetIds = try reader["subnetIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -182842,11 +132148,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VerifiedAccessEndpointStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.VerifiedAccessEndpointStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -182858,12 +132160,14 @@ extension EC2ClientTypes.VerifiedAccessEndpointStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessEndpointStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessEndpointStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -182960,19 +132264,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VerifiedAccessGroup: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case deletionTime = "deletionTime" - case description = "description" - case lastUpdatedTime = "lastUpdatedTime" - case owner = "owner" - case sseSpecification = "sseSpecification" - case tags = "tagSet" - case verifiedAccessGroupArn = "verifiedAccessGroupArn" - case verifiedAccessGroupId = "verifiedAccessGroupId" - case verifiedAccessInstanceId = "verifiedAccessInstanceId" - } +extension EC2ClientTypes.VerifiedAccessGroup: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183017,45 +132309,22 @@ extension EC2ClientTypes.VerifiedAccessGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupId) - verifiedAccessGroupId = verifiedAccessGroupIdDecoded - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let ownerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .owner) - owner = ownerDecoded - let verifiedAccessGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessGroupArn) - verifiedAccessGroupArn = verifiedAccessGroupArnDecoded - let creationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .creationTime) - creationTime = creationTimeDecoded - let lastUpdatedTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastUpdatedTime) - lastUpdatedTime = lastUpdatedTimeDecoded - let deletionTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deletionTime) - deletionTime = deletionTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationResponse.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessGroup() + value.verifiedAccessGroupId = try reader["verifiedAccessGroupId"].readIfPresent() + value.verifiedAccessInstanceId = try reader["verifiedAccessInstanceId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.owner = try reader["owner"].readIfPresent() + value.verifiedAccessGroupArn = try reader["verifiedAccessGroupArn"].readIfPresent() + value.creationTime = try reader["creationTime"].readIfPresent() + value.lastUpdatedTime = try reader["lastUpdatedTime"].readIfPresent() + value.deletionTime = try reader["deletionTime"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sseSpecification = try reader["sseSpecification"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessSseSpecificationResponse.readingClosure) + return value + } } } @@ -183111,16 +132380,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessInstance: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case description = "description" - case fipsEnabled = "fipsEnabled" - case lastUpdatedTime = "lastUpdatedTime" - case tags = "tagSet" - case verifiedAccessInstanceId = "verifiedAccessInstanceId" - case verifiedAccessTrustProviders = "verifiedAccessTrustProviderSet" - } +extension EC2ClientTypes.VerifiedAccessInstance: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183165,56 +132425,19 @@ extension EC2ClientTypes.VerifiedAccessInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.verifiedAccessTrustProviders) { - struct KeyVal0{struct item{}} - let verifiedAccessTrustProvidersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedAccessTrustProviders) - if let verifiedAccessTrustProvidersWrappedContainer = verifiedAccessTrustProvidersWrappedContainer { - let verifiedAccessTrustProvidersContainer = try verifiedAccessTrustProvidersWrappedContainer.decodeIfPresent([EC2ClientTypes.VerifiedAccessTrustProviderCondensed].self, forKey: .member) - var verifiedAccessTrustProvidersBuffer:[EC2ClientTypes.VerifiedAccessTrustProviderCondensed]? = nil - if let verifiedAccessTrustProvidersContainer = verifiedAccessTrustProvidersContainer { - verifiedAccessTrustProvidersBuffer = [EC2ClientTypes.VerifiedAccessTrustProviderCondensed]() - for structureContainer0 in verifiedAccessTrustProvidersContainer { - verifiedAccessTrustProvidersBuffer?.append(structureContainer0) - } - } - verifiedAccessTrustProviders = verifiedAccessTrustProvidersBuffer - } else { - verifiedAccessTrustProviders = [] - } - } else { - verifiedAccessTrustProviders = nil - } - let creationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .creationTime) - creationTime = creationTimeDecoded - let lastUpdatedTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastUpdatedTime) - lastUpdatedTime = lastUpdatedTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessInstance() + value.verifiedAccessInstanceId = try reader["verifiedAccessInstanceId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.verifiedAccessTrustProviders = try reader["verifiedAccessTrustProviderSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VerifiedAccessTrustProviderCondensed.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.creationTime = try reader["creationTime"].readIfPresent() + value.lastUpdatedTime = try reader["lastUpdatedTime"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.fipsEnabled = try reader["fipsEnabled"].readIfPresent() + return value } - let fipsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .fipsEnabled) - fipsEnabled = fipsEnabledDecoded } } @@ -183258,11 +132481,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessLogs = "accessLogs" - case verifiedAccessInstanceId = "verifiedAccessInstanceId" - } +extension EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183274,12 +132493,14 @@ extension EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessInstanceId) - verifiedAccessInstanceId = verifiedAccessInstanceIdDecoded - let accessLogsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogs.self, forKey: .accessLogs) - accessLogs = accessLogsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessInstanceLoggingConfiguration() + value.verifiedAccessInstanceId = try reader["verifiedAccessInstanceId"].readIfPresent() + value.accessLogs = try reader["accessLogs"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogs.readingClosure) + return value + } } } @@ -183303,12 +132524,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestination: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deliveryStatus = "deliveryStatus" - case enabled = "enabled" - case logGroup = "logGroup" - } +extension EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestination: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183323,14 +132539,15 @@ extension EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestination: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let deliveryStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogDeliveryStatus.self, forKey: .deliveryStatus) - deliveryStatus = deliveryStatusDecoded - let logGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logGroup) - logGroup = logGroupDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestination() + value.enabled = try reader["enabled"].readIfPresent() + value.deliveryStatus = try reader["deliveryStatus"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogDeliveryStatus.readingClosure) + value.logGroup = try reader["logGroup"].readIfPresent() + return value + } } } @@ -183358,11 +132575,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestinationOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case logGroup = "LogGroup" - } +extension EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestinationOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183374,12 +132587,14 @@ extension EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestinationOptions: Swif } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let logGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logGroup) - logGroup = logGroupDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestinationOptions() + value.enabled = try reader["Enabled"].readIfPresent() + value.logGroup = try reader["LogGroup"].readIfPresent() + return value + } } } @@ -183404,11 +132619,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessLogDeliveryStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.VerifiedAccessLogDeliveryStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183420,12 +132631,14 @@ extension EC2ClientTypes.VerifiedAccessLogDeliveryStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogDeliveryStatusCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogDeliveryStatus() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -183481,12 +132694,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestination: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deliveryStatus = "deliveryStatus" - case deliveryStream = "deliveryStream" - case enabled = "enabled" - } +extension EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestination: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183501,14 +132709,15 @@ extension EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestination: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let deliveryStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogDeliveryStatus.self, forKey: .deliveryStatus) - deliveryStatus = deliveryStatusDecoded - let deliveryStreamDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliveryStream) - deliveryStream = deliveryStreamDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestination() + value.enabled = try reader["enabled"].readIfPresent() + value.deliveryStatus = try reader["deliveryStatus"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogDeliveryStatus.readingClosure) + value.deliveryStream = try reader["deliveryStream"].readIfPresent() + return value + } } } @@ -183536,11 +132745,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestinationOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deliveryStream = "DeliveryStream" - case enabled = "Enabled" - } +extension EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestinationOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183552,12 +132757,14 @@ extension EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestinationOptions: } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let deliveryStreamDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliveryStream) - deliveryStream = deliveryStreamDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestinationOptions() + value.enabled = try reader["Enabled"].readIfPresent() + value.deliveryStream = try reader["DeliveryStream"].readIfPresent() + return value + } } } @@ -183582,14 +132789,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessLogOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudWatchLogs = "CloudWatchLogs" - case includeTrustContext = "IncludeTrustContext" - case kinesisDataFirehose = "KinesisDataFirehose" - case logVersion = "LogVersion" - case s3 = "S3" - } +extension EC2ClientTypes.VerifiedAccessLogOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183610,18 +132810,17 @@ extension EC2ClientTypes.VerifiedAccessLogOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogS3DestinationOptions.self, forKey: .s3) - s3 = s3Decoded - let cloudWatchLogsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestinationOptions.self, forKey: .cloudWatchLogs) - cloudWatchLogs = cloudWatchLogsDecoded - let kinesisDataFirehoseDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestinationOptions.self, forKey: .kinesisDataFirehose) - kinesisDataFirehose = kinesisDataFirehoseDecoded - let logVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logVersion) - logVersion = logVersionDecoded - let includeTrustContextDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeTrustContext) - includeTrustContext = includeTrustContextDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogOptions() + value.s3 = try reader["S3"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogS3DestinationOptions.readingClosure) + value.cloudWatchLogs = try reader["CloudWatchLogs"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestinationOptions.readingClosure) + value.kinesisDataFirehose = try reader["KinesisDataFirehose"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestinationOptions.readingClosure) + value.logVersion = try reader["LogVersion"].readIfPresent() + value.includeTrustContext = try reader["IncludeTrustContext"].readIfPresent() + return value + } } } @@ -183657,14 +132856,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessLogS3Destination: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketName = "bucketName" - case bucketOwner = "bucketOwner" - case deliveryStatus = "deliveryStatus" - case enabled = "enabled" - case `prefix` = "prefix" - } +extension EC2ClientTypes.VerifiedAccessLogS3Destination: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183685,18 +132877,17 @@ extension EC2ClientTypes.VerifiedAccessLogS3Destination: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let deliveryStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogDeliveryStatus.self, forKey: .deliveryStatus) - deliveryStatus = deliveryStatusDecoded - let bucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketName) - bucketName = bucketNameDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let bucketOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketOwner) - bucketOwner = bucketOwnerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogS3Destination() + value.enabled = try reader["enabled"].readIfPresent() + value.deliveryStatus = try reader["deliveryStatus"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogDeliveryStatus.readingClosure) + value.bucketName = try reader["bucketName"].readIfPresent() + value.`prefix` = try reader["prefix"].readIfPresent() + value.bucketOwner = try reader["bucketOwner"].readIfPresent() + return value + } } } @@ -183732,13 +132923,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessLogS3DestinationOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketName = "BucketName" - case bucketOwner = "BucketOwner" - case enabled = "Enabled" - case `prefix` = "Prefix" - } +extension EC2ClientTypes.VerifiedAccessLogS3DestinationOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183756,16 +132941,16 @@ extension EC2ClientTypes.VerifiedAccessLogS3DestinationOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let bucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketName) - bucketName = bucketNameDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let bucketOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketOwner) - bucketOwner = bucketOwnerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogS3DestinationOptions() + value.enabled = try reader["Enabled"].readIfPresent() + value.bucketName = try reader["BucketName"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.bucketOwner = try reader["BucketOwner"].readIfPresent() + return value + } } } @@ -183798,14 +132983,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessLogs: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudWatchLogs = "cloudWatchLogs" - case includeTrustContext = "includeTrustContext" - case kinesisDataFirehose = "kinesisDataFirehose" - case logVersion = "logVersion" - case s3 = "s3" - } +extension EC2ClientTypes.VerifiedAccessLogs: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183826,18 +133004,17 @@ extension EC2ClientTypes.VerifiedAccessLogs: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3Decoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogS3Destination.self, forKey: .s3) - s3 = s3Decoded - let cloudWatchLogsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestination.self, forKey: .cloudWatchLogs) - cloudWatchLogs = cloudWatchLogsDecoded - let kinesisDataFirehoseDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestination.self, forKey: .kinesisDataFirehose) - kinesisDataFirehose = kinesisDataFirehoseDecoded - let logVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logVersion) - logVersion = logVersionDecoded - let includeTrustContextDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeTrustContext) - includeTrustContext = includeTrustContextDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessLogs() + value.s3 = try reader["s3"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogS3Destination.readingClosure) + value.cloudWatchLogs = try reader["cloudWatchLogs"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogCloudWatchLogsDestination.readingClosure) + value.kinesisDataFirehose = try reader["kinesisDataFirehose"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessLogKinesisDataFirehoseDestination.readingClosure) + value.logVersion = try reader["logVersion"].readIfPresent() + value.includeTrustContext = try reader["includeTrustContext"].readIfPresent() + return value + } } } @@ -183873,11 +133050,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessSseSpecificationRequest: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerManagedKeyEnabled = "CustomerManagedKeyEnabled" - case kmsKeyArn = "KmsKeyArn" - } +extension EC2ClientTypes.VerifiedAccessSseSpecificationRequest: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183889,12 +133062,14 @@ extension EC2ClientTypes.VerifiedAccessSseSpecificationRequest: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerManagedKeyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .customerManagedKeyEnabled) - customerManagedKeyEnabled = customerManagedKeyEnabledDecoded - let kmsKeyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyArn) - kmsKeyArn = kmsKeyArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessSseSpecificationRequest() + value.customerManagedKeyEnabled = try reader["CustomerManagedKeyEnabled"].readIfPresent() + value.kmsKeyArn = try reader["KmsKeyArn"].readIfPresent() + return value + } } } @@ -183918,11 +133093,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessSseSpecificationResponse: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerManagedKeyEnabled = "customerManagedKeyEnabled" - case kmsKeyArn = "kmsKeyArn" - } +extension EC2ClientTypes.VerifiedAccessSseSpecificationResponse: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -183934,12 +133105,14 @@ extension EC2ClientTypes.VerifiedAccessSseSpecificationResponse: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerManagedKeyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .customerManagedKeyEnabled) - customerManagedKeyEnabled = customerManagedKeyEnabledDecoded - let kmsKeyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyArn) - kmsKeyArn = kmsKeyArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessSseSpecificationResponse() + value.customerManagedKeyEnabled = try reader["customerManagedKeyEnabled"].readIfPresent() + value.kmsKeyArn = try reader["kmsKeyArn"].readIfPresent() + return value + } } } @@ -183963,21 +133136,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessTrustProvider: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "creationTime" - case description = "description" - case deviceOptions = "deviceOptions" - case deviceTrustProviderType = "deviceTrustProviderType" - case lastUpdatedTime = "lastUpdatedTime" - case oidcOptions = "oidcOptions" - case policyReferenceName = "policyReferenceName" - case sseSpecification = "sseSpecification" - case tags = "tagSet" - case trustProviderType = "trustProviderType" - case userTrustProviderType = "userTrustProviderType" - case verifiedAccessTrustProviderId = "verifiedAccessTrustProviderId" - } +extension EC2ClientTypes.VerifiedAccessTrustProvider: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -184028,49 +133187,24 @@ extension EC2ClientTypes.VerifiedAccessTrustProvider: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessTrustProviderId) - verifiedAccessTrustProviderId = verifiedAccessTrustProviderIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let trustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrustProviderType.self, forKey: .trustProviderType) - trustProviderType = trustProviderTypeDecoded - let userTrustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UserTrustProviderType.self, forKey: .userTrustProviderType) - userTrustProviderType = userTrustProviderTypeDecoded - let deviceTrustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeviceTrustProviderType.self, forKey: .deviceTrustProviderType) - deviceTrustProviderType = deviceTrustProviderTypeDecoded - let oidcOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.OidcOptions.self, forKey: .oidcOptions) - oidcOptions = oidcOptionsDecoded - let deviceOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeviceOptions.self, forKey: .deviceOptions) - deviceOptions = deviceOptionsDecoded - let policyReferenceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyReferenceName) - policyReferenceName = policyReferenceNameDecoded - let creationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .creationTime) - creationTime = creationTimeDecoded - let lastUpdatedTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastUpdatedTime) - lastUpdatedTime = lastUpdatedTimeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let sseSpecificationDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VerifiedAccessSseSpecificationResponse.self, forKey: .sseSpecification) - sseSpecification = sseSpecificationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessTrustProvider() + value.verifiedAccessTrustProviderId = try reader["verifiedAccessTrustProviderId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.trustProviderType = try reader["trustProviderType"].readIfPresent() + value.userTrustProviderType = try reader["userTrustProviderType"].readIfPresent() + value.deviceTrustProviderType = try reader["deviceTrustProviderType"].readIfPresent() + value.oidcOptions = try reader["oidcOptions"].readIfPresent(readingClosure: EC2ClientTypes.OidcOptions.readingClosure) + value.deviceOptions = try reader["deviceOptions"].readIfPresent(readingClosure: EC2ClientTypes.DeviceOptions.readingClosure) + value.policyReferenceName = try reader["policyReferenceName"].readIfPresent() + value.creationTime = try reader["creationTime"].readIfPresent() + value.lastUpdatedTime = try reader["lastUpdatedTime"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.sseSpecification = try reader["sseSpecification"].readIfPresent(readingClosure: EC2ClientTypes.VerifiedAccessSseSpecificationResponse.readingClosure) + return value + } } } @@ -184134,14 +133268,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VerifiedAccessTrustProviderCondensed: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case deviceTrustProviderType = "deviceTrustProviderType" - case trustProviderType = "trustProviderType" - case userTrustProviderType = "userTrustProviderType" - case verifiedAccessTrustProviderId = "verifiedAccessTrustProviderId" - } +extension EC2ClientTypes.VerifiedAccessTrustProviderCondensed: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -184162,18 +133289,17 @@ extension EC2ClientTypes.VerifiedAccessTrustProviderCondensed: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verifiedAccessTrustProviderIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verifiedAccessTrustProviderId) - verifiedAccessTrustProviderId = verifiedAccessTrustProviderIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let trustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TrustProviderType.self, forKey: .trustProviderType) - trustProviderType = trustProviderTypeDecoded - let userTrustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.UserTrustProviderType.self, forKey: .userTrustProviderType) - userTrustProviderType = userTrustProviderTypeDecoded - let deviceTrustProviderTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DeviceTrustProviderType.self, forKey: .deviceTrustProviderType) - deviceTrustProviderType = deviceTrustProviderTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VerifiedAccessTrustProviderCondensed() + value.verifiedAccessTrustProviderId = try reader["verifiedAccessTrustProviderId"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.trustProviderType = try reader["trustProviderType"].readIfPresent() + value.userTrustProviderType = try reader["userTrustProviderType"].readIfPresent() + value.deviceTrustProviderType = try reader["deviceTrustProviderType"].readIfPresent() + return value + } } } @@ -184209,15 +133335,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VgwTelemetry: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case acceptedRouteCount = "acceptedRouteCount" - case certificateArn = "certificateArn" - case lastStatusChange = "lastStatusChange" - case outsideIpAddress = "outsideIpAddress" - case status = "status" - case statusMessage = "statusMessage" - } +extension EC2ClientTypes.VgwTelemetry: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -184241,20 +133359,18 @@ extension EC2ClientTypes.VgwTelemetry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let acceptedRouteCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .acceptedRouteCount) - acceptedRouteCount = acceptedRouteCountDecoded - let lastStatusChangeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastStatusChange) - lastStatusChange = lastStatusChangeDecoded - let outsideIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outsideIpAddress) - outsideIpAddress = outsideIpAddressDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TelemetryStatus.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VgwTelemetry() + value.acceptedRouteCount = try reader["acceptedRouteCount"].readIfPresent() + value.lastStatusChange = try reader["lastStatusChange"].readTimestampIfPresent(format: .dateTime) + value.outsideIpAddress = try reader["outsideIpAddress"].readIfPresent() + value.status = try reader["status"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.certificateArn = try reader["certificateArn"].readIfPresent() + return value + } } } @@ -184326,26 +133442,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Volume: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachments = "attachmentSet" - case availabilityZone = "availabilityZone" - case createTime = "createTime" - case encrypted = "encrypted" - case fastRestored = "fastRestored" - case iops = "iops" - case kmsKeyId = "kmsKeyId" - case multiAttachEnabled = "multiAttachEnabled" - case outpostArn = "outpostArn" - case size = "size" - case snapshotId = "snapshotId" - case sseType = "sseType" - case state = "status" - case tags = "tagSet" - case throughput = "throughput" - case volumeId = "volumeId" - case volumeType = "volumeType" - } +extension EC2ClientTypes.Volume: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -184420,76 +133517,29 @@ extension EC2ClientTypes.Volume: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.attachments) { - struct KeyVal0{struct item{}} - let attachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachments) - if let attachmentsWrappedContainer = attachmentsWrappedContainer { - let attachmentsContainer = try attachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.VolumeAttachment].self, forKey: .member) - var attachmentsBuffer:[EC2ClientTypes.VolumeAttachment]? = nil - if let attachmentsContainer = attachmentsContainer { - attachmentsBuffer = [EC2ClientTypes.VolumeAttachment]() - for structureContainer0 in attachmentsContainer { - attachmentsBuffer?.append(structureContainer0) - } - } - attachments = attachmentsBuffer - } else { - attachments = [] - } - } else { - attachments = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded - let snapshotIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotId) - snapshotId = snapshotIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeState.self, forKey: .state) - state = stateDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let volumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .volumeType) - volumeType = volumeTypeDecoded - let fastRestoredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .fastRestored) - fastRestored = fastRestoredDecoded - let multiAttachEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAttachEnabled) - multiAttachEnabled = multiAttachEnabledDecoded - let throughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .throughput) - throughput = throughputDecoded - let sseTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.SSEType.self, forKey: .sseType) - sseType = sseTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Volume() + value.attachments = try reader["attachmentSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VolumeAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.createTime = try reader["createTime"].readTimestampIfPresent(format: .dateTime) + value.encrypted = try reader["encrypted"].readIfPresent() + value.kmsKeyId = try reader["kmsKeyId"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.size = try reader["size"].readIfPresent() + value.snapshotId = try reader["snapshotId"].readIfPresent() + value.state = try reader["status"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + value.iops = try reader["iops"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.volumeType = try reader["volumeType"].readIfPresent() + value.fastRestored = try reader["fastRestored"].readIfPresent() + value.multiAttachEnabled = try reader["multiAttachEnabled"].readIfPresent() + value.throughput = try reader["throughput"].readIfPresent() + value.sseType = try reader["sseType"].readIfPresent() + return value + } } } @@ -184573,17 +133623,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VolumeAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedResource = "associatedResource" - case attachTime = "attachTime" - case deleteOnTermination = "deleteOnTermination" - case device = "device" - case instanceId = "instanceId" - case instanceOwningService = "instanceOwningService" - case state = "status" - case volumeId = "volumeId" - } +extension EC2ClientTypes.VolumeAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -184613,24 +133653,20 @@ extension EC2ClientTypes.VolumeAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attachTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .attachTime) - attachTime = attachTimeDecoded - let deviceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .device) - device = deviceDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeAttachmentState.self, forKey: .state) - state = stateDecoded - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let deleteOnTerminationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteOnTermination) - deleteOnTermination = deleteOnTerminationDecoded - let associatedResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associatedResource) - associatedResource = associatedResourceDecoded - let instanceOwningServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceOwningService) - instanceOwningService = instanceOwningServiceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeAttachment() + value.attachTime = try reader["attachTime"].readTimestampIfPresent(format: .dateTime) + value.device = try reader["device"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + value.state = try reader["status"].readIfPresent() + value.volumeId = try reader["volumeId"].readIfPresent() + value.deleteOnTermination = try reader["deleteOnTermination"].readIfPresent() + value.associatedResource = try reader["associatedResource"].readIfPresent() + value.instanceOwningService = try reader["instanceOwningService"].readIfPresent() + return value + } } } @@ -184751,10 +133787,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VolumeDetail: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case size = "size" - } +extension EC2ClientTypes.VolumeDetail: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -184763,10 +133796,13 @@ extension EC2ClientTypes.VolumeDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeDetail() + value.size = try reader["size"].readIfPresent() + return value + } } } @@ -184787,25 +133823,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VolumeModification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endTime = "endTime" - case modificationState = "modificationState" - case originalIops = "originalIops" - case originalMultiAttachEnabled = "originalMultiAttachEnabled" - case originalSize = "originalSize" - case originalThroughput = "originalThroughput" - case originalVolumeType = "originalVolumeType" - case progress = "progress" - case startTime = "startTime" - case statusMessage = "statusMessage" - case targetIops = "targetIops" - case targetMultiAttachEnabled = "targetMultiAttachEnabled" - case targetSize = "targetSize" - case targetThroughput = "targetThroughput" - case targetVolumeType = "targetVolumeType" - case volumeId = "volumeId" - } +extension EC2ClientTypes.VolumeModification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -184859,40 +133877,28 @@ extension EC2ClientTypes.VolumeModification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let modificationStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeModificationState.self, forKey: .modificationState) - modificationState = modificationStateDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let targetSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetSize) - targetSize = targetSizeDecoded - let targetIopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetIops) - targetIops = targetIopsDecoded - let targetVolumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .targetVolumeType) - targetVolumeType = targetVolumeTypeDecoded - let targetThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetThroughput) - targetThroughput = targetThroughputDecoded - let targetMultiAttachEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .targetMultiAttachEnabled) - targetMultiAttachEnabled = targetMultiAttachEnabledDecoded - let originalSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .originalSize) - originalSize = originalSizeDecoded - let originalIopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .originalIops) - originalIops = originalIopsDecoded - let originalVolumeTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeType.self, forKey: .originalVolumeType) - originalVolumeType = originalVolumeTypeDecoded - let originalThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .originalThroughput) - originalThroughput = originalThroughputDecoded - let originalMultiAttachEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .originalMultiAttachEnabled) - originalMultiAttachEnabled = originalMultiAttachEnabledDecoded - let progressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .progress) - progress = progressDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeModification() + value.volumeId = try reader["volumeId"].readIfPresent() + value.modificationState = try reader["modificationState"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + value.targetSize = try reader["targetSize"].readIfPresent() + value.targetIops = try reader["targetIops"].readIfPresent() + value.targetVolumeType = try reader["targetVolumeType"].readIfPresent() + value.targetThroughput = try reader["targetThroughput"].readIfPresent() + value.targetMultiAttachEnabled = try reader["targetMultiAttachEnabled"].readIfPresent() + value.originalSize = try reader["originalSize"].readIfPresent() + value.originalIops = try reader["originalIops"].readIfPresent() + value.originalVolumeType = try reader["originalVolumeType"].readIfPresent() + value.originalThroughput = try reader["originalThroughput"].readIfPresent() + value.originalMultiAttachEnabled = try reader["originalMultiAttachEnabled"].readIfPresent() + value.progress = try reader["progress"].readIfPresent() + value.startTime = try reader["startTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["endTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -185054,13 +134060,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VolumeStatusAction: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case description = "description" - case eventId = "eventId" - case eventType = "eventType" - } +extension EC2ClientTypes.VolumeStatusAction: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185078,16 +134078,16 @@ extension EC2ClientTypes.VolumeStatusAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let eventIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventId) - eventId = eventIdDecoded - let eventTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventType) - eventType = eventTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeStatusAction() + value.code = try reader["code"].readIfPresent() + value.description = try reader["description"].readIfPresent() + value.eventId = try reader["eventId"].readIfPresent() + value.eventType = try reader["eventType"].readIfPresent() + return value + } } } @@ -185119,11 +134119,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VolumeStatusAttachmentStatus: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceId = "instanceId" - case ioPerformance = "ioPerformance" - } +extension EC2ClientTypes.VolumeStatusAttachmentStatus: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185135,12 +134131,14 @@ extension EC2ClientTypes.VolumeStatusAttachmentStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ioPerformanceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ioPerformance) - ioPerformance = ioPerformanceDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeStatusAttachmentStatus() + value.ioPerformance = try reader["ioPerformance"].readIfPresent() + value.instanceId = try reader["instanceId"].readIfPresent() + return value + } } } @@ -185164,11 +134162,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VolumeStatusDetails: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "name" - case status = "status" - } +extension EC2ClientTypes.VolumeStatusDetails: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185180,12 +134174,14 @@ extension EC2ClientTypes.VolumeStatusDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeStatusName.self, forKey: .name) - name = nameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeStatusDetails() + value.name = try reader["name"].readIfPresent() + value.status = try reader["status"].readIfPresent() + return value + } } } @@ -185209,15 +134205,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VolumeStatusEvent: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "description" - case eventId = "eventId" - case eventType = "eventType" - case instanceId = "instanceId" - case notAfter = "notAfter" - case notBefore = "notBefore" - } +extension EC2ClientTypes.VolumeStatusEvent: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185241,20 +134229,18 @@ extension EC2ClientTypes.VolumeStatusEvent: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let eventIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventId) - eventId = eventIdDecoded - let eventTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventType) - eventType = eventTypeDecoded - let notAfterDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .notAfter) - notAfter = notAfterDecoded - let notBeforeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .notBefore) - notBefore = notBeforeDecoded - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeStatusEvent() + value.description = try reader["description"].readIfPresent() + value.eventId = try reader["eventId"].readIfPresent() + value.eventType = try reader["eventType"].readIfPresent() + value.notAfter = try reader["notAfter"].readTimestampIfPresent(format: .dateTime) + value.notBefore = try reader["notBefore"].readTimestampIfPresent(format: .dateTime) + value.instanceId = try reader["instanceId"].readIfPresent() + return value + } } } @@ -185294,11 +134280,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VolumeStatusInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case details = "details" - case status = "status" - } +extension EC2ClientTypes.VolumeStatusInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185319,29 +134301,14 @@ extension EC2ClientTypes.VolumeStatusInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.details) { - struct KeyVal0{struct item{}} - let detailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .details) - if let detailsWrappedContainer = detailsWrappedContainer { - let detailsContainer = try detailsWrappedContainer.decodeIfPresent([EC2ClientTypes.VolumeStatusDetails].self, forKey: .member) - var detailsBuffer:[EC2ClientTypes.VolumeStatusDetails]? = nil - if let detailsContainer = detailsContainer { - detailsBuffer = [EC2ClientTypes.VolumeStatusDetails]() - for structureContainer0 in detailsContainer { - detailsBuffer?.append(structureContainer0) - } - } - details = detailsBuffer - } else { - details = [] - } - } else { - details = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeStatusInfo() + value.details = try reader["details"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VolumeStatusDetails.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.status = try reader["status"].readIfPresent() + return value } - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeStatusInfoStatus.self, forKey: .status) - status = statusDecoded } } @@ -185400,16 +134367,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VolumeStatusItem: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actions = "actionsSet" - case attachmentStatuses = "attachmentStatuses" - case availabilityZone = "availabilityZone" - case events = "eventsSet" - case outpostArn = "outpostArn" - case volumeId = "volumeId" - case volumeStatus = "volumeStatus" - } +extension EC2ClientTypes.VolumeStatusItem: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185463,72 +134421,18 @@ extension EC2ClientTypes.VolumeStatusItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.actions) { - struct KeyVal0{struct item{}} - let actionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actions) - if let actionsWrappedContainer = actionsWrappedContainer { - let actionsContainer = try actionsWrappedContainer.decodeIfPresent([EC2ClientTypes.VolumeStatusAction].self, forKey: .member) - var actionsBuffer:[EC2ClientTypes.VolumeStatusAction]? = nil - if let actionsContainer = actionsContainer { - actionsBuffer = [EC2ClientTypes.VolumeStatusAction]() - for structureContainer0 in actionsContainer { - actionsBuffer?.append(structureContainer0) - } - } - actions = actionsBuffer - } else { - actions = [] - } - } else { - actions = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let outpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostArn) - outpostArn = outpostArnDecoded - if containerValues.contains(.events) { - struct KeyVal0{struct item{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([EC2ClientTypes.VolumeStatusEvent].self, forKey: .member) - var eventsBuffer:[EC2ClientTypes.VolumeStatusEvent]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [EC2ClientTypes.VolumeStatusEvent]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] - } - } else { - events = nil - } - let volumeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .volumeId) - volumeId = volumeIdDecoded - let volumeStatusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VolumeStatusInfo.self, forKey: .volumeStatus) - volumeStatus = volumeStatusDecoded - if containerValues.contains(.attachmentStatuses) { - struct KeyVal0{struct item{}} - let attachmentStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachmentStatuses) - if let attachmentStatusesWrappedContainer = attachmentStatusesWrappedContainer { - let attachmentStatusesContainer = try attachmentStatusesWrappedContainer.decodeIfPresent([EC2ClientTypes.VolumeStatusAttachmentStatus].self, forKey: .member) - var attachmentStatusesBuffer:[EC2ClientTypes.VolumeStatusAttachmentStatus]? = nil - if let attachmentStatusesContainer = attachmentStatusesContainer { - attachmentStatusesBuffer = [EC2ClientTypes.VolumeStatusAttachmentStatus]() - for structureContainer0 in attachmentStatusesContainer { - attachmentStatusesBuffer?.append(structureContainer0) - } - } - attachmentStatuses = attachmentStatusesBuffer - } else { - attachmentStatuses = [] - } - } else { - attachmentStatuses = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VolumeStatusItem() + value.actions = try reader["actionsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VolumeStatusAction.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.outpostArn = try reader["outpostArn"].readIfPresent() + value.events = try reader["eventsSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VolumeStatusEvent.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.volumeId = try reader["volumeId"].readIfPresent() + value.volumeStatus = try reader["volumeStatus"].readIfPresent(readingClosure: EC2ClientTypes.VolumeStatusInfo.readingClosure) + value.attachmentStatuses = try reader["attachmentStatuses"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VolumeStatusAttachmentStatus.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -185652,19 +134556,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.Vpc: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlock = "cidrBlock" - case cidrBlockAssociationSet = "cidrBlockAssociationSet" - case dhcpOptionsId = "dhcpOptionsId" - case instanceTenancy = "instanceTenancy" - case ipv6CidrBlockAssociationSet = "ipv6CidrBlockAssociationSet" - case isDefault = "isDefault" - case ownerId = "ownerId" - case state = "state" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.Vpc: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185727,78 +134619,21 @@ extension EC2ClientTypes.Vpc: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let dhcpOptionsIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dhcpOptionsId) - dhcpOptionsId = dhcpOptionsIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcState.self, forKey: .state) - state = stateDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let instanceTenancyDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.Tenancy.self, forKey: .instanceTenancy) - instanceTenancy = instanceTenancyDecoded - if containerValues.contains(.ipv6CidrBlockAssociationSet) { - struct KeyVal0{struct item{}} - let ipv6CidrBlockAssociationSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6CidrBlockAssociationSet) - if let ipv6CidrBlockAssociationSetWrappedContainer = ipv6CidrBlockAssociationSetWrappedContainer { - let ipv6CidrBlockAssociationSetContainer = try ipv6CidrBlockAssociationSetWrappedContainer.decodeIfPresent([EC2ClientTypes.VpcIpv6CidrBlockAssociation].self, forKey: .member) - var ipv6CidrBlockAssociationSetBuffer:[EC2ClientTypes.VpcIpv6CidrBlockAssociation]? = nil - if let ipv6CidrBlockAssociationSetContainer = ipv6CidrBlockAssociationSetContainer { - ipv6CidrBlockAssociationSetBuffer = [EC2ClientTypes.VpcIpv6CidrBlockAssociation]() - for structureContainer0 in ipv6CidrBlockAssociationSetContainer { - ipv6CidrBlockAssociationSetBuffer?.append(structureContainer0) - } - } - ipv6CidrBlockAssociationSet = ipv6CidrBlockAssociationSetBuffer - } else { - ipv6CidrBlockAssociationSet = [] - } - } else { - ipv6CidrBlockAssociationSet = nil - } - if containerValues.contains(.cidrBlockAssociationSet) { - struct KeyVal0{struct item{}} - let cidrBlockAssociationSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cidrBlockAssociationSet) - if let cidrBlockAssociationSetWrappedContainer = cidrBlockAssociationSetWrappedContainer { - let cidrBlockAssociationSetContainer = try cidrBlockAssociationSetWrappedContainer.decodeIfPresent([EC2ClientTypes.VpcCidrBlockAssociation].self, forKey: .member) - var cidrBlockAssociationSetBuffer:[EC2ClientTypes.VpcCidrBlockAssociation]? = nil - if let cidrBlockAssociationSetContainer = cidrBlockAssociationSetContainer { - cidrBlockAssociationSetBuffer = [EC2ClientTypes.VpcCidrBlockAssociation]() - for structureContainer0 in cidrBlockAssociationSetContainer { - cidrBlockAssociationSetBuffer?.append(structureContainer0) - } - } - cidrBlockAssociationSet = cidrBlockAssociationSetBuffer - } else { - cidrBlockAssociationSet = [] - } - } else { - cidrBlockAssociationSet = nil - } - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.Vpc() + value.cidrBlock = try reader["cidrBlock"].readIfPresent() + value.dhcpOptionsId = try reader["dhcpOptionsId"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.ownerId = try reader["ownerId"].readIfPresent() + value.instanceTenancy = try reader["instanceTenancy"].readIfPresent() + value.ipv6CidrBlockAssociationSet = try reader["ipv6CidrBlockAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpcIpv6CidrBlockAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.cidrBlockAssociationSet = try reader["cidrBlockAssociationSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpcCidrBlockAssociation.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.isDefault = try reader["isDefault"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -185855,11 +134690,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpcAttachment: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case vpcId = "vpcId" - } +extension EC2ClientTypes.VpcAttachment: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185871,12 +134702,14 @@ extension EC2ClientTypes.VpcAttachment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.AttachmentStatus.self, forKey: .state) - state = stateDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcAttachment() + value.state = try reader["state"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + return value + } } } @@ -185935,12 +134768,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VpcCidrBlockAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case cidrBlock = "cidrBlock" - case cidrBlockState = "cidrBlockState" - } +extension EC2ClientTypes.VpcCidrBlockAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -185955,14 +134783,15 @@ extension EC2ClientTypes.VpcCidrBlockAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let cidrBlockStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcCidrBlockState.self, forKey: .cidrBlockState) - cidrBlockState = cidrBlockStateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcCidrBlockAssociation() + value.associationId = try reader["associationId"].readIfPresent() + value.cidrBlock = try reader["cidrBlock"].readIfPresent() + value.cidrBlockState = try reader["cidrBlockState"].readIfPresent(readingClosure: EC2ClientTypes.VpcCidrBlockState.readingClosure) + return value + } } } @@ -185990,11 +134819,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpcCidrBlockState: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case state = "state" - case statusMessage = "statusMessage" - } +extension EC2ClientTypes.VpcCidrBlockState: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -186006,12 +134831,14 @@ extension EC2ClientTypes.VpcCidrBlockState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcCidrBlockStateCode.self, forKey: .state) - state = stateDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcCidrBlockState() + value.state = try reader["state"].readIfPresent() + value.statusMessage = try reader["statusMessage"].readIfPresent() + return value + } } } @@ -186079,12 +134906,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VpcClassicLink: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case classicLinkEnabled = "classicLinkEnabled" - case tags = "tagSet" - case vpcId = "vpcId" - } +extension EC2ClientTypes.VpcClassicLink: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -186108,31 +134930,15 @@ extension EC2ClientTypes.VpcClassicLink: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let classicLinkEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .classicLinkEnabled) - classicLinkEnabled = classicLinkEnabledDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcClassicLink() + value.classicLinkEnabled = try reader["classicLinkEnabled"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcId = try reader["vpcId"].readIfPresent() + return value } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded } } @@ -186160,28 +134966,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpcEndpoint: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTimestamp = "creationTimestamp" - case dnsEntries = "dnsEntrySet" - case dnsOptions = "dnsOptions" - case groups = "groupSet" - case ipAddressType = "ipAddressType" - case lastError = "lastError" - case networkInterfaceIds = "networkInterfaceIdSet" - case ownerId = "ownerId" - case policyDocument = "policyDocument" - case privateDnsEnabled = "privateDnsEnabled" - case requesterManaged = "requesterManaged" - case routeTableIds = "routeTableIdSet" - case serviceName = "serviceName" - case state = "state" - case subnetIds = "subnetIdSet" - case tags = "tagSet" - case vpcEndpointId = "vpcEndpointId" - case vpcEndpointType = "vpcEndpointType" - case vpcId = "vpcId" - } +extension EC2ClientTypes.VpcEndpoint: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -186298,148 +135083,31 @@ extension EC2ClientTypes.VpcEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointId) - vpcEndpointId = vpcEndpointIdDecoded - let vpcEndpointTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcEndpointType.self, forKey: .vpcEndpointType) - vpcEndpointType = vpcEndpointTypeDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.State.self, forKey: .state) - state = stateDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - if containerValues.contains(.routeTableIds) { - struct KeyVal0{struct item{}} - let routeTableIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routeTableIds) - if let routeTableIdsWrappedContainer = routeTableIdsWrappedContainer { - let routeTableIdsContainer = try routeTableIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var routeTableIdsBuffer:[Swift.String]? = nil - if let routeTableIdsContainer = routeTableIdsContainer { - routeTableIdsBuffer = [Swift.String]() - for stringContainer0 in routeTableIdsContainer { - routeTableIdsBuffer?.append(stringContainer0) - } - } - routeTableIds = routeTableIdsBuffer - } else { - routeTableIds = [] - } - } else { - routeTableIds = nil - } - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct item{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - if containerValues.contains(.groups) { - struct KeyVal0{struct item{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([EC2ClientTypes.SecurityGroupIdentifier].self, forKey: .member) - var groupsBuffer:[EC2ClientTypes.SecurityGroupIdentifier]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [EC2ClientTypes.SecurityGroupIdentifier]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] - } - } else { - groups = nil - } - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let dnsOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.DnsOptions.self, forKey: .dnsOptions) - dnsOptions = dnsOptionsDecoded - let privateDnsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .privateDnsEnabled) - privateDnsEnabled = privateDnsEnabledDecoded - let requesterManagedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requesterManaged) - requesterManaged = requesterManagedDecoded - if containerValues.contains(.networkInterfaceIds) { - struct KeyVal0{struct item{}} - let networkInterfaceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaceIds) - if let networkInterfaceIdsWrappedContainer = networkInterfaceIdsWrappedContainer { - let networkInterfaceIdsContainer = try networkInterfaceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkInterfaceIdsBuffer:[Swift.String]? = nil - if let networkInterfaceIdsContainer = networkInterfaceIdsContainer { - networkInterfaceIdsBuffer = [Swift.String]() - for stringContainer0 in networkInterfaceIdsContainer { - networkInterfaceIdsBuffer?.append(stringContainer0) - } - } - networkInterfaceIds = networkInterfaceIdsBuffer - } else { - networkInterfaceIds = [] - } - } else { - networkInterfaceIds = nil - } - if containerValues.contains(.dnsEntries) { - struct KeyVal0{struct item{}} - let dnsEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dnsEntries) - if let dnsEntriesWrappedContainer = dnsEntriesWrappedContainer { - let dnsEntriesContainer = try dnsEntriesWrappedContainer.decodeIfPresent([EC2ClientTypes.DnsEntry].self, forKey: .member) - var dnsEntriesBuffer:[EC2ClientTypes.DnsEntry]? = nil - if let dnsEntriesContainer = dnsEntriesContainer { - dnsEntriesBuffer = [EC2ClientTypes.DnsEntry]() - for structureContainer0 in dnsEntriesContainer { - dnsEntriesBuffer?.append(structureContainer0) - } - } - dnsEntries = dnsEntriesBuffer - } else { - dnsEntries = [] - } - } else { - dnsEntries = nil - } - let creationTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTimestamp) - creationTimestamp = creationTimestampDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let lastErrorDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.LastError.self, forKey: .lastError) - lastError = lastErrorDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcEndpoint() + value.vpcEndpointId = try reader["vpcEndpointId"].readIfPresent() + value.vpcEndpointType = try reader["vpcEndpointType"].readIfPresent() + value.vpcId = try reader["vpcId"].readIfPresent() + value.serviceName = try reader["serviceName"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.policyDocument = try reader["policyDocument"].readIfPresent() + value.routeTableIds = try reader["routeTableIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.subnetIds = try reader["subnetIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.groups = try reader["groupSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.SecurityGroupIdentifier.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipAddressType = try reader["ipAddressType"].readIfPresent() + value.dnsOptions = try reader["dnsOptions"].readIfPresent(readingClosure: EC2ClientTypes.DnsOptions.readingClosure) + value.privateDnsEnabled = try reader["privateDnsEnabled"].readIfPresent() + value.requesterManaged = try reader["requesterManaged"].readIfPresent() + value.networkInterfaceIds = try reader["networkInterfaceIdSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.dnsEntries = try reader["dnsEntrySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DnsEntry.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.creationTimestamp = try reader["creationTimestamp"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ownerId = try reader["ownerId"].readIfPresent() + value.lastError = try reader["lastError"].readIfPresent(readingClosure: EC2ClientTypes.LastError.readingClosure) + return value + } } } @@ -186531,20 +135199,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpcEndpointConnection: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTimestamp = "creationTimestamp" - case dnsEntries = "dnsEntrySet" - case gatewayLoadBalancerArns = "gatewayLoadBalancerArnSet" - case ipAddressType = "ipAddressType" - case networkLoadBalancerArns = "networkLoadBalancerArnSet" - case serviceId = "serviceId" - case tags = "tagSet" - case vpcEndpointConnectionId = "vpcEndpointConnectionId" - case vpcEndpointId = "vpcEndpointId" - case vpcEndpointOwner = "vpcEndpointOwner" - case vpcEndpointState = "vpcEndpointState" - } +extension EC2ClientTypes.VpcEndpointConnection: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -186619,97 +135274,22 @@ extension EC2ClientTypes.VpcEndpointConnection: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceId) - serviceId = serviceIdDecoded - let vpcEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointId) - vpcEndpointId = vpcEndpointIdDecoded - let vpcEndpointOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointOwner) - vpcEndpointOwner = vpcEndpointOwnerDecoded - let vpcEndpointStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.State.self, forKey: .vpcEndpointState) - vpcEndpointState = vpcEndpointStateDecoded - let creationTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTimestamp) - creationTimestamp = creationTimestampDecoded - if containerValues.contains(.dnsEntries) { - struct KeyVal0{struct item{}} - let dnsEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dnsEntries) - if let dnsEntriesWrappedContainer = dnsEntriesWrappedContainer { - let dnsEntriesContainer = try dnsEntriesWrappedContainer.decodeIfPresent([EC2ClientTypes.DnsEntry].self, forKey: .member) - var dnsEntriesBuffer:[EC2ClientTypes.DnsEntry]? = nil - if let dnsEntriesContainer = dnsEntriesContainer { - dnsEntriesBuffer = [EC2ClientTypes.DnsEntry]() - for structureContainer0 in dnsEntriesContainer { - dnsEntriesBuffer?.append(structureContainer0) - } - } - dnsEntries = dnsEntriesBuffer - } else { - dnsEntries = [] - } - } else { - dnsEntries = nil - } - if containerValues.contains(.networkLoadBalancerArns) { - struct KeyVal0{struct item{}} - let networkLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkLoadBalancerArns) - if let networkLoadBalancerArnsWrappedContainer = networkLoadBalancerArnsWrappedContainer { - let networkLoadBalancerArnsContainer = try networkLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var networkLoadBalancerArnsBuffer:[Swift.String]? = nil - if let networkLoadBalancerArnsContainer = networkLoadBalancerArnsContainer { - networkLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in networkLoadBalancerArnsContainer { - networkLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - networkLoadBalancerArns = networkLoadBalancerArnsBuffer - } else { - networkLoadBalancerArns = [] - } - } else { - networkLoadBalancerArns = nil - } - if containerValues.contains(.gatewayLoadBalancerArns) { - struct KeyVal0{struct item{}} - let gatewayLoadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .gatewayLoadBalancerArns) - if let gatewayLoadBalancerArnsWrappedContainer = gatewayLoadBalancerArnsWrappedContainer { - let gatewayLoadBalancerArnsContainer = try gatewayLoadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var gatewayLoadBalancerArnsBuffer:[Swift.String]? = nil - if let gatewayLoadBalancerArnsContainer = gatewayLoadBalancerArnsContainer { - gatewayLoadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in gatewayLoadBalancerArnsContainer { - gatewayLoadBalancerArnsBuffer?.append(stringContainer0) - } - } - gatewayLoadBalancerArns = gatewayLoadBalancerArnsBuffer - } else { - gatewayLoadBalancerArns = [] - } - } else { - gatewayLoadBalancerArns = nil - } - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let vpcEndpointConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointConnectionId) - vpcEndpointConnectionId = vpcEndpointConnectionIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcEndpointConnection() + value.serviceId = try reader["serviceId"].readIfPresent() + value.vpcEndpointId = try reader["vpcEndpointId"].readIfPresent() + value.vpcEndpointOwner = try reader["vpcEndpointOwner"].readIfPresent() + value.vpcEndpointState = try reader["vpcEndpointState"].readIfPresent() + value.creationTimestamp = try reader["creationTimestamp"].readTimestampIfPresent(format: .dateTime) + value.dnsEntries = try reader["dnsEntrySet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.DnsEntry.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.networkLoadBalancerArns = try reader["networkLoadBalancerArnSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.gatewayLoadBalancerArns = try reader["gatewayLoadBalancerArnSet"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ipAddressType = try reader["ipAddressType"].readIfPresent() + value.vpcEndpointConnectionId = try reader["vpcEndpointConnectionId"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -186805,14 +135385,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VpcIpv6CidrBlockAssociation: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associationId = "associationId" - case ipv6CidrBlock = "ipv6CidrBlock" - case ipv6CidrBlockState = "ipv6CidrBlockState" - case ipv6Pool = "ipv6Pool" - case networkBorderGroup = "networkBorderGroup" - } +extension EC2ClientTypes.VpcIpv6CidrBlockAssociation: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -186833,18 +135406,17 @@ extension EC2ClientTypes.VpcIpv6CidrBlockAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let associationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .associationId) - associationId = associationIdDecoded - let ipv6CidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6CidrBlock) - ipv6CidrBlock = ipv6CidrBlockDecoded - let ipv6CidrBlockStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcCidrBlockState.self, forKey: .ipv6CidrBlockState) - ipv6CidrBlockState = ipv6CidrBlockStateDecoded - let networkBorderGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkBorderGroup) - networkBorderGroup = networkBorderGroupDecoded - let ipv6PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Pool) - ipv6Pool = ipv6PoolDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcIpv6CidrBlockAssociation() + value.associationId = try reader["associationId"].readIfPresent() + value.ipv6CidrBlock = try reader["ipv6CidrBlock"].readIfPresent() + value.ipv6CidrBlockState = try reader["ipv6CidrBlockState"].readIfPresent(readingClosure: EC2ClientTypes.VpcCidrBlockState.readingClosure) + value.networkBorderGroup = try reader["networkBorderGroup"].readIfPresent() + value.ipv6Pool = try reader["ipv6Pool"].readIfPresent() + return value + } } } @@ -186880,15 +135452,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpcPeeringConnection: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accepterVpcInfo = "accepterVpcInfo" - case expirationTime = "expirationTime" - case requesterVpcInfo = "requesterVpcInfo" - case status = "status" - case tags = "tagSet" - case vpcPeeringConnectionId = "vpcPeeringConnectionId" - } +extension EC2ClientTypes.VpcPeeringConnection: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -186921,37 +135485,18 @@ extension EC2ClientTypes.VpcPeeringConnection: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accepterVpcInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcPeeringConnectionVpcInfo.self, forKey: .accepterVpcInfo) - accepterVpcInfo = accepterVpcInfoDecoded - let expirationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expirationTime) - expirationTime = expirationTimeDecoded - let requesterVpcInfoDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcPeeringConnectionVpcInfo.self, forKey: .requesterVpcInfo) - requesterVpcInfo = requesterVpcInfoDecoded - let statusDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcPeeringConnectionStateReason.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcPeeringConnection() + value.accepterVpcInfo = try reader["accepterVpcInfo"].readIfPresent(readingClosure: EC2ClientTypes.VpcPeeringConnectionVpcInfo.readingClosure) + value.expirationTime = try reader["expirationTime"].readTimestampIfPresent(format: .dateTime) + value.requesterVpcInfo = try reader["requesterVpcInfo"].readIfPresent(readingClosure: EC2ClientTypes.VpcPeeringConnectionVpcInfo.readingClosure) + value.status = try reader["status"].readIfPresent(readingClosure: EC2ClientTypes.VpcPeeringConnectionStateReason.readingClosure) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpcPeeringConnectionId = try reader["vpcPeeringConnectionId"].readIfPresent() + return value } - let vpcPeeringConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcPeeringConnectionId) - vpcPeeringConnectionId = vpcPeeringConnectionIdDecoded } } @@ -186991,12 +135536,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpcPeeringConnectionOptionsDescription: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowDnsResolutionFromRemoteVpc = "allowDnsResolutionFromRemoteVpc" - case allowEgressFromLocalClassicLinkToRemoteVpc = "allowEgressFromLocalClassicLinkToRemoteVpc" - case allowEgressFromLocalVpcToRemoteClassicLink = "allowEgressFromLocalVpcToRemoteClassicLink" - } +extension EC2ClientTypes.VpcPeeringConnectionOptionsDescription: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -187011,14 +135551,15 @@ extension EC2ClientTypes.VpcPeeringConnectionOptionsDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allowDnsResolutionFromRemoteVpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowDnsResolutionFromRemoteVpc) - allowDnsResolutionFromRemoteVpc = allowDnsResolutionFromRemoteVpcDecoded - let allowEgressFromLocalClassicLinkToRemoteVpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowEgressFromLocalClassicLinkToRemoteVpc) - allowEgressFromLocalClassicLinkToRemoteVpc = allowEgressFromLocalClassicLinkToRemoteVpcDecoded - let allowEgressFromLocalVpcToRemoteClassicLinkDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowEgressFromLocalVpcToRemoteClassicLink) - allowEgressFromLocalVpcToRemoteClassicLink = allowEgressFromLocalVpcToRemoteClassicLinkDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcPeeringConnectionOptionsDescription() + value.allowDnsResolutionFromRemoteVpc = try reader["allowDnsResolutionFromRemoteVpc"].readIfPresent() + value.allowEgressFromLocalClassicLinkToRemoteVpc = try reader["allowEgressFromLocalClassicLinkToRemoteVpc"].readIfPresent() + value.allowEgressFromLocalVpcToRemoteClassicLink = try reader["allowEgressFromLocalVpcToRemoteClassicLink"].readIfPresent() + return value + } } } @@ -187046,11 +135587,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpcPeeringConnectionStateReason: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "code" - case message = "message" - } +extension EC2ClientTypes.VpcPeeringConnectionStateReason: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -187062,12 +135599,14 @@ extension EC2ClientTypes.VpcPeeringConnectionStateReason: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcPeeringConnectionStateReasonCode.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcPeeringConnectionStateReason() + value.code = try reader["code"].readIfPresent() + value.message = try reader["message"].readIfPresent() + return value + } } } @@ -187144,16 +135683,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VpcPeeringConnectionVpcInfo: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlock = "cidrBlock" - case cidrBlockSet = "cidrBlockSet" - case ipv6CidrBlockSet = "ipv6CidrBlockSet" - case ownerId = "ownerId" - case peeringOptions = "peeringOptions" - case region = "region" - case vpcId = "vpcId" - } +extension EC2ClientTypes.VpcPeeringConnectionVpcInfo: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -187198,56 +135728,19 @@ extension EC2ClientTypes.VpcPeeringConnectionVpcInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - if containerValues.contains(.ipv6CidrBlockSet) { - struct KeyVal0{struct item{}} - let ipv6CidrBlockSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipv6CidrBlockSet) - if let ipv6CidrBlockSetWrappedContainer = ipv6CidrBlockSetWrappedContainer { - let ipv6CidrBlockSetContainer = try ipv6CidrBlockSetWrappedContainer.decodeIfPresent([EC2ClientTypes.Ipv6CidrBlock].self, forKey: .member) - var ipv6CidrBlockSetBuffer:[EC2ClientTypes.Ipv6CidrBlock]? = nil - if let ipv6CidrBlockSetContainer = ipv6CidrBlockSetContainer { - ipv6CidrBlockSetBuffer = [EC2ClientTypes.Ipv6CidrBlock]() - for structureContainer0 in ipv6CidrBlockSetContainer { - ipv6CidrBlockSetBuffer?.append(structureContainer0) - } - } - ipv6CidrBlockSet = ipv6CidrBlockSetBuffer - } else { - ipv6CidrBlockSet = [] - } - } else { - ipv6CidrBlockSet = nil - } - if containerValues.contains(.cidrBlockSet) { - struct KeyVal0{struct item{}} - let cidrBlockSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cidrBlockSet) - if let cidrBlockSetWrappedContainer = cidrBlockSetWrappedContainer { - let cidrBlockSetContainer = try cidrBlockSetWrappedContainer.decodeIfPresent([EC2ClientTypes.CidrBlock].self, forKey: .member) - var cidrBlockSetBuffer:[EC2ClientTypes.CidrBlock]? = nil - if let cidrBlockSetContainer = cidrBlockSetContainer { - cidrBlockSetBuffer = [EC2ClientTypes.CidrBlock]() - for structureContainer0 in cidrBlockSetContainer { - cidrBlockSetBuffer?.append(structureContainer0) - } - } - cidrBlockSet = cidrBlockSetBuffer - } else { - cidrBlockSet = [] - } - } else { - cidrBlockSet = nil - } - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let peeringOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpcPeeringConnectionOptionsDescription.self, forKey: .peeringOptions) - peeringOptions = peeringOptionsDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpcPeeringConnectionVpcInfo() + value.cidrBlock = try reader["cidrBlock"].readIfPresent() + value.ipv6CidrBlockSet = try reader["ipv6CidrBlockSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Ipv6CidrBlock.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.cidrBlockSet = try reader["cidrBlockSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.CidrBlock.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ownerId = try reader["ownerId"].readIfPresent() + value.peeringOptions = try reader["peeringOptions"].readIfPresent(readingClosure: EC2ClientTypes.VpcPeeringConnectionOptionsDescription.readingClosure) + value.vpcId = try reader["vpcId"].readIfPresent() + value.region = try reader["region"].readIfPresent() + return value + } } } @@ -187352,24 +135845,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VpnConnection: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case category = "category" - case coreNetworkArn = "coreNetworkArn" - case coreNetworkAttachmentArn = "coreNetworkAttachmentArn" - case customerGatewayConfiguration = "customerGatewayConfiguration" - case customerGatewayId = "customerGatewayId" - case gatewayAssociationState = "gatewayAssociationState" - case options = "options" - case routes = "routes" - case state = "state" - case tags = "tagSet" - case transitGatewayId = "transitGatewayId" - case type = "type" - case vgwTelemetry = "vgwTelemetry" - case vpnConnectionId = "vpnConnectionId" - case vpnGatewayId = "vpnGatewayId" - } +extension EC2ClientTypes.VpnConnection: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -187447,88 +135923,26 @@ extension EC2ClientTypes.VpnConnection: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerGatewayConfigurationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerGatewayConfiguration) - customerGatewayConfiguration = customerGatewayConfigurationDecoded - let customerGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerGatewayId) - customerGatewayId = customerGatewayIdDecoded - let categoryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .category) - category = categoryDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnState.self, forKey: .state) - state = stateDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.GatewayType.self, forKey: .type) - type = typeDecoded - let vpnConnectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionId) - vpnConnectionId = vpnConnectionIdDecoded - let vpnGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnGatewayId) - vpnGatewayId = vpnGatewayIdDecoded - let transitGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayId) - transitGatewayId = transitGatewayIdDecoded - let coreNetworkArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coreNetworkArn) - coreNetworkArn = coreNetworkArnDecoded - let coreNetworkAttachmentArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .coreNetworkAttachmentArn) - coreNetworkAttachmentArn = coreNetworkAttachmentArnDecoded - let gatewayAssociationStateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.GatewayAssociationState.self, forKey: .gatewayAssociationState) - gatewayAssociationState = gatewayAssociationStateDecoded - let optionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnConnectionOptions.self, forKey: .options) - options = optionsDecoded - if containerValues.contains(.routes) { - struct KeyVal0{struct item{}} - let routesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routes) - if let routesWrappedContainer = routesWrappedContainer { - let routesContainer = try routesWrappedContainer.decodeIfPresent([EC2ClientTypes.VpnStaticRoute].self, forKey: .member) - var routesBuffer:[EC2ClientTypes.VpnStaticRoute]? = nil - if let routesContainer = routesContainer { - routesBuffer = [EC2ClientTypes.VpnStaticRoute]() - for structureContainer0 in routesContainer { - routesBuffer?.append(structureContainer0) - } - } - routes = routesBuffer - } else { - routes = [] - } - } else { - routes = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.vgwTelemetry) { - struct KeyVal0{struct item{}} - let vgwTelemetryWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vgwTelemetry) - if let vgwTelemetryWrappedContainer = vgwTelemetryWrappedContainer { - let vgwTelemetryContainer = try vgwTelemetryWrappedContainer.decodeIfPresent([EC2ClientTypes.VgwTelemetry].self, forKey: .member) - var vgwTelemetryBuffer:[EC2ClientTypes.VgwTelemetry]? = nil - if let vgwTelemetryContainer = vgwTelemetryContainer { - vgwTelemetryBuffer = [EC2ClientTypes.VgwTelemetry]() - for structureContainer0 in vgwTelemetryContainer { - vgwTelemetryBuffer?.append(structureContainer0) - } - } - vgwTelemetry = vgwTelemetryBuffer - } else { - vgwTelemetry = [] - } - } else { - vgwTelemetry = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnConnection() + value.customerGatewayConfiguration = try reader["customerGatewayConfiguration"].readIfPresent() + value.customerGatewayId = try reader["customerGatewayId"].readIfPresent() + value.category = try reader["category"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.vpnConnectionId = try reader["vpnConnectionId"].readIfPresent() + value.vpnGatewayId = try reader["vpnGatewayId"].readIfPresent() + value.transitGatewayId = try reader["transitGatewayId"].readIfPresent() + value.coreNetworkArn = try reader["coreNetworkArn"].readIfPresent() + value.coreNetworkAttachmentArn = try reader["coreNetworkAttachmentArn"].readIfPresent() + value.gatewayAssociationState = try reader["gatewayAssociationState"].readIfPresent() + value.options = try reader["options"].readIfPresent(readingClosure: EC2ClientTypes.VpnConnectionOptions.readingClosure) + value.routes = try reader["routes"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpnStaticRoute.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vgwTelemetry = try reader["vgwTelemetry"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VgwTelemetry.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -187610,13 +136024,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpnConnectionDeviceType: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case platform = "platform" - case software = "software" - case vendor = "vendor" - case vpnConnectionDeviceTypeId = "vpnConnectionDeviceTypeId" - } +extension EC2ClientTypes.VpnConnectionDeviceType: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -187634,16 +136042,16 @@ extension EC2ClientTypes.VpnConnectionDeviceType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpnConnectionDeviceTypeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnConnectionDeviceTypeId) - vpnConnectionDeviceTypeId = vpnConnectionDeviceTypeIdDecoded - let vendorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vendor) - vendor = vendorDecoded - let platformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platform) - platform = platformDecoded - let softwareDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .software) - software = softwareDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnConnectionDeviceType() + value.vpnConnectionDeviceTypeId = try reader["vpnConnectionDeviceTypeId"].readIfPresent() + value.vendor = try reader["vendor"].readIfPresent() + value.platform = try reader["platform"].readIfPresent() + value.software = try reader["software"].readIfPresent() + return value + } } } @@ -187675,19 +136083,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpnConnectionOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableAcceleration = "enableAcceleration" - case localIpv4NetworkCidr = "localIpv4NetworkCidr" - case localIpv6NetworkCidr = "localIpv6NetworkCidr" - case outsideIpAddressType = "outsideIpAddressType" - case remoteIpv4NetworkCidr = "remoteIpv4NetworkCidr" - case remoteIpv6NetworkCidr = "remoteIpv6NetworkCidr" - case staticRoutesOnly = "staticRoutesOnly" - case transportTransitGatewayAttachmentId = "transportTransitGatewayAttachmentId" - case tunnelInsideIpVersion = "tunnelInsideIpVersion" - case tunnelOptions = "tunnelOptionSet" - } +extension EC2ClientTypes.VpnConnectionOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -187732,44 +136128,21 @@ extension EC2ClientTypes.VpnConnectionOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enableAccelerationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableAcceleration) - enableAcceleration = enableAccelerationDecoded - let staticRoutesOnlyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .staticRoutesOnly) - staticRoutesOnly = staticRoutesOnlyDecoded - let localIpv4NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localIpv4NetworkCidr) - localIpv4NetworkCidr = localIpv4NetworkCidrDecoded - let remoteIpv4NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remoteIpv4NetworkCidr) - remoteIpv4NetworkCidr = remoteIpv4NetworkCidrDecoded - let localIpv6NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localIpv6NetworkCidr) - localIpv6NetworkCidr = localIpv6NetworkCidrDecoded - let remoteIpv6NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remoteIpv6NetworkCidr) - remoteIpv6NetworkCidr = remoteIpv6NetworkCidrDecoded - let outsideIpAddressTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outsideIpAddressType) - outsideIpAddressType = outsideIpAddressTypeDecoded - let transportTransitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transportTransitGatewayAttachmentId) - transportTransitGatewayAttachmentId = transportTransitGatewayAttachmentIdDecoded - let tunnelInsideIpVersionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TunnelInsideIpVersion.self, forKey: .tunnelInsideIpVersion) - tunnelInsideIpVersion = tunnelInsideIpVersionDecoded - if containerValues.contains(.tunnelOptions) { - struct KeyVal0{struct item{}} - let tunnelOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tunnelOptions) - if let tunnelOptionsWrappedContainer = tunnelOptionsWrappedContainer { - let tunnelOptionsContainer = try tunnelOptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.TunnelOption].self, forKey: .member) - var tunnelOptionsBuffer:[EC2ClientTypes.TunnelOption]? = nil - if let tunnelOptionsContainer = tunnelOptionsContainer { - tunnelOptionsBuffer = [EC2ClientTypes.TunnelOption]() - for structureContainer0 in tunnelOptionsContainer { - tunnelOptionsBuffer?.append(structureContainer0) - } - } - tunnelOptions = tunnelOptionsBuffer - } else { - tunnelOptions = [] - } - } else { - tunnelOptions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnConnectionOptions() + value.enableAcceleration = try reader["enableAcceleration"].readIfPresent() + value.staticRoutesOnly = try reader["staticRoutesOnly"].readIfPresent() + value.localIpv4NetworkCidr = try reader["localIpv4NetworkCidr"].readIfPresent() + value.remoteIpv4NetworkCidr = try reader["remoteIpv4NetworkCidr"].readIfPresent() + value.localIpv6NetworkCidr = try reader["localIpv6NetworkCidr"].readIfPresent() + value.remoteIpv6NetworkCidr = try reader["remoteIpv6NetworkCidr"].readIfPresent() + value.outsideIpAddressType = try reader["outsideIpAddressType"].readIfPresent() + value.transportTransitGatewayAttachmentId = try reader["transportTransitGatewayAttachmentId"].readIfPresent() + value.tunnelInsideIpVersion = try reader["tunnelInsideIpVersion"].readIfPresent() + value.tunnelOptions = try reader["tunnelOptionSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.TunnelOption.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -187826,19 +136199,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpnConnectionOptionsSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableAcceleration = "EnableAcceleration" - case localIpv4NetworkCidr = "LocalIpv4NetworkCidr" - case localIpv6NetworkCidr = "LocalIpv6NetworkCidr" - case outsideIpAddressType = "OutsideIpAddressType" - case remoteIpv4NetworkCidr = "RemoteIpv4NetworkCidr" - case remoteIpv6NetworkCidr = "RemoteIpv6NetworkCidr" - case staticRoutesOnly = "staticRoutesOnly" - case transportTransitGatewayAttachmentId = "TransportTransitGatewayAttachmentId" - case tunnelInsideIpVersion = "TunnelInsideIpVersion" - case tunnelOptions = "TunnelOptions" - } +extension EC2ClientTypes.VpnConnectionOptionsSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -187883,45 +136244,22 @@ extension EC2ClientTypes.VpnConnectionOptionsSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enableAccelerationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableAcceleration) - enableAcceleration = enableAccelerationDecoded - let staticRoutesOnlyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .staticRoutesOnly) - staticRoutesOnly = staticRoutesOnlyDecoded - let tunnelInsideIpVersionDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.TunnelInsideIpVersion.self, forKey: .tunnelInsideIpVersion) - tunnelInsideIpVersion = tunnelInsideIpVersionDecoded - if containerValues.contains(.tunnelOptions) { - struct KeyVal0{struct member{}} - let tunnelOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tunnelOptions) - if let tunnelOptionsWrappedContainer = tunnelOptionsWrappedContainer { - let tunnelOptionsContainer = try tunnelOptionsWrappedContainer.decodeIfPresent([EC2ClientTypes.VpnTunnelOptionsSpecification].self, forKey: .member) - var tunnelOptionsBuffer:[EC2ClientTypes.VpnTunnelOptionsSpecification]? = nil - if let tunnelOptionsContainer = tunnelOptionsContainer { - tunnelOptionsBuffer = [EC2ClientTypes.VpnTunnelOptionsSpecification]() - for structureContainer0 in tunnelOptionsContainer { - tunnelOptionsBuffer?.append(structureContainer0) - } - } - tunnelOptions = tunnelOptionsBuffer - } else { - tunnelOptions = [] - } - } else { - tunnelOptions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnConnectionOptionsSpecification() + value.enableAcceleration = try reader["EnableAcceleration"].readIfPresent() + value.staticRoutesOnly = try reader["staticRoutesOnly"].readIfPresent() + value.tunnelInsideIpVersion = try reader["TunnelInsideIpVersion"].readIfPresent() + value.tunnelOptions = try reader["TunnelOptions"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpnTunnelOptionsSpecification.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.localIpv4NetworkCidr = try reader["LocalIpv4NetworkCidr"].readIfPresent() + value.remoteIpv4NetworkCidr = try reader["RemoteIpv4NetworkCidr"].readIfPresent() + value.localIpv6NetworkCidr = try reader["LocalIpv6NetworkCidr"].readIfPresent() + value.remoteIpv6NetworkCidr = try reader["RemoteIpv6NetworkCidr"].readIfPresent() + value.outsideIpAddressType = try reader["OutsideIpAddressType"].readIfPresent() + value.transportTransitGatewayAttachmentId = try reader["TransportTransitGatewayAttachmentId"].readIfPresent() + return value } - let localIpv4NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localIpv4NetworkCidr) - localIpv4NetworkCidr = localIpv4NetworkCidrDecoded - let remoteIpv4NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remoteIpv4NetworkCidr) - remoteIpv4NetworkCidr = remoteIpv4NetworkCidrDecoded - let localIpv6NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localIpv6NetworkCidr) - localIpv6NetworkCidr = localIpv6NetworkCidrDecoded - let remoteIpv6NetworkCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remoteIpv6NetworkCidr) - remoteIpv6NetworkCidr = remoteIpv6NetworkCidrDecoded - let outsideIpAddressTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outsideIpAddressType) - outsideIpAddressType = outsideIpAddressTypeDecoded - let transportTransitGatewayAttachmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transportTransitGatewayAttachmentId) - transportTransitGatewayAttachmentId = transportTransitGatewayAttachmentIdDecoded } } @@ -188009,16 +136347,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VpnGateway: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amazonSideAsn = "amazonSideAsn" - case availabilityZone = "availabilityZone" - case state = "state" - case tags = "tagSet" - case type = "type" - case vpcAttachments = "attachments" - case vpnGatewayId = "vpnGatewayId" - } +extension EC2ClientTypes.VpnGateway: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -188063,55 +136392,18 @@ extension EC2ClientTypes.VpnGateway: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnState.self, forKey: .state) - state = stateDecoded - let typeDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.GatewayType.self, forKey: .type) - type = typeDecoded - if containerValues.contains(.vpcAttachments) { - struct KeyVal0{struct item{}} - let vpcAttachmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcAttachments) - if let vpcAttachmentsWrappedContainer = vpcAttachmentsWrappedContainer { - let vpcAttachmentsContainer = try vpcAttachmentsWrappedContainer.decodeIfPresent([EC2ClientTypes.VpcAttachment].self, forKey: .member) - var vpcAttachmentsBuffer:[EC2ClientTypes.VpcAttachment]? = nil - if let vpcAttachmentsContainer = vpcAttachmentsContainer { - vpcAttachmentsBuffer = [EC2ClientTypes.VpcAttachment]() - for structureContainer0 in vpcAttachmentsContainer { - vpcAttachmentsBuffer?.append(structureContainer0) - } - } - vpcAttachments = vpcAttachmentsBuffer - } else { - vpcAttachments = [] - } - } else { - vpcAttachments = nil - } - let vpnGatewayIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpnGatewayId) - vpnGatewayId = vpnGatewayIdDecoded - let amazonSideAsnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amazonSideAsn) - amazonSideAsn = amazonSideAsnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct item{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([EC2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[EC2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [EC2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnGateway() + value.availabilityZone = try reader["availabilityZone"].readIfPresent() + value.state = try reader["state"].readIfPresent() + value.type = try reader["type"].readIfPresent() + value.vpcAttachments = try reader["attachments"].readListIfPresent(memberReadingClosure: EC2ClientTypes.VpcAttachment.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.vpnGatewayId = try reader["vpnGatewayId"].readIfPresent() + value.amazonSideAsn = try reader["amazonSideAsn"].readIfPresent() + value.tags = try reader["tagSet"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Tag.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -188223,12 +136515,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VpnStaticRoute: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationCidrBlock = "destinationCidrBlock" - case source = "source" - case state = "state" - } +extension EC2ClientTypes.VpnStaticRoute: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -188243,14 +136530,15 @@ extension EC2ClientTypes.VpnStaticRoute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationCidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationCidrBlock) - destinationCidrBlock = destinationCidrBlockDecoded - let sourceDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnStaticRouteSource.self, forKey: .source) - source = sourceDecoded - let stateDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnState.self, forKey: .state) - state = stateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnStaticRoute() + value.destinationCidrBlock = try reader["destinationCidrBlock"].readIfPresent() + value.source = try reader["source"].readIfPresent() + value.state = try reader["state"].readIfPresent() + return value + } } } @@ -188307,10 +136595,7 @@ extension EC2ClientTypes { } } -extension EC2ClientTypes.VpnTunnelLogOptions: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudWatchLogOptions = "cloudWatchLogOptions" - } +extension EC2ClientTypes.VpnTunnelLogOptions: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -188319,10 +136604,13 @@ extension EC2ClientTypes.VpnTunnelLogOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudWatchLogOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CloudWatchLogOptions.self, forKey: .cloudWatchLogOptions) - cloudWatchLogOptions = cloudWatchLogOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnTunnelLogOptions() + value.cloudWatchLogOptions = try reader["cloudWatchLogOptions"].readIfPresent(readingClosure: EC2ClientTypes.CloudWatchLogOptions.readingClosure) + return value + } } } @@ -188342,10 +136630,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpnTunnelLogOptionsSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudWatchLogOptions = "CloudWatchLogOptions" - } +extension EC2ClientTypes.VpnTunnelLogOptionsSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -188354,10 +136639,13 @@ extension EC2ClientTypes.VpnTunnelLogOptionsSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudWatchLogOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.CloudWatchLogOptionsSpecification.self, forKey: .cloudWatchLogOptions) - cloudWatchLogOptions = cloudWatchLogOptionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnTunnelLogOptionsSpecification() + value.cloudWatchLogOptions = try reader["CloudWatchLogOptions"].readIfPresent(readingClosure: EC2ClientTypes.CloudWatchLogOptionsSpecification.readingClosure) + return value + } } } @@ -188377,29 +136665,7 @@ extension EC2ClientTypes { } -extension EC2ClientTypes.VpnTunnelOptionsSpecification: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dpdTimeoutAction = "DPDTimeoutAction" - case dpdTimeoutSeconds = "DPDTimeoutSeconds" - case enableTunnelLifecycleControl = "EnableTunnelLifecycleControl" - case ikeVersions = "IKEVersion" - case logOptions = "LogOptions" - case phase1DHGroupNumbers = "Phase1DHGroupNumber" - case phase1EncryptionAlgorithms = "Phase1EncryptionAlgorithm" - case phase1IntegrityAlgorithms = "Phase1IntegrityAlgorithm" - case phase1LifetimeSeconds = "Phase1LifetimeSeconds" - case phase2DHGroupNumbers = "Phase2DHGroupNumber" - case phase2EncryptionAlgorithms = "Phase2EncryptionAlgorithm" - case phase2IntegrityAlgorithms = "Phase2IntegrityAlgorithm" - case phase2LifetimeSeconds = "Phase2LifetimeSeconds" - case preSharedKey = "PreSharedKey" - case rekeyFuzzPercentage = "RekeyFuzzPercentage" - case rekeyMarginTimeSeconds = "RekeyMarginTimeSeconds" - case replayWindowSize = "ReplayWindowSize" - case startupAction = "StartupAction" - case tunnelInsideCidr = "TunnelInsideCidr" - case tunnelInsideIpv6Cidr = "TunnelInsideIpv6Cidr" - } +extension EC2ClientTypes.VpnTunnelOptionsSpecification: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) @@ -188528,167 +136794,32 @@ extension EC2ClientTypes.VpnTunnelOptionsSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tunnelInsideCidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tunnelInsideCidr) - tunnelInsideCidr = tunnelInsideCidrDecoded - let tunnelInsideIpv6CidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tunnelInsideIpv6Cidr) - tunnelInsideIpv6Cidr = tunnelInsideIpv6CidrDecoded - let preSharedKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSharedKey) - preSharedKey = preSharedKeyDecoded - let phase1LifetimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .phase1LifetimeSeconds) - phase1LifetimeSeconds = phase1LifetimeSecondsDecoded - let phase2LifetimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .phase2LifetimeSeconds) - phase2LifetimeSeconds = phase2LifetimeSecondsDecoded - let rekeyMarginTimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .rekeyMarginTimeSeconds) - rekeyMarginTimeSeconds = rekeyMarginTimeSecondsDecoded - let rekeyFuzzPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .rekeyFuzzPercentage) - rekeyFuzzPercentage = rekeyFuzzPercentageDecoded - let replayWindowSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .replayWindowSize) - replayWindowSize = replayWindowSizeDecoded - let dpdTimeoutSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dpdTimeoutSeconds) - dpdTimeoutSeconds = dpdTimeoutSecondsDecoded - let dpdTimeoutActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dpdTimeoutAction) - dpdTimeoutAction = dpdTimeoutActionDecoded - if containerValues.contains(.phase1EncryptionAlgorithms) { - struct KeyVal0{struct item{}} - let phase1EncryptionAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1EncryptionAlgorithms) - if let phase1EncryptionAlgorithmsWrappedContainer = phase1EncryptionAlgorithmsWrappedContainer { - let phase1EncryptionAlgorithmsContainer = try phase1EncryptionAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue].self, forKey: .member) - var phase1EncryptionAlgorithmsBuffer:[EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue]? = nil - if let phase1EncryptionAlgorithmsContainer = phase1EncryptionAlgorithmsContainer { - phase1EncryptionAlgorithmsBuffer = [EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue]() - for structureContainer0 in phase1EncryptionAlgorithmsContainer { - phase1EncryptionAlgorithmsBuffer?.append(structureContainer0) - } - } - phase1EncryptionAlgorithms = phase1EncryptionAlgorithmsBuffer - } else { - phase1EncryptionAlgorithms = [] - } - } else { - phase1EncryptionAlgorithms = nil - } - if containerValues.contains(.phase2EncryptionAlgorithms) { - struct KeyVal0{struct item{}} - let phase2EncryptionAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2EncryptionAlgorithms) - if let phase2EncryptionAlgorithmsWrappedContainer = phase2EncryptionAlgorithmsWrappedContainer { - let phase2EncryptionAlgorithmsContainer = try phase2EncryptionAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue].self, forKey: .member) - var phase2EncryptionAlgorithmsBuffer:[EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue]? = nil - if let phase2EncryptionAlgorithmsContainer = phase2EncryptionAlgorithmsContainer { - phase2EncryptionAlgorithmsBuffer = [EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue]() - for structureContainer0 in phase2EncryptionAlgorithmsContainer { - phase2EncryptionAlgorithmsBuffer?.append(structureContainer0) - } - } - phase2EncryptionAlgorithms = phase2EncryptionAlgorithmsBuffer - } else { - phase2EncryptionAlgorithms = [] - } - } else { - phase2EncryptionAlgorithms = nil - } - if containerValues.contains(.phase1IntegrityAlgorithms) { - struct KeyVal0{struct item{}} - let phase1IntegrityAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1IntegrityAlgorithms) - if let phase1IntegrityAlgorithmsWrappedContainer = phase1IntegrityAlgorithmsWrappedContainer { - let phase1IntegrityAlgorithmsContainer = try phase1IntegrityAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue].self, forKey: .member) - var phase1IntegrityAlgorithmsBuffer:[EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue]? = nil - if let phase1IntegrityAlgorithmsContainer = phase1IntegrityAlgorithmsContainer { - phase1IntegrityAlgorithmsBuffer = [EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue]() - for structureContainer0 in phase1IntegrityAlgorithmsContainer { - phase1IntegrityAlgorithmsBuffer?.append(structureContainer0) - } - } - phase1IntegrityAlgorithms = phase1IntegrityAlgorithmsBuffer - } else { - phase1IntegrityAlgorithms = [] - } - } else { - phase1IntegrityAlgorithms = nil - } - if containerValues.contains(.phase2IntegrityAlgorithms) { - struct KeyVal0{struct item{}} - let phase2IntegrityAlgorithmsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2IntegrityAlgorithms) - if let phase2IntegrityAlgorithmsWrappedContainer = phase2IntegrityAlgorithmsWrappedContainer { - let phase2IntegrityAlgorithmsContainer = try phase2IntegrityAlgorithmsWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue].self, forKey: .member) - var phase2IntegrityAlgorithmsBuffer:[EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue]? = nil - if let phase2IntegrityAlgorithmsContainer = phase2IntegrityAlgorithmsContainer { - phase2IntegrityAlgorithmsBuffer = [EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue]() - for structureContainer0 in phase2IntegrityAlgorithmsContainer { - phase2IntegrityAlgorithmsBuffer?.append(structureContainer0) - } - } - phase2IntegrityAlgorithms = phase2IntegrityAlgorithmsBuffer - } else { - phase2IntegrityAlgorithms = [] - } - } else { - phase2IntegrityAlgorithms = nil - } - if containerValues.contains(.phase1DHGroupNumbers) { - struct KeyVal0{struct item{}} - let phase1DHGroupNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase1DHGroupNumbers) - if let phase1DHGroupNumbersWrappedContainer = phase1DHGroupNumbersWrappedContainer { - let phase1DHGroupNumbersContainer = try phase1DHGroupNumbersWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase1DHGroupNumbersRequestListValue].self, forKey: .member) - var phase1DHGroupNumbersBuffer:[EC2ClientTypes.Phase1DHGroupNumbersRequestListValue]? = nil - if let phase1DHGroupNumbersContainer = phase1DHGroupNumbersContainer { - phase1DHGroupNumbersBuffer = [EC2ClientTypes.Phase1DHGroupNumbersRequestListValue]() - for structureContainer0 in phase1DHGroupNumbersContainer { - phase1DHGroupNumbersBuffer?.append(structureContainer0) - } - } - phase1DHGroupNumbers = phase1DHGroupNumbersBuffer - } else { - phase1DHGroupNumbers = [] - } - } else { - phase1DHGroupNumbers = nil - } - if containerValues.contains(.phase2DHGroupNumbers) { - struct KeyVal0{struct item{}} - let phase2DHGroupNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phase2DHGroupNumbers) - if let phase2DHGroupNumbersWrappedContainer = phase2DHGroupNumbersWrappedContainer { - let phase2DHGroupNumbersContainer = try phase2DHGroupNumbersWrappedContainer.decodeIfPresent([EC2ClientTypes.Phase2DHGroupNumbersRequestListValue].self, forKey: .member) - var phase2DHGroupNumbersBuffer:[EC2ClientTypes.Phase2DHGroupNumbersRequestListValue]? = nil - if let phase2DHGroupNumbersContainer = phase2DHGroupNumbersContainer { - phase2DHGroupNumbersBuffer = [EC2ClientTypes.Phase2DHGroupNumbersRequestListValue]() - for structureContainer0 in phase2DHGroupNumbersContainer { - phase2DHGroupNumbersBuffer?.append(structureContainer0) - } - } - phase2DHGroupNumbers = phase2DHGroupNumbersBuffer - } else { - phase2DHGroupNumbers = [] - } - } else { - phase2DHGroupNumbers = nil - } - if containerValues.contains(.ikeVersions) { - struct KeyVal0{struct item{}} - let ikeVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ikeVersions) - if let ikeVersionsWrappedContainer = ikeVersionsWrappedContainer { - let ikeVersionsContainer = try ikeVersionsWrappedContainer.decodeIfPresent([EC2ClientTypes.IKEVersionsRequestListValue].self, forKey: .member) - var ikeVersionsBuffer:[EC2ClientTypes.IKEVersionsRequestListValue]? = nil - if let ikeVersionsContainer = ikeVersionsContainer { - ikeVersionsBuffer = [EC2ClientTypes.IKEVersionsRequestListValue]() - for structureContainer0 in ikeVersionsContainer { - ikeVersionsBuffer?.append(structureContainer0) - } - } - ikeVersions = ikeVersionsBuffer - } else { - ikeVersions = [] - } - } else { - ikeVersions = nil - } - let startupActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .startupAction) - startupAction = startupActionDecoded - let logOptionsDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.VpnTunnelLogOptionsSpecification.self, forKey: .logOptions) - logOptions = logOptionsDecoded - let enableTunnelLifecycleControlDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableTunnelLifecycleControl) - enableTunnelLifecycleControl = enableTunnelLifecycleControlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = EC2ClientTypes.VpnTunnelOptionsSpecification() + value.tunnelInsideCidr = try reader["TunnelInsideCidr"].readIfPresent() + value.tunnelInsideIpv6Cidr = try reader["TunnelInsideIpv6Cidr"].readIfPresent() + value.preSharedKey = try reader["PreSharedKey"].readIfPresent() + value.phase1LifetimeSeconds = try reader["Phase1LifetimeSeconds"].readIfPresent() + value.phase2LifetimeSeconds = try reader["Phase2LifetimeSeconds"].readIfPresent() + value.rekeyMarginTimeSeconds = try reader["RekeyMarginTimeSeconds"].readIfPresent() + value.rekeyFuzzPercentage = try reader["RekeyFuzzPercentage"].readIfPresent() + value.replayWindowSize = try reader["ReplayWindowSize"].readIfPresent() + value.dpdTimeoutSeconds = try reader["DPDTimeoutSeconds"].readIfPresent() + value.dpdTimeoutAction = try reader["DPDTimeoutAction"].readIfPresent() + value.phase1EncryptionAlgorithms = try reader["Phase1EncryptionAlgorithm"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1EncryptionAlgorithmsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2EncryptionAlgorithms = try reader["Phase2EncryptionAlgorithm"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2EncryptionAlgorithmsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase1IntegrityAlgorithms = try reader["Phase1IntegrityAlgorithm"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1IntegrityAlgorithmsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2IntegrityAlgorithms = try reader["Phase2IntegrityAlgorithm"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2IntegrityAlgorithmsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase1DHGroupNumbers = try reader["Phase1DHGroupNumber"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase1DHGroupNumbersRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.phase2DHGroupNumbers = try reader["Phase2DHGroupNumber"].readListIfPresent(memberReadingClosure: EC2ClientTypes.Phase2DHGroupNumbersRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.ikeVersions = try reader["IKEVersion"].readListIfPresent(memberReadingClosure: EC2ClientTypes.IKEVersionsRequestListValue.readingClosure, memberNodeInfo: "item", isFlattened: false) + value.startupAction = try reader["StartupAction"].readIfPresent() + value.logOptions = try reader["LogOptions"].readIfPresent(readingClosure: EC2ClientTypes.VpnTunnelLogOptionsSpecification.readingClosure) + value.enableTunnelLifecycleControl = try reader["EnableTunnelLifecycleControl"].readIfPresent() + return value + } } } @@ -188888,34 +137019,15 @@ public struct WithdrawByoipCidrInput: Swift.Equatable { } } -struct WithdrawByoipCidrInputBody: Swift.Equatable { - let cidr: Swift.String? - let dryRun: Swift.Bool? -} - -extension WithdrawByoipCidrInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidr = "Cidr" - case dryRun = "DryRun" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - } -} +extension WithdrawByoipCidrOutput { -extension WithdrawByoipCidrOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: WithdrawByoipCidrOutputBody = try responseDecoder.decode(responseBody: data) - self.byoipCidr = output.byoipCidr - } else { - self.byoipCidr = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = WithdrawByoipCidrOutput() + value.byoipCidr = try reader["byoipCidr"].readIfPresent(readingClosure: EC2ClientTypes.ByoipCidr.readingClosure) + return value } } } @@ -188932,27 +137044,18 @@ public struct WithdrawByoipCidrOutput: Swift.Equatable { } } -struct WithdrawByoipCidrOutputBody: Swift.Equatable { - let byoipCidr: EC2ClientTypes.ByoipCidr? -} - -extension WithdrawByoipCidrOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case byoipCidr = "byoipCidr" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let byoipCidrDecoded = try containerValues.decodeIfPresent(EC2ClientTypes.ByoipCidr.self, forKey: .byoipCidr) - byoipCidr = byoipCidrDecoded - } -} +enum WithdrawByoipCidrOutputError { -enum WithdrawByoipCidrOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let ec2QueryError = try await Ec2QueryError(httpResponse: httpResponse) - switch ec2QueryError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: ec2QueryError.message, requestID: ec2QueryError.requestId, typeName: ec2QueryError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Errors"]["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let errorCode: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch errorCode { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: errorCode) + } } } } diff --git a/Sources/Services/AWSElastiCache/ElastiCacheClient.swift b/Sources/Services/AWSElastiCache/ElastiCacheClient.swift index f09d9af2775..4882a90baef 100644 --- a/Sources/Services/AWSElastiCache/ElastiCacheClient.swift +++ b/Sources/Services/AWSElastiCache/ElastiCacheClient.swift @@ -11,14 +11,11 @@ public class ElastiCacheClient { let config: ElastiCacheClient.ElastiCacheClientConfiguration let serviceName = "ElastiCache" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: ElastiCacheClient.ElastiCacheClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -93,7 +90,6 @@ extension ElastiCacheClient { public func addTagsToResource(input: AddTagsToResourceInput) async throws -> AddTagsToResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addTagsToResource") @@ -117,7 +113,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddTagsToResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddTagsToResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddTagsToResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -142,7 +138,6 @@ extension ElastiCacheClient { public func authorizeCacheSecurityGroupIngress(input: AuthorizeCacheSecurityGroupIngressInput) async throws -> AuthorizeCacheSecurityGroupIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeCacheSecurityGroupIngress") @@ -166,7 +161,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeCacheSecurityGroupIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeCacheSecurityGroupIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeCacheSecurityGroupIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -188,7 +183,6 @@ extension ElastiCacheClient { public func batchApplyUpdateAction(input: BatchApplyUpdateActionInput) async throws -> BatchApplyUpdateActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "batchApplyUpdateAction") @@ -212,7 +206,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BatchApplyUpdateActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BatchApplyUpdateActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BatchApplyUpdateActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -234,7 +228,6 @@ extension ElastiCacheClient { public func batchStopUpdateAction(input: BatchStopUpdateActionInput) async throws -> BatchStopUpdateActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "batchStopUpdateAction") @@ -258,7 +251,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BatchStopUpdateActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BatchStopUpdateActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BatchStopUpdateActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -281,7 +274,6 @@ extension ElastiCacheClient { public func completeMigration(input: CompleteMigrationInput) async throws -> CompleteMigrationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "completeMigration") @@ -305,7 +297,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CompleteMigrationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CompleteMigrationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CompleteMigrationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -333,7 +325,6 @@ extension ElastiCacheClient { public func copyServerlessCacheSnapshot(input: CopyServerlessCacheSnapshotInput) async throws -> CopyServerlessCacheSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyServerlessCacheSnapshot") @@ -357,7 +348,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyServerlessCacheSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyServerlessCacheSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyServerlessCacheSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -400,7 +391,6 @@ extension ElastiCacheClient { public func copySnapshot(input: CopySnapshotInput) async throws -> CopySnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copySnapshot") @@ -424,7 +414,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopySnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopySnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopySnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -458,7 +448,6 @@ extension ElastiCacheClient { public func createCacheCluster(input: CreateCacheClusterInput) async throws -> CreateCacheClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCacheCluster") @@ -482,7 +471,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCacheClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCacheClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCacheClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -512,7 +501,6 @@ extension ElastiCacheClient { public func createCacheParameterGroup(input: CreateCacheParameterGroupInput) async throws -> CreateCacheParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCacheParameterGroup") @@ -536,7 +524,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCacheParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCacheParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCacheParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -561,7 +549,6 @@ extension ElastiCacheClient { public func createCacheSecurityGroup(input: CreateCacheSecurityGroupInput) async throws -> CreateCacheSecurityGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCacheSecurityGroup") @@ -585,7 +572,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCacheSecurityGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCacheSecurityGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCacheSecurityGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -611,7 +598,6 @@ extension ElastiCacheClient { public func createCacheSubnetGroup(input: CreateCacheSubnetGroupInput) async throws -> CreateCacheSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCacheSubnetGroup") @@ -635,7 +621,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCacheSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCacheSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCacheSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -664,7 +650,6 @@ extension ElastiCacheClient { public func createGlobalReplicationGroup(input: CreateGlobalReplicationGroupInput) async throws -> CreateGlobalReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createGlobalReplicationGroup") @@ -688,7 +673,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateGlobalReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateGlobalReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateGlobalReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -727,7 +712,6 @@ extension ElastiCacheClient { public func createReplicationGroup(input: CreateReplicationGroupInput) async throws -> CreateReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createReplicationGroup") @@ -751,7 +735,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -782,7 +766,6 @@ extension ElastiCacheClient { public func createServerlessCache(input: CreateServerlessCacheInput) async throws -> CreateServerlessCacheOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createServerlessCache") @@ -806,7 +789,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateServerlessCacheOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateServerlessCacheOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateServerlessCacheOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -834,7 +817,6 @@ extension ElastiCacheClient { public func createServerlessCacheSnapshot(input: CreateServerlessCacheSnapshotInput) async throws -> CreateServerlessCacheSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createServerlessCacheSnapshot") @@ -858,7 +840,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateServerlessCacheSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateServerlessCacheSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateServerlessCacheSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -895,7 +877,6 @@ extension ElastiCacheClient { public func createSnapshot(input: CreateSnapshotInput) async throws -> CreateSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSnapshot") @@ -919,7 +900,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -946,7 +927,6 @@ extension ElastiCacheClient { public func createUser(input: CreateUserInput) async throws -> CreateUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createUser") @@ -970,7 +950,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -998,7 +978,6 @@ extension ElastiCacheClient { public func createUserGroup(input: CreateUserGroupInput) async throws -> CreateUserGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createUserGroup") @@ -1022,7 +1001,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateUserGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateUserGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateUserGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1046,7 +1025,6 @@ extension ElastiCacheClient { public func decreaseNodeGroupsInGlobalReplicationGroup(input: DecreaseNodeGroupsInGlobalReplicationGroupInput) async throws -> DecreaseNodeGroupsInGlobalReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "decreaseNodeGroupsInGlobalReplicationGroup") @@ -1070,7 +1048,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DecreaseNodeGroupsInGlobalReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DecreaseNodeGroupsInGlobalReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DecreaseNodeGroupsInGlobalReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1102,7 +1080,6 @@ extension ElastiCacheClient { public func decreaseReplicaCount(input: DecreaseReplicaCountInput) async throws -> DecreaseReplicaCountOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "decreaseReplicaCount") @@ -1126,7 +1103,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DecreaseReplicaCountOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DecreaseReplicaCountOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DecreaseReplicaCountOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1174,7 +1151,6 @@ extension ElastiCacheClient { public func deleteCacheCluster(input: DeleteCacheClusterInput) async throws -> DeleteCacheClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCacheCluster") @@ -1198,7 +1174,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCacheClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCacheClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCacheClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1222,7 +1198,6 @@ extension ElastiCacheClient { public func deleteCacheParameterGroup(input: DeleteCacheParameterGroupInput) async throws -> DeleteCacheParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCacheParameterGroup") @@ -1246,7 +1221,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCacheParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCacheParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCacheParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1270,7 +1245,6 @@ extension ElastiCacheClient { public func deleteCacheSecurityGroup(input: DeleteCacheSecurityGroupInput) async throws -> DeleteCacheSecurityGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCacheSecurityGroup") @@ -1294,7 +1268,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCacheSecurityGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCacheSecurityGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCacheSecurityGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1316,7 +1290,6 @@ extension ElastiCacheClient { public func deleteCacheSubnetGroup(input: DeleteCacheSubnetGroupInput) async throws -> DeleteCacheSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCacheSubnetGroup") @@ -1340,7 +1313,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCacheSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCacheSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCacheSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1370,7 +1343,6 @@ extension ElastiCacheClient { public func deleteGlobalReplicationGroup(input: DeleteGlobalReplicationGroupInput) async throws -> DeleteGlobalReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteGlobalReplicationGroup") @@ -1394,7 +1366,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteGlobalReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteGlobalReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteGlobalReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1428,7 +1400,6 @@ extension ElastiCacheClient { public func deleteReplicationGroup(input: DeleteReplicationGroupInput) async throws -> DeleteReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteReplicationGroup") @@ -1452,7 +1423,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1479,7 +1450,6 @@ extension ElastiCacheClient { public func deleteServerlessCache(input: DeleteServerlessCacheInput) async throws -> DeleteServerlessCacheOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteServerlessCache") @@ -1503,7 +1473,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteServerlessCacheOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteServerlessCacheOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteServerlessCacheOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1527,7 +1497,6 @@ extension ElastiCacheClient { public func deleteServerlessCacheSnapshot(input: DeleteServerlessCacheSnapshotInput) async throws -> DeleteServerlessCacheSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteServerlessCacheSnapshot") @@ -1551,7 +1520,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteServerlessCacheSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteServerlessCacheSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteServerlessCacheSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1575,7 +1544,6 @@ extension ElastiCacheClient { public func deleteSnapshot(input: DeleteSnapshotInput) async throws -> DeleteSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSnapshot") @@ -1599,7 +1567,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1624,7 +1592,6 @@ extension ElastiCacheClient { public func deleteUser(input: DeleteUserInput) async throws -> DeleteUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteUser") @@ -1648,7 +1615,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1672,7 +1639,6 @@ extension ElastiCacheClient { public func deleteUserGroup(input: DeleteUserGroupInput) async throws -> DeleteUserGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteUserGroup") @@ -1696,7 +1662,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteUserGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteUserGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteUserGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1719,7 +1685,6 @@ extension ElastiCacheClient { public func describeCacheClusters(input: DescribeCacheClustersInput) async throws -> DescribeCacheClustersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCacheClusters") @@ -1743,7 +1708,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCacheClustersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCacheClustersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCacheClustersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1759,7 +1724,6 @@ extension ElastiCacheClient { public func describeCacheEngineVersions(input: DescribeCacheEngineVersionsInput) async throws -> DescribeCacheEngineVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCacheEngineVersions") @@ -1783,7 +1747,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCacheEngineVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCacheEngineVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCacheEngineVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1806,7 +1770,6 @@ extension ElastiCacheClient { public func describeCacheParameterGroups(input: DescribeCacheParameterGroupsInput) async throws -> DescribeCacheParameterGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCacheParameterGroups") @@ -1830,7 +1793,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCacheParameterGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCacheParameterGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCacheParameterGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1853,7 +1816,6 @@ extension ElastiCacheClient { public func describeCacheParameters(input: DescribeCacheParametersInput) async throws -> DescribeCacheParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCacheParameters") @@ -1877,7 +1839,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCacheParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCacheParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCacheParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1900,7 +1862,6 @@ extension ElastiCacheClient { public func describeCacheSecurityGroups(input: DescribeCacheSecurityGroupsInput) async throws -> DescribeCacheSecurityGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCacheSecurityGroups") @@ -1924,7 +1885,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCacheSecurityGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCacheSecurityGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCacheSecurityGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1945,7 +1906,6 @@ extension ElastiCacheClient { public func describeCacheSubnetGroups(input: DescribeCacheSubnetGroupsInput) async throws -> DescribeCacheSubnetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCacheSubnetGroups") @@ -1969,7 +1929,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCacheSubnetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCacheSubnetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCacheSubnetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1991,7 +1951,6 @@ extension ElastiCacheClient { public func describeEngineDefaultParameters(input: DescribeEngineDefaultParametersInput) async throws -> DescribeEngineDefaultParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEngineDefaultParameters") @@ -2015,7 +1974,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEngineDefaultParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEngineDefaultParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEngineDefaultParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2037,7 +1996,6 @@ extension ElastiCacheClient { public func describeEvents(input: DescribeEventsInput) async throws -> DescribeEventsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEvents") @@ -2061,7 +2019,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2084,7 +2042,6 @@ extension ElastiCacheClient { public func describeGlobalReplicationGroups(input: DescribeGlobalReplicationGroupsInput) async throws -> DescribeGlobalReplicationGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeGlobalReplicationGroups") @@ -2108,7 +2065,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeGlobalReplicationGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeGlobalReplicationGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeGlobalReplicationGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2131,7 +2088,6 @@ extension ElastiCacheClient { public func describeReplicationGroups(input: DescribeReplicationGroupsInput) async throws -> DescribeReplicationGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReplicationGroups") @@ -2155,7 +2111,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReplicationGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReplicationGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReplicationGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2178,7 +2134,6 @@ extension ElastiCacheClient { public func describeReservedCacheNodes(input: DescribeReservedCacheNodesInput) async throws -> DescribeReservedCacheNodesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedCacheNodes") @@ -2202,7 +2157,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedCacheNodesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedCacheNodesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedCacheNodesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2225,7 +2180,6 @@ extension ElastiCacheClient { public func describeReservedCacheNodesOfferings(input: DescribeReservedCacheNodesOfferingsInput) async throws -> DescribeReservedCacheNodesOfferingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedCacheNodesOfferings") @@ -2249,7 +2203,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedCacheNodesOfferingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedCacheNodesOfferingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedCacheNodesOfferingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2273,7 +2227,6 @@ extension ElastiCacheClient { public func describeServerlessCacheSnapshots(input: DescribeServerlessCacheSnapshotsInput) async throws -> DescribeServerlessCacheSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeServerlessCacheSnapshots") @@ -2297,7 +2250,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeServerlessCacheSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeServerlessCacheSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeServerlessCacheSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2320,7 +2273,6 @@ extension ElastiCacheClient { public func describeServerlessCaches(input: DescribeServerlessCachesInput) async throws -> DescribeServerlessCachesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeServerlessCaches") @@ -2344,7 +2296,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeServerlessCachesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeServerlessCachesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeServerlessCachesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2367,7 +2319,6 @@ extension ElastiCacheClient { public func describeServiceUpdates(input: DescribeServiceUpdatesInput) async throws -> DescribeServiceUpdatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeServiceUpdates") @@ -2391,7 +2342,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeServiceUpdatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeServiceUpdatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeServiceUpdatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2415,7 +2366,6 @@ extension ElastiCacheClient { public func describeSnapshots(input: DescribeSnapshotsInput) async throws -> DescribeSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSnapshots") @@ -2439,7 +2389,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2461,7 +2411,6 @@ extension ElastiCacheClient { public func describeUpdateActions(input: DescribeUpdateActionsInput) async throws -> DescribeUpdateActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeUpdateActions") @@ -2485,7 +2434,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeUpdateActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeUpdateActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeUpdateActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2508,7 +2457,6 @@ extension ElastiCacheClient { public func describeUserGroups(input: DescribeUserGroupsInput) async throws -> DescribeUserGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeUserGroups") @@ -2532,7 +2480,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeUserGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeUserGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeUserGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2555,7 +2503,6 @@ extension ElastiCacheClient { public func describeUsers(input: DescribeUsersInput) async throws -> DescribeUsersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeUsers") @@ -2579,7 +2526,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeUsersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeUsersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeUsersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2603,7 +2550,6 @@ extension ElastiCacheClient { public func disassociateGlobalReplicationGroup(input: DisassociateGlobalReplicationGroupInput) async throws -> DisassociateGlobalReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateGlobalReplicationGroup") @@ -2627,7 +2573,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateGlobalReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateGlobalReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateGlobalReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2651,7 +2597,6 @@ extension ElastiCacheClient { public func exportServerlessCacheSnapshot(input: ExportServerlessCacheSnapshotInput) async throws -> ExportServerlessCacheSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "exportServerlessCacheSnapshot") @@ -2675,7 +2620,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ExportServerlessCacheSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ExportServerlessCacheSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ExportServerlessCacheSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2699,7 +2644,6 @@ extension ElastiCacheClient { public func failoverGlobalReplicationGroup(input: FailoverGlobalReplicationGroupInput) async throws -> FailoverGlobalReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "failoverGlobalReplicationGroup") @@ -2723,7 +2667,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(FailoverGlobalReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(FailoverGlobalReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(FailoverGlobalReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2746,7 +2690,6 @@ extension ElastiCacheClient { public func increaseNodeGroupsInGlobalReplicationGroup(input: IncreaseNodeGroupsInGlobalReplicationGroupInput) async throws -> IncreaseNodeGroupsInGlobalReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "increaseNodeGroupsInGlobalReplicationGroup") @@ -2770,7 +2713,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(IncreaseNodeGroupsInGlobalReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(IncreaseNodeGroupsInGlobalReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(IncreaseNodeGroupsInGlobalReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2802,7 +2745,6 @@ extension ElastiCacheClient { public func increaseReplicaCount(input: IncreaseReplicaCountInput) async throws -> IncreaseReplicaCountOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "increaseReplicaCount") @@ -2826,7 +2768,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(IncreaseReplicaCountOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(IncreaseReplicaCountOutput.httpBinding, responseDocumentBinding), responseErrorClosure(IncreaseReplicaCountOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2850,7 +2792,6 @@ extension ElastiCacheClient { public func listAllowedNodeTypeModifications(input: ListAllowedNodeTypeModificationsInput) async throws -> ListAllowedNodeTypeModificationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listAllowedNodeTypeModifications") @@ -2874,7 +2815,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAllowedNodeTypeModificationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAllowedNodeTypeModificationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAllowedNodeTypeModificationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2909,7 +2850,6 @@ extension ElastiCacheClient { public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -2933,7 +2873,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2964,7 +2904,6 @@ extension ElastiCacheClient { public func modifyCacheCluster(input: ModifyCacheClusterInput) async throws -> ModifyCacheClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCacheCluster") @@ -2988,7 +2927,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCacheClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCacheClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCacheClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3017,7 +2956,6 @@ extension ElastiCacheClient { public func modifyCacheParameterGroup(input: ModifyCacheParameterGroupInput) async throws -> ModifyCacheParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCacheParameterGroup") @@ -3041,7 +2979,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCacheParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCacheParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCacheParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3066,7 +3004,6 @@ extension ElastiCacheClient { public func modifyCacheSubnetGroup(input: ModifyCacheSubnetGroupInput) async throws -> ModifyCacheSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCacheSubnetGroup") @@ -3090,7 +3027,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCacheSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCacheSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCacheSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3113,7 +3050,6 @@ extension ElastiCacheClient { public func modifyGlobalReplicationGroup(input: ModifyGlobalReplicationGroupInput) async throws -> ModifyGlobalReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyGlobalReplicationGroup") @@ -3137,7 +3073,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyGlobalReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyGlobalReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyGlobalReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3180,7 +3116,6 @@ extension ElastiCacheClient { public func modifyReplicationGroup(input: ModifyReplicationGroupInput) async throws -> ModifyReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyReplicationGroup") @@ -3204,7 +3139,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3234,7 +3169,6 @@ extension ElastiCacheClient { public func modifyReplicationGroupShardConfiguration(input: ModifyReplicationGroupShardConfigurationInput) async throws -> ModifyReplicationGroupShardConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyReplicationGroupShardConfiguration") @@ -3258,7 +3192,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyReplicationGroupShardConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyReplicationGroupShardConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyReplicationGroupShardConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3286,7 +3220,6 @@ extension ElastiCacheClient { public func modifyServerlessCache(input: ModifyServerlessCacheInput) async throws -> ModifyServerlessCacheOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyServerlessCache") @@ -3310,7 +3243,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyServerlessCacheOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyServerlessCacheOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyServerlessCacheOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3335,7 +3268,6 @@ extension ElastiCacheClient { public func modifyUser(input: ModifyUserInput) async throws -> ModifyUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyUser") @@ -3359,7 +3291,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3387,7 +3319,6 @@ extension ElastiCacheClient { public func modifyUserGroup(input: ModifyUserGroupInput) async throws -> ModifyUserGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyUserGroup") @@ -3411,7 +3342,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyUserGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyUserGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyUserGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3437,7 +3368,6 @@ extension ElastiCacheClient { public func purchaseReservedCacheNodesOffering(input: PurchaseReservedCacheNodesOfferingInput) async throws -> PurchaseReservedCacheNodesOfferingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "purchaseReservedCacheNodesOffering") @@ -3461,7 +3391,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PurchaseReservedCacheNodesOfferingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PurchaseReservedCacheNodesOfferingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PurchaseReservedCacheNodesOfferingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3484,7 +3414,6 @@ extension ElastiCacheClient { public func rebalanceSlotsInGlobalReplicationGroup(input: RebalanceSlotsInGlobalReplicationGroupInput) async throws -> RebalanceSlotsInGlobalReplicationGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebalanceSlotsInGlobalReplicationGroup") @@ -3508,7 +3437,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebalanceSlotsInGlobalReplicationGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebalanceSlotsInGlobalReplicationGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebalanceSlotsInGlobalReplicationGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3530,7 +3459,6 @@ extension ElastiCacheClient { public func rebootCacheCluster(input: RebootCacheClusterInput) async throws -> RebootCacheClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebootCacheCluster") @@ -3554,7 +3482,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebootCacheClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebootCacheClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebootCacheClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3590,7 +3518,6 @@ extension ElastiCacheClient { public func removeTagsFromResource(input: RemoveTagsFromResourceInput) async throws -> RemoveTagsFromResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeTagsFromResource") @@ -3614,7 +3541,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveTagsFromResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveTagsFromResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveTagsFromResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3643,7 +3570,6 @@ extension ElastiCacheClient { public func resetCacheParameterGroup(input: ResetCacheParameterGroupInput) async throws -> ResetCacheParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetCacheParameterGroup") @@ -3667,7 +3593,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetCacheParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetCacheParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetCacheParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3692,7 +3618,6 @@ extension ElastiCacheClient { public func revokeCacheSecurityGroupIngress(input: RevokeCacheSecurityGroupIngressInput) async throws -> RevokeCacheSecurityGroupIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "revokeCacheSecurityGroupIngress") @@ -3716,7 +3641,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RevokeCacheSecurityGroupIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RevokeCacheSecurityGroupIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RevokeCacheSecurityGroupIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3740,7 +3665,6 @@ extension ElastiCacheClient { public func startMigration(input: StartMigrationInput) async throws -> StartMigrationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startMigration") @@ -3764,7 +3688,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartMigrationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartMigrationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartMigrationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3824,7 +3748,6 @@ extension ElastiCacheClient { public func testFailover(input: TestFailoverInput) async throws -> TestFailoverOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "testFailover") @@ -3848,7 +3771,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TestFailoverOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TestFailoverOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TestFailoverOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3872,7 +3795,6 @@ extension ElastiCacheClient { public func testMigration(input: TestMigrationInput) async throws -> TestMigrationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "testMigration") @@ -3896,7 +3818,7 @@ extension ElastiCacheClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TestMigrationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TestMigrationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TestMigrationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSElastiCache/models/Models.swift b/Sources/Services/AWSElastiCache/models/Models.swift index 25e0a841ac3..a0b81b16b6c 100644 --- a/Sources/Services/AWSElastiCache/models/Models.swift +++ b/Sources/Services/AWSElastiCache/models/Models.swift @@ -1,18 +1,18 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension APICallRateForCustomerExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = APICallRateForCustomerExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -40,22 +40,6 @@ public struct APICallRateForCustomerExceededFault: ClientRuntime.ModeledError, A } } -struct APICallRateForCustomerExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension APICallRateForCustomerExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ElastiCacheClientTypes { public enum AZMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case crossAz @@ -89,6 +73,11 @@ extension ElastiCacheClientTypes { } extension AddTagsToResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -137,51 +126,15 @@ public struct AddTagsToResourceInput: Swift.Equatable { } } -struct AddTagsToResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension AddTagsToResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension AddTagsToResourceOutput { -extension AddTagsToResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AddTagsToResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tagList = output.tagList - } else { - self.tagList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AddTagsToResourceResult"] + var value = AddTagsToResourceOutput() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -199,61 +152,34 @@ public struct AddTagsToResourceOutput: Swift.Equatable { } } -struct AddTagsToResourceOutputBody: Swift.Equatable { - let tagList: [ElastiCacheClientTypes.Tag]? -} +enum AddTagsToResourceOutputError { -extension AddTagsToResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagList = "TagList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AddTagsToResourceResult")) - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidARN": return try await InvalidARNFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedCacheNodeNotFound": return try await ReservedCacheNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserNotFound": return try await UserNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tagList = nil - } - } -} - -enum AddTagsToResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidARN": return try await InvalidARNFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedCacheNodeNotFound": return try await ReservedCacheNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserNotFound": return try await UserNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -325,7 +251,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.Authentication: Swift.Codable { +extension ElastiCacheClientTypes.Authentication: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case passwordCount = "PasswordCount" case type = "Type" @@ -341,12 +267,14 @@ extension ElastiCacheClientTypes.Authentication: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AuthenticationType.self, forKey: .type) - type = typeDecoded - let passwordCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .passwordCount) - passwordCount = passwordCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.Authentication() + value.type = try reader["Type"].readIfPresent() + value.passwordCount = try reader["PasswordCount"].readIfPresent() + return value + } } } @@ -370,7 +298,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.AuthenticationMode: Swift.Codable { +extension ElastiCacheClientTypes.AuthenticationMode: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case passwords = "Passwords" case type = "Type" @@ -395,28 +323,13 @@ extension ElastiCacheClientTypes.AuthenticationMode: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.InputAuthenticationType.self, forKey: .type) - type = typeDecoded - if containerValues.contains(.passwords) { - struct KeyVal0{struct member{}} - let passwordsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .passwords) - if let passwordsWrappedContainer = passwordsWrappedContainer { - let passwordsContainer = try passwordsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var passwordsBuffer:[Swift.String]? = nil - if let passwordsContainer = passwordsContainer { - passwordsBuffer = [Swift.String]() - for stringContainer0 in passwordsContainer { - passwordsBuffer?.append(stringContainer0) - } - } - passwords = passwordsBuffer - } else { - passwords = [] - } - } else { - passwords = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.AuthenticationMode() + value.type = try reader["Type"].readIfPresent() + value.passwords = try reader["Passwords"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -477,16 +390,14 @@ extension ElastiCacheClientTypes { } extension AuthorizationAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -514,33 +425,15 @@ public struct AuthorizationAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct AuthorizationAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AuthorizationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -568,23 +461,13 @@ public struct AuthorizationNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct AuthorizationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationNotFoundFaultBody: Swift.Decodable { +extension AuthorizeCacheSecurityGroupIngressInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case cacheSecurityGroupName = "CacheSecurityGroupName" + case ec2SecurityGroupName = "EC2SecurityGroupName" + case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" } -} -extension AuthorizeCacheSecurityGroupIngressInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSecurityGroupName = cacheSecurityGroupName { @@ -632,38 +515,15 @@ public struct AuthorizeCacheSecurityGroupIngressInput: Swift.Equatable { } } -struct AuthorizeCacheSecurityGroupIngressInputBody: Swift.Equatable { - let cacheSecurityGroupName: Swift.String? - let ec2SecurityGroupName: Swift.String? - let ec2SecurityGroupOwnerId: Swift.String? -} - -extension AuthorizeCacheSecurityGroupIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroupName = "CacheSecurityGroupName" - case ec2SecurityGroupName = "EC2SecurityGroupName" - case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSecurityGroupName) - cacheSecurityGroupName = cacheSecurityGroupNameDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded - } -} +extension AuthorizeCacheSecurityGroupIngressOutput { -extension AuthorizeCacheSecurityGroupIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeCacheSecurityGroupIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheSecurityGroup = output.cacheSecurityGroup - } else { - self.cacheSecurityGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AuthorizeCacheSecurityGroupIngressResult"] + var value = AuthorizeCacheSecurityGroupIngressOutput() + value.cacheSecurityGroup = try reader["CacheSecurityGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheSecurityGroup.readingClosure) + return value } } } @@ -686,33 +546,23 @@ public struct AuthorizeCacheSecurityGroupIngressOutput: Swift.Equatable { } } -struct AuthorizeCacheSecurityGroupIngressOutputBody: Swift.Equatable { - let cacheSecurityGroup: ElastiCacheClientTypes.CacheSecurityGroup? -} - -extension AuthorizeCacheSecurityGroupIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroup = "CacheSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AuthorizeCacheSecurityGroupIngressResult")) - let cacheSecurityGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheSecurityGroup.self, forKey: .cacheSecurityGroup) - cacheSecurityGroup = cacheSecurityGroupDecoded - } -} +enum AuthorizeCacheSecurityGroupIngressOutputError { -enum AuthorizeCacheSecurityGroupIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationAlreadyExists": return try await AuthorizationAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationAlreadyExists": return try await AuthorizationAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -755,7 +605,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.AvailabilityZone: Swift.Codable { +extension ElastiCacheClientTypes.AvailabilityZone: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -767,10 +617,13 @@ extension ElastiCacheClientTypes.AvailabilityZone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.AvailabilityZone() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -791,6 +644,12 @@ extension ElastiCacheClientTypes { } extension BatchApplyUpdateActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheClusterIds = "CacheClusterIds" + case replicationGroupIds = "ReplicationGroupIds" + case serviceUpdateName = "ServiceUpdateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterIds = cacheClusterIds { @@ -853,74 +712,16 @@ public struct BatchApplyUpdateActionInput: Swift.Equatable { } } -struct BatchApplyUpdateActionInputBody: Swift.Equatable { - let replicationGroupIds: [Swift.String]? - let cacheClusterIds: [Swift.String]? - let serviceUpdateName: Swift.String? -} - -extension BatchApplyUpdateActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterIds = "CacheClusterIds" - case replicationGroupIds = "ReplicationGroupIds" - case serviceUpdateName = "ServiceUpdateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.replicationGroupIds) { - struct KeyVal0{struct member{}} - let replicationGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicationGroupIds) - if let replicationGroupIdsWrappedContainer = replicationGroupIdsWrappedContainer { - let replicationGroupIdsContainer = try replicationGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicationGroupIdsBuffer:[Swift.String]? = nil - if let replicationGroupIdsContainer = replicationGroupIdsContainer { - replicationGroupIdsBuffer = [Swift.String]() - for stringContainer0 in replicationGroupIdsContainer { - replicationGroupIdsBuffer?.append(stringContainer0) - } - } - replicationGroupIds = replicationGroupIdsBuffer - } else { - replicationGroupIds = [] - } - } else { - replicationGroupIds = nil - } - if containerValues.contains(.cacheClusterIds) { - struct KeyVal0{struct member{}} - let cacheClusterIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheClusterIds) - if let cacheClusterIdsWrappedContainer = cacheClusterIdsWrappedContainer { - let cacheClusterIdsContainer = try cacheClusterIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheClusterIdsBuffer:[Swift.String]? = nil - if let cacheClusterIdsContainer = cacheClusterIdsContainer { - cacheClusterIdsBuffer = [Swift.String]() - for stringContainer0 in cacheClusterIdsContainer { - cacheClusterIdsBuffer?.append(stringContainer0) - } - } - cacheClusterIds = cacheClusterIdsBuffer - } else { - cacheClusterIds = [] - } - } else { - cacheClusterIds = nil - } - let serviceUpdateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateName) - serviceUpdateName = serviceUpdateNameDecoded - } -} +extension BatchApplyUpdateActionOutput { -extension BatchApplyUpdateActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BatchApplyUpdateActionOutputBody = try responseDecoder.decode(responseBody: data) - self.processedUpdateActions = output.processedUpdateActions - self.unprocessedUpdateActions = output.unprocessedUpdateActions - } else { - self.processedUpdateActions = nil - self.unprocessedUpdateActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BatchApplyUpdateActionResult"] + var value = BatchApplyUpdateActionOutput() + value.processedUpdateActions = try reader["ProcessedUpdateActions"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ProcessedUpdateAction.readingClosure, memberNodeInfo: "ProcessedUpdateAction", isFlattened: false) + value.unprocessedUpdateActions = try reader["UnprocessedUpdateActions"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.UnprocessedUpdateAction.readingClosure, memberNodeInfo: "UnprocessedUpdateAction", isFlattened: false) + return value } } } @@ -941,73 +742,31 @@ public struct BatchApplyUpdateActionOutput: Swift.Equatable { } } -struct BatchApplyUpdateActionOutputBody: Swift.Equatable { - let processedUpdateActions: [ElastiCacheClientTypes.ProcessedUpdateAction]? - let unprocessedUpdateActions: [ElastiCacheClientTypes.UnprocessedUpdateAction]? -} +enum BatchApplyUpdateActionOutputError { -extension BatchApplyUpdateActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case processedUpdateActions = "ProcessedUpdateActions" - case unprocessedUpdateActions = "UnprocessedUpdateActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BatchApplyUpdateActionResult")) - if containerValues.contains(.processedUpdateActions) { - struct KeyVal0{struct ProcessedUpdateAction{}} - let processedUpdateActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processedUpdateActions) - if let processedUpdateActionsWrappedContainer = processedUpdateActionsWrappedContainer { - let processedUpdateActionsContainer = try processedUpdateActionsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ProcessedUpdateAction].self, forKey: .member) - var processedUpdateActionsBuffer:[ElastiCacheClientTypes.ProcessedUpdateAction]? = nil - if let processedUpdateActionsContainer = processedUpdateActionsContainer { - processedUpdateActionsBuffer = [ElastiCacheClientTypes.ProcessedUpdateAction]() - for structureContainer0 in processedUpdateActionsContainer { - processedUpdateActionsBuffer?.append(structureContainer0) - } - } - processedUpdateActions = processedUpdateActionsBuffer - } else { - processedUpdateActions = [] - } - } else { - processedUpdateActions = nil - } - if containerValues.contains(.unprocessedUpdateActions) { - struct KeyVal0{struct UnprocessedUpdateAction{}} - let unprocessedUpdateActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unprocessedUpdateActions) - if let unprocessedUpdateActionsWrappedContainer = unprocessedUpdateActionsWrappedContainer { - let unprocessedUpdateActionsContainer = try unprocessedUpdateActionsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.UnprocessedUpdateAction].self, forKey: .member) - var unprocessedUpdateActionsBuffer:[ElastiCacheClientTypes.UnprocessedUpdateAction]? = nil - if let unprocessedUpdateActionsContainer = unprocessedUpdateActionsContainer { - unprocessedUpdateActionsBuffer = [ElastiCacheClientTypes.UnprocessedUpdateAction]() - for structureContainer0 in unprocessedUpdateActionsContainer { - unprocessedUpdateActionsBuffer?.append(structureContainer0) - } - } - unprocessedUpdateActions = unprocessedUpdateActionsBuffer - } else { - unprocessedUpdateActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceUpdateNotFoundFault": return try await ServiceUpdateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - unprocessedUpdateActions = nil } } } -enum BatchApplyUpdateActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceUpdateNotFoundFault": return try await ServiceUpdateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension BatchStopUpdateActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheClusterIds = "CacheClusterIds" + case replicationGroupIds = "ReplicationGroupIds" + case serviceUpdateName = "ServiceUpdateName" } -} -extension BatchStopUpdateActionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterIds = cacheClusterIds { @@ -1070,74 +829,16 @@ public struct BatchStopUpdateActionInput: Swift.Equatable { } } -struct BatchStopUpdateActionInputBody: Swift.Equatable { - let replicationGroupIds: [Swift.String]? - let cacheClusterIds: [Swift.String]? - let serviceUpdateName: Swift.String? -} - -extension BatchStopUpdateActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterIds = "CacheClusterIds" - case replicationGroupIds = "ReplicationGroupIds" - case serviceUpdateName = "ServiceUpdateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.replicationGroupIds) { - struct KeyVal0{struct member{}} - let replicationGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicationGroupIds) - if let replicationGroupIdsWrappedContainer = replicationGroupIdsWrappedContainer { - let replicationGroupIdsContainer = try replicationGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicationGroupIdsBuffer:[Swift.String]? = nil - if let replicationGroupIdsContainer = replicationGroupIdsContainer { - replicationGroupIdsBuffer = [Swift.String]() - for stringContainer0 in replicationGroupIdsContainer { - replicationGroupIdsBuffer?.append(stringContainer0) - } - } - replicationGroupIds = replicationGroupIdsBuffer - } else { - replicationGroupIds = [] - } - } else { - replicationGroupIds = nil - } - if containerValues.contains(.cacheClusterIds) { - struct KeyVal0{struct member{}} - let cacheClusterIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheClusterIds) - if let cacheClusterIdsWrappedContainer = cacheClusterIdsWrappedContainer { - let cacheClusterIdsContainer = try cacheClusterIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheClusterIdsBuffer:[Swift.String]? = nil - if let cacheClusterIdsContainer = cacheClusterIdsContainer { - cacheClusterIdsBuffer = [Swift.String]() - for stringContainer0 in cacheClusterIdsContainer { - cacheClusterIdsBuffer?.append(stringContainer0) - } - } - cacheClusterIds = cacheClusterIdsBuffer - } else { - cacheClusterIds = [] - } - } else { - cacheClusterIds = nil - } - let serviceUpdateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateName) - serviceUpdateName = serviceUpdateNameDecoded - } -} +extension BatchStopUpdateActionOutput { -extension BatchStopUpdateActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BatchStopUpdateActionOutputBody = try responseDecoder.decode(responseBody: data) - self.processedUpdateActions = output.processedUpdateActions - self.unprocessedUpdateActions = output.unprocessedUpdateActions - } else { - self.processedUpdateActions = nil - self.unprocessedUpdateActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BatchStopUpdateActionResult"] + var value = BatchStopUpdateActionOutput() + value.processedUpdateActions = try reader["ProcessedUpdateActions"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ProcessedUpdateAction.readingClosure, memberNodeInfo: "ProcessedUpdateAction", isFlattened: false) + value.unprocessedUpdateActions = try reader["UnprocessedUpdateActions"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.UnprocessedUpdateAction.readingClosure, memberNodeInfo: "UnprocessedUpdateAction", isFlattened: false) + return value } } } @@ -1158,73 +859,25 @@ public struct BatchStopUpdateActionOutput: Swift.Equatable { } } -struct BatchStopUpdateActionOutputBody: Swift.Equatable { - let processedUpdateActions: [ElastiCacheClientTypes.ProcessedUpdateAction]? - let unprocessedUpdateActions: [ElastiCacheClientTypes.UnprocessedUpdateAction]? -} +enum BatchStopUpdateActionOutputError { -extension BatchStopUpdateActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case processedUpdateActions = "ProcessedUpdateActions" - case unprocessedUpdateActions = "UnprocessedUpdateActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BatchStopUpdateActionResult")) - if containerValues.contains(.processedUpdateActions) { - struct KeyVal0{struct ProcessedUpdateAction{}} - let processedUpdateActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processedUpdateActions) - if let processedUpdateActionsWrappedContainer = processedUpdateActionsWrappedContainer { - let processedUpdateActionsContainer = try processedUpdateActionsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ProcessedUpdateAction].self, forKey: .member) - var processedUpdateActionsBuffer:[ElastiCacheClientTypes.ProcessedUpdateAction]? = nil - if let processedUpdateActionsContainer = processedUpdateActionsContainer { - processedUpdateActionsBuffer = [ElastiCacheClientTypes.ProcessedUpdateAction]() - for structureContainer0 in processedUpdateActionsContainer { - processedUpdateActionsBuffer?.append(structureContainer0) - } - } - processedUpdateActions = processedUpdateActionsBuffer - } else { - processedUpdateActions = [] - } - } else { - processedUpdateActions = nil - } - if containerValues.contains(.unprocessedUpdateActions) { - struct KeyVal0{struct UnprocessedUpdateAction{}} - let unprocessedUpdateActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .unprocessedUpdateActions) - if let unprocessedUpdateActionsWrappedContainer = unprocessedUpdateActionsWrappedContainer { - let unprocessedUpdateActionsContainer = try unprocessedUpdateActionsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.UnprocessedUpdateAction].self, forKey: .member) - var unprocessedUpdateActionsBuffer:[ElastiCacheClientTypes.UnprocessedUpdateAction]? = nil - if let unprocessedUpdateActionsContainer = unprocessedUpdateActionsContainer { - unprocessedUpdateActionsBuffer = [ElastiCacheClientTypes.UnprocessedUpdateAction]() - for structureContainer0 in unprocessedUpdateActionsContainer { - unprocessedUpdateActionsBuffer?.append(structureContainer0) - } - } - unprocessedUpdateActions = unprocessedUpdateActionsBuffer - } else { - unprocessedUpdateActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceUpdateNotFoundFault": return try await ServiceUpdateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - unprocessedUpdateActions = nil } } } -enum BatchStopUpdateActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceUpdateNotFoundFault": return try await ServiceUpdateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension ElastiCacheClientTypes.CacheCluster: Swift.Codable { +extension ElastiCacheClientTypes.CacheCluster: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case atRestEncryptionEnabled = "AtRestEncryptionEnabled" @@ -1400,142 +1053,45 @@ extension ElastiCacheClientTypes.CacheCluster: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let configurationEndpointDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Endpoint.self, forKey: .configurationEndpoint) - configurationEndpoint = configurationEndpointDecoded - let clientDownloadLandingPageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientDownloadLandingPage) - clientDownloadLandingPage = clientDownloadLandingPageDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let cacheClusterStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterStatus) - cacheClusterStatus = cacheClusterStatusDecoded - let numCacheNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numCacheNodes) - numCacheNodes = numCacheNodesDecoded - let preferredAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredAvailabilityZone) - preferredAvailabilityZone = preferredAvailabilityZoneDecoded - let preferredOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredOutpostArn) - preferredOutpostArn = preferredOutpostArnDecoded - let cacheClusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .cacheClusterCreateTime) - cacheClusterCreateTime = cacheClusterCreateTimeDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.PendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - let notificationConfigurationDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NotificationConfiguration.self, forKey: .notificationConfiguration) - notificationConfiguration = notificationConfigurationDecoded - if containerValues.contains(.cacheSecurityGroups) { - struct KeyVal0{struct CacheSecurityGroup{}} - let cacheSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheSecurityGroups) - if let cacheSecurityGroupsWrappedContainer = cacheSecurityGroupsWrappedContainer { - let cacheSecurityGroupsContainer = try cacheSecurityGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheSecurityGroupMembership].self, forKey: .member) - var cacheSecurityGroupsBuffer:[ElastiCacheClientTypes.CacheSecurityGroupMembership]? = nil - if let cacheSecurityGroupsContainer = cacheSecurityGroupsContainer { - cacheSecurityGroupsBuffer = [ElastiCacheClientTypes.CacheSecurityGroupMembership]() - for structureContainer0 in cacheSecurityGroupsContainer { - cacheSecurityGroupsBuffer?.append(structureContainer0) - } - } - cacheSecurityGroups = cacheSecurityGroupsBuffer - } else { - cacheSecurityGroups = [] - } - } else { - cacheSecurityGroups = nil - } - let cacheParameterGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheParameterGroupStatus.self, forKey: .cacheParameterGroup) - cacheParameterGroup = cacheParameterGroupDecoded - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - if containerValues.contains(.cacheNodes) { - struct KeyVal0{struct CacheNode{}} - let cacheNodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodes) - if let cacheNodesWrappedContainer = cacheNodesWrappedContainer { - let cacheNodesContainer = try cacheNodesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheNode].self, forKey: .member) - var cacheNodesBuffer:[ElastiCacheClientTypes.CacheNode]? = nil - if let cacheNodesContainer = cacheNodesContainer { - cacheNodesBuffer = [ElastiCacheClientTypes.CacheNode]() - for structureContainer0 in cacheNodesContainer { - cacheNodesBuffer?.append(structureContainer0) - } - } - cacheNodes = cacheNodesBuffer - } else { - cacheNodes = [] - } - } else { - cacheNodes = nil - } - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.SecurityGroupMembership].self, forKey: .member) - var securityGroupsBuffer:[ElastiCacheClientTypes.SecurityGroupMembership]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [ElastiCacheClientTypes.SecurityGroupMembership]() - for structureContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(structureContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let snapshotWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotWindow) - snapshotWindow = snapshotWindowDecoded - let authTokenEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .authTokenEnabled) - authTokenEnabled = authTokenEnabledDecoded - let authTokenLastModifiedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .authTokenLastModifiedDate) - authTokenLastModifiedDate = authTokenLastModifiedDateDecoded - let transitEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .transitEncryptionEnabled) - transitEncryptionEnabled = transitEncryptionEnabledDecoded - let atRestEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .atRestEncryptionEnabled) - atRestEncryptionEnabled = atRestEncryptionEnabledDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let replicationGroupLogDeliveryEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .replicationGroupLogDeliveryEnabled) - replicationGroupLogDeliveryEnabled = replicationGroupLogDeliveryEnabledDecoded - if containerValues.contains(.logDeliveryConfigurations) { - struct KeyVal0{struct LogDeliveryConfiguration{}} - let logDeliveryConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logDeliveryConfigurations) - if let logDeliveryConfigurationsWrappedContainer = logDeliveryConfigurationsWrappedContainer { - let logDeliveryConfigurationsContainer = try logDeliveryConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.LogDeliveryConfiguration].self, forKey: .member) - var logDeliveryConfigurationsBuffer:[ElastiCacheClientTypes.LogDeliveryConfiguration]? = nil - if let logDeliveryConfigurationsContainer = logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer = [ElastiCacheClientTypes.LogDeliveryConfiguration]() - for structureContainer0 in logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer?.append(structureContainer0) - } - } - logDeliveryConfigurations = logDeliveryConfigurationsBuffer - } else { - logDeliveryConfigurations = [] - } - } else { - logDeliveryConfigurations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheCluster() + value.cacheClusterId = try reader["CacheClusterId"].readIfPresent() + value.configurationEndpoint = try reader["ConfigurationEndpoint"].readIfPresent(readingClosure: ElastiCacheClientTypes.Endpoint.readingClosure) + value.clientDownloadLandingPage = try reader["ClientDownloadLandingPage"].readIfPresent() + value.cacheNodeType = try reader["CacheNodeType"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.cacheClusterStatus = try reader["CacheClusterStatus"].readIfPresent() + value.numCacheNodes = try reader["NumCacheNodes"].readIfPresent() + value.preferredAvailabilityZone = try reader["PreferredAvailabilityZone"].readIfPresent() + value.preferredOutpostArn = try reader["PreferredOutpostArn"].readIfPresent() + value.cacheClusterCreateTime = try reader["CacheClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: ElastiCacheClientTypes.PendingModifiedValues.readingClosure) + value.notificationConfiguration = try reader["NotificationConfiguration"].readIfPresent(readingClosure: ElastiCacheClientTypes.NotificationConfiguration.readingClosure) + value.cacheSecurityGroups = try reader["CacheSecurityGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheSecurityGroupMembership.readingClosure, memberNodeInfo: "CacheSecurityGroup", isFlattened: false) + value.cacheParameterGroup = try reader["CacheParameterGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheParameterGroupStatus.readingClosure) + value.cacheSubnetGroupName = try reader["CacheSubnetGroupName"].readIfPresent() + value.cacheNodes = try reader["CacheNodes"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheNode.readingClosure, memberNodeInfo: "CacheNode", isFlattened: false) + value.autoMinorVersionUpgrade = try reader["AutoMinorVersionUpgrade"].readIfPresent() + value.securityGroups = try reader["SecurityGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.SecurityGroupMembership.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.replicationGroupId = try reader["ReplicationGroupId"].readIfPresent() + value.snapshotRetentionLimit = try reader["SnapshotRetentionLimit"].readIfPresent() + value.snapshotWindow = try reader["SnapshotWindow"].readIfPresent() + value.authTokenEnabled = try reader["AuthTokenEnabled"].readIfPresent() + value.authTokenLastModifiedDate = try reader["AuthTokenLastModifiedDate"].readTimestampIfPresent(format: .dateTime) + value.transitEncryptionEnabled = try reader["TransitEncryptionEnabled"].readIfPresent() + value.atRestEncryptionEnabled = try reader["AtRestEncryptionEnabled"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.replicationGroupLogDeliveryEnabled = try reader["ReplicationGroupLogDeliveryEnabled"].readIfPresent() + value.logDeliveryConfigurations = try reader["LogDeliveryConfigurations"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.LogDeliveryConfiguration.readingClosure, memberNodeInfo: "LogDeliveryConfiguration", isFlattened: false) + value.networkType = try reader["NetworkType"].readIfPresent() + value.ipDiscovery = try reader["IpDiscovery"].readIfPresent() + value.transitEncryptionMode = try reader["TransitEncryptionMode"].readIfPresent() + return value } - let networkTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NetworkType.self, forKey: .networkType) - networkType = networkTypeDecoded - let ipDiscoveryDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.IpDiscovery.self, forKey: .ipDiscovery) - ipDiscovery = ipDiscoveryDecoded - let transitEncryptionModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.TransitEncryptionMode.self, forKey: .transitEncryptionMode) - transitEncryptionMode = transitEncryptionModeDecoded } } @@ -1740,16 +1296,14 @@ extension ElastiCacheClientTypes { } extension CacheClusterAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheClusterAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1777,33 +1331,15 @@ public struct CacheClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSCli } } -struct CacheClusterAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheClusterAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CacheClusterNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheClusterNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1831,23 +1367,7 @@ public struct CacheClusterNotFoundFault: ClientRuntime.ModeledError, AWSClientRu } } -struct CacheClusterNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheClusterNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.CacheEngineVersion: Swift.Codable { +extension ElastiCacheClientTypes.CacheEngineVersion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheEngineDescription = "CacheEngineDescription" case cacheEngineVersionDescription = "CacheEngineVersionDescription" @@ -1875,18 +1395,17 @@ extension ElastiCacheClientTypes.CacheEngineVersion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let cacheParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupFamily) - cacheParameterGroupFamily = cacheParameterGroupFamilyDecoded - let cacheEngineDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheEngineDescription) - cacheEngineDescription = cacheEngineDescriptionDecoded - let cacheEngineVersionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheEngineVersionDescription) - cacheEngineVersionDescription = cacheEngineVersionDescriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheEngineVersion() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.cacheParameterGroupFamily = try reader["CacheParameterGroupFamily"].readIfPresent() + value.cacheEngineDescription = try reader["CacheEngineDescription"].readIfPresent() + value.cacheEngineVersionDescription = try reader["CacheEngineVersionDescription"].readIfPresent() + return value + } } } @@ -1922,7 +1441,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.CacheNode: Swift.Codable { +extension ElastiCacheClientTypes.CacheNode: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheNodeCreateTime = "CacheNodeCreateTime" case cacheNodeId = "CacheNodeId" @@ -1962,24 +1481,20 @@ extension ElastiCacheClientTypes.CacheNode: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeId) - cacheNodeId = cacheNodeIdDecoded - let cacheNodeStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeStatus) - cacheNodeStatus = cacheNodeStatusDecoded - let cacheNodeCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .cacheNodeCreateTime) - cacheNodeCreateTime = cacheNodeCreateTimeDecoded - let endpointDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Endpoint.self, forKey: .endpoint) - endpoint = endpointDecoded - let parameterGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupStatus) - parameterGroupStatus = parameterGroupStatusDecoded - let sourceCacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceCacheNodeId) - sourceCacheNodeId = sourceCacheNodeIdDecoded - let customerAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerAvailabilityZone) - customerAvailabilityZone = customerAvailabilityZoneDecoded - let customerOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOutpostArn) - customerOutpostArn = customerOutpostArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheNode() + value.cacheNodeId = try reader["CacheNodeId"].readIfPresent() + value.cacheNodeStatus = try reader["CacheNodeStatus"].readIfPresent() + value.cacheNodeCreateTime = try reader["CacheNodeCreateTime"].readTimestampIfPresent(format: .dateTime) + value.endpoint = try reader["Endpoint"].readIfPresent(readingClosure: ElastiCacheClientTypes.Endpoint.readingClosure) + value.parameterGroupStatus = try reader["ParameterGroupStatus"].readIfPresent() + value.sourceCacheNodeId = try reader["SourceCacheNodeId"].readIfPresent() + value.customerAvailabilityZone = try reader["CustomerAvailabilityZone"].readIfPresent() + value.customerOutpostArn = try reader["CustomerOutpostArn"].readIfPresent() + return value + } } } @@ -2066,7 +1581,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.CacheNodeTypeSpecificParameter: Swift.Codable { +extension ElastiCacheClientTypes.CacheNodeTypeSpecificParameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case cacheNodeTypeSpecificValues = "CacheNodeTypeSpecificValues" @@ -2119,43 +1634,21 @@ extension ElastiCacheClientTypes.CacheNodeTypeSpecificParameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterName) - parameterName = parameterNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) - dataType = dataTypeDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded - let isModifiableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isModifiable) - isModifiable = isModifiableDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - if containerValues.contains(.cacheNodeTypeSpecificValues) { - struct KeyVal0{struct CacheNodeTypeSpecificValue{}} - let cacheNodeTypeSpecificValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodeTypeSpecificValues) - if let cacheNodeTypeSpecificValuesWrappedContainer = cacheNodeTypeSpecificValuesWrappedContainer { - let cacheNodeTypeSpecificValuesContainer = try cacheNodeTypeSpecificValuesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheNodeTypeSpecificValue].self, forKey: .member) - var cacheNodeTypeSpecificValuesBuffer:[ElastiCacheClientTypes.CacheNodeTypeSpecificValue]? = nil - if let cacheNodeTypeSpecificValuesContainer = cacheNodeTypeSpecificValuesContainer { - cacheNodeTypeSpecificValuesBuffer = [ElastiCacheClientTypes.CacheNodeTypeSpecificValue]() - for structureContainer0 in cacheNodeTypeSpecificValuesContainer { - cacheNodeTypeSpecificValuesBuffer?.append(structureContainer0) - } - } - cacheNodeTypeSpecificValues = cacheNodeTypeSpecificValuesBuffer - } else { - cacheNodeTypeSpecificValues = [] - } - } else { - cacheNodeTypeSpecificValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheNodeTypeSpecificParameter() + value.parameterName = try reader["ParameterName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.dataType = try reader["DataType"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + value.isModifiable = try reader["IsModifiable"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.cacheNodeTypeSpecificValues = try reader["CacheNodeTypeSpecificValues"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheNodeTypeSpecificValue.readingClosure, memberNodeInfo: "CacheNodeTypeSpecificValue", isFlattened: false) + value.changeType = try reader["ChangeType"].readIfPresent() + return value } - let changeTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ChangeType.self, forKey: .changeType) - changeType = changeTypeDecoded } } @@ -2207,7 +1700,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.CacheNodeTypeSpecificValue: Swift.Codable { +extension ElastiCacheClientTypes.CacheNodeTypeSpecificValue: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheNodeType = "CacheNodeType" case value = "Value" @@ -2223,12 +1716,14 @@ extension ElastiCacheClientTypes.CacheNodeTypeSpecificValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheNodeTypeSpecificValue() + value.cacheNodeType = try reader["CacheNodeType"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -2252,7 +1747,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.CacheNodeUpdateStatus: Swift.Codable { +extension ElastiCacheClientTypes.CacheNodeUpdateStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheNodeId = "CacheNodeId" case nodeDeletionDate = "NodeDeletionDate" @@ -2292,24 +1787,20 @@ extension ElastiCacheClientTypes.CacheNodeUpdateStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeId) - cacheNodeId = cacheNodeIdDecoded - let nodeUpdateStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NodeUpdateStatus.self, forKey: .nodeUpdateStatus) - nodeUpdateStatus = nodeUpdateStatusDecoded - let nodeDeletionDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeDeletionDate) - nodeDeletionDate = nodeDeletionDateDecoded - let nodeUpdateStartDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeUpdateStartDate) - nodeUpdateStartDate = nodeUpdateStartDateDecoded - let nodeUpdateEndDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeUpdateEndDate) - nodeUpdateEndDate = nodeUpdateEndDateDecoded - let nodeUpdateInitiatedByDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NodeUpdateInitiatedBy.self, forKey: .nodeUpdateInitiatedBy) - nodeUpdateInitiatedBy = nodeUpdateInitiatedByDecoded - let nodeUpdateInitiatedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeUpdateInitiatedDate) - nodeUpdateInitiatedDate = nodeUpdateInitiatedDateDecoded - let nodeUpdateStatusModifiedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeUpdateStatusModifiedDate) - nodeUpdateStatusModifiedDate = nodeUpdateStatusModifiedDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheNodeUpdateStatus() + value.cacheNodeId = try reader["CacheNodeId"].readIfPresent() + value.nodeUpdateStatus = try reader["NodeUpdateStatus"].readIfPresent() + value.nodeDeletionDate = try reader["NodeDeletionDate"].readTimestampIfPresent(format: .dateTime) + value.nodeUpdateStartDate = try reader["NodeUpdateStartDate"].readTimestampIfPresent(format: .dateTime) + value.nodeUpdateEndDate = try reader["NodeUpdateEndDate"].readTimestampIfPresent(format: .dateTime) + value.nodeUpdateInitiatedBy = try reader["NodeUpdateInitiatedBy"].readIfPresent() + value.nodeUpdateInitiatedDate = try reader["NodeUpdateInitiatedDate"].readTimestampIfPresent(format: .dateTime) + value.nodeUpdateStatusModifiedDate = try reader["NodeUpdateStatusModifiedDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -2357,7 +1848,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.CacheParameterGroup: Swift.Codable { +extension ElastiCacheClientTypes.CacheParameterGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case cacheParameterGroupFamily = "CacheParameterGroupFamily" @@ -2385,18 +1876,17 @@ extension ElastiCacheClientTypes.CacheParameterGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let cacheParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupFamily) - cacheParameterGroupFamily = cacheParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let isGlobalDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isGlobal) - isGlobal = isGlobalDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheParameterGroup() + value.cacheParameterGroupName = try reader["CacheParameterGroupName"].readIfPresent() + value.cacheParameterGroupFamily = try reader["CacheParameterGroupFamily"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.isGlobal = try reader["IsGlobal"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + return value + } } } @@ -2433,16 +1923,14 @@ extension ElastiCacheClientTypes { } extension CacheParameterGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheParameterGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2470,33 +1958,15 @@ public struct CacheParameterGroupAlreadyExistsFault: ClientRuntime.ModeledError, } } -struct CacheParameterGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheParameterGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CacheParameterGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheParameterGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2524,33 +1994,15 @@ public struct CacheParameterGroupNotFoundFault: ClientRuntime.ModeledError, AWSC } } -struct CacheParameterGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheParameterGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CacheParameterGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheParameterGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2578,23 +2030,7 @@ public struct CacheParameterGroupQuotaExceededFault: ClientRuntime.ModeledError, } } -struct CacheParameterGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheParameterGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.CacheParameterGroupStatus: Swift.Codable { +extension ElastiCacheClientTypes.CacheParameterGroupStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheNodeIdsToReboot = "CacheNodeIdsToReboot" case cacheParameterGroupName = "CacheParameterGroupName" @@ -2623,30 +2059,14 @@ extension ElastiCacheClientTypes.CacheParameterGroupStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let parameterApplyStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterApplyStatus) - parameterApplyStatus = parameterApplyStatusDecoded - if containerValues.contains(.cacheNodeIdsToReboot) { - struct KeyVal0{struct CacheNodeId{}} - let cacheNodeIdsToRebootWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodeIdsToReboot) - if let cacheNodeIdsToRebootWrappedContainer = cacheNodeIdsToRebootWrappedContainer { - let cacheNodeIdsToRebootContainer = try cacheNodeIdsToRebootWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheNodeIdsToRebootBuffer:[Swift.String]? = nil - if let cacheNodeIdsToRebootContainer = cacheNodeIdsToRebootContainer { - cacheNodeIdsToRebootBuffer = [Swift.String]() - for stringContainer0 in cacheNodeIdsToRebootContainer { - cacheNodeIdsToRebootBuffer?.append(stringContainer0) - } - } - cacheNodeIdsToReboot = cacheNodeIdsToRebootBuffer - } else { - cacheNodeIdsToReboot = [] - } - } else { - cacheNodeIdsToReboot = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheParameterGroupStatus() + value.cacheParameterGroupName = try reader["CacheParameterGroupName"].readIfPresent() + value.parameterApplyStatus = try reader["ParameterApplyStatus"].readIfPresent() + value.cacheNodeIdsToReboot = try reader["CacheNodeIdsToReboot"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "CacheNodeId", isFlattened: false) + return value } } } @@ -2675,7 +2095,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.CacheSecurityGroup: Swift.Codable { +extension ElastiCacheClientTypes.CacheSecurityGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case cacheSecurityGroupName = "CacheSecurityGroupName" @@ -2712,35 +2132,17 @@ extension ElastiCacheClientTypes.CacheSecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let cacheSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSecurityGroupName) - cacheSecurityGroupName = cacheSecurityGroupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.ec2SecurityGroups) { - struct KeyVal0{struct EC2SecurityGroup{}} - let ec2SecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ec2SecurityGroups) - if let ec2SecurityGroupsWrappedContainer = ec2SecurityGroupsWrappedContainer { - let ec2SecurityGroupsContainer = try ec2SecurityGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.EC2SecurityGroup].self, forKey: .member) - var ec2SecurityGroupsBuffer:[ElastiCacheClientTypes.EC2SecurityGroup]? = nil - if let ec2SecurityGroupsContainer = ec2SecurityGroupsContainer { - ec2SecurityGroupsBuffer = [ElastiCacheClientTypes.EC2SecurityGroup]() - for structureContainer0 in ec2SecurityGroupsContainer { - ec2SecurityGroupsBuffer?.append(structureContainer0) - } - } - ec2SecurityGroups = ec2SecurityGroupsBuffer - } else { - ec2SecurityGroups = [] - } - } else { - ec2SecurityGroups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheSecurityGroup() + value.ownerId = try reader["OwnerId"].readIfPresent() + value.cacheSecurityGroupName = try reader["CacheSecurityGroupName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.ec2SecurityGroups = try reader["EC2SecurityGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.EC2SecurityGroup.readingClosure, memberNodeInfo: "EC2SecurityGroup", isFlattened: false) + value.arn = try reader["ARN"].readIfPresent() + return value } - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded } } @@ -2783,16 +2185,14 @@ extension ElastiCacheClientTypes { } extension CacheSecurityGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheSecurityGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2820,23 +2220,7 @@ public struct CacheSecurityGroupAlreadyExistsFault: ClientRuntime.ModeledError, } } -struct CacheSecurityGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheSecurityGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.CacheSecurityGroupMembership: Swift.Codable { +extension ElastiCacheClientTypes.CacheSecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheSecurityGroupName = "CacheSecurityGroupName" case status = "Status" @@ -2852,12 +2236,14 @@ extension ElastiCacheClientTypes.CacheSecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSecurityGroupName) - cacheSecurityGroupName = cacheSecurityGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheSecurityGroupMembership() + value.cacheSecurityGroupName = try reader["CacheSecurityGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -2882,16 +2268,14 @@ extension ElastiCacheClientTypes { } extension CacheSecurityGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheSecurityGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2919,33 +2303,15 @@ public struct CacheSecurityGroupNotFoundFault: ClientRuntime.ModeledError, AWSCl } } -struct CacheSecurityGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheSecurityGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CacheSecurityGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheSecurityGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2973,23 +2339,7 @@ public struct CacheSecurityGroupQuotaExceededFault: ClientRuntime.ModeledError, } } -struct CacheSecurityGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheSecurityGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.CacheSubnetGroup: Swift.Codable { +extension ElastiCacheClientTypes.CacheSubnetGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case cacheSubnetGroupDescription = "CacheSubnetGroupDescription" @@ -3039,53 +2389,17 @@ extension ElastiCacheClientTypes.CacheSubnetGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - let cacheSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupDescription) - cacheSubnetGroupDescription = cacheSubnetGroupDescriptionDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct Subnet{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Subnet].self, forKey: .member) - var subnetsBuffer:[ElastiCacheClientTypes.Subnet]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [ElastiCacheClientTypes.Subnet]() - for structureContainer0 in subnetsContainer { - subnetsBuffer?.append(structureContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - if containerValues.contains(.supportedNetworkTypes) { - struct KeyVal0{struct member{}} - let supportedNetworkTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedNetworkTypes) - if let supportedNetworkTypesWrappedContainer = supportedNetworkTypesWrappedContainer { - let supportedNetworkTypesContainer = try supportedNetworkTypesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.NetworkType].self, forKey: .member) - var supportedNetworkTypesBuffer:[ElastiCacheClientTypes.NetworkType]? = nil - if let supportedNetworkTypesContainer = supportedNetworkTypesContainer { - supportedNetworkTypesBuffer = [ElastiCacheClientTypes.NetworkType]() - for enumContainer0 in supportedNetworkTypesContainer { - supportedNetworkTypesBuffer?.append(enumContainer0) - } - } - supportedNetworkTypes = supportedNetworkTypesBuffer - } else { - supportedNetworkTypes = [] - } - } else { - supportedNetworkTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheSubnetGroup() + value.cacheSubnetGroupName = try reader["CacheSubnetGroupName"].readIfPresent() + value.cacheSubnetGroupDescription = try reader["CacheSubnetGroupDescription"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.subnets = try reader["Subnets"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.Subnet.readingClosure, memberNodeInfo: "Subnet", isFlattened: false) + value.arn = try reader["ARN"].readIfPresent() + value.supportedNetworkTypes = try reader["SupportedNetworkTypes"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.NetworkType.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3131,16 +2445,14 @@ extension ElastiCacheClientTypes { } extension CacheSubnetGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheSubnetGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3168,33 +2480,15 @@ public struct CacheSubnetGroupAlreadyExistsFault: ClientRuntime.ModeledError, AW } } -struct CacheSubnetGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheSubnetGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CacheSubnetGroupInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheSubnetGroupInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3222,33 +2516,15 @@ public struct CacheSubnetGroupInUse: ClientRuntime.ModeledError, AWSClientRuntim } } -struct CacheSubnetGroupInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheSubnetGroupInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CacheSubnetGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheSubnetGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3276,33 +2552,15 @@ public struct CacheSubnetGroupNotFoundFault: ClientRuntime.ModeledError, AWSClie } } -struct CacheSubnetGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} +extension CacheSubnetGroupQuotaExceededFault { -extension CacheSubnetGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension CacheSubnetGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheSubnetGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3330,33 +2588,15 @@ public struct CacheSubnetGroupQuotaExceededFault: ClientRuntime.ModeledError, AW } } -struct CacheSubnetGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheSubnetGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CacheSubnetQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CacheSubnetQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3384,23 +2624,7 @@ public struct CacheSubnetQuotaExceededFault: ClientRuntime.ModeledError, AWSClie } } -struct CacheSubnetQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CacheSubnetQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.CacheUsageLimits: Swift.Codable { +extension ElastiCacheClientTypes.CacheUsageLimits: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dataStorage = "DataStorage" case ecpuPerSecond = "ECPUPerSecond" @@ -3416,12 +2640,14 @@ extension ElastiCacheClientTypes.CacheUsageLimits: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataStorageDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DataStorage.self, forKey: .dataStorage) - dataStorage = dataStorageDecoded - let ecpuPerSecondDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ECPUPerSecond.self, forKey: .ecpuPerSecond) - ecpuPerSecond = ecpuPerSecondDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CacheUsageLimits() + value.dataStorage = try reader["DataStorage"].readIfPresent(readingClosure: ElastiCacheClientTypes.DataStorage.readingClosure) + value.ecpuPerSecond = try reader["ECPUPerSecond"].readIfPresent(readingClosure: ElastiCacheClientTypes.ECPUPerSecond.readingClosure) + return value + } } } @@ -3477,7 +2703,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.CloudWatchLogsDestinationDetails: Swift.Codable { +extension ElastiCacheClientTypes.CloudWatchLogsDestinationDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logGroup = "LogGroup" } @@ -3489,10 +2715,13 @@ extension ElastiCacheClientTypes.CloudWatchLogsDestinationDetails: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logGroup) - logGroup = logGroupDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CloudWatchLogsDestinationDetails() + value.logGroup = try reader["LogGroup"].readIfPresent() + return value + } } } @@ -3548,16 +2777,14 @@ extension ElastiCacheClientTypes { } extension ClusterQuotaForCustomerExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterQuotaForCustomerExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3585,23 +2812,12 @@ public struct ClusterQuotaForCustomerExceededFault: ClientRuntime.ModeledError, } } -struct ClusterQuotaForCustomerExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterQuotaForCustomerExceededFaultBody: Swift.Decodable { +extension CompleteMigrationInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case force = "Force" + case replicationGroupId = "ReplicationGroupId" } -} -extension CompleteMigrationInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let force = force { @@ -3639,34 +2855,15 @@ public struct CompleteMigrationInput: Swift.Equatable { } } -struct CompleteMigrationInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let force: Swift.Bool? -} - -extension CompleteMigrationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case force = "Force" - case replicationGroupId = "ReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - } -} +extension CompleteMigrationOutput { -extension CompleteMigrationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CompleteMigrationOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CompleteMigrationResult"] + var value = CompleteMigrationOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -3683,36 +2880,26 @@ public struct CompleteMigrationOutput: Swift.Equatable { } } -struct CompleteMigrationOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension CompleteMigrationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } +enum CompleteMigrationOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CompleteMigrationResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} - -enum CompleteMigrationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotUnderMigrationFault": return try await ReplicationGroupNotUnderMigrationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotUnderMigrationFault": return try await ReplicationGroupNotUnderMigrationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElastiCacheClientTypes.ConfigureShard: Swift.Codable { +extension ElastiCacheClientTypes.ConfigureShard: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case newReplicaCount = "NewReplicaCount" case nodeGroupId = "NodeGroupId" @@ -3754,49 +2941,15 @@ extension ElastiCacheClientTypes.ConfigureShard: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeGroupId) - nodeGroupId = nodeGroupIdDecoded - let newReplicaCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .newReplicaCount) - newReplicaCount = newReplicaCountDecoded - if containerValues.contains(.preferredAvailabilityZones) { - struct KeyVal0{struct PreferredAvailabilityZone{}} - let preferredAvailabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .preferredAvailabilityZones) - if let preferredAvailabilityZonesWrappedContainer = preferredAvailabilityZonesWrappedContainer { - let preferredAvailabilityZonesContainer = try preferredAvailabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var preferredAvailabilityZonesBuffer:[Swift.String]? = nil - if let preferredAvailabilityZonesContainer = preferredAvailabilityZonesContainer { - preferredAvailabilityZonesBuffer = [Swift.String]() - for stringContainer0 in preferredAvailabilityZonesContainer { - preferredAvailabilityZonesBuffer?.append(stringContainer0) - } - } - preferredAvailabilityZones = preferredAvailabilityZonesBuffer - } else { - preferredAvailabilityZones = [] - } - } else { - preferredAvailabilityZones = nil - } - if containerValues.contains(.preferredOutpostArns) { - struct KeyVal0{struct PreferredOutpostArn{}} - let preferredOutpostArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .preferredOutpostArns) - if let preferredOutpostArnsWrappedContainer = preferredOutpostArnsWrappedContainer { - let preferredOutpostArnsContainer = try preferredOutpostArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var preferredOutpostArnsBuffer:[Swift.String]? = nil - if let preferredOutpostArnsContainer = preferredOutpostArnsContainer { - preferredOutpostArnsBuffer = [Swift.String]() - for stringContainer0 in preferredOutpostArnsContainer { - preferredOutpostArnsBuffer?.append(stringContainer0) - } - } - preferredOutpostArns = preferredOutpostArnsBuffer - } else { - preferredOutpostArns = [] - } - } else { - preferredOutpostArns = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ConfigureShard() + value.nodeGroupId = try reader["NodeGroupId"].readIfPresent() + value.newReplicaCount = try reader["NewReplicaCount"].readIfPresent() + value.preferredAvailabilityZones = try reader["PreferredAvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "PreferredAvailabilityZone", isFlattened: false) + value.preferredOutpostArns = try reader["PreferredOutpostArns"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "PreferredOutpostArn", isFlattened: false) + return value } } } @@ -3843,6 +2996,13 @@ extension ElastiCacheClientTypes { } extension CopyServerlessCacheSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId = "KmsKeyId" + case sourceServerlessCacheSnapshotName = "SourceServerlessCacheSnapshotName" + case tags = "Tags" + case targetServerlessCacheSnapshotName = "TargetServerlessCacheSnapshotName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let kmsKeyId = kmsKeyId { @@ -3904,59 +3064,15 @@ public struct CopyServerlessCacheSnapshotInput: Swift.Equatable { } } -struct CopyServerlessCacheSnapshotInputBody: Swift.Equatable { - let sourceServerlessCacheSnapshotName: Swift.String? - let targetServerlessCacheSnapshotName: Swift.String? - let kmsKeyId: Swift.String? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension CopyServerlessCacheSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kmsKeyId = "KmsKeyId" - case sourceServerlessCacheSnapshotName = "SourceServerlessCacheSnapshotName" - case tags = "Tags" - case targetServerlessCacheSnapshotName = "TargetServerlessCacheSnapshotName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceServerlessCacheSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceServerlessCacheSnapshotName) - sourceServerlessCacheSnapshotName = sourceServerlessCacheSnapshotNameDecoded - let targetServerlessCacheSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetServerlessCacheSnapshotName) - targetServerlessCacheSnapshotName = targetServerlessCacheSnapshotNameDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CopyServerlessCacheSnapshotOutput { -extension CopyServerlessCacheSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyServerlessCacheSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.serverlessCacheSnapshot = output.serverlessCacheSnapshot - } else { - self.serverlessCacheSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyServerlessCacheSnapshotResult"] + var value = CopyServerlessCacheSnapshotOutput() + value.serverlessCacheSnapshot = try reader["ServerlessCacheSnapshot"].readIfPresent(readingClosure: ElastiCacheClientTypes.ServerlessCacheSnapshot.readingClosure) + return value } } } @@ -3973,41 +3089,39 @@ public struct CopyServerlessCacheSnapshotOutput: Swift.Equatable { } } -struct CopyServerlessCacheSnapshotOutputBody: Swift.Equatable { - let serverlessCacheSnapshot: ElastiCacheClientTypes.ServerlessCacheSnapshot? -} - -extension CopyServerlessCacheSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverlessCacheSnapshot = "ServerlessCacheSnapshot" - } +enum CopyServerlessCacheSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyServerlessCacheSnapshotResult")) - let serverlessCacheSnapshotDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServerlessCacheSnapshot.self, forKey: .serverlessCacheSnapshot) - serverlessCacheSnapshot = serverlessCacheSnapshotDecoded - } -} - -enum CopyServerlessCacheSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotAlreadyExistsFault": return try await ServerlessCacheSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotQuotaExceededFault": return try await ServerlessCacheSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotAlreadyExistsFault": return try await ServerlessCacheSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotQuotaExceededFault": return try await ServerlessCacheSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopySnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId = "KmsKeyId" + case sourceSnapshotName = "SourceSnapshotName" + case tags = "Tags" + case targetBucket = "TargetBucket" + case targetSnapshotName = "TargetSnapshotName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let kmsKeyId = kmsKeyId { @@ -4077,63 +3191,15 @@ public struct CopySnapshotInput: Swift.Equatable { } } -struct CopySnapshotInputBody: Swift.Equatable { - let sourceSnapshotName: Swift.String? - let targetSnapshotName: Swift.String? - let targetBucket: Swift.String? - let kmsKeyId: Swift.String? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension CopySnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kmsKeyId = "KmsKeyId" - case sourceSnapshotName = "SourceSnapshotName" - case tags = "Tags" - case targetBucket = "TargetBucket" - case targetSnapshotName = "TargetSnapshotName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSnapshotName) - sourceSnapshotName = sourceSnapshotNameDecoded - let targetSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetSnapshotName) - targetSnapshotName = targetSnapshotNameDecoded - let targetBucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetBucket) - targetBucket = targetBucketDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CopySnapshotOutput { -extension CopySnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopySnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopySnapshotResult"] + var value = CopySnapshotOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: ElastiCacheClientTypes.Snapshot.readingClosure) + return value } } } @@ -4150,40 +3216,63 @@ public struct CopySnapshotOutput: Swift.Equatable { } } -struct CopySnapshotOutputBody: Swift.Equatable { - let snapshot: ElastiCacheClientTypes.Snapshot? -} - -extension CopySnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopySnapshotResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum CopySnapshotOutputError { -enum CopySnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSnapshotState": return try await InvalidSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotAlreadyExistsFault": return try await SnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceededFault": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSnapshotState": return try await InvalidSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotAlreadyExistsFault": return try await SnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceededFault": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateCacheClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case azMode = "AZMode" + case authToken = "AuthToken" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case cacheClusterId = "CacheClusterId" + case cacheNodeType = "CacheNodeType" + case cacheParameterGroupName = "CacheParameterGroupName" + case cacheSecurityGroupNames = "CacheSecurityGroupNames" + case cacheSubnetGroupName = "CacheSubnetGroupName" + case engine = "Engine" + case engineVersion = "EngineVersion" + case ipDiscovery = "IpDiscovery" + case logDeliveryConfigurations = "LogDeliveryConfigurations" + case networkType = "NetworkType" + case notificationTopicArn = "NotificationTopicArn" + case numCacheNodes = "NumCacheNodes" + case outpostMode = "OutpostMode" + case port = "Port" + case preferredAvailabilityZone = "PreferredAvailabilityZone" + case preferredAvailabilityZones = "PreferredAvailabilityZones" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case preferredOutpostArn = "PreferredOutpostArn" + case preferredOutpostArns = "PreferredOutpostArns" + case replicationGroupId = "ReplicationGroupId" + case securityGroupIds = "SecurityGroupIds" + case snapshotArns = "SnapshotArns" + case snapshotName = "SnapshotName" + case snapshotRetentionLimit = "SnapshotRetentionLimit" + case snapshotWindow = "SnapshotWindow" + case tags = "Tags" + case transitEncryptionEnabled = "TransitEncryptionEnabled" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let azMode = azMode { @@ -4535,265 +3624,15 @@ public struct CreateCacheClusterInput: Swift.Equatable { } } -struct CreateCacheClusterInputBody: Swift.Equatable { - let cacheClusterId: Swift.String? - let replicationGroupId: Swift.String? - let azMode: ElastiCacheClientTypes.AZMode? - let preferredAvailabilityZone: Swift.String? - let preferredAvailabilityZones: [Swift.String]? - let numCacheNodes: Swift.Int? - let cacheNodeType: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let cacheParameterGroupName: Swift.String? - let cacheSubnetGroupName: Swift.String? - let cacheSecurityGroupNames: [Swift.String]? - let securityGroupIds: [Swift.String]? - let tags: [ElastiCacheClientTypes.Tag]? - let snapshotArns: [Swift.String]? - let snapshotName: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let port: Swift.Int? - let notificationTopicArn: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let snapshotRetentionLimit: Swift.Int? - let snapshotWindow: Swift.String? - let authToken: Swift.String? - let outpostMode: ElastiCacheClientTypes.OutpostMode? - let preferredOutpostArn: Swift.String? - let preferredOutpostArns: [Swift.String]? - let logDeliveryConfigurations: [ElastiCacheClientTypes.LogDeliveryConfigurationRequest]? - let transitEncryptionEnabled: Swift.Bool? - let networkType: ElastiCacheClientTypes.NetworkType? - let ipDiscovery: ElastiCacheClientTypes.IpDiscovery? -} - -extension CreateCacheClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case azMode = "AZMode" - case authToken = "AuthToken" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case cacheClusterId = "CacheClusterId" - case cacheNodeType = "CacheNodeType" - case cacheParameterGroupName = "CacheParameterGroupName" - case cacheSecurityGroupNames = "CacheSecurityGroupNames" - case cacheSubnetGroupName = "CacheSubnetGroupName" - case engine = "Engine" - case engineVersion = "EngineVersion" - case ipDiscovery = "IpDiscovery" - case logDeliveryConfigurations = "LogDeliveryConfigurations" - case networkType = "NetworkType" - case notificationTopicArn = "NotificationTopicArn" - case numCacheNodes = "NumCacheNodes" - case outpostMode = "OutpostMode" - case port = "Port" - case preferredAvailabilityZone = "PreferredAvailabilityZone" - case preferredAvailabilityZones = "PreferredAvailabilityZones" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case preferredOutpostArn = "PreferredOutpostArn" - case preferredOutpostArns = "PreferredOutpostArns" - case replicationGroupId = "ReplicationGroupId" - case securityGroupIds = "SecurityGroupIds" - case snapshotArns = "SnapshotArns" - case snapshotName = "SnapshotName" - case snapshotRetentionLimit = "SnapshotRetentionLimit" - case snapshotWindow = "SnapshotWindow" - case tags = "Tags" - case transitEncryptionEnabled = "TransitEncryptionEnabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let azModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AZMode.self, forKey: .azMode) - azMode = azModeDecoded - let preferredAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredAvailabilityZone) - preferredAvailabilityZone = preferredAvailabilityZoneDecoded - if containerValues.contains(.preferredAvailabilityZones) { - struct KeyVal0{struct PreferredAvailabilityZone{}} - let preferredAvailabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .preferredAvailabilityZones) - if let preferredAvailabilityZonesWrappedContainer = preferredAvailabilityZonesWrappedContainer { - let preferredAvailabilityZonesContainer = try preferredAvailabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var preferredAvailabilityZonesBuffer:[Swift.String]? = nil - if let preferredAvailabilityZonesContainer = preferredAvailabilityZonesContainer { - preferredAvailabilityZonesBuffer = [Swift.String]() - for stringContainer0 in preferredAvailabilityZonesContainer { - preferredAvailabilityZonesBuffer?.append(stringContainer0) - } - } - preferredAvailabilityZones = preferredAvailabilityZonesBuffer - } else { - preferredAvailabilityZones = [] - } - } else { - preferredAvailabilityZones = nil - } - let numCacheNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numCacheNodes) - numCacheNodes = numCacheNodesDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - if containerValues.contains(.cacheSecurityGroupNames) { - struct KeyVal0{struct CacheSecurityGroupName{}} - let cacheSecurityGroupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheSecurityGroupNames) - if let cacheSecurityGroupNamesWrappedContainer = cacheSecurityGroupNamesWrappedContainer { - let cacheSecurityGroupNamesContainer = try cacheSecurityGroupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheSecurityGroupNamesBuffer:[Swift.String]? = nil - if let cacheSecurityGroupNamesContainer = cacheSecurityGroupNamesContainer { - cacheSecurityGroupNamesBuffer = [Swift.String]() - for stringContainer0 in cacheSecurityGroupNamesContainer { - cacheSecurityGroupNamesBuffer?.append(stringContainer0) - } - } - cacheSecurityGroupNames = cacheSecurityGroupNamesBuffer - } else { - cacheSecurityGroupNames = [] - } - } else { - cacheSecurityGroupNames = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.snapshotArns) { - struct KeyVal0{struct SnapshotArn{}} - let snapshotArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotArns) - if let snapshotArnsWrappedContainer = snapshotArnsWrappedContainer { - let snapshotArnsContainer = try snapshotArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var snapshotArnsBuffer:[Swift.String]? = nil - if let snapshotArnsContainer = snapshotArnsContainer { - snapshotArnsBuffer = [Swift.String]() - for stringContainer0 in snapshotArnsContainer { - snapshotArnsBuffer?.append(stringContainer0) - } - } - snapshotArns = snapshotArnsBuffer - } else { - snapshotArns = [] - } - } else { - snapshotArns = nil - } - let snapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotName) - snapshotName = snapshotNameDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let notificationTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTopicArn) - notificationTopicArn = notificationTopicArnDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let snapshotWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotWindow) - snapshotWindow = snapshotWindowDecoded - let authTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authToken) - authToken = authTokenDecoded - let outpostModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.OutpostMode.self, forKey: .outpostMode) - outpostMode = outpostModeDecoded - let preferredOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredOutpostArn) - preferredOutpostArn = preferredOutpostArnDecoded - if containerValues.contains(.preferredOutpostArns) { - struct KeyVal0{struct PreferredOutpostArn{}} - let preferredOutpostArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .preferredOutpostArns) - if let preferredOutpostArnsWrappedContainer = preferredOutpostArnsWrappedContainer { - let preferredOutpostArnsContainer = try preferredOutpostArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var preferredOutpostArnsBuffer:[Swift.String]? = nil - if let preferredOutpostArnsContainer = preferredOutpostArnsContainer { - preferredOutpostArnsBuffer = [Swift.String]() - for stringContainer0 in preferredOutpostArnsContainer { - preferredOutpostArnsBuffer?.append(stringContainer0) - } - } - preferredOutpostArns = preferredOutpostArnsBuffer - } else { - preferredOutpostArns = [] - } - } else { - preferredOutpostArns = nil - } - if containerValues.contains(.logDeliveryConfigurations) { - struct KeyVal0{struct LogDeliveryConfigurationRequest{}} - let logDeliveryConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logDeliveryConfigurations) - if let logDeliveryConfigurationsWrappedContainer = logDeliveryConfigurationsWrappedContainer { - let logDeliveryConfigurationsContainer = try logDeliveryConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.LogDeliveryConfigurationRequest].self, forKey: .member) - var logDeliveryConfigurationsBuffer:[ElastiCacheClientTypes.LogDeliveryConfigurationRequest]? = nil - if let logDeliveryConfigurationsContainer = logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer = [ElastiCacheClientTypes.LogDeliveryConfigurationRequest]() - for structureContainer0 in logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer?.append(structureContainer0) - } - } - logDeliveryConfigurations = logDeliveryConfigurationsBuffer - } else { - logDeliveryConfigurations = [] - } - } else { - logDeliveryConfigurations = nil - } - let transitEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .transitEncryptionEnabled) - transitEncryptionEnabled = transitEncryptionEnabledDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NetworkType.self, forKey: .networkType) - networkType = networkTypeDecoded - let ipDiscoveryDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.IpDiscovery.self, forKey: .ipDiscovery) - ipDiscovery = ipDiscoveryDecoded - } -} +extension CreateCacheClusterOutput { -extension CreateCacheClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCacheClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheCluster = output.cacheCluster - } else { - self.cacheCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateCacheClusterResult"] + var value = CreateCacheClusterOutput() + value.cacheCluster = try reader["CacheCluster"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheCluster.readingClosure) + return value } } } @@ -4810,47 +3649,44 @@ public struct CreateCacheClusterOutput: Swift.Equatable { } } -struct CreateCacheClusterOutputBody: Swift.Equatable { - let cacheCluster: ElastiCacheClientTypes.CacheCluster? -} - -extension CreateCacheClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheCluster = "CacheCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateCacheClusterResult")) - let cacheClusterDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheCluster.self, forKey: .cacheCluster) - cacheCluster = cacheClusterDecoded - } -} +enum CreateCacheClusterOutputError { -enum CreateCacheClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterAlreadyExists": return try await CacheClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterQuotaForCustomerExceeded": return try await ClusterQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForClusterExceeded": return try await NodeQuotaForClusterExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterAlreadyExists": return try await CacheClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterQuotaForCustomerExceeded": return try await ClusterQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForClusterExceeded": return try await NodeQuotaForClusterExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateCacheParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheParameterGroupFamily = "CacheParameterGroupFamily" + case cacheParameterGroupName = "CacheParameterGroupName" + case description = "Description" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheParameterGroupFamily = cacheParameterGroupFamily { @@ -4914,59 +3750,15 @@ public struct CreateCacheParameterGroupInput: Swift.Equatable { } } -struct CreateCacheParameterGroupInputBody: Swift.Equatable { - let cacheParameterGroupName: Swift.String? - let cacheParameterGroupFamily: Swift.String? - let description: Swift.String? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension CreateCacheParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupFamily = "CacheParameterGroupFamily" - case cacheParameterGroupName = "CacheParameterGroupName" - case description = "Description" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let cacheParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupFamily) - cacheParameterGroupFamily = cacheParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateCacheParameterGroupOutput { -extension CreateCacheParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCacheParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheParameterGroup = output.cacheParameterGroup - } else { - self.cacheParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateCacheParameterGroupResult"] + var value = CreateCacheParameterGroupOutput() + value.cacheParameterGroup = try reader["CacheParameterGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheParameterGroup.readingClosure) + return value } } } @@ -4983,39 +3775,35 @@ public struct CreateCacheParameterGroupOutput: Swift.Equatable { } } -struct CreateCacheParameterGroupOutputBody: Swift.Equatable { - let cacheParameterGroup: ElastiCacheClientTypes.CacheParameterGroup? -} - -extension CreateCacheParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroup = "CacheParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateCacheParameterGroupResult")) - let cacheParameterGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheParameterGroup.self, forKey: .cacheParameterGroup) - cacheParameterGroup = cacheParameterGroupDecoded - } -} +enum CreateCacheParameterGroupOutputError { -enum CreateCacheParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheParameterGroupAlreadyExists": return try await CacheParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheParameterGroupQuotaExceeded": return try await CacheParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheParameterGroupState": return try await InvalidCacheParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheParameterGroupAlreadyExists": return try await CacheParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheParameterGroupQuotaExceeded": return try await CacheParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheParameterGroupState": return try await InvalidCacheParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateCacheSecurityGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheSecurityGroupName = "CacheSecurityGroupName" + case description = "Description" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSecurityGroupName = cacheSecurityGroupName { @@ -5071,55 +3859,15 @@ public struct CreateCacheSecurityGroupInput: Swift.Equatable { } } -struct CreateCacheSecurityGroupInputBody: Swift.Equatable { - let cacheSecurityGroupName: Swift.String? - let description: Swift.String? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension CreateCacheSecurityGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroupName = "CacheSecurityGroupName" - case description = "Description" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSecurityGroupName) - cacheSecurityGroupName = cacheSecurityGroupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateCacheSecurityGroupOutput { -extension CreateCacheSecurityGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCacheSecurityGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheSecurityGroup = output.cacheSecurityGroup - } else { - self.cacheSecurityGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateCacheSecurityGroupResult"] + var value = CreateCacheSecurityGroupOutput() + value.cacheSecurityGroup = try reader["CacheSecurityGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheSecurityGroup.readingClosure) + return value } } } @@ -5142,38 +3890,35 @@ public struct CreateCacheSecurityGroupOutput: Swift.Equatable { } } -struct CreateCacheSecurityGroupOutputBody: Swift.Equatable { - let cacheSecurityGroup: ElastiCacheClientTypes.CacheSecurityGroup? -} +enum CreateCacheSecurityGroupOutputError { -extension CreateCacheSecurityGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroup = "CacheSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateCacheSecurityGroupResult")) - let cacheSecurityGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheSecurityGroup.self, forKey: .cacheSecurityGroup) - cacheSecurityGroup = cacheSecurityGroupDecoded - } -} - -enum CreateCacheSecurityGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheSecurityGroupAlreadyExists": return try await CacheSecurityGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "QuotaExceeded.CacheSecurityGroup": return try await CacheSecurityGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheSecurityGroupAlreadyExists": return try await CacheSecurityGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "QuotaExceeded.CacheSecurityGroup": return try await CacheSecurityGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateCacheSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheSubnetGroupDescription = "CacheSubnetGroupDescription" + case cacheSubnetGroupName = "CacheSubnetGroupName" + case subnetIds = "SubnetIds" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSubnetGroupDescription = cacheSubnetGroupDescription { @@ -5246,76 +3991,15 @@ public struct CreateCacheSubnetGroupInput: Swift.Equatable { } } -struct CreateCacheSubnetGroupInputBody: Swift.Equatable { - let cacheSubnetGroupName: Swift.String? - let cacheSubnetGroupDescription: Swift.String? - let subnetIds: [Swift.String]? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension CreateCacheSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSubnetGroupDescription = "CacheSubnetGroupDescription" - case cacheSubnetGroupName = "CacheSubnetGroupName" - case subnetIds = "SubnetIds" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - let cacheSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupDescription) - cacheSubnetGroupDescription = cacheSubnetGroupDescriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateCacheSubnetGroupOutput { -extension CreateCacheSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCacheSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheSubnetGroup = output.cacheSubnetGroup - } else { - self.cacheSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateCacheSubnetGroupResult"] + var value = CreateCacheSubnetGroupOutput() + value.cacheSubnetGroup = try reader["CacheSubnetGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheSubnetGroup.readingClosure) + return value } } } @@ -5336,39 +4020,35 @@ public struct CreateCacheSubnetGroupOutput: Swift.Equatable { } } -struct CreateCacheSubnetGroupOutputBody: Swift.Equatable { - let cacheSubnetGroup: ElastiCacheClientTypes.CacheSubnetGroup? -} - -extension CreateCacheSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSubnetGroup = "CacheSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateCacheSubnetGroupResult")) - let cacheSubnetGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheSubnetGroup.self, forKey: .cacheSubnetGroup) - cacheSubnetGroup = cacheSubnetGroupDecoded - } -} +enum CreateCacheSubnetGroupOutputError { -enum CreateCacheSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheSubnetGroupAlreadyExists": return try await CacheSubnetGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetGroupQuotaExceeded": return try await CacheSubnetGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetQuotaExceededFault": return try await CacheSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetNotAllowedFault": return try await SubnetNotAllowedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheSubnetGroupAlreadyExists": return try await CacheSubnetGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetGroupQuotaExceeded": return try await CacheSubnetGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetQuotaExceededFault": return try await CacheSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetNotAllowedFault": return try await SubnetNotAllowedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateGlobalReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalReplicationGroupDescription = "GlobalReplicationGroupDescription" + case globalReplicationGroupIdSuffix = "GlobalReplicationGroupIdSuffix" + case primaryReplicationGroupId = "PrimaryReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalReplicationGroupDescription = globalReplicationGroupDescription { @@ -5414,38 +4094,15 @@ public struct CreateGlobalReplicationGroupInput: Swift.Equatable { } } -struct CreateGlobalReplicationGroupInputBody: Swift.Equatable { - let globalReplicationGroupIdSuffix: Swift.String? - let globalReplicationGroupDescription: Swift.String? - let primaryReplicationGroupId: Swift.String? -} - -extension CreateGlobalReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroupDescription = "GlobalReplicationGroupDescription" - case globalReplicationGroupIdSuffix = "GlobalReplicationGroupIdSuffix" - case primaryReplicationGroupId = "PrimaryReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdSuffixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupIdSuffix) - globalReplicationGroupIdSuffix = globalReplicationGroupIdSuffixDecoded - let globalReplicationGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupDescription) - globalReplicationGroupDescription = globalReplicationGroupDescriptionDecoded - let primaryReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryReplicationGroupId) - primaryReplicationGroupId = primaryReplicationGroupIdDecoded - } -} +extension CreateGlobalReplicationGroupOutput { -extension CreateGlobalReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateGlobalReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroup = output.globalReplicationGroup - } else { - self.globalReplicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateGlobalReplicationGroupResult"] + var value = CreateGlobalReplicationGroupOutput() + value.globalReplicationGroup = try reader["GlobalReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure) + return value } } } @@ -5464,38 +4121,70 @@ public struct CreateGlobalReplicationGroupOutput: Swift.Equatable { } } -struct CreateGlobalReplicationGroupOutputBody: Swift.Equatable { - let globalReplicationGroup: ElastiCacheClientTypes.GlobalReplicationGroup? -} - -extension CreateGlobalReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroup = "GlobalReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateGlobalReplicationGroupResult")) - let globalReplicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroup.self, forKey: .globalReplicationGroup) - globalReplicationGroup = globalReplicationGroupDecoded - } -} +enum CreateGlobalReplicationGroupOutputError { -enum CreateGlobalReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupAlreadyExistsFault": return try await GlobalReplicationGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupAlreadyExistsFault": return try await GlobalReplicationGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case atRestEncryptionEnabled = "AtRestEncryptionEnabled" + case authToken = "AuthToken" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case automaticFailoverEnabled = "AutomaticFailoverEnabled" + case cacheNodeType = "CacheNodeType" + case cacheParameterGroupName = "CacheParameterGroupName" + case cacheSecurityGroupNames = "CacheSecurityGroupNames" + case cacheSubnetGroupName = "CacheSubnetGroupName" + case clusterMode = "ClusterMode" + case dataTieringEnabled = "DataTieringEnabled" + case engine = "Engine" + case engineVersion = "EngineVersion" + case globalReplicationGroupId = "GlobalReplicationGroupId" + case ipDiscovery = "IpDiscovery" + case kmsKeyId = "KmsKeyId" + case logDeliveryConfigurations = "LogDeliveryConfigurations" + case multiAZEnabled = "MultiAZEnabled" + case networkType = "NetworkType" + case nodeGroupConfiguration = "NodeGroupConfiguration" + case notificationTopicArn = "NotificationTopicArn" + case numCacheClusters = "NumCacheClusters" + case numNodeGroups = "NumNodeGroups" + case port = "Port" + case preferredCacheClusterAZs = "PreferredCacheClusterAZs" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case primaryClusterId = "PrimaryClusterId" + case replicasPerNodeGroup = "ReplicasPerNodeGroup" + case replicationGroupDescription = "ReplicationGroupDescription" + case replicationGroupId = "ReplicationGroupId" + case securityGroupIds = "SecurityGroupIds" + case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" + case snapshotArns = "SnapshotArns" + case snapshotName = "SnapshotName" + case snapshotRetentionLimit = "SnapshotRetentionLimit" + case snapshotWindow = "SnapshotWindow" + case tags = "Tags" + case transitEncryptionEnabled = "TransitEncryptionEnabled" + case transitEncryptionMode = "TransitEncryptionMode" + case userGroupIds = "UserGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let atRestEncryptionEnabled = atRestEncryptionEnabled { @@ -5941,318 +4630,15 @@ public struct CreateReplicationGroupInput: Swift.Equatable { } } -struct CreateReplicationGroupInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let replicationGroupDescription: Swift.String? - let globalReplicationGroupId: Swift.String? - let primaryClusterId: Swift.String? - let automaticFailoverEnabled: Swift.Bool? - let multiAZEnabled: Swift.Bool? - let numCacheClusters: Swift.Int? - let preferredCacheClusterAZs: [Swift.String]? - let numNodeGroups: Swift.Int? - let replicasPerNodeGroup: Swift.Int? - let nodeGroupConfiguration: [ElastiCacheClientTypes.NodeGroupConfiguration]? - let cacheNodeType: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let cacheParameterGroupName: Swift.String? - let cacheSubnetGroupName: Swift.String? - let cacheSecurityGroupNames: [Swift.String]? - let securityGroupIds: [Swift.String]? - let tags: [ElastiCacheClientTypes.Tag]? - let snapshotArns: [Swift.String]? - let snapshotName: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let port: Swift.Int? - let notificationTopicArn: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let snapshotRetentionLimit: Swift.Int? - let snapshotWindow: Swift.String? - let authToken: Swift.String? - let transitEncryptionEnabled: Swift.Bool? - let atRestEncryptionEnabled: Swift.Bool? - let kmsKeyId: Swift.String? - let userGroupIds: [Swift.String]? - let logDeliveryConfigurations: [ElastiCacheClientTypes.LogDeliveryConfigurationRequest]? - let dataTieringEnabled: Swift.Bool? - let networkType: ElastiCacheClientTypes.NetworkType? - let ipDiscovery: ElastiCacheClientTypes.IpDiscovery? - let transitEncryptionMode: ElastiCacheClientTypes.TransitEncryptionMode? - let clusterMode: ElastiCacheClientTypes.ClusterMode? - let serverlessCacheSnapshotName: Swift.String? -} - -extension CreateReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case atRestEncryptionEnabled = "AtRestEncryptionEnabled" - case authToken = "AuthToken" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case automaticFailoverEnabled = "AutomaticFailoverEnabled" - case cacheNodeType = "CacheNodeType" - case cacheParameterGroupName = "CacheParameterGroupName" - case cacheSecurityGroupNames = "CacheSecurityGroupNames" - case cacheSubnetGroupName = "CacheSubnetGroupName" - case clusterMode = "ClusterMode" - case dataTieringEnabled = "DataTieringEnabled" - case engine = "Engine" - case engineVersion = "EngineVersion" - case globalReplicationGroupId = "GlobalReplicationGroupId" - case ipDiscovery = "IpDiscovery" - case kmsKeyId = "KmsKeyId" - case logDeliveryConfigurations = "LogDeliveryConfigurations" - case multiAZEnabled = "MultiAZEnabled" - case networkType = "NetworkType" - case nodeGroupConfiguration = "NodeGroupConfiguration" - case notificationTopicArn = "NotificationTopicArn" - case numCacheClusters = "NumCacheClusters" - case numNodeGroups = "NumNodeGroups" - case port = "Port" - case preferredCacheClusterAZs = "PreferredCacheClusterAZs" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case primaryClusterId = "PrimaryClusterId" - case replicasPerNodeGroup = "ReplicasPerNodeGroup" - case replicationGroupDescription = "ReplicationGroupDescription" - case replicationGroupId = "ReplicationGroupId" - case securityGroupIds = "SecurityGroupIds" - case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" - case snapshotArns = "SnapshotArns" - case snapshotName = "SnapshotName" - case snapshotRetentionLimit = "SnapshotRetentionLimit" - case snapshotWindow = "SnapshotWindow" - case tags = "Tags" - case transitEncryptionEnabled = "TransitEncryptionEnabled" - case transitEncryptionMode = "TransitEncryptionMode" - case userGroupIds = "UserGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let replicationGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupDescription) - replicationGroupDescription = replicationGroupDescriptionDecoded - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let primaryClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryClusterId) - primaryClusterId = primaryClusterIdDecoded - let automaticFailoverEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .automaticFailoverEnabled) - automaticFailoverEnabled = automaticFailoverEnabledDecoded - let multiAZEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZEnabled) - multiAZEnabled = multiAZEnabledDecoded - let numCacheClustersDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numCacheClusters) - numCacheClusters = numCacheClustersDecoded - if containerValues.contains(.preferredCacheClusterAZs) { - struct KeyVal0{struct AvailabilityZone{}} - let preferredCacheClusterAZsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .preferredCacheClusterAZs) - if let preferredCacheClusterAZsWrappedContainer = preferredCacheClusterAZsWrappedContainer { - let preferredCacheClusterAZsContainer = try preferredCacheClusterAZsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var preferredCacheClusterAZsBuffer:[Swift.String]? = nil - if let preferredCacheClusterAZsContainer = preferredCacheClusterAZsContainer { - preferredCacheClusterAZsBuffer = [Swift.String]() - for stringContainer0 in preferredCacheClusterAZsContainer { - preferredCacheClusterAZsBuffer?.append(stringContainer0) - } - } - preferredCacheClusterAZs = preferredCacheClusterAZsBuffer - } else { - preferredCacheClusterAZs = [] - } - } else { - preferredCacheClusterAZs = nil - } - let numNodeGroupsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numNodeGroups) - numNodeGroups = numNodeGroupsDecoded - let replicasPerNodeGroupDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .replicasPerNodeGroup) - replicasPerNodeGroup = replicasPerNodeGroupDecoded - if containerValues.contains(.nodeGroupConfiguration) { - struct KeyVal0{struct NodeGroupConfiguration{}} - let nodeGroupConfigurationWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeGroupConfiguration) - if let nodeGroupConfigurationWrappedContainer = nodeGroupConfigurationWrappedContainer { - let nodeGroupConfigurationContainer = try nodeGroupConfigurationWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.NodeGroupConfiguration].self, forKey: .member) - var nodeGroupConfigurationBuffer:[ElastiCacheClientTypes.NodeGroupConfiguration]? = nil - if let nodeGroupConfigurationContainer = nodeGroupConfigurationContainer { - nodeGroupConfigurationBuffer = [ElastiCacheClientTypes.NodeGroupConfiguration]() - for structureContainer0 in nodeGroupConfigurationContainer { - nodeGroupConfigurationBuffer?.append(structureContainer0) - } - } - nodeGroupConfiguration = nodeGroupConfigurationBuffer - } else { - nodeGroupConfiguration = [] - } - } else { - nodeGroupConfiguration = nil - } - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - if containerValues.contains(.cacheSecurityGroupNames) { - struct KeyVal0{struct CacheSecurityGroupName{}} - let cacheSecurityGroupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheSecurityGroupNames) - if let cacheSecurityGroupNamesWrappedContainer = cacheSecurityGroupNamesWrappedContainer { - let cacheSecurityGroupNamesContainer = try cacheSecurityGroupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheSecurityGroupNamesBuffer:[Swift.String]? = nil - if let cacheSecurityGroupNamesContainer = cacheSecurityGroupNamesContainer { - cacheSecurityGroupNamesBuffer = [Swift.String]() - for stringContainer0 in cacheSecurityGroupNamesContainer { - cacheSecurityGroupNamesBuffer?.append(stringContainer0) - } - } - cacheSecurityGroupNames = cacheSecurityGroupNamesBuffer - } else { - cacheSecurityGroupNames = [] - } - } else { - cacheSecurityGroupNames = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.snapshotArns) { - struct KeyVal0{struct SnapshotArn{}} - let snapshotArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotArns) - if let snapshotArnsWrappedContainer = snapshotArnsWrappedContainer { - let snapshotArnsContainer = try snapshotArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var snapshotArnsBuffer:[Swift.String]? = nil - if let snapshotArnsContainer = snapshotArnsContainer { - snapshotArnsBuffer = [Swift.String]() - for stringContainer0 in snapshotArnsContainer { - snapshotArnsBuffer?.append(stringContainer0) - } - } - snapshotArns = snapshotArnsBuffer - } else { - snapshotArns = [] - } - } else { - snapshotArns = nil - } - let snapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotName) - snapshotName = snapshotNameDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let notificationTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTopicArn) - notificationTopicArn = notificationTopicArnDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let snapshotWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotWindow) - snapshotWindow = snapshotWindowDecoded - let authTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authToken) - authToken = authTokenDecoded - let transitEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .transitEncryptionEnabled) - transitEncryptionEnabled = transitEncryptionEnabledDecoded - let atRestEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .atRestEncryptionEnabled) - atRestEncryptionEnabled = atRestEncryptionEnabledDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.userGroupIds) { - struct KeyVal0{struct member{}} - let userGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIds) - if let userGroupIdsWrappedContainer = userGroupIdsWrappedContainer { - let userGroupIdsContainer = try userGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsBuffer:[Swift.String]? = nil - if let userGroupIdsContainer = userGroupIdsContainer { - userGroupIdsBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsContainer { - userGroupIdsBuffer?.append(stringContainer0) - } - } - userGroupIds = userGroupIdsBuffer - } else { - userGroupIds = [] - } - } else { - userGroupIds = nil - } - if containerValues.contains(.logDeliveryConfigurations) { - struct KeyVal0{struct LogDeliveryConfigurationRequest{}} - let logDeliveryConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logDeliveryConfigurations) - if let logDeliveryConfigurationsWrappedContainer = logDeliveryConfigurationsWrappedContainer { - let logDeliveryConfigurationsContainer = try logDeliveryConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.LogDeliveryConfigurationRequest].self, forKey: .member) - var logDeliveryConfigurationsBuffer:[ElastiCacheClientTypes.LogDeliveryConfigurationRequest]? = nil - if let logDeliveryConfigurationsContainer = logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer = [ElastiCacheClientTypes.LogDeliveryConfigurationRequest]() - for structureContainer0 in logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer?.append(structureContainer0) - } - } - logDeliveryConfigurations = logDeliveryConfigurationsBuffer - } else { - logDeliveryConfigurations = [] - } - } else { - logDeliveryConfigurations = nil - } - let dataTieringEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dataTieringEnabled) - dataTieringEnabled = dataTieringEnabledDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NetworkType.self, forKey: .networkType) - networkType = networkTypeDecoded - let ipDiscoveryDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.IpDiscovery.self, forKey: .ipDiscovery) - ipDiscovery = ipDiscoveryDecoded - let transitEncryptionModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.TransitEncryptionMode.self, forKey: .transitEncryptionMode) - transitEncryptionMode = transitEncryptionModeDecoded - let clusterModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ClusterMode.self, forKey: .clusterMode) - clusterMode = clusterModeDecoded - let serverlessCacheSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheSnapshotName) - serverlessCacheSnapshotName = serverlessCacheSnapshotNameDecoded - } -} +extension CreateReplicationGroupOutput { -extension CreateReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateReplicationGroupResult"] + var value = CreateReplicationGroupOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -6269,52 +4655,58 @@ public struct CreateReplicationGroupOutput: Swift.Equatable { } } -struct CreateReplicationGroupOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension CreateReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateReplicationGroupResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} +enum CreateReplicationGroupOutputError { -enum CreateReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterQuotaForCustomerExceeded": return try await ClusterQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserGroupState": return try await InvalidUserGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeGroupsPerReplicationGroupQuotaExceeded": return try await NodeGroupsPerReplicationGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForClusterExceeded": return try await NodeQuotaForClusterExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupAlreadyExists": return try await ReplicationGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterQuotaForCustomerExceeded": return try await ClusterQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserGroupState": return try await InvalidUserGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeGroupsPerReplicationGroupQuotaExceeded": return try await NodeGroupsPerReplicationGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForClusterExceeded": return try await NodeQuotaForClusterExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupAlreadyExists": return try await ReplicationGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateServerlessCacheInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheUsageLimits = "CacheUsageLimits" + case dailySnapshotTime = "DailySnapshotTime" + case description = "Description" + case engine = "Engine" + case kmsKeyId = "KmsKeyId" + case majorEngineVersion = "MajorEngineVersion" + case securityGroupIds = "SecurityGroupIds" + case serverlessCacheName = "ServerlessCacheName" + case snapshotArnsToRestore = "SnapshotArnsToRestore" + case snapshotRetentionLimit = "SnapshotRetentionLimit" + case subnetIds = "SubnetIds" + case tags = "Tags" + case userGroupId = "UserGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheUsageLimits = cacheUsageLimits { @@ -6466,146 +4858,15 @@ public struct CreateServerlessCacheInput: Swift.Equatable { } } -struct CreateServerlessCacheInputBody: Swift.Equatable { - let serverlessCacheName: Swift.String? - let description: Swift.String? - let engine: Swift.String? - let majorEngineVersion: Swift.String? - let cacheUsageLimits: ElastiCacheClientTypes.CacheUsageLimits? - let kmsKeyId: Swift.String? - let securityGroupIds: [Swift.String]? - let snapshotArnsToRestore: [Swift.String]? - let tags: [ElastiCacheClientTypes.Tag]? - let userGroupId: Swift.String? - let subnetIds: [Swift.String]? - let snapshotRetentionLimit: Swift.Int? - let dailySnapshotTime: Swift.String? -} - -extension CreateServerlessCacheInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheUsageLimits = "CacheUsageLimits" - case dailySnapshotTime = "DailySnapshotTime" - case description = "Description" - case engine = "Engine" - case kmsKeyId = "KmsKeyId" - case majorEngineVersion = "MajorEngineVersion" - case securityGroupIds = "SecurityGroupIds" - case serverlessCacheName = "ServerlessCacheName" - case snapshotArnsToRestore = "SnapshotArnsToRestore" - case snapshotRetentionLimit = "SnapshotRetentionLimit" - case subnetIds = "SubnetIds" - case tags = "Tags" - case userGroupId = "UserGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheName) - serverlessCacheName = serverlessCacheNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - let cacheUsageLimitsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheUsageLimits.self, forKey: .cacheUsageLimits) - cacheUsageLimits = cacheUsageLimitsDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - if containerValues.contains(.snapshotArnsToRestore) { - struct KeyVal0{struct SnapshotArn{}} - let snapshotArnsToRestoreWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotArnsToRestore) - if let snapshotArnsToRestoreWrappedContainer = snapshotArnsToRestoreWrappedContainer { - let snapshotArnsToRestoreContainer = try snapshotArnsToRestoreWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var snapshotArnsToRestoreBuffer:[Swift.String]? = nil - if let snapshotArnsToRestoreContainer = snapshotArnsToRestoreContainer { - snapshotArnsToRestoreBuffer = [Swift.String]() - for stringContainer0 in snapshotArnsToRestoreContainer { - snapshotArnsToRestoreBuffer?.append(stringContainer0) - } - } - snapshotArnsToRestore = snapshotArnsToRestoreBuffer - } else { - snapshotArnsToRestore = [] - } - } else { - snapshotArnsToRestore = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetId{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let dailySnapshotTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dailySnapshotTime) - dailySnapshotTime = dailySnapshotTimeDecoded - } -} +extension CreateServerlessCacheOutput { -extension CreateServerlessCacheOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateServerlessCacheOutputBody = try responseDecoder.decode(responseBody: data) - self.serverlessCache = output.serverlessCache - } else { - self.serverlessCache = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateServerlessCacheResult"] + var value = CreateServerlessCacheOutput() + value.serverlessCache = try reader["ServerlessCache"].readIfPresent(readingClosure: ElastiCacheClientTypes.ServerlessCache.readingClosure) + return value } } } @@ -6622,44 +4883,41 @@ public struct CreateServerlessCacheOutput: Swift.Equatable { } } -struct CreateServerlessCacheOutputBody: Swift.Equatable { - let serverlessCache: ElastiCacheClientTypes.ServerlessCache? -} - -extension CreateServerlessCacheOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverlessCache = "ServerlessCache" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateServerlessCacheResult")) - let serverlessCacheDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServerlessCache.self, forKey: .serverlessCache) - serverlessCache = serverlessCacheDecoded - } -} +enum CreateServerlessCacheOutputError { -enum CreateServerlessCacheOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidCredentialsException": return try await InvalidCredentialsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserGroupState": return try await InvalidUserGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheAlreadyExistsFault": return try await ServerlessCacheAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheQuotaForCustomerExceededFault": return try await ServerlessCacheQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidCredentialsException": return try await InvalidCredentialsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserGroupState": return try await InvalidUserGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheAlreadyExistsFault": return try await ServerlessCacheAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheQuotaForCustomerExceededFault": return try await ServerlessCacheQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateServerlessCacheSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId = "KmsKeyId" + case serverlessCacheName = "ServerlessCacheName" + case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let kmsKeyId = kmsKeyId { @@ -6721,59 +4979,15 @@ public struct CreateServerlessCacheSnapshotInput: Swift.Equatable { } } -struct CreateServerlessCacheSnapshotInputBody: Swift.Equatable { - let serverlessCacheSnapshotName: Swift.String? - let serverlessCacheName: Swift.String? - let kmsKeyId: Swift.String? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension CreateServerlessCacheSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kmsKeyId = "KmsKeyId" - case serverlessCacheName = "ServerlessCacheName" - case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheSnapshotName) - serverlessCacheSnapshotName = serverlessCacheSnapshotNameDecoded - let serverlessCacheNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheName) - serverlessCacheName = serverlessCacheNameDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateServerlessCacheSnapshotOutput { -extension CreateServerlessCacheSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateServerlessCacheSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.serverlessCacheSnapshot = output.serverlessCacheSnapshot - } else { - self.serverlessCacheSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateServerlessCacheSnapshotResult"] + var value = CreateServerlessCacheSnapshotOutput() + value.serverlessCacheSnapshot = try reader["ServerlessCacheSnapshot"].readIfPresent(readingClosure: ElastiCacheClientTypes.ServerlessCacheSnapshot.readingClosure) + return value } } } @@ -6790,41 +5004,39 @@ public struct CreateServerlessCacheSnapshotOutput: Swift.Equatable { } } -struct CreateServerlessCacheSnapshotOutputBody: Swift.Equatable { - let serverlessCacheSnapshot: ElastiCacheClientTypes.ServerlessCacheSnapshot? -} - -extension CreateServerlessCacheSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverlessCacheSnapshot = "ServerlessCacheSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateServerlessCacheSnapshotResult")) - let serverlessCacheSnapshotDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServerlessCacheSnapshot.self, forKey: .serverlessCacheSnapshot) - serverlessCacheSnapshot = serverlessCacheSnapshotDecoded - } -} +enum CreateServerlessCacheSnapshotOutputError { -enum CreateServerlessCacheSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotAlreadyExistsFault": return try await ServerlessCacheSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotQuotaExceededFault": return try await ServerlessCacheSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotAlreadyExistsFault": return try await ServerlessCacheSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotQuotaExceededFault": return try await ServerlessCacheSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheClusterId = "CacheClusterId" + case kmsKeyId = "KmsKeyId" + case replicationGroupId = "ReplicationGroupId" + case snapshotName = "SnapshotName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterId = cacheClusterId { @@ -6893,65 +5105,17 @@ public struct CreateSnapshotInput: Swift.Equatable { } } -struct CreateSnapshotInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let cacheClusterId: Swift.String? - let snapshotName: Swift.String? - let kmsKeyId: Swift.String? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension CreateSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterId = "CacheClusterId" - case kmsKeyId = "KmsKeyId" - case replicationGroupId = "ReplicationGroupId" - case snapshotName = "SnapshotName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let snapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotName) - snapshotName = snapshotNameDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil - } - } +extension CreateSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateSnapshotResult"] + var value = CreateSnapshotOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: ElastiCacheClientTypes.Snapshot.readingClosure) + return value + } + } } public struct CreateSnapshotOutput: Swift.Equatable { @@ -6966,43 +5130,40 @@ public struct CreateSnapshotOutput: Swift.Equatable { } } -struct CreateSnapshotOutputBody: Swift.Equatable { - let snapshot: ElastiCacheClientTypes.Snapshot? -} - -extension CreateSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateSnapshotResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum CreateSnapshotOutputError { -enum CreateSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotAlreadyExistsFault": return try await SnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotFeatureNotSupportedFault": return try await SnapshotFeatureNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceededFault": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotAlreadyExistsFault": return try await SnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotFeatureNotSupportedFault": return try await SnapshotFeatureNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceededFault": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateUserGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case engine = "Engine" + case tags = "Tags" + case userGroupId = "UserGroupId" + case userIds = "UserIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let engine = engine { @@ -7073,92 +5234,23 @@ public struct CreateUserGroupInput: Swift.Equatable { } } -struct CreateUserGroupInputBody: Swift.Equatable { - let userGroupId: Swift.String? - let engine: Swift.String? - let userIds: [Swift.String]? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension CreateUserGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engine = "Engine" - case tags = "Tags" - case userGroupId = "UserGroupId" - case userIds = "UserIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - if containerValues.contains(.userIds) { - struct KeyVal0{struct member{}} - let userIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIds) - if let userIdsWrappedContainer = userIdsWrappedContainer { - let userIdsContainer = try userIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsBuffer:[Swift.String]? = nil - if let userIdsContainer = userIdsContainer { - userIdsBuffer = [Swift.String]() - for stringContainer0 in userIdsContainer { - userIdsBuffer?.append(stringContainer0) - } - } - userIds = userIdsBuffer - } else { - userIds = [] - } - } else { - userIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateUserGroupOutput { -extension CreateUserGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateUserGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.arn = output.arn - self.engine = output.engine - self.minimumEngineVersion = output.minimumEngineVersion - self.pendingChanges = output.pendingChanges - self.replicationGroups = output.replicationGroups - self.serverlessCaches = output.serverlessCaches - self.status = output.status - self.userGroupId = output.userGroupId - self.userIds = output.userIds - } else { - self.arn = nil - self.engine = nil - self.minimumEngineVersion = nil - self.pendingChanges = nil - self.replicationGroups = nil - self.serverlessCaches = nil - self.status = nil - self.userGroupId = nil - self.userIds = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateUserGroupResult"] + var value = CreateUserGroupOutput() + value.arn = try reader["ARN"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.pendingChanges = try reader["PendingChanges"].readIfPresent(readingClosure: ElastiCacheClientTypes.UserGroupPendingChanges.readingClosure) + value.replicationGroups = try reader["ReplicationGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.serverlessCaches = try reader["ServerlessCaches"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.userGroupId = try reader["UserGroupId"].readIfPresent() + value.userIds = try reader["UserIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7207,124 +5299,42 @@ public struct CreateUserGroupOutput: Swift.Equatable { } } -struct CreateUserGroupOutputBody: Swift.Equatable { - let userGroupId: Swift.String? - let status: Swift.String? - let engine: Swift.String? - let userIds: [Swift.String]? - let minimumEngineVersion: Swift.String? - let pendingChanges: ElastiCacheClientTypes.UserGroupPendingChanges? - let replicationGroups: [Swift.String]? - let serverlessCaches: [Swift.String]? - let arn: Swift.String? -} - -extension CreateUserGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case engine = "Engine" - case minimumEngineVersion = "MinimumEngineVersion" - case pendingChanges = "PendingChanges" - case replicationGroups = "ReplicationGroups" - case serverlessCaches = "ServerlessCaches" - case status = "Status" - case userGroupId = "UserGroupId" - case userIds = "UserIds" - } +enum CreateUserGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateUserGroupResult")) - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - if containerValues.contains(.userIds) { - struct KeyVal0{struct member{}} - let userIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIds) - if let userIdsWrappedContainer = userIdsWrappedContainer { - let userIdsContainer = try userIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsBuffer:[Swift.String]? = nil - if let userIdsContainer = userIdsContainer { - userIdsBuffer = [Swift.String]() - for stringContainer0 in userIdsContainer { - userIdsBuffer?.append(stringContainer0) - } - } - userIds = userIdsBuffer - } else { - userIds = [] - } - } else { - userIds = nil - } - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let pendingChangesDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.UserGroupPendingChanges.self, forKey: .pendingChanges) - pendingChanges = pendingChangesDecoded - if containerValues.contains(.replicationGroups) { - struct KeyVal0{struct member{}} - let replicationGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicationGroups) - if let replicationGroupsWrappedContainer = replicationGroupsWrappedContainer { - let replicationGroupsContainer = try replicationGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicationGroupsBuffer:[Swift.String]? = nil - if let replicationGroupsContainer = replicationGroupsContainer { - replicationGroupsBuffer = [Swift.String]() - for stringContainer0 in replicationGroupsContainer { - replicationGroupsBuffer?.append(stringContainer0) - } - } - replicationGroups = replicationGroupsBuffer - } else { - replicationGroups = [] - } - } else { - replicationGroups = nil - } - if containerValues.contains(.serverlessCaches) { - struct KeyVal0{struct member{}} - let serverlessCachesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serverlessCaches) - if let serverlessCachesWrappedContainer = serverlessCachesWrappedContainer { - let serverlessCachesContainer = try serverlessCachesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serverlessCachesBuffer:[Swift.String]? = nil - if let serverlessCachesContainer = serverlessCachesContainer { - serverlessCachesBuffer = [Swift.String]() - for stringContainer0 in serverlessCachesContainer { - serverlessCachesBuffer?.append(stringContainer0) - } - } - serverlessCaches = serverlessCachesBuffer - } else { - serverlessCaches = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DefaultUserRequired": return try await DefaultUserRequired.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateUserName": return try await DuplicateUserNameFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupAlreadyExists": return try await UserGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupQuotaExceeded": return try await UserGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserNotFound": return try await UserNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - serverlessCaches = nil } - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded } } -enum CreateUserGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DefaultUserRequired": return try await DefaultUserRequired(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateUserName": return try await DuplicateUserNameFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupAlreadyExists": return try await UserGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupQuotaExceeded": return try await UserGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserNotFound": return try await UserNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accessString = "AccessString" + case authenticationMode = "AuthenticationMode" + case engine = "Engine" + case noPasswordRequired = "NoPasswordRequired" + case passwords = "Passwords" + case tags = "Tags" + case userId = "UserId" + case userName = "UserName" } -} -extension CreateUserInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accessString = accessString { @@ -7425,108 +5435,23 @@ public struct CreateUserInput: Swift.Equatable { } } -struct CreateUserInputBody: Swift.Equatable { - let userId: Swift.String? - let userName: Swift.String? - let engine: Swift.String? - let passwords: [Swift.String]? - let accessString: Swift.String? - let noPasswordRequired: Swift.Bool? - let tags: [ElastiCacheClientTypes.Tag]? - let authenticationMode: ElastiCacheClientTypes.AuthenticationMode? -} - -extension CreateUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessString = "AccessString" - case authenticationMode = "AuthenticationMode" - case engine = "Engine" - case noPasswordRequired = "NoPasswordRequired" - case passwords = "Passwords" - case tags = "Tags" - case userId = "UserId" - case userName = "UserName" - } +extension CreateUserOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - if containerValues.contains(.passwords) { - struct KeyVal0{struct member{}} - let passwordsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .passwords) - if let passwordsWrappedContainer = passwordsWrappedContainer { - let passwordsContainer = try passwordsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var passwordsBuffer:[Swift.String]? = nil - if let passwordsContainer = passwordsContainer { - passwordsBuffer = [Swift.String]() - for stringContainer0 in passwordsContainer { - passwordsBuffer?.append(stringContainer0) - } - } - passwords = passwordsBuffer - } else { - passwords = [] - } - } else { - passwords = nil - } - let accessStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessString) - accessString = accessStringDecoded - let noPasswordRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .noPasswordRequired) - noPasswordRequired = noPasswordRequiredDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let authenticationModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AuthenticationMode.self, forKey: .authenticationMode) - authenticationMode = authenticationModeDecoded - } -} - -extension CreateUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateUserOutputBody = try responseDecoder.decode(responseBody: data) - self.accessString = output.accessString - self.arn = output.arn - self.authentication = output.authentication - self.engine = output.engine - self.minimumEngineVersion = output.minimumEngineVersion - self.status = output.status - self.userGroupIds = output.userGroupIds - self.userId = output.userId - self.userName = output.userName - } else { - self.arn = nil - self.accessString = nil - self.authentication = nil - self.engine = nil - self.minimumEngineVersion = nil - self.status = nil - self.userGroupIds = nil - self.userId = nil - self.userName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateUserResult"] + var value = CreateUserOutput() + value.arn = try reader["ARN"].readIfPresent() + value.accessString = try reader["AccessString"].readIfPresent() + value.authentication = try reader["Authentication"].readIfPresent(readingClosure: ElastiCacheClientTypes.Authentication.readingClosure) + value.engine = try reader["Engine"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.userGroupIds = try reader["UserGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.userId = try reader["UserId"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + return value } } } @@ -7575,89 +5500,30 @@ public struct CreateUserOutput: Swift.Equatable { } } -struct CreateUserOutputBody: Swift.Equatable { - let userId: Swift.String? - let userName: Swift.String? - let status: Swift.String? - let engine: Swift.String? - let minimumEngineVersion: Swift.String? - let accessString: Swift.String? - let userGroupIds: [Swift.String]? - let authentication: ElastiCacheClientTypes.Authentication? - let arn: Swift.String? -} - -extension CreateUserOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case accessString = "AccessString" - case authentication = "Authentication" - case engine = "Engine" - case minimumEngineVersion = "MinimumEngineVersion" - case status = "Status" - case userGroupIds = "UserGroupIds" - case userId = "UserId" - case userName = "UserName" - } +enum CreateUserOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateUserResult")) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let accessStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessString) - accessString = accessStringDecoded - if containerValues.contains(.userGroupIds) { - struct KeyVal0{struct member{}} - let userGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIds) - if let userGroupIdsWrappedContainer = userGroupIdsWrappedContainer { - let userGroupIdsContainer = try userGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsBuffer:[Swift.String]? = nil - if let userGroupIdsContainer = userGroupIdsContainer { - userGroupIdsBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsContainer { - userGroupIdsBuffer?.append(stringContainer0) - } - } - userGroupIds = userGroupIdsBuffer - } else { - userGroupIds = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DuplicateUserName": return try await DuplicateUserNameFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserAlreadyExists": return try await UserAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserQuotaExceeded": return try await UserQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - userGroupIds = nil - } - let authenticationDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Authentication.self, forKey: .authentication) - authentication = authenticationDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - } -} - -enum CreateUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DuplicateUserName": return try await DuplicateUserNameFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserAlreadyExists": return try await UserAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserQuotaExceeded": return try await UserQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElastiCacheClientTypes.CustomerNodeEndpoint: Swift.Codable { +extension ElastiCacheClientTypes.CustomerNodeEndpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case address = "Address" case port = "Port" @@ -7673,12 +5539,14 @@ extension ElastiCacheClientTypes.CustomerNodeEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.CustomerNodeEndpoint() + value.address = try reader["Address"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + return value + } } } @@ -7702,7 +5570,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.DataStorage: Swift.Codable { +extension ElastiCacheClientTypes.DataStorage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maximum = "Maximum" case unit = "Unit" @@ -7718,12 +5586,14 @@ extension ElastiCacheClientTypes.DataStorage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maximumDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximum) - maximum = maximumDecoded - let unitDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DataStorageUnit.self, forKey: .unit) - unit = unitDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.DataStorage() + value.maximum = try reader["Maximum"].readIfPresent() + value.unit = try reader["Unit"].readIfPresent() + return value + } } } @@ -7811,6 +5681,14 @@ extension ElastiCacheClientTypes { } extension DecreaseNodeGroupsInGlobalReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case globalNodeGroupsToRemove = "GlobalNodeGroupsToRemove" + case globalNodeGroupsToRetain = "GlobalNodeGroupsToRetain" + case globalReplicationGroupId = "GlobalReplicationGroupId" + case nodeGroupCount = "NodeGroupCount" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -7889,80 +5767,15 @@ public struct DecreaseNodeGroupsInGlobalReplicationGroupInput: Swift.Equatable { } } -struct DecreaseNodeGroupsInGlobalReplicationGroupInputBody: Swift.Equatable { - let globalReplicationGroupId: Swift.String? - let nodeGroupCount: Swift.Int? - let globalNodeGroupsToRemove: [Swift.String]? - let globalNodeGroupsToRetain: [Swift.String]? - let applyImmediately: Swift.Bool? -} - -extension DecreaseNodeGroupsInGlobalReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case globalNodeGroupsToRemove = "GlobalNodeGroupsToRemove" - case globalNodeGroupsToRetain = "GlobalNodeGroupsToRetain" - case globalReplicationGroupId = "GlobalReplicationGroupId" - case nodeGroupCount = "NodeGroupCount" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let nodeGroupCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .nodeGroupCount) - nodeGroupCount = nodeGroupCountDecoded - if containerValues.contains(.globalNodeGroupsToRemove) { - struct KeyVal0{struct GlobalNodeGroupId{}} - let globalNodeGroupsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalNodeGroupsToRemove) - if let globalNodeGroupsToRemoveWrappedContainer = globalNodeGroupsToRemoveWrappedContainer { - let globalNodeGroupsToRemoveContainer = try globalNodeGroupsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var globalNodeGroupsToRemoveBuffer:[Swift.String]? = nil - if let globalNodeGroupsToRemoveContainer = globalNodeGroupsToRemoveContainer { - globalNodeGroupsToRemoveBuffer = [Swift.String]() - for stringContainer0 in globalNodeGroupsToRemoveContainer { - globalNodeGroupsToRemoveBuffer?.append(stringContainer0) - } - } - globalNodeGroupsToRemove = globalNodeGroupsToRemoveBuffer - } else { - globalNodeGroupsToRemove = [] - } - } else { - globalNodeGroupsToRemove = nil - } - if containerValues.contains(.globalNodeGroupsToRetain) { - struct KeyVal0{struct GlobalNodeGroupId{}} - let globalNodeGroupsToRetainWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalNodeGroupsToRetain) - if let globalNodeGroupsToRetainWrappedContainer = globalNodeGroupsToRetainWrappedContainer { - let globalNodeGroupsToRetainContainer = try globalNodeGroupsToRetainWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var globalNodeGroupsToRetainBuffer:[Swift.String]? = nil - if let globalNodeGroupsToRetainContainer = globalNodeGroupsToRetainContainer { - globalNodeGroupsToRetainBuffer = [Swift.String]() - for stringContainer0 in globalNodeGroupsToRetainContainer { - globalNodeGroupsToRetainBuffer?.append(stringContainer0) - } - } - globalNodeGroupsToRetain = globalNodeGroupsToRetainBuffer - } else { - globalNodeGroupsToRetain = [] - } - } else { - globalNodeGroupsToRetain = nil - } - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - } -} +extension DecreaseNodeGroupsInGlobalReplicationGroupOutput { -extension DecreaseNodeGroupsInGlobalReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DecreaseNodeGroupsInGlobalReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroup = output.globalReplicationGroup - } else { - self.globalReplicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DecreaseNodeGroupsInGlobalReplicationGroupResult"] + var value = DecreaseNodeGroupsInGlobalReplicationGroupOutput() + value.globalReplicationGroup = try reader["GlobalReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure) + return value } } } @@ -7981,37 +5794,35 @@ public struct DecreaseNodeGroupsInGlobalReplicationGroupOutput: Swift.Equatable } } -struct DecreaseNodeGroupsInGlobalReplicationGroupOutputBody: Swift.Equatable { - let globalReplicationGroup: ElastiCacheClientTypes.GlobalReplicationGroup? -} - -extension DecreaseNodeGroupsInGlobalReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroup = "GlobalReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DecreaseNodeGroupsInGlobalReplicationGroupResult")) - let globalReplicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroup.self, forKey: .globalReplicationGroup) - globalReplicationGroup = globalReplicationGroupDecoded - } -} +enum DecreaseNodeGroupsInGlobalReplicationGroupOutputError { -enum DecreaseNodeGroupsInGlobalReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DecreaseReplicaCountInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case newReplicaCount = "NewReplicaCount" + case replicaConfiguration = "ReplicaConfiguration" + case replicasToRemove = "ReplicasToRemove" + case replicationGroupId = "ReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -8100,80 +5911,15 @@ public struct DecreaseReplicaCountInput: Swift.Equatable { } } -struct DecreaseReplicaCountInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let newReplicaCount: Swift.Int? - let replicaConfiguration: [ElastiCacheClientTypes.ConfigureShard]? - let replicasToRemove: [Swift.String]? - let applyImmediately: Swift.Bool? -} - -extension DecreaseReplicaCountInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case newReplicaCount = "NewReplicaCount" - case replicaConfiguration = "ReplicaConfiguration" - case replicasToRemove = "ReplicasToRemove" - case replicationGroupId = "ReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let newReplicaCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .newReplicaCount) - newReplicaCount = newReplicaCountDecoded - if containerValues.contains(.replicaConfiguration) { - struct KeyVal0{struct ConfigureShard{}} - let replicaConfigurationWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicaConfiguration) - if let replicaConfigurationWrappedContainer = replicaConfigurationWrappedContainer { - let replicaConfigurationContainer = try replicaConfigurationWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ConfigureShard].self, forKey: .member) - var replicaConfigurationBuffer:[ElastiCacheClientTypes.ConfigureShard]? = nil - if let replicaConfigurationContainer = replicaConfigurationContainer { - replicaConfigurationBuffer = [ElastiCacheClientTypes.ConfigureShard]() - for structureContainer0 in replicaConfigurationContainer { - replicaConfigurationBuffer?.append(structureContainer0) - } - } - replicaConfiguration = replicaConfigurationBuffer - } else { - replicaConfiguration = [] - } - } else { - replicaConfiguration = nil - } - if containerValues.contains(.replicasToRemove) { - struct KeyVal0{struct member{}} - let replicasToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicasToRemove) - if let replicasToRemoveWrappedContainer = replicasToRemoveWrappedContainer { - let replicasToRemoveContainer = try replicasToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicasToRemoveBuffer:[Swift.String]? = nil - if let replicasToRemoveContainer = replicasToRemoveContainer { - replicasToRemoveBuffer = [Swift.String]() - for stringContainer0 in replicasToRemoveContainer { - replicasToRemoveBuffer?.append(stringContainer0) - } - } - replicasToRemove = replicasToRemoveBuffer - } else { - replicasToRemove = [] - } - } else { - replicasToRemove = nil - } - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - } -} +extension DecreaseReplicaCountOutput { -extension DecreaseReplicaCountOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DecreaseReplicaCountOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DecreaseReplicaCountResult"] + var value = DecreaseReplicaCountOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -8190,55 +5936,43 @@ public struct DecreaseReplicaCountOutput: Swift.Equatable { } } -struct DecreaseReplicaCountOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension DecreaseReplicaCountOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DecreaseReplicaCountResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} +enum DecreaseReplicaCountOutputError { -enum DecreaseReplicaCountOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterQuotaForCustomerExceeded": return try await ClusterQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeGroupsPerReplicationGroupQuotaExceeded": return try await NodeGroupsPerReplicationGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoOperationFault": return try await NoOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterQuotaForCustomerExceeded": return try await ClusterQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeGroupsPerReplicationGroupQuotaExceeded": return try await NodeGroupsPerReplicationGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoOperationFault": return try await NoOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DefaultUserAssociatedToUserGroupFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DefaultUserAssociatedToUserGroupFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8266,33 +6000,15 @@ public struct DefaultUserAssociatedToUserGroupFault: ClientRuntime.ModeledError, } } -struct DefaultUserAssociatedToUserGroupFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DefaultUserAssociatedToUserGroupFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DefaultUserRequired { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DefaultUserRequired() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8320,23 +6036,12 @@ public struct DefaultUserRequired: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct DefaultUserRequiredBody: Swift.Equatable { - let message: Swift.String? -} - -extension DefaultUserRequiredBody: Swift.Decodable { +extension DeleteCacheClusterInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case cacheClusterId = "CacheClusterId" + case finalSnapshotIdentifier = "FinalSnapshotIdentifier" } -} -extension DeleteCacheClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterId = cacheClusterId { @@ -8375,34 +6080,15 @@ public struct DeleteCacheClusterInput: Swift.Equatable { } } -struct DeleteCacheClusterInputBody: Swift.Equatable { - let cacheClusterId: Swift.String? - let finalSnapshotIdentifier: Swift.String? -} - -extension DeleteCacheClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterId = "CacheClusterId" - case finalSnapshotIdentifier = "FinalSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let finalSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalSnapshotIdentifier) - finalSnapshotIdentifier = finalSnapshotIdentifierDecoded - } -} +extension DeleteCacheClusterOutput { -extension DeleteCacheClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteCacheClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheCluster = output.cacheCluster - } else { - self.cacheCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteCacheClusterResult"] + var value = DeleteCacheClusterOutput() + value.cacheCluster = try reader["CacheCluster"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheCluster.readingClosure) + return value } } } @@ -8419,40 +6105,34 @@ public struct DeleteCacheClusterOutput: Swift.Equatable { } } -struct DeleteCacheClusterOutputBody: Swift.Equatable { - let cacheCluster: ElastiCacheClientTypes.CacheCluster? -} - -extension DeleteCacheClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheCluster = "CacheCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteCacheClusterResult")) - let cacheClusterDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheCluster.self, forKey: .cacheCluster) - cacheCluster = cacheClusterDecoded - } -} +enum DeleteCacheClusterOutputError { -enum DeleteCacheClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotAlreadyExistsFault": return try await SnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotFeatureNotSupportedFault": return try await SnapshotFeatureNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceededFault": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotAlreadyExistsFault": return try await SnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotFeatureNotSupportedFault": return try await SnapshotFeatureNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceededFault": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteCacheParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheParameterGroupName = "CacheParameterGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheParameterGroupName = cacheParameterGroupName { @@ -8484,24 +6164,12 @@ public struct DeleteCacheParameterGroupInput: Swift.Equatable { } } -struct DeleteCacheParameterGroupInputBody: Swift.Equatable { - let cacheParameterGroupName: Swift.String? -} - -extension DeleteCacheParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupName = "CacheParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - } -} +extension DeleteCacheParameterGroupOutput { -extension DeleteCacheParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCacheParameterGroupOutput() + } } } @@ -8510,20 +6178,31 @@ public struct DeleteCacheParameterGroupOutput: Swift.Equatable { public init() { } } -enum DeleteCacheParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheParameterGroupState": return try await InvalidCacheParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteCacheParameterGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheParameterGroupState": return try await InvalidCacheParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteCacheSecurityGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheSecurityGroupName = "CacheSecurityGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSecurityGroupName = cacheSecurityGroupName { @@ -8555,24 +6234,12 @@ public struct DeleteCacheSecurityGroupInput: Swift.Equatable { } } -struct DeleteCacheSecurityGroupInputBody: Swift.Equatable { - let cacheSecurityGroupName: Swift.String? -} - -extension DeleteCacheSecurityGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroupName = "CacheSecurityGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSecurityGroupName) - cacheSecurityGroupName = cacheSecurityGroupNameDecoded - } -} +extension DeleteCacheSecurityGroupOutput { -extension DeleteCacheSecurityGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCacheSecurityGroupOutput() + } } } @@ -8581,20 +6248,31 @@ public struct DeleteCacheSecurityGroupOutput: Swift.Equatable { public init() { } } -enum DeleteCacheSecurityGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteCacheSecurityGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteCacheSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheSubnetGroupName = "CacheSubnetGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSubnetGroupName = cacheSubnetGroupName { @@ -8626,24 +6304,12 @@ public struct DeleteCacheSubnetGroupInput: Swift.Equatable { } } -struct DeleteCacheSubnetGroupInputBody: Swift.Equatable { - let cacheSubnetGroupName: Swift.String? -} - -extension DeleteCacheSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSubnetGroupName = "CacheSubnetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - } -} +extension DeleteCacheSubnetGroupOutput { -extension DeleteCacheSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCacheSubnetGroupOutput() + } } } @@ -8652,19 +6318,31 @@ public struct DeleteCacheSubnetGroupOutput: Swift.Equatable { public init() { } } -enum DeleteCacheSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheSubnetGroupInUse": return try await CacheSubnetGroupInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteCacheSubnetGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheSubnetGroupInUse": return try await CacheSubnetGroupInUse.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteGlobalReplicationGroupInput: Swift.Encodable { - public func encode(to encoder: Swift.Encoder) throws { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalReplicationGroupId = "GlobalReplicationGroupId" + case retainPrimaryReplicationGroup = "RetainPrimaryReplicationGroup" + } + + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalReplicationGroupId = globalReplicationGroupId { try container.encode(globalReplicationGroupId, forKey: ClientRuntime.Key("GlobalReplicationGroupId")) @@ -8702,34 +6380,15 @@ public struct DeleteGlobalReplicationGroupInput: Swift.Equatable { } } -struct DeleteGlobalReplicationGroupInputBody: Swift.Equatable { - let globalReplicationGroupId: Swift.String? - let retainPrimaryReplicationGroup: Swift.Bool? -} - -extension DeleteGlobalReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroupId = "GlobalReplicationGroupId" - case retainPrimaryReplicationGroup = "RetainPrimaryReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let retainPrimaryReplicationGroupDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainPrimaryReplicationGroup) - retainPrimaryReplicationGroup = retainPrimaryReplicationGroupDecoded - } -} +extension DeleteGlobalReplicationGroupOutput { -extension DeleteGlobalReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteGlobalReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroup = output.globalReplicationGroup - } else { - self.globalReplicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteGlobalReplicationGroupResult"] + var value = DeleteGlobalReplicationGroupOutput() + value.globalReplicationGroup = try reader["GlobalReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure) + return value } } } @@ -8748,36 +6407,32 @@ public struct DeleteGlobalReplicationGroupOutput: Swift.Equatable { } } -struct DeleteGlobalReplicationGroupOutputBody: Swift.Equatable { - let globalReplicationGroup: ElastiCacheClientTypes.GlobalReplicationGroup? -} - -extension DeleteGlobalReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroup = "GlobalReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteGlobalReplicationGroupResult")) - let globalReplicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroup.self, forKey: .globalReplicationGroup) - globalReplicationGroup = globalReplicationGroupDecoded - } -} +enum DeleteGlobalReplicationGroupOutputError { -enum DeleteGlobalReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case finalSnapshotIdentifier = "FinalSnapshotIdentifier" + case replicationGroupId = "ReplicationGroupId" + case retainPrimaryCluster = "RetainPrimaryCluster" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let finalSnapshotIdentifier = finalSnapshotIdentifier { @@ -8823,38 +6478,15 @@ public struct DeleteReplicationGroupInput: Swift.Equatable { } } -struct DeleteReplicationGroupInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let retainPrimaryCluster: Swift.Bool? - let finalSnapshotIdentifier: Swift.String? -} +extension DeleteReplicationGroupOutput { -extension DeleteReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case finalSnapshotIdentifier = "FinalSnapshotIdentifier" - case replicationGroupId = "ReplicationGroupId" - case retainPrimaryCluster = "RetainPrimaryCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let retainPrimaryClusterDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .retainPrimaryCluster) - retainPrimaryCluster = retainPrimaryClusterDecoded - let finalSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalSnapshotIdentifier) - finalSnapshotIdentifier = finalSnapshotIdentifierDecoded - } -} - -extension DeleteReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteReplicationGroupResult"] + var value = DeleteReplicationGroupOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -8871,40 +6503,35 @@ public struct DeleteReplicationGroupOutput: Swift.Equatable { } } -struct DeleteReplicationGroupOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension DeleteReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteReplicationGroupResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} +enum DeleteReplicationGroupOutputError { -enum DeleteReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotAlreadyExistsFault": return try await SnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotFeatureNotSupportedFault": return try await SnapshotFeatureNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceededFault": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotAlreadyExistsFault": return try await SnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotFeatureNotSupportedFault": return try await SnapshotFeatureNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceededFault": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteServerlessCacheInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case finalSnapshotName = "FinalSnapshotName" + case serverlessCacheName = "ServerlessCacheName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let finalSnapshotName = finalSnapshotName { @@ -8942,34 +6569,15 @@ public struct DeleteServerlessCacheInput: Swift.Equatable { } } -struct DeleteServerlessCacheInputBody: Swift.Equatable { - let serverlessCacheName: Swift.String? - let finalSnapshotName: Swift.String? -} - -extension DeleteServerlessCacheInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case finalSnapshotName = "FinalSnapshotName" - case serverlessCacheName = "ServerlessCacheName" - } +extension DeleteServerlessCacheOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheName) - serverlessCacheName = serverlessCacheNameDecoded - let finalSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalSnapshotName) - finalSnapshotName = finalSnapshotNameDecoded - } -} - -extension DeleteServerlessCacheOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteServerlessCacheOutputBody = try responseDecoder.decode(responseBody: data) - self.serverlessCache = output.serverlessCache - } else { - self.serverlessCache = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteServerlessCacheResult"] + var value = DeleteServerlessCacheOutput() + value.serverlessCache = try reader["ServerlessCache"].readIfPresent(readingClosure: ElastiCacheClientTypes.ServerlessCache.readingClosure) + return value } } } @@ -8986,40 +6594,34 @@ public struct DeleteServerlessCacheOutput: Swift.Equatable { } } -struct DeleteServerlessCacheOutputBody: Swift.Equatable { - let serverlessCache: ElastiCacheClientTypes.ServerlessCache? -} - -extension DeleteServerlessCacheOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverlessCache = "ServerlessCache" - } +enum DeleteServerlessCacheOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteServerlessCacheResult")) - let serverlessCacheDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServerlessCache.self, forKey: .serverlessCache) - serverlessCache = serverlessCacheDecoded - } -} - -enum DeleteServerlessCacheOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidCredentialsException": return try await InvalidCredentialsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotAlreadyExistsFault": return try await ServerlessCacheSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidCredentialsException": return try await InvalidCredentialsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotAlreadyExistsFault": return try await ServerlessCacheSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteServerlessCacheSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serverlessCacheSnapshotName = serverlessCacheSnapshotName { @@ -9050,30 +6652,15 @@ public struct DeleteServerlessCacheSnapshotInput: Swift.Equatable { } } -struct DeleteServerlessCacheSnapshotInputBody: Swift.Equatable { - let serverlessCacheSnapshotName: Swift.String? -} +extension DeleteServerlessCacheSnapshotOutput { -extension DeleteServerlessCacheSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheSnapshotName) - serverlessCacheSnapshotName = serverlessCacheSnapshotNameDecoded - } -} - -extension DeleteServerlessCacheSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteServerlessCacheSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.serverlessCacheSnapshot = output.serverlessCacheSnapshot - } else { - self.serverlessCacheSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteServerlessCacheSnapshotResult"] + var value = DeleteServerlessCacheSnapshotOutput() + value.serverlessCacheSnapshot = try reader["ServerlessCacheSnapshot"].readIfPresent(readingClosure: ElastiCacheClientTypes.ServerlessCacheSnapshot.readingClosure) + return value } } } @@ -9090,37 +6677,31 @@ public struct DeleteServerlessCacheSnapshotOutput: Swift.Equatable { } } -struct DeleteServerlessCacheSnapshotOutputBody: Swift.Equatable { - let serverlessCacheSnapshot: ElastiCacheClientTypes.ServerlessCacheSnapshot? -} - -extension DeleteServerlessCacheSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverlessCacheSnapshot = "ServerlessCacheSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteServerlessCacheSnapshotResult")) - let serverlessCacheSnapshotDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServerlessCacheSnapshot.self, forKey: .serverlessCacheSnapshot) - serverlessCacheSnapshot = serverlessCacheSnapshotDecoded - } -} +enum DeleteServerlessCacheSnapshotOutputError { -enum DeleteServerlessCacheSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case snapshotName = "SnapshotName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let snapshotName = snapshotName { @@ -9152,30 +6733,15 @@ public struct DeleteSnapshotInput: Swift.Equatable { } } -struct DeleteSnapshotInputBody: Swift.Equatable { - let snapshotName: Swift.String? -} - -extension DeleteSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshotName = "SnapshotName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotName) - snapshotName = snapshotNameDecoded - } -} +extension DeleteSnapshotOutput { -extension DeleteSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteSnapshotResult"] + var value = DeleteSnapshotOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: ElastiCacheClientTypes.Snapshot.readingClosure) + return value } } } @@ -9192,37 +6758,31 @@ public struct DeleteSnapshotOutput: Swift.Equatable { } } -struct DeleteSnapshotOutputBody: Swift.Equatable { - let snapshot: ElastiCacheClientTypes.Snapshot? -} - -extension DeleteSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteSnapshotResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum DeleteSnapshotOutputError { -enum DeleteSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSnapshotState": return try await InvalidSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSnapshotState": return try await InvalidSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteUserGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userGroupId = "UserGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userGroupId = userGroupId { @@ -9253,46 +6813,23 @@ public struct DeleteUserGroupInput: Swift.Equatable { } } -struct DeleteUserGroupInputBody: Swift.Equatable { - let userGroupId: Swift.String? -} +extension DeleteUserGroupOutput { -extension DeleteUserGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userGroupId = "UserGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - } -} - -extension DeleteUserGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteUserGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.arn = output.arn - self.engine = output.engine - self.minimumEngineVersion = output.minimumEngineVersion - self.pendingChanges = output.pendingChanges - self.replicationGroups = output.replicationGroups - self.serverlessCaches = output.serverlessCaches - self.status = output.status - self.userGroupId = output.userGroupId - self.userIds = output.userIds - } else { - self.arn = nil - self.engine = nil - self.minimumEngineVersion = nil - self.pendingChanges = nil - self.replicationGroups = nil - self.serverlessCaches = nil - self.status = nil - self.userGroupId = nil - self.userIds = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteUserGroupResult"] + var value = DeleteUserGroupOutput() + value.arn = try reader["ARN"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.pendingChanges = try reader["PendingChanges"].readIfPresent(readingClosure: ElastiCacheClientTypes.UserGroupPendingChanges.readingClosure) + value.replicationGroups = try reader["ReplicationGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.serverlessCaches = try reader["ServerlessCaches"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.userGroupId = try reader["UserGroupId"].readIfPresent() + value.userIds = try reader["UserIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9341,120 +6878,31 @@ public struct DeleteUserGroupOutput: Swift.Equatable { } } -struct DeleteUserGroupOutputBody: Swift.Equatable { - let userGroupId: Swift.String? - let status: Swift.String? - let engine: Swift.String? - let userIds: [Swift.String]? - let minimumEngineVersion: Swift.String? - let pendingChanges: ElastiCacheClientTypes.UserGroupPendingChanges? - let replicationGroups: [Swift.String]? - let serverlessCaches: [Swift.String]? - let arn: Swift.String? -} - -extension DeleteUserGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case engine = "Engine" - case minimumEngineVersion = "MinimumEngineVersion" - case pendingChanges = "PendingChanges" - case replicationGroups = "ReplicationGroups" - case serverlessCaches = "ServerlessCaches" - case status = "Status" - case userGroupId = "UserGroupId" - case userIds = "UserIds" - } +enum DeleteUserGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteUserGroupResult")) - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - if containerValues.contains(.userIds) { - struct KeyVal0{struct member{}} - let userIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIds) - if let userIdsWrappedContainer = userIdsWrappedContainer { - let userIdsContainer = try userIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsBuffer:[Swift.String]? = nil - if let userIdsContainer = userIdsContainer { - userIdsBuffer = [Swift.String]() - for stringContainer0 in userIdsContainer { - userIdsBuffer?.append(stringContainer0) - } - } - userIds = userIdsBuffer - } else { - userIds = [] - } - } else { - userIds = nil - } - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let pendingChangesDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.UserGroupPendingChanges.self, forKey: .pendingChanges) - pendingChanges = pendingChangesDecoded - if containerValues.contains(.replicationGroups) { - struct KeyVal0{struct member{}} - let replicationGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicationGroups) - if let replicationGroupsWrappedContainer = replicationGroupsWrappedContainer { - let replicationGroupsContainer = try replicationGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicationGroupsBuffer:[Swift.String]? = nil - if let replicationGroupsContainer = replicationGroupsContainer { - replicationGroupsBuffer = [Swift.String]() - for stringContainer0 in replicationGroupsContainer { - replicationGroupsBuffer?.append(stringContainer0) - } - } - replicationGroups = replicationGroupsBuffer - } else { - replicationGroups = [] - } - } else { - replicationGroups = nil - } - if containerValues.contains(.serverlessCaches) { - struct KeyVal0{struct member{}} - let serverlessCachesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serverlessCaches) - if let serverlessCachesWrappedContainer = serverlessCachesWrappedContainer { - let serverlessCachesContainer = try serverlessCachesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serverlessCachesBuffer:[Swift.String]? = nil - if let serverlessCachesContainer = serverlessCachesContainer { - serverlessCachesBuffer = [Swift.String]() - for stringContainer0 in serverlessCachesContainer { - serverlessCachesBuffer?.append(stringContainer0) - } - } - serverlessCaches = serverlessCachesBuffer - } else { - serverlessCaches = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserGroupState": return try await InvalidUserGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - serverlessCaches = nil } - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded } } -enum DeleteUserGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserGroupState": return try await InvalidUserGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DeleteUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userId = "UserId" } -} -extension DeleteUserInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userId = userId { @@ -9485,46 +6933,23 @@ public struct DeleteUserInput: Swift.Equatable { } } -struct DeleteUserInputBody: Swift.Equatable { - let userId: Swift.String? -} - -extension DeleteUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userId = "UserId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - } -} +extension DeleteUserOutput { -extension DeleteUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteUserOutputBody = try responseDecoder.decode(responseBody: data) - self.accessString = output.accessString - self.arn = output.arn - self.authentication = output.authentication - self.engine = output.engine - self.minimumEngineVersion = output.minimumEngineVersion - self.status = output.status - self.userGroupIds = output.userGroupIds - self.userId = output.userId - self.userName = output.userName - } else { - self.arn = nil - self.accessString = nil - self.authentication = nil - self.engine = nil - self.minimumEngineVersion = nil - self.status = nil - self.userGroupIds = nil - self.userId = nil - self.userName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteUserResult"] + var value = DeleteUserOutput() + value.arn = try reader["ARN"].readIfPresent() + value.accessString = try reader["AccessString"].readIfPresent() + value.authentication = try reader["Authentication"].readIfPresent(readingClosure: ElastiCacheClientTypes.Authentication.readingClosure) + value.engine = try reader["Engine"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.userGroupIds = try reader["UserGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.userId = try reader["UserId"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + return value } } } @@ -9573,87 +6998,36 @@ public struct DeleteUserOutput: Swift.Equatable { } } -struct DeleteUserOutputBody: Swift.Equatable { - let userId: Swift.String? - let userName: Swift.String? - let status: Swift.String? - let engine: Swift.String? - let minimumEngineVersion: Swift.String? - let accessString: Swift.String? - let userGroupIds: [Swift.String]? - let authentication: ElastiCacheClientTypes.Authentication? - let arn: Swift.String? -} +enum DeleteUserOutputError { -extension DeleteUserOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case accessString = "AccessString" - case authentication = "Authentication" - case engine = "Engine" - case minimumEngineVersion = "MinimumEngineVersion" - case status = "Status" - case userGroupIds = "UserGroupIds" - case userId = "UserId" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteUserResult")) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let accessStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessString) - accessString = accessStringDecoded - if containerValues.contains(.userGroupIds) { - struct KeyVal0{struct member{}} - let userGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIds) - if let userGroupIdsWrappedContainer = userGroupIdsWrappedContainer { - let userGroupIdsContainer = try userGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsBuffer:[Swift.String]? = nil - if let userGroupIdsContainer = userGroupIdsContainer { - userGroupIdsBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsContainer { - userGroupIdsBuffer?.append(stringContainer0) - } - } - userGroupIds = userGroupIdsBuffer - } else { - userGroupIds = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DefaultUserAssociatedToUserGroup": return try await DefaultUserAssociatedToUserGroupFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserState": return try await InvalidUserStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserNotFound": return try await UserNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - userGroupIds = nil } - let authenticationDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Authentication.self, forKey: .authentication) - authentication = authenticationDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded } } -enum DeleteUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DefaultUserAssociatedToUserGroup": return try await DefaultUserAssociatedToUserGroupFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserState": return try await InvalidUserStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserNotFound": return try await UserNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeCacheClustersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheClusterId = "CacheClusterId" + case marker = "Marker" + case maxRecords = "MaxRecords" + case showCacheClustersNotInReplicationGroups = "ShowCacheClustersNotInReplicationGroups" + case showCacheNodeInfo = "ShowCacheNodeInfo" } -} -extension DescribeCacheClustersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterId = cacheClusterId { @@ -9712,48 +7086,16 @@ public struct DescribeCacheClustersInput: Swift.Equatable { } } -struct DescribeCacheClustersInputBody: Swift.Equatable { - let cacheClusterId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let showCacheNodeInfo: Swift.Bool? - let showCacheClustersNotInReplicationGroups: Swift.Bool? -} - -extension DescribeCacheClustersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterId = "CacheClusterId" - case marker = "Marker" - case maxRecords = "MaxRecords" - case showCacheClustersNotInReplicationGroups = "ShowCacheClustersNotInReplicationGroups" - case showCacheNodeInfo = "ShowCacheNodeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let showCacheNodeInfoDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .showCacheNodeInfo) - showCacheNodeInfo = showCacheNodeInfoDecoded - let showCacheClustersNotInReplicationGroupsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .showCacheClustersNotInReplicationGroups) - showCacheClustersNotInReplicationGroups = showCacheClustersNotInReplicationGroupsDecoded - } -} +extension DescribeCacheClustersOutput { -extension DescribeCacheClustersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCacheClustersOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheClusters = output.cacheClusters - self.marker = output.marker - } else { - self.cacheClusters = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCacheClustersResult"] + var value = DescribeCacheClustersOutput() + value.cacheClusters = try reader["CacheClusters"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheCluster.readingClosure, memberNodeInfo: "CacheCluster", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -9775,57 +7117,35 @@ public struct DescribeCacheClustersOutput: Swift.Equatable { } } -struct DescribeCacheClustersOutputBody: Swift.Equatable { - let marker: Swift.String? - let cacheClusters: [ElastiCacheClientTypes.CacheCluster]? -} +enum DescribeCacheClustersOutputError { -extension DescribeCacheClustersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusters = "CacheClusters" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCacheClustersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.cacheClusters) { - struct KeyVal0{struct CacheCluster{}} - let cacheClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheClusters) - if let cacheClustersWrappedContainer = cacheClustersWrappedContainer { - let cacheClustersContainer = try cacheClustersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheCluster].self, forKey: .member) - var cacheClustersBuffer:[ElastiCacheClientTypes.CacheCluster]? = nil - if let cacheClustersContainer = cacheClustersContainer { - cacheClustersBuffer = [ElastiCacheClientTypes.CacheCluster]() - for structureContainer0 in cacheClustersContainer { - cacheClustersBuffer?.append(structureContainer0) - } - } - cacheClusters = cacheClustersBuffer - } else { - cacheClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - cacheClusters = nil } } } -enum DescribeCacheClustersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeCacheEngineVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheParameterGroupFamily = "CacheParameterGroupFamily" + case defaultOnly = "DefaultOnly" + case engine = "Engine" + case engineVersion = "EngineVersion" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeCacheEngineVersionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheParameterGroupFamily = cacheParameterGroupFamily { @@ -9897,52 +7217,16 @@ public struct DescribeCacheEngineVersionsInput: Swift.Equatable { } } -struct DescribeCacheEngineVersionsInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let cacheParameterGroupFamily: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let defaultOnly: Swift.Bool? -} - -extension DescribeCacheEngineVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupFamily = "CacheParameterGroupFamily" - case defaultOnly = "DefaultOnly" - case engine = "Engine" - case engineVersion = "EngineVersion" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let cacheParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupFamily) - cacheParameterGroupFamily = cacheParameterGroupFamilyDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let defaultOnlyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .defaultOnly) - defaultOnly = defaultOnlyDecoded - } -} +extension DescribeCacheEngineVersionsOutput { -extension DescribeCacheEngineVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCacheEngineVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheEngineVersions = output.cacheEngineVersions - self.marker = output.marker - } else { - self.cacheEngineVersions = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCacheEngineVersionsResult"] + var value = DescribeCacheEngineVersionsOutput() + value.cacheEngineVersions = try reader["CacheEngineVersions"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheEngineVersion.readingClosure, memberNodeInfo: "CacheEngineVersion", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -9964,54 +7248,29 @@ public struct DescribeCacheEngineVersionsOutput: Swift.Equatable { } } -struct DescribeCacheEngineVersionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let cacheEngineVersions: [ElastiCacheClientTypes.CacheEngineVersion]? -} +enum DescribeCacheEngineVersionsOutputError { -extension DescribeCacheEngineVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheEngineVersions = "CacheEngineVersions" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCacheEngineVersionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.cacheEngineVersions) { - struct KeyVal0{struct CacheEngineVersion{}} - let cacheEngineVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheEngineVersions) - if let cacheEngineVersionsWrappedContainer = cacheEngineVersionsWrappedContainer { - let cacheEngineVersionsContainer = try cacheEngineVersionsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheEngineVersion].self, forKey: .member) - var cacheEngineVersionsBuffer:[ElastiCacheClientTypes.CacheEngineVersion]? = nil - if let cacheEngineVersionsContainer = cacheEngineVersionsContainer { - cacheEngineVersionsBuffer = [ElastiCacheClientTypes.CacheEngineVersion]() - for structureContainer0 in cacheEngineVersionsContainer { - cacheEngineVersionsBuffer?.append(structureContainer0) - } - } - cacheEngineVersions = cacheEngineVersionsBuffer - } else { - cacheEngineVersions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - cacheEngineVersions = nil } } } -enum DescribeCacheEngineVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeCacheParameterGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheParameterGroupName = "CacheParameterGroupName" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeCacheParameterGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheParameterGroupName = cacheParameterGroupName { @@ -10056,40 +7315,16 @@ public struct DescribeCacheParameterGroupsInput: Swift.Equatable { } } -struct DescribeCacheParameterGroupsInputBody: Swift.Equatable { - let cacheParameterGroupName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeCacheParameterGroupsOutput { -extension DescribeCacheParameterGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupName = "CacheParameterGroupName" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeCacheParameterGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCacheParameterGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheParameterGroups = output.cacheParameterGroups - self.marker = output.marker - } else { - self.cacheParameterGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCacheParameterGroupsResult"] + var value = DescribeCacheParameterGroupsOutput() + value.cacheParameterGroups = try reader["CacheParameterGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheParameterGroup.readingClosure, memberNodeInfo: "CacheParameterGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -10111,57 +7346,33 @@ public struct DescribeCacheParameterGroupsOutput: Swift.Equatable { } } -struct DescribeCacheParameterGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let cacheParameterGroups: [ElastiCacheClientTypes.CacheParameterGroup]? -} +enum DescribeCacheParameterGroupsOutputError { -extension DescribeCacheParameterGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroups = "CacheParameterGroups" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCacheParameterGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.cacheParameterGroups) { - struct KeyVal0{struct CacheParameterGroup{}} - let cacheParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheParameterGroups) - if let cacheParameterGroupsWrappedContainer = cacheParameterGroupsWrappedContainer { - let cacheParameterGroupsContainer = try cacheParameterGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheParameterGroup].self, forKey: .member) - var cacheParameterGroupsBuffer:[ElastiCacheClientTypes.CacheParameterGroup]? = nil - if let cacheParameterGroupsContainer = cacheParameterGroupsContainer { - cacheParameterGroupsBuffer = [ElastiCacheClientTypes.CacheParameterGroup]() - for structureContainer0 in cacheParameterGroupsContainer { - cacheParameterGroupsBuffer?.append(structureContainer0) - } - } - cacheParameterGroups = cacheParameterGroupsBuffer - } else { - cacheParameterGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - cacheParameterGroups = nil } } } -enum DescribeCacheParameterGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeCacheParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheParameterGroupName = "CacheParameterGroupName" + case marker = "Marker" + case maxRecords = "MaxRecords" + case source = "Source" } -} -extension DescribeCacheParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheParameterGroupName = cacheParameterGroupName { @@ -10214,46 +7425,17 @@ public struct DescribeCacheParametersInput: Swift.Equatable { } } -struct DescribeCacheParametersInputBody: Swift.Equatable { - let cacheParameterGroupName: Swift.String? - let source: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeCacheParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupName = "CacheParameterGroupName" - case marker = "Marker" - case maxRecords = "MaxRecords" - case source = "Source" - } +extension DescribeCacheParametersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeCacheParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCacheParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheNodeTypeSpecificParameters = output.cacheNodeTypeSpecificParameters - self.marker = output.marker - self.parameters = output.parameters - } else { - self.cacheNodeTypeSpecificParameters = nil - self.marker = nil - self.parameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCacheParametersResult"] + var value = DescribeCacheParametersOutput() + value.cacheNodeTypeSpecificParameters = try reader["CacheNodeTypeSpecificParameters"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheNodeTypeSpecificParameter.readingClosure, memberNodeInfo: "CacheNodeTypeSpecificParameter", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -10279,78 +7461,32 @@ public struct DescribeCacheParametersOutput: Swift.Equatable { } } -struct DescribeCacheParametersOutputBody: Swift.Equatable { - let marker: Swift.String? - let parameters: [ElastiCacheClientTypes.Parameter]? - let cacheNodeTypeSpecificParameters: [ElastiCacheClientTypes.CacheNodeTypeSpecificParameter]? -} - -extension DescribeCacheParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheNodeTypeSpecificParameters = "CacheNodeTypeSpecificParameters" - case marker = "Marker" - case parameters = "Parameters" - } +enum DescribeCacheParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCacheParametersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[ElastiCacheClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [ElastiCacheClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - if containerValues.contains(.cacheNodeTypeSpecificParameters) { - struct KeyVal0{struct CacheNodeTypeSpecificParameter{}} - let cacheNodeTypeSpecificParametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodeTypeSpecificParameters) - if let cacheNodeTypeSpecificParametersWrappedContainer = cacheNodeTypeSpecificParametersWrappedContainer { - let cacheNodeTypeSpecificParametersContainer = try cacheNodeTypeSpecificParametersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheNodeTypeSpecificParameter].self, forKey: .member) - var cacheNodeTypeSpecificParametersBuffer:[ElastiCacheClientTypes.CacheNodeTypeSpecificParameter]? = nil - if let cacheNodeTypeSpecificParametersContainer = cacheNodeTypeSpecificParametersContainer { - cacheNodeTypeSpecificParametersBuffer = [ElastiCacheClientTypes.CacheNodeTypeSpecificParameter]() - for structureContainer0 in cacheNodeTypeSpecificParametersContainer { - cacheNodeTypeSpecificParametersBuffer?.append(structureContainer0) - } - } - cacheNodeTypeSpecificParameters = cacheNodeTypeSpecificParametersBuffer - } else { - cacheNodeTypeSpecificParameters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - cacheNodeTypeSpecificParameters = nil } } } -enum DescribeCacheParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeCacheSecurityGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheSecurityGroupName = "CacheSecurityGroupName" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeCacheSecurityGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSecurityGroupName = cacheSecurityGroupName { @@ -10395,40 +7531,16 @@ public struct DescribeCacheSecurityGroupsInput: Swift.Equatable { } } -struct DescribeCacheSecurityGroupsInputBody: Swift.Equatable { - let cacheSecurityGroupName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeCacheSecurityGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroupName = "CacheSecurityGroupName" - case marker = "Marker" - case maxRecords = "MaxRecords" - } +extension DescribeCacheSecurityGroupsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSecurityGroupName) - cacheSecurityGroupName = cacheSecurityGroupNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeCacheSecurityGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCacheSecurityGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheSecurityGroups = output.cacheSecurityGroups - self.marker = output.marker - } else { - self.cacheSecurityGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCacheSecurityGroupsResult"] + var value = DescribeCacheSecurityGroupsOutput() + value.cacheSecurityGroups = try reader["CacheSecurityGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheSecurityGroup.readingClosure, memberNodeInfo: "CacheSecurityGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -10450,57 +7562,32 @@ public struct DescribeCacheSecurityGroupsOutput: Swift.Equatable { } } -struct DescribeCacheSecurityGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let cacheSecurityGroups: [ElastiCacheClientTypes.CacheSecurityGroup]? -} - -extension DescribeCacheSecurityGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroups = "CacheSecurityGroups" - case marker = "Marker" - } +enum DescribeCacheSecurityGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCacheSecurityGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.cacheSecurityGroups) { - struct KeyVal0{struct CacheSecurityGroup{}} - let cacheSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheSecurityGroups) - if let cacheSecurityGroupsWrappedContainer = cacheSecurityGroupsWrappedContainer { - let cacheSecurityGroupsContainer = try cacheSecurityGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheSecurityGroup].self, forKey: .member) - var cacheSecurityGroupsBuffer:[ElastiCacheClientTypes.CacheSecurityGroup]? = nil - if let cacheSecurityGroupsContainer = cacheSecurityGroupsContainer { - cacheSecurityGroupsBuffer = [ElastiCacheClientTypes.CacheSecurityGroup]() - for structureContainer0 in cacheSecurityGroupsContainer { - cacheSecurityGroupsBuffer?.append(structureContainer0) - } - } - cacheSecurityGroups = cacheSecurityGroupsBuffer - } else { - cacheSecurityGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - cacheSecurityGroups = nil } } } -enum DescribeCacheSecurityGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeCacheSubnetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheSubnetGroupName = "CacheSubnetGroupName" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeCacheSubnetGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSubnetGroupName = cacheSubnetGroupName { @@ -10545,40 +7632,16 @@ public struct DescribeCacheSubnetGroupsInput: Swift.Equatable { } } -struct DescribeCacheSubnetGroupsInputBody: Swift.Equatable { - let cacheSubnetGroupName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeCacheSubnetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSubnetGroupName = "CacheSubnetGroupName" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeCacheSubnetGroupsOutput { -extension DescribeCacheSubnetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCacheSubnetGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheSubnetGroups = output.cacheSubnetGroups - self.marker = output.marker - } else { - self.cacheSubnetGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCacheSubnetGroupsResult"] + var value = DescribeCacheSubnetGroupsOutput() + value.cacheSubnetGroups = try reader["CacheSubnetGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheSubnetGroup.readingClosure, memberNodeInfo: "CacheSubnetGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -10600,55 +7663,30 @@ public struct DescribeCacheSubnetGroupsOutput: Swift.Equatable { } } -struct DescribeCacheSubnetGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let cacheSubnetGroups: [ElastiCacheClientTypes.CacheSubnetGroup]? -} +enum DescribeCacheSubnetGroupsOutputError { -extension DescribeCacheSubnetGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSubnetGroups = "CacheSubnetGroups" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCacheSubnetGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.cacheSubnetGroups) { - struct KeyVal0{struct CacheSubnetGroup{}} - let cacheSubnetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheSubnetGroups) - if let cacheSubnetGroupsWrappedContainer = cacheSubnetGroupsWrappedContainer { - let cacheSubnetGroupsContainer = try cacheSubnetGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheSubnetGroup].self, forKey: .member) - var cacheSubnetGroupsBuffer:[ElastiCacheClientTypes.CacheSubnetGroup]? = nil - if let cacheSubnetGroupsContainer = cacheSubnetGroupsContainer { - cacheSubnetGroupsBuffer = [ElastiCacheClientTypes.CacheSubnetGroup]() - for structureContainer0 in cacheSubnetGroupsContainer { - cacheSubnetGroupsBuffer?.append(structureContainer0) - } - } - cacheSubnetGroups = cacheSubnetGroupsBuffer - } else { - cacheSubnetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - cacheSubnetGroups = nil } } } -enum DescribeCacheSubnetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEngineDefaultParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheParameterGroupFamily = "CacheParameterGroupFamily" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeEngineDefaultParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheParameterGroupFamily = cacheParameterGroupFamily { @@ -10694,38 +7732,15 @@ public struct DescribeEngineDefaultParametersInput: Swift.Equatable { } } -struct DescribeEngineDefaultParametersInputBody: Swift.Equatable { - let cacheParameterGroupFamily: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEngineDefaultParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupFamily = "CacheParameterGroupFamily" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupFamily) - cacheParameterGroupFamily = cacheParameterGroupFamilyDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeEngineDefaultParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEngineDefaultParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.engineDefaults = output.engineDefaults - } else { - self.engineDefaults = nil +extension DescribeEngineDefaultParametersOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEngineDefaultParametersResult"] + var value = DescribeEngineDefaultParametersOutput() + value.engineDefaults = try reader["EngineDefaults"].readIfPresent(readingClosure: ElastiCacheClientTypes.EngineDefaults.readingClosure) + return value } } } @@ -10742,35 +7757,35 @@ public struct DescribeEngineDefaultParametersOutput: Swift.Equatable { } } -struct DescribeEngineDefaultParametersOutputBody: Swift.Equatable { - let engineDefaults: ElastiCacheClientTypes.EngineDefaults? -} - -extension DescribeEngineDefaultParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineDefaults = "EngineDefaults" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEngineDefaultParametersResult")) - let engineDefaultsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.EngineDefaults.self, forKey: .engineDefaults) - engineDefaults = engineDefaultsDecoded - } -} +enum DescribeEngineDefaultParametersOutputError { -enum DescribeEngineDefaultParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeEventsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case duration = "Duration" + case endTime = "EndTime" + case marker = "Marker" + case maxRecords = "MaxRecords" + case sourceIdentifier = "SourceIdentifier" + case sourceType = "SourceType" + case startTime = "StartTime" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let duration = duration { @@ -10843,56 +7858,16 @@ public struct DescribeEventsInput: Swift.Equatable { } } -struct DescribeEventsInputBody: Swift.Equatable { - let sourceIdentifier: Swift.String? - let sourceType: ElastiCacheClientTypes.SourceType? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let duration: Swift.Int? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEventsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case duration = "Duration" - case endTime = "EndTime" - case marker = "Marker" - case maxRecords = "MaxRecords" - case sourceIdentifier = "SourceIdentifier" - case sourceType = "SourceType" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEventsOutput { -extension DescribeEventsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventsOutputBody = try responseDecoder.decode(responseBody: data) - self.events = output.events - self.marker = output.marker - } else { - self.events = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventsResult"] + var value = DescribeEventsOutput() + value.events = try reader["Events"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.Event.readingClosure, memberNodeInfo: "Event", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -10914,56 +7889,32 @@ public struct DescribeEventsOutput: Swift.Equatable { } } -struct DescribeEventsOutputBody: Swift.Equatable { - let marker: Swift.String? - let events: [ElastiCacheClientTypes.Event]? -} - -extension DescribeEventsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Events" - case marker = "Marker" - } +enum DescribeEventsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.events) { - struct KeyVal0{struct Event{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Event].self, forKey: .member) - var eventsBuffer:[ElastiCacheClientTypes.Event]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [ElastiCacheClientTypes.Event]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - events = nil } } } -enum DescribeEventsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeGlobalReplicationGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalReplicationGroupId = "GlobalReplicationGroupId" + case marker = "Marker" + case maxRecords = "MaxRecords" + case showMemberInfo = "ShowMemberInfo" } -} -extension DescribeGlobalReplicationGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalReplicationGroupId = globalReplicationGroupId { @@ -11014,44 +7965,16 @@ public struct DescribeGlobalReplicationGroupsInput: Swift.Equatable { } } -struct DescribeGlobalReplicationGroupsInputBody: Swift.Equatable { - let globalReplicationGroupId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let showMemberInfo: Swift.Bool? -} - -extension DescribeGlobalReplicationGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroupId = "GlobalReplicationGroupId" - case marker = "Marker" - case maxRecords = "MaxRecords" - case showMemberInfo = "ShowMemberInfo" - } +extension DescribeGlobalReplicationGroupsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let showMemberInfoDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .showMemberInfo) - showMemberInfo = showMemberInfoDecoded - } -} - -extension DescribeGlobalReplicationGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeGlobalReplicationGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroups = output.globalReplicationGroups - self.marker = output.marker - } else { - self.globalReplicationGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeGlobalReplicationGroupsResult"] + var value = DescribeGlobalReplicationGroupsOutput() + value.globalReplicationGroups = try reader["GlobalReplicationGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure, memberNodeInfo: "GlobalReplicationGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -11072,57 +7995,32 @@ public struct DescribeGlobalReplicationGroupsOutput: Swift.Equatable { } } -struct DescribeGlobalReplicationGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let globalReplicationGroups: [ElastiCacheClientTypes.GlobalReplicationGroup]? -} - -extension DescribeGlobalReplicationGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroups = "GlobalReplicationGroups" - case marker = "Marker" - } +enum DescribeGlobalReplicationGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeGlobalReplicationGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.globalReplicationGroups) { - struct KeyVal0{struct GlobalReplicationGroup{}} - let globalReplicationGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalReplicationGroups) - if let globalReplicationGroupsWrappedContainer = globalReplicationGroupsWrappedContainer { - let globalReplicationGroupsContainer = try globalReplicationGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.GlobalReplicationGroup].self, forKey: .member) - var globalReplicationGroupsBuffer:[ElastiCacheClientTypes.GlobalReplicationGroup]? = nil - if let globalReplicationGroupsContainer = globalReplicationGroupsContainer { - globalReplicationGroupsBuffer = [ElastiCacheClientTypes.GlobalReplicationGroup]() - for structureContainer0 in globalReplicationGroupsContainer { - globalReplicationGroupsBuffer?.append(structureContainer0) - } - } - globalReplicationGroups = globalReplicationGroupsBuffer - } else { - globalReplicationGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - globalReplicationGroups = nil } } } -enum DescribeGlobalReplicationGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeReplicationGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case replicationGroupId = "ReplicationGroupId" } -} -extension DescribeReplicationGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -11167,40 +8065,16 @@ public struct DescribeReplicationGroupsInput: Swift.Equatable { } } -struct DescribeReplicationGroupsInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeReplicationGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case replicationGroupId = "ReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeReplicationGroupsOutput { -extension DescribeReplicationGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReplicationGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.replicationGroups = output.replicationGroups - } else { - self.marker = nil - self.replicationGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReplicationGroupsResult"] + var value = DescribeReplicationGroupsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.replicationGroups = try reader["ReplicationGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure, memberNodeInfo: "ReplicationGroup", isFlattened: false) + return value } } } @@ -11222,57 +8096,37 @@ public struct DescribeReplicationGroupsOutput: Swift.Equatable { } } -struct DescribeReplicationGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let replicationGroups: [ElastiCacheClientTypes.ReplicationGroup]? -} - -extension DescribeReplicationGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case replicationGroups = "ReplicationGroups" - } +enum DescribeReplicationGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReplicationGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.replicationGroups) { - struct KeyVal0{struct ReplicationGroup{}} - let replicationGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicationGroups) - if let replicationGroupsWrappedContainer = replicationGroupsWrappedContainer { - let replicationGroupsContainer = try replicationGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ReplicationGroup].self, forKey: .member) - var replicationGroupsBuffer:[ElastiCacheClientTypes.ReplicationGroup]? = nil - if let replicationGroupsContainer = replicationGroupsContainer { - replicationGroupsBuffer = [ElastiCacheClientTypes.ReplicationGroup]() - for structureContainer0 in replicationGroupsContainer { - replicationGroupsBuffer?.append(structureContainer0) - } - } - replicationGroups = replicationGroupsBuffer - } else { - replicationGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - replicationGroups = nil } } } -enum DescribeReplicationGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeReservedCacheNodesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheNodeType = "CacheNodeType" + case duration = "Duration" + case marker = "Marker" + case maxRecords = "MaxRecords" + case offeringType = "OfferingType" + case productDescription = "ProductDescription" + case reservedCacheNodeId = "ReservedCacheNodeId" + case reservedCacheNodesOfferingId = "ReservedCacheNodesOfferingId" } -} -extension DescribeReservedCacheNodesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheNodeType = cacheNodeType { @@ -11391,18 +8245,7 @@ public struct DescribeReservedCacheNodesInput: Swift.Equatable { } } -struct DescribeReservedCacheNodesInputBody: Swift.Equatable { - let reservedCacheNodeId: Swift.String? - let reservedCacheNodesOfferingId: Swift.String? - let cacheNodeType: Swift.String? - let duration: Swift.String? - let productDescription: Swift.String? - let offeringType: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeReservedCacheNodesInputBody: Swift.Decodable { +extension DescribeReservedCacheNodesOfferingsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheNodeType = "CacheNodeType" case duration = "Duration" @@ -11410,32 +8253,9 @@ extension DescribeReservedCacheNodesInputBody: Swift.Decodable { case maxRecords = "MaxRecords" case offeringType = "OfferingType" case productDescription = "ProductDescription" - case reservedCacheNodeId = "ReservedCacheNodeId" case reservedCacheNodesOfferingId = "ReservedCacheNodesOfferingId" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedCacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedCacheNodeId) - reservedCacheNodeId = reservedCacheNodeIdDecoded - let reservedCacheNodesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedCacheNodesOfferingId) - reservedCacheNodesOfferingId = reservedCacheNodesOfferingIdDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .duration) - duration = durationDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeReservedCacheNodesOfferingsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheNodeType = cacheNodeType { @@ -11547,56 +8367,16 @@ public struct DescribeReservedCacheNodesOfferingsInput: Swift.Equatable { } } -struct DescribeReservedCacheNodesOfferingsInputBody: Swift.Equatable { - let reservedCacheNodesOfferingId: Swift.String? - let cacheNodeType: Swift.String? - let duration: Swift.String? - let productDescription: Swift.String? - let offeringType: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeReservedCacheNodesOfferingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheNodeType = "CacheNodeType" - case duration = "Duration" - case marker = "Marker" - case maxRecords = "MaxRecords" - case offeringType = "OfferingType" - case productDescription = "ProductDescription" - case reservedCacheNodesOfferingId = "ReservedCacheNodesOfferingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedCacheNodesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedCacheNodesOfferingId) - reservedCacheNodesOfferingId = reservedCacheNodesOfferingIdDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .duration) - duration = durationDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeReservedCacheNodesOfferingsOutput { -extension DescribeReservedCacheNodesOfferingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedCacheNodesOfferingsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedCacheNodesOfferings = output.reservedCacheNodesOfferings - } else { - self.marker = nil - self.reservedCacheNodesOfferings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReservedCacheNodesOfferingsResult"] + var value = DescribeReservedCacheNodesOfferingsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedCacheNodesOfferings = try reader["ReservedCacheNodesOfferings"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ReservedCacheNodesOffering.readingClosure, memberNodeInfo: "ReservedCacheNodesOffering", isFlattened: false) + return value } } } @@ -11618,66 +8398,35 @@ public struct DescribeReservedCacheNodesOfferingsOutput: Swift.Equatable { } } -struct DescribeReservedCacheNodesOfferingsOutputBody: Swift.Equatable { - let marker: Swift.String? - let reservedCacheNodesOfferings: [ElastiCacheClientTypes.ReservedCacheNodesOffering]? -} +enum DescribeReservedCacheNodesOfferingsOutputError { -extension DescribeReservedCacheNodesOfferingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedCacheNodesOfferings = "ReservedCacheNodesOfferings" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReservedCacheNodesOfferingsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.reservedCacheNodesOfferings) { - struct KeyVal0{struct ReservedCacheNodesOffering{}} - let reservedCacheNodesOfferingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedCacheNodesOfferings) - if let reservedCacheNodesOfferingsWrappedContainer = reservedCacheNodesOfferingsWrappedContainer { - let reservedCacheNodesOfferingsContainer = try reservedCacheNodesOfferingsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ReservedCacheNodesOffering].self, forKey: .member) - var reservedCacheNodesOfferingsBuffer:[ElastiCacheClientTypes.ReservedCacheNodesOffering]? = nil - if let reservedCacheNodesOfferingsContainer = reservedCacheNodesOfferingsContainer { - reservedCacheNodesOfferingsBuffer = [ElastiCacheClientTypes.ReservedCacheNodesOffering]() - for structureContainer0 in reservedCacheNodesOfferingsContainer { - reservedCacheNodesOfferingsBuffer?.append(structureContainer0) - } - } - reservedCacheNodesOfferings = reservedCacheNodesOfferingsBuffer - } else { - reservedCacheNodesOfferings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedCacheNodesOfferingNotFound": return try await ReservedCacheNodesOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedCacheNodesOfferings = nil } } } -enum DescribeReservedCacheNodesOfferingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedCacheNodesOfferingNotFound": return try await ReservedCacheNodesOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} +extension DescribeReservedCacheNodesOutput { -extension DescribeReservedCacheNodesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedCacheNodesOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedCacheNodes = output.reservedCacheNodes - } else { - self.marker = nil - self.reservedCacheNodes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReservedCacheNodesResult"] + var value = DescribeReservedCacheNodesOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedCacheNodes = try reader["ReservedCacheNodes"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ReservedCacheNode.readingClosure, memberNodeInfo: "ReservedCacheNode", isFlattened: false) + return value } } } @@ -11699,57 +8448,34 @@ public struct DescribeReservedCacheNodesOutput: Swift.Equatable { } } -struct DescribeReservedCacheNodesOutputBody: Swift.Equatable { - let marker: Swift.String? - let reservedCacheNodes: [ElastiCacheClientTypes.ReservedCacheNode]? -} +enum DescribeReservedCacheNodesOutputError { -extension DescribeReservedCacheNodesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedCacheNodes = "ReservedCacheNodes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReservedCacheNodesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.reservedCacheNodes) { - struct KeyVal0{struct ReservedCacheNode{}} - let reservedCacheNodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedCacheNodes) - if let reservedCacheNodesWrappedContainer = reservedCacheNodesWrappedContainer { - let reservedCacheNodesContainer = try reservedCacheNodesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ReservedCacheNode].self, forKey: .member) - var reservedCacheNodesBuffer:[ElastiCacheClientTypes.ReservedCacheNode]? = nil - if let reservedCacheNodesContainer = reservedCacheNodesContainer { - reservedCacheNodesBuffer = [ElastiCacheClientTypes.ReservedCacheNode]() - for structureContainer0 in reservedCacheNodesContainer { - reservedCacheNodesBuffer?.append(structureContainer0) - } - } - reservedCacheNodes = reservedCacheNodesBuffer - } else { - reservedCacheNodes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedCacheNodeNotFound": return try await ReservedCacheNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedCacheNodes = nil } } } -enum DescribeReservedCacheNodesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedCacheNodeNotFound": return try await ReservedCacheNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeServerlessCacheSnapshotsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" + case serverlessCacheName = "ServerlessCacheName" + case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" + case snapshotType = "SnapshotType" } -} -extension DescribeServerlessCacheSnapshotsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -11807,48 +8533,16 @@ public struct DescribeServerlessCacheSnapshotsInput: Swift.Equatable { } } -struct DescribeServerlessCacheSnapshotsInputBody: Swift.Equatable { - let serverlessCacheName: Swift.String? - let serverlessCacheSnapshotName: Swift.String? - let snapshotType: Swift.String? - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension DescribeServerlessCacheSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - case serverlessCacheName = "ServerlessCacheName" - case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" - case snapshotType = "SnapshotType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheName) - serverlessCacheName = serverlessCacheNameDecoded - let serverlessCacheSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheSnapshotName) - serverlessCacheSnapshotName = serverlessCacheSnapshotNameDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension DescribeServerlessCacheSnapshotsOutput { -extension DescribeServerlessCacheSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeServerlessCacheSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.serverlessCacheSnapshots = output.serverlessCacheSnapshots - } else { - self.nextToken = nil - self.serverlessCacheSnapshots = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeServerlessCacheSnapshotsResult"] + var value = DescribeServerlessCacheSnapshotsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.serverlessCacheSnapshots = try reader["ServerlessCacheSnapshots"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ServerlessCacheSnapshot.readingClosure, memberNodeInfo: "ServerlessCacheSnapshot", isFlattened: false) + return value } } } @@ -11869,58 +8563,33 @@ public struct DescribeServerlessCacheSnapshotsOutput: Swift.Equatable { } } -struct DescribeServerlessCacheSnapshotsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let serverlessCacheSnapshots: [ElastiCacheClientTypes.ServerlessCacheSnapshot]? -} +enum DescribeServerlessCacheSnapshotsOutputError { -extension DescribeServerlessCacheSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case serverlessCacheSnapshots = "ServerlessCacheSnapshots" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeServerlessCacheSnapshotsResult")) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.serverlessCacheSnapshots) { - struct KeyVal0{struct ServerlessCacheSnapshot{}} - let serverlessCacheSnapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serverlessCacheSnapshots) - if let serverlessCacheSnapshotsWrappedContainer = serverlessCacheSnapshotsWrappedContainer { - let serverlessCacheSnapshotsContainer = try serverlessCacheSnapshotsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ServerlessCacheSnapshot].self, forKey: .member) - var serverlessCacheSnapshotsBuffer:[ElastiCacheClientTypes.ServerlessCacheSnapshot]? = nil - if let serverlessCacheSnapshotsContainer = serverlessCacheSnapshotsContainer { - serverlessCacheSnapshotsBuffer = [ElastiCacheClientTypes.ServerlessCacheSnapshot]() - for structureContainer0 in serverlessCacheSnapshotsContainer { - serverlessCacheSnapshotsBuffer?.append(structureContainer0) - } - } - serverlessCacheSnapshots = serverlessCacheSnapshotsBuffer - } else { - serverlessCacheSnapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - serverlessCacheSnapshots = nil } } } -enum DescribeServerlessCacheSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeServerlessCachesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" + case serverlessCacheName = "ServerlessCacheName" } -} -extension DescribeServerlessCachesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -11964,40 +8633,16 @@ public struct DescribeServerlessCachesInput: Swift.Equatable { } } -struct DescribeServerlessCachesInputBody: Swift.Equatable { - let serverlessCacheName: Swift.String? - let maxResults: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeServerlessCachesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - case serverlessCacheName = "ServerlessCacheName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheName) - serverlessCacheName = serverlessCacheNameDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeServerlessCachesOutput { -extension DescribeServerlessCachesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeServerlessCachesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.serverlessCaches = output.serverlessCaches - } else { - self.nextToken = nil - self.serverlessCaches = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeServerlessCachesResult"] + var value = DescribeServerlessCachesOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.serverlessCaches = try reader["ServerlessCaches"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ServerlessCache.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12018,57 +8663,33 @@ public struct DescribeServerlessCachesOutput: Swift.Equatable { } } -struct DescribeServerlessCachesOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let serverlessCaches: [ElastiCacheClientTypes.ServerlessCache]? -} - -extension DescribeServerlessCachesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case serverlessCaches = "ServerlessCaches" - } +enum DescribeServerlessCachesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeServerlessCachesResult")) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.serverlessCaches) { - struct KeyVal0{struct member{}} - let serverlessCachesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serverlessCaches) - if let serverlessCachesWrappedContainer = serverlessCachesWrappedContainer { - let serverlessCachesContainer = try serverlessCachesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ServerlessCache].self, forKey: .member) - var serverlessCachesBuffer:[ElastiCacheClientTypes.ServerlessCache]? = nil - if let serverlessCachesContainer = serverlessCachesContainer { - serverlessCachesBuffer = [ElastiCacheClientTypes.ServerlessCache]() - for structureContainer0 in serverlessCachesContainer { - serverlessCachesBuffer?.append(structureContainer0) - } - } - serverlessCaches = serverlessCachesBuffer - } else { - serverlessCaches = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - serverlessCaches = nil } } } -enum DescribeServerlessCachesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeServiceUpdatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case serviceUpdateName = "ServiceUpdateName" + case serviceUpdateStatus = "ServiceUpdateStatus" } -} -extension DescribeServiceUpdatesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -12128,61 +8749,16 @@ public struct DescribeServiceUpdatesInput: Swift.Equatable { } } -struct DescribeServiceUpdatesInputBody: Swift.Equatable { - let serviceUpdateName: Swift.String? - let serviceUpdateStatus: [ElastiCacheClientTypes.ServiceUpdateStatus]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeServiceUpdatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case serviceUpdateName = "ServiceUpdateName" - case serviceUpdateStatus = "ServiceUpdateStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceUpdateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateName) - serviceUpdateName = serviceUpdateNameDecoded - if containerValues.contains(.serviceUpdateStatus) { - struct KeyVal0{struct member{}} - let serviceUpdateStatusWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceUpdateStatus) - if let serviceUpdateStatusWrappedContainer = serviceUpdateStatusWrappedContainer { - let serviceUpdateStatusContainer = try serviceUpdateStatusWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ServiceUpdateStatus].self, forKey: .member) - var serviceUpdateStatusBuffer:[ElastiCacheClientTypes.ServiceUpdateStatus]? = nil - if let serviceUpdateStatusContainer = serviceUpdateStatusContainer { - serviceUpdateStatusBuffer = [ElastiCacheClientTypes.ServiceUpdateStatus]() - for enumContainer0 in serviceUpdateStatusContainer { - serviceUpdateStatusBuffer?.append(enumContainer0) - } - } - serviceUpdateStatus = serviceUpdateStatusBuffer - } else { - serviceUpdateStatus = [] - } - } else { - serviceUpdateStatus = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeServiceUpdatesOutput { -extension DescribeServiceUpdatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeServiceUpdatesOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.serviceUpdates = output.serviceUpdates - } else { - self.marker = nil - self.serviceUpdates = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeServiceUpdatesResult"] + var value = DescribeServiceUpdatesOutput() + value.marker = try reader["Marker"].readIfPresent() + value.serviceUpdates = try reader["ServiceUpdates"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ServiceUpdate.readingClosure, memberNodeInfo: "ServiceUpdate", isFlattened: false) + return value } } } @@ -12203,57 +8779,36 @@ public struct DescribeServiceUpdatesOutput: Swift.Equatable { } } -struct DescribeServiceUpdatesOutputBody: Swift.Equatable { - let marker: Swift.String? - let serviceUpdates: [ElastiCacheClientTypes.ServiceUpdate]? -} +enum DescribeServiceUpdatesOutputError { -extension DescribeServiceUpdatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case serviceUpdates = "ServiceUpdates" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeServiceUpdatesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.serviceUpdates) { - struct KeyVal0{struct ServiceUpdate{}} - let serviceUpdatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceUpdates) - if let serviceUpdatesWrappedContainer = serviceUpdatesWrappedContainer { - let serviceUpdatesContainer = try serviceUpdatesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ServiceUpdate].self, forKey: .member) - var serviceUpdatesBuffer:[ElastiCacheClientTypes.ServiceUpdate]? = nil - if let serviceUpdatesContainer = serviceUpdatesContainer { - serviceUpdatesBuffer = [ElastiCacheClientTypes.ServiceUpdate]() - for structureContainer0 in serviceUpdatesContainer { - serviceUpdatesBuffer?.append(structureContainer0) - } - } - serviceUpdates = serviceUpdatesBuffer - } else { - serviceUpdates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceUpdateNotFoundFault": return try await ServiceUpdateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - serviceUpdates = nil } } } -enum DescribeServiceUpdatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceUpdateNotFoundFault": return try await ServiceUpdateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeSnapshotsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheClusterId = "CacheClusterId" + case marker = "Marker" + case maxRecords = "MaxRecords" + case replicationGroupId = "ReplicationGroupId" + case showNodeGroupConfig = "ShowNodeGroupConfig" + case snapshotName = "SnapshotName" + case snapshotSource = "SnapshotSource" } -} -extension DescribeSnapshotsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterId = cacheClusterId { @@ -12326,56 +8881,16 @@ public struct DescribeSnapshotsInput: Swift.Equatable { } } -struct DescribeSnapshotsInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let cacheClusterId: Swift.String? - let snapshotName: Swift.String? - let snapshotSource: Swift.String? - let marker: Swift.String? - let maxRecords: Swift.Int? - let showNodeGroupConfig: Swift.Bool? -} - -extension DescribeSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterId = "CacheClusterId" - case marker = "Marker" - case maxRecords = "MaxRecords" - case replicationGroupId = "ReplicationGroupId" - case showNodeGroupConfig = "ShowNodeGroupConfig" - case snapshotName = "SnapshotName" - case snapshotSource = "SnapshotSource" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let snapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotName) - snapshotName = snapshotNameDecoded - let snapshotSourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotSource) - snapshotSource = snapshotSourceDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let showNodeGroupConfigDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .showNodeGroupConfig) - showNodeGroupConfig = showNodeGroupConfigDecoded - } -} +extension DescribeSnapshotsOutput { -extension DescribeSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.snapshots = output.snapshots - } else { - self.marker = nil - self.snapshots = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeSnapshotsResult"] + var value = DescribeSnapshotsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.snapshots = try reader["Snapshots"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.Snapshot.readingClosure, memberNodeInfo: "Snapshot", isFlattened: false) + return value } } } @@ -12397,58 +8912,40 @@ public struct DescribeSnapshotsOutput: Swift.Equatable { } } -struct DescribeSnapshotsOutputBody: Swift.Equatable { - let marker: Swift.String? - let snapshots: [ElastiCacheClientTypes.Snapshot]? -} +enum DescribeSnapshotsOutputError { -extension DescribeSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case snapshots = "Snapshots" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeSnapshotsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.snapshots) { - struct KeyVal0{struct Snapshot{}} - let snapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshots) - if let snapshotsWrappedContainer = snapshotsWrappedContainer { - let snapshotsContainer = try snapshotsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Snapshot].self, forKey: .member) - var snapshotsBuffer:[ElastiCacheClientTypes.Snapshot]? = nil - if let snapshotsContainer = snapshotsContainer { - snapshotsBuffer = [ElastiCacheClientTypes.Snapshot]() - for structureContainer0 in snapshotsContainer { - snapshotsBuffer?.append(structureContainer0) - } - } - snapshots = snapshotsBuffer - } else { - snapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - snapshots = nil } } } -enum DescribeSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeUpdateActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheClusterIds = "CacheClusterIds" + case engine = "Engine" + case marker = "Marker" + case maxRecords = "MaxRecords" + case replicationGroupIds = "ReplicationGroupIds" + case serviceUpdateName = "ServiceUpdateName" + case serviceUpdateStatus = "ServiceUpdateStatus" + case serviceUpdateTimeRange = "ServiceUpdateTimeRange" + case showNodeLevelUpdateStatus = "ShowNodeLevelUpdateStatus" + case updateActionStatus = "UpdateActionStatus" } -} -extension DescribeUpdateActionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterIds = cacheClusterIds { @@ -12577,136 +9074,16 @@ public struct DescribeUpdateActionsInput: Swift.Equatable { } } -struct DescribeUpdateActionsInputBody: Swift.Equatable { - let serviceUpdateName: Swift.String? - let replicationGroupIds: [Swift.String]? - let cacheClusterIds: [Swift.String]? - let engine: Swift.String? - let serviceUpdateStatus: [ElastiCacheClientTypes.ServiceUpdateStatus]? - let serviceUpdateTimeRange: ElastiCacheClientTypes.TimeRangeFilter? - let updateActionStatus: [ElastiCacheClientTypes.UpdateActionStatus]? - let showNodeLevelUpdateStatus: Swift.Bool? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeUpdateActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterIds = "CacheClusterIds" - case engine = "Engine" - case marker = "Marker" - case maxRecords = "MaxRecords" - case replicationGroupIds = "ReplicationGroupIds" - case serviceUpdateName = "ServiceUpdateName" - case serviceUpdateStatus = "ServiceUpdateStatus" - case serviceUpdateTimeRange = "ServiceUpdateTimeRange" - case showNodeLevelUpdateStatus = "ShowNodeLevelUpdateStatus" - case updateActionStatus = "UpdateActionStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceUpdateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateName) - serviceUpdateName = serviceUpdateNameDecoded - if containerValues.contains(.replicationGroupIds) { - struct KeyVal0{struct member{}} - let replicationGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicationGroupIds) - if let replicationGroupIdsWrappedContainer = replicationGroupIdsWrappedContainer { - let replicationGroupIdsContainer = try replicationGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicationGroupIdsBuffer:[Swift.String]? = nil - if let replicationGroupIdsContainer = replicationGroupIdsContainer { - replicationGroupIdsBuffer = [Swift.String]() - for stringContainer0 in replicationGroupIdsContainer { - replicationGroupIdsBuffer?.append(stringContainer0) - } - } - replicationGroupIds = replicationGroupIdsBuffer - } else { - replicationGroupIds = [] - } - } else { - replicationGroupIds = nil - } - if containerValues.contains(.cacheClusterIds) { - struct KeyVal0{struct member{}} - let cacheClusterIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheClusterIds) - if let cacheClusterIdsWrappedContainer = cacheClusterIdsWrappedContainer { - let cacheClusterIdsContainer = try cacheClusterIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheClusterIdsBuffer:[Swift.String]? = nil - if let cacheClusterIdsContainer = cacheClusterIdsContainer { - cacheClusterIdsBuffer = [Swift.String]() - for stringContainer0 in cacheClusterIdsContainer { - cacheClusterIdsBuffer?.append(stringContainer0) - } - } - cacheClusterIds = cacheClusterIdsBuffer - } else { - cacheClusterIds = [] - } - } else { - cacheClusterIds = nil - } - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - if containerValues.contains(.serviceUpdateStatus) { - struct KeyVal0{struct member{}} - let serviceUpdateStatusWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceUpdateStatus) - if let serviceUpdateStatusWrappedContainer = serviceUpdateStatusWrappedContainer { - let serviceUpdateStatusContainer = try serviceUpdateStatusWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ServiceUpdateStatus].self, forKey: .member) - var serviceUpdateStatusBuffer:[ElastiCacheClientTypes.ServiceUpdateStatus]? = nil - if let serviceUpdateStatusContainer = serviceUpdateStatusContainer { - serviceUpdateStatusBuffer = [ElastiCacheClientTypes.ServiceUpdateStatus]() - for enumContainer0 in serviceUpdateStatusContainer { - serviceUpdateStatusBuffer?.append(enumContainer0) - } - } - serviceUpdateStatus = serviceUpdateStatusBuffer - } else { - serviceUpdateStatus = [] - } - } else { - serviceUpdateStatus = nil - } - let serviceUpdateTimeRangeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.TimeRangeFilter.self, forKey: .serviceUpdateTimeRange) - serviceUpdateTimeRange = serviceUpdateTimeRangeDecoded - if containerValues.contains(.updateActionStatus) { - struct KeyVal0{struct member{}} - let updateActionStatusWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .updateActionStatus) - if let updateActionStatusWrappedContainer = updateActionStatusWrappedContainer { - let updateActionStatusContainer = try updateActionStatusWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.UpdateActionStatus].self, forKey: .member) - var updateActionStatusBuffer:[ElastiCacheClientTypes.UpdateActionStatus]? = nil - if let updateActionStatusContainer = updateActionStatusContainer { - updateActionStatusBuffer = [ElastiCacheClientTypes.UpdateActionStatus]() - for enumContainer0 in updateActionStatusContainer { - updateActionStatusBuffer?.append(enumContainer0) - } - } - updateActionStatus = updateActionStatusBuffer - } else { - updateActionStatus = [] - } - } else { - updateActionStatus = nil - } - let showNodeLevelUpdateStatusDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .showNodeLevelUpdateStatus) - showNodeLevelUpdateStatus = showNodeLevelUpdateStatusDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeUpdateActionsOutput { -extension DescribeUpdateActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeUpdateActionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.updateActions = output.updateActions - } else { - self.marker = nil - self.updateActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeUpdateActionsResult"] + var value = DescribeUpdateActionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.updateActions = try reader["UpdateActions"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.UpdateAction.readingClosure, memberNodeInfo: "UpdateAction", isFlattened: false) + return value } } } @@ -12727,56 +9104,31 @@ public struct DescribeUpdateActionsOutput: Swift.Equatable { } } -struct DescribeUpdateActionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let updateActions: [ElastiCacheClientTypes.UpdateAction]? -} +enum DescribeUpdateActionsOutputError { -extension DescribeUpdateActionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case updateActions = "UpdateActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeUpdateActionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.updateActions) { - struct KeyVal0{struct UpdateAction{}} - let updateActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .updateActions) - if let updateActionsWrappedContainer = updateActionsWrappedContainer { - let updateActionsContainer = try updateActionsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.UpdateAction].self, forKey: .member) - var updateActionsBuffer:[ElastiCacheClientTypes.UpdateAction]? = nil - if let updateActionsContainer = updateActionsContainer { - updateActionsBuffer = [ElastiCacheClientTypes.UpdateAction]() - for structureContainer0 in updateActionsContainer { - updateActionsBuffer?.append(structureContainer0) - } - } - updateActions = updateActionsBuffer - } else { - updateActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - updateActions = nil } } } -enum DescribeUpdateActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeUserGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case userGroupId = "UserGroupId" } -} -extension DescribeUserGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -12820,40 +9172,16 @@ public struct DescribeUserGroupsInput: Swift.Equatable { } } -struct DescribeUserGroupsInputBody: Swift.Equatable { - let userGroupId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeUserGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case userGroupId = "UserGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeUserGroupsOutput { -extension DescribeUserGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeUserGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.userGroups = output.userGroups - } else { - self.marker = nil - self.userGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeUserGroupsResult"] + var value = DescribeUserGroupsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.userGroups = try reader["UserGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.UserGroup.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12874,57 +9202,34 @@ public struct DescribeUserGroupsOutput: Swift.Equatable { } } -struct DescribeUserGroupsOutputBody: Swift.Equatable { - let userGroups: [ElastiCacheClientTypes.UserGroup]? - let marker: Swift.String? -} - -extension DescribeUserGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case userGroups = "UserGroups" - } +enum DescribeUserGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeUserGroupsResult")) - if containerValues.contains(.userGroups) { - struct KeyVal0{struct member{}} - let userGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroups) - if let userGroupsWrappedContainer = userGroupsWrappedContainer { - let userGroupsContainer = try userGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.UserGroup].self, forKey: .member) - var userGroupsBuffer:[ElastiCacheClientTypes.UserGroup]? = nil - if let userGroupsContainer = userGroupsContainer { - userGroupsBuffer = [ElastiCacheClientTypes.UserGroup]() - for structureContainer0 in userGroupsContainer { - userGroupsBuffer?.append(structureContainer0) - } - } - userGroups = userGroupsBuffer - } else { - userGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - userGroups = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeUserGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeUsersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case engine = "Engine" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case userId = "UserId" } -} -extension DescribeUsersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let engine = engine { @@ -12991,65 +9296,16 @@ public struct DescribeUsersInput: Swift.Equatable { } } -struct DescribeUsersInputBody: Swift.Equatable { - let engine: Swift.String? - let userId: Swift.String? - let filters: [ElastiCacheClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeUsersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engine = "Engine" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case userId = "UserId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct member{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[ElastiCacheClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [ElastiCacheClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeUsersOutput { -extension DescribeUsersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeUsersOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.users = output.users - } else { - self.marker = nil - self.users = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeUsersResult"] + var value = DescribeUsersOutput() + value.marker = try reader["Marker"].readIfPresent() + value.users = try reader["Users"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.User.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13070,57 +9326,26 @@ public struct DescribeUsersOutput: Swift.Equatable { } } -struct DescribeUsersOutputBody: Swift.Equatable { - let users: [ElastiCacheClientTypes.User]? - let marker: Swift.String? -} +enum DescribeUsersOutputError { -extension DescribeUsersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case users = "Users" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeUsersResult")) - if containerValues.contains(.users) { - struct KeyVal0{struct member{}} - let usersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .users) - if let usersWrappedContainer = usersWrappedContainer { - let usersContainer = try usersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.User].self, forKey: .member) - var usersBuffer:[ElastiCacheClientTypes.User]? = nil - if let usersContainer = usersContainer { - usersBuffer = [ElastiCacheClientTypes.User]() - for structureContainer0 in usersContainer { - usersBuffer?.append(structureContainer0) - } - } - users = usersBuffer - } else { - users = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserNotFound": return try await UserNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - users = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum DescribeUsersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserNotFound": return try await UserNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElastiCacheClientTypes.DestinationDetails: Swift.Codable { +extension ElastiCacheClientTypes.DestinationDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cloudWatchLogsDetails = "CloudWatchLogsDetails" case kinesisFirehoseDetails = "KinesisFirehoseDetails" @@ -13136,12 +9361,14 @@ extension ElastiCacheClientTypes.DestinationDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cloudWatchLogsDetailsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CloudWatchLogsDestinationDetails.self, forKey: .cloudWatchLogsDetails) - cloudWatchLogsDetails = cloudWatchLogsDetailsDecoded - let kinesisFirehoseDetailsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.KinesisFirehoseDestinationDetails.self, forKey: .kinesisFirehoseDetails) - kinesisFirehoseDetails = kinesisFirehoseDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.DestinationDetails() + value.cloudWatchLogsDetails = try reader["CloudWatchLogsDetails"].readIfPresent(readingClosure: ElastiCacheClientTypes.CloudWatchLogsDestinationDetails.readingClosure) + value.kinesisFirehoseDetails = try reader["KinesisFirehoseDetails"].readIfPresent(readingClosure: ElastiCacheClientTypes.KinesisFirehoseDestinationDetails.readingClosure) + return value + } } } @@ -13198,6 +9425,12 @@ extension ElastiCacheClientTypes { } extension DisassociateGlobalReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalReplicationGroupId = "GlobalReplicationGroupId" + case replicationGroupId = "ReplicationGroupId" + case replicationGroupRegion = "ReplicationGroupRegion" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalReplicationGroupId = globalReplicationGroupId { @@ -13244,38 +9477,15 @@ public struct DisassociateGlobalReplicationGroupInput: Swift.Equatable { } } -struct DisassociateGlobalReplicationGroupInputBody: Swift.Equatable { - let globalReplicationGroupId: Swift.String? - let replicationGroupId: Swift.String? - let replicationGroupRegion: Swift.String? -} - -extension DisassociateGlobalReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroupId = "GlobalReplicationGroupId" - case replicationGroupId = "ReplicationGroupId" - case replicationGroupRegion = "ReplicationGroupRegion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let replicationGroupRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupRegion) - replicationGroupRegion = replicationGroupRegionDecoded - } -} +extension DisassociateGlobalReplicationGroupOutput { -extension DisassociateGlobalReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateGlobalReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroup = output.globalReplicationGroup - } else { - self.globalReplicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DisassociateGlobalReplicationGroupResult"] + var value = DisassociateGlobalReplicationGroupOutput() + value.globalReplicationGroup = try reader["GlobalReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure) + return value } } } @@ -13294,47 +9504,35 @@ public struct DisassociateGlobalReplicationGroupOutput: Swift.Equatable { } } -struct DisassociateGlobalReplicationGroupOutputBody: Swift.Equatable { - let globalReplicationGroup: ElastiCacheClientTypes.GlobalReplicationGroup? -} - -extension DisassociateGlobalReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroup = "GlobalReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DisassociateGlobalReplicationGroupResult")) - let globalReplicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroup.self, forKey: .globalReplicationGroup) - globalReplicationGroup = globalReplicationGroupDecoded - } -} +enum DisassociateGlobalReplicationGroupOutputError { -enum DisassociateGlobalReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DuplicateUserNameFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateUserNameFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13362,23 +9560,7 @@ public struct DuplicateUserNameFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct DuplicateUserNameFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateUserNameFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.EC2SecurityGroup: Swift.Codable { +extension ElastiCacheClientTypes.EC2SecurityGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ec2SecurityGroupName = "EC2SecurityGroupName" case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" @@ -13398,14 +9580,15 @@ extension ElastiCacheClientTypes.EC2SecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.EC2SecurityGroup() + value.status = try reader["Status"].readIfPresent() + value.ec2SecurityGroupName = try reader["EC2SecurityGroupName"].readIfPresent() + value.ec2SecurityGroupOwnerId = try reader["EC2SecurityGroupOwnerId"].readIfPresent() + return value + } } } @@ -13433,7 +9616,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.ECPUPerSecond: Swift.Codable { +extension ElastiCacheClientTypes.ECPUPerSecond: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maximum = "Maximum" } @@ -13445,10 +9628,13 @@ extension ElastiCacheClientTypes.ECPUPerSecond: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maximumDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximum) - maximum = maximumDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ECPUPerSecond() + value.maximum = try reader["Maximum"].readIfPresent() + return value + } } } @@ -13471,7 +9657,7 @@ extension ElastiCacheClientTypes { public enum ElastiCacheClientTypes {} -extension ElastiCacheClientTypes.Endpoint: Swift.Codable { +extension ElastiCacheClientTypes.Endpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case address = "Address" case port = "Port" @@ -13487,12 +9673,14 @@ extension ElastiCacheClientTypes.Endpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.Endpoint() + value.address = try reader["Address"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + return value + } } } @@ -13516,7 +9704,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.EngineDefaults: Swift.Codable { +extension ElastiCacheClientTypes.EngineDefaults: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheNodeTypeSpecificParameters = "CacheNodeTypeSpecificParameters" case cacheParameterGroupFamily = "CacheParameterGroupFamily" @@ -13558,49 +9746,15 @@ extension ElastiCacheClientTypes.EngineDefaults: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupFamily) - cacheParameterGroupFamily = cacheParameterGroupFamilyDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[ElastiCacheClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [ElastiCacheClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - if containerValues.contains(.cacheNodeTypeSpecificParameters) { - struct KeyVal0{struct CacheNodeTypeSpecificParameter{}} - let cacheNodeTypeSpecificParametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodeTypeSpecificParameters) - if let cacheNodeTypeSpecificParametersWrappedContainer = cacheNodeTypeSpecificParametersWrappedContainer { - let cacheNodeTypeSpecificParametersContainer = try cacheNodeTypeSpecificParametersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheNodeTypeSpecificParameter].self, forKey: .member) - var cacheNodeTypeSpecificParametersBuffer:[ElastiCacheClientTypes.CacheNodeTypeSpecificParameter]? = nil - if let cacheNodeTypeSpecificParametersContainer = cacheNodeTypeSpecificParametersContainer { - cacheNodeTypeSpecificParametersBuffer = [ElastiCacheClientTypes.CacheNodeTypeSpecificParameter]() - for structureContainer0 in cacheNodeTypeSpecificParametersContainer { - cacheNodeTypeSpecificParametersBuffer?.append(structureContainer0) - } - } - cacheNodeTypeSpecificParameters = cacheNodeTypeSpecificParametersBuffer - } else { - cacheNodeTypeSpecificParameters = [] - } - } else { - cacheNodeTypeSpecificParameters = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.EngineDefaults() + value.cacheParameterGroupFamily = try reader["CacheParameterGroupFamily"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + value.cacheNodeTypeSpecificParameters = try reader["CacheNodeTypeSpecificParameters"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheNodeTypeSpecificParameter.readingClosure, memberNodeInfo: "CacheNodeTypeSpecificParameter", isFlattened: false) + return value } } } @@ -13633,7 +9787,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.Event: Swift.Codable { +extension ElastiCacheClientTypes.Event: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case date = "Date" case message = "Message" @@ -13657,16 +9811,16 @@ extension ElastiCacheClientTypes.Event: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.Event() + value.sourceIdentifier = try reader["SourceIdentifier"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -13699,6 +9853,11 @@ extension ElastiCacheClientTypes { } extension ExportServerlessCacheSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case s3BucketName = "S3BucketName" + case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let s3BucketName = s3BucketName { @@ -13737,34 +9896,15 @@ public struct ExportServerlessCacheSnapshotInput: Swift.Equatable { } } -struct ExportServerlessCacheSnapshotInputBody: Swift.Equatable { - let serverlessCacheSnapshotName: Swift.String? - let s3BucketName: Swift.String? -} - -extension ExportServerlessCacheSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3BucketName = "S3BucketName" - case serverlessCacheSnapshotName = "ServerlessCacheSnapshotName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheSnapshotName) - serverlessCacheSnapshotName = serverlessCacheSnapshotNameDecoded - let s3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3BucketName) - s3BucketName = s3BucketNameDecoded - } -} +extension ExportServerlessCacheSnapshotOutput { -extension ExportServerlessCacheSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ExportServerlessCacheSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.serverlessCacheSnapshot = output.serverlessCacheSnapshot - } else { - self.serverlessCacheSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ExportServerlessCacheSnapshotResult"] + var value = ExportServerlessCacheSnapshotOutput() + value.serverlessCacheSnapshot = try reader["ServerlessCacheSnapshot"].readIfPresent(readingClosure: ElastiCacheClientTypes.ServerlessCacheSnapshot.readingClosure) + return value } } } @@ -13781,37 +9921,33 @@ public struct ExportServerlessCacheSnapshotOutput: Swift.Equatable { } } -struct ExportServerlessCacheSnapshotOutputBody: Swift.Equatable { - let serverlessCacheSnapshot: ElastiCacheClientTypes.ServerlessCacheSnapshot? -} - -extension ExportServerlessCacheSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverlessCacheSnapshot = "ServerlessCacheSnapshot" - } +enum ExportServerlessCacheSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ExportServerlessCacheSnapshotResult")) - let serverlessCacheSnapshotDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServerlessCacheSnapshot.self, forKey: .serverlessCacheSnapshot) - serverlessCacheSnapshot = serverlessCacheSnapshotDecoded - } -} - -enum ExportServerlessCacheSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension FailoverGlobalReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalReplicationGroupId = "GlobalReplicationGroupId" + case primaryRegion = "PrimaryRegion" + case primaryReplicationGroupId = "PrimaryReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalReplicationGroupId = globalReplicationGroupId { @@ -13858,38 +9994,15 @@ public struct FailoverGlobalReplicationGroupInput: Swift.Equatable { } } -struct FailoverGlobalReplicationGroupInputBody: Swift.Equatable { - let globalReplicationGroupId: Swift.String? - let primaryRegion: Swift.String? - let primaryReplicationGroupId: Swift.String? -} - -extension FailoverGlobalReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroupId = "GlobalReplicationGroupId" - case primaryRegion = "PrimaryRegion" - case primaryReplicationGroupId = "PrimaryReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let primaryRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryRegion) - primaryRegion = primaryRegionDecoded - let primaryReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryReplicationGroupId) - primaryReplicationGroupId = primaryReplicationGroupIdDecoded - } -} +extension FailoverGlobalReplicationGroupOutput { -extension FailoverGlobalReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: FailoverGlobalReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroup = output.globalReplicationGroup - } else { - self.globalReplicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["FailoverGlobalReplicationGroupResult"] + var value = FailoverGlobalReplicationGroupOutput() + value.globalReplicationGroup = try reader["GlobalReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure) + return value } } } @@ -13908,37 +10021,27 @@ public struct FailoverGlobalReplicationGroupOutput: Swift.Equatable { } } -struct FailoverGlobalReplicationGroupOutputBody: Swift.Equatable { - let globalReplicationGroup: ElastiCacheClientTypes.GlobalReplicationGroup? -} - -extension FailoverGlobalReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroup = "GlobalReplicationGroup" - } +enum FailoverGlobalReplicationGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("FailoverGlobalReplicationGroupResult")) - let globalReplicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroup.self, forKey: .globalReplicationGroup) - globalReplicationGroup = globalReplicationGroupDecoded - } -} - -enum FailoverGlobalReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElastiCacheClientTypes.Filter: Swift.Codable { +extension ElastiCacheClientTypes.Filter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case values = "Values" @@ -13963,28 +10066,13 @@ extension ElastiCacheClientTypes.Filter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.Filter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14011,7 +10099,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.GlobalNodeGroup: Swift.Codable { +extension ElastiCacheClientTypes.GlobalNodeGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case globalNodeGroupId = "GlobalNodeGroupId" case slots = "Slots" @@ -14027,12 +10115,14 @@ extension ElastiCacheClientTypes.GlobalNodeGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalNodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalNodeGroupId) - globalNodeGroupId = globalNodeGroupIdDecoded - let slotsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .slots) - slots = slotsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.GlobalNodeGroup() + value.globalNodeGroupId = try reader["GlobalNodeGroupId"].readIfPresent() + value.slots = try reader["Slots"].readIfPresent() + return value + } } } @@ -14056,7 +10146,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.GlobalReplicationGroup: Swift.Codable { +extension ElastiCacheClientTypes.GlobalReplicationGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case atRestEncryptionEnabled = "AtRestEncryptionEnabled" @@ -14134,68 +10224,25 @@ extension ElastiCacheClientTypes.GlobalReplicationGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let globalReplicationGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupDescription) - globalReplicationGroupDescription = globalReplicationGroupDescriptionDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - if containerValues.contains(.members) { - struct KeyVal0{struct GlobalReplicationGroupMember{}} - let membersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .members) - if let membersWrappedContainer = membersWrappedContainer { - let membersContainer = try membersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.GlobalReplicationGroupMember].self, forKey: .member) - var membersBuffer:[ElastiCacheClientTypes.GlobalReplicationGroupMember]? = nil - if let membersContainer = membersContainer { - membersBuffer = [ElastiCacheClientTypes.GlobalReplicationGroupMember]() - for structureContainer0 in membersContainer { - membersBuffer?.append(structureContainer0) - } - } - members = membersBuffer - } else { - members = [] - } - } else { - members = nil - } - let clusterEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .clusterEnabled) - clusterEnabled = clusterEnabledDecoded - if containerValues.contains(.globalNodeGroups) { - struct KeyVal0{struct GlobalNodeGroup{}} - let globalNodeGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalNodeGroups) - if let globalNodeGroupsWrappedContainer = globalNodeGroupsWrappedContainer { - let globalNodeGroupsContainer = try globalNodeGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.GlobalNodeGroup].self, forKey: .member) - var globalNodeGroupsBuffer:[ElastiCacheClientTypes.GlobalNodeGroup]? = nil - if let globalNodeGroupsContainer = globalNodeGroupsContainer { - globalNodeGroupsBuffer = [ElastiCacheClientTypes.GlobalNodeGroup]() - for structureContainer0 in globalNodeGroupsContainer { - globalNodeGroupsBuffer?.append(structureContainer0) - } - } - globalNodeGroups = globalNodeGroupsBuffer - } else { - globalNodeGroups = [] - } - } else { - globalNodeGroups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.GlobalReplicationGroup() + value.globalReplicationGroupId = try reader["GlobalReplicationGroupId"].readIfPresent() + value.globalReplicationGroupDescription = try reader["GlobalReplicationGroupDescription"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.cacheNodeType = try reader["CacheNodeType"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.members = try reader["Members"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.GlobalReplicationGroupMember.readingClosure, memberNodeInfo: "GlobalReplicationGroupMember", isFlattened: false) + value.clusterEnabled = try reader["ClusterEnabled"].readIfPresent() + value.globalNodeGroups = try reader["GlobalNodeGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.GlobalNodeGroup.readingClosure, memberNodeInfo: "GlobalNodeGroup", isFlattened: false) + value.authTokenEnabled = try reader["AuthTokenEnabled"].readIfPresent() + value.transitEncryptionEnabled = try reader["TransitEncryptionEnabled"].readIfPresent() + value.atRestEncryptionEnabled = try reader["AtRestEncryptionEnabled"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + return value } - let authTokenEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .authTokenEnabled) - authTokenEnabled = authTokenEnabledDecoded - let transitEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .transitEncryptionEnabled) - transitEncryptionEnabled = transitEncryptionEnabledDecoded - let atRestEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .atRestEncryptionEnabled) - atRestEncryptionEnabled = atRestEncryptionEnabledDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded } } @@ -14266,16 +10313,14 @@ extension ElastiCacheClientTypes { } extension GlobalReplicationGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalReplicationGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14303,23 +10348,7 @@ public struct GlobalReplicationGroupAlreadyExistsFault: ClientRuntime.ModeledErr } } -struct GlobalReplicationGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalReplicationGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.GlobalReplicationGroupInfo: Swift.Codable { +extension ElastiCacheClientTypes.GlobalReplicationGroupInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case globalReplicationGroupId = "GlobalReplicationGroupId" case globalReplicationGroupMemberRole = "GlobalReplicationGroupMemberRole" @@ -14335,12 +10364,14 @@ extension ElastiCacheClientTypes.GlobalReplicationGroupInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let globalReplicationGroupMemberRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupMemberRole) - globalReplicationGroupMemberRole = globalReplicationGroupMemberRoleDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.GlobalReplicationGroupInfo() + value.globalReplicationGroupId = try reader["GlobalReplicationGroupId"].readIfPresent() + value.globalReplicationGroupMemberRole = try reader["GlobalReplicationGroupMemberRole"].readIfPresent() + return value + } } } @@ -14364,7 +10395,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.GlobalReplicationGroupMember: Swift.Codable { +extension ElastiCacheClientTypes.GlobalReplicationGroupMember: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case automaticFailover = "AutomaticFailover" case replicationGroupId = "ReplicationGroupId" @@ -14392,18 +10423,17 @@ extension ElastiCacheClientTypes.GlobalReplicationGroupMember: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let replicationGroupRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupRegion) - replicationGroupRegion = replicationGroupRegionDecoded - let roleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .role) - role = roleDecoded - let automaticFailoverDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AutomaticFailoverStatus.self, forKey: .automaticFailover) - automaticFailover = automaticFailoverDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.GlobalReplicationGroupMember() + value.replicationGroupId = try reader["ReplicationGroupId"].readIfPresent() + value.replicationGroupRegion = try reader["ReplicationGroupRegion"].readIfPresent() + value.role = try reader["Role"].readIfPresent() + value.automaticFailover = try reader["AutomaticFailover"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -14440,16 +10470,14 @@ extension ElastiCacheClientTypes { } extension GlobalReplicationGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalReplicationGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14477,23 +10505,14 @@ public struct GlobalReplicationGroupNotFoundFault: ClientRuntime.ModeledError, A } } -struct GlobalReplicationGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalReplicationGroupNotFoundFaultBody: Swift.Decodable { +extension IncreaseNodeGroupsInGlobalReplicationGroupInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case applyImmediately = "ApplyImmediately" + case globalReplicationGroupId = "GlobalReplicationGroupId" + case nodeGroupCount = "NodeGroupCount" + case regionalConfigurations = "RegionalConfigurations" } -} -extension IncreaseNodeGroupsInGlobalReplicationGroupInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -14556,59 +10575,15 @@ public struct IncreaseNodeGroupsInGlobalReplicationGroupInput: Swift.Equatable { } } -struct IncreaseNodeGroupsInGlobalReplicationGroupInputBody: Swift.Equatable { - let globalReplicationGroupId: Swift.String? - let nodeGroupCount: Swift.Int? - let regionalConfigurations: [ElastiCacheClientTypes.RegionalConfiguration]? - let applyImmediately: Swift.Bool? -} - -extension IncreaseNodeGroupsInGlobalReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case globalReplicationGroupId = "GlobalReplicationGroupId" - case nodeGroupCount = "NodeGroupCount" - case regionalConfigurations = "RegionalConfigurations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let nodeGroupCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .nodeGroupCount) - nodeGroupCount = nodeGroupCountDecoded - if containerValues.contains(.regionalConfigurations) { - struct KeyVal0{struct RegionalConfiguration{}} - let regionalConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regionalConfigurations) - if let regionalConfigurationsWrappedContainer = regionalConfigurationsWrappedContainer { - let regionalConfigurationsContainer = try regionalConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.RegionalConfiguration].self, forKey: .member) - var regionalConfigurationsBuffer:[ElastiCacheClientTypes.RegionalConfiguration]? = nil - if let regionalConfigurationsContainer = regionalConfigurationsContainer { - regionalConfigurationsBuffer = [ElastiCacheClientTypes.RegionalConfiguration]() - for structureContainer0 in regionalConfigurationsContainer { - regionalConfigurationsBuffer?.append(structureContainer0) - } - } - regionalConfigurations = regionalConfigurationsBuffer - } else { - regionalConfigurations = [] - } - } else { - regionalConfigurations = nil - } - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - } -} +extension IncreaseNodeGroupsInGlobalReplicationGroupOutput { -extension IncreaseNodeGroupsInGlobalReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: IncreaseNodeGroupsInGlobalReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroup = output.globalReplicationGroup - } else { - self.globalReplicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["IncreaseNodeGroupsInGlobalReplicationGroupResult"] + var value = IncreaseNodeGroupsInGlobalReplicationGroupOutput() + value.globalReplicationGroup = try reader["GlobalReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure) + return value } } } @@ -14627,36 +10602,33 @@ public struct IncreaseNodeGroupsInGlobalReplicationGroupOutput: Swift.Equatable } } -struct IncreaseNodeGroupsInGlobalReplicationGroupOutputBody: Swift.Equatable { - let globalReplicationGroup: ElastiCacheClientTypes.GlobalReplicationGroup? -} - -extension IncreaseNodeGroupsInGlobalReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroup = "GlobalReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("IncreaseNodeGroupsInGlobalReplicationGroupResult")) - let globalReplicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroup.self, forKey: .globalReplicationGroup) - globalReplicationGroup = globalReplicationGroupDecoded - } -} +enum IncreaseNodeGroupsInGlobalReplicationGroupOutputError { -enum IncreaseNodeGroupsInGlobalReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension IncreaseReplicaCountInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case newReplicaCount = "NewReplicaCount" + case replicaConfiguration = "ReplicaConfiguration" + case replicationGroupId = "ReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -14710,67 +10682,23 @@ public struct IncreaseReplicaCountInput: Swift.Equatable { replicaConfiguration: [ElastiCacheClientTypes.ConfigureShard]? = nil, replicationGroupId: Swift.String? = nil ) - { - self.applyImmediately = applyImmediately - self.newReplicaCount = newReplicaCount - self.replicaConfiguration = replicaConfiguration - self.replicationGroupId = replicationGroupId - } -} - -struct IncreaseReplicaCountInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let newReplicaCount: Swift.Int? - let replicaConfiguration: [ElastiCacheClientTypes.ConfigureShard]? - let applyImmediately: Swift.Bool? -} - -extension IncreaseReplicaCountInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case newReplicaCount = "NewReplicaCount" - case replicaConfiguration = "ReplicaConfiguration" - case replicationGroupId = "ReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let newReplicaCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .newReplicaCount) - newReplicaCount = newReplicaCountDecoded - if containerValues.contains(.replicaConfiguration) { - struct KeyVal0{struct ConfigureShard{}} - let replicaConfigurationWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicaConfiguration) - if let replicaConfigurationWrappedContainer = replicaConfigurationWrappedContainer { - let replicaConfigurationContainer = try replicaConfigurationWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ConfigureShard].self, forKey: .member) - var replicaConfigurationBuffer:[ElastiCacheClientTypes.ConfigureShard]? = nil - if let replicaConfigurationContainer = replicaConfigurationContainer { - replicaConfigurationBuffer = [ElastiCacheClientTypes.ConfigureShard]() - for structureContainer0 in replicaConfigurationContainer { - replicaConfigurationBuffer?.append(structureContainer0) - } - } - replicaConfiguration = replicaConfigurationBuffer - } else { - replicaConfiguration = [] - } - } else { - replicaConfiguration = nil - } - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded + { + self.applyImmediately = applyImmediately + self.newReplicaCount = newReplicaCount + self.replicaConfiguration = replicaConfiguration + self.replicationGroupId = replicationGroupId } } -extension IncreaseReplicaCountOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: IncreaseReplicaCountOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil +extension IncreaseReplicaCountOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["IncreaseReplicaCountResult"] + var value = IncreaseReplicaCountOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -14787,40 +10715,30 @@ public struct IncreaseReplicaCountOutput: Swift.Equatable { } } -struct IncreaseReplicaCountOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension IncreaseReplicaCountOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("IncreaseReplicaCountResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} +enum IncreaseReplicaCountOutputError { -enum IncreaseReplicaCountOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterQuotaForCustomerExceeded": return try await ClusterQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSKeyFault": return try await InvalidKMSKeyFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeGroupsPerReplicationGroupQuotaExceeded": return try await NodeGroupsPerReplicationGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoOperationFault": return try await NoOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterQuotaForCustomerExceeded": return try await ClusterQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidKMSKeyFault": return try await InvalidKMSKeyFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeGroupsPerReplicationGroupQuotaExceeded": return try await NodeGroupsPerReplicationGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoOperationFault": return try await NoOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -14861,16 +10779,14 @@ extension ElastiCacheClientTypes { } extension InsufficientCacheClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientCacheClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14898,33 +10814,15 @@ public struct InsufficientCacheClusterCapacityFault: ClientRuntime.ModeledError, } } -struct InsufficientCacheClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientCacheClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidARNFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidARNFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14952,33 +10850,15 @@ public struct InvalidARNFault: ClientRuntime.ModeledError, AWSClientRuntime.AWSS } } -struct InvalidARNFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidARNFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidCacheClusterStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidCacheClusterStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15006,33 +10886,15 @@ public struct InvalidCacheClusterStateFault: ClientRuntime.ModeledError, AWSClie } } -struct InvalidCacheClusterStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidCacheClusterStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidCacheParameterGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidCacheParameterGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15060,33 +10922,15 @@ public struct InvalidCacheParameterGroupStateFault: ClientRuntime.ModeledError, } } -struct InvalidCacheParameterGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidCacheParameterGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidCacheSecurityGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidCacheSecurityGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15114,33 +10958,15 @@ public struct InvalidCacheSecurityGroupStateFault: ClientRuntime.ModeledError, A } } -struct InvalidCacheSecurityGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidCacheSecurityGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidCredentialsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidCredentialsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15168,33 +10994,15 @@ public struct InvalidCredentialsException: ClientRuntime.ModeledError, AWSClient } } -struct InvalidCredentialsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidCredentialsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidGlobalReplicationGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidGlobalReplicationGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15222,33 +11030,15 @@ public struct InvalidGlobalReplicationGroupStateFault: ClientRuntime.ModeledErro } } -struct InvalidGlobalReplicationGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidGlobalReplicationGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidKMSKeyFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidKMSKeyFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15276,33 +11066,15 @@ public struct InvalidKMSKeyFault: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct InvalidKMSKeyFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidKMSKeyFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidParameterCombinationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidParameterCombinationException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15331,33 +11103,15 @@ public struct InvalidParameterCombinationException: ClientRuntime.ModeledError, } } -struct InvalidParameterCombinationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidParameterCombinationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidParameterValueException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidParameterValueException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15386,33 +11140,15 @@ public struct InvalidParameterValueException: ClientRuntime.ModeledError, AWSCli } } -struct InvalidParameterValueExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidParameterValueExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidReplicationGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidReplicationGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15440,33 +11176,15 @@ public struct InvalidReplicationGroupStateFault: ClientRuntime.ModeledError, AWS } } -struct InvalidReplicationGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidReplicationGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidServerlessCacheSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidServerlessCacheSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15494,33 +11212,15 @@ public struct InvalidServerlessCacheSnapshotStateFault: ClientRuntime.ModeledErr } } -struct InvalidServerlessCacheSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidServerlessCacheSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidServerlessCacheStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidServerlessCacheStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15548,33 +11248,15 @@ public struct InvalidServerlessCacheStateFault: ClientRuntime.ModeledError, AWSC } } -struct InvalidServerlessCacheStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidServerlessCacheStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15602,33 +11284,15 @@ public struct InvalidSnapshotStateFault: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSubnet { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSubnet() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15656,33 +11320,15 @@ public struct InvalidSubnet: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct InvalidSubnetBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSubnetBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidUserGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidUserGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15710,33 +11356,15 @@ public struct InvalidUserGroupStateFault: ClientRuntime.ModeledError, AWSClientR } } -struct InvalidUserGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidUserGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidUserStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidUserStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15764,33 +11392,15 @@ public struct InvalidUserStateFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct InvalidUserStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidUserStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidVPCNetworkStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidVPCNetworkStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15818,22 +11428,6 @@ public struct InvalidVPCNetworkStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidVPCNetworkStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidVPCNetworkStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ElastiCacheClientTypes { public enum IpDiscovery: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case ipv4 @@ -15866,7 +11460,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.KinesisFirehoseDestinationDetails: Swift.Codable { +extension ElastiCacheClientTypes.KinesisFirehoseDestinationDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deliveryStream = "DeliveryStream" } @@ -15878,10 +11472,13 @@ extension ElastiCacheClientTypes.KinesisFirehoseDestinationDetails: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deliveryStreamDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliveryStream) - deliveryStream = deliveryStreamDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.KinesisFirehoseDestinationDetails() + value.deliveryStream = try reader["DeliveryStream"].readIfPresent() + return value + } } } @@ -15902,6 +11499,11 @@ extension ElastiCacheClientTypes { } extension ListAllowedNodeTypeModificationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheClusterId = "CacheClusterId" + case replicationGroupId = "ReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterId = cacheClusterId { @@ -15939,36 +11541,16 @@ public struct ListAllowedNodeTypeModificationsInput: Swift.Equatable { } } -struct ListAllowedNodeTypeModificationsInputBody: Swift.Equatable { - let cacheClusterId: Swift.String? - let replicationGroupId: Swift.String? -} - -extension ListAllowedNodeTypeModificationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterId = "CacheClusterId" - case replicationGroupId = "ReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - } -} +extension ListAllowedNodeTypeModificationsOutput { -extension ListAllowedNodeTypeModificationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAllowedNodeTypeModificationsOutputBody = try responseDecoder.decode(responseBody: data) - self.scaleDownModifications = output.scaleDownModifications - self.scaleUpModifications = output.scaleUpModifications - } else { - self.scaleDownModifications = nil - self.scaleUpModifications = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListAllowedNodeTypeModificationsResult"] + var value = ListAllowedNodeTypeModificationsOutput() + value.scaleDownModifications = try reader["ScaleDownModifications"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.scaleUpModifications = try reader["ScaleUpModifications"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15990,75 +11572,31 @@ public struct ListAllowedNodeTypeModificationsOutput: Swift.Equatable { } } -struct ListAllowedNodeTypeModificationsOutputBody: Swift.Equatable { - let scaleUpModifications: [Swift.String]? - let scaleDownModifications: [Swift.String]? -} +enum ListAllowedNodeTypeModificationsOutputError { -extension ListAllowedNodeTypeModificationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case scaleDownModifications = "ScaleDownModifications" - case scaleUpModifications = "ScaleUpModifications" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListAllowedNodeTypeModificationsResult")) - if containerValues.contains(.scaleUpModifications) { - struct KeyVal0{struct member{}} - let scaleUpModificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scaleUpModifications) - if let scaleUpModificationsWrappedContainer = scaleUpModificationsWrappedContainer { - let scaleUpModificationsContainer = try scaleUpModificationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scaleUpModificationsBuffer:[Swift.String]? = nil - if let scaleUpModificationsContainer = scaleUpModificationsContainer { - scaleUpModificationsBuffer = [Swift.String]() - for stringContainer0 in scaleUpModificationsContainer { - scaleUpModificationsBuffer?.append(stringContainer0) - } - } - scaleUpModifications = scaleUpModificationsBuffer - } else { - scaleUpModifications = [] - } - } else { - scaleUpModifications = nil - } - if containerValues.contains(.scaleDownModifications) { - struct KeyVal0{struct member{}} - let scaleDownModificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scaleDownModifications) - if let scaleDownModificationsWrappedContainer = scaleDownModificationsWrappedContainer { - let scaleDownModificationsContainer = try scaleDownModificationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scaleDownModificationsBuffer:[Swift.String]? = nil - if let scaleDownModificationsContainer = scaleDownModificationsContainer { - scaleDownModificationsBuffer = [Swift.String]() - for stringContainer0 in scaleDownModificationsContainer { - scaleDownModificationsBuffer?.append(stringContainer0) - } - } - scaleDownModifications = scaleDownModificationsBuffer - } else { - scaleDownModifications = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - scaleDownModifications = nil } } } -enum ListAllowedNodeTypeModificationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTagsForResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" } -} -extension ListTagsForResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -16090,30 +11628,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -struct ListTagsForResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? -} - -extension ListTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - } -} +extension ListTagsForResourceOutput { -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tagList = output.tagList - } else { - self.tagList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTagsForResourceResult"] + var value = ListTagsForResourceOutput() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -16131,65 +11654,38 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let tagList: [ElastiCacheClientTypes.Tag]? -} +enum ListTagsForResourceOutputError { -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagList = "TagList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTagsForResourceResult")) - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidARN": return try await InvalidARNFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedCacheNodeNotFound": return try await ReservedCacheNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserNotFound": return try await UserNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tagList = nil - } - } -} - -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidARN": return try await InvalidARNFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedCacheNodeNotFound": return try await ReservedCacheNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserNotFound": return try await UserNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElastiCacheClientTypes.LogDeliveryConfiguration: Swift.Codable { +extension ElastiCacheClientTypes.LogDeliveryConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case destinationDetails = "DestinationDetails" case destinationType = "DestinationType" @@ -16221,20 +11717,18 @@ extension ElastiCacheClientTypes.LogDeliveryConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.LogType.self, forKey: .logType) - logType = logTypeDecoded - let destinationTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DestinationType.self, forKey: .destinationType) - destinationType = destinationTypeDecoded - let destinationDetailsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DestinationDetails.self, forKey: .destinationDetails) - destinationDetails = destinationDetailsDecoded - let logFormatDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.LogFormat.self, forKey: .logFormat) - logFormat = logFormatDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.LogDeliveryConfigurationStatus.self, forKey: .status) - status = statusDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.LogDeliveryConfiguration() + value.logType = try reader["LogType"].readIfPresent() + value.destinationType = try reader["DestinationType"].readIfPresent() + value.destinationDetails = try reader["DestinationDetails"].readIfPresent(readingClosure: ElastiCacheClientTypes.DestinationDetails.readingClosure) + value.logFormat = try reader["LogFormat"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + return value + } } } @@ -16274,7 +11768,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.LogDeliveryConfigurationRequest: Swift.Codable { +extension ElastiCacheClientTypes.LogDeliveryConfigurationRequest: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case destinationDetails = "DestinationDetails" case destinationType = "DestinationType" @@ -16302,18 +11796,17 @@ extension ElastiCacheClientTypes.LogDeliveryConfigurationRequest: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.LogType.self, forKey: .logType) - logType = logTypeDecoded - let destinationTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DestinationType.self, forKey: .destinationType) - destinationType = destinationTypeDecoded - let destinationDetailsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DestinationDetails.self, forKey: .destinationDetails) - destinationDetails = destinationDetailsDecoded - let logFormatDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.LogFormat.self, forKey: .logFormat) - logFormat = logFormatDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.LogDeliveryConfigurationRequest() + value.logType = try reader["LogType"].readIfPresent() + value.destinationType = try reader["DestinationType"].readIfPresent() + value.destinationDetails = try reader["DestinationDetails"].readIfPresent(readingClosure: ElastiCacheClientTypes.DestinationDetails.readingClosure) + value.logFormat = try reader["LogFormat"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -16452,9 +11945,33 @@ extension ElastiCacheClientTypes { self = LogType(rawValue: rawValue) ?? LogType.sdkUnknown(rawValue) } } -} +} + +extension ModifyCacheClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case azMode = "AZMode" + case applyImmediately = "ApplyImmediately" + case authToken = "AuthToken" + case authTokenUpdateStrategy = "AuthTokenUpdateStrategy" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case cacheClusterId = "CacheClusterId" + case cacheNodeIdsToRemove = "CacheNodeIdsToRemove" + case cacheNodeType = "CacheNodeType" + case cacheParameterGroupName = "CacheParameterGroupName" + case cacheSecurityGroupNames = "CacheSecurityGroupNames" + case engineVersion = "EngineVersion" + case ipDiscovery = "IpDiscovery" + case logDeliveryConfigurations = "LogDeliveryConfigurations" + case newAvailabilityZones = "NewAvailabilityZones" + case notificationTopicArn = "NotificationTopicArn" + case notificationTopicStatus = "NotificationTopicStatus" + case numCacheNodes = "NumCacheNodes" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case securityGroupIds = "SecurityGroupIds" + case snapshotRetentionLimit = "SnapshotRetentionLimit" + case snapshotWindow = "SnapshotWindow" + } -extension ModifyCacheClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let azMode = azMode { @@ -16754,195 +12271,15 @@ public struct ModifyCacheClusterInput: Swift.Equatable { } } -struct ModifyCacheClusterInputBody: Swift.Equatable { - let cacheClusterId: Swift.String? - let numCacheNodes: Swift.Int? - let cacheNodeIdsToRemove: [Swift.String]? - let azMode: ElastiCacheClientTypes.AZMode? - let newAvailabilityZones: [Swift.String]? - let cacheSecurityGroupNames: [Swift.String]? - let securityGroupIds: [Swift.String]? - let preferredMaintenanceWindow: Swift.String? - let notificationTopicArn: Swift.String? - let cacheParameterGroupName: Swift.String? - let notificationTopicStatus: Swift.String? - let applyImmediately: Swift.Bool? - let engineVersion: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let snapshotRetentionLimit: Swift.Int? - let snapshotWindow: Swift.String? - let cacheNodeType: Swift.String? - let authToken: Swift.String? - let authTokenUpdateStrategy: ElastiCacheClientTypes.AuthTokenUpdateStrategyType? - let logDeliveryConfigurations: [ElastiCacheClientTypes.LogDeliveryConfigurationRequest]? - let ipDiscovery: ElastiCacheClientTypes.IpDiscovery? -} - -extension ModifyCacheClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case azMode = "AZMode" - case applyImmediately = "ApplyImmediately" - case authToken = "AuthToken" - case authTokenUpdateStrategy = "AuthTokenUpdateStrategy" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case cacheClusterId = "CacheClusterId" - case cacheNodeIdsToRemove = "CacheNodeIdsToRemove" - case cacheNodeType = "CacheNodeType" - case cacheParameterGroupName = "CacheParameterGroupName" - case cacheSecurityGroupNames = "CacheSecurityGroupNames" - case engineVersion = "EngineVersion" - case ipDiscovery = "IpDiscovery" - case logDeliveryConfigurations = "LogDeliveryConfigurations" - case newAvailabilityZones = "NewAvailabilityZones" - case notificationTopicArn = "NotificationTopicArn" - case notificationTopicStatus = "NotificationTopicStatus" - case numCacheNodes = "NumCacheNodes" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case securityGroupIds = "SecurityGroupIds" - case snapshotRetentionLimit = "SnapshotRetentionLimit" - case snapshotWindow = "SnapshotWindow" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let numCacheNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numCacheNodes) - numCacheNodes = numCacheNodesDecoded - if containerValues.contains(.cacheNodeIdsToRemove) { - struct KeyVal0{struct CacheNodeId{}} - let cacheNodeIdsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodeIdsToRemove) - if let cacheNodeIdsToRemoveWrappedContainer = cacheNodeIdsToRemoveWrappedContainer { - let cacheNodeIdsToRemoveContainer = try cacheNodeIdsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheNodeIdsToRemoveBuffer:[Swift.String]? = nil - if let cacheNodeIdsToRemoveContainer = cacheNodeIdsToRemoveContainer { - cacheNodeIdsToRemoveBuffer = [Swift.String]() - for stringContainer0 in cacheNodeIdsToRemoveContainer { - cacheNodeIdsToRemoveBuffer?.append(stringContainer0) - } - } - cacheNodeIdsToRemove = cacheNodeIdsToRemoveBuffer - } else { - cacheNodeIdsToRemove = [] - } - } else { - cacheNodeIdsToRemove = nil - } - let azModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AZMode.self, forKey: .azMode) - azMode = azModeDecoded - if containerValues.contains(.newAvailabilityZones) { - struct KeyVal0{struct PreferredAvailabilityZone{}} - let newAvailabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .newAvailabilityZones) - if let newAvailabilityZonesWrappedContainer = newAvailabilityZonesWrappedContainer { - let newAvailabilityZonesContainer = try newAvailabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var newAvailabilityZonesBuffer:[Swift.String]? = nil - if let newAvailabilityZonesContainer = newAvailabilityZonesContainer { - newAvailabilityZonesBuffer = [Swift.String]() - for stringContainer0 in newAvailabilityZonesContainer { - newAvailabilityZonesBuffer?.append(stringContainer0) - } - } - newAvailabilityZones = newAvailabilityZonesBuffer - } else { - newAvailabilityZones = [] - } - } else { - newAvailabilityZones = nil - } - if containerValues.contains(.cacheSecurityGroupNames) { - struct KeyVal0{struct CacheSecurityGroupName{}} - let cacheSecurityGroupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheSecurityGroupNames) - if let cacheSecurityGroupNamesWrappedContainer = cacheSecurityGroupNamesWrappedContainer { - let cacheSecurityGroupNamesContainer = try cacheSecurityGroupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheSecurityGroupNamesBuffer:[Swift.String]? = nil - if let cacheSecurityGroupNamesContainer = cacheSecurityGroupNamesContainer { - cacheSecurityGroupNamesBuffer = [Swift.String]() - for stringContainer0 in cacheSecurityGroupNamesContainer { - cacheSecurityGroupNamesBuffer?.append(stringContainer0) - } - } - cacheSecurityGroupNames = cacheSecurityGroupNamesBuffer - } else { - cacheSecurityGroupNames = [] - } - } else { - cacheSecurityGroupNames = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let notificationTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTopicArn) - notificationTopicArn = notificationTopicArnDecoded - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let notificationTopicStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTopicStatus) - notificationTopicStatus = notificationTopicStatusDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let snapshotWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotWindow) - snapshotWindow = snapshotWindowDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let authTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authToken) - authToken = authTokenDecoded - let authTokenUpdateStrategyDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AuthTokenUpdateStrategyType.self, forKey: .authTokenUpdateStrategy) - authTokenUpdateStrategy = authTokenUpdateStrategyDecoded - if containerValues.contains(.logDeliveryConfigurations) { - struct KeyVal0{struct LogDeliveryConfigurationRequest{}} - let logDeliveryConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logDeliveryConfigurations) - if let logDeliveryConfigurationsWrappedContainer = logDeliveryConfigurationsWrappedContainer { - let logDeliveryConfigurationsContainer = try logDeliveryConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.LogDeliveryConfigurationRequest].self, forKey: .member) - var logDeliveryConfigurationsBuffer:[ElastiCacheClientTypes.LogDeliveryConfigurationRequest]? = nil - if let logDeliveryConfigurationsContainer = logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer = [ElastiCacheClientTypes.LogDeliveryConfigurationRequest]() - for structureContainer0 in logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer?.append(structureContainer0) - } - } - logDeliveryConfigurations = logDeliveryConfigurationsBuffer - } else { - logDeliveryConfigurations = [] - } - } else { - logDeliveryConfigurations = nil - } - let ipDiscoveryDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.IpDiscovery.self, forKey: .ipDiscovery) - ipDiscovery = ipDiscoveryDecoded - } -} +extension ModifyCacheClusterOutput { -extension ModifyCacheClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCacheClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheCluster = output.cacheCluster - } else { - self.cacheCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyCacheClusterResult"] + var value = ModifyCacheClusterOutput() + value.cacheCluster = try reader["CacheCluster"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheCluster.readingClosure) + return value } } } @@ -16959,44 +12296,39 @@ public struct ModifyCacheClusterOutput: Swift.Equatable { } } -struct ModifyCacheClusterOutputBody: Swift.Equatable { - let cacheCluster: ElastiCacheClientTypes.CacheCluster? -} - -extension ModifyCacheClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheCluster = "CacheCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyCacheClusterResult")) - let cacheClusterDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheCluster.self, forKey: .cacheCluster) - cacheCluster = cacheClusterDecoded - } -} +enum ModifyCacheClusterOutputError { -enum ModifyCacheClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForClusterExceeded": return try await NodeQuotaForClusterExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForClusterExceeded": return try await NodeQuotaForClusterExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyCacheParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheParameterGroupName = "CacheParameterGroupName" + case parameterNameValues = "ParameterNameValues" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheParameterGroupName = cacheParameterGroupName { @@ -17045,51 +12377,15 @@ public struct ModifyCacheParameterGroupInput: Swift.Equatable { } } -struct ModifyCacheParameterGroupInputBody: Swift.Equatable { - let cacheParameterGroupName: Swift.String? - let parameterNameValues: [ElastiCacheClientTypes.ParameterNameValue]? -} - -extension ModifyCacheParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupName = "CacheParameterGroupName" - case parameterNameValues = "ParameterNameValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - if containerValues.contains(.parameterNameValues) { - struct KeyVal0{struct ParameterNameValue{}} - let parameterNameValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameterNameValues) - if let parameterNameValuesWrappedContainer = parameterNameValuesWrappedContainer { - let parameterNameValuesContainer = try parameterNameValuesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ParameterNameValue].self, forKey: .member) - var parameterNameValuesBuffer:[ElastiCacheClientTypes.ParameterNameValue]? = nil - if let parameterNameValuesContainer = parameterNameValuesContainer { - parameterNameValuesBuffer = [ElastiCacheClientTypes.ParameterNameValue]() - for structureContainer0 in parameterNameValuesContainer { - parameterNameValuesBuffer?.append(structureContainer0) - } - } - parameterNameValues = parameterNameValuesBuffer - } else { - parameterNameValues = [] - } - } else { - parameterNameValues = nil - } - } -} +extension ModifyCacheParameterGroupOutput { -extension ModifyCacheParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCacheParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheParameterGroupName = output.cacheParameterGroupName - } else { - self.cacheParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyCacheParameterGroupResult"] + var value = ModifyCacheParameterGroupOutput() + value.cacheParameterGroupName = try reader["CacheParameterGroupName"].readIfPresent() + return value } } } @@ -17111,38 +12407,34 @@ public struct ModifyCacheParameterGroupOutput: Swift.Equatable { } } -struct ModifyCacheParameterGroupOutputBody: Swift.Equatable { - let cacheParameterGroupName: Swift.String? -} - -extension ModifyCacheParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupName = "CacheParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyCacheParameterGroupResult")) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - } -} +enum ModifyCacheParameterGroupOutputError { -enum ModifyCacheParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheParameterGroupState": return try await InvalidCacheParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheParameterGroupState": return try await InvalidCacheParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyCacheSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheSubnetGroupDescription = "CacheSubnetGroupDescription" + case cacheSubnetGroupName = "CacheSubnetGroupName" + case subnetIds = "SubnetIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSubnetGroupDescription = cacheSubnetGroupDescription { @@ -17197,55 +12489,15 @@ public struct ModifyCacheSubnetGroupInput: Swift.Equatable { } } -struct ModifyCacheSubnetGroupInputBody: Swift.Equatable { - let cacheSubnetGroupName: Swift.String? - let cacheSubnetGroupDescription: Swift.String? - let subnetIds: [Swift.String]? -} - -extension ModifyCacheSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSubnetGroupDescription = "CacheSubnetGroupDescription" - case cacheSubnetGroupName = "CacheSubnetGroupName" - case subnetIds = "SubnetIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - let cacheSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupDescription) - cacheSubnetGroupDescription = cacheSubnetGroupDescriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - } -} +extension ModifyCacheSubnetGroupOutput { -extension ModifyCacheSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCacheSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheSubnetGroup = output.cacheSubnetGroup - } else { - self.cacheSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyCacheSubnetGroupResult"] + var value = ModifyCacheSubnetGroupOutput() + value.cacheSubnetGroup = try reader["CacheSubnetGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheSubnetGroup.readingClosure) + return value } } } @@ -17266,38 +12518,38 @@ public struct ModifyCacheSubnetGroupOutput: Swift.Equatable { } } -struct ModifyCacheSubnetGroupOutputBody: Swift.Equatable { - let cacheSubnetGroup: ElastiCacheClientTypes.CacheSubnetGroup? -} - -extension ModifyCacheSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSubnetGroup = "CacheSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyCacheSubnetGroupResult")) - let cacheSubnetGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheSubnetGroup.self, forKey: .cacheSubnetGroup) - cacheSubnetGroup = cacheSubnetGroupDecoded - } -} +enum ModifyCacheSubnetGroupOutputError { -enum ModifyCacheSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetQuotaExceededFault": return try await CacheSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetInUse": return try await SubnetInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetNotAllowedFault": return try await SubnetNotAllowedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetQuotaExceededFault": return try await CacheSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetInUse": return try await SubnetInUse.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetNotAllowedFault": return try await SubnetNotAllowedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyGlobalReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case automaticFailoverEnabled = "AutomaticFailoverEnabled" + case cacheNodeType = "CacheNodeType" + case cacheParameterGroupName = "CacheParameterGroupName" + case engineVersion = "EngineVersion" + case globalReplicationGroupDescription = "GlobalReplicationGroupDescription" + case globalReplicationGroupId = "GlobalReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -17371,54 +12623,15 @@ public struct ModifyGlobalReplicationGroupInput: Swift.Equatable { } } -struct ModifyGlobalReplicationGroupInputBody: Swift.Equatable { - let globalReplicationGroupId: Swift.String? - let applyImmediately: Swift.Bool? - let cacheNodeType: Swift.String? - let engineVersion: Swift.String? - let cacheParameterGroupName: Swift.String? - let globalReplicationGroupDescription: Swift.String? - let automaticFailoverEnabled: Swift.Bool? -} - -extension ModifyGlobalReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case automaticFailoverEnabled = "AutomaticFailoverEnabled" - case cacheNodeType = "CacheNodeType" - case cacheParameterGroupName = "CacheParameterGroupName" - case engineVersion = "EngineVersion" - case globalReplicationGroupDescription = "GlobalReplicationGroupDescription" - case globalReplicationGroupId = "GlobalReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let globalReplicationGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupDescription) - globalReplicationGroupDescription = globalReplicationGroupDescriptionDecoded - let automaticFailoverEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .automaticFailoverEnabled) - automaticFailoverEnabled = automaticFailoverEnabledDecoded - } -} +extension ModifyGlobalReplicationGroupOutput { -extension ModifyGlobalReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyGlobalReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroup = output.globalReplicationGroup - } else { - self.globalReplicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyGlobalReplicationGroupResult"] + var value = ModifyGlobalReplicationGroupOutput() + value.globalReplicationGroup = try reader["GlobalReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure) + return value } } } @@ -17437,36 +12650,58 @@ public struct ModifyGlobalReplicationGroupOutput: Swift.Equatable { } } -struct ModifyGlobalReplicationGroupOutputBody: Swift.Equatable { - let globalReplicationGroup: ElastiCacheClientTypes.GlobalReplicationGroup? -} - -extension ModifyGlobalReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroup = "GlobalReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyGlobalReplicationGroupResult")) - let globalReplicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroup.self, forKey: .globalReplicationGroup) - globalReplicationGroup = globalReplicationGroupDecoded - } -} +enum ModifyGlobalReplicationGroupOutputError { -enum ModifyGlobalReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case authToken = "AuthToken" + case authTokenUpdateStrategy = "AuthTokenUpdateStrategy" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case automaticFailoverEnabled = "AutomaticFailoverEnabled" + case cacheNodeType = "CacheNodeType" + case cacheParameterGroupName = "CacheParameterGroupName" + case cacheSecurityGroupNames = "CacheSecurityGroupNames" + case clusterMode = "ClusterMode" + case engineVersion = "EngineVersion" + case ipDiscovery = "IpDiscovery" + case logDeliveryConfigurations = "LogDeliveryConfigurations" + case multiAZEnabled = "MultiAZEnabled" + case nodeGroupId = "NodeGroupId" + case notificationTopicArn = "NotificationTopicArn" + case notificationTopicStatus = "NotificationTopicStatus" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case primaryClusterId = "PrimaryClusterId" + case removeUserGroups = "RemoveUserGroups" + case replicationGroupDescription = "ReplicationGroupDescription" + case replicationGroupId = "ReplicationGroupId" + case securityGroupIds = "SecurityGroupIds" + case snapshotRetentionLimit = "SnapshotRetentionLimit" + case snapshotWindow = "SnapshotWindow" + case snapshottingClusterId = "SnapshottingClusterId" + case transitEncryptionEnabled = "TransitEncryptionEnabled" + case transitEncryptionMode = "TransitEncryptionMode" + case userGroupIdsToAdd = "UserGroupIdsToAdd" + case userGroupIdsToRemove = "UserGroupIdsToRemove" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -17773,227 +13008,15 @@ public struct ModifyReplicationGroupInput: Swift.Equatable { } } -struct ModifyReplicationGroupInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let replicationGroupDescription: Swift.String? - let primaryClusterId: Swift.String? - let snapshottingClusterId: Swift.String? - let automaticFailoverEnabled: Swift.Bool? - let multiAZEnabled: Swift.Bool? - let nodeGroupId: Swift.String? - let cacheSecurityGroupNames: [Swift.String]? - let securityGroupIds: [Swift.String]? - let preferredMaintenanceWindow: Swift.String? - let notificationTopicArn: Swift.String? - let cacheParameterGroupName: Swift.String? - let notificationTopicStatus: Swift.String? - let applyImmediately: Swift.Bool? - let engineVersion: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let snapshotRetentionLimit: Swift.Int? - let snapshotWindow: Swift.String? - let cacheNodeType: Swift.String? - let authToken: Swift.String? - let authTokenUpdateStrategy: ElastiCacheClientTypes.AuthTokenUpdateStrategyType? - let userGroupIdsToAdd: [Swift.String]? - let userGroupIdsToRemove: [Swift.String]? - let removeUserGroups: Swift.Bool? - let logDeliveryConfigurations: [ElastiCacheClientTypes.LogDeliveryConfigurationRequest]? - let ipDiscovery: ElastiCacheClientTypes.IpDiscovery? - let transitEncryptionEnabled: Swift.Bool? - let transitEncryptionMode: ElastiCacheClientTypes.TransitEncryptionMode? - let clusterMode: ElastiCacheClientTypes.ClusterMode? -} - -extension ModifyReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case authToken = "AuthToken" - case authTokenUpdateStrategy = "AuthTokenUpdateStrategy" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case automaticFailoverEnabled = "AutomaticFailoverEnabled" - case cacheNodeType = "CacheNodeType" - case cacheParameterGroupName = "CacheParameterGroupName" - case cacheSecurityGroupNames = "CacheSecurityGroupNames" - case clusterMode = "ClusterMode" - case engineVersion = "EngineVersion" - case ipDiscovery = "IpDiscovery" - case logDeliveryConfigurations = "LogDeliveryConfigurations" - case multiAZEnabled = "MultiAZEnabled" - case nodeGroupId = "NodeGroupId" - case notificationTopicArn = "NotificationTopicArn" - case notificationTopicStatus = "NotificationTopicStatus" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case primaryClusterId = "PrimaryClusterId" - case removeUserGroups = "RemoveUserGroups" - case replicationGroupDescription = "ReplicationGroupDescription" - case replicationGroupId = "ReplicationGroupId" - case securityGroupIds = "SecurityGroupIds" - case snapshotRetentionLimit = "SnapshotRetentionLimit" - case snapshotWindow = "SnapshotWindow" - case snapshottingClusterId = "SnapshottingClusterId" - case transitEncryptionEnabled = "TransitEncryptionEnabled" - case transitEncryptionMode = "TransitEncryptionMode" - case userGroupIdsToAdd = "UserGroupIdsToAdd" - case userGroupIdsToRemove = "UserGroupIdsToRemove" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let replicationGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupDescription) - replicationGroupDescription = replicationGroupDescriptionDecoded - let primaryClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryClusterId) - primaryClusterId = primaryClusterIdDecoded - let snapshottingClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshottingClusterId) - snapshottingClusterId = snapshottingClusterIdDecoded - let automaticFailoverEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .automaticFailoverEnabled) - automaticFailoverEnabled = automaticFailoverEnabledDecoded - let multiAZEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZEnabled) - multiAZEnabled = multiAZEnabledDecoded - let nodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeGroupId) - nodeGroupId = nodeGroupIdDecoded - if containerValues.contains(.cacheSecurityGroupNames) { - struct KeyVal0{struct CacheSecurityGroupName{}} - let cacheSecurityGroupNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheSecurityGroupNames) - if let cacheSecurityGroupNamesWrappedContainer = cacheSecurityGroupNamesWrappedContainer { - let cacheSecurityGroupNamesContainer = try cacheSecurityGroupNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheSecurityGroupNamesBuffer:[Swift.String]? = nil - if let cacheSecurityGroupNamesContainer = cacheSecurityGroupNamesContainer { - cacheSecurityGroupNamesBuffer = [Swift.String]() - for stringContainer0 in cacheSecurityGroupNamesContainer { - cacheSecurityGroupNamesBuffer?.append(stringContainer0) - } - } - cacheSecurityGroupNames = cacheSecurityGroupNamesBuffer - } else { - cacheSecurityGroupNames = [] - } - } else { - cacheSecurityGroupNames = nil - } - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let notificationTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTopicArn) - notificationTopicArn = notificationTopicArnDecoded - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let notificationTopicStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .notificationTopicStatus) - notificationTopicStatus = notificationTopicStatusDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let snapshotWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotWindow) - snapshotWindow = snapshotWindowDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let authTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authToken) - authToken = authTokenDecoded - let authTokenUpdateStrategyDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AuthTokenUpdateStrategyType.self, forKey: .authTokenUpdateStrategy) - authTokenUpdateStrategy = authTokenUpdateStrategyDecoded - if containerValues.contains(.userGroupIdsToAdd) { - struct KeyVal0{struct member{}} - let userGroupIdsToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIdsToAdd) - if let userGroupIdsToAddWrappedContainer = userGroupIdsToAddWrappedContainer { - let userGroupIdsToAddContainer = try userGroupIdsToAddWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsToAddBuffer:[Swift.String]? = nil - if let userGroupIdsToAddContainer = userGroupIdsToAddContainer { - userGroupIdsToAddBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsToAddContainer { - userGroupIdsToAddBuffer?.append(stringContainer0) - } - } - userGroupIdsToAdd = userGroupIdsToAddBuffer - } else { - userGroupIdsToAdd = [] - } - } else { - userGroupIdsToAdd = nil - } - if containerValues.contains(.userGroupIdsToRemove) { - struct KeyVal0{struct member{}} - let userGroupIdsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIdsToRemove) - if let userGroupIdsToRemoveWrappedContainer = userGroupIdsToRemoveWrappedContainer { - let userGroupIdsToRemoveContainer = try userGroupIdsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsToRemoveBuffer:[Swift.String]? = nil - if let userGroupIdsToRemoveContainer = userGroupIdsToRemoveContainer { - userGroupIdsToRemoveBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsToRemoveContainer { - userGroupIdsToRemoveBuffer?.append(stringContainer0) - } - } - userGroupIdsToRemove = userGroupIdsToRemoveBuffer - } else { - userGroupIdsToRemove = [] - } - } else { - userGroupIdsToRemove = nil - } - let removeUserGroupsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .removeUserGroups) - removeUserGroups = removeUserGroupsDecoded - if containerValues.contains(.logDeliveryConfigurations) { - struct KeyVal0{struct LogDeliveryConfigurationRequest{}} - let logDeliveryConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logDeliveryConfigurations) - if let logDeliveryConfigurationsWrappedContainer = logDeliveryConfigurationsWrappedContainer { - let logDeliveryConfigurationsContainer = try logDeliveryConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.LogDeliveryConfigurationRequest].self, forKey: .member) - var logDeliveryConfigurationsBuffer:[ElastiCacheClientTypes.LogDeliveryConfigurationRequest]? = nil - if let logDeliveryConfigurationsContainer = logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer = [ElastiCacheClientTypes.LogDeliveryConfigurationRequest]() - for structureContainer0 in logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer?.append(structureContainer0) - } - } - logDeliveryConfigurations = logDeliveryConfigurationsBuffer - } else { - logDeliveryConfigurations = [] - } - } else { - logDeliveryConfigurations = nil - } - let ipDiscoveryDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.IpDiscovery.self, forKey: .ipDiscovery) - ipDiscovery = ipDiscoveryDecoded - let transitEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .transitEncryptionEnabled) - transitEncryptionEnabled = transitEncryptionEnabledDecoded - let transitEncryptionModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.TransitEncryptionMode.self, forKey: .transitEncryptionMode) - transitEncryptionMode = transitEncryptionModeDecoded - let clusterModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ClusterMode.self, forKey: .clusterMode) - clusterMode = clusterModeDecoded - } -} +extension ModifyReplicationGroupOutput { -extension ModifyReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyReplicationGroupResult"] + var value = ModifyReplicationGroupOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -18010,49 +13033,48 @@ public struct ModifyReplicationGroupOutput: Swift.Equatable { } } -struct ModifyReplicationGroupOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension ModifyReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyReplicationGroupResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} +enum ModifyReplicationGroupOutputError { -enum ModifyReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSKeyFault": return try await InvalidKMSKeyFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserGroupState": return try await InvalidUserGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForClusterExceeded": return try await NodeQuotaForClusterExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidKMSKeyFault": return try await InvalidKMSKeyFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserGroupState": return try await InvalidUserGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForClusterExceeded": return try await NodeQuotaForClusterExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyReplicationGroupShardConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case nodeGroupCount = "NodeGroupCount" + case nodeGroupsToRemove = "NodeGroupsToRemove" + case nodeGroupsToRetain = "NodeGroupsToRetain" + case replicationGroupId = "ReplicationGroupId" + case reshardingConfiguration = "ReshardingConfiguration" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -18148,101 +13170,15 @@ public struct ModifyReplicationGroupShardConfigurationInput: Swift.Equatable { } } -struct ModifyReplicationGroupShardConfigurationInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let nodeGroupCount: Swift.Int? - let applyImmediately: Swift.Bool? - let reshardingConfiguration: [ElastiCacheClientTypes.ReshardingConfiguration]? - let nodeGroupsToRemove: [Swift.String]? - let nodeGroupsToRetain: [Swift.String]? -} - -extension ModifyReplicationGroupShardConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case nodeGroupCount = "NodeGroupCount" - case nodeGroupsToRemove = "NodeGroupsToRemove" - case nodeGroupsToRetain = "NodeGroupsToRetain" - case replicationGroupId = "ReplicationGroupId" - case reshardingConfiguration = "ReshardingConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let nodeGroupCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .nodeGroupCount) - nodeGroupCount = nodeGroupCountDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - if containerValues.contains(.reshardingConfiguration) { - struct KeyVal0{struct ReshardingConfiguration{}} - let reshardingConfigurationWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reshardingConfiguration) - if let reshardingConfigurationWrappedContainer = reshardingConfigurationWrappedContainer { - let reshardingConfigurationContainer = try reshardingConfigurationWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ReshardingConfiguration].self, forKey: .member) - var reshardingConfigurationBuffer:[ElastiCacheClientTypes.ReshardingConfiguration]? = nil - if let reshardingConfigurationContainer = reshardingConfigurationContainer { - reshardingConfigurationBuffer = [ElastiCacheClientTypes.ReshardingConfiguration]() - for structureContainer0 in reshardingConfigurationContainer { - reshardingConfigurationBuffer?.append(structureContainer0) - } - } - reshardingConfiguration = reshardingConfigurationBuffer - } else { - reshardingConfiguration = [] - } - } else { - reshardingConfiguration = nil - } - if containerValues.contains(.nodeGroupsToRemove) { - struct KeyVal0{struct NodeGroupToRemove{}} - let nodeGroupsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeGroupsToRemove) - if let nodeGroupsToRemoveWrappedContainer = nodeGroupsToRemoveWrappedContainer { - let nodeGroupsToRemoveContainer = try nodeGroupsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nodeGroupsToRemoveBuffer:[Swift.String]? = nil - if let nodeGroupsToRemoveContainer = nodeGroupsToRemoveContainer { - nodeGroupsToRemoveBuffer = [Swift.String]() - for stringContainer0 in nodeGroupsToRemoveContainer { - nodeGroupsToRemoveBuffer?.append(stringContainer0) - } - } - nodeGroupsToRemove = nodeGroupsToRemoveBuffer - } else { - nodeGroupsToRemove = [] - } - } else { - nodeGroupsToRemove = nil - } - if containerValues.contains(.nodeGroupsToRetain) { - struct KeyVal0{struct NodeGroupToRetain{}} - let nodeGroupsToRetainWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeGroupsToRetain) - if let nodeGroupsToRetainWrappedContainer = nodeGroupsToRetainWrappedContainer { - let nodeGroupsToRetainContainer = try nodeGroupsToRetainWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nodeGroupsToRetainBuffer:[Swift.String]? = nil - if let nodeGroupsToRetainContainer = nodeGroupsToRetainContainer { - nodeGroupsToRetainBuffer = [Swift.String]() - for stringContainer0 in nodeGroupsToRetainContainer { - nodeGroupsToRetainBuffer?.append(stringContainer0) - } - } - nodeGroupsToRetain = nodeGroupsToRetainBuffer - } else { - nodeGroupsToRetain = [] - } - } else { - nodeGroupsToRetain = nil - } - } -} +extension ModifyReplicationGroupShardConfigurationOutput { -extension ModifyReplicationGroupShardConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyReplicationGroupShardConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyReplicationGroupShardConfigurationResult"] + var value = ModifyReplicationGroupShardConfigurationOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -18259,43 +13195,44 @@ public struct ModifyReplicationGroupShardConfigurationOutput: Swift.Equatable { } } -struct ModifyReplicationGroupShardConfigurationOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension ModifyReplicationGroupShardConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } +enum ModifyReplicationGroupShardConfigurationOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyReplicationGroupShardConfigurationResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidKMSKeyFault": return try await InvalidKMSKeyFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeGroupsPerReplicationGroupQuotaExceeded": return try await NodeGroupsPerReplicationGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } } } -enum ModifyReplicationGroupShardConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientCacheClusterCapacity": return try await InsufficientCacheClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSKeyFault": return try await InvalidKMSKeyFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeGroupsPerReplicationGroupQuotaExceeded": return try await NodeGroupsPerReplicationGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeQuotaForCustomerExceeded": return try await NodeQuotaForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyServerlessCacheInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheUsageLimits = "CacheUsageLimits" + case dailySnapshotTime = "DailySnapshotTime" + case description = "Description" + case removeUserGroup = "RemoveUserGroup" + case securityGroupIds = "SecurityGroupIds" + case serverlessCacheName = "ServerlessCacheName" + case snapshotRetentionLimit = "SnapshotRetentionLimit" + case userGroupId = "UserGroupId" } -} -extension ModifyServerlessCacheInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheUsageLimits = cacheUsageLimits { @@ -18384,75 +13321,15 @@ public struct ModifyServerlessCacheInput: Swift.Equatable { } } -struct ModifyServerlessCacheInputBody: Swift.Equatable { - let serverlessCacheName: Swift.String? - let description: Swift.String? - let cacheUsageLimits: ElastiCacheClientTypes.CacheUsageLimits? - let removeUserGroup: Swift.Bool? - let userGroupId: Swift.String? - let securityGroupIds: [Swift.String]? - let snapshotRetentionLimit: Swift.Int? - let dailySnapshotTime: Swift.String? -} - -extension ModifyServerlessCacheInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheUsageLimits = "CacheUsageLimits" - case dailySnapshotTime = "DailySnapshotTime" - case description = "Description" - case removeUserGroup = "RemoveUserGroup" - case securityGroupIds = "SecurityGroupIds" - case serverlessCacheName = "ServerlessCacheName" - case snapshotRetentionLimit = "SnapshotRetentionLimit" - case userGroupId = "UserGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheName) - serverlessCacheName = serverlessCacheNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let cacheUsageLimitsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheUsageLimits.self, forKey: .cacheUsageLimits) - cacheUsageLimits = cacheUsageLimitsDecoded - let removeUserGroupDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .removeUserGroup) - removeUserGroup = removeUserGroupDecoded - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let dailySnapshotTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dailySnapshotTime) - dailySnapshotTime = dailySnapshotTimeDecoded - } -} +extension ModifyServerlessCacheOutput { -extension ModifyServerlessCacheOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyServerlessCacheOutputBody = try responseDecoder.decode(responseBody: data) - self.serverlessCache = output.serverlessCache - } else { - self.serverlessCache = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyServerlessCacheResult"] + var value = ModifyServerlessCacheOutput() + value.serverlessCache = try reader["ServerlessCache"].readIfPresent(readingClosure: ElastiCacheClientTypes.ServerlessCache.readingClosure) + return value } } } @@ -18469,41 +13346,37 @@ public struct ModifyServerlessCacheOutput: Swift.Equatable { } } -struct ModifyServerlessCacheOutputBody: Swift.Equatable { - let serverlessCache: ElastiCacheClientTypes.ServerlessCache? -} - -extension ModifyServerlessCacheOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverlessCache = "ServerlessCache" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyServerlessCacheResult")) - let serverlessCacheDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServerlessCache.self, forKey: .serverlessCache) - serverlessCache = serverlessCacheDecoded - } -} +enum ModifyServerlessCacheOutputError { -enum ModifyServerlessCacheOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidCredentialsException": return try await InvalidCredentialsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserGroupState": return try await InvalidUserGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidCredentialsException": return try await InvalidCredentialsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserGroupState": return try await InvalidUserGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyUserGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userGroupId = "UserGroupId" + case userIdsToAdd = "UserIdsToAdd" + case userIdsToRemove = "UserIdsToRemove" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userGroupId = userGroupId { @@ -18566,88 +13439,23 @@ public struct ModifyUserGroupInput: Swift.Equatable { } } -struct ModifyUserGroupInputBody: Swift.Equatable { - let userGroupId: Swift.String? - let userIdsToAdd: [Swift.String]? - let userIdsToRemove: [Swift.String]? -} - -extension ModifyUserGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userGroupId = "UserGroupId" - case userIdsToAdd = "UserIdsToAdd" - case userIdsToRemove = "UserIdsToRemove" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - if containerValues.contains(.userIdsToAdd) { - struct KeyVal0{struct member{}} - let userIdsToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIdsToAdd) - if let userIdsToAddWrappedContainer = userIdsToAddWrappedContainer { - let userIdsToAddContainer = try userIdsToAddWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsToAddBuffer:[Swift.String]? = nil - if let userIdsToAddContainer = userIdsToAddContainer { - userIdsToAddBuffer = [Swift.String]() - for stringContainer0 in userIdsToAddContainer { - userIdsToAddBuffer?.append(stringContainer0) - } - } - userIdsToAdd = userIdsToAddBuffer - } else { - userIdsToAdd = [] - } - } else { - userIdsToAdd = nil - } - if containerValues.contains(.userIdsToRemove) { - struct KeyVal0{struct member{}} - let userIdsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIdsToRemove) - if let userIdsToRemoveWrappedContainer = userIdsToRemoveWrappedContainer { - let userIdsToRemoveContainer = try userIdsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsToRemoveBuffer:[Swift.String]? = nil - if let userIdsToRemoveContainer = userIdsToRemoveContainer { - userIdsToRemoveBuffer = [Swift.String]() - for stringContainer0 in userIdsToRemoveContainer { - userIdsToRemoveBuffer?.append(stringContainer0) - } - } - userIdsToRemove = userIdsToRemoveBuffer - } else { - userIdsToRemove = [] - } - } else { - userIdsToRemove = nil - } - } -} +extension ModifyUserGroupOutput { -extension ModifyUserGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyUserGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.arn = output.arn - self.engine = output.engine - self.minimumEngineVersion = output.minimumEngineVersion - self.pendingChanges = output.pendingChanges - self.replicationGroups = output.replicationGroups - self.serverlessCaches = output.serverlessCaches - self.status = output.status - self.userGroupId = output.userGroupId - self.userIds = output.userIds - } else { - self.arn = nil - self.engine = nil - self.minimumEngineVersion = nil - self.pendingChanges = nil - self.replicationGroups = nil - self.serverlessCaches = nil - self.status = nil - self.userGroupId = nil - self.userIds = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyUserGroupResult"] + var value = ModifyUserGroupOutput() + value.arn = try reader["ARN"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.pendingChanges = try reader["PendingChanges"].readIfPresent(readingClosure: ElastiCacheClientTypes.UserGroupPendingChanges.readingClosure) + value.replicationGroups = try reader["ReplicationGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.serverlessCaches = try reader["ServerlessCaches"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.userGroupId = try reader["UserGroupId"].readIfPresent() + value.userIds = try reader["UserIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -18696,124 +13504,40 @@ public struct ModifyUserGroupOutput: Swift.Equatable { } } -struct ModifyUserGroupOutputBody: Swift.Equatable { - let userGroupId: Swift.String? - let status: Swift.String? - let engine: Swift.String? - let userIds: [Swift.String]? - let minimumEngineVersion: Swift.String? - let pendingChanges: ElastiCacheClientTypes.UserGroupPendingChanges? - let replicationGroups: [Swift.String]? - let serverlessCaches: [Swift.String]? - let arn: Swift.String? -} - -extension ModifyUserGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case engine = "Engine" - case minimumEngineVersion = "MinimumEngineVersion" - case pendingChanges = "PendingChanges" - case replicationGroups = "ReplicationGroups" - case serverlessCaches = "ServerlessCaches" - case status = "Status" - case userGroupId = "UserGroupId" - case userIds = "UserIds" - } +enum ModifyUserGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyUserGroupResult")) - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - if containerValues.contains(.userIds) { - struct KeyVal0{struct member{}} - let userIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIds) - if let userIdsWrappedContainer = userIdsWrappedContainer { - let userIdsContainer = try userIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsBuffer:[Swift.String]? = nil - if let userIdsContainer = userIdsContainer { - userIdsBuffer = [Swift.String]() - for stringContainer0 in userIdsContainer { - userIdsBuffer?.append(stringContainer0) - } - } - userIds = userIdsBuffer - } else { - userIds = [] - } - } else { - userIds = nil - } - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let pendingChangesDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.UserGroupPendingChanges.self, forKey: .pendingChanges) - pendingChanges = pendingChangesDecoded - if containerValues.contains(.replicationGroups) { - struct KeyVal0{struct member{}} - let replicationGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicationGroups) - if let replicationGroupsWrappedContainer = replicationGroupsWrappedContainer { - let replicationGroupsContainer = try replicationGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicationGroupsBuffer:[Swift.String]? = nil - if let replicationGroupsContainer = replicationGroupsContainer { - replicationGroupsBuffer = [Swift.String]() - for stringContainer0 in replicationGroupsContainer { - replicationGroupsBuffer?.append(stringContainer0) - } - } - replicationGroups = replicationGroupsBuffer - } else { - replicationGroups = [] - } - } else { - replicationGroups = nil - } - if containerValues.contains(.serverlessCaches) { - struct KeyVal0{struct member{}} - let serverlessCachesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serverlessCaches) - if let serverlessCachesWrappedContainer = serverlessCachesWrappedContainer { - let serverlessCachesContainer = try serverlessCachesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serverlessCachesBuffer:[Swift.String]? = nil - if let serverlessCachesContainer = serverlessCachesContainer { - serverlessCachesBuffer = [Swift.String]() - for stringContainer0 in serverlessCachesContainer { - serverlessCachesBuffer?.append(stringContainer0) - } - } - serverlessCaches = serverlessCachesBuffer - } else { - serverlessCaches = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DefaultUserRequired": return try await DefaultUserRequired.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateUserName": return try await DuplicateUserNameFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserGroupState": return try await InvalidUserGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserNotFound": return try await UserNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - serverlessCaches = nil } - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded } } -enum ModifyUserGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DefaultUserRequired": return try await DefaultUserRequired(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateUserName": return try await DuplicateUserNameFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserGroupState": return try await InvalidUserGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserNotFound": return try await UserNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accessString = "AccessString" + case appendAccessString = "AppendAccessString" + case authenticationMode = "AuthenticationMode" + case noPasswordRequired = "NoPasswordRequired" + case passwords = "Passwords" + case userId = "UserId" } -} -extension ModifyUserInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accessString = accessString { @@ -18888,83 +13612,23 @@ public struct ModifyUserInput: Swift.Equatable { } } -struct ModifyUserInputBody: Swift.Equatable { - let userId: Swift.String? - let accessString: Swift.String? - let appendAccessString: Swift.String? - let passwords: [Swift.String]? - let noPasswordRequired: Swift.Bool? - let authenticationMode: ElastiCacheClientTypes.AuthenticationMode? -} - -extension ModifyUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessString = "AccessString" - case appendAccessString = "AppendAccessString" - case authenticationMode = "AuthenticationMode" - case noPasswordRequired = "NoPasswordRequired" - case passwords = "Passwords" - case userId = "UserId" - } +extension ModifyUserOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let accessStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessString) - accessString = accessStringDecoded - let appendAccessStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .appendAccessString) - appendAccessString = appendAccessStringDecoded - if containerValues.contains(.passwords) { - struct KeyVal0{struct member{}} - let passwordsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .passwords) - if let passwordsWrappedContainer = passwordsWrappedContainer { - let passwordsContainer = try passwordsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var passwordsBuffer:[Swift.String]? = nil - if let passwordsContainer = passwordsContainer { - passwordsBuffer = [Swift.String]() - for stringContainer0 in passwordsContainer { - passwordsBuffer?.append(stringContainer0) - } - } - passwords = passwordsBuffer - } else { - passwords = [] - } - } else { - passwords = nil - } - let noPasswordRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .noPasswordRequired) - noPasswordRequired = noPasswordRequiredDecoded - let authenticationModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AuthenticationMode.self, forKey: .authenticationMode) - authenticationMode = authenticationModeDecoded - } -} - -extension ModifyUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyUserOutputBody = try responseDecoder.decode(responseBody: data) - self.accessString = output.accessString - self.arn = output.arn - self.authentication = output.authentication - self.engine = output.engine - self.minimumEngineVersion = output.minimumEngineVersion - self.status = output.status - self.userGroupIds = output.userGroupIds - self.userId = output.userId - self.userName = output.userName - } else { - self.arn = nil - self.accessString = nil - self.authentication = nil - self.engine = nil - self.minimumEngineVersion = nil - self.status = nil - self.userGroupIds = nil - self.userId = nil - self.userName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyUserResult"] + var value = ModifyUserOutput() + value.arn = try reader["ARN"].readIfPresent() + value.accessString = try reader["AccessString"].readIfPresent() + value.authentication = try reader["Authentication"].readIfPresent(readingClosure: ElastiCacheClientTypes.Authentication.readingClosure) + value.engine = try reader["Engine"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.userGroupIds = try reader["UserGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.userId = try reader["UserId"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + return value } } } @@ -19013,82 +13677,23 @@ public struct ModifyUserOutput: Swift.Equatable { } } -struct ModifyUserOutputBody: Swift.Equatable { - let userId: Swift.String? - let userName: Swift.String? - let status: Swift.String? - let engine: Swift.String? - let minimumEngineVersion: Swift.String? - let accessString: Swift.String? - let userGroupIds: [Swift.String]? - let authentication: ElastiCacheClientTypes.Authentication? - let arn: Swift.String? -} - -extension ModifyUserOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "ARN" - case accessString = "AccessString" - case authentication = "Authentication" - case engine = "Engine" - case minimumEngineVersion = "MinimumEngineVersion" - case status = "Status" - case userGroupIds = "UserGroupIds" - case userId = "UserId" - case userName = "UserName" - } +enum ModifyUserOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyUserResult")) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let accessStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessString) - accessString = accessStringDecoded - if containerValues.contains(.userGroupIds) { - struct KeyVal0{struct member{}} - let userGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIds) - if let userGroupIdsWrappedContainer = userGroupIdsWrappedContainer { - let userGroupIdsContainer = try userGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsBuffer:[Swift.String]? = nil - if let userGroupIdsContainer = userGroupIdsContainer { - userGroupIdsBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsContainer { - userGroupIdsBuffer?.append(stringContainer0) - } - } - userGroupIds = userGroupIdsBuffer - } else { - userGroupIds = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserState": return try await InvalidUserStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserNotFound": return try await UserNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - userGroupIds = nil - } - let authenticationDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Authentication.self, forKey: .authentication) - authentication = authenticationDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - } -} - -enum ModifyUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserState": return try await InvalidUserStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceLinkedRoleNotFoundFault": return try await ServiceLinkedRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserNotFound": return try await UserNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -19161,16 +13766,14 @@ extension ElastiCacheClientTypes { } extension NoOperationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoOperationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19198,23 +13801,7 @@ public struct NoOperationFault: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct NoOperationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoOperationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.NodeGroup: Swift.Codable { +extension ElastiCacheClientTypes.NodeGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case nodeGroupId = "NodeGroupId" case nodeGroupMembers = "NodeGroupMembers" @@ -19255,36 +13842,17 @@ extension ElastiCacheClientTypes.NodeGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeGroupId) - nodeGroupId = nodeGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let primaryEndpointDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Endpoint.self, forKey: .primaryEndpoint) - primaryEndpoint = primaryEndpointDecoded - let readerEndpointDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Endpoint.self, forKey: .readerEndpoint) - readerEndpoint = readerEndpointDecoded - let slotsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .slots) - slots = slotsDecoded - if containerValues.contains(.nodeGroupMembers) { - struct KeyVal0{struct NodeGroupMember{}} - let nodeGroupMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeGroupMembers) - if let nodeGroupMembersWrappedContainer = nodeGroupMembersWrappedContainer { - let nodeGroupMembersContainer = try nodeGroupMembersWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.NodeGroupMember].self, forKey: .member) - var nodeGroupMembersBuffer:[ElastiCacheClientTypes.NodeGroupMember]? = nil - if let nodeGroupMembersContainer = nodeGroupMembersContainer { - nodeGroupMembersBuffer = [ElastiCacheClientTypes.NodeGroupMember]() - for structureContainer0 in nodeGroupMembersContainer { - nodeGroupMembersBuffer?.append(structureContainer0) - } - } - nodeGroupMembers = nodeGroupMembersBuffer - } else { - nodeGroupMembers = [] - } - } else { - nodeGroupMembers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.NodeGroup() + value.nodeGroupId = try reader["NodeGroupId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.primaryEndpoint = try reader["PrimaryEndpoint"].readIfPresent(readingClosure: ElastiCacheClientTypes.Endpoint.readingClosure) + value.readerEndpoint = try reader["ReaderEndpoint"].readIfPresent(readingClosure: ElastiCacheClientTypes.Endpoint.readingClosure) + value.slots = try reader["Slots"].readIfPresent() + value.nodeGroupMembers = try reader["NodeGroupMembers"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.NodeGroupMember.readingClosure, memberNodeInfo: "NodeGroupMember", isFlattened: false) + return value } } } @@ -19325,7 +13893,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.NodeGroupConfiguration: Swift.Codable { +extension ElastiCacheClientTypes.NodeGroupConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case nodeGroupId = "NodeGroupId" case primaryAvailabilityZone = "PrimaryAvailabilityZone" @@ -19379,55 +13947,18 @@ extension ElastiCacheClientTypes.NodeGroupConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeGroupId) - nodeGroupId = nodeGroupIdDecoded - let slotsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .slots) - slots = slotsDecoded - let replicaCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .replicaCount) - replicaCount = replicaCountDecoded - let primaryAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryAvailabilityZone) - primaryAvailabilityZone = primaryAvailabilityZoneDecoded - if containerValues.contains(.replicaAvailabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let replicaAvailabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicaAvailabilityZones) - if let replicaAvailabilityZonesWrappedContainer = replicaAvailabilityZonesWrappedContainer { - let replicaAvailabilityZonesContainer = try replicaAvailabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicaAvailabilityZonesBuffer:[Swift.String]? = nil - if let replicaAvailabilityZonesContainer = replicaAvailabilityZonesContainer { - replicaAvailabilityZonesBuffer = [Swift.String]() - for stringContainer0 in replicaAvailabilityZonesContainer { - replicaAvailabilityZonesBuffer?.append(stringContainer0) - } - } - replicaAvailabilityZones = replicaAvailabilityZonesBuffer - } else { - replicaAvailabilityZones = [] - } - } else { - replicaAvailabilityZones = nil - } - let primaryOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryOutpostArn) - primaryOutpostArn = primaryOutpostArnDecoded - if containerValues.contains(.replicaOutpostArns) { - struct KeyVal0{struct OutpostArn{}} - let replicaOutpostArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicaOutpostArns) - if let replicaOutpostArnsWrappedContainer = replicaOutpostArnsWrappedContainer { - let replicaOutpostArnsContainer = try replicaOutpostArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicaOutpostArnsBuffer:[Swift.String]? = nil - if let replicaOutpostArnsContainer = replicaOutpostArnsContainer { - replicaOutpostArnsBuffer = [Swift.String]() - for stringContainer0 in replicaOutpostArnsContainer { - replicaOutpostArnsBuffer?.append(stringContainer0) - } - } - replicaOutpostArns = replicaOutpostArnsBuffer - } else { - replicaOutpostArns = [] - } - } else { - replicaOutpostArns = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.NodeGroupConfiguration() + value.nodeGroupId = try reader["NodeGroupId"].readIfPresent() + value.slots = try reader["Slots"].readIfPresent() + value.replicaCount = try reader["ReplicaCount"].readIfPresent() + value.primaryAvailabilityZone = try reader["PrimaryAvailabilityZone"].readIfPresent() + value.replicaAvailabilityZones = try reader["ReplicaAvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.primaryOutpostArn = try reader["PrimaryOutpostArn"].readIfPresent() + value.replicaOutpostArns = try reader["ReplicaOutpostArns"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "OutpostArn", isFlattened: false) + return value } } } @@ -19472,7 +14003,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.NodeGroupMember: Swift.Codable { +extension ElastiCacheClientTypes.NodeGroupMember: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheClusterId = "CacheClusterId" case cacheNodeId = "CacheNodeId" @@ -19504,20 +14035,18 @@ extension ElastiCacheClientTypes.NodeGroupMember: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let cacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeId) - cacheNodeId = cacheNodeIdDecoded - let readEndpointDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Endpoint.self, forKey: .readEndpoint) - readEndpoint = readEndpointDecoded - let preferredAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredAvailabilityZone) - preferredAvailabilityZone = preferredAvailabilityZoneDecoded - let preferredOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredOutpostArn) - preferredOutpostArn = preferredOutpostArnDecoded - let currentRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currentRole) - currentRole = currentRoleDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.NodeGroupMember() + value.cacheClusterId = try reader["CacheClusterId"].readIfPresent() + value.cacheNodeId = try reader["CacheNodeId"].readIfPresent() + value.readEndpoint = try reader["ReadEndpoint"].readIfPresent(readingClosure: ElastiCacheClientTypes.Endpoint.readingClosure) + value.preferredAvailabilityZone = try reader["PreferredAvailabilityZone"].readIfPresent() + value.preferredOutpostArn = try reader["PreferredOutpostArn"].readIfPresent() + value.currentRole = try reader["CurrentRole"].readIfPresent() + return value + } } } @@ -19557,7 +14086,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.NodeGroupMemberUpdateStatus: Swift.Codable { +extension ElastiCacheClientTypes.NodeGroupMemberUpdateStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheClusterId = "CacheClusterId" case cacheNodeId = "CacheNodeId" @@ -19601,26 +14130,21 @@ extension ElastiCacheClientTypes.NodeGroupMemberUpdateStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let cacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeId) - cacheNodeId = cacheNodeIdDecoded - let nodeUpdateStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NodeUpdateStatus.self, forKey: .nodeUpdateStatus) - nodeUpdateStatus = nodeUpdateStatusDecoded - let nodeDeletionDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeDeletionDate) - nodeDeletionDate = nodeDeletionDateDecoded - let nodeUpdateStartDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeUpdateStartDate) - nodeUpdateStartDate = nodeUpdateStartDateDecoded - let nodeUpdateEndDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeUpdateEndDate) - nodeUpdateEndDate = nodeUpdateEndDateDecoded - let nodeUpdateInitiatedByDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NodeUpdateInitiatedBy.self, forKey: .nodeUpdateInitiatedBy) - nodeUpdateInitiatedBy = nodeUpdateInitiatedByDecoded - let nodeUpdateInitiatedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeUpdateInitiatedDate) - nodeUpdateInitiatedDate = nodeUpdateInitiatedDateDecoded - let nodeUpdateStatusModifiedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nodeUpdateStatusModifiedDate) - nodeUpdateStatusModifiedDate = nodeUpdateStatusModifiedDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.NodeGroupMemberUpdateStatus() + value.cacheClusterId = try reader["CacheClusterId"].readIfPresent() + value.cacheNodeId = try reader["CacheNodeId"].readIfPresent() + value.nodeUpdateStatus = try reader["NodeUpdateStatus"].readIfPresent() + value.nodeDeletionDate = try reader["NodeDeletionDate"].readTimestampIfPresent(format: .dateTime) + value.nodeUpdateStartDate = try reader["NodeUpdateStartDate"].readTimestampIfPresent(format: .dateTime) + value.nodeUpdateEndDate = try reader["NodeUpdateEndDate"].readTimestampIfPresent(format: .dateTime) + value.nodeUpdateInitiatedBy = try reader["NodeUpdateInitiatedBy"].readIfPresent() + value.nodeUpdateInitiatedDate = try reader["NodeUpdateInitiatedDate"].readTimestampIfPresent(format: .dateTime) + value.nodeUpdateStatusModifiedDate = try reader["NodeUpdateStatusModifiedDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -19673,16 +14197,14 @@ extension ElastiCacheClientTypes { } extension NodeGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NodeGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19710,23 +14232,7 @@ public struct NodeGroupNotFoundFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct NodeGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension NodeGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.NodeGroupUpdateStatus: Swift.Codable { +extension ElastiCacheClientTypes.NodeGroupUpdateStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case nodeGroupId = "NodeGroupId" case nodeGroupMemberUpdateStatus = "NodeGroupMemberUpdateStatus" @@ -19751,28 +14257,13 @@ extension ElastiCacheClientTypes.NodeGroupUpdateStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeGroupId) - nodeGroupId = nodeGroupIdDecoded - if containerValues.contains(.nodeGroupMemberUpdateStatus) { - struct KeyVal0{struct NodeGroupMemberUpdateStatus{}} - let nodeGroupMemberUpdateStatusWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeGroupMemberUpdateStatus) - if let nodeGroupMemberUpdateStatusWrappedContainer = nodeGroupMemberUpdateStatusWrappedContainer { - let nodeGroupMemberUpdateStatusContainer = try nodeGroupMemberUpdateStatusWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.NodeGroupMemberUpdateStatus].self, forKey: .member) - var nodeGroupMemberUpdateStatusBuffer:[ElastiCacheClientTypes.NodeGroupMemberUpdateStatus]? = nil - if let nodeGroupMemberUpdateStatusContainer = nodeGroupMemberUpdateStatusContainer { - nodeGroupMemberUpdateStatusBuffer = [ElastiCacheClientTypes.NodeGroupMemberUpdateStatus]() - for structureContainer0 in nodeGroupMemberUpdateStatusContainer { - nodeGroupMemberUpdateStatusBuffer?.append(structureContainer0) - } - } - nodeGroupMemberUpdateStatus = nodeGroupMemberUpdateStatusBuffer - } else { - nodeGroupMemberUpdateStatus = [] - } - } else { - nodeGroupMemberUpdateStatus = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.NodeGroupUpdateStatus() + value.nodeGroupId = try reader["NodeGroupId"].readIfPresent() + value.nodeGroupMemberUpdateStatus = try reader["NodeGroupMemberUpdateStatus"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.NodeGroupMemberUpdateStatus.readingClosure, memberNodeInfo: "NodeGroupMemberUpdateStatus", isFlattened: false) + return value } } } @@ -19798,16 +14289,14 @@ extension ElastiCacheClientTypes { } extension NodeGroupsPerReplicationGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NodeGroupsPerReplicationGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19835,33 +14324,15 @@ public struct NodeGroupsPerReplicationGroupQuotaExceededFault: ClientRuntime.Mod } } -struct NodeGroupsPerReplicationGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension NodeGroupsPerReplicationGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension NodeQuotaForClusterExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NodeQuotaForClusterExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19889,33 +14360,15 @@ public struct NodeQuotaForClusterExceededFault: ClientRuntime.ModeledError, AWSC } } -struct NodeQuotaForClusterExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension NodeQuotaForClusterExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension NodeQuotaForCustomerExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NodeQuotaForCustomerExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19943,23 +14396,7 @@ public struct NodeQuotaForCustomerExceededFault: ClientRuntime.ModeledError, AWS } } -struct NodeQuotaForCustomerExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension NodeQuotaForCustomerExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.NodeSnapshot: Swift.Codable { +extension ElastiCacheClientTypes.NodeSnapshot: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheClusterId = "CacheClusterId" case cacheNodeCreateTime = "CacheNodeCreateTime" @@ -19995,22 +14432,19 @@ extension ElastiCacheClientTypes.NodeSnapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let nodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeGroupId) - nodeGroupId = nodeGroupIdDecoded - let cacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeId) - cacheNodeId = cacheNodeIdDecoded - let nodeGroupConfigurationDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NodeGroupConfiguration.self, forKey: .nodeGroupConfiguration) - nodeGroupConfiguration = nodeGroupConfigurationDecoded - let cacheSizeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSize) - cacheSize = cacheSizeDecoded - let cacheNodeCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .cacheNodeCreateTime) - cacheNodeCreateTime = cacheNodeCreateTimeDecoded - let snapshotCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotCreateTime) - snapshotCreateTime = snapshotCreateTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.NodeSnapshot() + value.cacheClusterId = try reader["CacheClusterId"].readIfPresent() + value.nodeGroupId = try reader["NodeGroupId"].readIfPresent() + value.cacheNodeId = try reader["CacheNodeId"].readIfPresent() + value.nodeGroupConfiguration = try reader["NodeGroupConfiguration"].readIfPresent(readingClosure: ElastiCacheClientTypes.NodeGroupConfiguration.readingClosure) + value.cacheSize = try reader["CacheSize"].readIfPresent() + value.cacheNodeCreateTime = try reader["CacheNodeCreateTime"].readTimestampIfPresent(format: .dateTime) + value.snapshotCreateTime = try reader["SnapshotCreateTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -20130,7 +14564,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.NotificationConfiguration: Swift.Codable { +extension ElastiCacheClientTypes.NotificationConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case topicArn = "TopicArn" case topicStatus = "TopicStatus" @@ -20146,12 +14580,14 @@ extension ElastiCacheClientTypes.NotificationConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let topicStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicStatus) - topicStatus = topicStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.NotificationConfiguration() + value.topicArn = try reader["TopicArn"].readIfPresent() + value.topicStatus = try reader["TopicStatus"].readIfPresent() + return value + } } } @@ -20207,7 +14643,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.Parameter: Swift.Codable { +extension ElastiCacheClientTypes.Parameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case changeType = "ChangeType" @@ -20251,26 +14687,21 @@ extension ElastiCacheClientTypes.Parameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterName) - parameterName = parameterNameDecoded - let parameterValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterValue) - parameterValue = parameterValueDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) - dataType = dataTypeDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded - let isModifiableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isModifiable) - isModifiable = isModifiableDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let changeTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ChangeType.self, forKey: .changeType) - changeType = changeTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.Parameter() + value.parameterName = try reader["ParameterName"].readIfPresent() + value.parameterValue = try reader["ParameterValue"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.dataType = try reader["DataType"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + value.isModifiable = try reader["IsModifiable"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.changeType = try reader["ChangeType"].readIfPresent() + return value + } } } @@ -20322,7 +14753,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.ParameterNameValue: Swift.Codable { +extension ElastiCacheClientTypes.ParameterNameValue: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case parameterName = "ParameterName" case parameterValue = "ParameterValue" @@ -20338,12 +14769,14 @@ extension ElastiCacheClientTypes.ParameterNameValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterName) - parameterName = parameterNameDecoded - let parameterValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterValue) - parameterValue = parameterValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ParameterNameValue() + value.parameterName = try reader["ParameterName"].readIfPresent() + value.parameterValue = try reader["ParameterValue"].readIfPresent() + return value + } } } @@ -20399,7 +14832,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.PendingLogDeliveryConfiguration: Swift.Codable { +extension ElastiCacheClientTypes.PendingLogDeliveryConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case destinationDetails = "DestinationDetails" case destinationType = "DestinationType" @@ -20423,16 +14856,16 @@ extension ElastiCacheClientTypes.PendingLogDeliveryConfiguration: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.LogType.self, forKey: .logType) - logType = logTypeDecoded - let destinationTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DestinationType.self, forKey: .destinationType) - destinationType = destinationTypeDecoded - let destinationDetailsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DestinationDetails.self, forKey: .destinationDetails) - destinationDetails = destinationDetailsDecoded - let logFormatDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.LogFormat.self, forKey: .logFormat) - logFormat = logFormatDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.PendingLogDeliveryConfiguration() + value.logType = try reader["LogType"].readIfPresent() + value.destinationType = try reader["DestinationType"].readIfPresent() + value.destinationDetails = try reader["DestinationDetails"].readIfPresent(readingClosure: ElastiCacheClientTypes.DestinationDetails.readingClosure) + value.logFormat = try reader["LogFormat"].readIfPresent() + return value + } } } @@ -20464,7 +14897,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.PendingModifiedValues: Swift.Codable { +extension ElastiCacheClientTypes.PendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authTokenStatus = "AuthTokenStatus" case cacheNodeIdsToRemove = "CacheNodeIdsToRemove" @@ -20522,58 +14955,20 @@ extension ElastiCacheClientTypes.PendingModifiedValues: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let numCacheNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numCacheNodes) - numCacheNodes = numCacheNodesDecoded - if containerValues.contains(.cacheNodeIdsToRemove) { - struct KeyVal0{struct CacheNodeId{}} - let cacheNodeIdsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodeIdsToRemove) - if let cacheNodeIdsToRemoveWrappedContainer = cacheNodeIdsToRemoveWrappedContainer { - let cacheNodeIdsToRemoveContainer = try cacheNodeIdsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheNodeIdsToRemoveBuffer:[Swift.String]? = nil - if let cacheNodeIdsToRemoveContainer = cacheNodeIdsToRemoveContainer { - cacheNodeIdsToRemoveBuffer = [Swift.String]() - for stringContainer0 in cacheNodeIdsToRemoveContainer { - cacheNodeIdsToRemoveBuffer?.append(stringContainer0) - } - } - cacheNodeIdsToRemove = cacheNodeIdsToRemoveBuffer - } else { - cacheNodeIdsToRemove = [] - } - } else { - cacheNodeIdsToRemove = nil - } - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let authTokenStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AuthTokenUpdateStatus.self, forKey: .authTokenStatus) - authTokenStatus = authTokenStatusDecoded - if containerValues.contains(.logDeliveryConfigurations) { - struct KeyVal0{struct member{}} - let logDeliveryConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logDeliveryConfigurations) - if let logDeliveryConfigurationsWrappedContainer = logDeliveryConfigurationsWrappedContainer { - let logDeliveryConfigurationsContainer = try logDeliveryConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.PendingLogDeliveryConfiguration].self, forKey: .member) - var logDeliveryConfigurationsBuffer:[ElastiCacheClientTypes.PendingLogDeliveryConfiguration]? = nil - if let logDeliveryConfigurationsContainer = logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer = [ElastiCacheClientTypes.PendingLogDeliveryConfiguration]() - for structureContainer0 in logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer?.append(structureContainer0) - } - } - logDeliveryConfigurations = logDeliveryConfigurationsBuffer - } else { - logDeliveryConfigurations = [] - } - } else { - logDeliveryConfigurations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.PendingModifiedValues() + value.numCacheNodes = try reader["NumCacheNodes"].readIfPresent() + value.cacheNodeIdsToRemove = try reader["CacheNodeIdsToRemove"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "CacheNodeId", isFlattened: false) + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.cacheNodeType = try reader["CacheNodeType"].readIfPresent() + value.authTokenStatus = try reader["AuthTokenStatus"].readIfPresent() + value.logDeliveryConfigurations = try reader["LogDeliveryConfigurations"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.PendingLogDeliveryConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.transitEncryptionEnabled = try reader["TransitEncryptionEnabled"].readIfPresent() + value.transitEncryptionMode = try reader["TransitEncryptionMode"].readIfPresent() + return value } - let transitEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .transitEncryptionEnabled) - transitEncryptionEnabled = transitEncryptionEnabledDecoded - let transitEncryptionModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.TransitEncryptionMode.self, forKey: .transitEncryptionMode) - transitEncryptionMode = transitEncryptionModeDecoded } } @@ -20621,7 +15016,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.ProcessedUpdateAction: Swift.Codable { +extension ElastiCacheClientTypes.ProcessedUpdateAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheClusterId = "CacheClusterId" case replicationGroupId = "ReplicationGroupId" @@ -20645,16 +15040,16 @@ extension ElastiCacheClientTypes.ProcessedUpdateAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let serviceUpdateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateName) - serviceUpdateName = serviceUpdateNameDecoded - let updateActionStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.UpdateActionStatus.self, forKey: .updateActionStatus) - updateActionStatus = updateActionStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ProcessedUpdateAction() + value.replicationGroupId = try reader["ReplicationGroupId"].readIfPresent() + value.cacheClusterId = try reader["CacheClusterId"].readIfPresent() + value.serviceUpdateName = try reader["ServiceUpdateName"].readIfPresent() + value.updateActionStatus = try reader["UpdateActionStatus"].readIfPresent() + return value + } } } @@ -20687,6 +15082,13 @@ extension ElastiCacheClientTypes { } extension PurchaseReservedCacheNodesOfferingInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheNodeCount = "CacheNodeCount" + case reservedCacheNodeId = "ReservedCacheNodeId" + case reservedCacheNodesOfferingId = "ReservedCacheNodesOfferingId" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheNodeCount = cacheNodeCount { @@ -20748,59 +15150,15 @@ public struct PurchaseReservedCacheNodesOfferingInput: Swift.Equatable { } } -struct PurchaseReservedCacheNodesOfferingInputBody: Swift.Equatable { - let reservedCacheNodesOfferingId: Swift.String? - let reservedCacheNodeId: Swift.String? - let cacheNodeCount: Swift.Int? - let tags: [ElastiCacheClientTypes.Tag]? -} - -extension PurchaseReservedCacheNodesOfferingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheNodeCount = "CacheNodeCount" - case reservedCacheNodeId = "ReservedCacheNodeId" - case reservedCacheNodesOfferingId = "ReservedCacheNodesOfferingId" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedCacheNodesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedCacheNodesOfferingId) - reservedCacheNodesOfferingId = reservedCacheNodesOfferingIdDecoded - let reservedCacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedCacheNodeId) - reservedCacheNodeId = reservedCacheNodeIdDecoded - let cacheNodeCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .cacheNodeCount) - cacheNodeCount = cacheNodeCountDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension PurchaseReservedCacheNodesOfferingOutput { -extension PurchaseReservedCacheNodesOfferingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PurchaseReservedCacheNodesOfferingOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedCacheNode = output.reservedCacheNode - } else { - self.reservedCacheNode = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PurchaseReservedCacheNodesOfferingResult"] + var value = PurchaseReservedCacheNodesOfferingOutput() + value.reservedCacheNode = try reader["ReservedCacheNode"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReservedCacheNode.readingClosure) + return value } } } @@ -20817,39 +15175,34 @@ public struct PurchaseReservedCacheNodesOfferingOutput: Swift.Equatable { } } -struct PurchaseReservedCacheNodesOfferingOutputBody: Swift.Equatable { - let reservedCacheNode: ElastiCacheClientTypes.ReservedCacheNode? -} - -extension PurchaseReservedCacheNodesOfferingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedCacheNode = "ReservedCacheNode" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PurchaseReservedCacheNodesOfferingResult")) - let reservedCacheNodeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReservedCacheNode.self, forKey: .reservedCacheNode) - reservedCacheNode = reservedCacheNodeDecoded - } -} +enum PurchaseReservedCacheNodesOfferingOutputError { -enum PurchaseReservedCacheNodesOfferingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedCacheNodeAlreadyExists": return try await ReservedCacheNodeAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedCacheNodeQuotaExceeded": return try await ReservedCacheNodeQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedCacheNodesOfferingNotFound": return try await ReservedCacheNodesOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedCacheNodeAlreadyExists": return try await ReservedCacheNodeAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedCacheNodeQuotaExceeded": return try await ReservedCacheNodeQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedCacheNodesOfferingNotFound": return try await ReservedCacheNodesOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagQuotaPerResourceExceeded": return try await TagQuotaPerResourceExceeded.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RebalanceSlotsInGlobalReplicationGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case globalReplicationGroupId = "GlobalReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -20888,34 +15241,15 @@ public struct RebalanceSlotsInGlobalReplicationGroupInput: Swift.Equatable { } } -struct RebalanceSlotsInGlobalReplicationGroupInputBody: Swift.Equatable { - let globalReplicationGroupId: Swift.String? - let applyImmediately: Swift.Bool? -} - -extension RebalanceSlotsInGlobalReplicationGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case globalReplicationGroupId = "GlobalReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalReplicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalReplicationGroupId) - globalReplicationGroupId = globalReplicationGroupIdDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - } -} +extension RebalanceSlotsInGlobalReplicationGroupOutput { -extension RebalanceSlotsInGlobalReplicationGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RebalanceSlotsInGlobalReplicationGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.globalReplicationGroup = output.globalReplicationGroup - } else { - self.globalReplicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RebalanceSlotsInGlobalReplicationGroupResult"] + var value = RebalanceSlotsInGlobalReplicationGroupOutput() + value.globalReplicationGroup = try reader["GlobalReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroup.readingClosure) + return value } } } @@ -20934,36 +15268,31 @@ public struct RebalanceSlotsInGlobalReplicationGroupOutput: Swift.Equatable { } } -struct RebalanceSlotsInGlobalReplicationGroupOutputBody: Swift.Equatable { - let globalReplicationGroup: ElastiCacheClientTypes.GlobalReplicationGroup? -} - -extension RebalanceSlotsInGlobalReplicationGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalReplicationGroup = "GlobalReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RebalanceSlotsInGlobalReplicationGroupResult")) - let globalReplicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroup.self, forKey: .globalReplicationGroup) - globalReplicationGroup = globalReplicationGroupDecoded - } -} +enum RebalanceSlotsInGlobalReplicationGroupOutputError { -enum RebalanceSlotsInGlobalReplicationGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalReplicationGroupNotFoundFault": return try await GlobalReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RebootCacheClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheClusterId = "CacheClusterId" + case cacheNodeIdsToReboot = "CacheNodeIdsToReboot" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheClusterId = cacheClusterId { @@ -21012,51 +15341,15 @@ public struct RebootCacheClusterInput: Swift.Equatable { } } -struct RebootCacheClusterInputBody: Swift.Equatable { - let cacheClusterId: Swift.String? - let cacheNodeIdsToReboot: [Swift.String]? -} - -extension RebootCacheClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheClusterId = "CacheClusterId" - case cacheNodeIdsToReboot = "CacheNodeIdsToReboot" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - if containerValues.contains(.cacheNodeIdsToReboot) { - struct KeyVal0{struct CacheNodeId{}} - let cacheNodeIdsToRebootWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodeIdsToReboot) - if let cacheNodeIdsToRebootWrappedContainer = cacheNodeIdsToRebootWrappedContainer { - let cacheNodeIdsToRebootContainer = try cacheNodeIdsToRebootWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cacheNodeIdsToRebootBuffer:[Swift.String]? = nil - if let cacheNodeIdsToRebootContainer = cacheNodeIdsToRebootContainer { - cacheNodeIdsToRebootBuffer = [Swift.String]() - for stringContainer0 in cacheNodeIdsToRebootContainer { - cacheNodeIdsToRebootBuffer?.append(stringContainer0) - } - } - cacheNodeIdsToReboot = cacheNodeIdsToRebootBuffer - } else { - cacheNodeIdsToReboot = [] - } - } else { - cacheNodeIdsToReboot = nil - } - } -} +extension RebootCacheClusterOutput { -extension RebootCacheClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RebootCacheClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheCluster = output.cacheCluster - } else { - self.cacheCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RebootCacheClusterResult"] + var value = RebootCacheClusterOutput() + value.cacheCluster = try reader["CacheCluster"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheCluster.readingClosure) + return value } } } @@ -21065,43 +15358,33 @@ public struct RebootCacheClusterOutput: Swift.Equatable { /// Contains all of the attributes of a specific cluster. public var cacheCluster: ElastiCacheClientTypes.CacheCluster? - public init( - cacheCluster: ElastiCacheClientTypes.CacheCluster? = nil - ) - { - self.cacheCluster = cacheCluster - } -} - -struct RebootCacheClusterOutputBody: Swift.Equatable { - let cacheCluster: ElastiCacheClientTypes.CacheCluster? -} - -extension RebootCacheClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheCluster = "CacheCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RebootCacheClusterResult")) - let cacheClusterDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheCluster.self, forKey: .cacheCluster) - cacheCluster = cacheClusterDecoded + public init( + cacheCluster: ElastiCacheClientTypes.CacheCluster? = nil + ) + { + self.cacheCluster = cacheCluster } } -enum RebootCacheClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RebootCacheClusterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElastiCacheClientTypes.RecurringCharge: Swift.Codable { +extension ElastiCacheClientTypes.RecurringCharge: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case recurringChargeAmount = "RecurringChargeAmount" case recurringChargeFrequency = "RecurringChargeFrequency" @@ -21117,12 +15400,14 @@ extension ElastiCacheClientTypes.RecurringCharge: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let recurringChargeAmountDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .recurringChargeAmount) - recurringChargeAmount = recurringChargeAmountDecoded - let recurringChargeFrequencyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recurringChargeFrequency) - recurringChargeFrequency = recurringChargeFrequencyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.RecurringCharge() + value.recurringChargeAmount = try reader["RecurringChargeAmount"].readIfPresent() + value.recurringChargeFrequency = try reader["RecurringChargeFrequency"].readIfPresent() + return value + } } } @@ -21146,7 +15431,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.RegionalConfiguration: Swift.Codable { +extension ElastiCacheClientTypes.RegionalConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case replicationGroupId = "ReplicationGroupId" case replicationGroupRegion = "ReplicationGroupRegion" @@ -21175,30 +15460,14 @@ extension ElastiCacheClientTypes.RegionalConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let replicationGroupRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupRegion) - replicationGroupRegion = replicationGroupRegionDecoded - if containerValues.contains(.reshardingConfiguration) { - struct KeyVal0{struct ReshardingConfiguration{}} - let reshardingConfigurationWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reshardingConfiguration) - if let reshardingConfigurationWrappedContainer = reshardingConfigurationWrappedContainer { - let reshardingConfigurationContainer = try reshardingConfigurationWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ReshardingConfiguration].self, forKey: .member) - var reshardingConfigurationBuffer:[ElastiCacheClientTypes.ReshardingConfiguration]? = nil - if let reshardingConfigurationContainer = reshardingConfigurationContainer { - reshardingConfigurationBuffer = [ElastiCacheClientTypes.ReshardingConfiguration]() - for structureContainer0 in reshardingConfigurationContainer { - reshardingConfigurationBuffer?.append(structureContainer0) - } - } - reshardingConfiguration = reshardingConfigurationBuffer - } else { - reshardingConfiguration = [] - } - } else { - reshardingConfiguration = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.RegionalConfiguration() + value.replicationGroupId = try reader["ReplicationGroupId"].readIfPresent() + value.replicationGroupRegion = try reader["ReplicationGroupRegion"].readIfPresent() + value.reshardingConfiguration = try reader["ReshardingConfiguration"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.ReshardingConfiguration.readingClosure, memberNodeInfo: "ReshardingConfiguration", isFlattened: false) + return value } } } @@ -21231,6 +15500,11 @@ extension ElastiCacheClientTypes { } extension RemoveTagsFromResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -21279,51 +15553,15 @@ public struct RemoveTagsFromResourceInput: Swift.Equatable { } } -struct RemoveTagsFromResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tagKeys: [Swift.String]? -} - -extension RemoveTagsFromResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tagKeys = "TagKeys" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - } -} +extension RemoveTagsFromResourceOutput { -extension RemoveTagsFromResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RemoveTagsFromResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tagList = output.tagList - } else { - self.tagList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RemoveTagsFromResourceResult"] + var value = RemoveTagsFromResourceOutput() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -21341,66 +15579,39 @@ public struct RemoveTagsFromResourceOutput: Swift.Equatable { } } -struct RemoveTagsFromResourceOutputBody: Swift.Equatable { - let tagList: [ElastiCacheClientTypes.Tag]? -} +enum RemoveTagsFromResourceOutputError { -extension RemoveTagsFromResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagList = "TagList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RemoveTagsFromResourceResult")) - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[ElastiCacheClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [ElastiCacheClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheClusterNotFound": return try await CacheClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidARN": return try await InvalidARNFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedCacheNodeNotFound": return try await ReservedCacheNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagNotFound": return try await TagNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserGroupNotFound": return try await UserGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserNotFound": return try await UserNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tagList = nil - } - } -} - -enum RemoveTagsFromResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheClusterNotFound": return try await CacheClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSubnetGroupNotFoundFault": return try await CacheSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidARN": return try await InvalidARNFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheSnapshotStateFault": return try await InvalidServerlessCacheSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidServerlessCacheStateFault": return try await InvalidServerlessCacheStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedCacheNodeNotFound": return try await ReservedCacheNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheNotFoundFault": return try await ServerlessCacheNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServerlessCacheSnapshotNotFoundFault": return try await ServerlessCacheSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotNotFoundFault": return try await SnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagNotFound": return try await TagNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserGroupNotFound": return try await UserGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserNotFound": return try await UserNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElastiCacheClientTypes.ReplicationGroup: Swift.Codable { +extension ElastiCacheClientTypes.ReplicationGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case atRestEncryptionEnabled = "AtRestEncryptionEnabled" @@ -21577,155 +15788,43 @@ extension ElastiCacheClientTypes.ReplicationGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let globalReplicationGroupInfoDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.GlobalReplicationGroupInfo.self, forKey: .globalReplicationGroupInfo) - globalReplicationGroupInfo = globalReplicationGroupInfoDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroupPendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - if containerValues.contains(.memberClusters) { - struct KeyVal0{struct ClusterId{}} - let memberClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .memberClusters) - if let memberClustersWrappedContainer = memberClustersWrappedContainer { - let memberClustersContainer = try memberClustersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var memberClustersBuffer:[Swift.String]? = nil - if let memberClustersContainer = memberClustersContainer { - memberClustersBuffer = [Swift.String]() - for stringContainer0 in memberClustersContainer { - memberClustersBuffer?.append(stringContainer0) - } - } - memberClusters = memberClustersBuffer - } else { - memberClusters = [] - } - } else { - memberClusters = nil - } - if containerValues.contains(.nodeGroups) { - struct KeyVal0{struct NodeGroup{}} - let nodeGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeGroups) - if let nodeGroupsWrappedContainer = nodeGroupsWrappedContainer { - let nodeGroupsContainer = try nodeGroupsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.NodeGroup].self, forKey: .member) - var nodeGroupsBuffer:[ElastiCacheClientTypes.NodeGroup]? = nil - if let nodeGroupsContainer = nodeGroupsContainer { - nodeGroupsBuffer = [ElastiCacheClientTypes.NodeGroup]() - for structureContainer0 in nodeGroupsContainer { - nodeGroupsBuffer?.append(structureContainer0) - } - } - nodeGroups = nodeGroupsBuffer - } else { - nodeGroups = [] - } - } else { - nodeGroups = nil - } - let snapshottingClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshottingClusterId) - snapshottingClusterId = snapshottingClusterIdDecoded - let automaticFailoverDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AutomaticFailoverStatus.self, forKey: .automaticFailover) - automaticFailover = automaticFailoverDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.MultiAZStatus.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let configurationEndpointDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Endpoint.self, forKey: .configurationEndpoint) - configurationEndpoint = configurationEndpointDecoded - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let snapshotWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotWindow) - snapshotWindow = snapshotWindowDecoded - let clusterEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .clusterEnabled) - clusterEnabled = clusterEnabledDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let authTokenEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .authTokenEnabled) - authTokenEnabled = authTokenEnabledDecoded - let authTokenLastModifiedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .authTokenLastModifiedDate) - authTokenLastModifiedDate = authTokenLastModifiedDateDecoded - let transitEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .transitEncryptionEnabled) - transitEncryptionEnabled = transitEncryptionEnabledDecoded - let atRestEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .atRestEncryptionEnabled) - atRestEncryptionEnabled = atRestEncryptionEnabledDecoded - if containerValues.contains(.memberClustersOutpostArns) { - struct KeyVal0{struct ReplicationGroupOutpostArn{}} - let memberClustersOutpostArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .memberClustersOutpostArns) - if let memberClustersOutpostArnsWrappedContainer = memberClustersOutpostArnsWrappedContainer { - let memberClustersOutpostArnsContainer = try memberClustersOutpostArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var memberClustersOutpostArnsBuffer:[Swift.String]? = nil - if let memberClustersOutpostArnsContainer = memberClustersOutpostArnsContainer { - memberClustersOutpostArnsBuffer = [Swift.String]() - for stringContainer0 in memberClustersOutpostArnsContainer { - memberClustersOutpostArnsBuffer?.append(stringContainer0) - } - } - memberClustersOutpostArns = memberClustersOutpostArnsBuffer - } else { - memberClustersOutpostArns = [] - } - } else { - memberClustersOutpostArns = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - if containerValues.contains(.userGroupIds) { - struct KeyVal0{struct member{}} - let userGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIds) - if let userGroupIdsWrappedContainer = userGroupIdsWrappedContainer { - let userGroupIdsContainer = try userGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsBuffer:[Swift.String]? = nil - if let userGroupIdsContainer = userGroupIdsContainer { - userGroupIdsBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsContainer { - userGroupIdsBuffer?.append(stringContainer0) - } - } - userGroupIds = userGroupIdsBuffer - } else { - userGroupIds = [] - } - } else { - userGroupIds = nil - } - if containerValues.contains(.logDeliveryConfigurations) { - struct KeyVal0{struct LogDeliveryConfiguration{}} - let logDeliveryConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logDeliveryConfigurations) - if let logDeliveryConfigurationsWrappedContainer = logDeliveryConfigurationsWrappedContainer { - let logDeliveryConfigurationsContainer = try logDeliveryConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.LogDeliveryConfiguration].self, forKey: .member) - var logDeliveryConfigurationsBuffer:[ElastiCacheClientTypes.LogDeliveryConfiguration]? = nil - if let logDeliveryConfigurationsContainer = logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer = [ElastiCacheClientTypes.LogDeliveryConfiguration]() - for structureContainer0 in logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer?.append(structureContainer0) - } - } - logDeliveryConfigurations = logDeliveryConfigurationsBuffer - } else { - logDeliveryConfigurations = [] - } - } else { - logDeliveryConfigurations = nil - } - let replicationGroupCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .replicationGroupCreateTime) - replicationGroupCreateTime = replicationGroupCreateTimeDecoded - let dataTieringDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DataTieringStatus.self, forKey: .dataTiering) - dataTiering = dataTieringDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.NetworkType.self, forKey: .networkType) - networkType = networkTypeDecoded - let ipDiscoveryDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.IpDiscovery.self, forKey: .ipDiscovery) - ipDiscovery = ipDiscoveryDecoded - let transitEncryptionModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.TransitEncryptionMode.self, forKey: .transitEncryptionMode) - transitEncryptionMode = transitEncryptionModeDecoded - let clusterModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ClusterMode.self, forKey: .clusterMode) - clusterMode = clusterModeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ReplicationGroup() + value.replicationGroupId = try reader["ReplicationGroupId"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.globalReplicationGroupInfo = try reader["GlobalReplicationGroupInfo"].readIfPresent(readingClosure: ElastiCacheClientTypes.GlobalReplicationGroupInfo.readingClosure) + value.status = try reader["Status"].readIfPresent() + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroupPendingModifiedValues.readingClosure) + value.memberClusters = try reader["MemberClusters"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ClusterId", isFlattened: false) + value.nodeGroups = try reader["NodeGroups"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.NodeGroup.readingClosure, memberNodeInfo: "NodeGroup", isFlattened: false) + value.snapshottingClusterId = try reader["SnapshottingClusterId"].readIfPresent() + value.automaticFailover = try reader["AutomaticFailover"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.configurationEndpoint = try reader["ConfigurationEndpoint"].readIfPresent(readingClosure: ElastiCacheClientTypes.Endpoint.readingClosure) + value.snapshotRetentionLimit = try reader["SnapshotRetentionLimit"].readIfPresent() + value.snapshotWindow = try reader["SnapshotWindow"].readIfPresent() + value.clusterEnabled = try reader["ClusterEnabled"].readIfPresent() + value.cacheNodeType = try reader["CacheNodeType"].readIfPresent() + value.authTokenEnabled = try reader["AuthTokenEnabled"].readIfPresent() + value.authTokenLastModifiedDate = try reader["AuthTokenLastModifiedDate"].readTimestampIfPresent(format: .dateTime) + value.transitEncryptionEnabled = try reader["TransitEncryptionEnabled"].readIfPresent() + value.atRestEncryptionEnabled = try reader["AtRestEncryptionEnabled"].readIfPresent() + value.memberClustersOutpostArns = try reader["MemberClustersOutpostArns"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ReplicationGroupOutpostArn", isFlattened: false) + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.userGroupIds = try reader["UserGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.logDeliveryConfigurations = try reader["LogDeliveryConfigurations"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.LogDeliveryConfiguration.readingClosure, memberNodeInfo: "LogDeliveryConfiguration", isFlattened: false) + value.replicationGroupCreateTime = try reader["ReplicationGroupCreateTime"].readTimestampIfPresent(format: .dateTime) + value.dataTiering = try reader["DataTiering"].readIfPresent() + value.autoMinorVersionUpgrade = try reader["AutoMinorVersionUpgrade"].readIfPresent() + value.networkType = try reader["NetworkType"].readIfPresent() + value.ipDiscovery = try reader["IpDiscovery"].readIfPresent() + value.transitEncryptionMode = try reader["TransitEncryptionMode"].readIfPresent() + value.clusterMode = try reader["ClusterMode"].readIfPresent() + return value + } } } @@ -21866,16 +15965,14 @@ extension ElastiCacheClientTypes { } extension ReplicationGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReplicationGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21903,33 +16000,15 @@ public struct ReplicationGroupAlreadyExistsFault: ClientRuntime.ModeledError, AW } } -struct ReplicationGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReplicationGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ReplicationGroupAlreadyUnderMigrationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReplicationGroupAlreadyUnderMigrationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21957,33 +16036,15 @@ public struct ReplicationGroupAlreadyUnderMigrationFault: ClientRuntime.ModeledE } } -struct ReplicationGroupAlreadyUnderMigrationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReplicationGroupAlreadyUnderMigrationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ReplicationGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReplicationGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22011,33 +16072,15 @@ public struct ReplicationGroupNotFoundFault: ClientRuntime.ModeledError, AWSClie } } -struct ReplicationGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReplicationGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ReplicationGroupNotUnderMigrationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReplicationGroupNotUnderMigrationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22065,23 +16108,7 @@ public struct ReplicationGroupNotUnderMigrationFault: ClientRuntime.ModeledError } } -struct ReplicationGroupNotUnderMigrationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReplicationGroupNotUnderMigrationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.ReplicationGroupPendingModifiedValues: Swift.Codable { +extension ElastiCacheClientTypes.ReplicationGroupPendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authTokenStatus = "AuthTokenStatus" case automaticFailoverStatus = "AutomaticFailoverStatus" @@ -22134,43 +16161,21 @@ extension ElastiCacheClientTypes.ReplicationGroupPendingModifiedValues: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let primaryClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .primaryClusterId) - primaryClusterId = primaryClusterIdDecoded - let automaticFailoverStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.PendingAutomaticFailoverStatus.self, forKey: .automaticFailoverStatus) - automaticFailoverStatus = automaticFailoverStatusDecoded - let reshardingDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReshardingStatus.self, forKey: .resharding) - resharding = reshardingDecoded - let authTokenStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AuthTokenUpdateStatus.self, forKey: .authTokenStatus) - authTokenStatus = authTokenStatusDecoded - let userGroupsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.UserGroupsUpdateStatus.self, forKey: .userGroups) - userGroups = userGroupsDecoded - if containerValues.contains(.logDeliveryConfigurations) { - struct KeyVal0{struct member{}} - let logDeliveryConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logDeliveryConfigurations) - if let logDeliveryConfigurationsWrappedContainer = logDeliveryConfigurationsWrappedContainer { - let logDeliveryConfigurationsContainer = try logDeliveryConfigurationsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.PendingLogDeliveryConfiguration].self, forKey: .member) - var logDeliveryConfigurationsBuffer:[ElastiCacheClientTypes.PendingLogDeliveryConfiguration]? = nil - if let logDeliveryConfigurationsContainer = logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer = [ElastiCacheClientTypes.PendingLogDeliveryConfiguration]() - for structureContainer0 in logDeliveryConfigurationsContainer { - logDeliveryConfigurationsBuffer?.append(structureContainer0) - } - } - logDeliveryConfigurations = logDeliveryConfigurationsBuffer - } else { - logDeliveryConfigurations = [] - } - } else { - logDeliveryConfigurations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ReplicationGroupPendingModifiedValues() + value.primaryClusterId = try reader["PrimaryClusterId"].readIfPresent() + value.automaticFailoverStatus = try reader["AutomaticFailoverStatus"].readIfPresent() + value.resharding = try reader["Resharding"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReshardingStatus.readingClosure) + value.authTokenStatus = try reader["AuthTokenStatus"].readIfPresent() + value.userGroups = try reader["UserGroups"].readIfPresent(readingClosure: ElastiCacheClientTypes.UserGroupsUpdateStatus.readingClosure) + value.logDeliveryConfigurations = try reader["LogDeliveryConfigurations"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.PendingLogDeliveryConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.transitEncryptionEnabled = try reader["TransitEncryptionEnabled"].readIfPresent() + value.transitEncryptionMode = try reader["TransitEncryptionMode"].readIfPresent() + value.clusterMode = try reader["ClusterMode"].readIfPresent() + return value } - let transitEncryptionEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .transitEncryptionEnabled) - transitEncryptionEnabled = transitEncryptionEnabledDecoded - let transitEncryptionModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.TransitEncryptionMode.self, forKey: .transitEncryptionMode) - transitEncryptionMode = transitEncryptionModeDecoded - let clusterModeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ClusterMode.self, forKey: .clusterMode) - clusterMode = clusterModeDecoded } } @@ -22222,7 +16227,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.ReservedCacheNode: Swift.Codable { +extension ElastiCacheClientTypes.ReservedCacheNode: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheNodeCount = "CacheNodeCount" case cacheNodeType = "CacheNodeType" @@ -22291,51 +16296,25 @@ extension ElastiCacheClientTypes.ReservedCacheNode: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedCacheNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedCacheNodeId) - reservedCacheNodeId = reservedCacheNodeIdDecoded - let reservedCacheNodesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedCacheNodesOfferingId) - reservedCacheNodesOfferingId = reservedCacheNodesOfferingIdDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let fixedPriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fixedPrice) - fixedPrice = fixedPriceDecoded - let usagePriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .usagePrice) - usagePrice = usagePriceDecoded - let cacheNodeCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .cacheNodeCount) - cacheNodeCount = cacheNodeCountDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.recurringCharges) { - struct KeyVal0{struct RecurringCharge{}} - let recurringChargesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recurringCharges) - if let recurringChargesWrappedContainer = recurringChargesWrappedContainer { - let recurringChargesContainer = try recurringChargesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.RecurringCharge].self, forKey: .member) - var recurringChargesBuffer:[ElastiCacheClientTypes.RecurringCharge]? = nil - if let recurringChargesContainer = recurringChargesContainer { - recurringChargesBuffer = [ElastiCacheClientTypes.RecurringCharge]() - for structureContainer0 in recurringChargesContainer { - recurringChargesBuffer?.append(structureContainer0) - } - } - recurringCharges = recurringChargesBuffer - } else { - recurringCharges = [] - } - } else { - recurringCharges = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ReservedCacheNode() + value.reservedCacheNodeId = try reader["ReservedCacheNodeId"].readIfPresent() + value.reservedCacheNodesOfferingId = try reader["ReservedCacheNodesOfferingId"].readIfPresent() + value.cacheNodeType = try reader["CacheNodeType"].readIfPresent() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.duration = try reader["Duration"].readIfPresent() + value.fixedPrice = try reader["FixedPrice"].readIfPresent() + value.usagePrice = try reader["UsagePrice"].readIfPresent() + value.cacheNodeCount = try reader["CacheNodeCount"].readIfPresent() + value.productDescription = try reader["ProductDescription"].readIfPresent() + value.offeringType = try reader["OfferingType"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.recurringCharges = try reader["RecurringCharges"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.RecurringCharge.readingClosure, memberNodeInfo: "RecurringCharge", isFlattened: false) + value.reservationARN = try reader["ReservationARN"].readIfPresent() + return value } - let reservationARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservationARN) - reservationARN = reservationARNDecoded } } @@ -22443,16 +16422,14 @@ extension ElastiCacheClientTypes { } extension ReservedCacheNodeAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedCacheNodeAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22480,33 +16457,15 @@ public struct ReservedCacheNodeAlreadyExistsFault: ClientRuntime.ModeledError, A } } -struct ReservedCacheNodeAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedCacheNodeAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ReservedCacheNodeNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedCacheNodeNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22534,33 +16493,15 @@ public struct ReservedCacheNodeNotFoundFault: ClientRuntime.ModeledError, AWSCli } } -struct ReservedCacheNodeNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedCacheNodeNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ReservedCacheNodeQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedCacheNodeQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22588,23 +16529,7 @@ public struct ReservedCacheNodeQuotaExceededFault: ClientRuntime.ModeledError, A } } -struct ReservedCacheNodeQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedCacheNodeQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.ReservedCacheNodesOffering: Swift.Codable { +extension ElastiCacheClientTypes.ReservedCacheNodesOffering: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheNodeType = "CacheNodeType" case duration = "Duration" @@ -22653,40 +16578,19 @@ extension ElastiCacheClientTypes.ReservedCacheNodesOffering: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedCacheNodesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedCacheNodesOfferingId) - reservedCacheNodesOfferingId = reservedCacheNodesOfferingIdDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let fixedPriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fixedPrice) - fixedPrice = fixedPriceDecoded - let usagePriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .usagePrice) - usagePrice = usagePriceDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - if containerValues.contains(.recurringCharges) { - struct KeyVal0{struct RecurringCharge{}} - let recurringChargesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recurringCharges) - if let recurringChargesWrappedContainer = recurringChargesWrappedContainer { - let recurringChargesContainer = try recurringChargesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.RecurringCharge].self, forKey: .member) - var recurringChargesBuffer:[ElastiCacheClientTypes.RecurringCharge]? = nil - if let recurringChargesContainer = recurringChargesContainer { - recurringChargesBuffer = [ElastiCacheClientTypes.RecurringCharge]() - for structureContainer0 in recurringChargesContainer { - recurringChargesBuffer?.append(structureContainer0) - } - } - recurringCharges = recurringChargesBuffer - } else { - recurringCharges = [] - } - } else { - recurringCharges = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ReservedCacheNodesOffering() + value.reservedCacheNodesOfferingId = try reader["ReservedCacheNodesOfferingId"].readIfPresent() + value.cacheNodeType = try reader["CacheNodeType"].readIfPresent() + value.duration = try reader["Duration"].readIfPresent() + value.fixedPrice = try reader["FixedPrice"].readIfPresent() + value.usagePrice = try reader["UsagePrice"].readIfPresent() + value.productDescription = try reader["ProductDescription"].readIfPresent() + value.offeringType = try reader["OfferingType"].readIfPresent() + value.recurringCharges = try reader["RecurringCharges"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.RecurringCharge.readingClosure, memberNodeInfo: "RecurringCharge", isFlattened: false) + return value } } } @@ -22775,16 +16679,14 @@ extension ElastiCacheClientTypes { } extension ReservedCacheNodesOfferingNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedCacheNodesOfferingNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22812,23 +16714,13 @@ public struct ReservedCacheNodesOfferingNotFoundFault: ClientRuntime.ModeledErro } } -struct ReservedCacheNodesOfferingNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedCacheNodesOfferingNotFoundFaultBody: Swift.Decodable { +extension ResetCacheParameterGroupInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case cacheParameterGroupName = "CacheParameterGroupName" + case parameterNameValues = "ParameterNameValues" + case resetAllParameters = "ResetAllParameters" } -} -extension ResetCacheParameterGroupInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheParameterGroupName = cacheParameterGroupName { @@ -22883,55 +16775,15 @@ public struct ResetCacheParameterGroupInput: Swift.Equatable { } } -struct ResetCacheParameterGroupInputBody: Swift.Equatable { - let cacheParameterGroupName: Swift.String? - let resetAllParameters: Swift.Bool? - let parameterNameValues: [ElastiCacheClientTypes.ParameterNameValue]? -} - -extension ResetCacheParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupName = "CacheParameterGroupName" - case parameterNameValues = "ParameterNameValues" - case resetAllParameters = "ResetAllParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let resetAllParametersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resetAllParameters) - resetAllParameters = resetAllParametersDecoded - if containerValues.contains(.parameterNameValues) { - struct KeyVal0{struct ParameterNameValue{}} - let parameterNameValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameterNameValues) - if let parameterNameValuesWrappedContainer = parameterNameValuesWrappedContainer { - let parameterNameValuesContainer = try parameterNameValuesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.ParameterNameValue].self, forKey: .member) - var parameterNameValuesBuffer:[ElastiCacheClientTypes.ParameterNameValue]? = nil - if let parameterNameValuesContainer = parameterNameValuesContainer { - parameterNameValuesBuffer = [ElastiCacheClientTypes.ParameterNameValue]() - for structureContainer0 in parameterNameValuesContainer { - parameterNameValuesBuffer?.append(structureContainer0) - } - } - parameterNameValues = parameterNameValuesBuffer - } else { - parameterNameValues = [] - } - } else { - parameterNameValues = nil - } - } -} +extension ResetCacheParameterGroupOutput { -extension ResetCacheParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetCacheParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheParameterGroupName = output.cacheParameterGroupName - } else { - self.cacheParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResetCacheParameterGroupResult"] + var value = ResetCacheParameterGroupOutput() + value.cacheParameterGroupName = try reader["CacheParameterGroupName"].readIfPresent() + return value } } } @@ -22953,38 +16805,28 @@ public struct ResetCacheParameterGroupOutput: Swift.Equatable { } } -struct ResetCacheParameterGroupOutputBody: Swift.Equatable { - let cacheParameterGroupName: Swift.String? -} - -extension ResetCacheParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheParameterGroupName = "CacheParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResetCacheParameterGroupResult")) - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - } -} +enum ResetCacheParameterGroupOutputError { -enum ResetCacheParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheParameterGroupState": return try await InvalidCacheParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CacheParameterGroupNotFound": return try await CacheParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheParameterGroupState": return try await InvalidCacheParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalReplicationGroupState": return try await InvalidGlobalReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElastiCacheClientTypes.ReshardingConfiguration: Swift.Codable { +extension ElastiCacheClientTypes.ReshardingConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case nodeGroupId = "NodeGroupId" case preferredAvailabilityZones = "PreferredAvailabilityZones" @@ -23009,28 +16851,13 @@ extension ElastiCacheClientTypes.ReshardingConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeGroupId) - nodeGroupId = nodeGroupIdDecoded - if containerValues.contains(.preferredAvailabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let preferredAvailabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .preferredAvailabilityZones) - if let preferredAvailabilityZonesWrappedContainer = preferredAvailabilityZonesWrappedContainer { - let preferredAvailabilityZonesContainer = try preferredAvailabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var preferredAvailabilityZonesBuffer:[Swift.String]? = nil - if let preferredAvailabilityZonesContainer = preferredAvailabilityZonesContainer { - preferredAvailabilityZonesBuffer = [Swift.String]() - for stringContainer0 in preferredAvailabilityZonesContainer { - preferredAvailabilityZonesBuffer?.append(stringContainer0) - } - } - preferredAvailabilityZones = preferredAvailabilityZonesBuffer - } else { - preferredAvailabilityZones = [] - } - } else { - preferredAvailabilityZones = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ReshardingConfiguration() + value.nodeGroupId = try reader["NodeGroupId"].readIfPresent() + value.preferredAvailabilityZones = try reader["PreferredAvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + return value } } } @@ -23055,7 +16882,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.ReshardingStatus: Swift.Codable { +extension ElastiCacheClientTypes.ReshardingStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case slotMigration = "SlotMigration" } @@ -23067,10 +16894,13 @@ extension ElastiCacheClientTypes.ReshardingStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let slotMigrationDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.SlotMigration.self, forKey: .slotMigration) - slotMigration = slotMigrationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ReshardingStatus() + value.slotMigration = try reader["SlotMigration"].readIfPresent(readingClosure: ElastiCacheClientTypes.SlotMigration.readingClosure) + return value + } } } @@ -23091,6 +16921,12 @@ extension ElastiCacheClientTypes { } extension RevokeCacheSecurityGroupIngressInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cacheSecurityGroupName = "CacheSecurityGroupName" + case ec2SecurityGroupName = "EC2SecurityGroupName" + case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cacheSecurityGroupName = cacheSecurityGroupName { @@ -23138,38 +16974,15 @@ public struct RevokeCacheSecurityGroupIngressInput: Swift.Equatable { } } -struct RevokeCacheSecurityGroupIngressInputBody: Swift.Equatable { - let cacheSecurityGroupName: Swift.String? - let ec2SecurityGroupName: Swift.String? - let ec2SecurityGroupOwnerId: Swift.String? -} - -extension RevokeCacheSecurityGroupIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroupName = "CacheSecurityGroupName" - case ec2SecurityGroupName = "EC2SecurityGroupName" - case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSecurityGroupName) - cacheSecurityGroupName = cacheSecurityGroupNameDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded - } -} +extension RevokeCacheSecurityGroupIngressOutput { -extension RevokeCacheSecurityGroupIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RevokeCacheSecurityGroupIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.cacheSecurityGroup = output.cacheSecurityGroup - } else { - self.cacheSecurityGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RevokeCacheSecurityGroupIngressResult"] + var value = RevokeCacheSecurityGroupIngressOutput() + value.cacheSecurityGroup = try reader["CacheSecurityGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheSecurityGroup.readingClosure) + return value } } } @@ -23192,38 +17005,28 @@ public struct RevokeCacheSecurityGroupIngressOutput: Swift.Equatable { } } -struct RevokeCacheSecurityGroupIngressOutputBody: Swift.Equatable { - let cacheSecurityGroup: ElastiCacheClientTypes.CacheSecurityGroup? -} - -extension RevokeCacheSecurityGroupIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheSecurityGroup = "CacheSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RevokeCacheSecurityGroupIngressResult")) - let cacheSecurityGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheSecurityGroup.self, forKey: .cacheSecurityGroup) - cacheSecurityGroup = cacheSecurityGroupDecoded - } -} +enum RevokeCacheSecurityGroupIngressOutputError { -enum RevokeCacheSecurityGroupIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CacheSecurityGroupNotFound": return try await CacheSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheSecurityGroupState": return try await InvalidCacheSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElastiCacheClientTypes.SecurityGroupMembership: Swift.Codable { +extension ElastiCacheClientTypes.SecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case securityGroupId = "SecurityGroupId" case status = "Status" @@ -23239,12 +17042,14 @@ extension ElastiCacheClientTypes.SecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let securityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .securityGroupId) - securityGroupId = securityGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.SecurityGroupMembership() + value.securityGroupId = try reader["SecurityGroupId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -23268,7 +17073,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.ServerlessCache: Swift.Codable { +extension ElastiCacheClientTypes.ServerlessCache: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case cacheUsageLimits = "CacheUsageLimits" @@ -23362,76 +17167,29 @@ extension ElastiCacheClientTypes.ServerlessCache: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheName) - serverlessCacheName = serverlessCacheNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - let fullEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fullEngineVersion) - fullEngineVersion = fullEngineVersionDecoded - let cacheUsageLimitsDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.CacheUsageLimits.self, forKey: .cacheUsageLimits) - cacheUsageLimits = cacheUsageLimitsDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct SecurityGroupId{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] - } - } else { - securityGroupIds = nil - } - let endpointDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Endpoint.self, forKey: .endpoint) - endpoint = endpointDecoded - let readerEndpointDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Endpoint.self, forKey: .readerEndpoint) - readerEndpoint = readerEndpointDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetId{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ServerlessCache() + value.serverlessCacheName = try reader["ServerlessCacheName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.status = try reader["Status"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.majorEngineVersion = try reader["MajorEngineVersion"].readIfPresent() + value.fullEngineVersion = try reader["FullEngineVersion"].readIfPresent() + value.cacheUsageLimits = try reader["CacheUsageLimits"].readIfPresent(readingClosure: ElastiCacheClientTypes.CacheUsageLimits.readingClosure) + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.securityGroupIds = try reader["SecurityGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SecurityGroupId", isFlattened: false) + value.endpoint = try reader["Endpoint"].readIfPresent(readingClosure: ElastiCacheClientTypes.Endpoint.readingClosure) + value.readerEndpoint = try reader["ReaderEndpoint"].readIfPresent(readingClosure: ElastiCacheClientTypes.Endpoint.readingClosure) + value.arn = try reader["ARN"].readIfPresent() + value.userGroupId = try reader["UserGroupId"].readIfPresent() + value.subnetIds = try reader["SubnetIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SubnetId", isFlattened: false) + value.snapshotRetentionLimit = try reader["SnapshotRetentionLimit"].readIfPresent() + value.dailySnapshotTime = try reader["DailySnapshotTime"].readIfPresent() + return value } - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let dailySnapshotTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dailySnapshotTime) - dailySnapshotTime = dailySnapshotTimeDecoded } } @@ -23516,16 +17274,14 @@ extension ElastiCacheClientTypes { } extension ServerlessCacheAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServerlessCacheAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23553,23 +17309,7 @@ public struct ServerlessCacheAlreadyExistsFault: ClientRuntime.ModeledError, AWS } } -struct ServerlessCacheAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServerlessCacheAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.ServerlessCacheConfiguration: Swift.Codable { +extension ElastiCacheClientTypes.ServerlessCacheConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case engine = "Engine" case majorEngineVersion = "MajorEngineVersion" @@ -23589,14 +17329,15 @@ extension ElastiCacheClientTypes.ServerlessCacheConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheName) - serverlessCacheName = serverlessCacheNameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ServerlessCacheConfiguration() + value.serverlessCacheName = try reader["ServerlessCacheName"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.majorEngineVersion = try reader["MajorEngineVersion"].readIfPresent() + return value + } } } @@ -23625,16 +17366,14 @@ extension ElastiCacheClientTypes { } extension ServerlessCacheNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServerlessCacheNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23662,33 +17401,15 @@ public struct ServerlessCacheNotFoundFault: ClientRuntime.ModeledError, AWSClien } } -struct ServerlessCacheNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServerlessCacheNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ServerlessCacheQuotaForCustomerExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServerlessCacheQuotaForCustomerExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23716,23 +17437,7 @@ public struct ServerlessCacheQuotaForCustomerExceededFault: ClientRuntime.Modele } } -struct ServerlessCacheQuotaForCustomerExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServerlessCacheQuotaForCustomerExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.ServerlessCacheSnapshot: Swift.Codable { +extension ElastiCacheClientTypes.ServerlessCacheSnapshot: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case bytesUsedForCache = "BytesUsedForCache" @@ -23776,26 +17481,21 @@ extension ElastiCacheClientTypes.ServerlessCacheSnapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverlessCacheSnapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverlessCacheSnapshotName) - serverlessCacheSnapshotName = serverlessCacheSnapshotNameDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let expiryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expiryTime) - expiryTime = expiryTimeDecoded - let bytesUsedForCacheDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bytesUsedForCache) - bytesUsedForCache = bytesUsedForCacheDecoded - let serverlessCacheConfigurationDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServerlessCacheConfiguration.self, forKey: .serverlessCacheConfiguration) - serverlessCacheConfiguration = serverlessCacheConfigurationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ServerlessCacheSnapshot() + value.serverlessCacheSnapshotName = try reader["ServerlessCacheSnapshotName"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.snapshotType = try reader["SnapshotType"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.expiryTime = try reader["ExpiryTime"].readTimestampIfPresent(format: .dateTime) + value.bytesUsedForCache = try reader["BytesUsedForCache"].readIfPresent() + value.serverlessCacheConfiguration = try reader["ServerlessCacheConfiguration"].readIfPresent(readingClosure: ElastiCacheClientTypes.ServerlessCacheConfiguration.readingClosure) + return value + } } } @@ -23848,16 +17548,14 @@ extension ElastiCacheClientTypes { } extension ServerlessCacheSnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServerlessCacheSnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23885,33 +17583,15 @@ public struct ServerlessCacheSnapshotAlreadyExistsFault: ClientRuntime.ModeledEr } } -struct ServerlessCacheSnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServerlessCacheSnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ServerlessCacheSnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServerlessCacheSnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23939,33 +17619,15 @@ public struct ServerlessCacheSnapshotNotFoundFault: ClientRuntime.ModeledError, } } -struct ServerlessCacheSnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServerlessCacheSnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ServerlessCacheSnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServerlessCacheSnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23993,33 +17655,15 @@ public struct ServerlessCacheSnapshotQuotaExceededFault: ClientRuntime.ModeledEr } } -struct ServerlessCacheSnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServerlessCacheSnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ServiceLinkedRoleNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServiceLinkedRoleNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24041,29 +17685,13 @@ public struct ServiceLinkedRoleNotFoundFault: ClientRuntime.ModeledError, AWSCli public init( message: Swift.String? = nil - ) - { - self.properties.message = message - } -} - -struct ServiceLinkedRoleNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServiceLinkedRoleNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + ) + { + self.properties.message = message } } -extension ElastiCacheClientTypes.ServiceUpdate: Swift.Codable { +extension ElastiCacheClientTypes.ServiceUpdate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoUpdateAfterRecommendedApplyByDate = "AutoUpdateAfterRecommendedApplyByDate" case engine = "Engine" @@ -24119,32 +17747,24 @@ extension ElastiCacheClientTypes.ServiceUpdate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceUpdateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateName) - serviceUpdateName = serviceUpdateNameDecoded - let serviceUpdateReleaseDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .serviceUpdateReleaseDate) - serviceUpdateReleaseDate = serviceUpdateReleaseDateDecoded - let serviceUpdateEndDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .serviceUpdateEndDate) - serviceUpdateEndDate = serviceUpdateEndDateDecoded - let serviceUpdateSeverityDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServiceUpdateSeverity.self, forKey: .serviceUpdateSeverity) - serviceUpdateSeverity = serviceUpdateSeverityDecoded - let serviceUpdateRecommendedApplyByDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .serviceUpdateRecommendedApplyByDate) - serviceUpdateRecommendedApplyByDate = serviceUpdateRecommendedApplyByDateDecoded - let serviceUpdateStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServiceUpdateStatus.self, forKey: .serviceUpdateStatus) - serviceUpdateStatus = serviceUpdateStatusDecoded - let serviceUpdateDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateDescription) - serviceUpdateDescription = serviceUpdateDescriptionDecoded - let serviceUpdateTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServiceUpdateType.self, forKey: .serviceUpdateType) - serviceUpdateType = serviceUpdateTypeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoUpdateAfterRecommendedApplyByDateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoUpdateAfterRecommendedApplyByDate) - autoUpdateAfterRecommendedApplyByDate = autoUpdateAfterRecommendedApplyByDateDecoded - let estimatedUpdateTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .estimatedUpdateTime) - estimatedUpdateTime = estimatedUpdateTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.ServiceUpdate() + value.serviceUpdateName = try reader["ServiceUpdateName"].readIfPresent() + value.serviceUpdateReleaseDate = try reader["ServiceUpdateReleaseDate"].readTimestampIfPresent(format: .dateTime) + value.serviceUpdateEndDate = try reader["ServiceUpdateEndDate"].readTimestampIfPresent(format: .dateTime) + value.serviceUpdateSeverity = try reader["ServiceUpdateSeverity"].readIfPresent() + value.serviceUpdateRecommendedApplyByDate = try reader["ServiceUpdateRecommendedApplyByDate"].readTimestampIfPresent(format: .dateTime) + value.serviceUpdateStatus = try reader["ServiceUpdateStatus"].readIfPresent() + value.serviceUpdateDescription = try reader["ServiceUpdateDescription"].readIfPresent() + value.serviceUpdateType = try reader["ServiceUpdateType"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.autoUpdateAfterRecommendedApplyByDate = try reader["AutoUpdateAfterRecommendedApplyByDate"].readIfPresent() + value.estimatedUpdateTime = try reader["EstimatedUpdateTime"].readIfPresent() + return value + } } } @@ -24209,16 +17829,14 @@ extension ElastiCacheClientTypes { } extension ServiceUpdateNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServiceUpdateNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24246,22 +17864,6 @@ public struct ServiceUpdateNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct ServiceUpdateNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServiceUpdateNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ElastiCacheClientTypes { public enum ServiceUpdateSeverity: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case critical @@ -24399,7 +18001,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.SlotMigration: Swift.Codable { +extension ElastiCacheClientTypes.SlotMigration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case progressPercentage = "ProgressPercentage" } @@ -24411,10 +18013,13 @@ extension ElastiCacheClientTypes.SlotMigration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let progressPercentageDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .progressPercentage) - progressPercentage = progressPercentageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.SlotMigration() + value.progressPercentage = try reader["ProgressPercentage"].readIfPresent() + return value + } } } @@ -24434,7 +18039,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.Snapshot: Swift.Codable { +extension ElastiCacheClientTypes.Snapshot: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" @@ -24563,81 +18168,40 @@ extension ElastiCacheClientTypes.Snapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotName) - snapshotName = snapshotNameDecoded - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let replicationGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupDescription) - replicationGroupDescription = replicationGroupDescriptionDecoded - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let snapshotStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotStatus) - snapshotStatus = snapshotStatusDecoded - let snapshotSourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotSource) - snapshotSource = snapshotSourceDecoded - let cacheNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheNodeType) - cacheNodeType = cacheNodeTypeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let numCacheNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numCacheNodes) - numCacheNodes = numCacheNodesDecoded - let preferredAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredAvailabilityZone) - preferredAvailabilityZone = preferredAvailabilityZoneDecoded - let preferredOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredOutpostArn) - preferredOutpostArn = preferredOutpostArnDecoded - let cacheClusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .cacheClusterCreateTime) - cacheClusterCreateTime = cacheClusterCreateTimeDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let cacheParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheParameterGroupName) - cacheParameterGroupName = cacheParameterGroupNameDecoded - let cacheSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheSubnetGroupName) - cacheSubnetGroupName = cacheSubnetGroupNameDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let snapshotRetentionLimitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotRetentionLimit) - snapshotRetentionLimit = snapshotRetentionLimitDecoded - let snapshotWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotWindow) - snapshotWindow = snapshotWindowDecoded - let numNodeGroupsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numNodeGroups) - numNodeGroups = numNodeGroupsDecoded - let automaticFailoverDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AutomaticFailoverStatus.self, forKey: .automaticFailover) - automaticFailover = automaticFailoverDecoded - if containerValues.contains(.nodeSnapshots) { - struct KeyVal0{struct NodeSnapshot{}} - let nodeSnapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeSnapshots) - if let nodeSnapshotsWrappedContainer = nodeSnapshotsWrappedContainer { - let nodeSnapshotsContainer = try nodeSnapshotsWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.NodeSnapshot].self, forKey: .member) - var nodeSnapshotsBuffer:[ElastiCacheClientTypes.NodeSnapshot]? = nil - if let nodeSnapshotsContainer = nodeSnapshotsContainer { - nodeSnapshotsBuffer = [ElastiCacheClientTypes.NodeSnapshot]() - for structureContainer0 in nodeSnapshotsContainer { - nodeSnapshotsBuffer?.append(structureContainer0) - } - } - nodeSnapshots = nodeSnapshotsBuffer - } else { - nodeSnapshots = [] - } - } else { - nodeSnapshots = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.Snapshot() + value.snapshotName = try reader["SnapshotName"].readIfPresent() + value.replicationGroupId = try reader["ReplicationGroupId"].readIfPresent() + value.replicationGroupDescription = try reader["ReplicationGroupDescription"].readIfPresent() + value.cacheClusterId = try reader["CacheClusterId"].readIfPresent() + value.snapshotStatus = try reader["SnapshotStatus"].readIfPresent() + value.snapshotSource = try reader["SnapshotSource"].readIfPresent() + value.cacheNodeType = try reader["CacheNodeType"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.numCacheNodes = try reader["NumCacheNodes"].readIfPresent() + value.preferredAvailabilityZone = try reader["PreferredAvailabilityZone"].readIfPresent() + value.preferredOutpostArn = try reader["PreferredOutpostArn"].readIfPresent() + value.cacheClusterCreateTime = try reader["CacheClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.topicArn = try reader["TopicArn"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.cacheParameterGroupName = try reader["CacheParameterGroupName"].readIfPresent() + value.cacheSubnetGroupName = try reader["CacheSubnetGroupName"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.autoMinorVersionUpgrade = try reader["AutoMinorVersionUpgrade"].readIfPresent() + value.snapshotRetentionLimit = try reader["SnapshotRetentionLimit"].readIfPresent() + value.snapshotWindow = try reader["SnapshotWindow"].readIfPresent() + value.numNodeGroups = try reader["NumNodeGroups"].readIfPresent() + value.automaticFailover = try reader["AutomaticFailover"].readIfPresent() + value.nodeSnapshots = try reader["NodeSnapshots"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.NodeSnapshot.readingClosure, memberNodeInfo: "NodeSnapshot", isFlattened: false) + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.arn = try reader["ARN"].readIfPresent() + value.dataTiering = try reader["DataTiering"].readIfPresent() + return value } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let dataTieringDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.DataTieringStatus.self, forKey: .dataTiering) - dataTiering = dataTieringDecoded } } @@ -24822,16 +18386,14 @@ extension ElastiCacheClientTypes { } extension SnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24859,33 +18421,15 @@ public struct SnapshotAlreadyExistsFault: ClientRuntime.ModeledError, AWSClientR } } -struct SnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotFeatureNotSupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotFeatureNotSupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24920,33 +18464,15 @@ public struct SnapshotFeatureNotSupportedFault: ClientRuntime.ModeledError, AWSC } } -struct SnapshotFeatureNotSupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotFeatureNotSupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24974,33 +18500,15 @@ public struct SnapshotNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct SnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25028,22 +18536,6 @@ public struct SnapshotQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct SnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ElastiCacheClientTypes { public enum SourceType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case cacheCluster @@ -25098,6 +18590,11 @@ extension ElastiCacheClientTypes { } extension StartMigrationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case customerNodeEndpointList = "CustomerNodeEndpointList" + case replicationGroupId = "ReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let customerNodeEndpointList = customerNodeEndpointList { @@ -25145,51 +18642,15 @@ public struct StartMigrationInput: Swift.Equatable { } } -struct StartMigrationInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let customerNodeEndpointList: [ElastiCacheClientTypes.CustomerNodeEndpoint]? -} - -extension StartMigrationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerNodeEndpointList = "CustomerNodeEndpointList" - case replicationGroupId = "ReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - if containerValues.contains(.customerNodeEndpointList) { - struct KeyVal0{struct member{}} - let customerNodeEndpointListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .customerNodeEndpointList) - if let customerNodeEndpointListWrappedContainer = customerNodeEndpointListWrappedContainer { - let customerNodeEndpointListContainer = try customerNodeEndpointListWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CustomerNodeEndpoint].self, forKey: .member) - var customerNodeEndpointListBuffer:[ElastiCacheClientTypes.CustomerNodeEndpoint]? = nil - if let customerNodeEndpointListContainer = customerNodeEndpointListContainer { - customerNodeEndpointListBuffer = [ElastiCacheClientTypes.CustomerNodeEndpoint]() - for structureContainer0 in customerNodeEndpointListContainer { - customerNodeEndpointListBuffer?.append(structureContainer0) - } - } - customerNodeEndpointList = customerNodeEndpointListBuffer - } else { - customerNodeEndpointList = [] - } - } else { - customerNodeEndpointList = nil - } - } -} +extension StartMigrationOutput { -extension StartMigrationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartMigrationOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartMigrationResult"] + var value = StartMigrationOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -25206,37 +18667,27 @@ public struct StartMigrationOutput: Swift.Equatable { } } -struct StartMigrationOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension StartMigrationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartMigrationResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} +enum StartMigrationOutputError { -enum StartMigrationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupAlreadyUnderMigrationFault": return try await ReplicationGroupAlreadyUnderMigrationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupAlreadyUnderMigrationFault": return try await ReplicationGroupAlreadyUnderMigrationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElastiCacheClientTypes.Subnet: Swift.Codable { +extension ElastiCacheClientTypes.Subnet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case subnetAvailabilityZone = "SubnetAvailabilityZone" case subnetIdentifier = "SubnetIdentifier" @@ -25269,32 +18720,15 @@ extension ElastiCacheClientTypes.Subnet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetIdentifier) - subnetIdentifier = subnetIdentifierDecoded - let subnetAvailabilityZoneDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.AvailabilityZone.self, forKey: .subnetAvailabilityZone) - subnetAvailabilityZone = subnetAvailabilityZoneDecoded - let subnetOutpostDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.SubnetOutpost.self, forKey: .subnetOutpost) - subnetOutpost = subnetOutpostDecoded - if containerValues.contains(.supportedNetworkTypes) { - struct KeyVal0{struct member{}} - let supportedNetworkTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedNetworkTypes) - if let supportedNetworkTypesWrappedContainer = supportedNetworkTypesWrappedContainer { - let supportedNetworkTypesContainer = try supportedNetworkTypesWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.NetworkType].self, forKey: .member) - var supportedNetworkTypesBuffer:[ElastiCacheClientTypes.NetworkType]? = nil - if let supportedNetworkTypesContainer = supportedNetworkTypesContainer { - supportedNetworkTypesBuffer = [ElastiCacheClientTypes.NetworkType]() - for enumContainer0 in supportedNetworkTypesContainer { - supportedNetworkTypesBuffer?.append(enumContainer0) - } - } - supportedNetworkTypes = supportedNetworkTypesBuffer - } else { - supportedNetworkTypes = [] - } - } else { - supportedNetworkTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.Subnet() + value.subnetIdentifier = try reader["SubnetIdentifier"].readIfPresent() + value.subnetAvailabilityZone = try reader["SubnetAvailabilityZone"].readIfPresent(readingClosure: ElastiCacheClientTypes.AvailabilityZone.readingClosure) + value.subnetOutpost = try reader["SubnetOutpost"].readIfPresent(readingClosure: ElastiCacheClientTypes.SubnetOutpost.readingClosure) + value.supportedNetworkTypes = try reader["SupportedNetworkTypes"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.NetworkType.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -25328,16 +18762,14 @@ extension ElastiCacheClientTypes { } extension SubnetInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubnetInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25365,33 +18797,15 @@ public struct SubnetInUse: ClientRuntime.ModeledError, AWSClientRuntime.AWSServi } } -struct SubnetInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubnetInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubnetNotAllowedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubnetNotAllowedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25419,23 +18833,7 @@ public struct SubnetNotAllowedFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct SubnetNotAllowedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubnetNotAllowedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.SubnetOutpost: Swift.Codable { +extension ElastiCacheClientTypes.SubnetOutpost: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case subnetOutpostArn = "SubnetOutpostArn" } @@ -25447,10 +18845,13 @@ extension ElastiCacheClientTypes.SubnetOutpost: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetOutpostArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetOutpostArn) - subnetOutpostArn = subnetOutpostArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.SubnetOutpost() + value.subnetOutpostArn = try reader["SubnetOutpostArn"].readIfPresent() + return value + } } } @@ -25470,7 +18871,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.Tag: Swift.Codable { +extension ElastiCacheClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -25486,12 +18887,14 @@ extension ElastiCacheClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -25516,16 +18919,14 @@ extension ElastiCacheClientTypes { } extension TagNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TagNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25553,33 +18954,15 @@ public struct TagNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct TagNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension TagNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TagQuotaPerResourceExceeded { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TagQuotaPerResourceExceeded() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25607,23 +18990,12 @@ public struct TagQuotaPerResourceExceeded: ClientRuntime.ModeledError, AWSClient } } -struct TagQuotaPerResourceExceededBody: Swift.Equatable { - let message: Swift.String? -} - -extension TagQuotaPerResourceExceededBody: Swift.Decodable { +extension TestFailoverInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case nodeGroupId = "NodeGroupId" + case replicationGroupId = "ReplicationGroupId" } -} -extension TestFailoverInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nodeGroupId = nodeGroupId { @@ -25662,37 +19034,15 @@ public struct TestFailoverInput: Swift.Equatable { } } -struct TestFailoverInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let nodeGroupId: Swift.String? -} - -extension TestFailoverInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nodeGroupId = "NodeGroupId" - case replicationGroupId = "ReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let nodeGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeGroupId) - nodeGroupId = nodeGroupIdDecoded - } -} - extension TestFailoverNotAvailableFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TestFailoverNotAvailableFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25720,30 +19070,15 @@ public struct TestFailoverNotAvailableFault: ClientRuntime.ModeledError, AWSClie } } -struct TestFailoverNotAvailableFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension TestFailoverNotAvailableFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} +extension TestFailoverOutput { -extension TestFailoverOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TestFailoverOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["TestFailoverResult"] + var value = TestFailoverOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -25760,42 +19095,37 @@ public struct TestFailoverOutput: Swift.Equatable { } } -struct TestFailoverOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension TestFailoverOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("TestFailoverResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} +enum TestFailoverOutputError { -enum TestFailoverOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "APICallRateForCustomerExceeded": return try await APICallRateForCustomerExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSKeyFault": return try await InvalidKMSKeyFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterCombination": return try await InvalidParameterCombinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NodeGroupNotFoundFault": return try await NodeGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TestFailoverNotAvailableFault": return try await TestFailoverNotAvailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "APICallRateForCustomerExceeded": return try await APICallRateForCustomerExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCacheClusterState": return try await InvalidCacheClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidKMSKeyFault": return try await InvalidKMSKeyFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterCombination": return try await InvalidParameterCombinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NodeGroupNotFoundFault": return try await NodeGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TestFailoverNotAvailableFault": return try await TestFailoverNotAvailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension TestMigrationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case customerNodeEndpointList = "CustomerNodeEndpointList" + case replicationGroupId = "ReplicationGroupId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let customerNodeEndpointList = customerNodeEndpointList { @@ -25843,51 +19173,15 @@ public struct TestMigrationInput: Swift.Equatable { } } -struct TestMigrationInputBody: Swift.Equatable { - let replicationGroupId: Swift.String? - let customerNodeEndpointList: [ElastiCacheClientTypes.CustomerNodeEndpoint]? -} - -extension TestMigrationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerNodeEndpointList = "CustomerNodeEndpointList" - case replicationGroupId = "ReplicationGroupId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - if containerValues.contains(.customerNodeEndpointList) { - struct KeyVal0{struct member{}} - let customerNodeEndpointListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .customerNodeEndpointList) - if let customerNodeEndpointListWrappedContainer = customerNodeEndpointListWrappedContainer { - let customerNodeEndpointListContainer = try customerNodeEndpointListWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CustomerNodeEndpoint].self, forKey: .member) - var customerNodeEndpointListBuffer:[ElastiCacheClientTypes.CustomerNodeEndpoint]? = nil - if let customerNodeEndpointListContainer = customerNodeEndpointListContainer { - customerNodeEndpointListBuffer = [ElastiCacheClientTypes.CustomerNodeEndpoint]() - for structureContainer0 in customerNodeEndpointListContainer { - customerNodeEndpointListBuffer?.append(structureContainer0) - } - } - customerNodeEndpointList = customerNodeEndpointListBuffer - } else { - customerNodeEndpointList = [] - } - } else { - customerNodeEndpointList = nil - } - } -} +extension TestMigrationOutput { -extension TestMigrationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TestMigrationOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationGroup = output.replicationGroup - } else { - self.replicationGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["TestMigrationResult"] + var value = TestMigrationOutput() + value.replicationGroup = try reader["ReplicationGroup"].readIfPresent(readingClosure: ElastiCacheClientTypes.ReplicationGroup.readingClosure) + return value } } } @@ -25904,37 +19198,27 @@ public struct TestMigrationOutput: Swift.Equatable { } } -struct TestMigrationOutputBody: Swift.Equatable { - let replicationGroup: ElastiCacheClientTypes.ReplicationGroup? -} - -extension TestMigrationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationGroup = "ReplicationGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("TestMigrationResult")) - let replicationGroupDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ReplicationGroup.self, forKey: .replicationGroup) - replicationGroup = replicationGroupDecoded - } -} +enum TestMigrationOutputError { -enum TestMigrationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidParameterValue": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupAlreadyUnderMigrationFault": return try await ReplicationGroupAlreadyUnderMigrationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidParameterValue": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReplicationGroupState": return try await InvalidReplicationGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupAlreadyUnderMigrationFault": return try await ReplicationGroupAlreadyUnderMigrationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplicationGroupNotFoundFault": return try await ReplicationGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElastiCacheClientTypes.TimeRangeFilter: Swift.Codable { +extension ElastiCacheClientTypes.TimeRangeFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case endTime = "EndTime" case startTime = "StartTime" @@ -25950,12 +19234,14 @@ extension ElastiCacheClientTypes.TimeRangeFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.TimeRangeFilter() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -26011,7 +19297,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.UnprocessedUpdateAction: Swift.Codable { +extension ElastiCacheClientTypes.UnprocessedUpdateAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheClusterId = "CacheClusterId" case errorMessage = "ErrorMessage" @@ -26039,18 +19325,17 @@ extension ElastiCacheClientTypes.UnprocessedUpdateAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let serviceUpdateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateName) - serviceUpdateName = serviceUpdateNameDecoded - let errorTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorType) - errorType = errorTypeDecoded - let errorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorMessage) - errorMessage = errorMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.UnprocessedUpdateAction() + value.replicationGroupId = try reader["ReplicationGroupId"].readIfPresent() + value.cacheClusterId = try reader["CacheClusterId"].readIfPresent() + value.serviceUpdateName = try reader["ServiceUpdateName"].readIfPresent() + value.errorType = try reader["ErrorType"].readIfPresent() + value.errorMessage = try reader["ErrorMessage"].readIfPresent() + return value + } } } @@ -26086,7 +19371,7 @@ extension ElastiCacheClientTypes { } -extension ElastiCacheClientTypes.UpdateAction: Swift.Codable { +extension ElastiCacheClientTypes.UpdateAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cacheClusterId = "CacheClusterId" case cacheNodeUpdateStatus = "CacheNodeUpdateStatus" @@ -26180,76 +19465,29 @@ extension ElastiCacheClientTypes.UpdateAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationGroupId) - replicationGroupId = replicationGroupIdDecoded - let cacheClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheClusterId) - cacheClusterId = cacheClusterIdDecoded - let serviceUpdateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUpdateName) - serviceUpdateName = serviceUpdateNameDecoded - let serviceUpdateReleaseDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .serviceUpdateReleaseDate) - serviceUpdateReleaseDate = serviceUpdateReleaseDateDecoded - let serviceUpdateSeverityDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServiceUpdateSeverity.self, forKey: .serviceUpdateSeverity) - serviceUpdateSeverity = serviceUpdateSeverityDecoded - let serviceUpdateStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServiceUpdateStatus.self, forKey: .serviceUpdateStatus) - serviceUpdateStatus = serviceUpdateStatusDecoded - let serviceUpdateRecommendedApplyByDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .serviceUpdateRecommendedApplyByDate) - serviceUpdateRecommendedApplyByDate = serviceUpdateRecommendedApplyByDateDecoded - let serviceUpdateTypeDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.ServiceUpdateType.self, forKey: .serviceUpdateType) - serviceUpdateType = serviceUpdateTypeDecoded - let updateActionAvailableDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateActionAvailableDate) - updateActionAvailableDate = updateActionAvailableDateDecoded - let updateActionStatusDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.UpdateActionStatus.self, forKey: .updateActionStatus) - updateActionStatus = updateActionStatusDecoded - let nodesUpdatedDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodesUpdated) - nodesUpdated = nodesUpdatedDecoded - let updateActionStatusModifiedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateActionStatusModifiedDate) - updateActionStatusModifiedDate = updateActionStatusModifiedDateDecoded - let slaMetDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.SlaMet.self, forKey: .slaMet) - slaMet = slaMetDecoded - if containerValues.contains(.nodeGroupUpdateStatus) { - struct KeyVal0{struct NodeGroupUpdateStatus{}} - let nodeGroupUpdateStatusWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeGroupUpdateStatus) - if let nodeGroupUpdateStatusWrappedContainer = nodeGroupUpdateStatusWrappedContainer { - let nodeGroupUpdateStatusContainer = try nodeGroupUpdateStatusWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.NodeGroupUpdateStatus].self, forKey: .member) - var nodeGroupUpdateStatusBuffer:[ElastiCacheClientTypes.NodeGroupUpdateStatus]? = nil - if let nodeGroupUpdateStatusContainer = nodeGroupUpdateStatusContainer { - nodeGroupUpdateStatusBuffer = [ElastiCacheClientTypes.NodeGroupUpdateStatus]() - for structureContainer0 in nodeGroupUpdateStatusContainer { - nodeGroupUpdateStatusBuffer?.append(structureContainer0) - } - } - nodeGroupUpdateStatus = nodeGroupUpdateStatusBuffer - } else { - nodeGroupUpdateStatus = [] - } - } else { - nodeGroupUpdateStatus = nil - } - if containerValues.contains(.cacheNodeUpdateStatus) { - struct KeyVal0{struct CacheNodeUpdateStatus{}} - let cacheNodeUpdateStatusWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cacheNodeUpdateStatus) - if let cacheNodeUpdateStatusWrappedContainer = cacheNodeUpdateStatusWrappedContainer { - let cacheNodeUpdateStatusContainer = try cacheNodeUpdateStatusWrappedContainer.decodeIfPresent([ElastiCacheClientTypes.CacheNodeUpdateStatus].self, forKey: .member) - var cacheNodeUpdateStatusBuffer:[ElastiCacheClientTypes.CacheNodeUpdateStatus]? = nil - if let cacheNodeUpdateStatusContainer = cacheNodeUpdateStatusContainer { - cacheNodeUpdateStatusBuffer = [ElastiCacheClientTypes.CacheNodeUpdateStatus]() - for structureContainer0 in cacheNodeUpdateStatusContainer { - cacheNodeUpdateStatusBuffer?.append(structureContainer0) - } - } - cacheNodeUpdateStatus = cacheNodeUpdateStatusBuffer - } else { - cacheNodeUpdateStatus = [] - } - } else { - cacheNodeUpdateStatus = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.UpdateAction() + value.replicationGroupId = try reader["ReplicationGroupId"].readIfPresent() + value.cacheClusterId = try reader["CacheClusterId"].readIfPresent() + value.serviceUpdateName = try reader["ServiceUpdateName"].readIfPresent() + value.serviceUpdateReleaseDate = try reader["ServiceUpdateReleaseDate"].readTimestampIfPresent(format: .dateTime) + value.serviceUpdateSeverity = try reader["ServiceUpdateSeverity"].readIfPresent() + value.serviceUpdateStatus = try reader["ServiceUpdateStatus"].readIfPresent() + value.serviceUpdateRecommendedApplyByDate = try reader["ServiceUpdateRecommendedApplyByDate"].readTimestampIfPresent(format: .dateTime) + value.serviceUpdateType = try reader["ServiceUpdateType"].readIfPresent() + value.updateActionAvailableDate = try reader["UpdateActionAvailableDate"].readTimestampIfPresent(format: .dateTime) + value.updateActionStatus = try reader["UpdateActionStatus"].readIfPresent() + value.nodesUpdated = try reader["NodesUpdated"].readIfPresent() + value.updateActionStatusModifiedDate = try reader["UpdateActionStatusModifiedDate"].readTimestampIfPresent(format: .dateTime) + value.slaMet = try reader["SlaMet"].readIfPresent() + value.nodeGroupUpdateStatus = try reader["NodeGroupUpdateStatus"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.NodeGroupUpdateStatus.readingClosure, memberNodeInfo: "NodeGroupUpdateStatus", isFlattened: false) + value.cacheNodeUpdateStatus = try reader["CacheNodeUpdateStatus"].readListIfPresent(memberReadingClosure: ElastiCacheClientTypes.CacheNodeUpdateStatus.readingClosure, memberNodeInfo: "CacheNodeUpdateStatus", isFlattened: false) + value.estimatedUpdateTime = try reader["EstimatedUpdateTime"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + return value } - let estimatedUpdateTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .estimatedUpdateTime) - estimatedUpdateTime = estimatedUpdateTimeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded } } @@ -26386,7 +19624,7 @@ extension ElastiCacheClientTypes { } } -extension ElastiCacheClientTypes.User: Swift.Codable { +extension ElastiCacheClientTypes.User: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case accessString = "AccessString" @@ -26439,43 +19677,21 @@ extension ElastiCacheClientTypes.User: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let accessStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessString) - accessString = accessStringDecoded - if containerValues.contains(.userGroupIds) { - struct KeyVal0{struct member{}} - let userGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIds) - if let userGroupIdsWrappedContainer = userGroupIdsWrappedContainer { - let userGroupIdsContainer = try userGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsBuffer:[Swift.String]? = nil - if let userGroupIdsContainer = userGroupIdsContainer { - userGroupIdsBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsContainer { - userGroupIdsBuffer?.append(stringContainer0) - } - } - userGroupIds = userGroupIdsBuffer - } else { - userGroupIds = [] - } - } else { - userGroupIds = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.User() + value.userId = try reader["UserId"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.accessString = try reader["AccessString"].readIfPresent() + value.userGroupIds = try reader["UserGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.authentication = try reader["Authentication"].readIfPresent(readingClosure: ElastiCacheClientTypes.Authentication.readingClosure) + value.arn = try reader["ARN"].readIfPresent() + return value } - let authenticationDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.Authentication.self, forKey: .authentication) - authentication = authenticationDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded } } @@ -26527,16 +19743,14 @@ extension ElastiCacheClientTypes { } extension UserAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UserAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26564,23 +19778,7 @@ public struct UserAlreadyExistsFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct UserAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UserAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.UserGroup: Swift.Codable { +extension ElastiCacheClientTypes.UserGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" case engine = "Engine" @@ -26651,77 +19849,21 @@ extension ElastiCacheClientTypes.UserGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userGroupId) - userGroupId = userGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - if containerValues.contains(.userIds) { - struct KeyVal0{struct member{}} - let userIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIds) - if let userIdsWrappedContainer = userIdsWrappedContainer { - let userIdsContainer = try userIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsBuffer:[Swift.String]? = nil - if let userIdsContainer = userIdsContainer { - userIdsBuffer = [Swift.String]() - for stringContainer0 in userIdsContainer { - userIdsBuffer?.append(stringContainer0) - } - } - userIds = userIdsBuffer - } else { - userIds = [] - } - } else { - userIds = nil - } - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let pendingChangesDecoded = try containerValues.decodeIfPresent(ElastiCacheClientTypes.UserGroupPendingChanges.self, forKey: .pendingChanges) - pendingChanges = pendingChangesDecoded - if containerValues.contains(.replicationGroups) { - struct KeyVal0{struct member{}} - let replicationGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replicationGroups) - if let replicationGroupsWrappedContainer = replicationGroupsWrappedContainer { - let replicationGroupsContainer = try replicationGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replicationGroupsBuffer:[Swift.String]? = nil - if let replicationGroupsContainer = replicationGroupsContainer { - replicationGroupsBuffer = [Swift.String]() - for stringContainer0 in replicationGroupsContainer { - replicationGroupsBuffer?.append(stringContainer0) - } - } - replicationGroups = replicationGroupsBuffer - } else { - replicationGroups = [] - } - } else { - replicationGroups = nil - } - if containerValues.contains(.serverlessCaches) { - struct KeyVal0{struct member{}} - let serverlessCachesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serverlessCaches) - if let serverlessCachesWrappedContainer = serverlessCachesWrappedContainer { - let serverlessCachesContainer = try serverlessCachesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serverlessCachesBuffer:[Swift.String]? = nil - if let serverlessCachesContainer = serverlessCachesContainer { - serverlessCachesBuffer = [Swift.String]() - for stringContainer0 in serverlessCachesContainer { - serverlessCachesBuffer?.append(stringContainer0) - } - } - serverlessCaches = serverlessCachesBuffer - } else { - serverlessCaches = [] - } - } else { - serverlessCaches = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.UserGroup() + value.userGroupId = try reader["UserGroupId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.userIds = try reader["UserIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.pendingChanges = try reader["PendingChanges"].readIfPresent(readingClosure: ElastiCacheClientTypes.UserGroupPendingChanges.readingClosure) + value.replicationGroups = try reader["ReplicationGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.serverlessCaches = try reader["ServerlessCaches"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.arn = try reader["ARN"].readIfPresent() + return value } - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded } } @@ -26773,16 +19915,14 @@ extension ElastiCacheClientTypes { } extension UserGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UserGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26810,33 +19950,15 @@ public struct UserGroupAlreadyExistsFault: ClientRuntime.ModeledError, AWSClient } } -struct UserGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UserGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UserGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UserGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26864,23 +19986,7 @@ public struct UserGroupNotFoundFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct UserGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UserGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.UserGroupPendingChanges: Swift.Codable { +extension ElastiCacheClientTypes.UserGroupPendingChanges: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case userIdsToAdd = "UserIdsToAdd" case userIdsToRemove = "UserIdsToRemove" @@ -26914,45 +20020,13 @@ extension ElastiCacheClientTypes.UserGroupPendingChanges: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.userIdsToRemove) { - struct KeyVal0{struct member{}} - let userIdsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIdsToRemove) - if let userIdsToRemoveWrappedContainer = userIdsToRemoveWrappedContainer { - let userIdsToRemoveContainer = try userIdsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsToRemoveBuffer:[Swift.String]? = nil - if let userIdsToRemoveContainer = userIdsToRemoveContainer { - userIdsToRemoveBuffer = [Swift.String]() - for stringContainer0 in userIdsToRemoveContainer { - userIdsToRemoveBuffer?.append(stringContainer0) - } - } - userIdsToRemove = userIdsToRemoveBuffer - } else { - userIdsToRemove = [] - } - } else { - userIdsToRemove = nil - } - if containerValues.contains(.userIdsToAdd) { - struct KeyVal0{struct member{}} - let userIdsToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userIdsToAdd) - if let userIdsToAddWrappedContainer = userIdsToAddWrappedContainer { - let userIdsToAddContainer = try userIdsToAddWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userIdsToAddBuffer:[Swift.String]? = nil - if let userIdsToAddContainer = userIdsToAddContainer { - userIdsToAddBuffer = [Swift.String]() - for stringContainer0 in userIdsToAddContainer { - userIdsToAddBuffer?.append(stringContainer0) - } - } - userIdsToAdd = userIdsToAddBuffer - } else { - userIdsToAdd = [] - } - } else { - userIdsToAdd = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.UserGroupPendingChanges() + value.userIdsToRemove = try reader["UserIdsToRemove"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.userIdsToAdd = try reader["UserIdsToAdd"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -26978,16 +20052,14 @@ extension ElastiCacheClientTypes { } extension UserGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UserGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27015,23 +20087,7 @@ public struct UserGroupQuotaExceededFault: ClientRuntime.ModeledError, AWSClient } } -struct UserGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UserGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElastiCacheClientTypes.UserGroupsUpdateStatus: Swift.Codable { +extension ElastiCacheClientTypes.UserGroupsUpdateStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case userGroupIdsToAdd = "UserGroupIdsToAdd" case userGroupIdsToRemove = "UserGroupIdsToRemove" @@ -27065,45 +20121,13 @@ extension ElastiCacheClientTypes.UserGroupsUpdateStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.userGroupIdsToAdd) { - struct KeyVal0{struct member{}} - let userGroupIdsToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIdsToAdd) - if let userGroupIdsToAddWrappedContainer = userGroupIdsToAddWrappedContainer { - let userGroupIdsToAddContainer = try userGroupIdsToAddWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsToAddBuffer:[Swift.String]? = nil - if let userGroupIdsToAddContainer = userGroupIdsToAddContainer { - userGroupIdsToAddBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsToAddContainer { - userGroupIdsToAddBuffer?.append(stringContainer0) - } - } - userGroupIdsToAdd = userGroupIdsToAddBuffer - } else { - userGroupIdsToAdd = [] - } - } else { - userGroupIdsToAdd = nil - } - if containerValues.contains(.userGroupIdsToRemove) { - struct KeyVal0{struct member{}} - let userGroupIdsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userGroupIdsToRemove) - if let userGroupIdsToRemoveWrappedContainer = userGroupIdsToRemoveWrappedContainer { - let userGroupIdsToRemoveContainer = try userGroupIdsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var userGroupIdsToRemoveBuffer:[Swift.String]? = nil - if let userGroupIdsToRemoveContainer = userGroupIdsToRemoveContainer { - userGroupIdsToRemoveBuffer = [Swift.String]() - for stringContainer0 in userGroupIdsToRemoveContainer { - userGroupIdsToRemoveBuffer?.append(stringContainer0) - } - } - userGroupIdsToRemove = userGroupIdsToRemoveBuffer - } else { - userGroupIdsToRemove = [] - } - } else { - userGroupIdsToRemove = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElastiCacheClientTypes.UserGroupsUpdateStatus() + value.userGroupIdsToAdd = try reader["UserGroupIdsToAdd"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.userGroupIdsToRemove = try reader["UserGroupIdsToRemove"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -27129,16 +20153,14 @@ extension ElastiCacheClientTypes { } extension UserNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UserNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27166,33 +20188,15 @@ public struct UserNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct UserNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UserNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UserQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UserQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -27219,19 +20223,3 @@ public struct UserQuotaExceededFault: ClientRuntime.ModeledError, AWSClientRunti self.properties.message = message } } - -struct UserQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UserQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} diff --git a/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift b/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift index aa1ae923e23..e50671e8b6d 100644 --- a/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift +++ b/Sources/Services/AWSElasticBeanstalk/ElasticBeanstalkClient.swift @@ -11,14 +11,11 @@ public class ElasticBeanstalkClient { let config: ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration let serviceName = "Elastic Beanstalk" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: ElasticBeanstalkClient.ElasticBeanstalkClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -78,7 +75,6 @@ extension ElasticBeanstalkClient { public func abortEnvironmentUpdate(input: AbortEnvironmentUpdateInput) async throws -> AbortEnvironmentUpdateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "abortEnvironmentUpdate") @@ -102,7 +98,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AbortEnvironmentUpdateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AbortEnvironmentUpdateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AbortEnvironmentUpdateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -124,7 +120,6 @@ extension ElasticBeanstalkClient { public func applyEnvironmentManagedAction(input: ApplyEnvironmentManagedActionInput) async throws -> ApplyEnvironmentManagedActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "applyEnvironmentManagedAction") @@ -148,7 +143,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ApplyEnvironmentManagedActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ApplyEnvironmentManagedActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ApplyEnvironmentManagedActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -169,7 +164,6 @@ extension ElasticBeanstalkClient { public func associateEnvironmentOperationsRole(input: AssociateEnvironmentOperationsRoleInput) async throws -> AssociateEnvironmentOperationsRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateEnvironmentOperationsRole") @@ -193,7 +187,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateEnvironmentOperationsRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateEnvironmentOperationsRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateEnvironmentOperationsRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -209,7 +203,6 @@ extension ElasticBeanstalkClient { public func checkDNSAvailability(input: CheckDNSAvailabilityInput) async throws -> CheckDNSAvailabilityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "checkDNSAvailability") @@ -233,7 +226,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CheckDNSAvailabilityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CheckDNSAvailabilityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CheckDNSAvailabilityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -255,7 +248,6 @@ extension ElasticBeanstalkClient { public func composeEnvironments(input: ComposeEnvironmentsInput) async throws -> ComposeEnvironmentsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "composeEnvironments") @@ -279,7 +271,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ComposeEnvironmentsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ComposeEnvironmentsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ComposeEnvironmentsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -300,7 +292,6 @@ extension ElasticBeanstalkClient { public func createApplication(input: CreateApplicationInput) async throws -> CreateApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createApplication") @@ -324,7 +315,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -355,7 +346,6 @@ extension ElasticBeanstalkClient { public func createApplicationVersion(input: CreateApplicationVersionInput) async throws -> CreateApplicationVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createApplicationVersion") @@ -379,7 +369,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateApplicationVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateApplicationVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateApplicationVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -408,7 +398,6 @@ extension ElasticBeanstalkClient { public func createConfigurationTemplate(input: CreateConfigurationTemplateInput) async throws -> CreateConfigurationTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createConfigurationTemplate") @@ -432,7 +421,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateConfigurationTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateConfigurationTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateConfigurationTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -454,7 +443,6 @@ extension ElasticBeanstalkClient { public func createEnvironment(input: CreateEnvironmentInput) async throws -> CreateEnvironmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createEnvironment") @@ -478,7 +466,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateEnvironmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateEnvironmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateEnvironmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -501,7 +489,6 @@ extension ElasticBeanstalkClient { public func createPlatformVersion(input: CreatePlatformVersionInput) async throws -> CreatePlatformVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createPlatformVersion") @@ -525,7 +512,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePlatformVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreatePlatformVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreatePlatformVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -548,7 +535,6 @@ extension ElasticBeanstalkClient { public func createStorageLocation(input: CreateStorageLocationInput) async throws -> CreateStorageLocationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createStorageLocation") @@ -572,7 +558,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateStorageLocationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateStorageLocationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateStorageLocationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -593,7 +579,6 @@ extension ElasticBeanstalkClient { public func deleteApplication(input: DeleteApplicationInput) async throws -> DeleteApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteApplication") @@ -617,7 +602,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -647,7 +632,6 @@ extension ElasticBeanstalkClient { public func deleteApplicationVersion(input: DeleteApplicationVersionInput) async throws -> DeleteApplicationVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteApplicationVersion") @@ -671,7 +655,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteApplicationVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteApplicationVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteApplicationVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -692,7 +676,6 @@ extension ElasticBeanstalkClient { public func deleteConfigurationTemplate(input: DeleteConfigurationTemplateInput) async throws -> DeleteConfigurationTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteConfigurationTemplate") @@ -716,7 +699,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteConfigurationTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteConfigurationTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteConfigurationTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -732,7 +715,6 @@ extension ElasticBeanstalkClient { public func deleteEnvironmentConfiguration(input: DeleteEnvironmentConfigurationInput) async throws -> DeleteEnvironmentConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteEnvironmentConfiguration") @@ -756,7 +738,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteEnvironmentConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteEnvironmentConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteEnvironmentConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -780,7 +762,6 @@ extension ElasticBeanstalkClient { public func deletePlatformVersion(input: DeletePlatformVersionInput) async throws -> DeletePlatformVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deletePlatformVersion") @@ -804,7 +785,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePlatformVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePlatformVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePlatformVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -825,7 +806,6 @@ extension ElasticBeanstalkClient { public func describeAccountAttributes(input: DescribeAccountAttributesInput) async throws -> DescribeAccountAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAccountAttributes") @@ -849,7 +829,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAccountAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAccountAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAccountAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -865,7 +845,6 @@ extension ElasticBeanstalkClient { public func describeApplicationVersions(input: DescribeApplicationVersionsInput) async throws -> DescribeApplicationVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeApplicationVersions") @@ -889,7 +868,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeApplicationVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeApplicationVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeApplicationVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -905,7 +884,6 @@ extension ElasticBeanstalkClient { public func describeApplications(input: DescribeApplicationsInput) async throws -> DescribeApplicationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeApplications") @@ -929,7 +907,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeApplicationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeApplicationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeApplicationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -950,7 +928,6 @@ extension ElasticBeanstalkClient { public func describeConfigurationOptions(input: DescribeConfigurationOptionsInput) async throws -> DescribeConfigurationOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeConfigurationOptions") @@ -974,7 +951,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeConfigurationOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeConfigurationOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeConfigurationOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -997,7 +974,6 @@ extension ElasticBeanstalkClient { public func describeConfigurationSettings(input: DescribeConfigurationSettingsInput) async throws -> DescribeConfigurationSettingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeConfigurationSettings") @@ -1021,7 +997,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeConfigurationSettingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeConfigurationSettingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeConfigurationSettingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1043,7 +1019,6 @@ extension ElasticBeanstalkClient { public func describeEnvironmentHealth(input: DescribeEnvironmentHealthInput) async throws -> DescribeEnvironmentHealthOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEnvironmentHealth") @@ -1067,7 +1042,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEnvironmentHealthOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEnvironmentHealthOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEnvironmentHealthOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1088,7 +1063,6 @@ extension ElasticBeanstalkClient { public func describeEnvironmentManagedActionHistory(input: DescribeEnvironmentManagedActionHistoryInput) async throws -> DescribeEnvironmentManagedActionHistoryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEnvironmentManagedActionHistory") @@ -1112,7 +1086,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEnvironmentManagedActionHistoryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEnvironmentManagedActionHistoryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEnvironmentManagedActionHistoryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1133,7 +1107,6 @@ extension ElasticBeanstalkClient { public func describeEnvironmentManagedActions(input: DescribeEnvironmentManagedActionsInput) async throws -> DescribeEnvironmentManagedActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEnvironmentManagedActions") @@ -1157,7 +1130,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEnvironmentManagedActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEnvironmentManagedActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEnvironmentManagedActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1178,7 +1151,6 @@ extension ElasticBeanstalkClient { public func describeEnvironmentResources(input: DescribeEnvironmentResourcesInput) async throws -> DescribeEnvironmentResourcesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEnvironmentResources") @@ -1202,7 +1174,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEnvironmentResourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEnvironmentResourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEnvironmentResourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1218,7 +1190,6 @@ extension ElasticBeanstalkClient { public func describeEnvironments(input: DescribeEnvironmentsInput) async throws -> DescribeEnvironmentsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEnvironments") @@ -1242,7 +1213,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEnvironmentsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEnvironmentsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEnvironmentsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1258,7 +1229,6 @@ extension ElasticBeanstalkClient { public func describeEvents(input: DescribeEventsInput) async throws -> DescribeEventsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEvents") @@ -1282,7 +1252,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1304,7 +1274,6 @@ extension ElasticBeanstalkClient { public func describeInstancesHealth(input: DescribeInstancesHealthInput) async throws -> DescribeInstancesHealthOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstancesHealth") @@ -1328,7 +1297,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstancesHealthOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstancesHealthOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstancesHealthOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1350,7 +1319,6 @@ extension ElasticBeanstalkClient { public func describePlatformVersion(input: DescribePlatformVersionInput) async throws -> DescribePlatformVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePlatformVersion") @@ -1374,7 +1342,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePlatformVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePlatformVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePlatformVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1395,7 +1363,6 @@ extension ElasticBeanstalkClient { public func disassociateEnvironmentOperationsRole(input: DisassociateEnvironmentOperationsRoleInput) async throws -> DisassociateEnvironmentOperationsRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateEnvironmentOperationsRole") @@ -1419,7 +1386,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateEnvironmentOperationsRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateEnvironmentOperationsRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateEnvironmentOperationsRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1435,7 +1402,6 @@ extension ElasticBeanstalkClient { public func listAvailableSolutionStacks(input: ListAvailableSolutionStacksInput) async throws -> ListAvailableSolutionStacksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listAvailableSolutionStacks") @@ -1459,7 +1425,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAvailableSolutionStacksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAvailableSolutionStacksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAvailableSolutionStacksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1475,7 +1441,6 @@ extension ElasticBeanstalkClient { public func listPlatformBranches(input: ListPlatformBranchesInput) async throws -> ListPlatformBranchesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listPlatformBranches") @@ -1499,7 +1464,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPlatformBranchesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPlatformBranchesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPlatformBranchesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1521,7 +1486,6 @@ extension ElasticBeanstalkClient { public func listPlatformVersions(input: ListPlatformVersionsInput) async throws -> ListPlatformVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listPlatformVersions") @@ -1545,7 +1509,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPlatformVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPlatformVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPlatformVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1568,7 +1532,6 @@ extension ElasticBeanstalkClient { public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -1592,7 +1555,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1613,7 +1576,6 @@ extension ElasticBeanstalkClient { public func rebuildEnvironment(input: RebuildEnvironmentInput) async throws -> RebuildEnvironmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebuildEnvironment") @@ -1637,7 +1599,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebuildEnvironmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebuildEnvironmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebuildEnvironmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1655,7 +1617,6 @@ extension ElasticBeanstalkClient { public func requestEnvironmentInfo(input: RequestEnvironmentInfoInput) async throws -> RequestEnvironmentInfoOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "requestEnvironmentInfo") @@ -1679,7 +1640,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RequestEnvironmentInfoOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RequestEnvironmentInfoOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RequestEnvironmentInfoOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1695,7 +1656,6 @@ extension ElasticBeanstalkClient { public func restartAppServer(input: RestartAppServerInput) async throws -> RestartAppServerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restartAppServer") @@ -1719,7 +1679,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestartAppServerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestartAppServerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestartAppServerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1737,7 +1697,6 @@ extension ElasticBeanstalkClient { public func retrieveEnvironmentInfo(input: RetrieveEnvironmentInfoInput) async throws -> RetrieveEnvironmentInfoOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "retrieveEnvironmentInfo") @@ -1761,7 +1720,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RetrieveEnvironmentInfoOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RetrieveEnvironmentInfoOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RetrieveEnvironmentInfoOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1777,7 +1736,6 @@ extension ElasticBeanstalkClient { public func swapEnvironmentCNAMEs(input: SwapEnvironmentCNAMEsInput) async throws -> SwapEnvironmentCNAMEsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "swapEnvironmentCNAMEs") @@ -1801,7 +1759,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SwapEnvironmentCNAMEsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SwapEnvironmentCNAMEsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SwapEnvironmentCNAMEsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1822,7 +1780,6 @@ extension ElasticBeanstalkClient { public func terminateEnvironment(input: TerminateEnvironmentInput) async throws -> TerminateEnvironmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "terminateEnvironment") @@ -1846,7 +1803,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TerminateEnvironmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TerminateEnvironmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TerminateEnvironmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1862,7 +1819,6 @@ extension ElasticBeanstalkClient { public func updateApplication(input: UpdateApplicationInput) async throws -> UpdateApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateApplication") @@ -1886,7 +1842,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1907,7 +1863,6 @@ extension ElasticBeanstalkClient { public func updateApplicationResourceLifecycle(input: UpdateApplicationResourceLifecycleInput) async throws -> UpdateApplicationResourceLifecycleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateApplicationResourceLifecycle") @@ -1931,7 +1886,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateApplicationResourceLifecycleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateApplicationResourceLifecycleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateApplicationResourceLifecycleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1947,7 +1902,6 @@ extension ElasticBeanstalkClient { public func updateApplicationVersion(input: UpdateApplicationVersionInput) async throws -> UpdateApplicationVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateApplicationVersion") @@ -1971,7 +1925,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateApplicationVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateApplicationVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateApplicationVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1995,7 +1949,6 @@ extension ElasticBeanstalkClient { public func updateConfigurationTemplate(input: UpdateConfigurationTemplateInput) async throws -> UpdateConfigurationTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateConfigurationTemplate") @@ -2019,7 +1972,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateConfigurationTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateConfigurationTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateConfigurationTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2041,7 +1994,6 @@ extension ElasticBeanstalkClient { public func updateEnvironment(input: UpdateEnvironmentInput) async throws -> UpdateEnvironmentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateEnvironment") @@ -2065,7 +2017,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateEnvironmentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateEnvironmentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateEnvironmentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2090,7 +2042,6 @@ extension ElasticBeanstalkClient { public func updateTagsForResource(input: UpdateTagsForResourceInput) async throws -> UpdateTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateTagsForResource") @@ -2114,7 +2065,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2136,7 +2087,6 @@ extension ElasticBeanstalkClient { public func validateConfigurationSettings(input: ValidateConfigurationSettingsInput) async throws -> ValidateConfigurationSettingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "validateConfigurationSettings") @@ -2160,7 +2110,7 @@ extension ElasticBeanstalkClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ValidateConfigurationSettingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ValidateConfigurationSettingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ValidateConfigurationSettingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSElasticBeanstalk/models/Models.swift b/Sources/Services/AWSElasticBeanstalk/models/Models.swift index b40dfc583ae..6b89904155a 100644 --- a/Sources/Services/AWSElasticBeanstalk/models/Models.swift +++ b/Sources/Services/AWSElasticBeanstalk/models/Models.swift @@ -1,8 +1,15 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension AbortEnvironmentUpdateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -40,28 +47,12 @@ public struct AbortEnvironmentUpdateInput: Swift.Equatable { } } -struct AbortEnvironmentUpdateInputBody: Swift.Equatable { - let environmentId: Swift.String? - let environmentName: Swift.String? -} - -extension AbortEnvironmentUpdateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - } -} +extension AbortEnvironmentUpdateOutput { -extension AbortEnvironmentUpdateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AbortEnvironmentUpdateOutput() + } } } @@ -70,12 +61,19 @@ public struct AbortEnvironmentUpdateOutput: Swift.Equatable { public init() { } } -enum AbortEnvironmentUpdateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AbortEnvironmentUpdateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -188,7 +186,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.ApplicationDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.ApplicationDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationArn = "ApplicationArn" case applicationName = "ApplicationName" @@ -246,58 +244,20 @@ extension ElasticBeanstalkClientTypes.ApplicationDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationArn) - applicationArn = applicationArnDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - if containerValues.contains(.versions) { - struct KeyVal0{struct member{}} - let versionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .versions) - if let versionsWrappedContainer = versionsWrappedContainer { - let versionsContainer = try versionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var versionsBuffer:[Swift.String]? = nil - if let versionsContainer = versionsContainer { - versionsBuffer = [Swift.String]() - for stringContainer0 in versionsContainer { - versionsBuffer?.append(stringContainer0) - } - } - versions = versionsBuffer - } else { - versions = [] - } - } else { - versions = nil - } - if containerValues.contains(.configurationTemplates) { - struct KeyVal0{struct member{}} - let configurationTemplatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .configurationTemplates) - if let configurationTemplatesWrappedContainer = configurationTemplatesWrappedContainer { - let configurationTemplatesContainer = try configurationTemplatesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var configurationTemplatesBuffer:[Swift.String]? = nil - if let configurationTemplatesContainer = configurationTemplatesContainer { - configurationTemplatesBuffer = [Swift.String]() - for stringContainer0 in configurationTemplatesContainer { - configurationTemplatesBuffer?.append(stringContainer0) - } - } - configurationTemplates = configurationTemplatesBuffer - } else { - configurationTemplates = [] - } - } else { - configurationTemplates = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ApplicationDescription() + value.applicationArn = try reader["ApplicationArn"].readIfPresent() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.versions = try reader["Versions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.configurationTemplates = try reader["ConfigurationTemplates"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.resourceLifecycleConfig = try reader["ResourceLifecycleConfig"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig.readingClosure) + return value } - let resourceLifecycleConfigDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig.self, forKey: .resourceLifecycleConfig) - resourceLifecycleConfig = resourceLifecycleConfigDecoded } } @@ -345,7 +305,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.ApplicationMetrics: Swift.Codable { +extension ElasticBeanstalkClientTypes.ApplicationMetrics: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case duration = "Duration" case latency = "Latency" @@ -369,16 +329,16 @@ extension ElasticBeanstalkClientTypes.ApplicationMetrics: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let requestCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .requestCount) ?? 0 - requestCount = requestCountDecoded - let statusCodesDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.StatusCodes.self, forKey: .statusCodes) - statusCodes = statusCodesDecoded - let latencyDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.Latency.self, forKey: .latency) - latency = latencyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ApplicationMetrics() + value.duration = try reader["Duration"].readIfPresent() + value.requestCount = try reader["RequestCount"].readIfPresent() ?? 0 + value.statusCodes = try reader["StatusCodes"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.StatusCodes.readingClosure) + value.latency = try reader["Latency"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.Latency.readingClosure) + return value + } } } @@ -410,7 +370,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig: Swift.Codable { +extension ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case serviceRole = "ServiceRole" case versionLifecycleConfig = "VersionLifecycleConfig" @@ -426,12 +386,14 @@ extension ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceRole) - serviceRole = serviceRoleDecoded - let versionLifecycleConfigDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationVersionLifecycleConfig.self, forKey: .versionLifecycleConfig) - versionLifecycleConfig = versionLifecycleConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig() + value.serviceRole = try reader["ServiceRole"].readIfPresent() + value.versionLifecycleConfig = try reader["VersionLifecycleConfig"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationVersionLifecycleConfig.readingClosure) + return value + } } } @@ -455,7 +417,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.ApplicationVersionDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.ApplicationVersionDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationName = "ApplicationName" case applicationVersionArn = "ApplicationVersionArn" @@ -503,28 +465,22 @@ extension ElasticBeanstalkClientTypes.ApplicationVersionDescription: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationVersionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationVersionArn) - applicationVersionArn = applicationVersionArnDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let sourceBuildInformationDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.SourceBuildInformation.self, forKey: .sourceBuildInformation) - sourceBuildInformation = sourceBuildInformationDecoded - let buildArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .buildArn) - buildArn = buildArnDecoded - let sourceBundleDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.S3Location.self, forKey: .sourceBundle) - sourceBundle = sourceBundleDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationVersionStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ApplicationVersionDescription() + value.applicationVersionArn = try reader["ApplicationVersionArn"].readIfPresent() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.versionLabel = try reader["VersionLabel"].readIfPresent() + value.sourceBuildInformation = try reader["SourceBuildInformation"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.SourceBuildInformation.readingClosure) + value.buildArn = try reader["BuildArn"].readIfPresent() + value.sourceBundle = try reader["SourceBundle"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.S3Location.readingClosure) + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -590,7 +546,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.ApplicationVersionLifecycleConfig: Swift.Codable { +extension ElasticBeanstalkClientTypes.ApplicationVersionLifecycleConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maxAgeRule = "MaxAgeRule" case maxCountRule = "MaxCountRule" @@ -606,12 +562,14 @@ extension ElasticBeanstalkClientTypes.ApplicationVersionLifecycleConfig: Swift.C } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxCountRuleDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.MaxCountRule.self, forKey: .maxCountRule) - maxCountRule = maxCountRuleDecoded - let maxAgeRuleDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.MaxAgeRule.self, forKey: .maxAgeRule) - maxAgeRule = maxAgeRuleDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ApplicationVersionLifecycleConfig() + value.maxCountRule = try reader["MaxCountRule"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.MaxCountRule.readingClosure) + value.maxAgeRule = try reader["MaxAgeRule"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.MaxAgeRule.readingClosure) + return value + } } } @@ -677,6 +635,12 @@ extension ElasticBeanstalkClientTypes { } extension ApplyEnvironmentManagedActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actionId = "ActionId" + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actionId = actionId { @@ -722,44 +686,18 @@ public struct ApplyEnvironmentManagedActionInput: Swift.Equatable { } } -struct ApplyEnvironmentManagedActionInputBody: Swift.Equatable { - let environmentName: Swift.String? - let environmentId: Swift.String? - let actionId: Swift.String? -} - -extension ApplyEnvironmentManagedActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionId = "ActionId" - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let actionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionId) - actionId = actionIdDecoded - } -} +extension ApplyEnvironmentManagedActionOutput { -extension ApplyEnvironmentManagedActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ApplyEnvironmentManagedActionOutputBody = try responseDecoder.decode(responseBody: data) - self.actionDescription = output.actionDescription - self.actionId = output.actionId - self.actionType = output.actionType - self.status = output.status - } else { - self.actionDescription = nil - self.actionId = nil - self.actionType = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ApplyEnvironmentManagedActionResult"] + var value = ApplyEnvironmentManagedActionOutput() + value.actionDescription = try reader["ActionDescription"].readIfPresent() + value.actionId = try reader["ActionId"].readIfPresent() + value.actionType = try reader["ActionType"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -789,47 +727,30 @@ public struct ApplyEnvironmentManagedActionOutput: Swift.Equatable { } } -struct ApplyEnvironmentManagedActionOutputBody: Swift.Equatable { - let actionId: Swift.String? - let actionDescription: Swift.String? - let actionType: ElasticBeanstalkClientTypes.ActionType? - let status: Swift.String? -} - -extension ApplyEnvironmentManagedActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionDescription = "ActionDescription" - case actionId = "ActionId" - case actionType = "ActionType" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ApplyEnvironmentManagedActionResult")) - let actionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionId) - actionId = actionIdDecoded - let actionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionDescription) - actionDescription = actionDescriptionDecoded - let actionTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ActionType.self, forKey: .actionType) - actionType = actionTypeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - } -} +enum ApplyEnvironmentManagedActionOutputError { -enum ApplyEnvironmentManagedActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ManagedActionInvalidStateException": return try await ManagedActionInvalidStateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ManagedActionInvalidStateException": return try await ManagedActionInvalidStateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AssociateEnvironmentOperationsRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentName = "EnvironmentName" + case operationsRole = "OperationsRole" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentName = environmentName { @@ -869,28 +790,12 @@ public struct AssociateEnvironmentOperationsRoleInput: Swift.Equatable { } } -struct AssociateEnvironmentOperationsRoleInputBody: Swift.Equatable { - let environmentName: Swift.String? - let operationsRole: Swift.String? -} - -extension AssociateEnvironmentOperationsRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentName = "EnvironmentName" - case operationsRole = "OperationsRole" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let operationsRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationsRole) - operationsRole = operationsRoleDecoded - } -} +extension AssociateEnvironmentOperationsRoleOutput { -extension AssociateEnvironmentOperationsRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AssociateEnvironmentOperationsRoleOutput() + } } } @@ -899,17 +804,24 @@ public struct AssociateEnvironmentOperationsRoleOutput: Swift.Equatable { public init() { } } -enum AssociateEnvironmentOperationsRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AssociateEnvironmentOperationsRoleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElasticBeanstalkClientTypes.AutoScalingGroup: Swift.Codable { +extension ElasticBeanstalkClientTypes.AutoScalingGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -921,10 +833,13 @@ extension ElasticBeanstalkClientTypes.AutoScalingGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.AutoScalingGroup() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -944,7 +859,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.BuildConfiguration: Swift.Codable { +extension ElasticBeanstalkClientTypes.BuildConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case artifactName = "ArtifactName" case codeBuildServiceRole = "CodeBuildServiceRole" @@ -972,18 +887,17 @@ extension ElasticBeanstalkClientTypes.BuildConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let artifactNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .artifactName) - artifactName = artifactNameDecoded - let codeBuildServiceRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .codeBuildServiceRole) - codeBuildServiceRole = codeBuildServiceRoleDecoded - let computeTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ComputeType.self, forKey: .computeType) - computeType = computeTypeDecoded - let imageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .image) - image = imageDecoded - let timeoutInMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .timeoutInMinutes) - timeoutInMinutes = timeoutInMinutesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.BuildConfiguration() + value.artifactName = try reader["ArtifactName"].readIfPresent() + value.codeBuildServiceRole = try reader["CodeBuildServiceRole"].readIfPresent() + value.computeType = try reader["ComputeType"].readIfPresent() + value.image = try reader["Image"].readIfPresent() + value.timeoutInMinutes = try reader["TimeoutInMinutes"].readIfPresent() + return value + } } } @@ -1027,7 +941,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.Builder: Swift.Codable { +extension ElasticBeanstalkClientTypes.Builder: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "ARN" } @@ -1039,10 +953,13 @@ extension ElasticBeanstalkClientTypes.Builder: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.Builder() + value.arn = try reader["ARN"].readIfPresent() + return value + } } } @@ -1062,7 +979,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.CPUUtilization: Swift.Codable { +extension ElasticBeanstalkClientTypes.CPUUtilization: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ioWait = "IOWait" case irq = "IRQ" @@ -1102,24 +1019,20 @@ extension ElasticBeanstalkClientTypes.CPUUtilization: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .user) - user = userDecoded - let niceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .nice) - nice = niceDecoded - let systemDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .system) - system = systemDecoded - let idleDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .idle) - idle = idleDecoded - let ioWaitDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .ioWait) - ioWait = ioWaitDecoded - let irqDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .irq) - irq = irqDecoded - let softIRQDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .softIRQ) - softIRQ = softIRQDecoded - let privilegedDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .privileged) - privileged = privilegedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.CPUUtilization() + value.user = try reader["User"].readIfPresent() + value.nice = try reader["Nice"].readIfPresent() + value.system = try reader["System"].readIfPresent() + value.idle = try reader["Idle"].readIfPresent() + value.ioWait = try reader["IOWait"].readIfPresent() + value.irq = try reader["IRQ"].readIfPresent() + value.softIRQ = try reader["SoftIRQ"].readIfPresent() + value.privileged = try reader["Privileged"].readIfPresent() + return value + } } } @@ -1168,6 +1081,10 @@ extension ElasticBeanstalkClientTypes { } extension CheckDNSAvailabilityInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cnamePrefix = "CNAMEPrefix" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cnamePrefix = cnamePrefix { @@ -1199,32 +1116,16 @@ public struct CheckDNSAvailabilityInput: Swift.Equatable { } } -struct CheckDNSAvailabilityInputBody: Swift.Equatable { - let cnamePrefix: Swift.String? -} - -extension CheckDNSAvailabilityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cnamePrefix = "CNAMEPrefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cnamePrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cnamePrefix) - cnamePrefix = cnamePrefixDecoded - } -} +extension CheckDNSAvailabilityOutput { -extension CheckDNSAvailabilityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CheckDNSAvailabilityOutputBody = try responseDecoder.decode(responseBody: data) - self.available = output.available - self.fullyQualifiedCNAME = output.fullyQualifiedCNAME - } else { - self.available = nil - self.fullyQualifiedCNAME = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CheckDNSAvailabilityResult"] + var value = CheckDNSAvailabilityOutput() + value.available = try reader["Available"].readIfPresent() + value.fullyQualifiedCNAME = try reader["FullyQualifiedCNAME"].readIfPresent() + return value } } } @@ -1250,47 +1151,31 @@ public struct CheckDNSAvailabilityOutput: Swift.Equatable { } } -struct CheckDNSAvailabilityOutputBody: Swift.Equatable { - let available: Swift.Bool? - let fullyQualifiedCNAME: Swift.String? -} - -extension CheckDNSAvailabilityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case available = "Available" - case fullyQualifiedCNAME = "FullyQualifiedCNAME" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CheckDNSAvailabilityResult")) - let availableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .available) - available = availableDecoded - let fullyQualifiedCNAMEDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fullyQualifiedCNAME) - fullyQualifiedCNAME = fullyQualifiedCNAMEDecoded - } -} +enum CheckDNSAvailabilityOutputError { -enum CheckDNSAvailabilityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CodeBuildNotInServiceRegionException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CodeBuildNotInServiceRegionException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1319,23 +1204,13 @@ public struct CodeBuildNotInServiceRegionException: ClientRuntime.ModeledError, } } -struct CodeBuildNotInServiceRegionExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CodeBuildNotInServiceRegionExceptionBody: Swift.Decodable { +extension ComposeEnvironmentsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case applicationName = "ApplicationName" + case groupName = "GroupName" + case versionLabels = "VersionLabels" } -} -extension ComposeEnvironmentsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -1389,57 +1264,16 @@ public struct ComposeEnvironmentsInput: Swift.Equatable { } } -struct ComposeEnvironmentsInputBody: Swift.Equatable { - let applicationName: Swift.String? - let groupName: Swift.String? - let versionLabels: [Swift.String]? -} - -extension ComposeEnvironmentsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case groupName = "GroupName" - case versionLabels = "VersionLabels" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - if containerValues.contains(.versionLabels) { - struct KeyVal0{struct member{}} - let versionLabelsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .versionLabels) - if let versionLabelsWrappedContainer = versionLabelsWrappedContainer { - let versionLabelsContainer = try versionLabelsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var versionLabelsBuffer:[Swift.String]? = nil - if let versionLabelsContainer = versionLabelsContainer { - versionLabelsBuffer = [Swift.String]() - for stringContainer0 in versionLabelsContainer { - versionLabelsBuffer?.append(stringContainer0) - } - } - versionLabels = versionLabelsBuffer - } else { - versionLabels = [] - } - } else { - versionLabels = nil - } - } -} +extension ComposeEnvironmentsOutput { -extension ComposeEnvironmentsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ComposeEnvironmentsOutputBody = try responseDecoder.decode(responseBody: data) - self.environments = output.environments - self.nextToken = output.nextToken - } else { - self.environments = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ComposeEnvironmentsResult"] + var value = ComposeEnvironmentsOutput() + value.environments = try reader["Environments"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.EnvironmentDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -1461,51 +1295,20 @@ public struct ComposeEnvironmentsOutput: Swift.Equatable { } } -struct ComposeEnvironmentsOutputBody: Swift.Equatable { - let environments: [ElasticBeanstalkClientTypes.EnvironmentDescription]? - let nextToken: Swift.String? -} - -extension ComposeEnvironmentsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environments = "Environments" - case nextToken = "NextToken" - } +enum ComposeEnvironmentsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ComposeEnvironmentsResult")) - if containerValues.contains(.environments) { - struct KeyVal0{struct member{}} - let environmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environments) - if let environmentsWrappedContainer = environmentsWrappedContainer { - let environmentsContainer = try environmentsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EnvironmentDescription].self, forKey: .member) - var environmentsBuffer:[ElasticBeanstalkClientTypes.EnvironmentDescription]? = nil - if let environmentsContainer = environmentsContainer { - environmentsBuffer = [ElasticBeanstalkClientTypes.EnvironmentDescription]() - for structureContainer0 in environmentsContainer { - environmentsBuffer?.append(structureContainer0) - } - } - environments = environmentsBuffer - } else { - environments = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyEnvironmentsException": return try await TooManyEnvironmentsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - environments = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ComposeEnvironmentsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyEnvironmentsException": return try await TooManyEnvironmentsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -1580,7 +1383,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.ConfigurationOptionDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.ConfigurationOptionDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case changeSeverity = "ChangeSeverity" case defaultValue = "DefaultValue" @@ -1641,47 +1444,23 @@ extension ElasticBeanstalkClientTypes.ConfigurationOptionDescription: Swift.Coda } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let changeSeverityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .changeSeverity) - changeSeverity = changeSeverityDecoded - let userDefinedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .userDefined) - userDefined = userDefinedDecoded - let valueTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ConfigurationOptionValueType.self, forKey: .valueType) - valueType = valueTypeDecoded - if containerValues.contains(.valueOptions) { - struct KeyVal0{struct member{}} - let valueOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valueOptions) - if let valueOptionsWrappedContainer = valueOptionsWrappedContainer { - let valueOptionsContainer = try valueOptionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valueOptionsBuffer:[Swift.String]? = nil - if let valueOptionsContainer = valueOptionsContainer { - valueOptionsBuffer = [Swift.String]() - for stringContainer0 in valueOptionsContainer { - valueOptionsBuffer?.append(stringContainer0) - } - } - valueOptions = valueOptionsBuffer - } else { - valueOptions = [] - } - } else { - valueOptions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ConfigurationOptionDescription() + value.namespace = try reader["Namespace"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.changeSeverity = try reader["ChangeSeverity"].readIfPresent() + value.userDefined = try reader["UserDefined"].readIfPresent() + value.valueType = try reader["ValueType"].readIfPresent() + value.valueOptions = try reader["ValueOptions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.minValue = try reader["MinValue"].readIfPresent() + value.maxValue = try reader["MaxValue"].readIfPresent() + value.maxLength = try reader["MaxLength"].readIfPresent() + value.regex = try reader["Regex"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.OptionRestrictionRegex.readingClosure) + return value } - let minValueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minValue) - minValue = minValueDecoded - let maxValueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxValue) - maxValue = maxValueDecoded - let maxLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxLength) - maxLength = maxLengthDecoded - let regexDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.OptionRestrictionRegex.self, forKey: .regex) - regex = regexDecoded } } @@ -1762,7 +1541,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.ConfigurationOptionSetting: Swift.Codable { +extension ElasticBeanstalkClientTypes.ConfigurationOptionSetting: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case namespace = "Namespace" case optionName = "OptionName" @@ -1786,16 +1565,16 @@ extension ElasticBeanstalkClientTypes.ConfigurationOptionSetting: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let optionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionName) - optionName = optionNameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ConfigurationOptionSetting() + value.resourceName = try reader["ResourceName"].readIfPresent() + value.namespace = try reader["Namespace"].readIfPresent() + value.optionName = try reader["OptionName"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -1859,7 +1638,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.ConfigurationSettingsDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.ConfigurationSettingsDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationName = "ApplicationName" case dateCreated = "DateCreated" @@ -1916,44 +1695,21 @@ extension ElasticBeanstalkClientTypes.ConfigurationSettingsDescription: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let deploymentStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ConfigurationDeploymentStatus.self, forKey: .deploymentStatus) - deploymentStatus = deploymentStatusDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ConfigurationSettingsDescription() + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.deploymentStatus = try reader["DeploymentStatus"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.optionSettings = try reader["OptionSettings"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ConfigurationOptionSetting.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2019,6 +1775,13 @@ extension ElasticBeanstalkClientTypes { } extension CreateApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case description = "Description" + case resourceLifecycleConfig = "ResourceLifecycleConfig" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -2080,59 +1843,15 @@ public struct CreateApplicationInput: Swift.Equatable { } } -struct CreateApplicationInputBody: Swift.Equatable { - let applicationName: Swift.String? - let description: Swift.String? - let resourceLifecycleConfig: ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig? - let tags: [ElasticBeanstalkClientTypes.Tag]? -} - -extension CreateApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case description = "Description" - case resourceLifecycleConfig = "ResourceLifecycleConfig" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let resourceLifecycleConfigDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig.self, forKey: .resourceLifecycleConfig) - resourceLifecycleConfig = resourceLifecycleConfigDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticBeanstalkClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticBeanstalkClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateApplicationOutput { -extension CreateApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateApplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.application = output.application - } else { - self.application = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateApplicationResult"] + var value = CreateApplicationOutput() + value.application = try reader["Application"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationDescription.readingClosure) + return value } } } @@ -2150,34 +1869,36 @@ public struct CreateApplicationOutput: Swift.Equatable { } } -struct CreateApplicationOutputBody: Swift.Equatable { - let application: ElasticBeanstalkClientTypes.ApplicationDescription? -} - -extension CreateApplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case application = "Application" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateApplicationResult")) - let applicationDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationDescription.self, forKey: .application) - application = applicationDecoded - } -} +enum CreateApplicationOutputError { -enum CreateApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TooManyApplicationsException": return try await TooManyApplicationsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TooManyApplicationsException": return try await TooManyApplicationsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateApplicationVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case autoCreateApplication = "AutoCreateApplication" + case buildConfiguration = "BuildConfiguration" + case description = "Description" + case process = "Process" + case sourceBuildInformation = "SourceBuildInformation" + case sourceBundle = "SourceBundle" + case tags = "Tags" + case versionLabel = "VersionLabel" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -2275,79 +1996,15 @@ public struct CreateApplicationVersionInput: Swift.Equatable { } } -struct CreateApplicationVersionInputBody: Swift.Equatable { - let applicationName: Swift.String? - let versionLabel: Swift.String? - let description: Swift.String? - let sourceBuildInformation: ElasticBeanstalkClientTypes.SourceBuildInformation? - let sourceBundle: ElasticBeanstalkClientTypes.S3Location? - let buildConfiguration: ElasticBeanstalkClientTypes.BuildConfiguration? - let autoCreateApplication: Swift.Bool? - let process: Swift.Bool? - let tags: [ElasticBeanstalkClientTypes.Tag]? -} - -extension CreateApplicationVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case autoCreateApplication = "AutoCreateApplication" - case buildConfiguration = "BuildConfiguration" - case description = "Description" - case process = "Process" - case sourceBuildInformation = "SourceBuildInformation" - case sourceBundle = "SourceBundle" - case tags = "Tags" - case versionLabel = "VersionLabel" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let sourceBuildInformationDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.SourceBuildInformation.self, forKey: .sourceBuildInformation) - sourceBuildInformation = sourceBuildInformationDecoded - let sourceBundleDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.S3Location.self, forKey: .sourceBundle) - sourceBundle = sourceBundleDecoded - let buildConfigurationDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.BuildConfiguration.self, forKey: .buildConfiguration) - buildConfiguration = buildConfigurationDecoded - let autoCreateApplicationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoCreateApplication) - autoCreateApplication = autoCreateApplicationDecoded - let processDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .process) - process = processDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticBeanstalkClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticBeanstalkClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateApplicationVersionOutput { -extension CreateApplicationVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateApplicationVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.applicationVersion = output.applicationVersion - } else { - self.applicationVersion = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateApplicationVersionResult"] + var value = CreateApplicationVersionOutput() + value.applicationVersion = try reader["ApplicationVersion"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationVersionDescription.readingClosure) + return value } } } @@ -2365,38 +2022,40 @@ public struct CreateApplicationVersionOutput: Swift.Equatable { } } -struct CreateApplicationVersionOutputBody: Swift.Equatable { - let applicationVersion: ElasticBeanstalkClientTypes.ApplicationVersionDescription? -} - -extension CreateApplicationVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationVersion = "ApplicationVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateApplicationVersionResult")) - let applicationVersionDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationVersionDescription.self, forKey: .applicationVersion) - applicationVersion = applicationVersionDecoded - } -} +enum CreateApplicationVersionOutputError { -enum CreateApplicationVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CodeBuildNotInServiceRegionException": return try await CodeBuildNotInServiceRegionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "S3LocationNotInServiceRegionException": return try await S3LocationNotInServiceRegionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyApplicationsException": return try await TooManyApplicationsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyApplicationVersionsException": return try await TooManyApplicationVersionsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CodeBuildNotInServiceRegionException": return try await CodeBuildNotInServiceRegionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "S3LocationNotInServiceRegionException": return try await S3LocationNotInServiceRegionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyApplicationsException": return try await TooManyApplicationsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyApplicationVersionsException": return try await TooManyApplicationVersionsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateConfigurationTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case description = "Description" + case environmentId = "EnvironmentId" + case optionSettings = "OptionSettings" + case platformArn = "PlatformArn" + case solutionStackName = "SolutionStackName" + case sourceConfiguration = "SourceConfiguration" + case tags = "Tags" + case templateName = "TemplateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -2503,114 +2162,24 @@ public struct CreateConfigurationTemplateInput: Swift.Equatable { } } -struct CreateConfigurationTemplateInputBody: Swift.Equatable { - let applicationName: Swift.String? - let templateName: Swift.String? - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let sourceConfiguration: ElasticBeanstalkClientTypes.SourceConfiguration? - let environmentId: Swift.String? - let description: Swift.String? - let optionSettings: [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? - let tags: [ElasticBeanstalkClientTypes.Tag]? -} - -extension CreateConfigurationTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case description = "Description" - case environmentId = "EnvironmentId" - case optionSettings = "OptionSettings" - case platformArn = "PlatformArn" - case solutionStackName = "SolutionStackName" - case sourceConfiguration = "SourceConfiguration" - case tags = "Tags" - case templateName = "TemplateName" - } +extension CreateConfigurationTemplateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let sourceConfigurationDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.SourceConfiguration.self, forKey: .sourceConfiguration) - sourceConfiguration = sourceConfigurationDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticBeanstalkClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticBeanstalkClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateConfigurationTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateConfigurationTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.applicationName = output.applicationName - self.dateCreated = output.dateCreated - self.dateUpdated = output.dateUpdated - self.deploymentStatus = output.deploymentStatus - self.description = output.description - self.environmentName = output.environmentName - self.optionSettings = output.optionSettings - self.platformArn = output.platformArn - self.solutionStackName = output.solutionStackName - self.templateName = output.templateName - } else { - self.applicationName = nil - self.dateCreated = nil - self.dateUpdated = nil - self.deploymentStatus = nil - self.description = nil - self.environmentName = nil - self.optionSettings = nil - self.platformArn = nil - self.solutionStackName = nil - self.templateName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateConfigurationTemplateResult"] + var value = CreateConfigurationTemplateOutput() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.deploymentStatus = try reader["DeploymentStatus"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.optionSettings = try reader["OptionSettings"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ConfigurationOptionSetting.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + return value } } } @@ -2672,89 +2241,43 @@ public struct CreateConfigurationTemplateOutput: Swift.Equatable { } } -struct CreateConfigurationTemplateOutputBody: Swift.Equatable { - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let applicationName: Swift.String? - let templateName: Swift.String? - let description: Swift.String? - let environmentName: Swift.String? - let deploymentStatus: ElasticBeanstalkClientTypes.ConfigurationDeploymentStatus? - let dateCreated: ClientRuntime.Date? - let dateUpdated: ClientRuntime.Date? - let optionSettings: [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? +enum CreateConfigurationTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyBucketsException": return try await TooManyBucketsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyConfigurationTemplatesException": return try await TooManyConfigurationTemplatesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } } -extension CreateConfigurationTemplateOutputBody: Swift.Decodable { +extension CreateEnvironmentInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationName = "ApplicationName" - case dateCreated = "DateCreated" - case dateUpdated = "DateUpdated" - case deploymentStatus = "DeploymentStatus" + case cnamePrefix = "CNAMEPrefix" case description = "Description" case environmentName = "EnvironmentName" + case groupName = "GroupName" + case operationsRole = "OperationsRole" case optionSettings = "OptionSettings" + case optionsToRemove = "OptionsToRemove" case platformArn = "PlatformArn" case solutionStackName = "SolutionStackName" + case tags = "Tags" case templateName = "TemplateName" + case tier = "Tier" + case versionLabel = "VersionLabel" } - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateConfigurationTemplateResult")) - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let deploymentStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ConfigurationDeploymentStatus.self, forKey: .deploymentStatus) - deploymentStatus = deploymentStatusDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - } -} - -enum CreateConfigurationTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyBucketsException": return try await TooManyBucketsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyConfigurationTemplatesException": return try await TooManyConfigurationTemplatesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension CreateEnvironmentInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -2904,175 +2427,37 @@ public struct CreateEnvironmentInput: Swift.Equatable { } } -struct CreateEnvironmentInputBody: Swift.Equatable { - let applicationName: Swift.String? - let environmentName: Swift.String? - let groupName: Swift.String? - let description: Swift.String? - let cnamePrefix: Swift.String? - let tier: ElasticBeanstalkClientTypes.EnvironmentTier? - let tags: [ElasticBeanstalkClientTypes.Tag]? - let versionLabel: Swift.String? - let templateName: Swift.String? - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let optionSettings: [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? - let optionsToRemove: [ElasticBeanstalkClientTypes.OptionSpecification]? - let operationsRole: Swift.String? -} - -extension CreateEnvironmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case cnamePrefix = "CNAMEPrefix" - case description = "Description" - case environmentName = "EnvironmentName" - case groupName = "GroupName" - case operationsRole = "OperationsRole" - case optionSettings = "OptionSettings" - case optionsToRemove = "OptionsToRemove" - case platformArn = "PlatformArn" - case solutionStackName = "SolutionStackName" - case tags = "Tags" - case templateName = "TemplateName" - case tier = "Tier" - case versionLabel = "VersionLabel" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let cnamePrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cnamePrefix) - cnamePrefix = cnamePrefixDecoded - let tierDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentTier.self, forKey: .tier) - tier = tierDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticBeanstalkClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticBeanstalkClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - if containerValues.contains(.optionsToRemove) { - struct KeyVal0{struct member{}} - let optionsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionsToRemove) - if let optionsToRemoveWrappedContainer = optionsToRemoveWrappedContainer { - let optionsToRemoveContainer = try optionsToRemoveWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.OptionSpecification].self, forKey: .member) - var optionsToRemoveBuffer:[ElasticBeanstalkClientTypes.OptionSpecification]? = nil - if let optionsToRemoveContainer = optionsToRemoveContainer { - optionsToRemoveBuffer = [ElasticBeanstalkClientTypes.OptionSpecification]() - for structureContainer0 in optionsToRemoveContainer { - optionsToRemoveBuffer?.append(structureContainer0) - } - } - optionsToRemove = optionsToRemoveBuffer - } else { - optionsToRemove = [] - } - } else { - optionsToRemove = nil - } - let operationsRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationsRole) - operationsRole = operationsRoleDecoded - } -} - -extension CreateEnvironmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateEnvironmentOutputBody = try responseDecoder.decode(responseBody: data) - self.abortableOperationInProgress = output.abortableOperationInProgress - self.applicationName = output.applicationName - self.cname = output.cname - self.dateCreated = output.dateCreated - self.dateUpdated = output.dateUpdated - self.description = output.description - self.endpointURL = output.endpointURL - self.environmentArn = output.environmentArn - self.environmentId = output.environmentId - self.environmentLinks = output.environmentLinks - self.environmentName = output.environmentName - self.health = output.health - self.healthStatus = output.healthStatus - self.operationsRole = output.operationsRole - self.platformArn = output.platformArn - self.resources = output.resources - self.solutionStackName = output.solutionStackName - self.status = output.status - self.templateName = output.templateName - self.tier = output.tier - self.versionLabel = output.versionLabel - } else { - self.abortableOperationInProgress = nil - self.applicationName = nil - self.cname = nil - self.dateCreated = nil - self.dateUpdated = nil - self.description = nil - self.endpointURL = nil - self.environmentArn = nil - self.environmentId = nil - self.environmentLinks = nil - self.environmentName = nil - self.health = nil - self.healthStatus = nil - self.operationsRole = nil - self.platformArn = nil - self.resources = nil - self.solutionStackName = nil - self.status = nil - self.templateName = nil - self.tier = nil - self.versionLabel = nil - } - } +extension CreateEnvironmentOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateEnvironmentResult"] + var value = CreateEnvironmentOutput() + value.abortableOperationInProgress = try reader["AbortableOperationInProgress"].readIfPresent() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.cname = try reader["CNAME"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + value.endpointURL = try reader["EndpointURL"].readIfPresent() + value.environmentArn = try reader["EnvironmentArn"].readIfPresent() + value.environmentId = try reader["EnvironmentId"].readIfPresent() + value.environmentLinks = try reader["EnvironmentLinks"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.EnvironmentLink.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.health = try reader["Health"].readIfPresent() + value.healthStatus = try reader["HealthStatus"].readIfPresent() + value.operationsRole = try reader["OperationsRole"].readIfPresent() + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.resources = try reader["Resources"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentResourcesDescription.readingClosure) + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + value.tier = try reader["Tier"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentTier.readingClosure) + value.versionLabel = try reader["VersionLabel"].readIfPresent() + return value + } + } } /// Describes the properties of an environment. @@ -3189,132 +2574,34 @@ public struct CreateEnvironmentOutput: Swift.Equatable { } } -struct CreateEnvironmentOutputBody: Swift.Equatable { - let environmentName: Swift.String? - let environmentId: Swift.String? - let applicationName: Swift.String? - let versionLabel: Swift.String? - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let templateName: Swift.String? - let description: Swift.String? - let endpointURL: Swift.String? - let cname: Swift.String? - let dateCreated: ClientRuntime.Date? - let dateUpdated: ClientRuntime.Date? - let status: ElasticBeanstalkClientTypes.EnvironmentStatus? - let abortableOperationInProgress: Swift.Bool? - let health: ElasticBeanstalkClientTypes.EnvironmentHealth? - let healthStatus: ElasticBeanstalkClientTypes.EnvironmentHealthStatus? - let resources: ElasticBeanstalkClientTypes.EnvironmentResourcesDescription? - let tier: ElasticBeanstalkClientTypes.EnvironmentTier? - let environmentLinks: [ElasticBeanstalkClientTypes.EnvironmentLink]? - let environmentArn: Swift.String? - let operationsRole: Swift.String? -} - -extension CreateEnvironmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case abortableOperationInProgress = "AbortableOperationInProgress" - case applicationName = "ApplicationName" - case cname = "CNAME" - case dateCreated = "DateCreated" - case dateUpdated = "DateUpdated" - case description = "Description" - case endpointURL = "EndpointURL" - case environmentArn = "EnvironmentArn" - case environmentId = "EnvironmentId" - case environmentLinks = "EnvironmentLinks" - case environmentName = "EnvironmentName" - case health = "Health" - case healthStatus = "HealthStatus" - case operationsRole = "OperationsRole" - case platformArn = "PlatformArn" - case resources = "Resources" - case solutionStackName = "SolutionStackName" - case status = "Status" - case templateName = "TemplateName" - case tier = "Tier" - case versionLabel = "VersionLabel" - } +enum CreateEnvironmentOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateEnvironmentResult")) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let endpointURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointURL) - endpointURL = endpointURLDecoded - let cnameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cname) - cname = cnameDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentStatus.self, forKey: .status) - status = statusDecoded - let abortableOperationInProgressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .abortableOperationInProgress) - abortableOperationInProgress = abortableOperationInProgressDecoded - let healthDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealth.self, forKey: .health) - health = healthDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealthStatus.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let resourcesDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentResourcesDescription.self, forKey: .resources) - resources = resourcesDecoded - let tierDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentTier.self, forKey: .tier) - tier = tierDecoded - if containerValues.contains(.environmentLinks) { - struct KeyVal0{struct member{}} - let environmentLinksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environmentLinks) - if let environmentLinksWrappedContainer = environmentLinksWrappedContainer { - let environmentLinksContainer = try environmentLinksWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EnvironmentLink].self, forKey: .member) - var environmentLinksBuffer:[ElasticBeanstalkClientTypes.EnvironmentLink]? = nil - if let environmentLinksContainer = environmentLinksContainer { - environmentLinksBuffer = [ElasticBeanstalkClientTypes.EnvironmentLink]() - for structureContainer0 in environmentLinksContainer { - environmentLinksBuffer?.append(structureContainer0) - } - } - environmentLinks = environmentLinksBuffer - } else { - environmentLinks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyEnvironmentsException": return try await TooManyEnvironmentsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - environmentLinks = nil } - let environmentArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentArn) - environmentArn = environmentArnDecoded - let operationsRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationsRole) - operationsRole = operationsRoleDecoded } } -enum CreateEnvironmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyEnvironmentsException": return try await TooManyEnvironmentsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreatePlatformVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentName = "EnvironmentName" + case optionSettings = "OptionSettings" + case platformDefinitionBundle = "PlatformDefinitionBundle" + case platformName = "PlatformName" + case platformVersion = "PlatformVersion" + case tags = "Tags" } -} -extension CreatePlatformVersionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentName = environmentName { @@ -3401,86 +2688,16 @@ public struct CreatePlatformVersionInput: Swift.Equatable { } } -struct CreatePlatformVersionInputBody: Swift.Equatable { - let platformName: Swift.String? - let platformVersion: Swift.String? - let platformDefinitionBundle: ElasticBeanstalkClientTypes.S3Location? - let environmentName: Swift.String? - let optionSettings: [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? - let tags: [ElasticBeanstalkClientTypes.Tag]? -} +extension CreatePlatformVersionOutput { -extension CreatePlatformVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentName = "EnvironmentName" - case optionSettings = "OptionSettings" - case platformDefinitionBundle = "PlatformDefinitionBundle" - case platformName = "PlatformName" - case platformVersion = "PlatformVersion" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformName) - platformName = platformNameDecoded - let platformVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformVersion) - platformVersion = platformVersionDecoded - let platformDefinitionBundleDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.S3Location.self, forKey: .platformDefinitionBundle) - platformDefinitionBundle = platformDefinitionBundleDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticBeanstalkClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticBeanstalkClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreatePlatformVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreatePlatformVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.builder = output.builder - self.platformSummary = output.platformSummary - } else { - self.builder = nil - self.platformSummary = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreatePlatformVersionResult"] + var value = CreatePlatformVersionOutput() + value.builder = try reader["Builder"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.Builder.readingClosure) + value.platformSummary = try reader["PlatformSummary"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.PlatformSummary.readingClosure) + return value } } } @@ -3501,40 +2718,27 @@ public struct CreatePlatformVersionOutput: Swift.Equatable { } } -struct CreatePlatformVersionOutputBody: Swift.Equatable { - let platformSummary: ElasticBeanstalkClientTypes.PlatformSummary? - let builder: ElasticBeanstalkClientTypes.Builder? -} - -extension CreatePlatformVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case builder = "Builder" - case platformSummary = "PlatformSummary" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreatePlatformVersionResult")) - let platformSummaryDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.PlatformSummary.self, forKey: .platformSummary) - platformSummary = platformSummaryDecoded - let builderDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.Builder.self, forKey: .builder) - builder = builderDecoded - } -} +enum CreatePlatformVersionOutputError { -enum CreatePlatformVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyPlatformsException": return try await TooManyPlatformsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyPlatformsException": return try await TooManyPlatformsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateStorageLocationInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("CreateStorageLocation", forKey:ClientRuntime.Key("Action")) @@ -3554,14 +2758,15 @@ public struct CreateStorageLocationInput: Swift.Equatable { public init() { } } -extension CreateStorageLocationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateStorageLocationOutputBody = try responseDecoder.decode(responseBody: data) - self.s3Bucket = output.s3Bucket - } else { - self.s3Bucket = nil +extension CreateStorageLocationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateStorageLocationResult"] + var value = CreateStorageLocationOutput() + value.s3Bucket = try reader["S3Bucket"].readIfPresent() + return value } } } @@ -3579,36 +2784,26 @@ public struct CreateStorageLocationOutput: Swift.Equatable { } } -struct CreateStorageLocationOutputBody: Swift.Equatable { - let s3Bucket: Swift.String? -} - -extension CreateStorageLocationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3Bucket = "S3Bucket" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateStorageLocationResult")) - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - } -} +enum CreateStorageLocationOutputError { -enum CreateStorageLocationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "S3SubscriptionRequiredException": return try await S3SubscriptionRequiredException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyBucketsException": return try await TooManyBucketsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "S3SubscriptionRequiredException": return try await S3SubscriptionRequiredException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyBucketsException": return try await TooManyBucketsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElasticBeanstalkClientTypes.CustomAmi: Swift.Codable { +extension ElasticBeanstalkClientTypes.CustomAmi: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case imageId = "ImageId" case virtualizationType = "VirtualizationType" @@ -3624,12 +2819,14 @@ extension ElasticBeanstalkClientTypes.CustomAmi: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let virtualizationTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualizationType) - virtualizationType = virtualizationTypeDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.CustomAmi() + value.virtualizationType = try reader["VirtualizationType"].readIfPresent() + value.imageId = try reader["ImageId"].readIfPresent() + return value + } } } @@ -3654,6 +2851,11 @@ extension ElasticBeanstalkClientTypes { } extension DeleteApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case terminateEnvByForce = "TerminateEnvByForce" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -3692,28 +2894,12 @@ public struct DeleteApplicationInput: Swift.Equatable { } } -struct DeleteApplicationInputBody: Swift.Equatable { - let applicationName: Swift.String? - let terminateEnvByForce: Swift.Bool? -} - -extension DeleteApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case terminateEnvByForce = "TerminateEnvByForce" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let terminateEnvByForceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .terminateEnvByForce) - terminateEnvByForce = terminateEnvByForceDecoded - } -} +extension DeleteApplicationOutput { -extension DeleteApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteApplicationOutput() + } } } @@ -3722,17 +2908,30 @@ public struct DeleteApplicationOutput: Swift.Equatable { public init() { } } -enum DeleteApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OperationInProgressFailure": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteApplicationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OperationInProgressFailure": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteApplicationVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case deleteSourceBundle = "DeleteSourceBundle" + case versionLabel = "VersionLabel" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -3779,32 +2978,12 @@ public struct DeleteApplicationVersionInput: Swift.Equatable { } } -struct DeleteApplicationVersionInputBody: Swift.Equatable { - let applicationName: Swift.String? - let versionLabel: Swift.String? - let deleteSourceBundle: Swift.Bool? -} - -extension DeleteApplicationVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case deleteSourceBundle = "DeleteSourceBundle" - case versionLabel = "VersionLabel" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let deleteSourceBundleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteSourceBundle) - deleteSourceBundle = deleteSourceBundleDecoded - } -} +extension DeleteApplicationVersionOutput { -extension DeleteApplicationVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteApplicationVersionOutput() + } } } @@ -3813,20 +2992,32 @@ public struct DeleteApplicationVersionOutput: Swift.Equatable { public init() { } } -enum DeleteApplicationVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressFailure": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "S3LocationNotInServiceRegionException": return try await S3LocationNotInServiceRegionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SourceBundleDeletionFailure": return try await SourceBundleDeletionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteApplicationVersionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressFailure": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "S3LocationNotInServiceRegionException": return try await S3LocationNotInServiceRegionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SourceBundleDeletionFailure": return try await SourceBundleDeletionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteConfigurationTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case templateName = "TemplateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -3866,28 +3057,12 @@ public struct DeleteConfigurationTemplateInput: Swift.Equatable { } } -struct DeleteConfigurationTemplateInputBody: Swift.Equatable { - let applicationName: Swift.String? - let templateName: Swift.String? -} - -extension DeleteConfigurationTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case templateName = "TemplateName" - } +extension DeleteConfigurationTemplateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - } -} - -extension DeleteConfigurationTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteConfigurationTemplateOutput() + } } } @@ -3896,17 +3071,29 @@ public struct DeleteConfigurationTemplateOutput: Swift.Equatable { public init() { } } -enum DeleteConfigurationTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OperationInProgressFailure": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteConfigurationTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OperationInProgressFailure": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteEnvironmentConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case environmentName = "EnvironmentName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -3946,28 +3133,12 @@ public struct DeleteEnvironmentConfigurationInput: Swift.Equatable { } } -struct DeleteEnvironmentConfigurationInputBody: Swift.Equatable { - let applicationName: Swift.String? - let environmentName: Swift.String? -} - -extension DeleteEnvironmentConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case environmentName = "EnvironmentName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - } -} +extension DeleteEnvironmentConfigurationOutput { -extension DeleteEnvironmentConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteEnvironmentConfigurationOutput() + } } } @@ -3976,16 +3147,27 @@ public struct DeleteEnvironmentConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteEnvironmentConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteEnvironmentConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeletePlatformVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case platformArn = "PlatformArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let platformArn = platformArn { @@ -4015,30 +3197,15 @@ public struct DeletePlatformVersionInput: Swift.Equatable { } } -struct DeletePlatformVersionInputBody: Swift.Equatable { - let platformArn: Swift.String? -} - -extension DeletePlatformVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case platformArn = "PlatformArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - } -} +extension DeletePlatformVersionOutput { -extension DeletePlatformVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeletePlatformVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.platformSummary = output.platformSummary - } else { - self.platformSummary = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeletePlatformVersionResult"] + var value = DeletePlatformVersionOutput() + value.platformSummary = try reader["PlatformSummary"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.PlatformSummary.readingClosure) + return value } } } @@ -4055,37 +3222,27 @@ public struct DeletePlatformVersionOutput: Swift.Equatable { } } -struct DeletePlatformVersionOutputBody: Swift.Equatable { - let platformSummary: ElasticBeanstalkClientTypes.PlatformSummary? -} +enum DeletePlatformVersionOutputError { -extension DeletePlatformVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case platformSummary = "PlatformSummary" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeletePlatformVersionResult")) - let platformSummaryDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.PlatformSummary.self, forKey: .platformSummary) - platformSummary = platformSummaryDecoded - } -} - -enum DeletePlatformVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressFailure": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PlatformVersionStillReferencedException": return try await PlatformVersionStillReferencedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressFailure": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PlatformVersionStillReferencedException": return try await PlatformVersionStillReferencedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElasticBeanstalkClientTypes.Deployment: Swift.Codable { +extension ElasticBeanstalkClientTypes.Deployment: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deploymentId = "DeploymentId" case deploymentTime = "DeploymentTime" @@ -4109,16 +3266,16 @@ extension ElasticBeanstalkClientTypes.Deployment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let deploymentIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deploymentId) - deploymentId = deploymentIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let deploymentTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deploymentTime) - deploymentTime = deploymentTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.Deployment() + value.versionLabel = try reader["VersionLabel"].readIfPresent() + value.deploymentId = try reader["DeploymentId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.deploymentTime = try reader["DeploymentTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -4157,6 +3314,7 @@ extension ElasticBeanstalkClientTypes { } extension DescribeAccountAttributesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeAccountAttributes", forKey:ClientRuntime.Key("Action")) @@ -4176,14 +3334,15 @@ public struct DescribeAccountAttributesInput: Swift.Equatable { public init() { } } -extension DescribeAccountAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAccountAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.resourceQuotas = output.resourceQuotas - } else { - self.resourceQuotas = nil +extension DescribeAccountAttributesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAccountAttributesResult"] + var value = DescribeAccountAttributesOutput() + value.resourceQuotas = try reader["ResourceQuotas"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ResourceQuotas.readingClosure) + return value } } } @@ -4200,34 +3359,31 @@ public struct DescribeAccountAttributesOutput: Swift.Equatable { } } -struct DescribeAccountAttributesOutputBody: Swift.Equatable { - let resourceQuotas: ElasticBeanstalkClientTypes.ResourceQuotas? -} - -extension DescribeAccountAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceQuotas = "ResourceQuotas" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAccountAttributesResult")) - let resourceQuotasDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ResourceQuotas.self, forKey: .resourceQuotas) - resourceQuotas = resourceQuotasDecoded - } -} +enum DescribeAccountAttributesOutputError { -enum DescribeAccountAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeApplicationVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" + case versionLabels = "VersionLabels" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -4288,61 +3444,16 @@ public struct DescribeApplicationVersionsInput: Swift.Equatable { } } -struct DescribeApplicationVersionsInputBody: Swift.Equatable { - let applicationName: Swift.String? - let versionLabels: [Swift.String]? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeApplicationVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - case versionLabels = "VersionLabels" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - if containerValues.contains(.versionLabels) { - struct KeyVal0{struct member{}} - let versionLabelsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .versionLabels) - if let versionLabelsWrappedContainer = versionLabelsWrappedContainer { - let versionLabelsContainer = try versionLabelsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var versionLabelsBuffer:[Swift.String]? = nil - if let versionLabelsContainer = versionLabelsContainer { - versionLabelsBuffer = [Swift.String]() - for stringContainer0 in versionLabelsContainer { - versionLabelsBuffer?.append(stringContainer0) - } - } - versionLabels = versionLabelsBuffer - } else { - versionLabels = [] - } - } else { - versionLabels = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeApplicationVersionsOutput { -extension DescribeApplicationVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeApplicationVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.applicationVersions = output.applicationVersions - self.nextToken = output.nextToken - } else { - self.applicationVersions = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeApplicationVersionsResult"] + var value = DescribeApplicationVersionsOutput() + value.applicationVersions = try reader["ApplicationVersions"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ApplicationVersionDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -4364,54 +3475,27 @@ public struct DescribeApplicationVersionsOutput: Swift.Equatable { } } -struct DescribeApplicationVersionsOutputBody: Swift.Equatable { - let applicationVersions: [ElasticBeanstalkClientTypes.ApplicationVersionDescription]? - let nextToken: Swift.String? -} - -extension DescribeApplicationVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationVersions = "ApplicationVersions" - case nextToken = "NextToken" - } +enum DescribeApplicationVersionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeApplicationVersionsResult")) - if containerValues.contains(.applicationVersions) { - struct KeyVal0{struct member{}} - let applicationVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .applicationVersions) - if let applicationVersionsWrappedContainer = applicationVersionsWrappedContainer { - let applicationVersionsContainer = try applicationVersionsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ApplicationVersionDescription].self, forKey: .member) - var applicationVersionsBuffer:[ElasticBeanstalkClientTypes.ApplicationVersionDescription]? = nil - if let applicationVersionsContainer = applicationVersionsContainer { - applicationVersionsBuffer = [ElasticBeanstalkClientTypes.ApplicationVersionDescription]() - for structureContainer0 in applicationVersionsContainer { - applicationVersionsBuffer?.append(structureContainer0) - } - } - applicationVersions = applicationVersionsBuffer - } else { - applicationVersions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - applicationVersions = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeApplicationVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeApplicationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationNames = "ApplicationNames" } -} -extension DescribeApplicationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationNames = applicationNames { @@ -4451,47 +3535,15 @@ public struct DescribeApplicationsInput: Swift.Equatable { } } -struct DescribeApplicationsInputBody: Swift.Equatable { - let applicationNames: [Swift.String]? -} - -extension DescribeApplicationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationNames = "ApplicationNames" - } +extension DescribeApplicationsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.applicationNames) { - struct KeyVal0{struct member{}} - let applicationNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .applicationNames) - if let applicationNamesWrappedContainer = applicationNamesWrappedContainer { - let applicationNamesContainer = try applicationNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var applicationNamesBuffer:[Swift.String]? = nil - if let applicationNamesContainer = applicationNamesContainer { - applicationNamesBuffer = [Swift.String]() - for stringContainer0 in applicationNamesContainer { - applicationNamesBuffer?.append(stringContainer0) - } - } - applicationNames = applicationNamesBuffer - } else { - applicationNames = [] - } - } else { - applicationNames = nil - } - } -} - -extension DescribeApplicationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeApplicationsOutputBody = try responseDecoder.decode(responseBody: data) - self.applications = output.applications - } else { - self.applications = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeApplicationsResult"] + var value = DescribeApplicationsOutput() + value.applications = try reader["Applications"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ApplicationDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4509,50 +3561,32 @@ public struct DescribeApplicationsOutput: Swift.Equatable { } } -struct DescribeApplicationsOutputBody: Swift.Equatable { - let applications: [ElasticBeanstalkClientTypes.ApplicationDescription]? -} +enum DescribeApplicationsOutputError { -extension DescribeApplicationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applications = "Applications" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeApplicationsResult")) - if containerValues.contains(.applications) { - struct KeyVal0{struct member{}} - let applicationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .applications) - if let applicationsWrappedContainer = applicationsWrappedContainer { - let applicationsContainer = try applicationsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ApplicationDescription].self, forKey: .member) - var applicationsBuffer:[ElasticBeanstalkClientTypes.ApplicationDescription]? = nil - if let applicationsContainer = applicationsContainer { - applicationsBuffer = [ElasticBeanstalkClientTypes.ApplicationDescription]() - for structureContainer0 in applicationsContainer { - applicationsBuffer?.append(structureContainer0) - } - } - applications = applicationsBuffer - } else { - applications = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - applications = nil } } } -enum DescribeApplicationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeConfigurationOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case environmentName = "EnvironmentName" + case options = "Options" + case platformArn = "PlatformArn" + case solutionStackName = "SolutionStackName" + case templateName = "TemplateName" } -} -extension DescribeConfigurationOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -4627,71 +3661,17 @@ public struct DescribeConfigurationOptionsInput: Swift.Equatable { } } -struct DescribeConfigurationOptionsInputBody: Swift.Equatable { - let applicationName: Swift.String? - let templateName: Swift.String? - let environmentName: Swift.String? - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let options: [ElasticBeanstalkClientTypes.OptionSpecification]? -} +extension DescribeConfigurationOptionsOutput { -extension DescribeConfigurationOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case environmentName = "EnvironmentName" - case options = "Options" - case platformArn = "PlatformArn" - case solutionStackName = "SolutionStackName" - case templateName = "TemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - if containerValues.contains(.options) { - struct KeyVal0{struct member{}} - let optionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .options) - if let optionsWrappedContainer = optionsWrappedContainer { - let optionsContainer = try optionsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.OptionSpecification].self, forKey: .member) - var optionsBuffer:[ElasticBeanstalkClientTypes.OptionSpecification]? = nil - if let optionsContainer = optionsContainer { - optionsBuffer = [ElasticBeanstalkClientTypes.OptionSpecification]() - for structureContainer0 in optionsContainer { - optionsBuffer?.append(structureContainer0) - } - } - options = optionsBuffer - } else { - options = [] - } - } else { - options = nil - } - } -} - -extension DescribeConfigurationOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeConfigurationOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.options = output.options - self.platformArn = output.platformArn - self.solutionStackName = output.solutionStackName - } else { - self.options = nil - self.platformArn = nil - self.solutionStackName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeConfigurationOptionsResult"] + var value = DescribeConfigurationOptionsOutput() + value.options = try reader["Options"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ConfigurationOptionDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + return value } } } @@ -4717,59 +3697,30 @@ public struct DescribeConfigurationOptionsOutput: Swift.Equatable { } } -struct DescribeConfigurationOptionsOutputBody: Swift.Equatable { - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let options: [ElasticBeanstalkClientTypes.ConfigurationOptionDescription]? -} - -extension DescribeConfigurationOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case options = "Options" - case platformArn = "PlatformArn" - case solutionStackName = "SolutionStackName" - } +enum DescribeConfigurationOptionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeConfigurationOptionsResult")) - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - if containerValues.contains(.options) { - struct KeyVal0{struct member{}} - let optionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .options) - if let optionsWrappedContainer = optionsWrappedContainer { - let optionsContainer = try optionsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionDescription].self, forKey: .member) - var optionsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionDescription]? = nil - if let optionsContainer = optionsContainer { - optionsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionDescription]() - for structureContainer0 in optionsContainer { - optionsBuffer?.append(structureContainer0) - } - } - options = optionsBuffer - } else { - options = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TooManyBucketsException": return try await TooManyBucketsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - options = nil } } } -enum DescribeConfigurationOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TooManyBucketsException": return try await TooManyBucketsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeConfigurationSettingsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case environmentName = "EnvironmentName" + case templateName = "TemplateName" } -} -extension DescribeConfigurationSettingsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -4815,38 +3766,15 @@ public struct DescribeConfigurationSettingsInput: Swift.Equatable { } } -struct DescribeConfigurationSettingsInputBody: Swift.Equatable { - let applicationName: Swift.String? - let templateName: Swift.String? - let environmentName: Swift.String? -} +extension DescribeConfigurationSettingsOutput { -extension DescribeConfigurationSettingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case environmentName = "EnvironmentName" - case templateName = "TemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - } -} - -extension DescribeConfigurationSettingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeConfigurationSettingsOutputBody = try responseDecoder.decode(responseBody: data) - self.configurationSettings = output.configurationSettings - } else { - self.configurationSettings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeConfigurationSettingsResult"] + var value = DescribeConfigurationSettingsOutput() + value.configurationSettings = try reader["ConfigurationSettings"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ConfigurationSettingsDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4864,51 +3792,30 @@ public struct DescribeConfigurationSettingsOutput: Swift.Equatable { } } -struct DescribeConfigurationSettingsOutputBody: Swift.Equatable { - let configurationSettings: [ElasticBeanstalkClientTypes.ConfigurationSettingsDescription]? -} +enum DescribeConfigurationSettingsOutputError { -extension DescribeConfigurationSettingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSettings = "ConfigurationSettings" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeConfigurationSettingsResult")) - if containerValues.contains(.configurationSettings) { - struct KeyVal0{struct member{}} - let configurationSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .configurationSettings) - if let configurationSettingsWrappedContainer = configurationSettingsWrappedContainer { - let configurationSettingsContainer = try configurationSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationSettingsDescription].self, forKey: .member) - var configurationSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationSettingsDescription]? = nil - if let configurationSettingsContainer = configurationSettingsContainer { - configurationSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationSettingsDescription]() - for structureContainer0 in configurationSettingsContainer { - configurationSettingsBuffer?.append(structureContainer0) - } - } - configurationSettings = configurationSettingsBuffer - } else { - configurationSettings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TooManyBucketsException": return try await TooManyBucketsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - configurationSettings = nil } } } -enum DescribeConfigurationSettingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TooManyBucketsException": return try await TooManyBucketsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEnvironmentHealthInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeNames = "AttributeNames" + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" } -} -extension DescribeEnvironmentHealthInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeNames = attributeNames { @@ -4962,69 +3869,22 @@ public struct DescribeEnvironmentHealthInput: Swift.Equatable { } } -struct DescribeEnvironmentHealthInputBody: Swift.Equatable { - let environmentName: Swift.String? - let environmentId: Swift.String? - let attributeNames: [ElasticBeanstalkClientTypes.EnvironmentHealthAttribute]? -} +extension DescribeEnvironmentHealthOutput { -extension DescribeEnvironmentHealthInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeNames = "AttributeNames" - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - if containerValues.contains(.attributeNames) { - struct KeyVal0{struct member{}} - let attributeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeNames) - if let attributeNamesWrappedContainer = attributeNamesWrappedContainer { - let attributeNamesContainer = try attributeNamesWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EnvironmentHealthAttribute].self, forKey: .member) - var attributeNamesBuffer:[ElasticBeanstalkClientTypes.EnvironmentHealthAttribute]? = nil - if let attributeNamesContainer = attributeNamesContainer { - attributeNamesBuffer = [ElasticBeanstalkClientTypes.EnvironmentHealthAttribute]() - for enumContainer0 in attributeNamesContainer { - attributeNamesBuffer?.append(enumContainer0) - } - } - attributeNames = attributeNamesBuffer - } else { - attributeNames = [] - } - } else { - attributeNames = nil - } - } -} - -extension DescribeEnvironmentHealthOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEnvironmentHealthOutputBody = try responseDecoder.decode(responseBody: data) - self.applicationMetrics = output.applicationMetrics - self.causes = output.causes - self.color = output.color - self.environmentName = output.environmentName - self.healthStatus = output.healthStatus - self.instancesHealth = output.instancesHealth - self.refreshedAt = output.refreshedAt - self.status = output.status - } else { - self.applicationMetrics = nil - self.causes = nil - self.color = nil - self.environmentName = nil - self.healthStatus = nil - self.instancesHealth = nil - self.refreshedAt = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEnvironmentHealthResult"] + var value = DescribeEnvironmentHealthOutput() + value.applicationMetrics = try reader["ApplicationMetrics"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationMetrics.readingClosure) + value.causes = try reader["Causes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.color = try reader["Color"].readIfPresent() + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.healthStatus = try reader["HealthStatus"].readIfPresent() + value.instancesHealth = try reader["InstancesHealth"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.InstanceHealthSummary.readingClosure) + value.refreshedAt = try reader["RefreshedAt"].readTimestampIfPresent(format: .dateTime) + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -5070,80 +3930,32 @@ public struct DescribeEnvironmentHealthOutput: Swift.Equatable { } } -struct DescribeEnvironmentHealthOutputBody: Swift.Equatable { - let environmentName: Swift.String? - let healthStatus: Swift.String? - let status: ElasticBeanstalkClientTypes.EnvironmentHealth? - let color: Swift.String? - let causes: [Swift.String]? - let applicationMetrics: ElasticBeanstalkClientTypes.ApplicationMetrics? - let instancesHealth: ElasticBeanstalkClientTypes.InstanceHealthSummary? - let refreshedAt: ClientRuntime.Date? -} - -extension DescribeEnvironmentHealthOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationMetrics = "ApplicationMetrics" - case causes = "Causes" - case color = "Color" - case environmentName = "EnvironmentName" - case healthStatus = "HealthStatus" - case instancesHealth = "InstancesHealth" - case refreshedAt = "RefreshedAt" - case status = "Status" - } +enum DescribeEnvironmentHealthOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEnvironmentHealthResult")) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealth.self, forKey: .status) - status = statusDecoded - let colorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .color) - color = colorDecoded - if containerValues.contains(.causes) { - struct KeyVal0{struct member{}} - let causesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .causes) - if let causesWrappedContainer = causesWrappedContainer { - let causesContainer = try causesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var causesBuffer:[Swift.String]? = nil - if let causesContainer = causesContainer { - causesBuffer = [Swift.String]() - for stringContainer0 in causesContainer { - causesBuffer?.append(stringContainer0) - } - } - causes = causesBuffer - } else { - causes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - causes = nil } - let applicationMetricsDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationMetrics.self, forKey: .applicationMetrics) - applicationMetrics = applicationMetricsDecoded - let instancesHealthDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.InstanceHealthSummary.self, forKey: .instancesHealth) - instancesHealth = instancesHealthDecoded - let refreshedAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .refreshedAt) - refreshedAt = refreshedAtDecoded } } -enum DescribeEnvironmentHealthOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEnvironmentManagedActionHistoryInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + case maxItems = "MaxItems" + case nextToken = "NextToken" } -} -extension DescribeEnvironmentManagedActionHistoryInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -5195,44 +4007,16 @@ public struct DescribeEnvironmentManagedActionHistoryInput: Swift.Equatable { } } -struct DescribeEnvironmentManagedActionHistoryInputBody: Swift.Equatable { - let environmentId: Swift.String? - let environmentName: Swift.String? - let nextToken: Swift.String? - let maxItems: Swift.Int? -} +extension DescribeEnvironmentManagedActionHistoryOutput { -extension DescribeEnvironmentManagedActionHistoryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - case maxItems = "MaxItems" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} - -extension DescribeEnvironmentManagedActionHistoryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEnvironmentManagedActionHistoryOutputBody = try responseDecoder.decode(responseBody: data) - self.managedActionHistoryItems = output.managedActionHistoryItems - self.nextToken = output.nextToken - } else { - self.managedActionHistoryItems = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEnvironmentManagedActionHistoryResult"] + var value = DescribeEnvironmentManagedActionHistoryOutput() + value.managedActionHistoryItems = try reader["ManagedActionHistoryItems"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ManagedActionHistoryItem.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -5254,55 +4038,30 @@ public struct DescribeEnvironmentManagedActionHistoryOutput: Swift.Equatable { } } -struct DescribeEnvironmentManagedActionHistoryOutputBody: Swift.Equatable { - let managedActionHistoryItems: [ElasticBeanstalkClientTypes.ManagedActionHistoryItem]? - let nextToken: Swift.String? -} - -extension DescribeEnvironmentManagedActionHistoryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case managedActionHistoryItems = "ManagedActionHistoryItems" - case nextToken = "NextToken" - } +enum DescribeEnvironmentManagedActionHistoryOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEnvironmentManagedActionHistoryResult")) - if containerValues.contains(.managedActionHistoryItems) { - struct KeyVal0{struct member{}} - let managedActionHistoryItemsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .managedActionHistoryItems) - if let managedActionHistoryItemsWrappedContainer = managedActionHistoryItemsWrappedContainer { - let managedActionHistoryItemsContainer = try managedActionHistoryItemsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ManagedActionHistoryItem].self, forKey: .member) - var managedActionHistoryItemsBuffer:[ElasticBeanstalkClientTypes.ManagedActionHistoryItem]? = nil - if let managedActionHistoryItemsContainer = managedActionHistoryItemsContainer { - managedActionHistoryItemsBuffer = [ElasticBeanstalkClientTypes.ManagedActionHistoryItem]() - for structureContainer0 in managedActionHistoryItemsContainer { - managedActionHistoryItemsBuffer?.append(structureContainer0) - } - } - managedActionHistoryItems = managedActionHistoryItemsBuffer - } else { - managedActionHistoryItems = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - managedActionHistoryItems = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeEnvironmentManagedActionHistoryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEnvironmentManagedActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + case status = "Status" } -} -extension DescribeEnvironmentManagedActionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -5347,38 +4106,15 @@ public struct DescribeEnvironmentManagedActionsInput: Swift.Equatable { } } -struct DescribeEnvironmentManagedActionsInputBody: Swift.Equatable { - let environmentName: Swift.String? - let environmentId: Swift.String? - let status: ElasticBeanstalkClientTypes.ActionStatus? -} +extension DescribeEnvironmentManagedActionsOutput { -extension DescribeEnvironmentManagedActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ActionStatus.self, forKey: .status) - status = statusDecoded - } -} - -extension DescribeEnvironmentManagedActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEnvironmentManagedActionsOutputBody = try responseDecoder.decode(responseBody: data) - self.managedActions = output.managedActions - } else { - self.managedActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEnvironmentManagedActionsResult"] + var value = DescribeEnvironmentManagedActionsOutput() + value.managedActions = try reader["ManagedActions"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ManagedAction.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5396,51 +4132,29 @@ public struct DescribeEnvironmentManagedActionsOutput: Swift.Equatable { } } -struct DescribeEnvironmentManagedActionsOutputBody: Swift.Equatable { - let managedActions: [ElasticBeanstalkClientTypes.ManagedAction]? -} +enum DescribeEnvironmentManagedActionsOutputError { -extension DescribeEnvironmentManagedActionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case managedActions = "ManagedActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEnvironmentManagedActionsResult")) - if containerValues.contains(.managedActions) { - struct KeyVal0{struct member{}} - let managedActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .managedActions) - if let managedActionsWrappedContainer = managedActionsWrappedContainer { - let managedActionsContainer = try managedActionsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ManagedAction].self, forKey: .member) - var managedActionsBuffer:[ElasticBeanstalkClientTypes.ManagedAction]? = nil - if let managedActionsContainer = managedActionsContainer { - managedActionsBuffer = [ElasticBeanstalkClientTypes.ManagedAction]() - for structureContainer0 in managedActionsContainer { - managedActionsBuffer?.append(structureContainer0) - } - } - managedActions = managedActionsBuffer - } else { - managedActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - managedActions = nil } } } -enum DescribeEnvironmentManagedActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEnvironmentResourcesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" } -} -extension DescribeEnvironmentResourcesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -5478,34 +4192,15 @@ public struct DescribeEnvironmentResourcesInput: Swift.Equatable { } } -struct DescribeEnvironmentResourcesInputBody: Swift.Equatable { - let environmentId: Swift.String? - let environmentName: Swift.String? -} - -extension DescribeEnvironmentResourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - } -} +extension DescribeEnvironmentResourcesOutput { -extension DescribeEnvironmentResourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEnvironmentResourcesOutputBody = try responseDecoder.decode(responseBody: data) - self.environmentResources = output.environmentResources - } else { - self.environmentResources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEnvironmentResourcesResult"] + var value = DescribeEnvironmentResourcesOutput() + value.environmentResources = try reader["EnvironmentResources"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentResourceDescription.readingClosure) + return value } } } @@ -5523,34 +4218,35 @@ public struct DescribeEnvironmentResourcesOutput: Swift.Equatable { } } -struct DescribeEnvironmentResourcesOutputBody: Swift.Equatable { - let environmentResources: ElasticBeanstalkClientTypes.EnvironmentResourceDescription? -} - -extension DescribeEnvironmentResourcesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentResources = "EnvironmentResources" - } +enum DescribeEnvironmentResourcesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEnvironmentResourcesResult")) - let environmentResourcesDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentResourceDescription.self, forKey: .environmentResources) - environmentResources = environmentResourcesDecoded - } -} - -enum DescribeEnvironmentResourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeEnvironmentsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case environmentIds = "EnvironmentIds" + case environmentNames = "EnvironmentNames" + case includeDeleted = "IncludeDeleted" + case includedDeletedBackTo = "IncludedDeletedBackTo" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" + case versionLabel = "VersionLabel" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -5648,94 +4344,16 @@ public struct DescribeEnvironmentsInput: Swift.Equatable { } } -struct DescribeEnvironmentsInputBody: Swift.Equatable { - let applicationName: Swift.String? - let versionLabel: Swift.String? - let environmentIds: [Swift.String]? - let environmentNames: [Swift.String]? - let includeDeleted: Swift.Bool? - let includedDeletedBackTo: ClientRuntime.Date? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeEnvironmentsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case environmentIds = "EnvironmentIds" - case environmentNames = "EnvironmentNames" - case includeDeleted = "IncludeDeleted" - case includedDeletedBackTo = "IncludedDeletedBackTo" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - case versionLabel = "VersionLabel" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - if containerValues.contains(.environmentIds) { - struct KeyVal0{struct member{}} - let environmentIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environmentIds) - if let environmentIdsWrappedContainer = environmentIdsWrappedContainer { - let environmentIdsContainer = try environmentIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var environmentIdsBuffer:[Swift.String]? = nil - if let environmentIdsContainer = environmentIdsContainer { - environmentIdsBuffer = [Swift.String]() - for stringContainer0 in environmentIdsContainer { - environmentIdsBuffer?.append(stringContainer0) - } - } - environmentIds = environmentIdsBuffer - } else { - environmentIds = [] - } - } else { - environmentIds = nil - } - if containerValues.contains(.environmentNames) { - struct KeyVal0{struct member{}} - let environmentNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environmentNames) - if let environmentNamesWrappedContainer = environmentNamesWrappedContainer { - let environmentNamesContainer = try environmentNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var environmentNamesBuffer:[Swift.String]? = nil - if let environmentNamesContainer = environmentNamesContainer { - environmentNamesBuffer = [Swift.String]() - for stringContainer0 in environmentNamesContainer { - environmentNamesBuffer?.append(stringContainer0) - } - } - environmentNames = environmentNamesBuffer - } else { - environmentNames = [] - } - } else { - environmentNames = nil - } - let includeDeletedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeDeleted) - includeDeleted = includeDeletedDecoded - let includedDeletedBackToDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .includedDeletedBackTo) - includedDeletedBackTo = includedDeletedBackToDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension DescribeEnvironmentsOutput { -extension DescribeEnvironmentsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEnvironmentsOutputBody = try responseDecoder.decode(responseBody: data) - self.environments = output.environments - self.nextToken = output.nextToken - } else { - self.environments = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEnvironmentsResult"] + var value = DescribeEnvironmentsOutput() + value.environments = try reader["Environments"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.EnvironmentDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -5757,54 +4375,38 @@ public struct DescribeEnvironmentsOutput: Swift.Equatable { } } -struct DescribeEnvironmentsOutputBody: Swift.Equatable { - let environments: [ElasticBeanstalkClientTypes.EnvironmentDescription]? - let nextToken: Swift.String? -} - -extension DescribeEnvironmentsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environments = "Environments" - case nextToken = "NextToken" - } +enum DescribeEnvironmentsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEnvironmentsResult")) - if containerValues.contains(.environments) { - struct KeyVal0{struct member{}} - let environmentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environments) - if let environmentsWrappedContainer = environmentsWrappedContainer { - let environmentsContainer = try environmentsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EnvironmentDescription].self, forKey: .member) - var environmentsBuffer:[ElasticBeanstalkClientTypes.EnvironmentDescription]? = nil - if let environmentsContainer = environmentsContainer { - environmentsBuffer = [ElasticBeanstalkClientTypes.EnvironmentDescription]() - for structureContainer0 in environmentsContainer { - environmentsBuffer?.append(structureContainer0) - } - } - environments = environmentsBuffer - } else { - environments = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - environments = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeEnvironmentsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case endTime = "EndTime" + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" + case platformArn = "PlatformArn" + case requestId = "RequestId" + case severity = "Severity" + case startTime = "StartTime" + case templateName = "TemplateName" + case versionLabel = "VersionLabel" } -} -extension DescribeEventsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -5912,76 +4514,16 @@ public struct DescribeEventsInput: Swift.Equatable { } } -struct DescribeEventsInputBody: Swift.Equatable { - let applicationName: Swift.String? - let versionLabel: Swift.String? - let templateName: Swift.String? - let environmentId: Swift.String? - let environmentName: Swift.String? - let platformArn: Swift.String? - let requestId: Swift.String? - let severity: ElasticBeanstalkClientTypes.EventSeverity? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} - -extension DescribeEventsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case endTime = "EndTime" - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - case platformArn = "PlatformArn" - case requestId = "RequestId" - case severity = "Severity" - case startTime = "StartTime" - case templateName = "TemplateName" - case versionLabel = "VersionLabel" - } +extension DescribeEventsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let requestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestId) - requestId = requestIdDecoded - let severityDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EventSeverity.self, forKey: .severity) - severity = severityDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeEventsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventsOutputBody = try responseDecoder.decode(responseBody: data) - self.events = output.events - self.nextToken = output.nextToken - } else { - self.events = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventsResult"] + var value = DescribeEventsOutput() + value.events = try reader["Events"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.EventDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -6003,54 +4545,30 @@ public struct DescribeEventsOutput: Swift.Equatable { } } -struct DescribeEventsOutputBody: Swift.Equatable { - let events: [ElasticBeanstalkClientTypes.EventDescription]? - let nextToken: Swift.String? -} - -extension DescribeEventsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Events" - case nextToken = "NextToken" - } +enum DescribeEventsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventsResult")) - if containerValues.contains(.events) { - struct KeyVal0{struct member{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EventDescription].self, forKey: .member) - var eventsBuffer:[ElasticBeanstalkClientTypes.EventDescription]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [ElasticBeanstalkClientTypes.EventDescription]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - events = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeEventsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeInstancesHealthInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeNames = "AttributeNames" + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + case nextToken = "NextToken" } -} -extension DescribeInstancesHealthInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeNames = attributeNames { @@ -6111,63 +4629,17 @@ public struct DescribeInstancesHealthInput: Swift.Equatable { } } -struct DescribeInstancesHealthInputBody: Swift.Equatable { - let environmentName: Swift.String? - let environmentId: Swift.String? - let attributeNames: [ElasticBeanstalkClientTypes.InstancesHealthAttribute]? - let nextToken: Swift.String? -} - -extension DescribeInstancesHealthInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeNames = "AttributeNames" - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - case nextToken = "NextToken" - } +extension DescribeInstancesHealthOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - if containerValues.contains(.attributeNames) { - struct KeyVal0{struct member{}} - let attributeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeNames) - if let attributeNamesWrappedContainer = attributeNamesWrappedContainer { - let attributeNamesContainer = try attributeNamesWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.InstancesHealthAttribute].self, forKey: .member) - var attributeNamesBuffer:[ElasticBeanstalkClientTypes.InstancesHealthAttribute]? = nil - if let attributeNamesContainer = attributeNamesContainer { - attributeNamesBuffer = [ElasticBeanstalkClientTypes.InstancesHealthAttribute]() - for enumContainer0 in attributeNamesContainer { - attributeNamesBuffer?.append(enumContainer0) - } - } - attributeNames = attributeNamesBuffer - } else { - attributeNames = [] - } - } else { - attributeNames = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension DescribeInstancesHealthOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstancesHealthOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceHealthList = output.instanceHealthList - self.nextToken = output.nextToken - self.refreshedAt = output.refreshedAt - } else { - self.instanceHealthList = nil - self.nextToken = nil - self.refreshedAt = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeInstancesHealthResult"] + var value = DescribeInstancesHealthOutput() + value.instanceHealthList = try reader["InstanceHealthList"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.SingleInstanceHealth.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + value.refreshedAt = try reader["RefreshedAt"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -6193,60 +4665,29 @@ public struct DescribeInstancesHealthOutput: Swift.Equatable { } } -struct DescribeInstancesHealthOutputBody: Swift.Equatable { - let instanceHealthList: [ElasticBeanstalkClientTypes.SingleInstanceHealth]? - let refreshedAt: ClientRuntime.Date? - let nextToken: Swift.String? -} +enum DescribeInstancesHealthOutputError { -extension DescribeInstancesHealthOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceHealthList = "InstanceHealthList" - case nextToken = "NextToken" - case refreshedAt = "RefreshedAt" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeInstancesHealthResult")) - if containerValues.contains(.instanceHealthList) { - struct KeyVal0{struct member{}} - let instanceHealthListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceHealthList) - if let instanceHealthListWrappedContainer = instanceHealthListWrappedContainer { - let instanceHealthListContainer = try instanceHealthListWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.SingleInstanceHealth].self, forKey: .member) - var instanceHealthListBuffer:[ElasticBeanstalkClientTypes.SingleInstanceHealth]? = nil - if let instanceHealthListContainer = instanceHealthListContainer { - instanceHealthListBuffer = [ElasticBeanstalkClientTypes.SingleInstanceHealth]() - for structureContainer0 in instanceHealthListContainer { - instanceHealthListBuffer?.append(structureContainer0) - } - } - instanceHealthList = instanceHealthListBuffer - } else { - instanceHealthList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRequestException": return try await InvalidRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - instanceHealthList = nil } - let refreshedAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .refreshedAt) - refreshedAt = refreshedAtDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum DescribeInstancesHealthOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribePlatformVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case platformArn = "PlatformArn" } -} -extension DescribePlatformVersionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let platformArn = platformArn { @@ -6276,30 +4717,15 @@ public struct DescribePlatformVersionInput: Swift.Equatable { } } -struct DescribePlatformVersionInputBody: Swift.Equatable { - let platformArn: Swift.String? -} - -extension DescribePlatformVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case platformArn = "PlatformArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - } -} +extension DescribePlatformVersionOutput { -extension DescribePlatformVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePlatformVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.platformDescription = output.platformDescription - } else { - self.platformDescription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribePlatformVersionResult"] + var value = DescribePlatformVersionOutput() + value.platformDescription = try reader["PlatformDescription"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.PlatformDescription.readingClosure) + return value } } } @@ -6316,35 +4742,29 @@ public struct DescribePlatformVersionOutput: Swift.Equatable { } } -struct DescribePlatformVersionOutputBody: Swift.Equatable { - let platformDescription: ElasticBeanstalkClientTypes.PlatformDescription? -} - -extension DescribePlatformVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case platformDescription = "PlatformDescription" - } +enum DescribePlatformVersionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribePlatformVersionResult")) - let platformDescriptionDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.PlatformDescription.self, forKey: .platformDescription) - platformDescription = platformDescriptionDecoded - } -} - -enum DescribePlatformVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DisassociateEnvironmentOperationsRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentName = "EnvironmentName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentName = environmentName { @@ -6376,24 +4796,12 @@ public struct DisassociateEnvironmentOperationsRoleInput: Swift.Equatable { } } -struct DisassociateEnvironmentOperationsRoleInputBody: Swift.Equatable { - let environmentName: Swift.String? -} - -extension DisassociateEnvironmentOperationsRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentName = "EnvironmentName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - } -} +extension DisassociateEnvironmentOperationsRoleOutput { -extension DisassociateEnvironmentOperationsRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DisassociateEnvironmentOperationsRoleOutput() + } } } @@ -6402,12 +4810,19 @@ public struct DisassociateEnvironmentOperationsRoleOutput: Swift.Equatable { public init() { } } -enum DisassociateEnvironmentOperationsRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DisassociateEnvironmentOperationsRoleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -6415,16 +4830,14 @@ enum DisassociateEnvironmentOperationsRoleOutputError: ClientRuntime.HttpRespons public enum ElasticBeanstalkClientTypes {} extension ElasticBeanstalkServiceException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ElasticBeanstalkServiceException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6453,23 +4866,7 @@ public struct ElasticBeanstalkServiceException: ClientRuntime.ModeledError, AWSC } } -struct ElasticBeanstalkServiceExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ElasticBeanstalkServiceExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.EnvironmentDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.EnvironmentDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case abortableOperationInProgress = "AbortableOperationInProgress" case applicationName = "ApplicationName" @@ -6570,67 +4967,33 @@ extension ElasticBeanstalkClientTypes.EnvironmentDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let endpointURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointURL) - endpointURL = endpointURLDecoded - let cnameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cname) - cname = cnameDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentStatus.self, forKey: .status) - status = statusDecoded - let abortableOperationInProgressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .abortableOperationInProgress) - abortableOperationInProgress = abortableOperationInProgressDecoded - let healthDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealth.self, forKey: .health) - health = healthDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealthStatus.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let resourcesDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentResourcesDescription.self, forKey: .resources) - resources = resourcesDecoded - let tierDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentTier.self, forKey: .tier) - tier = tierDecoded - if containerValues.contains(.environmentLinks) { - struct KeyVal0{struct member{}} - let environmentLinksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environmentLinks) - if let environmentLinksWrappedContainer = environmentLinksWrappedContainer { - let environmentLinksContainer = try environmentLinksWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EnvironmentLink].self, forKey: .member) - var environmentLinksBuffer:[ElasticBeanstalkClientTypes.EnvironmentLink]? = nil - if let environmentLinksContainer = environmentLinksContainer { - environmentLinksBuffer = [ElasticBeanstalkClientTypes.EnvironmentLink]() - for structureContainer0 in environmentLinksContainer { - environmentLinksBuffer?.append(structureContainer0) - } - } - environmentLinks = environmentLinksBuffer - } else { - environmentLinks = [] - } - } else { - environmentLinks = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.EnvironmentDescription() + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.environmentId = try reader["EnvironmentId"].readIfPresent() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.versionLabel = try reader["VersionLabel"].readIfPresent() + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.endpointURL = try reader["EndpointURL"].readIfPresent() + value.cname = try reader["CNAME"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.status = try reader["Status"].readIfPresent() + value.abortableOperationInProgress = try reader["AbortableOperationInProgress"].readIfPresent() + value.health = try reader["Health"].readIfPresent() + value.healthStatus = try reader["HealthStatus"].readIfPresent() + value.resources = try reader["Resources"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentResourcesDescription.readingClosure) + value.tier = try reader["Tier"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentTier.readingClosure) + value.environmentLinks = try reader["EnvironmentLinks"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.EnvironmentLink.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.environmentArn = try reader["EnvironmentArn"].readIfPresent() + value.operationsRole = try reader["OperationsRole"].readIfPresent() + return value } - let environmentArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentArn) - environmentArn = environmentArnDecoded - let operationsRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationsRole) - operationsRole = operationsRoleDecoded } } @@ -6892,7 +5255,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.EnvironmentInfoDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.EnvironmentInfoDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ec2InstanceId = "Ec2InstanceId" case infoType = "InfoType" @@ -6916,16 +5279,16 @@ extension ElasticBeanstalkClientTypes.EnvironmentInfoDescription: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let infoTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentInfoType.self, forKey: .infoType) - infoType = infoTypeDecoded - let ec2InstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2InstanceId) - ec2InstanceId = ec2InstanceIdDecoded - let sampleTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .sampleTimestamp) - sampleTimestamp = sampleTimestampDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.EnvironmentInfoDescription() + value.infoType = try reader["InfoType"].readIfPresent() + value.ec2InstanceId = try reader["Ec2InstanceId"].readIfPresent() + value.sampleTimestamp = try reader["SampleTimestamp"].readTimestampIfPresent(format: .dateTime) + value.message = try reader["Message"].readIfPresent() + return value + } } } @@ -6989,7 +5352,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.EnvironmentLink: Swift.Codable { +extension ElasticBeanstalkClientTypes.EnvironmentLink: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case environmentName = "EnvironmentName" case linkName = "LinkName" @@ -7005,12 +5368,14 @@ extension ElasticBeanstalkClientTypes.EnvironmentLink: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let linkNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .linkName) - linkName = linkNameDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.EnvironmentLink() + value.linkName = try reader["LinkName"].readIfPresent() + value.environmentName = try reader["EnvironmentName"].readIfPresent() + return value + } } } @@ -7034,7 +5399,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.EnvironmentResourceDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.EnvironmentResourceDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoScalingGroups = "AutoScalingGroups" case environmentName = "EnvironmentName" @@ -7137,142 +5502,19 @@ extension ElasticBeanstalkClientTypes.EnvironmentResourceDescription: Swift.Coda } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - if containerValues.contains(.autoScalingGroups) { - struct KeyVal0{struct member{}} - let autoScalingGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .autoScalingGroups) - if let autoScalingGroupsWrappedContainer = autoScalingGroupsWrappedContainer { - let autoScalingGroupsContainer = try autoScalingGroupsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.AutoScalingGroup].self, forKey: .member) - var autoScalingGroupsBuffer:[ElasticBeanstalkClientTypes.AutoScalingGroup]? = nil - if let autoScalingGroupsContainer = autoScalingGroupsContainer { - autoScalingGroupsBuffer = [ElasticBeanstalkClientTypes.AutoScalingGroup]() - for structureContainer0 in autoScalingGroupsContainer { - autoScalingGroupsBuffer?.append(structureContainer0) - } - } - autoScalingGroups = autoScalingGroupsBuffer - } else { - autoScalingGroups = [] - } - } else { - autoScalingGroups = nil - } - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[ElasticBeanstalkClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [ElasticBeanstalkClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - if containerValues.contains(.launchConfigurations) { - struct KeyVal0{struct member{}} - let launchConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchConfigurations) - if let launchConfigurationsWrappedContainer = launchConfigurationsWrappedContainer { - let launchConfigurationsContainer = try launchConfigurationsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.LaunchConfiguration].self, forKey: .member) - var launchConfigurationsBuffer:[ElasticBeanstalkClientTypes.LaunchConfiguration]? = nil - if let launchConfigurationsContainer = launchConfigurationsContainer { - launchConfigurationsBuffer = [ElasticBeanstalkClientTypes.LaunchConfiguration]() - for structureContainer0 in launchConfigurationsContainer { - launchConfigurationsBuffer?.append(structureContainer0) - } - } - launchConfigurations = launchConfigurationsBuffer - } else { - launchConfigurations = [] - } - } else { - launchConfigurations = nil - } - if containerValues.contains(.launchTemplates) { - struct KeyVal0{struct member{}} - let launchTemplatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .launchTemplates) - if let launchTemplatesWrappedContainer = launchTemplatesWrappedContainer { - let launchTemplatesContainer = try launchTemplatesWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.LaunchTemplate].self, forKey: .member) - var launchTemplatesBuffer:[ElasticBeanstalkClientTypes.LaunchTemplate]? = nil - if let launchTemplatesContainer = launchTemplatesContainer { - launchTemplatesBuffer = [ElasticBeanstalkClientTypes.LaunchTemplate]() - for structureContainer0 in launchTemplatesContainer { - launchTemplatesBuffer?.append(structureContainer0) - } - } - launchTemplates = launchTemplatesBuffer - } else { - launchTemplates = [] - } - } else { - launchTemplates = nil - } - if containerValues.contains(.loadBalancers) { - struct KeyVal0{struct member{}} - let loadBalancersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancers) - if let loadBalancersWrappedContainer = loadBalancersWrappedContainer { - let loadBalancersContainer = try loadBalancersWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.LoadBalancer].self, forKey: .member) - var loadBalancersBuffer:[ElasticBeanstalkClientTypes.LoadBalancer]? = nil - if let loadBalancersContainer = loadBalancersContainer { - loadBalancersBuffer = [ElasticBeanstalkClientTypes.LoadBalancer]() - for structureContainer0 in loadBalancersContainer { - loadBalancersBuffer?.append(structureContainer0) - } - } - loadBalancers = loadBalancersBuffer - } else { - loadBalancers = [] - } - } else { - loadBalancers = nil - } - if containerValues.contains(.triggers) { - struct KeyVal0{struct member{}} - let triggersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .triggers) - if let triggersWrappedContainer = triggersWrappedContainer { - let triggersContainer = try triggersWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Trigger].self, forKey: .member) - var triggersBuffer:[ElasticBeanstalkClientTypes.Trigger]? = nil - if let triggersContainer = triggersContainer { - triggersBuffer = [ElasticBeanstalkClientTypes.Trigger]() - for structureContainer0 in triggersContainer { - triggersBuffer?.append(structureContainer0) - } - } - triggers = triggersBuffer - } else { - triggers = [] - } - } else { - triggers = nil - } - if containerValues.contains(.queues) { - struct KeyVal0{struct member{}} - let queuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .queues) - if let queuesWrappedContainer = queuesWrappedContainer { - let queuesContainer = try queuesWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Queue].self, forKey: .member) - var queuesBuffer:[ElasticBeanstalkClientTypes.Queue]? = nil - if let queuesContainer = queuesContainer { - queuesBuffer = [ElasticBeanstalkClientTypes.Queue]() - for structureContainer0 in queuesContainer { - queuesBuffer?.append(structureContainer0) - } - } - queues = queuesBuffer - } else { - queues = [] - } - } else { - queues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.EnvironmentResourceDescription() + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.autoScalingGroups = try reader["AutoScalingGroups"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.AutoScalingGroup.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.instances = try reader["Instances"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.Instance.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.launchConfigurations = try reader["LaunchConfigurations"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.LaunchConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.launchTemplates = try reader["LaunchTemplates"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.LaunchTemplate.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.loadBalancers = try reader["LoadBalancers"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.LoadBalancer.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.triggers = try reader["Triggers"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.Trigger.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.queues = try reader["Queues"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.Queue.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7321,7 +5563,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.EnvironmentResourcesDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.EnvironmentResourcesDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case loadBalancer = "LoadBalancer" } @@ -7333,10 +5575,13 @@ extension ElasticBeanstalkClientTypes.EnvironmentResourcesDescription: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.LoadBalancerDescription.self, forKey: .loadBalancer) - loadBalancer = loadBalancerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.EnvironmentResourcesDescription() + value.loadBalancer = try reader["LoadBalancer"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.LoadBalancerDescription.readingClosure) + return value + } } } @@ -7406,7 +5651,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.EnvironmentTier: Swift.Codable { +extension ElasticBeanstalkClientTypes.EnvironmentTier: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case type = "Type" @@ -7426,14 +5671,15 @@ extension ElasticBeanstalkClientTypes.EnvironmentTier: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.EnvironmentTier() + value.name = try reader["Name"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -7469,7 +5715,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.EventDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.EventDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationName = "ApplicationName" case environmentName = "EnvironmentName" @@ -7513,26 +5759,21 @@ extension ElasticBeanstalkClientTypes.EventDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eventDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .eventDate) - eventDate = eventDateDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let requestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestId) - requestId = requestIdDecoded - let severityDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EventSeverity.self, forKey: .severity) - severity = severityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.EventDescription() + value.eventDate = try reader["EventDate"].readTimestampIfPresent(format: .dateTime) + value.message = try reader["Message"].readIfPresent() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.versionLabel = try reader["VersionLabel"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.requestId = try reader["RequestId"].readIfPresent() + value.severity = try reader["Severity"].readIfPresent() + return value + } } } @@ -7675,7 +5916,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.Instance: Swift.Codable { +extension ElasticBeanstalkClientTypes.Instance: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case id = "Id" } @@ -7687,10 +5928,13 @@ extension ElasticBeanstalkClientTypes.Instance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.Instance() + value.id = try reader["Id"].readIfPresent() + return value + } } } @@ -7710,7 +5954,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.InstanceHealthSummary: Swift.Codable { +extension ElasticBeanstalkClientTypes.InstanceHealthSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case degraded = "Degraded" case info = "Info" @@ -7750,24 +5994,20 @@ extension ElasticBeanstalkClientTypes.InstanceHealthSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let noDataDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .noData) - noData = noDataDecoded - let unknownDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .unknown) - unknown = unknownDecoded - let pendingDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pending) - pending = pendingDecoded - let okDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ok) - ok = okDecoded - let infoDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .info) - info = infoDecoded - let warningDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .warning) - warning = warningDecoded - let degradedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .degraded) - degraded = degradedDecoded - let severeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .severe) - severe = severeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.InstanceHealthSummary() + value.noData = try reader["NoData"].readIfPresent() + value.unknown = try reader["Unknown"].readIfPresent() + value.pending = try reader["Pending"].readIfPresent() + value.ok = try reader["Ok"].readIfPresent() + value.info = try reader["Info"].readIfPresent() + value.warning = try reader["Warning"].readIfPresent() + value.degraded = try reader["Degraded"].readIfPresent() + value.severe = try reader["Severe"].readIfPresent() + return value + } } } @@ -7875,16 +6115,14 @@ extension ElasticBeanstalkClientTypes { } extension InsufficientPrivilegesException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientPrivilegesException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7913,33 +6151,15 @@ public struct InsufficientPrivilegesException: ClientRuntime.ModeledError, AWSCl } } -struct InsufficientPrivilegesExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientPrivilegesExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidRequestException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRequestException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7968,23 +6188,7 @@ public struct InvalidRequestException: ClientRuntime.ModeledError, AWSClientRunt } } -struct InvalidRequestExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRequestExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.Latency: Swift.Codable { +extension ElasticBeanstalkClientTypes.Latency: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case p10 = "P10" case p50 = "P50" @@ -8024,24 +6228,20 @@ extension ElasticBeanstalkClientTypes.Latency: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let p999Decoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .p999) - p999 = p999Decoded - let p99Decoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .p99) - p99 = p99Decoded - let p95Decoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .p95) - p95 = p95Decoded - let p90Decoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .p90) - p90 = p90Decoded - let p85Decoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .p85) - p85 = p85Decoded - let p75Decoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .p75) - p75 = p75Decoded - let p50Decoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .p50) - p50 = p50Decoded - let p10Decoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .p10) - p10 = p10Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.Latency() + value.p999 = try reader["P999"].readIfPresent() + value.p99 = try reader["P99"].readIfPresent() + value.p95 = try reader["P95"].readIfPresent() + value.p90 = try reader["P90"].readIfPresent() + value.p85 = try reader["P85"].readIfPresent() + value.p75 = try reader["P75"].readIfPresent() + value.p50 = try reader["P50"].readIfPresent() + value.p10 = try reader["P10"].readIfPresent() + return value + } } } @@ -8089,7 +6289,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.LaunchConfiguration: Swift.Codable { +extension ElasticBeanstalkClientTypes.LaunchConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -8101,10 +6301,13 @@ extension ElasticBeanstalkClientTypes.LaunchConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.LaunchConfiguration() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -8124,7 +6327,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.LaunchTemplate: Swift.Codable { +extension ElasticBeanstalkClientTypes.LaunchTemplate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case id = "Id" } @@ -8136,10 +6339,13 @@ extension ElasticBeanstalkClientTypes.LaunchTemplate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.LaunchTemplate() + value.id = try reader["Id"].readIfPresent() + return value + } } } @@ -8160,6 +6366,7 @@ extension ElasticBeanstalkClientTypes { } extension ListAvailableSolutionStacksInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("ListAvailableSolutionStacks", forKey:ClientRuntime.Key("Action")) @@ -8179,16 +6386,16 @@ public struct ListAvailableSolutionStacksInput: Swift.Equatable { public init() { } } -extension ListAvailableSolutionStacksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAvailableSolutionStacksOutputBody = try responseDecoder.decode(responseBody: data) - self.solutionStackDetails = output.solutionStackDetails - self.solutionStacks = output.solutionStacks - } else { - self.solutionStackDetails = nil - self.solutionStacks = nil +extension ListAvailableSolutionStacksOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListAvailableSolutionStacksResult"] + var value = ListAvailableSolutionStacksOutput() + value.solutionStackDetails = try reader["SolutionStackDetails"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.SolutionStackDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.solutionStacks = try reader["SolutionStacks"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8210,71 +6417,29 @@ public struct ListAvailableSolutionStacksOutput: Swift.Equatable { } } -struct ListAvailableSolutionStacksOutputBody: Swift.Equatable { - let solutionStacks: [Swift.String]? - let solutionStackDetails: [ElasticBeanstalkClientTypes.SolutionStackDescription]? -} +enum ListAvailableSolutionStacksOutputError { -extension ListAvailableSolutionStacksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case solutionStackDetails = "SolutionStackDetails" - case solutionStacks = "SolutionStacks" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListAvailableSolutionStacksResult")) - if containerValues.contains(.solutionStacks) { - struct KeyVal0{struct member{}} - let solutionStacksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .solutionStacks) - if let solutionStacksWrappedContainer = solutionStacksWrappedContainer { - let solutionStacksContainer = try solutionStacksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var solutionStacksBuffer:[Swift.String]? = nil - if let solutionStacksContainer = solutionStacksContainer { - solutionStacksBuffer = [Swift.String]() - for stringContainer0 in solutionStacksContainer { - solutionStacksBuffer?.append(stringContainer0) - } - } - solutionStacks = solutionStacksBuffer - } else { - solutionStacks = [] - } - } else { - solutionStacks = nil - } - if containerValues.contains(.solutionStackDetails) { - struct KeyVal0{struct member{}} - let solutionStackDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .solutionStackDetails) - if let solutionStackDetailsWrappedContainer = solutionStackDetailsWrappedContainer { - let solutionStackDetailsContainer = try solutionStackDetailsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.SolutionStackDescription].self, forKey: .member) - var solutionStackDetailsBuffer:[ElasticBeanstalkClientTypes.SolutionStackDescription]? = nil - if let solutionStackDetailsContainer = solutionStackDetailsContainer { - solutionStackDetailsBuffer = [ElasticBeanstalkClientTypes.SolutionStackDescription]() - for structureContainer0 in solutionStackDetailsContainer { - solutionStackDetailsBuffer?.append(structureContainer0) - } - } - solutionStackDetails = solutionStackDetailsBuffer - } else { - solutionStackDetails = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - solutionStackDetails = nil } } } -enum ListAvailableSolutionStacksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListPlatformBranchesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension ListPlatformBranchesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -8362,57 +6527,16 @@ public struct ListPlatformBranchesInput: Swift.Equatable { } } -struct ListPlatformBranchesInputBody: Swift.Equatable { - let filters: [ElasticBeanstalkClientTypes.SearchFilter]? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} - -extension ListPlatformBranchesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct member{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.SearchFilter].self, forKey: .member) - var filtersBuffer:[ElasticBeanstalkClientTypes.SearchFilter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [ElasticBeanstalkClientTypes.SearchFilter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListPlatformBranchesOutput { -extension ListPlatformBranchesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPlatformBranchesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.platformBranchSummaryList = output.platformBranchSummaryList - } else { - self.nextToken = nil - self.platformBranchSummaryList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListPlatformBranchesResult"] + var value = ListPlatformBranchesOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.platformBranchSummaryList = try reader["PlatformBranchSummaryList"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.PlatformBranchSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8433,54 +6557,29 @@ public struct ListPlatformBranchesOutput: Swift.Equatable { } } -struct ListPlatformBranchesOutputBody: Swift.Equatable { - let platformBranchSummaryList: [ElasticBeanstalkClientTypes.PlatformBranchSummary]? - let nextToken: Swift.String? -} +enum ListPlatformBranchesOutputError { -extension ListPlatformBranchesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case platformBranchSummaryList = "PlatformBranchSummaryList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListPlatformBranchesResult")) - if containerValues.contains(.platformBranchSummaryList) { - struct KeyVal0{struct member{}} - let platformBranchSummaryListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .platformBranchSummaryList) - if let platformBranchSummaryListWrappedContainer = platformBranchSummaryListWrappedContainer { - let platformBranchSummaryListContainer = try platformBranchSummaryListWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.PlatformBranchSummary].self, forKey: .member) - var platformBranchSummaryListBuffer:[ElasticBeanstalkClientTypes.PlatformBranchSummary]? = nil - if let platformBranchSummaryListContainer = platformBranchSummaryListContainer { - platformBranchSummaryListBuffer = [ElasticBeanstalkClientTypes.PlatformBranchSummary]() - for structureContainer0 in platformBranchSummaryListContainer { - platformBranchSummaryListBuffer?.append(structureContainer0) - } - } - platformBranchSummaryList = platformBranchSummaryListBuffer - } else { - platformBranchSummaryList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - platformBranchSummaryList = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListPlatformBranchesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListPlatformVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case maxRecords = "MaxRecords" + case nextToken = "NextToken" } -} -extension ListPlatformVersionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -8533,57 +6632,16 @@ public struct ListPlatformVersionsInput: Swift.Equatable { } } -struct ListPlatformVersionsInputBody: Swift.Equatable { - let filters: [ElasticBeanstalkClientTypes.PlatformFilter]? - let maxRecords: Swift.Int? - let nextToken: Swift.String? -} - -extension ListPlatformVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case maxRecords = "MaxRecords" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filters) { - struct KeyVal0{struct member{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.PlatformFilter].self, forKey: .member) - var filtersBuffer:[ElasticBeanstalkClientTypes.PlatformFilter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [ElasticBeanstalkClientTypes.PlatformFilter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListPlatformVersionsOutput { -extension ListPlatformVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPlatformVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.platformSummaryList = output.platformSummaryList - } else { - self.nextToken = nil - self.platformSummaryList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListPlatformVersionsResult"] + var value = ListPlatformVersionsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.platformSummaryList = try reader["PlatformSummaryList"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.PlatformSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8604,56 +6662,29 @@ public struct ListPlatformVersionsOutput: Swift.Equatable { } } -struct ListPlatformVersionsOutputBody: Swift.Equatable { - let platformSummaryList: [ElasticBeanstalkClientTypes.PlatformSummary]? - let nextToken: Swift.String? -} +enum ListPlatformVersionsOutputError { -extension ListPlatformVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case platformSummaryList = "PlatformSummaryList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListPlatformVersionsResult")) - if containerValues.contains(.platformSummaryList) { - struct KeyVal0{struct member{}} - let platformSummaryListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .platformSummaryList) - if let platformSummaryListWrappedContainer = platformSummaryListWrappedContainer { - let platformSummaryListContainer = try platformSummaryListWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.PlatformSummary].self, forKey: .member) - var platformSummaryListBuffer:[ElasticBeanstalkClientTypes.PlatformSummary]? = nil - if let platformSummaryListContainer = platformSummaryListContainer { - platformSummaryListBuffer = [ElasticBeanstalkClientTypes.PlatformSummary]() - for structureContainer0 in platformSummaryListContainer { - platformSummaryListBuffer?.append(structureContainer0) - } - } - platformSummaryList = platformSummaryListBuffer - } else { - platformSummaryList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - platformSummaryList = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListPlatformVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ElasticBeanstalkServiceException": return try await ElasticBeanstalkServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTagsForResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" } -} -extension ListTagsForResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -8684,32 +6715,16 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -struct ListTagsForResourceInputBody: Swift.Equatable { - let resourceArn: Swift.String? -} - -extension ListTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - } -} +extension ListTagsForResourceOutput { -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.resourceArn = output.resourceArn - self.resourceTags = output.resourceTags - } else { - self.resourceArn = nil - self.resourceTags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTagsForResourceResult"] + var value = ListTagsForResourceOutput() + value.resourceArn = try reader["ResourceArn"].readIfPresent() + value.resourceTags = try reader["ResourceTags"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8730,57 +6745,26 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let resourceArn: Swift.String? - let resourceTags: [ElasticBeanstalkClientTypes.Tag]? -} +enum ListTagsForResourceOutputError { -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - case resourceTags = "ResourceTags" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTagsForResourceResult")) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - if containerValues.contains(.resourceTags) { - struct KeyVal0{struct member{}} - let resourceTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTags) - if let resourceTagsWrappedContainer = resourceTagsWrappedContainer { - let resourceTagsContainer = try resourceTagsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Tag].self, forKey: .member) - var resourceTagsBuffer:[ElasticBeanstalkClientTypes.Tag]? = nil - if let resourceTagsContainer = resourceTagsContainer { - resourceTagsBuffer = [ElasticBeanstalkClientTypes.Tag]() - for structureContainer0 in resourceTagsContainer { - resourceTagsBuffer?.append(structureContainer0) - } - } - resourceTags = resourceTagsBuffer - } else { - resourceTags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceTypeNotSupportedException": return try await ResourceTypeNotSupportedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - resourceTags = nil - } - } -} - -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceTypeNotSupportedException": return try await ResourceTypeNotSupportedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElasticBeanstalkClientTypes.Listener: Swift.Codable { +extension ElasticBeanstalkClientTypes.Listener: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case port = "Port" case `protocol` = "Protocol" @@ -8796,12 +6780,14 @@ extension ElasticBeanstalkClientTypes.Listener: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) ?? 0 - port = portDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.Listener() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.port = try reader["Port"].readIfPresent() ?? 0 + return value + } } } @@ -8825,7 +6811,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.LoadBalancer: Swift.Codable { +extension ElasticBeanstalkClientTypes.LoadBalancer: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -8837,10 +6823,13 @@ extension ElasticBeanstalkClientTypes.LoadBalancer: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.LoadBalancer() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -8860,7 +6849,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.LoadBalancerDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.LoadBalancerDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case domain = "Domain" case listeners = "Listeners" @@ -8889,30 +6878,14 @@ extension ElasticBeanstalkClientTypes.LoadBalancerDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - if containerValues.contains(.listeners) { - struct KeyVal0{struct member{}} - let listenersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .listeners) - if let listenersWrappedContainer = listenersWrappedContainer { - let listenersContainer = try listenersWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Listener].self, forKey: .member) - var listenersBuffer:[ElasticBeanstalkClientTypes.Listener]? = nil - if let listenersContainer = listenersContainer { - listenersBuffer = [ElasticBeanstalkClientTypes.Listener]() - for structureContainer0 in listenersContainer { - listenersBuffer?.append(structureContainer0) - } - } - listeners = listenersBuffer - } else { - listeners = [] - } - } else { - listeners = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.LoadBalancerDescription() + value.loadBalancerName = try reader["LoadBalancerName"].readIfPresent() + value.domain = try reader["Domain"].readIfPresent() + value.listeners = try reader["Listeners"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.Listener.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8941,7 +6914,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.ManagedAction: Swift.Codable { +extension ElasticBeanstalkClientTypes.ManagedAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actionDescription = "ActionDescription" case actionId = "ActionId" @@ -8969,18 +6942,17 @@ extension ElasticBeanstalkClientTypes.ManagedAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionId) - actionId = actionIdDecoded - let actionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionDescription) - actionDescription = actionDescriptionDecoded - let actionTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ActionType.self, forKey: .actionType) - actionType = actionTypeDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ActionStatus.self, forKey: .status) - status = statusDecoded - let windowStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .windowStartTime) - windowStartTime = windowStartTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ManagedAction() + value.actionId = try reader["ActionId"].readIfPresent() + value.actionDescription = try reader["ActionDescription"].readIfPresent() + value.actionType = try reader["ActionType"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.windowStartTime = try reader["WindowStartTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -9016,7 +6988,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.ManagedActionHistoryItem: Swift.Codable { +extension ElasticBeanstalkClientTypes.ManagedActionHistoryItem: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actionDescription = "ActionDescription" case actionId = "ActionId" @@ -9056,24 +7028,20 @@ extension ElasticBeanstalkClientTypes.ManagedActionHistoryItem: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionId) - actionId = actionIdDecoded - let actionTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ActionType.self, forKey: .actionType) - actionType = actionTypeDecoded - let actionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionDescription) - actionDescription = actionDescriptionDecoded - let failureTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.FailureType.self, forKey: .failureType) - failureType = failureTypeDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ActionHistoryStatus.self, forKey: .status) - status = statusDecoded - let failureDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureDescription) - failureDescription = failureDescriptionDecoded - let executedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .executedTime) - executedTime = executedTimeDecoded - let finishedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .finishedTime) - finishedTime = finishedTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ManagedActionHistoryItem() + value.actionId = try reader["ActionId"].readIfPresent() + value.actionType = try reader["ActionType"].readIfPresent() + value.actionDescription = try reader["ActionDescription"].readIfPresent() + value.failureType = try reader["FailureType"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.failureDescription = try reader["FailureDescription"].readIfPresent() + value.executedTime = try reader["ExecutedTime"].readTimestampIfPresent(format: .dateTime) + value.finishedTime = try reader["FinishedTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -9122,16 +7090,14 @@ extension ElasticBeanstalkClientTypes { } extension ManagedActionInvalidStateException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ManagedActionInvalidStateException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9160,23 +7126,7 @@ public struct ManagedActionInvalidStateException: ClientRuntime.ModeledError, AW } } -struct ManagedActionInvalidStateExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ManagedActionInvalidStateExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.MaxAgeRule: Swift.Codable { +extension ElasticBeanstalkClientTypes.MaxAgeRule: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deleteSourceFromS3 = "DeleteSourceFromS3" case enabled = "Enabled" @@ -9196,14 +7146,15 @@ extension ElasticBeanstalkClientTypes.MaxAgeRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let maxAgeInDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAgeInDays) - maxAgeInDays = maxAgeInDaysDecoded - let deleteSourceFromS3Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteSourceFromS3) - deleteSourceFromS3 = deleteSourceFromS3Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.MaxAgeRule() + value.enabled = try reader["Enabled"].readIfPresent() + value.maxAgeInDays = try reader["MaxAgeInDays"].readIfPresent() + value.deleteSourceFromS3 = try reader["DeleteSourceFromS3"].readIfPresent() + return value + } } } @@ -9232,7 +7183,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.MaxCountRule: Swift.Codable { +extension ElasticBeanstalkClientTypes.MaxCountRule: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deleteSourceFromS3 = "DeleteSourceFromS3" case enabled = "Enabled" @@ -9252,14 +7203,15 @@ extension ElasticBeanstalkClientTypes.MaxCountRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let maxCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxCount) - maxCount = maxCountDecoded - let deleteSourceFromS3Decoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteSourceFromS3) - deleteSourceFromS3 = deleteSourceFromS3Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.MaxCountRule() + value.enabled = try reader["Enabled"].readIfPresent() + value.maxCount = try reader["MaxCount"].readIfPresent() + value.deleteSourceFromS3 = try reader["DeleteSourceFromS3"].readIfPresent() + return value + } } } @@ -9289,16 +7241,14 @@ extension ElasticBeanstalkClientTypes { } extension OperationInProgressException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OperationInProgressException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9327,23 +7277,7 @@ public struct OperationInProgressException: ClientRuntime.ModeledError, AWSClien } } -struct OperationInProgressExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension OperationInProgressExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.OptionRestrictionRegex: Swift.Codable { +extension ElasticBeanstalkClientTypes.OptionRestrictionRegex: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case label = "Label" case pattern = "Pattern" @@ -9359,12 +7293,14 @@ extension ElasticBeanstalkClientTypes.OptionRestrictionRegex: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let patternDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pattern) - pattern = patternDecoded - let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) - label = labelDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.OptionRestrictionRegex() + value.pattern = try reader["Pattern"].readIfPresent() + value.label = try reader["Label"].readIfPresent() + return value + } } } @@ -9388,7 +7324,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.OptionSpecification: Swift.Codable { +extension ElasticBeanstalkClientTypes.OptionSpecification: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case namespace = "Namespace" case optionName = "OptionName" @@ -9408,14 +7344,15 @@ extension ElasticBeanstalkClientTypes.OptionSpecification: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let optionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionName) - optionName = optionNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.OptionSpecification() + value.resourceName = try reader["ResourceName"].readIfPresent() + value.namespace = try reader["Namespace"].readIfPresent() + value.optionName = try reader["OptionName"].readIfPresent() + return value + } } } @@ -9443,7 +7380,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.PlatformBranchSummary: Swift.Codable { +extension ElasticBeanstalkClientTypes.PlatformBranchSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case branchName = "BranchName" case branchOrder = "BranchOrder" @@ -9480,34 +7417,16 @@ extension ElasticBeanstalkClientTypes.PlatformBranchSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformName) - platformName = platformNameDecoded - let branchNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .branchName) - branchName = branchNameDecoded - let lifecycleStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lifecycleState) - lifecycleState = lifecycleStateDecoded - let branchOrderDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .branchOrder) ?? 0 - branchOrder = branchOrderDecoded - if containerValues.contains(.supportedTierList) { - struct KeyVal0{struct member{}} - let supportedTierListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedTierList) - if let supportedTierListWrappedContainer = supportedTierListWrappedContainer { - let supportedTierListContainer = try supportedTierListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedTierListBuffer:[Swift.String]? = nil - if let supportedTierListContainer = supportedTierListContainer { - supportedTierListBuffer = [Swift.String]() - for stringContainer0 in supportedTierListContainer { - supportedTierListBuffer?.append(stringContainer0) - } - } - supportedTierList = supportedTierListBuffer - } else { - supportedTierList = [] - } - } else { - supportedTierList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.PlatformBranchSummary() + value.platformName = try reader["PlatformName"].readIfPresent() + value.branchName = try reader["BranchName"].readIfPresent() + value.lifecycleState = try reader["LifecycleState"].readIfPresent() + value.branchOrder = try reader["BranchOrder"].readIfPresent() ?? 0 + value.supportedTierList = try reader["SupportedTierList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9544,7 +7463,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.PlatformDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.PlatformDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case customAmiList = "CustomAmiList" case dateCreated = "DateCreated" @@ -9681,135 +7600,33 @@ extension ElasticBeanstalkClientTypes.PlatformDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let platformOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformOwner) - platformOwner = platformOwnerDecoded - let platformNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformName) - platformName = platformNameDecoded - let platformVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformVersion) - platformVersion = platformVersionDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.PlatformStatus.self, forKey: .platformStatus) - platformStatus = platformStatusDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - let platformCategoryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformCategory) - platformCategory = platformCategoryDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let maintainerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintainer) - maintainer = maintainerDecoded - let operatingSystemNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operatingSystemName) - operatingSystemName = operatingSystemNameDecoded - let operatingSystemVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operatingSystemVersion) - operatingSystemVersion = operatingSystemVersionDecoded - if containerValues.contains(.programmingLanguages) { - struct KeyVal0{struct member{}} - let programmingLanguagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .programmingLanguages) - if let programmingLanguagesWrappedContainer = programmingLanguagesWrappedContainer { - let programmingLanguagesContainer = try programmingLanguagesWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.PlatformProgrammingLanguage].self, forKey: .member) - var programmingLanguagesBuffer:[ElasticBeanstalkClientTypes.PlatformProgrammingLanguage]? = nil - if let programmingLanguagesContainer = programmingLanguagesContainer { - programmingLanguagesBuffer = [ElasticBeanstalkClientTypes.PlatformProgrammingLanguage]() - for structureContainer0 in programmingLanguagesContainer { - programmingLanguagesBuffer?.append(structureContainer0) - } - } - programmingLanguages = programmingLanguagesBuffer - } else { - programmingLanguages = [] - } - } else { - programmingLanguages = nil - } - if containerValues.contains(.frameworks) { - struct KeyVal0{struct member{}} - let frameworksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .frameworks) - if let frameworksWrappedContainer = frameworksWrappedContainer { - let frameworksContainer = try frameworksWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.PlatformFramework].self, forKey: .member) - var frameworksBuffer:[ElasticBeanstalkClientTypes.PlatformFramework]? = nil - if let frameworksContainer = frameworksContainer { - frameworksBuffer = [ElasticBeanstalkClientTypes.PlatformFramework]() - for structureContainer0 in frameworksContainer { - frameworksBuffer?.append(structureContainer0) - } - } - frameworks = frameworksBuffer - } else { - frameworks = [] - } - } else { - frameworks = nil - } - if containerValues.contains(.customAmiList) { - struct KeyVal0{struct member{}} - let customAmiListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .customAmiList) - if let customAmiListWrappedContainer = customAmiListWrappedContainer { - let customAmiListContainer = try customAmiListWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.CustomAmi].self, forKey: .member) - var customAmiListBuffer:[ElasticBeanstalkClientTypes.CustomAmi]? = nil - if let customAmiListContainer = customAmiListContainer { - customAmiListBuffer = [ElasticBeanstalkClientTypes.CustomAmi]() - for structureContainer0 in customAmiListContainer { - customAmiListBuffer?.append(structureContainer0) - } - } - customAmiList = customAmiListBuffer - } else { - customAmiList = [] - } - } else { - customAmiList = nil - } - if containerValues.contains(.supportedTierList) { - struct KeyVal0{struct member{}} - let supportedTierListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedTierList) - if let supportedTierListWrappedContainer = supportedTierListWrappedContainer { - let supportedTierListContainer = try supportedTierListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedTierListBuffer:[Swift.String]? = nil - if let supportedTierListContainer = supportedTierListContainer { - supportedTierListBuffer = [Swift.String]() - for stringContainer0 in supportedTierListContainer { - supportedTierListBuffer?.append(stringContainer0) - } - } - supportedTierList = supportedTierListBuffer - } else { - supportedTierList = [] - } - } else { - supportedTierList = nil - } - if containerValues.contains(.supportedAddonList) { - struct KeyVal0{struct member{}} - let supportedAddonListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedAddonList) - if let supportedAddonListWrappedContainer = supportedAddonListWrappedContainer { - let supportedAddonListContainer = try supportedAddonListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedAddonListBuffer:[Swift.String]? = nil - if let supportedAddonListContainer = supportedAddonListContainer { - supportedAddonListBuffer = [Swift.String]() - for stringContainer0 in supportedAddonListContainer { - supportedAddonListBuffer?.append(stringContainer0) - } - } - supportedAddonList = supportedAddonListBuffer - } else { - supportedAddonList = [] - } - } else { - supportedAddonList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.PlatformDescription() + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.platformOwner = try reader["PlatformOwner"].readIfPresent() + value.platformName = try reader["PlatformName"].readIfPresent() + value.platformVersion = try reader["PlatformVersion"].readIfPresent() + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.platformStatus = try reader["PlatformStatus"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.platformCategory = try reader["PlatformCategory"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.maintainer = try reader["Maintainer"].readIfPresent() + value.operatingSystemName = try reader["OperatingSystemName"].readIfPresent() + value.operatingSystemVersion = try reader["OperatingSystemVersion"].readIfPresent() + value.programmingLanguages = try reader["ProgrammingLanguages"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.PlatformProgrammingLanguage.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.frameworks = try reader["Frameworks"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.PlatformFramework.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.customAmiList = try reader["CustomAmiList"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.CustomAmi.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedTierList = try reader["SupportedTierList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedAddonList = try reader["SupportedAddonList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.platformLifecycleState = try reader["PlatformLifecycleState"].readIfPresent() + value.platformBranchName = try reader["PlatformBranchName"].readIfPresent() + value.platformBranchLifecycleState = try reader["PlatformBranchLifecycleState"].readIfPresent() + return value } - let platformLifecycleStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformLifecycleState) - platformLifecycleState = platformLifecycleStateDecoded - let platformBranchNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformBranchName) - platformBranchName = platformBranchNameDecoded - let platformBranchLifecycleStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformBranchLifecycleState) - platformBranchLifecycleState = platformBranchLifecycleStateDecoded } } @@ -9909,7 +7726,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.PlatformFilter: Swift.Codable { +extension ElasticBeanstalkClientTypes.PlatformFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case `operator` = "Operator" case type = "Type" @@ -9937,31 +7754,15 @@ extension ElasticBeanstalkClientTypes.PlatformFilter: Swift.Codable { } } } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .type) - type = typeDecoded - let operatorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operator) - `operator` = operatorDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.PlatformFilter() + value.type = try reader["Type"].readIfPresent() + value.`operator` = try reader["Operator"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9998,7 +7799,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.PlatformFramework: Swift.Codable { +extension ElasticBeanstalkClientTypes.PlatformFramework: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case version = "Version" @@ -10014,12 +7815,14 @@ extension ElasticBeanstalkClientTypes.PlatformFramework: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.PlatformFramework() + value.name = try reader["Name"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -10043,7 +7846,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.PlatformProgrammingLanguage: Swift.Codable { +extension ElasticBeanstalkClientTypes.PlatformProgrammingLanguage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case version = "Version" @@ -10059,12 +7862,14 @@ extension ElasticBeanstalkClientTypes.PlatformProgrammingLanguage: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.PlatformProgrammingLanguage() + value.name = try reader["Name"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -10129,7 +7934,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.PlatformSummary: Swift.Codable { +extension ElasticBeanstalkClientTypes.PlatformSummary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case operatingSystemName = "OperatingSystemName" case operatingSystemVersion = "OperatingSystemVersion" @@ -10203,66 +8008,24 @@ extension ElasticBeanstalkClientTypes.PlatformSummary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let platformOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformOwner) - platformOwner = platformOwnerDecoded - let platformStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.PlatformStatus.self, forKey: .platformStatus) - platformStatus = platformStatusDecoded - let platformCategoryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformCategory) - platformCategory = platformCategoryDecoded - let operatingSystemNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operatingSystemName) - operatingSystemName = operatingSystemNameDecoded - let operatingSystemVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operatingSystemVersion) - operatingSystemVersion = operatingSystemVersionDecoded - if containerValues.contains(.supportedTierList) { - struct KeyVal0{struct member{}} - let supportedTierListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedTierList) - if let supportedTierListWrappedContainer = supportedTierListWrappedContainer { - let supportedTierListContainer = try supportedTierListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedTierListBuffer:[Swift.String]? = nil - if let supportedTierListContainer = supportedTierListContainer { - supportedTierListBuffer = [Swift.String]() - for stringContainer0 in supportedTierListContainer { - supportedTierListBuffer?.append(stringContainer0) - } - } - supportedTierList = supportedTierListBuffer - } else { - supportedTierList = [] - } - } else { - supportedTierList = nil - } - if containerValues.contains(.supportedAddonList) { - struct KeyVal0{struct member{}} - let supportedAddonListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedAddonList) - if let supportedAddonListWrappedContainer = supportedAddonListWrappedContainer { - let supportedAddonListContainer = try supportedAddonListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedAddonListBuffer:[Swift.String]? = nil - if let supportedAddonListContainer = supportedAddonListContainer { - supportedAddonListBuffer = [Swift.String]() - for stringContainer0 in supportedAddonListContainer { - supportedAddonListBuffer?.append(stringContainer0) - } - } - supportedAddonList = supportedAddonListBuffer - } else { - supportedAddonList = [] - } - } else { - supportedAddonList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.PlatformSummary() + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.platformOwner = try reader["PlatformOwner"].readIfPresent() + value.platformStatus = try reader["PlatformStatus"].readIfPresent() + value.platformCategory = try reader["PlatformCategory"].readIfPresent() + value.operatingSystemName = try reader["OperatingSystemName"].readIfPresent() + value.operatingSystemVersion = try reader["OperatingSystemVersion"].readIfPresent() + value.supportedTierList = try reader["SupportedTierList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedAddonList = try reader["SupportedAddonList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.platformLifecycleState = try reader["PlatformLifecycleState"].readIfPresent() + value.platformVersion = try reader["PlatformVersion"].readIfPresent() + value.platformBranchName = try reader["PlatformBranchName"].readIfPresent() + value.platformBranchLifecycleState = try reader["PlatformBranchLifecycleState"].readIfPresent() + return value } - let platformLifecycleStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformLifecycleState) - platformLifecycleState = platformLifecycleStateDecoded - let platformVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformVersion) - platformVersion = platformVersionDecoded - let platformBranchNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformBranchName) - platformBranchName = platformBranchNameDecoded - let platformBranchLifecycleStateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformBranchLifecycleState) - platformBranchLifecycleState = platformBranchLifecycleStateDecoded } } @@ -10327,16 +8090,14 @@ extension ElasticBeanstalkClientTypes { } extension PlatformVersionStillReferencedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PlatformVersionStillReferencedException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10365,23 +8126,7 @@ public struct PlatformVersionStillReferencedException: ClientRuntime.ModeledErro } } -struct PlatformVersionStillReferencedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PlatformVersionStillReferencedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.Queue: Swift.Codable { +extension ElasticBeanstalkClientTypes.Queue: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case url = "URL" @@ -10397,12 +8142,14 @@ extension ElasticBeanstalkClientTypes.Queue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.Queue() + value.name = try reader["Name"].readIfPresent() + value.url = try reader["URL"].readIfPresent() + return value + } } } @@ -10427,6 +8174,11 @@ extension ElasticBeanstalkClientTypes { } extension RebuildEnvironmentInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -10464,28 +8216,12 @@ public struct RebuildEnvironmentInput: Swift.Equatable { } } -struct RebuildEnvironmentInputBody: Swift.Equatable { - let environmentId: Swift.String? - let environmentName: Swift.String? -} - -extension RebuildEnvironmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - } +extension RebuildEnvironmentOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - } -} - -extension RebuildEnvironmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RebuildEnvironmentOutput() + } } } @@ -10494,17 +8230,30 @@ public struct RebuildEnvironmentOutput: Swift.Equatable { public init() { } } -enum RebuildEnvironmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RebuildEnvironmentOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RequestEnvironmentInfoInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + case infoType = "InfoType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -10550,32 +8299,12 @@ public struct RequestEnvironmentInfoInput: Swift.Equatable { } } -struct RequestEnvironmentInfoInputBody: Swift.Equatable { - let environmentId: Swift.String? - let environmentName: Swift.String? - let infoType: ElasticBeanstalkClientTypes.EnvironmentInfoType? -} - -extension RequestEnvironmentInfoInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - case infoType = "InfoType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let infoTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentInfoType.self, forKey: .infoType) - infoType = infoTypeDecoded - } -} +extension RequestEnvironmentInfoOutput { -extension RequestEnvironmentInfoOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RequestEnvironmentInfoOutput() + } } } @@ -10584,26 +8313,31 @@ public struct RequestEnvironmentInfoOutput: Swift.Equatable { public init() { } } -enum RequestEnvironmentInfoOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RequestEnvironmentInfoOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResourceNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFoundException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10632,23 +8366,7 @@ public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -struct ResourceNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.ResourceQuota: Swift.Codable { +extension ElasticBeanstalkClientTypes.ResourceQuota: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maximum = "Maximum" } @@ -10660,10 +8378,13 @@ extension ElasticBeanstalkClientTypes.ResourceQuota: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maximumDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maximum) - maximum = maximumDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ResourceQuota() + value.maximum = try reader["Maximum"].readIfPresent() + return value + } } } @@ -10683,7 +8404,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.ResourceQuotas: Swift.Codable { +extension ElasticBeanstalkClientTypes.ResourceQuotas: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationQuota = "ApplicationQuota" case applicationVersionQuota = "ApplicationVersionQuota" @@ -10711,18 +8432,17 @@ extension ElasticBeanstalkClientTypes.ResourceQuotas: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationQuotaDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ResourceQuota.self, forKey: .applicationQuota) - applicationQuota = applicationQuotaDecoded - let applicationVersionQuotaDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ResourceQuota.self, forKey: .applicationVersionQuota) - applicationVersionQuota = applicationVersionQuotaDecoded - let environmentQuotaDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ResourceQuota.self, forKey: .environmentQuota) - environmentQuota = environmentQuotaDecoded - let configurationTemplateQuotaDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ResourceQuota.self, forKey: .configurationTemplateQuota) - configurationTemplateQuota = configurationTemplateQuotaDecoded - let customPlatformQuotaDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ResourceQuota.self, forKey: .customPlatformQuota) - customPlatformQuota = customPlatformQuotaDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ResourceQuotas() + value.applicationQuota = try reader["ApplicationQuota"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ResourceQuota.readingClosure) + value.applicationVersionQuota = try reader["ApplicationVersionQuota"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ResourceQuota.readingClosure) + value.environmentQuota = try reader["EnvironmentQuota"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ResourceQuota.readingClosure) + value.configurationTemplateQuota = try reader["ConfigurationTemplateQuota"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ResourceQuota.readingClosure) + value.customPlatformQuota = try reader["CustomPlatformQuota"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ResourceQuota.readingClosure) + return value + } } } @@ -10759,16 +8479,14 @@ extension ElasticBeanstalkClientTypes { } extension ResourceTypeNotSupportedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceTypeNotSupportedException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10797,23 +8515,12 @@ public struct ResourceTypeNotSupportedException: ClientRuntime.ModeledError, AWS } } -struct ResourceTypeNotSupportedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceTypeNotSupportedExceptionBody: Swift.Decodable { +extension RestartAppServerInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" } -} -extension RestartAppServerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -10851,28 +8558,12 @@ public struct RestartAppServerInput: Swift.Equatable { } } -struct RestartAppServerInputBody: Swift.Equatable { - let environmentId: Swift.String? - let environmentName: Swift.String? -} - -extension RestartAppServerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - } -} +extension RestartAppServerOutput { -extension RestartAppServerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RestartAppServerOutput() + } } } @@ -10881,16 +8572,29 @@ public struct RestartAppServerOutput: Swift.Equatable { public init() { } } -enum RestartAppServerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RestartAppServerOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RetrieveEnvironmentInfoInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + case infoType = "InfoType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -10936,38 +8640,15 @@ public struct RetrieveEnvironmentInfoInput: Swift.Equatable { } } -struct RetrieveEnvironmentInfoInputBody: Swift.Equatable { - let environmentId: Swift.String? - let environmentName: Swift.String? - let infoType: ElasticBeanstalkClientTypes.EnvironmentInfoType? -} - -extension RetrieveEnvironmentInfoInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - case infoType = "InfoType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let infoTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentInfoType.self, forKey: .infoType) - infoType = infoTypeDecoded - } -} +extension RetrieveEnvironmentInfoOutput { -extension RetrieveEnvironmentInfoOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RetrieveEnvironmentInfoOutputBody = try responseDecoder.decode(responseBody: data) - self.environmentInfo = output.environmentInfo - } else { - self.environmentInfo = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RetrieveEnvironmentInfoResult"] + var value = RetrieveEnvironmentInfoOutput() + value.environmentInfo = try reader["EnvironmentInfo"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.EnvironmentInfoDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10985,50 +8666,23 @@ public struct RetrieveEnvironmentInfoOutput: Swift.Equatable { } } -struct RetrieveEnvironmentInfoOutputBody: Swift.Equatable { - let environmentInfo: [ElasticBeanstalkClientTypes.EnvironmentInfoDescription]? -} +enum RetrieveEnvironmentInfoOutputError { -extension RetrieveEnvironmentInfoOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentInfo = "EnvironmentInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RetrieveEnvironmentInfoResult")) - if containerValues.contains(.environmentInfo) { - struct KeyVal0{struct member{}} - let environmentInfoWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environmentInfo) - if let environmentInfoWrappedContainer = environmentInfoWrappedContainer { - let environmentInfoContainer = try environmentInfoWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EnvironmentInfoDescription].self, forKey: .member) - var environmentInfoBuffer:[ElasticBeanstalkClientTypes.EnvironmentInfoDescription]? = nil - if let environmentInfoContainer = environmentInfoContainer { - environmentInfoBuffer = [ElasticBeanstalkClientTypes.EnvironmentInfoDescription]() - for structureContainer0 in environmentInfoContainer { - environmentInfoBuffer?.append(structureContainer0) - } - } - environmentInfo = environmentInfoBuffer - } else { - environmentInfo = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - environmentInfo = nil - } - } -} - -enum RetrieveEnvironmentInfoOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElasticBeanstalkClientTypes.S3Location: Swift.Codable { +extension ElasticBeanstalkClientTypes.S3Location: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case s3Bucket = "S3Bucket" case s3Key = "S3Key" @@ -11044,12 +8698,14 @@ extension ElasticBeanstalkClientTypes.S3Location: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3KeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Key) - s3Key = s3KeyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.S3Location() + value.s3Bucket = try reader["S3Bucket"].readIfPresent() + value.s3Key = try reader["S3Key"].readIfPresent() + return value + } } } @@ -11074,16 +8730,14 @@ extension ElasticBeanstalkClientTypes { } extension S3LocationNotInServiceRegionException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = S3LocationNotInServiceRegionException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11118,33 +8772,15 @@ public struct S3LocationNotInServiceRegionException: ClientRuntime.ModeledError, } } -struct S3LocationNotInServiceRegionExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension S3LocationNotInServiceRegionExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension S3SubscriptionRequiredException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = S3SubscriptionRequiredException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11173,23 +8809,7 @@ public struct S3SubscriptionRequiredException: ClientRuntime.ModeledError, AWSCl } } -struct S3SubscriptionRequiredExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension S3SubscriptionRequiredExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.SearchFilter: Swift.Codable { +extension ElasticBeanstalkClientTypes.SearchFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attribute = "Attribute" case `operator` = "Operator" @@ -11218,30 +8838,14 @@ extension ElasticBeanstalkClientTypes.SearchFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attribute) - attribute = attributeDecoded - let operatorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operator) - `operator` = operatorDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.SearchFilter() + value.attribute = try reader["Attribute"].readIfPresent() + value.`operator` = try reader["Operator"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11270,7 +8874,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.SingleInstanceHealth: Swift.Codable { +extension ElasticBeanstalkClientTypes.SingleInstanceHealth: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationMetrics = "ApplicationMetrics" case availabilityZone = "AvailabilityZone" @@ -11327,45 +8931,22 @@ extension ElasticBeanstalkClientTypes.SingleInstanceHealth: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let colorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .color) - color = colorDecoded - if containerValues.contains(.causes) { - struct KeyVal0{struct member{}} - let causesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .causes) - if let causesWrappedContainer = causesWrappedContainer { - let causesContainer = try causesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var causesBuffer:[Swift.String]? = nil - if let causesContainer = causesContainer { - causesBuffer = [Swift.String]() - for stringContainer0 in causesContainer { - causesBuffer?.append(stringContainer0) - } - } - causes = causesBuffer - } else { - causes = [] - } - } else { - causes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.SingleInstanceHealth() + value.instanceId = try reader["InstanceId"].readIfPresent() + value.healthStatus = try reader["HealthStatus"].readIfPresent() + value.color = try reader["Color"].readIfPresent() + value.causes = try reader["Causes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.launchedAt = try reader["LaunchedAt"].readTimestampIfPresent(format: .dateTime) + value.applicationMetrics = try reader["ApplicationMetrics"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationMetrics.readingClosure) + value.system = try reader["System"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.SystemStatus.readingClosure) + value.deployment = try reader["Deployment"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.Deployment.readingClosure) + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.instanceType = try reader["InstanceType"].readIfPresent() + return value } - let launchedAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .launchedAt) - launchedAt = launchedAtDecoded - let applicationMetricsDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationMetrics.self, forKey: .applicationMetrics) - applicationMetrics = applicationMetricsDecoded - let systemDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.SystemStatus.self, forKey: .system) - system = systemDecoded - let deploymentDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.Deployment.self, forKey: .deployment) - deployment = deploymentDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let instanceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceType) - instanceType = instanceTypeDecoded } } @@ -11421,7 +9002,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.SolutionStackDescription: Swift.Codable { +extension ElasticBeanstalkClientTypes.SolutionStackDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case permittedFileTypes = "PermittedFileTypes" case solutionStackName = "SolutionStackName" @@ -11446,28 +9027,13 @@ extension ElasticBeanstalkClientTypes.SolutionStackDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - if containerValues.contains(.permittedFileTypes) { - struct KeyVal0{struct member{}} - let permittedFileTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .permittedFileTypes) - if let permittedFileTypesWrappedContainer = permittedFileTypesWrappedContainer { - let permittedFileTypesContainer = try permittedFileTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var permittedFileTypesBuffer:[Swift.String]? = nil - if let permittedFileTypesContainer = permittedFileTypesContainer { - permittedFileTypesBuffer = [Swift.String]() - for stringContainer0 in permittedFileTypesContainer { - permittedFileTypesBuffer?.append(stringContainer0) - } - } - permittedFileTypes = permittedFileTypesBuffer - } else { - permittedFileTypes = [] - } - } else { - permittedFileTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.SolutionStackDescription() + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.permittedFileTypes = try reader["PermittedFileTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11492,7 +9058,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.SourceBuildInformation: Swift.Codable { +extension ElasticBeanstalkClientTypes.SourceBuildInformation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case sourceLocation = "SourceLocation" case sourceRepository = "SourceRepository" @@ -11512,14 +9078,15 @@ extension ElasticBeanstalkClientTypes.SourceBuildInformation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let sourceRepositoryDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.SourceRepository.self, forKey: .sourceRepository) - sourceRepository = sourceRepositoryDecoded - let sourceLocationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceLocation) - sourceLocation = sourceLocationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.SourceBuildInformation() + value.sourceType = try reader["SourceType"].readIfPresent() + value.sourceRepository = try reader["SourceRepository"].readIfPresent() + value.sourceLocation = try reader["SourceLocation"].readIfPresent() + return value + } } } @@ -11563,16 +9130,14 @@ extension ElasticBeanstalkClientTypes { } extension SourceBundleDeletionException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SourceBundleDeletionException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11601,23 +9166,7 @@ public struct SourceBundleDeletionException: ClientRuntime.ModeledError, AWSClie } } -struct SourceBundleDeletionExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension SourceBundleDeletionExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.SourceConfiguration: Swift.Codable { +extension ElasticBeanstalkClientTypes.SourceConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationName = "ApplicationName" case templateName = "TemplateName" @@ -11633,12 +9182,14 @@ extension ElasticBeanstalkClientTypes.SourceConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.SourceConfiguration() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + return value + } } } @@ -11726,7 +9277,7 @@ extension ElasticBeanstalkClientTypes { } } -extension ElasticBeanstalkClientTypes.StatusCodes: Swift.Codable { +extension ElasticBeanstalkClientTypes.StatusCodes: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case status2xx = "Status2xx" case status3xx = "Status3xx" @@ -11750,16 +9301,16 @@ extension ElasticBeanstalkClientTypes.StatusCodes: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let status2xxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .status2xx) - status2xx = status2xxDecoded - let status3xxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .status3xx) - status3xx = status3xxDecoded - let status4xxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .status4xx) - status4xx = status4xxDecoded - let status5xxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .status5xx) - status5xx = status5xxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.StatusCodes() + value.status2xx = try reader["Status2xx"].readIfPresent() + value.status3xx = try reader["Status3xx"].readIfPresent() + value.status4xx = try reader["Status4xx"].readIfPresent() + value.status5xx = try reader["Status5xx"].readIfPresent() + return value + } } } @@ -11792,6 +9343,13 @@ extension ElasticBeanstalkClientTypes { } extension SwapEnvironmentCNAMEsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case destinationEnvironmentId = "DestinationEnvironmentId" + case destinationEnvironmentName = "DestinationEnvironmentName" + case sourceEnvironmentId = "SourceEnvironmentId" + case sourceEnvironmentName = "SourceEnvironmentName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let destinationEnvironmentId = destinationEnvironmentId { @@ -11843,36 +9401,12 @@ public struct SwapEnvironmentCNAMEsInput: Swift.Equatable { } } -struct SwapEnvironmentCNAMEsInputBody: Swift.Equatable { - let sourceEnvironmentId: Swift.String? - let sourceEnvironmentName: Swift.String? - let destinationEnvironmentId: Swift.String? - let destinationEnvironmentName: Swift.String? -} - -extension SwapEnvironmentCNAMEsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destinationEnvironmentId = "DestinationEnvironmentId" - case destinationEnvironmentName = "DestinationEnvironmentName" - case sourceEnvironmentId = "SourceEnvironmentId" - case sourceEnvironmentName = "SourceEnvironmentName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceEnvironmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceEnvironmentId) - sourceEnvironmentId = sourceEnvironmentIdDecoded - let sourceEnvironmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceEnvironmentName) - sourceEnvironmentName = sourceEnvironmentNameDecoded - let destinationEnvironmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationEnvironmentId) - destinationEnvironmentId = destinationEnvironmentIdDecoded - let destinationEnvironmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationEnvironmentName) - destinationEnvironmentName = destinationEnvironmentNameDecoded - } -} +extension SwapEnvironmentCNAMEsOutput { -extension SwapEnvironmentCNAMEsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SwapEnvironmentCNAMEsOutput() + } } } @@ -11881,16 +9415,23 @@ public struct SwapEnvironmentCNAMEsOutput: Swift.Equatable { public init() { } } -enum SwapEnvironmentCNAMEsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SwapEnvironmentCNAMEsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElasticBeanstalkClientTypes.SystemStatus: Swift.Codable { +extension ElasticBeanstalkClientTypes.SystemStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cpuUtilization = "CPUUtilization" case loadAverage = "LoadAverage" @@ -11915,28 +9456,13 @@ extension ElasticBeanstalkClientTypes.SystemStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cpuUtilizationDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.CPUUtilization.self, forKey: .cpuUtilization) - cpuUtilization = cpuUtilizationDecoded - if containerValues.contains(.loadAverage) { - struct KeyVal0{struct member{}} - let loadAverageWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadAverage) - if let loadAverageWrappedContainer = loadAverageWrappedContainer { - let loadAverageContainer = try loadAverageWrappedContainer.decodeIfPresent([Swift.Double].self, forKey: .member) - var loadAverageBuffer:[Swift.Double]? = nil - if let loadAverageContainer = loadAverageContainer { - loadAverageBuffer = [Swift.Double]() - for doubleContainer0 in loadAverageContainer { - loadAverageBuffer?.append(doubleContainer0) - } - } - loadAverage = loadAverageBuffer - } else { - loadAverage = [] - } - } else { - loadAverage = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.SystemStatus() + value.cpuUtilization = try reader["CPUUtilization"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.CPUUtilization.readingClosure) + value.loadAverage = try reader["LoadAverage"].readListIfPresent(memberReadingClosure: Swift.Double.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11961,7 +9487,7 @@ extension ElasticBeanstalkClientTypes { } -extension ElasticBeanstalkClientTypes.Tag: Swift.Codable { +extension ElasticBeanstalkClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -11977,12 +9503,14 @@ extension ElasticBeanstalkClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -12007,6 +9535,13 @@ extension ElasticBeanstalkClientTypes { } extension TerminateEnvironmentInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case environmentId = "EnvironmentId" + case environmentName = "EnvironmentName" + case forceTerminate = "ForceTerminate" + case terminateResources = "TerminateResources" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let environmentId = environmentId { @@ -12065,82 +9600,35 @@ public struct TerminateEnvironmentInput: Swift.Equatable { } } -struct TerminateEnvironmentInputBody: Swift.Equatable { - let environmentId: Swift.String? - let environmentName: Swift.String? - let terminateResources: Swift.Bool? - let forceTerminate: Swift.Bool? -} - -extension TerminateEnvironmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - case forceTerminate = "ForceTerminate" - case terminateResources = "TerminateResources" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let terminateResourcesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .terminateResources) - terminateResources = terminateResourcesDecoded - let forceTerminateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forceTerminate) - forceTerminate = forceTerminateDecoded - } -} - -extension TerminateEnvironmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TerminateEnvironmentOutputBody = try responseDecoder.decode(responseBody: data) - self.abortableOperationInProgress = output.abortableOperationInProgress - self.applicationName = output.applicationName - self.cname = output.cname - self.dateCreated = output.dateCreated - self.dateUpdated = output.dateUpdated - self.description = output.description - self.endpointURL = output.endpointURL - self.environmentArn = output.environmentArn - self.environmentId = output.environmentId - self.environmentLinks = output.environmentLinks - self.environmentName = output.environmentName - self.health = output.health - self.healthStatus = output.healthStatus - self.operationsRole = output.operationsRole - self.platformArn = output.platformArn - self.resources = output.resources - self.solutionStackName = output.solutionStackName - self.status = output.status - self.templateName = output.templateName - self.tier = output.tier - self.versionLabel = output.versionLabel - } else { - self.abortableOperationInProgress = nil - self.applicationName = nil - self.cname = nil - self.dateCreated = nil - self.dateUpdated = nil - self.description = nil - self.endpointURL = nil - self.environmentArn = nil - self.environmentId = nil - self.environmentLinks = nil - self.environmentName = nil - self.health = nil - self.healthStatus = nil - self.operationsRole = nil - self.platformArn = nil - self.resources = nil - self.solutionStackName = nil - self.status = nil - self.templateName = nil - self.tier = nil - self.versionLabel = nil +extension TerminateEnvironmentOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["TerminateEnvironmentResult"] + var value = TerminateEnvironmentOutput() + value.abortableOperationInProgress = try reader["AbortableOperationInProgress"].readIfPresent() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.cname = try reader["CNAME"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + value.endpointURL = try reader["EndpointURL"].readIfPresent() + value.environmentArn = try reader["EnvironmentArn"].readIfPresent() + value.environmentId = try reader["EnvironmentId"].readIfPresent() + value.environmentLinks = try reader["EnvironmentLinks"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.EnvironmentLink.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.health = try reader["Health"].readIfPresent() + value.healthStatus = try reader["HealthStatus"].readIfPresent() + value.operationsRole = try reader["OperationsRole"].readIfPresent() + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.resources = try reader["Resources"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentResourcesDescription.readingClosure) + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + value.tier = try reader["Tier"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentTier.readingClosure) + value.versionLabel = try reader["VersionLabel"].readIfPresent() + return value } } } @@ -12259,141 +9747,32 @@ public struct TerminateEnvironmentOutput: Swift.Equatable { } } -struct TerminateEnvironmentOutputBody: Swift.Equatable { - let environmentName: Swift.String? - let environmentId: Swift.String? - let applicationName: Swift.String? - let versionLabel: Swift.String? - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let templateName: Swift.String? - let description: Swift.String? - let endpointURL: Swift.String? - let cname: Swift.String? - let dateCreated: ClientRuntime.Date? - let dateUpdated: ClientRuntime.Date? - let status: ElasticBeanstalkClientTypes.EnvironmentStatus? - let abortableOperationInProgress: Swift.Bool? - let health: ElasticBeanstalkClientTypes.EnvironmentHealth? - let healthStatus: ElasticBeanstalkClientTypes.EnvironmentHealthStatus? - let resources: ElasticBeanstalkClientTypes.EnvironmentResourcesDescription? - let tier: ElasticBeanstalkClientTypes.EnvironmentTier? - let environmentLinks: [ElasticBeanstalkClientTypes.EnvironmentLink]? - let environmentArn: Swift.String? - let operationsRole: Swift.String? -} - -extension TerminateEnvironmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case abortableOperationInProgress = "AbortableOperationInProgress" - case applicationName = "ApplicationName" - case cname = "CNAME" - case dateCreated = "DateCreated" - case dateUpdated = "DateUpdated" - case description = "Description" - case endpointURL = "EndpointURL" - case environmentArn = "EnvironmentArn" - case environmentId = "EnvironmentId" - case environmentLinks = "EnvironmentLinks" - case environmentName = "EnvironmentName" - case health = "Health" - case healthStatus = "HealthStatus" - case operationsRole = "OperationsRole" - case platformArn = "PlatformArn" - case resources = "Resources" - case solutionStackName = "SolutionStackName" - case status = "Status" - case templateName = "TemplateName" - case tier = "Tier" - case versionLabel = "VersionLabel" - } +enum TerminateEnvironmentOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("TerminateEnvironmentResult")) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let endpointURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointURL) - endpointURL = endpointURLDecoded - let cnameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cname) - cname = cnameDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentStatus.self, forKey: .status) - status = statusDecoded - let abortableOperationInProgressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .abortableOperationInProgress) - abortableOperationInProgress = abortableOperationInProgressDecoded - let healthDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealth.self, forKey: .health) - health = healthDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealthStatus.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let resourcesDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentResourcesDescription.self, forKey: .resources) - resources = resourcesDecoded - let tierDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentTier.self, forKey: .tier) - tier = tierDecoded - if containerValues.contains(.environmentLinks) { - struct KeyVal0{struct member{}} - let environmentLinksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environmentLinks) - if let environmentLinksWrappedContainer = environmentLinksWrappedContainer { - let environmentLinksContainer = try environmentLinksWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EnvironmentLink].self, forKey: .member) - var environmentLinksBuffer:[ElasticBeanstalkClientTypes.EnvironmentLink]? = nil - if let environmentLinksContainer = environmentLinksContainer { - environmentLinksBuffer = [ElasticBeanstalkClientTypes.EnvironmentLink]() - for structureContainer0 in environmentLinksContainer { - environmentLinksBuffer?.append(structureContainer0) - } - } - environmentLinks = environmentLinksBuffer - } else { - environmentLinks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - environmentLinks = nil - } - let environmentArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentArn) - environmentArn = environmentArnDecoded - let operationsRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationsRole) - operationsRole = operationsRoleDecoded - } -} - -enum TerminateEnvironmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension TooManyApplicationVersionsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyApplicationVersionsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12422,33 +9801,15 @@ public struct TooManyApplicationVersionsException: ClientRuntime.ModeledError, A } } -struct TooManyApplicationVersionsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyApplicationVersionsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyApplicationsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyApplicationsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12477,33 +9838,15 @@ public struct TooManyApplicationsException: ClientRuntime.ModeledError, AWSClien } } -struct TooManyApplicationsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyApplicationsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyBucketsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyBucketsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12521,44 +9864,26 @@ public struct TooManyBucketsException: ClientRuntime.ModeledError, AWSClientRunt public static var isRetryable: Swift.Bool { false } public static var isThrottling: Swift.Bool { false } public internal(set) var httpResponse = HttpResponse() - public internal(set) var message: Swift.String? - public internal(set) var requestID: Swift.String? - - public init( - message: Swift.String? = nil - ) - { - self.properties.message = message - } -} - -struct TooManyBucketsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyBucketsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message } } extension TooManyConfigurationTemplatesException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyConfigurationTemplatesException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12587,33 +9912,15 @@ public struct TooManyConfigurationTemplatesException: ClientRuntime.ModeledError } } -struct TooManyConfigurationTemplatesExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyConfigurationTemplatesExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyEnvironmentsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyEnvironmentsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12642,33 +9949,15 @@ public struct TooManyEnvironmentsException: ClientRuntime.ModeledError, AWSClien } } -struct TooManyEnvironmentsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyEnvironmentsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyPlatformsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyPlatformsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12697,33 +9986,15 @@ public struct TooManyPlatformsException: ClientRuntime.ModeledError, AWSClientRu } } -struct TooManyPlatformsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyPlatformsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyTagsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTagsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12752,23 +10023,7 @@ public struct TooManyTagsException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct TooManyTagsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTagsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticBeanstalkClientTypes.Trigger: Swift.Codable { +extension ElasticBeanstalkClientTypes.Trigger: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -12780,10 +10035,13 @@ extension ElasticBeanstalkClientTypes.Trigger: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.Trigger() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -12804,6 +10062,11 @@ extension ElasticBeanstalkClientTypes { } extension UpdateApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case description = "Description" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -12842,34 +10105,15 @@ public struct UpdateApplicationInput: Swift.Equatable { } } -struct UpdateApplicationInputBody: Swift.Equatable { - let applicationName: Swift.String? - let description: Swift.String? -} - -extension UpdateApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case description = "Description" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - } -} +extension UpdateApplicationOutput { -extension UpdateApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateApplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.application = output.application - } else { - self.application = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateApplicationResult"] + var value = UpdateApplicationOutput() + value.application = try reader["Application"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationDescription.readingClosure) + return value } } } @@ -12887,33 +10131,28 @@ public struct UpdateApplicationOutput: Swift.Equatable { } } -struct UpdateApplicationOutputBody: Swift.Equatable { - let application: ElasticBeanstalkClientTypes.ApplicationDescription? -} - -extension UpdateApplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case application = "Application" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateApplicationResult")) - let applicationDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationDescription.self, forKey: .application) - application = applicationDecoded - } -} +enum UpdateApplicationOutputError { -enum UpdateApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateApplicationResourceLifecycleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case resourceLifecycleConfig = "ResourceLifecycleConfig" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -12952,36 +10191,16 @@ public struct UpdateApplicationResourceLifecycleInput: Swift.Equatable { } } -struct UpdateApplicationResourceLifecycleInputBody: Swift.Equatable { - let applicationName: Swift.String? - let resourceLifecycleConfig: ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig? -} - -extension UpdateApplicationResourceLifecycleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case resourceLifecycleConfig = "ResourceLifecycleConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let resourceLifecycleConfigDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig.self, forKey: .resourceLifecycleConfig) - resourceLifecycleConfig = resourceLifecycleConfigDecoded - } -} +extension UpdateApplicationResourceLifecycleOutput { -extension UpdateApplicationResourceLifecycleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateApplicationResourceLifecycleOutputBody = try responseDecoder.decode(responseBody: data) - self.applicationName = output.applicationName - self.resourceLifecycleConfig = output.resourceLifecycleConfig - } else { - self.applicationName = nil - self.resourceLifecycleConfig = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateApplicationResourceLifecycleResult"] + var value = UpdateApplicationResourceLifecycleOutput() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.resourceLifecycleConfig = try reader["ResourceLifecycleConfig"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig.readingClosure) + return value } } } @@ -13002,38 +10221,30 @@ public struct UpdateApplicationResourceLifecycleOutput: Swift.Equatable { } } -struct UpdateApplicationResourceLifecycleOutputBody: Swift.Equatable { - let applicationName: Swift.String? - let resourceLifecycleConfig: ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig? -} - -extension UpdateApplicationResourceLifecycleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case resourceLifecycleConfig = "ResourceLifecycleConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateApplicationResourceLifecycleResult")) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let resourceLifecycleConfigDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationResourceLifecycleConfig.self, forKey: .resourceLifecycleConfig) - resourceLifecycleConfig = resourceLifecycleConfigDecoded - } -} +enum UpdateApplicationResourceLifecycleOutputError { -enum UpdateApplicationResourceLifecycleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateApplicationVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case description = "Description" + case versionLabel = "VersionLabel" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -13080,38 +10291,15 @@ public struct UpdateApplicationVersionInput: Swift.Equatable { } } -struct UpdateApplicationVersionInputBody: Swift.Equatable { - let applicationName: Swift.String? - let versionLabel: Swift.String? - let description: Swift.String? -} - -extension UpdateApplicationVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case description = "Description" - case versionLabel = "VersionLabel" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - } -} +extension UpdateApplicationVersionOutput { -extension UpdateApplicationVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateApplicationVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.applicationVersion = output.applicationVersion - } else { - self.applicationVersion = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateApplicationVersionResult"] + var value = UpdateApplicationVersionOutput() + value.applicationVersion = try reader["ApplicationVersion"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.ApplicationVersionDescription.readingClosure) + return value } } } @@ -13129,33 +10317,31 @@ public struct UpdateApplicationVersionOutput: Swift.Equatable { } } -struct UpdateApplicationVersionOutputBody: Swift.Equatable { - let applicationVersion: ElasticBeanstalkClientTypes.ApplicationVersionDescription? -} - -extension UpdateApplicationVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationVersion = "ApplicationVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateApplicationVersionResult")) - let applicationVersionDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ApplicationVersionDescription.self, forKey: .applicationVersion) - applicationVersion = applicationVersionDecoded - } -} +enum UpdateApplicationVersionOutputError { -enum UpdateApplicationVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateConfigurationTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case description = "Description" + case optionSettings = "OptionSettings" + case optionsToRemove = "OptionsToRemove" + case templateName = "TemplateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -13234,98 +10420,24 @@ public struct UpdateConfigurationTemplateInput: Swift.Equatable { } } -struct UpdateConfigurationTemplateInputBody: Swift.Equatable { - let applicationName: Swift.String? - let templateName: Swift.String? - let description: Swift.String? - let optionSettings: [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? - let optionsToRemove: [ElasticBeanstalkClientTypes.OptionSpecification]? -} - -extension UpdateConfigurationTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case description = "Description" - case optionSettings = "OptionSettings" - case optionsToRemove = "OptionsToRemove" - case templateName = "TemplateName" - } +extension UpdateConfigurationTemplateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - if containerValues.contains(.optionsToRemove) { - struct KeyVal0{struct member{}} - let optionsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionsToRemove) - if let optionsToRemoveWrappedContainer = optionsToRemoveWrappedContainer { - let optionsToRemoveContainer = try optionsToRemoveWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.OptionSpecification].self, forKey: .member) - var optionsToRemoveBuffer:[ElasticBeanstalkClientTypes.OptionSpecification]? = nil - if let optionsToRemoveContainer = optionsToRemoveContainer { - optionsToRemoveBuffer = [ElasticBeanstalkClientTypes.OptionSpecification]() - for structureContainer0 in optionsToRemoveContainer { - optionsToRemoveBuffer?.append(structureContainer0) - } - } - optionsToRemove = optionsToRemoveBuffer - } else { - optionsToRemove = [] - } - } else { - optionsToRemove = nil - } - } -} - -extension UpdateConfigurationTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateConfigurationTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.applicationName = output.applicationName - self.dateCreated = output.dateCreated - self.dateUpdated = output.dateUpdated - self.deploymentStatus = output.deploymentStatus - self.description = output.description - self.environmentName = output.environmentName - self.optionSettings = output.optionSettings - self.platformArn = output.platformArn - self.solutionStackName = output.solutionStackName - self.templateName = output.templateName - } else { - self.applicationName = nil - self.dateCreated = nil - self.dateUpdated = nil - self.deploymentStatus = nil - self.description = nil - self.environmentName = nil - self.optionSettings = nil - self.platformArn = nil - self.solutionStackName = nil - self.templateName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateConfigurationTemplateResult"] + var value = UpdateConfigurationTemplateOutput() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.deploymentStatus = try reader["DeploymentStatus"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.optionSettings = try reader["OptionSettings"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ConfigurationOptionSetting.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + return value } } } @@ -13387,88 +10499,40 @@ public struct UpdateConfigurationTemplateOutput: Swift.Equatable { } } -struct UpdateConfigurationTemplateOutputBody: Swift.Equatable { - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let applicationName: Swift.String? - let templateName: Swift.String? - let description: Swift.String? - let environmentName: Swift.String? - let deploymentStatus: ElasticBeanstalkClientTypes.ConfigurationDeploymentStatus? - let dateCreated: ClientRuntime.Date? - let dateUpdated: ClientRuntime.Date? - let optionSettings: [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? +enum UpdateConfigurationTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyBucketsException": return try await TooManyBucketsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } } -extension UpdateConfigurationTemplateOutputBody: Swift.Decodable { +extension UpdateEnvironmentInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applicationName = "ApplicationName" - case dateCreated = "DateCreated" - case dateUpdated = "DateUpdated" - case deploymentStatus = "DeploymentStatus" case description = "Description" + case environmentId = "EnvironmentId" case environmentName = "EnvironmentName" + case groupName = "GroupName" case optionSettings = "OptionSettings" + case optionsToRemove = "OptionsToRemove" case platformArn = "PlatformArn" case solutionStackName = "SolutionStackName" case templateName = "TemplateName" + case tier = "Tier" + case versionLabel = "VersionLabel" } - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateConfigurationTemplateResult")) - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let deploymentStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ConfigurationDeploymentStatus.self, forKey: .deploymentStatus) - deploymentStatus = deploymentStatusDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - } -} - -enum UpdateConfigurationTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyBucketsException": return try await TooManyBucketsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension UpdateEnvironmentInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -13594,148 +10658,35 @@ public struct UpdateEnvironmentInput: Swift.Equatable { } } -struct UpdateEnvironmentInputBody: Swift.Equatable { - let applicationName: Swift.String? - let environmentId: Swift.String? - let environmentName: Swift.String? - let groupName: Swift.String? - let description: Swift.String? - let tier: ElasticBeanstalkClientTypes.EnvironmentTier? - let versionLabel: Swift.String? - let templateName: Swift.String? - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let optionSettings: [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? - let optionsToRemove: [ElasticBeanstalkClientTypes.OptionSpecification]? -} - -extension UpdateEnvironmentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case description = "Description" - case environmentId = "EnvironmentId" - case environmentName = "EnvironmentName" - case groupName = "GroupName" - case optionSettings = "OptionSettings" - case optionsToRemove = "OptionsToRemove" - case platformArn = "PlatformArn" - case solutionStackName = "SolutionStackName" - case templateName = "TemplateName" - case tier = "Tier" - case versionLabel = "VersionLabel" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let tierDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentTier.self, forKey: .tier) - tier = tierDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - if containerValues.contains(.optionsToRemove) { - struct KeyVal0{struct member{}} - let optionsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionsToRemove) - if let optionsToRemoveWrappedContainer = optionsToRemoveWrappedContainer { - let optionsToRemoveContainer = try optionsToRemoveWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.OptionSpecification].self, forKey: .member) - var optionsToRemoveBuffer:[ElasticBeanstalkClientTypes.OptionSpecification]? = nil - if let optionsToRemoveContainer = optionsToRemoveContainer { - optionsToRemoveBuffer = [ElasticBeanstalkClientTypes.OptionSpecification]() - for structureContainer0 in optionsToRemoveContainer { - optionsToRemoveBuffer?.append(structureContainer0) - } - } - optionsToRemove = optionsToRemoveBuffer - } else { - optionsToRemove = [] - } - } else { - optionsToRemove = nil - } - } -} - -extension UpdateEnvironmentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateEnvironmentOutputBody = try responseDecoder.decode(responseBody: data) - self.abortableOperationInProgress = output.abortableOperationInProgress - self.applicationName = output.applicationName - self.cname = output.cname - self.dateCreated = output.dateCreated - self.dateUpdated = output.dateUpdated - self.description = output.description - self.endpointURL = output.endpointURL - self.environmentArn = output.environmentArn - self.environmentId = output.environmentId - self.environmentLinks = output.environmentLinks - self.environmentName = output.environmentName - self.health = output.health - self.healthStatus = output.healthStatus - self.operationsRole = output.operationsRole - self.platformArn = output.platformArn - self.resources = output.resources - self.solutionStackName = output.solutionStackName - self.status = output.status - self.templateName = output.templateName - self.tier = output.tier - self.versionLabel = output.versionLabel - } else { - self.abortableOperationInProgress = nil - self.applicationName = nil - self.cname = nil - self.dateCreated = nil - self.dateUpdated = nil - self.description = nil - self.endpointURL = nil - self.environmentArn = nil - self.environmentId = nil - self.environmentLinks = nil - self.environmentName = nil - self.health = nil - self.healthStatus = nil - self.operationsRole = nil - self.platformArn = nil - self.resources = nil - self.solutionStackName = nil - self.status = nil - self.templateName = nil - self.tier = nil - self.versionLabel = nil +extension UpdateEnvironmentOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateEnvironmentResult"] + var value = UpdateEnvironmentOutput() + value.abortableOperationInProgress = try reader["AbortableOperationInProgress"].readIfPresent() + value.applicationName = try reader["ApplicationName"].readIfPresent() + value.cname = try reader["CNAME"].readIfPresent() + value.dateCreated = try reader["DateCreated"].readTimestampIfPresent(format: .dateTime) + value.dateUpdated = try reader["DateUpdated"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + value.endpointURL = try reader["EndpointURL"].readIfPresent() + value.environmentArn = try reader["EnvironmentArn"].readIfPresent() + value.environmentId = try reader["EnvironmentId"].readIfPresent() + value.environmentLinks = try reader["EnvironmentLinks"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.EnvironmentLink.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.environmentName = try reader["EnvironmentName"].readIfPresent() + value.health = try reader["Health"].readIfPresent() + value.healthStatus = try reader["HealthStatus"].readIfPresent() + value.operationsRole = try reader["OperationsRole"].readIfPresent() + value.platformArn = try reader["PlatformArn"].readIfPresent() + value.resources = try reader["Resources"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentResourcesDescription.readingClosure) + value.solutionStackName = try reader["SolutionStackName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + value.tier = try reader["Tier"].readIfPresent(readingClosure: ElasticBeanstalkClientTypes.EnvironmentTier.readingClosure) + value.versionLabel = try reader["VersionLabel"].readIfPresent() + return value } } } @@ -13854,132 +10805,31 @@ public struct UpdateEnvironmentOutput: Swift.Equatable { } } -struct UpdateEnvironmentOutputBody: Swift.Equatable { - let environmentName: Swift.String? - let environmentId: Swift.String? - let applicationName: Swift.String? - let versionLabel: Swift.String? - let solutionStackName: Swift.String? - let platformArn: Swift.String? - let templateName: Swift.String? - let description: Swift.String? - let endpointURL: Swift.String? - let cname: Swift.String? - let dateCreated: ClientRuntime.Date? - let dateUpdated: ClientRuntime.Date? - let status: ElasticBeanstalkClientTypes.EnvironmentStatus? - let abortableOperationInProgress: Swift.Bool? - let health: ElasticBeanstalkClientTypes.EnvironmentHealth? - let healthStatus: ElasticBeanstalkClientTypes.EnvironmentHealthStatus? - let resources: ElasticBeanstalkClientTypes.EnvironmentResourcesDescription? - let tier: ElasticBeanstalkClientTypes.EnvironmentTier? - let environmentLinks: [ElasticBeanstalkClientTypes.EnvironmentLink]? - let environmentArn: Swift.String? - let operationsRole: Swift.String? -} - -extension UpdateEnvironmentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case abortableOperationInProgress = "AbortableOperationInProgress" - case applicationName = "ApplicationName" - case cname = "CNAME" - case dateCreated = "DateCreated" - case dateUpdated = "DateUpdated" - case description = "Description" - case endpointURL = "EndpointURL" - case environmentArn = "EnvironmentArn" - case environmentId = "EnvironmentId" - case environmentLinks = "EnvironmentLinks" - case environmentName = "EnvironmentName" - case health = "Health" - case healthStatus = "HealthStatus" - case operationsRole = "OperationsRole" - case platformArn = "PlatformArn" - case resources = "Resources" - case solutionStackName = "SolutionStackName" - case status = "Status" - case templateName = "TemplateName" - case tier = "Tier" - case versionLabel = "VersionLabel" - } +enum UpdateEnvironmentOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateEnvironmentResult")) - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - let environmentIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentId) - environmentId = environmentIdDecoded - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let versionLabelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionLabel) - versionLabel = versionLabelDecoded - let solutionStackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .solutionStackName) - solutionStackName = solutionStackNameDecoded - let platformArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformArn) - platformArn = platformArnDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let endpointURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointURL) - endpointURL = endpointURLDecoded - let cnameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cname) - cname = cnameDecoded - let dateCreatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateCreated) - dateCreated = dateCreatedDecoded - let dateUpdatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .dateUpdated) - dateUpdated = dateUpdatedDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentStatus.self, forKey: .status) - status = statusDecoded - let abortableOperationInProgressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .abortableOperationInProgress) - abortableOperationInProgress = abortableOperationInProgressDecoded - let healthDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealth.self, forKey: .health) - health = healthDecoded - let healthStatusDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentHealthStatus.self, forKey: .healthStatus) - healthStatus = healthStatusDecoded - let resourcesDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentResourcesDescription.self, forKey: .resources) - resources = resourcesDecoded - let tierDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.EnvironmentTier.self, forKey: .tier) - tier = tierDecoded - if containerValues.contains(.environmentLinks) { - struct KeyVal0{struct member{}} - let environmentLinksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .environmentLinks) - if let environmentLinksWrappedContainer = environmentLinksWrappedContainer { - let environmentLinksContainer = try environmentLinksWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.EnvironmentLink].self, forKey: .member) - var environmentLinksBuffer:[ElasticBeanstalkClientTypes.EnvironmentLink]? = nil - if let environmentLinksContainer = environmentLinksContainer { - environmentLinksBuffer = [ElasticBeanstalkClientTypes.EnvironmentLink]() - for structureContainer0 in environmentLinksContainer { - environmentLinksBuffer?.append(structureContainer0) - } - } - environmentLinks = environmentLinksBuffer - } else { - environmentLinks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyBucketsException": return try await TooManyBucketsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - environmentLinks = nil } - let environmentArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentArn) - environmentArn = environmentArnDecoded - let operationsRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationsRole) - operationsRole = operationsRoleDecoded } } -enum UpdateEnvironmentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyBucketsException": return try await TooManyBucketsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension UpdateTagsForResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" + case tagsToAdd = "TagsToAdd" + case tagsToRemove = "TagsToRemove" } -} -extension UpdateTagsForResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -14042,89 +10892,49 @@ public struct UpdateTagsForResourceInput: Swift.Equatable { } } -struct UpdateTagsForResourceInputBody: Swift.Equatable { - let resourceArn: Swift.String? - let tagsToAdd: [ElasticBeanstalkClientTypes.Tag]? - let tagsToRemove: [Swift.String]? -} - -extension UpdateTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - case tagsToAdd = "TagsToAdd" - case tagsToRemove = "TagsToRemove" - } +extension UpdateTagsForResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - if containerValues.contains(.tagsToAdd) { - struct KeyVal0{struct member{}} - let tagsToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagsToAdd) - if let tagsToAddWrappedContainer = tagsToAddWrappedContainer { - let tagsToAddContainer = try tagsToAddWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.Tag].self, forKey: .member) - var tagsToAddBuffer:[ElasticBeanstalkClientTypes.Tag]? = nil - if let tagsToAddContainer = tagsToAddContainer { - tagsToAddBuffer = [ElasticBeanstalkClientTypes.Tag]() - for structureContainer0 in tagsToAddContainer { - tagsToAddBuffer?.append(structureContainer0) - } - } - tagsToAdd = tagsToAddBuffer - } else { - tagsToAdd = [] - } - } else { - tagsToAdd = nil - } - if containerValues.contains(.tagsToRemove) { - struct KeyVal0{struct member{}} - let tagsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagsToRemove) - if let tagsToRemoveWrappedContainer = tagsToRemoveWrappedContainer { - let tagsToRemoveContainer = try tagsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagsToRemoveBuffer:[Swift.String]? = nil - if let tagsToRemoveContainer = tagsToRemoveContainer { - tagsToRemoveBuffer = [Swift.String]() - for stringContainer0 in tagsToRemoveContainer { - tagsToRemoveBuffer?.append(stringContainer0) - } - } - tagsToRemove = tagsToRemoveBuffer - } else { - tagsToRemove = [] - } - } else { - tagsToRemove = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateTagsForResourceOutput() } } } -extension UpdateTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UpdateTagsForResourceOutput: Swift.Equatable { public init() { } } -enum UpdateTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationInProgressFailure": return try await OperationInProgressException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceTypeNotSupportedException": return try await ResourceTypeNotSupportedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTagsException": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateTagsForResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationInProgressFailure": return try await OperationInProgressException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceTypeNotSupportedException": return try await ResourceTypeNotSupportedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTagsException": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ValidateConfigurationSettingsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applicationName = "ApplicationName" + case environmentName = "EnvironmentName" + case optionSettings = "OptionSettings" + case templateName = "TemplateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applicationName = applicationName { @@ -14187,59 +10997,15 @@ public struct ValidateConfigurationSettingsInput: Swift.Equatable { } } -struct ValidateConfigurationSettingsInputBody: Swift.Equatable { - let applicationName: Swift.String? - let templateName: Swift.String? - let environmentName: Swift.String? - let optionSettings: [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? -} - -extension ValidateConfigurationSettingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applicationName = "ApplicationName" - case environmentName = "EnvironmentName" - case optionSettings = "OptionSettings" - case templateName = "TemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationName) - applicationName = applicationNameDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let environmentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .environmentName) - environmentName = environmentNameDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct member{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ConfigurationOptionSetting].self, forKey: .member) - var optionSettingsBuffer:[ElasticBeanstalkClientTypes.ConfigurationOptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [ElasticBeanstalkClientTypes.ConfigurationOptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - } -} +extension ValidateConfigurationSettingsOutput { -extension ValidateConfigurationSettingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ValidateConfigurationSettingsOutputBody = try responseDecoder.decode(responseBody: data) - self.messages = output.messages - } else { - self.messages = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ValidateConfigurationSettingsResult"] + var value = ValidateConfigurationSettingsOutput() + value.messages = try reader["Messages"].readListIfPresent(memberReadingClosure: ElasticBeanstalkClientTypes.ValidationMessage.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14257,52 +11023,25 @@ public struct ValidateConfigurationSettingsOutput: Swift.Equatable { } } -struct ValidateConfigurationSettingsOutputBody: Swift.Equatable { - let messages: [ElasticBeanstalkClientTypes.ValidationMessage]? -} +enum ValidateConfigurationSettingsOutputError { -extension ValidateConfigurationSettingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case messages = "Messages" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ValidateConfigurationSettingsResult")) - if containerValues.contains(.messages) { - struct KeyVal0{struct member{}} - let messagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .messages) - if let messagesWrappedContainer = messagesWrappedContainer { - let messagesContainer = try messagesWrappedContainer.decodeIfPresent([ElasticBeanstalkClientTypes.ValidationMessage].self, forKey: .member) - var messagesBuffer:[ElasticBeanstalkClientTypes.ValidationMessage]? = nil - if let messagesContainer = messagesContainer { - messagesBuffer = [ElasticBeanstalkClientTypes.ValidationMessage]() - for structureContainer0 in messagesContainer { - messagesBuffer?.append(structureContainer0) - } - } - messages = messagesBuffer - } else { - messages = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyBucketsException": return try await TooManyBucketsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - messages = nil - } - } -} - -enum ValidateConfigurationSettingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InsufficientPrivilegesException": return try await InsufficientPrivilegesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyBucketsException": return try await TooManyBucketsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElasticBeanstalkClientTypes.ValidationMessage: Swift.Codable { +extension ElasticBeanstalkClientTypes.ValidationMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case message = "Message" case namespace = "Namespace" @@ -14326,16 +11065,16 @@ extension ElasticBeanstalkClientTypes.ValidationMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let severityDecoded = try containerValues.decodeIfPresent(ElasticBeanstalkClientTypes.ValidationSeverity.self, forKey: .severity) - severity = severityDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let optionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionName) - optionName = optionNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticBeanstalkClientTypes.ValidationMessage() + value.message = try reader["Message"].readIfPresent() + value.severity = try reader["Severity"].readIfPresent() + value.namespace = try reader["Namespace"].readIfPresent() + value.optionName = try reader["OptionName"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift b/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift index c97f3310238..8db92513df0 100644 --- a/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift +++ b/Sources/Services/AWSElasticLoadBalancing/ElasticLoadBalancingClient.swift @@ -11,14 +11,11 @@ public class ElasticLoadBalancingClient { let config: ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration let serviceName = "Elastic Load Balancing" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: ElasticLoadBalancingClient.ElasticLoadBalancingClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -80,7 +77,6 @@ extension ElasticLoadBalancingClient { public func addTags(input: AddTagsInput) async throws -> AddTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addTags") @@ -104,7 +100,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -127,7 +123,6 @@ extension ElasticLoadBalancingClient { public func applySecurityGroupsToLoadBalancer(input: ApplySecurityGroupsToLoadBalancerInput) async throws -> ApplySecurityGroupsToLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "applySecurityGroupsToLoadBalancer") @@ -151,7 +146,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ApplySecurityGroupsToLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ApplySecurityGroupsToLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ApplySecurityGroupsToLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -175,7 +170,6 @@ extension ElasticLoadBalancingClient { public func attachLoadBalancerToSubnets(input: AttachLoadBalancerToSubnetsInput) async throws -> AttachLoadBalancerToSubnetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachLoadBalancerToSubnets") @@ -199,7 +193,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachLoadBalancerToSubnetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachLoadBalancerToSubnetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachLoadBalancerToSubnetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -220,7 +214,6 @@ extension ElasticLoadBalancingClient { public func configureHealthCheck(input: ConfigureHealthCheckInput) async throws -> ConfigureHealthCheckOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "configureHealthCheck") @@ -244,7 +237,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ConfigureHealthCheckOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ConfigureHealthCheckOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ConfigureHealthCheckOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -268,7 +261,6 @@ extension ElasticLoadBalancingClient { public func createAppCookieStickinessPolicy(input: CreateAppCookieStickinessPolicyInput) async throws -> CreateAppCookieStickinessPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createAppCookieStickinessPolicy") @@ -292,7 +284,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAppCookieStickinessPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAppCookieStickinessPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAppCookieStickinessPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -316,7 +308,6 @@ extension ElasticLoadBalancingClient { public func createLBCookieStickinessPolicy(input: CreateLBCookieStickinessPolicyInput) async throws -> CreateLBCookieStickinessPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLBCookieStickinessPolicy") @@ -340,7 +331,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLBCookieStickinessPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLBCookieStickinessPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLBCookieStickinessPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -372,7 +363,6 @@ extension ElasticLoadBalancingClient { public func createLoadBalancer(input: CreateLoadBalancerInput) async throws -> CreateLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLoadBalancer") @@ -396,7 +386,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -421,7 +411,6 @@ extension ElasticLoadBalancingClient { public func createLoadBalancerListeners(input: CreateLoadBalancerListenersInput) async throws -> CreateLoadBalancerListenersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLoadBalancerListeners") @@ -445,7 +434,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLoadBalancerListenersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLoadBalancerListenersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLoadBalancerListenersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -470,7 +459,6 @@ extension ElasticLoadBalancingClient { public func createLoadBalancerPolicy(input: CreateLoadBalancerPolicyInput) async throws -> CreateLoadBalancerPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLoadBalancerPolicy") @@ -494,7 +482,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLoadBalancerPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLoadBalancerPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLoadBalancerPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -510,7 +498,6 @@ extension ElasticLoadBalancingClient { public func deleteLoadBalancer(input: DeleteLoadBalancerInput) async throws -> DeleteLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLoadBalancer") @@ -534,7 +521,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -555,7 +542,6 @@ extension ElasticLoadBalancingClient { public func deleteLoadBalancerListeners(input: DeleteLoadBalancerListenersInput) async throws -> DeleteLoadBalancerListenersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLoadBalancerListeners") @@ -579,7 +565,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLoadBalancerListenersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLoadBalancerListenersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLoadBalancerListenersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -601,7 +587,6 @@ extension ElasticLoadBalancingClient { public func deleteLoadBalancerPolicy(input: DeleteLoadBalancerPolicyInput) async throws -> DeleteLoadBalancerPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLoadBalancerPolicy") @@ -625,7 +610,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLoadBalancerPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLoadBalancerPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLoadBalancerPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -647,7 +632,6 @@ extension ElasticLoadBalancingClient { public func deregisterInstancesFromLoadBalancer(input: DeregisterInstancesFromLoadBalancerInput) async throws -> DeregisterInstancesFromLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deregisterInstancesFromLoadBalancer") @@ -671,7 +655,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeregisterInstancesFromLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeregisterInstancesFromLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeregisterInstancesFromLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -687,7 +671,6 @@ extension ElasticLoadBalancingClient { public func describeAccountLimits(input: DescribeAccountLimitsInput) async throws -> DescribeAccountLimitsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAccountLimits") @@ -711,7 +694,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAccountLimitsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAccountLimitsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAccountLimitsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -733,7 +716,6 @@ extension ElasticLoadBalancingClient { public func describeInstanceHealth(input: DescribeInstanceHealthInput) async throws -> DescribeInstanceHealthOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInstanceHealth") @@ -757,7 +739,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInstanceHealthOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInstanceHealthOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInstanceHealthOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -779,7 +761,6 @@ extension ElasticLoadBalancingClient { public func describeLoadBalancerAttributes(input: DescribeLoadBalancerAttributesInput) async throws -> DescribeLoadBalancerAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoadBalancerAttributes") @@ -803,7 +784,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoadBalancerAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoadBalancerAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoadBalancerAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -825,7 +806,6 @@ extension ElasticLoadBalancingClient { public func describeLoadBalancerPolicies(input: DescribeLoadBalancerPoliciesInput) async throws -> DescribeLoadBalancerPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoadBalancerPolicies") @@ -849,7 +829,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoadBalancerPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoadBalancerPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoadBalancerPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -870,7 +850,6 @@ extension ElasticLoadBalancingClient { public func describeLoadBalancerPolicyTypes(input: DescribeLoadBalancerPolicyTypesInput) async throws -> DescribeLoadBalancerPolicyTypesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoadBalancerPolicyTypes") @@ -894,7 +873,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoadBalancerPolicyTypesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoadBalancerPolicyTypesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoadBalancerPolicyTypesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -916,7 +895,6 @@ extension ElasticLoadBalancingClient { public func describeLoadBalancers(input: DescribeLoadBalancersInput) async throws -> DescribeLoadBalancersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoadBalancers") @@ -940,7 +918,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoadBalancersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoadBalancersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoadBalancersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -961,7 +939,6 @@ extension ElasticLoadBalancingClient { public func describeTags(input: DescribeTagsInput) async throws -> DescribeTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTags") @@ -985,7 +962,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1007,7 +984,6 @@ extension ElasticLoadBalancingClient { public func detachLoadBalancerFromSubnets(input: DetachLoadBalancerFromSubnetsInput) async throws -> DetachLoadBalancerFromSubnetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachLoadBalancerFromSubnets") @@ -1031,7 +1007,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachLoadBalancerFromSubnetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachLoadBalancerFromSubnetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachLoadBalancerFromSubnetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1053,7 +1029,6 @@ extension ElasticLoadBalancingClient { public func disableAvailabilityZonesForLoadBalancer(input: DisableAvailabilityZonesForLoadBalancerInput) async throws -> DisableAvailabilityZonesForLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableAvailabilityZonesForLoadBalancer") @@ -1077,7 +1052,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableAvailabilityZonesForLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableAvailabilityZonesForLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableAvailabilityZonesForLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1098,7 +1073,6 @@ extension ElasticLoadBalancingClient { public func enableAvailabilityZonesForLoadBalancer(input: EnableAvailabilityZonesForLoadBalancerInput) async throws -> EnableAvailabilityZonesForLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableAvailabilityZonesForLoadBalancer") @@ -1122,7 +1096,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableAvailabilityZonesForLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableAvailabilityZonesForLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableAvailabilityZonesForLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1153,7 +1127,6 @@ extension ElasticLoadBalancingClient { public func modifyLoadBalancerAttributes(input: ModifyLoadBalancerAttributesInput) async throws -> ModifyLoadBalancerAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyLoadBalancerAttributes") @@ -1177,7 +1150,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyLoadBalancerAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyLoadBalancerAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyLoadBalancerAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1199,7 +1172,6 @@ extension ElasticLoadBalancingClient { public func registerInstancesWithLoadBalancer(input: RegisterInstancesWithLoadBalancerInput) async throws -> RegisterInstancesWithLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerInstancesWithLoadBalancer") @@ -1223,7 +1195,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterInstancesWithLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterInstancesWithLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterInstancesWithLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1244,7 +1216,6 @@ extension ElasticLoadBalancingClient { public func removeTags(input: RemoveTagsInput) async throws -> RemoveTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeTags") @@ -1268,7 +1239,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1293,7 +1264,6 @@ extension ElasticLoadBalancingClient { public func setLoadBalancerListenerSSLCertificate(input: SetLoadBalancerListenerSSLCertificateInput) async throws -> SetLoadBalancerListenerSSLCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setLoadBalancerListenerSSLCertificate") @@ -1317,7 +1287,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetLoadBalancerListenerSSLCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetLoadBalancerListenerSSLCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetLoadBalancerListenerSSLCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1340,7 +1310,6 @@ extension ElasticLoadBalancingClient { public func setLoadBalancerPoliciesForBackendServer(input: SetLoadBalancerPoliciesForBackendServerInput) async throws -> SetLoadBalancerPoliciesForBackendServerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setLoadBalancerPoliciesForBackendServer") @@ -1364,7 +1333,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetLoadBalancerPoliciesForBackendServerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetLoadBalancerPoliciesForBackendServerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetLoadBalancerPoliciesForBackendServerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1388,7 +1357,6 @@ extension ElasticLoadBalancingClient { public func setLoadBalancerPoliciesOfListener(input: SetLoadBalancerPoliciesOfListenerInput) async throws -> SetLoadBalancerPoliciesOfListenerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setLoadBalancerPoliciesOfListener") @@ -1412,7 +1380,7 @@ extension ElasticLoadBalancingClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetLoadBalancerPoliciesOfListenerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetLoadBalancerPoliciesOfListenerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetLoadBalancerPoliciesOfListenerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSElasticLoadBalancing/models/Models.swift b/Sources/Services/AWSElasticLoadBalancing/models/Models.swift index 045e5690433..bb66fcc2ef9 100644 --- a/Sources/Services/AWSElasticLoadBalancing/models/Models.swift +++ b/Sources/Services/AWSElasticLoadBalancing/models/Models.swift @@ -1,8 +1,10 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML -extension ElasticLoadBalancingClientTypes.AccessLog: Swift.Codable { +extension ElasticLoadBalancingClientTypes.AccessLog: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case emitInterval = "EmitInterval" case enabled = "Enabled" @@ -26,16 +28,16 @@ extension ElasticLoadBalancingClientTypes.AccessLog: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - let s3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3BucketName) - s3BucketName = s3BucketNameDecoded - let emitIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .emitInterval) - emitInterval = emitIntervalDecoded - let s3BucketPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3BucketPrefix) - s3BucketPrefix = s3BucketPrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.AccessLog() + value.enabled = try reader["Enabled"].readIfPresent() ?? false + value.s3BucketName = try reader["S3BucketName"].readIfPresent() + value.emitInterval = try reader["EmitInterval"].readIfPresent() + value.s3BucketPrefix = try reader["S3BucketPrefix"].readIfPresent() + return value + } } } @@ -69,16 +71,14 @@ extension ElasticLoadBalancingClientTypes { } extension AccessPointNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AccessPointNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -106,23 +106,12 @@ public struct AccessPointNotFoundException: ClientRuntime.ModeledError, AWSClien } } -struct AccessPointNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension AccessPointNotFoundExceptionBody: Swift.Decodable { +extension AddTagsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case loadBalancerNames = "LoadBalancerNames" + case tags = "Tags" } -} -extension AddTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerNames = loadBalancerNames { @@ -180,84 +169,41 @@ public struct AddTagsInput: Swift.Equatable { } } -struct AddTagsInputBody: Swift.Equatable { - let loadBalancerNames: [Swift.String]? - let tags: [ElasticLoadBalancingClientTypes.Tag]? -} - -extension AddTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerNames = "LoadBalancerNames" - case tags = "Tags" - } +extension AddTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.loadBalancerNames) { - struct KeyVal0{struct member{}} - let loadBalancerNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerNames) - if let loadBalancerNamesWrappedContainer = loadBalancerNamesWrappedContainer { - let loadBalancerNamesContainer = try loadBalancerNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerNamesBuffer:[Swift.String]? = nil - if let loadBalancerNamesContainer = loadBalancerNamesContainer { - loadBalancerNamesBuffer = [Swift.String]() - for stringContainer0 in loadBalancerNamesContainer { - loadBalancerNamesBuffer?.append(stringContainer0) - } - } - loadBalancerNames = loadBalancerNamesBuffer - } else { - loadBalancerNames = [] - } - } else { - loadBalancerNames = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddTagsOutput() } } } -extension AddTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// Contains the output of AddTags. public struct AddTagsOutput: Swift.Equatable { public init() { } } -enum AddTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateTagKeys": return try await DuplicateTagKeysException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateTagKeys": return try await DuplicateTagKeysException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElasticLoadBalancingClientTypes.AdditionalAttribute: Swift.Codable { +extension ElasticLoadBalancingClientTypes.AdditionalAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -273,12 +219,14 @@ extension ElasticLoadBalancingClientTypes.AdditionalAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.AdditionalAttribute() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -304,7 +252,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.AppCookieStickinessPolicy: Swift.Codable { +extension ElasticLoadBalancingClientTypes.AppCookieStickinessPolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cookieName = "CookieName" case policyName = "PolicyName" @@ -320,12 +268,14 @@ extension ElasticLoadBalancingClientTypes.AppCookieStickinessPolicy: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let cookieNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cookieName) - cookieName = cookieNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.AppCookieStickinessPolicy() + value.policyName = try reader["PolicyName"].readIfPresent() + value.cookieName = try reader["CookieName"].readIfPresent() + return value + } } } @@ -350,6 +300,11 @@ extension ElasticLoadBalancingClientTypes { } extension ApplySecurityGroupsToLoadBalancerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + case securityGroups = "SecurityGroups" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -398,51 +353,15 @@ public struct ApplySecurityGroupsToLoadBalancerInput: Swift.Equatable { } } -struct ApplySecurityGroupsToLoadBalancerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let securityGroups: [Swift.String]? -} - -extension ApplySecurityGroupsToLoadBalancerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case securityGroups = "SecurityGroups" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - } -} +extension ApplySecurityGroupsToLoadBalancerOutput { -extension ApplySecurityGroupsToLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ApplySecurityGroupsToLoadBalancerOutputBody = try responseDecoder.decode(responseBody: data) - self.securityGroups = output.securityGroups - } else { - self.securityGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ApplySecurityGroupsToLoadBalancerResult"] + var value = ApplySecurityGroupsToLoadBalancerOutput() + value.securityGroups = try reader["SecurityGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -460,53 +379,31 @@ public struct ApplySecurityGroupsToLoadBalancerOutput: Swift.Equatable { } } -struct ApplySecurityGroupsToLoadBalancerOutputBody: Swift.Equatable { - let securityGroups: [Swift.String]? -} - -extension ApplySecurityGroupsToLoadBalancerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case securityGroups = "SecurityGroups" - } +enum ApplySecurityGroupsToLoadBalancerOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ApplySecurityGroupsToLoadBalancerResult")) - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurityGroup": return try await InvalidSecurityGroupException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - securityGroups = nil } } } -enum ApplySecurityGroupsToLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurityGroup": return try await InvalidSecurityGroupException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension AttachLoadBalancerToSubnetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + case subnets = "Subnets" } -} -extension AttachLoadBalancerToSubnetsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -555,51 +452,15 @@ public struct AttachLoadBalancerToSubnetsInput: Swift.Equatable { } } -struct AttachLoadBalancerToSubnetsInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let subnets: [Swift.String]? -} - -extension AttachLoadBalancerToSubnetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case subnets = "Subnets" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct member{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetsBuffer:[Swift.String]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [Swift.String]() - for stringContainer0 in subnetsContainer { - subnetsBuffer?.append(stringContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - } -} +extension AttachLoadBalancerToSubnetsOutput { -extension AttachLoadBalancerToSubnetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AttachLoadBalancerToSubnetsOutputBody = try responseDecoder.decode(responseBody: data) - self.subnets = output.subnets - } else { - self.subnets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AttachLoadBalancerToSubnetsResult"] + var value = AttachLoadBalancerToSubnetsOutput() + value.subnets = try reader["Subnets"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -617,54 +478,27 @@ public struct AttachLoadBalancerToSubnetsOutput: Swift.Equatable { } } -struct AttachLoadBalancerToSubnetsOutputBody: Swift.Equatable { - let subnets: [Swift.String]? -} - -extension AttachLoadBalancerToSubnetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subnets = "Subnets" - } +enum AttachLoadBalancerToSubnetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AttachLoadBalancerToSubnetsResult")) - if containerValues.contains(.subnets) { - struct KeyVal0{struct member{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetsBuffer:[Swift.String]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [Swift.String]() - for stringContainer0 in subnetsContainer { - subnetsBuffer?.append(stringContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetNotFound": return try await SubnetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - subnets = nil - } - } -} - -enum AttachLoadBalancerToSubnetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetNotFound": return try await SubnetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElasticLoadBalancingClientTypes.BackendServerDescription: Swift.Codable { +extension ElasticLoadBalancingClientTypes.BackendServerDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instancePort = "InstancePort" case policyNames = "PolicyNames" @@ -689,28 +523,13 @@ extension ElasticLoadBalancingClientTypes.BackendServerDescription: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instancePortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancePort) - instancePort = instancePortDecoded - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] - } - } else { - policyNames = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.BackendServerDescription() + value.instancePort = try reader["InstancePort"].readIfPresent() + value.policyNames = try reader["PolicyNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -736,16 +555,14 @@ extension ElasticLoadBalancingClientTypes { } extension CertificateNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CertificateNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -773,23 +590,12 @@ public struct CertificateNotFoundException: ClientRuntime.ModeledError, AWSClien } } -struct CertificateNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CertificateNotFoundExceptionBody: Swift.Decodable { +extension ConfigureHealthCheckInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case healthCheck = "HealthCheck" + case loadBalancerName = "LoadBalancerName" } -} -extension ConfigureHealthCheckInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let healthCheck = healthCheck { @@ -829,34 +635,15 @@ public struct ConfigureHealthCheckInput: Swift.Equatable { } } -struct ConfigureHealthCheckInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let healthCheck: ElasticLoadBalancingClientTypes.HealthCheck? -} - -extension ConfigureHealthCheckInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheck = "HealthCheck" - case loadBalancerName = "LoadBalancerName" - } +extension ConfigureHealthCheckOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let healthCheckDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.HealthCheck.self, forKey: .healthCheck) - healthCheck = healthCheckDecoded - } -} - -extension ConfigureHealthCheckOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ConfigureHealthCheckOutputBody = try responseDecoder.decode(responseBody: data) - self.healthCheck = output.healthCheck - } else { - self.healthCheck = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ConfigureHealthCheckResult"] + var value = ConfigureHealthCheckOutput() + value.healthCheck = try reader["HealthCheck"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.HealthCheck.readingClosure) + return value } } } @@ -874,34 +661,24 @@ public struct ConfigureHealthCheckOutput: Swift.Equatable { } } -struct ConfigureHealthCheckOutputBody: Swift.Equatable { - let healthCheck: ElasticLoadBalancingClientTypes.HealthCheck? -} - -extension ConfigureHealthCheckOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheck = "HealthCheck" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ConfigureHealthCheckResult")) - let healthCheckDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.HealthCheck.self, forKey: .healthCheck) - healthCheck = healthCheckDecoded - } -} +enum ConfigureHealthCheckOutputError { -enum ConfigureHealthCheckOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElasticLoadBalancingClientTypes.ConnectionDraining: Swift.Codable { +extension ElasticLoadBalancingClientTypes.ConnectionDraining: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case enabled = "Enabled" case timeout = "Timeout" @@ -917,12 +694,14 @@ extension ElasticLoadBalancingClientTypes.ConnectionDraining: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - let timeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .timeout) - timeout = timeoutDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.ConnectionDraining() + value.enabled = try reader["Enabled"].readIfPresent() ?? false + value.timeout = try reader["Timeout"].readIfPresent() + return value + } } } @@ -947,7 +726,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.ConnectionSettings: Swift.Codable { +extension ElasticLoadBalancingClientTypes.ConnectionSettings: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case idleTimeout = "IdleTimeout" } @@ -959,10 +738,13 @@ extension ElasticLoadBalancingClientTypes.ConnectionSettings: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idleTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .idleTimeout) - idleTimeout = idleTimeoutDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.ConnectionSettings() + value.idleTimeout = try reader["IdleTimeout"].readIfPresent() + return value + } } } @@ -984,6 +766,12 @@ extension ElasticLoadBalancingClientTypes { } extension CreateAppCookieStickinessPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cookieName = "CookieName" + case loadBalancerName = "LoadBalancerName" + case policyName = "PolicyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cookieName = cookieName { @@ -1031,32 +819,12 @@ public struct CreateAppCookieStickinessPolicyInput: Swift.Equatable { } } -struct CreateAppCookieStickinessPolicyInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let policyName: Swift.String? - let cookieName: Swift.String? -} - -extension CreateAppCookieStickinessPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cookieName = "CookieName" - case loadBalancerName = "LoadBalancerName" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let cookieNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cookieName) - cookieName = cookieNameDecoded - } -} +extension CreateAppCookieStickinessPolicyOutput { -extension CreateAppCookieStickinessPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateAppCookieStickinessPolicyOutput() + } } } @@ -1066,20 +834,33 @@ public struct CreateAppCookieStickinessPolicyOutput: Swift.Equatable { public init() { } } -enum CreateAppCookieStickinessPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicatePolicyName": return try await DuplicatePolicyNameException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyPolicies": return try await TooManyPoliciesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateAppCookieStickinessPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicatePolicyName": return try await DuplicatePolicyNameException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyPolicies": return try await TooManyPoliciesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateLBCookieStickinessPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cookieExpirationPeriod = "CookieExpirationPeriod" + case loadBalancerName = "LoadBalancerName" + case policyName = "PolicyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cookieExpirationPeriod = cookieExpirationPeriod { @@ -1126,32 +907,12 @@ public struct CreateLBCookieStickinessPolicyInput: Swift.Equatable { } } -struct CreateLBCookieStickinessPolicyInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let policyName: Swift.String? - let cookieExpirationPeriod: Swift.Int? -} - -extension CreateLBCookieStickinessPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cookieExpirationPeriod = "CookieExpirationPeriod" - case loadBalancerName = "LoadBalancerName" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let cookieExpirationPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .cookieExpirationPeriod) - cookieExpirationPeriod = cookieExpirationPeriodDecoded - } -} +extension CreateLBCookieStickinessPolicyOutput { -extension CreateLBCookieStickinessPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateLBCookieStickinessPolicyOutput() + } } } @@ -1161,20 +922,37 @@ public struct CreateLBCookieStickinessPolicyOutput: Swift.Equatable { public init() { } } -enum CreateLBCookieStickinessPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicatePolicyName": return try await DuplicatePolicyNameException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyPolicies": return try await TooManyPoliciesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateLBCookieStickinessPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicatePolicyName": return try await DuplicatePolicyNameException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyPolicies": return try await TooManyPoliciesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateLoadBalancerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case availabilityZones = "AvailabilityZones" + case listeners = "Listeners" + case loadBalancerName = "LoadBalancerName" + case scheme = "Scheme" + case securityGroups = "SecurityGroups" + case subnets = "Subnets" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZones = availabilityZones { @@ -1294,132 +1072,12 @@ public struct CreateLoadBalancerInput: Swift.Equatable { } } -struct CreateLoadBalancerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let listeners: [ElasticLoadBalancingClientTypes.Listener]? - let availabilityZones: [Swift.String]? - let subnets: [Swift.String]? - let securityGroups: [Swift.String]? - let scheme: Swift.String? - let tags: [ElasticLoadBalancingClientTypes.Tag]? -} - -extension CreateLoadBalancerInputBody: Swift.Decodable { +extension CreateLoadBalancerListenersInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" case listeners = "Listeners" case loadBalancerName = "LoadBalancerName" - case scheme = "Scheme" - case securityGroups = "SecurityGroups" - case subnets = "Subnets" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.listeners) { - struct KeyVal0{struct member{}} - let listenersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .listeners) - if let listenersWrappedContainer = listenersWrappedContainer { - let listenersContainer = try listenersWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Listener].self, forKey: .member) - var listenersBuffer:[ElasticLoadBalancingClientTypes.Listener]? = nil - if let listenersContainer = listenersContainer { - listenersBuffer = [ElasticLoadBalancingClientTypes.Listener]() - for structureContainer0 in listenersContainer { - listenersBuffer?.append(structureContainer0) - } - } - listeners = listenersBuffer - } else { - listeners = [] - } - } else { - listeners = nil - } - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - if containerValues.contains(.subnets) { - struct KeyVal0{struct member{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetsBuffer:[Swift.String]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [Swift.String]() - for stringContainer0 in subnetsContainer { - subnetsBuffer?.append(stringContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let schemeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheme) - scheme = schemeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } } -} -extension CreateLoadBalancerListenersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let listeners = listeners { @@ -1468,76 +1126,51 @@ public struct CreateLoadBalancerListenersInput: Swift.Equatable { } } -struct CreateLoadBalancerListenersInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let listeners: [ElasticLoadBalancingClientTypes.Listener]? -} - -extension CreateLoadBalancerListenersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case listeners = "Listeners" - case loadBalancerName = "LoadBalancerName" - } +extension CreateLoadBalancerListenersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.listeners) { - struct KeyVal0{struct member{}} - let listenersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .listeners) - if let listenersWrappedContainer = listenersWrappedContainer { - let listenersContainer = try listenersWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Listener].self, forKey: .member) - var listenersBuffer:[ElasticLoadBalancingClientTypes.Listener]? = nil - if let listenersContainer = listenersContainer { - listenersBuffer = [ElasticLoadBalancingClientTypes.Listener]() - for structureContainer0 in listenersContainer { - listenersBuffer?.append(structureContainer0) - } - } - listeners = listenersBuffer - } else { - listeners = [] - } - } else { - listeners = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateLoadBalancerListenersOutput() } } } -extension CreateLoadBalancerListenersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// Contains the parameters for CreateLoadBalancerListener. public struct CreateLoadBalancerListenersOutput: Swift.Equatable { public init() { } } -enum CreateLoadBalancerListenersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CertificateNotFound": return try await CertificateNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateListener": return try await DuplicateListenerException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateLoadBalancerListenersOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CertificateNotFound": return try await CertificateNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateListener": return try await DuplicateListenerException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension CreateLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLoadBalancerOutputBody = try responseDecoder.decode(responseBody: data) - self.dnsName = output.dnsName - } else { - self.dnsName = nil +extension CreateLoadBalancerOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateLoadBalancerResult"] + var value = CreateLoadBalancerOutput() + value.dnsName = try reader["DNSName"].readIfPresent() + return value } } } @@ -1555,45 +1188,42 @@ public struct CreateLoadBalancerOutput: Swift.Equatable { } } -struct CreateLoadBalancerOutputBody: Swift.Equatable { - let dnsName: Swift.String? -} - -extension CreateLoadBalancerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dnsName = "DNSName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateLoadBalancerResult")) - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - } -} +enum CreateLoadBalancerOutputError { -enum CreateLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CertificateNotFound": return try await CertificateNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateLoadBalancerName": return try await DuplicateAccessPointNameException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateTagKeys": return try await DuplicateTagKeysException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidScheme": return try await InvalidSchemeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurityGroup": return try await InvalidSecurityGroupException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotPermitted": return try await OperationNotPermittedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetNotFound": return try await SubnetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyLoadBalancers": return try await TooManyAccessPointsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CertificateNotFound": return try await CertificateNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateLoadBalancerName": return try await DuplicateAccessPointNameException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateTagKeys": return try await DuplicateTagKeysException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidScheme": return try await InvalidSchemeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurityGroup": return try await InvalidSecurityGroupException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotPermitted": return try await OperationNotPermittedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetNotFound": return try await SubnetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyLoadBalancers": return try await TooManyAccessPointsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateLoadBalancerPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + case policyAttributes = "PolicyAttributes" + case policyName = "PolicyName" + case policyTypeName = "PolicyTypeName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -1657,77 +1287,43 @@ public struct CreateLoadBalancerPolicyInput: Swift.Equatable { } } -struct CreateLoadBalancerPolicyInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let policyName: Swift.String? - let policyTypeName: Swift.String? - let policyAttributes: [ElasticLoadBalancingClientTypes.PolicyAttribute]? -} - -extension CreateLoadBalancerPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case policyAttributes = "PolicyAttributes" - case policyName = "PolicyName" - case policyTypeName = "PolicyTypeName" - } +extension CreateLoadBalancerPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyTypeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyTypeName) - policyTypeName = policyTypeNameDecoded - if containerValues.contains(.policyAttributes) { - struct KeyVal0{struct member{}} - let policyAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyAttributes) - if let policyAttributesWrappedContainer = policyAttributesWrappedContainer { - let policyAttributesContainer = try policyAttributesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.PolicyAttribute].self, forKey: .member) - var policyAttributesBuffer:[ElasticLoadBalancingClientTypes.PolicyAttribute]? = nil - if let policyAttributesContainer = policyAttributesContainer { - policyAttributesBuffer = [ElasticLoadBalancingClientTypes.PolicyAttribute]() - for structureContainer0 in policyAttributesContainer { - policyAttributesBuffer?.append(structureContainer0) - } - } - policyAttributes = policyAttributesBuffer - } else { - policyAttributes = [] - } - } else { - policyAttributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateLoadBalancerPolicyOutput() } } } -extension CreateLoadBalancerPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// Contains the output of CreateLoadBalancerPolicy. public struct CreateLoadBalancerPolicyOutput: Swift.Equatable { public init() { } } -enum CreateLoadBalancerPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicatePolicyName": return try await DuplicatePolicyNameException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyTypeNotFound": return try await PolicyTypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyPolicies": return try await TooManyPoliciesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateLoadBalancerPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicatePolicyName": return try await DuplicatePolicyNameException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyTypeNotFound": return try await PolicyTypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyPolicies": return try await TooManyPoliciesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElasticLoadBalancingClientTypes.CrossZoneLoadBalancing: Swift.Codable { +extension ElasticLoadBalancingClientTypes.CrossZoneLoadBalancing: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case enabled = "Enabled" } @@ -1739,10 +1335,13 @@ extension ElasticLoadBalancingClientTypes.CrossZoneLoadBalancing: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.CrossZoneLoadBalancing() + value.enabled = try reader["Enabled"].readIfPresent() ?? false + return value + } } } @@ -1764,6 +1363,10 @@ extension ElasticLoadBalancingClientTypes { } extension DeleteLoadBalancerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -1795,23 +1398,12 @@ public struct DeleteLoadBalancerInput: Swift.Equatable { } } -struct DeleteLoadBalancerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? -} - -extension DeleteLoadBalancerInputBody: Swift.Decodable { +extension DeleteLoadBalancerListenersInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case loadBalancerName = "LoadBalancerName" + case loadBalancerPorts = "LoadBalancerPorts" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - } -} - -extension DeleteLoadBalancerListenersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -1860,66 +1452,44 @@ public struct DeleteLoadBalancerListenersInput: Swift.Equatable { } } -struct DeleteLoadBalancerListenersInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let loadBalancerPorts: [Swift.Int]? -} - -extension DeleteLoadBalancerListenersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case loadBalancerPorts = "LoadBalancerPorts" - } +extension DeleteLoadBalancerListenersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.loadBalancerPorts) { - struct KeyVal0{struct member{}} - let loadBalancerPortsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerPorts) - if let loadBalancerPortsWrappedContainer = loadBalancerPortsWrappedContainer { - let loadBalancerPortsContainer = try loadBalancerPortsWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var loadBalancerPortsBuffer:[Swift.Int]? = nil - if let loadBalancerPortsContainer = loadBalancerPortsContainer { - loadBalancerPortsBuffer = [Swift.Int]() - for integerContainer0 in loadBalancerPortsContainer { - loadBalancerPortsBuffer?.append(integerContainer0) - } - } - loadBalancerPorts = loadBalancerPortsBuffer - } else { - loadBalancerPorts = [] - } - } else { - loadBalancerPorts = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteLoadBalancerListenersOutput() } } } -extension DeleteLoadBalancerListenersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// Contains the output of DeleteLoadBalancerListeners. public struct DeleteLoadBalancerListenersOutput: Swift.Equatable { public init() { } } -enum DeleteLoadBalancerListenersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteLoadBalancerListenersOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension DeleteLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteLoadBalancerOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteLoadBalancerOutput() + } } } @@ -1929,16 +1499,28 @@ public struct DeleteLoadBalancerOutput: Swift.Equatable { public init() { } } -enum DeleteLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteLoadBalancerOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteLoadBalancerPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + case policyName = "PolicyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -1978,28 +1560,12 @@ public struct DeleteLoadBalancerPolicyInput: Swift.Equatable { } } -struct DeleteLoadBalancerPolicyInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let policyName: Swift.String? -} - -extension DeleteLoadBalancerPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - } -} +extension DeleteLoadBalancerPolicyOutput { -extension DeleteLoadBalancerPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteLoadBalancerPolicyOutput() + } } } @@ -2009,28 +1575,33 @@ public struct DeleteLoadBalancerPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteLoadBalancerPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteLoadBalancerPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DependencyThrottleException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DependencyThrottleException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2058,23 +1629,12 @@ public struct DependencyThrottleException: ClientRuntime.ModeledError, AWSClient } } -struct DependencyThrottleExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DependencyThrottleExceptionBody: Swift.Decodable { +extension DeregisterInstancesFromLoadBalancerInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case instances = "Instances" + case loadBalancerName = "LoadBalancerName" } -} -extension DeregisterInstancesFromLoadBalancerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instances = instances { @@ -2123,51 +1683,15 @@ public struct DeregisterInstancesFromLoadBalancerInput: Swift.Equatable { } } -struct DeregisterInstancesFromLoadBalancerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let instances: [ElasticLoadBalancingClientTypes.Instance]? -} +extension DeregisterInstancesFromLoadBalancerOutput { -extension DeregisterInstancesFromLoadBalancerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instances = "Instances" - case loadBalancerName = "LoadBalancerName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[ElasticLoadBalancingClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [ElasticLoadBalancingClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - } -} - -extension DeregisterInstancesFromLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeregisterInstancesFromLoadBalancerOutputBody = try responseDecoder.decode(responseBody: data) - self.instances = output.instances - } else { - self.instances = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeregisterInstancesFromLoadBalancerResult"] + var value = DeregisterInstancesFromLoadBalancerOutput() + value.instances = try reader["Instances"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.Instance.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2185,52 +1709,30 @@ public struct DeregisterInstancesFromLoadBalancerOutput: Swift.Equatable { } } -struct DeregisterInstancesFromLoadBalancerOutputBody: Swift.Equatable { - let instances: [ElasticLoadBalancingClientTypes.Instance]? -} - -extension DeregisterInstancesFromLoadBalancerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instances = "Instances" - } +enum DeregisterInstancesFromLoadBalancerOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeregisterInstancesFromLoadBalancerResult")) - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[ElasticLoadBalancingClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [ElasticLoadBalancingClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInstance": return try await InvalidEndPointException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - instances = nil } } } -enum DeregisterInstancesFromLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInstance": return try await InvalidEndPointException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeAccountLimitsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case pageSize = "PageSize" } -} -extension DescribeAccountLimitsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -2267,36 +1769,16 @@ public struct DescribeAccountLimitsInput: Swift.Equatable { } } -struct DescribeAccountLimitsInputBody: Swift.Equatable { - let marker: Swift.String? - let pageSize: Swift.Int? -} - -extension DescribeAccountLimitsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case pageSize = "PageSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} +extension DescribeAccountLimitsOutput { -extension DescribeAccountLimitsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAccountLimitsOutputBody = try responseDecoder.decode(responseBody: data) - self.limits = output.limits - self.nextMarker = output.nextMarker - } else { - self.limits = nil - self.nextMarker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAccountLimitsResult"] + var value = DescribeAccountLimitsOutput() + value.limits = try reader["Limits"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.Limit.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -2317,54 +1799,28 @@ public struct DescribeAccountLimitsOutput: Swift.Equatable { } } -struct DescribeAccountLimitsOutputBody: Swift.Equatable { - let limits: [ElasticLoadBalancingClientTypes.Limit]? - let nextMarker: Swift.String? -} +enum DescribeAccountLimitsOutputError { -extension DescribeAccountLimitsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case limits = "Limits" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAccountLimitsResult")) - if containerValues.contains(.limits) { - struct KeyVal0{struct member{}} - let limitsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .limits) - if let limitsWrappedContainer = limitsWrappedContainer { - let limitsContainer = try limitsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Limit].self, forKey: .member) - var limitsBuffer:[ElasticLoadBalancingClientTypes.Limit]? = nil - if let limitsContainer = limitsContainer { - limitsBuffer = [ElasticLoadBalancingClientTypes.Limit]() - for structureContainer0 in limitsContainer { - limitsBuffer?.append(structureContainer0) - } - } - limits = limitsBuffer - } else { - limits = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - limits = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeAccountLimitsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeInstanceHealthInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instances = "Instances" + case loadBalancerName = "LoadBalancerName" } -} -extension DescribeInstanceHealthInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instances = instances { @@ -2412,51 +1868,15 @@ public struct DescribeInstanceHealthInput: Swift.Equatable { } } -struct DescribeInstanceHealthInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let instances: [ElasticLoadBalancingClientTypes.Instance]? -} - -extension DescribeInstanceHealthInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instances = "Instances" - case loadBalancerName = "LoadBalancerName" - } +extension DescribeInstanceHealthOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[ElasticLoadBalancingClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [ElasticLoadBalancingClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - } -} - -extension DescribeInstanceHealthOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInstanceHealthOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceStates = output.instanceStates - } else { - self.instanceStates = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeInstanceHealthResult"] + var value = DescribeInstanceHealthOutput() + value.instanceStates = try reader["InstanceStates"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.InstanceState.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2474,52 +1894,29 @@ public struct DescribeInstanceHealthOutput: Swift.Equatable { } } -struct DescribeInstanceHealthOutputBody: Swift.Equatable { - let instanceStates: [ElasticLoadBalancingClientTypes.InstanceState]? -} +enum DescribeInstanceHealthOutputError { -extension DescribeInstanceHealthOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceStates = "InstanceStates" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeInstanceHealthResult")) - if containerValues.contains(.instanceStates) { - struct KeyVal0{struct member{}} - let instanceStatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceStates) - if let instanceStatesWrappedContainer = instanceStatesWrappedContainer { - let instanceStatesContainer = try instanceStatesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.InstanceState].self, forKey: .member) - var instanceStatesBuffer:[ElasticLoadBalancingClientTypes.InstanceState]? = nil - if let instanceStatesContainer = instanceStatesContainer { - instanceStatesBuffer = [ElasticLoadBalancingClientTypes.InstanceState]() - for structureContainer0 in instanceStatesContainer { - instanceStatesBuffer?.append(structureContainer0) - } - } - instanceStates = instanceStatesBuffer - } else { - instanceStates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInstance": return try await InvalidEndPointException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - instanceStates = nil } } } -enum DescribeInstanceHealthOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInstance": return try await InvalidEndPointException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLoadBalancerAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" } -} -extension DescribeLoadBalancerAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -2551,30 +1948,15 @@ public struct DescribeLoadBalancerAttributesInput: Swift.Equatable { } } -struct DescribeLoadBalancerAttributesInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? -} - -extension DescribeLoadBalancerAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - } -} +extension DescribeLoadBalancerAttributesOutput { -extension DescribeLoadBalancerAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoadBalancerAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.loadBalancerAttributes = output.loadBalancerAttributes - } else { - self.loadBalancerAttributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoadBalancerAttributesResult"] + var value = DescribeLoadBalancerAttributesOutput() + value.loadBalancerAttributes = try reader["LoadBalancerAttributes"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.LoadBalancerAttributes.readingClosure) + return value } } } @@ -2592,35 +1974,30 @@ public struct DescribeLoadBalancerAttributesOutput: Swift.Equatable { } } -struct DescribeLoadBalancerAttributesOutputBody: Swift.Equatable { - let loadBalancerAttributes: ElasticLoadBalancingClientTypes.LoadBalancerAttributes? -} - -extension DescribeLoadBalancerAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerAttributes = "LoadBalancerAttributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoadBalancerAttributesResult")) - let loadBalancerAttributesDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.LoadBalancerAttributes.self, forKey: .loadBalancerAttributes) - loadBalancerAttributes = loadBalancerAttributesDecoded - } -} +enum DescribeLoadBalancerAttributesOutputError { -enum DescribeLoadBalancerAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerAttributeNotFound": return try await LoadBalancerAttributeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerAttributeNotFound": return try await LoadBalancerAttributeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeLoadBalancerPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + case policyNames = "PolicyNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -2667,51 +2044,15 @@ public struct DescribeLoadBalancerPoliciesInput: Swift.Equatable { } } -struct DescribeLoadBalancerPoliciesInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let policyNames: [Swift.String]? -} - -extension DescribeLoadBalancerPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case policyNames = "PolicyNames" - } +extension DescribeLoadBalancerPoliciesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] - } - } else { - policyNames = nil - } - } -} - -extension DescribeLoadBalancerPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoadBalancerPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.policyDescriptions = output.policyDescriptions - } else { - self.policyDescriptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoadBalancerPoliciesResult"] + var value = DescribeLoadBalancerPoliciesOutput() + value.policyDescriptions = try reader["PolicyDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.PolicyDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2729,52 +2070,29 @@ public struct DescribeLoadBalancerPoliciesOutput: Swift.Equatable { } } -struct DescribeLoadBalancerPoliciesOutputBody: Swift.Equatable { - let policyDescriptions: [ElasticLoadBalancingClientTypes.PolicyDescription]? -} +enum DescribeLoadBalancerPoliciesOutputError { -extension DescribeLoadBalancerPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDescriptions = "PolicyDescriptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoadBalancerPoliciesResult")) - if containerValues.contains(.policyDescriptions) { - struct KeyVal0{struct member{}} - let policyDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyDescriptions) - if let policyDescriptionsWrappedContainer = policyDescriptionsWrappedContainer { - let policyDescriptionsContainer = try policyDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.PolicyDescription].self, forKey: .member) - var policyDescriptionsBuffer:[ElasticLoadBalancingClientTypes.PolicyDescription]? = nil - if let policyDescriptionsContainer = policyDescriptionsContainer { - policyDescriptionsBuffer = [ElasticLoadBalancingClientTypes.PolicyDescription]() - for structureContainer0 in policyDescriptionsContainer { - policyDescriptionsBuffer?.append(structureContainer0) - } - } - policyDescriptions = policyDescriptionsBuffer - } else { - policyDescriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyNotFound": return try await PolicyNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policyDescriptions = nil } } } -enum DescribeLoadBalancerPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyNotFound": return try await PolicyNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLoadBalancerPolicyTypesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyTypeNames = "PolicyTypeNames" } -} -extension DescribeLoadBalancerPolicyTypesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyTypeNames = policyTypeNames { @@ -2814,47 +2132,15 @@ public struct DescribeLoadBalancerPolicyTypesInput: Swift.Equatable { } } -struct DescribeLoadBalancerPolicyTypesInputBody: Swift.Equatable { - let policyTypeNames: [Swift.String]? -} - -extension DescribeLoadBalancerPolicyTypesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyTypeNames = "PolicyTypeNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.policyTypeNames) { - struct KeyVal0{struct member{}} - let policyTypeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyTypeNames) - if let policyTypeNamesWrappedContainer = policyTypeNamesWrappedContainer { - let policyTypeNamesContainer = try policyTypeNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyTypeNamesBuffer:[Swift.String]? = nil - if let policyTypeNamesContainer = policyTypeNamesContainer { - policyTypeNamesBuffer = [Swift.String]() - for stringContainer0 in policyTypeNamesContainer { - policyTypeNamesBuffer?.append(stringContainer0) - } - } - policyTypeNames = policyTypeNamesBuffer - } else { - policyTypeNames = [] - } - } else { - policyTypeNames = nil - } - } -} +extension DescribeLoadBalancerPolicyTypesOutput { -extension DescribeLoadBalancerPolicyTypesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoadBalancerPolicyTypesOutputBody = try responseDecoder.decode(responseBody: data) - self.policyTypeDescriptions = output.policyTypeDescriptions - } else { - self.policyTypeDescriptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoadBalancerPolicyTypesResult"] + var value = DescribeLoadBalancerPolicyTypesOutput() + value.policyTypeDescriptions = try reader["PolicyTypeDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.PolicyTypeDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2872,51 +2158,30 @@ public struct DescribeLoadBalancerPolicyTypesOutput: Swift.Equatable { } } -struct DescribeLoadBalancerPolicyTypesOutputBody: Swift.Equatable { - let policyTypeDescriptions: [ElasticLoadBalancingClientTypes.PolicyTypeDescription]? -} +enum DescribeLoadBalancerPolicyTypesOutputError { -extension DescribeLoadBalancerPolicyTypesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyTypeDescriptions = "PolicyTypeDescriptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoadBalancerPolicyTypesResult")) - if containerValues.contains(.policyTypeDescriptions) { - struct KeyVal0{struct member{}} - let policyTypeDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyTypeDescriptions) - if let policyTypeDescriptionsWrappedContainer = policyTypeDescriptionsWrappedContainer { - let policyTypeDescriptionsContainer = try policyTypeDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.PolicyTypeDescription].self, forKey: .member) - var policyTypeDescriptionsBuffer:[ElasticLoadBalancingClientTypes.PolicyTypeDescription]? = nil - if let policyTypeDescriptionsContainer = policyTypeDescriptionsContainer { - policyTypeDescriptionsBuffer = [ElasticLoadBalancingClientTypes.PolicyTypeDescription]() - for structureContainer0 in policyTypeDescriptionsContainer { - policyTypeDescriptionsBuffer?.append(structureContainer0) - } - } - policyTypeDescriptions = policyTypeDescriptionsBuffer - } else { - policyTypeDescriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "PolicyTypeNotFound": return try await PolicyTypeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policyTypeDescriptions = nil } } } -enum DescribeLoadBalancerPolicyTypesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "PolicyTypeNotFound": return try await PolicyTypeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLoadBalancersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerNames = "LoadBalancerNames" + case marker = "Marker" + case pageSize = "PageSize" } -} -extension DescribeLoadBalancersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerNames = loadBalancerNames { @@ -2970,57 +2235,16 @@ public struct DescribeLoadBalancersInput: Swift.Equatable { } } -struct DescribeLoadBalancersInputBody: Swift.Equatable { - let loadBalancerNames: [Swift.String]? - let marker: Swift.String? - let pageSize: Swift.Int? -} +extension DescribeLoadBalancersOutput { -extension DescribeLoadBalancersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerNames = "LoadBalancerNames" - case marker = "Marker" - case pageSize = "PageSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.loadBalancerNames) { - struct KeyVal0{struct member{}} - let loadBalancerNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerNames) - if let loadBalancerNamesWrappedContainer = loadBalancerNamesWrappedContainer { - let loadBalancerNamesContainer = try loadBalancerNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerNamesBuffer:[Swift.String]? = nil - if let loadBalancerNamesContainer = loadBalancerNamesContainer { - loadBalancerNamesBuffer = [Swift.String]() - for stringContainer0 in loadBalancerNamesContainer { - loadBalancerNamesBuffer?.append(stringContainer0) - } - } - loadBalancerNames = loadBalancerNamesBuffer - } else { - loadBalancerNames = [] - } - } else { - loadBalancerNames = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} - -extension DescribeLoadBalancersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoadBalancersOutputBody = try responseDecoder.decode(responseBody: data) - self.loadBalancerDescriptions = output.loadBalancerDescriptions - self.nextMarker = output.nextMarker - } else { - self.loadBalancerDescriptions = nil - self.nextMarker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoadBalancersResult"] + var value = DescribeLoadBalancersOutput() + value.loadBalancerDescriptions = try reader["LoadBalancerDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.LoadBalancerDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -3042,56 +2266,29 @@ public struct DescribeLoadBalancersOutput: Swift.Equatable { } } -struct DescribeLoadBalancersOutputBody: Swift.Equatable { - let loadBalancerDescriptions: [ElasticLoadBalancingClientTypes.LoadBalancerDescription]? - let nextMarker: Swift.String? -} +enum DescribeLoadBalancersOutputError { -extension DescribeLoadBalancersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerDescriptions = "LoadBalancerDescriptions" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoadBalancersResult")) - if containerValues.contains(.loadBalancerDescriptions) { - struct KeyVal0{struct member{}} - let loadBalancerDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerDescriptions) - if let loadBalancerDescriptionsWrappedContainer = loadBalancerDescriptionsWrappedContainer { - let loadBalancerDescriptionsContainer = try loadBalancerDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.LoadBalancerDescription].self, forKey: .member) - var loadBalancerDescriptionsBuffer:[ElasticLoadBalancingClientTypes.LoadBalancerDescription]? = nil - if let loadBalancerDescriptionsContainer = loadBalancerDescriptionsContainer { - loadBalancerDescriptionsBuffer = [ElasticLoadBalancingClientTypes.LoadBalancerDescription]() - for structureContainer0 in loadBalancerDescriptionsContainer { - loadBalancerDescriptionsBuffer?.append(structureContainer0) - } - } - loadBalancerDescriptions = loadBalancerDescriptionsBuffer - } else { - loadBalancerDescriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependencyThrottle": return try await DependencyThrottleException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - loadBalancerDescriptions = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeLoadBalancersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependencyThrottle": return try await DependencyThrottleException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerNames = "LoadBalancerNames" } -} -extension DescribeTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerNames = loadBalancerNames { @@ -3132,47 +2329,15 @@ public struct DescribeTagsInput: Swift.Equatable { } } -struct DescribeTagsInputBody: Swift.Equatable { - let loadBalancerNames: [Swift.String]? -} +extension DescribeTagsOutput { -extension DescribeTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerNames = "LoadBalancerNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.loadBalancerNames) { - struct KeyVal0{struct member{}} - let loadBalancerNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerNames) - if let loadBalancerNamesWrappedContainer = loadBalancerNamesWrappedContainer { - let loadBalancerNamesContainer = try loadBalancerNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerNamesBuffer:[Swift.String]? = nil - if let loadBalancerNamesContainer = loadBalancerNamesContainer { - loadBalancerNamesBuffer = [Swift.String]() - for stringContainer0 in loadBalancerNamesContainer { - loadBalancerNamesBuffer?.append(stringContainer0) - } - } - loadBalancerNames = loadBalancerNamesBuffer - } else { - loadBalancerNames = [] - } - } else { - loadBalancerNames = nil - } - } -} - -extension DescribeTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.tagDescriptions = output.tagDescriptions - } else { - self.tagDescriptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTagsResult"] + var value = DescribeTagsOutput() + value.tagDescriptions = try reader["TagDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.TagDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3190,51 +2355,29 @@ public struct DescribeTagsOutput: Swift.Equatable { } } -struct DescribeTagsOutputBody: Swift.Equatable { - let tagDescriptions: [ElasticLoadBalancingClientTypes.TagDescription]? -} +enum DescribeTagsOutputError { -extension DescribeTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagDescriptions = "TagDescriptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTagsResult")) - if containerValues.contains(.tagDescriptions) { - struct KeyVal0{struct member{}} - let tagDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagDescriptions) - if let tagDescriptionsWrappedContainer = tagDescriptionsWrappedContainer { - let tagDescriptionsContainer = try tagDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.TagDescription].self, forKey: .member) - var tagDescriptionsBuffer:[ElasticLoadBalancingClientTypes.TagDescription]? = nil - if let tagDescriptionsContainer = tagDescriptionsContainer { - tagDescriptionsBuffer = [ElasticLoadBalancingClientTypes.TagDescription]() - for structureContainer0 in tagDescriptionsContainer { - tagDescriptionsBuffer?.append(structureContainer0) - } - } - tagDescriptions = tagDescriptionsBuffer - } else { - tagDescriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tagDescriptions = nil } } } -enum DescribeTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DetachLoadBalancerFromSubnetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + case subnets = "Subnets" } -} -extension DetachLoadBalancerFromSubnetsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -3283,51 +2426,15 @@ public struct DetachLoadBalancerFromSubnetsInput: Swift.Equatable { } } -struct DetachLoadBalancerFromSubnetsInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let subnets: [Swift.String]? -} - -extension DetachLoadBalancerFromSubnetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case subnets = "Subnets" - } +extension DetachLoadBalancerFromSubnetsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct member{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetsBuffer:[Swift.String]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [Swift.String]() - for stringContainer0 in subnetsContainer { - subnetsBuffer?.append(stringContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - } -} - -extension DetachLoadBalancerFromSubnetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DetachLoadBalancerFromSubnetsOutputBody = try responseDecoder.decode(responseBody: data) - self.subnets = output.subnets - } else { - self.subnets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DetachLoadBalancerFromSubnetsResult"] + var value = DetachLoadBalancerFromSubnetsOutput() + value.subnets = try reader["Subnets"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3345,52 +2452,30 @@ public struct DetachLoadBalancerFromSubnetsOutput: Swift.Equatable { } } -struct DetachLoadBalancerFromSubnetsOutputBody: Swift.Equatable { - let subnets: [Swift.String]? -} - -extension DetachLoadBalancerFromSubnetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subnets = "Subnets" - } +enum DetachLoadBalancerFromSubnetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DetachLoadBalancerFromSubnetsResult")) - if containerValues.contains(.subnets) { - struct KeyVal0{struct member{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetsBuffer:[Swift.String]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [Swift.String]() - for stringContainer0 in subnetsContainer { - subnetsBuffer?.append(stringContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - subnets = nil } } } -enum DetachLoadBalancerFromSubnetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DisableAvailabilityZonesForLoadBalancerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case availabilityZones = "AvailabilityZones" + case loadBalancerName = "LoadBalancerName" } -} -extension DisableAvailabilityZonesForLoadBalancerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZones = availabilityZones { @@ -3439,51 +2524,15 @@ public struct DisableAvailabilityZonesForLoadBalancerInput: Swift.Equatable { } } -struct DisableAvailabilityZonesForLoadBalancerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let availabilityZones: [Swift.String]? -} - -extension DisableAvailabilityZonesForLoadBalancerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - case loadBalancerName = "LoadBalancerName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - } -} +extension DisableAvailabilityZonesForLoadBalancerOutput { -extension DisableAvailabilityZonesForLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableAvailabilityZonesForLoadBalancerOutputBody = try responseDecoder.decode(responseBody: data) - self.availabilityZones = output.availabilityZones - } else { - self.availabilityZones = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DisableAvailabilityZonesForLoadBalancerResult"] + var value = DisableAvailabilityZonesForLoadBalancerOutput() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3501,62 +2550,33 @@ public struct DisableAvailabilityZonesForLoadBalancerOutput: Swift.Equatable { } } -struct DisableAvailabilityZonesForLoadBalancerOutputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? -} - -extension DisableAvailabilityZonesForLoadBalancerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - } +enum DisableAvailabilityZonesForLoadBalancerOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DisableAvailabilityZonesForLoadBalancerResult")) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - availabilityZones = nil - } - } -} - -enum DisableAvailabilityZonesForLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DuplicateAccessPointNameException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateAccessPointNameException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3584,33 +2604,15 @@ public struct DuplicateAccessPointNameException: ClientRuntime.ModeledError, AWS } } -struct DuplicateAccessPointNameExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateAccessPointNameExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DuplicateListenerException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateListenerException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3638,33 +2640,15 @@ public struct DuplicateListenerException: ClientRuntime.ModeledError, AWSClientR } } -struct DuplicateListenerExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateListenerExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DuplicatePolicyNameException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicatePolicyNameException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3692,33 +2676,15 @@ public struct DuplicatePolicyNameException: ClientRuntime.ModeledError, AWSClien } } -struct DuplicatePolicyNameExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicatePolicyNameExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DuplicateTagKeysException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateTagKeysException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3746,25 +2712,14 @@ public struct DuplicateTagKeysException: ClientRuntime.ModeledError, AWSClientRu } } -struct DuplicateTagKeysExceptionBody: Swift.Equatable { - let message: Swift.String? -} +public enum ElasticLoadBalancingClientTypes {} -extension DuplicateTagKeysExceptionBody: Swift.Decodable { +extension EnableAvailabilityZonesForLoadBalancerInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case availabilityZones = "AvailabilityZones" + case loadBalancerName = "LoadBalancerName" } -} - -public enum ElasticLoadBalancingClientTypes {} -extension EnableAvailabilityZonesForLoadBalancerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZones = availabilityZones { @@ -3813,51 +2768,15 @@ public struct EnableAvailabilityZonesForLoadBalancerInput: Swift.Equatable { } } -struct EnableAvailabilityZonesForLoadBalancerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let availabilityZones: [Swift.String]? -} - -extension EnableAvailabilityZonesForLoadBalancerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - case loadBalancerName = "LoadBalancerName" - } +extension EnableAvailabilityZonesForLoadBalancerOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - } -} - -extension EnableAvailabilityZonesForLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableAvailabilityZonesForLoadBalancerOutputBody = try responseDecoder.decode(responseBody: data) - self.availabilityZones = output.availabilityZones - } else { - self.availabilityZones = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["EnableAvailabilityZonesForLoadBalancerResult"] + var value = EnableAvailabilityZonesForLoadBalancerOutput() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3875,51 +2794,24 @@ public struct EnableAvailabilityZonesForLoadBalancerOutput: Swift.Equatable { } } -struct EnableAvailabilityZonesForLoadBalancerOutputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? -} - -extension EnableAvailabilityZonesForLoadBalancerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - } +enum EnableAvailabilityZonesForLoadBalancerOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("EnableAvailabilityZonesForLoadBalancerResult")) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - availabilityZones = nil - } - } -} - -enum EnableAvailabilityZonesForLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElasticLoadBalancingClientTypes.HealthCheck: Swift.Codable { +extension ElasticLoadBalancingClientTypes.HealthCheck: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case healthyThreshold = "HealthyThreshold" case interval = "Interval" @@ -3947,18 +2839,17 @@ extension ElasticLoadBalancingClientTypes.HealthCheck: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .target) - target = targetDecoded - let intervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .interval) - interval = intervalDecoded - let timeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .timeout) - timeout = timeoutDecoded - let unhealthyThresholdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .unhealthyThreshold) - unhealthyThreshold = unhealthyThresholdDecoded - let healthyThresholdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthyThreshold) - healthyThreshold = healthyThresholdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.HealthCheck() + value.target = try reader["Target"].readIfPresent() + value.interval = try reader["Interval"].readIfPresent() + value.timeout = try reader["Timeout"].readIfPresent() + value.unhealthyThreshold = try reader["UnhealthyThreshold"].readIfPresent() + value.healthyThreshold = try reader["HealthyThreshold"].readIfPresent() + return value + } } } @@ -3999,7 +2890,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.Instance: Swift.Codable { +extension ElasticLoadBalancingClientTypes.Instance: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instanceId = "InstanceId" } @@ -4011,10 +2902,13 @@ extension ElasticLoadBalancingClientTypes.Instance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.Instance() + value.instanceId = try reader["InstanceId"].readIfPresent() + return value + } } } @@ -4034,7 +2928,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.InstanceState: Swift.Codable { +extension ElasticLoadBalancingClientTypes.InstanceState: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case instanceId = "InstanceId" @@ -4058,16 +2952,16 @@ extension ElasticLoadBalancingClientTypes.InstanceState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceId) - instanceId = instanceIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let reasonCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reasonCode) - reasonCode = reasonCodeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.InstanceState() + value.instanceId = try reader["InstanceId"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.reasonCode = try reader["ReasonCode"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -4124,16 +3018,14 @@ extension ElasticLoadBalancingClientTypes { } extension InvalidConfigurationRequestException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidConfigurationRequestException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4161,33 +3053,15 @@ public struct InvalidConfigurationRequestException: ClientRuntime.ModeledError, } } -struct InvalidConfigurationRequestExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidConfigurationRequestExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidEndPointException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidEndPointException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4215,33 +3089,15 @@ public struct InvalidEndPointException: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidEndPointExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidEndPointExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSchemeException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSchemeException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4269,33 +3125,15 @@ public struct InvalidSchemeException: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidSchemeExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSchemeExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSecurityGroupException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSecurityGroupException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4323,33 +3161,15 @@ public struct InvalidSecurityGroupException: ClientRuntime.ModeledError, AWSClie } } -struct InvalidSecurityGroupExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSecurityGroupExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSubnetException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSubnetException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4377,23 +3197,7 @@ public struct InvalidSubnetException: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidSubnetExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSubnetExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingClientTypes.LBCookieStickinessPolicy: Swift.Codable { +extension ElasticLoadBalancingClientTypes.LBCookieStickinessPolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cookieExpirationPeriod = "CookieExpirationPeriod" case policyName = "PolicyName" @@ -4409,12 +3213,14 @@ extension ElasticLoadBalancingClientTypes.LBCookieStickinessPolicy: Swift.Codabl } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let cookieExpirationPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .cookieExpirationPeriod) - cookieExpirationPeriod = cookieExpirationPeriodDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.LBCookieStickinessPolicy() + value.policyName = try reader["PolicyName"].readIfPresent() + value.cookieExpirationPeriod = try reader["CookieExpirationPeriod"].readIfPresent() + return value + } } } @@ -4438,7 +3244,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.Limit: Swift.Codable { +extension ElasticLoadBalancingClientTypes.Limit: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case name = "Name" @@ -4454,12 +3260,14 @@ extension ElasticLoadBalancingClientTypes.Limit: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.Limit() + value.name = try reader["Name"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -4489,7 +3297,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.Listener: Swift.Codable { +extension ElasticLoadBalancingClientTypes.Listener: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case instancePort = "InstancePort" case instanceProtocol = "InstanceProtocol" @@ -4517,18 +3325,17 @@ extension ElasticLoadBalancingClientTypes.Listener: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let loadBalancerPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .loadBalancerPort) ?? 0 - loadBalancerPort = loadBalancerPortDecoded - let instanceProtocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProtocol) - instanceProtocol = instanceProtocolDecoded - let instancePortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancePort) - instancePort = instancePortDecoded - let sslCertificateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sslCertificateId) - sslCertificateId = sslCertificateIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.Listener() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.loadBalancerPort = try reader["LoadBalancerPort"].readIfPresent() ?? 0 + value.instanceProtocol = try reader["InstanceProtocol"].readIfPresent() + value.instancePort = try reader["InstancePort"].readIfPresent() + value.sslCertificateId = try reader["SSLCertificateId"].readIfPresent() + return value + } } } @@ -4567,7 +3374,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.ListenerDescription: Swift.Codable { +extension ElasticLoadBalancingClientTypes.ListenerDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case listener = "Listener" case policyNames = "PolicyNames" @@ -4592,28 +3399,13 @@ extension ElasticLoadBalancingClientTypes.ListenerDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.Listener.self, forKey: .listener) - listener = listenerDecoded - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] - } - } else { - policyNames = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.ListenerDescription() + value.listener = try reader["Listener"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.Listener.readingClosure) + value.policyNames = try reader["PolicyNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4639,16 +3431,14 @@ extension ElasticLoadBalancingClientTypes { } extension ListenerNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ListenerNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4676,33 +3466,15 @@ public struct ListenerNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -struct ListenerNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ListenerNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension LoadBalancerAttributeNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LoadBalancerAttributeNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4730,23 +3502,7 @@ public struct LoadBalancerAttributeNotFoundException: ClientRuntime.ModeledError } } -struct LoadBalancerAttributeNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension LoadBalancerAttributeNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingClientTypes.LoadBalancerAttributes: Swift.Codable { +extension ElasticLoadBalancingClientTypes.LoadBalancerAttributes: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accessLog = "AccessLog" case additionalAttributes = "AdditionalAttributes" @@ -4783,34 +3539,16 @@ extension ElasticLoadBalancingClientTypes.LoadBalancerAttributes: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let crossZoneLoadBalancingDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.CrossZoneLoadBalancing.self, forKey: .crossZoneLoadBalancing) - crossZoneLoadBalancing = crossZoneLoadBalancingDecoded - let accessLogDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.AccessLog.self, forKey: .accessLog) - accessLog = accessLogDecoded - let connectionDrainingDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.ConnectionDraining.self, forKey: .connectionDraining) - connectionDraining = connectionDrainingDecoded - let connectionSettingsDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.ConnectionSettings.self, forKey: .connectionSettings) - connectionSettings = connectionSettingsDecoded - if containerValues.contains(.additionalAttributes) { - struct KeyVal0{struct member{}} - let additionalAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .additionalAttributes) - if let additionalAttributesWrappedContainer = additionalAttributesWrappedContainer { - let additionalAttributesContainer = try additionalAttributesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.AdditionalAttribute].self, forKey: .member) - var additionalAttributesBuffer:[ElasticLoadBalancingClientTypes.AdditionalAttribute]? = nil - if let additionalAttributesContainer = additionalAttributesContainer { - additionalAttributesBuffer = [ElasticLoadBalancingClientTypes.AdditionalAttribute]() - for structureContainer0 in additionalAttributesContainer { - additionalAttributesBuffer?.append(structureContainer0) - } - } - additionalAttributes = additionalAttributesBuffer - } else { - additionalAttributes = [] - } - } else { - additionalAttributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.LoadBalancerAttributes() + value.crossZoneLoadBalancing = try reader["CrossZoneLoadBalancing"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.CrossZoneLoadBalancing.readingClosure) + value.accessLog = try reader["AccessLog"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.AccessLog.readingClosure) + value.connectionDraining = try reader["ConnectionDraining"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.ConnectionDraining.readingClosure) + value.connectionSettings = try reader["ConnectionSettings"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.ConnectionSettings.readingClosure) + value.additionalAttributes = try reader["AdditionalAttributes"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.AdditionalAttribute.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4847,7 +3585,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.LoadBalancerDescription: Swift.Codable { +extension ElasticLoadBalancingClientTypes.LoadBalancerDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZones = "AvailabilityZones" case backendServerDescriptions = "BackendServerDescriptions" @@ -4973,142 +3711,28 @@ extension ElasticLoadBalancingClientTypes.LoadBalancerDescription: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - let canonicalHostedZoneNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .canonicalHostedZoneName) - canonicalHostedZoneName = canonicalHostedZoneNameDecoded - let canonicalHostedZoneNameIDDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .canonicalHostedZoneNameID) - canonicalHostedZoneNameID = canonicalHostedZoneNameIDDecoded - if containerValues.contains(.listenerDescriptions) { - struct KeyVal0{struct member{}} - let listenerDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .listenerDescriptions) - if let listenerDescriptionsWrappedContainer = listenerDescriptionsWrappedContainer { - let listenerDescriptionsContainer = try listenerDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.ListenerDescription].self, forKey: .member) - var listenerDescriptionsBuffer:[ElasticLoadBalancingClientTypes.ListenerDescription]? = nil - if let listenerDescriptionsContainer = listenerDescriptionsContainer { - listenerDescriptionsBuffer = [ElasticLoadBalancingClientTypes.ListenerDescription]() - for structureContainer0 in listenerDescriptionsContainer { - listenerDescriptionsBuffer?.append(structureContainer0) - } - } - listenerDescriptions = listenerDescriptionsBuffer - } else { - listenerDescriptions = [] - } - } else { - listenerDescriptions = nil - } - let policiesDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.Policies.self, forKey: .policies) - policies = policiesDecoded - if containerValues.contains(.backendServerDescriptions) { - struct KeyVal0{struct member{}} - let backendServerDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .backendServerDescriptions) - if let backendServerDescriptionsWrappedContainer = backendServerDescriptionsWrappedContainer { - let backendServerDescriptionsContainer = try backendServerDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.BackendServerDescription].self, forKey: .member) - var backendServerDescriptionsBuffer:[ElasticLoadBalancingClientTypes.BackendServerDescription]? = nil - if let backendServerDescriptionsContainer = backendServerDescriptionsContainer { - backendServerDescriptionsBuffer = [ElasticLoadBalancingClientTypes.BackendServerDescription]() - for structureContainer0 in backendServerDescriptionsContainer { - backendServerDescriptionsBuffer?.append(structureContainer0) - } - } - backendServerDescriptions = backendServerDescriptionsBuffer - } else { - backendServerDescriptions = [] - } - } else { - backendServerDescriptions = nil - } - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - if containerValues.contains(.subnets) { - struct KeyVal0{struct member{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetsBuffer:[Swift.String]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [Swift.String]() - for stringContainer0 in subnetsContainer { - subnetsBuffer?.append(stringContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[ElasticLoadBalancingClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [ElasticLoadBalancingClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - let healthCheckDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.HealthCheck.self, forKey: .healthCheck) - healthCheck = healthCheckDecoded - let sourceSecurityGroupDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.SourceSecurityGroup.self, forKey: .sourceSecurityGroup) - sourceSecurityGroup = sourceSecurityGroupDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.LoadBalancerDescription() + value.loadBalancerName = try reader["LoadBalancerName"].readIfPresent() + value.dnsName = try reader["DNSName"].readIfPresent() + value.canonicalHostedZoneName = try reader["CanonicalHostedZoneName"].readIfPresent() + value.canonicalHostedZoneNameID = try reader["CanonicalHostedZoneNameID"].readIfPresent() + value.listenerDescriptions = try reader["ListenerDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.ListenerDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.policies = try reader["Policies"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.Policies.readingClosure) + value.backendServerDescriptions = try reader["BackendServerDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.BackendServerDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.subnets = try reader["Subnets"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.vpcId = try reader["VPCId"].readIfPresent() + value.instances = try reader["Instances"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.Instance.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.healthCheck = try reader["HealthCheck"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.HealthCheck.readingClosure) + value.sourceSecurityGroup = try reader["SourceSecurityGroup"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.SourceSecurityGroup.readingClosure) + value.securityGroups = try reader["SecurityGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.createdTime = try reader["CreatedTime"].readTimestampIfPresent(format: .dateTime) + value.scheme = try reader["Scheme"].readIfPresent() + return value } - let createdTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTime) - createdTime = createdTimeDecoded - let schemeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheme) - scheme = schemeDecoded } } @@ -5189,6 +3813,11 @@ extension ElasticLoadBalancingClientTypes { } extension ModifyLoadBalancerAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerAttributes = "LoadBalancerAttributes" + case loadBalancerName = "LoadBalancerName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerAttributes = loadBalancerAttributes { @@ -5228,36 +3857,16 @@ public struct ModifyLoadBalancerAttributesInput: Swift.Equatable { } } -struct ModifyLoadBalancerAttributesInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let loadBalancerAttributes: ElasticLoadBalancingClientTypes.LoadBalancerAttributes? -} - -extension ModifyLoadBalancerAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerAttributes = "LoadBalancerAttributes" - case loadBalancerName = "LoadBalancerName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let loadBalancerAttributesDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.LoadBalancerAttributes.self, forKey: .loadBalancerAttributes) - loadBalancerAttributes = loadBalancerAttributesDecoded - } -} +extension ModifyLoadBalancerAttributesOutput { -extension ModifyLoadBalancerAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyLoadBalancerAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.loadBalancerAttributes = output.loadBalancerAttributes - self.loadBalancerName = output.loadBalancerName - } else { - self.loadBalancerAttributes = nil - self.loadBalancerName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyLoadBalancerAttributesResult"] + var value = ModifyLoadBalancerAttributesOutput() + value.loadBalancerAttributes = try reader["LoadBalancerAttributes"].readIfPresent(readingClosure: ElasticLoadBalancingClientTypes.LoadBalancerAttributes.readingClosure) + value.loadBalancerName = try reader["LoadBalancerName"].readIfPresent() + return value } } } @@ -5279,50 +3888,34 @@ public struct ModifyLoadBalancerAttributesOutput: Swift.Equatable { } } -struct ModifyLoadBalancerAttributesOutputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let loadBalancerAttributes: ElasticLoadBalancingClientTypes.LoadBalancerAttributes? -} - -extension ModifyLoadBalancerAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerAttributes = "LoadBalancerAttributes" - case loadBalancerName = "LoadBalancerName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyLoadBalancerAttributesResult")) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let loadBalancerAttributesDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingClientTypes.LoadBalancerAttributes.self, forKey: .loadBalancerAttributes) - loadBalancerAttributes = loadBalancerAttributesDecoded - } -} +enum ModifyLoadBalancerAttributesOutputError { -enum ModifyLoadBalancerAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerAttributeNotFound": return try await LoadBalancerAttributeNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerAttributeNotFound": return try await LoadBalancerAttributeNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension OperationNotPermittedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OperationNotPermittedException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5350,23 +3943,7 @@ public struct OperationNotPermittedException: ClientRuntime.ModeledError, AWSCli } } -struct OperationNotPermittedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension OperationNotPermittedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingClientTypes.Policies: Swift.Codable { +extension ElasticLoadBalancingClientTypes.Policies: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case appCookieStickinessPolicies = "AppCookieStickinessPolicies" case lbCookieStickinessPolicies = "LBCookieStickinessPolicies" @@ -5413,64 +3990,14 @@ extension ElasticLoadBalancingClientTypes.Policies: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.appCookieStickinessPolicies) { - struct KeyVal0{struct member{}} - let appCookieStickinessPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .appCookieStickinessPolicies) - if let appCookieStickinessPoliciesWrappedContainer = appCookieStickinessPoliciesWrappedContainer { - let appCookieStickinessPoliciesContainer = try appCookieStickinessPoliciesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.AppCookieStickinessPolicy].self, forKey: .member) - var appCookieStickinessPoliciesBuffer:[ElasticLoadBalancingClientTypes.AppCookieStickinessPolicy]? = nil - if let appCookieStickinessPoliciesContainer = appCookieStickinessPoliciesContainer { - appCookieStickinessPoliciesBuffer = [ElasticLoadBalancingClientTypes.AppCookieStickinessPolicy]() - for structureContainer0 in appCookieStickinessPoliciesContainer { - appCookieStickinessPoliciesBuffer?.append(structureContainer0) - } - } - appCookieStickinessPolicies = appCookieStickinessPoliciesBuffer - } else { - appCookieStickinessPolicies = [] - } - } else { - appCookieStickinessPolicies = nil - } - if containerValues.contains(.lbCookieStickinessPolicies) { - struct KeyVal0{struct member{}} - let lbCookieStickinessPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .lbCookieStickinessPolicies) - if let lbCookieStickinessPoliciesWrappedContainer = lbCookieStickinessPoliciesWrappedContainer { - let lbCookieStickinessPoliciesContainer = try lbCookieStickinessPoliciesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.LBCookieStickinessPolicy].self, forKey: .member) - var lbCookieStickinessPoliciesBuffer:[ElasticLoadBalancingClientTypes.LBCookieStickinessPolicy]? = nil - if let lbCookieStickinessPoliciesContainer = lbCookieStickinessPoliciesContainer { - lbCookieStickinessPoliciesBuffer = [ElasticLoadBalancingClientTypes.LBCookieStickinessPolicy]() - for structureContainer0 in lbCookieStickinessPoliciesContainer { - lbCookieStickinessPoliciesBuffer?.append(structureContainer0) - } - } - lbCookieStickinessPolicies = lbCookieStickinessPoliciesBuffer - } else { - lbCookieStickinessPolicies = [] - } - } else { - lbCookieStickinessPolicies = nil - } - if containerValues.contains(.otherPolicies) { - struct KeyVal0{struct member{}} - let otherPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .otherPolicies) - if let otherPoliciesWrappedContainer = otherPoliciesWrappedContainer { - let otherPoliciesContainer = try otherPoliciesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var otherPoliciesBuffer:[Swift.String]? = nil - if let otherPoliciesContainer = otherPoliciesContainer { - otherPoliciesBuffer = [Swift.String]() - for stringContainer0 in otherPoliciesContainer { - otherPoliciesBuffer?.append(stringContainer0) - } - } - otherPolicies = otherPoliciesBuffer - } else { - otherPolicies = [] - } - } else { - otherPolicies = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.Policies() + value.appCookieStickinessPolicies = try reader["AppCookieStickinessPolicies"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.AppCookieStickinessPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.lbCookieStickinessPolicies = try reader["LBCookieStickinessPolicies"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.LBCookieStickinessPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.otherPolicies = try reader["OtherPolicies"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5499,7 +4026,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.PolicyAttribute: Swift.Codable { +extension ElasticLoadBalancingClientTypes.PolicyAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeName = "AttributeName" case attributeValue = "AttributeValue" @@ -5515,12 +4042,14 @@ extension ElasticLoadBalancingClientTypes.PolicyAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - let attributeValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeValue) - attributeValue = attributeValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.PolicyAttribute() + value.attributeName = try reader["AttributeName"].readIfPresent() + value.attributeValue = try reader["AttributeValue"].readIfPresent() + return value + } } } @@ -5544,7 +4073,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.PolicyAttributeDescription: Swift.Codable { +extension ElasticLoadBalancingClientTypes.PolicyAttributeDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeName = "AttributeName" case attributeValue = "AttributeValue" @@ -5560,12 +4089,14 @@ extension ElasticLoadBalancingClientTypes.PolicyAttributeDescription: Swift.Coda } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - let attributeValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeValue) - attributeValue = attributeValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.PolicyAttributeDescription() + value.attributeName = try reader["AttributeName"].readIfPresent() + value.attributeValue = try reader["AttributeValue"].readIfPresent() + return value + } } } @@ -5589,7 +4120,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.PolicyAttributeTypeDescription: Swift.Codable { +extension ElasticLoadBalancingClientTypes.PolicyAttributeTypeDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeName = "AttributeName" case attributeType = "AttributeType" @@ -5617,18 +4148,17 @@ extension ElasticLoadBalancingClientTypes.PolicyAttributeTypeDescription: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - let attributeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeType) - attributeType = attributeTypeDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let cardinalityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cardinality) - cardinality = cardinalityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.PolicyAttributeTypeDescription() + value.attributeName = try reader["AttributeName"].readIfPresent() + value.attributeType = try reader["AttributeType"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.cardinality = try reader["Cardinality"].readIfPresent() + return value + } } } @@ -5672,7 +4202,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.PolicyDescription: Swift.Codable { +extension ElasticLoadBalancingClientTypes.PolicyDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case policyAttributeDescriptions = "PolicyAttributeDescriptions" case policyName = "PolicyName" @@ -5701,30 +4231,14 @@ extension ElasticLoadBalancingClientTypes.PolicyDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyTypeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyTypeName) - policyTypeName = policyTypeNameDecoded - if containerValues.contains(.policyAttributeDescriptions) { - struct KeyVal0{struct member{}} - let policyAttributeDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyAttributeDescriptions) - if let policyAttributeDescriptionsWrappedContainer = policyAttributeDescriptionsWrappedContainer { - let policyAttributeDescriptionsContainer = try policyAttributeDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.PolicyAttributeDescription].self, forKey: .member) - var policyAttributeDescriptionsBuffer:[ElasticLoadBalancingClientTypes.PolicyAttributeDescription]? = nil - if let policyAttributeDescriptionsContainer = policyAttributeDescriptionsContainer { - policyAttributeDescriptionsBuffer = [ElasticLoadBalancingClientTypes.PolicyAttributeDescription]() - for structureContainer0 in policyAttributeDescriptionsContainer { - policyAttributeDescriptionsBuffer?.append(structureContainer0) - } - } - policyAttributeDescriptions = policyAttributeDescriptionsBuffer - } else { - policyAttributeDescriptions = [] - } - } else { - policyAttributeDescriptions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.PolicyDescription() + value.policyName = try reader["PolicyName"].readIfPresent() + value.policyTypeName = try reader["PolicyTypeName"].readIfPresent() + value.policyAttributeDescriptions = try reader["PolicyAttributeDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.PolicyAttributeDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5754,16 +4268,14 @@ extension ElasticLoadBalancingClientTypes { } extension PolicyNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PolicyNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5791,23 +4303,7 @@ public struct PolicyNotFoundException: ClientRuntime.ModeledError, AWSClientRunt } } -struct PolicyNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PolicyNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingClientTypes.PolicyTypeDescription: Swift.Codable { +extension ElasticLoadBalancingClientTypes.PolicyTypeDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case policyAttributeTypeDescriptions = "PolicyAttributeTypeDescriptions" @@ -5836,30 +4332,14 @@ extension ElasticLoadBalancingClientTypes.PolicyTypeDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyTypeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyTypeName) - policyTypeName = policyTypeNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.policyAttributeTypeDescriptions) { - struct KeyVal0{struct member{}} - let policyAttributeTypeDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyAttributeTypeDescriptions) - if let policyAttributeTypeDescriptionsWrappedContainer = policyAttributeTypeDescriptionsWrappedContainer { - let policyAttributeTypeDescriptionsContainer = try policyAttributeTypeDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.PolicyAttributeTypeDescription].self, forKey: .member) - var policyAttributeTypeDescriptionsBuffer:[ElasticLoadBalancingClientTypes.PolicyAttributeTypeDescription]? = nil - if let policyAttributeTypeDescriptionsContainer = policyAttributeTypeDescriptionsContainer { - policyAttributeTypeDescriptionsBuffer = [ElasticLoadBalancingClientTypes.PolicyAttributeTypeDescription]() - for structureContainer0 in policyAttributeTypeDescriptionsContainer { - policyAttributeTypeDescriptionsBuffer?.append(structureContainer0) - } - } - policyAttributeTypeDescriptions = policyAttributeTypeDescriptionsBuffer - } else { - policyAttributeTypeDescriptions = [] - } - } else { - policyAttributeTypeDescriptions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.PolicyTypeDescription() + value.policyTypeName = try reader["PolicyTypeName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.policyAttributeTypeDescriptions = try reader["PolicyAttributeTypeDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.PolicyAttributeTypeDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5889,16 +4369,14 @@ extension ElasticLoadBalancingClientTypes { } extension PolicyTypeNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PolicyTypeNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5926,23 +4404,12 @@ public struct PolicyTypeNotFoundException: ClientRuntime.ModeledError, AWSClient } } -struct PolicyTypeNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PolicyTypeNotFoundExceptionBody: Swift.Decodable { +extension RegisterInstancesWithLoadBalancerInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case instances = "Instances" + case loadBalancerName = "LoadBalancerName" } -} -extension RegisterInstancesWithLoadBalancerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instances = instances { @@ -5991,51 +4458,15 @@ public struct RegisterInstancesWithLoadBalancerInput: Swift.Equatable { } } -struct RegisterInstancesWithLoadBalancerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let instances: [ElasticLoadBalancingClientTypes.Instance]? -} - -extension RegisterInstancesWithLoadBalancerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instances = "Instances" - case loadBalancerName = "LoadBalancerName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[ElasticLoadBalancingClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [ElasticLoadBalancingClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] - } - } else { - instances = nil - } - } -} +extension RegisterInstancesWithLoadBalancerOutput { -extension RegisterInstancesWithLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RegisterInstancesWithLoadBalancerOutputBody = try responseDecoder.decode(responseBody: data) - self.instances = output.instances - } else { - self.instances = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RegisterInstancesWithLoadBalancerResult"] + var value = RegisterInstancesWithLoadBalancerOutput() + value.instances = try reader["Instances"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.Instance.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6053,52 +4484,30 @@ public struct RegisterInstancesWithLoadBalancerOutput: Swift.Equatable { } } -struct RegisterInstancesWithLoadBalancerOutputBody: Swift.Equatable { - let instances: [ElasticLoadBalancingClientTypes.Instance]? -} - -extension RegisterInstancesWithLoadBalancerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instances = "Instances" - } +enum RegisterInstancesWithLoadBalancerOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RegisterInstancesWithLoadBalancerResult")) - if containerValues.contains(.instances) { - struct KeyVal0{struct member{}} - let instancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instances) - if let instancesWrappedContainer = instancesWrappedContainer { - let instancesContainer = try instancesWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Instance].self, forKey: .member) - var instancesBuffer:[ElasticLoadBalancingClientTypes.Instance]? = nil - if let instancesContainer = instancesContainer { - instancesBuffer = [ElasticLoadBalancingClientTypes.Instance]() - for structureContainer0 in instancesContainer { - instancesBuffer?.append(structureContainer0) - } - } - instances = instancesBuffer - } else { - instances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInstance": return try await InvalidEndPointException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - instances = nil } } } -enum RegisterInstancesWithLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInstance": return try await InvalidEndPointException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension RemoveTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerNames = "LoadBalancerNames" + case tags = "Tags" } -} -extension RemoveTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerNames = loadBalancerNames { @@ -6156,82 +4565,45 @@ public struct RemoveTagsInput: Swift.Equatable { } } -struct RemoveTagsInputBody: Swift.Equatable { - let loadBalancerNames: [Swift.String]? - let tags: [ElasticLoadBalancingClientTypes.TagKeyOnly]? -} - -extension RemoveTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerNames = "LoadBalancerNames" - case tags = "Tags" - } +extension RemoveTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.loadBalancerNames) { - struct KeyVal0{struct member{}} - let loadBalancerNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerNames) - if let loadBalancerNamesWrappedContainer = loadBalancerNamesWrappedContainer { - let loadBalancerNamesContainer = try loadBalancerNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerNamesBuffer:[Swift.String]? = nil - if let loadBalancerNamesContainer = loadBalancerNamesContainer { - loadBalancerNamesBuffer = [Swift.String]() - for stringContainer0 in loadBalancerNamesContainer { - loadBalancerNamesBuffer?.append(stringContainer0) - } - } - loadBalancerNames = loadBalancerNamesBuffer - } else { - loadBalancerNames = [] - } - } else { - loadBalancerNames = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.TagKeyOnly].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingClientTypes.TagKeyOnly]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingClientTypes.TagKeyOnly]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveTagsOutput() } } } -extension RemoveTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// Contains the output of RemoveTags. public struct RemoveTagsOutput: Swift.Equatable { public init() { } } -enum RemoveTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetLoadBalancerListenerSSLCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + case loadBalancerPort = "LoadBalancerPort" + case sslCertificateId = "SSLCertificateId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -6279,32 +4651,12 @@ public struct SetLoadBalancerListenerSSLCertificateInput: Swift.Equatable { } } -struct SetLoadBalancerListenerSSLCertificateInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let loadBalancerPort: Swift.Int? - let sslCertificateId: Swift.String? -} - -extension SetLoadBalancerListenerSSLCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case loadBalancerPort = "LoadBalancerPort" - case sslCertificateId = "SSLCertificateId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let loadBalancerPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .loadBalancerPort) ?? 0 - loadBalancerPort = loadBalancerPortDecoded - let sslCertificateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sslCertificateId) - sslCertificateId = sslCertificateIdDecoded - } -} +extension SetLoadBalancerListenerSSLCertificateOutput { -extension SetLoadBalancerListenerSSLCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetLoadBalancerListenerSSLCertificateOutput() + } } } @@ -6314,21 +4666,34 @@ public struct SetLoadBalancerListenerSSLCertificateOutput: Swift.Equatable { public init() { } } -enum SetLoadBalancerListenerSSLCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CertificateNotFound": return try await CertificateNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetLoadBalancerListenerSSLCertificateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CertificateNotFound": return try await CertificateNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetLoadBalancerPoliciesForBackendServerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instancePort = "InstancePort" + case loadBalancerName = "LoadBalancerName" + case policyNames = "PolicyNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instancePort = instancePort { @@ -6385,71 +4750,47 @@ public struct SetLoadBalancerPoliciesForBackendServerInput: Swift.Equatable { } } -struct SetLoadBalancerPoliciesForBackendServerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let instancePort: Swift.Int? - let policyNames: [Swift.String]? -} - -extension SetLoadBalancerPoliciesForBackendServerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instancePort = "InstancePort" - case loadBalancerName = "LoadBalancerName" - case policyNames = "PolicyNames" - } +extension SetLoadBalancerPoliciesForBackendServerOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let instancePortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .instancePort) - instancePort = instancePortDecoded - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] - } - } else { - policyNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetLoadBalancerPoliciesForBackendServerOutput() } } } -extension SetLoadBalancerPoliciesForBackendServerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// Contains the output of SetLoadBalancerPoliciesForBackendServer. public struct SetLoadBalancerPoliciesForBackendServerOutput: Swift.Equatable { public init() { } } -enum SetLoadBalancerPoliciesForBackendServerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyNotFound": return try await PolicyNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetLoadBalancerPoliciesForBackendServerOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyNotFound": return try await PolicyNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetLoadBalancerPoliciesOfListenerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerName = "LoadBalancerName" + case loadBalancerPort = "LoadBalancerPort" + case policyNames = "PolicyNames" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerName = loadBalancerName { @@ -6506,72 +4847,42 @@ public struct SetLoadBalancerPoliciesOfListenerInput: Swift.Equatable { } } -struct SetLoadBalancerPoliciesOfListenerInputBody: Swift.Equatable { - let loadBalancerName: Swift.String? - let loadBalancerPort: Swift.Int? - let policyNames: [Swift.String]? -} - -extension SetLoadBalancerPoliciesOfListenerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerName = "LoadBalancerName" - case loadBalancerPort = "LoadBalancerPort" - case policyNames = "PolicyNames" - } +extension SetLoadBalancerPoliciesOfListenerOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let loadBalancerPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .loadBalancerPort) ?? 0 - loadBalancerPort = loadBalancerPortDecoded - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] - } - } else { - policyNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetLoadBalancerPoliciesOfListenerOutput() } } } -extension SetLoadBalancerPoliciesOfListenerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// Contains the output of SetLoadBalancePoliciesOfListener. public struct SetLoadBalancerPoliciesOfListenerOutput: Swift.Equatable { public init() { } } -enum SetLoadBalancerPoliciesOfListenerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await AccessPointNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyNotFound": return try await PolicyNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetLoadBalancerPoliciesOfListenerOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await AccessPointNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyNotFound": return try await PolicyNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ElasticLoadBalancingClientTypes.SourceSecurityGroup: Swift.Codable { +extension ElasticLoadBalancingClientTypes.SourceSecurityGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case groupName = "GroupName" case ownerAlias = "OwnerAlias" @@ -6587,12 +4898,14 @@ extension ElasticLoadBalancingClientTypes.SourceSecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAlias) - ownerAlias = ownerAliasDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.SourceSecurityGroup() + value.ownerAlias = try reader["OwnerAlias"].readIfPresent() + value.groupName = try reader["GroupName"].readIfPresent() + return value + } } } @@ -6617,16 +4930,14 @@ extension ElasticLoadBalancingClientTypes { } extension SubnetNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubnetNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6654,23 +4965,7 @@ public struct SubnetNotFoundException: ClientRuntime.ModeledError, AWSClientRunt } } -struct SubnetNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubnetNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingClientTypes.Tag: Swift.Codable { +extension ElasticLoadBalancingClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -6686,12 +4981,14 @@ extension ElasticLoadBalancingClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -6716,7 +5013,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.TagDescription: Swift.Codable { +extension ElasticLoadBalancingClientTypes.TagDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case loadBalancerName = "LoadBalancerName" case tags = "Tags" @@ -6741,28 +5038,13 @@ extension ElasticLoadBalancingClientTypes.TagDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.TagDescription() + value.loadBalancerName = try reader["LoadBalancerName"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6787,7 +5069,7 @@ extension ElasticLoadBalancingClientTypes { } -extension ElasticLoadBalancingClientTypes.TagKeyOnly: Swift.Codable { +extension ElasticLoadBalancingClientTypes.TagKeyOnly: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" } @@ -6799,10 +5081,13 @@ extension ElasticLoadBalancingClientTypes.TagKeyOnly: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingClientTypes.TagKeyOnly() + value.key = try reader["Key"].readIfPresent() + return value + } } } @@ -6823,16 +5108,14 @@ extension ElasticLoadBalancingClientTypes { } extension TooManyAccessPointsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyAccessPointsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6860,33 +5143,15 @@ public struct TooManyAccessPointsException: ClientRuntime.ModeledError, AWSClien } } -struct TooManyAccessPointsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyAccessPointsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyPoliciesException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyPoliciesException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6914,33 +5179,15 @@ public struct TooManyPoliciesException: ClientRuntime.ModeledError, AWSClientRun } } -struct TooManyPoliciesExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyPoliciesExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyTagsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTagsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6968,33 +5215,15 @@ public struct TooManyTagsException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct TooManyTagsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTagsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UnsupportedProtocolException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnsupportedProtocolException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7021,19 +5250,3 @@ public struct UnsupportedProtocolException: ClientRuntime.ModeledError, AWSClien self.properties.message = message } } - -struct UnsupportedProtocolExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnsupportedProtocolExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} diff --git a/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift b/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift index a624138448c..2634ac6cf63 100644 --- a/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift +++ b/Sources/Services/AWSElasticLoadBalancingv2/ElasticLoadBalancingv2Client.swift @@ -11,14 +11,11 @@ public class ElasticLoadBalancingv2Client { let config: ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration let serviceName = "Elastic Load Balancing v2" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: ElasticLoadBalancingv2Client.ElasticLoadBalancingv2ClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -80,7 +77,6 @@ extension ElasticLoadBalancingv2Client { public func addListenerCertificates(input: AddListenerCertificatesInput) async throws -> AddListenerCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addListenerCertificates") @@ -104,7 +100,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddListenerCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddListenerCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddListenerCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -131,7 +127,6 @@ extension ElasticLoadBalancingv2Client { public func addTags(input: AddTagsInput) async throws -> AddTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addTags") @@ -155,7 +150,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -179,7 +174,6 @@ extension ElasticLoadBalancingv2Client { public func addTrustStoreRevocations(input: AddTrustStoreRevocationsInput) async throws -> AddTrustStoreRevocationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addTrustStoreRevocations") @@ -203,7 +197,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddTrustStoreRevocationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddTrustStoreRevocationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddTrustStoreRevocationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -252,7 +246,6 @@ extension ElasticLoadBalancingv2Client { public func createListener(input: CreateListenerInput) async throws -> CreateListenerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createListener") @@ -276,7 +269,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateListenerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateListenerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateListenerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -318,7 +311,6 @@ extension ElasticLoadBalancingv2Client { public func createLoadBalancer(input: CreateLoadBalancerInput) async throws -> CreateLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLoadBalancer") @@ -342,7 +334,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -377,7 +369,6 @@ extension ElasticLoadBalancingv2Client { public func createRule(input: CreateRuleInput) async throws -> CreateRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createRule") @@ -401,7 +392,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -434,7 +425,6 @@ extension ElasticLoadBalancingv2Client { public func createTargetGroup(input: CreateTargetGroupInput) async throws -> CreateTargetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTargetGroup") @@ -458,7 +448,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTargetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTargetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTargetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -484,7 +474,6 @@ extension ElasticLoadBalancingv2Client { public func createTrustStore(input: CreateTrustStoreInput) async throws -> CreateTrustStoreOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTrustStore") @@ -508,7 +497,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTrustStoreOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTrustStoreOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTrustStoreOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -530,7 +519,6 @@ extension ElasticLoadBalancingv2Client { public func deleteListener(input: DeleteListenerInput) async throws -> DeleteListenerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteListener") @@ -554,7 +542,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteListenerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteListenerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteListenerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -577,7 +565,6 @@ extension ElasticLoadBalancingv2Client { public func deleteLoadBalancer(input: DeleteLoadBalancerInput) async throws -> DeleteLoadBalancerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLoadBalancer") @@ -601,7 +588,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLoadBalancerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLoadBalancerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLoadBalancerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -623,7 +610,6 @@ extension ElasticLoadBalancingv2Client { public func deleteRule(input: DeleteRuleInput) async throws -> DeleteRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteRule") @@ -647,7 +633,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -668,7 +654,6 @@ extension ElasticLoadBalancingv2Client { public func deleteTargetGroup(input: DeleteTargetGroupInput) async throws -> DeleteTargetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTargetGroup") @@ -692,7 +677,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTargetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTargetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTargetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -714,7 +699,6 @@ extension ElasticLoadBalancingv2Client { public func deleteTrustStore(input: DeleteTrustStoreInput) async throws -> DeleteTrustStoreOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTrustStore") @@ -738,7 +722,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTrustStoreOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTrustStoreOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTrustStoreOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -769,7 +753,6 @@ extension ElasticLoadBalancingv2Client { public func deregisterTargets(input: DeregisterTargetsInput) async throws -> DeregisterTargetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deregisterTargets") @@ -793,7 +776,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeregisterTargetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeregisterTargetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeregisterTargetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -815,7 +798,6 @@ extension ElasticLoadBalancingv2Client { public func describeAccountLimits(input: DescribeAccountLimitsInput) async throws -> DescribeAccountLimitsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAccountLimits") @@ -839,7 +821,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAccountLimitsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAccountLimitsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAccountLimitsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -860,7 +842,6 @@ extension ElasticLoadBalancingv2Client { public func describeListenerCertificates(input: DescribeListenerCertificatesInput) async throws -> DescribeListenerCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeListenerCertificates") @@ -884,7 +865,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeListenerCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeListenerCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeListenerCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -907,7 +888,6 @@ extension ElasticLoadBalancingv2Client { public func describeListeners(input: DescribeListenersInput) async throws -> DescribeListenersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeListeners") @@ -931,7 +911,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeListenersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeListenersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeListenersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -958,7 +938,6 @@ extension ElasticLoadBalancingv2Client { public func describeLoadBalancerAttributes(input: DescribeLoadBalancerAttributesInput) async throws -> DescribeLoadBalancerAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoadBalancerAttributes") @@ -982,7 +961,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoadBalancerAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoadBalancerAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoadBalancerAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1003,7 +982,6 @@ extension ElasticLoadBalancingv2Client { public func describeLoadBalancers(input: DescribeLoadBalancersInput) async throws -> DescribeLoadBalancersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoadBalancers") @@ -1027,7 +1005,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoadBalancersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoadBalancersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoadBalancersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1050,7 +1028,6 @@ extension ElasticLoadBalancingv2Client { public func describeRules(input: DescribeRulesInput) async throws -> DescribeRulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeRules") @@ -1074,7 +1051,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeRulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeRulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeRulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1095,7 +1072,6 @@ extension ElasticLoadBalancingv2Client { public func describeSSLPolicies(input: DescribeSSLPoliciesInput) async throws -> DescribeSSLPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSSLPolicies") @@ -1119,7 +1095,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSSLPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSSLPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSSLPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1144,7 +1120,6 @@ extension ElasticLoadBalancingv2Client { public func describeTags(input: DescribeTagsInput) async throws -> DescribeTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTags") @@ -1168,7 +1143,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1195,7 +1170,6 @@ extension ElasticLoadBalancingv2Client { public func describeTargetGroupAttributes(input: DescribeTargetGroupAttributesInput) async throws -> DescribeTargetGroupAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTargetGroupAttributes") @@ -1219,7 +1193,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTargetGroupAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTargetGroupAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTargetGroupAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1241,7 +1215,6 @@ extension ElasticLoadBalancingv2Client { public func describeTargetGroups(input: DescribeTargetGroupsInput) async throws -> DescribeTargetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTargetGroups") @@ -1265,7 +1238,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTargetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTargetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTargetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1288,7 +1261,6 @@ extension ElasticLoadBalancingv2Client { public func describeTargetHealth(input: DescribeTargetHealthInput) async throws -> DescribeTargetHealthOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTargetHealth") @@ -1312,7 +1284,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTargetHealthOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTargetHealthOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTargetHealthOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1333,7 +1305,6 @@ extension ElasticLoadBalancingv2Client { public func describeTrustStoreAssociations(input: DescribeTrustStoreAssociationsInput) async throws -> DescribeTrustStoreAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTrustStoreAssociations") @@ -1357,7 +1328,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTrustStoreAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTrustStoreAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTrustStoreAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1379,7 +1350,6 @@ extension ElasticLoadBalancingv2Client { public func describeTrustStoreRevocations(input: DescribeTrustStoreRevocationsInput) async throws -> DescribeTrustStoreRevocationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTrustStoreRevocations") @@ -1403,7 +1373,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTrustStoreRevocationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTrustStoreRevocationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTrustStoreRevocationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1424,7 +1394,6 @@ extension ElasticLoadBalancingv2Client { public func describeTrustStores(input: DescribeTrustStoresInput) async throws -> DescribeTrustStoresOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTrustStores") @@ -1448,7 +1417,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTrustStoresOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTrustStoresOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTrustStoresOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1469,7 +1438,6 @@ extension ElasticLoadBalancingv2Client { public func getTrustStoreCaCertificatesBundle(input: GetTrustStoreCaCertificatesBundleInput) async throws -> GetTrustStoreCaCertificatesBundleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTrustStoreCaCertificatesBundle") @@ -1493,7 +1461,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTrustStoreCaCertificatesBundleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTrustStoreCaCertificatesBundleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTrustStoreCaCertificatesBundleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1515,7 +1483,6 @@ extension ElasticLoadBalancingv2Client { public func getTrustStoreRevocationContent(input: GetTrustStoreRevocationContentInput) async throws -> GetTrustStoreRevocationContentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTrustStoreRevocationContent") @@ -1539,7 +1506,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTrustStoreRevocationContentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTrustStoreRevocationContentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTrustStoreRevocationContentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1578,7 +1545,6 @@ extension ElasticLoadBalancingv2Client { public func modifyListener(input: ModifyListenerInput) async throws -> ModifyListenerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyListener") @@ -1602,7 +1568,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyListenerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyListenerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyListenerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1624,7 +1590,6 @@ extension ElasticLoadBalancingv2Client { public func modifyLoadBalancerAttributes(input: ModifyLoadBalancerAttributesInput) async throws -> ModifyLoadBalancerAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyLoadBalancerAttributes") @@ -1648,7 +1613,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyLoadBalancerAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyLoadBalancerAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyLoadBalancerAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1679,7 +1644,6 @@ extension ElasticLoadBalancingv2Client { public func modifyRule(input: ModifyRuleInput) async throws -> ModifyRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyRule") @@ -1703,7 +1667,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1725,7 +1689,6 @@ extension ElasticLoadBalancingv2Client { public func modifyTargetGroup(input: ModifyTargetGroupInput) async throws -> ModifyTargetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTargetGroup") @@ -1749,7 +1712,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTargetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTargetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTargetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1771,7 +1734,6 @@ extension ElasticLoadBalancingv2Client { public func modifyTargetGroupAttributes(input: ModifyTargetGroupAttributesInput) async throws -> ModifyTargetGroupAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTargetGroupAttributes") @@ -1795,7 +1757,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTargetGroupAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTargetGroupAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTargetGroupAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1818,7 +1780,6 @@ extension ElasticLoadBalancingv2Client { public func modifyTrustStore(input: ModifyTrustStoreInput) async throws -> ModifyTrustStoreOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTrustStore") @@ -1842,7 +1803,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTrustStoreOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTrustStoreOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTrustStoreOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1866,7 +1827,6 @@ extension ElasticLoadBalancingv2Client { public func registerTargets(input: RegisterTargetsInput) async throws -> RegisterTargetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerTargets") @@ -1890,7 +1850,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterTargetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterTargetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterTargetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1912,7 +1872,6 @@ extension ElasticLoadBalancingv2Client { public func removeListenerCertificates(input: RemoveListenerCertificatesInput) async throws -> RemoveListenerCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeListenerCertificates") @@ -1936,7 +1895,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveListenerCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveListenerCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveListenerCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1962,7 +1921,6 @@ extension ElasticLoadBalancingv2Client { public func removeTags(input: RemoveTagsInput) async throws -> RemoveTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeTags") @@ -1986,7 +1944,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2008,7 +1966,6 @@ extension ElasticLoadBalancingv2Client { public func removeTrustStoreRevocations(input: RemoveTrustStoreRevocationsInput) async throws -> RemoveTrustStoreRevocationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeTrustStoreRevocations") @@ -2032,7 +1989,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveTrustStoreRevocationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveTrustStoreRevocationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveTrustStoreRevocationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2055,7 +2012,6 @@ extension ElasticLoadBalancingv2Client { public func setIpAddressType(input: SetIpAddressTypeInput) async throws -> SetIpAddressTypeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setIpAddressType") @@ -2079,7 +2035,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetIpAddressTypeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetIpAddressTypeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetIpAddressTypeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2102,7 +2058,6 @@ extension ElasticLoadBalancingv2Client { public func setRulePriorities(input: SetRulePrioritiesInput) async throws -> SetRulePrioritiesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setRulePriorities") @@ -2126,7 +2081,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetRulePrioritiesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetRulePrioritiesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetRulePrioritiesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2149,7 +2104,6 @@ extension ElasticLoadBalancingv2Client { public func setSecurityGroups(input: SetSecurityGroupsInput) async throws -> SetSecurityGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setSecurityGroups") @@ -2173,7 +2127,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetSecurityGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetSecurityGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetSecurityGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2199,7 +2153,6 @@ extension ElasticLoadBalancingv2Client { public func setSubnets(input: SetSubnetsInput) async throws -> SetSubnetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setSubnets") @@ -2223,7 +2176,7 @@ extension ElasticLoadBalancingv2Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetSubnetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetSubnetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetSubnetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSElasticLoadBalancingv2/models/Models.swift b/Sources/Services/AWSElasticLoadBalancingv2/models/Models.swift index 3179f1f3843..dcdfd94203b 100644 --- a/Sources/Services/AWSElasticLoadBalancingv2/models/Models.swift +++ b/Sources/Services/AWSElasticLoadBalancingv2/models/Models.swift @@ -1,18 +1,18 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension ALPNPolicyNotSupportedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ALPNPolicyNotSupportedException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -40,23 +40,7 @@ public struct ALPNPolicyNotSupportedException: ClientRuntime.ModeledError, AWSCl } } -struct ALPNPolicyNotSupportedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ALPNPolicyNotSupportedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.Action: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.Action: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authenticateCognitoConfig = "AuthenticateCognitoConfig" case authenticateOidcConfig = "AuthenticateOidcConfig" @@ -96,24 +80,20 @@ extension ElasticLoadBalancingv2ClientTypes.Action: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ActionTypeEnum.self, forKey: .type) - type = typeDecoded - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - let authenticateOidcConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.AuthenticateOidcActionConfig.self, forKey: .authenticateOidcConfig) - authenticateOidcConfig = authenticateOidcConfigDecoded - let authenticateCognitoConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.AuthenticateCognitoActionConfig.self, forKey: .authenticateCognitoConfig) - authenticateCognitoConfig = authenticateCognitoConfigDecoded - let orderDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .order) - order = orderDecoded - let redirectConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.RedirectActionConfig.self, forKey: .redirectConfig) - redirectConfig = redirectConfigDecoded - let fixedResponseConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.FixedResponseActionConfig.self, forKey: .fixedResponseConfig) - fixedResponseConfig = fixedResponseConfigDecoded - let forwardConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ForwardActionConfig.self, forKey: .forwardConfig) - forwardConfig = forwardConfigDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.Action() + value.type = try reader["Type"].readIfPresent() + value.targetGroupArn = try reader["TargetGroupArn"].readIfPresent() + value.authenticateOidcConfig = try reader["AuthenticateOidcConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.AuthenticateOidcActionConfig.readingClosure) + value.authenticateCognitoConfig = try reader["AuthenticateCognitoConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.AuthenticateCognitoActionConfig.readingClosure) + value.order = try reader["Order"].readIfPresent() + value.redirectConfig = try reader["RedirectConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.RedirectActionConfig.readingClosure) + value.fixedResponseConfig = try reader["FixedResponseConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.FixedResponseActionConfig.readingClosure) + value.forwardConfig = try reader["ForwardConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.ForwardActionConfig.readingClosure) + return value + } } } @@ -204,6 +184,11 @@ extension ElasticLoadBalancingv2ClientTypes { } extension AddListenerCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificates = "Certificates" + case listenerArn = "ListenerArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificates = certificates { @@ -251,51 +236,15 @@ public struct AddListenerCertificatesInput: Swift.Equatable { } } -struct AddListenerCertificatesInputBody: Swift.Equatable { - let listenerArn: Swift.String? - let certificates: [ElasticLoadBalancingv2ClientTypes.Certificate]? -} - -extension AddListenerCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificates = "Certificates" - case listenerArn = "ListenerArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .listenerArn) - listenerArn = listenerArnDecoded - if containerValues.contains(.certificates) { - struct KeyVal0{struct member{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[ElasticLoadBalancingv2ClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [ElasticLoadBalancingv2ClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] - } - } else { - certificates = nil - } - } -} +extension AddListenerCertificatesOutput { -extension AddListenerCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AddListenerCertificatesOutputBody = try responseDecoder.decode(responseBody: data) - self.certificates = output.certificates - } else { - self.certificates = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AddListenerCertificatesResult"] + var value = AddListenerCertificatesOutput() + value.certificates = try reader["Certificates"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Certificate.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -312,53 +261,31 @@ public struct AddListenerCertificatesOutput: Swift.Equatable { } } -struct AddListenerCertificatesOutputBody: Swift.Equatable { - let certificates: [ElasticLoadBalancingv2ClientTypes.Certificate]? -} - -extension AddListenerCertificatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificates = "Certificates" - } +enum AddListenerCertificatesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AddListenerCertificatesResult")) - if containerValues.contains(.certificates) { - struct KeyVal0{struct member{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[ElasticLoadBalancingv2ClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [ElasticLoadBalancingv2ClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CertificateNotFound": return try await CertificateNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyCertificates": return try await TooManyCertificatesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - certificates = nil } } } -enum AddListenerCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CertificateNotFound": return try await CertificateNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCertificates": return try await TooManyCertificatesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension AddTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArns = "ResourceArns" + case tags = "Tags" } -} -extension AddTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArns = resourceArns { @@ -415,87 +342,49 @@ public struct AddTagsInput: Swift.Equatable { } } -struct AddTagsInputBody: Swift.Equatable { - let resourceArns: [Swift.String]? - let tags: [ElasticLoadBalancingv2ClientTypes.Tag]? -} - -extension AddTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArns = "ResourceArns" - case tags = "Tags" - } +extension AddTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.resourceArns) { - struct KeyVal0{struct member{}} - let resourceArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceArns) - if let resourceArnsWrappedContainer = resourceArnsWrappedContainer { - let resourceArnsContainer = try resourceArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceArnsBuffer:[Swift.String]? = nil - if let resourceArnsContainer = resourceArnsContainer { - resourceArnsBuffer = [Swift.String]() - for stringContainer0 in resourceArnsContainer { - resourceArnsBuffer?.append(stringContainer0) - } - } - resourceArns = resourceArnsBuffer - } else { - resourceArns = [] - } - } else { - resourceArns = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingv2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingv2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddTagsOutput() } } } -extension AddTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct AddTagsOutput: Swift.Equatable { public init() { } } -enum AddTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DuplicateTagKeys": return try await DuplicateTagKeysException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleNotFound": return try await RuleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DuplicateTagKeys": return try await DuplicateTagKeysException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleNotFound": return try await RuleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddTrustStoreRevocationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case revocationContents = "RevocationContents" + case trustStoreArn = "TrustStoreArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let revocationContents = revocationContents { @@ -542,51 +431,15 @@ public struct AddTrustStoreRevocationsInput: Swift.Equatable { } } -struct AddTrustStoreRevocationsInputBody: Swift.Equatable { - let trustStoreArn: Swift.String? - let revocationContents: [ElasticLoadBalancingv2ClientTypes.RevocationContent]? -} - -extension AddTrustStoreRevocationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case revocationContents = "RevocationContents" - case trustStoreArn = "TrustStoreArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - if containerValues.contains(.revocationContents) { - struct KeyVal0{struct member{}} - let revocationContentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .revocationContents) - if let revocationContentsWrappedContainer = revocationContentsWrappedContainer { - let revocationContentsContainer = try revocationContentsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.RevocationContent].self, forKey: .member) - var revocationContentsBuffer:[ElasticLoadBalancingv2ClientTypes.RevocationContent]? = nil - if let revocationContentsContainer = revocationContentsContainer { - revocationContentsBuffer = [ElasticLoadBalancingv2ClientTypes.RevocationContent]() - for structureContainer0 in revocationContentsContainer { - revocationContentsBuffer?.append(structureContainer0) - } - } - revocationContents = revocationContentsBuffer - } else { - revocationContents = [] - } - } else { - revocationContents = nil - } - } -} +extension AddTrustStoreRevocationsOutput { -extension AddTrustStoreRevocationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AddTrustStoreRevocationsOutputBody = try responseDecoder.decode(responseBody: data) - self.trustStoreRevocations = output.trustStoreRevocations - } else { - self.trustStoreRevocations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AddTrustStoreRevocationsResult"] + var value = AddTrustStoreRevocationsOutput() + value.trustStoreRevocations = try reader["TrustStoreRevocations"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -603,64 +456,35 @@ public struct AddTrustStoreRevocationsOutput: Swift.Equatable { } } -struct AddTrustStoreRevocationsOutputBody: Swift.Equatable { - let trustStoreRevocations: [ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation]? -} +enum AddTrustStoreRevocationsOutputError { -extension AddTrustStoreRevocationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trustStoreRevocations = "TrustStoreRevocations" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AddTrustStoreRevocationsResult")) - if containerValues.contains(.trustStoreRevocations) { - struct KeyVal0{struct member{}} - let trustStoreRevocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trustStoreRevocations) - if let trustStoreRevocationsWrappedContainer = trustStoreRevocationsWrappedContainer { - let trustStoreRevocationsContainer = try trustStoreRevocationsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation].self, forKey: .member) - var trustStoreRevocationsBuffer:[ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation]? = nil - if let trustStoreRevocationsContainer = trustStoreRevocationsContainer { - trustStoreRevocationsBuffer = [ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation]() - for structureContainer0 in trustStoreRevocationsContainer { - trustStoreRevocationsBuffer?.append(structureContainer0) - } - } - trustStoreRevocations = trustStoreRevocationsBuffer - } else { - trustStoreRevocations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidRevocationContent": return try await InvalidRevocationContentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RevocationContentNotFound": return try await RevocationContentNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTrustStoreRevocationEntries": return try await TooManyTrustStoreRevocationEntriesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - trustStoreRevocations = nil - } - } -} - -enum AddTrustStoreRevocationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidRevocationContent": return try await InvalidRevocationContentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RevocationContentNotFound": return try await RevocationContentNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustStoreRevocationEntries": return try await TooManyTrustStoreRevocationEntriesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension AllocationIdNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AllocationIdNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -688,23 +512,7 @@ public struct AllocationIdNotFoundException: ClientRuntime.ModeledError, AWSClie } } -struct AllocationIdNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension AllocationIdNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.AnomalyDetection: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.AnomalyDetection: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case mitigationInEffect = "MitigationInEffect" case result = "Result" @@ -720,12 +528,14 @@ extension ElasticLoadBalancingv2ClientTypes.AnomalyDetection: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resultDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.AnomalyResultEnum.self, forKey: .result) - result = resultDecoded - let mitigationInEffectDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.MitigationInEffectEnum.self, forKey: .mitigationInEffect) - mitigationInEffect = mitigationInEffectDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.AnomalyDetection() + value.result = try reader["Result"].readIfPresent() + value.mitigationInEffect = try reader["MitigationInEffect"].readIfPresent() + return value + } } } @@ -816,7 +626,7 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension ElasticLoadBalancingv2ClientTypes.AuthenticateCognitoActionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.AuthenticateCognitoActionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authenticationRequestExtraParams = "AuthenticationRequestExtraParams" case onUnauthenticatedRequest = "OnUnauthenticatedRequest" @@ -865,41 +675,20 @@ extension ElasticLoadBalancingv2ClientTypes.AuthenticateCognitoActionConfig: Swi } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userPoolArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userPoolArn) - userPoolArn = userPoolArnDecoded - let userPoolClientIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userPoolClientId) - userPoolClientId = userPoolClientIdDecoded - let userPoolDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userPoolDomain) - userPoolDomain = userPoolDomainDecoded - let sessionCookieNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sessionCookieName) - sessionCookieName = sessionCookieNameDecoded - let scopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scope) - scope = scopeDecoded - let sessionTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sessionTimeout) - sessionTimeout = sessionTimeoutDecoded - if containerValues.contains(.authenticationRequestExtraParams) { - struct KeyVal0{struct key{}; struct value{}} - let authenticationRequestExtraParamsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .authenticationRequestExtraParams) - if let authenticationRequestExtraParamsWrappedContainer = authenticationRequestExtraParamsWrappedContainer { - let authenticationRequestExtraParamsContainer = try authenticationRequestExtraParamsWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var authenticationRequestExtraParamsBuffer: [Swift.String:Swift.String]? = nil - if let authenticationRequestExtraParamsContainer = authenticationRequestExtraParamsContainer { - authenticationRequestExtraParamsBuffer = [Swift.String:Swift.String]() - for stringContainer0 in authenticationRequestExtraParamsContainer { - authenticationRequestExtraParamsBuffer?[stringContainer0.key] = stringContainer0.value - } - } - authenticationRequestExtraParams = authenticationRequestExtraParamsBuffer - } else { - authenticationRequestExtraParams = [:] - } - } else { - authenticationRequestExtraParams = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.AuthenticateCognitoActionConfig() + value.userPoolArn = try reader["UserPoolArn"].readIfPresent() + value.userPoolClientId = try reader["UserPoolClientId"].readIfPresent() + value.userPoolDomain = try reader["UserPoolDomain"].readIfPresent() + value.sessionCookieName = try reader["SessionCookieName"].readIfPresent() + value.scope = try reader["Scope"].readIfPresent() + value.sessionTimeout = try reader["SessionTimeout"].readIfPresent() + value.authenticationRequestExtraParams = try reader["AuthenticationRequestExtraParams"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.onUnauthenticatedRequest = try reader["OnUnauthenticatedRequest"].readIfPresent() + return value } - let onUnauthenticatedRequestDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.AuthenticateCognitoActionConditionalBehaviorEnum.self, forKey: .onUnauthenticatedRequest) - onUnauthenticatedRequest = onUnauthenticatedRequestDecoded } } @@ -991,7 +780,7 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension ElasticLoadBalancingv2ClientTypes.AuthenticateOidcActionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.AuthenticateOidcActionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authenticationRequestExtraParams = "AuthenticationRequestExtraParams" case authorizationEndpoint = "AuthorizationEndpoint" @@ -1056,49 +845,24 @@ extension ElasticLoadBalancingv2ClientTypes.AuthenticateOidcActionConfig: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let issuerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .issuer) - issuer = issuerDecoded - let authorizationEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authorizationEndpoint) - authorizationEndpoint = authorizationEndpointDecoded - let tokenEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tokenEndpoint) - tokenEndpoint = tokenEndpointDecoded - let userInfoEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userInfoEndpoint) - userInfoEndpoint = userInfoEndpointDecoded - let clientIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientId) - clientId = clientIdDecoded - let clientSecretDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientSecret) - clientSecret = clientSecretDecoded - let sessionCookieNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sessionCookieName) - sessionCookieName = sessionCookieNameDecoded - let scopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scope) - scope = scopeDecoded - let sessionTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sessionTimeout) - sessionTimeout = sessionTimeoutDecoded - if containerValues.contains(.authenticationRequestExtraParams) { - struct KeyVal0{struct key{}; struct value{}} - let authenticationRequestExtraParamsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .authenticationRequestExtraParams) - if let authenticationRequestExtraParamsWrappedContainer = authenticationRequestExtraParamsWrappedContainer { - let authenticationRequestExtraParamsContainer = try authenticationRequestExtraParamsWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var authenticationRequestExtraParamsBuffer: [Swift.String:Swift.String]? = nil - if let authenticationRequestExtraParamsContainer = authenticationRequestExtraParamsContainer { - authenticationRequestExtraParamsBuffer = [Swift.String:Swift.String]() - for stringContainer0 in authenticationRequestExtraParamsContainer { - authenticationRequestExtraParamsBuffer?[stringContainer0.key] = stringContainer0.value - } - } - authenticationRequestExtraParams = authenticationRequestExtraParamsBuffer - } else { - authenticationRequestExtraParams = [:] - } - } else { - authenticationRequestExtraParams = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.AuthenticateOidcActionConfig() + value.issuer = try reader["Issuer"].readIfPresent() + value.authorizationEndpoint = try reader["AuthorizationEndpoint"].readIfPresent() + value.tokenEndpoint = try reader["TokenEndpoint"].readIfPresent() + value.userInfoEndpoint = try reader["UserInfoEndpoint"].readIfPresent() + value.clientId = try reader["ClientId"].readIfPresent() + value.clientSecret = try reader["ClientSecret"].readIfPresent() + value.sessionCookieName = try reader["SessionCookieName"].readIfPresent() + value.scope = try reader["Scope"].readIfPresent() + value.sessionTimeout = try reader["SessionTimeout"].readIfPresent() + value.authenticationRequestExtraParams = try reader["AuthenticationRequestExtraParams"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.onUnauthenticatedRequest = try reader["OnUnauthenticatedRequest"].readIfPresent() + value.useExistingClientSecret = try reader["UseExistingClientSecret"].readIfPresent() + return value } - let onUnauthenticatedRequestDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.AuthenticateOidcActionConditionalBehaviorEnum.self, forKey: .onUnauthenticatedRequest) - onUnauthenticatedRequest = onUnauthenticatedRequestDecoded - let useExistingClientSecretDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useExistingClientSecret) - useExistingClientSecret = useExistingClientSecretDecoded } } @@ -1173,7 +937,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.AvailabilityZone: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.AvailabilityZone: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case loadBalancerAddresses = "LoadBalancerAddresses" case outpostId = "OutpostId" @@ -1206,32 +970,15 @@ extension ElasticLoadBalancingv2ClientTypes.AvailabilityZone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let zoneNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .zoneName) - zoneName = zoneNameDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let outpostIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostId) - outpostId = outpostIdDecoded - if containerValues.contains(.loadBalancerAddresses) { - struct KeyVal0{struct member{}} - let loadBalancerAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerAddresses) - if let loadBalancerAddressesWrappedContainer = loadBalancerAddressesWrappedContainer { - let loadBalancerAddressesContainer = try loadBalancerAddressesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.LoadBalancerAddress].self, forKey: .member) - var loadBalancerAddressesBuffer:[ElasticLoadBalancingv2ClientTypes.LoadBalancerAddress]? = nil - if let loadBalancerAddressesContainer = loadBalancerAddressesContainer { - loadBalancerAddressesBuffer = [ElasticLoadBalancingv2ClientTypes.LoadBalancerAddress]() - for structureContainer0 in loadBalancerAddressesContainer { - loadBalancerAddressesBuffer?.append(structureContainer0) - } - } - loadBalancerAddresses = loadBalancerAddressesBuffer - } else { - loadBalancerAddresses = [] - } - } else { - loadBalancerAddresses = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.AvailabilityZone() + value.zoneName = try reader["ZoneName"].readIfPresent() + value.subnetId = try reader["SubnetId"].readIfPresent() + value.outpostId = try reader["OutpostId"].readIfPresent() + value.loadBalancerAddresses = try reader["LoadBalancerAddresses"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.LoadBalancerAddress.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -1265,16 +1012,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension AvailabilityZoneNotSupportedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AvailabilityZoneNotSupportedException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1302,33 +1047,15 @@ public struct AvailabilityZoneNotSupportedException: ClientRuntime.ModeledError, } } -struct AvailabilityZoneNotSupportedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension AvailabilityZoneNotSupportedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CaCertificatesBundleNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CaCertificatesBundleNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1356,23 +1083,7 @@ public struct CaCertificatesBundleNotFoundException: ClientRuntime.ModeledError, } } -struct CaCertificatesBundleNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CaCertificatesBundleNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.Certificate: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.Certificate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case certificateArn = "CertificateArn" case isDefault = "IsDefault" @@ -1388,12 +1099,14 @@ extension ElasticLoadBalancingv2ClientTypes.Certificate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.Certificate() + value.certificateArn = try reader["CertificateArn"].readIfPresent() + value.isDefault = try reader["IsDefault"].readIfPresent() + return value + } } } @@ -1418,16 +1131,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension CertificateNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CertificateNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1455,23 +1166,7 @@ public struct CertificateNotFoundException: ClientRuntime.ModeledError, AWSClien } } -struct CertificateNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CertificateNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.Cipher: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.Cipher: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case priority = "Priority" @@ -1487,12 +1182,14 @@ extension ElasticLoadBalancingv2ClientTypes.Cipher: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) - priority = priorityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.Cipher() + value.name = try reader["Name"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() + return value + } } } @@ -1517,6 +1214,18 @@ extension ElasticLoadBalancingv2ClientTypes { } extension CreateListenerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case alpnPolicy = "AlpnPolicy" + case certificates = "Certificates" + case defaultActions = "DefaultActions" + case loadBalancerArn = "LoadBalancerArn" + case mutualAuthentication = "MutualAuthentication" + case port = "Port" + case `protocol` = "Protocol" + case sslPolicy = "SslPolicy" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let alpnPolicy = alpnPolicy { @@ -1653,130 +1362,15 @@ public struct CreateListenerInput: Swift.Equatable { } } -struct CreateListenerInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? - let `protocol`: ElasticLoadBalancingv2ClientTypes.ProtocolEnum? - let port: Swift.Int? - let sslPolicy: Swift.String? - let certificates: [ElasticLoadBalancingv2ClientTypes.Certificate]? - let defaultActions: [ElasticLoadBalancingv2ClientTypes.Action]? - let alpnPolicy: [Swift.String]? - let tags: [ElasticLoadBalancingv2ClientTypes.Tag]? - let mutualAuthentication: ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes? -} - -extension CreateListenerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alpnPolicy = "AlpnPolicy" - case certificates = "Certificates" - case defaultActions = "DefaultActions" - case loadBalancerArn = "LoadBalancerArn" - case mutualAuthentication = "MutualAuthentication" - case port = "Port" - case `protocol` = "Protocol" - case sslPolicy = "SslPolicy" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - let protocolDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ProtocolEnum.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let sslPolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sslPolicy) - sslPolicy = sslPolicyDecoded - if containerValues.contains(.certificates) { - struct KeyVal0{struct member{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[ElasticLoadBalancingv2ClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [ElasticLoadBalancingv2ClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] - } - } else { - certificates = nil - } - if containerValues.contains(.defaultActions) { - struct KeyVal0{struct member{}} - let defaultActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .defaultActions) - if let defaultActionsWrappedContainer = defaultActionsWrappedContainer { - let defaultActionsContainer = try defaultActionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Action].self, forKey: .member) - var defaultActionsBuffer:[ElasticLoadBalancingv2ClientTypes.Action]? = nil - if let defaultActionsContainer = defaultActionsContainer { - defaultActionsBuffer = [ElasticLoadBalancingv2ClientTypes.Action]() - for structureContainer0 in defaultActionsContainer { - defaultActionsBuffer?.append(structureContainer0) - } - } - defaultActions = defaultActionsBuffer - } else { - defaultActions = [] - } - } else { - defaultActions = nil - } - if containerValues.contains(.alpnPolicy) { - struct KeyVal0{struct member{}} - let alpnPolicyWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alpnPolicy) - if let alpnPolicyWrappedContainer = alpnPolicyWrappedContainer { - let alpnPolicyContainer = try alpnPolicyWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alpnPolicyBuffer:[Swift.String]? = nil - if let alpnPolicyContainer = alpnPolicyContainer { - alpnPolicyBuffer = [Swift.String]() - for stringContainer0 in alpnPolicyContainer { - alpnPolicyBuffer?.append(stringContainer0) - } - } - alpnPolicy = alpnPolicyBuffer - } else { - alpnPolicy = [] - } - } else { - alpnPolicy = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingv2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingv2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let mutualAuthenticationDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes.self, forKey: .mutualAuthentication) - mutualAuthentication = mutualAuthenticationDecoded - } -} +extension CreateListenerOutput { -extension CreateListenerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateListenerOutputBody = try responseDecoder.decode(responseBody: data) - self.listeners = output.listeners - } else { - self.listeners = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateListenerResult"] + var value = CreateListenerOutput() + value.listeners = try reader["Listeners"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Listener.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -1793,70 +1387,55 @@ public struct CreateListenerOutput: Swift.Equatable { } } -struct CreateListenerOutputBody: Swift.Equatable { - let listeners: [ElasticLoadBalancingv2ClientTypes.Listener]? -} +enum CreateListenerOutputError { -extension CreateListenerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case listeners = "Listeners" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateListenerResult")) - if containerValues.contains(.listeners) { - struct KeyVal0{struct member{}} - let listenersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .listeners) - if let listenersWrappedContainer = listenersWrappedContainer { - let listenersContainer = try listenersWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Listener].self, forKey: .member) - var listenersBuffer:[ElasticLoadBalancingv2ClientTypes.Listener]? = nil - if let listenersContainer = listenersContainer { - listenersBuffer = [ElasticLoadBalancingv2ClientTypes.Listener]() - for structureContainer0 in listenersContainer { - listenersBuffer?.append(structureContainer0) - } - } - listeners = listenersBuffer - } else { - listeners = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ALPNPolicyNotFound": return try await ALPNPolicyNotSupportedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CertificateNotFound": return try await CertificateNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateListener": return try await DuplicateListenerException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IncompatibleProtocols": return try await IncompatibleProtocolsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidLoadBalancerAction": return try await InvalidLoadBalancerActionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SSLPolicyNotFound": return try await SSLPolicyNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupAssociationLimit": return try await TargetGroupAssociationLimitException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyActions": return try await TooManyActionsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyCertificates": return try await TooManyCertificatesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyListeners": return try await TooManyListenersException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTargets": return try await TooManyTargetsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyUniqueTargetGroupsPerLoadBalancer": return try await TooManyUniqueTargetGroupsPerLoadBalancerException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotReady": return try await TrustStoreNotReadyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - listeners = nil } } } -enum CreateListenerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ALPNPolicyNotFound": return try await ALPNPolicyNotSupportedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CertificateNotFound": return try await CertificateNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateListener": return try await DuplicateListenerException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IncompatibleProtocols": return try await IncompatibleProtocolsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLoadBalancerAction": return try await InvalidLoadBalancerActionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SSLPolicyNotFound": return try await SSLPolicyNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupAssociationLimit": return try await TargetGroupAssociationLimitException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyActions": return try await TooManyActionsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCertificates": return try await TooManyCertificatesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyListeners": return try await TooManyListenersException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTargets": return try await TooManyTargetsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyUniqueTargetGroupsPerLoadBalancer": return try await TooManyUniqueTargetGroupsPerLoadBalancerException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotReady": return try await TrustStoreNotReadyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateLoadBalancerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case customerOwnedIpv4Pool = "CustomerOwnedIpv4Pool" + case ipAddressType = "IpAddressType" + case name = "Name" + case scheme = "Scheme" + case securityGroups = "SecurityGroups" + case subnetMappings = "SubnetMappings" + case subnets = "Subnets" + case tags = "Tags" + case type = "Type" } -} -extension CreateLoadBalancerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let customerOwnedIpv4Pool = customerOwnedIpv4Pool { @@ -1979,130 +1558,15 @@ public struct CreateLoadBalancerInput: Swift.Equatable { } } -struct CreateLoadBalancerInputBody: Swift.Equatable { - let name: Swift.String? - let subnets: [Swift.String]? - let subnetMappings: [ElasticLoadBalancingv2ClientTypes.SubnetMapping]? - let securityGroups: [Swift.String]? - let scheme: ElasticLoadBalancingv2ClientTypes.LoadBalancerSchemeEnum? - let tags: [ElasticLoadBalancingv2ClientTypes.Tag]? - let type: ElasticLoadBalancingv2ClientTypes.LoadBalancerTypeEnum? - let ipAddressType: ElasticLoadBalancingv2ClientTypes.IpAddressType? - let customerOwnedIpv4Pool: Swift.String? -} - -extension CreateLoadBalancerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customerOwnedIpv4Pool = "CustomerOwnedIpv4Pool" - case ipAddressType = "IpAddressType" - case name = "Name" - case scheme = "Scheme" - case securityGroups = "SecurityGroups" - case subnetMappings = "SubnetMappings" - case subnets = "Subnets" - case tags = "Tags" - case type = "Type" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct member{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetsBuffer:[Swift.String]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [Swift.String]() - for stringContainer0 in subnetsContainer { - subnetsBuffer?.append(stringContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - if containerValues.contains(.subnetMappings) { - struct KeyVal0{struct member{}} - let subnetMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetMappings) - if let subnetMappingsWrappedContainer = subnetMappingsWrappedContainer { - let subnetMappingsContainer = try subnetMappingsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.SubnetMapping].self, forKey: .member) - var subnetMappingsBuffer:[ElasticLoadBalancingv2ClientTypes.SubnetMapping]? = nil - if let subnetMappingsContainer = subnetMappingsContainer { - subnetMappingsBuffer = [ElasticLoadBalancingv2ClientTypes.SubnetMapping]() - for structureContainer0 in subnetMappingsContainer { - subnetMappingsBuffer?.append(structureContainer0) - } - } - subnetMappings = subnetMappingsBuffer - } else { - subnetMappings = [] - } - } else { - subnetMappings = nil - } - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let schemeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.LoadBalancerSchemeEnum.self, forKey: .scheme) - scheme = schemeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingv2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingv2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let typeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.LoadBalancerTypeEnum.self, forKey: .type) - type = typeDecoded - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let customerOwnedIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIpv4Pool) - customerOwnedIpv4Pool = customerOwnedIpv4PoolDecoded - } -} +extension CreateLoadBalancerOutput { -extension CreateLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLoadBalancerOutputBody = try responseDecoder.decode(responseBody: data) - self.loadBalancers = output.loadBalancers - } else { - self.loadBalancers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateLoadBalancerResult"] + var value = CreateLoadBalancerOutput() + value.loadBalancers = try reader["LoadBalancers"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.LoadBalancer.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2119,63 +1583,44 @@ public struct CreateLoadBalancerOutput: Swift.Equatable { } } -struct CreateLoadBalancerOutputBody: Swift.Equatable { - let loadBalancers: [ElasticLoadBalancingv2ClientTypes.LoadBalancer]? -} +enum CreateLoadBalancerOutputError { -extension CreateLoadBalancerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancers = "LoadBalancers" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateLoadBalancerResult")) - if containerValues.contains(.loadBalancers) { - struct KeyVal0{struct member{}} - let loadBalancersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancers) - if let loadBalancersWrappedContainer = loadBalancersWrappedContainer { - let loadBalancersContainer = try loadBalancersWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.LoadBalancer].self, forKey: .member) - var loadBalancersBuffer:[ElasticLoadBalancingv2ClientTypes.LoadBalancer]? = nil - if let loadBalancersContainer = loadBalancersContainer { - loadBalancersBuffer = [ElasticLoadBalancingv2ClientTypes.LoadBalancer]() - for structureContainer0 in loadBalancersContainer { - loadBalancersBuffer?.append(structureContainer0) - } - } - loadBalancers = loadBalancersBuffer - } else { - loadBalancers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AllocationIdNotFound": return try await AllocationIdNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "AvailabilityZoneNotSupported": return try await AvailabilityZoneNotSupportedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateLoadBalancerName": return try await DuplicateLoadBalancerNameException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateTagKeys": return try await DuplicateTagKeysException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidScheme": return try await InvalidSchemeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurityGroup": return try await InvalidSecurityGroupException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotPermitted": return try await OperationNotPermittedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetNotFound": return try await SubnetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyLoadBalancers": return try await TooManyLoadBalancersException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - loadBalancers = nil } } } -enum CreateLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AllocationIdNotFound": return try await AllocationIdNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AvailabilityZoneNotSupported": return try await AvailabilityZoneNotSupportedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateLoadBalancerName": return try await DuplicateLoadBalancerNameException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateTagKeys": return try await DuplicateTagKeysException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidScheme": return try await InvalidSchemeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurityGroup": return try await InvalidSecurityGroupException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotPermitted": return try await OperationNotPermittedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetNotFound": return try await SubnetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyLoadBalancers": return try await TooManyLoadBalancersException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateRuleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actions = "Actions" + case conditions = "Conditions" + case listenerArn = "ListenerArn" + case priority = "Priority" + case tags = "Tags" } -} -extension CreateRuleInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actions = actions { @@ -2264,97 +1709,15 @@ public struct CreateRuleInput: Swift.Equatable { } } -struct CreateRuleInputBody: Swift.Equatable { - let listenerArn: Swift.String? - let conditions: [ElasticLoadBalancingv2ClientTypes.RuleCondition]? - let priority: Swift.Int? - let actions: [ElasticLoadBalancingv2ClientTypes.Action]? - let tags: [ElasticLoadBalancingv2ClientTypes.Tag]? -} - -extension CreateRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actions = "Actions" - case conditions = "Conditions" - case listenerArn = "ListenerArn" - case priority = "Priority" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .listenerArn) - listenerArn = listenerArnDecoded - if containerValues.contains(.conditions) { - struct KeyVal0{struct member{}} - let conditionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .conditions) - if let conditionsWrappedContainer = conditionsWrappedContainer { - let conditionsContainer = try conditionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.RuleCondition].self, forKey: .member) - var conditionsBuffer:[ElasticLoadBalancingv2ClientTypes.RuleCondition]? = nil - if let conditionsContainer = conditionsContainer { - conditionsBuffer = [ElasticLoadBalancingv2ClientTypes.RuleCondition]() - for structureContainer0 in conditionsContainer { - conditionsBuffer?.append(structureContainer0) - } - } - conditions = conditionsBuffer - } else { - conditions = [] - } - } else { - conditions = nil - } - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) - priority = priorityDecoded - if containerValues.contains(.actions) { - struct KeyVal0{struct member{}} - let actionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actions) - if let actionsWrappedContainer = actionsWrappedContainer { - let actionsContainer = try actionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Action].self, forKey: .member) - var actionsBuffer:[ElasticLoadBalancingv2ClientTypes.Action]? = nil - if let actionsContainer = actionsContainer { - actionsBuffer = [ElasticLoadBalancingv2ClientTypes.Action]() - for structureContainer0 in actionsContainer { - actionsBuffer?.append(structureContainer0) - } - } - actions = actionsBuffer - } else { - actions = [] - } - } else { - actions = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingv2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingv2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateRuleOutput { -extension CreateRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateRuleOutputBody = try responseDecoder.decode(responseBody: data) - self.rules = output.rules - } else { - self.rules = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateRuleResult"] + var value = CreateRuleOutput() + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Rule.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2371,65 +1734,58 @@ public struct CreateRuleOutput: Swift.Equatable { } } -struct CreateRuleOutputBody: Swift.Equatable { - let rules: [ElasticLoadBalancingv2ClientTypes.Rule]? -} +enum CreateRuleOutputError { -extension CreateRuleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rules" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateRuleResult")) - if containerValues.contains(.rules) { - struct KeyVal0{struct member{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Rule].self, forKey: .member) - var rulesBuffer:[ElasticLoadBalancingv2ClientTypes.Rule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [ElasticLoadBalancingv2ClientTypes.Rule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "IncompatibleProtocols": return try await IncompatibleProtocolsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidLoadBalancerAction": return try await InvalidLoadBalancerActionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PriorityInUse": return try await PriorityInUseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupAssociationLimit": return try await TargetGroupAssociationLimitException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyActions": return try await TooManyActionsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyRules": return try await TooManyRulesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTargetGroups": return try await TooManyTargetGroupsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTargets": return try await TooManyTargetsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyUniqueTargetGroupsPerLoadBalancer": return try await TooManyUniqueTargetGroupsPerLoadBalancerException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - rules = nil } } } -enum CreateRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "IncompatibleProtocols": return try await IncompatibleProtocolsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLoadBalancerAction": return try await InvalidLoadBalancerActionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorityInUse": return try await PriorityInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupAssociationLimit": return try await TargetGroupAssociationLimitException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyActions": return try await TooManyActionsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRules": return try await TooManyRulesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTargetGroups": return try await TooManyTargetGroupsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTargets": return try await TooManyTargetsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyUniqueTargetGroupsPerLoadBalancer": return try await TooManyUniqueTargetGroupsPerLoadBalancerException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateTargetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case healthCheckEnabled = "HealthCheckEnabled" + case healthCheckIntervalSeconds = "HealthCheckIntervalSeconds" + case healthCheckPath = "HealthCheckPath" + case healthCheckPort = "HealthCheckPort" + case healthCheckProtocol = "HealthCheckProtocol" + case healthCheckTimeoutSeconds = "HealthCheckTimeoutSeconds" + case healthyThresholdCount = "HealthyThresholdCount" + case ipAddressType = "IpAddressType" + case matcher = "Matcher" + case name = "Name" + case port = "Port" + case `protocol` = "Protocol" + case protocolVersion = "ProtocolVersion" + case tags = "Tags" + case targetType = "TargetType" + case unhealthyThresholdCount = "UnhealthyThresholdCount" + case vpcId = "VpcId" } -} -extension CreateTargetGroupInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let healthCheckEnabled = healthCheckEnabled { @@ -2589,111 +1945,15 @@ public struct CreateTargetGroupInput: Swift.Equatable { } } -struct CreateTargetGroupInputBody: Swift.Equatable { - let name: Swift.String? - let `protocol`: ElasticLoadBalancingv2ClientTypes.ProtocolEnum? - let protocolVersion: Swift.String? - let port: Swift.Int? - let vpcId: Swift.String? - let healthCheckProtocol: ElasticLoadBalancingv2ClientTypes.ProtocolEnum? - let healthCheckPort: Swift.String? - let healthCheckEnabled: Swift.Bool? - let healthCheckPath: Swift.String? - let healthCheckIntervalSeconds: Swift.Int? - let healthCheckTimeoutSeconds: Swift.Int? - let healthyThresholdCount: Swift.Int? - let unhealthyThresholdCount: Swift.Int? - let matcher: ElasticLoadBalancingv2ClientTypes.Matcher? - let targetType: ElasticLoadBalancingv2ClientTypes.TargetTypeEnum? - let tags: [ElasticLoadBalancingv2ClientTypes.Tag]? - let ipAddressType: ElasticLoadBalancingv2ClientTypes.TargetGroupIpAddressTypeEnum? -} - -extension CreateTargetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheckEnabled = "HealthCheckEnabled" - case healthCheckIntervalSeconds = "HealthCheckIntervalSeconds" - case healthCheckPath = "HealthCheckPath" - case healthCheckPort = "HealthCheckPort" - case healthCheckProtocol = "HealthCheckProtocol" - case healthCheckTimeoutSeconds = "HealthCheckTimeoutSeconds" - case healthyThresholdCount = "HealthyThresholdCount" - case ipAddressType = "IpAddressType" - case matcher = "Matcher" - case name = "Name" - case port = "Port" - case `protocol` = "Protocol" - case protocolVersion = "ProtocolVersion" - case tags = "Tags" - case targetType = "TargetType" - case unhealthyThresholdCount = "UnhealthyThresholdCount" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let protocolDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ProtocolEnum.self, forKey: .protocol) - `protocol` = protocolDecoded - let protocolVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocolVersion) - protocolVersion = protocolVersionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let healthCheckProtocolDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ProtocolEnum.self, forKey: .healthCheckProtocol) - healthCheckProtocol = healthCheckProtocolDecoded - let healthCheckPortDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckPort) - healthCheckPort = healthCheckPortDecoded - let healthCheckEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .healthCheckEnabled) - healthCheckEnabled = healthCheckEnabledDecoded - let healthCheckPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckPath) - healthCheckPath = healthCheckPathDecoded - let healthCheckIntervalSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckIntervalSeconds) - healthCheckIntervalSeconds = healthCheckIntervalSecondsDecoded - let healthCheckTimeoutSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckTimeoutSeconds) - healthCheckTimeoutSeconds = healthCheckTimeoutSecondsDecoded - let healthyThresholdCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthyThresholdCount) - healthyThresholdCount = healthyThresholdCountDecoded - let unhealthyThresholdCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .unhealthyThresholdCount) - unhealthyThresholdCount = unhealthyThresholdCountDecoded - let matcherDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.Matcher.self, forKey: .matcher) - matcher = matcherDecoded - let targetTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetTypeEnum.self, forKey: .targetType) - targetType = targetTypeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingv2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingv2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetGroupIpAddressTypeEnum.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - } -} +extension CreateTargetGroupOutput { -extension CreateTargetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTargetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.targetGroups = output.targetGroups - } else { - self.targetGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateTargetGroupResult"] + var value = CreateTargetGroupOutput() + value.targetGroups = try reader["TargetGroups"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TargetGroup.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2710,54 +1970,35 @@ public struct CreateTargetGroupOutput: Swift.Equatable { } } -struct CreateTargetGroupOutputBody: Swift.Equatable { - let targetGroups: [ElasticLoadBalancingv2ClientTypes.TargetGroup]? -} - -extension CreateTargetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetGroups = "TargetGroups" - } +enum CreateTargetGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateTargetGroupResult")) - if containerValues.contains(.targetGroups) { - struct KeyVal0{struct member{}} - let targetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroups) - if let targetGroupsWrappedContainer = targetGroupsWrappedContainer { - let targetGroupsContainer = try targetGroupsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetGroup].self, forKey: .member) - var targetGroupsBuffer:[ElasticLoadBalancingv2ClientTypes.TargetGroup]? = nil - if let targetGroupsContainer = targetGroupsContainer { - targetGroupsBuffer = [ElasticLoadBalancingv2ClientTypes.TargetGroup]() - for structureContainer0 in targetGroupsContainer { - targetGroupsBuffer?.append(structureContainer0) - } - } - targetGroups = targetGroupsBuffer - } else { - targetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DuplicateTargetGroupName": return try await DuplicateTargetGroupNameException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTargetGroups": return try await TooManyTargetGroupsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - targetGroups = nil } } } -enum CreateTargetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DuplicateTargetGroupName": return try await DuplicateTargetGroupNameException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTargetGroups": return try await TooManyTargetGroupsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateTrustStoreInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case caCertificatesBundleS3Bucket = "CaCertificatesBundleS3Bucket" + case caCertificatesBundleS3Key = "CaCertificatesBundleS3Key" + case caCertificatesBundleS3ObjectVersion = "CaCertificatesBundleS3ObjectVersion" + case name = "Name" + case tags = "Tags" } -} -extension CreateTrustStoreInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let caCertificatesBundleS3Bucket = caCertificatesBundleS3Bucket { @@ -2827,63 +2068,15 @@ public struct CreateTrustStoreInput: Swift.Equatable { } } -struct CreateTrustStoreInputBody: Swift.Equatable { - let name: Swift.String? - let caCertificatesBundleS3Bucket: Swift.String? - let caCertificatesBundleS3Key: Swift.String? - let caCertificatesBundleS3ObjectVersion: Swift.String? - let tags: [ElasticLoadBalancingv2ClientTypes.Tag]? -} +extension CreateTrustStoreOutput { -extension CreateTrustStoreInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case caCertificatesBundleS3Bucket = "CaCertificatesBundleS3Bucket" - case caCertificatesBundleS3Key = "CaCertificatesBundleS3Key" - case caCertificatesBundleS3ObjectVersion = "CaCertificatesBundleS3ObjectVersion" - case name = "Name" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let caCertificatesBundleS3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificatesBundleS3Bucket) - caCertificatesBundleS3Bucket = caCertificatesBundleS3BucketDecoded - let caCertificatesBundleS3KeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificatesBundleS3Key) - caCertificatesBundleS3Key = caCertificatesBundleS3KeyDecoded - let caCertificatesBundleS3ObjectVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificatesBundleS3ObjectVersion) - caCertificatesBundleS3ObjectVersion = caCertificatesBundleS3ObjectVersionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingv2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingv2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateTrustStoreOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTrustStoreOutputBody = try responseDecoder.decode(responseBody: data) - self.trustStores = output.trustStores - } else { - self.trustStores = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateTrustStoreResult"] + var value = CreateTrustStoreOutput() + value.trustStores = try reader["TrustStores"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TrustStore.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2900,56 +2093,33 @@ public struct CreateTrustStoreOutput: Swift.Equatable { } } -struct CreateTrustStoreOutputBody: Swift.Equatable { - let trustStores: [ElasticLoadBalancingv2ClientTypes.TrustStore]? -} +enum CreateTrustStoreOutputError { -extension CreateTrustStoreOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trustStores = "TrustStores" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateTrustStoreResult")) - if containerValues.contains(.trustStores) { - struct KeyVal0{struct member{}} - let trustStoresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trustStores) - if let trustStoresWrappedContainer = trustStoresWrappedContainer { - let trustStoresContainer = try trustStoresWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TrustStore].self, forKey: .member) - var trustStoresBuffer:[ElasticLoadBalancingv2ClientTypes.TrustStore]? = nil - if let trustStoresContainer = trustStoresContainer { - trustStoresBuffer = [ElasticLoadBalancingv2ClientTypes.TrustStore]() - for structureContainer0 in trustStoresContainer { - trustStoresBuffer?.append(structureContainer0) - } - } - trustStores = trustStoresBuffer - } else { - trustStores = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CaCertificatesBundleNotFound": return try await CaCertificatesBundleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateTagKeys": return try await DuplicateTagKeysException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateTrustStoreName": return try await DuplicateTrustStoreNameException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCaCertificatesBundle": return try await InvalidCaCertificatesBundleException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTrustStores": return try await TooManyTrustStoresException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - trustStores = nil } } } -enum CreateTrustStoreOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CaCertificatesBundleNotFound": return try await CaCertificatesBundleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateTagKeys": return try await DuplicateTagKeysException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateTrustStoreName": return try await DuplicateTrustStoreNameException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCaCertificatesBundle": return try await InvalidCaCertificatesBundleException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrustStores": return try await TooManyTrustStoresException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DeleteListenerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case listenerArn = "ListenerArn" } -} -extension DeleteListenerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let listenerArn = listenerArn { @@ -2980,24 +2150,12 @@ public struct DeleteListenerInput: Swift.Equatable { } } -struct DeleteListenerInputBody: Swift.Equatable { - let listenerArn: Swift.String? -} +extension DeleteListenerOutput { -extension DeleteListenerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case listenerArn = "ListenerArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .listenerArn) - listenerArn = listenerArnDecoded - } -} - -extension DeleteListenerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteListenerOutput() + } } } @@ -3006,18 +2164,29 @@ public struct DeleteListenerOutput: Swift.Equatable { public init() { } } -enum DeleteListenerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteListenerOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteLoadBalancerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerArn = "LoadBalancerArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerArn = loadBalancerArn { @@ -3048,24 +2217,12 @@ public struct DeleteLoadBalancerInput: Swift.Equatable { } } -struct DeleteLoadBalancerInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? -} - -extension DeleteLoadBalancerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerArn = "LoadBalancerArn" - } +extension DeleteLoadBalancerOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - } -} - -extension DeleteLoadBalancerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteLoadBalancerOutput() + } } } @@ -3074,19 +2231,30 @@ public struct DeleteLoadBalancerOutput: Swift.Equatable { public init() { } } -enum DeleteLoadBalancerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotPermitted": return try await OperationNotPermittedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceInUse": return try await ResourceInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteLoadBalancerOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotPermitted": return try await OperationNotPermittedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceInUse": return try await ResourceInUseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteRuleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleArn = "RuleArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleArn = ruleArn { @@ -3117,24 +2285,12 @@ public struct DeleteRuleInput: Swift.Equatable { } } -struct DeleteRuleInputBody: Swift.Equatable { - let ruleArn: Swift.String? -} - -extension DeleteRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleArn = "RuleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleArn) - ruleArn = ruleArnDecoded - } -} +extension DeleteRuleOutput { -extension DeleteRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteRuleOutput() + } } } @@ -3143,18 +2299,29 @@ public struct DeleteRuleOutput: Swift.Equatable { public init() { } } -enum DeleteRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OperationNotPermitted": return try await OperationNotPermittedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleNotFound": return try await RuleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteRuleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OperationNotPermitted": return try await OperationNotPermittedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleNotFound": return try await RuleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteTargetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case targetGroupArn = "TargetGroupArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let targetGroupArn = targetGroupArn { @@ -3185,24 +2352,12 @@ public struct DeleteTargetGroupInput: Swift.Equatable { } } -struct DeleteTargetGroupInputBody: Swift.Equatable { - let targetGroupArn: Swift.String? -} - -extension DeleteTargetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetGroupArn = "TargetGroupArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - } -} +extension DeleteTargetGroupOutput { -extension DeleteTargetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTargetGroupOutput() + } } } @@ -3211,17 +2366,28 @@ public struct DeleteTargetGroupOutput: Swift.Equatable { public init() { } } -enum DeleteTargetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceInUse": return try await ResourceInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteTargetGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceInUse": return try await ResourceInUseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteTrustStoreInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case trustStoreArn = "TrustStoreArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let trustStoreArn = trustStoreArn { @@ -3252,24 +2418,12 @@ public struct DeleteTrustStoreInput: Swift.Equatable { } } -struct DeleteTrustStoreInputBody: Swift.Equatable { - let trustStoreArn: Swift.String? -} +extension DeleteTrustStoreOutput { -extension DeleteTrustStoreInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trustStoreArn = "TrustStoreArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - } -} - -extension DeleteTrustStoreOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTrustStoreOutput() + } } } @@ -3278,18 +2432,30 @@ public struct DeleteTrustStoreOutput: Swift.Equatable { public init() { } } -enum DeleteTrustStoreOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TrustStoreInUse": return try await TrustStoreInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteTrustStoreOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TrustStoreInUse": return try await TrustStoreInUseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeregisterTargetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case targetGroupArn = "TargetGroupArn" + case targets = "Targets" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let targetGroupArn = targetGroupArn { @@ -3337,65 +2503,44 @@ public struct DeregisterTargetsInput: Swift.Equatable { } } -struct DeregisterTargetsInputBody: Swift.Equatable { - let targetGroupArn: Swift.String? - let targets: [ElasticLoadBalancingv2ClientTypes.TargetDescription]? -} - -extension DeregisterTargetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetGroupArn = "TargetGroupArn" - case targets = "Targets" - } +extension DeregisterTargetsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - if containerValues.contains(.targets) { - struct KeyVal0{struct member{}} - let targetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targets) - if let targetsWrappedContainer = targetsWrappedContainer { - let targetsContainer = try targetsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetDescription].self, forKey: .member) - var targetsBuffer:[ElasticLoadBalancingv2ClientTypes.TargetDescription]? = nil - if let targetsContainer = targetsContainer { - targetsBuffer = [ElasticLoadBalancingv2ClientTypes.TargetDescription]() - for structureContainer0 in targetsContainer { - targetsBuffer?.append(structureContainer0) - } - } - targets = targetsBuffer - } else { - targets = [] - } - } else { - targets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeregisterTargetsOutput() } } } -extension DeregisterTargetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DeregisterTargetsOutput: Swift.Equatable { public init() { } } -enum DeregisterTargetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidTarget": return try await InvalidTargetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeregisterTargetsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidTarget": return try await InvalidTargetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeAccountLimitsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case pageSize = "PageSize" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -3432,36 +2577,16 @@ public struct DescribeAccountLimitsInput: Swift.Equatable { } } -struct DescribeAccountLimitsInputBody: Swift.Equatable { - let marker: Swift.String? - let pageSize: Swift.Int? -} +extension DescribeAccountLimitsOutput { -extension DescribeAccountLimitsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case pageSize = "PageSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} - -extension DescribeAccountLimitsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAccountLimitsOutputBody = try responseDecoder.decode(responseBody: data) - self.limits = output.limits - self.nextMarker = output.nextMarker - } else { - self.limits = nil - self.nextMarker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAccountLimitsResult"] + var value = DescribeAccountLimitsOutput() + value.limits = try reader["Limits"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Limit.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -3482,54 +2607,29 @@ public struct DescribeAccountLimitsOutput: Swift.Equatable { } } -struct DescribeAccountLimitsOutputBody: Swift.Equatable { - let limits: [ElasticLoadBalancingv2ClientTypes.Limit]? - let nextMarker: Swift.String? -} +enum DescribeAccountLimitsOutputError { -extension DescribeAccountLimitsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case limits = "Limits" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAccountLimitsResult")) - if containerValues.contains(.limits) { - struct KeyVal0{struct member{}} - let limitsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .limits) - if let limitsWrappedContainer = limitsWrappedContainer { - let limitsContainer = try limitsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Limit].self, forKey: .member) - var limitsBuffer:[ElasticLoadBalancingv2ClientTypes.Limit]? = nil - if let limitsContainer = limitsContainer { - limitsBuffer = [ElasticLoadBalancingv2ClientTypes.Limit]() - for structureContainer0 in limitsContainer { - limitsBuffer?.append(structureContainer0) - } - } - limits = limitsBuffer - } else { - limits = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - limits = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeAccountLimitsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeListenerCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case listenerArn = "ListenerArn" + case marker = "Marker" + case pageSize = "PageSize" } -} -extension DescribeListenerCertificatesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let listenerArn = listenerArn { @@ -3574,40 +2674,16 @@ public struct DescribeListenerCertificatesInput: Swift.Equatable { } } -struct DescribeListenerCertificatesInputBody: Swift.Equatable { - let listenerArn: Swift.String? - let marker: Swift.String? - let pageSize: Swift.Int? -} - -extension DescribeListenerCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case listenerArn = "ListenerArn" - case marker = "Marker" - case pageSize = "PageSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .listenerArn) - listenerArn = listenerArnDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} +extension DescribeListenerCertificatesOutput { -extension DescribeListenerCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeListenerCertificatesOutputBody = try responseDecoder.decode(responseBody: data) - self.certificates = output.certificates - self.nextMarker = output.nextMarker - } else { - self.certificates = nil - self.nextMarker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeListenerCertificatesResult"] + var value = DescribeListenerCertificatesOutput() + value.certificates = try reader["Certificates"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Certificate.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -3628,55 +2704,31 @@ public struct DescribeListenerCertificatesOutput: Swift.Equatable { } } -struct DescribeListenerCertificatesOutputBody: Swift.Equatable { - let certificates: [ElasticLoadBalancingv2ClientTypes.Certificate]? - let nextMarker: Swift.String? -} +enum DescribeListenerCertificatesOutputError { -extension DescribeListenerCertificatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificates = "Certificates" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeListenerCertificatesResult")) - if containerValues.contains(.certificates) { - struct KeyVal0{struct member{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[ElasticLoadBalancingv2ClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [ElasticLoadBalancingv2ClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - certificates = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeListenerCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeListenersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case listenerArns = "ListenerArns" + case loadBalancerArn = "LoadBalancerArn" + case marker = "Marker" + case pageSize = "PageSize" } -} -extension DescribeListenersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let listenerArns = listenerArns { @@ -3736,61 +2788,16 @@ public struct DescribeListenersInput: Swift.Equatable { } } -struct DescribeListenersInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? - let listenerArns: [Swift.String]? - let marker: Swift.String? - let pageSize: Swift.Int? -} - -extension DescribeListenersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case listenerArns = "ListenerArns" - case loadBalancerArn = "LoadBalancerArn" - case marker = "Marker" - case pageSize = "PageSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - if containerValues.contains(.listenerArns) { - struct KeyVal0{struct member{}} - let listenerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .listenerArns) - if let listenerArnsWrappedContainer = listenerArnsWrappedContainer { - let listenerArnsContainer = try listenerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var listenerArnsBuffer:[Swift.String]? = nil - if let listenerArnsContainer = listenerArnsContainer { - listenerArnsBuffer = [Swift.String]() - for stringContainer0 in listenerArnsContainer { - listenerArnsBuffer?.append(stringContainer0) - } - } - listenerArns = listenerArnsBuffer - } else { - listenerArns = [] - } - } else { - listenerArns = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} +extension DescribeListenersOutput { -extension DescribeListenersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeListenersOutputBody = try responseDecoder.decode(responseBody: data) - self.listeners = output.listeners - self.nextMarker = output.nextMarker - } else { - self.listeners = nil - self.nextMarker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeListenersResult"] + var value = DescribeListenersOutput() + value.listeners = try reader["Listeners"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Listener.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -3811,57 +2818,30 @@ public struct DescribeListenersOutput: Swift.Equatable { } } -struct DescribeListenersOutputBody: Swift.Equatable { - let listeners: [ElasticLoadBalancingv2ClientTypes.Listener]? - let nextMarker: Swift.String? -} +enum DescribeListenersOutputError { -extension DescribeListenersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case listeners = "Listeners" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeListenersResult")) - if containerValues.contains(.listeners) { - struct KeyVal0{struct member{}} - let listenersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .listeners) - if let listenersWrappedContainer = listenersWrappedContainer { - let listenersContainer = try listenersWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Listener].self, forKey: .member) - var listenersBuffer:[ElasticLoadBalancingv2ClientTypes.Listener]? = nil - if let listenersContainer = listenersContainer { - listenersBuffer = [ElasticLoadBalancingv2ClientTypes.Listener]() - for structureContainer0 in listenersContainer { - listenersBuffer?.append(structureContainer0) - } - } - listeners = listenersBuffer - } else { - listeners = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - listeners = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeListenersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLoadBalancerAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerArn = "LoadBalancerArn" } -} -extension DescribeLoadBalancerAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerArn = loadBalancerArn { @@ -3892,30 +2872,15 @@ public struct DescribeLoadBalancerAttributesInput: Swift.Equatable { } } -struct DescribeLoadBalancerAttributesInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? -} +extension DescribeLoadBalancerAttributesOutput { -extension DescribeLoadBalancerAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerArn = "LoadBalancerArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - } -} - -extension DescribeLoadBalancerAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoadBalancerAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoadBalancerAttributesResult"] + var value = DescribeLoadBalancerAttributesOutput() + value.attributes = try reader["Attributes"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3932,51 +2897,31 @@ public struct DescribeLoadBalancerAttributesOutput: Swift.Equatable { } } -struct DescribeLoadBalancerAttributesOutputBody: Swift.Equatable { - let attributes: [ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]? -} - -extension DescribeLoadBalancerAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - } +enum DescribeLoadBalancerAttributesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoadBalancerAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct member{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute].self, forKey: .member) - var attributesBuffer:[ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]() - for structureContainer0 in attributesContainer { - attributesBuffer?.append(structureContainer0) - } - } - attributes = attributesBuffer - } else { - attributes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil } } } -enum DescribeLoadBalancerAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLoadBalancersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerArns = "LoadBalancerArns" + case marker = "Marker" + case names = "Names" + case pageSize = "PageSize" } -} -extension DescribeLoadBalancersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerArns = loadBalancerArns { @@ -4045,78 +2990,16 @@ public struct DescribeLoadBalancersInput: Swift.Equatable { } } -struct DescribeLoadBalancersInputBody: Swift.Equatable { - let loadBalancerArns: [Swift.String]? - let names: [Swift.String]? - let marker: Swift.String? - let pageSize: Swift.Int? -} +extension DescribeLoadBalancersOutput { -extension DescribeLoadBalancersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerArns = "LoadBalancerArns" - case marker = "Marker" - case names = "Names" - case pageSize = "PageSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.loadBalancerArns) { - struct KeyVal0{struct member{}} - let loadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerArns) - if let loadBalancerArnsWrappedContainer = loadBalancerArnsWrappedContainer { - let loadBalancerArnsContainer = try loadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerArnsBuffer:[Swift.String]? = nil - if let loadBalancerArnsContainer = loadBalancerArnsContainer { - loadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in loadBalancerArnsContainer { - loadBalancerArnsBuffer?.append(stringContainer0) - } - } - loadBalancerArns = loadBalancerArnsBuffer - } else { - loadBalancerArns = [] - } - } else { - loadBalancerArns = nil - } - if containerValues.contains(.names) { - struct KeyVal0{struct member{}} - let namesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .names) - if let namesWrappedContainer = namesWrappedContainer { - let namesContainer = try namesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var namesBuffer:[Swift.String]? = nil - if let namesContainer = namesContainer { - namesBuffer = [Swift.String]() - for stringContainer0 in namesContainer { - namesBuffer?.append(stringContainer0) - } - } - names = namesBuffer - } else { - names = [] - } - } else { - names = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} - -extension DescribeLoadBalancersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoadBalancersOutputBody = try responseDecoder.decode(responseBody: data) - self.loadBalancers = output.loadBalancers - self.nextMarker = output.nextMarker - } else { - self.loadBalancers = nil - self.nextMarker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoadBalancersResult"] + var value = DescribeLoadBalancersOutput() + value.loadBalancers = try reader["LoadBalancers"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.LoadBalancer.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -4137,55 +3020,31 @@ public struct DescribeLoadBalancersOutput: Swift.Equatable { } } -struct DescribeLoadBalancersOutputBody: Swift.Equatable { - let loadBalancers: [ElasticLoadBalancingv2ClientTypes.LoadBalancer]? - let nextMarker: Swift.String? -} +enum DescribeLoadBalancersOutputError { -extension DescribeLoadBalancersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancers = "LoadBalancers" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoadBalancersResult")) - if containerValues.contains(.loadBalancers) { - struct KeyVal0{struct member{}} - let loadBalancersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancers) - if let loadBalancersWrappedContainer = loadBalancersWrappedContainer { - let loadBalancersContainer = try loadBalancersWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.LoadBalancer].self, forKey: .member) - var loadBalancersBuffer:[ElasticLoadBalancingv2ClientTypes.LoadBalancer]? = nil - if let loadBalancersContainer = loadBalancersContainer { - loadBalancersBuffer = [ElasticLoadBalancingv2ClientTypes.LoadBalancer]() - for structureContainer0 in loadBalancersContainer { - loadBalancersBuffer?.append(structureContainer0) - } - } - loadBalancers = loadBalancersBuffer - } else { - loadBalancers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - loadBalancers = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeLoadBalancersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeRulesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case listenerArn = "ListenerArn" + case marker = "Marker" + case pageSize = "PageSize" + case ruleArns = "RuleArns" } -} -extension DescribeRulesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let listenerArn = listenerArn { @@ -4245,61 +3104,16 @@ public struct DescribeRulesInput: Swift.Equatable { } } -struct DescribeRulesInputBody: Swift.Equatable { - let listenerArn: Swift.String? - let ruleArns: [Swift.String]? - let marker: Swift.String? - let pageSize: Swift.Int? -} - -extension DescribeRulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case listenerArn = "ListenerArn" - case marker = "Marker" - case pageSize = "PageSize" - case ruleArns = "RuleArns" - } +extension DescribeRulesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .listenerArn) - listenerArn = listenerArnDecoded - if containerValues.contains(.ruleArns) { - struct KeyVal0{struct member{}} - let ruleArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleArns) - if let ruleArnsWrappedContainer = ruleArnsWrappedContainer { - let ruleArnsContainer = try ruleArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ruleArnsBuffer:[Swift.String]? = nil - if let ruleArnsContainer = ruleArnsContainer { - ruleArnsBuffer = [Swift.String]() - for stringContainer0 in ruleArnsContainer { - ruleArnsBuffer?.append(stringContainer0) - } - } - ruleArns = ruleArnsBuffer - } else { - ruleArns = [] - } - } else { - ruleArns = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} - -extension DescribeRulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeRulesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextMarker = output.nextMarker - self.rules = output.rules - } else { - self.nextMarker = nil - self.rules = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeRulesResult"] + var value = DescribeRulesOutput() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Rule.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4320,57 +3134,33 @@ public struct DescribeRulesOutput: Swift.Equatable { } } -struct DescribeRulesOutputBody: Swift.Equatable { - let rules: [ElasticLoadBalancingv2ClientTypes.Rule]? - let nextMarker: Swift.String? -} +enum DescribeRulesOutputError { -extension DescribeRulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextMarker = "NextMarker" - case rules = "Rules" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeRulesResult")) - if containerValues.contains(.rules) { - struct KeyVal0{struct member{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Rule].self, forKey: .member) - var rulesBuffer:[ElasticLoadBalancingv2ClientTypes.Rule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [ElasticLoadBalancingv2ClientTypes.Rule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleNotFound": return try await RuleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - rules = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeRulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleNotFound": return try await RuleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeSSLPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerType = "LoadBalancerType" + case marker = "Marker" + case names = "Names" + case pageSize = "PageSize" } -} -extension DescribeSSLPoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerType = loadBalancerType { @@ -4430,61 +3220,16 @@ public struct DescribeSSLPoliciesInput: Swift.Equatable { } } -struct DescribeSSLPoliciesInputBody: Swift.Equatable { - let names: [Swift.String]? - let marker: Swift.String? - let pageSize: Swift.Int? - let loadBalancerType: ElasticLoadBalancingv2ClientTypes.LoadBalancerTypeEnum? -} +extension DescribeSSLPoliciesOutput { -extension DescribeSSLPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerType = "LoadBalancerType" - case marker = "Marker" - case names = "Names" - case pageSize = "PageSize" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.names) { - struct KeyVal0{struct member{}} - let namesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .names) - if let namesWrappedContainer = namesWrappedContainer { - let namesContainer = try namesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var namesBuffer:[Swift.String]? = nil - if let namesContainer = namesContainer { - namesBuffer = [Swift.String]() - for stringContainer0 in namesContainer { - namesBuffer?.append(stringContainer0) - } - } - names = namesBuffer - } else { - names = [] - } - } else { - names = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - let loadBalancerTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.LoadBalancerTypeEnum.self, forKey: .loadBalancerType) - loadBalancerType = loadBalancerTypeDecoded - } -} - -extension DescribeSSLPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSSLPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextMarker = output.nextMarker - self.sslPolicies = output.sslPolicies - } else { - self.nextMarker = nil - self.sslPolicies = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeSSLPoliciesResult"] + var value = DescribeSSLPoliciesOutput() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.sslPolicies = try reader["SslPolicies"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.SslPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4505,55 +3250,28 @@ public struct DescribeSSLPoliciesOutput: Swift.Equatable { } } -struct DescribeSSLPoliciesOutputBody: Swift.Equatable { - let sslPolicies: [ElasticLoadBalancingv2ClientTypes.SslPolicy]? - let nextMarker: Swift.String? -} +enum DescribeSSLPoliciesOutputError { -extension DescribeSSLPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextMarker = "NextMarker" - case sslPolicies = "SslPolicies" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeSSLPoliciesResult")) - if containerValues.contains(.sslPolicies) { - struct KeyVal0{struct member{}} - let sslPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sslPolicies) - if let sslPoliciesWrappedContainer = sslPoliciesWrappedContainer { - let sslPoliciesContainer = try sslPoliciesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.SslPolicy].self, forKey: .member) - var sslPoliciesBuffer:[ElasticLoadBalancingv2ClientTypes.SslPolicy]? = nil - if let sslPoliciesContainer = sslPoliciesContainer { - sslPoliciesBuffer = [ElasticLoadBalancingv2ClientTypes.SslPolicy]() - for structureContainer0 in sslPoliciesContainer { - sslPoliciesBuffer?.append(structureContainer0) - } - } - sslPolicies = sslPoliciesBuffer - } else { - sslPolicies = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SSLPolicyNotFound": return try await SSLPolicyNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - sslPolicies = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeSSLPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SSLPolicyNotFound": return try await SSLPolicyNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArns = "ResourceArns" } -} -extension DescribeTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArns = resourceArns { @@ -4593,47 +3311,15 @@ public struct DescribeTagsInput: Swift.Equatable { } } -struct DescribeTagsInputBody: Swift.Equatable { - let resourceArns: [Swift.String]? -} - -extension DescribeTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArns = "ResourceArns" - } +extension DescribeTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.resourceArns) { - struct KeyVal0{struct member{}} - let resourceArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceArns) - if let resourceArnsWrappedContainer = resourceArnsWrappedContainer { - let resourceArnsContainer = try resourceArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceArnsBuffer:[Swift.String]? = nil - if let resourceArnsContainer = resourceArnsContainer { - resourceArnsBuffer = [Swift.String]() - for stringContainer0 in resourceArnsContainer { - resourceArnsBuffer?.append(stringContainer0) - } - } - resourceArns = resourceArnsBuffer - } else { - resourceArns = [] - } - } else { - resourceArns = nil - } - } -} - -extension DescribeTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.tagDescriptions = output.tagDescriptions - } else { - self.tagDescriptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTagsResult"] + var value = DescribeTagsOutput() + value.tagDescriptions = try reader["TagDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TagDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4650,55 +3336,32 @@ public struct DescribeTagsOutput: Swift.Equatable { } } -struct DescribeTagsOutputBody: Swift.Equatable { - let tagDescriptions: [ElasticLoadBalancingv2ClientTypes.TagDescription]? -} +enum DescribeTagsOutputError { -extension DescribeTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagDescriptions = "TagDescriptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTagsResult")) - if containerValues.contains(.tagDescriptions) { - struct KeyVal0{struct member{}} - let tagDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagDescriptions) - if let tagDescriptionsWrappedContainer = tagDescriptionsWrappedContainer { - let tagDescriptionsContainer = try tagDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TagDescription].self, forKey: .member) - var tagDescriptionsBuffer:[ElasticLoadBalancingv2ClientTypes.TagDescription]? = nil - if let tagDescriptionsContainer = tagDescriptionsContainer { - tagDescriptionsBuffer = [ElasticLoadBalancingv2ClientTypes.TagDescription]() - for structureContainer0 in tagDescriptionsContainer { - tagDescriptionsBuffer?.append(structureContainer0) - } - } - tagDescriptions = tagDescriptionsBuffer - } else { - tagDescriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleNotFound": return try await RuleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tagDescriptions = nil } } } -enum DescribeTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleNotFound": return try await RuleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTargetGroupAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case targetGroupArn = "TargetGroupArn" } -} -extension DescribeTargetGroupAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let targetGroupArn = targetGroupArn { @@ -4729,30 +3392,15 @@ public struct DescribeTargetGroupAttributesInput: Swift.Equatable { } } -struct DescribeTargetGroupAttributesInputBody: Swift.Equatable { - let targetGroupArn: Swift.String? -} +extension DescribeTargetGroupAttributesOutput { -extension DescribeTargetGroupAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetGroupArn = "TargetGroupArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - } -} - -extension DescribeTargetGroupAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTargetGroupAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTargetGroupAttributesResult"] + var value = DescribeTargetGroupAttributesOutput() + value.attributes = try reader["Attributes"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4769,51 +3417,32 @@ public struct DescribeTargetGroupAttributesOutput: Swift.Equatable { } } -struct DescribeTargetGroupAttributesOutputBody: Swift.Equatable { - let attributes: [ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]? -} - -extension DescribeTargetGroupAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - } +enum DescribeTargetGroupAttributesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTargetGroupAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct member{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute].self, forKey: .member) - var attributesBuffer:[ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]() - for structureContainer0 in attributesContainer { - attributesBuffer?.append(structureContainer0) - } - } - attributes = attributesBuffer - } else { - attributes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil } } } -enum DescribeTargetGroupAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTargetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case loadBalancerArn = "LoadBalancerArn" + case marker = "Marker" + case names = "Names" + case pageSize = "PageSize" + case targetGroupArns = "TargetGroupArns" } -} -extension DescribeTargetGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let loadBalancerArn = loadBalancerArn { @@ -4889,82 +3518,16 @@ public struct DescribeTargetGroupsInput: Swift.Equatable { } } -struct DescribeTargetGroupsInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? - let targetGroupArns: [Swift.String]? - let names: [Swift.String]? - let marker: Swift.String? - let pageSize: Swift.Int? -} - -extension DescribeTargetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loadBalancerArn = "LoadBalancerArn" - case marker = "Marker" - case names = "Names" - case pageSize = "PageSize" - case targetGroupArns = "TargetGroupArns" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - if containerValues.contains(.targetGroupArns) { - struct KeyVal0{struct member{}} - let targetGroupArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroupArns) - if let targetGroupArnsWrappedContainer = targetGroupArnsWrappedContainer { - let targetGroupArnsContainer = try targetGroupArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var targetGroupArnsBuffer:[Swift.String]? = nil - if let targetGroupArnsContainer = targetGroupArnsContainer { - targetGroupArnsBuffer = [Swift.String]() - for stringContainer0 in targetGroupArnsContainer { - targetGroupArnsBuffer?.append(stringContainer0) - } - } - targetGroupArns = targetGroupArnsBuffer - } else { - targetGroupArns = [] - } - } else { - targetGroupArns = nil - } - if containerValues.contains(.names) { - struct KeyVal0{struct member{}} - let namesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .names) - if let namesWrappedContainer = namesWrappedContainer { - let namesContainer = try namesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var namesBuffer:[Swift.String]? = nil - if let namesContainer = namesContainer { - namesBuffer = [Swift.String]() - for stringContainer0 in namesContainer { - namesBuffer?.append(stringContainer0) - } - } - names = namesBuffer - } else { - names = [] - } - } else { - names = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} +extension DescribeTargetGroupsOutput { -extension DescribeTargetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTargetGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextMarker = output.nextMarker - self.targetGroups = output.targetGroups - } else { - self.nextMarker = nil - self.targetGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTargetGroupsResult"] + var value = DescribeTargetGroupsOutput() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.targetGroups = try reader["TargetGroups"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TargetGroup.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4985,56 +3548,31 @@ public struct DescribeTargetGroupsOutput: Swift.Equatable { } } -struct DescribeTargetGroupsOutputBody: Swift.Equatable { - let targetGroups: [ElasticLoadBalancingv2ClientTypes.TargetGroup]? - let nextMarker: Swift.String? -} - -extension DescribeTargetGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextMarker = "NextMarker" - case targetGroups = "TargetGroups" - } +enum DescribeTargetGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTargetGroupsResult")) - if containerValues.contains(.targetGroups) { - struct KeyVal0{struct member{}} - let targetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroups) - if let targetGroupsWrappedContainer = targetGroupsWrappedContainer { - let targetGroupsContainer = try targetGroupsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetGroup].self, forKey: .member) - var targetGroupsBuffer:[ElasticLoadBalancingv2ClientTypes.TargetGroup]? = nil - if let targetGroupsContainer = targetGroupsContainer { - targetGroupsBuffer = [ElasticLoadBalancingv2ClientTypes.TargetGroup]() - for structureContainer0 in targetGroupsContainer { - targetGroupsBuffer?.append(structureContainer0) - } - } - targetGroups = targetGroupsBuffer - } else { - targetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - targetGroups = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeTargetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTargetHealthInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case include = "Include" + case targetGroupArn = "TargetGroupArn" + case targets = "Targets" } -} -extension DescribeTargetHealthInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let include = include { @@ -5097,64 +3635,6 @@ public struct DescribeTargetHealthInput: Swift.Equatable { } } -struct DescribeTargetHealthInputBody: Swift.Equatable { - let targetGroupArn: Swift.String? - let targets: [ElasticLoadBalancingv2ClientTypes.TargetDescription]? - let include: [ElasticLoadBalancingv2ClientTypes.DescribeTargetHealthInputIncludeEnum]? -} - -extension DescribeTargetHealthInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case include = "Include" - case targetGroupArn = "TargetGroupArn" - case targets = "Targets" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - if containerValues.contains(.targets) { - struct KeyVal0{struct member{}} - let targetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targets) - if let targetsWrappedContainer = targetsWrappedContainer { - let targetsContainer = try targetsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetDescription].self, forKey: .member) - var targetsBuffer:[ElasticLoadBalancingv2ClientTypes.TargetDescription]? = nil - if let targetsContainer = targetsContainer { - targetsBuffer = [ElasticLoadBalancingv2ClientTypes.TargetDescription]() - for structureContainer0 in targetsContainer { - targetsBuffer?.append(structureContainer0) - } - } - targets = targetsBuffer - } else { - targets = [] - } - } else { - targets = nil - } - if containerValues.contains(.include) { - struct KeyVal0{struct member{}} - let includeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .include) - if let includeWrappedContainer = includeWrappedContainer { - let includeContainer = try includeWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.DescribeTargetHealthInputIncludeEnum].self, forKey: .member) - var includeBuffer:[ElasticLoadBalancingv2ClientTypes.DescribeTargetHealthInputIncludeEnum]? = nil - if let includeContainer = includeContainer { - includeBuffer = [ElasticLoadBalancingv2ClientTypes.DescribeTargetHealthInputIncludeEnum]() - for enumContainer0 in includeContainer { - includeBuffer?.append(enumContainer0) - } - } - include = includeBuffer - } else { - include = [] - } - } else { - include = nil - } - } -} - extension ElasticLoadBalancingv2ClientTypes { public enum DescribeTargetHealthInputIncludeEnum: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case all @@ -5187,14 +3667,15 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension DescribeTargetHealthOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTargetHealthOutputBody = try responseDecoder.decode(responseBody: data) - self.targetHealthDescriptions = output.targetHealthDescriptions - } else { - self.targetHealthDescriptions = nil +extension DescribeTargetHealthOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTargetHealthResult"] + var value = DescribeTargetHealthOutput() + value.targetHealthDescriptions = try reader["TargetHealthDescriptions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TargetHealthDescription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5211,53 +3692,32 @@ public struct DescribeTargetHealthOutput: Swift.Equatable { } } -struct DescribeTargetHealthOutputBody: Swift.Equatable { - let targetHealthDescriptions: [ElasticLoadBalancingv2ClientTypes.TargetHealthDescription]? -} +enum DescribeTargetHealthOutputError { -extension DescribeTargetHealthOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetHealthDescriptions = "TargetHealthDescriptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTargetHealthResult")) - if containerValues.contains(.targetHealthDescriptions) { - struct KeyVal0{struct member{}} - let targetHealthDescriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetHealthDescriptions) - if let targetHealthDescriptionsWrappedContainer = targetHealthDescriptionsWrappedContainer { - let targetHealthDescriptionsContainer = try targetHealthDescriptionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetHealthDescription].self, forKey: .member) - var targetHealthDescriptionsBuffer:[ElasticLoadBalancingv2ClientTypes.TargetHealthDescription]? = nil - if let targetHealthDescriptionsContainer = targetHealthDescriptionsContainer { - targetHealthDescriptionsBuffer = [ElasticLoadBalancingv2ClientTypes.TargetHealthDescription]() - for structureContainer0 in targetHealthDescriptionsContainer { - targetHealthDescriptionsBuffer?.append(structureContainer0) - } - } - targetHealthDescriptions = targetHealthDescriptionsBuffer - } else { - targetHealthDescriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "HealthUnavailable": return try await HealthUnavailableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTarget": return try await InvalidTargetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - targetHealthDescriptions = nil } } } -enum DescribeTargetHealthOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HealthUnavailable": return try await HealthUnavailableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTarget": return try await InvalidTargetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTrustStoreAssociationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case pageSize = "PageSize" + case trustStoreArn = "TrustStoreArn" } -} -extension DescribeTrustStoreAssociationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -5302,40 +3762,16 @@ public struct DescribeTrustStoreAssociationsInput: Swift.Equatable { } } -struct DescribeTrustStoreAssociationsInputBody: Swift.Equatable { - let trustStoreArn: Swift.String? - let marker: Swift.String? - let pageSize: Swift.Int? -} - -extension DescribeTrustStoreAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case pageSize = "PageSize" - case trustStoreArn = "TrustStoreArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} +extension DescribeTrustStoreAssociationsOutput { -extension DescribeTrustStoreAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTrustStoreAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextMarker = output.nextMarker - self.trustStoreAssociations = output.trustStoreAssociations - } else { - self.nextMarker = nil - self.trustStoreAssociations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTrustStoreAssociationsResult"] + var value = DescribeTrustStoreAssociationsOutput() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.trustStoreAssociations = try reader["TrustStoreAssociations"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5356,55 +3792,24 @@ public struct DescribeTrustStoreAssociationsOutput: Swift.Equatable { } } -struct DescribeTrustStoreAssociationsOutputBody: Swift.Equatable { - let trustStoreAssociations: [ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation]? - let nextMarker: Swift.String? -} +enum DescribeTrustStoreAssociationsOutputError { -extension DescribeTrustStoreAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextMarker = "NextMarker" - case trustStoreAssociations = "TrustStoreAssociations" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTrustStoreAssociationsResult")) - if containerValues.contains(.trustStoreAssociations) { - struct KeyVal0{struct member{}} - let trustStoreAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trustStoreAssociations) - if let trustStoreAssociationsWrappedContainer = trustStoreAssociationsWrappedContainer { - let trustStoreAssociationsContainer = try trustStoreAssociationsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation].self, forKey: .member) - var trustStoreAssociationsBuffer:[ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation]? = nil - if let trustStoreAssociationsContainer = trustStoreAssociationsContainer { - trustStoreAssociationsBuffer = [ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation]() - for structureContainer0 in trustStoreAssociationsContainer { - trustStoreAssociationsBuffer?.append(structureContainer0) - } - } - trustStoreAssociations = trustStoreAssociationsBuffer - } else { - trustStoreAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - trustStoreAssociations = nil - } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - } -} - -enum DescribeTrustStoreAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case numberOfRevokedEntries = "NumberOfRevokedEntries" case revocationId = "RevocationId" @@ -5428,16 +3833,16 @@ extension ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation: Swift. } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - let revocationIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .revocationId) - revocationId = revocationIdDecoded - let revocationTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.RevocationType.self, forKey: .revocationType) - revocationType = revocationTypeDecoded - let numberOfRevokedEntriesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfRevokedEntries) - numberOfRevokedEntries = numberOfRevokedEntriesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation() + value.trustStoreArn = try reader["TrustStoreArn"].readIfPresent() + value.revocationId = try reader["RevocationId"].readIfPresent() + value.revocationType = try reader["RevocationType"].readIfPresent() + value.numberOfRevokedEntries = try reader["NumberOfRevokedEntries"].readIfPresent() + return value + } } } @@ -5470,6 +3875,13 @@ extension ElasticLoadBalancingv2ClientTypes { } extension DescribeTrustStoreRevocationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case pageSize = "PageSize" + case revocationIds = "RevocationIds" + case trustStoreArn = "TrustStoreArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -5530,61 +3942,16 @@ public struct DescribeTrustStoreRevocationsInput: Swift.Equatable { } } -struct DescribeTrustStoreRevocationsInputBody: Swift.Equatable { - let trustStoreArn: Swift.String? - let revocationIds: [Swift.Int]? - let marker: Swift.String? - let pageSize: Swift.Int? -} - -extension DescribeTrustStoreRevocationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case pageSize = "PageSize" - case revocationIds = "RevocationIds" - case trustStoreArn = "TrustStoreArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - if containerValues.contains(.revocationIds) { - struct KeyVal0{struct member{}} - let revocationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .revocationIds) - if let revocationIdsWrappedContainer = revocationIdsWrappedContainer { - let revocationIdsContainer = try revocationIdsWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var revocationIdsBuffer:[Swift.Int]? = nil - if let revocationIdsContainer = revocationIdsContainer { - revocationIdsBuffer = [Swift.Int]() - for longContainer0 in revocationIdsContainer { - revocationIdsBuffer?.append(longContainer0) - } - } - revocationIds = revocationIdsBuffer - } else { - revocationIds = [] - } - } else { - revocationIds = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} +extension DescribeTrustStoreRevocationsOutput { -extension DescribeTrustStoreRevocationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTrustStoreRevocationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextMarker = output.nextMarker - self.trustStoreRevocations = output.trustStoreRevocations - } else { - self.nextMarker = nil - self.trustStoreRevocations = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTrustStoreRevocationsResult"] + var value = DescribeTrustStoreRevocationsOutput() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.trustStoreRevocations = try reader["TrustStoreRevocations"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5605,56 +3972,32 @@ public struct DescribeTrustStoreRevocationsOutput: Swift.Equatable { } } -struct DescribeTrustStoreRevocationsOutputBody: Swift.Equatable { - let trustStoreRevocations: [ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation]? - let nextMarker: Swift.String? -} +enum DescribeTrustStoreRevocationsOutputError { -extension DescribeTrustStoreRevocationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextMarker = "NextMarker" - case trustStoreRevocations = "TrustStoreRevocations" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTrustStoreRevocationsResult")) - if containerValues.contains(.trustStoreRevocations) { - struct KeyVal0{struct member{}} - let trustStoreRevocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trustStoreRevocations) - if let trustStoreRevocationsWrappedContainer = trustStoreRevocationsWrappedContainer { - let trustStoreRevocationsContainer = try trustStoreRevocationsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation].self, forKey: .member) - var trustStoreRevocationsBuffer:[ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation]? = nil - if let trustStoreRevocationsContainer = trustStoreRevocationsContainer { - trustStoreRevocationsBuffer = [ElasticLoadBalancingv2ClientTypes.DescribeTrustStoreRevocation]() - for structureContainer0 in trustStoreRevocationsContainer { - trustStoreRevocationsBuffer?.append(structureContainer0) - } - } - trustStoreRevocations = trustStoreRevocationsBuffer - } else { - trustStoreRevocations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RevocationIdNotFound": return try await RevocationIdNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - trustStoreRevocations = nil } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded } } -enum DescribeTrustStoreRevocationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RevocationIdNotFound": return try await RevocationIdNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTrustStoresInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case names = "Names" + case pageSize = "PageSize" + case trustStoreArns = "TrustStoreArns" } -} -extension DescribeTrustStoresInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -5723,78 +4066,16 @@ public struct DescribeTrustStoresInput: Swift.Equatable { } } -struct DescribeTrustStoresInputBody: Swift.Equatable { - let trustStoreArns: [Swift.String]? - let names: [Swift.String]? - let marker: Swift.String? - let pageSize: Swift.Int? -} - -extension DescribeTrustStoresInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case names = "Names" - case pageSize = "PageSize" - case trustStoreArns = "TrustStoreArns" - } +extension DescribeTrustStoresOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trustStoreArns) { - struct KeyVal0{struct member{}} - let trustStoreArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trustStoreArns) - if let trustStoreArnsWrappedContainer = trustStoreArnsWrappedContainer { - let trustStoreArnsContainer = try trustStoreArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var trustStoreArnsBuffer:[Swift.String]? = nil - if let trustStoreArnsContainer = trustStoreArnsContainer { - trustStoreArnsBuffer = [Swift.String]() - for stringContainer0 in trustStoreArnsContainer { - trustStoreArnsBuffer?.append(stringContainer0) - } - } - trustStoreArns = trustStoreArnsBuffer - } else { - trustStoreArns = [] - } - } else { - trustStoreArns = nil - } - if containerValues.contains(.names) { - struct KeyVal0{struct member{}} - let namesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .names) - if let namesWrappedContainer = namesWrappedContainer { - let namesContainer = try namesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var namesBuffer:[Swift.String]? = nil - if let namesContainer = namesContainer { - namesBuffer = [Swift.String]() - for stringContainer0 in namesContainer { - namesBuffer?.append(stringContainer0) - } - } - names = namesBuffer - } else { - names = [] - } - } else { - names = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let pageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pageSize) - pageSize = pageSizeDecoded - } -} - -extension DescribeTrustStoresOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTrustStoresOutputBody = try responseDecoder.decode(responseBody: data) - self.nextMarker = output.nextMarker - self.trustStores = output.trustStores - } else { - self.nextMarker = nil - self.trustStores = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTrustStoresResult"] + var value = DescribeTrustStoresOutput() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.trustStores = try reader["TrustStores"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TrustStore.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5815,65 +4096,32 @@ public struct DescribeTrustStoresOutput: Swift.Equatable { } } -struct DescribeTrustStoresOutputBody: Swift.Equatable { - let trustStores: [ElasticLoadBalancingv2ClientTypes.TrustStore]? - let nextMarker: Swift.String? -} +enum DescribeTrustStoresOutputError { -extension DescribeTrustStoresOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextMarker = "NextMarker" - case trustStores = "TrustStores" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTrustStoresResult")) - if containerValues.contains(.trustStores) { - struct KeyVal0{struct member{}} - let trustStoresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trustStores) - if let trustStoresWrappedContainer = trustStoresWrappedContainer { - let trustStoresContainer = try trustStoresWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TrustStore].self, forKey: .member) - var trustStoresBuffer:[ElasticLoadBalancingv2ClientTypes.TrustStore]? = nil - if let trustStoresContainer = trustStoresContainer { - trustStoresBuffer = [ElasticLoadBalancingv2ClientTypes.TrustStore]() - for structureContainer0 in trustStoresContainer { - trustStoresBuffer?.append(structureContainer0) - } - } - trustStores = trustStoresBuffer - } else { - trustStores = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - trustStores = nil - } - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - } -} - -enum DescribeTrustStoresOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DuplicateListenerException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateListenerException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5901,33 +4149,15 @@ public struct DuplicateListenerException: ClientRuntime.ModeledError, AWSClientR } } -struct DuplicateListenerExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateListenerExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DuplicateLoadBalancerNameException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateLoadBalancerNameException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5955,33 +4185,15 @@ public struct DuplicateLoadBalancerNameException: ClientRuntime.ModeledError, AW } } -struct DuplicateLoadBalancerNameExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateLoadBalancerNameExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DuplicateTagKeysException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateTagKeysException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6009,33 +4221,15 @@ public struct DuplicateTagKeysException: ClientRuntime.ModeledError, AWSClientRu } } -struct DuplicateTagKeysExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateTagKeysExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DuplicateTargetGroupNameException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateTargetGroupNameException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6063,33 +4257,15 @@ public struct DuplicateTargetGroupNameException: ClientRuntime.ModeledError, AWS } } -struct DuplicateTargetGroupNameExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateTargetGroupNameExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DuplicateTrustStoreNameException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateTrustStoreNameException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6117,22 +4293,6 @@ public struct DuplicateTrustStoreNameException: ClientRuntime.ModeledError, AWSC } } -struct DuplicateTrustStoreNameExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateTrustStoreNameExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - public enum ElasticLoadBalancingv2ClientTypes {} extension ElasticLoadBalancingv2ClientTypes { @@ -6167,7 +4327,7 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension ElasticLoadBalancingv2ClientTypes.FixedResponseActionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.FixedResponseActionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case contentType = "ContentType" case messageBody = "MessageBody" @@ -6187,14 +4347,15 @@ extension ElasticLoadBalancingv2ClientTypes.FixedResponseActionConfig: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageBody) - messageBody = messageBodyDecoded - let statusCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusCode) - statusCode = statusCodeDecoded - let contentTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contentType) - contentType = contentTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.FixedResponseActionConfig() + value.messageBody = try reader["MessageBody"].readIfPresent() + value.statusCode = try reader["StatusCode"].readIfPresent() + value.contentType = try reader["ContentType"].readIfPresent() + return value + } } } @@ -6223,7 +4384,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.ForwardActionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.ForwardActionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case targetGroupStickinessConfig = "TargetGroupStickinessConfig" case targetGroups = "TargetGroups" @@ -6248,29 +4409,14 @@ extension ElasticLoadBalancingv2ClientTypes.ForwardActionConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.targetGroups) { - struct KeyVal0{struct member{}} - let targetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroups) - if let targetGroupsWrappedContainer = targetGroupsWrappedContainer { - let targetGroupsContainer = try targetGroupsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetGroupTuple].self, forKey: .member) - var targetGroupsBuffer:[ElasticLoadBalancingv2ClientTypes.TargetGroupTuple]? = nil - if let targetGroupsContainer = targetGroupsContainer { - targetGroupsBuffer = [ElasticLoadBalancingv2ClientTypes.TargetGroupTuple]() - for structureContainer0 in targetGroupsContainer { - targetGroupsBuffer?.append(structureContainer0) - } - } - targetGroups = targetGroupsBuffer - } else { - targetGroups = [] - } - } else { - targetGroups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.ForwardActionConfig() + value.targetGroups = try reader["TargetGroups"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TargetGroupTuple.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.targetGroupStickinessConfig = try reader["TargetGroupStickinessConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.TargetGroupStickinessConfig.readingClosure) + return value } - let targetGroupStickinessConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetGroupStickinessConfig.self, forKey: .targetGroupStickinessConfig) - targetGroupStickinessConfig = targetGroupStickinessConfigDecoded } } @@ -6295,6 +4441,10 @@ extension ElasticLoadBalancingv2ClientTypes { } extension GetTrustStoreCaCertificatesBundleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case trustStoreArn = "TrustStoreArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let trustStoreArn = trustStoreArn { @@ -6325,30 +4475,15 @@ public struct GetTrustStoreCaCertificatesBundleInput: Swift.Equatable { } } -struct GetTrustStoreCaCertificatesBundleInputBody: Swift.Equatable { - let trustStoreArn: Swift.String? -} - -extension GetTrustStoreCaCertificatesBundleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trustStoreArn = "TrustStoreArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - } -} +extension GetTrustStoreCaCertificatesBundleOutput { -extension GetTrustStoreCaCertificatesBundleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTrustStoreCaCertificatesBundleOutputBody = try responseDecoder.decode(responseBody: data) - self.location = output.location - } else { - self.location = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetTrustStoreCaCertificatesBundleResult"] + var value = GetTrustStoreCaCertificatesBundleOutput() + value.location = try reader["Location"].readIfPresent() + return value } } } @@ -6365,34 +4500,29 @@ public struct GetTrustStoreCaCertificatesBundleOutput: Swift.Equatable { } } -struct GetTrustStoreCaCertificatesBundleOutputBody: Swift.Equatable { - let location: Swift.String? -} - -extension GetTrustStoreCaCertificatesBundleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case location = "Location" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetTrustStoreCaCertificatesBundleResult")) - let locationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .location) - location = locationDecoded - } -} +enum GetTrustStoreCaCertificatesBundleOutputError { -enum GetTrustStoreCaCertificatesBundleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetTrustStoreRevocationContentInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case revocationId = "RevocationId" + case trustStoreArn = "TrustStoreArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let revocationId = revocationId { @@ -6431,34 +4561,15 @@ public struct GetTrustStoreRevocationContentInput: Swift.Equatable { } } -struct GetTrustStoreRevocationContentInputBody: Swift.Equatable { - let trustStoreArn: Swift.String? - let revocationId: Swift.Int? -} - -extension GetTrustStoreRevocationContentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case revocationId = "RevocationId" - case trustStoreArn = "TrustStoreArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - let revocationIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .revocationId) - revocationId = revocationIdDecoded - } -} +extension GetTrustStoreRevocationContentOutput { -extension GetTrustStoreRevocationContentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTrustStoreRevocationContentOutputBody = try responseDecoder.decode(responseBody: data) - self.location = output.location - } else { - self.location = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetTrustStoreRevocationContentResult"] + var value = GetTrustStoreRevocationContentOutput() + value.location = try reader["Location"].readIfPresent() + return value } } } @@ -6475,45 +4586,33 @@ public struct GetTrustStoreRevocationContentOutput: Swift.Equatable { } } -struct GetTrustStoreRevocationContentOutputBody: Swift.Equatable { - let location: Swift.String? -} - -extension GetTrustStoreRevocationContentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case location = "Location" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetTrustStoreRevocationContentResult")) - let locationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .location) - location = locationDecoded - } -} +enum GetTrustStoreRevocationContentOutputError { -enum GetTrustStoreRevocationContentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RevocationIdNotFound": return try await RevocationIdNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RevocationIdNotFound": return try await RevocationIdNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension HealthUnavailableException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HealthUnavailableException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6541,23 +4640,7 @@ public struct HealthUnavailableException: ClientRuntime.ModeledError, AWSClientR } } -struct HealthUnavailableExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension HealthUnavailableExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.HostHeaderConditionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.HostHeaderConditionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case values = "Values" } @@ -6578,26 +4661,12 @@ extension ElasticLoadBalancingv2ClientTypes.HostHeaderConditionConfig: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.HostHeaderConditionConfig() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6618,7 +4687,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.HttpHeaderConditionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.HttpHeaderConditionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case httpHeaderName = "HttpHeaderName" case values = "Values" @@ -6643,28 +4712,13 @@ extension ElasticLoadBalancingv2ClientTypes.HttpHeaderConditionConfig: Swift.Cod } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let httpHeaderNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .httpHeaderName) - httpHeaderName = httpHeaderNameDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.HttpHeaderConditionConfig() + value.httpHeaderName = try reader["HttpHeaderName"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6689,7 +4743,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.HttpRequestMethodConditionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.HttpRequestMethodConditionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case values = "Values" } @@ -6710,26 +4764,12 @@ extension ElasticLoadBalancingv2ClientTypes.HttpRequestMethodConditionConfig: Sw } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.HttpRequestMethodConditionConfig() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6751,16 +4791,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension IncompatibleProtocolsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IncompatibleProtocolsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6784,37 +4822,19 @@ public struct IncompatibleProtocolsException: ClientRuntime.ModeledError, AWSCli message: Swift.String? = nil ) { - self.properties.message = message - } -} - -struct IncompatibleProtocolsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension IncompatibleProtocolsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + self.properties.message = message } } extension InvalidCaCertificatesBundleException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidCaCertificatesBundleException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6842,33 +4862,15 @@ public struct InvalidCaCertificatesBundleException: ClientRuntime.ModeledError, } } -struct InvalidCaCertificatesBundleExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidCaCertificatesBundleExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidConfigurationRequestException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidConfigurationRequestException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6896,33 +4898,15 @@ public struct InvalidConfigurationRequestException: ClientRuntime.ModeledError, } } -struct InvalidConfigurationRequestExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidConfigurationRequestExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidLoadBalancerActionException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidLoadBalancerActionException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6950,33 +4934,15 @@ public struct InvalidLoadBalancerActionException: ClientRuntime.ModeledError, AW } } -struct InvalidLoadBalancerActionExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidLoadBalancerActionExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidRevocationContentException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRevocationContentException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7004,33 +4970,15 @@ public struct InvalidRevocationContentException: ClientRuntime.ModeledError, AWS } } -struct InvalidRevocationContentExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRevocationContentExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSchemeException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSchemeException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7058,33 +5006,15 @@ public struct InvalidSchemeException: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidSchemeExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSchemeExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSecurityGroupException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSecurityGroupException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7112,33 +5042,15 @@ public struct InvalidSecurityGroupException: ClientRuntime.ModeledError, AWSClie } } -struct InvalidSecurityGroupExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSecurityGroupExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSubnetException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSubnetException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7166,33 +5078,15 @@ public struct InvalidSubnetException: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidSubnetExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSubnetExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidTargetException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTargetException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7220,22 +5114,6 @@ public struct InvalidTargetException: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidTargetExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidTargetExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ElasticLoadBalancingv2ClientTypes { public enum IpAddressType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case dualstack @@ -7268,7 +5146,7 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension ElasticLoadBalancingv2ClientTypes.Limit: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.Limit: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case max = "Max" case name = "Name" @@ -7284,12 +5162,14 @@ extension ElasticLoadBalancingv2ClientTypes.Limit: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.Limit() + value.name = try reader["Name"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -7355,7 +5235,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.Listener: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.Listener: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case alpnPolicy = "AlpnPolicy" case certificates = "Certificates" @@ -7426,77 +5306,21 @@ extension ElasticLoadBalancingv2ClientTypes.Listener: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .listenerArn) - listenerArn = listenerArnDecoded - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let protocolDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ProtocolEnum.self, forKey: .protocol) - `protocol` = protocolDecoded - if containerValues.contains(.certificates) { - struct KeyVal0{struct member{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[ElasticLoadBalancingv2ClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [ElasticLoadBalancingv2ClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] - } - } else { - certificates = nil - } - let sslPolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sslPolicy) - sslPolicy = sslPolicyDecoded - if containerValues.contains(.defaultActions) { - struct KeyVal0{struct member{}} - let defaultActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .defaultActions) - if let defaultActionsWrappedContainer = defaultActionsWrappedContainer { - let defaultActionsContainer = try defaultActionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Action].self, forKey: .member) - var defaultActionsBuffer:[ElasticLoadBalancingv2ClientTypes.Action]? = nil - if let defaultActionsContainer = defaultActionsContainer { - defaultActionsBuffer = [ElasticLoadBalancingv2ClientTypes.Action]() - for structureContainer0 in defaultActionsContainer { - defaultActionsBuffer?.append(structureContainer0) - } - } - defaultActions = defaultActionsBuffer - } else { - defaultActions = [] - } - } else { - defaultActions = nil - } - if containerValues.contains(.alpnPolicy) { - struct KeyVal0{struct member{}} - let alpnPolicyWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alpnPolicy) - if let alpnPolicyWrappedContainer = alpnPolicyWrappedContainer { - let alpnPolicyContainer = try alpnPolicyWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alpnPolicyBuffer:[Swift.String]? = nil - if let alpnPolicyContainer = alpnPolicyContainer { - alpnPolicyBuffer = [Swift.String]() - for stringContainer0 in alpnPolicyContainer { - alpnPolicyBuffer?.append(stringContainer0) - } - } - alpnPolicy = alpnPolicyBuffer - } else { - alpnPolicy = [] - } - } else { - alpnPolicy = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.Listener() + value.listenerArn = try reader["ListenerArn"].readIfPresent() + value.loadBalancerArn = try reader["LoadBalancerArn"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.certificates = try reader["Certificates"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Certificate.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.sslPolicy = try reader["SslPolicy"].readIfPresent() + value.defaultActions = try reader["DefaultActions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Action.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.alpnPolicy = try reader["AlpnPolicy"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.mutualAuthentication = try reader["MutualAuthentication"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes.readingClosure) + return value } - let mutualAuthenticationDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes.self, forKey: .mutualAuthentication) - mutualAuthentication = mutualAuthenticationDecoded } } @@ -7549,16 +5373,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension ListenerNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ListenerNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7586,23 +5408,7 @@ public struct ListenerNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -struct ListenerNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ListenerNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.LoadBalancer: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.LoadBalancer: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZones = "AvailabilityZones" case canonicalHostedZoneId = "CanonicalHostedZoneId" @@ -7684,70 +5490,26 @@ extension ElasticLoadBalancingv2ClientTypes.LoadBalancer: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - let canonicalHostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .canonicalHostedZoneId) - canonicalHostedZoneId = canonicalHostedZoneIdDecoded - let createdTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTime) - createdTime = createdTimeDecoded - let loadBalancerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerName) - loadBalancerName = loadBalancerNameDecoded - let schemeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.LoadBalancerSchemeEnum.self, forKey: .scheme) - scheme = schemeDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let stateDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.LoadBalancerState.self, forKey: .state) - state = stateDecoded - let typeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.LoadBalancerTypeEnum.self, forKey: .type) - type = typeDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.AvailabilityZone].self, forKey: .member) - var availabilityZonesBuffer:[ElasticLoadBalancingv2ClientTypes.AvailabilityZone]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [ElasticLoadBalancingv2ClientTypes.AvailabilityZone]() - for structureContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(structureContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.LoadBalancer() + value.loadBalancerArn = try reader["LoadBalancerArn"].readIfPresent() + value.dnsName = try reader["DNSName"].readIfPresent() + value.canonicalHostedZoneId = try reader["CanonicalHostedZoneId"].readIfPresent() + value.createdTime = try reader["CreatedTime"].readTimestampIfPresent(format: .dateTime) + value.loadBalancerName = try reader["LoadBalancerName"].readIfPresent() + value.scheme = try reader["Scheme"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.state = try reader["State"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.LoadBalancerState.readingClosure) + value.type = try reader["Type"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.AvailabilityZone.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.securityGroups = try reader["SecurityGroups"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.ipAddressType = try reader["IpAddressType"].readIfPresent() + value.customerOwnedIpv4Pool = try reader["CustomerOwnedIpv4Pool"].readIfPresent() + value.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = try reader["EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic"].readIfPresent() + return value } - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let customerOwnedIpv4PoolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerOwnedIpv4Pool) - customerOwnedIpv4Pool = customerOwnedIpv4PoolDecoded - let enforceSecurityGroupInboundRulesOnPrivateLinkTrafficDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) - enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTrafficDecoded } } @@ -7819,7 +5581,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.LoadBalancerAddress: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.LoadBalancerAddress: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocationId = "AllocationId" case ipv6Address = "IPv6Address" @@ -7843,16 +5605,16 @@ extension ElasticLoadBalancingv2ClientTypes.LoadBalancerAddress: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddress) - ipAddress = ipAddressDecoded - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let privateIPv4AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIPv4Address) - privateIPv4Address = privateIPv4AddressDecoded - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.LoadBalancerAddress() + value.ipAddress = try reader["IpAddress"].readIfPresent() + value.allocationId = try reader["AllocationId"].readIfPresent() + value.privateIPv4Address = try reader["PrivateIPv4Address"].readIfPresent() + value.ipv6Address = try reader["IPv6Address"].readIfPresent() + return value + } } } @@ -7884,7 +5646,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -7900,12 +5662,14 @@ extension ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -7986,16 +5750,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension LoadBalancerNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LoadBalancerNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8023,22 +5785,6 @@ public struct LoadBalancerNotFoundException: ClientRuntime.ModeledError, AWSClie } } -struct LoadBalancerNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension LoadBalancerNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ElasticLoadBalancingv2ClientTypes { public enum LoadBalancerSchemeEnum: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case `internal` @@ -8071,7 +5817,7 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension ElasticLoadBalancingv2ClientTypes.LoadBalancerState: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.LoadBalancerState: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case code = "Code" case reason = "Reason" @@ -8087,12 +5833,14 @@ extension ElasticLoadBalancingv2ClientTypes.LoadBalancerState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.LoadBalancerStateEnum.self, forKey: .code) - code = codeDecoded - let reasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reason) - reason = reasonDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.LoadBalancerState() + value.code = try reader["Code"].readIfPresent() + value.reason = try reader["Reason"].readIfPresent() + return value + } } } @@ -8189,7 +5937,7 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension ElasticLoadBalancingv2ClientTypes.Matcher: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.Matcher: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case grpcCode = "GrpcCode" case httpCode = "HttpCode" @@ -8205,12 +5953,14 @@ extension ElasticLoadBalancingv2ClientTypes.Matcher: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let httpCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .httpCode) - httpCode = httpCodeDecoded - let grpcCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grpcCode) - grpcCode = grpcCodeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.Matcher() + value.httpCode = try reader["HttpCode"].readIfPresent() + value.grpcCode = try reader["GrpcCode"].readIfPresent() + return value + } } } @@ -8267,6 +6017,17 @@ extension ElasticLoadBalancingv2ClientTypes { } extension ModifyListenerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case alpnPolicy = "AlpnPolicy" + case certificates = "Certificates" + case defaultActions = "DefaultActions" + case listenerArn = "ListenerArn" + case mutualAuthentication = "MutualAuthentication" + case port = "Port" + case `protocol` = "Protocol" + case sslPolicy = "SslPolicy" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let alpnPolicy = alpnPolicy { @@ -8386,109 +6147,15 @@ public struct ModifyListenerInput: Swift.Equatable { } } -struct ModifyListenerInputBody: Swift.Equatable { - let listenerArn: Swift.String? - let port: Swift.Int? - let `protocol`: ElasticLoadBalancingv2ClientTypes.ProtocolEnum? - let sslPolicy: Swift.String? - let certificates: [ElasticLoadBalancingv2ClientTypes.Certificate]? - let defaultActions: [ElasticLoadBalancingv2ClientTypes.Action]? - let alpnPolicy: [Swift.String]? - let mutualAuthentication: ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes? -} - -extension ModifyListenerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alpnPolicy = "AlpnPolicy" - case certificates = "Certificates" - case defaultActions = "DefaultActions" - case listenerArn = "ListenerArn" - case mutualAuthentication = "MutualAuthentication" - case port = "Port" - case `protocol` = "Protocol" - case sslPolicy = "SslPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .listenerArn) - listenerArn = listenerArnDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let protocolDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ProtocolEnum.self, forKey: .protocol) - `protocol` = protocolDecoded - let sslPolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sslPolicy) - sslPolicy = sslPolicyDecoded - if containerValues.contains(.certificates) { - struct KeyVal0{struct member{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[ElasticLoadBalancingv2ClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [ElasticLoadBalancingv2ClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] - } - } else { - certificates = nil - } - if containerValues.contains(.defaultActions) { - struct KeyVal0{struct member{}} - let defaultActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .defaultActions) - if let defaultActionsWrappedContainer = defaultActionsWrappedContainer { - let defaultActionsContainer = try defaultActionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Action].self, forKey: .member) - var defaultActionsBuffer:[ElasticLoadBalancingv2ClientTypes.Action]? = nil - if let defaultActionsContainer = defaultActionsContainer { - defaultActionsBuffer = [ElasticLoadBalancingv2ClientTypes.Action]() - for structureContainer0 in defaultActionsContainer { - defaultActionsBuffer?.append(structureContainer0) - } - } - defaultActions = defaultActionsBuffer - } else { - defaultActions = [] - } - } else { - defaultActions = nil - } - if containerValues.contains(.alpnPolicy) { - struct KeyVal0{struct member{}} - let alpnPolicyWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .alpnPolicy) - if let alpnPolicyWrappedContainer = alpnPolicyWrappedContainer { - let alpnPolicyContainer = try alpnPolicyWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var alpnPolicyBuffer:[Swift.String]? = nil - if let alpnPolicyContainer = alpnPolicyContainer { - alpnPolicyBuffer = [Swift.String]() - for stringContainer0 in alpnPolicyContainer { - alpnPolicyBuffer?.append(stringContainer0) - } - } - alpnPolicy = alpnPolicyBuffer - } else { - alpnPolicy = [] - } - } else { - alpnPolicy = nil - } - let mutualAuthenticationDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes.self, forKey: .mutualAuthentication) - mutualAuthentication = mutualAuthenticationDecoded - } -} +extension ModifyListenerOutput { -extension ModifyListenerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyListenerOutputBody = try responseDecoder.decode(responseBody: data) - self.listeners = output.listeners - } else { - self.listeners = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyListenerResult"] + var value = ModifyListenerOutput() + value.listeners = try reader["Listeners"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Listener.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8505,69 +6172,47 @@ public struct ModifyListenerOutput: Swift.Equatable { } } -struct ModifyListenerOutputBody: Swift.Equatable { - let listeners: [ElasticLoadBalancingv2ClientTypes.Listener]? -} +enum ModifyListenerOutputError { -extension ModifyListenerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case listeners = "Listeners" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyListenerResult")) - if containerValues.contains(.listeners) { - struct KeyVal0{struct member{}} - let listenersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .listeners) - if let listenersWrappedContainer = listenersWrappedContainer { - let listenersContainer = try listenersWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Listener].self, forKey: .member) - var listenersBuffer:[ElasticLoadBalancingv2ClientTypes.Listener]? = nil - if let listenersContainer = listenersContainer { - listenersBuffer = [ElasticLoadBalancingv2ClientTypes.Listener]() - for structureContainer0 in listenersContainer { - listenersBuffer?.append(structureContainer0) - } - } - listeners = listenersBuffer - } else { - listeners = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ALPNPolicyNotFound": return try await ALPNPolicyNotSupportedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CertificateNotFound": return try await CertificateNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateListener": return try await DuplicateListenerException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IncompatibleProtocols": return try await IncompatibleProtocolsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidLoadBalancerAction": return try await InvalidLoadBalancerActionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SSLPolicyNotFound": return try await SSLPolicyNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupAssociationLimit": return try await TargetGroupAssociationLimitException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyActions": return try await TooManyActionsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyCertificates": return try await TooManyCertificatesException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyListeners": return try await TooManyListenersException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTargets": return try await TooManyTargetsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyUniqueTargetGroupsPerLoadBalancer": return try await TooManyUniqueTargetGroupsPerLoadBalancerException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotReady": return try await TrustStoreNotReadyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - listeners = nil } } } -enum ModifyListenerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ALPNPolicyNotFound": return try await ALPNPolicyNotSupportedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CertificateNotFound": return try await CertificateNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateListener": return try await DuplicateListenerException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IncompatibleProtocols": return try await IncompatibleProtocolsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLoadBalancerAction": return try await InvalidLoadBalancerActionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SSLPolicyNotFound": return try await SSLPolicyNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupAssociationLimit": return try await TargetGroupAssociationLimitException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyActions": return try await TooManyActionsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyCertificates": return try await TooManyCertificatesException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyListeners": return try await TooManyListenersException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTargets": return try await TooManyTargetsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyUniqueTargetGroupsPerLoadBalancer": return try await TooManyUniqueTargetGroupsPerLoadBalancerException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotReady": return try await TrustStoreNotReadyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyLoadBalancerAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case loadBalancerArn = "LoadBalancerArn" } -} -extension ModifyLoadBalancerAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -8615,51 +6260,15 @@ public struct ModifyLoadBalancerAttributesInput: Swift.Equatable { } } -struct ModifyLoadBalancerAttributesInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? - let attributes: [ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]? -} - -extension ModifyLoadBalancerAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - case loadBalancerArn = "LoadBalancerArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct member{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute].self, forKey: .member) - var attributesBuffer:[ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]() - for structureContainer0 in attributesContainer { - attributesBuffer?.append(structureContainer0) - } - } - attributes = attributesBuffer - } else { - attributes = [] - } - } else { - attributes = nil - } - } -} +extension ModifyLoadBalancerAttributesOutput { -extension ModifyLoadBalancerAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyLoadBalancerAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyLoadBalancerAttributesResult"] + var value = ModifyLoadBalancerAttributesOutput() + value.attributes = try reader["Attributes"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8676,52 +6285,31 @@ public struct ModifyLoadBalancerAttributesOutput: Swift.Equatable { } } -struct ModifyLoadBalancerAttributesOutputBody: Swift.Equatable { - let attributes: [ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]? -} - -extension ModifyLoadBalancerAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - } +enum ModifyLoadBalancerAttributesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyLoadBalancerAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct member{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute].self, forKey: .member) - var attributesBuffer:[ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [ElasticLoadBalancingv2ClientTypes.LoadBalancerAttribute]() - for structureContainer0 in attributesContainer { - attributesBuffer?.append(structureContainer0) - } - } - attributes = attributesBuffer - } else { - attributes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil } } } -enum ModifyLoadBalancerAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyRuleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actions = "Actions" + case conditions = "Conditions" + case ruleArn = "RuleArn" } -} -extension ModifyRuleInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actions = actions { @@ -8784,72 +6372,15 @@ public struct ModifyRuleInput: Swift.Equatable { } } -struct ModifyRuleInputBody: Swift.Equatable { - let ruleArn: Swift.String? - let conditions: [ElasticLoadBalancingv2ClientTypes.RuleCondition]? - let actions: [ElasticLoadBalancingv2ClientTypes.Action]? -} - -extension ModifyRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actions = "Actions" - case conditions = "Conditions" - case ruleArn = "RuleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleArn) - ruleArn = ruleArnDecoded - if containerValues.contains(.conditions) { - struct KeyVal0{struct member{}} - let conditionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .conditions) - if let conditionsWrappedContainer = conditionsWrappedContainer { - let conditionsContainer = try conditionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.RuleCondition].self, forKey: .member) - var conditionsBuffer:[ElasticLoadBalancingv2ClientTypes.RuleCondition]? = nil - if let conditionsContainer = conditionsContainer { - conditionsBuffer = [ElasticLoadBalancingv2ClientTypes.RuleCondition]() - for structureContainer0 in conditionsContainer { - conditionsBuffer?.append(structureContainer0) - } - } - conditions = conditionsBuffer - } else { - conditions = [] - } - } else { - conditions = nil - } - if containerValues.contains(.actions) { - struct KeyVal0{struct member{}} - let actionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actions) - if let actionsWrappedContainer = actionsWrappedContainer { - let actionsContainer = try actionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Action].self, forKey: .member) - var actionsBuffer:[ElasticLoadBalancingv2ClientTypes.Action]? = nil - if let actionsContainer = actionsContainer { - actionsBuffer = [ElasticLoadBalancingv2ClientTypes.Action]() - for structureContainer0 in actionsContainer { - actionsBuffer?.append(structureContainer0) - } - } - actions = actionsBuffer - } else { - actions = [] - } - } else { - actions = nil - } - } -} +extension ModifyRuleOutput { -extension ModifyRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyRuleOutputBody = try responseDecoder.decode(responseBody: data) - self.rules = output.rules - } else { - self.rules = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyRuleResult"] + var value = ModifyRuleOutput() + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Rule.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8866,61 +6397,39 @@ public struct ModifyRuleOutput: Swift.Equatable { } } -struct ModifyRuleOutputBody: Swift.Equatable { - let rules: [ElasticLoadBalancingv2ClientTypes.Rule]? -} +enum ModifyRuleOutputError { -extension ModifyRuleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rules" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyRuleResult")) - if containerValues.contains(.rules) { - struct KeyVal0{struct member{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Rule].self, forKey: .member) - var rulesBuffer:[ElasticLoadBalancingv2ClientTypes.Rule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [ElasticLoadBalancingv2ClientTypes.Rule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "IncompatibleProtocols": return try await IncompatibleProtocolsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidLoadBalancerAction": return try await InvalidLoadBalancerActionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotPermitted": return try await OperationNotPermittedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleNotFound": return try await RuleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupAssociationLimit": return try await TargetGroupAssociationLimitException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyActions": return try await TooManyActionsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTargets": return try await TooManyTargetsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyUniqueTargetGroupsPerLoadBalancer": return try await TooManyUniqueTargetGroupsPerLoadBalancerException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedProtocol": return try await UnsupportedProtocolException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - rules = nil } } } -enum ModifyRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "IncompatibleProtocols": return try await IncompatibleProtocolsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLoadBalancerAction": return try await InvalidLoadBalancerActionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotPermitted": return try await OperationNotPermittedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleNotFound": return try await RuleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupAssociationLimit": return try await TargetGroupAssociationLimitException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyActions": return try await TooManyActionsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTargets": return try await TooManyTargetsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyUniqueTargetGroupsPerLoadBalancer": return try await TooManyUniqueTargetGroupsPerLoadBalancerException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedProtocol": return try await UnsupportedProtocolException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyTargetGroupAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case targetGroupArn = "TargetGroupArn" } -} -extension ModifyTargetGroupAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -8968,51 +6477,15 @@ public struct ModifyTargetGroupAttributesInput: Swift.Equatable { } } -struct ModifyTargetGroupAttributesInputBody: Swift.Equatable { - let targetGroupArn: Swift.String? - let attributes: [ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]? -} - -extension ModifyTargetGroupAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - case targetGroupArn = "TargetGroupArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct member{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute].self, forKey: .member) - var attributesBuffer:[ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]() - for structureContainer0 in attributesContainer { - attributesBuffer?.append(structureContainer0) - } - } - attributes = attributesBuffer - } else { - attributes = [] - } - } else { - attributes = nil - } - } -} +extension ModifyTargetGroupAttributesOutput { -extension ModifyTargetGroupAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTargetGroupAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyTargetGroupAttributesResult"] + var value = ModifyTargetGroupAttributesOutput() + value.attributes = try reader["Attributes"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9029,52 +6502,38 @@ public struct ModifyTargetGroupAttributesOutput: Swift.Equatable { } } -struct ModifyTargetGroupAttributesOutputBody: Swift.Equatable { - let attributes: [ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]? -} - -extension ModifyTargetGroupAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - } +enum ModifyTargetGroupAttributesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyTargetGroupAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct member{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute].self, forKey: .member) - var attributesBuffer:[ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute]() - for structureContainer0 in attributesContainer { - attributesBuffer?.append(structureContainer0) - } - } - attributes = attributesBuffer - } else { - attributes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil } } } -enum ModifyTargetGroupAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyTargetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case healthCheckEnabled = "HealthCheckEnabled" + case healthCheckIntervalSeconds = "HealthCheckIntervalSeconds" + case healthCheckPath = "HealthCheckPath" + case healthCheckPort = "HealthCheckPort" + case healthCheckProtocol = "HealthCheckProtocol" + case healthCheckTimeoutSeconds = "HealthCheckTimeoutSeconds" + case healthyThresholdCount = "HealthyThresholdCount" + case matcher = "Matcher" + case targetGroupArn = "TargetGroupArn" + case unhealthyThresholdCount = "UnhealthyThresholdCount" } -} -extension ModifyTargetGroupInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let healthCheckEnabled = healthCheckEnabled { @@ -9164,70 +6623,19 @@ public struct ModifyTargetGroupInput: Swift.Equatable { self.healthyThresholdCount = healthyThresholdCount self.matcher = matcher self.targetGroupArn = targetGroupArn - self.unhealthyThresholdCount = unhealthyThresholdCount - } -} - -struct ModifyTargetGroupInputBody: Swift.Equatable { - let targetGroupArn: Swift.String? - let healthCheckProtocol: ElasticLoadBalancingv2ClientTypes.ProtocolEnum? - let healthCheckPort: Swift.String? - let healthCheckPath: Swift.String? - let healthCheckEnabled: Swift.Bool? - let healthCheckIntervalSeconds: Swift.Int? - let healthCheckTimeoutSeconds: Swift.Int? - let healthyThresholdCount: Swift.Int? - let unhealthyThresholdCount: Swift.Int? - let matcher: ElasticLoadBalancingv2ClientTypes.Matcher? -} - -extension ModifyTargetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheckEnabled = "HealthCheckEnabled" - case healthCheckIntervalSeconds = "HealthCheckIntervalSeconds" - case healthCheckPath = "HealthCheckPath" - case healthCheckPort = "HealthCheckPort" - case healthCheckProtocol = "HealthCheckProtocol" - case healthCheckTimeoutSeconds = "HealthCheckTimeoutSeconds" - case healthyThresholdCount = "HealthyThresholdCount" - case matcher = "Matcher" - case targetGroupArn = "TargetGroupArn" - case unhealthyThresholdCount = "UnhealthyThresholdCount" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - let healthCheckProtocolDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ProtocolEnum.self, forKey: .healthCheckProtocol) - healthCheckProtocol = healthCheckProtocolDecoded - let healthCheckPortDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckPort) - healthCheckPort = healthCheckPortDecoded - let healthCheckPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckPath) - healthCheckPath = healthCheckPathDecoded - let healthCheckEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .healthCheckEnabled) - healthCheckEnabled = healthCheckEnabledDecoded - let healthCheckIntervalSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckIntervalSeconds) - healthCheckIntervalSeconds = healthCheckIntervalSecondsDecoded - let healthCheckTimeoutSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckTimeoutSeconds) - healthCheckTimeoutSeconds = healthCheckTimeoutSecondsDecoded - let healthyThresholdCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthyThresholdCount) - healthyThresholdCount = healthyThresholdCountDecoded - let unhealthyThresholdCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .unhealthyThresholdCount) - unhealthyThresholdCount = unhealthyThresholdCountDecoded - let matcherDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.Matcher.self, forKey: .matcher) - matcher = matcherDecoded + self.unhealthyThresholdCount = unhealthyThresholdCount } } -extension ModifyTargetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTargetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.targetGroups = output.targetGroups - } else { - self.targetGroups = nil +extension ModifyTargetGroupOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyTargetGroupResult"] + var value = ModifyTargetGroupOutput() + value.targetGroups = try reader["TargetGroups"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TargetGroup.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9244,52 +6652,32 @@ public struct ModifyTargetGroupOutput: Swift.Equatable { } } -struct ModifyTargetGroupOutputBody: Swift.Equatable { - let targetGroups: [ElasticLoadBalancingv2ClientTypes.TargetGroup]? -} - -extension ModifyTargetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetGroups = "TargetGroups" - } +enum ModifyTargetGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyTargetGroupResult")) - if containerValues.contains(.targetGroups) { - struct KeyVal0{struct member{}} - let targetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroups) - if let targetGroupsWrappedContainer = targetGroupsWrappedContainer { - let targetGroupsContainer = try targetGroupsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetGroup].self, forKey: .member) - var targetGroupsBuffer:[ElasticLoadBalancingv2ClientTypes.TargetGroup]? = nil - if let targetGroupsContainer = targetGroupsContainer { - targetGroupsBuffer = [ElasticLoadBalancingv2ClientTypes.TargetGroup]() - for structureContainer0 in targetGroupsContainer { - targetGroupsBuffer?.append(structureContainer0) - } - } - targetGroups = targetGroupsBuffer - } else { - targetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - targetGroups = nil } } } -enum ModifyTargetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyTrustStoreInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case caCertificatesBundleS3Bucket = "CaCertificatesBundleS3Bucket" + case caCertificatesBundleS3Key = "CaCertificatesBundleS3Key" + case caCertificatesBundleS3ObjectVersion = "CaCertificatesBundleS3ObjectVersion" + case trustStoreArn = "TrustStoreArn" } -} -extension ModifyTrustStoreInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let caCertificatesBundleS3Bucket = caCertificatesBundleS3Bucket { @@ -9343,42 +6731,15 @@ public struct ModifyTrustStoreInput: Swift.Equatable { } } -struct ModifyTrustStoreInputBody: Swift.Equatable { - let trustStoreArn: Swift.String? - let caCertificatesBundleS3Bucket: Swift.String? - let caCertificatesBundleS3Key: Swift.String? - let caCertificatesBundleS3ObjectVersion: Swift.String? -} - -extension ModifyTrustStoreInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case caCertificatesBundleS3Bucket = "CaCertificatesBundleS3Bucket" - case caCertificatesBundleS3Key = "CaCertificatesBundleS3Key" - case caCertificatesBundleS3ObjectVersion = "CaCertificatesBundleS3ObjectVersion" - case trustStoreArn = "TrustStoreArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - let caCertificatesBundleS3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificatesBundleS3Bucket) - caCertificatesBundleS3Bucket = caCertificatesBundleS3BucketDecoded - let caCertificatesBundleS3KeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificatesBundleS3Key) - caCertificatesBundleS3Key = caCertificatesBundleS3KeyDecoded - let caCertificatesBundleS3ObjectVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificatesBundleS3ObjectVersion) - caCertificatesBundleS3ObjectVersion = caCertificatesBundleS3ObjectVersionDecoded - } -} +extension ModifyTrustStoreOutput { -extension ModifyTrustStoreOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTrustStoreOutputBody = try responseDecoder.decode(responseBody: data) - self.trustStores = output.trustStores - } else { - self.trustStores = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyTrustStoreResult"] + var value = ModifyTrustStoreOutput() + value.trustStores = try reader["TrustStores"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.TrustStore.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9395,53 +6756,26 @@ public struct ModifyTrustStoreOutput: Swift.Equatable { } } -struct ModifyTrustStoreOutputBody: Swift.Equatable { - let trustStores: [ElasticLoadBalancingv2ClientTypes.TrustStore]? -} +enum ModifyTrustStoreOutputError { -extension ModifyTrustStoreOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trustStores = "TrustStores" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyTrustStoreResult")) - if containerValues.contains(.trustStores) { - struct KeyVal0{struct member{}} - let trustStoresWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trustStores) - if let trustStoresWrappedContainer = trustStoresWrappedContainer { - let trustStoresContainer = try trustStoresWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TrustStore].self, forKey: .member) - var trustStoresBuffer:[ElasticLoadBalancingv2ClientTypes.TrustStore]? = nil - if let trustStoresContainer = trustStoresContainer { - trustStoresBuffer = [ElasticLoadBalancingv2ClientTypes.TrustStore]() - for structureContainer0 in trustStoresContainer { - trustStoresBuffer?.append(structureContainer0) - } - } - trustStores = trustStoresBuffer - } else { - trustStores = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CaCertificatesBundleNotFound": return try await CaCertificatesBundleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCaCertificatesBundle": return try await InvalidCaCertificatesBundleException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - trustStores = nil - } - } -} - -enum ModifyTrustStoreOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CaCertificatesBundleNotFound": return try await CaCertificatesBundleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCaCertificatesBundle": return try await InvalidCaCertificatesBundleException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ignoreClientCertificateExpiry = "IgnoreClientCertificateExpiry" case mode = "Mode" @@ -9461,14 +6795,15 @@ extension ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes: Swif } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let modeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .mode) - mode = modeDecoded - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - let ignoreClientCertificateExpiryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ignoreClientCertificateExpiry) - ignoreClientCertificateExpiry = ignoreClientCertificateExpiryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.MutualAuthenticationAttributes() + value.mode = try reader["Mode"].readIfPresent() + value.trustStoreArn = try reader["TrustStoreArn"].readIfPresent() + value.ignoreClientCertificateExpiry = try reader["IgnoreClientCertificateExpiry"].readIfPresent() + return value + } } } @@ -9497,16 +6832,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension OperationNotPermittedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OperationNotPermittedException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9534,23 +6867,7 @@ public struct OperationNotPermittedException: ClientRuntime.ModeledError, AWSCli } } -struct OperationNotPermittedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension OperationNotPermittedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.PathPatternConditionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.PathPatternConditionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case values = "Values" } @@ -9571,26 +6888,12 @@ extension ElasticLoadBalancingv2ClientTypes.PathPatternConditionConfig: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.PathPatternConditionConfig() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9612,16 +6915,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension PriorityInUseException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PriorityInUseException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9649,22 +6950,6 @@ public struct PriorityInUseException: ClientRuntime.ModeledError, AWSClientRunti } } -struct PriorityInUseExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PriorityInUseExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ElasticLoadBalancingv2ClientTypes { public enum ProtocolEnum: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case geneve @@ -9712,7 +6997,7 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension ElasticLoadBalancingv2ClientTypes.QueryStringConditionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.QueryStringConditionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case values = "Values" } @@ -9733,26 +7018,12 @@ extension ElasticLoadBalancingv2ClientTypes.QueryStringConditionConfig: Swift.Co } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.QueryStringKeyValuePair].self, forKey: .member) - var valuesBuffer:[ElasticLoadBalancingv2ClientTypes.QueryStringKeyValuePair]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [ElasticLoadBalancingv2ClientTypes.QueryStringKeyValuePair]() - for structureContainer0 in valuesContainer { - valuesBuffer?.append(structureContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.QueryStringConditionConfig() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.QueryStringKeyValuePair.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9773,7 +7044,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.QueryStringKeyValuePair: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.QueryStringKeyValuePair: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -9789,12 +7060,14 @@ extension ElasticLoadBalancingv2ClientTypes.QueryStringKeyValuePair: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.QueryStringKeyValuePair() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -9818,7 +7091,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.RedirectActionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.RedirectActionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case host = "Host" case path = "Path" @@ -9850,20 +7123,18 @@ extension ElasticLoadBalancingv2ClientTypes.RedirectActionConfig: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .port) - port = portDecoded - let hostDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .host) - host = hostDecoded - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let queryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .query) - query = queryDecoded - let statusCodeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.RedirectActionStatusCodeEnum.self, forKey: .statusCode) - statusCode = statusCodeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.RedirectActionConfig() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.host = try reader["Host"].readIfPresent() + value.path = try reader["Path"].readIfPresent() + value.query = try reader["Query"].readIfPresent() + value.statusCode = try reader["StatusCode"].readIfPresent() + return value + } } } @@ -9950,6 +7221,11 @@ extension ElasticLoadBalancingv2ClientTypes { } extension RegisterTargetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case targetGroupArn = "TargetGroupArn" + case targets = "Targets" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let targetGroupArn = targetGroupArn { @@ -9997,67 +7273,46 @@ public struct RegisterTargetsInput: Swift.Equatable { } } -struct RegisterTargetsInputBody: Swift.Equatable { - let targetGroupArn: Swift.String? - let targets: [ElasticLoadBalancingv2ClientTypes.TargetDescription]? -} - -extension RegisterTargetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetGroupArn = "TargetGroupArn" - case targets = "Targets" - } +extension RegisterTargetsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - if containerValues.contains(.targets) { - struct KeyVal0{struct member{}} - let targetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targets) - if let targetsWrappedContainer = targetsWrappedContainer { - let targetsContainer = try targetsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.TargetDescription].self, forKey: .member) - var targetsBuffer:[ElasticLoadBalancingv2ClientTypes.TargetDescription]? = nil - if let targetsContainer = targetsContainer { - targetsBuffer = [ElasticLoadBalancingv2ClientTypes.TargetDescription]() - for structureContainer0 in targetsContainer { - targetsBuffer?.append(structureContainer0) - } - } - targets = targetsBuffer - } else { - targets = [] - } - } else { - targets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RegisterTargetsOutput() } } } -extension RegisterTargetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct RegisterTargetsOutput: Swift.Equatable { public init() { } } -enum RegisterTargetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidTarget": return try await InvalidTargetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTargets": return try await TooManyTargetsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RegisterTargetsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidTarget": return try await InvalidTargetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyRegistrationsForTargetId": return try await TooManyRegistrationsForTargetIdException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTargets": return try await TooManyTargetsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveListenerCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificates = "Certificates" + case listenerArn = "ListenerArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificates = certificates { @@ -10105,65 +7360,44 @@ public struct RemoveListenerCertificatesInput: Swift.Equatable { } } -struct RemoveListenerCertificatesInputBody: Swift.Equatable { - let listenerArn: Swift.String? - let certificates: [ElasticLoadBalancingv2ClientTypes.Certificate]? -} - -extension RemoveListenerCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificates = "Certificates" - case listenerArn = "ListenerArn" - } +extension RemoveListenerCertificatesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let listenerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .listenerArn) - listenerArn = listenerArnDecoded - if containerValues.contains(.certificates) { - struct KeyVal0{struct member{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[ElasticLoadBalancingv2ClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [ElasticLoadBalancingv2ClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] - } - } else { - certificates = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveListenerCertificatesOutput() } } } -extension RemoveListenerCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct RemoveListenerCertificatesOutput: Swift.Equatable { public init() { } } -enum RemoveListenerCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OperationNotPermitted": return try await OperationNotPermittedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveListenerCertificatesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OperationNotPermitted": return try await OperationNotPermittedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArns = "ResourceArns" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArns = resourceArns { @@ -10220,86 +7454,48 @@ public struct RemoveTagsInput: Swift.Equatable { } } -struct RemoveTagsInputBody: Swift.Equatable { - let resourceArns: [Swift.String]? - let tagKeys: [Swift.String]? -} - -extension RemoveTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArns = "ResourceArns" - case tagKeys = "TagKeys" - } +extension RemoveTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.resourceArns) { - struct KeyVal0{struct member{}} - let resourceArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceArns) - if let resourceArnsWrappedContainer = resourceArnsWrappedContainer { - let resourceArnsContainer = try resourceArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceArnsBuffer:[Swift.String]? = nil - if let resourceArnsContainer = resourceArnsContainer { - resourceArnsBuffer = [Swift.String]() - for stringContainer0 in resourceArnsContainer { - resourceArnsBuffer?.append(stringContainer0) - } - } - resourceArns = resourceArnsBuffer - } else { - resourceArns = [] - } - } else { - resourceArns = nil - } - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveTagsOutput() } } } -extension RemoveTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct RemoveTagsOutput: Swift.Equatable { public init() { } } -enum RemoveTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ListenerNotFound": return try await ListenerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleNotFound": return try await RuleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TargetGroupNotFound": return try await TargetGroupNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTags": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ListenerNotFound": return try await ListenerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleNotFound": return try await RuleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TargetGroupNotFound": return try await TargetGroupNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyTags": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveTrustStoreRevocationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case revocationIds = "RevocationIds" + case trustStoreArn = "TrustStoreArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let revocationIds = revocationIds { @@ -10347,75 +7543,47 @@ public struct RemoveTrustStoreRevocationsInput: Swift.Equatable { } } -struct RemoveTrustStoreRevocationsInputBody: Swift.Equatable { - let trustStoreArn: Swift.String? - let revocationIds: [Swift.Int]? -} - -extension RemoveTrustStoreRevocationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case revocationIds = "RevocationIds" - case trustStoreArn = "TrustStoreArn" - } +extension RemoveTrustStoreRevocationsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - if containerValues.contains(.revocationIds) { - struct KeyVal0{struct member{}} - let revocationIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .revocationIds) - if let revocationIdsWrappedContainer = revocationIdsWrappedContainer { - let revocationIdsContainer = try revocationIdsWrappedContainer.decodeIfPresent([Swift.Int].self, forKey: .member) - var revocationIdsBuffer:[Swift.Int]? = nil - if let revocationIdsContainer = revocationIdsContainer { - revocationIdsBuffer = [Swift.Int]() - for longContainer0 in revocationIdsContainer { - revocationIdsBuffer?.append(longContainer0) - } - } - revocationIds = revocationIdsBuffer - } else { - revocationIds = [] - } - } else { - revocationIds = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveTrustStoreRevocationsOutput() } } } -extension RemoveTrustStoreRevocationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct RemoveTrustStoreRevocationsOutput: Swift.Equatable { public init() { } } -enum RemoveTrustStoreRevocationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RevocationIdNotFound": return try await RevocationIdNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrustStoreNotFound": return try await TrustStoreNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveTrustStoreRevocationsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RevocationIdNotFound": return try await RevocationIdNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrustStoreNotFound": return try await TrustStoreNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResourceInUseException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceInUseException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10443,23 +7611,7 @@ public struct ResourceInUseException: ClientRuntime.ModeledError, AWSClientRunti } } -struct ResourceInUseExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceInUseExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.RevocationContent: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.RevocationContent: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case revocationType = "RevocationType" case s3Bucket = "S3Bucket" @@ -10483,16 +7635,16 @@ extension ElasticLoadBalancingv2ClientTypes.RevocationContent: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3KeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Key) - s3Key = s3KeyDecoded - let s3ObjectVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3ObjectVersion) - s3ObjectVersion = s3ObjectVersionDecoded - let revocationTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.RevocationType.self, forKey: .revocationType) - revocationType = revocationTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.RevocationContent() + value.s3Bucket = try reader["S3Bucket"].readIfPresent() + value.s3Key = try reader["S3Key"].readIfPresent() + value.s3ObjectVersion = try reader["S3ObjectVersion"].readIfPresent() + value.revocationType = try reader["RevocationType"].readIfPresent() + return value + } } } @@ -10525,16 +7677,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension RevocationContentNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RevocationContentNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10562,33 +7712,15 @@ public struct RevocationContentNotFoundException: ClientRuntime.ModeledError, AW } } -struct RevocationContentNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension RevocationContentNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RevocationIdNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RevocationIdNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10616,22 +7748,6 @@ public struct RevocationIdNotFoundException: ClientRuntime.ModeledError, AWSClie } } -struct RevocationIdNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension RevocationIdNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ElasticLoadBalancingv2ClientTypes { public enum RevocationType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case crl @@ -10661,7 +7777,7 @@ extension ElasticLoadBalancingv2ClientTypes { } } -extension ElasticLoadBalancingv2ClientTypes.Rule: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.Rule: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actions = "Actions" case conditions = "Conditions" @@ -10707,52 +7823,17 @@ extension ElasticLoadBalancingv2ClientTypes.Rule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleArn) - ruleArn = ruleArnDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .priority) - priority = priorityDecoded - if containerValues.contains(.conditions) { - struct KeyVal0{struct member{}} - let conditionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .conditions) - if let conditionsWrappedContainer = conditionsWrappedContainer { - let conditionsContainer = try conditionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.RuleCondition].self, forKey: .member) - var conditionsBuffer:[ElasticLoadBalancingv2ClientTypes.RuleCondition]? = nil - if let conditionsContainer = conditionsContainer { - conditionsBuffer = [ElasticLoadBalancingv2ClientTypes.RuleCondition]() - for structureContainer0 in conditionsContainer { - conditionsBuffer?.append(structureContainer0) - } - } - conditions = conditionsBuffer - } else { - conditions = [] - } - } else { - conditions = nil - } - if containerValues.contains(.actions) { - struct KeyVal0{struct member{}} - let actionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actions) - if let actionsWrappedContainer = actionsWrappedContainer { - let actionsContainer = try actionsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Action].self, forKey: .member) - var actionsBuffer:[ElasticLoadBalancingv2ClientTypes.Action]? = nil - if let actionsContainer = actionsContainer { - actionsBuffer = [ElasticLoadBalancingv2ClientTypes.Action]() - for structureContainer0 in actionsContainer { - actionsBuffer?.append(structureContainer0) - } - } - actions = actionsBuffer - } else { - actions = [] - } - } else { - actions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.Rule() + value.ruleArn = try reader["RuleArn"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() + value.conditions = try reader["Conditions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.RuleCondition.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.actions = try reader["Actions"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Action.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isDefault = try reader["IsDefault"].readIfPresent() + return value } - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded } } @@ -10788,7 +7869,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.RuleCondition: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.RuleCondition: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case field = "Field" case hostHeaderConfig = "HostHeaderConfig" @@ -10837,41 +7918,20 @@ extension ElasticLoadBalancingv2ClientTypes.RuleCondition: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fieldDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .field) - field = fieldDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.RuleCondition() + value.field = try reader["Field"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.hostHeaderConfig = try reader["HostHeaderConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.HostHeaderConditionConfig.readingClosure) + value.pathPatternConfig = try reader["PathPatternConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.PathPatternConditionConfig.readingClosure) + value.httpHeaderConfig = try reader["HttpHeaderConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.HttpHeaderConditionConfig.readingClosure) + value.queryStringConfig = try reader["QueryStringConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.QueryStringConditionConfig.readingClosure) + value.httpRequestMethodConfig = try reader["HttpRequestMethodConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.HttpRequestMethodConditionConfig.readingClosure) + value.sourceIpConfig = try reader["SourceIpConfig"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.SourceIpConditionConfig.readingClosure) + return value } - let hostHeaderConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.HostHeaderConditionConfig.self, forKey: .hostHeaderConfig) - hostHeaderConfig = hostHeaderConfigDecoded - let pathPatternConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.PathPatternConditionConfig.self, forKey: .pathPatternConfig) - pathPatternConfig = pathPatternConfigDecoded - let httpHeaderConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.HttpHeaderConditionConfig.self, forKey: .httpHeaderConfig) - httpHeaderConfig = httpHeaderConfigDecoded - let queryStringConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.QueryStringConditionConfig.self, forKey: .queryStringConfig) - queryStringConfig = queryStringConfigDecoded - let httpRequestMethodConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.HttpRequestMethodConditionConfig.self, forKey: .httpRequestMethodConfig) - httpRequestMethodConfig = httpRequestMethodConfigDecoded - let sourceIpConfigDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.SourceIpConditionConfig.self, forKey: .sourceIpConfig) - sourceIpConfig = sourceIpConfigDecoded } } @@ -10953,16 +8013,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension RuleNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RuleNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10990,23 +8048,7 @@ public struct RuleNotFoundException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct RuleNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension RuleNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.RulePriorityPair: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.RulePriorityPair: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case priority = "Priority" case ruleArn = "RuleArn" @@ -11022,12 +8064,14 @@ extension ElasticLoadBalancingv2ClientTypes.RulePriorityPair: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleArn) - ruleArn = ruleArnDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) - priority = priorityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.RulePriorityPair() + value.ruleArn = try reader["RuleArn"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() + return value + } } } @@ -11052,16 +8096,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension SSLPolicyNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SSLPolicyNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11089,23 +8131,12 @@ public struct SSLPolicyNotFoundException: ClientRuntime.ModeledError, AWSClientR } } -struct SSLPolicyNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension SSLPolicyNotFoundExceptionBody: Swift.Decodable { +extension SetIpAddressTypeInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case ipAddressType = "IpAddressType" + case loadBalancerArn = "LoadBalancerArn" } -} -extension SetIpAddressTypeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ipAddressType = ipAddressType { @@ -11144,34 +8175,15 @@ public struct SetIpAddressTypeInput: Swift.Equatable { } } -struct SetIpAddressTypeInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? - let ipAddressType: ElasticLoadBalancingv2ClientTypes.IpAddressType? -} - -extension SetIpAddressTypeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipAddressType = "IpAddressType" - case loadBalancerArn = "LoadBalancerArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - } -} +extension SetIpAddressTypeOutput { -extension SetIpAddressTypeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SetIpAddressTypeOutputBody = try responseDecoder.decode(responseBody: data) - self.ipAddressType = output.ipAddressType - } else { - self.ipAddressType = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SetIpAddressTypeResult"] + var value = SetIpAddressTypeOutput() + value.ipAddressType = try reader["IpAddressType"].readIfPresent() + return value } } } @@ -11188,36 +8200,30 @@ public struct SetIpAddressTypeOutput: Swift.Equatable { } } -struct SetIpAddressTypeOutputBody: Swift.Equatable { - let ipAddressType: ElasticLoadBalancingv2ClientTypes.IpAddressType? -} - -extension SetIpAddressTypeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipAddressType = "IpAddressType" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SetIpAddressTypeResult")) - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - } -} +enum SetIpAddressTypeOutputError { -enum SetIpAddressTypeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetRulePrioritiesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case rulePriorities = "RulePriorities" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let rulePriorities = rulePriorities { @@ -11257,47 +8263,15 @@ public struct SetRulePrioritiesInput: Swift.Equatable { } } -struct SetRulePrioritiesInputBody: Swift.Equatable { - let rulePriorities: [ElasticLoadBalancingv2ClientTypes.RulePriorityPair]? -} - -extension SetRulePrioritiesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rulePriorities = "RulePriorities" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.rulePriorities) { - struct KeyVal0{struct member{}} - let rulePrioritiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rulePriorities) - if let rulePrioritiesWrappedContainer = rulePrioritiesWrappedContainer { - let rulePrioritiesContainer = try rulePrioritiesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.RulePriorityPair].self, forKey: .member) - var rulePrioritiesBuffer:[ElasticLoadBalancingv2ClientTypes.RulePriorityPair]? = nil - if let rulePrioritiesContainer = rulePrioritiesContainer { - rulePrioritiesBuffer = [ElasticLoadBalancingv2ClientTypes.RulePriorityPair]() - for structureContainer0 in rulePrioritiesContainer { - rulePrioritiesBuffer?.append(structureContainer0) - } - } - rulePriorities = rulePrioritiesBuffer - } else { - rulePriorities = [] - } - } else { - rulePriorities = nil - } - } -} +extension SetRulePrioritiesOutput { -extension SetRulePrioritiesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SetRulePrioritiesOutputBody = try responseDecoder.decode(responseBody: data) - self.rules = output.rules - } else { - self.rules = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SetRulePrioritiesResult"] + var value = SetRulePrioritiesOutput() + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Rule.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11314,53 +8288,32 @@ public struct SetRulePrioritiesOutput: Swift.Equatable { } } -struct SetRulePrioritiesOutputBody: Swift.Equatable { - let rules: [ElasticLoadBalancingv2ClientTypes.Rule]? -} +enum SetRulePrioritiesOutputError { -extension SetRulePrioritiesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rules" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SetRulePrioritiesResult")) - if containerValues.contains(.rules) { - struct KeyVal0{struct member{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Rule].self, forKey: .member) - var rulesBuffer:[ElasticLoadBalancingv2ClientTypes.Rule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [ElasticLoadBalancingv2ClientTypes.Rule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OperationNotPermitted": return try await OperationNotPermittedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PriorityInUse": return try await PriorityInUseException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleNotFound": return try await RuleNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - rules = nil } } } -enum SetRulePrioritiesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OperationNotPermitted": return try await OperationNotPermittedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorityInUse": return try await PriorityInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleNotFound": return try await RuleNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension SetSecurityGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = "EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic" + case loadBalancerArn = "LoadBalancerArn" + case securityGroups = "SecurityGroups" } -} -extension SetSecurityGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTraffic { @@ -11407,65 +8360,24 @@ public struct SetSecurityGroupsInput: Swift.Equatable { enforceSecurityGroupInboundRulesOnPrivateLinkTraffic: ElasticLoadBalancingv2ClientTypes.EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum? = nil, loadBalancerArn: Swift.String? = nil, securityGroups: [Swift.String]? = nil - ) - { - self.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTraffic - self.loadBalancerArn = loadBalancerArn - self.securityGroups = securityGroups - } -} - -struct SetSecurityGroupsInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? - let securityGroups: [Swift.String]? - let enforceSecurityGroupInboundRulesOnPrivateLinkTraffic: ElasticLoadBalancingv2ClientTypes.EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum? -} - -extension SetSecurityGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = "EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic" - case loadBalancerArn = "LoadBalancerArn" - case securityGroups = "SecurityGroups" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - let enforceSecurityGroupInboundRulesOnPrivateLinkTrafficDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum.self, forKey: .enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) - enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTrafficDecoded + ) + { + self.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTraffic + self.loadBalancerArn = loadBalancerArn + self.securityGroups = securityGroups } } -extension SetSecurityGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SetSecurityGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = output.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic - self.securityGroupIds = output.securityGroupIds - } else { - self.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = nil - self.securityGroupIds = nil +extension SetSecurityGroupsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SetSecurityGroupsResult"] + var value = SetSecurityGroupsOutput() + value.enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = try reader["EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic"].readIfPresent() + value.securityGroupIds = try reader["SecurityGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11486,57 +8398,33 @@ public struct SetSecurityGroupsOutput: Swift.Equatable { } } -struct SetSecurityGroupsOutputBody: Swift.Equatable { - let securityGroupIds: [Swift.String]? - let enforceSecurityGroupInboundRulesOnPrivateLinkTraffic: ElasticLoadBalancingv2ClientTypes.EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum? -} +enum SetSecurityGroupsOutputError { -extension SetSecurityGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = "EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic" - case securityGroupIds = "SecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SetSecurityGroupsResult")) - if containerValues.contains(.securityGroupIds) { - struct KeyVal0{struct member{}} - let securityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroupIds) - if let securityGroupIdsWrappedContainer = securityGroupIdsWrappedContainer { - let securityGroupIdsContainer = try securityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupIdsBuffer:[Swift.String]? = nil - if let securityGroupIdsContainer = securityGroupIdsContainer { - securityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in securityGroupIdsContainer { - securityGroupIdsBuffer?.append(stringContainer0) - } - } - securityGroupIds = securityGroupIdsBuffer - } else { - securityGroupIds = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurityGroup": return try await InvalidSecurityGroupException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - securityGroupIds = nil } - let enforceSecurityGroupInboundRulesOnPrivateLinkTrafficDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum.self, forKey: .enforceSecurityGroupInboundRulesOnPrivateLinkTraffic) - enforceSecurityGroupInboundRulesOnPrivateLinkTraffic = enforceSecurityGroupInboundRulesOnPrivateLinkTrafficDecoded } } -enum SetSecurityGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurityGroup": return try await InvalidSecurityGroupException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension SetSubnetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ipAddressType = "IpAddressType" + case loadBalancerArn = "LoadBalancerArn" + case subnetMappings = "SubnetMappings" + case subnets = "Subnets" } -} -extension SetSubnetsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ipAddressType = ipAddressType { @@ -11606,78 +8494,16 @@ public struct SetSubnetsInput: Swift.Equatable { } } -struct SetSubnetsInputBody: Swift.Equatable { - let loadBalancerArn: Swift.String? - let subnets: [Swift.String]? - let subnetMappings: [ElasticLoadBalancingv2ClientTypes.SubnetMapping]? - let ipAddressType: ElasticLoadBalancingv2ClientTypes.IpAddressType? -} - -extension SetSubnetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipAddressType = "IpAddressType" - case loadBalancerArn = "LoadBalancerArn" - case subnetMappings = "SubnetMappings" - case subnets = "Subnets" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loadBalancerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadBalancerArn) - loadBalancerArn = loadBalancerArnDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct member{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetsBuffer:[Swift.String]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [Swift.String]() - for stringContainer0 in subnetsContainer { - subnetsBuffer?.append(stringContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - if containerValues.contains(.subnetMappings) { - struct KeyVal0{struct member{}} - let subnetMappingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetMappings) - if let subnetMappingsWrappedContainer = subnetMappingsWrappedContainer { - let subnetMappingsContainer = try subnetMappingsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.SubnetMapping].self, forKey: .member) - var subnetMappingsBuffer:[ElasticLoadBalancingv2ClientTypes.SubnetMapping]? = nil - if let subnetMappingsContainer = subnetMappingsContainer { - subnetMappingsBuffer = [ElasticLoadBalancingv2ClientTypes.SubnetMapping]() - for structureContainer0 in subnetMappingsContainer { - subnetMappingsBuffer?.append(structureContainer0) - } - } - subnetMappings = subnetMappingsBuffer - } else { - subnetMappings = [] - } - } else { - subnetMappings = nil - } - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - } -} +extension SetSubnetsOutput { -extension SetSubnetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SetSubnetsOutputBody = try responseDecoder.decode(responseBody: data) - self.availabilityZones = output.availabilityZones - self.ipAddressType = output.ipAddressType - } else { - self.availabilityZones = nil - self.ipAddressType = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SetSubnetsResult"] + var value = SetSubnetsOutput() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.AvailabilityZone.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.ipAddressType = try reader["IpAddressType"].readIfPresent() + return value } } } @@ -11698,60 +8524,29 @@ public struct SetSubnetsOutput: Swift.Equatable { } } -struct SetSubnetsOutputBody: Swift.Equatable { - let availabilityZones: [ElasticLoadBalancingv2ClientTypes.AvailabilityZone]? - let ipAddressType: ElasticLoadBalancingv2ClientTypes.IpAddressType? -} - -extension SetSubnetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - case ipAddressType = "IpAddressType" - } +enum SetSubnetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SetSubnetsResult")) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct member{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.AvailabilityZone].self, forKey: .member) - var availabilityZonesBuffer:[ElasticLoadBalancingv2ClientTypes.AvailabilityZone]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [ElasticLoadBalancingv2ClientTypes.AvailabilityZone]() - for structureContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(structureContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AllocationIdNotFound": return try await AllocationIdNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "AvailabilityZoneNotSupported": return try await AvailabilityZoneNotSupportedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetNotFound": return try await SubnetNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - availabilityZones = nil - } - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.IpAddressType.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - } -} - -enum SetSubnetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AllocationIdNotFound": return try await AllocationIdNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AvailabilityZoneNotSupported": return try await AvailabilityZoneNotSupportedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationRequest": return try await InvalidConfigurationRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LoadBalancerNotFound": return try await LoadBalancerNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetNotFound": return try await SubnetNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension ElasticLoadBalancingv2ClientTypes.SourceIpConditionConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.SourceIpConditionConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case values = "Values" } @@ -11772,26 +8567,12 @@ extension ElasticLoadBalancingv2ClientTypes.SourceIpConditionConfig: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.values) { - struct KeyVal0{struct member{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.SourceIpConditionConfig() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11812,7 +8593,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.SslPolicy: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.SslPolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ciphers = "Ciphers" case name = "Name" @@ -11863,66 +8644,15 @@ extension ElasticLoadBalancingv2ClientTypes.SslPolicy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.sslProtocols) { - struct KeyVal0{struct member{}} - let sslProtocolsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sslProtocols) - if let sslProtocolsWrappedContainer = sslProtocolsWrappedContainer { - let sslProtocolsContainer = try sslProtocolsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sslProtocolsBuffer:[Swift.String]? = nil - if let sslProtocolsContainer = sslProtocolsContainer { - sslProtocolsBuffer = [Swift.String]() - for stringContainer0 in sslProtocolsContainer { - sslProtocolsBuffer?.append(stringContainer0) - } - } - sslProtocols = sslProtocolsBuffer - } else { - sslProtocols = [] - } - } else { - sslProtocols = nil - } - if containerValues.contains(.ciphers) { - struct KeyVal0{struct member{}} - let ciphersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ciphers) - if let ciphersWrappedContainer = ciphersWrappedContainer { - let ciphersContainer = try ciphersWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Cipher].self, forKey: .member) - var ciphersBuffer:[ElasticLoadBalancingv2ClientTypes.Cipher]? = nil - if let ciphersContainer = ciphersContainer { - ciphersBuffer = [ElasticLoadBalancingv2ClientTypes.Cipher]() - for structureContainer0 in ciphersContainer { - ciphersBuffer?.append(structureContainer0) - } - } - ciphers = ciphersBuffer - } else { - ciphers = [] - } - } else { - ciphers = nil - } - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.supportedLoadBalancerTypes) { - struct KeyVal0{struct member{}} - let supportedLoadBalancerTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedLoadBalancerTypes) - if let supportedLoadBalancerTypesWrappedContainer = supportedLoadBalancerTypesWrappedContainer { - let supportedLoadBalancerTypesContainer = try supportedLoadBalancerTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedLoadBalancerTypesBuffer:[Swift.String]? = nil - if let supportedLoadBalancerTypesContainer = supportedLoadBalancerTypesContainer { - supportedLoadBalancerTypesBuffer = [Swift.String]() - for stringContainer0 in supportedLoadBalancerTypesContainer { - supportedLoadBalancerTypesBuffer?.append(stringContainer0) - } - } - supportedLoadBalancerTypes = supportedLoadBalancerTypesBuffer - } else { - supportedLoadBalancerTypes = [] - } - } else { - supportedLoadBalancerTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.SslPolicy() + value.sslProtocols = try reader["SslProtocols"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.ciphers = try reader["Ciphers"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Cipher.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.name = try reader["Name"].readIfPresent() + value.supportedLoadBalancerTypes = try reader["SupportedLoadBalancerTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -11955,7 +8685,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.SubnetMapping: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.SubnetMapping: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocationId = "AllocationId" case ipv6Address = "IPv6Address" @@ -11979,16 +8709,16 @@ extension ElasticLoadBalancingv2ClientTypes.SubnetMapping: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let allocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allocationId) - allocationId = allocationIdDecoded - let privateIPv4AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIPv4Address) - privateIPv4Address = privateIPv4AddressDecoded - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.SubnetMapping() + value.subnetId = try reader["SubnetId"].readIfPresent() + value.allocationId = try reader["AllocationId"].readIfPresent() + value.privateIPv4Address = try reader["PrivateIPv4Address"].readIfPresent() + value.ipv6Address = try reader["IPv6Address"].readIfPresent() + return value + } } } @@ -12021,16 +8751,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension SubnetNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubnetNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12058,23 +8786,7 @@ public struct SubnetNotFoundException: ClientRuntime.ModeledError, AWSClientRunt } } -struct SubnetNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubnetNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.Tag: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -12090,12 +8802,14 @@ extension ElasticLoadBalancingv2ClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -12120,7 +8834,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.TagDescription: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TagDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case resourceArn = "ResourceArn" case tags = "Tags" @@ -12145,28 +8859,13 @@ extension ElasticLoadBalancingv2ClientTypes.TagDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([ElasticLoadBalancingv2ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[ElasticLoadBalancingv2ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [ElasticLoadBalancingv2ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TagDescription() + value.resourceArn = try reader["ResourceArn"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: ElasticLoadBalancingv2ClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12191,7 +8890,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.TargetDescription: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TargetDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZone = "AvailabilityZone" case id = "Id" @@ -12211,14 +8910,15 @@ extension ElasticLoadBalancingv2ClientTypes.TargetDescription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TargetDescription() + value.id = try reader["Id"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + return value + } } } @@ -12247,7 +8947,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.TargetGroup: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TargetGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case healthCheckEnabled = "HealthCheckEnabled" case healthCheckIntervalSeconds = "HealthCheckIntervalSeconds" @@ -12336,61 +9036,30 @@ extension ElasticLoadBalancingv2ClientTypes.TargetGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - let targetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupName) - targetGroupName = targetGroupNameDecoded - let protocolDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ProtocolEnum.self, forKey: .protocol) - `protocol` = protocolDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let healthCheckProtocolDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.ProtocolEnum.self, forKey: .healthCheckProtocol) - healthCheckProtocol = healthCheckProtocolDecoded - let healthCheckPortDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckPort) - healthCheckPort = healthCheckPortDecoded - let healthCheckEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .healthCheckEnabled) - healthCheckEnabled = healthCheckEnabledDecoded - let healthCheckIntervalSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckIntervalSeconds) - healthCheckIntervalSeconds = healthCheckIntervalSecondsDecoded - let healthCheckTimeoutSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckTimeoutSeconds) - healthCheckTimeoutSeconds = healthCheckTimeoutSecondsDecoded - let healthyThresholdCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthyThresholdCount) - healthyThresholdCount = healthyThresholdCountDecoded - let unhealthyThresholdCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .unhealthyThresholdCount) - unhealthyThresholdCount = unhealthyThresholdCountDecoded - let healthCheckPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckPath) - healthCheckPath = healthCheckPathDecoded - let matcherDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.Matcher.self, forKey: .matcher) - matcher = matcherDecoded - if containerValues.contains(.loadBalancerArns) { - struct KeyVal0{struct member{}} - let loadBalancerArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .loadBalancerArns) - if let loadBalancerArnsWrappedContainer = loadBalancerArnsWrappedContainer { - let loadBalancerArnsContainer = try loadBalancerArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var loadBalancerArnsBuffer:[Swift.String]? = nil - if let loadBalancerArnsContainer = loadBalancerArnsContainer { - loadBalancerArnsBuffer = [Swift.String]() - for stringContainer0 in loadBalancerArnsContainer { - loadBalancerArnsBuffer?.append(stringContainer0) - } - } - loadBalancerArns = loadBalancerArnsBuffer - } else { - loadBalancerArns = [] - } - } else { - loadBalancerArns = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TargetGroup() + value.targetGroupArn = try reader["TargetGroupArn"].readIfPresent() + value.targetGroupName = try reader["TargetGroupName"].readIfPresent() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.healthCheckProtocol = try reader["HealthCheckProtocol"].readIfPresent() + value.healthCheckPort = try reader["HealthCheckPort"].readIfPresent() + value.healthCheckEnabled = try reader["HealthCheckEnabled"].readIfPresent() + value.healthCheckIntervalSeconds = try reader["HealthCheckIntervalSeconds"].readIfPresent() + value.healthCheckTimeoutSeconds = try reader["HealthCheckTimeoutSeconds"].readIfPresent() + value.healthyThresholdCount = try reader["HealthyThresholdCount"].readIfPresent() + value.unhealthyThresholdCount = try reader["UnhealthyThresholdCount"].readIfPresent() + value.healthCheckPath = try reader["HealthCheckPath"].readIfPresent() + value.matcher = try reader["Matcher"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.Matcher.readingClosure) + value.loadBalancerArns = try reader["LoadBalancerArns"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.targetType = try reader["TargetType"].readIfPresent() + value.protocolVersion = try reader["ProtocolVersion"].readIfPresent() + value.ipAddressType = try reader["IpAddressType"].readIfPresent() + return value } - let targetTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetTypeEnum.self, forKey: .targetType) - targetType = targetTypeDecoded - let protocolVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocolVersion) - protocolVersion = protocolVersionDecoded - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetGroupIpAddressTypeEnum.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded } } @@ -12479,16 +9148,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension TargetGroupAssociationLimitException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TargetGroupAssociationLimitException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12516,23 +9183,7 @@ public struct TargetGroupAssociationLimitException: ClientRuntime.ModeledError, } } -struct TargetGroupAssociationLimitExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TargetGroupAssociationLimitExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -12548,12 +9199,14 @@ extension ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TargetGroupAttribute() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -12676,16 +9329,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension TargetGroupNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TargetGroupNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12713,23 +9364,7 @@ public struct TargetGroupNotFoundException: ClientRuntime.ModeledError, AWSClien } } -struct TargetGroupNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TargetGroupNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.TargetGroupStickinessConfig: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TargetGroupStickinessConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case durationSeconds = "DurationSeconds" case enabled = "Enabled" @@ -12745,12 +9380,14 @@ extension ElasticLoadBalancingv2ClientTypes.TargetGroupStickinessConfig: Swift.C } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let durationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .durationSeconds) - durationSeconds = durationSecondsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TargetGroupStickinessConfig() + value.enabled = try reader["Enabled"].readIfPresent() + value.durationSeconds = try reader["DurationSeconds"].readIfPresent() + return value + } } } @@ -12774,7 +9411,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.TargetGroupTuple: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TargetGroupTuple: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case targetGroupArn = "TargetGroupArn" case weight = "Weight" @@ -12790,12 +9427,14 @@ extension ElasticLoadBalancingv2ClientTypes.TargetGroupTuple: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - let weightDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .weight) - weight = weightDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TargetGroupTuple() + value.targetGroupArn = try reader["TargetGroupArn"].readIfPresent() + value.weight = try reader["Weight"].readIfPresent() + return value + } } } @@ -12819,7 +9458,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.TargetHealth: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TargetHealth: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case reason = "Reason" @@ -12839,14 +9478,15 @@ extension ElasticLoadBalancingv2ClientTypes.TargetHealth: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetHealthStateEnum.self, forKey: .state) - state = stateDecoded - let reasonDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetHealthReasonEnum.self, forKey: .reason) - reason = reasonDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TargetHealth() + value.state = try reader["State"].readIfPresent() + value.reason = try reader["Reason"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -12912,7 +9552,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.TargetHealthDescription: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TargetHealthDescription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case anomalyDetection = "AnomalyDetection" case healthCheckPort = "HealthCheckPort" @@ -12936,16 +9576,16 @@ extension ElasticLoadBalancingv2ClientTypes.TargetHealthDescription: Swift.Codab } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetDescription.self, forKey: .target) - target = targetDecoded - let healthCheckPortDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckPort) - healthCheckPort = healthCheckPortDecoded - let targetHealthDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TargetHealth.self, forKey: .targetHealth) - targetHealth = targetHealthDecoded - let anomalyDetectionDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.AnomalyDetection.self, forKey: .anomalyDetection) - anomalyDetection = anomalyDetectionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TargetHealthDescription() + value.target = try reader["Target"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.TargetDescription.readingClosure) + value.healthCheckPort = try reader["HealthCheckPort"].readIfPresent() + value.targetHealth = try reader["TargetHealth"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.TargetHealth.readingClosure) + value.anomalyDetection = try reader["AnomalyDetection"].readIfPresent(readingClosure: ElasticLoadBalancingv2ClientTypes.AnomalyDetection.readingClosure) + return value + } } } @@ -13122,16 +9762,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension TooManyActionsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyActionsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13159,33 +9797,15 @@ public struct TooManyActionsException: ClientRuntime.ModeledError, AWSClientRunt } } -struct TooManyActionsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyActionsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyCertificatesException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyCertificatesException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13213,33 +9833,15 @@ public struct TooManyCertificatesException: ClientRuntime.ModeledError, AWSClien } } -struct TooManyCertificatesExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyCertificatesExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyListenersException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyListenersException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13267,33 +9869,15 @@ public struct TooManyListenersException: ClientRuntime.ModeledError, AWSClientRu } } -struct TooManyListenersExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyListenersExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyLoadBalancersException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyLoadBalancersException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13321,33 +9905,15 @@ public struct TooManyLoadBalancersException: ClientRuntime.ModeledError, AWSClie } } -struct TooManyLoadBalancersExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyLoadBalancersExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyRegistrationsForTargetIdException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyRegistrationsForTargetIdException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13375,33 +9941,15 @@ public struct TooManyRegistrationsForTargetIdException: ClientRuntime.ModeledErr } } -struct TooManyRegistrationsForTargetIdExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyRegistrationsForTargetIdExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyRulesException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyRulesException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13429,33 +9977,15 @@ public struct TooManyRulesException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct TooManyRulesExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyRulesExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyTagsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTagsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13483,33 +10013,15 @@ public struct TooManyTagsException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct TooManyTagsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTagsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyTargetGroupsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTargetGroupsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13537,33 +10049,15 @@ public struct TooManyTargetGroupsException: ClientRuntime.ModeledError, AWSClien } } -struct TooManyTargetGroupsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTargetGroupsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyTargetsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTargetsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13591,33 +10085,15 @@ public struct TooManyTargetsException: ClientRuntime.ModeledError, AWSClientRunt } } -struct TooManyTargetsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTargetsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyTrustStoreRevocationEntriesException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTrustStoreRevocationEntriesException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13645,33 +10121,15 @@ public struct TooManyTrustStoreRevocationEntriesException: ClientRuntime.Modeled } } -struct TooManyTrustStoreRevocationEntriesExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTrustStoreRevocationEntriesExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyTrustStoresException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTrustStoresException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13699,33 +10157,15 @@ public struct TooManyTrustStoresException: ClientRuntime.ModeledError, AWSClient } } -struct TooManyTrustStoresExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTrustStoresExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyUniqueTargetGroupsPerLoadBalancerException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyUniqueTargetGroupsPerLoadBalancerException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13753,23 +10193,7 @@ public struct TooManyUniqueTargetGroupsPerLoadBalancerException: ClientRuntime.M } } -struct TooManyUniqueTargetGroupsPerLoadBalancerExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyUniqueTargetGroupsPerLoadBalancerExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.TrustStore: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TrustStore: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case numberOfCaCertificates = "NumberOfCaCertificates" @@ -13797,18 +10221,17 @@ extension ElasticLoadBalancingv2ClientTypes.TrustStore: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.TrustStoreStatus.self, forKey: .status) - status = statusDecoded - let numberOfCaCertificatesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfCaCertificates) - numberOfCaCertificates = numberOfCaCertificatesDecoded - let totalRevokedEntriesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalRevokedEntries) - totalRevokedEntries = totalRevokedEntriesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TrustStore() + value.name = try reader["Name"].readIfPresent() + value.trustStoreArn = try reader["TrustStoreArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.numberOfCaCertificates = try reader["NumberOfCaCertificates"].readIfPresent() + value.totalRevokedEntries = try reader["TotalRevokedEntries"].readIfPresent() + return value + } } } @@ -13844,7 +10267,7 @@ extension ElasticLoadBalancingv2ClientTypes { } -extension ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case resourceArn = "ResourceArn" } @@ -13856,10 +10279,13 @@ extension ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TrustStoreAssociation() + value.resourceArn = try reader["ResourceArn"].readIfPresent() + return value + } } } @@ -13880,16 +10306,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension TrustStoreInUseException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrustStoreInUseException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13917,33 +10341,15 @@ public struct TrustStoreInUseException: ClientRuntime.ModeledError, AWSClientRun } } -struct TrustStoreInUseExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TrustStoreInUseExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TrustStoreNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrustStoreNotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13971,33 +10377,15 @@ public struct TrustStoreNotFoundException: ClientRuntime.ModeledError, AWSClient } } -struct TrustStoreNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TrustStoreNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TrustStoreNotReadyException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrustStoreNotReadyException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14025,23 +10413,7 @@ public struct TrustStoreNotReadyException: ClientRuntime.ModeledError, AWSClient } } -struct TrustStoreNotReadyExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TrustStoreNotReadyExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation: Swift.Codable { +extension ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case numberOfRevokedEntries = "NumberOfRevokedEntries" case revocationId = "RevocationId" @@ -14065,16 +10437,16 @@ extension ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustStoreArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustStoreArn) - trustStoreArn = trustStoreArnDecoded - let revocationIdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .revocationId) - revocationId = revocationIdDecoded - let revocationTypeDecoded = try containerValues.decodeIfPresent(ElasticLoadBalancingv2ClientTypes.RevocationType.self, forKey: .revocationType) - revocationType = revocationTypeDecoded - let numberOfRevokedEntriesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfRevokedEntries) - numberOfRevokedEntries = numberOfRevokedEntriesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ElasticLoadBalancingv2ClientTypes.TrustStoreRevocation() + value.trustStoreArn = try reader["TrustStoreArn"].readIfPresent() + value.revocationId = try reader["RevocationId"].readIfPresent() + value.revocationType = try reader["RevocationType"].readIfPresent() + value.numberOfRevokedEntries = try reader["NumberOfRevokedEntries"].readIfPresent() + return value + } } } @@ -14139,16 +10511,14 @@ extension ElasticLoadBalancingv2ClientTypes { } extension UnsupportedProtocolException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnsupportedProtocolException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14175,19 +10545,3 @@ public struct UnsupportedProtocolException: ClientRuntime.ModeledError, AWSClien self.properties.message = message } } - -struct UnsupportedProtocolExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnsupportedProtocolExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} diff --git a/Sources/Services/AWSIAM/IAMClient.swift b/Sources/Services/AWSIAM/IAMClient.swift index cf065349a0f..f1a91471d29 100644 --- a/Sources/Services/AWSIAM/IAMClient.swift +++ b/Sources/Services/AWSIAM/IAMClient.swift @@ -11,14 +11,11 @@ public class IAMClient { let config: IAMClient.IAMClientConfiguration let serviceName = "IAM" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: IAMClient.IAMClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -81,7 +78,6 @@ extension IAMClient { public func addClientIDToOpenIDConnectProvider(input: AddClientIDToOpenIDConnectProviderInput) async throws -> AddClientIDToOpenIDConnectProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addClientIDToOpenIDConnectProvider") @@ -105,7 +101,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddClientIDToOpenIDConnectProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddClientIDToOpenIDConnectProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddClientIDToOpenIDConnectProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -130,7 +126,6 @@ extension IAMClient { public func addRoleToInstanceProfile(input: AddRoleToInstanceProfileInput) async throws -> AddRoleToInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addRoleToInstanceProfile") @@ -154,7 +149,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddRoleToInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddRoleToInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddRoleToInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -177,7 +172,6 @@ extension IAMClient { public func addUserToGroup(input: AddUserToGroupInput) async throws -> AddUserToGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addUserToGroup") @@ -201,7 +195,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddUserToGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddUserToGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddUserToGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -226,7 +220,6 @@ extension IAMClient { public func attachGroupPolicy(input: AttachGroupPolicyInput) async throws -> AttachGroupPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachGroupPolicy") @@ -250,7 +243,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachGroupPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachGroupPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachGroupPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -276,7 +269,6 @@ extension IAMClient { public func attachRolePolicy(input: AttachRolePolicyInput) async throws -> AttachRolePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachRolePolicy") @@ -300,7 +292,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachRolePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachRolePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachRolePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -325,7 +317,6 @@ extension IAMClient { public func attachUserPolicy(input: AttachUserPolicyInput) async throws -> AttachUserPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "attachUserPolicy") @@ -349,7 +340,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AttachUserPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AttachUserPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AttachUserPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -375,7 +366,6 @@ extension IAMClient { public func changePassword(input: ChangePasswordInput) async throws -> ChangePasswordOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "changePassword") @@ -399,7 +389,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ChangePasswordOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ChangePasswordOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ChangePasswordOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -422,7 +412,6 @@ extension IAMClient { public func createAccessKey(input: CreateAccessKeyInput) async throws -> CreateAccessKeyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createAccessKey") @@ -446,7 +435,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAccessKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAccessKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAccessKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -470,7 +459,6 @@ extension IAMClient { public func createAccountAlias(input: CreateAccountAliasInput) async throws -> CreateAccountAliasOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createAccountAlias") @@ -494,7 +482,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAccountAliasOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAccountAliasOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAccountAliasOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -518,7 +506,6 @@ extension IAMClient { public func createGroup(input: CreateGroupInput) async throws -> CreateGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createGroup") @@ -542,7 +529,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -567,7 +554,6 @@ extension IAMClient { public func createInstanceProfile(input: CreateInstanceProfileInput) async throws -> CreateInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createInstanceProfile") @@ -591,7 +577,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -616,7 +602,6 @@ extension IAMClient { public func createLoginProfile(input: CreateLoginProfileInput) async throws -> CreateLoginProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createLoginProfile") @@ -640,7 +625,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateLoginProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateLoginProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateLoginProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -676,7 +661,6 @@ extension IAMClient { public func createOpenIDConnectProvider(input: CreateOpenIDConnectProviderInput) async throws -> CreateOpenIDConnectProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createOpenIDConnectProvider") @@ -700,7 +684,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateOpenIDConnectProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateOpenIDConnectProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateOpenIDConnectProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -726,7 +710,6 @@ extension IAMClient { public func createPolicy(input: CreatePolicyInput) async throws -> CreatePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createPolicy") @@ -750,7 +733,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreatePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreatePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -775,7 +758,6 @@ extension IAMClient { public func createPolicyVersion(input: CreatePolicyVersionInput) async throws -> CreatePolicyVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createPolicyVersion") @@ -799,7 +781,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePolicyVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreatePolicyVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreatePolicyVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -825,7 +807,6 @@ extension IAMClient { public func createRole(input: CreateRoleInput) async throws -> CreateRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createRole") @@ -849,7 +830,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -874,7 +855,6 @@ extension IAMClient { public func createSAMLProvider(input: CreateSAMLProviderInput) async throws -> CreateSAMLProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSAMLProvider") @@ -898,7 +878,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSAMLProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSAMLProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSAMLProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -922,7 +902,6 @@ extension IAMClient { public func createServiceLinkedRole(input: CreateServiceLinkedRoleInput) async throws -> CreateServiceLinkedRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createServiceLinkedRole") @@ -946,7 +925,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateServiceLinkedRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateServiceLinkedRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateServiceLinkedRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -969,7 +948,6 @@ extension IAMClient { public func createServiceSpecificCredential(input: CreateServiceSpecificCredentialInput) async throws -> CreateServiceSpecificCredentialOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createServiceSpecificCredential") @@ -993,7 +971,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateServiceSpecificCredentialOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateServiceSpecificCredentialOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateServiceSpecificCredentialOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1019,7 +997,6 @@ extension IAMClient { public func createUser(input: CreateUserInput) async throws -> CreateUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createUser") @@ -1043,7 +1020,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1068,7 +1045,6 @@ extension IAMClient { public func createVirtualMFADevice(input: CreateVirtualMFADeviceInput) async throws -> CreateVirtualMFADeviceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVirtualMFADevice") @@ -1092,7 +1068,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVirtualMFADeviceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVirtualMFADeviceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVirtualMFADeviceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1117,7 +1093,6 @@ extension IAMClient { public func deactivateMFADevice(input: DeactivateMFADeviceInput) async throws -> DeactivateMFADeviceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deactivateMFADevice") @@ -1141,7 +1116,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeactivateMFADeviceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeactivateMFADeviceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeactivateMFADeviceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1164,7 +1139,6 @@ extension IAMClient { public func deleteAccessKey(input: DeleteAccessKeyInput) async throws -> DeleteAccessKeyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessKey") @@ -1188,7 +1162,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1212,7 +1186,6 @@ extension IAMClient { public func deleteAccountAlias(input: DeleteAccountAliasInput) async throws -> DeleteAccountAliasOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteAccountAlias") @@ -1236,7 +1209,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccountAliasOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccountAliasOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccountAliasOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1259,7 +1232,6 @@ extension IAMClient { public func deleteAccountPasswordPolicy(input: DeleteAccountPasswordPolicyInput) async throws -> DeleteAccountPasswordPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteAccountPasswordPolicy") @@ -1283,7 +1255,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccountPasswordPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccountPasswordPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccountPasswordPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1307,7 +1279,6 @@ extension IAMClient { public func deleteGroup(input: DeleteGroupInput) async throws -> DeleteGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteGroup") @@ -1331,7 +1302,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1354,7 +1325,6 @@ extension IAMClient { public func deleteGroupPolicy(input: DeleteGroupPolicyInput) async throws -> DeleteGroupPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteGroupPolicy") @@ -1378,7 +1348,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteGroupPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteGroupPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteGroupPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1402,7 +1372,6 @@ extension IAMClient { public func deleteInstanceProfile(input: DeleteInstanceProfileInput) async throws -> DeleteInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteInstanceProfile") @@ -1426,7 +1395,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1450,7 +1419,6 @@ extension IAMClient { public func deleteLoginProfile(input: DeleteLoginProfileInput) async throws -> DeleteLoginProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteLoginProfile") @@ -1474,7 +1442,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteLoginProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteLoginProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteLoginProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1497,7 +1465,6 @@ extension IAMClient { public func deleteOpenIDConnectProvider(input: DeleteOpenIDConnectProviderInput) async throws -> DeleteOpenIDConnectProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteOpenIDConnectProvider") @@ -1521,7 +1488,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteOpenIDConnectProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteOpenIDConnectProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteOpenIDConnectProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1555,7 +1522,6 @@ extension IAMClient { public func deletePolicy(input: DeletePolicyInput) async throws -> DeletePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deletePolicy") @@ -1579,7 +1545,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1604,7 +1570,6 @@ extension IAMClient { public func deletePolicyVersion(input: DeletePolicyVersionInput) async throws -> DeletePolicyVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deletePolicyVersion") @@ -1628,7 +1593,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePolicyVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePolicyVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePolicyVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1665,7 +1630,6 @@ extension IAMClient { public func deleteRole(input: DeleteRoleInput) async throws -> DeleteRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteRole") @@ -1689,7 +1653,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1712,7 +1676,6 @@ extension IAMClient { public func deleteRolePermissionsBoundary(input: DeleteRolePermissionsBoundaryInput) async throws -> DeleteRolePermissionsBoundaryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteRolePermissionsBoundary") @@ -1736,7 +1699,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteRolePermissionsBoundaryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteRolePermissionsBoundaryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteRolePermissionsBoundaryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1760,7 +1723,6 @@ extension IAMClient { public func deleteRolePolicy(input: DeleteRolePolicyInput) async throws -> DeleteRolePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteRolePolicy") @@ -1784,7 +1746,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteRolePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteRolePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteRolePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1808,7 +1770,6 @@ extension IAMClient { public func deleteSAMLProvider(input: DeleteSAMLProviderInput) async throws -> DeleteSAMLProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSAMLProvider") @@ -1832,7 +1793,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSAMLProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSAMLProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSAMLProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1853,7 +1814,6 @@ extension IAMClient { public func deleteSSHPublicKey(input: DeleteSSHPublicKeyInput) async throws -> DeleteSSHPublicKeyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSSHPublicKey") @@ -1877,7 +1837,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSSHPublicKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSSHPublicKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSSHPublicKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1901,7 +1861,6 @@ extension IAMClient { public func deleteServerCertificate(input: DeleteServerCertificateInput) async throws -> DeleteServerCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteServerCertificate") @@ -1925,7 +1884,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteServerCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteServerCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteServerCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1948,7 +1907,6 @@ extension IAMClient { public func deleteServiceLinkedRole(input: DeleteServiceLinkedRoleInput) async throws -> DeleteServiceLinkedRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteServiceLinkedRole") @@ -1972,7 +1930,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteServiceLinkedRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteServiceLinkedRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteServiceLinkedRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1993,7 +1951,6 @@ extension IAMClient { public func deleteServiceSpecificCredential(input: DeleteServiceSpecificCredentialInput) async throws -> DeleteServiceSpecificCredentialOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteServiceSpecificCredential") @@ -2017,7 +1974,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteServiceSpecificCredentialOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteServiceSpecificCredentialOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteServiceSpecificCredentialOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2041,7 +1998,6 @@ extension IAMClient { public func deleteSigningCertificate(input: DeleteSigningCertificateInput) async throws -> DeleteSigningCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSigningCertificate") @@ -2065,7 +2021,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSigningCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSigningCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSigningCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2108,7 +2064,6 @@ extension IAMClient { public func deleteUser(input: DeleteUserInput) async throws -> DeleteUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteUser") @@ -2132,7 +2087,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2154,7 +2109,6 @@ extension IAMClient { public func deleteUserPermissionsBoundary(input: DeleteUserPermissionsBoundaryInput) async throws -> DeleteUserPermissionsBoundaryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteUserPermissionsBoundary") @@ -2178,7 +2132,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteUserPermissionsBoundaryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteUserPermissionsBoundaryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteUserPermissionsBoundaryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2201,7 +2155,6 @@ extension IAMClient { public func deleteUserPolicy(input: DeleteUserPolicyInput) async throws -> DeleteUserPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteUserPolicy") @@ -2225,7 +2178,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteUserPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteUserPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteUserPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2250,7 +2203,6 @@ extension IAMClient { public func deleteVirtualMFADevice(input: DeleteVirtualMFADeviceInput) async throws -> DeleteVirtualMFADeviceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVirtualMFADevice") @@ -2274,7 +2226,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVirtualMFADeviceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVirtualMFADeviceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVirtualMFADeviceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2298,7 +2250,6 @@ extension IAMClient { public func detachGroupPolicy(input: DetachGroupPolicyInput) async throws -> DetachGroupPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachGroupPolicy") @@ -2322,7 +2273,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachGroupPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachGroupPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachGroupPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2347,7 +2298,6 @@ extension IAMClient { public func detachRolePolicy(input: DetachRolePolicyInput) async throws -> DetachRolePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachRolePolicy") @@ -2371,7 +2321,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachRolePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachRolePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachRolePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2395,7 +2345,6 @@ extension IAMClient { public func detachUserPolicy(input: DetachUserPolicyInput) async throws -> DetachUserPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "detachUserPolicy") @@ -2419,7 +2368,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DetachUserPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DetachUserPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DetachUserPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2446,7 +2395,6 @@ extension IAMClient { public func enableMFADevice(input: EnableMFADeviceInput) async throws -> EnableMFADeviceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableMFADevice") @@ -2470,7 +2418,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableMFADeviceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableMFADeviceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableMFADeviceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2492,7 +2440,6 @@ extension IAMClient { public func generateCredentialReport(input: GenerateCredentialReportInput) async throws -> GenerateCredentialReportOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "generateCredentialReport") @@ -2516,7 +2463,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GenerateCredentialReportOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GenerateCredentialReportOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GenerateCredentialReportOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2559,7 +2506,6 @@ extension IAMClient { public func generateOrganizationsAccessReport(input: GenerateOrganizationsAccessReportInput) async throws -> GenerateOrganizationsAccessReportOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "generateOrganizationsAccessReport") @@ -2583,7 +2529,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GenerateOrganizationsAccessReportOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GenerateOrganizationsAccessReportOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GenerateOrganizationsAccessReportOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2612,7 +2558,6 @@ extension IAMClient { public func generateServiceLastAccessedDetails(input: GenerateServiceLastAccessedDetailsInput) async throws -> GenerateServiceLastAccessedDetailsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "generateServiceLastAccessedDetails") @@ -2636,7 +2581,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GenerateServiceLastAccessedDetailsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GenerateServiceLastAccessedDetailsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GenerateServiceLastAccessedDetailsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2652,7 +2597,6 @@ extension IAMClient { public func getAccessKeyLastUsed(input: GetAccessKeyLastUsedInput) async throws -> GetAccessKeyLastUsedOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAccessKeyLastUsed") @@ -2676,7 +2620,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessKeyLastUsedOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessKeyLastUsedOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessKeyLastUsedOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2697,7 +2641,6 @@ extension IAMClient { public func getAccountAuthorizationDetails(input: GetAccountAuthorizationDetailsInput) async throws -> GetAccountAuthorizationDetailsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAccountAuthorizationDetails") @@ -2721,7 +2664,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccountAuthorizationDetailsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccountAuthorizationDetailsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccountAuthorizationDetailsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2743,7 +2686,6 @@ extension IAMClient { public func getAccountPasswordPolicy(input: GetAccountPasswordPolicyInput) async throws -> GetAccountPasswordPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAccountPasswordPolicy") @@ -2767,7 +2709,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccountPasswordPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccountPasswordPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccountPasswordPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2788,7 +2730,6 @@ extension IAMClient { public func getAccountSummary(input: GetAccountSummaryInput) async throws -> GetAccountSummaryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAccountSummary") @@ -2812,7 +2753,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccountSummaryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccountSummaryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccountSummaryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2833,7 +2774,6 @@ extension IAMClient { public func getContextKeysForCustomPolicy(input: GetContextKeysForCustomPolicyInput) async throws -> GetContextKeysForCustomPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getContextKeysForCustomPolicy") @@ -2857,7 +2797,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetContextKeysForCustomPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetContextKeysForCustomPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetContextKeysForCustomPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2879,7 +2819,6 @@ extension IAMClient { public func getContextKeysForPrincipalPolicy(input: GetContextKeysForPrincipalPolicyInput) async throws -> GetContextKeysForPrincipalPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getContextKeysForPrincipalPolicy") @@ -2903,7 +2842,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetContextKeysForPrincipalPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetContextKeysForPrincipalPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetContextKeysForPrincipalPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2927,7 +2866,6 @@ extension IAMClient { public func getCredentialReport(input: GetCredentialReportInput) async throws -> GetCredentialReportOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getCredentialReport") @@ -2951,7 +2889,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCredentialReportOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCredentialReportOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCredentialReportOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2973,7 +2911,6 @@ extension IAMClient { public func getGroup(input: GetGroupInput) async throws -> GetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getGroup") @@ -2997,7 +2934,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3019,7 +2956,6 @@ extension IAMClient { public func getGroupPolicy(input: GetGroupPolicyInput) async throws -> GetGroupPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getGroupPolicy") @@ -3043,7 +2979,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetGroupPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetGroupPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetGroupPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3065,7 +3001,6 @@ extension IAMClient { public func getInstanceProfile(input: GetInstanceProfileInput) async throws -> GetInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getInstanceProfile") @@ -3089,7 +3024,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3111,7 +3046,6 @@ extension IAMClient { public func getLoginProfile(input: GetLoginProfileInput) async throws -> GetLoginProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getLoginProfile") @@ -3135,7 +3069,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetLoginProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetLoginProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetLoginProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3157,7 +3091,6 @@ extension IAMClient { public func getMFADevice(input: GetMFADeviceInput) async throws -> GetMFADeviceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getMFADevice") @@ -3181,7 +3114,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMFADeviceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMFADeviceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMFADeviceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3204,7 +3137,6 @@ extension IAMClient { public func getOpenIDConnectProvider(input: GetOpenIDConnectProviderInput) async throws -> GetOpenIDConnectProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getOpenIDConnectProvider") @@ -3228,7 +3160,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetOpenIDConnectProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetOpenIDConnectProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetOpenIDConnectProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3249,7 +3181,6 @@ extension IAMClient { public func getOrganizationsAccessReport(input: GetOrganizationsAccessReportInput) async throws -> GetOrganizationsAccessReportOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getOrganizationsAccessReport") @@ -3273,7 +3204,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetOrganizationsAccessReportOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetOrganizationsAccessReportOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetOrganizationsAccessReportOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3296,7 +3227,6 @@ extension IAMClient { public func getPolicy(input: GetPolicyInput) async throws -> GetPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getPolicy") @@ -3320,7 +3250,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3343,7 +3273,6 @@ extension IAMClient { public func getPolicyVersion(input: GetPolicyVersionInput) async throws -> GetPolicyVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getPolicyVersion") @@ -3367,7 +3296,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPolicyVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPolicyVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPolicyVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3389,7 +3318,6 @@ extension IAMClient { public func getRole(input: GetRoleInput) async throws -> GetRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getRole") @@ -3413,7 +3341,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3435,7 +3363,6 @@ extension IAMClient { public func getRolePolicy(input: GetRolePolicyInput) async throws -> GetRolePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getRolePolicy") @@ -3459,7 +3386,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetRolePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetRolePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetRolePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3482,7 +3409,6 @@ extension IAMClient { public func getSAMLProvider(input: GetSAMLProviderInput) async throws -> GetSAMLProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSAMLProvider") @@ -3506,7 +3432,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSAMLProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSAMLProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSAMLProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3528,7 +3454,6 @@ extension IAMClient { public func getSSHPublicKey(input: GetSSHPublicKeyInput) async throws -> GetSSHPublicKeyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSSHPublicKey") @@ -3552,7 +3477,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSSHPublicKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSSHPublicKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSSHPublicKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3574,7 +3499,6 @@ extension IAMClient { public func getServerCertificate(input: GetServerCertificateInput) async throws -> GetServerCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getServerCertificate") @@ -3598,7 +3522,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetServerCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetServerCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetServerCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3631,7 +3555,6 @@ extension IAMClient { public func getServiceLastAccessedDetails(input: GetServiceLastAccessedDetailsInput) async throws -> GetServiceLastAccessedDetailsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getServiceLastAccessedDetails") @@ -3655,7 +3578,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetServiceLastAccessedDetailsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetServiceLastAccessedDetailsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetServiceLastAccessedDetailsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3684,7 +3607,6 @@ extension IAMClient { public func getServiceLastAccessedDetailsWithEntities(input: GetServiceLastAccessedDetailsWithEntitiesInput) async throws -> GetServiceLastAccessedDetailsWithEntitiesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getServiceLastAccessedDetailsWithEntities") @@ -3708,7 +3630,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetServiceLastAccessedDetailsWithEntitiesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetServiceLastAccessedDetailsWithEntitiesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetServiceLastAccessedDetailsWithEntitiesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3731,7 +3653,6 @@ extension IAMClient { public func getServiceLinkedRoleDeletionStatus(input: GetServiceLinkedRoleDeletionStatusInput) async throws -> GetServiceLinkedRoleDeletionStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getServiceLinkedRoleDeletionStatus") @@ -3755,7 +3676,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetServiceLinkedRoleDeletionStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetServiceLinkedRoleDeletionStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetServiceLinkedRoleDeletionStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3777,7 +3698,6 @@ extension IAMClient { public func getUser(input: GetUserInput) async throws -> GetUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getUser") @@ -3801,7 +3721,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3823,7 +3743,6 @@ extension IAMClient { public func getUserPolicy(input: GetUserPolicyInput) async throws -> GetUserPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getUserPolicy") @@ -3847,7 +3766,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetUserPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetUserPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetUserPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3869,7 +3788,6 @@ extension IAMClient { public func listAccessKeys(input: ListAccessKeysInput) async throws -> ListAccessKeysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listAccessKeys") @@ -3893,7 +3811,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAccessKeysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAccessKeysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAccessKeysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3914,7 +3832,6 @@ extension IAMClient { public func listAccountAliases(input: ListAccountAliasesInput) async throws -> ListAccountAliasesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listAccountAliases") @@ -3938,7 +3855,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAccountAliasesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAccountAliasesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAccountAliasesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3961,7 +3878,6 @@ extension IAMClient { public func listAttachedGroupPolicies(input: ListAttachedGroupPoliciesInput) async throws -> ListAttachedGroupPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listAttachedGroupPolicies") @@ -3985,7 +3901,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAttachedGroupPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAttachedGroupPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAttachedGroupPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4008,7 +3924,6 @@ extension IAMClient { public func listAttachedRolePolicies(input: ListAttachedRolePoliciesInput) async throws -> ListAttachedRolePoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listAttachedRolePolicies") @@ -4032,7 +3947,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAttachedRolePoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAttachedRolePoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAttachedRolePoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4055,7 +3970,6 @@ extension IAMClient { public func listAttachedUserPolicies(input: ListAttachedUserPoliciesInput) async throws -> ListAttachedUserPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listAttachedUserPolicies") @@ -4079,7 +3993,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAttachedUserPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAttachedUserPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAttachedUserPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4102,7 +4016,6 @@ extension IAMClient { public func listEntitiesForPolicy(input: ListEntitiesForPolicyInput) async throws -> ListEntitiesForPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listEntitiesForPolicy") @@ -4126,7 +4039,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListEntitiesForPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListEntitiesForPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListEntitiesForPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4148,7 +4061,6 @@ extension IAMClient { public func listGroupPolicies(input: ListGroupPoliciesInput) async throws -> ListGroupPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listGroupPolicies") @@ -4172,7 +4084,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListGroupPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListGroupPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListGroupPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4193,7 +4105,6 @@ extension IAMClient { public func listGroups(input: ListGroupsInput) async throws -> ListGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listGroups") @@ -4217,7 +4128,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4239,7 +4150,6 @@ extension IAMClient { public func listGroupsForUser(input: ListGroupsForUserInput) async throws -> ListGroupsForUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listGroupsForUser") @@ -4263,7 +4173,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListGroupsForUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListGroupsForUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListGroupsForUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4285,7 +4195,6 @@ extension IAMClient { public func listInstanceProfileTags(input: ListInstanceProfileTagsInput) async throws -> ListInstanceProfileTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listInstanceProfileTags") @@ -4309,7 +4218,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListInstanceProfileTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListInstanceProfileTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListInstanceProfileTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4330,7 +4239,6 @@ extension IAMClient { public func listInstanceProfiles(input: ListInstanceProfilesInput) async throws -> ListInstanceProfilesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listInstanceProfiles") @@ -4354,7 +4262,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListInstanceProfilesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListInstanceProfilesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListInstanceProfilesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4376,7 +4284,6 @@ extension IAMClient { public func listInstanceProfilesForRole(input: ListInstanceProfilesForRoleInput) async throws -> ListInstanceProfilesForRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listInstanceProfilesForRole") @@ -4400,7 +4307,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListInstanceProfilesForRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListInstanceProfilesForRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListInstanceProfilesForRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4423,7 +4330,6 @@ extension IAMClient { public func listMFADeviceTags(input: ListMFADeviceTagsInput) async throws -> ListMFADeviceTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listMFADeviceTags") @@ -4447,7 +4353,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListMFADeviceTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListMFADeviceTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListMFADeviceTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4469,7 +4375,6 @@ extension IAMClient { public func listMFADevices(input: ListMFADevicesInput) async throws -> ListMFADevicesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listMFADevices") @@ -4493,7 +4398,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListMFADevicesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListMFADevicesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListMFADevicesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4516,7 +4421,6 @@ extension IAMClient { public func listOpenIDConnectProviderTags(input: ListOpenIDConnectProviderTagsInput) async throws -> ListOpenIDConnectProviderTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listOpenIDConnectProviderTags") @@ -4540,7 +4444,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListOpenIDConnectProviderTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListOpenIDConnectProviderTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListOpenIDConnectProviderTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4561,7 +4465,6 @@ extension IAMClient { public func listOpenIDConnectProviders(input: ListOpenIDConnectProvidersInput) async throws -> ListOpenIDConnectProvidersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listOpenIDConnectProviders") @@ -4585,7 +4488,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListOpenIDConnectProvidersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListOpenIDConnectProvidersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListOpenIDConnectProvidersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4606,7 +4509,6 @@ extension IAMClient { public func listPolicies(input: ListPoliciesInput) async throws -> ListPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listPolicies") @@ -4630,7 +4532,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4661,7 +4563,6 @@ extension IAMClient { public func listPoliciesGrantingServiceAccess(input: ListPoliciesGrantingServiceAccessInput) async throws -> ListPoliciesGrantingServiceAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listPoliciesGrantingServiceAccess") @@ -4685,7 +4586,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPoliciesGrantingServiceAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPoliciesGrantingServiceAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPoliciesGrantingServiceAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4708,7 +4609,6 @@ extension IAMClient { public func listPolicyTags(input: ListPolicyTagsInput) async throws -> ListPolicyTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listPolicyTags") @@ -4732,7 +4632,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPolicyTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPolicyTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPolicyTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4755,7 +4655,6 @@ extension IAMClient { public func listPolicyVersions(input: ListPolicyVersionsInput) async throws -> ListPolicyVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listPolicyVersions") @@ -4779,7 +4678,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPolicyVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPolicyVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPolicyVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4801,7 +4700,6 @@ extension IAMClient { public func listRolePolicies(input: ListRolePoliciesInput) async throws -> ListRolePoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listRolePolicies") @@ -4825,7 +4723,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListRolePoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListRolePoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListRolePoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4847,7 +4745,6 @@ extension IAMClient { public func listRoleTags(input: ListRoleTagsInput) async throws -> ListRoleTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listRoleTags") @@ -4871,7 +4768,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListRoleTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListRoleTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListRoleTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4901,7 +4798,6 @@ extension IAMClient { public func listRoles(input: ListRolesInput) async throws -> ListRolesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listRoles") @@ -4925,7 +4821,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListRolesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListRolesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListRolesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4948,7 +4844,6 @@ extension IAMClient { public func listSAMLProviderTags(input: ListSAMLProviderTagsInput) async throws -> ListSAMLProviderTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listSAMLProviderTags") @@ -4972,7 +4867,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListSAMLProviderTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListSAMLProviderTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListSAMLProviderTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4993,7 +4888,6 @@ extension IAMClient { public func listSAMLProviders(input: ListSAMLProvidersInput) async throws -> ListSAMLProvidersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listSAMLProviders") @@ -5017,7 +4911,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListSAMLProvidersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListSAMLProvidersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListSAMLProvidersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5038,7 +4932,6 @@ extension IAMClient { public func listSSHPublicKeys(input: ListSSHPublicKeysInput) async throws -> ListSSHPublicKeysOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listSSHPublicKeys") @@ -5062,7 +4955,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListSSHPublicKeysOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListSSHPublicKeysOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListSSHPublicKeysOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5084,7 +4977,6 @@ extension IAMClient { public func listServerCertificateTags(input: ListServerCertificateTagsInput) async throws -> ListServerCertificateTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listServerCertificateTags") @@ -5108,7 +5000,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListServerCertificateTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListServerCertificateTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListServerCertificateTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5129,7 +5021,6 @@ extension IAMClient { public func listServerCertificates(input: ListServerCertificatesInput) async throws -> ListServerCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listServerCertificates") @@ -5153,7 +5044,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListServerCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListServerCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListServerCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5175,7 +5066,6 @@ extension IAMClient { public func listServiceSpecificCredentials(input: ListServiceSpecificCredentialsInput) async throws -> ListServiceSpecificCredentialsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listServiceSpecificCredentials") @@ -5199,7 +5089,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListServiceSpecificCredentialsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListServiceSpecificCredentialsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListServiceSpecificCredentialsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5221,7 +5111,6 @@ extension IAMClient { public func listSigningCertificates(input: ListSigningCertificatesInput) async throws -> ListSigningCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listSigningCertificates") @@ -5245,7 +5134,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListSigningCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListSigningCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListSigningCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5267,7 +5156,6 @@ extension IAMClient { public func listUserPolicies(input: ListUserPoliciesInput) async throws -> ListUserPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listUserPolicies") @@ -5291,7 +5179,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListUserPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListUserPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListUserPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5313,7 +5201,6 @@ extension IAMClient { public func listUserTags(input: ListUserTagsInput) async throws -> ListUserTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listUserTags") @@ -5337,7 +5224,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListUserTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListUserTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListUserTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5365,7 +5252,6 @@ extension IAMClient { public func listUsers(input: ListUsersInput) async throws -> ListUsersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listUsers") @@ -5389,7 +5275,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListUsersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListUsersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListUsersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5405,7 +5291,6 @@ extension IAMClient { public func listVirtualMFADevices(input: ListVirtualMFADevicesInput) async throws -> ListVirtualMFADevicesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listVirtualMFADevices") @@ -5429,7 +5314,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListVirtualMFADevicesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListVirtualMFADevicesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListVirtualMFADevicesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5453,7 +5338,6 @@ extension IAMClient { public func putGroupPolicy(input: PutGroupPolicyInput) async throws -> PutGroupPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putGroupPolicy") @@ -5477,7 +5361,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutGroupPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutGroupPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutGroupPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5502,7 +5386,6 @@ extension IAMClient { public func putRolePermissionsBoundary(input: PutRolePermissionsBoundaryInput) async throws -> PutRolePermissionsBoundaryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putRolePermissionsBoundary") @@ -5526,7 +5409,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutRolePermissionsBoundaryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutRolePermissionsBoundaryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutRolePermissionsBoundaryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5551,7 +5434,6 @@ extension IAMClient { public func putRolePolicy(input: PutRolePolicyInput) async throws -> PutRolePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putRolePolicy") @@ -5575,7 +5457,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutRolePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutRolePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutRolePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5599,7 +5481,6 @@ extension IAMClient { public func putUserPermissionsBoundary(input: PutUserPermissionsBoundaryInput) async throws -> PutUserPermissionsBoundaryOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putUserPermissionsBoundary") @@ -5623,7 +5504,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutUserPermissionsBoundaryOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutUserPermissionsBoundaryOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutUserPermissionsBoundaryOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5647,7 +5528,6 @@ extension IAMClient { public func putUserPolicy(input: PutUserPolicyInput) async throws -> PutUserPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putUserPolicy") @@ -5671,7 +5551,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutUserPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutUserPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutUserPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5694,7 +5574,6 @@ extension IAMClient { public func removeClientIDFromOpenIDConnectProvider(input: RemoveClientIDFromOpenIDConnectProviderInput) async throws -> RemoveClientIDFromOpenIDConnectProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeClientIDFromOpenIDConnectProvider") @@ -5718,7 +5597,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveClientIDFromOpenIDConnectProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveClientIDFromOpenIDConnectProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveClientIDFromOpenIDConnectProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5742,7 +5621,6 @@ extension IAMClient { public func removeRoleFromInstanceProfile(input: RemoveRoleFromInstanceProfileInput) async throws -> RemoveRoleFromInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeRoleFromInstanceProfile") @@ -5766,7 +5644,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveRoleFromInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveRoleFromInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveRoleFromInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5789,7 +5667,6 @@ extension IAMClient { public func removeUserFromGroup(input: RemoveUserFromGroupInput) async throws -> RemoveUserFromGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeUserFromGroup") @@ -5813,7 +5690,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveUserFromGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveUserFromGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveUserFromGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5834,7 +5711,6 @@ extension IAMClient { public func resetServiceSpecificCredential(input: ResetServiceSpecificCredentialInput) async throws -> ResetServiceSpecificCredentialOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetServiceSpecificCredential") @@ -5858,7 +5734,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetServiceSpecificCredentialOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetServiceSpecificCredentialOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetServiceSpecificCredentialOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5883,7 +5759,6 @@ extension IAMClient { public func resyncMFADevice(input: ResyncMFADeviceInput) async throws -> ResyncMFADeviceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resyncMFADevice") @@ -5907,7 +5782,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResyncMFADeviceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResyncMFADeviceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResyncMFADeviceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5931,7 +5806,6 @@ extension IAMClient { public func setDefaultPolicyVersion(input: SetDefaultPolicyVersionInput) async throws -> SetDefaultPolicyVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setDefaultPolicyVersion") @@ -5955,7 +5829,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetDefaultPolicyVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetDefaultPolicyVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetDefaultPolicyVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5976,7 +5850,6 @@ extension IAMClient { public func setSecurityTokenServicePreferences(input: SetSecurityTokenServicePreferencesInput) async throws -> SetSecurityTokenServicePreferencesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setSecurityTokenServicePreferences") @@ -6000,7 +5873,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetSecurityTokenServicePreferencesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetSecurityTokenServicePreferencesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetSecurityTokenServicePreferencesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6022,7 +5895,6 @@ extension IAMClient { public func simulateCustomPolicy(input: SimulateCustomPolicyInput) async throws -> SimulateCustomPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "simulateCustomPolicy") @@ -6046,7 +5918,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SimulateCustomPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SimulateCustomPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SimulateCustomPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6069,7 +5941,6 @@ extension IAMClient { public func simulatePrincipalPolicy(input: SimulatePrincipalPolicyInput) async throws -> SimulatePrincipalPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "simulatePrincipalPolicy") @@ -6093,7 +5964,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SimulatePrincipalPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SimulatePrincipalPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SimulatePrincipalPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6129,7 +6000,6 @@ extension IAMClient { public func tagInstanceProfile(input: TagInstanceProfileInput) async throws -> TagInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagInstanceProfile") @@ -6153,7 +6023,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6189,7 +6059,6 @@ extension IAMClient { public func tagMFADevice(input: TagMFADeviceInput) async throws -> TagMFADeviceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagMFADevice") @@ -6213,7 +6082,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagMFADeviceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagMFADeviceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagMFADeviceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6249,7 +6118,6 @@ extension IAMClient { public func tagOpenIDConnectProvider(input: TagOpenIDConnectProviderInput) async throws -> TagOpenIDConnectProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagOpenIDConnectProvider") @@ -6273,7 +6141,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagOpenIDConnectProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagOpenIDConnectProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagOpenIDConnectProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6309,7 +6177,6 @@ extension IAMClient { public func tagPolicy(input: TagPolicyInput) async throws -> TagPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagPolicy") @@ -6333,7 +6200,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6374,7 +6241,6 @@ extension IAMClient { public func tagRole(input: TagRoleInput) async throws -> TagRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagRole") @@ -6398,7 +6264,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6434,7 +6300,6 @@ extension IAMClient { public func tagSAMLProvider(input: TagSAMLProviderInput) async throws -> TagSAMLProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagSAMLProvider") @@ -6458,7 +6323,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagSAMLProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagSAMLProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagSAMLProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6496,7 +6361,6 @@ extension IAMClient { public func tagServerCertificate(input: TagServerCertificateInput) async throws -> TagServerCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagServerCertificate") @@ -6520,7 +6384,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagServerCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagServerCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagServerCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6561,7 +6425,6 @@ extension IAMClient { public func tagUser(input: TagUserInput) async throws -> TagUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagUser") @@ -6585,7 +6448,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6609,7 +6472,6 @@ extension IAMClient { public func untagInstanceProfile(input: UntagInstanceProfileInput) async throws -> UntagInstanceProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagInstanceProfile") @@ -6633,7 +6495,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagInstanceProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagInstanceProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagInstanceProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6657,7 +6519,6 @@ extension IAMClient { public func untagMFADevice(input: UntagMFADeviceInput) async throws -> UntagMFADeviceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagMFADevice") @@ -6681,7 +6542,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagMFADeviceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagMFADeviceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagMFADeviceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6705,7 +6566,6 @@ extension IAMClient { public func untagOpenIDConnectProvider(input: UntagOpenIDConnectProviderInput) async throws -> UntagOpenIDConnectProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagOpenIDConnectProvider") @@ -6729,7 +6589,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagOpenIDConnectProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagOpenIDConnectProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagOpenIDConnectProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6753,7 +6613,6 @@ extension IAMClient { public func untagPolicy(input: UntagPolicyInput) async throws -> UntagPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagPolicy") @@ -6777,7 +6636,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6800,7 +6659,6 @@ extension IAMClient { public func untagRole(input: UntagRoleInput) async throws -> UntagRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagRole") @@ -6824,7 +6682,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6848,7 +6706,6 @@ extension IAMClient { public func untagSAMLProvider(input: UntagSAMLProviderInput) async throws -> UntagSAMLProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagSAMLProvider") @@ -6872,7 +6729,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagSAMLProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagSAMLProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagSAMLProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6896,7 +6753,6 @@ extension IAMClient { public func untagServerCertificate(input: UntagServerCertificateInput) async throws -> UntagServerCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagServerCertificate") @@ -6920,7 +6776,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagServerCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagServerCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagServerCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6943,7 +6799,6 @@ extension IAMClient { public func untagUser(input: UntagUserInput) async throws -> UntagUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagUser") @@ -6967,7 +6822,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6990,7 +6845,6 @@ extension IAMClient { public func updateAccessKey(input: UpdateAccessKeyInput) async throws -> UpdateAccessKeyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateAccessKey") @@ -7014,7 +6868,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateAccessKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateAccessKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateAccessKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7038,7 +6892,6 @@ extension IAMClient { public func updateAccountPasswordPolicy(input: UpdateAccountPasswordPolicyInput) async throws -> UpdateAccountPasswordPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateAccountPasswordPolicy") @@ -7062,7 +6915,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateAccountPasswordPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateAccountPasswordPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateAccountPasswordPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7087,7 +6940,6 @@ extension IAMClient { public func updateAssumeRolePolicy(input: UpdateAssumeRolePolicyInput) async throws -> UpdateAssumeRolePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateAssumeRolePolicy") @@ -7111,7 +6963,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateAssumeRolePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateAssumeRolePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateAssumeRolePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7135,7 +6987,6 @@ extension IAMClient { public func updateGroup(input: UpdateGroupInput) async throws -> UpdateGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateGroup") @@ -7159,7 +7010,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7184,7 +7035,6 @@ extension IAMClient { public func updateLoginProfile(input: UpdateLoginProfileInput) async throws -> UpdateLoginProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateLoginProfile") @@ -7208,7 +7058,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateLoginProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateLoginProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateLoginProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7231,7 +7081,6 @@ extension IAMClient { public func updateOpenIDConnectProviderThumbprint(input: UpdateOpenIDConnectProviderThumbprintInput) async throws -> UpdateOpenIDConnectProviderThumbprintOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateOpenIDConnectProviderThumbprint") @@ -7255,7 +7104,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateOpenIDConnectProviderThumbprintOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateOpenIDConnectProviderThumbprintOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateOpenIDConnectProviderThumbprintOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7278,7 +7127,6 @@ extension IAMClient { public func updateRole(input: UpdateRoleInput) async throws -> UpdateRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateRole") @@ -7302,7 +7150,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7325,7 +7173,6 @@ extension IAMClient { public func updateRoleDescription(input: UpdateRoleDescriptionInput) async throws -> UpdateRoleDescriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateRoleDescription") @@ -7349,7 +7196,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateRoleDescriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateRoleDescriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateRoleDescriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7373,7 +7220,6 @@ extension IAMClient { public func updateSAMLProvider(input: UpdateSAMLProviderInput) async throws -> UpdateSAMLProviderOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateSAMLProvider") @@ -7397,7 +7243,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateSAMLProviderOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateSAMLProviderOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateSAMLProviderOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7418,7 +7264,6 @@ extension IAMClient { public func updateSSHPublicKey(input: UpdateSSHPublicKeyInput) async throws -> UpdateSSHPublicKeyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateSSHPublicKey") @@ -7442,7 +7287,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateSSHPublicKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateSSHPublicKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateSSHPublicKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7466,7 +7311,6 @@ extension IAMClient { public func updateServerCertificate(input: UpdateServerCertificateInput) async throws -> UpdateServerCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateServerCertificate") @@ -7490,7 +7334,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateServerCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateServerCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateServerCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7511,7 +7355,6 @@ extension IAMClient { public func updateServiceSpecificCredential(input: UpdateServiceSpecificCredentialInput) async throws -> UpdateServiceSpecificCredentialOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateServiceSpecificCredential") @@ -7535,7 +7378,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateServiceSpecificCredentialOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateServiceSpecificCredentialOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateServiceSpecificCredentialOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7558,7 +7401,6 @@ extension IAMClient { public func updateSigningCertificate(input: UpdateSigningCertificateInput) async throws -> UpdateSigningCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateSigningCertificate") @@ -7582,7 +7424,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateSigningCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateSigningCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateSigningCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7608,7 +7450,6 @@ extension IAMClient { public func updateUser(input: UpdateUserInput) async throws -> UpdateUserOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateUser") @@ -7632,7 +7473,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateUserOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateUserOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateUserOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7657,7 +7498,6 @@ extension IAMClient { public func uploadSSHPublicKey(input: UploadSSHPublicKeyInput) async throws -> UploadSSHPublicKeyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "uploadSSHPublicKey") @@ -7681,7 +7521,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UploadSSHPublicKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UploadSSHPublicKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UploadSSHPublicKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7708,7 +7548,6 @@ extension IAMClient { public func uploadServerCertificate(input: UploadServerCertificateInput) async throws -> UploadServerCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "uploadServerCertificate") @@ -7732,7 +7571,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UploadServerCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UploadServerCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UploadServerCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7760,7 +7599,6 @@ extension IAMClient { public func uploadSigningCertificate(input: UploadSigningCertificateInput) async throws -> UploadSigningCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "uploadSigningCertificate") @@ -7784,7 +7622,7 @@ extension IAMClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UploadSigningCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UploadSigningCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UploadSigningCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSIAM/models/Models.swift b/Sources/Services/AWSIAM/models/Models.swift index 0a13b02d023..55d0901889a 100644 --- a/Sources/Services/AWSIAM/models/Models.swift +++ b/Sources/Services/AWSIAM/models/Models.swift @@ -1,6 +1,8 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension IAMClientTypes { public enum AccessAdvisorUsageGranularityType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { @@ -34,7 +36,7 @@ extension IAMClientTypes { } } -extension IAMClientTypes.AccessDetail: Swift.Codable { +extension IAMClientTypes.AccessDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case entityPath = "EntityPath" case lastAuthenticatedTime = "LastAuthenticatedTime" @@ -66,20 +68,18 @@ extension IAMClientTypes.AccessDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - let serviceNamespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceNamespace) - serviceNamespace = serviceNamespaceDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let entityPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .entityPath) - entityPath = entityPathDecoded - let lastAuthenticatedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastAuthenticatedTime) - lastAuthenticatedTime = lastAuthenticatedTimeDecoded - let totalAuthenticatedEntitiesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalAuthenticatedEntities) - totalAuthenticatedEntities = totalAuthenticatedEntitiesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.AccessDetail() + value.serviceName = try reader["ServiceName"].readIfPresent() + value.serviceNamespace = try reader["ServiceNamespace"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.entityPath = try reader["EntityPath"].readIfPresent() + value.lastAuthenticatedTime = try reader["LastAuthenticatedTime"].readTimestampIfPresent(format: .dateTime) + value.totalAuthenticatedEntities = try reader["TotalAuthenticatedEntities"].readIfPresent() + return value + } } } @@ -121,7 +121,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.AccessKey: Swift.Codable { +extension IAMClientTypes.AccessKey: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accessKeyId = "AccessKeyId" case createDate = "CreateDate" @@ -149,18 +149,17 @@ extension IAMClientTypes.AccessKey: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - let secretAccessKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secretAccessKey) - secretAccessKey = secretAccessKeyDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.AccessKey() + value.userName = try reader["UserName"].readIfPresent() + value.accessKeyId = try reader["AccessKeyId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.secretAccessKey = try reader["SecretAccessKey"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -205,7 +204,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.AccessKeyLastUsed: Swift.Codable { +extension IAMClientTypes.AccessKeyLastUsed: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastUsedDate = "LastUsedDate" case region = "Region" @@ -225,14 +224,15 @@ extension IAMClientTypes.AccessKeyLastUsed: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lastUsedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUsedDate) - lastUsedDate = lastUsedDateDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.AccessKeyLastUsed() + value.lastUsedDate = try reader["LastUsedDate"].readTimestampIfPresent(format: .dateTime) + value.serviceName = try reader["ServiceName"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + return value + } } } @@ -284,7 +284,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.AccessKeyMetadata: Swift.Codable { +extension IAMClientTypes.AccessKeyMetadata: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accessKeyId = "AccessKeyId" case createDate = "CreateDate" @@ -308,16 +308,16 @@ extension IAMClientTypes.AccessKeyMetadata: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.AccessKeyMetadata() + value.userName = try reader["UserName"].readIfPresent() + value.accessKeyId = try reader["AccessKeyId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -350,6 +350,11 @@ extension IAMClientTypes { } extension AddClientIDToOpenIDConnectProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientID = "ClientID" + case openIDConnectProviderArn = "OpenIDConnectProviderArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clientID = clientID { @@ -388,28 +393,12 @@ public struct AddClientIDToOpenIDConnectProviderInput: Swift.Equatable { } } -struct AddClientIDToOpenIDConnectProviderInputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? - let clientID: Swift.String? -} - -extension AddClientIDToOpenIDConnectProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientID = "ClientID" - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - let clientIDDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientID) - clientID = clientIDDecoded - } -} +extension AddClientIDToOpenIDConnectProviderOutput { -extension AddClientIDToOpenIDConnectProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddClientIDToOpenIDConnectProviderOutput() + } } } @@ -418,20 +407,32 @@ public struct AddClientIDToOpenIDConnectProviderOutput: Swift.Equatable { public init() { } } -enum AddClientIDToOpenIDConnectProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddClientIDToOpenIDConnectProviderOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddRoleToInstanceProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceProfileName = "InstanceProfileName" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceProfileName = instanceProfileName { @@ -470,28 +471,12 @@ public struct AddRoleToInstanceProfileInput: Swift.Equatable { } } -struct AddRoleToInstanceProfileInputBody: Swift.Equatable { - let instanceProfileName: Swift.String? - let roleName: Swift.String? -} - -extension AddRoleToInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfileName = "InstanceProfileName" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - } -} +extension AddRoleToInstanceProfileOutput { -extension AddRoleToInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddRoleToInstanceProfileOutput() + } } } @@ -500,21 +485,33 @@ public struct AddRoleToInstanceProfileOutput: Swift.Equatable { public init() { } } -enum AddRoleToInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddRoleToInstanceProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddUserToGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -553,28 +550,12 @@ public struct AddUserToGroupInput: Swift.Equatable { } } -struct AddUserToGroupInputBody: Swift.Equatable { - let groupName: Swift.String? - let userName: Swift.String? -} - -extension AddUserToGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension AddUserToGroupOutput { -extension AddUserToGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddUserToGroupOutput() + } } } @@ -583,14 +564,21 @@ public struct AddUserToGroupOutput: Swift.Equatable { public init() { } } -enum AddUserToGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddUserToGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -631,6 +619,11 @@ extension IAMClientTypes { } extension AttachGroupPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case policyArn = "PolicyArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -669,28 +662,12 @@ public struct AttachGroupPolicyInput: Swift.Equatable { } } -struct AttachGroupPolicyInputBody: Swift.Equatable { - let groupName: Swift.String? - let policyArn: Swift.String? -} - -extension AttachGroupPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case policyArn = "PolicyArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - } -} +extension AttachGroupPolicyOutput { -extension AttachGroupPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AttachGroupPolicyOutput() + } } } @@ -699,21 +676,33 @@ public struct AttachGroupPolicyOutput: Swift.Equatable { public init() { } } -enum AttachGroupPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyNotAttachable": return try await PolicyNotAttachableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AttachGroupPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyNotAttachable": return try await PolicyNotAttachableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AttachRolePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -752,28 +741,12 @@ public struct AttachRolePolicyInput: Swift.Equatable { } } -struct AttachRolePolicyInputBody: Swift.Equatable { - let roleName: Swift.String? - let policyArn: Swift.String? -} - -extension AttachRolePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - } -} +extension AttachRolePolicyOutput { -extension AttachRolePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AttachRolePolicyOutput() + } } } @@ -782,22 +755,34 @@ public struct AttachRolePolicyOutput: Swift.Equatable { public init() { } } -enum AttachRolePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyNotAttachable": return try await PolicyNotAttachableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AttachRolePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyNotAttachable": return try await PolicyNotAttachableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AttachUserPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -836,28 +821,12 @@ public struct AttachUserPolicyInput: Swift.Equatable { } } -struct AttachUserPolicyInputBody: Swift.Equatable { - let userName: Swift.String? - let policyArn: Swift.String? -} - -extension AttachUserPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case userName = "UserName" - } +extension AttachUserPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - } -} - -extension AttachUserPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AttachUserPolicyOutput() + } } } @@ -866,21 +835,28 @@ public struct AttachUserPolicyOutput: Swift.Equatable { public init() { } } -enum AttachUserPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyNotAttachable": return try await PolicyNotAttachableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AttachUserPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyNotAttachable": return try await PolicyNotAttachableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension IAMClientTypes.AttachedPermissionsBoundary: Swift.Codable { +extension IAMClientTypes.AttachedPermissionsBoundary: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case permissionsBoundaryArn = "PermissionsBoundaryArn" case permissionsBoundaryType = "PermissionsBoundaryType" @@ -896,12 +872,14 @@ extension IAMClientTypes.AttachedPermissionsBoundary: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let permissionsBoundaryTypeDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PermissionsBoundaryAttachmentType.self, forKey: .permissionsBoundaryType) - permissionsBoundaryType = permissionsBoundaryTypeDecoded - let permissionsBoundaryArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .permissionsBoundaryArn) - permissionsBoundaryArn = permissionsBoundaryArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.AttachedPermissionsBoundary() + value.permissionsBoundaryType = try reader["PermissionsBoundaryType"].readIfPresent() + value.permissionsBoundaryArn = try reader["PermissionsBoundaryArn"].readIfPresent() + return value + } } } @@ -925,7 +903,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.AttachedPolicy: Swift.Codable { +extension IAMClientTypes.AttachedPolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case policyArn = "PolicyArn" case policyName = "PolicyName" @@ -941,12 +919,14 @@ extension IAMClientTypes.AttachedPolicy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.AttachedPolicy() + value.policyName = try reader["PolicyName"].readIfPresent() + value.policyArn = try reader["PolicyArn"].readIfPresent() + return value + } } } @@ -976,6 +956,11 @@ extension ChangePasswordInput: Swift.CustomDebugStringConvertible { } extension ChangePasswordInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case newPassword = "NewPassword" + case oldPassword = "OldPassword" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let newPassword = newPassword { @@ -1014,28 +999,12 @@ public struct ChangePasswordInput: Swift.Equatable { } } -struct ChangePasswordInputBody: Swift.Equatable { - let oldPassword: Swift.String? - let newPassword: Swift.String? -} - -extension ChangePasswordInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case newPassword = "NewPassword" - case oldPassword = "OldPassword" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let oldPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .oldPassword) - oldPassword = oldPasswordDecoded - let newPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newPassword) - newPassword = newPasswordDecoded - } -} +extension ChangePasswordOutput { -extension ChangePasswordOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ChangePasswordOutput() + } } } @@ -1044,32 +1013,37 @@ public struct ChangePasswordOutput: Swift.Equatable { public init() { } } -enum ChangePasswordOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUserType": return try await InvalidUserTypeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PasswordPolicyViolation": return try await PasswordPolicyViolationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ChangePasswordOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUserType": return try await InvalidUserTypeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PasswordPolicyViolation": return try await PasswordPolicyViolationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ConcurrentModificationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConcurrentModificationException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1097,23 +1071,7 @@ public struct ConcurrentModificationException: ClientRuntime.ModeledError, AWSCl } } -struct ConcurrentModificationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ConcurrentModificationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension IAMClientTypes.ContextEntry: Swift.Codable { +extension IAMClientTypes.ContextEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case contextKeyName = "ContextKeyName" case contextKeyType = "ContextKeyType" @@ -1142,31 +1100,15 @@ extension IAMClientTypes.ContextEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let contextKeyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contextKeyName) - contextKeyName = contextKeyNameDecoded - if containerValues.contains(.contextKeyValues) { - struct KeyVal0{struct member{}} - let contextKeyValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .contextKeyValues) - if let contextKeyValuesWrappedContainer = contextKeyValuesWrappedContainer { - let contextKeyValuesContainer = try contextKeyValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var contextKeyValuesBuffer:[Swift.String]? = nil - if let contextKeyValuesContainer = contextKeyValuesContainer { - contextKeyValuesBuffer = [Swift.String]() - for stringContainer0 in contextKeyValuesContainer { - contextKeyValuesBuffer?.append(stringContainer0) - } - } - contextKeyValues = contextKeyValuesBuffer - } else { - contextKeyValues = [] - } - } else { - contextKeyValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ContextEntry() + value.contextKeyName = try reader["ContextKeyName"].readIfPresent() + value.contextKeyValues = try reader["ContextKeyValues"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.contextKeyType = try reader["ContextKeyType"].readIfPresent() + return value } - let contextKeyTypeDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ContextKeyTypeEnum.self, forKey: .contextKeyType) - contextKeyType = contextKeyTypeDecoded } } @@ -1257,6 +1199,10 @@ extension IAMClientTypes { } extension CreateAccessKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userName = userName { @@ -1286,30 +1232,15 @@ public struct CreateAccessKeyInput: Swift.Equatable { } } -struct CreateAccessKeyInputBody: Swift.Equatable { - let userName: Swift.String? -} - -extension CreateAccessKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension CreateAccessKeyOutput { -extension CreateAccessKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateAccessKeyOutputBody = try responseDecoder.decode(responseBody: data) - self.accessKey = output.accessKey - } else { - self.accessKey = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateAccessKeyResult"] + var value = CreateAccessKeyOutput() + value.accessKey = try reader["AccessKey"].readIfPresent(readingClosure: IAMClientTypes.AccessKey.readingClosure) + return value } } } @@ -1328,36 +1259,30 @@ public struct CreateAccessKeyOutput: Swift.Equatable { } } -struct CreateAccessKeyOutputBody: Swift.Equatable { - let accessKey: IAMClientTypes.AccessKey? -} - -extension CreateAccessKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKey = "AccessKey" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateAccessKeyResult")) - let accessKeyDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AccessKey.self, forKey: .accessKey) - accessKey = accessKeyDecoded - } -} +enum CreateAccessKeyOutputError { -enum CreateAccessKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateAccountAliasInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accountAlias = "AccountAlias" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accountAlias = accountAlias { @@ -1388,24 +1313,12 @@ public struct CreateAccountAliasInput: Swift.Equatable { } } -struct CreateAccountAliasInputBody: Swift.Equatable { - let accountAlias: Swift.String? -} - -extension CreateAccountAliasInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountAlias = "AccountAlias" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountAlias) - accountAlias = accountAliasDecoded - } -} +extension CreateAccountAliasOutput { -extension CreateAccountAliasOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateAccountAliasOutput() + } } } @@ -1414,20 +1327,32 @@ public struct CreateAccountAliasOutput: Swift.Equatable { public init() { } } -enum CreateAccountAliasOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateAccountAliasOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case path = "Path" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -1465,34 +1390,15 @@ public struct CreateGroupInput: Swift.Equatable { } } -struct CreateGroupInputBody: Swift.Equatable { - let path: Swift.String? - let groupName: Swift.String? -} - -extension CreateGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case path = "Path" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - } -} +extension CreateGroupOutput { -extension CreateGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.group = output.group - } else { - self.group = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateGroupResult"] + var value = CreateGroupOutput() + value.group = try reader["Group"].readIfPresent(readingClosure: IAMClientTypes.Group.readingClosure) + return value } } } @@ -1511,37 +1417,33 @@ public struct CreateGroupOutput: Swift.Equatable { } } -struct CreateGroupOutputBody: Swift.Equatable { - let group: IAMClientTypes.Group? -} - -extension CreateGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case group = "Group" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateGroupResult")) - let groupDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Group.self, forKey: .group) - group = groupDecoded - } -} +enum CreateGroupOutputError { -enum CreateGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateInstanceProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceProfileName = "InstanceProfileName" + case path = "Path" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceProfileName = instanceProfileName { @@ -1595,55 +1497,15 @@ public struct CreateInstanceProfileInput: Swift.Equatable { } } -struct CreateInstanceProfileInputBody: Swift.Equatable { - let instanceProfileName: Swift.String? - let path: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension CreateInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfileName = "InstanceProfileName" - case path = "Path" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateInstanceProfileOutput { -extension CreateInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateInstanceProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceProfile = output.instanceProfile - } else { - self.instanceProfile = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateInstanceProfileResult"] + var value = CreateInstanceProfileOutput() + value.instanceProfile = try reader["InstanceProfile"].readIfPresent(readingClosure: IAMClientTypes.InstanceProfile.readingClosure) + return value } } } @@ -1662,33 +1524,23 @@ public struct CreateInstanceProfileOutput: Swift.Equatable { } } -struct CreateInstanceProfileOutputBody: Swift.Equatable { - let instanceProfile: IAMClientTypes.InstanceProfile? -} - -extension CreateInstanceProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfile = "InstanceProfile" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateInstanceProfileResult")) - let instanceProfileDecoded = try containerValues.decodeIfPresent(IAMClientTypes.InstanceProfile.self, forKey: .instanceProfile) - instanceProfile = instanceProfileDecoded - } -} +enum CreateInstanceProfileOutputError { -enum CreateInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -1699,6 +1551,12 @@ extension CreateLoginProfileInput: Swift.CustomDebugStringConvertible { } extension CreateLoginProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case password = "Password" + case passwordResetRequired = "PasswordResetRequired" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let password = password { @@ -1744,38 +1602,15 @@ public struct CreateLoginProfileInput: Swift.Equatable { } } -struct CreateLoginProfileInputBody: Swift.Equatable { - let userName: Swift.String? - let password: Swift.String? - let passwordResetRequired: Swift.Bool? -} - -extension CreateLoginProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case password = "Password" - case passwordResetRequired = "PasswordResetRequired" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let passwordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .password) - password = passwordDecoded - let passwordResetRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .passwordResetRequired) ?? false - passwordResetRequired = passwordResetRequiredDecoded - } -} +extension CreateLoginProfileOutput { -extension CreateLoginProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateLoginProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.loginProfile = output.loginProfile - } else { - self.loginProfile = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateLoginProfileResult"] + var value = CreateLoginProfileOutput() + value.loginProfile = try reader["LoginProfile"].readIfPresent(readingClosure: IAMClientTypes.LoginProfile.readingClosure) + return value } } } @@ -1794,38 +1629,35 @@ public struct CreateLoginProfileOutput: Swift.Equatable { } } -struct CreateLoginProfileOutputBody: Swift.Equatable { - let loginProfile: IAMClientTypes.LoginProfile? -} - -extension CreateLoginProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loginProfile = "LoginProfile" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateLoginProfileResult")) - let loginProfileDecoded = try containerValues.decodeIfPresent(IAMClientTypes.LoginProfile.self, forKey: .loginProfile) - loginProfile = loginProfileDecoded - } -} +enum CreateLoginProfileOutputError { -enum CreateLoginProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PasswordPolicyViolation": return try await PasswordPolicyViolationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PasswordPolicyViolation": return try await PasswordPolicyViolationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateOpenIDConnectProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientIDList = "ClientIDList" + case tags = "Tags" + case thumbprintList = "ThumbprintList" + case url = "Url" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clientIDList = clientIDList { @@ -1905,97 +1737,18 @@ public struct CreateOpenIDConnectProviderInput: Swift.Equatable { } } -struct CreateOpenIDConnectProviderInputBody: Swift.Equatable { - let url: Swift.String? - let clientIDList: [Swift.String]? - let thumbprintList: [Swift.String]? - let tags: [IAMClientTypes.Tag]? -} - -extension CreateOpenIDConnectProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientIDList = "ClientIDList" - case tags = "Tags" - case thumbprintList = "ThumbprintList" - case url = "Url" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded - if containerValues.contains(.clientIDList) { - struct KeyVal0{struct member{}} - let clientIDListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clientIDList) - if let clientIDListWrappedContainer = clientIDListWrappedContainer { - let clientIDListContainer = try clientIDListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var clientIDListBuffer:[Swift.String]? = nil - if let clientIDListContainer = clientIDListContainer { - clientIDListBuffer = [Swift.String]() - for stringContainer0 in clientIDListContainer { - clientIDListBuffer?.append(stringContainer0) - } - } - clientIDList = clientIDListBuffer - } else { - clientIDList = [] - } - } else { - clientIDList = nil - } - if containerValues.contains(.thumbprintList) { - struct KeyVal0{struct member{}} - let thumbprintListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .thumbprintList) - if let thumbprintListWrappedContainer = thumbprintListWrappedContainer { - let thumbprintListContainer = try thumbprintListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var thumbprintListBuffer:[Swift.String]? = nil - if let thumbprintListContainer = thumbprintListContainer { - thumbprintListBuffer = [Swift.String]() - for stringContainer0 in thumbprintListContainer { - thumbprintListBuffer?.append(stringContainer0) - } - } - thumbprintList = thumbprintListBuffer - } else { - thumbprintList = [] - } - } else { - thumbprintList = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateOpenIDConnectProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateOpenIDConnectProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.openIDConnectProviderArn = output.openIDConnectProviderArn - self.tags = output.tags - } else { - self.openIDConnectProviderArn = nil - self.tags = nil - } - } +extension CreateOpenIDConnectProviderOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateOpenIDConnectProviderResult"] + var value = CreateOpenIDConnectProviderOutput() + value.openIDConnectProviderArn = try reader["OpenIDConnectProviderArn"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value + } + } } /// Contains the response to a successful [CreateOpenIDConnectProvider] request. @@ -2015,59 +1768,36 @@ public struct CreateOpenIDConnectProviderOutput: Swift.Equatable { } } -struct CreateOpenIDConnectProviderOutputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension CreateOpenIDConnectProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - case tags = "Tags" - } +enum CreateOpenIDConnectProviderOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateOpenIDConnectProviderResult")) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } } } -enum CreateOpenIDConnectProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreatePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case description = "Description" + case path = "Path" + case policyDocument = "PolicyDocument" + case policyName = "PolicyName" + case tags = "Tags" } -} -extension CreatePolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let description = description { @@ -2142,63 +1872,15 @@ public struct CreatePolicyInput: Swift.Equatable { } } -struct CreatePolicyInputBody: Swift.Equatable { - let policyName: Swift.String? - let path: Swift.String? - let policyDocument: Swift.String? - let description: Swift.String? - let tags: [IAMClientTypes.Tag]? -} +extension CreatePolicyOutput { -extension CreatePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case path = "Path" - case policyDocument = "PolicyDocument" - case policyName = "PolicyName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreatePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreatePolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policy = output.policy - } else { - self.policy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreatePolicyResult"] + var value = CreatePolicyOutput() + value.policy = try reader["Policy"].readIfPresent(readingClosure: IAMClientTypes.Policy.readingClosure) + return value } } } @@ -2216,39 +1898,35 @@ public struct CreatePolicyOutput: Swift.Equatable { } } -struct CreatePolicyOutputBody: Swift.Equatable { - let policy: IAMClientTypes.Policy? -} - -extension CreatePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreatePolicyResult")) - let policyDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Policy.self, forKey: .policy) - policy = policyDecoded - } -} +enum CreatePolicyOutputError { -enum CreatePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreatePolicyVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case policyDocument = "PolicyDocument" + case setAsDefault = "SetAsDefault" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -2300,38 +1978,15 @@ public struct CreatePolicyVersionInput: Swift.Equatable { } } -struct CreatePolicyVersionInputBody: Swift.Equatable { - let policyArn: Swift.String? - let policyDocument: Swift.String? - let setAsDefault: Swift.Bool? -} - -extension CreatePolicyVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case policyDocument = "PolicyDocument" - case setAsDefault = "SetAsDefault" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - let setAsDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .setAsDefault) ?? false - setAsDefault = setAsDefaultDecoded - } -} +extension CreatePolicyVersionOutput { -extension CreatePolicyVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreatePolicyVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.policyVersion = output.policyVersion - } else { - self.policyVersion = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreatePolicyVersionResult"] + var value = CreatePolicyVersionOutput() + value.policyVersion = try reader["PolicyVersion"].readIfPresent(readingClosure: IAMClientTypes.PolicyVersion.readingClosure) + return value } } } @@ -2349,38 +2004,38 @@ public struct CreatePolicyVersionOutput: Swift.Equatable { } } -struct CreatePolicyVersionOutputBody: Swift.Equatable { - let policyVersion: IAMClientTypes.PolicyVersion? -} - -extension CreatePolicyVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyVersion = "PolicyVersion" - } +enum CreatePolicyVersionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreatePolicyVersionResult")) - let policyVersionDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyVersion.self, forKey: .policyVersion) - policyVersion = policyVersionDecoded - } -} - -enum CreatePolicyVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case assumeRolePolicyDocument = "AssumeRolePolicyDocument" + case description = "Description" + case maxSessionDuration = "MaxSessionDuration" + case path = "Path" + case permissionsBoundary = "PermissionsBoundary" + case roleName = "RoleName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let assumeRolePolicyDocument = assumeRolePolicyDocument { @@ -2472,71 +2127,15 @@ public struct CreateRoleInput: Swift.Equatable { } } -struct CreateRoleInputBody: Swift.Equatable { - let path: Swift.String? - let roleName: Swift.String? - let assumeRolePolicyDocument: Swift.String? - let description: Swift.String? - let maxSessionDuration: Swift.Int? - let permissionsBoundary: Swift.String? - let tags: [IAMClientTypes.Tag]? -} +extension CreateRoleOutput { -extension CreateRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assumeRolePolicyDocument = "AssumeRolePolicyDocument" - case description = "Description" - case maxSessionDuration = "MaxSessionDuration" - case path = "Path" - case permissionsBoundary = "PermissionsBoundary" - case roleName = "RoleName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let assumeRolePolicyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .assumeRolePolicyDocument) - assumeRolePolicyDocument = assumeRolePolicyDocumentDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let maxSessionDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSessionDuration) - maxSessionDuration = maxSessionDurationDecoded - let permissionsBoundaryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .permissionsBoundary) - permissionsBoundary = permissionsBoundaryDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateRoleOutputBody = try responseDecoder.decode(responseBody: data) - self.role = output.role - } else { - self.role = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateRoleResult"] + var value = CreateRoleOutput() + value.role = try reader["Role"].readIfPresent(readingClosure: IAMClientTypes.Role.readingClosure) + return value } } } @@ -2555,39 +2154,35 @@ public struct CreateRoleOutput: Swift.Equatable { } } -struct CreateRoleOutputBody: Swift.Equatable { - let role: IAMClientTypes.Role? -} - -extension CreateRoleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case role = "Role" - } +enum CreateRoleOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateRoleResult")) - let roleDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Role.self, forKey: .role) - role = roleDecoded - } -} - -enum CreateRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateSAMLProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case name = "Name" + case samlMetadataDocument = "SAMLMetadataDocument" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let name = name { @@ -2642,57 +2237,16 @@ public struct CreateSAMLProviderInput: Swift.Equatable { } } -struct CreateSAMLProviderInputBody: Swift.Equatable { - let samlMetadataDocument: Swift.String? - let name: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension CreateSAMLProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case samlMetadataDocument = "SAMLMetadataDocument" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlMetadataDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlMetadataDocument) - samlMetadataDocument = samlMetadataDocumentDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateSAMLProviderOutput { -extension CreateSAMLProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSAMLProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.samlProviderArn = output.samlProviderArn - self.tags = output.tags - } else { - self.samlProviderArn = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateSAMLProviderResult"] + var value = CreateSAMLProviderOutput() + value.samlProviderArn = try reader["SAMLProviderArn"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2714,59 +2268,34 @@ public struct CreateSAMLProviderOutput: Swift.Equatable { } } -struct CreateSAMLProviderOutputBody: Swift.Equatable { - let samlProviderArn: Swift.String? - let tags: [IAMClientTypes.Tag]? -} +enum CreateSAMLProviderOutputError { -extension CreateSAMLProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderArn = "SAMLProviderArn" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateSAMLProviderResult")) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } } } -enum CreateSAMLProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateServiceLinkedRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case awsServiceName = "AWSServiceName" + case customSuffix = "CustomSuffix" + case description = "Description" } -} -extension CreateServiceLinkedRoleInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let awsServiceName = awsServiceName { @@ -2811,38 +2340,15 @@ public struct CreateServiceLinkedRoleInput: Swift.Equatable { } } -struct CreateServiceLinkedRoleInputBody: Swift.Equatable { - let awsServiceName: Swift.String? - let description: Swift.String? - let customSuffix: Swift.String? -} +extension CreateServiceLinkedRoleOutput { -extension CreateServiceLinkedRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case awsServiceName = "AWSServiceName" - case customSuffix = "CustomSuffix" - case description = "Description" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let awsServiceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsServiceName) - awsServiceName = awsServiceNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let customSuffixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customSuffix) - customSuffix = customSuffixDecoded - } -} - -extension CreateServiceLinkedRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateServiceLinkedRoleOutputBody = try responseDecoder.decode(responseBody: data) - self.role = output.role - } else { - self.role = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateServiceLinkedRoleResult"] + var value = CreateServiceLinkedRoleOutput() + value.role = try reader["Role"].readIfPresent(readingClosure: IAMClientTypes.Role.readingClosure) + return value } } } @@ -2859,37 +2365,32 @@ public struct CreateServiceLinkedRoleOutput: Swift.Equatable { } } -struct CreateServiceLinkedRoleOutputBody: Swift.Equatable { - let role: IAMClientTypes.Role? -} - -extension CreateServiceLinkedRoleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case role = "Role" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateServiceLinkedRoleResult")) - let roleDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Role.self, forKey: .role) - role = roleDecoded - } -} +enum CreateServiceLinkedRoleOutputError { -enum CreateServiceLinkedRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateServiceSpecificCredentialInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serviceName = "ServiceName" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serviceName = serviceName { @@ -2928,34 +2429,15 @@ public struct CreateServiceSpecificCredentialInput: Swift.Equatable { } } -struct CreateServiceSpecificCredentialInputBody: Swift.Equatable { - let userName: Swift.String? - let serviceName: Swift.String? -} - -extension CreateServiceSpecificCredentialInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceName = "ServiceName" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - } -} +extension CreateServiceSpecificCredentialOutput { -extension CreateServiceSpecificCredentialOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateServiceSpecificCredentialOutputBody = try responseDecoder.decode(responseBody: data) - self.serviceSpecificCredential = output.serviceSpecificCredential - } else { - self.serviceSpecificCredential = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateServiceSpecificCredentialResult"] + var value = CreateServiceSpecificCredentialOutput() + value.serviceSpecificCredential = try reader["ServiceSpecificCredential"].readIfPresent(readingClosure: IAMClientTypes.ServiceSpecificCredential.readingClosure) + return value } } } @@ -2972,36 +2454,33 @@ public struct CreateServiceSpecificCredentialOutput: Swift.Equatable { } } -struct CreateServiceSpecificCredentialOutputBody: Swift.Equatable { - let serviceSpecificCredential: IAMClientTypes.ServiceSpecificCredential? -} - -extension CreateServiceSpecificCredentialOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceSpecificCredential = "ServiceSpecificCredential" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateServiceSpecificCredentialResult")) - let serviceSpecificCredentialDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ServiceSpecificCredential.self, forKey: .serviceSpecificCredential) - serviceSpecificCredential = serviceSpecificCredentialDecoded - } -} +enum CreateServiceSpecificCredentialOutputError { -enum CreateServiceSpecificCredentialOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotSupportedService": return try await ServiceNotSupportedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotSupportedService": return try await ServiceNotSupportedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case path = "Path" + case permissionsBoundary = "PermissionsBoundary" + case tags = "Tags" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let path = path { @@ -3062,59 +2541,15 @@ public struct CreateUserInput: Swift.Equatable { } } -struct CreateUserInputBody: Swift.Equatable { - let path: Swift.String? - let userName: Swift.String? - let permissionsBoundary: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension CreateUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case path = "Path" - case permissionsBoundary = "PermissionsBoundary" - case tags = "Tags" - case userName = "UserName" - } +extension CreateUserOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let permissionsBoundaryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .permissionsBoundary) - permissionsBoundary = permissionsBoundaryDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateUserOutputBody = try responseDecoder.decode(responseBody: data) - self.user = output.user - } else { - self.user = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateUserResult"] + var value = CreateUserOutput() + value.user = try reader["User"].readIfPresent(readingClosure: IAMClientTypes.User.readingClosure) + return value } } } @@ -3132,39 +2567,35 @@ public struct CreateUserOutput: Swift.Equatable { } } -struct CreateUserOutputBody: Swift.Equatable { - let user: IAMClientTypes.User? -} - -extension CreateUserOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case user = "User" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateUserResult")) - let userDecoded = try containerValues.decodeIfPresent(IAMClientTypes.User.self, forKey: .user) - user = userDecoded - } -} +enum CreateUserOutputError { -enum CreateUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateVirtualMFADeviceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case path = "Path" + case tags = "Tags" + case virtualMFADeviceName = "VirtualMFADeviceName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let path = path { @@ -3218,55 +2649,15 @@ public struct CreateVirtualMFADeviceInput: Swift.Equatable { } } -struct CreateVirtualMFADeviceInputBody: Swift.Equatable { - let path: Swift.String? - let virtualMFADeviceName: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension CreateVirtualMFADeviceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case path = "Path" - case tags = "Tags" - case virtualMFADeviceName = "VirtualMFADeviceName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let virtualMFADeviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .virtualMFADeviceName) - virtualMFADeviceName = virtualMFADeviceNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateVirtualMFADeviceOutput { -extension CreateVirtualMFADeviceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVirtualMFADeviceOutputBody = try responseDecoder.decode(responseBody: data) - self.virtualMFADevice = output.virtualMFADevice - } else { - self.virtualMFADevice = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateVirtualMFADeviceResult"] + var value = CreateVirtualMFADeviceOutput() + value.virtualMFADevice = try reader["VirtualMFADevice"].readIfPresent(readingClosure: IAMClientTypes.VirtualMFADevice.readingClosure) + return value } } } @@ -3285,48 +2676,36 @@ public struct CreateVirtualMFADeviceOutput: Swift.Equatable { } } -struct CreateVirtualMFADeviceOutputBody: Swift.Equatable { - let virtualMFADevice: IAMClientTypes.VirtualMFADevice? -} - -extension CreateVirtualMFADeviceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case virtualMFADevice = "VirtualMFADevice" - } +enum CreateVirtualMFADeviceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateVirtualMFADeviceResult")) - let virtualMFADeviceDecoded = try containerValues.decodeIfPresent(IAMClientTypes.VirtualMFADevice.self, forKey: .virtualMFADevice) - virtualMFADevice = virtualMFADeviceDecoded - } -} - -enum CreateVirtualMFADeviceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CredentialReportExpiredException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CredentialReportExpiredException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3354,33 +2733,15 @@ public struct CredentialReportExpiredException: ClientRuntime.ModeledError, AWSC } } -struct CredentialReportExpiredExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CredentialReportExpiredExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CredentialReportNotPresentException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CredentialReportNotPresentException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3408,33 +2769,15 @@ public struct CredentialReportNotPresentException: ClientRuntime.ModeledError, A } } -struct CredentialReportNotPresentExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CredentialReportNotPresentExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CredentialReportNotReadyException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CredentialReportNotReadyException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3462,23 +2805,12 @@ public struct CredentialReportNotReadyException: ClientRuntime.ModeledError, AWS } } -struct CredentialReportNotReadyExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CredentialReportNotReadyExceptionBody: Swift.Decodable { +extension DeactivateMFADeviceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case serialNumber = "SerialNumber" + case userName = "UserName" } -} -extension DeactivateMFADeviceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serialNumber = serialNumber { @@ -3517,28 +2849,12 @@ public struct DeactivateMFADeviceInput: Swift.Equatable { } } -struct DeactivateMFADeviceInputBody: Swift.Equatable { - let userName: Swift.String? - let serialNumber: Swift.String? -} - -extension DeactivateMFADeviceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serialNumber = "SerialNumber" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - } -} +extension DeactivateMFADeviceOutput { -extension DeactivateMFADeviceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeactivateMFADeviceOutput() + } } } @@ -3547,21 +2863,33 @@ public struct DeactivateMFADeviceOutput: Swift.Equatable { public init() { } } -enum DeactivateMFADeviceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeactivateMFADeviceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteAccessKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accessKeyId = "AccessKeyId" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accessKeyId = accessKeyId { @@ -3599,28 +2927,12 @@ public struct DeleteAccessKeyInput: Swift.Equatable { } } -struct DeleteAccessKeyInputBody: Swift.Equatable { - let userName: Swift.String? - let accessKeyId: Swift.String? -} +extension DeleteAccessKeyOutput { -extension DeleteAccessKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKeyId = "AccessKeyId" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - } -} - -extension DeleteAccessKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessKeyOutput() + } } } @@ -3629,19 +2941,30 @@ public struct DeleteAccessKeyOutput: Swift.Equatable { public init() { } } -enum DeleteAccessKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessKeyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteAccountAliasInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accountAlias = "AccountAlias" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accountAlias = accountAlias { @@ -3672,24 +2995,12 @@ public struct DeleteAccountAliasInput: Swift.Equatable { } } -struct DeleteAccountAliasInputBody: Swift.Equatable { - let accountAlias: Swift.String? -} - -extension DeleteAccountAliasInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountAlias = "AccountAlias" - } +extension DeleteAccountAliasOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountAlias) - accountAlias = accountAliasDecoded - } -} - -extension DeleteAccountAliasOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccountAliasOutput() + } } } @@ -3698,20 +3009,28 @@ public struct DeleteAccountAliasOutput: Swift.Equatable { public init() { } } -enum DeleteAccountAliasOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccountAliasOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteAccountPasswordPolicyInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DeleteAccountPasswordPolicy", forKey:ClientRuntime.Key("Action")) @@ -3731,8 +3050,12 @@ public struct DeleteAccountPasswordPolicyInput: Swift.Equatable { public init() { } } -extension DeleteAccountPasswordPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccountPasswordPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccountPasswordPolicyOutput() + } } } @@ -3741,29 +3064,34 @@ public struct DeleteAccountPasswordPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteAccountPasswordPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccountPasswordPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteConflictException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DeleteConflictException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3791,23 +3119,11 @@ public struct DeleteConflictException: ClientRuntime.ModeledError, AWSClientRunt } } -struct DeleteConflictExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DeleteConflictExceptionBody: Swift.Decodable { +extension DeleteGroupInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case groupName = "GroupName" } -} -extension DeleteGroupInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -3838,24 +3154,12 @@ public struct DeleteGroupInput: Swift.Equatable { } } -struct DeleteGroupInputBody: Swift.Equatable { - let groupName: Swift.String? -} - -extension DeleteGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - } -} +extension DeleteGroupOutput { -extension DeleteGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteGroupOutput() + } } } @@ -3864,20 +3168,32 @@ public struct DeleteGroupOutput: Swift.Equatable { public init() { } } -enum DeleteGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DeleteConflict": return try await DeleteConflictException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DeleteConflict": return try await DeleteConflictException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteGroupPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case policyName = "PolicyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -3916,28 +3232,12 @@ public struct DeleteGroupPolicyInput: Swift.Equatable { } } -struct DeleteGroupPolicyInputBody: Swift.Equatable { - let groupName: Swift.String? - let policyName: Swift.String? -} +extension DeleteGroupPolicyOutput { -extension DeleteGroupPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - } -} - -extension DeleteGroupPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteGroupPolicyOutput() + } } } @@ -3946,19 +3246,30 @@ public struct DeleteGroupPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteGroupPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteGroupPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteInstanceProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceProfileName = "InstanceProfileName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceProfileName = instanceProfileName { @@ -3989,24 +3300,12 @@ public struct DeleteInstanceProfileInput: Swift.Equatable { } } -struct DeleteInstanceProfileInputBody: Swift.Equatable { - let instanceProfileName: Swift.String? -} +extension DeleteInstanceProfileOutput { -extension DeleteInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfileName = "InstanceProfileName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - } -} - -extension DeleteInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteInstanceProfileOutput() + } } } @@ -4015,20 +3314,31 @@ public struct DeleteInstanceProfileOutput: Swift.Equatable { public init() { } } -enum DeleteInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DeleteConflict": return try await DeleteConflictException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteInstanceProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DeleteConflict": return try await DeleteConflictException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteLoginProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userName = userName { @@ -4059,24 +3369,12 @@ public struct DeleteLoginProfileInput: Swift.Equatable { } } -struct DeleteLoginProfileInputBody: Swift.Equatable { - let userName: Swift.String? -} - -extension DeleteLoginProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension DeleteLoginProfileOutput { -extension DeleteLoginProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteLoginProfileOutput() + } } } @@ -4085,20 +3383,31 @@ public struct DeleteLoginProfileOutput: Swift.Equatable { public init() { } } -enum DeleteLoginProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteLoginProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteOpenIDConnectProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case openIDConnectProviderArn = "OpenIDConnectProviderArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let openIDConnectProviderArn = openIDConnectProviderArn { @@ -4129,24 +3438,12 @@ public struct DeleteOpenIDConnectProviderInput: Swift.Equatable { } } -struct DeleteOpenIDConnectProviderInputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? -} - -extension DeleteOpenIDConnectProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - } -} +extension DeleteOpenIDConnectProviderOutput { -extension DeleteOpenIDConnectProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteOpenIDConnectProviderOutput() + } } } @@ -4155,19 +3452,30 @@ public struct DeleteOpenIDConnectProviderOutput: Swift.Equatable { public init() { } } -enum DeleteOpenIDConnectProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteOpenIDConnectProviderOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeletePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -4198,24 +3506,12 @@ public struct DeletePolicyInput: Swift.Equatable { } } -struct DeletePolicyInputBody: Swift.Equatable { - let policyArn: Swift.String? -} - -extension DeletePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - } -} +extension DeletePolicyOutput { -extension DeletePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeletePolicyOutput() + } } } @@ -4224,21 +3520,33 @@ public struct DeletePolicyOutput: Swift.Equatable { public init() { } } -enum DeletePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DeleteConflict": return try await DeleteConflictException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeletePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DeleteConflict": return try await DeleteConflictException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeletePolicyVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case versionId = "VersionId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -4277,28 +3585,12 @@ public struct DeletePolicyVersionInput: Swift.Equatable { } } -struct DeletePolicyVersionInputBody: Swift.Equatable { - let policyArn: Swift.String? - let versionId: Swift.String? -} - -extension DeletePolicyVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case versionId = "VersionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - } -} +extension DeletePolicyVersionOutput { -extension DeletePolicyVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeletePolicyVersionOutput() + } } } @@ -4307,21 +3599,32 @@ public struct DeletePolicyVersionOutput: Swift.Equatable { public init() { } } -enum DeletePolicyVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DeleteConflict": return try await DeleteConflictException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeletePolicyVersionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DeleteConflict": return try await DeleteConflictException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let roleName = roleName { @@ -4352,24 +3655,12 @@ public struct DeleteRoleInput: Swift.Equatable { } } -struct DeleteRoleInputBody: Swift.Equatable { - let roleName: Swift.String? -} - -extension DeleteRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - } -} +extension DeleteRoleOutput { -extension DeleteRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteRoleOutput() + } } } @@ -4378,22 +3669,33 @@ public struct DeleteRoleOutput: Swift.Equatable { public init() { } } -enum DeleteRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DeleteConflict": return try await DeleteConflictException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteRoleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DeleteConflict": return try await DeleteConflictException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteRolePermissionsBoundaryInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let roleName = roleName { @@ -4424,24 +3726,12 @@ public struct DeleteRolePermissionsBoundaryInput: Swift.Equatable { } } -struct DeleteRolePermissionsBoundaryInputBody: Swift.Equatable { - let roleName: Swift.String? -} - -extension DeleteRolePermissionsBoundaryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - } -} +extension DeleteRolePermissionsBoundaryOutput { -extension DeleteRolePermissionsBoundaryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteRolePermissionsBoundaryOutput() + } } } @@ -4450,19 +3740,31 @@ public struct DeleteRolePermissionsBoundaryOutput: Swift.Equatable { public init() { } } -enum DeleteRolePermissionsBoundaryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteRolePermissionsBoundaryOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteRolePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyName = "PolicyName" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyName = policyName { @@ -4501,28 +3803,12 @@ public struct DeleteRolePolicyInput: Swift.Equatable { } } -struct DeleteRolePolicyInputBody: Swift.Equatable { - let roleName: Swift.String? - let policyName: Swift.String? -} - -extension DeleteRolePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyName = "PolicyName" - case roleName = "RoleName" - } +extension DeleteRolePolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - } -} - -extension DeleteRolePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteRolePolicyOutput() + } } } @@ -4531,20 +3817,31 @@ public struct DeleteRolePolicyOutput: Swift.Equatable { public init() { } } -enum DeleteRolePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteRolePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteSAMLProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case samlProviderArn = "SAMLProviderArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let samlProviderArn = samlProviderArn { @@ -4575,24 +3872,12 @@ public struct DeleteSAMLProviderInput: Swift.Equatable { } } -struct DeleteSAMLProviderInputBody: Swift.Equatable { - let samlProviderArn: Swift.String? -} - -extension DeleteSAMLProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderArn = "SAMLProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - } -} +extension DeleteSAMLProviderOutput { -extension DeleteSAMLProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSAMLProviderOutput() + } } } @@ -4601,20 +3886,32 @@ public struct DeleteSAMLProviderOutput: Swift.Equatable { public init() { } } -enum DeleteSAMLProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteSAMLProviderOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteSSHPublicKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sshPublicKeyId = "SSHPublicKeyId" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sshPublicKeyId = sshPublicKeyId { @@ -4653,28 +3950,12 @@ public struct DeleteSSHPublicKeyInput: Swift.Equatable { } } -struct DeleteSSHPublicKeyInputBody: Swift.Equatable { - let userName: Swift.String? - let sshPublicKeyId: Swift.String? -} - -extension DeleteSSHPublicKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sshPublicKeyId = "SSHPublicKeyId" - case userName = "UserName" - } +extension DeleteSSHPublicKeyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let sshPublicKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sshPublicKeyId) - sshPublicKeyId = sshPublicKeyIdDecoded - } -} - -extension DeleteSSHPublicKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSSHPublicKeyOutput() + } } } @@ -4683,17 +3964,28 @@ public struct DeleteSSHPublicKeyOutput: Swift.Equatable { public init() { } } -enum DeleteSSHPublicKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteSSHPublicKeyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteServerCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serverCertificateName = "ServerCertificateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serverCertificateName = serverCertificateName { @@ -4724,24 +4016,12 @@ public struct DeleteServerCertificateInput: Swift.Equatable { } } -struct DeleteServerCertificateInputBody: Swift.Equatable { - let serverCertificateName: Swift.String? -} - -extension DeleteServerCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverCertificateName = "ServerCertificateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateName) - serverCertificateName = serverCertificateNameDecoded - } -} +extension DeleteServerCertificateOutput { -extension DeleteServerCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteServerCertificateOutput() + } } } @@ -4750,20 +4030,31 @@ public struct DeleteServerCertificateOutput: Swift.Equatable { public init() { } } -enum DeleteServerCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DeleteConflict": return try await DeleteConflictException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteServerCertificateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DeleteConflict": return try await DeleteConflictException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteServiceLinkedRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let roleName = roleName { @@ -4794,30 +4085,15 @@ public struct DeleteServiceLinkedRoleInput: Swift.Equatable { } } -struct DeleteServiceLinkedRoleInputBody: Swift.Equatable { - let roleName: Swift.String? -} - -extension DeleteServiceLinkedRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - } -} +extension DeleteServiceLinkedRoleOutput { -extension DeleteServiceLinkedRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteServiceLinkedRoleOutputBody = try responseDecoder.decode(responseBody: data) - self.deletionTaskId = output.deletionTaskId - } else { - self.deletionTaskId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteServiceLinkedRoleResult"] + var value = DeleteServiceLinkedRoleOutput() + value.deletionTaskId = try reader["DeletionTaskId"].readIfPresent() + return value } } } @@ -4835,36 +4111,31 @@ public struct DeleteServiceLinkedRoleOutput: Swift.Equatable { } } -struct DeleteServiceLinkedRoleOutputBody: Swift.Equatable { - let deletionTaskId: Swift.String? -} - -extension DeleteServiceLinkedRoleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deletionTaskId = "DeletionTaskId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteServiceLinkedRoleResult")) - let deletionTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deletionTaskId) - deletionTaskId = deletionTaskIdDecoded - } -} +enum DeleteServiceLinkedRoleOutputError { -enum DeleteServiceLinkedRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteServiceSpecificCredentialInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serviceSpecificCredentialId = "ServiceSpecificCredentialId" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serviceSpecificCredentialId = serviceSpecificCredentialId { @@ -4902,28 +4173,12 @@ public struct DeleteServiceSpecificCredentialInput: Swift.Equatable { } } -struct DeleteServiceSpecificCredentialInputBody: Swift.Equatable { - let userName: Swift.String? - let serviceSpecificCredentialId: Swift.String? -} - -extension DeleteServiceSpecificCredentialInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceSpecificCredentialId = "ServiceSpecificCredentialId" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serviceSpecificCredentialIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceSpecificCredentialId) - serviceSpecificCredentialId = serviceSpecificCredentialIdDecoded - } -} +extension DeleteServiceSpecificCredentialOutput { -extension DeleteServiceSpecificCredentialOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteServiceSpecificCredentialOutput() + } } } @@ -4932,17 +4187,29 @@ public struct DeleteServiceSpecificCredentialOutput: Swift.Equatable { public init() { } } -enum DeleteServiceSpecificCredentialOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteServiceSpecificCredentialOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteSigningCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateId = "CertificateId" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificateId = certificateId { @@ -4980,28 +4247,12 @@ public struct DeleteSigningCertificateInput: Swift.Equatable { } } -struct DeleteSigningCertificateInputBody: Swift.Equatable { - let userName: Swift.String? - let certificateId: Swift.String? -} - -extension DeleteSigningCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateId = "CertificateId" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let certificateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateId) - certificateId = certificateIdDecoded - } -} +extension DeleteSigningCertificateOutput { -extension DeleteSigningCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSigningCertificateOutput() + } } } @@ -5010,20 +4261,31 @@ public struct DeleteSigningCertificateOutput: Swift.Equatable { public init() { } } -enum DeleteSigningCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteSigningCertificateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userName = userName { @@ -5054,24 +4316,12 @@ public struct DeleteUserInput: Swift.Equatable { } } -struct DeleteUserInputBody: Swift.Equatable { - let userName: Swift.String? -} - -extension DeleteUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension DeleteUserOutput { -extension DeleteUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteUserOutput() + } } } @@ -5080,21 +4330,32 @@ public struct DeleteUserOutput: Swift.Equatable { public init() { } } -enum DeleteUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DeleteConflict": return try await DeleteConflictException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteUserOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DeleteConflict": return try await DeleteConflictException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteUserPermissionsBoundaryInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userName = userName { @@ -5125,24 +4386,12 @@ public struct DeleteUserPermissionsBoundaryInput: Swift.Equatable { } } -struct DeleteUserPermissionsBoundaryInputBody: Swift.Equatable { - let userName: Swift.String? -} - -extension DeleteUserPermissionsBoundaryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension DeleteUserPermissionsBoundaryOutput { -extension DeleteUserPermissionsBoundaryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteUserPermissionsBoundaryOutput() + } } } @@ -5151,18 +4400,30 @@ public struct DeleteUserPermissionsBoundaryOutput: Swift.Equatable { public init() { } } -enum DeleteUserPermissionsBoundaryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteUserPermissionsBoundaryOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteUserPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyName = "PolicyName" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyName = policyName { @@ -5201,28 +4462,12 @@ public struct DeleteUserPolicyInput: Swift.Equatable { } } -struct DeleteUserPolicyInputBody: Swift.Equatable { - let userName: Swift.String? - let policyName: Swift.String? -} - -extension DeleteUserPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyName = "PolicyName" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - } -} +extension DeleteUserPolicyOutput { -extension DeleteUserPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteUserPolicyOutput() + } } } @@ -5231,19 +4476,30 @@ public struct DeleteUserPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteUserPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteUserPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteVirtualMFADeviceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serialNumber = "SerialNumber" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serialNumber = serialNumber { @@ -5274,24 +4530,12 @@ public struct DeleteVirtualMFADeviceInput: Swift.Equatable { } } -struct DeleteVirtualMFADeviceInputBody: Swift.Equatable { - let serialNumber: Swift.String? -} - -extension DeleteVirtualMFADeviceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serialNumber = "SerialNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - } -} +extension DeleteVirtualMFADeviceOutput { -extension DeleteVirtualMFADeviceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteVirtualMFADeviceOutput() + } } } @@ -5300,21 +4544,28 @@ public struct DeleteVirtualMFADeviceOutput: Swift.Equatable { public init() { } } -enum DeleteVirtualMFADeviceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DeleteConflict": return try await DeleteConflictException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteVirtualMFADeviceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DeleteConflict": return try await DeleteConflictException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension IAMClientTypes.DeletionTaskFailureReasonType: Swift.Codable { +extension IAMClientTypes.DeletionTaskFailureReasonType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case reason = "Reason" case roleUsageList = "RoleUsageList" @@ -5339,28 +4590,13 @@ extension IAMClientTypes.DeletionTaskFailureReasonType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reason) - reason = reasonDecoded - if containerValues.contains(.roleUsageList) { - struct KeyVal0{struct member{}} - let roleUsageListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .roleUsageList) - if let roleUsageListWrappedContainer = roleUsageListWrappedContainer { - let roleUsageListContainer = try roleUsageListWrappedContainer.decodeIfPresent([IAMClientTypes.RoleUsageType].self, forKey: .member) - var roleUsageListBuffer:[IAMClientTypes.RoleUsageType]? = nil - if let roleUsageListContainer = roleUsageListContainer { - roleUsageListBuffer = [IAMClientTypes.RoleUsageType]() - for structureContainer0 in roleUsageListContainer { - roleUsageListBuffer?.append(structureContainer0) - } - } - roleUsageList = roleUsageListBuffer - } else { - roleUsageList = [] - } - } else { - roleUsageList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.DeletionTaskFailureReasonType() + value.reason = try reader["Reason"].readIfPresent() + value.roleUsageList = try reader["RoleUsageList"].readListIfPresent(memberReadingClosure: IAMClientTypes.RoleUsageType.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5424,6 +4660,11 @@ extension IAMClientTypes { } extension DetachGroupPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case policyArn = "PolicyArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -5462,28 +4703,12 @@ public struct DetachGroupPolicyInput: Swift.Equatable { } } -struct DetachGroupPolicyInputBody: Swift.Equatable { - let groupName: Swift.String? - let policyArn: Swift.String? -} - -extension DetachGroupPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case policyArn = "PolicyArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - } -} +extension DetachGroupPolicyOutput { -extension DetachGroupPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachGroupPolicyOutput() + } } } @@ -5492,20 +4717,32 @@ public struct DetachGroupPolicyOutput: Swift.Equatable { public init() { } } -enum DetachGroupPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DetachGroupPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DetachRolePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -5544,28 +4781,12 @@ public struct DetachRolePolicyInput: Swift.Equatable { } } -struct DetachRolePolicyInputBody: Swift.Equatable { - let roleName: Swift.String? - let policyArn: Swift.String? -} - -extension DetachRolePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case roleName = "RoleName" - } +extension DetachRolePolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - } -} - -extension DetachRolePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachRolePolicyOutput() + } } } @@ -5574,21 +4795,33 @@ public struct DetachRolePolicyOutput: Swift.Equatable { public init() { } } -enum DetachRolePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DetachRolePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } -} +} + +extension DetachUserPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case userName = "UserName" + } -extension DetachUserPolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -5627,28 +4860,12 @@ public struct DetachUserPolicyInput: Swift.Equatable { } } -struct DetachUserPolicyInputBody: Swift.Equatable { - let userName: Swift.String? - let policyArn: Swift.String? -} - -extension DetachUserPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - } -} +extension DetachUserPolicyOutput { -extension DetachUserPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DetachUserPolicyOutput() + } } } @@ -5657,30 +4874,35 @@ public struct DetachUserPolicyOutput: Swift.Equatable { public init() { } } -enum DetachUserPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DetachUserPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DuplicateCertificateException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateCertificateException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5708,33 +4930,15 @@ public struct DuplicateCertificateException: ClientRuntime.ModeledError, AWSClie } } -struct DuplicateCertificateExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateCertificateExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DuplicateSSHPublicKeyException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DuplicateSSHPublicKeyException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5762,23 +4966,14 @@ public struct DuplicateSSHPublicKeyException: ClientRuntime.ModeledError, AWSCli } } -struct DuplicateSSHPublicKeyExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension DuplicateSSHPublicKeyExceptionBody: Swift.Decodable { +extension EnableMFADeviceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case authenticationCode1 = "AuthenticationCode1" + case authenticationCode2 = "AuthenticationCode2" + case serialNumber = "SerialNumber" + case userName = "UserName" } -} -extension EnableMFADeviceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authenticationCode1 = authenticationCode1 { @@ -5833,36 +5028,12 @@ public struct EnableMFADeviceInput: Swift.Equatable { } } -struct EnableMFADeviceInputBody: Swift.Equatable { - let userName: Swift.String? - let serialNumber: Swift.String? - let authenticationCode1: Swift.String? - let authenticationCode2: Swift.String? -} - -extension EnableMFADeviceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationCode1 = "AuthenticationCode1" - case authenticationCode2 = "AuthenticationCode2" - case serialNumber = "SerialNumber" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - let authenticationCode1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationCode1) - authenticationCode1 = authenticationCode1Decoded - let authenticationCode2Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationCode2) - authenticationCode2 = authenticationCode2Decoded - } -} +extension EnableMFADeviceOutput { -extension EnableMFADeviceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return EnableMFADeviceOutput() + } } } @@ -5871,18 +5042,25 @@ public struct EnableMFADeviceOutput: Swift.Equatable { public init() { } } -enum EnableMFADeviceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidAuthenticationCode": return try await InvalidAuthenticationCodeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum EnableMFADeviceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidAuthenticationCode": return try await InvalidAuthenticationCodeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -5920,16 +5098,14 @@ extension IAMClientTypes { } extension EntityAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EntityAlreadyExistsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5957,23 +5133,7 @@ public struct EntityAlreadyExistsException: ClientRuntime.ModeledError, AWSClien } } -struct EntityAlreadyExistsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension EntityAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension IAMClientTypes.EntityDetails: Swift.Codable { +extension IAMClientTypes.EntityDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case entityInfo = "EntityInfo" case lastAuthenticated = "LastAuthenticated" @@ -5989,12 +5149,14 @@ extension IAMClientTypes.EntityDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let entityInfoDecoded = try containerValues.decodeIfPresent(IAMClientTypes.EntityInfo.self, forKey: .entityInfo) - entityInfo = entityInfoDecoded - let lastAuthenticatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastAuthenticated) - lastAuthenticated = lastAuthenticatedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.EntityDetails() + value.entityInfo = try reader["EntityInfo"].readIfPresent(readingClosure: IAMClientTypes.EntityInfo.readingClosure) + value.lastAuthenticated = try reader["LastAuthenticated"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -6019,7 +5181,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.EntityInfo: Swift.Codable { +extension IAMClientTypes.EntityInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case id = "Id" @@ -6047,18 +5209,17 @@ extension IAMClientTypes.EntityInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let typeDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyOwnerEntityType.self, forKey: .type) - type = typeDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.EntityInfo() + value.arn = try reader["Arn"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + value.id = try reader["Id"].readIfPresent() + value.path = try reader["Path"].readIfPresent() + return value + } } } @@ -6099,16 +5260,14 @@ extension IAMClientTypes { } extension EntityTemporarilyUnmodifiableException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EntityTemporarilyUnmodifiableException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6136,22 +5295,6 @@ public struct EntityTemporarilyUnmodifiableException: ClientRuntime.ModeledError } } -struct EntityTemporarilyUnmodifiableExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension EntityTemporarilyUnmodifiableExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IAMClientTypes { public enum EntityType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case awsmanagedpolicy @@ -6193,7 +5336,7 @@ extension IAMClientTypes { } } -extension IAMClientTypes.ErrorDetails: Swift.Codable { +extension IAMClientTypes.ErrorDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case code = "Code" case message = "Message" @@ -6209,12 +5352,14 @@ extension IAMClientTypes.ErrorDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ErrorDetails() + value.message = try reader["Message"].readIfPresent() + value.code = try reader["Code"].readIfPresent() + return value + } } } @@ -6240,7 +5385,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.EvaluationResult: Swift.Codable { +extension IAMClientTypes.EvaluationResult: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case evalActionName = "EvalActionName" case evalDecision = "EvalDecision" @@ -6320,93 +5465,20 @@ extension IAMClientTypes.EvaluationResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let evalActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .evalActionName) - evalActionName = evalActionNameDecoded - let evalResourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .evalResourceName) - evalResourceName = evalResourceNameDecoded - let evalDecisionDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyEvaluationDecisionType.self, forKey: .evalDecision) - evalDecision = evalDecisionDecoded - if containerValues.contains(.matchedStatements) { - struct KeyVal0{struct member{}} - let matchedStatementsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchedStatements) - if let matchedStatementsWrappedContainer = matchedStatementsWrappedContainer { - let matchedStatementsContainer = try matchedStatementsWrappedContainer.decodeIfPresent([IAMClientTypes.Statement].self, forKey: .member) - var matchedStatementsBuffer:[IAMClientTypes.Statement]? = nil - if let matchedStatementsContainer = matchedStatementsContainer { - matchedStatementsBuffer = [IAMClientTypes.Statement]() - for structureContainer0 in matchedStatementsContainer { - matchedStatementsBuffer?.append(structureContainer0) - } - } - matchedStatements = matchedStatementsBuffer - } else { - matchedStatements = [] - } - } else { - matchedStatements = nil - } - if containerValues.contains(.missingContextValues) { - struct KeyVal0{struct member{}} - let missingContextValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .missingContextValues) - if let missingContextValuesWrappedContainer = missingContextValuesWrappedContainer { - let missingContextValuesContainer = try missingContextValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var missingContextValuesBuffer:[Swift.String]? = nil - if let missingContextValuesContainer = missingContextValuesContainer { - missingContextValuesBuffer = [Swift.String]() - for stringContainer0 in missingContextValuesContainer { - missingContextValuesBuffer?.append(stringContainer0) - } - } - missingContextValues = missingContextValuesBuffer - } else { - missingContextValues = [] - } - } else { - missingContextValues = nil - } - let organizationsDecisionDetailDecoded = try containerValues.decodeIfPresent(IAMClientTypes.OrganizationsDecisionDetail.self, forKey: .organizationsDecisionDetail) - organizationsDecisionDetail = organizationsDecisionDetailDecoded - let permissionsBoundaryDecisionDetailDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PermissionsBoundaryDecisionDetail.self, forKey: .permissionsBoundaryDecisionDetail) - permissionsBoundaryDecisionDetail = permissionsBoundaryDecisionDetailDecoded - if containerValues.contains(.evalDecisionDetails) { - struct KeyVal0{struct key{}; struct value{}} - let evalDecisionDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .evalDecisionDetails) - if let evalDecisionDetailsWrappedContainer = evalDecisionDetailsWrappedContainer { - let evalDecisionDetailsContainer = try evalDecisionDetailsWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var evalDecisionDetailsBuffer: [Swift.String:IAMClientTypes.PolicyEvaluationDecisionType]? = nil - if let evalDecisionDetailsContainer = evalDecisionDetailsContainer { - evalDecisionDetailsBuffer = [Swift.String:IAMClientTypes.PolicyEvaluationDecisionType]() - for enumContainer0 in evalDecisionDetailsContainer { - evalDecisionDetailsBuffer?[enumContainer0.key] = enumContainer0.value - } - } - evalDecisionDetails = evalDecisionDetailsBuffer - } else { - evalDecisionDetails = [:] - } - } else { - evalDecisionDetails = nil - } - if containerValues.contains(.resourceSpecificResults) { - struct KeyVal0{struct member{}} - let resourceSpecificResultsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceSpecificResults) - if let resourceSpecificResultsWrappedContainer = resourceSpecificResultsWrappedContainer { - let resourceSpecificResultsContainer = try resourceSpecificResultsWrappedContainer.decodeIfPresent([IAMClientTypes.ResourceSpecificResult].self, forKey: .member) - var resourceSpecificResultsBuffer:[IAMClientTypes.ResourceSpecificResult]? = nil - if let resourceSpecificResultsContainer = resourceSpecificResultsContainer { - resourceSpecificResultsBuffer = [IAMClientTypes.ResourceSpecificResult]() - for structureContainer0 in resourceSpecificResultsContainer { - resourceSpecificResultsBuffer?.append(structureContainer0) - } - } - resourceSpecificResults = resourceSpecificResultsBuffer - } else { - resourceSpecificResults = [] - } - } else { - resourceSpecificResults = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.EvaluationResult() + value.evalActionName = try reader["EvalActionName"].readIfPresent() + value.evalResourceName = try reader["EvalResourceName"].readIfPresent() + value.evalDecision = try reader["EvalDecision"].readIfPresent() + value.matchedStatements = try reader["MatchedStatements"].readListIfPresent(memberReadingClosure: IAMClientTypes.Statement.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.missingContextValues = try reader["MissingContextValues"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.organizationsDecisionDetail = try reader["OrganizationsDecisionDetail"].readIfPresent(readingClosure: IAMClientTypes.OrganizationsDecisionDetail.readingClosure) + value.permissionsBoundaryDecisionDetail = try reader["PermissionsBoundaryDecisionDetail"].readIfPresent(readingClosure: IAMClientTypes.PermissionsBoundaryDecisionDetail.readingClosure) + value.evalDecisionDetails = try reader["EvalDecisionDetails"].readMapIfPresent(valueReadingClosure: IAMClientTypes.PolicyEvaluationDecisionType.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.resourceSpecificResults = try reader["ResourceSpecificResults"].readListIfPresent(memberReadingClosure: IAMClientTypes.ResourceSpecificResult.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6462,6 +5534,7 @@ extension IAMClientTypes { } extension GenerateCredentialReportInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GenerateCredentialReport", forKey:ClientRuntime.Key("Action")) @@ -6481,16 +5554,16 @@ public struct GenerateCredentialReportInput: Swift.Equatable { public init() { } } -extension GenerateCredentialReportOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GenerateCredentialReportOutputBody = try responseDecoder.decode(responseBody: data) - self.description = output.description - self.state = output.state - } else { - self.description = nil - self.state = nil +extension GenerateCredentialReportOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GenerateCredentialReportResult"] + var value = GenerateCredentialReportOutput() + value.description = try reader["Description"].readIfPresent() + value.state = try reader["State"].readIfPresent() + return value } } } @@ -6512,39 +5585,30 @@ public struct GenerateCredentialReportOutput: Swift.Equatable { } } -struct GenerateCredentialReportOutputBody: Swift.Equatable { - let state: IAMClientTypes.ReportStateType? - let description: Swift.String? -} - -extension GenerateCredentialReportOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case state = "State" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GenerateCredentialReportResult")) - let stateDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ReportStateType.self, forKey: .state) - state = stateDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - } -} +enum GenerateCredentialReportOutputError { -enum GenerateCredentialReportOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GenerateOrganizationsAccessReportInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case entityPath = "EntityPath" + case organizationsPolicyId = "OrganizationsPolicyId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let entityPath = entityPath { @@ -6582,34 +5646,15 @@ public struct GenerateOrganizationsAccessReportInput: Swift.Equatable { } } -struct GenerateOrganizationsAccessReportInputBody: Swift.Equatable { - let entityPath: Swift.String? - let organizationsPolicyId: Swift.String? -} - -extension GenerateOrganizationsAccessReportInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case entityPath = "EntityPath" - case organizationsPolicyId = "OrganizationsPolicyId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let entityPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .entityPath) - entityPath = entityPathDecoded - let organizationsPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organizationsPolicyId) - organizationsPolicyId = organizationsPolicyIdDecoded - } -} +extension GenerateOrganizationsAccessReportOutput { -extension GenerateOrganizationsAccessReportOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GenerateOrganizationsAccessReportOutputBody = try responseDecoder.decode(responseBody: data) - self.jobId = output.jobId - } else { - self.jobId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GenerateOrganizationsAccessReportResult"] + var value = GenerateOrganizationsAccessReportOutput() + value.jobId = try reader["JobId"].readIfPresent() + return value } } } @@ -6626,34 +5671,29 @@ public struct GenerateOrganizationsAccessReportOutput: Swift.Equatable { } } -struct GenerateOrganizationsAccessReportOutputBody: Swift.Equatable { - let jobId: Swift.String? -} - -extension GenerateOrganizationsAccessReportOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobId = "JobId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GenerateOrganizationsAccessReportResult")) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - } -} +enum GenerateOrganizationsAccessReportOutputError { -enum GenerateOrganizationsAccessReportOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ReportGenerationLimitExceeded": return try await ReportGenerationLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ReportGenerationLimitExceeded": return try await ReportGenerationLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GenerateServiceLastAccessedDetailsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case granularity = "Granularity" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -6691,34 +5731,15 @@ public struct GenerateServiceLastAccessedDetailsInput: Swift.Equatable { } } -struct GenerateServiceLastAccessedDetailsInputBody: Swift.Equatable { - let arn: Swift.String? - let granularity: IAMClientTypes.AccessAdvisorUsageGranularityType? -} - -extension GenerateServiceLastAccessedDetailsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case granularity = "Granularity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let granularityDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AccessAdvisorUsageGranularityType.self, forKey: .granularity) - granularity = granularityDecoded - } -} +extension GenerateServiceLastAccessedDetailsOutput { -extension GenerateServiceLastAccessedDetailsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GenerateServiceLastAccessedDetailsOutputBody = try responseDecoder.decode(responseBody: data) - self.jobId = output.jobId - } else { - self.jobId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GenerateServiceLastAccessedDetailsResult"] + var value = GenerateServiceLastAccessedDetailsOutput() + value.jobId = try reader["JobId"].readIfPresent() + return value } } } @@ -6735,35 +5756,29 @@ public struct GenerateServiceLastAccessedDetailsOutput: Swift.Equatable { } } -struct GenerateServiceLastAccessedDetailsOutputBody: Swift.Equatable { - let jobId: Swift.String? -} - -extension GenerateServiceLastAccessedDetailsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobId = "JobId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GenerateServiceLastAccessedDetailsResult")) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - } -} +enum GenerateServiceLastAccessedDetailsOutputError { -enum GenerateServiceLastAccessedDetailsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetAccessKeyLastUsedInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accessKeyId = "AccessKeyId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accessKeyId = accessKeyId { @@ -6794,32 +5809,16 @@ public struct GetAccessKeyLastUsedInput: Swift.Equatable { } } -struct GetAccessKeyLastUsedInputBody: Swift.Equatable { - let accessKeyId: Swift.String? -} - -extension GetAccessKeyLastUsedInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKeyId = "AccessKeyId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - } -} +extension GetAccessKeyLastUsedOutput { -extension GetAccessKeyLastUsedOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessKeyLastUsedOutputBody = try responseDecoder.decode(responseBody: data) - self.accessKeyLastUsed = output.accessKeyLastUsed - self.userName = output.userName - } else { - self.accessKeyLastUsed = nil - self.userName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetAccessKeyLastUsedResult"] + var value = GetAccessKeyLastUsedOutput() + value.accessKeyLastUsed = try reader["AccessKeyLastUsed"].readIfPresent(readingClosure: IAMClientTypes.AccessKeyLastUsed.readingClosure) + value.userName = try reader["UserName"].readIfPresent() + return value } } } @@ -6841,37 +5840,29 @@ public struct GetAccessKeyLastUsedOutput: Swift.Equatable { } } -struct GetAccessKeyLastUsedOutputBody: Swift.Equatable { - let userName: Swift.String? - let accessKeyLastUsed: IAMClientTypes.AccessKeyLastUsed? -} - -extension GetAccessKeyLastUsedOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKeyLastUsed = "AccessKeyLastUsed" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetAccessKeyLastUsedResult")) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let accessKeyLastUsedDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AccessKeyLastUsed.self, forKey: .accessKeyLastUsed) - accessKeyLastUsed = accessKeyLastUsedDecoded - } -} +enum GetAccessKeyLastUsedOutputError { -enum GetAccessKeyLastUsedOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetAccountAuthorizationDetailsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filter = "Filter" + case marker = "Marker" + case maxItems = "MaxItems" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filter = filter { @@ -6924,65 +5915,20 @@ public struct GetAccountAuthorizationDetailsInput: Swift.Equatable { } } -struct GetAccountAuthorizationDetailsInputBody: Swift.Equatable { - let filter: [IAMClientTypes.EntityType]? - let maxItems: Swift.Int? - let marker: Swift.String? -} - -extension GetAccountAuthorizationDetailsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "Filter" - case marker = "Marker" - case maxItems = "MaxItems" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filter) { - struct KeyVal0{struct member{}} - let filterWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filter) - if let filterWrappedContainer = filterWrappedContainer { - let filterContainer = try filterWrappedContainer.decodeIfPresent([IAMClientTypes.EntityType].self, forKey: .member) - var filterBuffer:[IAMClientTypes.EntityType]? = nil - if let filterContainer = filterContainer { - filterBuffer = [IAMClientTypes.EntityType]() - for enumContainer0 in filterContainer { - filterBuffer?.append(enumContainer0) - } - } - filter = filterBuffer - } else { - filter = [] - } - } else { - filter = nil - } - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension GetAccountAuthorizationDetailsOutput { -extension GetAccountAuthorizationDetailsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccountAuthorizationDetailsOutputBody = try responseDecoder.decode(responseBody: data) - self.groupDetailList = output.groupDetailList - self.isTruncated = output.isTruncated - self.marker = output.marker - self.policies = output.policies - self.roleDetailList = output.roleDetailList - self.userDetailList = output.userDetailList - } else { - self.groupDetailList = nil - self.isTruncated = false - self.marker = nil - self.policies = nil - self.roleDetailList = nil - self.userDetailList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetAccountAuthorizationDetailsResult"] + var value = GetAccountAuthorizationDetailsOutput() + value.groupDetailList = try reader["GroupDetailList"].readListIfPresent(memberReadingClosure: IAMClientTypes.GroupDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.policies = try reader["Policies"].readListIfPresent(memberReadingClosure: IAMClientTypes.ManagedPolicyDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.roleDetailList = try reader["RoleDetailList"].readListIfPresent(memberReadingClosure: IAMClientTypes.RoleDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.userDetailList = try reader["UserDetailList"].readListIfPresent(memberReadingClosure: IAMClientTypes.UserDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7020,122 +5966,25 @@ public struct GetAccountAuthorizationDetailsOutput: Swift.Equatable { } } -struct GetAccountAuthorizationDetailsOutputBody: Swift.Equatable { - let userDetailList: [IAMClientTypes.UserDetail]? - let groupDetailList: [IAMClientTypes.GroupDetail]? - let roleDetailList: [IAMClientTypes.RoleDetail]? - let policies: [IAMClientTypes.ManagedPolicyDetail]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum GetAccountAuthorizationDetailsOutputError { -extension GetAccountAuthorizationDetailsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupDetailList = "GroupDetailList" - case isTruncated = "IsTruncated" - case marker = "Marker" - case policies = "Policies" - case roleDetailList = "RoleDetailList" - case userDetailList = "UserDetailList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetAccountAuthorizationDetailsResult")) - if containerValues.contains(.userDetailList) { - struct KeyVal0{struct member{}} - let userDetailListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userDetailList) - if let userDetailListWrappedContainer = userDetailListWrappedContainer { - let userDetailListContainer = try userDetailListWrappedContainer.decodeIfPresent([IAMClientTypes.UserDetail].self, forKey: .member) - var userDetailListBuffer:[IAMClientTypes.UserDetail]? = nil - if let userDetailListContainer = userDetailListContainer { - userDetailListBuffer = [IAMClientTypes.UserDetail]() - for structureContainer0 in userDetailListContainer { - userDetailListBuffer?.append(structureContainer0) - } - } - userDetailList = userDetailListBuffer - } else { - userDetailList = [] - } - } else { - userDetailList = nil - } - if containerValues.contains(.groupDetailList) { - struct KeyVal0{struct member{}} - let groupDetailListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupDetailList) - if let groupDetailListWrappedContainer = groupDetailListWrappedContainer { - let groupDetailListContainer = try groupDetailListWrappedContainer.decodeIfPresent([IAMClientTypes.GroupDetail].self, forKey: .member) - var groupDetailListBuffer:[IAMClientTypes.GroupDetail]? = nil - if let groupDetailListContainer = groupDetailListContainer { - groupDetailListBuffer = [IAMClientTypes.GroupDetail]() - for structureContainer0 in groupDetailListContainer { - groupDetailListBuffer?.append(structureContainer0) - } - } - groupDetailList = groupDetailListBuffer - } else { - groupDetailList = [] - } - } else { - groupDetailList = nil - } - if containerValues.contains(.roleDetailList) { - struct KeyVal0{struct member{}} - let roleDetailListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .roleDetailList) - if let roleDetailListWrappedContainer = roleDetailListWrappedContainer { - let roleDetailListContainer = try roleDetailListWrappedContainer.decodeIfPresent([IAMClientTypes.RoleDetail].self, forKey: .member) - var roleDetailListBuffer:[IAMClientTypes.RoleDetail]? = nil - if let roleDetailListContainer = roleDetailListContainer { - roleDetailListBuffer = [IAMClientTypes.RoleDetail]() - for structureContainer0 in roleDetailListContainer { - roleDetailListBuffer?.append(structureContainer0) - } - } - roleDetailList = roleDetailListBuffer - } else { - roleDetailList = [] - } - } else { - roleDetailList = nil - } - if containerValues.contains(.policies) { - struct KeyVal0{struct member{}} - let policiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policies) - if let policiesWrappedContainer = policiesWrappedContainer { - let policiesContainer = try policiesWrappedContainer.decodeIfPresent([IAMClientTypes.ManagedPolicyDetail].self, forKey: .member) - var policiesBuffer:[IAMClientTypes.ManagedPolicyDetail]? = nil - if let policiesContainer = policiesContainer { - policiesBuffer = [IAMClientTypes.ManagedPolicyDetail]() - for structureContainer0 in policiesContainer { - policiesBuffer?.append(structureContainer0) - } - } - policies = policiesBuffer - } else { - policies = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policies = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum GetAccountAuthorizationDetailsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension GetAccountPasswordPolicyInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GetAccountPasswordPolicy", forKey:ClientRuntime.Key("Action")) @@ -7155,14 +6004,15 @@ public struct GetAccountPasswordPolicyInput: Swift.Equatable { public init() { } } -extension GetAccountPasswordPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccountPasswordPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.passwordPolicy = output.passwordPolicy - } else { - self.passwordPolicy = nil +extension GetAccountPasswordPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetAccountPasswordPolicyResult"] + var value = GetAccountPasswordPolicyOutput() + value.passwordPolicy = try reader["PasswordPolicy"].readIfPresent(readingClosure: IAMClientTypes.PasswordPolicy.readingClosure) + return value } } } @@ -7181,35 +6031,26 @@ public struct GetAccountPasswordPolicyOutput: Swift.Equatable { } } -struct GetAccountPasswordPolicyOutputBody: Swift.Equatable { - let passwordPolicy: IAMClientTypes.PasswordPolicy? -} - -extension GetAccountPasswordPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case passwordPolicy = "PasswordPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetAccountPasswordPolicyResult")) - let passwordPolicyDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PasswordPolicy.self, forKey: .passwordPolicy) - passwordPolicy = passwordPolicyDecoded - } -} +enum GetAccountPasswordPolicyOutputError { -enum GetAccountPasswordPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetAccountSummaryInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GetAccountSummary", forKey:ClientRuntime.Key("Action")) @@ -7229,14 +6070,15 @@ public struct GetAccountSummaryInput: Swift.Equatable { public init() { } } -extension GetAccountSummaryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccountSummaryOutputBody = try responseDecoder.decode(responseBody: data) - self.summaryMap = output.summaryMap - } else { - self.summaryMap = nil +extension GetAccountSummaryOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetAccountSummaryResult"] + var value = GetAccountSummaryOutput() + value.summaryMap = try reader["SummaryMap"].readMapIfPresent(valueReadingClosure: Swift.Int.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -7254,51 +6096,28 @@ public struct GetAccountSummaryOutput: Swift.Equatable { } } -struct GetAccountSummaryOutputBody: Swift.Equatable { - let summaryMap: [Swift.String:Swift.Int]? -} +enum GetAccountSummaryOutputError { -extension GetAccountSummaryOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case summaryMap = "SummaryMap" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetAccountSummaryResult")) - if containerValues.contains(.summaryMap) { - struct KeyVal0{struct key{}; struct value{}} - let summaryMapWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .summaryMap) - if let summaryMapWrappedContainer = summaryMapWrappedContainer { - let summaryMapContainer = try summaryMapWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var summaryMapBuffer: [Swift.String:Swift.Int]? = nil - if let summaryMapContainer = summaryMapContainer { - summaryMapBuffer = [Swift.String:Swift.Int]() - for integerContainer0 in summaryMapContainer { - summaryMapBuffer?[integerContainer0.key] = integerContainer0.value - } - } - summaryMap = summaryMapBuffer - } else { - summaryMap = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - summaryMap = nil } } } -enum GetAccountSummaryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetContextKeysForCustomPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyInputList = "PolicyInputList" } -} -extension GetContextKeysForCustomPolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyInputList = policyInputList { @@ -7344,47 +6163,15 @@ public struct GetContextKeysForCustomPolicyInput: Swift.Equatable { } } -struct GetContextKeysForCustomPolicyInputBody: Swift.Equatable { - let policyInputList: [Swift.String]? -} - -extension GetContextKeysForCustomPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyInputList = "PolicyInputList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.policyInputList) { - struct KeyVal0{struct member{}} - let policyInputListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyInputList) - if let policyInputListWrappedContainer = policyInputListWrappedContainer { - let policyInputListContainer = try policyInputListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyInputListBuffer:[Swift.String]? = nil - if let policyInputListContainer = policyInputListContainer { - policyInputListBuffer = [Swift.String]() - for stringContainer0 in policyInputListContainer { - policyInputListBuffer?.append(stringContainer0) - } - } - policyInputList = policyInputListBuffer - } else { - policyInputList = [] - } - } else { - policyInputList = nil - } - } -} +extension GetContextKeysForCustomPolicyOutput { -extension GetContextKeysForCustomPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetContextKeysForCustomPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.contextKeyNames = output.contextKeyNames - } else { - self.contextKeyNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetContextKeysForCustomPolicyResult"] + var value = GetContextKeysForCustomPolicyOutput() + value.contextKeyNames = try reader["ContextKeyNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7402,51 +6189,29 @@ public struct GetContextKeysForCustomPolicyOutput: Swift.Equatable { } } -struct GetContextKeysForCustomPolicyOutputBody: Swift.Equatable { - let contextKeyNames: [Swift.String]? -} +enum GetContextKeysForCustomPolicyOutputError { -extension GetContextKeysForCustomPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case contextKeyNames = "ContextKeyNames" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetContextKeysForCustomPolicyResult")) - if containerValues.contains(.contextKeyNames) { - struct KeyVal0{struct member{}} - let contextKeyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .contextKeyNames) - if let contextKeyNamesWrappedContainer = contextKeyNamesWrappedContainer { - let contextKeyNamesContainer = try contextKeyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var contextKeyNamesBuffer:[Swift.String]? = nil - if let contextKeyNamesContainer = contextKeyNamesContainer { - contextKeyNamesBuffer = [Swift.String]() - for stringContainer0 in contextKeyNamesContainer { - contextKeyNamesBuffer?.append(stringContainer0) - } - } - contextKeyNames = contextKeyNamesBuffer - } else { - contextKeyNames = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - contextKeyNames = nil } } } -enum GetContextKeysForCustomPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetContextKeysForPrincipalPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyInputList = "PolicyInputList" + case policySourceArn = "PolicySourceArn" } -} -extension GetContextKeysForPrincipalPolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyInputList = policyInputList { @@ -7499,51 +6264,15 @@ public struct GetContextKeysForPrincipalPolicyInput: Swift.Equatable { } } -struct GetContextKeysForPrincipalPolicyInputBody: Swift.Equatable { - let policySourceArn: Swift.String? - let policyInputList: [Swift.String]? -} - -extension GetContextKeysForPrincipalPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyInputList = "PolicyInputList" - case policySourceArn = "PolicySourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policySourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policySourceArn) - policySourceArn = policySourceArnDecoded - if containerValues.contains(.policyInputList) { - struct KeyVal0{struct member{}} - let policyInputListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyInputList) - if let policyInputListWrappedContainer = policyInputListWrappedContainer { - let policyInputListContainer = try policyInputListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyInputListBuffer:[Swift.String]? = nil - if let policyInputListContainer = policyInputListContainer { - policyInputListBuffer = [Swift.String]() - for stringContainer0 in policyInputListContainer { - policyInputListBuffer?.append(stringContainer0) - } - } - policyInputList = policyInputListBuffer - } else { - policyInputList = [] - } - } else { - policyInputList = nil - } - } -} +extension GetContextKeysForPrincipalPolicyOutput { -extension GetContextKeysForPrincipalPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetContextKeysForPrincipalPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.contextKeyNames = output.contextKeyNames - } else { - self.contextKeyNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetContextKeysForPrincipalPolicyResult"] + var value = GetContextKeysForPrincipalPolicyOutput() + value.contextKeyNames = try reader["ContextKeyNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7554,59 +6283,33 @@ public struct GetContextKeysForPrincipalPolicyOutput: Swift.Equatable { public var contextKeyNames: [Swift.String]? public init( - contextKeyNames: [Swift.String]? = nil - ) - { - self.contextKeyNames = contextKeyNames - } -} - -struct GetContextKeysForPrincipalPolicyOutputBody: Swift.Equatable { - let contextKeyNames: [Swift.String]? -} - -extension GetContextKeysForPrincipalPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case contextKeyNames = "ContextKeyNames" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetContextKeysForPrincipalPolicyResult")) - if containerValues.contains(.contextKeyNames) { - struct KeyVal0{struct member{}} - let contextKeyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .contextKeyNames) - if let contextKeyNamesWrappedContainer = contextKeyNamesWrappedContainer { - let contextKeyNamesContainer = try contextKeyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var contextKeyNamesBuffer:[Swift.String]? = nil - if let contextKeyNamesContainer = contextKeyNamesContainer { - contextKeyNamesBuffer = [Swift.String]() - for stringContainer0 in contextKeyNamesContainer { - contextKeyNamesBuffer?.append(stringContainer0) - } - } - contextKeyNames = contextKeyNamesBuffer - } else { - contextKeyNames = [] - } - } else { - contextKeyNames = nil - } + contextKeyNames: [Swift.String]? = nil + ) + { + self.contextKeyNames = contextKeyNames } } -enum GetContextKeysForPrincipalPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum GetContextKeysForPrincipalPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetCredentialReportInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GetCredentialReport", forKey:ClientRuntime.Key("Action")) @@ -7626,18 +6329,17 @@ public struct GetCredentialReportInput: Swift.Equatable { public init() { } } -extension GetCredentialReportOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetCredentialReportOutputBody = try responseDecoder.decode(responseBody: data) - self.content = output.content - self.generatedTime = output.generatedTime - self.reportFormat = output.reportFormat - } else { - self.content = nil - self.generatedTime = nil - self.reportFormat = nil +extension GetCredentialReportOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetCredentialReportResult"] + var value = GetCredentialReportOutput() + value.content = try reader["Content"].readIfPresent() + value.generatedTime = try reader["GeneratedTime"].readTimestampIfPresent(format: .dateTime) + value.reportFormat = try reader["ReportFormat"].readIfPresent() + return value } } } @@ -7663,53 +6365,33 @@ public struct GetCredentialReportOutput: Swift.Equatable { } } -struct GetCredentialReportOutputBody: Swift.Equatable { - let content: ClientRuntime.Data? - let reportFormat: IAMClientTypes.ReportFormatType? - let generatedTime: ClientRuntime.Date? -} - -extension GetCredentialReportOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case content = "Content" - case generatedTime = "GeneratedTime" - case reportFormat = "ReportFormat" - } +enum GetCredentialReportOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetCredentialReportResult")) - if containerValues.contains(.content) { - do { - let contentDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .content) - content = contentDecoded - } catch { - content = "".data(using: .utf8) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ReportExpired": return try await CredentialReportExpiredException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReportNotPresent": return try await CredentialReportNotPresentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReportInProgress": return try await CredentialReportNotReadyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - content = nil } - let reportFormatDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ReportFormatType.self, forKey: .reportFormat) - reportFormat = reportFormatDecoded - let generatedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .generatedTime) - generatedTime = generatedTimeDecoded } } -enum GetCredentialReportOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ReportExpired": return try await CredentialReportExpiredException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReportNotPresent": return try await CredentialReportNotPresentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReportInProgress": return try await CredentialReportNotReadyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case marker = "Marker" + case maxItems = "MaxItems" } -} -extension GetGroupInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -7754,44 +6436,18 @@ public struct GetGroupInput: Swift.Equatable { } } -struct GetGroupInputBody: Swift.Equatable { - let groupName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension GetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case marker = "Marker" - case maxItems = "MaxItems" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension GetGroupOutput { -extension GetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.group = output.group - self.isTruncated = output.isTruncated - self.marker = output.marker - self.users = output.users - } else { - self.group = nil - self.isTruncated = false - self.marker = nil - self.users = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetGroupResult"] + var value = GetGroupOutput() + value.group = try reader["Group"].readIfPresent(readingClosure: IAMClientTypes.Group.readingClosure) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.users = try reader["Users"].readListIfPresent(memberReadingClosure: IAMClientTypes.User.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7823,64 +6479,30 @@ public struct GetGroupOutput: Swift.Equatable { } } -struct GetGroupOutputBody: Swift.Equatable { - let group: IAMClientTypes.Group? - let users: [IAMClientTypes.User]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum GetGroupOutputError { -extension GetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case group = "Group" - case isTruncated = "IsTruncated" - case marker = "Marker" - case users = "Users" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetGroupResult")) - let groupDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Group.self, forKey: .group) - group = groupDecoded - if containerValues.contains(.users) { - struct KeyVal0{struct member{}} - let usersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .users) - if let usersWrappedContainer = usersWrappedContainer { - let usersContainer = try usersWrappedContainer.decodeIfPresent([IAMClientTypes.User].self, forKey: .member) - var usersBuffer:[IAMClientTypes.User]? = nil - if let usersContainer = usersContainer { - usersBuffer = [IAMClientTypes.User]() - for structureContainer0 in usersContainer { - usersBuffer?.append(structureContainer0) - } - } - users = usersBuffer - } else { - users = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - users = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum GetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetGroupPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case policyName = "PolicyName" } -} -extension GetGroupPolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -7919,38 +6541,17 @@ public struct GetGroupPolicyInput: Swift.Equatable { } } -struct GetGroupPolicyInputBody: Swift.Equatable { - let groupName: Swift.String? - let policyName: Swift.String? -} - -extension GetGroupPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - } -} +extension GetGroupPolicyOutput { -extension GetGroupPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetGroupPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.groupName = output.groupName - self.policyDocument = output.policyDocument - self.policyName = output.policyName - } else { - self.groupName = nil - self.policyDocument = nil - self.policyName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetGroupPolicyResult"] + var value = GetGroupPolicyOutput() + value.groupName = try reader["GroupName"].readIfPresent() + value.policyDocument = try reader["PolicyDocument"].readIfPresent() + value.policyName = try reader["PolicyName"].readIfPresent() + return value } } } @@ -7979,43 +6580,29 @@ public struct GetGroupPolicyOutput: Swift.Equatable { } } -struct GetGroupPolicyOutputBody: Swift.Equatable { - let groupName: Swift.String? - let policyName: Swift.String? - let policyDocument: Swift.String? -} - -extension GetGroupPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case policyDocument = "PolicyDocument" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetGroupPolicyResult")) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} +enum GetGroupPolicyOutputError { -enum GetGroupPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetInstanceProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceProfileName = "InstanceProfileName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceProfileName = instanceProfileName { @@ -8046,30 +6633,15 @@ public struct GetInstanceProfileInput: Swift.Equatable { } } -struct GetInstanceProfileInputBody: Swift.Equatable { - let instanceProfileName: Swift.String? -} - -extension GetInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfileName = "InstanceProfileName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - } -} +extension GetInstanceProfileOutput { -extension GetInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetInstanceProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceProfile = output.instanceProfile - } else { - self.instanceProfile = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetInstanceProfileResult"] + var value = GetInstanceProfileOutput() + value.instanceProfile = try reader["InstanceProfile"].readIfPresent(readingClosure: IAMClientTypes.InstanceProfile.readingClosure) + return value } } } @@ -8088,35 +6660,29 @@ public struct GetInstanceProfileOutput: Swift.Equatable { } } -struct GetInstanceProfileOutputBody: Swift.Equatable { - let instanceProfile: IAMClientTypes.InstanceProfile? -} - -extension GetInstanceProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfile = "InstanceProfile" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetInstanceProfileResult")) - let instanceProfileDecoded = try containerValues.decodeIfPresent(IAMClientTypes.InstanceProfile.self, forKey: .instanceProfile) - instanceProfile = instanceProfileDecoded - } -} +enum GetInstanceProfileOutputError { -enum GetInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetLoginProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userName = userName { @@ -8147,30 +6713,15 @@ public struct GetLoginProfileInput: Swift.Equatable { } } -struct GetLoginProfileInputBody: Swift.Equatable { - let userName: Swift.String? -} - -extension GetLoginProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension GetLoginProfileOutput { -extension GetLoginProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetLoginProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.loginProfile = output.loginProfile - } else { - self.loginProfile = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetLoginProfileResult"] + var value = GetLoginProfileOutput() + value.loginProfile = try reader["LoginProfile"].readIfPresent(readingClosure: IAMClientTypes.LoginProfile.readingClosure) + return value } } } @@ -8189,35 +6740,30 @@ public struct GetLoginProfileOutput: Swift.Equatable { } } -struct GetLoginProfileOutputBody: Swift.Equatable { - let loginProfile: IAMClientTypes.LoginProfile? -} - -extension GetLoginProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loginProfile = "LoginProfile" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetLoginProfileResult")) - let loginProfileDecoded = try containerValues.decodeIfPresent(IAMClientTypes.LoginProfile.self, forKey: .loginProfile) - loginProfile = loginProfileDecoded - } -} +enum GetLoginProfileOutputError { -enum GetLoginProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetMFADeviceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serialNumber = "SerialNumber" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serialNumber = serialNumber { @@ -8255,40 +6801,18 @@ public struct GetMFADeviceInput: Swift.Equatable { } } -struct GetMFADeviceInputBody: Swift.Equatable { - let serialNumber: Swift.String? - let userName: Swift.String? -} - -extension GetMFADeviceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serialNumber = "SerialNumber" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension GetMFADeviceOutput { -extension GetMFADeviceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMFADeviceOutputBody = try responseDecoder.decode(responseBody: data) - self.certifications = output.certifications - self.enableDate = output.enableDate - self.serialNumber = output.serialNumber - self.userName = output.userName - } else { - self.certifications = nil - self.enableDate = nil - self.serialNumber = nil - self.userName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetMFADeviceResult"] + var value = GetMFADeviceOutput() + value.certifications = try reader["Certifications"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.enableDate = try reader["EnableDate"].readTimestampIfPresent(format: .dateTime) + value.serialNumber = try reader["SerialNumber"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + return value } } } @@ -8318,64 +6842,29 @@ public struct GetMFADeviceOutput: Swift.Equatable { } } -struct GetMFADeviceOutputBody: Swift.Equatable { - let userName: Swift.String? - let serialNumber: Swift.String? - let enableDate: ClientRuntime.Date? - let certifications: [Swift.String:Swift.String]? -} - -extension GetMFADeviceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certifications = "Certifications" - case enableDate = "EnableDate" - case serialNumber = "SerialNumber" - case userName = "UserName" - } +enum GetMFADeviceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetMFADeviceResult")) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - let enableDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enableDate) - enableDate = enableDateDecoded - if containerValues.contains(.certifications) { - struct KeyVal0{struct key{}; struct value{}} - let certificationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .certifications) - if let certificationsWrappedContainer = certificationsWrappedContainer { - let certificationsContainer = try certificationsWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var certificationsBuffer: [Swift.String:Swift.String]? = nil - if let certificationsContainer = certificationsContainer { - certificationsBuffer = [Swift.String:Swift.String]() - for stringContainer0 in certificationsContainer { - certificationsBuffer?[stringContainer0.key] = stringContainer0.value - } - } - certifications = certificationsBuffer - } else { - certifications = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - certifications = nil } } } -enum GetMFADeviceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetOpenIDConnectProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case openIDConnectProviderArn = "OpenIDConnectProviderArn" } -} -extension GetOpenIDConnectProviderInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let openIDConnectProviderArn = openIDConnectProviderArn { @@ -8406,38 +6895,19 @@ public struct GetOpenIDConnectProviderInput: Swift.Equatable { } } -struct GetOpenIDConnectProviderInputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? -} - -extension GetOpenIDConnectProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - } -} +extension GetOpenIDConnectProviderOutput { -extension GetOpenIDConnectProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetOpenIDConnectProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.clientIDList = output.clientIDList - self.createDate = output.createDate - self.tags = output.tags - self.thumbprintList = output.thumbprintList - self.url = output.url - } else { - self.clientIDList = nil - self.createDate = nil - self.tags = nil - self.thumbprintList = nil - self.url = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetOpenIDConnectProviderResult"] + var value = GetOpenIDConnectProviderOutput() + value.clientIDList = try reader["ClientIDList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.thumbprintList = try reader["ThumbprintList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.url = try reader["Url"].readIfPresent() + return value } } } @@ -8471,103 +6941,33 @@ public struct GetOpenIDConnectProviderOutput: Swift.Equatable { } } -struct GetOpenIDConnectProviderOutputBody: Swift.Equatable { - let url: Swift.String? - let clientIDList: [Swift.String]? - let thumbprintList: [Swift.String]? - let createDate: ClientRuntime.Date? - let tags: [IAMClientTypes.Tag]? -} - -extension GetOpenIDConnectProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientIDList = "ClientIDList" - case createDate = "CreateDate" - case tags = "Tags" - case thumbprintList = "ThumbprintList" - case url = "Url" - } +enum GetOpenIDConnectProviderOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetOpenIDConnectProviderResult")) - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded - if containerValues.contains(.clientIDList) { - struct KeyVal0{struct member{}} - let clientIDListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clientIDList) - if let clientIDListWrappedContainer = clientIDListWrappedContainer { - let clientIDListContainer = try clientIDListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var clientIDListBuffer:[Swift.String]? = nil - if let clientIDListContainer = clientIDListContainer { - clientIDListBuffer = [Swift.String]() - for stringContainer0 in clientIDListContainer { - clientIDListBuffer?.append(stringContainer0) - } - } - clientIDList = clientIDListBuffer - } else { - clientIDList = [] - } - } else { - clientIDList = nil - } - if containerValues.contains(.thumbprintList) { - struct KeyVal0{struct member{}} - let thumbprintListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .thumbprintList) - if let thumbprintListWrappedContainer = thumbprintListWrappedContainer { - let thumbprintListContainer = try thumbprintListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var thumbprintListBuffer:[Swift.String]? = nil - if let thumbprintListContainer = thumbprintListContainer { - thumbprintListBuffer = [Swift.String]() - for stringContainer0 in thumbprintListContainer { - thumbprintListBuffer?.append(stringContainer0) - } - } - thumbprintList = thumbprintListBuffer - } else { - thumbprintList = [] - } - } else { - thumbprintList = nil - } - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } } } -enum GetOpenIDConnectProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetOrganizationsAccessReportInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case jobId = "JobId" + case marker = "Marker" + case maxItems = "MaxItems" + case sortKey = "SortKey" } -} -extension GetOrganizationsAccessReportInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let jobId = jobId { @@ -8619,58 +7019,23 @@ public struct GetOrganizationsAccessReportInput: Swift.Equatable { } } -struct GetOrganizationsAccessReportInputBody: Swift.Equatable { - let jobId: Swift.String? - let maxItems: Swift.Int? - let marker: Swift.String? - let sortKey: IAMClientTypes.SortKeyType? -} - -extension GetOrganizationsAccessReportInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobId = "JobId" - case marker = "Marker" - case maxItems = "MaxItems" - case sortKey = "SortKey" - } +extension GetOrganizationsAccessReportOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let sortKeyDecoded = try containerValues.decodeIfPresent(IAMClientTypes.SortKeyType.self, forKey: .sortKey) - sortKey = sortKeyDecoded - } -} - -extension GetOrganizationsAccessReportOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetOrganizationsAccessReportOutputBody = try responseDecoder.decode(responseBody: data) - self.accessDetails = output.accessDetails - self.errorDetails = output.errorDetails - self.isTruncated = output.isTruncated - self.jobCompletionDate = output.jobCompletionDate - self.jobCreationDate = output.jobCreationDate - self.jobStatus = output.jobStatus - self.marker = output.marker - self.numberOfServicesAccessible = output.numberOfServicesAccessible - self.numberOfServicesNotAccessed = output.numberOfServicesNotAccessed - } else { - self.accessDetails = nil - self.errorDetails = nil - self.isTruncated = false - self.jobCompletionDate = nil - self.jobCreationDate = nil - self.jobStatus = nil - self.marker = nil - self.numberOfServicesAccessible = nil - self.numberOfServicesNotAccessed = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetOrganizationsAccessReportResult"] + var value = GetOrganizationsAccessReportOutput() + value.accessDetails = try reader["AccessDetails"].readListIfPresent(memberReadingClosure: IAMClientTypes.AccessDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.errorDetails = try reader["ErrorDetails"].readIfPresent(readingClosure: IAMClientTypes.ErrorDetails.readingClosure) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.jobCompletionDate = try reader["JobCompletionDate"].readTimestampIfPresent(format: .dateTime) + value.jobCreationDate = try reader["JobCreationDate"].readTimestampIfPresent(format: .dateTime) + value.jobStatus = try reader["JobStatus"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.numberOfServicesAccessible = try reader["NumberOfServicesAccessible"].readIfPresent() + value.numberOfServicesNotAccessed = try reader["NumberOfServicesNotAccessed"].readIfPresent() + return value } } } @@ -8721,83 +7086,28 @@ public struct GetOrganizationsAccessReportOutput: Swift.Equatable { } } -struct GetOrganizationsAccessReportOutputBody: Swift.Equatable { - let jobStatus: IAMClientTypes.JobStatusType? - let jobCreationDate: ClientRuntime.Date? - let jobCompletionDate: ClientRuntime.Date? - let numberOfServicesAccessible: Swift.Int? - let numberOfServicesNotAccessed: Swift.Int? - let accessDetails: [IAMClientTypes.AccessDetail]? - let isTruncated: Swift.Bool - let marker: Swift.String? - let errorDetails: IAMClientTypes.ErrorDetails? -} +enum GetOrganizationsAccessReportOutputError { -extension GetOrganizationsAccessReportOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessDetails = "AccessDetails" - case errorDetails = "ErrorDetails" - case isTruncated = "IsTruncated" - case jobCompletionDate = "JobCompletionDate" - case jobCreationDate = "JobCreationDate" - case jobStatus = "JobStatus" - case marker = "Marker" - case numberOfServicesAccessible = "NumberOfServicesAccessible" - case numberOfServicesNotAccessed = "NumberOfServicesNotAccessed" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetOrganizationsAccessReportResult")) - let jobStatusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.JobStatusType.self, forKey: .jobStatus) - jobStatus = jobStatusDecoded - let jobCreationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .jobCreationDate) - jobCreationDate = jobCreationDateDecoded - let jobCompletionDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .jobCompletionDate) - jobCompletionDate = jobCompletionDateDecoded - let numberOfServicesAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfServicesAccessible) - numberOfServicesAccessible = numberOfServicesAccessibleDecoded - let numberOfServicesNotAccessedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfServicesNotAccessed) - numberOfServicesNotAccessed = numberOfServicesNotAccessedDecoded - if containerValues.contains(.accessDetails) { - struct KeyVal0{struct member{}} - let accessDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessDetails) - if let accessDetailsWrappedContainer = accessDetailsWrappedContainer { - let accessDetailsContainer = try accessDetailsWrappedContainer.decodeIfPresent([IAMClientTypes.AccessDetail].self, forKey: .member) - var accessDetailsBuffer:[IAMClientTypes.AccessDetail]? = nil - if let accessDetailsContainer = accessDetailsContainer { - accessDetailsBuffer = [IAMClientTypes.AccessDetail]() - for structureContainer0 in accessDetailsContainer { - accessDetailsBuffer?.append(structureContainer0) - } - } - accessDetails = accessDetailsBuffer - } else { - accessDetails = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - accessDetails = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let errorDetailsDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ErrorDetails.self, forKey: .errorDetails) - errorDetails = errorDetailsDecoded } } -enum GetOrganizationsAccessReportOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" } -} -extension GetPolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -8828,30 +7138,15 @@ public struct GetPolicyInput: Swift.Equatable { } } -struct GetPolicyInputBody: Swift.Equatable { - let policyArn: Swift.String? -} - -extension GetPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - } -} +extension GetPolicyOutput { -extension GetPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policy = output.policy - } else { - self.policy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetPolicyResult"] + var value = GetPolicyOutput() + value.policy = try reader["Policy"].readIfPresent(readingClosure: IAMClientTypes.Policy.readingClosure) + return value } } } @@ -8869,36 +7164,31 @@ public struct GetPolicyOutput: Swift.Equatable { } } -struct GetPolicyOutputBody: Swift.Equatable { - let policy: IAMClientTypes.Policy? -} - -extension GetPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } +enum GetPolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetPolicyResult")) - let policyDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Policy.self, forKey: .policy) - policy = policyDecoded - } -} - -enum GetPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetPolicyVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case versionId = "VersionId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -8937,34 +7227,15 @@ public struct GetPolicyVersionInput: Swift.Equatable { } } -struct GetPolicyVersionInputBody: Swift.Equatable { - let policyArn: Swift.String? - let versionId: Swift.String? -} - -extension GetPolicyVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case versionId = "VersionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - } -} +extension GetPolicyVersionOutput { -extension GetPolicyVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetPolicyVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.policyVersion = output.policyVersion - } else { - self.policyVersion = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetPolicyVersionResult"] + var value = GetPolicyVersionOutput() + value.policyVersion = try reader["PolicyVersion"].readIfPresent(readingClosure: IAMClientTypes.PolicyVersion.readingClosure) + return value } } } @@ -8982,36 +7253,30 @@ public struct GetPolicyVersionOutput: Swift.Equatable { } } -struct GetPolicyVersionOutputBody: Swift.Equatable { - let policyVersion: IAMClientTypes.PolicyVersion? -} - -extension GetPolicyVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyVersion = "PolicyVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetPolicyVersionResult")) - let policyVersionDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyVersion.self, forKey: .policyVersion) - policyVersion = policyVersionDecoded - } -} +enum GetPolicyVersionOutputError { -enum GetPolicyVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let roleName = roleName { @@ -9042,30 +7307,15 @@ public struct GetRoleInput: Swift.Equatable { } } -struct GetRoleInputBody: Swift.Equatable { - let roleName: Swift.String? -} - -extension GetRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - } -} +extension GetRoleOutput { -extension GetRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetRoleOutputBody = try responseDecoder.decode(responseBody: data) - self.role = output.role - } else { - self.role = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetRoleResult"] + var value = GetRoleOutput() + value.role = try reader["Role"].readIfPresent(readingClosure: IAMClientTypes.Role.readingClosure) + return value } } } @@ -9084,35 +7334,30 @@ public struct GetRoleOutput: Swift.Equatable { } } -struct GetRoleOutputBody: Swift.Equatable { - let role: IAMClientTypes.Role? -} - -extension GetRoleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case role = "Role" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetRoleResult")) - let roleDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Role.self, forKey: .role) - role = roleDecoded - } -} +enum GetRoleOutputError { -enum GetRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetRolePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyName = "PolicyName" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyName = policyName { @@ -9141,48 +7386,27 @@ public struct GetRolePolicyInput: Swift.Equatable { /// This member is required. public var roleName: Swift.String? - public init( - policyName: Swift.String? = nil, - roleName: Swift.String? = nil - ) - { - self.policyName = policyName - self.roleName = roleName - } -} - -struct GetRolePolicyInputBody: Swift.Equatable { - let roleName: Swift.String? - let policyName: Swift.String? -} - -extension GetRolePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyName = "PolicyName" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded + public init( + policyName: Swift.String? = nil, + roleName: Swift.String? = nil + ) + { + self.policyName = policyName + self.roleName = roleName } } -extension GetRolePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetRolePolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policyDocument = output.policyDocument - self.policyName = output.policyName - self.roleName = output.roleName - } else { - self.policyDocument = nil - self.policyName = nil - self.roleName = nil +extension GetRolePolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetRolePolicyResult"] + var value = GetRolePolicyOutput() + value.policyDocument = try reader["PolicyDocument"].readIfPresent() + value.policyName = try reader["PolicyName"].readIfPresent() + value.roleName = try reader["RoleName"].readIfPresent() + return value } } } @@ -9211,43 +7435,29 @@ public struct GetRolePolicyOutput: Swift.Equatable { } } -struct GetRolePolicyOutputBody: Swift.Equatable { - let roleName: Swift.String? - let policyName: Swift.String? - let policyDocument: Swift.String? -} - -extension GetRolePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "PolicyDocument" - case policyName = "PolicyName" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetRolePolicyResult")) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} +enum GetRolePolicyOutputError { -enum GetRolePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetSAMLProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case samlProviderArn = "SAMLProviderArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let samlProviderArn = samlProviderArn { @@ -9278,36 +7488,18 @@ public struct GetSAMLProviderInput: Swift.Equatable { } } -struct GetSAMLProviderInputBody: Swift.Equatable { - let samlProviderArn: Swift.String? -} - -extension GetSAMLProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderArn = "SAMLProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - } -} +extension GetSAMLProviderOutput { -extension GetSAMLProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSAMLProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.createDate = output.createDate - self.samlMetadataDocument = output.samlMetadataDocument - self.tags = output.tags - self.validUntil = output.validUntil - } else { - self.createDate = nil - self.samlMetadataDocument = nil - self.tags = nil - self.validUntil = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetSAMLProviderResult"] + var value = GetSAMLProviderOutput() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.samlMetadataDocument = try reader["SAMLMetadataDocument"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.validUntil = try reader["ValidUntil"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -9337,65 +7529,32 @@ public struct GetSAMLProviderOutput: Swift.Equatable { } } -struct GetSAMLProviderOutputBody: Swift.Equatable { - let samlMetadataDocument: Swift.String? - let createDate: ClientRuntime.Date? - let validUntil: ClientRuntime.Date? - let tags: [IAMClientTypes.Tag]? -} - -extension GetSAMLProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createDate = "CreateDate" - case samlMetadataDocument = "SAMLMetadataDocument" - case tags = "Tags" - case validUntil = "ValidUntil" - } +enum GetSAMLProviderOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetSAMLProviderResult")) - let samlMetadataDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlMetadataDocument) - samlMetadataDocument = samlMetadataDocumentDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } } } -enum GetSAMLProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetSSHPublicKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case encoding = "Encoding" + case sshPublicKeyId = "SSHPublicKeyId" + case userName = "UserName" } -} -extension GetSSHPublicKeyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let encoding = encoding { @@ -9442,38 +7601,15 @@ public struct GetSSHPublicKeyInput: Swift.Equatable { } } -struct GetSSHPublicKeyInputBody: Swift.Equatable { - let userName: Swift.String? - let sshPublicKeyId: Swift.String? - let encoding: IAMClientTypes.EncodingType? -} - -extension GetSSHPublicKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case encoding = "Encoding" - case sshPublicKeyId = "SSHPublicKeyId" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let sshPublicKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sshPublicKeyId) - sshPublicKeyId = sshPublicKeyIdDecoded - let encodingDecoded = try containerValues.decodeIfPresent(IAMClientTypes.EncodingType.self, forKey: .encoding) - encoding = encodingDecoded - } -} +extension GetSSHPublicKeyOutput { -extension GetSSHPublicKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSSHPublicKeyOutputBody = try responseDecoder.decode(responseBody: data) - self.sshPublicKey = output.sshPublicKey - } else { - self.sshPublicKey = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetSSHPublicKeyResult"] + var value = GetSSHPublicKeyOutput() + value.sshPublicKey = try reader["SSHPublicKey"].readIfPresent(readingClosure: IAMClientTypes.SSHPublicKey.readingClosure) + return value } } } @@ -9491,35 +7627,29 @@ public struct GetSSHPublicKeyOutput: Swift.Equatable { } } -struct GetSSHPublicKeyOutputBody: Swift.Equatable { - let sshPublicKey: IAMClientTypes.SSHPublicKey? -} - -extension GetSSHPublicKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sshPublicKey = "SSHPublicKey" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetSSHPublicKeyResult")) - let sshPublicKeyDecoded = try containerValues.decodeIfPresent(IAMClientTypes.SSHPublicKey.self, forKey: .sshPublicKey) - sshPublicKey = sshPublicKeyDecoded - } -} +enum GetSSHPublicKeyOutputError { -enum GetSSHPublicKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnrecognizedPublicKeyEncoding": return try await UnrecognizedPublicKeyEncodingException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnrecognizedPublicKeyEncoding": return try await UnrecognizedPublicKeyEncodingException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetServerCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serverCertificateName = "ServerCertificateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serverCertificateName = serverCertificateName { @@ -9550,30 +7680,15 @@ public struct GetServerCertificateInput: Swift.Equatable { } } -struct GetServerCertificateInputBody: Swift.Equatable { - let serverCertificateName: Swift.String? -} - -extension GetServerCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverCertificateName = "ServerCertificateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateName) - serverCertificateName = serverCertificateNameDecoded - } -} +extension GetServerCertificateOutput { -extension GetServerCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetServerCertificateOutputBody = try responseDecoder.decode(responseBody: data) - self.serverCertificate = output.serverCertificate - } else { - self.serverCertificate = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetServerCertificateResult"] + var value = GetServerCertificateOutput() + value.serverCertificate = try reader["ServerCertificate"].readIfPresent(readingClosure: IAMClientTypes.ServerCertificate.readingClosure) + return value } } } @@ -9592,35 +7707,31 @@ public struct GetServerCertificateOutput: Swift.Equatable { } } -struct GetServerCertificateOutputBody: Swift.Equatable { - let serverCertificate: IAMClientTypes.ServerCertificate? -} - -extension GetServerCertificateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverCertificate = "ServerCertificate" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetServerCertificateResult")) - let serverCertificateDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ServerCertificate.self, forKey: .serverCertificate) - serverCertificate = serverCertificateDecoded - } -} +enum GetServerCertificateOutputError { -enum GetServerCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetServiceLastAccessedDetailsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case jobId = "JobId" + case marker = "Marker" + case maxItems = "MaxItems" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let jobId = jobId { @@ -9665,52 +7776,22 @@ public struct GetServiceLastAccessedDetailsInput: Swift.Equatable { } } -struct GetServiceLastAccessedDetailsInputBody: Swift.Equatable { - let jobId: Swift.String? - let maxItems: Swift.Int? - let marker: Swift.String? -} - -extension GetServiceLastAccessedDetailsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobId = "JobId" - case marker = "Marker" - case maxItems = "MaxItems" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension GetServiceLastAccessedDetailsOutput { -extension GetServiceLastAccessedDetailsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetServiceLastAccessedDetailsOutputBody = try responseDecoder.decode(responseBody: data) - self.error = output.error - self.isTruncated = output.isTruncated - self.jobCompletionDate = output.jobCompletionDate - self.jobCreationDate = output.jobCreationDate - self.jobStatus = output.jobStatus - self.jobType = output.jobType - self.marker = output.marker - self.servicesLastAccessed = output.servicesLastAccessed - } else { - self.error = nil - self.isTruncated = false - self.jobCompletionDate = nil - self.jobCreationDate = nil - self.jobStatus = nil - self.jobType = nil - self.marker = nil - self.servicesLastAccessed = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetServiceLastAccessedDetailsResult"] + var value = GetServiceLastAccessedDetailsOutput() + value.error = try reader["Error"].readIfPresent(readingClosure: IAMClientTypes.ErrorDetails.readingClosure) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.jobCompletionDate = try reader["JobCompletionDate"].readTimestampIfPresent(format: .dateTime) + value.jobCreationDate = try reader["JobCreationDate"].readTimestampIfPresent(format: .dateTime) + value.jobStatus = try reader["JobStatus"].readIfPresent() + value.jobType = try reader["JobType"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.servicesLastAccessed = try reader["ServicesLastAccessed"].readListIfPresent(memberReadingClosure: IAMClientTypes.ServiceLastAccessed.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9759,80 +7840,32 @@ public struct GetServiceLastAccessedDetailsOutput: Swift.Equatable { } } -struct GetServiceLastAccessedDetailsOutputBody: Swift.Equatable { - let jobStatus: IAMClientTypes.JobStatusType? - let jobType: IAMClientTypes.AccessAdvisorUsageGranularityType? - let jobCreationDate: ClientRuntime.Date? - let servicesLastAccessed: [IAMClientTypes.ServiceLastAccessed]? - let jobCompletionDate: ClientRuntime.Date? - let isTruncated: Swift.Bool - let marker: Swift.String? - let error: IAMClientTypes.ErrorDetails? -} +enum GetServiceLastAccessedDetailsOutputError { -extension GetServiceLastAccessedDetailsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case error = "Error" - case isTruncated = "IsTruncated" - case jobCompletionDate = "JobCompletionDate" - case jobCreationDate = "JobCreationDate" - case jobStatus = "JobStatus" - case jobType = "JobType" - case marker = "Marker" - case servicesLastAccessed = "ServicesLastAccessed" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetServiceLastAccessedDetailsResult")) - let jobStatusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.JobStatusType.self, forKey: .jobStatus) - jobStatus = jobStatusDecoded - let jobTypeDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AccessAdvisorUsageGranularityType.self, forKey: .jobType) - jobType = jobTypeDecoded - let jobCreationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .jobCreationDate) - jobCreationDate = jobCreationDateDecoded - if containerValues.contains(.servicesLastAccessed) { - struct KeyVal0{struct member{}} - let servicesLastAccessedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .servicesLastAccessed) - if let servicesLastAccessedWrappedContainer = servicesLastAccessedWrappedContainer { - let servicesLastAccessedContainer = try servicesLastAccessedWrappedContainer.decodeIfPresent([IAMClientTypes.ServiceLastAccessed].self, forKey: .member) - var servicesLastAccessedBuffer:[IAMClientTypes.ServiceLastAccessed]? = nil - if let servicesLastAccessedContainer = servicesLastAccessedContainer { - servicesLastAccessedBuffer = [IAMClientTypes.ServiceLastAccessed]() - for structureContainer0 in servicesLastAccessedContainer { - servicesLastAccessedBuffer?.append(structureContainer0) - } - } - servicesLastAccessed = servicesLastAccessedBuffer - } else { - servicesLastAccessed = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - servicesLastAccessed = nil } - let jobCompletionDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .jobCompletionDate) - jobCompletionDate = jobCompletionDateDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let errorDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ErrorDetails.self, forKey: .error) - error = errorDecoded } } -enum GetServiceLastAccessedDetailsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetServiceLastAccessedDetailsWithEntitiesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case jobId = "JobId" + case marker = "Marker" + case maxItems = "MaxItems" + case serviceNamespace = "ServiceNamespace" } -} -extension GetServiceLastAccessedDetailsWithEntitiesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let jobId = jobId { @@ -9885,54 +7918,21 @@ public struct GetServiceLastAccessedDetailsWithEntitiesInput: Swift.Equatable { } } -struct GetServiceLastAccessedDetailsWithEntitiesInputBody: Swift.Equatable { - let jobId: Swift.String? - let serviceNamespace: Swift.String? - let maxItems: Swift.Int? - let marker: Swift.String? -} - -extension GetServiceLastAccessedDetailsWithEntitiesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobId = "JobId" - case marker = "Marker" - case maxItems = "MaxItems" - case serviceNamespace = "ServiceNamespace" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - let serviceNamespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceNamespace) - serviceNamespace = serviceNamespaceDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension GetServiceLastAccessedDetailsWithEntitiesOutput { -extension GetServiceLastAccessedDetailsWithEntitiesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetServiceLastAccessedDetailsWithEntitiesOutputBody = try responseDecoder.decode(responseBody: data) - self.entityDetailsList = output.entityDetailsList - self.error = output.error - self.isTruncated = output.isTruncated - self.jobCompletionDate = output.jobCompletionDate - self.jobCreationDate = output.jobCreationDate - self.jobStatus = output.jobStatus - self.marker = output.marker - } else { - self.entityDetailsList = nil - self.error = nil - self.isTruncated = false - self.jobCompletionDate = nil - self.jobCreationDate = nil - self.jobStatus = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetServiceLastAccessedDetailsWithEntitiesResult"] + var value = GetServiceLastAccessedDetailsWithEntitiesOutput() + value.entityDetailsList = try reader["EntityDetailsList"].readListIfPresent(memberReadingClosure: IAMClientTypes.EntityDetails.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.error = try reader["Error"].readIfPresent(readingClosure: IAMClientTypes.ErrorDetails.readingClosure) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.jobCompletionDate = try reader["JobCompletionDate"].readTimestampIfPresent(format: .dateTime) + value.jobCreationDate = try reader["JobCreationDate"].readTimestampIfPresent(format: .dateTime) + value.jobStatus = try reader["JobStatus"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -9977,76 +7977,29 @@ public struct GetServiceLastAccessedDetailsWithEntitiesOutput: Swift.Equatable { } } -struct GetServiceLastAccessedDetailsWithEntitiesOutputBody: Swift.Equatable { - let jobStatus: IAMClientTypes.JobStatusType? - let jobCreationDate: ClientRuntime.Date? - let jobCompletionDate: ClientRuntime.Date? - let entityDetailsList: [IAMClientTypes.EntityDetails]? - let isTruncated: Swift.Bool - let marker: Swift.String? - let error: IAMClientTypes.ErrorDetails? -} - -extension GetServiceLastAccessedDetailsWithEntitiesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case entityDetailsList = "EntityDetailsList" - case error = "Error" - case isTruncated = "IsTruncated" - case jobCompletionDate = "JobCompletionDate" - case jobCreationDate = "JobCreationDate" - case jobStatus = "JobStatus" - case marker = "Marker" - } +enum GetServiceLastAccessedDetailsWithEntitiesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetServiceLastAccessedDetailsWithEntitiesResult")) - let jobStatusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.JobStatusType.self, forKey: .jobStatus) - jobStatus = jobStatusDecoded - let jobCreationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .jobCreationDate) - jobCreationDate = jobCreationDateDecoded - let jobCompletionDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .jobCompletionDate) - jobCompletionDate = jobCompletionDateDecoded - if containerValues.contains(.entityDetailsList) { - struct KeyVal0{struct member{}} - let entityDetailsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .entityDetailsList) - if let entityDetailsListWrappedContainer = entityDetailsListWrappedContainer { - let entityDetailsListContainer = try entityDetailsListWrappedContainer.decodeIfPresent([IAMClientTypes.EntityDetails].self, forKey: .member) - var entityDetailsListBuffer:[IAMClientTypes.EntityDetails]? = nil - if let entityDetailsListContainer = entityDetailsListContainer { - entityDetailsListBuffer = [IAMClientTypes.EntityDetails]() - for structureContainer0 in entityDetailsListContainer { - entityDetailsListBuffer?.append(structureContainer0) - } - } - entityDetailsList = entityDetailsListBuffer - } else { - entityDetailsList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - entityDetailsList = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let errorDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ErrorDetails.self, forKey: .error) - error = errorDecoded } } -enum GetServiceLastAccessedDetailsWithEntitiesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetServiceLinkedRoleDeletionStatusInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deletionTaskId = "DeletionTaskId" } -} -extension GetServiceLinkedRoleDeletionStatusInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deletionTaskId = deletionTaskId { @@ -10077,32 +8030,16 @@ public struct GetServiceLinkedRoleDeletionStatusInput: Swift.Equatable { } } -struct GetServiceLinkedRoleDeletionStatusInputBody: Swift.Equatable { - let deletionTaskId: Swift.String? -} - -extension GetServiceLinkedRoleDeletionStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deletionTaskId = "DeletionTaskId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deletionTaskIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deletionTaskId) - deletionTaskId = deletionTaskIdDecoded - } -} +extension GetServiceLinkedRoleDeletionStatusOutput { -extension GetServiceLinkedRoleDeletionStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetServiceLinkedRoleDeletionStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.reason = output.reason - self.status = output.status - } else { - self.reason = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetServiceLinkedRoleDeletionStatusResult"] + var value = GetServiceLinkedRoleDeletionStatusOutput() + value.reason = try reader["Reason"].readIfPresent(readingClosure: IAMClientTypes.DeletionTaskFailureReasonType.readingClosure) + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -10124,40 +8061,30 @@ public struct GetServiceLinkedRoleDeletionStatusOutput: Swift.Equatable { } } -struct GetServiceLinkedRoleDeletionStatusOutputBody: Swift.Equatable { - let status: IAMClientTypes.DeletionTaskStatusType? - let reason: IAMClientTypes.DeletionTaskFailureReasonType? -} - -extension GetServiceLinkedRoleDeletionStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reason = "Reason" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetServiceLinkedRoleDeletionStatusResult")) - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.DeletionTaskStatusType.self, forKey: .status) - status = statusDecoded - let reasonDecoded = try containerValues.decodeIfPresent(IAMClientTypes.DeletionTaskFailureReasonType.self, forKey: .reason) - reason = reasonDecoded - } -} +enum GetServiceLinkedRoleDeletionStatusOutputError { -enum GetServiceLinkedRoleDeletionStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let userName = userName { @@ -10187,30 +8114,15 @@ public struct GetUserInput: Swift.Equatable { } } -struct GetUserInputBody: Swift.Equatable { - let userName: Swift.String? -} - -extension GetUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension GetUserOutput { -extension GetUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetUserOutputBody = try responseDecoder.decode(responseBody: data) - self.user = output.user - } else { - self.user = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetUserResult"] + var value = GetUserOutput() + value.user = try reader["User"].readIfPresent(readingClosure: IAMClientTypes.User.readingClosure) + return value } } } @@ -10229,35 +8141,30 @@ public struct GetUserOutput: Swift.Equatable { } } -struct GetUserOutputBody: Swift.Equatable { - let user: IAMClientTypes.User? -} - -extension GetUserOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case user = "User" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetUserResult")) - let userDecoded = try containerValues.decodeIfPresent(IAMClientTypes.User.self, forKey: .user) - user = userDecoded - } -} +enum GetUserOutputError { -enum GetUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetUserPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyName = "PolicyName" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyName = policyName { @@ -10296,38 +8203,17 @@ public struct GetUserPolicyInput: Swift.Equatable { } } -struct GetUserPolicyInputBody: Swift.Equatable { - let userName: Swift.String? - let policyName: Swift.String? -} - -extension GetUserPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyName = "PolicyName" - case userName = "UserName" - } +extension GetUserPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - } -} - -extension GetUserPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetUserPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policyDocument = output.policyDocument - self.policyName = output.policyName - self.userName = output.userName - } else { - self.policyDocument = nil - self.policyName = nil - self.userName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetUserPolicyResult"] + var value = GetUserPolicyOutput() + value.policyDocument = try reader["PolicyDocument"].readIfPresent() + value.policyName = try reader["PolicyName"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + return value } } } @@ -10356,38 +8242,20 @@ public struct GetUserPolicyOutput: Swift.Equatable { } } -struct GetUserPolicyOutputBody: Swift.Equatable { - let userName: Swift.String? - let policyName: Swift.String? - let policyDocument: Swift.String? -} - -extension GetUserPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "PolicyDocument" - case policyName = "PolicyName" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetUserPolicyResult")) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} +enum GetUserPolicyOutputError { -enum GetUserPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -10424,7 +8292,7 @@ extension IAMClientTypes { } } -extension IAMClientTypes.Group: Swift.Codable { +extension IAMClientTypes.Group: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case createDate = "CreateDate" @@ -10452,18 +8320,17 @@ extension IAMClientTypes.Group: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.Group() + value.path = try reader["Path"].readIfPresent() + value.groupName = try reader["GroupName"].readIfPresent() + value.groupId = try reader["GroupId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -10510,7 +8377,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.GroupDetail: Swift.Codable { +extension IAMClientTypes.GroupDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case attachedManagedPolicies = "AttachedManagedPolicies" @@ -10564,55 +8431,18 @@ extension IAMClientTypes.GroupDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - if containerValues.contains(.groupPolicyList) { - struct KeyVal0{struct member{}} - let groupPolicyListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupPolicyList) - if let groupPolicyListWrappedContainer = groupPolicyListWrappedContainer { - let groupPolicyListContainer = try groupPolicyListWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyDetail].self, forKey: .member) - var groupPolicyListBuffer:[IAMClientTypes.PolicyDetail]? = nil - if let groupPolicyListContainer = groupPolicyListContainer { - groupPolicyListBuffer = [IAMClientTypes.PolicyDetail]() - for structureContainer0 in groupPolicyListContainer { - groupPolicyListBuffer?.append(structureContainer0) - } - } - groupPolicyList = groupPolicyListBuffer - } else { - groupPolicyList = [] - } - } else { - groupPolicyList = nil - } - if containerValues.contains(.attachedManagedPolicies) { - struct KeyVal0{struct member{}} - let attachedManagedPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachedManagedPolicies) - if let attachedManagedPoliciesWrappedContainer = attachedManagedPoliciesWrappedContainer { - let attachedManagedPoliciesContainer = try attachedManagedPoliciesWrappedContainer.decodeIfPresent([IAMClientTypes.AttachedPolicy].self, forKey: .member) - var attachedManagedPoliciesBuffer:[IAMClientTypes.AttachedPolicy]? = nil - if let attachedManagedPoliciesContainer = attachedManagedPoliciesContainer { - attachedManagedPoliciesBuffer = [IAMClientTypes.AttachedPolicy]() - for structureContainer0 in attachedManagedPoliciesContainer { - attachedManagedPoliciesBuffer?.append(structureContainer0) - } - } - attachedManagedPolicies = attachedManagedPoliciesBuffer - } else { - attachedManagedPolicies = [] - } - } else { - attachedManagedPolicies = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.GroupDetail() + value.path = try reader["Path"].readIfPresent() + value.groupName = try reader["GroupName"].readIfPresent() + value.groupId = try reader["GroupId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.groupPolicyList = try reader["GroupPolicyList"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.attachedManagedPolicies = try reader["AttachedManagedPolicies"].readListIfPresent(memberReadingClosure: IAMClientTypes.AttachedPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10659,7 +8489,7 @@ extension IAMClientTypes { public enum IAMClientTypes {} -extension IAMClientTypes.InstanceProfile: Swift.Codable { +extension IAMClientTypes.InstanceProfile: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case createDate = "CreateDate" @@ -10713,55 +8543,18 @@ extension IAMClientTypes.InstanceProfile: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - let instanceProfileIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileId) - instanceProfileId = instanceProfileIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - if containerValues.contains(.roles) { - struct KeyVal0{struct member{}} - let rolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .roles) - if let rolesWrappedContainer = rolesWrappedContainer { - let rolesContainer = try rolesWrappedContainer.decodeIfPresent([IAMClientTypes.Role].self, forKey: .member) - var rolesBuffer:[IAMClientTypes.Role]? = nil - if let rolesContainer = rolesContainer { - rolesBuffer = [IAMClientTypes.Role]() - for structureContainer0 in rolesContainer { - rolesBuffer?.append(structureContainer0) - } - } - roles = rolesBuffer - } else { - roles = [] - } - } else { - roles = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.InstanceProfile() + value.path = try reader["Path"].readIfPresent() + value.instanceProfileName = try reader["InstanceProfileName"].readIfPresent() + value.instanceProfileId = try reader["InstanceProfileId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.roles = try reader["Roles"].readListIfPresent(memberReadingClosure: IAMClientTypes.Role.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -10821,16 +8614,14 @@ extension IAMClientTypes { } extension InvalidAuthenticationCodeException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidAuthenticationCodeException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10858,33 +8649,15 @@ public struct InvalidAuthenticationCodeException: ClientRuntime.ModeledError, AW } } -struct InvalidAuthenticationCodeExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidAuthenticationCodeExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidCertificateException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidCertificateException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10912,33 +8685,15 @@ public struct InvalidCertificateException: ClientRuntime.ModeledError, AWSClient } } -struct InvalidCertificateExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidCertificateExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidInputException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidInputException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10966,33 +8721,15 @@ public struct InvalidInputException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct InvalidInputExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidInputExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidPublicKeyException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidPublicKeyException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11009,44 +8746,26 @@ public struct InvalidPublicKeyException: ClientRuntime.ModeledError, AWSClientRu public static var isRetryable: Swift.Bool { false } public static var isThrottling: Swift.Bool { false } public internal(set) var httpResponse = HttpResponse() - public internal(set) var message: Swift.String? - public internal(set) var requestID: Swift.String? - - public init( - message: Swift.String? = nil - ) - { - self.properties.message = message - } -} - -struct InvalidPublicKeyExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidPublicKeyExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message } } extension InvalidUserTypeException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidUserTypeException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11074,22 +8793,6 @@ public struct InvalidUserTypeException: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidUserTypeExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidUserTypeExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IAMClientTypes { public enum JobStatusType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case completed @@ -11126,16 +8829,14 @@ extension IAMClientTypes { } extension KeyPairMismatchException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KeyPairMismatchException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11163,33 +8864,15 @@ public struct KeyPairMismatchException: ClientRuntime.ModeledError, AWSClientRun } } -struct KeyPairMismatchExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension KeyPairMismatchExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension LimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitExceededException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11217,23 +8900,13 @@ public struct LimitExceededException: ClientRuntime.ModeledError, AWSClientRunti } } -struct LimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension LimitExceededExceptionBody: Swift.Decodable { +extension ListAccessKeysInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case marker = "Marker" + case maxItems = "MaxItems" + case userName = "UserName" } -} -extension ListAccessKeysInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -11277,42 +8950,17 @@ public struct ListAccessKeysInput: Swift.Equatable { } } -struct ListAccessKeysInputBody: Swift.Equatable { - let userName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListAccessKeysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListAccessKeysOutput { -extension ListAccessKeysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAccessKeysOutputBody = try responseDecoder.decode(responseBody: data) - self.accessKeyMetadata = output.accessKeyMetadata - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.accessKeyMetadata = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListAccessKeysResult"] + var value = ListAccessKeysOutput() + value.accessKeyMetadata = try reader["AccessKeyMetadata"].readListIfPresent(memberReadingClosure: IAMClientTypes.AccessKeyMetadata.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -11339,60 +8987,30 @@ public struct ListAccessKeysOutput: Swift.Equatable { } } -struct ListAccessKeysOutputBody: Swift.Equatable { - let accessKeyMetadata: [IAMClientTypes.AccessKeyMetadata]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListAccessKeysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKeyMetadata = "AccessKeyMetadata" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListAccessKeysOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListAccessKeysResult")) - if containerValues.contains(.accessKeyMetadata) { - struct KeyVal0{struct member{}} - let accessKeyMetadataWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessKeyMetadata) - if let accessKeyMetadataWrappedContainer = accessKeyMetadataWrappedContainer { - let accessKeyMetadataContainer = try accessKeyMetadataWrappedContainer.decodeIfPresent([IAMClientTypes.AccessKeyMetadata].self, forKey: .member) - var accessKeyMetadataBuffer:[IAMClientTypes.AccessKeyMetadata]? = nil - if let accessKeyMetadataContainer = accessKeyMetadataContainer { - accessKeyMetadataBuffer = [IAMClientTypes.AccessKeyMetadata]() - for structureContainer0 in accessKeyMetadataContainer { - accessKeyMetadataBuffer?.append(structureContainer0) - } - } - accessKeyMetadata = accessKeyMetadataBuffer - } else { - accessKeyMetadata = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - accessKeyMetadata = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListAccessKeysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListAccountAliasesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" } -} -extension ListAccountAliasesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -11429,38 +9047,17 @@ public struct ListAccountAliasesInput: Swift.Equatable { } } -struct ListAccountAliasesInputBody: Swift.Equatable { - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListAccountAliasesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - } +extension ListAccountAliasesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} - -extension ListAccountAliasesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAccountAliasesOutputBody = try responseDecoder.decode(responseBody: data) - self.accountAliases = output.accountAliases - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.accountAliases = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListAccountAliasesResult"] + var value = ListAccountAliasesOutput() + value.accountAliases = try reader["AccountAliases"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -11487,59 +9084,31 @@ public struct ListAccountAliasesOutput: Swift.Equatable { } } -struct ListAccountAliasesOutputBody: Swift.Equatable { - let accountAliases: [Swift.String]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListAccountAliasesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountAliases = "AccountAliases" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListAccountAliasesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListAccountAliasesResult")) - if containerValues.contains(.accountAliases) { - struct KeyVal0{struct member{}} - let accountAliasesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accountAliases) - if let accountAliasesWrappedContainer = accountAliasesWrappedContainer { - let accountAliasesContainer = try accountAliasesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var accountAliasesBuffer:[Swift.String]? = nil - if let accountAliasesContainer = accountAliasesContainer { - accountAliasesBuffer = [Swift.String]() - for stringContainer0 in accountAliasesContainer { - accountAliasesBuffer?.append(stringContainer0) - } - } - accountAliases = accountAliasesBuffer - } else { - accountAliases = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - accountAliases = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListAccountAliasesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListAttachedGroupPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" } -} -extension ListAttachedGroupPoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -11591,46 +9160,17 @@ public struct ListAttachedGroupPoliciesInput: Swift.Equatable { } } -struct ListAttachedGroupPoliciesInputBody: Swift.Equatable { - let groupName: Swift.String? - let pathPrefix: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListAttachedGroupPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListAttachedGroupPoliciesOutput { -extension ListAttachedGroupPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAttachedGroupPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.attachedPolicies = output.attachedPolicies - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.attachedPolicies = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListAttachedGroupPoliciesResult"] + var value = ListAttachedGroupPoliciesOutput() + value.attachedPolicies = try reader["AttachedPolicies"].readListIfPresent(memberReadingClosure: IAMClientTypes.AttachedPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -11656,61 +9196,33 @@ public struct ListAttachedGroupPoliciesOutput: Swift.Equatable { } } -struct ListAttachedGroupPoliciesOutputBody: Swift.Equatable { - let attachedPolicies: [IAMClientTypes.AttachedPolicy]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListAttachedGroupPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachedPolicies = "AttachedPolicies" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListAttachedGroupPoliciesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListAttachedGroupPoliciesResult")) - if containerValues.contains(.attachedPolicies) { - struct KeyVal0{struct member{}} - let attachedPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachedPolicies) - if let attachedPoliciesWrappedContainer = attachedPoliciesWrappedContainer { - let attachedPoliciesContainer = try attachedPoliciesWrappedContainer.decodeIfPresent([IAMClientTypes.AttachedPolicy].self, forKey: .member) - var attachedPoliciesBuffer:[IAMClientTypes.AttachedPolicy]? = nil - if let attachedPoliciesContainer = attachedPoliciesContainer { - attachedPoliciesBuffer = [IAMClientTypes.AttachedPolicy]() - for structureContainer0 in attachedPoliciesContainer { - attachedPoliciesBuffer?.append(structureContainer0) - } - } - attachedPolicies = attachedPoliciesBuffer - } else { - attachedPolicies = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attachedPolicies = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListAttachedGroupPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListAttachedRolePoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" + case roleName = "RoleName" } -} -extension ListAttachedRolePoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -11762,46 +9274,17 @@ public struct ListAttachedRolePoliciesInput: Swift.Equatable { } } -struct ListAttachedRolePoliciesInputBody: Swift.Equatable { - let roleName: Swift.String? - let pathPrefix: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListAttachedRolePoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - case roleName = "RoleName" - } +extension ListAttachedRolePoliciesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} - -extension ListAttachedRolePoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAttachedRolePoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.attachedPolicies = output.attachedPolicies - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.attachedPolicies = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListAttachedRolePoliciesResult"] + var value = ListAttachedRolePoliciesOutput() + value.attachedPolicies = try reader["AttachedPolicies"].readListIfPresent(memberReadingClosure: IAMClientTypes.AttachedPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -11827,61 +9310,33 @@ public struct ListAttachedRolePoliciesOutput: Swift.Equatable { } } -struct ListAttachedRolePoliciesOutputBody: Swift.Equatable { - let attachedPolicies: [IAMClientTypes.AttachedPolicy]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListAttachedRolePoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachedPolicies = "AttachedPolicies" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListAttachedRolePoliciesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListAttachedRolePoliciesResult")) - if containerValues.contains(.attachedPolicies) { - struct KeyVal0{struct member{}} - let attachedPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachedPolicies) - if let attachedPoliciesWrappedContainer = attachedPoliciesWrappedContainer { - let attachedPoliciesContainer = try attachedPoliciesWrappedContainer.decodeIfPresent([IAMClientTypes.AttachedPolicy].self, forKey: .member) - var attachedPoliciesBuffer:[IAMClientTypes.AttachedPolicy]? = nil - if let attachedPoliciesContainer = attachedPoliciesContainer { - attachedPoliciesBuffer = [IAMClientTypes.AttachedPolicy]() - for structureContainer0 in attachedPoliciesContainer { - attachedPoliciesBuffer?.append(structureContainer0) - } - } - attachedPolicies = attachedPoliciesBuffer - } else { - attachedPolicies = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attachedPolicies = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListAttachedRolePoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListAttachedUserPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" + case userName = "UserName" } -} -extension ListAttachedUserPoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -11933,46 +9388,17 @@ public struct ListAttachedUserPoliciesInput: Swift.Equatable { } } -struct ListAttachedUserPoliciesInputBody: Swift.Equatable { - let userName: Swift.String? - let pathPrefix: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListAttachedUserPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListAttachedUserPoliciesOutput { -extension ListAttachedUserPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAttachedUserPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.attachedPolicies = output.attachedPolicies - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.attachedPolicies = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListAttachedUserPoliciesResult"] + var value = ListAttachedUserPoliciesOutput() + value.attachedPolicies = try reader["AttachedPolicies"].readListIfPresent(memberReadingClosure: IAMClientTypes.AttachedPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -11998,61 +9424,35 @@ public struct ListAttachedUserPoliciesOutput: Swift.Equatable { } } -struct ListAttachedUserPoliciesOutputBody: Swift.Equatable { - let attachedPolicies: [IAMClientTypes.AttachedPolicy]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListAttachedUserPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attachedPolicies = "AttachedPolicies" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListAttachedUserPoliciesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListAttachedUserPoliciesResult")) - if containerValues.contains(.attachedPolicies) { - struct KeyVal0{struct member{}} - let attachedPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachedPolicies) - if let attachedPoliciesWrappedContainer = attachedPoliciesWrappedContainer { - let attachedPoliciesContainer = try attachedPoliciesWrappedContainer.decodeIfPresent([IAMClientTypes.AttachedPolicy].self, forKey: .member) - var attachedPoliciesBuffer:[IAMClientTypes.AttachedPolicy]? = nil - if let attachedPoliciesContainer = attachedPoliciesContainer { - attachedPoliciesBuffer = [IAMClientTypes.AttachedPolicy]() - for structureContainer0 in attachedPoliciesContainer { - attachedPoliciesBuffer?.append(structureContainer0) - } - } - attachedPolicies = attachedPoliciesBuffer - } else { - attachedPolicies = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attachedPolicies = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListAttachedUserPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListEntitiesForPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case entityFilter = "EntityFilter" + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" + case policyArn = "PolicyArn" + case policyUsageFilter = "PolicyUsageFilter" } -} -extension ListEntitiesForPolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let entityFilter = entityFilter { @@ -12118,58 +9518,19 @@ public struct ListEntitiesForPolicyInput: Swift.Equatable { } } -struct ListEntitiesForPolicyInputBody: Swift.Equatable { - let policyArn: Swift.String? - let entityFilter: IAMClientTypes.EntityType? - let pathPrefix: Swift.String? - let policyUsageFilter: IAMClientTypes.PolicyUsageType? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListEntitiesForPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case entityFilter = "EntityFilter" - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - case policyArn = "PolicyArn" - case policyUsageFilter = "PolicyUsageFilter" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - let entityFilterDecoded = try containerValues.decodeIfPresent(IAMClientTypes.EntityType.self, forKey: .entityFilter) - entityFilter = entityFilterDecoded - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let policyUsageFilterDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyUsageType.self, forKey: .policyUsageFilter) - policyUsageFilter = policyUsageFilterDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListEntitiesForPolicyOutput { -extension ListEntitiesForPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListEntitiesForPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.policyGroups = output.policyGroups - self.policyRoles = output.policyRoles - self.policyUsers = output.policyUsers - } else { - self.isTruncated = false - self.marker = nil - self.policyGroups = nil - self.policyRoles = nil - self.policyUsers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListEntitiesForPolicyResult"] + var value = ListEntitiesForPolicyOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.policyGroups = try reader["PolicyGroups"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyGroup.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.policyRoles = try reader["PolicyRoles"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyRole.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.policyUsers = try reader["PolicyUsers"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyUser.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12203,103 +9564,32 @@ public struct ListEntitiesForPolicyOutput: Swift.Equatable { } } -struct ListEntitiesForPolicyOutputBody: Swift.Equatable { - let policyGroups: [IAMClientTypes.PolicyGroup]? - let policyUsers: [IAMClientTypes.PolicyUser]? - let policyRoles: [IAMClientTypes.PolicyRole]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListEntitiesForPolicyOutputError { -extension ListEntitiesForPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case policyGroups = "PolicyGroups" - case policyRoles = "PolicyRoles" - case policyUsers = "PolicyUsers" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListEntitiesForPolicyResult")) - if containerValues.contains(.policyGroups) { - struct KeyVal0{struct member{}} - let policyGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyGroups) - if let policyGroupsWrappedContainer = policyGroupsWrappedContainer { - let policyGroupsContainer = try policyGroupsWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyGroup].self, forKey: .member) - var policyGroupsBuffer:[IAMClientTypes.PolicyGroup]? = nil - if let policyGroupsContainer = policyGroupsContainer { - policyGroupsBuffer = [IAMClientTypes.PolicyGroup]() - for structureContainer0 in policyGroupsContainer { - policyGroupsBuffer?.append(structureContainer0) - } - } - policyGroups = policyGroupsBuffer - } else { - policyGroups = [] - } - } else { - policyGroups = nil - } - if containerValues.contains(.policyUsers) { - struct KeyVal0{struct member{}} - let policyUsersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyUsers) - if let policyUsersWrappedContainer = policyUsersWrappedContainer { - let policyUsersContainer = try policyUsersWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyUser].self, forKey: .member) - var policyUsersBuffer:[IAMClientTypes.PolicyUser]? = nil - if let policyUsersContainer = policyUsersContainer { - policyUsersBuffer = [IAMClientTypes.PolicyUser]() - for structureContainer0 in policyUsersContainer { - policyUsersBuffer?.append(structureContainer0) - } - } - policyUsers = policyUsersBuffer - } else { - policyUsers = [] - } - } else { - policyUsers = nil - } - if containerValues.contains(.policyRoles) { - struct KeyVal0{struct member{}} - let policyRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyRoles) - if let policyRolesWrappedContainer = policyRolesWrappedContainer { - let policyRolesContainer = try policyRolesWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyRole].self, forKey: .member) - var policyRolesBuffer:[IAMClientTypes.PolicyRole]? = nil - if let policyRolesContainer = policyRolesContainer { - policyRolesBuffer = [IAMClientTypes.PolicyRole]() - for structureContainer0 in policyRolesContainer { - policyRolesBuffer?.append(structureContainer0) - } - } - policyRoles = policyRolesBuffer - } else { - policyRoles = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policyRoles = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListEntitiesForPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListGroupPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case marker = "Marker" + case maxItems = "MaxItems" } -} -extension ListGroupPoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -12344,42 +9634,17 @@ public struct ListGroupPoliciesInput: Swift.Equatable { } } -struct ListGroupPoliciesInputBody: Swift.Equatable { - let groupName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListGroupPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case marker = "Marker" - case maxItems = "MaxItems" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListGroupPoliciesOutput { -extension ListGroupPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListGroupPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.policyNames = output.policyNames - } else { - self.isTruncated = false - self.marker = nil - self.policyNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListGroupPoliciesResult"] + var value = ListGroupPoliciesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.policyNames = try reader["PolicyNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12406,60 +9671,31 @@ public struct ListGroupPoliciesOutput: Swift.Equatable { } } -struct ListGroupPoliciesOutputBody: Swift.Equatable { - let policyNames: [Swift.String]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListGroupPoliciesOutputError { -extension ListGroupPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case policyNames = "PolicyNames" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListGroupPoliciesResult")) - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policyNames = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListGroupPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListGroupsForUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case userName = "UserName" } -} -extension ListGroupsForUserInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -12504,42 +9740,17 @@ public struct ListGroupsForUserInput: Swift.Equatable { } } -struct ListGroupsForUserInputBody: Swift.Equatable { - let userName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListGroupsForUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListGroupsForUserOutput { -extension ListGroupsForUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListGroupsForUserOutputBody = try responseDecoder.decode(responseBody: data) - self.groups = output.groups - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.groups = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListGroupsForUserResult"] + var value = ListGroupsForUserOutput() + value.groups = try reader["Groups"].readListIfPresent(memberReadingClosure: IAMClientTypes.Group.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -12566,60 +9777,31 @@ public struct ListGroupsForUserOutput: Swift.Equatable { } } -struct ListGroupsForUserOutputBody: Swift.Equatable { - let groups: [IAMClientTypes.Group]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListGroupsForUserOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groups = "Groups" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListGroupsForUserOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListGroupsForUserResult")) - if containerValues.contains(.groups) { - struct KeyVal0{struct member{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([IAMClientTypes.Group].self, forKey: .member) - var groupsBuffer:[IAMClientTypes.Group]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [IAMClientTypes.Group]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - groups = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListGroupsForUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" } -} -extension ListGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -12654,51 +9836,26 @@ public struct ListGroupsInput: Swift.Equatable { public init( marker: Swift.String? = nil, maxItems: Swift.Int? = nil, - pathPrefix: Swift.String? = nil - ) - { - self.marker = marker - self.maxItems = maxItems - self.pathPrefix = pathPrefix - } -} - -struct ListGroupsInputBody: Swift.Equatable { - let pathPrefix: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded + pathPrefix: Swift.String? = nil + ) + { + self.marker = marker + self.maxItems = maxItems + self.pathPrefix = pathPrefix } } -extension ListGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.groups = output.groups - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.groups = nil - self.isTruncated = false - self.marker = nil +extension ListGroupsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListGroupsResult"] + var value = ListGroupsOutput() + value.groups = try reader["Groups"].readListIfPresent(memberReadingClosure: IAMClientTypes.Group.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -12725,59 +9882,30 @@ public struct ListGroupsOutput: Swift.Equatable { } } -struct ListGroupsOutputBody: Swift.Equatable { - let groups: [IAMClientTypes.Group]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groups = "Groups" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListGroupsResult")) - if containerValues.contains(.groups) { - struct KeyVal0{struct member{}} - let groupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groups) - if let groupsWrappedContainer = groupsWrappedContainer { - let groupsContainer = try groupsWrappedContainer.decodeIfPresent([IAMClientTypes.Group].self, forKey: .member) - var groupsBuffer:[IAMClientTypes.Group]? = nil - if let groupsContainer = groupsContainer { - groupsBuffer = [IAMClientTypes.Group]() - for structureContainer0 in groupsContainer { - groupsBuffer?.append(structureContainer0) - } - } - groups = groupsBuffer - } else { - groups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - groups = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListInstanceProfileTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceProfileName = "InstanceProfileName" + case marker = "Marker" + case maxItems = "MaxItems" } -} -extension ListInstanceProfileTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceProfileName = instanceProfileName { @@ -12822,42 +9950,17 @@ public struct ListInstanceProfileTagsInput: Swift.Equatable { } } -struct ListInstanceProfileTagsInputBody: Swift.Equatable { - let instanceProfileName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListInstanceProfileTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfileName = "InstanceProfileName" - case marker = "Marker" - case maxItems = "MaxItems" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListInstanceProfileTagsOutput { -extension ListInstanceProfileTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListInstanceProfileTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.tags = output.tags - } else { - self.isTruncated = false - self.marker = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListInstanceProfileTagsResult"] + var value = ListInstanceProfileTagsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12883,60 +9986,31 @@ public struct ListInstanceProfileTagsOutput: Swift.Equatable { } } -struct ListInstanceProfileTagsOutputBody: Swift.Equatable { - let tags: [IAMClientTypes.Tag]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListInstanceProfileTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case tags = "Tags" - } +enum ListInstanceProfileTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListInstanceProfileTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListInstanceProfileTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListInstanceProfilesForRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case roleName = "RoleName" } -} -extension ListInstanceProfilesForRoleInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -12981,42 +10055,17 @@ public struct ListInstanceProfilesForRoleInput: Swift.Equatable { } } -struct ListInstanceProfilesForRoleInputBody: Swift.Equatable { - let roleName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListInstanceProfilesForRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListInstanceProfilesForRoleOutput { -extension ListInstanceProfilesForRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListInstanceProfilesForRoleOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceProfiles = output.instanceProfiles - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.instanceProfiles = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListInstanceProfilesForRoleResult"] + var value = ListInstanceProfilesForRoleOutput() + value.instanceProfiles = try reader["InstanceProfiles"].readListIfPresent(memberReadingClosure: IAMClientTypes.InstanceProfile.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -13043,60 +10092,31 @@ public struct ListInstanceProfilesForRoleOutput: Swift.Equatable { } } -struct ListInstanceProfilesForRoleOutputBody: Swift.Equatable { - let instanceProfiles: [IAMClientTypes.InstanceProfile]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListInstanceProfilesForRoleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfiles = "InstanceProfiles" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListInstanceProfilesForRoleOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListInstanceProfilesForRoleResult")) - if containerValues.contains(.instanceProfiles) { - struct KeyVal0{struct member{}} - let instanceProfilesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceProfiles) - if let instanceProfilesWrappedContainer = instanceProfilesWrappedContainer { - let instanceProfilesContainer = try instanceProfilesWrappedContainer.decodeIfPresent([IAMClientTypes.InstanceProfile].self, forKey: .member) - var instanceProfilesBuffer:[IAMClientTypes.InstanceProfile]? = nil - if let instanceProfilesContainer = instanceProfilesContainer { - instanceProfilesBuffer = [IAMClientTypes.InstanceProfile]() - for structureContainer0 in instanceProfilesContainer { - instanceProfilesBuffer?.append(structureContainer0) - } - } - instanceProfiles = instanceProfilesBuffer - } else { - instanceProfiles = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - instanceProfiles = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListInstanceProfilesForRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListInstanceProfilesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" } -} -extension ListInstanceProfilesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -13140,42 +10160,17 @@ public struct ListInstanceProfilesInput: Swift.Equatable { } } -struct ListInstanceProfilesInputBody: Swift.Equatable { - let pathPrefix: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListInstanceProfilesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListInstanceProfilesOutput { -extension ListInstanceProfilesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListInstanceProfilesOutputBody = try responseDecoder.decode(responseBody: data) - self.instanceProfiles = output.instanceProfiles - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.instanceProfiles = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListInstanceProfilesResult"] + var value = ListInstanceProfilesOutput() + value.instanceProfiles = try reader["InstanceProfiles"].readListIfPresent(memberReadingClosure: IAMClientTypes.InstanceProfile.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -13202,59 +10197,30 @@ public struct ListInstanceProfilesOutput: Swift.Equatable { } } -struct ListInstanceProfilesOutputBody: Swift.Equatable { - let instanceProfiles: [IAMClientTypes.InstanceProfile]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListInstanceProfilesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfiles = "InstanceProfiles" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListInstanceProfilesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListInstanceProfilesResult")) - if containerValues.contains(.instanceProfiles) { - struct KeyVal0{struct member{}} - let instanceProfilesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceProfiles) - if let instanceProfilesWrappedContainer = instanceProfilesWrappedContainer { - let instanceProfilesContainer = try instanceProfilesWrappedContainer.decodeIfPresent([IAMClientTypes.InstanceProfile].self, forKey: .member) - var instanceProfilesBuffer:[IAMClientTypes.InstanceProfile]? = nil - if let instanceProfilesContainer = instanceProfilesContainer { - instanceProfilesBuffer = [IAMClientTypes.InstanceProfile]() - for structureContainer0 in instanceProfilesContainer { - instanceProfilesBuffer?.append(structureContainer0) - } - } - instanceProfiles = instanceProfilesBuffer - } else { - instanceProfiles = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - instanceProfiles = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListInstanceProfilesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListMFADeviceTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case serialNumber = "SerialNumber" } -} -extension ListMFADeviceTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -13299,42 +10265,17 @@ public struct ListMFADeviceTagsInput: Swift.Equatable { } } -struct ListMFADeviceTagsInputBody: Swift.Equatable { - let serialNumber: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListMFADeviceTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case serialNumber = "SerialNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListMFADeviceTagsOutput { -extension ListMFADeviceTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListMFADeviceTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.tags = output.tags - } else { - self.isTruncated = false - self.marker = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListMFADeviceTagsResult"] + var value = ListMFADeviceTagsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13360,61 +10301,32 @@ public struct ListMFADeviceTagsOutput: Swift.Equatable { } } -struct ListMFADeviceTagsOutputBody: Swift.Equatable { - let tags: [IAMClientTypes.Tag]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListMFADeviceTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case tags = "Tags" - } +enum ListMFADeviceTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListMFADeviceTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListMFADeviceTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListMFADevicesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case userName = "UserName" } -} -extension ListMFADevicesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -13458,42 +10370,17 @@ public struct ListMFADevicesInput: Swift.Equatable { } } -struct ListMFADevicesInputBody: Swift.Equatable { - let userName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListMFADevicesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListMFADevicesOutput { -extension ListMFADevicesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListMFADevicesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.mfaDevices = output.mfaDevices - } else { - self.isTruncated = false - self.mfaDevices = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListMFADevicesResult"] + var value = ListMFADevicesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.mfaDevices = try reader["MFADevices"].readListIfPresent(memberReadingClosure: IAMClientTypes.MFADevice.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -13520,60 +10407,31 @@ public struct ListMFADevicesOutput: Swift.Equatable { } } -struct ListMFADevicesOutputBody: Swift.Equatable { - let mfaDevices: [IAMClientTypes.MFADevice]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListMFADevicesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case mfaDevices = "MFADevices" - case marker = "Marker" - } +enum ListMFADevicesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListMFADevicesResult")) - if containerValues.contains(.mfaDevices) { - struct KeyVal0{struct member{}} - let mfaDevicesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .mfaDevices) - if let mfaDevicesWrappedContainer = mfaDevicesWrappedContainer { - let mfaDevicesContainer = try mfaDevicesWrappedContainer.decodeIfPresent([IAMClientTypes.MFADevice].self, forKey: .member) - var mfaDevicesBuffer:[IAMClientTypes.MFADevice]? = nil - if let mfaDevicesContainer = mfaDevicesContainer { - mfaDevicesBuffer = [IAMClientTypes.MFADevice]() - for structureContainer0 in mfaDevicesContainer { - mfaDevicesBuffer?.append(structureContainer0) - } - } - mfaDevices = mfaDevicesBuffer - } else { - mfaDevices = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - mfaDevices = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListMFADevicesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListOpenIDConnectProviderTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case openIDConnectProviderArn = "OpenIDConnectProviderArn" } -} -extension ListOpenIDConnectProviderTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -13618,42 +10476,17 @@ public struct ListOpenIDConnectProviderTagsInput: Swift.Equatable { } } -struct ListOpenIDConnectProviderTagsInputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListOpenIDConnectProviderTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListOpenIDConnectProviderTagsOutput { -extension ListOpenIDConnectProviderTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListOpenIDConnectProviderTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.tags = output.tags - } else { - self.isTruncated = false - self.marker = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListOpenIDConnectProviderTagsResult"] + var value = ListOpenIDConnectProviderTagsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13679,61 +10512,27 @@ public struct ListOpenIDConnectProviderTagsOutput: Swift.Equatable { } } -struct ListOpenIDConnectProviderTagsOutputBody: Swift.Equatable { - let tags: [IAMClientTypes.Tag]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListOpenIDConnectProviderTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case tags = "Tags" - } +enum ListOpenIDConnectProviderTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListOpenIDConnectProviderTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum ListOpenIDConnectProviderTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension ListOpenIDConnectProvidersInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("ListOpenIDConnectProviders", forKey:ClientRuntime.Key("Action")) @@ -13753,14 +10552,15 @@ public struct ListOpenIDConnectProvidersInput: Swift.Equatable { public init() { } } -extension ListOpenIDConnectProvidersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListOpenIDConnectProvidersOutputBody = try responseDecoder.decode(responseBody: data) - self.openIDConnectProviderList = output.openIDConnectProviderList - } else { - self.openIDConnectProviderList = nil +extension ListOpenIDConnectProvidersOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListOpenIDConnectProvidersResult"] + var value = ListOpenIDConnectProvidersOutput() + value.openIDConnectProviderList = try reader["OpenIDConnectProviderList"].readListIfPresent(memberReadingClosure: IAMClientTypes.OpenIDConnectProviderListEntry.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13778,51 +10578,24 @@ public struct ListOpenIDConnectProvidersOutput: Swift.Equatable { } } -struct ListOpenIDConnectProvidersOutputBody: Swift.Equatable { - let openIDConnectProviderList: [IAMClientTypes.OpenIDConnectProviderListEntry]? -} +enum ListOpenIDConnectProvidersOutputError { -extension ListOpenIDConnectProvidersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case openIDConnectProviderList = "OpenIDConnectProviderList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListOpenIDConnectProvidersResult")) - if containerValues.contains(.openIDConnectProviderList) { - struct KeyVal0{struct member{}} - let openIDConnectProviderListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .openIDConnectProviderList) - if let openIDConnectProviderListWrappedContainer = openIDConnectProviderListWrappedContainer { - let openIDConnectProviderListContainer = try openIDConnectProviderListWrappedContainer.decodeIfPresent([IAMClientTypes.OpenIDConnectProviderListEntry].self, forKey: .member) - var openIDConnectProviderListBuffer:[IAMClientTypes.OpenIDConnectProviderListEntry]? = nil - if let openIDConnectProviderListContainer = openIDConnectProviderListContainer { - openIDConnectProviderListBuffer = [IAMClientTypes.OpenIDConnectProviderListEntry]() - for structureContainer0 in openIDConnectProviderListContainer { - openIDConnectProviderListBuffer?.append(structureContainer0) - } - } - openIDConnectProviderList = openIDConnectProviderListBuffer - } else { - openIDConnectProviderList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - openIDConnectProviderList = nil - } - } -} - -enum ListOpenIDConnectProvidersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension IAMClientTypes.ListPoliciesGrantingServiceAccessEntry: Swift.Codable { +extension IAMClientTypes.ListPoliciesGrantingServiceAccessEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case policies = "Policies" case serviceNamespace = "ServiceNamespace" @@ -13847,28 +10620,13 @@ extension IAMClientTypes.ListPoliciesGrantingServiceAccessEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceNamespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceNamespace) - serviceNamespace = serviceNamespaceDecoded - if containerValues.contains(.policies) { - struct KeyVal0{struct member{}} - let policiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policies) - if let policiesWrappedContainer = policiesWrappedContainer { - let policiesContainer = try policiesWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyGrantingServiceAccess].self, forKey: .member) - var policiesBuffer:[IAMClientTypes.PolicyGrantingServiceAccess]? = nil - if let policiesContainer = policiesContainer { - policiesBuffer = [IAMClientTypes.PolicyGrantingServiceAccess]() - for structureContainer0 in policiesContainer { - policiesBuffer?.append(structureContainer0) - } - } - policies = policiesBuffer - } else { - policies = [] - } - } else { - policies = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ListPoliciesGrantingServiceAccessEntry() + value.serviceNamespace = try reader["ServiceNamespace"].readIfPresent() + value.policies = try reader["Policies"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyGrantingServiceAccess.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13894,6 +10652,12 @@ extension IAMClientTypes { } extension ListPoliciesGrantingServiceAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case arn = "Arn" + case marker = "Marker" + case serviceNamespaces = "ServiceNamespaces" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let arn = arn { @@ -13948,59 +10712,17 @@ public struct ListPoliciesGrantingServiceAccessInput: Swift.Equatable { } } -struct ListPoliciesGrantingServiceAccessInputBody: Swift.Equatable { - let marker: Swift.String? - let arn: Swift.String? - let serviceNamespaces: [Swift.String]? -} - -extension ListPoliciesGrantingServiceAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case marker = "Marker" - case serviceNamespaces = "ServiceNamespaces" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - if containerValues.contains(.serviceNamespaces) { - struct KeyVal0{struct member{}} - let serviceNamespacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceNamespaces) - if let serviceNamespacesWrappedContainer = serviceNamespacesWrappedContainer { - let serviceNamespacesContainer = try serviceNamespacesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var serviceNamespacesBuffer:[Swift.String]? = nil - if let serviceNamespacesContainer = serviceNamespacesContainer { - serviceNamespacesBuffer = [Swift.String]() - for stringContainer0 in serviceNamespacesContainer { - serviceNamespacesBuffer?.append(stringContainer0) - } - } - serviceNamespaces = serviceNamespacesBuffer - } else { - serviceNamespaces = [] - } - } else { - serviceNamespaces = nil - } - } -} +extension ListPoliciesGrantingServiceAccessOutput { -extension ListPoliciesGrantingServiceAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPoliciesGrantingServiceAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.policiesGrantingServiceAccess = output.policiesGrantingServiceAccess - } else { - self.isTruncated = false - self.marker = nil - self.policiesGrantingServiceAccess = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListPoliciesGrantingServiceAccessResult"] + var value = ListPoliciesGrantingServiceAccessOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.policiesGrantingServiceAccess = try reader["PoliciesGrantingServiceAccess"].readListIfPresent(memberReadingClosure: IAMClientTypes.ListPoliciesGrantingServiceAccessEntry.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14026,60 +10748,34 @@ public struct ListPoliciesGrantingServiceAccessOutput: Swift.Equatable { } } -struct ListPoliciesGrantingServiceAccessOutputBody: Swift.Equatable { - let policiesGrantingServiceAccess: [IAMClientTypes.ListPoliciesGrantingServiceAccessEntry]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListPoliciesGrantingServiceAccessOutputError { -extension ListPoliciesGrantingServiceAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case policiesGrantingServiceAccess = "PoliciesGrantingServiceAccess" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListPoliciesGrantingServiceAccessResult")) - if containerValues.contains(.policiesGrantingServiceAccess) { - struct KeyVal0{struct member{}} - let policiesGrantingServiceAccessWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policiesGrantingServiceAccess) - if let policiesGrantingServiceAccessWrappedContainer = policiesGrantingServiceAccessWrappedContainer { - let policiesGrantingServiceAccessContainer = try policiesGrantingServiceAccessWrappedContainer.decodeIfPresent([IAMClientTypes.ListPoliciesGrantingServiceAccessEntry].self, forKey: .member) - var policiesGrantingServiceAccessBuffer:[IAMClientTypes.ListPoliciesGrantingServiceAccessEntry]? = nil - if let policiesGrantingServiceAccessContainer = policiesGrantingServiceAccessContainer { - policiesGrantingServiceAccessBuffer = [IAMClientTypes.ListPoliciesGrantingServiceAccessEntry]() - for structureContainer0 in policiesGrantingServiceAccessContainer { - policiesGrantingServiceAccessBuffer?.append(structureContainer0) - } - } - policiesGrantingServiceAccess = policiesGrantingServiceAccessBuffer - } else { - policiesGrantingServiceAccess = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policiesGrantingServiceAccess = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListPoliciesGrantingServiceAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case onlyAttached = "OnlyAttached" + case pathPrefix = "PathPrefix" + case policyUsageFilter = "PolicyUsageFilter" + case scope = "Scope" } -} -extension ListPoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -14144,54 +10840,17 @@ public struct ListPoliciesInput: Swift.Equatable { } } -struct ListPoliciesInputBody: Swift.Equatable { - let scope: IAMClientTypes.PolicyScopeType? - let onlyAttached: Swift.Bool? - let pathPrefix: Swift.String? - let policyUsageFilter: IAMClientTypes.PolicyUsageType? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case onlyAttached = "OnlyAttached" - case pathPrefix = "PathPrefix" - case policyUsageFilter = "PolicyUsageFilter" - case scope = "Scope" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scopeDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyScopeType.self, forKey: .scope) - scope = scopeDecoded - let onlyAttachedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .onlyAttached) ?? false - onlyAttached = onlyAttachedDecoded - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let policyUsageFilterDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyUsageType.self, forKey: .policyUsageFilter) - policyUsageFilter = policyUsageFilterDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListPoliciesOutput { -extension ListPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.policies = output.policies - } else { - self.isTruncated = false - self.marker = nil - self.policies = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListPoliciesResult"] + var value = ListPoliciesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.policies = try reader["Policies"].readListIfPresent(memberReadingClosure: IAMClientTypes.Policy.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14217,59 +10876,30 @@ public struct ListPoliciesOutput: Swift.Equatable { } } -struct ListPoliciesOutputBody: Swift.Equatable { - let policies: [IAMClientTypes.Policy]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case policies = "Policies" - } +enum ListPoliciesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListPoliciesResult")) - if containerValues.contains(.policies) { - struct KeyVal0{struct member{}} - let policiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policies) - if let policiesWrappedContainer = policiesWrappedContainer { - let policiesContainer = try policiesWrappedContainer.decodeIfPresent([IAMClientTypes.Policy].self, forKey: .member) - var policiesBuffer:[IAMClientTypes.Policy]? = nil - if let policiesContainer = policiesContainer { - policiesBuffer = [IAMClientTypes.Policy]() - for structureContainer0 in policiesContainer { - policiesBuffer?.append(structureContainer0) - } - } - policies = policiesBuffer - } else { - policies = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policies = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListPolicyTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case policyArn = "PolicyArn" } -} -extension ListPolicyTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -14303,53 +10933,28 @@ public struct ListPolicyTagsInput: Swift.Equatable { public var policyArn: Swift.String? public init( - marker: Swift.String? = nil, - maxItems: Swift.Int? = nil, - policyArn: Swift.String? = nil - ) - { - self.marker = marker - self.maxItems = maxItems - self.policyArn = policyArn - } -} - -struct ListPolicyTagsInputBody: Swift.Equatable { - let policyArn: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListPolicyTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case policyArn = "PolicyArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded + marker: Swift.String? = nil, + maxItems: Swift.Int? = nil, + policyArn: Swift.String? = nil + ) + { + self.marker = marker + self.maxItems = maxItems + self.policyArn = policyArn } } -extension ListPolicyTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPolicyTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.tags = output.tags - } else { - self.isTruncated = false - self.marker = nil - self.tags = nil +extension ListPolicyTagsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListPolicyTagsResult"] + var value = ListPolicyTagsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14375,61 +10980,32 @@ public struct ListPolicyTagsOutput: Swift.Equatable { } } -struct ListPolicyTagsOutputBody: Swift.Equatable { - let tags: [IAMClientTypes.Tag]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListPolicyTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case tags = "Tags" - } +enum ListPolicyTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListPolicyTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListPolicyTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListPolicyVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case policyArn = "PolicyArn" } -} -extension ListPolicyVersionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -14474,42 +11050,17 @@ public struct ListPolicyVersionsInput: Swift.Equatable { } } -struct ListPolicyVersionsInputBody: Swift.Equatable { - let policyArn: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListPolicyVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case policyArn = "PolicyArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListPolicyVersionsOutput { -extension ListPolicyVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPolicyVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.versions = output.versions - } else { - self.isTruncated = false - self.marker = nil - self.versions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListPolicyVersionsResult"] + var value = ListPolicyVersionsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.versions = try reader["Versions"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyVersion.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14535,61 +11086,32 @@ public struct ListPolicyVersionsOutput: Swift.Equatable { } } -struct ListPolicyVersionsOutputBody: Swift.Equatable { - let versions: [IAMClientTypes.PolicyVersion]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListPolicyVersionsOutputError { -extension ListPolicyVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case versions = "Versions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListPolicyVersionsResult")) - if containerValues.contains(.versions) { - struct KeyVal0{struct member{}} - let versionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .versions) - if let versionsWrappedContainer = versionsWrappedContainer { - let versionsContainer = try versionsWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyVersion].self, forKey: .member) - var versionsBuffer:[IAMClientTypes.PolicyVersion]? = nil - if let versionsContainer = versionsContainer { - versionsBuffer = [IAMClientTypes.PolicyVersion]() - for structureContainer0 in versionsContainer { - versionsBuffer?.append(structureContainer0) - } - } - versions = versionsBuffer - } else { - versions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - versions = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListPolicyVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListRolePoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case roleName = "RoleName" } -} -extension ListRolePoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -14634,42 +11156,17 @@ public struct ListRolePoliciesInput: Swift.Equatable { } } -struct ListRolePoliciesInputBody: Swift.Equatable { - let roleName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListRolePoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListRolePoliciesOutput { -extension ListRolePoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListRolePoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.policyNames = output.policyNames - } else { - self.isTruncated = false - self.marker = nil - self.policyNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListRolePoliciesResult"] + var value = ListRolePoliciesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.policyNames = try reader["PolicyNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14696,60 +11193,31 @@ public struct ListRolePoliciesOutput: Swift.Equatable { } } -struct ListRolePoliciesOutputBody: Swift.Equatable { - let policyNames: [Swift.String]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListRolePoliciesOutputError { -extension ListRolePoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case policyNames = "PolicyNames" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListRolePoliciesResult")) - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policyNames = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListRolePoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListRoleTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case roleName = "RoleName" } -} -extension ListRoleTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -14794,42 +11262,17 @@ public struct ListRoleTagsInput: Swift.Equatable { } } -struct ListRoleTagsInputBody: Swift.Equatable { - let roleName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListRoleTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListRoleTagsOutput { -extension ListRoleTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListRoleTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.tags = output.tags - } else { - self.isTruncated = false - self.marker = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListRoleTagsResult"] + var value = ListRoleTagsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -14855,60 +11298,31 @@ public struct ListRoleTagsOutput: Swift.Equatable { } } -struct ListRoleTagsOutputBody: Swift.Equatable { - let tags: [IAMClientTypes.Tag]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListRoleTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case tags = "Tags" - } +enum ListRoleTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListRoleTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListRoleTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListRolesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" } -} -extension ListRolesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -14952,42 +11366,17 @@ public struct ListRolesInput: Swift.Equatable { } } -struct ListRolesInputBody: Swift.Equatable { - let pathPrefix: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListRolesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListRolesOutput { -extension ListRolesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListRolesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.roles = output.roles - } else { - self.isTruncated = false - self.marker = nil - self.roles = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListRolesResult"] + var value = ListRolesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.roles = try reader["Roles"].readListIfPresent(memberReadingClosure: IAMClientTypes.Role.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15014,59 +11403,30 @@ public struct ListRolesOutput: Swift.Equatable { } } -struct ListRolesOutputBody: Swift.Equatable { - let roles: [IAMClientTypes.Role]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListRolesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case roles = "Roles" - } +enum ListRolesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListRolesResult")) - if containerValues.contains(.roles) { - struct KeyVal0{struct member{}} - let rolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .roles) - if let rolesWrappedContainer = rolesWrappedContainer { - let rolesContainer = try rolesWrappedContainer.decodeIfPresent([IAMClientTypes.Role].self, forKey: .member) - var rolesBuffer:[IAMClientTypes.Role]? = nil - if let rolesContainer = rolesContainer { - rolesBuffer = [IAMClientTypes.Role]() - for structureContainer0 in rolesContainer { - rolesBuffer?.append(structureContainer0) - } - } - roles = rolesBuffer - } else { - roles = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - roles = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListRolesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListSAMLProviderTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case samlProviderArn = "SAMLProviderArn" } -} -extension ListSAMLProviderTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -15111,42 +11471,17 @@ public struct ListSAMLProviderTagsInput: Swift.Equatable { } } -struct ListSAMLProviderTagsInputBody: Swift.Equatable { - let samlProviderArn: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListSAMLProviderTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case samlProviderArn = "SAMLProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListSAMLProviderTagsOutput { -extension ListSAMLProviderTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListSAMLProviderTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.tags = output.tags - } else { - self.isTruncated = false - self.marker = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListSAMLProviderTagsResult"] + var value = ListSAMLProviderTagsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15172,61 +11507,27 @@ public struct ListSAMLProviderTagsOutput: Swift.Equatable { } } -struct ListSAMLProviderTagsOutputBody: Swift.Equatable { - let tags: [IAMClientTypes.Tag]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListSAMLProviderTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case tags = "Tags" - } +enum ListSAMLProviderTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListSAMLProviderTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum ListSAMLProviderTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension ListSAMLProvidersInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("ListSAMLProviders", forKey:ClientRuntime.Key("Action")) @@ -15246,14 +11547,15 @@ public struct ListSAMLProvidersInput: Swift.Equatable { public init() { } } -extension ListSAMLProvidersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListSAMLProvidersOutputBody = try responseDecoder.decode(responseBody: data) - self.samlProviderList = output.samlProviderList - } else { - self.samlProviderList = nil +extension ListSAMLProvidersOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListSAMLProvidersResult"] + var value = ListSAMLProvidersOutput() + value.samlProviderList = try reader["SAMLProviderList"].readListIfPresent(memberReadingClosure: IAMClientTypes.SAMLProviderListEntry.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15271,51 +11573,30 @@ public struct ListSAMLProvidersOutput: Swift.Equatable { } } -struct ListSAMLProvidersOutputBody: Swift.Equatable { - let samlProviderList: [IAMClientTypes.SAMLProviderListEntry]? -} +enum ListSAMLProvidersOutputError { -extension ListSAMLProvidersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderList = "SAMLProviderList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListSAMLProvidersResult")) - if containerValues.contains(.samlProviderList) { - struct KeyVal0{struct member{}} - let samlProviderListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .samlProviderList) - if let samlProviderListWrappedContainer = samlProviderListWrappedContainer { - let samlProviderListContainer = try samlProviderListWrappedContainer.decodeIfPresent([IAMClientTypes.SAMLProviderListEntry].self, forKey: .member) - var samlProviderListBuffer:[IAMClientTypes.SAMLProviderListEntry]? = nil - if let samlProviderListContainer = samlProviderListContainer { - samlProviderListBuffer = [IAMClientTypes.SAMLProviderListEntry]() - for structureContainer0 in samlProviderListContainer { - samlProviderListBuffer?.append(structureContainer0) - } - } - samlProviderList = samlProviderListBuffer - } else { - samlProviderList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - samlProviderList = nil } } } -enum ListSAMLProvidersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListSSHPublicKeysInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case userName = "UserName" } -} -extension ListSSHPublicKeysInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -15359,42 +11640,17 @@ public struct ListSSHPublicKeysInput: Swift.Equatable { } } -struct ListSSHPublicKeysInputBody: Swift.Equatable { - let userName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListSSHPublicKeysInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListSSHPublicKeysOutput { -extension ListSSHPublicKeysOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListSSHPublicKeysOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.sshPublicKeys = output.sshPublicKeys - } else { - self.isTruncated = false - self.marker = nil - self.sshPublicKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListSSHPublicKeysResult"] + var value = ListSSHPublicKeysOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.sshPublicKeys = try reader["SSHPublicKeys"].readListIfPresent(memberReadingClosure: IAMClientTypes.SSHPublicKeyMetadata.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15420,59 +11676,30 @@ public struct ListSSHPublicKeysOutput: Swift.Equatable { } } -struct ListSSHPublicKeysOutputBody: Swift.Equatable { - let sshPublicKeys: [IAMClientTypes.SSHPublicKeyMetadata]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListSSHPublicKeysOutputError { -extension ListSSHPublicKeysOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case sshPublicKeys = "SSHPublicKeys" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListSSHPublicKeysResult")) - if containerValues.contains(.sshPublicKeys) { - struct KeyVal0{struct member{}} - let sshPublicKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sshPublicKeys) - if let sshPublicKeysWrappedContainer = sshPublicKeysWrappedContainer { - let sshPublicKeysContainer = try sshPublicKeysWrappedContainer.decodeIfPresent([IAMClientTypes.SSHPublicKeyMetadata].self, forKey: .member) - var sshPublicKeysBuffer:[IAMClientTypes.SSHPublicKeyMetadata]? = nil - if let sshPublicKeysContainer = sshPublicKeysContainer { - sshPublicKeysBuffer = [IAMClientTypes.SSHPublicKeyMetadata]() - for structureContainer0 in sshPublicKeysContainer { - sshPublicKeysBuffer?.append(structureContainer0) - } - } - sshPublicKeys = sshPublicKeysBuffer - } else { - sshPublicKeys = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - sshPublicKeys = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListSSHPublicKeysOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListServerCertificateTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case serverCertificateName = "ServerCertificateName" } -} -extension ListServerCertificateTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -15517,42 +11744,17 @@ public struct ListServerCertificateTagsInput: Swift.Equatable { } } -struct ListServerCertificateTagsInputBody: Swift.Equatable { - let serverCertificateName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListServerCertificateTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case serverCertificateName = "ServerCertificateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateName) - serverCertificateName = serverCertificateNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListServerCertificateTagsOutput { -extension ListServerCertificateTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListServerCertificateTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.tags = output.tags - } else { - self.isTruncated = false - self.marker = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListServerCertificateTagsResult"] + var value = ListServerCertificateTagsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15578,60 +11780,31 @@ public struct ListServerCertificateTagsOutput: Swift.Equatable { } } -struct ListServerCertificateTagsOutputBody: Swift.Equatable { - let tags: [IAMClientTypes.Tag]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListServerCertificateTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case tags = "Tags" - } +enum ListServerCertificateTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListServerCertificateTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListServerCertificateTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListServerCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" } -} -extension ListServerCertificatesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -15675,42 +11848,17 @@ public struct ListServerCertificatesInput: Swift.Equatable { } } -struct ListServerCertificatesInputBody: Swift.Equatable { - let pathPrefix: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListServerCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListServerCertificatesOutput { -extension ListServerCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListServerCertificatesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.serverCertificateMetadataList = output.serverCertificateMetadataList - } else { - self.isTruncated = false - self.marker = nil - self.serverCertificateMetadataList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListServerCertificatesResult"] + var value = ListServerCertificatesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.serverCertificateMetadataList = try reader["ServerCertificateMetadataList"].readListIfPresent(memberReadingClosure: IAMClientTypes.ServerCertificateMetadata.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15737,59 +11885,29 @@ public struct ListServerCertificatesOutput: Swift.Equatable { } } -struct ListServerCertificatesOutputBody: Swift.Equatable { - let serverCertificateMetadataList: [IAMClientTypes.ServerCertificateMetadata]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListServerCertificatesOutputError { -extension ListServerCertificatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case serverCertificateMetadataList = "ServerCertificateMetadataList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListServerCertificatesResult")) - if containerValues.contains(.serverCertificateMetadataList) { - struct KeyVal0{struct member{}} - let serverCertificateMetadataListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serverCertificateMetadataList) - if let serverCertificateMetadataListWrappedContainer = serverCertificateMetadataListWrappedContainer { - let serverCertificateMetadataListContainer = try serverCertificateMetadataListWrappedContainer.decodeIfPresent([IAMClientTypes.ServerCertificateMetadata].self, forKey: .member) - var serverCertificateMetadataListBuffer:[IAMClientTypes.ServerCertificateMetadata]? = nil - if let serverCertificateMetadataListContainer = serverCertificateMetadataListContainer { - serverCertificateMetadataListBuffer = [IAMClientTypes.ServerCertificateMetadata]() - for structureContainer0 in serverCertificateMetadataListContainer { - serverCertificateMetadataListBuffer?.append(structureContainer0) - } - } - serverCertificateMetadataList = serverCertificateMetadataListBuffer - } else { - serverCertificateMetadataList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - serverCertificateMetadataList = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListServerCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListServiceSpecificCredentialsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serviceName = "ServiceName" + case userName = "UserName" } -} -extension ListServiceSpecificCredentialsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serviceName = serviceName { @@ -15826,34 +11944,15 @@ public struct ListServiceSpecificCredentialsInput: Swift.Equatable { } } -struct ListServiceSpecificCredentialsInputBody: Swift.Equatable { - let userName: Swift.String? - let serviceName: Swift.String? -} - -extension ListServiceSpecificCredentialsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceName = "ServiceName" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - } -} +extension ListServiceSpecificCredentialsOutput { -extension ListServiceSpecificCredentialsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListServiceSpecificCredentialsOutputBody = try responseDecoder.decode(responseBody: data) - self.serviceSpecificCredentials = output.serviceSpecificCredentials - } else { - self.serviceSpecificCredentials = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListServiceSpecificCredentialsResult"] + var value = ListServiceSpecificCredentialsOutput() + value.serviceSpecificCredentials = try reader["ServiceSpecificCredentials"].readListIfPresent(memberReadingClosure: IAMClientTypes.ServiceSpecificCredentialMetadata.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15870,52 +11969,31 @@ public struct ListServiceSpecificCredentialsOutput: Swift.Equatable { } } -struct ListServiceSpecificCredentialsOutputBody: Swift.Equatable { - let serviceSpecificCredentials: [IAMClientTypes.ServiceSpecificCredentialMetadata]? -} +enum ListServiceSpecificCredentialsOutputError { -extension ListServiceSpecificCredentialsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceSpecificCredentials = "ServiceSpecificCredentials" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListServiceSpecificCredentialsResult")) - if containerValues.contains(.serviceSpecificCredentials) { - struct KeyVal0{struct member{}} - let serviceSpecificCredentialsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceSpecificCredentials) - if let serviceSpecificCredentialsWrappedContainer = serviceSpecificCredentialsWrappedContainer { - let serviceSpecificCredentialsContainer = try serviceSpecificCredentialsWrappedContainer.decodeIfPresent([IAMClientTypes.ServiceSpecificCredentialMetadata].self, forKey: .member) - var serviceSpecificCredentialsBuffer:[IAMClientTypes.ServiceSpecificCredentialMetadata]? = nil - if let serviceSpecificCredentialsContainer = serviceSpecificCredentialsContainer { - serviceSpecificCredentialsBuffer = [IAMClientTypes.ServiceSpecificCredentialMetadata]() - for structureContainer0 in serviceSpecificCredentialsContainer { - serviceSpecificCredentialsBuffer?.append(structureContainer0) - } - } - serviceSpecificCredentials = serviceSpecificCredentialsBuffer - } else { - serviceSpecificCredentials = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotSupportedService": return try await ServiceNotSupportedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - serviceSpecificCredentials = nil } } } -enum ListServiceSpecificCredentialsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotSupportedService": return try await ServiceNotSupportedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListSigningCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case userName = "UserName" } -} -extension ListSigningCertificatesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -15951,50 +12029,25 @@ public struct ListSigningCertificatesInput: Swift.Equatable { marker: Swift.String? = nil, maxItems: Swift.Int? = nil, userName: Swift.String? = nil - ) - { - self.marker = marker - self.maxItems = maxItems - self.userName = userName - } -} - -struct ListSigningCertificatesInputBody: Swift.Equatable { - let userName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListSigningCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded + ) + { + self.marker = marker + self.maxItems = maxItems + self.userName = userName } } -extension ListSigningCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListSigningCertificatesOutputBody = try responseDecoder.decode(responseBody: data) - self.certificates = output.certificates - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.certificates = nil - self.isTruncated = false - self.marker = nil +extension ListSigningCertificatesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListSigningCertificatesResult"] + var value = ListSigningCertificatesOutput() + value.certificates = try reader["Certificates"].readListIfPresent(memberReadingClosure: IAMClientTypes.SigningCertificate.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -16021,60 +12074,31 @@ public struct ListSigningCertificatesOutput: Swift.Equatable { } } -struct ListSigningCertificatesOutputBody: Swift.Equatable { - let certificates: [IAMClientTypes.SigningCertificate]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListSigningCertificatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificates = "Certificates" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum ListSigningCertificatesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListSigningCertificatesResult")) - if containerValues.contains(.certificates) { - struct KeyVal0{struct member{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([IAMClientTypes.SigningCertificate].self, forKey: .member) - var certificatesBuffer:[IAMClientTypes.SigningCertificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [IAMClientTypes.SigningCertificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - certificates = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListSigningCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListUserPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case userName = "UserName" } -} -extension ListUserPoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -16119,42 +12143,17 @@ public struct ListUserPoliciesInput: Swift.Equatable { } } -struct ListUserPoliciesInputBody: Swift.Equatable { - let userName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListUserPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListUserPoliciesOutput { -extension ListUserPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListUserPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.policyNames = output.policyNames - } else { - self.isTruncated = false - self.marker = nil - self.policyNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListUserPoliciesResult"] + var value = ListUserPoliciesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.policyNames = try reader["PolicyNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -16181,60 +12180,31 @@ public struct ListUserPoliciesOutput: Swift.Equatable { } } -struct ListUserPoliciesOutputBody: Swift.Equatable { - let policyNames: [Swift.String]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListUserPoliciesOutputError { -extension ListUserPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case policyNames = "PolicyNames" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListUserPoliciesResult")) - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policyNames = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListUserPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListUserTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case userName = "UserName" } -} -extension ListUserTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -16279,42 +12249,17 @@ public struct ListUserTagsInput: Swift.Equatable { } } -struct ListUserTagsInputBody: Swift.Equatable { - let userName: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListUserTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListUserTagsOutput { -extension ListUserTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListUserTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.tags = output.tags - } else { - self.isTruncated = false - self.marker = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListUserTagsResult"] + var value = ListUserTagsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -16340,60 +12285,31 @@ public struct ListUserTagsOutput: Swift.Equatable { } } -struct ListUserTagsOutputBody: Swift.Equatable { - let tags: [IAMClientTypes.Tag]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension ListUserTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case tags = "Tags" - } +enum ListUserTagsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListUserTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListUserTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListUsersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxItems = "MaxItems" + case pathPrefix = "PathPrefix" } -} -extension ListUsersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -16437,42 +12353,17 @@ public struct ListUsersInput: Swift.Equatable { } } -struct ListUsersInputBody: Swift.Equatable { - let pathPrefix: Swift.String? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListUsersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxItems = "MaxItems" - case pathPrefix = "PathPrefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .pathPrefix) - pathPrefix = pathPrefixDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListUsersOutput { -extension ListUsersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListUsersOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.users = output.users - } else { - self.isTruncated = false - self.marker = nil - self.users = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListUsersResult"] + var value = ListUsersOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.users = try reader["Users"].readListIfPresent(memberReadingClosure: IAMClientTypes.User.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -16499,59 +12390,30 @@ public struct ListUsersOutput: Swift.Equatable { } } -struct ListUsersOutputBody: Swift.Equatable { - let users: [IAMClientTypes.User]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListUsersOutputError { -extension ListUsersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case users = "Users" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListUsersResult")) - if containerValues.contains(.users) { - struct KeyVal0{struct member{}} - let usersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .users) - if let usersWrappedContainer = usersWrappedContainer { - let usersContainer = try usersWrappedContainer.decodeIfPresent([IAMClientTypes.User].self, forKey: .member) - var usersBuffer:[IAMClientTypes.User]? = nil - if let usersContainer = usersContainer { - usersBuffer = [IAMClientTypes.User]() - for structureContainer0 in usersContainer { - usersBuffer?.append(structureContainer0) - } - } - users = usersBuffer - } else { - users = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - users = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum ListUsersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListVirtualMFADevicesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case assignmentStatus = "AssignmentStatus" + case marker = "Marker" + case maxItems = "MaxItems" } -} -extension ListVirtualMFADevicesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let assignmentStatus = assignmentStatus { @@ -16595,42 +12457,17 @@ public struct ListVirtualMFADevicesInput: Swift.Equatable { } } -struct ListVirtualMFADevicesInputBody: Swift.Equatable { - let assignmentStatus: IAMClientTypes.AssignmentStatusType? - let marker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListVirtualMFADevicesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assignmentStatus = "AssignmentStatus" - case marker = "Marker" - case maxItems = "MaxItems" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let assignmentStatusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AssignmentStatusType.self, forKey: .assignmentStatus) - assignmentStatus = assignmentStatusDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListVirtualMFADevicesOutput { -extension ListVirtualMFADevicesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListVirtualMFADevicesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.marker = output.marker - self.virtualMFADevices = output.virtualMFADevices - } else { - self.isTruncated = false - self.marker = nil - self.virtualMFADevices = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListVirtualMFADevicesResult"] + var value = ListVirtualMFADevicesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.virtualMFADevices = try reader["VirtualMFADevices"].readListIfPresent(memberReadingClosure: IAMClientTypes.VirtualMFADevice.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -16657,58 +12494,23 @@ public struct ListVirtualMFADevicesOutput: Swift.Equatable { } } -struct ListVirtualMFADevicesOutputBody: Swift.Equatable { - let virtualMFADevices: [IAMClientTypes.VirtualMFADevice]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} +enum ListVirtualMFADevicesOutputError { -extension ListVirtualMFADevicesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case marker = "Marker" - case virtualMFADevices = "VirtualMFADevices" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListVirtualMFADevicesResult")) - if containerValues.contains(.virtualMFADevices) { - struct KeyVal0{struct member{}} - let virtualMFADevicesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .virtualMFADevices) - if let virtualMFADevicesWrappedContainer = virtualMFADevicesWrappedContainer { - let virtualMFADevicesContainer = try virtualMFADevicesWrappedContainer.decodeIfPresent([IAMClientTypes.VirtualMFADevice].self, forKey: .member) - var virtualMFADevicesBuffer:[IAMClientTypes.VirtualMFADevice]? = nil - if let virtualMFADevicesContainer = virtualMFADevicesContainer { - virtualMFADevicesBuffer = [IAMClientTypes.VirtualMFADevice]() - for structureContainer0 in virtualMFADevicesContainer { - virtualMFADevicesBuffer?.append(structureContainer0) - } - } - virtualMFADevices = virtualMFADevicesBuffer - } else { - virtualMFADevices = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - virtualMFADevices = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum ListVirtualMFADevicesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension IAMClientTypes.LoginProfile: Swift.Codable { +extension IAMClientTypes.LoginProfile: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createDate = "CreateDate" case passwordResetRequired = "PasswordResetRequired" @@ -16728,14 +12530,15 @@ extension IAMClientTypes.LoginProfile: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let passwordResetRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .passwordResetRequired) ?? false - passwordResetRequired = passwordResetRequiredDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.LoginProfile() + value.userName = try reader["UserName"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.passwordResetRequired = try reader["PasswordResetRequired"].readIfPresent() ?? false + return value + } } } @@ -16765,7 +12568,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.MFADevice: Swift.Codable { +extension IAMClientTypes.MFADevice: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case enableDate = "EnableDate" case serialNumber = "SerialNumber" @@ -16785,14 +12588,15 @@ extension IAMClientTypes.MFADevice: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - let enableDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enableDate) - enableDate = enableDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.MFADevice() + value.userName = try reader["UserName"].readIfPresent() + value.serialNumber = try reader["SerialNumber"].readIfPresent() + value.enableDate = try reader["EnableDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -16824,16 +12628,14 @@ extension IAMClientTypes { } extension MalformedCertificateException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MalformedCertificateException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16861,33 +12663,15 @@ public struct MalformedCertificateException: ClientRuntime.ModeledError, AWSClie } } -struct MalformedCertificateExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension MalformedCertificateExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension MalformedPolicyDocumentException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MalformedPolicyDocumentException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16915,23 +12699,7 @@ public struct MalformedPolicyDocumentException: ClientRuntime.ModeledError, AWSC } } -struct MalformedPolicyDocumentExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension MalformedPolicyDocumentExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension IAMClientTypes.ManagedPolicyDetail: Swift.Codable { +extension IAMClientTypes.ManagedPolicyDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case attachmentCount = "AttachmentCount" @@ -16996,48 +12764,23 @@ extension IAMClientTypes.ManagedPolicyDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyId) - policyId = policyIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let defaultVersionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultVersionId) - defaultVersionId = defaultVersionIdDecoded - let attachmentCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .attachmentCount) - attachmentCount = attachmentCountDecoded - let permissionsBoundaryUsageCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .permissionsBoundaryUsageCount) - permissionsBoundaryUsageCount = permissionsBoundaryUsageCountDecoded - let isAttachableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isAttachable) ?? false - isAttachable = isAttachableDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let updateDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateDate) - updateDate = updateDateDecoded - if containerValues.contains(.policyVersionList) { - struct KeyVal0{struct member{}} - let policyVersionListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyVersionList) - if let policyVersionListWrappedContainer = policyVersionListWrappedContainer { - let policyVersionListContainer = try policyVersionListWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyVersion].self, forKey: .member) - var policyVersionListBuffer:[IAMClientTypes.PolicyVersion]? = nil - if let policyVersionListContainer = policyVersionListContainer { - policyVersionListBuffer = [IAMClientTypes.PolicyVersion]() - for structureContainer0 in policyVersionListContainer { - policyVersionListBuffer?.append(structureContainer0) - } - } - policyVersionList = policyVersionListBuffer - } else { - policyVersionList = [] - } - } else { - policyVersionList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ManagedPolicyDetail() + value.policyName = try reader["PolicyName"].readIfPresent() + value.policyId = try reader["PolicyId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.path = try reader["Path"].readIfPresent() + value.defaultVersionId = try reader["DefaultVersionId"].readIfPresent() + value.attachmentCount = try reader["AttachmentCount"].readIfPresent() + value.permissionsBoundaryUsageCount = try reader["PermissionsBoundaryUsageCount"].readIfPresent() + value.isAttachable = try reader["IsAttachable"].readIfPresent() ?? false + value.description = try reader["Description"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.updateDate = try reader["UpdateDate"].readTimestampIfPresent(format: .dateTime) + value.policyVersionList = try reader["PolicyVersionList"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyVersion.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -17103,16 +12846,14 @@ extension IAMClientTypes { } extension NoSuchEntityException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchEntityException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17140,23 +12881,7 @@ public struct NoSuchEntityException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct NoSuchEntityExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchEntityExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension IAMClientTypes.OpenIDConnectProviderListEntry: Swift.Codable { +extension IAMClientTypes.OpenIDConnectProviderListEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" } @@ -17168,10 +12893,13 @@ extension IAMClientTypes.OpenIDConnectProviderListEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.OpenIDConnectProviderListEntry() + value.arn = try reader["Arn"].readIfPresent() + return value + } } } @@ -17191,7 +12919,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.OrganizationsDecisionDetail: Swift.Codable { +extension IAMClientTypes.OrganizationsDecisionDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedByOrganizations = "AllowedByOrganizations" } @@ -17203,10 +12931,13 @@ extension IAMClientTypes.OrganizationsDecisionDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allowedByOrganizationsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowedByOrganizations) ?? false - allowedByOrganizations = allowedByOrganizationsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.OrganizationsDecisionDetail() + value.allowedByOrganizations = try reader["AllowedByOrganizations"].readIfPresent() ?? false + return value + } } } @@ -17226,7 +12957,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.PasswordPolicy: Swift.Codable { +extension IAMClientTypes.PasswordPolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowUsersToChangePassword = "AllowUsersToChangePassword" case expirePasswords = "ExpirePasswords" @@ -17274,28 +13005,22 @@ extension IAMClientTypes.PasswordPolicy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minimumPasswordLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minimumPasswordLength) - minimumPasswordLength = minimumPasswordLengthDecoded - let requireSymbolsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireSymbols) ?? false - requireSymbols = requireSymbolsDecoded - let requireNumbersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireNumbers) ?? false - requireNumbers = requireNumbersDecoded - let requireUppercaseCharactersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireUppercaseCharacters) ?? false - requireUppercaseCharacters = requireUppercaseCharactersDecoded - let requireLowercaseCharactersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireLowercaseCharacters) ?? false - requireLowercaseCharacters = requireLowercaseCharactersDecoded - let allowUsersToChangePasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowUsersToChangePassword) ?? false - allowUsersToChangePassword = allowUsersToChangePasswordDecoded - let expirePasswordsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .expirePasswords) ?? false - expirePasswords = expirePasswordsDecoded - let maxPasswordAgeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxPasswordAge) - maxPasswordAge = maxPasswordAgeDecoded - let passwordReusePreventionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .passwordReusePrevention) - passwordReusePrevention = passwordReusePreventionDecoded - let hardExpiryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .hardExpiry) - hardExpiry = hardExpiryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.PasswordPolicy() + value.minimumPasswordLength = try reader["MinimumPasswordLength"].readIfPresent() + value.requireSymbols = try reader["RequireSymbols"].readIfPresent() ?? false + value.requireNumbers = try reader["RequireNumbers"].readIfPresent() ?? false + value.requireUppercaseCharacters = try reader["RequireUppercaseCharacters"].readIfPresent() ?? false + value.requireLowercaseCharacters = try reader["RequireLowercaseCharacters"].readIfPresent() ?? false + value.allowUsersToChangePassword = try reader["AllowUsersToChangePassword"].readIfPresent() ?? false + value.expirePasswords = try reader["ExpirePasswords"].readIfPresent() ?? false + value.maxPasswordAge = try reader["MaxPasswordAge"].readIfPresent() + value.passwordReusePrevention = try reader["PasswordReusePrevention"].readIfPresent() + value.hardExpiry = try reader["HardExpiry"].readIfPresent() + return value + } } } @@ -17352,16 +13077,14 @@ extension IAMClientTypes { } extension PasswordPolicyViolationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PasswordPolicyViolationException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17389,22 +13112,6 @@ public struct PasswordPolicyViolationException: ClientRuntime.ModeledError, AWSC } } -struct PasswordPolicyViolationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PasswordPolicyViolationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IAMClientTypes { public enum PermissionsBoundaryAttachmentType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case policy @@ -17434,7 +13141,7 @@ extension IAMClientTypes { } } -extension IAMClientTypes.PermissionsBoundaryDecisionDetail: Swift.Codable { +extension IAMClientTypes.PermissionsBoundaryDecisionDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedByPermissionsBoundary = "AllowedByPermissionsBoundary" } @@ -17446,10 +13153,13 @@ extension IAMClientTypes.PermissionsBoundaryDecisionDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allowedByPermissionsBoundaryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowedByPermissionsBoundary) ?? false - allowedByPermissionsBoundary = allowedByPermissionsBoundaryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.PermissionsBoundaryDecisionDetail() + value.allowedByPermissionsBoundary = try reader["AllowedByPermissionsBoundary"].readIfPresent() ?? false + return value + } } } @@ -17469,7 +13179,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.Policy: Swift.Codable { +extension IAMClientTypes.Policy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case attachmentCount = "AttachmentCount" @@ -17534,48 +13244,23 @@ extension IAMClientTypes.Policy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyId) - policyId = policyIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let defaultVersionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultVersionId) - defaultVersionId = defaultVersionIdDecoded - let attachmentCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .attachmentCount) - attachmentCount = attachmentCountDecoded - let permissionsBoundaryUsageCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .permissionsBoundaryUsageCount) - permissionsBoundaryUsageCount = permissionsBoundaryUsageCountDecoded - let isAttachableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isAttachable) ?? false - isAttachable = isAttachableDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let updateDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updateDate) - updateDate = updateDateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.Policy() + value.policyName = try reader["PolicyName"].readIfPresent() + value.policyId = try reader["PolicyId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.path = try reader["Path"].readIfPresent() + value.defaultVersionId = try reader["DefaultVersionId"].readIfPresent() + value.attachmentCount = try reader["AttachmentCount"].readIfPresent() + value.permissionsBoundaryUsageCount = try reader["PermissionsBoundaryUsageCount"].readIfPresent() + value.isAttachable = try reader["IsAttachable"].readIfPresent() ?? false + value.description = try reader["Description"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.updateDate = try reader["UpdateDate"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -17640,7 +13325,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.PolicyDetail: Swift.Codable { +extension IAMClientTypes.PolicyDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case policyDocument = "PolicyDocument" case policyName = "PolicyName" @@ -17656,12 +13341,14 @@ extension IAMClientTypes.PolicyDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.PolicyDetail() + value.policyName = try reader["PolicyName"].readIfPresent() + value.policyDocument = try reader["PolicyDocument"].readIfPresent() + return value + } } } @@ -17721,16 +13408,14 @@ extension IAMClientTypes { } extension PolicyEvaluationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PolicyEvaluationException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17758,23 +13443,7 @@ public struct PolicyEvaluationException: ClientRuntime.ModeledError, AWSClientRu } } -struct PolicyEvaluationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PolicyEvaluationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension IAMClientTypes.PolicyGrantingServiceAccess: Swift.Codable { +extension IAMClientTypes.PolicyGrantingServiceAccess: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case entityName = "EntityName" case entityType = "EntityType" @@ -17802,18 +13471,17 @@ extension IAMClientTypes.PolicyGrantingServiceAccess: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyTypeDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyType.self, forKey: .policyType) - policyType = policyTypeDecoded - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - let entityTypeDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyOwnerEntityType.self, forKey: .entityType) - entityType = entityTypeDecoded - let entityNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .entityName) - entityName = entityNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.PolicyGrantingServiceAccess() + value.policyName = try reader["PolicyName"].readIfPresent() + value.policyType = try reader["PolicyType"].readIfPresent() + value.policyArn = try reader["PolicyArn"].readIfPresent() + value.entityType = try reader["EntityType"].readIfPresent() + value.entityName = try reader["EntityName"].readIfPresent() + return value + } } } @@ -17851,7 +13519,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.PolicyGroup: Swift.Codable { +extension IAMClientTypes.PolicyGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case groupId = "GroupId" case groupName = "GroupName" @@ -17867,12 +13535,14 @@ extension IAMClientTypes.PolicyGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let groupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupId) - groupId = groupIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.PolicyGroup() + value.groupName = try reader["GroupName"].readIfPresent() + value.groupId = try reader["GroupId"].readIfPresent() + return value + } } } @@ -17897,16 +13567,14 @@ extension IAMClientTypes { } extension PolicyNotAttachableException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PolicyNotAttachableException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17934,22 +13602,6 @@ public struct PolicyNotAttachableException: ClientRuntime.ModeledError, AWSClien } } -struct PolicyNotAttachableExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PolicyNotAttachableExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IAMClientTypes { public enum PolicyOwnerEntityType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case group @@ -17985,7 +13637,7 @@ extension IAMClientTypes { } } -extension IAMClientTypes.PolicyRole: Swift.Codable { +extension IAMClientTypes.PolicyRole: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case roleId = "RoleId" case roleName = "RoleName" @@ -18001,12 +13653,14 @@ extension IAMClientTypes.PolicyRole: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let roleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleId) - roleId = roleIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.PolicyRole() + value.roleName = try reader["RoleName"].readIfPresent() + value.roleId = try reader["RoleId"].readIfPresent() + return value + } } } @@ -18177,7 +13831,7 @@ extension IAMClientTypes { } } -extension IAMClientTypes.PolicyUser: Swift.Codable { +extension IAMClientTypes.PolicyUser: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case userId = "UserId" case userName = "UserName" @@ -18193,12 +13847,14 @@ extension IAMClientTypes.PolicyUser: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.PolicyUser() + value.userName = try reader["UserName"].readIfPresent() + value.userId = try reader["UserId"].readIfPresent() + return value + } } } @@ -18222,7 +13878,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.PolicyVersion: Swift.Codable { +extension IAMClientTypes.PolicyVersion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createDate = "CreateDate" case document = "Document" @@ -18246,16 +13902,16 @@ extension IAMClientTypes.PolicyVersion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let documentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .document) - document = documentDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - let isDefaultVersionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefaultVersion) ?? false - isDefaultVersion = isDefaultVersionDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.PolicyVersion() + value.document = try reader["Document"].readIfPresent() + value.versionId = try reader["VersionId"].readIfPresent() + value.isDefaultVersion = try reader["IsDefaultVersion"].readIfPresent() ?? false + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -18287,7 +13943,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.Position: Swift.Codable { +extension IAMClientTypes.Position: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case column = "Column" case line = "Line" @@ -18303,12 +13959,14 @@ extension IAMClientTypes.Position: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lineDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .line) ?? 0 - line = lineDecoded - let columnDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .column) ?? 0 - column = columnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.Position() + value.line = try reader["Line"].readIfPresent() ?? 0 + value.column = try reader["Column"].readIfPresent() ?? 0 + return value + } } } @@ -18333,6 +13991,12 @@ extension IAMClientTypes { } extension PutGroupPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case policyDocument = "PolicyDocument" + case policyName = "PolicyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -18385,32 +14049,12 @@ public struct PutGroupPolicyInput: Swift.Equatable { } } -struct PutGroupPolicyInputBody: Swift.Equatable { - let groupName: Swift.String? - let policyName: Swift.String? - let policyDocument: Swift.String? -} - -extension PutGroupPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case policyDocument = "PolicyDocument" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} +extension PutGroupPolicyOutput { -extension PutGroupPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutGroupPolicyOutput() + } } } @@ -18419,20 +14063,32 @@ public struct PutGroupPolicyOutput: Swift.Equatable { public init() { } } -enum PutGroupPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutGroupPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutRolePermissionsBoundaryInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case permissionsBoundary = "PermissionsBoundary" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let permissionsBoundary = permissionsBoundary { @@ -18471,28 +14127,12 @@ public struct PutRolePermissionsBoundaryInput: Swift.Equatable { } } -struct PutRolePermissionsBoundaryInputBody: Swift.Equatable { - let roleName: Swift.String? - let permissionsBoundary: Swift.String? -} - -extension PutRolePermissionsBoundaryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case permissionsBoundary = "PermissionsBoundary" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let permissionsBoundaryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .permissionsBoundary) - permissionsBoundary = permissionsBoundaryDecoded - } -} +extension PutRolePermissionsBoundaryOutput { -extension PutRolePermissionsBoundaryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutRolePermissionsBoundaryOutput() + } } } @@ -18501,21 +14141,34 @@ public struct PutRolePermissionsBoundaryOutput: Swift.Equatable { public init() { } } -enum PutRolePermissionsBoundaryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyNotAttachable": return try await PolicyNotAttachableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutRolePermissionsBoundaryOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyNotAttachable": return try await PolicyNotAttachableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutRolePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyDocument = "PolicyDocument" + case policyName = "PolicyName" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyDocument = policyDocument { @@ -18568,32 +14221,12 @@ public struct PutRolePolicyInput: Swift.Equatable { } } -struct PutRolePolicyInputBody: Swift.Equatable { - let roleName: Swift.String? - let policyName: Swift.String? - let policyDocument: Swift.String? -} - -extension PutRolePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "PolicyDocument" - case policyName = "PolicyName" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} +extension PutRolePolicyOutput { -extension PutRolePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutRolePolicyOutput() + } } } @@ -18602,21 +14235,33 @@ public struct PutRolePolicyOutput: Swift.Equatable { public init() { } } -enum PutRolePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutRolePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutUserPermissionsBoundaryInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case permissionsBoundary = "PermissionsBoundary" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let permissionsBoundary = permissionsBoundary { @@ -18655,28 +14300,12 @@ public struct PutUserPermissionsBoundaryInput: Swift.Equatable { } } -struct PutUserPermissionsBoundaryInputBody: Swift.Equatable { - let userName: Swift.String? - let permissionsBoundary: Swift.String? -} - -extension PutUserPermissionsBoundaryInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case permissionsBoundary = "PermissionsBoundary" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let permissionsBoundaryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .permissionsBoundary) - permissionsBoundary = permissionsBoundaryDecoded - } -} +extension PutUserPermissionsBoundaryOutput { -extension PutUserPermissionsBoundaryOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutUserPermissionsBoundaryOutput() + } } } @@ -18685,20 +14314,33 @@ public struct PutUserPermissionsBoundaryOutput: Swift.Equatable { public init() { } } -enum PutUserPermissionsBoundaryOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyNotAttachable": return try await PolicyNotAttachableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutUserPermissionsBoundaryOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyNotAttachable": return try await PolicyNotAttachableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutUserPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyDocument = "PolicyDocument" + case policyName = "PolicyName" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyDocument = policyDocument { @@ -18751,32 +14393,12 @@ public struct PutUserPolicyInput: Swift.Equatable { } } -struct PutUserPolicyInputBody: Swift.Equatable { - let userName: Swift.String? - let policyName: Swift.String? - let policyDocument: Swift.String? -} - -extension PutUserPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "PolicyDocument" - case policyName = "PolicyName" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} +extension PutUserPolicyOutput { -extension PutUserPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutUserPolicyOutput() + } } } @@ -18785,20 +14407,32 @@ public struct PutUserPolicyOutput: Swift.Equatable { public init() { } } -enum PutUserPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutUserPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveClientIDFromOpenIDConnectProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clientID = "ClientID" + case openIDConnectProviderArn = "OpenIDConnectProviderArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clientID = clientID { @@ -18837,28 +14471,12 @@ public struct RemoveClientIDFromOpenIDConnectProviderInput: Swift.Equatable { } } -struct RemoveClientIDFromOpenIDConnectProviderInputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? - let clientID: Swift.String? -} - -extension RemoveClientIDFromOpenIDConnectProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientID = "ClientID" - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - let clientIDDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientID) - clientID = clientIDDecoded - } -} +extension RemoveClientIDFromOpenIDConnectProviderOutput { -extension RemoveClientIDFromOpenIDConnectProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveClientIDFromOpenIDConnectProviderOutput() + } } } @@ -18867,19 +14485,31 @@ public struct RemoveClientIDFromOpenIDConnectProviderOutput: Swift.Equatable { public init() { } } -enum RemoveClientIDFromOpenIDConnectProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveClientIDFromOpenIDConnectProviderOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveRoleFromInstanceProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceProfileName = "InstanceProfileName" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceProfileName = instanceProfileName { @@ -18918,28 +14548,12 @@ public struct RemoveRoleFromInstanceProfileInput: Swift.Equatable { } } -struct RemoveRoleFromInstanceProfileInputBody: Swift.Equatable { - let instanceProfileName: Swift.String? - let roleName: Swift.String? -} - -extension RemoveRoleFromInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfileName = "InstanceProfileName" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - } -} +extension RemoveRoleFromInstanceProfileOutput { -extension RemoveRoleFromInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveRoleFromInstanceProfileOutput() + } } } @@ -18948,20 +14562,32 @@ public struct RemoveRoleFromInstanceProfileOutput: Swift.Equatable { public init() { } } -enum RemoveRoleFromInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveRoleFromInstanceProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveUserFromGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -19000,28 +14626,12 @@ public struct RemoveUserFromGroupInput: Swift.Equatable { } } -struct RemoveUserFromGroupInputBody: Swift.Equatable { - let groupName: Swift.String? - let userName: Swift.String? -} - -extension RemoveUserFromGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - } -} +extension RemoveUserFromGroupOutput { -extension RemoveUserFromGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveUserFromGroupOutput() + } } } @@ -19030,14 +14640,21 @@ public struct RemoveUserFromGroupOutput: Swift.Equatable { public init() { } } -enum RemoveUserFromGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveUserFromGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -19072,16 +14689,14 @@ extension IAMClientTypes { } extension ReportGenerationLimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReportGenerationLimitExceededException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19109,22 +14724,6 @@ public struct ReportGenerationLimitExceededException: ClientRuntime.ModeledError } } -struct ReportGenerationLimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReportGenerationLimitExceededExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IAMClientTypes { public enum ReportStateType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case complete @@ -19161,6 +14760,11 @@ extension IAMClientTypes { } extension ResetServiceSpecificCredentialInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serviceSpecificCredentialId = "ServiceSpecificCredentialId" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serviceSpecificCredentialId = serviceSpecificCredentialId { @@ -19198,34 +14802,15 @@ public struct ResetServiceSpecificCredentialInput: Swift.Equatable { } } -struct ResetServiceSpecificCredentialInputBody: Swift.Equatable { - let userName: Swift.String? - let serviceSpecificCredentialId: Swift.String? -} - -extension ResetServiceSpecificCredentialInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceSpecificCredentialId = "ServiceSpecificCredentialId" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serviceSpecificCredentialIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceSpecificCredentialId) - serviceSpecificCredentialId = serviceSpecificCredentialIdDecoded - } -} +extension ResetServiceSpecificCredentialOutput { -extension ResetServiceSpecificCredentialOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetServiceSpecificCredentialOutputBody = try responseDecoder.decode(responseBody: data) - self.serviceSpecificCredential = output.serviceSpecificCredential - } else { - self.serviceSpecificCredential = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResetServiceSpecificCredentialResult"] + var value = ResetServiceSpecificCredentialOutput() + value.serviceSpecificCredential = try reader["ServiceSpecificCredential"].readIfPresent(readingClosure: IAMClientTypes.ServiceSpecificCredential.readingClosure) + return value } } } @@ -19242,34 +14827,24 @@ public struct ResetServiceSpecificCredentialOutput: Swift.Equatable { } } -struct ResetServiceSpecificCredentialOutputBody: Swift.Equatable { - let serviceSpecificCredential: IAMClientTypes.ServiceSpecificCredential? -} - -extension ResetServiceSpecificCredentialOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceSpecificCredential = "ServiceSpecificCredential" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResetServiceSpecificCredentialResult")) - let serviceSpecificCredentialDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ServiceSpecificCredential.self, forKey: .serviceSpecificCredential) - serviceSpecificCredential = serviceSpecificCredentialDecoded - } -} +enum ResetServiceSpecificCredentialOutputError { -enum ResetServiceSpecificCredentialOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension IAMClientTypes.ResourceSpecificResult: Swift.Codable { +extension IAMClientTypes.ResourceSpecificResult: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case evalDecisionDetails = "EvalDecisionDetails" case evalResourceDecision = "EvalResourceDecision" @@ -19328,71 +14903,18 @@ extension IAMClientTypes.ResourceSpecificResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let evalResourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .evalResourceName) - evalResourceName = evalResourceNameDecoded - let evalResourceDecisionDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicyEvaluationDecisionType.self, forKey: .evalResourceDecision) - evalResourceDecision = evalResourceDecisionDecoded - if containerValues.contains(.matchedStatements) { - struct KeyVal0{struct member{}} - let matchedStatementsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchedStatements) - if let matchedStatementsWrappedContainer = matchedStatementsWrappedContainer { - let matchedStatementsContainer = try matchedStatementsWrappedContainer.decodeIfPresent([IAMClientTypes.Statement].self, forKey: .member) - var matchedStatementsBuffer:[IAMClientTypes.Statement]? = nil - if let matchedStatementsContainer = matchedStatementsContainer { - matchedStatementsBuffer = [IAMClientTypes.Statement]() - for structureContainer0 in matchedStatementsContainer { - matchedStatementsBuffer?.append(structureContainer0) - } - } - matchedStatements = matchedStatementsBuffer - } else { - matchedStatements = [] - } - } else { - matchedStatements = nil - } - if containerValues.contains(.missingContextValues) { - struct KeyVal0{struct member{}} - let missingContextValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .missingContextValues) - if let missingContextValuesWrappedContainer = missingContextValuesWrappedContainer { - let missingContextValuesContainer = try missingContextValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var missingContextValuesBuffer:[Swift.String]? = nil - if let missingContextValuesContainer = missingContextValuesContainer { - missingContextValuesBuffer = [Swift.String]() - for stringContainer0 in missingContextValuesContainer { - missingContextValuesBuffer?.append(stringContainer0) - } - } - missingContextValues = missingContextValuesBuffer - } else { - missingContextValues = [] - } - } else { - missingContextValues = nil - } - if containerValues.contains(.evalDecisionDetails) { - struct KeyVal0{struct key{}; struct value{}} - let evalDecisionDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .evalDecisionDetails) - if let evalDecisionDetailsWrappedContainer = evalDecisionDetailsWrappedContainer { - let evalDecisionDetailsContainer = try evalDecisionDetailsWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var evalDecisionDetailsBuffer: [Swift.String:IAMClientTypes.PolicyEvaluationDecisionType]? = nil - if let evalDecisionDetailsContainer = evalDecisionDetailsContainer { - evalDecisionDetailsBuffer = [Swift.String:IAMClientTypes.PolicyEvaluationDecisionType]() - for enumContainer0 in evalDecisionDetailsContainer { - evalDecisionDetailsBuffer?[enumContainer0.key] = enumContainer0.value - } - } - evalDecisionDetails = evalDecisionDetailsBuffer - } else { - evalDecisionDetails = [:] - } - } else { - evalDecisionDetails = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ResourceSpecificResult() + value.evalResourceName = try reader["EvalResourceName"].readIfPresent() + value.evalResourceDecision = try reader["EvalResourceDecision"].readIfPresent() + value.matchedStatements = try reader["MatchedStatements"].readListIfPresent(memberReadingClosure: IAMClientTypes.Statement.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.missingContextValues = try reader["MissingContextValues"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.evalDecisionDetails = try reader["EvalDecisionDetails"].readMapIfPresent(valueReadingClosure: IAMClientTypes.PolicyEvaluationDecisionType.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.permissionsBoundaryDecisionDetail = try reader["PermissionsBoundaryDecisionDetail"].readIfPresent(readingClosure: IAMClientTypes.PermissionsBoundaryDecisionDetail.readingClosure) + return value } - let permissionsBoundaryDecisionDetailDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PermissionsBoundaryDecisionDetail.self, forKey: .permissionsBoundaryDecisionDetail) - permissionsBoundaryDecisionDetail = permissionsBoundaryDecisionDetailDecoded } } @@ -19435,6 +14957,13 @@ extension IAMClientTypes { } extension ResyncMFADeviceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case authenticationCode1 = "AuthenticationCode1" + case authenticationCode2 = "AuthenticationCode2" + case serialNumber = "SerialNumber" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authenticationCode1 = authenticationCode1 { @@ -19489,36 +15018,12 @@ public struct ResyncMFADeviceInput: Swift.Equatable { } } -struct ResyncMFADeviceInputBody: Swift.Equatable { - let userName: Swift.String? - let serialNumber: Swift.String? - let authenticationCode1: Swift.String? - let authenticationCode2: Swift.String? -} - -extension ResyncMFADeviceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationCode1 = "AuthenticationCode1" - case authenticationCode2 = "AuthenticationCode2" - case serialNumber = "SerialNumber" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - let authenticationCode1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationCode1) - authenticationCode1 = authenticationCode1Decoded - let authenticationCode2Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationCode2) - authenticationCode2 = authenticationCode2Decoded - } -} +extension ResyncMFADeviceOutput { -extension ResyncMFADeviceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ResyncMFADeviceOutput() + } } } @@ -19527,21 +15032,28 @@ public struct ResyncMFADeviceOutput: Swift.Equatable { public init() { } } -enum ResyncMFADeviceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidAuthenticationCode": return try await InvalidAuthenticationCodeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ResyncMFADeviceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidAuthenticationCode": return try await InvalidAuthenticationCodeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension IAMClientTypes.Role: Swift.Codable { +extension IAMClientTypes.Role: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case assumeRolePolicyDocument = "AssumeRolePolicyDocument" @@ -19602,47 +15114,23 @@ extension IAMClientTypes.Role: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let roleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleId) - roleId = roleIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let assumeRolePolicyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .assumeRolePolicyDocument) - assumeRolePolicyDocument = assumeRolePolicyDocumentDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let maxSessionDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSessionDuration) - maxSessionDuration = maxSessionDurationDecoded - let permissionsBoundaryDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AttachedPermissionsBoundary.self, forKey: .permissionsBoundary) - permissionsBoundary = permissionsBoundaryDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.Role() + value.path = try reader["Path"].readIfPresent() + value.roleName = try reader["RoleName"].readIfPresent() + value.roleId = try reader["RoleId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.assumeRolePolicyDocument = try reader["AssumeRolePolicyDocument"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.maxSessionDuration = try reader["MaxSessionDuration"].readIfPresent() + value.permissionsBoundary = try reader["PermissionsBoundary"].readIfPresent(readingClosure: IAMClientTypes.AttachedPermissionsBoundary.readingClosure) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.roleLastUsed = try reader["RoleLastUsed"].readIfPresent(readingClosure: IAMClientTypes.RoleLastUsed.readingClosure) + return value } - let roleLastUsedDecoded = try containerValues.decodeIfPresent(IAMClientTypes.RoleLastUsed.self, forKey: .roleLastUsed) - roleLastUsed = roleLastUsedDecoded } } @@ -19707,7 +15195,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.RoleDetail: Swift.Codable { +extension IAMClientTypes.RoleDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case assumeRolePolicyDocument = "AssumeRolePolicyDocument" @@ -19799,100 +15287,24 @@ extension IAMClientTypes.RoleDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let roleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleId) - roleId = roleIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let assumeRolePolicyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .assumeRolePolicyDocument) - assumeRolePolicyDocument = assumeRolePolicyDocumentDecoded - if containerValues.contains(.instanceProfileList) { - struct KeyVal0{struct member{}} - let instanceProfileListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .instanceProfileList) - if let instanceProfileListWrappedContainer = instanceProfileListWrappedContainer { - let instanceProfileListContainer = try instanceProfileListWrappedContainer.decodeIfPresent([IAMClientTypes.InstanceProfile].self, forKey: .member) - var instanceProfileListBuffer:[IAMClientTypes.InstanceProfile]? = nil - if let instanceProfileListContainer = instanceProfileListContainer { - instanceProfileListBuffer = [IAMClientTypes.InstanceProfile]() - for structureContainer0 in instanceProfileListContainer { - instanceProfileListBuffer?.append(structureContainer0) - } - } - instanceProfileList = instanceProfileListBuffer - } else { - instanceProfileList = [] - } - } else { - instanceProfileList = nil - } - if containerValues.contains(.rolePolicyList) { - struct KeyVal0{struct member{}} - let rolePolicyListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rolePolicyList) - if let rolePolicyListWrappedContainer = rolePolicyListWrappedContainer { - let rolePolicyListContainer = try rolePolicyListWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyDetail].self, forKey: .member) - var rolePolicyListBuffer:[IAMClientTypes.PolicyDetail]? = nil - if let rolePolicyListContainer = rolePolicyListContainer { - rolePolicyListBuffer = [IAMClientTypes.PolicyDetail]() - for structureContainer0 in rolePolicyListContainer { - rolePolicyListBuffer?.append(structureContainer0) - } - } - rolePolicyList = rolePolicyListBuffer - } else { - rolePolicyList = [] - } - } else { - rolePolicyList = nil - } - if containerValues.contains(.attachedManagedPolicies) { - struct KeyVal0{struct member{}} - let attachedManagedPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachedManagedPolicies) - if let attachedManagedPoliciesWrappedContainer = attachedManagedPoliciesWrappedContainer { - let attachedManagedPoliciesContainer = try attachedManagedPoliciesWrappedContainer.decodeIfPresent([IAMClientTypes.AttachedPolicy].self, forKey: .member) - var attachedManagedPoliciesBuffer:[IAMClientTypes.AttachedPolicy]? = nil - if let attachedManagedPoliciesContainer = attachedManagedPoliciesContainer { - attachedManagedPoliciesBuffer = [IAMClientTypes.AttachedPolicy]() - for structureContainer0 in attachedManagedPoliciesContainer { - attachedManagedPoliciesBuffer?.append(structureContainer0) - } - } - attachedManagedPolicies = attachedManagedPoliciesBuffer - } else { - attachedManagedPolicies = [] - } - } else { - attachedManagedPolicies = nil - } - let permissionsBoundaryDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AttachedPermissionsBoundary.self, forKey: .permissionsBoundary) - permissionsBoundary = permissionsBoundaryDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.RoleDetail() + value.path = try reader["Path"].readIfPresent() + value.roleName = try reader["RoleName"].readIfPresent() + value.roleId = try reader["RoleId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.assumeRolePolicyDocument = try reader["AssumeRolePolicyDocument"].readIfPresent() + value.instanceProfileList = try reader["InstanceProfileList"].readListIfPresent(memberReadingClosure: IAMClientTypes.InstanceProfile.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.rolePolicyList = try reader["RolePolicyList"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.attachedManagedPolicies = try reader["AttachedManagedPolicies"].readListIfPresent(memberReadingClosure: IAMClientTypes.AttachedPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.permissionsBoundary = try reader["PermissionsBoundary"].readIfPresent(readingClosure: IAMClientTypes.AttachedPermissionsBoundary.readingClosure) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.roleLastUsed = try reader["RoleLastUsed"].readIfPresent(readingClosure: IAMClientTypes.RoleLastUsed.readingClosure) + return value } - let roleLastUsedDecoded = try containerValues.decodeIfPresent(IAMClientTypes.RoleLastUsed.self, forKey: .roleLastUsed) - roleLastUsed = roleLastUsedDecoded } } @@ -19956,7 +15368,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.RoleLastUsed: Swift.Codable { +extension IAMClientTypes.RoleLastUsed: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastUsedDate = "LastUsedDate" case region = "Region" @@ -19972,12 +15384,14 @@ extension IAMClientTypes.RoleLastUsed: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lastUsedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUsedDate) - lastUsedDate = lastUsedDateDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.RoleLastUsed() + value.lastUsedDate = try reader["LastUsedDate"].readTimestampIfPresent(format: .dateTime) + value.region = try reader["Region"].readIfPresent() + return value + } } } @@ -20001,7 +15415,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.RoleUsageType: Swift.Codable { +extension IAMClientTypes.RoleUsageType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case region = "Region" case resources = "Resources" @@ -20026,28 +15440,13 @@ extension IAMClientTypes.RoleUsageType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - if containerValues.contains(.resources) { - struct KeyVal0{struct member{}} - let resourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resources) - if let resourcesWrappedContainer = resourcesWrappedContainer { - let resourcesContainer = try resourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesBuffer:[Swift.String]? = nil - if let resourcesContainer = resourcesContainer { - resourcesBuffer = [Swift.String]() - for stringContainer0 in resourcesContainer { - resourcesBuffer?.append(stringContainer0) - } - } - resources = resourcesBuffer - } else { - resources = [] - } - } else { - resources = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.RoleUsageType() + value.region = try reader["Region"].readIfPresent() + value.resources = try reader["Resources"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -20072,7 +15471,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.SAMLProviderListEntry: Swift.Codable { +extension IAMClientTypes.SAMLProviderListEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case createDate = "CreateDate" @@ -20092,14 +15491,15 @@ extension IAMClientTypes.SAMLProviderListEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let validUntilDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validUntil) - validUntil = validUntilDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.SAMLProviderListEntry() + value.arn = try reader["Arn"].readIfPresent() + value.validUntil = try reader["ValidUntil"].readTimestampIfPresent(format: .dateTime) + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -20127,7 +15527,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.SSHPublicKey: Swift.Codable { +extension IAMClientTypes.SSHPublicKey: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case fingerprint = "Fingerprint" case sshPublicKeyBody = "SSHPublicKeyBody" @@ -20159,20 +15559,18 @@ extension IAMClientTypes.SSHPublicKey: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let sshPublicKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sshPublicKeyId) - sshPublicKeyId = sshPublicKeyIdDecoded - let fingerprintDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fingerprint) - fingerprint = fingerprintDecoded - let sshPublicKeyBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sshPublicKeyBody) - sshPublicKeyBody = sshPublicKeyBodyDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - let uploadDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .uploadDate) - uploadDate = uploadDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.SSHPublicKey() + value.userName = try reader["UserName"].readIfPresent() + value.sshPublicKeyId = try reader["SSHPublicKeyId"].readIfPresent() + value.fingerprint = try reader["Fingerprint"].readIfPresent() + value.sshPublicKeyBody = try reader["SSHPublicKeyBody"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.uploadDate = try reader["UploadDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -20217,7 +15615,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.SSHPublicKeyMetadata: Swift.Codable { +extension IAMClientTypes.SSHPublicKeyMetadata: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case sshPublicKeyId = "SSHPublicKeyId" case status = "Status" @@ -20241,16 +15639,16 @@ extension IAMClientTypes.SSHPublicKeyMetadata: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let sshPublicKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sshPublicKeyId) - sshPublicKeyId = sshPublicKeyIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - let uploadDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .uploadDate) - uploadDate = uploadDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.SSHPublicKeyMetadata() + value.userName = try reader["UserName"].readIfPresent() + value.sshPublicKeyId = try reader["SSHPublicKeyId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.uploadDate = try reader["UploadDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -20286,7 +15684,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.ServerCertificate: Swift.Codable { +extension IAMClientTypes.ServerCertificate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case certificateBody = "CertificateBody" case certificateChain = "CertificateChain" @@ -20319,32 +15717,15 @@ extension IAMClientTypes.ServerCertificate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverCertificateMetadataDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ServerCertificateMetadata.self, forKey: .serverCertificateMetadata) - serverCertificateMetadata = serverCertificateMetadataDecoded - let certificateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateBody) - certificateBody = certificateBodyDecoded - let certificateChainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateChain) - certificateChain = certificateChainDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ServerCertificate() + value.serverCertificateMetadata = try reader["ServerCertificateMetadata"].readIfPresent(readingClosure: IAMClientTypes.ServerCertificateMetadata.readingClosure) + value.certificateBody = try reader["CertificateBody"].readIfPresent() + value.certificateChain = try reader["CertificateChain"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -20379,7 +15760,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.ServerCertificateMetadata: Swift.Codable { +extension IAMClientTypes.ServerCertificateMetadata: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case expiration = "Expiration" @@ -20411,20 +15792,18 @@ extension IAMClientTypes.ServerCertificateMetadata: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let serverCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateName) - serverCertificateName = serverCertificateNameDecoded - let serverCertificateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateId) - serverCertificateId = serverCertificateIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let uploadDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .uploadDate) - uploadDate = uploadDateDecoded - let expirationDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expiration) - expiration = expirationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ServerCertificateMetadata() + value.path = try reader["Path"].readIfPresent() + value.serverCertificateName = try reader["ServerCertificateName"].readIfPresent() + value.serverCertificateId = try reader["ServerCertificateId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.uploadDate = try reader["UploadDate"].readTimestampIfPresent(format: .dateTime) + value.expiration = try reader["Expiration"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -20469,16 +15848,14 @@ extension IAMClientTypes { } extension ServiceFailureException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServiceFailureException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20506,23 +15883,7 @@ public struct ServiceFailureException: ClientRuntime.ModeledError, AWSClientRunt } } -struct ServiceFailureExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServiceFailureExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension IAMClientTypes.ServiceLastAccessed: Swift.Codable { +extension IAMClientTypes.ServiceLastAccessed: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastAuthenticated = "LastAuthenticated" case lastAuthenticatedEntity = "LastAuthenticatedEntity" @@ -20567,38 +15928,18 @@ extension IAMClientTypes.ServiceLastAccessed: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - let lastAuthenticatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastAuthenticated) - lastAuthenticated = lastAuthenticatedDecoded - let serviceNamespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceNamespace) - serviceNamespace = serviceNamespaceDecoded - let lastAuthenticatedEntityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastAuthenticatedEntity) - lastAuthenticatedEntity = lastAuthenticatedEntityDecoded - let lastAuthenticatedRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastAuthenticatedRegion) - lastAuthenticatedRegion = lastAuthenticatedRegionDecoded - let totalAuthenticatedEntitiesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalAuthenticatedEntities) - totalAuthenticatedEntities = totalAuthenticatedEntitiesDecoded - if containerValues.contains(.trackedActionsLastAccessed) { - struct KeyVal0{struct member{}} - let trackedActionsLastAccessedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trackedActionsLastAccessed) - if let trackedActionsLastAccessedWrappedContainer = trackedActionsLastAccessedWrappedContainer { - let trackedActionsLastAccessedContainer = try trackedActionsLastAccessedWrappedContainer.decodeIfPresent([IAMClientTypes.TrackedActionLastAccessed].self, forKey: .member) - var trackedActionsLastAccessedBuffer:[IAMClientTypes.TrackedActionLastAccessed]? = nil - if let trackedActionsLastAccessedContainer = trackedActionsLastAccessedContainer { - trackedActionsLastAccessedBuffer = [IAMClientTypes.TrackedActionLastAccessed]() - for structureContainer0 in trackedActionsLastAccessedContainer { - trackedActionsLastAccessedBuffer?.append(structureContainer0) - } - } - trackedActionsLastAccessed = trackedActionsLastAccessedBuffer - } else { - trackedActionsLastAccessed = [] - } - } else { - trackedActionsLastAccessed = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ServiceLastAccessed() + value.serviceName = try reader["ServiceName"].readIfPresent() + value.lastAuthenticated = try reader["LastAuthenticated"].readTimestampIfPresent(format: .dateTime) + value.serviceNamespace = try reader["ServiceNamespace"].readIfPresent() + value.lastAuthenticatedEntity = try reader["LastAuthenticatedEntity"].readIfPresent() + value.lastAuthenticatedRegion = try reader["LastAuthenticatedRegion"].readIfPresent() + value.totalAuthenticatedEntities = try reader["TotalAuthenticatedEntities"].readIfPresent() + value.trackedActionsLastAccessed = try reader["TrackedActionsLastAccessed"].readListIfPresent(memberReadingClosure: IAMClientTypes.TrackedActionLastAccessed.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -20646,16 +15987,14 @@ extension IAMClientTypes { } extension ServiceNotSupportedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ServiceNotSupportedException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20683,23 +16022,7 @@ public struct ServiceNotSupportedException: ClientRuntime.ModeledError, AWSClien } } -struct ServiceNotSupportedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ServiceNotSupportedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension IAMClientTypes.ServiceSpecificCredential: Swift.Codable { +extension IAMClientTypes.ServiceSpecificCredential: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createDate = "CreateDate" case serviceName = "ServiceName" @@ -20735,22 +16058,19 @@ extension IAMClientTypes.ServiceSpecificCredential: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded - let serviceUserNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUserName) - serviceUserName = serviceUserNameDecoded - let servicePasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .servicePassword) - servicePassword = servicePasswordDecoded - let serviceSpecificCredentialIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceSpecificCredentialId) - serviceSpecificCredentialId = serviceSpecificCredentialIdDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ServiceSpecificCredential() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.serviceName = try reader["ServiceName"].readIfPresent() + value.serviceUserName = try reader["ServiceUserName"].readIfPresent() + value.servicePassword = try reader["ServicePassword"].readIfPresent() + value.serviceSpecificCredentialId = try reader["ServiceSpecificCredentialId"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -20806,7 +16126,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.ServiceSpecificCredentialMetadata: Swift.Codable { +extension IAMClientTypes.ServiceSpecificCredentialMetadata: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createDate = "CreateDate" case serviceName = "ServiceName" @@ -20838,20 +16158,18 @@ extension IAMClientTypes.ServiceSpecificCredentialMetadata: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - let serviceUserNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceUserName) - serviceUserName = serviceUserNameDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let serviceSpecificCredentialIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceSpecificCredentialId) - serviceSpecificCredentialId = serviceSpecificCredentialIdDecoded - let serviceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceName) - serviceName = serviceNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.ServiceSpecificCredentialMetadata() + value.userName = try reader["UserName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.serviceUserName = try reader["ServiceUserName"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.serviceSpecificCredentialId = try reader["ServiceSpecificCredentialId"].readIfPresent() + value.serviceName = try reader["ServiceName"].readIfPresent() + return value + } } } @@ -20898,6 +16216,11 @@ extension IAMClientTypes { } extension SetDefaultPolicyVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case versionId = "VersionId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -20936,28 +16259,12 @@ public struct SetDefaultPolicyVersionInput: Swift.Equatable { } } -struct SetDefaultPolicyVersionInputBody: Swift.Equatable { - let policyArn: Swift.String? - let versionId: Swift.String? -} - -extension SetDefaultPolicyVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case versionId = "VersionId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - } -} +extension SetDefaultPolicyVersionOutput { -extension SetDefaultPolicyVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetDefaultPolicyVersionOutput() + } } } @@ -20966,20 +16273,31 @@ public struct SetDefaultPolicyVersionOutput: Swift.Equatable { public init() { } } -enum SetDefaultPolicyVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetDefaultPolicyVersionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetSecurityTokenServicePreferencesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalEndpointTokenVersion = "GlobalEndpointTokenVersion" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalEndpointTokenVersion = globalEndpointTokenVersion { @@ -21010,24 +16328,12 @@ public struct SetSecurityTokenServicePreferencesInput: Swift.Equatable { } } -struct SetSecurityTokenServicePreferencesInputBody: Swift.Equatable { - let globalEndpointTokenVersion: IAMClientTypes.GlobalEndpointTokenVersion? -} - -extension SetSecurityTokenServicePreferencesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalEndpointTokenVersion = "GlobalEndpointTokenVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalEndpointTokenVersionDecoded = try containerValues.decodeIfPresent(IAMClientTypes.GlobalEndpointTokenVersion.self, forKey: .globalEndpointTokenVersion) - globalEndpointTokenVersion = globalEndpointTokenVersionDecoded - } -} +extension SetSecurityTokenServicePreferencesOutput { -extension SetSecurityTokenServicePreferencesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetSecurityTokenServicePreferencesOutput() + } } } @@ -21036,17 +16342,24 @@ public struct SetSecurityTokenServicePreferencesOutput: Swift.Equatable { public init() { } } -enum SetSecurityTokenServicePreferencesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetSecurityTokenServicePreferencesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension IAMClientTypes.SigningCertificate: Swift.Codable { +extension IAMClientTypes.SigningCertificate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case certificateBody = "CertificateBody" case certificateId = "CertificateId" @@ -21074,18 +16387,17 @@ extension IAMClientTypes.SigningCertificate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let certificateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateId) - certificateId = certificateIdDecoded - let certificateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateBody) - certificateBody = certificateBodyDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - let uploadDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .uploadDate) - uploadDate = uploadDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.SigningCertificate() + value.userName = try reader["UserName"].readIfPresent() + value.certificateId = try reader["CertificateId"].readIfPresent() + value.certificateBody = try reader["CertificateBody"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.uploadDate = try reader["UploadDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -21126,6 +16438,20 @@ extension IAMClientTypes { } extension SimulateCustomPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actionNames = "ActionNames" + case callerArn = "CallerArn" + case contextEntries = "ContextEntries" + case marker = "Marker" + case maxItems = "MaxItems" + case permissionsBoundaryPolicyInputList = "PermissionsBoundaryPolicyInputList" + case policyInputList = "PolicyInputList" + case resourceArns = "ResourceArns" + case resourceHandlingOption = "ResourceHandlingOption" + case resourceOwner = "ResourceOwner" + case resourcePolicy = "ResourcePolicy" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actionNames = actionNames { @@ -21282,178 +16608,36 @@ public struct SimulateCustomPolicyInput: Swift.Equatable { permissionsBoundaryPolicyInputList: [Swift.String]? = nil, policyInputList: [Swift.String]? = nil, resourceArns: [Swift.String]? = nil, - resourceHandlingOption: Swift.String? = nil, - resourceOwner: Swift.String? = nil, - resourcePolicy: Swift.String? = nil - ) - { - self.actionNames = actionNames - self.callerArn = callerArn - self.contextEntries = contextEntries - self.marker = marker - self.maxItems = maxItems - self.permissionsBoundaryPolicyInputList = permissionsBoundaryPolicyInputList - self.policyInputList = policyInputList - self.resourceArns = resourceArns - self.resourceHandlingOption = resourceHandlingOption - self.resourceOwner = resourceOwner - self.resourcePolicy = resourcePolicy - } -} - -struct SimulateCustomPolicyInputBody: Swift.Equatable { - let policyInputList: [Swift.String]? - let permissionsBoundaryPolicyInputList: [Swift.String]? - let actionNames: [Swift.String]? - let resourceArns: [Swift.String]? - let resourcePolicy: Swift.String? - let resourceOwner: Swift.String? - let callerArn: Swift.String? - let contextEntries: [IAMClientTypes.ContextEntry]? - let resourceHandlingOption: Swift.String? - let maxItems: Swift.Int? - let marker: Swift.String? -} - -extension SimulateCustomPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionNames = "ActionNames" - case callerArn = "CallerArn" - case contextEntries = "ContextEntries" - case marker = "Marker" - case maxItems = "MaxItems" - case permissionsBoundaryPolicyInputList = "PermissionsBoundaryPolicyInputList" - case policyInputList = "PolicyInputList" - case resourceArns = "ResourceArns" - case resourceHandlingOption = "ResourceHandlingOption" - case resourceOwner = "ResourceOwner" - case resourcePolicy = "ResourcePolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.policyInputList) { - struct KeyVal0{struct member{}} - let policyInputListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyInputList) - if let policyInputListWrappedContainer = policyInputListWrappedContainer { - let policyInputListContainer = try policyInputListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyInputListBuffer:[Swift.String]? = nil - if let policyInputListContainer = policyInputListContainer { - policyInputListBuffer = [Swift.String]() - for stringContainer0 in policyInputListContainer { - policyInputListBuffer?.append(stringContainer0) - } - } - policyInputList = policyInputListBuffer - } else { - policyInputList = [] - } - } else { - policyInputList = nil - } - if containerValues.contains(.permissionsBoundaryPolicyInputList) { - struct KeyVal0{struct member{}} - let permissionsBoundaryPolicyInputListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .permissionsBoundaryPolicyInputList) - if let permissionsBoundaryPolicyInputListWrappedContainer = permissionsBoundaryPolicyInputListWrappedContainer { - let permissionsBoundaryPolicyInputListContainer = try permissionsBoundaryPolicyInputListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var permissionsBoundaryPolicyInputListBuffer:[Swift.String]? = nil - if let permissionsBoundaryPolicyInputListContainer = permissionsBoundaryPolicyInputListContainer { - permissionsBoundaryPolicyInputListBuffer = [Swift.String]() - for stringContainer0 in permissionsBoundaryPolicyInputListContainer { - permissionsBoundaryPolicyInputListBuffer?.append(stringContainer0) - } - } - permissionsBoundaryPolicyInputList = permissionsBoundaryPolicyInputListBuffer - } else { - permissionsBoundaryPolicyInputList = [] - } - } else { - permissionsBoundaryPolicyInputList = nil - } - if containerValues.contains(.actionNames) { - struct KeyVal0{struct member{}} - let actionNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actionNames) - if let actionNamesWrappedContainer = actionNamesWrappedContainer { - let actionNamesContainer = try actionNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var actionNamesBuffer:[Swift.String]? = nil - if let actionNamesContainer = actionNamesContainer { - actionNamesBuffer = [Swift.String]() - for stringContainer0 in actionNamesContainer { - actionNamesBuffer?.append(stringContainer0) - } - } - actionNames = actionNamesBuffer - } else { - actionNames = [] - } - } else { - actionNames = nil - } - if containerValues.contains(.resourceArns) { - struct KeyVal0{struct member{}} - let resourceArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceArns) - if let resourceArnsWrappedContainer = resourceArnsWrappedContainer { - let resourceArnsContainer = try resourceArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceArnsBuffer:[Swift.String]? = nil - if let resourceArnsContainer = resourceArnsContainer { - resourceArnsBuffer = [Swift.String]() - for stringContainer0 in resourceArnsContainer { - resourceArnsBuffer?.append(stringContainer0) - } - } - resourceArns = resourceArnsBuffer - } else { - resourceArns = [] - } - } else { - resourceArns = nil - } - let resourcePolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourcePolicy) - resourcePolicy = resourcePolicyDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - let callerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerArn) - callerArn = callerArnDecoded - if containerValues.contains(.contextEntries) { - struct KeyVal0{struct member{}} - let contextEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .contextEntries) - if let contextEntriesWrappedContainer = contextEntriesWrappedContainer { - let contextEntriesContainer = try contextEntriesWrappedContainer.decodeIfPresent([IAMClientTypes.ContextEntry].self, forKey: .member) - var contextEntriesBuffer:[IAMClientTypes.ContextEntry]? = nil - if let contextEntriesContainer = contextEntriesContainer { - contextEntriesBuffer = [IAMClientTypes.ContextEntry]() - for structureContainer0 in contextEntriesContainer { - contextEntriesBuffer?.append(structureContainer0) - } - } - contextEntries = contextEntriesBuffer - } else { - contextEntries = [] - } - } else { - contextEntries = nil - } - let resourceHandlingOptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceHandlingOption) - resourceHandlingOption = resourceHandlingOptionDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded + resourceHandlingOption: Swift.String? = nil, + resourceOwner: Swift.String? = nil, + resourcePolicy: Swift.String? = nil + ) + { + self.actionNames = actionNames + self.callerArn = callerArn + self.contextEntries = contextEntries + self.marker = marker + self.maxItems = maxItems + self.permissionsBoundaryPolicyInputList = permissionsBoundaryPolicyInputList + self.policyInputList = policyInputList + self.resourceArns = resourceArns + self.resourceHandlingOption = resourceHandlingOption + self.resourceOwner = resourceOwner + self.resourcePolicy = resourcePolicy } } -extension SimulateCustomPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SimulateCustomPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.evaluationResults = output.evaluationResults - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.evaluationResults = nil - self.isTruncated = false - self.marker = nil +extension SimulateCustomPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SimulateCustomPolicyResult"] + var value = SimulateCustomPolicyOutput() + value.evaluationResults = try reader["EvaluationResults"].readListIfPresent(memberReadingClosure: IAMClientTypes.EvaluationResult.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -21479,60 +16663,40 @@ public struct SimulateCustomPolicyOutput: Swift.Equatable { } } -struct SimulateCustomPolicyOutputBody: Swift.Equatable { - let evaluationResults: [IAMClientTypes.EvaluationResult]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension SimulateCustomPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case evaluationResults = "EvaluationResults" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum SimulateCustomPolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SimulateCustomPolicyResult")) - if containerValues.contains(.evaluationResults) { - struct KeyVal0{struct member{}} - let evaluationResultsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .evaluationResults) - if let evaluationResultsWrappedContainer = evaluationResultsWrappedContainer { - let evaluationResultsContainer = try evaluationResultsWrappedContainer.decodeIfPresent([IAMClientTypes.EvaluationResult].self, forKey: .member) - var evaluationResultsBuffer:[IAMClientTypes.EvaluationResult]? = nil - if let evaluationResultsContainer = evaluationResultsContainer { - evaluationResultsBuffer = [IAMClientTypes.EvaluationResult]() - for structureContainer0 in evaluationResultsContainer { - evaluationResultsBuffer?.append(structureContainer0) - } - } - evaluationResults = evaluationResultsBuffer - } else { - evaluationResults = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyEvaluation": return try await PolicyEvaluationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - evaluationResults = nil } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum SimulateCustomPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyEvaluation": return try await PolicyEvaluationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension SimulatePrincipalPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actionNames = "ActionNames" + case callerArn = "CallerArn" + case contextEntries = "ContextEntries" + case marker = "Marker" + case maxItems = "MaxItems" + case permissionsBoundaryPolicyInputList = "PermissionsBoundaryPolicyInputList" + case policyInputList = "PolicyInputList" + case policySourceArn = "PolicySourceArn" + case resourceArns = "ResourceArns" + case resourceHandlingOption = "ResourceHandlingOption" + case resourceOwner = "ResourceOwner" + case resourcePolicy = "ResourcePolicy" } -} -extension SimulatePrincipalPolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actionNames = actionNames { @@ -21715,163 +16879,17 @@ public struct SimulatePrincipalPolicyInput: Swift.Equatable { } } -struct SimulatePrincipalPolicyInputBody: Swift.Equatable { - let policySourceArn: Swift.String? - let policyInputList: [Swift.String]? - let permissionsBoundaryPolicyInputList: [Swift.String]? - let actionNames: [Swift.String]? - let resourceArns: [Swift.String]? - let resourcePolicy: Swift.String? - let resourceOwner: Swift.String? - let callerArn: Swift.String? - let contextEntries: [IAMClientTypes.ContextEntry]? - let resourceHandlingOption: Swift.String? - let maxItems: Swift.Int? - let marker: Swift.String? -} - -extension SimulatePrincipalPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionNames = "ActionNames" - case callerArn = "CallerArn" - case contextEntries = "ContextEntries" - case marker = "Marker" - case maxItems = "MaxItems" - case permissionsBoundaryPolicyInputList = "PermissionsBoundaryPolicyInputList" - case policyInputList = "PolicyInputList" - case policySourceArn = "PolicySourceArn" - case resourceArns = "ResourceArns" - case resourceHandlingOption = "ResourceHandlingOption" - case resourceOwner = "ResourceOwner" - case resourcePolicy = "ResourcePolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policySourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policySourceArn) - policySourceArn = policySourceArnDecoded - if containerValues.contains(.policyInputList) { - struct KeyVal0{struct member{}} - let policyInputListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyInputList) - if let policyInputListWrappedContainer = policyInputListWrappedContainer { - let policyInputListContainer = try policyInputListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyInputListBuffer:[Swift.String]? = nil - if let policyInputListContainer = policyInputListContainer { - policyInputListBuffer = [Swift.String]() - for stringContainer0 in policyInputListContainer { - policyInputListBuffer?.append(stringContainer0) - } - } - policyInputList = policyInputListBuffer - } else { - policyInputList = [] - } - } else { - policyInputList = nil - } - if containerValues.contains(.permissionsBoundaryPolicyInputList) { - struct KeyVal0{struct member{}} - let permissionsBoundaryPolicyInputListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .permissionsBoundaryPolicyInputList) - if let permissionsBoundaryPolicyInputListWrappedContainer = permissionsBoundaryPolicyInputListWrappedContainer { - let permissionsBoundaryPolicyInputListContainer = try permissionsBoundaryPolicyInputListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var permissionsBoundaryPolicyInputListBuffer:[Swift.String]? = nil - if let permissionsBoundaryPolicyInputListContainer = permissionsBoundaryPolicyInputListContainer { - permissionsBoundaryPolicyInputListBuffer = [Swift.String]() - for stringContainer0 in permissionsBoundaryPolicyInputListContainer { - permissionsBoundaryPolicyInputListBuffer?.append(stringContainer0) - } - } - permissionsBoundaryPolicyInputList = permissionsBoundaryPolicyInputListBuffer - } else { - permissionsBoundaryPolicyInputList = [] - } - } else { - permissionsBoundaryPolicyInputList = nil - } - if containerValues.contains(.actionNames) { - struct KeyVal0{struct member{}} - let actionNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actionNames) - if let actionNamesWrappedContainer = actionNamesWrappedContainer { - let actionNamesContainer = try actionNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var actionNamesBuffer:[Swift.String]? = nil - if let actionNamesContainer = actionNamesContainer { - actionNamesBuffer = [Swift.String]() - for stringContainer0 in actionNamesContainer { - actionNamesBuffer?.append(stringContainer0) - } - } - actionNames = actionNamesBuffer - } else { - actionNames = [] - } - } else { - actionNames = nil - } - if containerValues.contains(.resourceArns) { - struct KeyVal0{struct member{}} - let resourceArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceArns) - if let resourceArnsWrappedContainer = resourceArnsWrappedContainer { - let resourceArnsContainer = try resourceArnsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceArnsBuffer:[Swift.String]? = nil - if let resourceArnsContainer = resourceArnsContainer { - resourceArnsBuffer = [Swift.String]() - for stringContainer0 in resourceArnsContainer { - resourceArnsBuffer?.append(stringContainer0) - } - } - resourceArns = resourceArnsBuffer - } else { - resourceArns = [] - } - } else { - resourceArns = nil - } - let resourcePolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourcePolicy) - resourcePolicy = resourcePolicyDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - let callerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerArn) - callerArn = callerArnDecoded - if containerValues.contains(.contextEntries) { - struct KeyVal0{struct member{}} - let contextEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .contextEntries) - if let contextEntriesWrappedContainer = contextEntriesWrappedContainer { - let contextEntriesContainer = try contextEntriesWrappedContainer.decodeIfPresent([IAMClientTypes.ContextEntry].self, forKey: .member) - var contextEntriesBuffer:[IAMClientTypes.ContextEntry]? = nil - if let contextEntriesContainer = contextEntriesContainer { - contextEntriesBuffer = [IAMClientTypes.ContextEntry]() - for structureContainer0 in contextEntriesContainer { - contextEntriesBuffer?.append(structureContainer0) - } - } - contextEntries = contextEntriesBuffer - } else { - contextEntries = [] - } - } else { - contextEntries = nil - } - let resourceHandlingOptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceHandlingOption) - resourceHandlingOption = resourceHandlingOptionDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension SimulatePrincipalPolicyOutput { -extension SimulatePrincipalPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SimulatePrincipalPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.evaluationResults = output.evaluationResults - self.isTruncated = output.isTruncated - self.marker = output.marker - } else { - self.evaluationResults = nil - self.isTruncated = false - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SimulatePrincipalPolicyResult"] + var value = SimulatePrincipalPolicyOutput() + value.evaluationResults = try reader["EvaluationResults"].readListIfPresent(memberReadingClosure: IAMClientTypes.EvaluationResult.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -21897,56 +16915,21 @@ public struct SimulatePrincipalPolicyOutput: Swift.Equatable { } } -struct SimulatePrincipalPolicyOutputBody: Swift.Equatable { - let evaluationResults: [IAMClientTypes.EvaluationResult]? - let isTruncated: Swift.Bool - let marker: Swift.String? -} - -extension SimulatePrincipalPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case evaluationResults = "EvaluationResults" - case isTruncated = "IsTruncated" - case marker = "Marker" - } +enum SimulatePrincipalPolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SimulatePrincipalPolicyResult")) - if containerValues.contains(.evaluationResults) { - struct KeyVal0{struct member{}} - let evaluationResultsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .evaluationResults) - if let evaluationResultsWrappedContainer = evaluationResultsWrappedContainer { - let evaluationResultsContainer = try evaluationResultsWrappedContainer.decodeIfPresent([IAMClientTypes.EvaluationResult].self, forKey: .member) - var evaluationResultsBuffer:[IAMClientTypes.EvaluationResult]? = nil - if let evaluationResultsContainer = evaluationResultsContainer { - evaluationResultsBuffer = [IAMClientTypes.EvaluationResult]() - for structureContainer0 in evaluationResultsContainer { - evaluationResultsBuffer?.append(structureContainer0) - } - } - evaluationResults = evaluationResultsBuffer - } else { - evaluationResults = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PolicyEvaluation": return try await PolicyEvaluationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - evaluationResults = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum SimulatePrincipalPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PolicyEvaluation": return try await PolicyEvaluationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -21989,7 +16972,7 @@ extension IAMClientTypes { } } -extension IAMClientTypes.Statement: Swift.Codable { +extension IAMClientTypes.Statement: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case endPosition = "EndPosition" case sourcePolicyId = "SourcePolicyId" @@ -22013,16 +16996,16 @@ extension IAMClientTypes.Statement: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourcePolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourcePolicyId) - sourcePolicyId = sourcePolicyIdDecoded - let sourcePolicyTypeDecoded = try containerValues.decodeIfPresent(IAMClientTypes.PolicySourceType.self, forKey: .sourcePolicyType) - sourcePolicyType = sourcePolicyTypeDecoded - let startPositionDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Position.self, forKey: .startPosition) - startPosition = startPositionDecoded - let endPositionDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Position.self, forKey: .endPosition) - endPosition = endPositionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.Statement() + value.sourcePolicyId = try reader["SourcePolicyId"].readIfPresent() + value.sourcePolicyType = try reader["SourcePolicyType"].readIfPresent() + value.startPosition = try reader["StartPosition"].readIfPresent(readingClosure: IAMClientTypes.Position.readingClosure) + value.endPosition = try reader["EndPosition"].readIfPresent(readingClosure: IAMClientTypes.Position.readingClosure) + return value + } } } @@ -22190,7 +17173,7 @@ extension IAMClientTypes { } } -extension IAMClientTypes.Tag: Swift.Codable { +extension IAMClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -22206,12 +17189,14 @@ extension IAMClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -22238,6 +17223,11 @@ extension IAMClientTypes { } extension TagInstanceProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case instanceProfileName = "InstanceProfileName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceProfileName = instanceProfileName { @@ -22285,68 +17275,47 @@ public struct TagInstanceProfileInput: Swift.Equatable { } } -struct TagInstanceProfileInputBody: Swift.Equatable { - let instanceProfileName: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension TagInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfileName = "InstanceProfileName" - case tags = "Tags" - } +extension TagInstanceProfileOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagInstanceProfileOutput() } } } -extension TagInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagInstanceProfileOutput: Swift.Equatable { public init() { } } -enum TagInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagInstanceProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension TagMFADeviceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serialNumber = "SerialNumber" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serialNumber = serialNumber { @@ -22394,68 +17363,47 @@ public struct TagMFADeviceInput: Swift.Equatable { } } -struct TagMFADeviceInputBody: Swift.Equatable { - let serialNumber: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension TagMFADeviceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serialNumber = "SerialNumber" - case tags = "Tags" - } +extension TagMFADeviceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagMFADeviceOutput() } } } -extension TagMFADeviceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagMFADeviceOutput: Swift.Equatable { public init() { } } -enum TagMFADeviceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagMFADeviceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension TagOpenIDConnectProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case openIDConnectProviderArn = "OpenIDConnectProviderArn" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let openIDConnectProviderArn = openIDConnectProviderArn { @@ -22503,68 +17451,47 @@ public struct TagOpenIDConnectProviderInput: Swift.Equatable { } } -struct TagOpenIDConnectProviderInputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension TagOpenIDConnectProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - case tags = "Tags" - } +extension TagOpenIDConnectProviderOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagOpenIDConnectProviderOutput() } } } -extension TagOpenIDConnectProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagOpenIDConnectProviderOutput: Swift.Equatable { public init() { } } -enum TagOpenIDConnectProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagOpenIDConnectProviderOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension TagPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -22612,68 +17539,47 @@ public struct TagPolicyInput: Swift.Equatable { } } -struct TagPolicyInputBody: Swift.Equatable { - let policyArn: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension TagPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case tags = "Tags" - } +extension TagPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagPolicyOutput() } } } -extension TagPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagPolicyOutput: Swift.Equatable { public init() { } } -enum TagPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension TagRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case roleName = "RoleName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let roleName = roleName { @@ -22721,68 +17627,47 @@ public struct TagRoleInput: Swift.Equatable { } } -struct TagRoleInputBody: Swift.Equatable { - let roleName: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension TagRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case roleName = "RoleName" - case tags = "Tags" - } +extension TagRoleOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagRoleOutput() } } } -extension TagRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagRoleOutput: Swift.Equatable { public init() { } } -enum TagRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagRoleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension TagSAMLProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case samlProviderArn = "SAMLProviderArn" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let samlProviderArn = samlProviderArn { @@ -22830,68 +17715,47 @@ public struct TagSAMLProviderInput: Swift.Equatable { } } -struct TagSAMLProviderInputBody: Swift.Equatable { - let samlProviderArn: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension TagSAMLProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderArn = "SAMLProviderArn" - case tags = "Tags" - } +extension TagSAMLProviderOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagSAMLProviderOutput() } } } -extension TagSAMLProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagSAMLProviderOutput: Swift.Equatable { public init() { } } -enum TagSAMLProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagSAMLProviderOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension TagServerCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serverCertificateName = "ServerCertificateName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serverCertificateName = serverCertificateName { @@ -22939,68 +17803,47 @@ public struct TagServerCertificateInput: Swift.Equatable { } } -struct TagServerCertificateInputBody: Swift.Equatable { - let serverCertificateName: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension TagServerCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverCertificateName = "ServerCertificateName" - case tags = "Tags" - } +extension TagServerCertificateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateName) - serverCertificateName = serverCertificateNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagServerCertificateOutput() } } } -extension TagServerCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagServerCertificateOutput: Swift.Equatable { public init() { } } -enum TagServerCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagServerCertificateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension TagUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case tags = "Tags" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let tags = tags { @@ -23048,68 +17891,42 @@ public struct TagUserInput: Swift.Equatable { } } -struct TagUserInputBody: Swift.Equatable { - let userName: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension TagUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - case userName = "UserName" - } +extension TagUserOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagUserOutput() } } } -extension TagUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagUserOutput: Swift.Equatable { public init() { } } -enum TagUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagUserOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension IAMClientTypes.TrackedActionLastAccessed: Swift.Codable { +extension IAMClientTypes.TrackedActionLastAccessed: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actionName = "ActionName" case lastAccessedEntity = "LastAccessedEntity" @@ -23133,16 +17950,16 @@ extension IAMClientTypes.TrackedActionLastAccessed: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionName) - actionName = actionNameDecoded - let lastAccessedEntityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastAccessedEntity) - lastAccessedEntity = lastAccessedEntityDecoded - let lastAccessedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastAccessedTime) - lastAccessedTime = lastAccessedTimeDecoded - let lastAccessedRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastAccessedRegion) - lastAccessedRegion = lastAccessedRegionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.TrackedActionLastAccessed() + value.actionName = try reader["ActionName"].readIfPresent() + value.lastAccessedEntity = try reader["LastAccessedEntity"].readIfPresent() + value.lastAccessedTime = try reader["LastAccessedTime"].readTimestampIfPresent(format: .dateTime) + value.lastAccessedRegion = try reader["LastAccessedRegion"].readIfPresent() + return value + } } } @@ -23175,16 +17992,14 @@ extension IAMClientTypes { } extension UnmodifiableEntityException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnmodifiableEntityException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23212,33 +18027,15 @@ public struct UnmodifiableEntityException: ClientRuntime.ModeledError, AWSClient } } -struct UnmodifiableEntityExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnmodifiableEntityExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UnrecognizedPublicKeyEncodingException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnrecognizedPublicKeyEncodingException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23266,23 +18063,12 @@ public struct UnrecognizedPublicKeyEncodingException: ClientRuntime.ModeledError } } -struct UnrecognizedPublicKeyEncodingExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnrecognizedPublicKeyEncodingExceptionBody: Swift.Decodable { +extension UntagInstanceProfileInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case instanceProfileName = "InstanceProfileName" + case tagKeys = "TagKeys" } -} -extension UntagInstanceProfileInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let instanceProfileName = instanceProfileName { @@ -23330,67 +18116,46 @@ public struct UntagInstanceProfileInput: Swift.Equatable { } } -struct UntagInstanceProfileInputBody: Swift.Equatable { - let instanceProfileName: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagInstanceProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case instanceProfileName = "InstanceProfileName" - case tagKeys = "TagKeys" - } +extension UntagInstanceProfileOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let instanceProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .instanceProfileName) - instanceProfileName = instanceProfileNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagInstanceProfileOutput() } } } -extension UntagInstanceProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagInstanceProfileOutput: Swift.Equatable { public init() { } } -enum UntagInstanceProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagInstanceProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagMFADeviceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serialNumber = "SerialNumber" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serialNumber = serialNumber { @@ -23438,67 +18203,46 @@ public struct UntagMFADeviceInput: Swift.Equatable { } } -struct UntagMFADeviceInputBody: Swift.Equatable { - let serialNumber: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagMFADeviceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serialNumber = "SerialNumber" - case tagKeys = "TagKeys" - } +extension UntagMFADeviceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagMFADeviceOutput() } } } -extension UntagMFADeviceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagMFADeviceOutput: Swift.Equatable { public init() { } } -enum UntagMFADeviceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagMFADeviceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagOpenIDConnectProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case openIDConnectProviderArn = "OpenIDConnectProviderArn" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let openIDConnectProviderArn = openIDConnectProviderArn { @@ -23546,67 +18290,46 @@ public struct UntagOpenIDConnectProviderInput: Swift.Equatable { } } -struct UntagOpenIDConnectProviderInputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagOpenIDConnectProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - case tagKeys = "TagKeys" - } +extension UntagOpenIDConnectProviderOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagOpenIDConnectProviderOutput() } } } -extension UntagOpenIDConnectProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagOpenIDConnectProviderOutput: Swift.Equatable { public init() { } } -enum UntagOpenIDConnectProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagOpenIDConnectProviderOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyArn = "PolicyArn" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyArn = policyArn { @@ -23654,67 +18377,46 @@ public struct UntagPolicyInput: Swift.Equatable { } } -struct UntagPolicyInputBody: Swift.Equatable { - let policyArn: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyArn = "PolicyArn" - case tagKeys = "TagKeys" - } +extension UntagPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyArn) - policyArn = policyArnDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagPolicyOutput() } } } -extension UntagPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagPolicyOutput: Swift.Equatable { public init() { } } -enum UntagPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case roleName = "RoleName" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let roleName = roleName { @@ -23762,66 +18464,45 @@ public struct UntagRoleInput: Swift.Equatable { } } -struct UntagRoleInputBody: Swift.Equatable { - let roleName: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case roleName = "RoleName" - case tagKeys = "TagKeys" - } +extension UntagRoleOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagRoleOutput() } } } -extension UntagRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagRoleOutput: Swift.Equatable { public init() { } } -enum UntagRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagRoleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagSAMLProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case samlProviderArn = "SAMLProviderArn" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let samlProviderArn = samlProviderArn { @@ -23869,67 +18550,46 @@ public struct UntagSAMLProviderInput: Swift.Equatable { } } -struct UntagSAMLProviderInputBody: Swift.Equatable { - let samlProviderArn: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagSAMLProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderArn = "SAMLProviderArn" - case tagKeys = "TagKeys" - } +extension UntagSAMLProviderOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagSAMLProviderOutput() } } } -extension UntagSAMLProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagSAMLProviderOutput: Swift.Equatable { public init() { } } -enum UntagSAMLProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagSAMLProviderOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagServerCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serverCertificateName = "ServerCertificateName" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serverCertificateName = serverCertificateName { @@ -23977,67 +18637,46 @@ public struct UntagServerCertificateInput: Swift.Equatable { } } -struct UntagServerCertificateInputBody: Swift.Equatable { - let serverCertificateName: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagServerCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverCertificateName = "ServerCertificateName" - case tagKeys = "TagKeys" - } +extension UntagServerCertificateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateName) - serverCertificateName = serverCertificateNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagServerCertificateOutput() } } } -extension UntagServerCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagServerCertificateOutput: Swift.Equatable { public init() { } } -enum UntagServerCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagServerCertificateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case tagKeys = "TagKeys" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let tagKeys = tagKeys { @@ -24085,66 +18724,46 @@ public struct UntagUserInput: Swift.Equatable { } } -struct UntagUserInputBody: Swift.Equatable { - let userName: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagKeys = "TagKeys" - case userName = "UserName" - } +extension UntagUserOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagUserOutput() } } } -extension UntagUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagUserOutput: Swift.Equatable { public init() { } } -enum UntagUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagUserOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateAccessKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accessKeyId = "AccessKeyId" + case status = "Status" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accessKeyId = accessKeyId { @@ -24190,32 +18809,12 @@ public struct UpdateAccessKeyInput: Swift.Equatable { } } -struct UpdateAccessKeyInputBody: Swift.Equatable { - let userName: Swift.String? - let accessKeyId: Swift.String? - let status: IAMClientTypes.StatusType? -} - -extension UpdateAccessKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKeyId = "AccessKeyId" - case status = "Status" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - } -} +extension UpdateAccessKeyOutput { -extension UpdateAccessKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateAccessKeyOutput() + } } } @@ -24224,19 +18823,38 @@ public struct UpdateAccessKeyOutput: Swift.Equatable { public init() { } } -enum UpdateAccessKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateAccessKeyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateAccountPasswordPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowUsersToChangePassword = "AllowUsersToChangePassword" + case hardExpiry = "HardExpiry" + case maxPasswordAge = "MaxPasswordAge" + case minimumPasswordLength = "MinimumPasswordLength" + case passwordReusePrevention = "PasswordReusePrevention" + case requireLowercaseCharacters = "RequireLowercaseCharacters" + case requireNumbers = "RequireNumbers" + case requireSymbols = "RequireSymbols" + case requireUppercaseCharacters = "RequireUppercaseCharacters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowUsersToChangePassword = allowUsersToChangePassword { @@ -24322,56 +18940,12 @@ public struct UpdateAccountPasswordPolicyInput: Swift.Equatable { } } -struct UpdateAccountPasswordPolicyInputBody: Swift.Equatable { - let minimumPasswordLength: Swift.Int? - let requireSymbols: Swift.Bool? - let requireNumbers: Swift.Bool? - let requireUppercaseCharacters: Swift.Bool? - let requireLowercaseCharacters: Swift.Bool? - let allowUsersToChangePassword: Swift.Bool? - let maxPasswordAge: Swift.Int? - let passwordReusePrevention: Swift.Int? - let hardExpiry: Swift.Bool? -} - -extension UpdateAccountPasswordPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowUsersToChangePassword = "AllowUsersToChangePassword" - case hardExpiry = "HardExpiry" - case maxPasswordAge = "MaxPasswordAge" - case minimumPasswordLength = "MinimumPasswordLength" - case passwordReusePrevention = "PasswordReusePrevention" - case requireLowercaseCharacters = "RequireLowercaseCharacters" - case requireNumbers = "RequireNumbers" - case requireSymbols = "RequireSymbols" - case requireUppercaseCharacters = "RequireUppercaseCharacters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minimumPasswordLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minimumPasswordLength) - minimumPasswordLength = minimumPasswordLengthDecoded - let requireSymbolsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireSymbols) ?? false - requireSymbols = requireSymbolsDecoded - let requireNumbersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireNumbers) ?? false - requireNumbers = requireNumbersDecoded - let requireUppercaseCharactersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireUppercaseCharacters) ?? false - requireUppercaseCharacters = requireUppercaseCharactersDecoded - let requireLowercaseCharactersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireLowercaseCharacters) ?? false - requireLowercaseCharacters = requireLowercaseCharactersDecoded - let allowUsersToChangePasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowUsersToChangePassword) ?? false - allowUsersToChangePassword = allowUsersToChangePasswordDecoded - let maxPasswordAgeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxPasswordAge) - maxPasswordAge = maxPasswordAgeDecoded - let passwordReusePreventionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .passwordReusePrevention) - passwordReusePrevention = passwordReusePreventionDecoded - let hardExpiryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .hardExpiry) - hardExpiry = hardExpiryDecoded - } -} +extension UpdateAccountPasswordPolicyOutput { -extension UpdateAccountPasswordPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateAccountPasswordPolicyOutput() + } } } @@ -24380,20 +18954,32 @@ public struct UpdateAccountPasswordPolicyOutput: Swift.Equatable { public init() { } } -enum UpdateAccountPasswordPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateAccountPasswordPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateAssumeRolePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policyDocument = "PolicyDocument" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policyDocument = policyDocument { @@ -24438,28 +19024,12 @@ public struct UpdateAssumeRolePolicyInput: Swift.Equatable { } } -struct UpdateAssumeRolePolicyInputBody: Swift.Equatable { - let roleName: Swift.String? - let policyDocument: Swift.String? -} - -extension UpdateAssumeRolePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyDocument = "PolicyDocument" - case roleName = "RoleName" - } +extension UpdateAssumeRolePolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let policyDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyDocument) - policyDocument = policyDocumentDecoded - } -} - -extension UpdateAssumeRolePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateAssumeRolePolicyOutput() + } } } @@ -24468,21 +19038,34 @@ public struct UpdateAssumeRolePolicyOutput: Swift.Equatable { public init() { } } -enum UpdateAssumeRolePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateAssumeRolePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case groupName = "GroupName" + case newGroupName = "NewGroupName" + case newPath = "NewPath" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let groupName = groupName { @@ -24527,32 +19110,12 @@ public struct UpdateGroupInput: Swift.Equatable { } } -struct UpdateGroupInputBody: Swift.Equatable { - let groupName: Swift.String? - let newPath: Swift.String? - let newGroupName: Swift.String? -} - -extension UpdateGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case groupName = "GroupName" - case newGroupName = "NewGroupName" - case newPath = "NewPath" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .groupName) - groupName = groupNameDecoded - let newPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newPath) - newPath = newPathDecoded - let newGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newGroupName) - newGroupName = newGroupNameDecoded - } -} +extension UpdateGroupOutput { -extension UpdateGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateGroupOutput() + } } } @@ -24561,15 +19124,22 @@ public struct UpdateGroupOutput: Swift.Equatable { public init() { } } -enum UpdateGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -24580,6 +19150,12 @@ extension UpdateLoginProfileInput: Swift.CustomDebugStringConvertible { } extension UpdateLoginProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case password = "Password" + case passwordResetRequired = "PasswordResetRequired" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let password = password { @@ -24633,32 +19209,12 @@ public struct UpdateLoginProfileInput: Swift.Equatable { } } -struct UpdateLoginProfileInputBody: Swift.Equatable { - let userName: Swift.String? - let password: Swift.String? - let passwordResetRequired: Swift.Bool? -} - -extension UpdateLoginProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case password = "Password" - case passwordResetRequired = "PasswordResetRequired" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let passwordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .password) - password = passwordDecoded - let passwordResetRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .passwordResetRequired) - passwordResetRequired = passwordResetRequiredDecoded - } -} +extension UpdateLoginProfileOutput { -extension UpdateLoginProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateLoginProfileOutput() + } } } @@ -24667,21 +19223,33 @@ public struct UpdateLoginProfileOutput: Swift.Equatable { public init() { } } -enum UpdateLoginProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PasswordPolicyViolation": return try await PasswordPolicyViolationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateLoginProfileOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PasswordPolicyViolation": return try await PasswordPolicyViolationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateOpenIDConnectProviderThumbprintInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case openIDConnectProviderArn = "OpenIDConnectProviderArn" + case thumbprintList = "ThumbprintList" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let openIDConnectProviderArn = openIDConnectProviderArn { @@ -24720,54 +19288,21 @@ public struct UpdateOpenIDConnectProviderThumbprintInput: Swift.Equatable { public var thumbprintList: [Swift.String]? public init( - openIDConnectProviderArn: Swift.String? = nil, - thumbprintList: [Swift.String]? = nil - ) - { - self.openIDConnectProviderArn = openIDConnectProviderArn - self.thumbprintList = thumbprintList - } -} - -struct UpdateOpenIDConnectProviderThumbprintInputBody: Swift.Equatable { - let openIDConnectProviderArn: Swift.String? - let thumbprintList: [Swift.String]? -} - -extension UpdateOpenIDConnectProviderThumbprintInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case openIDConnectProviderArn = "OpenIDConnectProviderArn" - case thumbprintList = "ThumbprintList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let openIDConnectProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .openIDConnectProviderArn) - openIDConnectProviderArn = openIDConnectProviderArnDecoded - if containerValues.contains(.thumbprintList) { - struct KeyVal0{struct member{}} - let thumbprintListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .thumbprintList) - if let thumbprintListWrappedContainer = thumbprintListWrappedContainer { - let thumbprintListContainer = try thumbprintListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var thumbprintListBuffer:[Swift.String]? = nil - if let thumbprintListContainer = thumbprintListContainer { - thumbprintListBuffer = [Swift.String]() - for stringContainer0 in thumbprintListContainer { - thumbprintListBuffer?.append(stringContainer0) - } - } - thumbprintList = thumbprintListBuffer - } else { - thumbprintList = [] - } - } else { - thumbprintList = nil - } + openIDConnectProviderArn: Swift.String? = nil, + thumbprintList: [Swift.String]? = nil + ) + { + self.openIDConnectProviderArn = openIDConnectProviderArn + self.thumbprintList = thumbprintList } } -extension UpdateOpenIDConnectProviderThumbprintOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension UpdateOpenIDConnectProviderThumbprintOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateOpenIDConnectProviderThumbprintOutput() + } } } @@ -24776,19 +19311,31 @@ public struct UpdateOpenIDConnectProviderThumbprintOutput: Swift.Equatable { public init() { } } -enum UpdateOpenIDConnectProviderThumbprintOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateOpenIDConnectProviderThumbprintOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateRoleDescriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case description = "Description" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let description = description { @@ -24827,34 +19374,15 @@ public struct UpdateRoleDescriptionInput: Swift.Equatable { } } -struct UpdateRoleDescriptionInputBody: Swift.Equatable { - let roleName: Swift.String? - let description: Swift.String? -} - -extension UpdateRoleDescriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - } -} +extension UpdateRoleDescriptionOutput { -extension UpdateRoleDescriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateRoleDescriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.role = output.role - } else { - self.role = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateRoleDescriptionResult"] + var value = UpdateRoleDescriptionOutput() + value.role = try reader["Role"].readIfPresent(readingClosure: IAMClientTypes.Role.readingClosure) + return value } } } @@ -24871,36 +19399,32 @@ public struct UpdateRoleDescriptionOutput: Swift.Equatable { } } -struct UpdateRoleDescriptionOutputBody: Swift.Equatable { - let role: IAMClientTypes.Role? -} - -extension UpdateRoleDescriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case role = "Role" - } +enum UpdateRoleDescriptionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateRoleDescriptionResult")) - let roleDecoded = try containerValues.decodeIfPresent(IAMClientTypes.Role.self, forKey: .role) - role = roleDecoded - } -} - -enum UpdateRoleDescriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case description = "Description" + case maxSessionDuration = "MaxSessionDuration" + case roleName = "RoleName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let description = description { @@ -24945,32 +19469,12 @@ public struct UpdateRoleInput: Swift.Equatable { } } -struct UpdateRoleInputBody: Swift.Equatable { - let roleName: Swift.String? - let description: Swift.String? - let maxSessionDuration: Swift.Int? -} - -extension UpdateRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case maxSessionDuration = "MaxSessionDuration" - case roleName = "RoleName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleName) - roleName = roleNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let maxSessionDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxSessionDuration) - maxSessionDuration = maxSessionDurationDecoded - } -} +extension UpdateRoleOutput { -extension UpdateRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateRoleOutput() + } } } @@ -24979,19 +19483,31 @@ public struct UpdateRoleOutput: Swift.Equatable { public init() { } } -enum UpdateRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnmodifiableEntity": return try await UnmodifiableEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateRoleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnmodifiableEntity": return try await UnmodifiableEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateSAMLProviderInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case samlMetadataDocument = "SAMLMetadataDocument" + case samlProviderArn = "SAMLProviderArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let samlMetadataDocument = samlMetadataDocument { @@ -25030,34 +19546,15 @@ public struct UpdateSAMLProviderInput: Swift.Equatable { } } -struct UpdateSAMLProviderInputBody: Swift.Equatable { - let samlMetadataDocument: Swift.String? - let samlProviderArn: Swift.String? -} - -extension UpdateSAMLProviderInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlMetadataDocument = "SAMLMetadataDocument" - case samlProviderArn = "SAMLProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let samlMetadataDocumentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlMetadataDocument) - samlMetadataDocument = samlMetadataDocumentDecoded - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - } -} +extension UpdateSAMLProviderOutput { -extension UpdateSAMLProviderOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateSAMLProviderOutputBody = try responseDecoder.decode(responseBody: data) - self.samlProviderArn = output.samlProviderArn - } else { - self.samlProviderArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdateSAMLProviderResult"] + var value = UpdateSAMLProviderOutput() + value.samlProviderArn = try reader["SAMLProviderArn"].readIfPresent() + return value } } } @@ -25075,37 +19572,33 @@ public struct UpdateSAMLProviderOutput: Swift.Equatable { } } -struct UpdateSAMLProviderOutputBody: Swift.Equatable { - let samlProviderArn: Swift.String? -} - -extension UpdateSAMLProviderOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case samlProviderArn = "SAMLProviderArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdateSAMLProviderResult")) - let samlProviderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlProviderArn) - samlProviderArn = samlProviderArnDecoded - } -} +enum UpdateSAMLProviderOutputError { -enum UpdateSAMLProviderOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateSSHPublicKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sshPublicKeyId = "SSHPublicKeyId" + case status = "Status" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sshPublicKeyId = sshPublicKeyId { @@ -25152,32 +19645,12 @@ public struct UpdateSSHPublicKeyInput: Swift.Equatable { } } -struct UpdateSSHPublicKeyInputBody: Swift.Equatable { - let userName: Swift.String? - let sshPublicKeyId: Swift.String? - let status: IAMClientTypes.StatusType? -} - -extension UpdateSSHPublicKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sshPublicKeyId = "SSHPublicKeyId" - case status = "Status" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let sshPublicKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sshPublicKeyId) - sshPublicKeyId = sshPublicKeyIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - } -} +extension UpdateSSHPublicKeyOutput { -extension UpdateSSHPublicKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateSSHPublicKeyOutput() + } } } @@ -25186,17 +19659,30 @@ public struct UpdateSSHPublicKeyOutput: Swift.Equatable { public init() { } } -enum UpdateSSHPublicKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateSSHPublicKeyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateServerCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case newPath = "NewPath" + case newServerCertificateName = "NewServerCertificateName" + case serverCertificateName = "ServerCertificateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let newPath = newPath { @@ -25241,32 +19727,12 @@ public struct UpdateServerCertificateInput: Swift.Equatable { } } -struct UpdateServerCertificateInputBody: Swift.Equatable { - let serverCertificateName: Swift.String? - let newPath: Swift.String? - let newServerCertificateName: Swift.String? -} - -extension UpdateServerCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case newPath = "NewPath" - case newServerCertificateName = "NewServerCertificateName" - case serverCertificateName = "ServerCertificateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateName) - serverCertificateName = serverCertificateNameDecoded - let newPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newPath) - newPath = newPathDecoded - let newServerCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newServerCertificateName) - newServerCertificateName = newServerCertificateNameDecoded - } -} +extension UpdateServerCertificateOutput { -extension UpdateServerCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateServerCertificateOutput() + } } } @@ -25275,20 +19741,33 @@ public struct UpdateServerCertificateOutput: Swift.Equatable { public init() { } } -enum UpdateServerCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateServerCertificateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateServiceSpecificCredentialInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case serviceSpecificCredentialId = "ServiceSpecificCredentialId" + case status = "Status" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let serviceSpecificCredentialId = serviceSpecificCredentialId { @@ -25334,32 +19813,12 @@ public struct UpdateServiceSpecificCredentialInput: Swift.Equatable { } } -struct UpdateServiceSpecificCredentialInputBody: Swift.Equatable { - let userName: Swift.String? - let serviceSpecificCredentialId: Swift.String? - let status: IAMClientTypes.StatusType? -} - -extension UpdateServiceSpecificCredentialInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serviceSpecificCredentialId = "ServiceSpecificCredentialId" - case status = "Status" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let serviceSpecificCredentialIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serviceSpecificCredentialId) - serviceSpecificCredentialId = serviceSpecificCredentialIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - } -} +extension UpdateServiceSpecificCredentialOutput { -extension UpdateServiceSpecificCredentialOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateServiceSpecificCredentialOutput() + } } } @@ -25368,17 +19827,30 @@ public struct UpdateServiceSpecificCredentialOutput: Swift.Equatable { public init() { } } -enum UpdateServiceSpecificCredentialOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateServiceSpecificCredentialOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateSigningCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateId = "CertificateId" + case status = "Status" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificateId = certificateId { @@ -25424,32 +19896,12 @@ public struct UpdateSigningCertificateInput: Swift.Equatable { } } -struct UpdateSigningCertificateInputBody: Swift.Equatable { - let userName: Swift.String? - let certificateId: Swift.String? - let status: IAMClientTypes.StatusType? -} - -extension UpdateSigningCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateId = "CertificateId" - case status = "Status" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let certificateIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateId) - certificateId = certificateIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(IAMClientTypes.StatusType.self, forKey: .status) - status = statusDecoded - } -} +extension UpdateSigningCertificateOutput { -extension UpdateSigningCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateSigningCertificateOutput() + } } } @@ -25458,19 +19910,32 @@ public struct UpdateSigningCertificateOutput: Swift.Equatable { public init() { } } -enum UpdateSigningCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateSigningCertificateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateUserInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case newPath = "NewPath" + case newUserName = "NewUserName" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let newPath = newPath { @@ -25515,32 +19980,12 @@ public struct UpdateUserInput: Swift.Equatable { } } -struct UpdateUserInputBody: Swift.Equatable { - let userName: Swift.String? - let newPath: Swift.String? - let newUserName: Swift.String? -} - -extension UpdateUserInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case newPath = "NewPath" - case newUserName = "NewUserName" - case userName = "UserName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let newPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newPath) - newPath = newPathDecoded - let newUserNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newUserName) - newUserName = newUserNameDecoded - } -} +extension UpdateUserOutput { -extension UpdateUserOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateUserOutput() + } } } @@ -25549,22 +19994,34 @@ public struct UpdateUserOutput: Swift.Equatable { public init() { } } -enum UpdateUserOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateUserOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityTemporarilyUnmodifiable": return try await EntityTemporarilyUnmodifiableException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UploadSSHPublicKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sshPublicKeyBody = "SSHPublicKeyBody" + case userName = "UserName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sshPublicKeyBody = sshPublicKeyBody { @@ -25609,34 +20066,15 @@ public struct UploadSSHPublicKeyInput: Swift.Equatable { } } -struct UploadSSHPublicKeyInputBody: Swift.Equatable { - let userName: Swift.String? - let sshPublicKeyBody: Swift.String? -} - -extension UploadSSHPublicKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sshPublicKeyBody = "SSHPublicKeyBody" - case userName = "UserName" - } +extension UploadSSHPublicKeyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let sshPublicKeyBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sshPublicKeyBody) - sshPublicKeyBody = sshPublicKeyBodyDecoded - } -} - -extension UploadSSHPublicKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UploadSSHPublicKeyOutputBody = try responseDecoder.decode(responseBody: data) - self.sshPublicKey = output.sshPublicKey - } else { - self.sshPublicKey = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UploadSSHPublicKeyResult"] + var value = UploadSSHPublicKeyOutput() + value.sshPublicKey = try reader["SSHPublicKey"].readIfPresent(readingClosure: IAMClientTypes.SSHPublicKey.readingClosure) + return value } } } @@ -25654,33 +20092,23 @@ public struct UploadSSHPublicKeyOutput: Swift.Equatable { } } -struct UploadSSHPublicKeyOutputBody: Swift.Equatable { - let sshPublicKey: IAMClientTypes.SSHPublicKey? -} - -extension UploadSSHPublicKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sshPublicKey = "SSHPublicKey" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UploadSSHPublicKeyResult")) - let sshPublicKeyDecoded = try containerValues.decodeIfPresent(IAMClientTypes.SSHPublicKey.self, forKey: .sshPublicKey) - sshPublicKey = sshPublicKeyDecoded - } -} +enum UploadSSHPublicKeyOutputError { -enum UploadSSHPublicKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DuplicateSSHPublicKey": return try await DuplicateSSHPublicKeyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidPublicKey": return try await InvalidPublicKeyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnrecognizedPublicKeyEncoding": return try await UnrecognizedPublicKeyEncodingException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DuplicateSSHPublicKey": return try await DuplicateSSHPublicKeyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidPublicKey": return try await InvalidPublicKeyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnrecognizedPublicKeyEncoding": return try await UnrecognizedPublicKeyEncodingException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -25691,6 +20119,15 @@ extension UploadServerCertificateInput: Swift.CustomDebugStringConvertible { } extension UploadServerCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateBody = "CertificateBody" + case certificateChain = "CertificateChain" + case path = "Path" + case privateKey = "PrivateKey" + case serverCertificateName = "ServerCertificateName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificateBody = certificateBody { @@ -25785,69 +20222,16 @@ public struct UploadServerCertificateInput: Swift.Equatable { } } -struct UploadServerCertificateInputBody: Swift.Equatable { - let path: Swift.String? - let serverCertificateName: Swift.String? - let certificateBody: Swift.String? - let privateKey: Swift.String? - let certificateChain: Swift.String? - let tags: [IAMClientTypes.Tag]? -} - -extension UploadServerCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateBody = "CertificateBody" - case certificateChain = "CertificateChain" - case path = "Path" - case privateKey = "PrivateKey" - case serverCertificateName = "ServerCertificateName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let serverCertificateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serverCertificateName) - serverCertificateName = serverCertificateNameDecoded - let certificateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateBody) - certificateBody = certificateBodyDecoded - let privateKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateKey) - privateKey = privateKeyDecoded - let certificateChainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateChain) - certificateChain = certificateChainDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension UploadServerCertificateOutput { -extension UploadServerCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UploadServerCertificateOutputBody = try responseDecoder.decode(responseBody: data) - self.serverCertificateMetadata = output.serverCertificateMetadata - self.tags = output.tags - } else { - self.serverCertificateMetadata = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UploadServerCertificateResult"] + var value = UploadServerCertificateOutput() + value.serverCertificateMetadata = try reader["ServerCertificateMetadata"].readIfPresent(readingClosure: IAMClientTypes.ServerCertificateMetadata.readingClosure) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -25869,61 +20253,35 @@ public struct UploadServerCertificateOutput: Swift.Equatable { } } -struct UploadServerCertificateOutputBody: Swift.Equatable { - let serverCertificateMetadata: IAMClientTypes.ServerCertificateMetadata? - let tags: [IAMClientTypes.Tag]? -} - -extension UploadServerCertificateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverCertificateMetadata = "ServerCertificateMetadata" - case tags = "Tags" - } +enum UploadServerCertificateOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UploadServerCertificateResult")) - let serverCertificateMetadataDecoded = try containerValues.decodeIfPresent(IAMClientTypes.ServerCertificateMetadata.self, forKey: .serverCertificateMetadata) - serverCertificateMetadata = serverCertificateMetadataDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidInput": return try await InvalidInputException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KeyPairMismatch": return try await KeyPairMismatchException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedCertificate": return try await MalformedCertificateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } } } -enum UploadServerCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInputException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KeyPairMismatch": return try await KeyPairMismatchException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedCertificate": return try await MalformedCertificateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension UploadSigningCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateBody = "CertificateBody" + case userName = "UserName" } -} -extension UploadSigningCertificateInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificateBody = certificateBody { @@ -25967,34 +20325,15 @@ public struct UploadSigningCertificateInput: Swift.Equatable { } } -struct UploadSigningCertificateInputBody: Swift.Equatable { - let userName: Swift.String? - let certificateBody: Swift.String? -} - -extension UploadSigningCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateBody = "CertificateBody" - case userName = "UserName" - } +extension UploadSigningCertificateOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let certificateBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateBody) - certificateBody = certificateBodyDecoded - } -} - -extension UploadSigningCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UploadSigningCertificateOutputBody = try responseDecoder.decode(responseBody: data) - self.certificate = output.certificate - } else { - self.certificate = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UploadSigningCertificateResult"] + var value = UploadSigningCertificateOutput() + value.certificate = try reader["Certificate"].readIfPresent(readingClosure: IAMClientTypes.SigningCertificate.readingClosure) + return value } } } @@ -26013,41 +20352,31 @@ public struct UploadSigningCertificateOutput: Swift.Equatable { } } -struct UploadSigningCertificateOutputBody: Swift.Equatable { - let certificate: IAMClientTypes.SigningCertificate? -} - -extension UploadSigningCertificateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificate = "Certificate" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UploadSigningCertificateResult")) - let certificateDecoded = try containerValues.decodeIfPresent(IAMClientTypes.SigningCertificate.self, forKey: .certificate) - certificate = certificateDecoded - } -} +enum UploadSigningCertificateOutputError { -enum UploadSigningCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DuplicateCertificate": return try await DuplicateCertificateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EntityAlreadyExists": return try await EntityAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCertificate": return try await InvalidCertificateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedCertificate": return try await MalformedCertificateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchEntity": return try await NoSuchEntityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ServiceFailure": return try await ServiceFailureException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConcurrentModification": return try await ConcurrentModificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DuplicateCertificate": return try await DuplicateCertificateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EntityAlreadyExists": return try await EntityAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCertificate": return try await InvalidCertificateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedCertificate": return try await MalformedCertificateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NoSuchEntity": return try await NoSuchEntityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ServiceFailure": return try await ServiceFailureException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension IAMClientTypes.User: Swift.Codable { +extension IAMClientTypes.User: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case createDate = "CreateDate" @@ -26096,40 +20425,19 @@ extension IAMClientTypes.User: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - let passwordLastUsedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .passwordLastUsed) - passwordLastUsed = passwordLastUsedDecoded - let permissionsBoundaryDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AttachedPermissionsBoundary.self, forKey: .permissionsBoundary) - permissionsBoundary = permissionsBoundaryDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.User() + value.path = try reader["Path"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + value.userId = try reader["UserId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.passwordLastUsed = try reader["PasswordLastUsed"].readTimestampIfPresent(format: .dateTime) + value.permissionsBoundary = try reader["PermissionsBoundary"].readIfPresent(readingClosure: IAMClientTypes.AttachedPermissionsBoundary.readingClosure) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -26196,7 +20504,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.UserDetail: Swift.Codable { +extension IAMClientTypes.UserDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case attachedManagedPolicies = "AttachedManagedPolicies" @@ -26280,95 +20588,21 @@ extension IAMClientTypes.UserDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .path) - path = pathDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let createDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createDate) - createDate = createDateDecoded - if containerValues.contains(.userPolicyList) { - struct KeyVal0{struct member{}} - let userPolicyListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userPolicyList) - if let userPolicyListWrappedContainer = userPolicyListWrappedContainer { - let userPolicyListContainer = try userPolicyListWrappedContainer.decodeIfPresent([IAMClientTypes.PolicyDetail].self, forKey: .member) - var userPolicyListBuffer:[IAMClientTypes.PolicyDetail]? = nil - if let userPolicyListContainer = userPolicyListContainer { - userPolicyListBuffer = [IAMClientTypes.PolicyDetail]() - for structureContainer0 in userPolicyListContainer { - userPolicyListBuffer?.append(structureContainer0) - } - } - userPolicyList = userPolicyListBuffer - } else { - userPolicyList = [] - } - } else { - userPolicyList = nil - } - if containerValues.contains(.groupList) { - struct KeyVal0{struct member{}} - let groupListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .groupList) - if let groupListWrappedContainer = groupListWrappedContainer { - let groupListContainer = try groupListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var groupListBuffer:[Swift.String]? = nil - if let groupListContainer = groupListContainer { - groupListBuffer = [Swift.String]() - for stringContainer0 in groupListContainer { - groupListBuffer?.append(stringContainer0) - } - } - groupList = groupListBuffer - } else { - groupList = [] - } - } else { - groupList = nil - } - if containerValues.contains(.attachedManagedPolicies) { - struct KeyVal0{struct member{}} - let attachedManagedPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attachedManagedPolicies) - if let attachedManagedPoliciesWrappedContainer = attachedManagedPoliciesWrappedContainer { - let attachedManagedPoliciesContainer = try attachedManagedPoliciesWrappedContainer.decodeIfPresent([IAMClientTypes.AttachedPolicy].self, forKey: .member) - var attachedManagedPoliciesBuffer:[IAMClientTypes.AttachedPolicy]? = nil - if let attachedManagedPoliciesContainer = attachedManagedPoliciesContainer { - attachedManagedPoliciesBuffer = [IAMClientTypes.AttachedPolicy]() - for structureContainer0 in attachedManagedPoliciesContainer { - attachedManagedPoliciesBuffer?.append(structureContainer0) - } - } - attachedManagedPolicies = attachedManagedPoliciesBuffer - } else { - attachedManagedPolicies = [] - } - } else { - attachedManagedPolicies = nil - } - let permissionsBoundaryDecoded = try containerValues.decodeIfPresent(IAMClientTypes.AttachedPermissionsBoundary.self, forKey: .permissionsBoundary) - permissionsBoundary = permissionsBoundaryDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.UserDetail() + value.path = try reader["Path"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + value.userId = try reader["UserId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.createDate = try reader["CreateDate"].readTimestampIfPresent(format: .dateTime) + value.userPolicyList = try reader["UserPolicyList"].readListIfPresent(memberReadingClosure: IAMClientTypes.PolicyDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.groupList = try reader["GroupList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.attachedManagedPolicies = try reader["AttachedManagedPolicies"].readListIfPresent(memberReadingClosure: IAMClientTypes.AttachedPolicy.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.permissionsBoundary = try reader["PermissionsBoundary"].readIfPresent(readingClosure: IAMClientTypes.AttachedPermissionsBoundary.readingClosure) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -26425,7 +20659,7 @@ extension IAMClientTypes { } -extension IAMClientTypes.VirtualMFADevice: Swift.Codable { +extension IAMClientTypes.VirtualMFADevice: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case base32StringSeed = "Base32StringSeed" case enableDate = "EnableDate" @@ -26466,52 +20700,17 @@ extension IAMClientTypes.VirtualMFADevice: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - if containerValues.contains(.base32StringSeed) { - do { - let base32StringSeedDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .base32StringSeed) - base32StringSeed = base32StringSeedDecoded - } catch { - base32StringSeed = "".data(using: .utf8) - } - } else { - base32StringSeed = nil - } - if containerValues.contains(.qrCodePNG) { - do { - let qrCodePNGDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .qrCodePNG) - qrCodePNG = qrCodePNGDecoded - } catch { - qrCodePNG = "".data(using: .utf8) - } - } else { - qrCodePNG = nil - } - let userDecoded = try containerValues.decodeIfPresent(IAMClientTypes.User.self, forKey: .user) - user = userDecoded - let enableDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .enableDate) - enableDate = enableDateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([IAMClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[IAMClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [IAMClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IAMClientTypes.VirtualMFADevice() + value.serialNumber = try reader["SerialNumber"].readIfPresent() + value.base32StringSeed = try reader["Base32StringSeed"].readIfPresent() + value.qrCodePNG = try reader["QRCodePNG"].readIfPresent() + value.user = try reader["User"].readIfPresent(readingClosure: IAMClientTypes.User.readingClosure) + value.enableDate = try reader["EnableDate"].readTimestampIfPresent(format: .dateTime) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: IAMClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } diff --git a/Sources/Services/AWSKinesis/models/Models.swift b/Sources/Services/AWSKinesis/models/Models.swift index 958b67dbd87..1c633e1ba12 100644 --- a/Sources/Services/AWSKinesis/models/Models.swift +++ b/Sources/Services/AWSKinesis/models/Models.swift @@ -6685,7 +6685,7 @@ extension SubscribeToShardOutput: ClientRuntime.HttpResponseBinding { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.eventStream = decoderStream.toAsyncStream() } else { self.eventStream = nil diff --git a/Sources/Services/AWSLambda/models/Models.swift b/Sources/Services/AWSLambda/models/Models.swift index 5871263daff..c995caea356 100644 --- a/Sources/Services/AWSLambda/models/Models.swift +++ b/Sources/Services/AWSLambda/models/Models.swift @@ -10873,7 +10873,7 @@ extension InvokeWithResponseStreamOutput: ClientRuntime.HttpResponseBinding { } if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.eventStream = decoderStream.toAsyncStream() } else { self.eventStream = nil diff --git a/Sources/Services/AWSLexRuntimeV2/models/Models.swift b/Sources/Services/AWSLexRuntimeV2/models/Models.swift index 91485d58006..820eaa17619 100644 --- a/Sources/Services/AWSLexRuntimeV2/models/Models.swift +++ b/Sources/Services/AWSLexRuntimeV2/models/Models.swift @@ -3760,7 +3760,7 @@ extension StartConversationOutput: ClientRuntime.HttpResponseBinding { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.responseEventStream = decoderStream.toAsyncStream() } else { self.responseEventStream = nil diff --git a/Sources/Services/AWSNeptune/NeptuneClient.swift b/Sources/Services/AWSNeptune/NeptuneClient.swift index e23c61d2ea5..aeb3be1e7fc 100644 --- a/Sources/Services/AWSNeptune/NeptuneClient.swift +++ b/Sources/Services/AWSNeptune/NeptuneClient.swift @@ -11,14 +11,11 @@ public class NeptuneClient { let config: NeptuneClient.NeptuneClientConfiguration let serviceName = "Neptune" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: NeptuneClient.NeptuneClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -81,7 +78,6 @@ extension NeptuneClient { public func addRoleToDBCluster(input: AddRoleToDBClusterInput) async throws -> AddRoleToDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addRoleToDBCluster") @@ -105,7 +101,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddRoleToDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddRoleToDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddRoleToDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -127,7 +123,6 @@ extension NeptuneClient { public func addSourceIdentifierToSubscription(input: AddSourceIdentifierToSubscriptionInput) async throws -> AddSourceIdentifierToSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addSourceIdentifierToSubscription") @@ -151,7 +146,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddSourceIdentifierToSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddSourceIdentifierToSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddSourceIdentifierToSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -174,7 +169,6 @@ extension NeptuneClient { public func addTagsToResource(input: AddTagsToResourceInput) async throws -> AddTagsToResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addTagsToResource") @@ -198,7 +192,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddTagsToResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddTagsToResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddTagsToResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -219,7 +213,6 @@ extension NeptuneClient { public func applyPendingMaintenanceAction(input: ApplyPendingMaintenanceActionInput) async throws -> ApplyPendingMaintenanceActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "applyPendingMaintenanceAction") @@ -243,7 +236,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ApplyPendingMaintenanceActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ApplyPendingMaintenanceActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ApplyPendingMaintenanceActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -266,7 +259,6 @@ extension NeptuneClient { public func copyDBClusterParameterGroup(input: CopyDBClusterParameterGroupInput) async throws -> CopyDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBClusterParameterGroup") @@ -290,7 +282,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -316,7 +308,6 @@ extension NeptuneClient { public func copyDBClusterSnapshot(input: CopyDBClusterSnapshotInput) async throws -> CopyDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBClusterSnapshot") @@ -340,7 +331,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -363,7 +354,6 @@ extension NeptuneClient { public func copyDBParameterGroup(input: CopyDBParameterGroupInput) async throws -> CopyDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBParameterGroup") @@ -387,7 +377,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -424,7 +414,6 @@ extension NeptuneClient { public func createDBCluster(input: CreateDBClusterInput) async throws -> CreateDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBCluster") @@ -448,7 +437,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -485,7 +474,6 @@ extension NeptuneClient { public func createDBClusterEndpoint(input: CreateDBClusterEndpointInput) async throws -> CreateDBClusterEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBClusterEndpoint") @@ -509,7 +497,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -531,7 +519,6 @@ extension NeptuneClient { public func createDBClusterParameterGroup(input: CreateDBClusterParameterGroupInput) async throws -> CreateDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBClusterParameterGroup") @@ -555,7 +542,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -580,7 +567,6 @@ extension NeptuneClient { public func createDBClusterSnapshot(input: CreateDBClusterSnapshotInput) async throws -> CreateDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBClusterSnapshot") @@ -604,7 +590,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -642,7 +628,6 @@ extension NeptuneClient { public func createDBInstance(input: CreateDBInstanceInput) async throws -> CreateDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBInstance") @@ -666,7 +651,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -688,7 +673,6 @@ extension NeptuneClient { public func createDBParameterGroup(input: CreateDBParameterGroupInput) async throws -> CreateDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBParameterGroup") @@ -712,7 +696,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -737,7 +721,6 @@ extension NeptuneClient { public func createDBSubnetGroup(input: CreateDBSubnetGroupInput) async throws -> CreateDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBSubnetGroup") @@ -761,7 +744,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -788,7 +771,6 @@ extension NeptuneClient { public func createEventSubscription(input: CreateEventSubscriptionInput) async throws -> CreateEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createEventSubscription") @@ -812,7 +794,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -836,7 +818,6 @@ extension NeptuneClient { public func createGlobalCluster(input: CreateGlobalClusterInput) async throws -> CreateGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createGlobalCluster") @@ -860,7 +841,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -885,7 +866,6 @@ extension NeptuneClient { public func deleteDBCluster(input: DeleteDBClusterInput) async throws -> DeleteDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBCluster") @@ -909,7 +889,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -943,7 +923,6 @@ extension NeptuneClient { public func deleteDBClusterEndpoint(input: DeleteDBClusterEndpointInput) async throws -> DeleteDBClusterEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterEndpoint") @@ -967,7 +946,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -989,7 +968,6 @@ extension NeptuneClient { public func deleteDBClusterParameterGroup(input: DeleteDBClusterParameterGroupInput) async throws -> DeleteDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterParameterGroup") @@ -1013,7 +991,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1035,7 +1013,6 @@ extension NeptuneClient { public func deleteDBClusterSnapshot(input: DeleteDBClusterSnapshotInput) async throws -> DeleteDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterSnapshot") @@ -1059,7 +1036,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1084,7 +1061,6 @@ extension NeptuneClient { public func deleteDBInstance(input: DeleteDBInstanceInput) async throws -> DeleteDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBInstance") @@ -1108,7 +1084,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1130,7 +1106,6 @@ extension NeptuneClient { public func deleteDBParameterGroup(input: DeleteDBParameterGroupInput) async throws -> DeleteDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBParameterGroup") @@ -1154,7 +1129,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1177,7 +1152,6 @@ extension NeptuneClient { public func deleteDBSubnetGroup(input: DeleteDBSubnetGroupInput) async throws -> DeleteDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBSubnetGroup") @@ -1201,7 +1175,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1223,7 +1197,6 @@ extension NeptuneClient { public func deleteEventSubscription(input: DeleteEventSubscriptionInput) async throws -> DeleteEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteEventSubscription") @@ -1247,7 +1220,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1269,7 +1242,6 @@ extension NeptuneClient { public func deleteGlobalCluster(input: DeleteGlobalClusterInput) async throws -> DeleteGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteGlobalCluster") @@ -1293,7 +1265,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1314,7 +1286,6 @@ extension NeptuneClient { public func describeDBClusterEndpoints(input: DescribeDBClusterEndpointsInput) async throws -> DescribeDBClusterEndpointsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterEndpoints") @@ -1338,7 +1309,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterEndpointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterEndpointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterEndpointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1359,7 +1330,6 @@ extension NeptuneClient { public func describeDBClusterParameterGroups(input: DescribeDBClusterParameterGroupsInput) async throws -> DescribeDBClusterParameterGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterParameterGroups") @@ -1383,7 +1353,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterParameterGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterParameterGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterParameterGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1404,7 +1374,6 @@ extension NeptuneClient { public func describeDBClusterParameters(input: DescribeDBClusterParametersInput) async throws -> DescribeDBClusterParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterParameters") @@ -1428,7 +1397,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1449,7 +1418,6 @@ extension NeptuneClient { public func describeDBClusterSnapshotAttributes(input: DescribeDBClusterSnapshotAttributesInput) async throws -> DescribeDBClusterSnapshotAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterSnapshotAttributes") @@ -1473,7 +1441,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterSnapshotAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterSnapshotAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterSnapshotAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1494,7 +1462,6 @@ extension NeptuneClient { public func describeDBClusterSnapshots(input: DescribeDBClusterSnapshotsInput) async throws -> DescribeDBClusterSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterSnapshots") @@ -1518,7 +1485,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1539,7 +1506,6 @@ extension NeptuneClient { public func describeDBClusters(input: DescribeDBClustersInput) async throws -> DescribeDBClustersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusters") @@ -1563,7 +1529,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClustersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClustersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClustersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1579,7 +1545,6 @@ extension NeptuneClient { public func describeDBEngineVersions(input: DescribeDBEngineVersionsInput) async throws -> DescribeDBEngineVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBEngineVersions") @@ -1603,7 +1568,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBEngineVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBEngineVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBEngineVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1624,7 +1589,6 @@ extension NeptuneClient { public func describeDBInstances(input: DescribeDBInstancesInput) async throws -> DescribeDBInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBInstances") @@ -1648,7 +1612,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1669,7 +1633,6 @@ extension NeptuneClient { public func describeDBParameterGroups(input: DescribeDBParameterGroupsInput) async throws -> DescribeDBParameterGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBParameterGroups") @@ -1693,7 +1656,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBParameterGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBParameterGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBParameterGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1714,7 +1677,6 @@ extension NeptuneClient { public func describeDBParameters(input: DescribeDBParametersInput) async throws -> DescribeDBParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBParameters") @@ -1738,7 +1700,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1759,7 +1721,6 @@ extension NeptuneClient { public func describeDBSubnetGroups(input: DescribeDBSubnetGroupsInput) async throws -> DescribeDBSubnetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBSubnetGroups") @@ -1783,7 +1744,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBSubnetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBSubnetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBSubnetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1799,7 +1760,6 @@ extension NeptuneClient { public func describeEngineDefaultClusterParameters(input: DescribeEngineDefaultClusterParametersInput) async throws -> DescribeEngineDefaultClusterParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEngineDefaultClusterParameters") @@ -1823,7 +1783,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEngineDefaultClusterParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEngineDefaultClusterParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEngineDefaultClusterParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1839,7 +1799,6 @@ extension NeptuneClient { public func describeEngineDefaultParameters(input: DescribeEngineDefaultParametersInput) async throws -> DescribeEngineDefaultParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEngineDefaultParameters") @@ -1863,7 +1822,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEngineDefaultParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEngineDefaultParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEngineDefaultParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1879,7 +1838,6 @@ extension NeptuneClient { public func describeEventCategories(input: DescribeEventCategoriesInput) async throws -> DescribeEventCategoriesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEventCategories") @@ -1903,7 +1861,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventCategoriesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventCategoriesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventCategoriesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1924,7 +1882,6 @@ extension NeptuneClient { public func describeEventSubscriptions(input: DescribeEventSubscriptionsInput) async throws -> DescribeEventSubscriptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEventSubscriptions") @@ -1948,7 +1905,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventSubscriptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventSubscriptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventSubscriptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1964,7 +1921,6 @@ extension NeptuneClient { public func describeEvents(input: DescribeEventsInput) async throws -> DescribeEventsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEvents") @@ -1988,7 +1944,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2009,7 +1965,6 @@ extension NeptuneClient { public func describeGlobalClusters(input: DescribeGlobalClustersInput) async throws -> DescribeGlobalClustersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeGlobalClusters") @@ -2033,7 +1988,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeGlobalClustersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeGlobalClustersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeGlobalClustersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2049,7 +2004,6 @@ extension NeptuneClient { public func describeOrderableDBInstanceOptions(input: DescribeOrderableDBInstanceOptionsInput) async throws -> DescribeOrderableDBInstanceOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeOrderableDBInstanceOptions") @@ -2073,7 +2027,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeOrderableDBInstanceOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeOrderableDBInstanceOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeOrderableDBInstanceOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2094,7 +2048,6 @@ extension NeptuneClient { public func describePendingMaintenanceActions(input: DescribePendingMaintenanceActionsInput) async throws -> DescribePendingMaintenanceActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePendingMaintenanceActions") @@ -2118,7 +2071,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePendingMaintenanceActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePendingMaintenanceActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePendingMaintenanceActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2140,7 +2093,6 @@ extension NeptuneClient { public func describeValidDBInstanceModifications(input: DescribeValidDBInstanceModificationsInput) async throws -> DescribeValidDBInstanceModificationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeValidDBInstanceModifications") @@ -2164,7 +2116,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeValidDBInstanceModificationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeValidDBInstanceModificationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeValidDBInstanceModificationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2187,7 +2139,6 @@ extension NeptuneClient { public func failoverDBCluster(input: FailoverDBClusterInput) async throws -> FailoverDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "failoverDBCluster") @@ -2211,7 +2162,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(FailoverDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(FailoverDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(FailoverDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2235,7 +2186,6 @@ extension NeptuneClient { public func failoverGlobalCluster(input: FailoverGlobalClusterInput) async throws -> FailoverGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "failoverGlobalCluster") @@ -2259,7 +2209,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(FailoverGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(FailoverGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(FailoverGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2282,7 +2232,6 @@ extension NeptuneClient { public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -2306,7 +2255,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2338,7 +2287,6 @@ extension NeptuneClient { public func modifyDBCluster(input: ModifyDBClusterInput) async throws -> ModifyDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBCluster") @@ -2362,7 +2310,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2398,7 +2346,6 @@ extension NeptuneClient { public func modifyDBClusterEndpoint(input: ModifyDBClusterEndpointInput) async throws -> ModifyDBClusterEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBClusterEndpoint") @@ -2422,7 +2369,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2444,7 +2391,6 @@ extension NeptuneClient { public func modifyDBClusterParameterGroup(input: ModifyDBClusterParameterGroupInput) async throws -> ModifyDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBClusterParameterGroup") @@ -2468,7 +2414,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2491,7 +2437,6 @@ extension NeptuneClient { public func modifyDBClusterSnapshotAttribute(input: ModifyDBClusterSnapshotAttributeInput) async throws -> ModifyDBClusterSnapshotAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBClusterSnapshotAttribute") @@ -2515,7 +2460,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterSnapshotAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterSnapshotAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterSnapshotAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2551,7 +2496,6 @@ extension NeptuneClient { public func modifyDBInstance(input: ModifyDBInstanceInput) async throws -> ModifyDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBInstance") @@ -2575,7 +2519,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2597,7 +2541,6 @@ extension NeptuneClient { public func modifyDBParameterGroup(input: ModifyDBParameterGroupInput) async throws -> ModifyDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBParameterGroup") @@ -2621,7 +2564,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2646,7 +2589,6 @@ extension NeptuneClient { public func modifyDBSubnetGroup(input: ModifyDBSubnetGroupInput) async throws -> ModifyDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBSubnetGroup") @@ -2670,7 +2612,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2696,7 +2638,6 @@ extension NeptuneClient { public func modifyEventSubscription(input: ModifyEventSubscriptionInput) async throws -> ModifyEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyEventSubscription") @@ -2720,7 +2661,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2742,7 +2683,6 @@ extension NeptuneClient { public func modifyGlobalCluster(input: ModifyGlobalClusterInput) async throws -> ModifyGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyGlobalCluster") @@ -2766,7 +2706,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2788,7 +2728,6 @@ extension NeptuneClient { public func promoteReadReplicaDBCluster(input: PromoteReadReplicaDBClusterInput) async throws -> PromoteReadReplicaDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "promoteReadReplicaDBCluster") @@ -2812,7 +2751,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PromoteReadReplicaDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PromoteReadReplicaDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PromoteReadReplicaDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2834,7 +2773,6 @@ extension NeptuneClient { public func rebootDBInstance(input: RebootDBInstanceInput) async throws -> RebootDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebootDBInstance") @@ -2858,7 +2796,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebootDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebootDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebootDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2881,7 +2819,6 @@ extension NeptuneClient { public func removeFromGlobalCluster(input: RemoveFromGlobalClusterInput) async throws -> RemoveFromGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeFromGlobalCluster") @@ -2905,7 +2842,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveFromGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveFromGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveFromGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2928,7 +2865,6 @@ extension NeptuneClient { public func removeRoleFromDBCluster(input: RemoveRoleFromDBClusterInput) async throws -> RemoveRoleFromDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeRoleFromDBCluster") @@ -2952,7 +2888,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveRoleFromDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveRoleFromDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveRoleFromDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2974,7 +2910,6 @@ extension NeptuneClient { public func removeSourceIdentifierFromSubscription(input: RemoveSourceIdentifierFromSubscriptionInput) async throws -> RemoveSourceIdentifierFromSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeSourceIdentifierFromSubscription") @@ -2998,7 +2933,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveSourceIdentifierFromSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveSourceIdentifierFromSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveSourceIdentifierFromSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3021,7 +2956,6 @@ extension NeptuneClient { public func removeTagsFromResource(input: RemoveTagsFromResourceInput) async throws -> RemoveTagsFromResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeTagsFromResource") @@ -3045,7 +2979,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveTagsFromResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveTagsFromResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveTagsFromResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3067,7 +3001,6 @@ extension NeptuneClient { public func resetDBClusterParameterGroup(input: ResetDBClusterParameterGroupInput) async throws -> ResetDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetDBClusterParameterGroup") @@ -3091,7 +3024,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3113,7 +3046,6 @@ extension NeptuneClient { public func resetDBParameterGroup(input: ResetDBParameterGroupInput) async throws -> ResetDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetDBParameterGroup") @@ -3137,7 +3069,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3173,7 +3105,6 @@ extension NeptuneClient { public func restoreDBClusterFromSnapshot(input: RestoreDBClusterFromSnapshotInput) async throws -> RestoreDBClusterFromSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBClusterFromSnapshot") @@ -3197,7 +3128,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBClusterFromSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBClusterFromSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBClusterFromSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3234,7 +3165,6 @@ extension NeptuneClient { public func restoreDBClusterToPointInTime(input: RestoreDBClusterToPointInTimeInput) async throws -> RestoreDBClusterToPointInTimeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBClusterToPointInTime") @@ -3258,7 +3188,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBClusterToPointInTimeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBClusterToPointInTimeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBClusterToPointInTimeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3281,7 +3211,6 @@ extension NeptuneClient { public func startDBCluster(input: StartDBClusterInput) async throws -> StartDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startDBCluster") @@ -3305,7 +3234,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3328,7 +3257,6 @@ extension NeptuneClient { public func stopDBCluster(input: StopDBClusterInput) async throws -> StopDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopDBCluster") @@ -3352,7 +3280,7 @@ extension NeptuneClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSNeptune/models/Models.swift b/Sources/Services/AWSNeptune/models/Models.swift index ec2277270d5..6e78703146f 100644 --- a/Sources/Services/AWSNeptune/models/Models.swift +++ b/Sources/Services/AWSNeptune/models/Models.swift @@ -1,8 +1,16 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension AddRoleToDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case featureName = "FeatureName" + case roleArn = "RoleArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -48,32 +56,12 @@ public struct AddRoleToDBClusterInput: Swift.Equatable { } } -struct AddRoleToDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let roleArn: Swift.String? - let featureName: Swift.String? -} - -extension AddRoleToDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case featureName = "FeatureName" - case roleArn = "RoleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded - } -} +extension AddRoleToDBClusterOutput { -extension AddRoleToDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddRoleToDBClusterOutput() + } } } @@ -82,20 +70,32 @@ public struct AddRoleToDBClusterOutput: Swift.Equatable { public init() { } } -enum AddRoleToDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterRoleAlreadyExists": return try await DBClusterRoleAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterRoleQuotaExceeded": return try await DBClusterRoleQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddRoleToDBClusterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterRoleAlreadyExists": return try await DBClusterRoleAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterRoleQuotaExceeded": return try await DBClusterRoleQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddSourceIdentifierToSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceIdentifier = "SourceIdentifier" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceIdentifier = sourceIdentifier { @@ -142,34 +142,15 @@ public struct AddSourceIdentifierToSubscriptionInput: Swift.Equatable { } } -struct AddSourceIdentifierToSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let sourceIdentifier: Swift.String? -} - -extension AddSourceIdentifierToSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceIdentifier = "SourceIdentifier" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - } -} +extension AddSourceIdentifierToSubscriptionOutput { -extension AddSourceIdentifierToSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AddSourceIdentifierToSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AddSourceIdentifierToSubscriptionResult"] + var value = AddSourceIdentifierToSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: NeptuneClientTypes.EventSubscription.readingClosure) + return value } } } @@ -186,35 +167,30 @@ public struct AddSourceIdentifierToSubscriptionOutput: Swift.Equatable { } } -struct AddSourceIdentifierToSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: NeptuneClientTypes.EventSubscription? -} - -extension AddSourceIdentifierToSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AddSourceIdentifierToSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum AddSourceIdentifierToSubscriptionOutputError { -enum AddSourceIdentifierToSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddTagsToResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -262,61 +238,35 @@ public struct AddTagsToResourceInput: Swift.Equatable { } } -struct AddTagsToResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tags: [NeptuneClientTypes.Tag]? -} - -extension AddTagsToResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tags = "Tags" - } +extension AddTagsToResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddTagsToResourceOutput() } } } -extension AddTagsToResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct AddTagsToResourceOutput: Swift.Equatable { public init() { } } -enum AddTagsToResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddTagsToResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -354,6 +304,12 @@ extension NeptuneClientTypes { } extension ApplyPendingMaintenanceActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyAction = "ApplyAction" + case optInType = "OptInType" + case resourceIdentifier = "ResourceIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyAction = applyAction { @@ -406,38 +362,15 @@ public struct ApplyPendingMaintenanceActionInput: Swift.Equatable { } } -struct ApplyPendingMaintenanceActionInputBody: Swift.Equatable { - let resourceIdentifier: Swift.String? - let applyAction: Swift.String? - let optInType: Swift.String? -} - -extension ApplyPendingMaintenanceActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyAction = "ApplyAction" - case optInType = "OptInType" - case resourceIdentifier = "ResourceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - let applyActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyAction) - applyAction = applyActionDecoded - let optInTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optInType) - optInType = optInTypeDecoded - } -} +extension ApplyPendingMaintenanceActionOutput { -extension ApplyPendingMaintenanceActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ApplyPendingMaintenanceActionOutputBody = try responseDecoder.decode(responseBody: data) - self.resourcePendingMaintenanceActions = output.resourcePendingMaintenanceActions - } else { - self.resourcePendingMaintenanceActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ApplyPendingMaintenanceActionResult"] + var value = ApplyPendingMaintenanceActionOutput() + value.resourcePendingMaintenanceActions = try reader["ResourcePendingMaintenanceActions"].readIfPresent(readingClosure: NeptuneClientTypes.ResourcePendingMaintenanceActions.readingClosure) + return value } } } @@ -454,44 +387,32 @@ public struct ApplyPendingMaintenanceActionOutput: Swift.Equatable { } } -struct ApplyPendingMaintenanceActionOutputBody: Swift.Equatable { - let resourcePendingMaintenanceActions: NeptuneClientTypes.ResourcePendingMaintenanceActions? -} - -extension ApplyPendingMaintenanceActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourcePendingMaintenanceActions = "ResourcePendingMaintenanceActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ApplyPendingMaintenanceActionResult")) - let resourcePendingMaintenanceActionsDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ResourcePendingMaintenanceActions.self, forKey: .resourcePendingMaintenanceActions) - resourcePendingMaintenanceActions = resourcePendingMaintenanceActionsDecoded - } -} +enum ApplyPendingMaintenanceActionOutputError { -enum ApplyPendingMaintenanceActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AuthorizationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -520,23 +441,7 @@ public struct AuthorizationNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct AuthorizationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.AvailabilityZone: Swift.Codable { +extension NeptuneClientTypes.AvailabilityZone: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -548,10 +453,13 @@ extension NeptuneClientTypes.AvailabilityZone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.AvailabilityZone() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -572,16 +480,14 @@ extension NeptuneClientTypes { } extension CertificateNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CertificateNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -610,23 +516,7 @@ public struct CertificateNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct CertificateNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CertificateNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.CharacterSet: Swift.Codable { +extension NeptuneClientTypes.CharacterSet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case characterSetDescription = "CharacterSetDescription" case characterSetName = "CharacterSetName" @@ -642,12 +532,14 @@ extension NeptuneClientTypes.CharacterSet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let characterSetDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetDescription) - characterSetDescription = characterSetDescriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.CharacterSet() + value.characterSetName = try reader["CharacterSetName"].readIfPresent() + value.characterSetDescription = try reader["CharacterSetDescription"].readIfPresent() + return value + } } } @@ -671,7 +563,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.CloudwatchLogsExportConfiguration: Swift.Codable { +extension NeptuneClientTypes.CloudwatchLogsExportConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case disableLogTypes = "DisableLogTypes" case enableLogTypes = "EnableLogTypes" @@ -705,45 +597,13 @@ extension NeptuneClientTypes.CloudwatchLogsExportConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.enableLogTypes) { - struct KeyVal0{struct member{}} - let enableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableLogTypes) - if let enableLogTypesWrappedContainer = enableLogTypesWrappedContainer { - let enableLogTypesContainer = try enableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableLogTypesBuffer:[Swift.String]? = nil - if let enableLogTypesContainer = enableLogTypesContainer { - enableLogTypesBuffer = [Swift.String]() - for stringContainer0 in enableLogTypesContainer { - enableLogTypesBuffer?.append(stringContainer0) - } - } - enableLogTypes = enableLogTypesBuffer - } else { - enableLogTypes = [] - } - } else { - enableLogTypes = nil - } - if containerValues.contains(.disableLogTypes) { - struct KeyVal0{struct member{}} - let disableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .disableLogTypes) - if let disableLogTypesWrappedContainer = disableLogTypesWrappedContainer { - let disableLogTypesContainer = try disableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var disableLogTypesBuffer:[Swift.String]? = nil - if let disableLogTypesContainer = disableLogTypesContainer { - disableLogTypesBuffer = [Swift.String]() - for stringContainer0 in disableLogTypesContainer { - disableLogTypesBuffer?.append(stringContainer0) - } - } - disableLogTypes = disableLogTypesBuffer - } else { - disableLogTypes = [] - } - } else { - disableLogTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.CloudwatchLogsExportConfiguration() + value.enableLogTypes = try reader["EnableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.disableLogTypes = try reader["DisableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -768,7 +628,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.ClusterPendingModifiedValues: Swift.Codable { +extension NeptuneClientTypes.ClusterPendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case backupRetentionPeriod = "BackupRetentionPeriod" @@ -808,24 +668,20 @@ extension NeptuneClientTypes.ClusterPendingModifiedValues: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pendingCloudwatchLogsExportsDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.PendingCloudwatchLogsExports.self, forKey: .pendingCloudwatchLogsExports) - pendingCloudwatchLogsExports = pendingCloudwatchLogsExportsDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.ClusterPendingModifiedValues() + value.pendingCloudwatchLogsExports = try reader["PendingCloudwatchLogsExports"].readIfPresent(readingClosure: NeptuneClientTypes.PendingCloudwatchLogsExports.readingClosure) + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + return value + } } } @@ -874,6 +730,13 @@ extension NeptuneClientTypes { } extension CopyDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceDBClusterParameterGroupIdentifier = "SourceDBClusterParameterGroupIdentifier" + case tags = "Tags" + case targetDBClusterParameterGroupDescription = "TargetDBClusterParameterGroupDescription" + case targetDBClusterParameterGroupIdentifier = "TargetDBClusterParameterGroupIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceDBClusterParameterGroupIdentifier = sourceDBClusterParameterGroupIdentifier { @@ -953,59 +816,15 @@ public struct CopyDBClusterParameterGroupInput: Swift.Equatable { } } -struct CopyDBClusterParameterGroupInputBody: Swift.Equatable { - let sourceDBClusterParameterGroupIdentifier: Swift.String? - let targetDBClusterParameterGroupIdentifier: Swift.String? - let targetDBClusterParameterGroupDescription: Swift.String? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CopyDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceDBClusterParameterGroupIdentifier = "SourceDBClusterParameterGroupIdentifier" - case tags = "Tags" - case targetDBClusterParameterGroupDescription = "TargetDBClusterParameterGroupDescription" - case targetDBClusterParameterGroupIdentifier = "TargetDBClusterParameterGroupIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBClusterParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterParameterGroupIdentifier) - sourceDBClusterParameterGroupIdentifier = sourceDBClusterParameterGroupIdentifierDecoded - let targetDBClusterParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterParameterGroupIdentifier) - targetDBClusterParameterGroupIdentifier = targetDBClusterParameterGroupIdentifierDecoded - let targetDBClusterParameterGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterParameterGroupDescription) - targetDBClusterParameterGroupDescription = targetDBClusterParameterGroupDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CopyDBClusterParameterGroupOutput { -extension CopyDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroup = output.dbClusterParameterGroup - } else { - self.dbClusterParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBClusterParameterGroupResult"] + var value = CopyDBClusterParameterGroupOutput() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent(readingClosure: NeptuneClientTypes.DBClusterParameterGroup.readingClosure) + return value } } } @@ -1022,36 +841,35 @@ public struct CopyDBClusterParameterGroupOutput: Swift.Equatable { } } -struct CopyDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroup: NeptuneClientTypes.DBClusterParameterGroup? -} - -extension CopyDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroup = "DBClusterParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBClusterParameterGroupResult")) - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBClusterParameterGroup.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - } -} +enum CopyDBClusterParameterGroupOutputError { -enum CopyDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopyDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case copyTags = "CopyTags" + case kmsKeyId = "KmsKeyId" + case preSignedUrl = "PreSignedUrl" + case sourceDBClusterSnapshotIdentifier = "SourceDBClusterSnapshotIdentifier" + case tags = "Tags" + case targetDBClusterSnapshotIdentifier = "TargetDBClusterSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let copyTags = copyTags { @@ -1143,67 +961,15 @@ public struct CopyDBClusterSnapshotInput: Swift.Equatable { } } -struct CopyDBClusterSnapshotInputBody: Swift.Equatable { - let sourceDBClusterSnapshotIdentifier: Swift.String? - let targetDBClusterSnapshotIdentifier: Swift.String? - let kmsKeyId: Swift.String? - let preSignedUrl: Swift.String? - let copyTags: Swift.Bool? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CopyDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case copyTags = "CopyTags" - case kmsKeyId = "KmsKeyId" - case preSignedUrl = "PreSignedUrl" - case sourceDBClusterSnapshotIdentifier = "SourceDBClusterSnapshotIdentifier" - case tags = "Tags" - case targetDBClusterSnapshotIdentifier = "TargetDBClusterSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterSnapshotIdentifier) - sourceDBClusterSnapshotIdentifier = sourceDBClusterSnapshotIdentifierDecoded - let targetDBClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterSnapshotIdentifier) - targetDBClusterSnapshotIdentifier = targetDBClusterSnapshotIdentifierDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - let copyTagsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTags) - copyTags = copyTagsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CopyDBClusterSnapshotOutput { -extension CopyDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBClusterSnapshotResult"] + var value = CopyDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: NeptuneClientTypes.DBClusterSnapshot.readingClosure) + return value } } } @@ -1220,39 +986,36 @@ public struct CopyDBClusterSnapshotOutput: Swift.Equatable { } } -struct CopyDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: NeptuneClientTypes.DBClusterSnapshot? -} - -extension CopyDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded - } -} +enum CopyDBClusterSnapshotOutputError { -enum CopyDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopyDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceDBParameterGroupIdentifier = "SourceDBParameterGroupIdentifier" + case tags = "Tags" + case targetDBParameterGroupDescription = "TargetDBParameterGroupDescription" + case targetDBParameterGroupIdentifier = "TargetDBParameterGroupIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceDBParameterGroupIdentifier = sourceDBParameterGroupIdentifier { @@ -1330,59 +1093,15 @@ public struct CopyDBParameterGroupInput: Swift.Equatable { } } -struct CopyDBParameterGroupInputBody: Swift.Equatable { - let sourceDBParameterGroupIdentifier: Swift.String? - let targetDBParameterGroupIdentifier: Swift.String? - let targetDBParameterGroupDescription: Swift.String? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CopyDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceDBParameterGroupIdentifier = "SourceDBParameterGroupIdentifier" - case tags = "Tags" - case targetDBParameterGroupDescription = "TargetDBParameterGroupDescription" - case targetDBParameterGroupIdentifier = "TargetDBParameterGroupIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBParameterGroupIdentifier) - sourceDBParameterGroupIdentifier = sourceDBParameterGroupIdentifierDecoded - let targetDBParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBParameterGroupIdentifier) - targetDBParameterGroupIdentifier = targetDBParameterGroupIdentifierDecoded - let targetDBParameterGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBParameterGroupDescription) - targetDBParameterGroupDescription = targetDBParameterGroupDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CopyDBParameterGroupOutput { -extension CopyDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroup = output.dbParameterGroup - } else { - self.dbParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBParameterGroupResult"] + var value = CopyDBParameterGroupOutput() + value.dbParameterGroup = try reader["DBParameterGroup"].readIfPresent(readingClosure: NeptuneClientTypes.DBParameterGroup.readingClosure) + return value } } } @@ -1399,36 +1118,35 @@ public struct CopyDBParameterGroupOutput: Swift.Equatable { } } -struct CopyDBParameterGroupOutputBody: Swift.Equatable { - let dbParameterGroup: NeptuneClientTypes.DBParameterGroup? -} - -extension CopyDBParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroup = "DBParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBParameterGroupResult")) - let dbParameterGroupDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBParameterGroup.self, forKey: .dbParameterGroup) - dbParameterGroup = dbParameterGroupDecoded - } -} +enum CopyDBParameterGroupOutputError { -enum CopyDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" + case dbClusterIdentifier = "DBClusterIdentifier" + case endpointType = "EndpointType" + case excludedMembers = "ExcludedMembers" + case staticMembers = "StaticMembers" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterEndpointIdentifier = dbClusterEndpointIdentifier { @@ -1523,119 +1241,24 @@ public struct CreateDBClusterEndpointInput: Swift.Equatable { } } -struct CreateDBClusterEndpointInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointIdentifier: Swift.String? - let endpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CreateDBClusterEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - case tags = "Tags" - } +extension CreateDBClusterEndpointOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBClusterEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.customEndpointType = output.customEndpointType - self.dbClusterEndpointArn = output.dbClusterEndpointArn - self.dbClusterEndpointIdentifier = output.dbClusterEndpointIdentifier - self.dbClusterEndpointResourceIdentifier = output.dbClusterEndpointResourceIdentifier - self.dbClusterIdentifier = output.dbClusterIdentifier - self.endpoint = output.endpoint - self.endpointType = output.endpointType - self.excludedMembers = output.excludedMembers - self.staticMembers = output.staticMembers - self.status = output.status - } else { - self.customEndpointType = nil - self.dbClusterEndpointArn = nil - self.dbClusterEndpointIdentifier = nil - self.dbClusterEndpointResourceIdentifier = nil - self.dbClusterIdentifier = nil - self.endpoint = nil - self.endpointType = nil - self.excludedMembers = nil - self.staticMembers = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterEndpointResult"] + var value = CreateDBClusterEndpointOutput() + value.customEndpointType = try reader["CustomEndpointType"].readIfPresent() + value.dbClusterEndpointArn = try reader["DBClusterEndpointArn"].readIfPresent() + value.dbClusterEndpointIdentifier = try reader["DBClusterEndpointIdentifier"].readIfPresent() + value.dbClusterEndpointResourceIdentifier = try reader["DBClusterEndpointResourceIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.endpointType = try reader["EndpointType"].readIfPresent() + value.excludedMembers = try reader["ExcludedMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.staticMembers = try reader["StaticMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -1700,122 +1323,73 @@ public struct CreateDBClusterEndpointOutput: Swift.Equatable { } } -struct CreateDBClusterEndpointOutputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointResourceIdentifier: Swift.String? - let endpoint: Swift.String? - let status: Swift.String? - let endpointType: Swift.String? - let customEndpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? - let dbClusterEndpointArn: Swift.String? -} - -extension CreateDBClusterEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customEndpointType = "CustomEndpointType" - case dbClusterEndpointArn = "DBClusterEndpointArn" - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterEndpointResourceIdentifier = "DBClusterEndpointResourceIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case endpoint = "Endpoint" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - case status = "Status" - } +enum CreateDBClusterEndpointOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterEndpointResult")) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointResourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointResourceIdentifier) - dbClusterEndpointResourceIdentifier = dbClusterEndpointResourceIdentifierDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let customEndpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customEndpointType) - customEndpointType = customEndpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterEndpointAlreadyExistsFault": return try await DBClusterEndpointAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterEndpointQuotaExceededFault": return try await DBClusterEndpointQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - excludedMembers = nil - } - let dbClusterEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointArn) - dbClusterEndpointArn = dbClusterEndpointArnDecoded - } -} - -enum CreateDBClusterEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterEndpointAlreadyExistsFault": return try await DBClusterEndpointAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterEndpointQuotaExceededFault": return try await DBClusterEndpointQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension CreateDBClusterInput: Swift.Encodable { - public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let availabilityZones = availabilityZones { - if !availabilityZones.isEmpty { - var availabilityZonesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AvailabilityZones")) - for (index0, string0) in availabilityZones.enumerated() { - try availabilityZonesContainer.encode(string0, forKey: ClientRuntime.Key("AvailabilityZone.\(index0.advanced(by: 1))")) - } - } - else { - var availabilityZonesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AvailabilityZones")) - try availabilityZonesContainer.encode("", forKey: ClientRuntime.Key("")) - } + enum CodingKeys: Swift.String, Swift.CodingKey { + case availabilityZones = "AvailabilityZones" + case backupRetentionPeriod = "BackupRetentionPeriod" + case characterSetName = "CharacterSetName" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbSubnetGroupName = "DBSubnetGroupName" + case databaseName = "DatabaseName" + case deletionProtection = "DeletionProtection" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case engine = "Engine" + case engineVersion = "EngineVersion" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case kmsKeyId = "KmsKeyId" + case masterUserPassword = "MasterUserPassword" + case masterUsername = "MasterUsername" + case optionGroupName = "OptionGroupName" + case port = "Port" + case preSignedUrl = "PreSignedUrl" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case replicationSourceIdentifier = "ReplicationSourceIdentifier" + case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" + case storageEncrypted = "StorageEncrypted" + case storageType = "StorageType" + case tags = "Tags" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + + public func encode(to encoder: Swift.Encoder) throws { + var container = encoder.container(keyedBy: ClientRuntime.Key.self) + if let availabilityZones = availabilityZones { + if !availabilityZones.isEmpty { + var availabilityZonesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AvailabilityZones")) + for (index0, string0) in availabilityZones.enumerated() { + try availabilityZonesContainer.encode(string0, forKey: ClientRuntime.Key("AvailabilityZone.\(index0.advanced(by: 1))")) + } + } + else { + var availabilityZonesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AvailabilityZones")) + try availabilityZonesContainer.encode("", forKey: ClientRuntime.Key("")) + } } if let backupRetentionPeriod = backupRetentionPeriod { try container.encode(backupRetentionPeriod, forKey: ClientRuntime.Key("BackupRetentionPeriod")) @@ -2097,206 +1671,15 @@ public struct CreateDBClusterInput: Swift.Equatable { } } -struct CreateDBClusterInputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let backupRetentionPeriod: Swift.Int? - let characterSetName: Swift.String? - let copyTagsToSnapshot: Swift.Bool? - let databaseName: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterParameterGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let dbSubnetGroupName: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let port: Swift.Int? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let optionGroupName: Swift.String? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let replicationSourceIdentifier: Swift.String? - let tags: [NeptuneClientTypes.Tag]? - let storageEncrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let preSignedUrl: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enableCloudwatchLogsExports: [Swift.String]? - let deletionProtection: Swift.Bool? - let serverlessV2ScalingConfiguration: NeptuneClientTypes.ServerlessV2ScalingConfiguration? - let globalClusterIdentifier: Swift.String? - let storageType: Swift.String? -} - -extension CreateDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - case backupRetentionPeriod = "BackupRetentionPeriod" - case characterSetName = "CharacterSetName" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case databaseName = "DatabaseName" - case deletionProtection = "DeletionProtection" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case engine = "Engine" - case engineVersion = "EngineVersion" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case kmsKeyId = "KmsKeyId" - case masterUserPassword = "MasterUserPassword" - case masterUsername = "MasterUsername" - case optionGroupName = "OptionGroupName" - case port = "Port" - case preSignedUrl = "PreSignedUrl" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case replicationSourceIdentifier = "ReplicationSourceIdentifier" - case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case storageEncrypted = "StorageEncrypted" - case storageType = "StorageType" - case tags = "Tags" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let replicationSourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationSourceIdentifier) - replicationSourceIdentifier = replicationSourceIdentifierDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - } -} +extension CreateDBClusterOutput { -extension CreateDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterResult"] + var value = CreateDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -2313,50 +1696,47 @@ public struct CreateDBClusterOutput: Swift.Equatable { } } -struct CreateDBClusterOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension CreateDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum CreateDBClusterOutputError { -enum CreateDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbParameterGroupFamily = "DBParameterGroupFamily" + case description = "Description" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -2424,59 +1804,15 @@ public struct CreateDBClusterParameterGroupInput: Swift.Equatable { } } -struct CreateDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let dbParameterGroupFamily: Swift.String? - let description: Swift.String? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CreateDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbParameterGroupFamily = "DBParameterGroupFamily" - case description = "Description" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateDBClusterParameterGroupOutput { -extension CreateDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroup = output.dbClusterParameterGroup - } else { - self.dbClusterParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterParameterGroupResult"] + var value = CreateDBClusterParameterGroupOutput() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent(readingClosure: NeptuneClientTypes.DBClusterParameterGroup.readingClosure) + return value } } } @@ -2493,35 +1829,31 @@ public struct CreateDBClusterParameterGroupOutput: Swift.Equatable { } } -struct CreateDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroup: NeptuneClientTypes.DBClusterParameterGroup? -} - -extension CreateDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroup = "DBClusterParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterParameterGroupResult")) - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBClusterParameterGroup.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - } -} +enum CreateDBClusterParameterGroupOutputError { -enum CreateDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -2590,55 +1922,15 @@ public struct CreateDBClusterSnapshotInput: Swift.Equatable { } } -struct CreateDBClusterSnapshotInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CreateDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateDBClusterSnapshotOutput { -extension CreateDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterSnapshotResult"] + var value = CreateDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: NeptuneClientTypes.DBClusterSnapshot.readingClosure) + return value } } } @@ -2655,33 +1947,23 @@ public struct CreateDBClusterSnapshotOutput: Swift.Equatable { } } -struct CreateDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: NeptuneClientTypes.DBClusterSnapshot? -} - -extension CreateDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded - } -} +enum CreateDBClusterSnapshotOutputError { -enum CreateDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -2692,6 +1974,52 @@ extension CreateDBInstanceInput: Swift.CustomDebugStringConvertible { } extension CreateDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allocatedStorage = "AllocatedStorage" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case availabilityZone = "AvailabilityZone" + case backupRetentionPeriod = "BackupRetentionPeriod" + case characterSetName = "CharacterSetName" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbInstanceClass = "DBInstanceClass" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbName = "DBName" + case dbParameterGroupName = "DBParameterGroupName" + case dbSecurityGroups = "DBSecurityGroups" + case dbSubnetGroupName = "DBSubnetGroupName" + case deletionProtection = "DeletionProtection" + case domain = "Domain" + case domainIAMRoleName = "DomainIAMRoleName" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enablePerformanceInsights = "EnablePerformanceInsights" + case engine = "Engine" + case engineVersion = "EngineVersion" + case iops = "Iops" + case kmsKeyId = "KmsKeyId" + case licenseModel = "LicenseModel" + case masterUserPassword = "MasterUserPassword" + case masterUsername = "MasterUsername" + case monitoringInterval = "MonitoringInterval" + case monitoringRoleArn = "MonitoringRoleArn" + case multiAZ = "MultiAZ" + case optionGroupName = "OptionGroupName" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case port = "Port" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case promotionTier = "PromotionTier" + case publiclyAccessible = "PubliclyAccessible" + case storageEncrypted = "StorageEncrypted" + case storageType = "StorageType" + case tags = "Tags" + case tdeCredentialArn = "TdeCredentialArn" + case tdeCredentialPassword = "TdeCredentialPassword" + case timezone = "Timezone" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -3075,266 +2403,15 @@ public struct CreateDBInstanceInput: Swift.Equatable { } } -struct CreateDBInstanceInputBody: Swift.Equatable { - let dbName: Swift.String? - let dbInstanceIdentifier: Swift.String? - let allocatedStorage: Swift.Int? - let dbInstanceClass: Swift.String? - let engine: Swift.String? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let dbSecurityGroups: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let availabilityZone: Swift.String? - let dbSubnetGroupName: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let dbParameterGroupName: Swift.String? - let backupRetentionPeriod: Swift.Int? - let preferredBackupWindow: Swift.String? - let port: Swift.Int? - let multiAZ: Swift.Bool? - let engineVersion: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let licenseModel: Swift.String? - let iops: Swift.Int? - let optionGroupName: Swift.String? - let characterSetName: Swift.String? - let publiclyAccessible: Swift.Bool? - let tags: [NeptuneClientTypes.Tag]? - let dbClusterIdentifier: Swift.String? - let storageType: Swift.String? - let tdeCredentialArn: Swift.String? - let tdeCredentialPassword: Swift.String? - let storageEncrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let domain: Swift.String? - let copyTagsToSnapshot: Swift.Bool? - let monitoringInterval: Swift.Int? - let monitoringRoleArn: Swift.String? - let domainIAMRoleName: Swift.String? - let promotionTier: Swift.Int? - let timezone: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let enableCloudwatchLogsExports: [Swift.String]? - let deletionProtection: Swift.Bool? -} - -extension CreateDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocatedStorage = "AllocatedStorage" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case availabilityZone = "AvailabilityZone" - case backupRetentionPeriod = "BackupRetentionPeriod" - case characterSetName = "CharacterSetName" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbInstanceClass = "DBInstanceClass" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbName = "DBName" - case dbParameterGroupName = "DBParameterGroupName" - case dbSecurityGroups = "DBSecurityGroups" - case dbSubnetGroupName = "DBSubnetGroupName" - case deletionProtection = "DeletionProtection" - case domain = "Domain" - case domainIAMRoleName = "DomainIAMRoleName" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case enablePerformanceInsights = "EnablePerformanceInsights" - case engine = "Engine" - case engineVersion = "EngineVersion" - case iops = "Iops" - case kmsKeyId = "KmsKeyId" - case licenseModel = "LicenseModel" - case masterUserPassword = "MasterUserPassword" - case masterUsername = "MasterUsername" - case monitoringInterval = "MonitoringInterval" - case monitoringRoleArn = "MonitoringRoleArn" - case multiAZ = "MultiAZ" - case optionGroupName = "OptionGroupName" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case port = "Port" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case promotionTier = "PromotionTier" - case publiclyAccessible = "PubliclyAccessible" - case storageEncrypted = "StorageEncrypted" - case storageType = "StorageType" - case tags = "Tags" - case tdeCredentialArn = "TdeCredentialArn" - case tdeCredentialPassword = "TdeCredentialPassword" - case timezone = "Timezone" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - if containerValues.contains(.dbSecurityGroups) { - struct KeyVal0{struct DBSecurityGroupName{}} - let dbSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroups) - if let dbSecurityGroupsWrappedContainer = dbSecurityGroupsWrappedContainer { - let dbSecurityGroupsContainer = try dbSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbSecurityGroupsBuffer:[Swift.String]? = nil - if let dbSecurityGroupsContainer = dbSecurityGroupsContainer { - dbSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in dbSecurityGroupsContainer { - dbSecurityGroupsBuffer?.append(stringContainer0) - } - } - dbSecurityGroups = dbSecurityGroupsBuffer - } else { - dbSecurityGroups = [] - } - } else { - dbSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let tdeCredentialPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialPassword) - tdeCredentialPassword = tdeCredentialPasswordDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let timezoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezone) - timezone = timezoneDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - } -} +extension CreateDBInstanceOutput { -extension CreateDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBInstanceResult"] + var value = CreateDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: NeptuneClientTypes.DBInstance.readingClosure) + return value } } } @@ -3351,51 +2428,48 @@ public struct CreateDBInstanceOutput: Swift.Equatable { } } -struct CreateDBInstanceOutputBody: Swift.Equatable { - let dbInstance: NeptuneClientTypes.DBInstance? -} - -extension CreateDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } +enum CreateDBInstanceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum CreateDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case dbParameterGroupName = "DBParameterGroupName" + case description = "Description" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -3467,59 +2541,15 @@ public struct CreateDBParameterGroupInput: Swift.Equatable { } } -struct CreateDBParameterGroupInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let dbParameterGroupFamily: Swift.String? - let description: Swift.String? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CreateDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case dbParameterGroupName = "DBParameterGroupName" - case description = "Description" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateDBParameterGroupOutput { -extension CreateDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroup = output.dbParameterGroup - } else { - self.dbParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBParameterGroupResult"] + var value = CreateDBParameterGroupOutput() + value.dbParameterGroup = try reader["DBParameterGroup"].readIfPresent(readingClosure: NeptuneClientTypes.DBParameterGroup.readingClosure) + return value } } } @@ -3536,35 +2566,32 @@ public struct CreateDBParameterGroupOutput: Swift.Equatable { } } -struct CreateDBParameterGroupOutputBody: Swift.Equatable { - let dbParameterGroup: NeptuneClientTypes.DBParameterGroup? -} - -extension CreateDBParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroup = "DBParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBParameterGroupResult")) - let dbParameterGroupDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBParameterGroup.self, forKey: .dbParameterGroup) - dbParameterGroup = dbParameterGroupDecoded - } -} +enum CreateDBParameterGroupOutputError { -enum CreateDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupDescription = "DBSubnetGroupDescription" + case dbSubnetGroupName = "DBSubnetGroupName" + case subnetIds = "SubnetIds" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupDescription = dbSubnetGroupDescription { @@ -3636,76 +2663,15 @@ public struct CreateDBSubnetGroupInput: Swift.Equatable { } } -struct CreateDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let dbSubnetGroupDescription: Swift.String? - let subnetIds: [Swift.String]? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CreateDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupDescription = "DBSubnetGroupDescription" - case dbSubnetGroupName = "DBSubnetGroupName" - case subnetIds = "SubnetIds" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateDBSubnetGroupOutput { -extension CreateDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroup = output.dbSubnetGroup - } else { - self.dbSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBSubnetGroupResult"] + var value = CreateDBSubnetGroupOutput() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: NeptuneClientTypes.DBSubnetGroup.readingClosure) + return value } } } @@ -3722,38 +2688,38 @@ public struct CreateDBSubnetGroupOutput: Swift.Equatable { } } -struct CreateDBSubnetGroupOutputBody: Swift.Equatable { - let dbSubnetGroup: NeptuneClientTypes.DBSubnetGroup? -} - -extension CreateDBSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroup = "DBSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBSubnetGroupResult")) - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - } -} +enum CreateDBSubnetGroupOutputError { -enum CreateDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupAlreadyExists": return try await DBSubnetGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupQuotaExceeded": return try await DBSubnetGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupAlreadyExists": return try await DBSubnetGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupQuotaExceeded": return try await DBSubnetGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case eventCategories = "EventCategories" + case snsTopicArn = "SnsTopicArn" + case sourceIds = "SourceIds" + case sourceType = "SourceType" + case subscriptionName = "SubscriptionName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -3864,105 +2830,15 @@ public struct CreateEventSubscriptionInput: Swift.Equatable { } } -struct CreateEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let snsTopicArn: Swift.String? - let sourceType: Swift.String? - let eventCategories: [Swift.String]? - let sourceIds: [Swift.String]? - let enabled: Swift.Bool? - let tags: [NeptuneClientTypes.Tag]? -} - -extension CreateEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case eventCategories = "EventCategories" - case snsTopicArn = "SnsTopicArn" - case sourceIds = "SourceIds" - case sourceType = "SourceType" - case subscriptionName = "SubscriptionName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - if containerValues.contains(.sourceIds) { - struct KeyVal0{struct SourceId{}} - let sourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIds) - if let sourceIdsWrappedContainer = sourceIdsWrappedContainer { - let sourceIdsContainer = try sourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsBuffer:[Swift.String]? = nil - if let sourceIdsContainer = sourceIdsContainer { - sourceIdsBuffer = [Swift.String]() - for stringContainer0 in sourceIdsContainer { - sourceIdsBuffer?.append(stringContainer0) - } - } - sourceIds = sourceIdsBuffer - } else { - sourceIds = [] - } - } else { - sourceIds = nil - } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateEventSubscriptionOutput { -extension CreateEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateEventSubscriptionResult"] + var value = CreateEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: NeptuneClientTypes.EventSubscription.readingClosure) + return value } } } @@ -3979,40 +2855,39 @@ public struct CreateEventSubscriptionOutput: Swift.Equatable { } } -struct CreateEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: NeptuneClientTypes.EventSubscription? -} - -extension CreateEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum CreateEventSubscriptionOutputError { -enum CreateEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSInvalidTopic": return try await SNSInvalidTopicFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSNoAuthorization": return try await SNSNoAuthorizationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionAlreadyExist": return try await SubscriptionAlreadyExistFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSInvalidTopic": return try await SNSInvalidTopicFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSNoAuthorization": return try await SNSNoAuthorizationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionAlreadyExist": return try await SubscriptionAlreadyExistFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case deletionProtection = "DeletionProtection" + case engine = "Engine" + case engineVersion = "EngineVersion" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" + case storageEncrypted = "StorageEncrypted" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let deletionProtection = deletionProtection { @@ -4078,50 +2953,15 @@ public struct CreateGlobalClusterInput: Swift.Equatable { } } -struct CreateGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let sourceDBClusterIdentifier: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let deletionProtection: Swift.Bool? - let storageEncrypted: Swift.Bool? -} - -extension CreateGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deletionProtection = "DeletionProtection" - case engine = "Engine" - case engineVersion = "EngineVersion" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" - case storageEncrypted = "StorageEncrypted" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let sourceDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterIdentifier) - sourceDBClusterIdentifier = sourceDBClusterIdentifierDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - } -} +extension CreateGlobalClusterOutput { -extension CreateGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateGlobalClusterResult"] + var value = CreateGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: NeptuneClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -4138,37 +2978,27 @@ public struct CreateGlobalClusterOutput: Swift.Equatable { } } -struct CreateGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: NeptuneClientTypes.GlobalCluster? -} - -extension CreateGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum CreateGlobalClusterOutputError { -enum CreateGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterAlreadyExistsFault": return try await GlobalClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterQuotaExceededFault": return try await GlobalClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterAlreadyExistsFault": return try await GlobalClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterQuotaExceededFault": return try await GlobalClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension NeptuneClientTypes.DBCluster: Swift.Codable { +extension NeptuneClientTypes.DBCluster: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case associatedRoles = "AssociatedRoles" @@ -4419,217 +3249,57 @@ extension NeptuneClientTypes.DBCluster: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let earliestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .earliestRestorableTime) - earliestRestorableTime = earliestRestorableTimeDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let readerEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .readerEndpoint) - readerEndpoint = readerEndpointDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let latestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestRestorableTime) - latestRestorableTime = latestRestorableTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - if containerValues.contains(.dbClusterOptionGroupMemberships) { - struct KeyVal0{struct DBClusterOptionGroup{}} - let dbClusterOptionGroupMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterOptionGroupMemberships) - if let dbClusterOptionGroupMembershipsWrappedContainer = dbClusterOptionGroupMembershipsWrappedContainer { - let dbClusterOptionGroupMembershipsContainer = try dbClusterOptionGroupMembershipsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBClusterOptionGroupStatus].self, forKey: .member) - var dbClusterOptionGroupMembershipsBuffer:[NeptuneClientTypes.DBClusterOptionGroupStatus]? = nil - if let dbClusterOptionGroupMembershipsContainer = dbClusterOptionGroupMembershipsContainer { - dbClusterOptionGroupMembershipsBuffer = [NeptuneClientTypes.DBClusterOptionGroupStatus]() - for structureContainer0 in dbClusterOptionGroupMembershipsContainer { - dbClusterOptionGroupMembershipsBuffer?.append(structureContainer0) - } - } - dbClusterOptionGroupMemberships = dbClusterOptionGroupMembershipsBuffer - } else { - dbClusterOptionGroupMemberships = [] - } - } else { - dbClusterOptionGroupMemberships = nil - } - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let replicationSourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationSourceIdentifier) - replicationSourceIdentifier = replicationSourceIdentifierDecoded - if containerValues.contains(.readReplicaIdentifiers) { - struct KeyVal0{struct ReadReplicaIdentifier{}} - let readReplicaIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readReplicaIdentifiers) - if let readReplicaIdentifiersWrappedContainer = readReplicaIdentifiersWrappedContainer { - let readReplicaIdentifiersContainer = try readReplicaIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readReplicaIdentifiersBuffer:[Swift.String]? = nil - if let readReplicaIdentifiersContainer = readReplicaIdentifiersContainer { - readReplicaIdentifiersBuffer = [Swift.String]() - for stringContainer0 in readReplicaIdentifiersContainer { - readReplicaIdentifiersBuffer?.append(stringContainer0) - } - } - readReplicaIdentifiers = readReplicaIdentifiersBuffer - } else { - readReplicaIdentifiers = [] - } - } else { - readReplicaIdentifiers = nil - } - if containerValues.contains(.dbClusterMembers) { - struct KeyVal0{struct DBClusterMember{}} - let dbClusterMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterMembers) - if let dbClusterMembersWrappedContainer = dbClusterMembersWrappedContainer { - let dbClusterMembersContainer = try dbClusterMembersWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBClusterMember].self, forKey: .member) - var dbClusterMembersBuffer:[NeptuneClientTypes.DBClusterMember]? = nil - if let dbClusterMembersContainer = dbClusterMembersContainer { - dbClusterMembersBuffer = [NeptuneClientTypes.DBClusterMember]() - for structureContainer0 in dbClusterMembersContainer { - dbClusterMembersBuffer?.append(structureContainer0) - } - } - dbClusterMembers = dbClusterMembersBuffer - } else { - dbClusterMembers = [] - } - } else { - dbClusterMembers = nil - } - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroupMembership{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([NeptuneClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[NeptuneClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [NeptuneClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] - } - } else { - vpcSecurityGroups = nil - } - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterResourceId) - dbClusterResourceId = dbClusterResourceIdDecoded - let dbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterArn) - dbClusterArn = dbClusterArnDecoded - if containerValues.contains(.associatedRoles) { - struct KeyVal0{struct DBClusterRole{}} - let associatedRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedRoles) - if let associatedRolesWrappedContainer = associatedRolesWrappedContainer { - let associatedRolesContainer = try associatedRolesWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBClusterRole].self, forKey: .member) - var associatedRolesBuffer:[NeptuneClientTypes.DBClusterRole]? = nil - if let associatedRolesContainer = associatedRolesContainer { - associatedRolesBuffer = [NeptuneClientTypes.DBClusterRole]() - for structureContainer0 in associatedRolesContainer { - associatedRolesBuffer?.append(structureContainer0) - } - } - associatedRoles = associatedRolesBuffer - } else { - associatedRoles = [] - } - } else { - associatedRoles = nil - } - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let cloneGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloneGroupId) - cloneGroupId = cloneGroupIdDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - if containerValues.contains(.enabledCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enabledCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enabledCloudwatchLogsExports) - if let enabledCloudwatchLogsExportsWrappedContainer = enabledCloudwatchLogsExportsWrappedContainer { - let enabledCloudwatchLogsExportsContainer = try enabledCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enabledCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enabledCloudwatchLogsExportsContainer = enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enabledCloudwatchLogsExports = enabledCloudwatchLogsExportsBuffer - } else { - enabledCloudwatchLogsExports = [] - } - } else { - enabledCloudwatchLogsExports = nil - } - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ClusterPendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let crossAccountCloneDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .crossAccountClone) - crossAccountClone = crossAccountCloneDecoded - let automaticRestartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .automaticRestartTime) - automaticRestartTime = automaticRestartTimeDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ServerlessV2ScalingConfigurationInfo.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let ioOptimizedNextAllowedModificationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .ioOptimizedNextAllowedModificationTime) - ioOptimizedNextAllowedModificationTime = ioOptimizedNextAllowedModificationTimeDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBCluster() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.characterSetName = try reader["CharacterSetName"].readIfPresent() + value.databaseName = try reader["DatabaseName"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.earliestRestorableTime = try reader["EarliestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.endpoint = try reader["Endpoint"].readIfPresent() + value.readerEndpoint = try reader["ReaderEndpoint"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.latestRestorableTime = try reader["LatestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.port = try reader["Port"].readIfPresent() + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.dbClusterOptionGroupMemberships = try reader["DBClusterOptionGroupMemberships"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBClusterOptionGroupStatus.readingClosure, memberNodeInfo: "DBClusterOptionGroup", isFlattened: false) + value.preferredBackupWindow = try reader["PreferredBackupWindow"].readIfPresent() + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.replicationSourceIdentifier = try reader["ReplicationSourceIdentifier"].readIfPresent() + value.readReplicaIdentifiers = try reader["ReadReplicaIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ReadReplicaIdentifier", isFlattened: false) + value.dbClusterMembers = try reader["DBClusterMembers"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBClusterMember.readingClosure, memberNodeInfo: "DBClusterMember", isFlattened: false) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroupMembership", isFlattened: false) + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbClusterResourceId = try reader["DbClusterResourceId"].readIfPresent() + value.dbClusterArn = try reader["DBClusterArn"].readIfPresent() + value.associatedRoles = try reader["AssociatedRoles"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBClusterRole.readingClosure, memberNodeInfo: "DBClusterRole", isFlattened: false) + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.cloneGroupId = try reader["CloneGroupId"].readIfPresent() + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.copyTagsToSnapshot = try reader["CopyTagsToSnapshot"].readIfPresent() + value.enabledCloudwatchLogsExports = try reader["EnabledCloudwatchLogsExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: NeptuneClientTypes.ClusterPendingModifiedValues.readingClosure) + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + value.crossAccountClone = try reader["CrossAccountClone"].readIfPresent() + value.automaticRestartTime = try reader["AutomaticRestartTime"].readTimestampIfPresent(format: .dateTime) + value.serverlessV2ScalingConfiguration = try reader["ServerlessV2ScalingConfiguration"].readIfPresent(readingClosure: NeptuneClientTypes.ServerlessV2ScalingConfigurationInfo.readingClosure) + value.globalClusterIdentifier = try reader["GlobalClusterIdentifier"].readIfPresent() + value.ioOptimizedNextAllowedModificationTime = try reader["IOOptimizedNextAllowedModificationTime"].readTimestampIfPresent(format: .dateTime) + value.storageType = try reader["StorageType"].readIfPresent() + return value + } } } @@ -4826,16 +3496,14 @@ extension NeptuneClientTypes { } extension DBClusterAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4864,23 +3532,7 @@ public struct DBClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSClient } } -struct DBClusterAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBClusterEndpoint: Swift.Codable { +extension NeptuneClientTypes.DBClusterEndpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case customEndpointType = "CustomEndpointType" case dbClusterEndpointArn = "DBClusterEndpointArn" @@ -4946,62 +3598,22 @@ extension NeptuneClientTypes.DBClusterEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointResourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointResourceIdentifier) - dbClusterEndpointResourceIdentifier = dbClusterEndpointResourceIdentifierDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let customEndpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customEndpointType) - customEndpointType = customEndpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBClusterEndpoint() + value.dbClusterEndpointIdentifier = try reader["DBClusterEndpointIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.dbClusterEndpointResourceIdentifier = try reader["DBClusterEndpointResourceIdentifier"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.endpointType = try reader["EndpointType"].readIfPresent() + value.customEndpointType = try reader["CustomEndpointType"].readIfPresent() + value.staticMembers = try reader["StaticMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.excludedMembers = try reader["ExcludedMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.dbClusterEndpointArn = try reader["DBClusterEndpointArn"].readIfPresent() + return value } - let dbClusterEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointArn) - dbClusterEndpointArn = dbClusterEndpointArnDecoded } } @@ -5069,16 +3681,14 @@ extension NeptuneClientTypes { } extension DBClusterEndpointAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterEndpointAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5107,33 +3717,15 @@ public struct DBClusterEndpointAlreadyExistsFault: ClientRuntime.ModeledError, A } } -struct DBClusterEndpointAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterEndpointAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterEndpointNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterEndpointNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5162,33 +3754,15 @@ public struct DBClusterEndpointNotFoundFault: ClientRuntime.ModeledError, AWSCli } } -struct DBClusterEndpointNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterEndpointNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterEndpointQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterEndpointQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5217,23 +3791,7 @@ public struct DBClusterEndpointQuotaExceededFault: ClientRuntime.ModeledError, A } } -struct DBClusterEndpointQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterEndpointQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBClusterMember: Swift.Codable { +extension NeptuneClientTypes.DBClusterMember: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterParameterGroupStatus = "DBClusterParameterGroupStatus" case dbInstanceIdentifier = "DBInstanceIdentifier" @@ -5257,16 +3815,16 @@ extension NeptuneClientTypes.DBClusterMember: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let isClusterWriterDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isClusterWriter) - isClusterWriter = isClusterWriterDecoded - let dbClusterParameterGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupStatus) - dbClusterParameterGroupStatus = dbClusterParameterGroupStatusDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBClusterMember() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.isClusterWriter = try reader["IsClusterWriter"].readIfPresent() + value.dbClusterParameterGroupStatus = try reader["DBClusterParameterGroupStatus"].readIfPresent() + value.promotionTier = try reader["PromotionTier"].readIfPresent() + return value + } } } @@ -5299,16 +3857,14 @@ extension NeptuneClientTypes { } extension DBClusterNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5337,23 +3893,7 @@ public struct DBClusterNotFoundFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct DBClusterNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBClusterOptionGroupStatus: Swift.Codable { +extension NeptuneClientTypes.DBClusterOptionGroupStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterOptionGroupName = "DBClusterOptionGroupName" case status = "Status" @@ -5369,12 +3909,14 @@ extension NeptuneClientTypes.DBClusterOptionGroupStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterOptionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterOptionGroupName) - dbClusterOptionGroupName = dbClusterOptionGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBClusterOptionGroupStatus() + value.dbClusterOptionGroupName = try reader["DBClusterOptionGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -5398,7 +3940,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.DBClusterParameterGroup: Swift.Codable { +extension NeptuneClientTypes.DBClusterParameterGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterParameterGroupArn = "DBClusterParameterGroupArn" case dbClusterParameterGroupName = "DBClusterParameterGroupName" @@ -5422,16 +3964,16 @@ extension NeptuneClientTypes.DBClusterParameterGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dbClusterParameterGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupArn) - dbClusterParameterGroupArn = dbClusterParameterGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBClusterParameterGroup() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.dbClusterParameterGroupArn = try reader["DBClusterParameterGroupArn"].readIfPresent() + return value + } } } @@ -5464,16 +4006,14 @@ extension NeptuneClientTypes { } extension DBClusterParameterGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterParameterGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5502,33 +4042,15 @@ public struct DBClusterParameterGroupNotFoundFault: ClientRuntime.ModeledError, } } -struct DBClusterParameterGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterParameterGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5557,23 +4079,7 @@ public struct DBClusterQuotaExceededFault: ClientRuntime.ModeledError, AWSClient } } -struct DBClusterQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBClusterRole: Swift.Codable { +extension NeptuneClientTypes.DBClusterRole: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case featureName = "FeatureName" case roleArn = "RoleArn" @@ -5593,14 +4099,15 @@ extension NeptuneClientTypes.DBClusterRole: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBClusterRole() + value.roleArn = try reader["RoleArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.featureName = try reader["FeatureName"].readIfPresent() + return value + } } } @@ -5635,16 +4142,14 @@ extension NeptuneClientTypes { } extension DBClusterRoleAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterRoleAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5673,33 +4178,15 @@ public struct DBClusterRoleAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct DBClusterRoleAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterRoleAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterRoleNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterRoleNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5728,33 +4215,15 @@ public struct DBClusterRoleNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBClusterRoleNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterRoleNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterRoleQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterRoleQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5783,23 +4252,7 @@ public struct DBClusterRoleQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct DBClusterRoleQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterRoleQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBClusterSnapshot: Swift.Codable { +extension NeptuneClientTypes.DBClusterSnapshot: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case availabilityZones = "AvailabilityZones" @@ -5900,67 +4353,33 @@ extension NeptuneClientTypes.DBClusterSnapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let snapshotCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotCreateTime) - snapshotCreateTime = snapshotCreateTimeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbClusterSnapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotArn) - dbClusterSnapshotArn = dbClusterSnapshotArnDecoded - let sourceDBClusterSnapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterSnapshotArn) - sourceDBClusterSnapshotArn = sourceDBClusterSnapshotArnDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBClusterSnapshot() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.dbClusterSnapshotIdentifier = try reader["DBClusterSnapshotIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.snapshotCreateTime = try reader["SnapshotCreateTime"].readTimestampIfPresent(format: .dateTime) + value.engine = try reader["Engine"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.snapshotType = try reader["SnapshotType"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbClusterSnapshotArn = try reader["DBClusterSnapshotArn"].readIfPresent() + value.sourceDBClusterSnapshotArn = try reader["SourceDBClusterSnapshotArn"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + return value + } } } @@ -6061,16 +4480,14 @@ extension NeptuneClientTypes { } extension DBClusterSnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterSnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6099,23 +4516,7 @@ public struct DBClusterSnapshotAlreadyExistsFault: ClientRuntime.ModeledError, A } } -struct DBClusterSnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterSnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBClusterSnapshotAttribute: Swift.Codable { +extension NeptuneClientTypes.DBClusterSnapshotAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeName = "AttributeName" case attributeValues = "AttributeValues" @@ -6140,28 +4541,13 @@ extension NeptuneClientTypes.DBClusterSnapshotAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.attributeValues) { - struct KeyVal0{struct AttributeValue{}} - let attributeValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeValues) - if let attributeValuesWrappedContainer = attributeValuesWrappedContainer { - let attributeValuesContainer = try attributeValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var attributeValuesBuffer:[Swift.String]? = nil - if let attributeValuesContainer = attributeValuesContainer { - attributeValuesBuffer = [Swift.String]() - for stringContainer0 in attributeValuesContainer { - attributeValuesBuffer?.append(stringContainer0) - } - } - attributeValues = attributeValuesBuffer - } else { - attributeValues = [] - } - } else { - attributeValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBClusterSnapshotAttribute() + value.attributeName = try reader["AttributeName"].readIfPresent() + value.attributeValues = try reader["AttributeValues"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AttributeValue", isFlattened: false) + return value } } } @@ -6186,7 +4572,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.DBClusterSnapshotAttributesResult: Swift.Codable { +extension NeptuneClientTypes.DBClusterSnapshotAttributesResult: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterSnapshotAttributes = "DBClusterSnapshotAttributes" case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" @@ -6211,28 +4597,13 @@ extension NeptuneClientTypes.DBClusterSnapshotAttributesResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - if containerValues.contains(.dbClusterSnapshotAttributes) { - struct KeyVal0{struct DBClusterSnapshotAttribute{}} - let dbClusterSnapshotAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterSnapshotAttributes) - if let dbClusterSnapshotAttributesWrappedContainer = dbClusterSnapshotAttributesWrappedContainer { - let dbClusterSnapshotAttributesContainer = try dbClusterSnapshotAttributesWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBClusterSnapshotAttribute].self, forKey: .member) - var dbClusterSnapshotAttributesBuffer:[NeptuneClientTypes.DBClusterSnapshotAttribute]? = nil - if let dbClusterSnapshotAttributesContainer = dbClusterSnapshotAttributesContainer { - dbClusterSnapshotAttributesBuffer = [NeptuneClientTypes.DBClusterSnapshotAttribute]() - for structureContainer0 in dbClusterSnapshotAttributesContainer { - dbClusterSnapshotAttributesBuffer?.append(structureContainer0) - } - } - dbClusterSnapshotAttributes = dbClusterSnapshotAttributesBuffer - } else { - dbClusterSnapshotAttributes = [] - } - } else { - dbClusterSnapshotAttributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBClusterSnapshotAttributesResult() + value.dbClusterSnapshotIdentifier = try reader["DBClusterSnapshotIdentifier"].readIfPresent() + value.dbClusterSnapshotAttributes = try reader["DBClusterSnapshotAttributes"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBClusterSnapshotAttribute.readingClosure, memberNodeInfo: "DBClusterSnapshotAttribute", isFlattened: false) + return value } } } @@ -6258,16 +4629,14 @@ extension NeptuneClientTypes { } extension DBClusterSnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterSnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6296,23 +4665,7 @@ public struct DBClusterSnapshotNotFoundFault: ClientRuntime.ModeledError, AWSCli } } -struct DBClusterSnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterSnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBEngineVersion: Swift.Codable { +extension NeptuneClientTypes.DBEngineVersion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbEngineDescription = "DBEngineDescription" case dbEngineVersionDescription = "DBEngineVersionDescription" @@ -6408,102 +4761,25 @@ extension NeptuneClientTypes.DBEngineVersion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let dbEngineDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineDescription) - dbEngineDescription = dbEngineDescriptionDecoded - let dbEngineVersionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionDescription) - dbEngineVersionDescription = dbEngineVersionDescriptionDecoded - let defaultCharacterSetDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.CharacterSet.self, forKey: .defaultCharacterSet) - defaultCharacterSet = defaultCharacterSetDecoded - if containerValues.contains(.supportedCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCharacterSets) - if let supportedCharacterSetsWrappedContainer = supportedCharacterSetsWrappedContainer { - let supportedCharacterSetsContainer = try supportedCharacterSetsWrappedContainer.decodeIfPresent([NeptuneClientTypes.CharacterSet].self, forKey: .member) - var supportedCharacterSetsBuffer:[NeptuneClientTypes.CharacterSet]? = nil - if let supportedCharacterSetsContainer = supportedCharacterSetsContainer { - supportedCharacterSetsBuffer = [NeptuneClientTypes.CharacterSet]() - for structureContainer0 in supportedCharacterSetsContainer { - supportedCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedCharacterSets = supportedCharacterSetsBuffer - } else { - supportedCharacterSets = [] - } - } else { - supportedCharacterSets = nil - } - if containerValues.contains(.validUpgradeTarget) { - struct KeyVal0{struct UpgradeTarget{}} - let validUpgradeTargetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validUpgradeTarget) - if let validUpgradeTargetWrappedContainer = validUpgradeTargetWrappedContainer { - let validUpgradeTargetContainer = try validUpgradeTargetWrappedContainer.decodeIfPresent([NeptuneClientTypes.UpgradeTarget].self, forKey: .member) - var validUpgradeTargetBuffer:[NeptuneClientTypes.UpgradeTarget]? = nil - if let validUpgradeTargetContainer = validUpgradeTargetContainer { - validUpgradeTargetBuffer = [NeptuneClientTypes.UpgradeTarget]() - for structureContainer0 in validUpgradeTargetContainer { - validUpgradeTargetBuffer?.append(structureContainer0) - } - } - validUpgradeTarget = validUpgradeTargetBuffer - } else { - validUpgradeTarget = [] - } - } else { - validUpgradeTarget = nil - } - if containerValues.contains(.supportedTimezones) { - struct KeyVal0{struct Timezone{}} - let supportedTimezonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedTimezones) - if let supportedTimezonesWrappedContainer = supportedTimezonesWrappedContainer { - let supportedTimezonesContainer = try supportedTimezonesWrappedContainer.decodeIfPresent([NeptuneClientTypes.Timezone].self, forKey: .member) - var supportedTimezonesBuffer:[NeptuneClientTypes.Timezone]? = nil - if let supportedTimezonesContainer = supportedTimezonesContainer { - supportedTimezonesBuffer = [NeptuneClientTypes.Timezone]() - for structureContainer0 in supportedTimezonesContainer { - supportedTimezonesBuffer?.append(structureContainer0) - } - } - supportedTimezones = supportedTimezonesBuffer - } else { - supportedTimezones = [] - } - } else { - supportedTimezones = nil - } - if containerValues.contains(.exportableLogTypes) { - struct KeyVal0{struct member{}} - let exportableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportableLogTypes) - if let exportableLogTypesWrappedContainer = exportableLogTypesWrappedContainer { - let exportableLogTypesContainer = try exportableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportableLogTypesBuffer:[Swift.String]? = nil - if let exportableLogTypesContainer = exportableLogTypesContainer { - exportableLogTypesBuffer = [Swift.String]() - for stringContainer0 in exportableLogTypesContainer { - exportableLogTypesBuffer?.append(stringContainer0) - } - } - exportableLogTypes = exportableLogTypesBuffer - } else { - exportableLogTypes = [] - } - } else { - exportableLogTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBEngineVersion() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.dbEngineDescription = try reader["DBEngineDescription"].readIfPresent() + value.dbEngineVersionDescription = try reader["DBEngineVersionDescription"].readIfPresent() + value.defaultCharacterSet = try reader["DefaultCharacterSet"].readIfPresent(readingClosure: NeptuneClientTypes.CharacterSet.readingClosure) + value.supportedCharacterSets = try reader["SupportedCharacterSets"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.validUpgradeTarget = try reader["ValidUpgradeTarget"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.UpgradeTarget.readingClosure, memberNodeInfo: "UpgradeTarget", isFlattened: false) + value.supportedTimezones = try reader["SupportedTimezones"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Timezone.readingClosure, memberNodeInfo: "Timezone", isFlattened: false) + value.exportableLogTypes = try reader["ExportableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsLogExportsToCloudwatchLogs = try reader["SupportsLogExportsToCloudwatchLogs"].readIfPresent() + value.supportsReadReplica = try reader["SupportsReadReplica"].readIfPresent() + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + return value } - let supportsLogExportsToCloudwatchLogsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLogExportsToCloudwatchLogs) - supportsLogExportsToCloudwatchLogs = supportsLogExportsToCloudwatchLogsDecoded - let supportsReadReplicaDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsReadReplica) - supportsReadReplica = supportsReadReplicaDecoded - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded } } @@ -6571,7 +4847,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.DBInstance: Swift.Codable { +extension NeptuneClientTypes.DBInstance: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" @@ -6872,267 +5148,65 @@ extension NeptuneClientTypes.DBInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let dbInstanceStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceStatus) - dbInstanceStatus = dbInstanceStatusDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let endpointDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.Endpoint.self, forKey: .endpoint) - endpoint = endpointDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let instanceCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .instanceCreateTime) - instanceCreateTime = instanceCreateTimeDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - if containerValues.contains(.dbSecurityGroups) { - struct KeyVal0{struct DBSecurityGroup{}} - let dbSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroups) - if let dbSecurityGroupsWrappedContainer = dbSecurityGroupsWrappedContainer { - let dbSecurityGroupsContainer = try dbSecurityGroupsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBSecurityGroupMembership].self, forKey: .member) - var dbSecurityGroupsBuffer:[NeptuneClientTypes.DBSecurityGroupMembership]? = nil - if let dbSecurityGroupsContainer = dbSecurityGroupsContainer { - dbSecurityGroupsBuffer = [NeptuneClientTypes.DBSecurityGroupMembership]() - for structureContainer0 in dbSecurityGroupsContainer { - dbSecurityGroupsBuffer?.append(structureContainer0) - } - } - dbSecurityGroups = dbSecurityGroupsBuffer - } else { - dbSecurityGroups = [] - } - } else { - dbSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroupMembership{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([NeptuneClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[NeptuneClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [NeptuneClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] - } - } else { - vpcSecurityGroups = nil - } - if containerValues.contains(.dbParameterGroups) { - struct KeyVal0{struct DBParameterGroup{}} - let dbParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbParameterGroups) - if let dbParameterGroupsWrappedContainer = dbParameterGroupsWrappedContainer { - let dbParameterGroupsContainer = try dbParameterGroupsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBParameterGroupStatus].self, forKey: .member) - var dbParameterGroupsBuffer:[NeptuneClientTypes.DBParameterGroupStatus]? = nil - if let dbParameterGroupsContainer = dbParameterGroupsContainer { - dbParameterGroupsBuffer = [NeptuneClientTypes.DBParameterGroupStatus]() - for structureContainer0 in dbParameterGroupsContainer { - dbParameterGroupsBuffer?.append(structureContainer0) - } - } - dbParameterGroups = dbParameterGroupsBuffer - } else { - dbParameterGroups = [] - } - } else { - dbParameterGroups = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.PendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - let latestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestRestorableTime) - latestRestorableTime = latestRestorableTimeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let readReplicaSourceDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .readReplicaSourceDBInstanceIdentifier) - readReplicaSourceDBInstanceIdentifier = readReplicaSourceDBInstanceIdentifierDecoded - if containerValues.contains(.readReplicaDBInstanceIdentifiers) { - struct KeyVal0{struct ReadReplicaDBInstanceIdentifier{}} - let readReplicaDBInstanceIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readReplicaDBInstanceIdentifiers) - if let readReplicaDBInstanceIdentifiersWrappedContainer = readReplicaDBInstanceIdentifiersWrappedContainer { - let readReplicaDBInstanceIdentifiersContainer = try readReplicaDBInstanceIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readReplicaDBInstanceIdentifiersBuffer:[Swift.String]? = nil - if let readReplicaDBInstanceIdentifiersContainer = readReplicaDBInstanceIdentifiersContainer { - readReplicaDBInstanceIdentifiersBuffer = [Swift.String]() - for stringContainer0 in readReplicaDBInstanceIdentifiersContainer { - readReplicaDBInstanceIdentifiersBuffer?.append(stringContainer0) - } - } - readReplicaDBInstanceIdentifiers = readReplicaDBInstanceIdentifiersBuffer - } else { - readReplicaDBInstanceIdentifiers = [] - } - } else { - readReplicaDBInstanceIdentifiers = nil - } - if containerValues.contains(.readReplicaDBClusterIdentifiers) { - struct KeyVal0{struct ReadReplicaDBClusterIdentifier{}} - let readReplicaDBClusterIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readReplicaDBClusterIdentifiers) - if let readReplicaDBClusterIdentifiersWrappedContainer = readReplicaDBClusterIdentifiersWrappedContainer { - let readReplicaDBClusterIdentifiersContainer = try readReplicaDBClusterIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readReplicaDBClusterIdentifiersBuffer:[Swift.String]? = nil - if let readReplicaDBClusterIdentifiersContainer = readReplicaDBClusterIdentifiersContainer { - readReplicaDBClusterIdentifiersBuffer = [Swift.String]() - for stringContainer0 in readReplicaDBClusterIdentifiersContainer { - readReplicaDBClusterIdentifiersBuffer?.append(stringContainer0) - } - } - readReplicaDBClusterIdentifiers = readReplicaDBClusterIdentifiersBuffer - } else { - readReplicaDBClusterIdentifiers = [] - } - } else { - readReplicaDBClusterIdentifiers = nil - } - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - if containerValues.contains(.optionGroupMemberships) { - struct KeyVal0{struct OptionGroupMembership{}} - let optionGroupMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionGroupMemberships) - if let optionGroupMembershipsWrappedContainer = optionGroupMembershipsWrappedContainer { - let optionGroupMembershipsContainer = try optionGroupMembershipsWrappedContainer.decodeIfPresent([NeptuneClientTypes.OptionGroupMembership].self, forKey: .member) - var optionGroupMembershipsBuffer:[NeptuneClientTypes.OptionGroupMembership]? = nil - if let optionGroupMembershipsContainer = optionGroupMembershipsContainer { - optionGroupMembershipsBuffer = [NeptuneClientTypes.OptionGroupMembership]() - for structureContainer0 in optionGroupMembershipsContainer { - optionGroupMembershipsBuffer?.append(structureContainer0) - } - } - optionGroupMemberships = optionGroupMembershipsBuffer - } else { - optionGroupMemberships = [] - } - } else { - optionGroupMemberships = nil - } - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let secondaryAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secondaryAvailabilityZone) - secondaryAvailabilityZone = secondaryAvailabilityZoneDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - if containerValues.contains(.statusInfos) { - struct KeyVal0{struct DBInstanceStatusInfo{}} - let statusInfosWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statusInfos) - if let statusInfosWrappedContainer = statusInfosWrappedContainer { - let statusInfosContainer = try statusInfosWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBInstanceStatusInfo].self, forKey: .member) - var statusInfosBuffer:[NeptuneClientTypes.DBInstanceStatusInfo]? = nil - if let statusInfosContainer = statusInfosContainer { - statusInfosBuffer = [NeptuneClientTypes.DBInstanceStatusInfo]() - for structureContainer0 in statusInfosContainer { - statusInfosBuffer?.append(structureContainer0) - } - } - statusInfos = statusInfosBuffer - } else { - statusInfos = [] - } - } else { - statusInfos = nil - } - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let dbInstancePortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dbInstancePort) - dbInstancePort = dbInstancePortDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - if containerValues.contains(.domainMemberships) { - struct KeyVal0{struct DomainMembership{}} - let domainMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainMemberships) - if let domainMembershipsWrappedContainer = domainMembershipsWrappedContainer { - let domainMembershipsContainer = try domainMembershipsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DomainMembership].self, forKey: .member) - var domainMembershipsBuffer:[NeptuneClientTypes.DomainMembership]? = nil - if let domainMembershipsContainer = domainMembershipsContainer { - domainMembershipsBuffer = [NeptuneClientTypes.DomainMembership]() - for structureContainer0 in domainMembershipsContainer { - domainMembershipsBuffer?.append(structureContainer0) - } - } - domainMemberships = domainMembershipsBuffer - } else { - domainMemberships = [] - } - } else { - domainMemberships = nil - } - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let enhancedMonitoringResourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .enhancedMonitoringResourceArn) - enhancedMonitoringResourceArn = enhancedMonitoringResourceArnDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let dbInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceArn) - dbInstanceArn = dbInstanceArnDecoded - let timezoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezone) - timezone = timezoneDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let performanceInsightsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .performanceInsightsEnabled) - performanceInsightsEnabled = performanceInsightsEnabledDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - if containerValues.contains(.enabledCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enabledCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enabledCloudwatchLogsExports) - if let enabledCloudwatchLogsExportsWrappedContainer = enabledCloudwatchLogsExportsWrappedContainer { - let enabledCloudwatchLogsExportsContainer = try enabledCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enabledCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enabledCloudwatchLogsExportsContainer = enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enabledCloudwatchLogsExports = enabledCloudwatchLogsExportsBuffer - } else { - enabledCloudwatchLogsExports = [] - } - } else { - enabledCloudwatchLogsExports = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBInstance() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.dbInstanceStatus = try reader["DBInstanceStatus"].readIfPresent() + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.dbName = try reader["DBName"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent(readingClosure: NeptuneClientTypes.Endpoint.readingClosure) + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.instanceCreateTime = try reader["InstanceCreateTime"].readTimestampIfPresent(format: .dateTime) + value.preferredBackupWindow = try reader["PreferredBackupWindow"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.dbSecurityGroups = try reader["DBSecurityGroups"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBSecurityGroupMembership.readingClosure, memberNodeInfo: "DBSecurityGroup", isFlattened: false) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroupMembership", isFlattened: false) + value.dbParameterGroups = try reader["DBParameterGroups"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBParameterGroupStatus.readingClosure, memberNodeInfo: "DBParameterGroup", isFlattened: false) + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: NeptuneClientTypes.DBSubnetGroup.readingClosure) + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: NeptuneClientTypes.PendingModifiedValues.readingClosure) + value.latestRestorableTime = try reader["LatestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.autoMinorVersionUpgrade = try reader["AutoMinorVersionUpgrade"].readIfPresent() + value.readReplicaSourceDBInstanceIdentifier = try reader["ReadReplicaSourceDBInstanceIdentifier"].readIfPresent() + value.readReplicaDBInstanceIdentifiers = try reader["ReadReplicaDBInstanceIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ReadReplicaDBInstanceIdentifier", isFlattened: false) + value.readReplicaDBClusterIdentifiers = try reader["ReadReplicaDBClusterIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ReadReplicaDBClusterIdentifier", isFlattened: false) + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.optionGroupMemberships = try reader["OptionGroupMemberships"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.OptionGroupMembership.readingClosure, memberNodeInfo: "OptionGroupMembership", isFlattened: false) + value.characterSetName = try reader["CharacterSetName"].readIfPresent() + value.secondaryAvailabilityZone = try reader["SecondaryAvailabilityZone"].readIfPresent() + value.publiclyAccessible = try reader["PubliclyAccessible"].readIfPresent() + value.statusInfos = try reader["StatusInfos"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBInstanceStatusInfo.readingClosure, memberNodeInfo: "DBInstanceStatusInfo", isFlattened: false) + value.storageType = try reader["StorageType"].readIfPresent() + value.tdeCredentialArn = try reader["TdeCredentialArn"].readIfPresent() + value.dbInstancePort = try reader["DbInstancePort"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbiResourceId = try reader["DbiResourceId"].readIfPresent() + value.caCertificateIdentifier = try reader["CACertificateIdentifier"].readIfPresent() + value.domainMemberships = try reader["DomainMemberships"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DomainMembership.readingClosure, memberNodeInfo: "DomainMembership", isFlattened: false) + value.copyTagsToSnapshot = try reader["CopyTagsToSnapshot"].readIfPresent() + value.monitoringInterval = try reader["MonitoringInterval"].readIfPresent() + value.enhancedMonitoringResourceArn = try reader["EnhancedMonitoringResourceArn"].readIfPresent() + value.monitoringRoleArn = try reader["MonitoringRoleArn"].readIfPresent() + value.promotionTier = try reader["PromotionTier"].readIfPresent() + value.dbInstanceArn = try reader["DBInstanceArn"].readIfPresent() + value.timezone = try reader["Timezone"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.performanceInsightsEnabled = try reader["PerformanceInsightsEnabled"].readIfPresent() + value.performanceInsightsKMSKeyId = try reader["PerformanceInsightsKMSKeyId"].readIfPresent() + value.enabledCloudwatchLogsExports = try reader["EnabledCloudwatchLogsExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + return value } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded } } @@ -7362,16 +5436,14 @@ extension NeptuneClientTypes { } extension DBInstanceAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7400,33 +5472,15 @@ public struct DBInstanceAlreadyExistsFault: ClientRuntime.ModeledError, AWSClien } } -struct DBInstanceAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBInstanceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7455,23 +5509,7 @@ public struct DBInstanceNotFoundFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct DBInstanceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBInstanceStatusInfo: Swift.Codable { +extension NeptuneClientTypes.DBInstanceStatusInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case message = "Message" case normal = "Normal" @@ -7495,16 +5533,16 @@ extension NeptuneClientTypes.DBInstanceStatusInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusType) - statusType = statusTypeDecoded - let normalDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .normal) - normal = normalDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBInstanceStatusInfo() + value.statusType = try reader["StatusType"].readIfPresent() + value.normal = try reader["Normal"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + return value + } } } @@ -7536,7 +5574,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.DBParameterGroup: Swift.Codable { +extension NeptuneClientTypes.DBParameterGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbParameterGroupArn = "DBParameterGroupArn" case dbParameterGroupFamily = "DBParameterGroupFamily" @@ -7560,16 +5598,16 @@ extension NeptuneClientTypes.DBParameterGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dbParameterGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupArn) - dbParameterGroupArn = dbParameterGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBParameterGroup() + value.dbParameterGroupName = try reader["DBParameterGroupName"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.dbParameterGroupArn = try reader["DBParameterGroupArn"].readIfPresent() + return value + } } } @@ -7602,16 +5640,14 @@ extension NeptuneClientTypes { } extension DBParameterGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7640,33 +5676,15 @@ public struct DBParameterGroupAlreadyExistsFault: ClientRuntime.ModeledError, AW } } -struct DBParameterGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBParameterGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7695,33 +5713,15 @@ public struct DBParameterGroupNotFoundFault: ClientRuntime.ModeledError, AWSClie } } -struct DBParameterGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBParameterGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7750,23 +5750,7 @@ public struct DBParameterGroupQuotaExceededFault: ClientRuntime.ModeledError, AW } } -struct DBParameterGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBParameterGroupStatus: Swift.Codable { +extension NeptuneClientTypes.DBParameterGroupStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbParameterGroupName = "DBParameterGroupName" case parameterApplyStatus = "ParameterApplyStatus" @@ -7782,12 +5766,14 @@ extension NeptuneClientTypes.DBParameterGroupStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let parameterApplyStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterApplyStatus) - parameterApplyStatus = parameterApplyStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBParameterGroupStatus() + value.dbParameterGroupName = try reader["DBParameterGroupName"].readIfPresent() + value.parameterApplyStatus = try reader["ParameterApplyStatus"].readIfPresent() + return value + } } } @@ -7819,7 +5805,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.DBSecurityGroupMembership: Swift.Codable { +extension NeptuneClientTypes.DBSecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSecurityGroupName = "DBSecurityGroupName" case status = "Status" @@ -7835,12 +5821,14 @@ extension NeptuneClientTypes.DBSecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupName) - dbSecurityGroupName = dbSecurityGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBSecurityGroupMembership() + value.dbSecurityGroupName = try reader["DBSecurityGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -7865,16 +5853,14 @@ extension NeptuneClientTypes { } extension DBSecurityGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSecurityGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7903,33 +5889,15 @@ public struct DBSecurityGroupNotFoundFault: ClientRuntime.ModeledError, AWSClien } } -struct DBSecurityGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSecurityGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7958,33 +5926,15 @@ public struct DBSnapshotAlreadyExistsFault: ClientRuntime.ModeledError, AWSClien } } -struct DBSnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8013,23 +5963,7 @@ public struct DBSnapshotNotFoundFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct DBSnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DBSubnetGroup: Swift.Codable { +extension NeptuneClientTypes.DBSubnetGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSubnetGroupArn = "DBSubnetGroupArn" case dbSubnetGroupDescription = "DBSubnetGroupDescription" @@ -8070,37 +6004,18 @@ extension NeptuneClientTypes.DBSubnetGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let subnetGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupStatus) - subnetGroupStatus = subnetGroupStatusDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct Subnet{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Subnet].self, forKey: .member) - var subnetsBuffer:[NeptuneClientTypes.Subnet]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [NeptuneClientTypes.Subnet]() - for structureContainer0 in subnetsContainer { - subnetsBuffer?.append(structureContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DBSubnetGroup() + value.dbSubnetGroupName = try reader["DBSubnetGroupName"].readIfPresent() + value.dbSubnetGroupDescription = try reader["DBSubnetGroupDescription"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.subnetGroupStatus = try reader["SubnetGroupStatus"].readIfPresent() + value.subnets = try reader["Subnets"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Subnet.readingClosure, memberNodeInfo: "Subnet", isFlattened: false) + value.dbSubnetGroupArn = try reader["DBSubnetGroupArn"].readIfPresent() + return value } - let dbSubnetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupArn) - dbSubnetGroupArn = dbSubnetGroupArnDecoded } } @@ -8141,16 +6056,14 @@ extension NeptuneClientTypes { } extension DBSubnetGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8179,33 +6092,15 @@ public struct DBSubnetGroupAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct DBSubnetGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupDoesNotCoverEnoughAZs { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupDoesNotCoverEnoughAZs() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8234,33 +6129,15 @@ public struct DBSubnetGroupDoesNotCoverEnoughAZs: ClientRuntime.ModeledError, AW } } -struct DBSubnetGroupDoesNotCoverEnoughAZsBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupDoesNotCoverEnoughAZsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8289,33 +6166,15 @@ public struct DBSubnetGroupNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBSubnetGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8344,33 +6203,15 @@ public struct DBSubnetGroupQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct DBSubnetGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8399,33 +6240,15 @@ public struct DBSubnetQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBSubnetQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBUpgradeDependencyFailureFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBUpgradeDependencyFailureFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8454,23 +6277,11 @@ public struct DBUpgradeDependencyFailureFault: ClientRuntime.ModeledError, AWSCl } } -struct DBUpgradeDependencyFailureFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBUpgradeDependencyFailureFaultBody: Swift.Decodable { +extension DeleteDBClusterEndpointInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" } -} -extension DeleteDBClusterEndpointInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterEndpointIdentifier = dbClusterEndpointIdentifier { @@ -8501,48 +6312,24 @@ public struct DeleteDBClusterEndpointInput: Swift.Equatable { } } -struct DeleteDBClusterEndpointInputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? -} - -extension DeleteDBClusterEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - } -} +extension DeleteDBClusterEndpointOutput { -extension DeleteDBClusterEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.customEndpointType = output.customEndpointType - self.dbClusterEndpointArn = output.dbClusterEndpointArn - self.dbClusterEndpointIdentifier = output.dbClusterEndpointIdentifier - self.dbClusterEndpointResourceIdentifier = output.dbClusterEndpointResourceIdentifier - self.dbClusterIdentifier = output.dbClusterIdentifier - self.endpoint = output.endpoint - self.endpointType = output.endpointType - self.excludedMembers = output.excludedMembers - self.staticMembers = output.staticMembers - self.status = output.status - } else { - self.customEndpointType = nil - self.dbClusterEndpointArn = nil - self.dbClusterEndpointIdentifier = nil - self.dbClusterEndpointResourceIdentifier = nil - self.dbClusterIdentifier = nil - self.endpoint = nil - self.endpointType = nil - self.excludedMembers = nil - self.staticMembers = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterEndpointResult"] + var value = DeleteDBClusterEndpointOutput() + value.customEndpointType = try reader["CustomEndpointType"].readIfPresent() + value.dbClusterEndpointArn = try reader["DBClusterEndpointArn"].readIfPresent() + value.dbClusterEndpointIdentifier = try reader["DBClusterEndpointIdentifier"].readIfPresent() + value.dbClusterEndpointResourceIdentifier = try reader["DBClusterEndpointResourceIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.endpointType = try reader["EndpointType"].readIfPresent() + value.excludedMembers = try reader["ExcludedMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.staticMembers = try reader["StaticMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -8607,106 +6394,32 @@ public struct DeleteDBClusterEndpointOutput: Swift.Equatable { } } -struct DeleteDBClusterEndpointOutputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointResourceIdentifier: Swift.String? - let endpoint: Swift.String? - let status: Swift.String? - let endpointType: Swift.String? - let customEndpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? - let dbClusterEndpointArn: Swift.String? -} - -extension DeleteDBClusterEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customEndpointType = "CustomEndpointType" - case dbClusterEndpointArn = "DBClusterEndpointArn" - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterEndpointResourceIdentifier = "DBClusterEndpointResourceIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case endpoint = "Endpoint" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - case status = "Status" - } +enum DeleteDBClusterEndpointOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterEndpointResult")) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointResourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointResourceIdentifier) - dbClusterEndpointResourceIdentifier = dbClusterEndpointResourceIdentifierDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let customEndpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customEndpointType) - customEndpointType = customEndpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterEndpointNotFoundFault": return try await DBClusterEndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterEndpointStateFault": return try await InvalidDBClusterEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - excludedMembers = nil } - let dbClusterEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointArn) - dbClusterEndpointArn = dbClusterEndpointArnDecoded } } -enum DeleteDBClusterEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterEndpointNotFoundFault": return try await DBClusterEndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterEndpointStateFault": return try await InvalidDBClusterEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DeleteDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" + case skipFinalSnapshot = "SkipFinalSnapshot" } -} -extension DeleteDBClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -8759,38 +6472,15 @@ public struct DeleteDBClusterInput: Swift.Equatable { } } -struct DeleteDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let skipFinalSnapshot: Swift.Bool? - let finalDBSnapshotIdentifier: Swift.String? -} - -extension DeleteDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" - case skipFinalSnapshot = "SkipFinalSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let skipFinalSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipFinalSnapshot) - skipFinalSnapshot = skipFinalSnapshotDecoded - let finalDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalDBSnapshotIdentifier) - finalDBSnapshotIdentifier = finalDBSnapshotIdentifierDecoded - } -} +extension DeleteDBClusterOutput { -extension DeleteDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterResult"] + var value = DeleteDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -8807,38 +6497,32 @@ public struct DeleteDBClusterOutput: Swift.Equatable { } } -struct DeleteDBClusterOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension DeleteDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum DeleteDBClusterOutputError { -enum DeleteDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -8875,24 +6559,12 @@ public struct DeleteDBClusterParameterGroupInput: Swift.Equatable { } } -struct DeleteDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension DeleteDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} +extension DeleteDBClusterParameterGroupOutput { -extension DeleteDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBClusterParameterGroupOutput() + } } } @@ -8901,18 +6573,29 @@ public struct DeleteDBClusterParameterGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBClusterParameterGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifier { @@ -8943,30 +6626,15 @@ public struct DeleteDBClusterSnapshotInput: Swift.Equatable { } } -struct DeleteDBClusterSnapshotInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? -} - -extension DeleteDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - } -} +extension DeleteDBClusterSnapshotOutput { -extension DeleteDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterSnapshotResult"] + var value = DeleteDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: NeptuneClientTypes.DBClusterSnapshot.readingClosure) + return value } } } @@ -8983,35 +6651,31 @@ public struct DeleteDBClusterSnapshotOutput: Swift.Equatable { } } -struct DeleteDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: NeptuneClientTypes.DBClusterSnapshot? -} - -extension DeleteDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } +enum DeleteDBClusterSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } } } -enum DeleteDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DeleteDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" + case skipFinalSnapshot = "SkipFinalSnapshot" } -} -extension DeleteDBInstanceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -9066,38 +6730,15 @@ public struct DeleteDBInstanceInput: Swift.Equatable { } } -struct DeleteDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let skipFinalSnapshot: Swift.Bool? - let finalDBSnapshotIdentifier: Swift.String? -} - -extension DeleteDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" - case skipFinalSnapshot = "SkipFinalSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let skipFinalSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipFinalSnapshot) - skipFinalSnapshot = skipFinalSnapshotDecoded - let finalDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalDBSnapshotIdentifier) - finalDBSnapshotIdentifier = finalDBSnapshotIdentifierDecoded - } -} +extension DeleteDBInstanceOutput { -extension DeleteDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBInstanceResult"] + var value = DeleteDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: NeptuneClientTypes.DBInstance.readingClosure) + return value } } } @@ -9114,38 +6755,32 @@ public struct DeleteDBInstanceOutput: Swift.Equatable { } } -struct DeleteDBInstanceOutputBody: Swift.Equatable { - let dbInstance: NeptuneClientTypes.DBInstance? -} - -extension DeleteDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum DeleteDBInstanceOutputError { -enum DeleteDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -9182,24 +6817,12 @@ public struct DeleteDBParameterGroupInput: Swift.Equatable { } } -struct DeleteDBParameterGroupInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? -} - -extension DeleteDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - } -} +extension DeleteDBParameterGroupOutput { -extension DeleteDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBParameterGroupOutput() + } } } @@ -9208,18 +6831,29 @@ public struct DeleteDBParameterGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBParameterGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupName = "DBSubnetGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupName = dbSubnetGroupName { @@ -9250,24 +6884,12 @@ public struct DeleteDBSubnetGroupInput: Swift.Equatable { } } -struct DeleteDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? -} - -extension DeleteDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupName = "DBSubnetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - } -} +extension DeleteDBSubnetGroupOutput { -extension DeleteDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBSubnetGroupOutput() + } } } @@ -9276,19 +6898,30 @@ public struct DeleteDBSubnetGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetStateFault": return try await InvalidDBSubnetStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBSubnetGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetStateFault": return try await InvalidDBSubnetStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let subscriptionName = subscriptionName { @@ -9319,30 +6952,15 @@ public struct DeleteEventSubscriptionInput: Swift.Equatable { } } -struct DeleteEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? -} - -extension DeleteEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - } -} +extension DeleteEventSubscriptionOutput { -extension DeleteEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteEventSubscriptionResult"] + var value = DeleteEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: NeptuneClientTypes.EventSubscription.readingClosure) + return value } } } @@ -9359,35 +6977,29 @@ public struct DeleteEventSubscriptionOutput: Swift.Equatable { } } -struct DeleteEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: NeptuneClientTypes.EventSubscription? -} - -extension DeleteEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum DeleteEventSubscriptionOutputError { -enum DeleteEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidEventSubscriptionState": return try await InvalidEventSubscriptionStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidEventSubscriptionState": return try await InvalidEventSubscriptionStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalClusterIdentifier = "GlobalClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalClusterIdentifier = globalClusterIdentifier { @@ -9418,30 +7030,15 @@ public struct DeleteGlobalClusterInput: Swift.Equatable { } } -struct DeleteGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? -} - -extension DeleteGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusterIdentifier = "GlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - } -} +extension DeleteGlobalClusterOutput { -extension DeleteGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteGlobalClusterResult"] + var value = DeleteGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: NeptuneClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -9458,35 +7055,33 @@ public struct DeleteGlobalClusterOutput: Swift.Equatable { } } -struct DeleteGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: NeptuneClientTypes.GlobalCluster? -} - -extension DeleteGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } +enum DeleteGlobalClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} - -enum DeleteGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeDBClusterEndpointsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" + case dbClusterIdentifier = "DBClusterIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterEndpointIdentifier = dbClusterEndpointIdentifier { @@ -9553,65 +7148,16 @@ public struct DescribeDBClusterEndpointsInput: Swift.Equatable { } } -struct DescribeDBClusterEndpointsInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointIdentifier: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClusterEndpointsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBClusterEndpointsOutput { -extension DescribeDBClusterEndpointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterEndpointsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterEndpoints = output.dbClusterEndpoints - self.marker = output.marker - } else { - self.dbClusterEndpoints = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterEndpointsResult"] + var value = DescribeDBClusterEndpointsOutput() + value.dbClusterEndpoints = try reader["DBClusterEndpoints"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBClusterEndpoint.readingClosure, memberNodeInfo: "DBClusterEndpointList", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -9632,55 +7178,31 @@ public struct DescribeDBClusterEndpointsOutput: Swift.Equatable { } } -struct DescribeDBClusterEndpointsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterEndpoints: [NeptuneClientTypes.DBClusterEndpoint]? -} - -extension DescribeDBClusterEndpointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpoints = "DBClusterEndpoints" - case marker = "Marker" - } +enum DescribeDBClusterEndpointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterEndpointsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterEndpoints) { - struct KeyVal0{struct DBClusterEndpointList{}} - let dbClusterEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterEndpoints) - if let dbClusterEndpointsWrappedContainer = dbClusterEndpointsWrappedContainer { - let dbClusterEndpointsContainer = try dbClusterEndpointsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBClusterEndpoint].self, forKey: .member) - var dbClusterEndpointsBuffer:[NeptuneClientTypes.DBClusterEndpoint]? = nil - if let dbClusterEndpointsContainer = dbClusterEndpointsContainer { - dbClusterEndpointsBuffer = [NeptuneClientTypes.DBClusterEndpoint]() - for structureContainer0 in dbClusterEndpointsContainer { - dbClusterEndpointsBuffer?.append(structureContainer0) - } - } - dbClusterEndpoints = dbClusterEndpointsBuffer - } else { - dbClusterEndpoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterEndpoints = nil } } } -enum DescribeDBClusterEndpointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterParameterGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClusterParameterGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -9742,61 +7264,16 @@ public struct DescribeDBClusterParameterGroupsInput: Swift.Equatable { } } -struct DescribeDBClusterParameterGroupsInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClusterParameterGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBClusterParameterGroupsOutput { -extension DescribeDBClusterParameterGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterParameterGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroups = output.dbClusterParameterGroups - self.marker = output.marker - } else { - self.dbClusterParameterGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterParameterGroupsResult"] + var value = DescribeDBClusterParameterGroupsOutput() + value.dbClusterParameterGroups = try reader["DBClusterParameterGroups"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBClusterParameterGroup.readingClosure, memberNodeInfo: "DBClusterParameterGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -9817,55 +7294,32 @@ public struct DescribeDBClusterParameterGroupsOutput: Swift.Equatable { } } -struct DescribeDBClusterParameterGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterParameterGroups: [NeptuneClientTypes.DBClusterParameterGroup]? -} - -extension DescribeDBClusterParameterGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroups = "DBClusterParameterGroups" - case marker = "Marker" - } +enum DescribeDBClusterParameterGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterParameterGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterParameterGroups) { - struct KeyVal0{struct DBClusterParameterGroup{}} - let dbClusterParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterParameterGroups) - if let dbClusterParameterGroupsWrappedContainer = dbClusterParameterGroupsWrappedContainer { - let dbClusterParameterGroupsContainer = try dbClusterParameterGroupsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBClusterParameterGroup].self, forKey: .member) - var dbClusterParameterGroupsBuffer:[NeptuneClientTypes.DBClusterParameterGroup]? = nil - if let dbClusterParameterGroupsContainer = dbClusterParameterGroupsContainer { - dbClusterParameterGroupsBuffer = [NeptuneClientTypes.DBClusterParameterGroup]() - for structureContainer0 in dbClusterParameterGroupsContainer { - dbClusterParameterGroupsBuffer?.append(structureContainer0) - } - } - dbClusterParameterGroups = dbClusterParameterGroupsBuffer - } else { - dbClusterParameterGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterParameterGroups = nil } } } -enum DescribeDBClusterParameterGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case source = "Source" } -} -extension DescribeDBClusterParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -9935,65 +7389,16 @@ public struct DescribeDBClusterParametersInput: Swift.Equatable { } } -struct DescribeDBClusterParametersInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let source: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClusterParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case source = "Source" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBClusterParametersOutput { -extension DescribeDBClusterParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.parameters = output.parameters - } else { - self.marker = nil - self.parameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterParametersResult"] + var value = DescribeDBClusterParametersOutput() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -10014,55 +7419,28 @@ public struct DescribeDBClusterParametersOutput: Swift.Equatable { } } -struct DescribeDBClusterParametersOutputBody: Swift.Equatable { - let parameters: [NeptuneClientTypes.Parameter]? - let marker: Swift.String? -} - -extension DescribeDBClusterParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case parameters = "Parameters" - } +enum DescribeDBClusterParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterParametersResult")) - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[NeptuneClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [NeptuneClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - parameters = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBClusterParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterSnapshotAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" } -} -extension DescribeDBClusterSnapshotAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifier { @@ -10093,30 +7471,15 @@ public struct DescribeDBClusterSnapshotAttributesInput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotAttributesInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? -} - -extension DescribeDBClusterSnapshotAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - } -} +extension DescribeDBClusterSnapshotAttributesOutput { -extension DescribeDBClusterSnapshotAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterSnapshotAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshotAttributesResult = output.dbClusterSnapshotAttributesResult - } else { - self.dbClusterSnapshotAttributesResult = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterSnapshotAttributesResult"] + var value = DescribeDBClusterSnapshotAttributesOutput() + value.dbClusterSnapshotAttributesResult = try reader["DBClusterSnapshotAttributesResult"].readIfPresent(readingClosure: NeptuneClientTypes.DBClusterSnapshotAttributesResult.readingClosure) + return value } } } @@ -10133,34 +7496,35 @@ public struct DescribeDBClusterSnapshotAttributesOutput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotAttributesOutputBody: Swift.Equatable { - let dbClusterSnapshotAttributesResult: NeptuneClientTypes.DBClusterSnapshotAttributesResult? -} - -extension DescribeDBClusterSnapshotAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotAttributesResult = "DBClusterSnapshotAttributesResult" - } +enum DescribeDBClusterSnapshotAttributesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterSnapshotAttributesResult")) - let dbClusterSnapshotAttributesResultDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBClusterSnapshotAttributesResult.self, forKey: .dbClusterSnapshotAttributesResult) - dbClusterSnapshotAttributesResult = dbClusterSnapshotAttributesResultDecoded - } -} - -enum DescribeDBClusterSnapshotAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeDBClusterSnapshotsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case filters = "Filters" + case includePublic = "IncludePublic" + case includeShared = "IncludeShared" + case marker = "Marker" + case maxRecords = "MaxRecords" + case snapshotType = "SnapshotType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -10265,77 +7629,16 @@ public struct DescribeDBClusterSnapshotsInput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotsInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let dbClusterSnapshotIdentifier: Swift.String? - let snapshotType: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let includeShared: Swift.Bool? - let includePublic: Swift.Bool? -} - -extension DescribeDBClusterSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case filters = "Filters" - case includePublic = "IncludePublic" - case includeShared = "IncludeShared" - case marker = "Marker" - case maxRecords = "MaxRecords" - case snapshotType = "SnapshotType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let includeSharedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeShared) - includeShared = includeSharedDecoded - let includePublicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includePublic) - includePublic = includePublicDecoded - } -} +extension DescribeDBClusterSnapshotsOutput { -extension DescribeDBClusterSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshots = output.dbClusterSnapshots - self.marker = output.marker - } else { - self.dbClusterSnapshots = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterSnapshotsResult"] + var value = DescribeDBClusterSnapshotsOutput() + value.dbClusterSnapshots = try reader["DBClusterSnapshots"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBClusterSnapshot.readingClosure, memberNodeInfo: "DBClusterSnapshot", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -10356,55 +7659,31 @@ public struct DescribeDBClusterSnapshotsOutput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterSnapshots: [NeptuneClientTypes.DBClusterSnapshot]? -} - -extension DescribeDBClusterSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshots = "DBClusterSnapshots" - case marker = "Marker" - } +enum DescribeDBClusterSnapshotsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterSnapshotsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterSnapshots) { - struct KeyVal0{struct DBClusterSnapshot{}} - let dbClusterSnapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterSnapshots) - if let dbClusterSnapshotsWrappedContainer = dbClusterSnapshotsWrappedContainer { - let dbClusterSnapshotsContainer = try dbClusterSnapshotsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBClusterSnapshot].self, forKey: .member) - var dbClusterSnapshotsBuffer:[NeptuneClientTypes.DBClusterSnapshot]? = nil - if let dbClusterSnapshotsContainer = dbClusterSnapshotsContainer { - dbClusterSnapshotsBuffer = [NeptuneClientTypes.DBClusterSnapshot]() - for structureContainer0 in dbClusterSnapshotsContainer { - dbClusterSnapshotsBuffer?.append(structureContainer0) - } - } - dbClusterSnapshots = dbClusterSnapshotsBuffer - } else { - dbClusterSnapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterSnapshots = nil } } } -enum DescribeDBClusterSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClustersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClustersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -10473,63 +7752,18 @@ public struct DescribeDBClustersInput: Swift.Equatable { } } -struct DescribeDBClustersInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClustersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBClustersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClustersOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusters = output.dbClusters - self.marker = output.marker - } else { - self.dbClusters = nil - self.marker = nil - } - } +extension DescribeDBClustersOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClustersResult"] + var value = DescribeDBClustersOutput() + value.dbClusters = try reader["DBClusters"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBCluster.readingClosure, memberNodeInfo: "DBCluster", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value + } + } } public struct DescribeDBClustersOutput: Swift.Equatable { @@ -10548,55 +7782,36 @@ public struct DescribeDBClustersOutput: Swift.Equatable { } } -struct DescribeDBClustersOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusters: [NeptuneClientTypes.DBCluster]? -} - -extension DescribeDBClustersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusters = "DBClusters" - case marker = "Marker" - } +enum DescribeDBClustersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClustersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusters) { - struct KeyVal0{struct DBCluster{}} - let dbClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusters) - if let dbClustersWrappedContainer = dbClustersWrappedContainer { - let dbClustersContainer = try dbClustersWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBCluster].self, forKey: .member) - var dbClustersBuffer:[NeptuneClientTypes.DBCluster]? = nil - if let dbClustersContainer = dbClustersContainer { - dbClustersBuffer = [NeptuneClientTypes.DBCluster]() - for structureContainer0 in dbClustersContainer { - dbClustersBuffer?.append(structureContainer0) - } - } - dbClusters = dbClustersBuffer - } else { - dbClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusters = nil } } } -enum DescribeDBClustersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBEngineVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case defaultOnly = "DefaultOnly" + case engine = "Engine" + case engineVersion = "EngineVersion" + case filters = "Filters" + case listSupportedCharacterSets = "ListSupportedCharacterSets" + case listSupportedTimezones = "ListSupportedTimezones" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBEngineVersionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -10693,81 +7908,16 @@ public struct DescribeDBEngineVersionsInput: Swift.Equatable { } } -struct DescribeDBEngineVersionsInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbParameterGroupFamily: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let defaultOnly: Swift.Bool? - let listSupportedCharacterSets: Swift.Bool? - let listSupportedTimezones: Swift.Bool? -} +extension DescribeDBEngineVersionsOutput { -extension DescribeDBEngineVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case defaultOnly = "DefaultOnly" - case engine = "Engine" - case engineVersion = "EngineVersion" - case filters = "Filters" - case listSupportedCharacterSets = "ListSupportedCharacterSets" - case listSupportedTimezones = "ListSupportedTimezones" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let defaultOnlyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .defaultOnly) - defaultOnly = defaultOnlyDecoded - let listSupportedCharacterSetsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .listSupportedCharacterSets) - listSupportedCharacterSets = listSupportedCharacterSetsDecoded - let listSupportedTimezonesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .listSupportedTimezones) - listSupportedTimezones = listSupportedTimezonesDecoded - } -} - -extension DescribeDBEngineVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBEngineVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbEngineVersions = output.dbEngineVersions - self.marker = output.marker - } else { - self.dbEngineVersions = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBEngineVersionsResult"] + var value = DescribeDBEngineVersionsOutput() + value.dbEngineVersions = try reader["DBEngineVersions"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBEngineVersion.readingClosure, memberNodeInfo: "DBEngineVersion", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -10788,54 +7938,30 @@ public struct DescribeDBEngineVersionsOutput: Swift.Equatable { } } -struct DescribeDBEngineVersionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbEngineVersions: [NeptuneClientTypes.DBEngineVersion]? -} +enum DescribeDBEngineVersionsOutputError { -extension DescribeDBEngineVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbEngineVersions = "DBEngineVersions" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBEngineVersionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbEngineVersions) { - struct KeyVal0{struct DBEngineVersion{}} - let dbEngineVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbEngineVersions) - if let dbEngineVersionsWrappedContainer = dbEngineVersionsWrappedContainer { - let dbEngineVersionsContainer = try dbEngineVersionsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBEngineVersion].self, forKey: .member) - var dbEngineVersionsBuffer:[NeptuneClientTypes.DBEngineVersion]? = nil - if let dbEngineVersionsContainer = dbEngineVersionsContainer { - dbEngineVersionsBuffer = [NeptuneClientTypes.DBEngineVersion]() - for structureContainer0 in dbEngineVersionsContainer { - dbEngineVersionsBuffer?.append(structureContainer0) - } - } - dbEngineVersions = dbEngineVersionsBuffer - } else { - dbEngineVersions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbEngineVersions = nil } } } -enum DescribeDBEngineVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBInstancesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -10904,61 +8030,16 @@ public struct DescribeDBInstancesInput: Swift.Equatable { } } -struct DescribeDBInstancesInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeDBInstancesOutput { -extension DescribeDBInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstances = output.dbInstances - self.marker = output.marker - } else { - self.dbInstances = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBInstancesResult"] + var value = DescribeDBInstancesOutput() + value.dbInstances = try reader["DBInstances"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBInstance.readingClosure, memberNodeInfo: "DBInstance", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -10979,55 +8060,31 @@ public struct DescribeDBInstancesOutput: Swift.Equatable { } } -struct DescribeDBInstancesOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbInstances: [NeptuneClientTypes.DBInstance]? -} - -extension DescribeDBInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstances = "DBInstances" - case marker = "Marker" - } +enum DescribeDBInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBInstancesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbInstances) { - struct KeyVal0{struct DBInstance{}} - let dbInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbInstances) - if let dbInstancesWrappedContainer = dbInstancesWrappedContainer { - let dbInstancesContainer = try dbInstancesWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBInstance].self, forKey: .member) - var dbInstancesBuffer:[NeptuneClientTypes.DBInstance]? = nil - if let dbInstancesContainer = dbInstancesContainer { - dbInstancesBuffer = [NeptuneClientTypes.DBInstance]() - for structureContainer0 in dbInstancesContainer { - dbInstancesBuffer?.append(structureContainer0) - } - } - dbInstances = dbInstancesBuffer - } else { - dbInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbInstances = nil } } } -enum DescribeDBInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBParameterGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBParameterGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -11089,61 +8146,16 @@ public struct DescribeDBParameterGroupsInput: Swift.Equatable { } } -struct DescribeDBParameterGroupsInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeDBParameterGroupsOutput { -extension DescribeDBParameterGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBParameterGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBParameterGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroups = output.dbParameterGroups - self.marker = output.marker - } else { - self.dbParameterGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBParameterGroupsResult"] + var value = DescribeDBParameterGroupsOutput() + value.dbParameterGroups = try reader["DBParameterGroups"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBParameterGroup.readingClosure, memberNodeInfo: "DBParameterGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -11164,55 +8176,32 @@ public struct DescribeDBParameterGroupsOutput: Swift.Equatable { } } -struct DescribeDBParameterGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbParameterGroups: [NeptuneClientTypes.DBParameterGroup]? -} - -extension DescribeDBParameterGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroups = "DBParameterGroups" - case marker = "Marker" - } +enum DescribeDBParameterGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBParameterGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbParameterGroups) { - struct KeyVal0{struct DBParameterGroup{}} - let dbParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbParameterGroups) - if let dbParameterGroupsWrappedContainer = dbParameterGroupsWrappedContainer { - let dbParameterGroupsContainer = try dbParameterGroupsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBParameterGroup].self, forKey: .member) - var dbParameterGroupsBuffer:[NeptuneClientTypes.DBParameterGroup]? = nil - if let dbParameterGroupsContainer = dbParameterGroupsContainer { - dbParameterGroupsBuffer = [NeptuneClientTypes.DBParameterGroup]() - for structureContainer0 in dbParameterGroupsContainer { - dbParameterGroupsBuffer?.append(structureContainer0) - } - } - dbParameterGroups = dbParameterGroupsBuffer - } else { - dbParameterGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbParameterGroups = nil } } } -enum DescribeDBParameterGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case source = "Source" } -} -extension DescribeDBParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -11282,65 +8271,16 @@ public struct DescribeDBParametersInput: Swift.Equatable { } } -struct DescribeDBParametersInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let source: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case source = "Source" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBParametersOutput { -extension DescribeDBParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.parameters = output.parameters - } else { - self.marker = nil - self.parameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBParametersResult"] + var value = DescribeDBParametersOutput() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -11361,55 +8301,31 @@ public struct DescribeDBParametersOutput: Swift.Equatable { } } -struct DescribeDBParametersOutputBody: Swift.Equatable { - let parameters: [NeptuneClientTypes.Parameter]? - let marker: Swift.String? -} - -extension DescribeDBParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case parameters = "Parameters" - } +enum DescribeDBParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBParametersResult")) - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[NeptuneClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [NeptuneClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - parameters = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBSubnetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupName = "DBSubnetGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBSubnetGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupName = dbSubnetGroupName { @@ -11469,61 +8385,16 @@ public struct DescribeDBSubnetGroupsInput: Swift.Equatable { } } -struct DescribeDBSubnetGroupsInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBSubnetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupName = "DBSubnetGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } +extension DescribeDBSubnetGroupsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBSubnetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBSubnetGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroups = output.dbSubnetGroups - self.marker = output.marker - } else { - self.dbSubnetGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBSubnetGroupsResult"] + var value = DescribeDBSubnetGroupsOutput() + value.dbSubnetGroups = try reader["DBSubnetGroups"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DBSubnetGroup.readingClosure, memberNodeInfo: "DBSubnetGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -11544,55 +8415,31 @@ public struct DescribeDBSubnetGroupsOutput: Swift.Equatable { } } -struct DescribeDBSubnetGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbSubnetGroups: [NeptuneClientTypes.DBSubnetGroup]? -} - -extension DescribeDBSubnetGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroups = "DBSubnetGroups" - case marker = "Marker" - } +enum DescribeDBSubnetGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBSubnetGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbSubnetGroups) { - struct KeyVal0{struct DBSubnetGroup{}} - let dbSubnetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSubnetGroups) - if let dbSubnetGroupsWrappedContainer = dbSubnetGroupsWrappedContainer { - let dbSubnetGroupsContainer = try dbSubnetGroupsWrappedContainer.decodeIfPresent([NeptuneClientTypes.DBSubnetGroup].self, forKey: .member) - var dbSubnetGroupsBuffer:[NeptuneClientTypes.DBSubnetGroup]? = nil - if let dbSubnetGroupsContainer = dbSubnetGroupsContainer { - dbSubnetGroupsBuffer = [NeptuneClientTypes.DBSubnetGroup]() - for structureContainer0 in dbSubnetGroupsContainer { - dbSubnetGroupsBuffer?.append(structureContainer0) - } - } - dbSubnetGroups = dbSubnetGroupsBuffer - } else { - dbSubnetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbSubnetGroups = nil } } } -enum DescribeDBSubnetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEngineDefaultClusterParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeEngineDefaultClusterParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -11653,59 +8500,15 @@ public struct DescribeEngineDefaultClusterParametersInput: Swift.Equatable { } } -struct DescribeEngineDefaultClusterParametersInputBody: Swift.Equatable { - let dbParameterGroupFamily: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEngineDefaultClusterParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEngineDefaultClusterParametersOutput { -extension DescribeEngineDefaultClusterParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEngineDefaultClusterParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.engineDefaults = output.engineDefaults - } else { - self.engineDefaults = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEngineDefaultClusterParametersResult"] + var value = DescribeEngineDefaultClusterParametersOutput() + value.engineDefaults = try reader["EngineDefaults"].readIfPresent(readingClosure: NeptuneClientTypes.EngineDefaults.readingClosure) + return value } } } @@ -11722,33 +8525,30 @@ public struct DescribeEngineDefaultClusterParametersOutput: Swift.Equatable { } } -struct DescribeEngineDefaultClusterParametersOutputBody: Swift.Equatable { - let engineDefaults: NeptuneClientTypes.EngineDefaults? -} - -extension DescribeEngineDefaultClusterParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineDefaults = "EngineDefaults" - } +enum DescribeEngineDefaultClusterParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEngineDefaultClusterParametersResult")) - let engineDefaultsDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.EngineDefaults.self, forKey: .engineDefaults) - engineDefaults = engineDefaultsDecoded - } -} - -enum DescribeEngineDefaultClusterParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeEngineDefaultParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -11809,59 +8609,15 @@ public struct DescribeEngineDefaultParametersInput: Swift.Equatable { } } -struct DescribeEngineDefaultParametersInputBody: Swift.Equatable { - let dbParameterGroupFamily: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEngineDefaultParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEngineDefaultParametersOutput { -extension DescribeEngineDefaultParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEngineDefaultParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.engineDefaults = output.engineDefaults - } else { - self.engineDefaults = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEngineDefaultParametersResult"] + var value = DescribeEngineDefaultParametersOutput() + value.engineDefaults = try reader["EngineDefaults"].readIfPresent(readingClosure: NeptuneClientTypes.EngineDefaults.readingClosure) + return value } } } @@ -11878,33 +8634,28 @@ public struct DescribeEngineDefaultParametersOutput: Swift.Equatable { } } -struct DescribeEngineDefaultParametersOutputBody: Swift.Equatable { - let engineDefaults: NeptuneClientTypes.EngineDefaults? -} +enum DescribeEngineDefaultParametersOutputError { -extension DescribeEngineDefaultParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineDefaults = "EngineDefaults" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEngineDefaultParametersResult")) - let engineDefaultsDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.EngineDefaults.self, forKey: .engineDefaults) - engineDefaults = engineDefaultsDecoded - } -} - -enum DescribeEngineDefaultParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeEventCategoriesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case sourceType = "SourceType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -11950,51 +8701,15 @@ public struct DescribeEventCategoriesInput: Swift.Equatable { } } -struct DescribeEventCategoriesInputBody: Swift.Equatable { - let sourceType: Swift.String? - let filters: [NeptuneClientTypes.Filter]? -} +extension DescribeEventCategoriesOutput { -extension DescribeEventCategoriesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case sourceType = "SourceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} - -extension DescribeEventCategoriesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventCategoriesOutputBody = try responseDecoder.decode(responseBody: data) - self.eventCategoriesMapList = output.eventCategoriesMapList - } else { - self.eventCategoriesMapList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventCategoriesResult"] + var value = DescribeEventCategoriesOutput() + value.eventCategoriesMapList = try reader["EventCategoriesMapList"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.EventCategoriesMap.readingClosure, memberNodeInfo: "EventCategoriesMap", isFlattened: false) + return value } } } @@ -12011,50 +8726,30 @@ public struct DescribeEventCategoriesOutput: Swift.Equatable { } } -struct DescribeEventCategoriesOutputBody: Swift.Equatable { - let eventCategoriesMapList: [NeptuneClientTypes.EventCategoriesMap]? -} +enum DescribeEventCategoriesOutputError { -extension DescribeEventCategoriesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventCategoriesMapList = "EventCategoriesMapList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventCategoriesResult")) - if containerValues.contains(.eventCategoriesMapList) { - struct KeyVal0{struct EventCategoriesMap{}} - let eventCategoriesMapListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategoriesMapList) - if let eventCategoriesMapListWrappedContainer = eventCategoriesMapListWrappedContainer { - let eventCategoriesMapListContainer = try eventCategoriesMapListWrappedContainer.decodeIfPresent([NeptuneClientTypes.EventCategoriesMap].self, forKey: .member) - var eventCategoriesMapListBuffer:[NeptuneClientTypes.EventCategoriesMap]? = nil - if let eventCategoriesMapListContainer = eventCategoriesMapListContainer { - eventCategoriesMapListBuffer = [NeptuneClientTypes.EventCategoriesMap]() - for structureContainer0 in eventCategoriesMapListContainer { - eventCategoriesMapListBuffer?.append(structureContainer0) - } - } - eventCategoriesMapList = eventCategoriesMapListBuffer - } else { - eventCategoriesMapList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventCategoriesMapList = nil } } } -enum DescribeEventCategoriesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventSubscriptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case subscriptionName = "SubscriptionName" } -} -extension DescribeEventSubscriptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -12114,61 +8809,16 @@ public struct DescribeEventSubscriptionsInput: Swift.Equatable { } } -struct DescribeEventSubscriptionsInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeEventSubscriptionsOutput { -extension DescribeEventSubscriptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeEventSubscriptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventSubscriptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscriptionsList = output.eventSubscriptionsList - self.marker = output.marker - } else { - self.eventSubscriptionsList = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventSubscriptionsResult"] + var value = DescribeEventSubscriptionsOutput() + value.eventSubscriptionsList = try reader["EventSubscriptionsList"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.EventSubscription.readingClosure, memberNodeInfo: "EventSubscription", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -12189,55 +8839,36 @@ public struct DescribeEventSubscriptionsOutput: Swift.Equatable { } } -struct DescribeEventSubscriptionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let eventSubscriptionsList: [NeptuneClientTypes.EventSubscription]? -} - -extension DescribeEventSubscriptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscriptionsList = "EventSubscriptionsList" - case marker = "Marker" - } +enum DescribeEventSubscriptionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventSubscriptionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.eventSubscriptionsList) { - struct KeyVal0{struct EventSubscription{}} - let eventSubscriptionsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventSubscriptionsList) - if let eventSubscriptionsListWrappedContainer = eventSubscriptionsListWrappedContainer { - let eventSubscriptionsListContainer = try eventSubscriptionsListWrappedContainer.decodeIfPresent([NeptuneClientTypes.EventSubscription].self, forKey: .member) - var eventSubscriptionsListBuffer:[NeptuneClientTypes.EventSubscription]? = nil - if let eventSubscriptionsListContainer = eventSubscriptionsListContainer { - eventSubscriptionsListBuffer = [NeptuneClientTypes.EventSubscription]() - for structureContainer0 in eventSubscriptionsListContainer { - eventSubscriptionsListBuffer?.append(structureContainer0) - } - } - eventSubscriptionsList = eventSubscriptionsListBuffer - } else { - eventSubscriptionsList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventSubscriptionsList = nil } } } -enum DescribeEventSubscriptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case duration = "Duration" + case endTime = "EndTime" + case eventCategories = "EventCategories" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case sourceIdentifier = "SourceIdentifier" + case sourceType = "SourceType" + case startTime = "StartTime" } -} -extension DescribeEventsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let duration = duration { @@ -12353,98 +8984,16 @@ public struct DescribeEventsInput: Swift.Equatable { } } -struct DescribeEventsInputBody: Swift.Equatable { - let sourceIdentifier: Swift.String? - let sourceType: NeptuneClientTypes.SourceType? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let duration: Swift.Int? - let eventCategories: [Swift.String]? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeEventsOutput { -extension DescribeEventsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case duration = "Duration" - case endTime = "EndTime" - case eventCategories = "EventCategories" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case sourceIdentifier = "SourceIdentifier" - case sourceType = "SourceType" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeEventsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventsOutputBody = try responseDecoder.decode(responseBody: data) - self.events = output.events - self.marker = output.marker - } else { - self.events = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventsResult"] + var value = DescribeEventsOutput() + value.events = try reader["Events"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Event.readingClosure, memberNodeInfo: "Event", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -12465,54 +9014,29 @@ public struct DescribeEventsOutput: Swift.Equatable { } } -struct DescribeEventsOutputBody: Swift.Equatable { - let marker: Swift.String? - let events: [NeptuneClientTypes.Event]? -} - -extension DescribeEventsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Events" - case marker = "Marker" - } +enum DescribeEventsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.events) { - struct KeyVal0{struct Event{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Event].self, forKey: .member) - var eventsBuffer:[NeptuneClientTypes.Event]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [NeptuneClientTypes.Event]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - events = nil } } } -enum DescribeEventsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeGlobalClustersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalClusterIdentifier = "GlobalClusterIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeGlobalClustersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalClusterIdentifier = globalClusterIdentifier { @@ -12556,40 +9080,16 @@ public struct DescribeGlobalClustersInput: Swift.Equatable { } } -struct DescribeGlobalClustersInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeGlobalClustersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusterIdentifier = "GlobalClusterIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeGlobalClustersOutput { -extension DescribeGlobalClustersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeGlobalClustersOutputBody = try responseDecoder.decode(responseBody: data) - self.globalClusters = output.globalClusters - self.marker = output.marker - } else { - self.globalClusters = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeGlobalClustersResult"] + var value = DescribeGlobalClustersOutput() + value.globalClusters = try reader["GlobalClusters"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.GlobalCluster.readingClosure, memberNodeInfo: "GlobalClusterMember", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -12610,55 +9110,35 @@ public struct DescribeGlobalClustersOutput: Swift.Equatable { } } -struct DescribeGlobalClustersOutputBody: Swift.Equatable { - let marker: Swift.String? - let globalClusters: [NeptuneClientTypes.GlobalCluster]? -} +enum DescribeGlobalClustersOutputError { -extension DescribeGlobalClustersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusters = "GlobalClusters" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeGlobalClustersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.globalClusters) { - struct KeyVal0{struct GlobalClusterMember{}} - let globalClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalClusters) - if let globalClustersWrappedContainer = globalClustersWrappedContainer { - let globalClustersContainer = try globalClustersWrappedContainer.decodeIfPresent([NeptuneClientTypes.GlobalCluster].self, forKey: .member) - var globalClustersBuffer:[NeptuneClientTypes.GlobalCluster]? = nil - if let globalClustersContainer = globalClustersContainer { - globalClustersBuffer = [NeptuneClientTypes.GlobalCluster]() - for structureContainer0 in globalClustersContainer { - globalClustersBuffer?.append(structureContainer0) - } - } - globalClusters = globalClustersBuffer - } else { - globalClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - globalClusters = nil } } } -enum DescribeGlobalClustersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeOrderableDBInstanceOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceClass = "DBInstanceClass" + case engine = "Engine" + case engineVersion = "EngineVersion" + case filters = "Filters" + case licenseModel = "LicenseModel" + case marker = "Marker" + case maxRecords = "MaxRecords" + case vpc = "Vpc" } -} -extension DescribeOrderableDBInstanceOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceClass = dbInstanceClass { @@ -12747,77 +9227,16 @@ public struct DescribeOrderableDBInstanceOptionsInput: Swift.Equatable { } } -struct DescribeOrderableDBInstanceOptionsInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbInstanceClass: Swift.String? - let licenseModel: Swift.String? - let vpc: Swift.Bool? - let filters: [NeptuneClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeOrderableDBInstanceOptionsOutput { -extension DescribeOrderableDBInstanceOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceClass = "DBInstanceClass" - case engine = "Engine" - case engineVersion = "EngineVersion" - case filters = "Filters" - case licenseModel = "LicenseModel" - case marker = "Marker" - case maxRecords = "MaxRecords" - case vpc = "Vpc" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let vpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .vpc) - vpc = vpcDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeOrderableDBInstanceOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeOrderableDBInstanceOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.orderableDBInstanceOptions = output.orderableDBInstanceOptions - } else { - self.marker = nil - self.orderableDBInstanceOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeOrderableDBInstanceOptionsResult"] + var value = DescribeOrderableDBInstanceOptionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.orderableDBInstanceOptions = try reader["OrderableDBInstanceOptions"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.OrderableDBInstanceOption.readingClosure, memberNodeInfo: "OrderableDBInstanceOption", isFlattened: false) + return value } } } @@ -12838,54 +9257,30 @@ public struct DescribeOrderableDBInstanceOptionsOutput: Swift.Equatable { } } -struct DescribeOrderableDBInstanceOptionsOutputBody: Swift.Equatable { - let orderableDBInstanceOptions: [NeptuneClientTypes.OrderableDBInstanceOption]? - let marker: Swift.String? -} +enum DescribeOrderableDBInstanceOptionsOutputError { -extension DescribeOrderableDBInstanceOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case orderableDBInstanceOptions = "OrderableDBInstanceOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeOrderableDBInstanceOptionsResult")) - if containerValues.contains(.orderableDBInstanceOptions) { - struct KeyVal0{struct OrderableDBInstanceOption{}} - let orderableDBInstanceOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .orderableDBInstanceOptions) - if let orderableDBInstanceOptionsWrappedContainer = orderableDBInstanceOptionsWrappedContainer { - let orderableDBInstanceOptionsContainer = try orderableDBInstanceOptionsWrappedContainer.decodeIfPresent([NeptuneClientTypes.OrderableDBInstanceOption].self, forKey: .member) - var orderableDBInstanceOptionsBuffer:[NeptuneClientTypes.OrderableDBInstanceOption]? = nil - if let orderableDBInstanceOptionsContainer = orderableDBInstanceOptionsContainer { - orderableDBInstanceOptionsBuffer = [NeptuneClientTypes.OrderableDBInstanceOption]() - for structureContainer0 in orderableDBInstanceOptionsContainer { - orderableDBInstanceOptionsBuffer?.append(structureContainer0) - } - } - orderableDBInstanceOptions = orderableDBInstanceOptionsBuffer - } else { - orderableDBInstanceOptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - orderableDBInstanceOptions = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeOrderableDBInstanceOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribePendingMaintenanceActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case resourceIdentifier = "ResourceIdentifier" } -} -extension DescribePendingMaintenanceActionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -12949,61 +9344,16 @@ public struct DescribePendingMaintenanceActionsInput: Swift.Equatable { } } -struct DescribePendingMaintenanceActionsInputBody: Swift.Equatable { - let resourceIdentifier: Swift.String? - let filters: [NeptuneClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribePendingMaintenanceActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case resourceIdentifier = "ResourceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribePendingMaintenanceActionsOutput { -extension DescribePendingMaintenanceActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePendingMaintenanceActionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.pendingMaintenanceActions = output.pendingMaintenanceActions - } else { - self.marker = nil - self.pendingMaintenanceActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribePendingMaintenanceActionsResult"] + var value = DescribePendingMaintenanceActionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.pendingMaintenanceActions = try reader["PendingMaintenanceActions"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.ResourcePendingMaintenanceActions.readingClosure, memberNodeInfo: "ResourcePendingMaintenanceActions", isFlattened: false) + return value } } } @@ -13024,55 +9374,28 @@ public struct DescribePendingMaintenanceActionsOutput: Swift.Equatable { } } -struct DescribePendingMaintenanceActionsOutputBody: Swift.Equatable { - let pendingMaintenanceActions: [NeptuneClientTypes.ResourcePendingMaintenanceActions]? - let marker: Swift.String? -} +enum DescribePendingMaintenanceActionsOutputError { -extension DescribePendingMaintenanceActionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case pendingMaintenanceActions = "PendingMaintenanceActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribePendingMaintenanceActionsResult")) - if containerValues.contains(.pendingMaintenanceActions) { - struct KeyVal0{struct ResourcePendingMaintenanceActions{}} - let pendingMaintenanceActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .pendingMaintenanceActions) - if let pendingMaintenanceActionsWrappedContainer = pendingMaintenanceActionsWrappedContainer { - let pendingMaintenanceActionsContainer = try pendingMaintenanceActionsWrappedContainer.decodeIfPresent([NeptuneClientTypes.ResourcePendingMaintenanceActions].self, forKey: .member) - var pendingMaintenanceActionsBuffer:[NeptuneClientTypes.ResourcePendingMaintenanceActions]? = nil - if let pendingMaintenanceActionsContainer = pendingMaintenanceActionsContainer { - pendingMaintenanceActionsBuffer = [NeptuneClientTypes.ResourcePendingMaintenanceActions]() - for structureContainer0 in pendingMaintenanceActionsContainer { - pendingMaintenanceActionsBuffer?.append(structureContainer0) - } - } - pendingMaintenanceActions = pendingMaintenanceActionsBuffer - } else { - pendingMaintenanceActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - pendingMaintenanceActions = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribePendingMaintenanceActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeValidDBInstanceModificationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" } -} -extension DescribeValidDBInstanceModificationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -13103,30 +9426,15 @@ public struct DescribeValidDBInstanceModificationsInput: Swift.Equatable { } } -struct DescribeValidDBInstanceModificationsInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? -} - -extension DescribeValidDBInstanceModificationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - } -} +extension DescribeValidDBInstanceModificationsOutput { -extension DescribeValidDBInstanceModificationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeValidDBInstanceModificationsOutputBody = try responseDecoder.decode(responseBody: data) - self.validDBInstanceModificationsMessage = output.validDBInstanceModificationsMessage - } else { - self.validDBInstanceModificationsMessage = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeValidDBInstanceModificationsResult"] + var value = DescribeValidDBInstanceModificationsOutput() + value.validDBInstanceModificationsMessage = try reader["ValidDBInstanceModificationsMessage"].readIfPresent(readingClosure: NeptuneClientTypes.ValidDBInstanceModificationsMessage.readingClosure) + return value } } } @@ -13143,35 +9451,25 @@ public struct DescribeValidDBInstanceModificationsOutput: Swift.Equatable { } } -struct DescribeValidDBInstanceModificationsOutputBody: Swift.Equatable { - let validDBInstanceModificationsMessage: NeptuneClientTypes.ValidDBInstanceModificationsMessage? -} - -extension DescribeValidDBInstanceModificationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case validDBInstanceModificationsMessage = "ValidDBInstanceModificationsMessage" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeValidDBInstanceModificationsResult")) - let validDBInstanceModificationsMessageDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ValidDBInstanceModificationsMessage.self, forKey: .validDBInstanceModificationsMessage) - validDBInstanceModificationsMessage = validDBInstanceModificationsMessageDecoded - } -} +enum DescribeValidDBInstanceModificationsOutputError { -enum DescribeValidDBInstanceModificationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension NeptuneClientTypes.DomainMembership: Swift.Codable { +extension NeptuneClientTypes.DomainMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case domain = "Domain" case fqdn = "FQDN" @@ -13195,16 +9493,16 @@ extension NeptuneClientTypes.DomainMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let fqdnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fqdn) - fqdn = fqdnDecoded - let iamRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleName) - iamRoleName = iamRoleNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DomainMembership() + value.domain = try reader["Domain"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.fqdn = try reader["FQDN"].readIfPresent() + value.iamRoleName = try reader["IAMRoleName"].readIfPresent() + return value + } } } @@ -13237,16 +9535,14 @@ extension NeptuneClientTypes { } extension DomainNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DomainNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13275,23 +9571,7 @@ public struct DomainNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct DomainNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DomainNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.DoubleRange: Swift.Codable { +extension NeptuneClientTypes.DoubleRange: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case from = "From" case to = "To" @@ -13307,12 +9587,14 @@ extension NeptuneClientTypes.DoubleRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .from) - from = fromDecoded - let toDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .to) - to = toDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.DoubleRange() + value.from = try reader["From"].readIfPresent() + value.to = try reader["To"].readIfPresent() + return value + } } } @@ -13336,7 +9618,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.Endpoint: Swift.Codable { +extension NeptuneClientTypes.Endpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case address = "Address" case hostedZoneId = "HostedZoneId" @@ -13356,14 +9638,15 @@ extension NeptuneClientTypes.Endpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.Endpoint() + value.address = try reader["Address"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + return value + } } } @@ -13391,7 +9674,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.EngineDefaults: Swift.Codable { +extension NeptuneClientTypes.EngineDefaults: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbParameterGroupFamily = "DBParameterGroupFamily" case marker = "Marker" @@ -13420,30 +9703,14 @@ extension NeptuneClientTypes.EngineDefaults: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[NeptuneClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [NeptuneClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.EngineDefaults() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -13472,7 +9739,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.Event: Swift.Codable { +extension NeptuneClientTypes.Event: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case date = "Date" case eventCategories = "EventCategories" @@ -13513,37 +9780,18 @@ extension NeptuneClientTypes.Event: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.Event() + value.sourceIdentifier = try reader["SourceIdentifier"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.eventCategories = try reader["EventCategories"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + value.sourceArn = try reader["SourceArn"].readIfPresent() + return value } - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded } } @@ -13583,7 +9831,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.EventCategoriesMap: Swift.Codable { +extension NeptuneClientTypes.EventCategoriesMap: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case eventCategories = "EventCategories" case sourceType = "SourceType" @@ -13608,28 +9856,13 @@ extension NeptuneClientTypes.EventCategoriesMap: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.EventCategoriesMap() + value.sourceType = try reader["SourceType"].readIfPresent() + value.eventCategories = try reader["EventCategories"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + return value } } } @@ -13654,7 +9887,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.EventSubscription: Swift.Codable { +extension NeptuneClientTypes.EventSubscription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case custSubscriptionId = "CustSubscriptionId" case customerAwsId = "CustomerAwsId" @@ -13720,62 +9953,22 @@ extension NeptuneClientTypes.EventSubscription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerAwsIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerAwsId) - customerAwsId = customerAwsIdDecoded - let custSubscriptionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .custSubscriptionId) - custSubscriptionId = custSubscriptionIdDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let subscriptionCreationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionCreationTime) - subscriptionCreationTime = subscriptionCreationTimeDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.sourceIdsList) { - struct KeyVal0{struct SourceId{}} - let sourceIdsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIdsList) - if let sourceIdsListWrappedContainer = sourceIdsListWrappedContainer { - let sourceIdsListContainer = try sourceIdsListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsListBuffer:[Swift.String]? = nil - if let sourceIdsListContainer = sourceIdsListContainer { - sourceIdsListBuffer = [Swift.String]() - for stringContainer0 in sourceIdsListContainer { - sourceIdsListBuffer?.append(stringContainer0) - } - } - sourceIdsList = sourceIdsListBuffer - } else { - sourceIdsList = [] - } - } else { - sourceIdsList = nil - } - if containerValues.contains(.eventCategoriesList) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategoriesList) - if let eventCategoriesListWrappedContainer = eventCategoriesListWrappedContainer { - let eventCategoriesListContainer = try eventCategoriesListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesListBuffer:[Swift.String]? = nil - if let eventCategoriesListContainer = eventCategoriesListContainer { - eventCategoriesListBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesListContainer { - eventCategoriesListBuffer?.append(stringContainer0) - } - } - eventCategoriesList = eventCategoriesListBuffer - } else { - eventCategoriesList = [] - } - } else { - eventCategoriesList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.EventSubscription() + value.customerAwsId = try reader["CustomerAwsId"].readIfPresent() + value.custSubscriptionId = try reader["CustSubscriptionId"].readIfPresent() + value.snsTopicArn = try reader["SnsTopicArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.subscriptionCreationTime = try reader["SubscriptionCreationTime"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.sourceIdsList = try reader["SourceIdsList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SourceId", isFlattened: false) + value.eventCategoriesList = try reader["EventCategoriesList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.enabled = try reader["Enabled"].readIfPresent() + value.eventSubscriptionArn = try reader["EventSubscriptionArn"].readIfPresent() + return value } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let eventSubscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventSubscriptionArn) - eventSubscriptionArn = eventSubscriptionArnDecoded } } @@ -13832,16 +10025,14 @@ extension NeptuneClientTypes { } extension EventSubscriptionQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EventSubscriptionQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13870,23 +10061,12 @@ public struct EventSubscriptionQuotaExceededFault: ClientRuntime.ModeledError, A } } -struct EventSubscriptionQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EventSubscriptionQuotaExceededFaultBody: Swift.Decodable { +extension FailoverDBClusterInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dbClusterIdentifier = "DBClusterIdentifier" + case targetDBInstanceIdentifier = "TargetDBInstanceIdentifier" } -} -extension FailoverDBClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -13925,34 +10105,15 @@ public struct FailoverDBClusterInput: Swift.Equatable { } } -struct FailoverDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let targetDBInstanceIdentifier: Swift.String? -} - -extension FailoverDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case targetDBInstanceIdentifier = "TargetDBInstanceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let targetDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBInstanceIdentifier) - targetDBInstanceIdentifier = targetDBInstanceIdentifierDecoded - } -} +extension FailoverDBClusterOutput { -extension FailoverDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: FailoverDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["FailoverDBClusterResult"] + var value = FailoverDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -13969,36 +10130,31 @@ public struct FailoverDBClusterOutput: Swift.Equatable { } } -struct FailoverDBClusterOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension FailoverDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("FailoverDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum FailoverDBClusterOutputError { -enum FailoverDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension FailoverGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalClusterIdentifier = "GlobalClusterIdentifier" + case targetDbClusterIdentifier = "TargetDbClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalClusterIdentifier = globalClusterIdentifier { @@ -14037,34 +10193,15 @@ public struct FailoverGlobalClusterInput: Swift.Equatable { } } -struct FailoverGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let targetDbClusterIdentifier: Swift.String? -} - -extension FailoverGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusterIdentifier = "GlobalClusterIdentifier" - case targetDbClusterIdentifier = "TargetDbClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let targetDbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDbClusterIdentifier) - targetDbClusterIdentifier = targetDbClusterIdentifierDecoded - } -} +extension FailoverGlobalClusterOutput { -extension FailoverGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: FailoverGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["FailoverGlobalClusterResult"] + var value = FailoverGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: NeptuneClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -14081,37 +10218,27 @@ public struct FailoverGlobalClusterOutput: Swift.Equatable { } } -struct FailoverGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: NeptuneClientTypes.GlobalCluster? -} - -extension FailoverGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("FailoverGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum FailoverGlobalClusterOutputError { -enum FailoverGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension NeptuneClientTypes.Filter: Swift.Codable { +extension NeptuneClientTypes.Filter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case values = "Values" @@ -14136,28 +10263,13 @@ extension NeptuneClientTypes.Filter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct Value{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.Filter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Value", isFlattened: false) + return value } } } @@ -14184,7 +10296,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.GlobalCluster: Swift.Codable { +extension NeptuneClientTypes.GlobalCluster: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deletionProtection = "DeletionProtection" case engine = "Engine" @@ -14237,42 +10349,20 @@ extension NeptuneClientTypes.GlobalCluster: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let globalClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterResourceId) - globalClusterResourceId = globalClusterResourceIdDecoded - let globalClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterArn) - globalClusterArn = globalClusterArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - if containerValues.contains(.globalClusterMembers) { - struct KeyVal0{struct GlobalClusterMember{}} - let globalClusterMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalClusterMembers) - if let globalClusterMembersWrappedContainer = globalClusterMembersWrappedContainer { - let globalClusterMembersContainer = try globalClusterMembersWrappedContainer.decodeIfPresent([NeptuneClientTypes.GlobalClusterMember].self, forKey: .member) - var globalClusterMembersBuffer:[NeptuneClientTypes.GlobalClusterMember]? = nil - if let globalClusterMembersContainer = globalClusterMembersContainer { - globalClusterMembersBuffer = [NeptuneClientTypes.GlobalClusterMember]() - for structureContainer0 in globalClusterMembersContainer { - globalClusterMembersBuffer?.append(structureContainer0) - } - } - globalClusterMembers = globalClusterMembersBuffer - } else { - globalClusterMembers = [] - } - } else { - globalClusterMembers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.GlobalCluster() + value.globalClusterIdentifier = try reader["GlobalClusterIdentifier"].readIfPresent() + value.globalClusterResourceId = try reader["GlobalClusterResourceId"].readIfPresent() + value.globalClusterArn = try reader["GlobalClusterArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + value.globalClusterMembers = try reader["GlobalClusterMembers"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.GlobalClusterMember.readingClosure, memberNodeInfo: "GlobalClusterMember", isFlattened: false) + return value } } } @@ -14326,16 +10416,14 @@ extension NeptuneClientTypes { } extension GlobalClusterAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14364,23 +10452,7 @@ public struct GlobalClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct GlobalClusterAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.GlobalClusterMember: Swift.Codable { +extension NeptuneClientTypes.GlobalClusterMember: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterArn = "DBClusterArn" case isWriter = "IsWriter" @@ -14409,31 +10481,15 @@ extension NeptuneClientTypes.GlobalClusterMember: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterArn) - dbClusterArn = dbClusterArnDecoded - if containerValues.contains(.readers) { - struct KeyVal0{struct member{}} - let readersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readers) - if let readersWrappedContainer = readersWrappedContainer { - let readersContainer = try readersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readersBuffer:[Swift.String]? = nil - if let readersContainer = readersContainer { - readersBuffer = [Swift.String]() - for stringContainer0 in readersContainer { - readersBuffer?.append(stringContainer0) - } - } - readers = readersBuffer - } else { - readers = [] - } - } else { - readers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.GlobalClusterMember() + value.dbClusterArn = try reader["DBClusterArn"].readIfPresent() + value.readers = try reader["Readers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isWriter = try reader["IsWriter"].readIfPresent() + return value } - let isWriterDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isWriter) - isWriter = isWriterDecoded } } @@ -14462,16 +10518,14 @@ extension NeptuneClientTypes { } extension GlobalClusterNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14500,33 +10554,15 @@ public struct GlobalClusterNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct GlobalClusterNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension GlobalClusterQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14555,33 +10591,15 @@ public struct GlobalClusterQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct GlobalClusterQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InstanceQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InstanceQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14610,33 +10628,15 @@ public struct InstanceQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct InstanceQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InstanceQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientDBClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientDBClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14665,33 +10665,15 @@ public struct InsufficientDBClusterCapacityFault: ClientRuntime.ModeledError, AW } } -struct InsufficientDBClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientDBClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientDBInstanceCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientDBInstanceCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14720,33 +10702,15 @@ public struct InsufficientDBInstanceCapacityFault: ClientRuntime.ModeledError, A } } -struct InsufficientDBInstanceCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientDBInstanceCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientStorageClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientStorageClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14775,33 +10739,15 @@ public struct InsufficientStorageClusterCapacityFault: ClientRuntime.ModeledErro } } -struct InsufficientStorageClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientStorageClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterEndpointStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterEndpointStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14830,33 +10776,15 @@ public struct InvalidDBClusterEndpointStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidDBClusterEndpointStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterEndpointStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14885,33 +10813,15 @@ public struct InvalidDBClusterSnapshotStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidDBClusterSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14940,33 +10850,15 @@ public struct InvalidDBClusterStateFault: ClientRuntime.ModeledError, AWSClientR } } -struct InvalidDBClusterStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBInstanceStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBInstanceStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14995,33 +10887,15 @@ public struct InvalidDBInstanceStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidDBInstanceStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBInstanceStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBParameterGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBParameterGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15050,33 +10924,15 @@ public struct InvalidDBParameterGroupStateFault: ClientRuntime.ModeledError, AWS } } -struct InvalidDBParameterGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBParameterGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSecurityGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSecurityGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15098,40 +10954,22 @@ public struct InvalidDBSecurityGroupStateFault: ClientRuntime.ModeledError, AWSC public internal(set) var requestID: Swift.String? public init( - message: Swift.String? = nil - ) - { - self.properties.message = message - } -} - -struct InvalidDBSecurityGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSecurityGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + message: Swift.String? = nil + ) + { + self.properties.message = message } } extension InvalidDBSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15160,33 +10998,15 @@ public struct InvalidDBSnapshotStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidDBSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSubnetGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSubnetGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15215,33 +11035,15 @@ public struct InvalidDBSubnetGroupStateFault: ClientRuntime.ModeledError, AWSCli } } -struct InvalidDBSubnetGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSubnetGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSubnetStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSubnetStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15270,33 +11072,15 @@ public struct InvalidDBSubnetStateFault: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidDBSubnetStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSubnetStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidEventSubscriptionStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidEventSubscriptionStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15325,33 +11109,15 @@ public struct InvalidEventSubscriptionStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidEventSubscriptionStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidEventSubscriptionStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidGlobalClusterStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidGlobalClusterStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15380,33 +11146,15 @@ public struct InvalidGlobalClusterStateFault: ClientRuntime.ModeledError, AWSCli } } -struct InvalidGlobalClusterStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidGlobalClusterStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidRestoreFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRestoreFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15435,33 +11183,15 @@ public struct InvalidRestoreFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct InvalidRestoreFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRestoreFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSubnet { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSubnet() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15490,33 +11220,15 @@ public struct InvalidSubnet: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct InvalidSubnetBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSubnetBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidVPCNetworkStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidVPCNetworkStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15545,33 +11257,15 @@ public struct InvalidVPCNetworkStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidVPCNetworkStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidVPCNetworkStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension KMSKeyNotAccessibleFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSKeyNotAccessibleFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15600,23 +11294,12 @@ public struct KMSKeyNotAccessibleFault: ClientRuntime.ModeledError, AWSClientRun } } -struct KMSKeyNotAccessibleFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSKeyNotAccessibleFaultBody: Swift.Decodable { +extension ListTagsForResourceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case filters = "Filters" + case resourceName = "ResourceName" } -} -extension ListTagsForResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -15663,51 +11346,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -struct ListTagsForResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let filters: [NeptuneClientTypes.Filter]? -} - -extension ListTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case resourceName = "ResourceName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[NeptuneClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [NeptuneClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension ListTagsForResourceOutput { -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tagList = output.tagList - } else { - self.tagList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTagsForResourceResult"] + var value = ListTagsForResourceOutput() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -15724,53 +11371,33 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let tagList: [NeptuneClientTypes.Tag]? -} +enum ListTagsForResourceOutputError { -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagList = "TagList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTagsForResourceResult")) - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tagList = nil } } } -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyDBClusterEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" + case endpointType = "EndpointType" + case excludedMembers = "ExcludedMembers" + case staticMembers = "StaticMembers" } -} -extension ModifyDBClusterEndpointInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterEndpointIdentifier = dbClusterEndpointIdentifier { @@ -15840,94 +11467,24 @@ public struct ModifyDBClusterEndpointInput: Swift.Equatable { } } -struct ModifyDBClusterEndpointInputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? - let endpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? -} - -extension ModifyDBClusterEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - } +extension ModifyDBClusterEndpointOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil - } - } -} - -extension ModifyDBClusterEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.customEndpointType = output.customEndpointType - self.dbClusterEndpointArn = output.dbClusterEndpointArn - self.dbClusterEndpointIdentifier = output.dbClusterEndpointIdentifier - self.dbClusterEndpointResourceIdentifier = output.dbClusterEndpointResourceIdentifier - self.dbClusterIdentifier = output.dbClusterIdentifier - self.endpoint = output.endpoint - self.endpointType = output.endpointType - self.excludedMembers = output.excludedMembers - self.staticMembers = output.staticMembers - self.status = output.status - } else { - self.customEndpointType = nil - self.dbClusterEndpointArn = nil - self.dbClusterEndpointIdentifier = nil - self.dbClusterEndpointResourceIdentifier = nil - self.dbClusterIdentifier = nil - self.endpoint = nil - self.endpointType = nil - self.excludedMembers = nil - self.staticMembers = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterEndpointResult"] + var value = ModifyDBClusterEndpointOutput() + value.customEndpointType = try reader["CustomEndpointType"].readIfPresent() + value.dbClusterEndpointArn = try reader["DBClusterEndpointArn"].readIfPresent() + value.dbClusterEndpointIdentifier = try reader["DBClusterEndpointIdentifier"].readIfPresent() + value.dbClusterEndpointResourceIdentifier = try reader["DBClusterEndpointResourceIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.endpointType = try reader["EndpointType"].readIfPresent() + value.excludedMembers = try reader["ExcludedMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.staticMembers = try reader["StaticMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -15992,108 +11549,51 @@ public struct ModifyDBClusterEndpointOutput: Swift.Equatable { } } -struct ModifyDBClusterEndpointOutputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointResourceIdentifier: Swift.String? - let endpoint: Swift.String? - let status: Swift.String? - let endpointType: Swift.String? - let customEndpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? - let dbClusterEndpointArn: Swift.String? -} - -extension ModifyDBClusterEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customEndpointType = "CustomEndpointType" - case dbClusterEndpointArn = "DBClusterEndpointArn" - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterEndpointResourceIdentifier = "DBClusterEndpointResourceIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case endpoint = "Endpoint" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - case status = "Status" - } +enum ModifyDBClusterEndpointOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterEndpointResult")) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointResourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointResourceIdentifier) - dbClusterEndpointResourceIdentifier = dbClusterEndpointResourceIdentifierDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let customEndpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customEndpointType) - customEndpointType = customEndpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterEndpointNotFoundFault": return try await DBClusterEndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterEndpointStateFault": return try await InvalidDBClusterEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - excludedMembers = nil } - let dbClusterEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointArn) - dbClusterEndpointArn = dbClusterEndpointArnDecoded } } -enum ModifyDBClusterEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterEndpointNotFoundFault": return try await DBClusterEndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterEndpointStateFault": return try await InvalidDBClusterEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" + case applyImmediately = "ApplyImmediately" + case backupRetentionPeriod = "BackupRetentionPeriod" + case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbInstanceParameterGroupName = "DBInstanceParameterGroupName" + case deletionProtection = "DeletionProtection" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case engineVersion = "EngineVersion" + case masterUserPassword = "MasterUserPassword" + case newDBClusterIdentifier = "NewDBClusterIdentifier" + case optionGroupName = "OptionGroupName" + case port = "Port" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" + case storageType = "StorageType" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" } -} -extension ModifyDBClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowMajorVersionUpgrade = allowMajorVersionUpgrade { @@ -16298,123 +11798,15 @@ public struct ModifyDBClusterInput: Swift.Equatable { } } -struct ModifyDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let newDBClusterIdentifier: Swift.String? - let applyImmediately: Swift.Bool? - let backupRetentionPeriod: Swift.Int? - let dbClusterParameterGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let port: Swift.Int? - let masterUserPassword: Swift.String? - let optionGroupName: Swift.String? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let cloudwatchLogsExportConfiguration: NeptuneClientTypes.CloudwatchLogsExportConfiguration? - let engineVersion: Swift.String? - let allowMajorVersionUpgrade: Swift.Bool? - let dbInstanceParameterGroupName: Swift.String? - let deletionProtection: Swift.Bool? - let copyTagsToSnapshot: Swift.Bool? - let serverlessV2ScalingConfiguration: NeptuneClientTypes.ServerlessV2ScalingConfiguration? - let storageType: Swift.String? -} - -extension ModifyDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" - case applyImmediately = "ApplyImmediately" - case backupRetentionPeriod = "BackupRetentionPeriod" - case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbInstanceParameterGroupName = "DBInstanceParameterGroupName" - case deletionProtection = "DeletionProtection" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case engineVersion = "EngineVersion" - case masterUserPassword = "MasterUserPassword" - case newDBClusterIdentifier = "NewDBClusterIdentifier" - case optionGroupName = "OptionGroupName" - case port = "Port" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case storageType = "StorageType" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension ModifyDBClusterOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let newDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newDBClusterIdentifier) - newDBClusterIdentifier = newDBClusterIdentifierDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let cloudwatchLogsExportConfigurationDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.CloudwatchLogsExportConfiguration.self, forKey: .cloudwatchLogsExportConfiguration) - cloudwatchLogsExportConfiguration = cloudwatchLogsExportConfigurationDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let allowMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowMajorVersionUpgrade) - allowMajorVersionUpgrade = allowMajorVersionUpgradeDecoded - let dbInstanceParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceParameterGroupName) - dbInstanceParameterGroupName = dbInstanceParameterGroupNameDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - } -} - -extension ModifyDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterResult"] + var value = ModifyDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -16431,45 +11823,40 @@ public struct ModifyDBClusterOutput: Swift.Equatable { } } -struct ModifyDBClusterOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension ModifyDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum ModifyDBClusterOutputError { -enum ModifyDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case parameters = "Parameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -16517,51 +11904,15 @@ public struct ModifyDBClusterParameterGroupInput: Swift.Equatable { } } -struct ModifyDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let parameters: [NeptuneClientTypes.Parameter]? -} - -extension ModifyDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case parameters = "Parameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[NeptuneClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [NeptuneClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ModifyDBClusterParameterGroupOutput { -extension ModifyDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroupName = output.dbClusterParameterGroupName - } else { - self.dbClusterParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterParameterGroupResult"] + var value = ModifyDBClusterParameterGroupOutput() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + return value } } } @@ -16587,35 +11938,32 @@ public struct ModifyDBClusterParameterGroupOutput: Swift.Equatable { } } -struct ModifyDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension ModifyDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterParameterGroupResult")) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} +enum ModifyDBClusterParameterGroupOutputError { -enum ModifyDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBClusterSnapshotAttributeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeName = "AttributeName" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case valuesToAdd = "ValuesToAdd" + case valuesToRemove = "ValuesToRemove" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeName = attributeName { @@ -16677,85 +12025,24 @@ public struct ModifyDBClusterSnapshotAttributeInput: Swift.Equatable { dbClusterSnapshotIdentifier: Swift.String? = nil, valuesToAdd: [Swift.String]? = nil, valuesToRemove: [Swift.String]? = nil - ) - { - self.attributeName = attributeName - self.dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifier - self.valuesToAdd = valuesToAdd - self.valuesToRemove = valuesToRemove - } -} - -struct ModifyDBClusterSnapshotAttributeInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? - let attributeName: Swift.String? - let valuesToAdd: [Swift.String]? - let valuesToRemove: [Swift.String]? -} - -extension ModifyDBClusterSnapshotAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeName = "AttributeName" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case valuesToAdd = "ValuesToAdd" - case valuesToRemove = "ValuesToRemove" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.valuesToAdd) { - struct KeyVal0{struct AttributeValue{}} - let valuesToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valuesToAdd) - if let valuesToAddWrappedContainer = valuesToAddWrappedContainer { - let valuesToAddContainer = try valuesToAddWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesToAddBuffer:[Swift.String]? = nil - if let valuesToAddContainer = valuesToAddContainer { - valuesToAddBuffer = [Swift.String]() - for stringContainer0 in valuesToAddContainer { - valuesToAddBuffer?.append(stringContainer0) - } - } - valuesToAdd = valuesToAddBuffer - } else { - valuesToAdd = [] - } - } else { - valuesToAdd = nil - } - if containerValues.contains(.valuesToRemove) { - struct KeyVal0{struct AttributeValue{}} - let valuesToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valuesToRemove) - if let valuesToRemoveWrappedContainer = valuesToRemoveWrappedContainer { - let valuesToRemoveContainer = try valuesToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesToRemoveBuffer:[Swift.String]? = nil - if let valuesToRemoveContainer = valuesToRemoveContainer { - valuesToRemoveBuffer = [Swift.String]() - for stringContainer0 in valuesToRemoveContainer { - valuesToRemoveBuffer?.append(stringContainer0) - } - } - valuesToRemove = valuesToRemoveBuffer - } else { - valuesToRemove = [] - } - } else { - valuesToRemove = nil - } + ) + { + self.attributeName = attributeName + self.dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifier + self.valuesToAdd = valuesToAdd + self.valuesToRemove = valuesToRemove } } -extension ModifyDBClusterSnapshotAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterSnapshotAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshotAttributesResult = output.dbClusterSnapshotAttributesResult - } else { - self.dbClusterSnapshotAttributesResult = nil +extension ModifyDBClusterSnapshotAttributeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterSnapshotAttributeResult"] + var value = ModifyDBClusterSnapshotAttributeOutput() + value.dbClusterSnapshotAttributesResult = try reader["DBClusterSnapshotAttributesResult"].readIfPresent(readingClosure: NeptuneClientTypes.DBClusterSnapshotAttributesResult.readingClosure) + return value } } } @@ -16772,31 +12059,21 @@ public struct ModifyDBClusterSnapshotAttributeOutput: Swift.Equatable { } } -struct ModifyDBClusterSnapshotAttributeOutputBody: Swift.Equatable { - let dbClusterSnapshotAttributesResult: NeptuneClientTypes.DBClusterSnapshotAttributesResult? -} - -extension ModifyDBClusterSnapshotAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotAttributesResult = "DBClusterSnapshotAttributesResult" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterSnapshotAttributeResult")) - let dbClusterSnapshotAttributesResultDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBClusterSnapshotAttributesResult.self, forKey: .dbClusterSnapshotAttributesResult) - dbClusterSnapshotAttributesResult = dbClusterSnapshotAttributesResultDecoded - } -} +enum ModifyDBClusterSnapshotAttributeOutputError { -enum ModifyDBClusterSnapshotAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SharedSnapshotQuotaExceeded": return try await SharedSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SharedSnapshotQuotaExceeded": return try await SharedSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -16807,6 +12084,46 @@ extension ModifyDBInstanceInput: Swift.CustomDebugStringConvertible { } extension ModifyDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allocatedStorage = "AllocatedStorage" + case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" + case applyImmediately = "ApplyImmediately" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case backupRetentionPeriod = "BackupRetentionPeriod" + case caCertificateIdentifier = "CACertificateIdentifier" + case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbInstanceClass = "DBInstanceClass" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbParameterGroupName = "DBParameterGroupName" + case dbPortNumber = "DBPortNumber" + case dbSecurityGroups = "DBSecurityGroups" + case dbSubnetGroupName = "DBSubnetGroupName" + case deletionProtection = "DeletionProtection" + case domain = "Domain" + case domainIAMRoleName = "DomainIAMRoleName" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enablePerformanceInsights = "EnablePerformanceInsights" + case engineVersion = "EngineVersion" + case iops = "Iops" + case licenseModel = "LicenseModel" + case masterUserPassword = "MasterUserPassword" + case monitoringInterval = "MonitoringInterval" + case monitoringRoleArn = "MonitoringRoleArn" + case multiAZ = "MultiAZ" + case newDBInstanceIdentifier = "NewDBInstanceIdentifier" + case optionGroupName = "OptionGroupName" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case promotionTier = "PromotionTier" + case publiclyAccessible = "PubliclyAccessible" + case storageType = "StorageType" + case tdeCredentialArn = "TdeCredentialArn" + case tdeCredentialPassword = "TdeCredentialPassword" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -17131,208 +12448,15 @@ public struct ModifyDBInstanceInput: Swift.Equatable { } } -struct ModifyDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let allocatedStorage: Swift.Int? - let dbInstanceClass: Swift.String? - let dbSubnetGroupName: Swift.String? - let dbSecurityGroups: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let applyImmediately: Swift.Bool? - let masterUserPassword: Swift.String? - let dbParameterGroupName: Swift.String? - let backupRetentionPeriod: Swift.Int? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let multiAZ: Swift.Bool? - let engineVersion: Swift.String? - let allowMajorVersionUpgrade: Swift.Bool? - let autoMinorVersionUpgrade: Swift.Bool? - let licenseModel: Swift.String? - let iops: Swift.Int? - let optionGroupName: Swift.String? - let newDBInstanceIdentifier: Swift.String? - let storageType: Swift.String? - let tdeCredentialArn: Swift.String? - let tdeCredentialPassword: Swift.String? - let caCertificateIdentifier: Swift.String? - let domain: Swift.String? - let copyTagsToSnapshot: Swift.Bool? - let monitoringInterval: Swift.Int? - let dbPortNumber: Swift.Int? - let publiclyAccessible: Swift.Bool? - let monitoringRoleArn: Swift.String? - let domainIAMRoleName: Swift.String? - let promotionTier: Swift.Int? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let cloudwatchLogsExportConfiguration: NeptuneClientTypes.CloudwatchLogsExportConfiguration? - let deletionProtection: Swift.Bool? -} - -extension ModifyDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocatedStorage = "AllocatedStorage" - case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" - case applyImmediately = "ApplyImmediately" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case backupRetentionPeriod = "BackupRetentionPeriod" - case caCertificateIdentifier = "CACertificateIdentifier" - case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbInstanceClass = "DBInstanceClass" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbParameterGroupName = "DBParameterGroupName" - case dbPortNumber = "DBPortNumber" - case dbSecurityGroups = "DBSecurityGroups" - case dbSubnetGroupName = "DBSubnetGroupName" - case deletionProtection = "DeletionProtection" - case domain = "Domain" - case domainIAMRoleName = "DomainIAMRoleName" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case enablePerformanceInsights = "EnablePerformanceInsights" - case engineVersion = "EngineVersion" - case iops = "Iops" - case licenseModel = "LicenseModel" - case masterUserPassword = "MasterUserPassword" - case monitoringInterval = "MonitoringInterval" - case monitoringRoleArn = "MonitoringRoleArn" - case multiAZ = "MultiAZ" - case newDBInstanceIdentifier = "NewDBInstanceIdentifier" - case optionGroupName = "OptionGroupName" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case promotionTier = "PromotionTier" - case publiclyAccessible = "PubliclyAccessible" - case storageType = "StorageType" - case tdeCredentialArn = "TdeCredentialArn" - case tdeCredentialPassword = "TdeCredentialPassword" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension ModifyDBInstanceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - if containerValues.contains(.dbSecurityGroups) { - struct KeyVal0{struct DBSecurityGroupName{}} - let dbSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroups) - if let dbSecurityGroupsWrappedContainer = dbSecurityGroupsWrappedContainer { - let dbSecurityGroupsContainer = try dbSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbSecurityGroupsBuffer:[Swift.String]? = nil - if let dbSecurityGroupsContainer = dbSecurityGroupsContainer { - dbSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in dbSecurityGroupsContainer { - dbSecurityGroupsBuffer?.append(stringContainer0) - } - } - dbSecurityGroups = dbSecurityGroupsBuffer - } else { - dbSecurityGroups = [] - } - } else { - dbSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let allowMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowMajorVersionUpgrade) - allowMajorVersionUpgrade = allowMajorVersionUpgradeDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let newDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newDBInstanceIdentifier) - newDBInstanceIdentifier = newDBInstanceIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let tdeCredentialPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialPassword) - tdeCredentialPassword = tdeCredentialPasswordDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let dbPortNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dbPortNumber) - dbPortNumber = dbPortNumberDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let cloudwatchLogsExportConfigurationDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.CloudwatchLogsExportConfiguration.self, forKey: .cloudwatchLogsExportConfiguration) - cloudwatchLogsExportConfiguration = cloudwatchLogsExportConfigurationDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - } -} - -extension ModifyDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBInstanceResult"] + var value = ModifyDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: NeptuneClientTypes.DBInstance.readingClosure) + return value } } } @@ -17349,49 +12473,44 @@ public struct ModifyDBInstanceOutput: Swift.Equatable { } } -struct ModifyDBInstanceOutputBody: Swift.Equatable { - let dbInstance: NeptuneClientTypes.DBInstance? -} - -extension ModifyDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } +enum ModifyDBInstanceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum ModifyDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CertificateNotFound": return try await CertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBUpgradeDependencyFailure": return try await DBUpgradeDependencyFailureFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CertificateNotFound": return try await CertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBUpgradeDependencyFailure": return try await DBUpgradeDependencyFailureFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + case parameters = "Parameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -17441,51 +12560,15 @@ public struct ModifyDBParameterGroupInput: Swift.Equatable { } } -struct ModifyDBParameterGroupInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let parameters: [NeptuneClientTypes.Parameter]? -} - -extension ModifyDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - case parameters = "Parameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[NeptuneClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [NeptuneClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ModifyDBParameterGroupOutput { -extension ModifyDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroupName = output.dbParameterGroupName - } else { - self.dbParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBParameterGroupResult"] + var value = ModifyDBParameterGroupOutput() + value.dbParameterGroupName = try reader["DBParameterGroupName"].readIfPresent() + return value } } } @@ -17502,35 +12585,31 @@ public struct ModifyDBParameterGroupOutput: Swift.Equatable { } } -struct ModifyDBParameterGroupOutputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? -} - -extension ModifyDBParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBParameterGroupResult")) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - } -} +enum ModifyDBParameterGroupOutputError { -enum ModifyDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupDescription = "DBSubnetGroupDescription" + case dbSubnetGroupName = "DBSubnetGroupName" + case subnetIds = "SubnetIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupDescription = dbSubnetGroupDescription { @@ -17585,55 +12664,15 @@ public struct ModifyDBSubnetGroupInput: Swift.Equatable { } } -struct ModifyDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let dbSubnetGroupDescription: Swift.String? - let subnetIds: [Swift.String]? -} - -extension ModifyDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupDescription = "DBSubnetGroupDescription" - case dbSubnetGroupName = "DBSubnetGroupName" - case subnetIds = "SubnetIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - } -} +extension ModifyDBSubnetGroupOutput { -extension ModifyDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroup = output.dbSubnetGroup - } else { - self.dbSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBSubnetGroupResult"] + var value = ModifyDBSubnetGroupOutput() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: NeptuneClientTypes.DBSubnetGroup.readingClosure) + return value } } } @@ -17650,38 +12689,36 @@ public struct ModifyDBSubnetGroupOutput: Swift.Equatable { } } -struct ModifyDBSubnetGroupOutputBody: Swift.Equatable { - let dbSubnetGroup: NeptuneClientTypes.DBSubnetGroup? -} - -extension ModifyDBSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroup = "DBSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBSubnetGroupResult")) - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - } -} +enum ModifyDBSubnetGroupOutputError { -enum ModifyDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetAlreadyInUse": return try await SubnetAlreadyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetAlreadyInUse": return try await SubnetAlreadyInUse.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case eventCategories = "EventCategories" + case snsTopicArn = "SnsTopicArn" + case sourceType = "SourceType" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -17749,63 +12786,15 @@ public struct ModifyEventSubscriptionInput: Swift.Equatable { } } -struct ModifyEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let snsTopicArn: Swift.String? - let sourceType: Swift.String? - let eventCategories: [Swift.String]? - let enabled: Swift.Bool? -} - -extension ModifyEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case eventCategories = "EventCategories" - case snsTopicArn = "SnsTopicArn" - case sourceType = "SourceType" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - } -} +extension ModifyEventSubscriptionOutput { -extension ModifyEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyEventSubscriptionResult"] + var value = ModifyEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: NeptuneClientTypes.EventSubscription.readingClosure) + return value } } } @@ -17822,39 +12811,37 @@ public struct ModifyEventSubscriptionOutput: Swift.Equatable { } } -struct ModifyEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: NeptuneClientTypes.EventSubscription? -} - -extension ModifyEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum ModifyEventSubscriptionOutputError { -enum ModifyEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSInvalidTopic": return try await SNSInvalidTopicFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSNoAuthorization": return try await SNSNoAuthorizationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSInvalidTopic": return try await SNSInvalidTopicFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSNoAuthorization": return try await SNSNoAuthorizationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" + case deletionProtection = "DeletionProtection" + case engineVersion = "EngineVersion" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case newGlobalClusterIdentifier = "NewGlobalClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowMajorVersionUpgrade = allowMajorVersionUpgrade { @@ -17922,46 +12909,15 @@ public struct ModifyGlobalClusterInput: Swift.Equatable { } } -struct ModifyGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let newGlobalClusterIdentifier: Swift.String? - let deletionProtection: Swift.Bool? - let engineVersion: Swift.String? - let allowMajorVersionUpgrade: Swift.Bool? -} - -extension ModifyGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" - case deletionProtection = "DeletionProtection" - case engineVersion = "EngineVersion" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case newGlobalClusterIdentifier = "NewGlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let newGlobalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newGlobalClusterIdentifier) - newGlobalClusterIdentifier = newGlobalClusterIdentifierDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let allowMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowMajorVersionUpgrade) - allowMajorVersionUpgrade = allowMajorVersionUpgradeDecoded - } -} +extension ModifyGlobalClusterOutput { -extension ModifyGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyGlobalClusterResult"] + var value = ModifyGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: NeptuneClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -17978,37 +12934,27 @@ public struct ModifyGlobalClusterOutput: Swift.Equatable { } } -struct ModifyGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: NeptuneClientTypes.GlobalCluster? -} - -extension ModifyGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum ModifyGlobalClusterOutputError { -enum ModifyGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } public enum NeptuneClientTypes {} -extension NeptuneClientTypes.OptionGroupMembership: Swift.Codable { +extension NeptuneClientTypes.OptionGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case optionGroupName = "OptionGroupName" case status = "Status" @@ -18024,12 +12970,14 @@ extension NeptuneClientTypes.OptionGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.OptionGroupMembership() + value.optionGroupName = try reader["OptionGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -18054,16 +13002,14 @@ extension NeptuneClientTypes { } extension OptionGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OptionGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18092,23 +13038,7 @@ public struct OptionGroupNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct OptionGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension OptionGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.OrderableDBInstanceOption: Swift.Codable { +extension NeptuneClientTypes.OrderableDBInstanceOption: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZones = "AvailabilityZones" case dbInstanceClass = "DBInstanceClass" @@ -18209,67 +13139,33 @@ extension NeptuneClientTypes.OrderableDBInstanceOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([NeptuneClientTypes.AvailabilityZone].self, forKey: .member) - var availabilityZonesBuffer:[NeptuneClientTypes.AvailabilityZone]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [NeptuneClientTypes.AvailabilityZone]() - for structureContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(structureContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let multiAZCapableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZCapable) - multiAZCapable = multiAZCapableDecoded - let readReplicaCapableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .readReplicaCapable) - readReplicaCapable = readReplicaCapableDecoded - let vpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .vpc) - vpc = vpcDecoded - let supportsStorageEncryptionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsStorageEncryption) - supportsStorageEncryption = supportsStorageEncryptionDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let supportsIopsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIops) - supportsIops = supportsIopsDecoded - let supportsEnhancedMonitoringDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsEnhancedMonitoring) - supportsEnhancedMonitoring = supportsEnhancedMonitoringDecoded - let supportsIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIAMDatabaseAuthentication) - supportsIAMDatabaseAuthentication = supportsIAMDatabaseAuthenticationDecoded - let supportsPerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsPerformanceInsights) - supportsPerformanceInsights = supportsPerformanceInsightsDecoded - let minStorageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minStorageSize) - minStorageSize = minStorageSizeDecoded - let maxStorageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxStorageSize) - maxStorageSize = maxStorageSizeDecoded - let minIopsPerDbInstanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minIopsPerDbInstance) - minIopsPerDbInstance = minIopsPerDbInstanceDecoded - let maxIopsPerDbInstanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxIopsPerDbInstance) - maxIopsPerDbInstance = maxIopsPerDbInstanceDecoded - let minIopsPerGibDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minIopsPerGib) - minIopsPerGib = minIopsPerGibDecoded - let maxIopsPerGibDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxIopsPerGib) - maxIopsPerGib = maxIopsPerGibDecoded - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.OrderableDBInstanceOption() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.AvailabilityZone.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.multiAZCapable = try reader["MultiAZCapable"].readIfPresent() + value.readReplicaCapable = try reader["ReadReplicaCapable"].readIfPresent() + value.vpc = try reader["Vpc"].readIfPresent() + value.supportsStorageEncryption = try reader["SupportsStorageEncryption"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.supportsIops = try reader["SupportsIops"].readIfPresent() + value.supportsEnhancedMonitoring = try reader["SupportsEnhancedMonitoring"].readIfPresent() + value.supportsIAMDatabaseAuthentication = try reader["SupportsIAMDatabaseAuthentication"].readIfPresent() + value.supportsPerformanceInsights = try reader["SupportsPerformanceInsights"].readIfPresent() + value.minStorageSize = try reader["MinStorageSize"].readIfPresent() + value.maxStorageSize = try reader["MaxStorageSize"].readIfPresent() + value.minIopsPerDbInstance = try reader["MinIopsPerDbInstance"].readIfPresent() + value.maxIopsPerDbInstance = try reader["MaxIopsPerDbInstance"].readIfPresent() + value.minIopsPerGib = try reader["MinIopsPerGib"].readIfPresent() + value.maxIopsPerGib = try reader["MaxIopsPerGib"].readIfPresent() + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + return value + } } } @@ -18369,7 +13265,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.Parameter: Swift.Codable { +extension NeptuneClientTypes.Parameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case applyMethod = "ApplyMethod" @@ -18417,28 +13313,22 @@ extension NeptuneClientTypes.Parameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterName) - parameterName = parameterNameDecoded - let parameterValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterValue) - parameterValue = parameterValueDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let applyTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyType) - applyType = applyTypeDecoded - let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) - dataType = dataTypeDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded - let isModifiableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isModifiable) - isModifiable = isModifiableDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let applyMethodDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ApplyMethod.self, forKey: .applyMethod) - applyMethod = applyMethodDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.Parameter() + value.parameterName = try reader["ParameterName"].readIfPresent() + value.parameterValue = try reader["ParameterValue"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.applyType = try reader["ApplyType"].readIfPresent() + value.dataType = try reader["DataType"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + value.isModifiable = try reader["IsModifiable"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.applyMethod = try reader["ApplyMethod"].readIfPresent() + return value + } } } @@ -18494,7 +13384,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.PendingCloudwatchLogsExports: Swift.Codable { +extension NeptuneClientTypes.PendingCloudwatchLogsExports: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logTypesToDisable = "LogTypesToDisable" case logTypesToEnable = "LogTypesToEnable" @@ -18528,45 +13418,13 @@ extension NeptuneClientTypes.PendingCloudwatchLogsExports: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.logTypesToEnable) { - struct KeyVal0{struct member{}} - let logTypesToEnableWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logTypesToEnable) - if let logTypesToEnableWrappedContainer = logTypesToEnableWrappedContainer { - let logTypesToEnableContainer = try logTypesToEnableWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logTypesToEnableBuffer:[Swift.String]? = nil - if let logTypesToEnableContainer = logTypesToEnableContainer { - logTypesToEnableBuffer = [Swift.String]() - for stringContainer0 in logTypesToEnableContainer { - logTypesToEnableBuffer?.append(stringContainer0) - } - } - logTypesToEnable = logTypesToEnableBuffer - } else { - logTypesToEnable = [] - } - } else { - logTypesToEnable = nil - } - if containerValues.contains(.logTypesToDisable) { - struct KeyVal0{struct member{}} - let logTypesToDisableWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logTypesToDisable) - if let logTypesToDisableWrappedContainer = logTypesToDisableWrappedContainer { - let logTypesToDisableContainer = try logTypesToDisableWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logTypesToDisableBuffer:[Swift.String]? = nil - if let logTypesToDisableContainer = logTypesToDisableContainer { - logTypesToDisableBuffer = [Swift.String]() - for stringContainer0 in logTypesToDisableContainer { - logTypesToDisableBuffer?.append(stringContainer0) - } - } - logTypesToDisable = logTypesToDisableBuffer - } else { - logTypesToDisable = [] - } - } else { - logTypesToDisable = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.PendingCloudwatchLogsExports() + value.logTypesToEnable = try reader["LogTypesToEnable"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.logTypesToDisable = try reader["LogTypesToDisable"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -18591,7 +13449,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.PendingMaintenanceAction: Swift.Codable { +extension NeptuneClientTypes.PendingMaintenanceAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case action = "Action" case autoAppliedAfterDate = "AutoAppliedAfterDate" @@ -18623,20 +13481,18 @@ extension NeptuneClientTypes.PendingMaintenanceAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .action) - action = actionDecoded - let autoAppliedAfterDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .autoAppliedAfterDate) - autoAppliedAfterDate = autoAppliedAfterDateDecoded - let forcedApplyDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .forcedApplyDate) - forcedApplyDate = forcedApplyDateDecoded - let optInStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optInStatus) - optInStatus = optInStatusDecoded - let currentApplyDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .currentApplyDate) - currentApplyDate = currentApplyDateDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.PendingMaintenanceAction() + value.action = try reader["Action"].readIfPresent() + value.autoAppliedAfterDate = try reader["AutoAppliedAfterDate"].readTimestampIfPresent(format: .dateTime) + value.forcedApplyDate = try reader["ForcedApplyDate"].readTimestampIfPresent(format: .dateTime) + value.optInStatus = try reader["OptInStatus"].readIfPresent() + value.currentApplyDate = try reader["CurrentApplyDate"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -18676,7 +13532,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.PendingModifiedValues: Swift.Codable { +extension NeptuneClientTypes.PendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case backupRetentionPeriod = "BackupRetentionPeriod" @@ -18740,36 +13596,26 @@ extension NeptuneClientTypes.PendingModifiedValues: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let pendingCloudwatchLogsExportsDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.PendingCloudwatchLogsExports.self, forKey: .pendingCloudwatchLogsExports) - pendingCloudwatchLogsExports = pendingCloudwatchLogsExportsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.PendingModifiedValues() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.masterUserPassword = try reader["MasterUserPassword"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.caCertificateIdentifier = try reader["CACertificateIdentifier"].readIfPresent() + value.dbSubnetGroupName = try reader["DBSubnetGroupName"].readIfPresent() + value.pendingCloudwatchLogsExports = try reader["PendingCloudwatchLogsExports"].readIfPresent(readingClosure: NeptuneClientTypes.PendingCloudwatchLogsExports.readingClosure) + return value + } } } @@ -18842,6 +13688,10 @@ extension NeptuneClientTypes { } extension PromoteReadReplicaDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -18872,30 +13722,15 @@ public struct PromoteReadReplicaDBClusterInput: Swift.Equatable { } } -struct PromoteReadReplicaDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} - -extension PromoteReadReplicaDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} +extension PromoteReadReplicaDBClusterOutput { -extension PromoteReadReplicaDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PromoteReadReplicaDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PromoteReadReplicaDBClusterResult"] + var value = PromoteReadReplicaDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -18912,45 +13747,33 @@ public struct PromoteReadReplicaDBClusterOutput: Swift.Equatable { } } -struct PromoteReadReplicaDBClusterOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension PromoteReadReplicaDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PromoteReadReplicaDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum PromoteReadReplicaDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PromoteReadReplicaDBClusterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ProvisionedIopsNotAvailableInAZFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ProvisionedIopsNotAvailableInAZFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18979,23 +13802,7 @@ public struct ProvisionedIopsNotAvailableInAZFault: ClientRuntime.ModeledError, } } -struct ProvisionedIopsNotAvailableInAZFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ProvisionedIopsNotAvailableInAZFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.Range: Swift.Codable { +extension NeptuneClientTypes.Range: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case from = "From" case step = "Step" @@ -19015,14 +13822,15 @@ extension NeptuneClientTypes.Range: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .from) - from = fromDecoded - let toDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .to) - to = toDecoded - let stepDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .step) - step = stepDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.Range() + value.from = try reader["From"].readIfPresent() + value.to = try reader["To"].readIfPresent() + value.step = try reader["Step"].readIfPresent() + return value + } } } @@ -19051,6 +13859,11 @@ extension NeptuneClientTypes { } extension RebootDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case forceFailover = "ForceFailover" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -19090,34 +13903,15 @@ public struct RebootDBInstanceInput: Swift.Equatable { } } -struct RebootDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let forceFailover: Swift.Bool? -} - -extension RebootDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case forceFailover = "ForceFailover" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let forceFailoverDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forceFailover) - forceFailover = forceFailoverDecoded - } -} +extension RebootDBInstanceOutput { -extension RebootDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RebootDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RebootDBInstanceResult"] + var value = RebootDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: NeptuneClientTypes.DBInstance.readingClosure) + return value } } } @@ -19134,35 +13928,30 @@ public struct RebootDBInstanceOutput: Swift.Equatable { } } -struct RebootDBInstanceOutputBody: Swift.Equatable { - let dbInstance: NeptuneClientTypes.DBInstance? -} - -extension RebootDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RebootDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum RebootDBInstanceOutputError { -enum RebootDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveFromGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DbClusterIdentifier" + case globalClusterIdentifier = "GlobalClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -19201,34 +13990,15 @@ public struct RemoveFromGlobalClusterInput: Swift.Equatable { } } -struct RemoveFromGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? -} - -extension RemoveFromGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DbClusterIdentifier" - case globalClusterIdentifier = "GlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} +extension RemoveFromGlobalClusterOutput { -extension RemoveFromGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RemoveFromGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RemoveFromGlobalClusterResult"] + var value = RemoveFromGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: NeptuneClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -19245,36 +14015,32 @@ public struct RemoveFromGlobalClusterOutput: Swift.Equatable { } } -struct RemoveFromGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: NeptuneClientTypes.GlobalCluster? -} - -extension RemoveFromGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RemoveFromGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum RemoveFromGlobalClusterOutputError { -enum RemoveFromGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveRoleFromDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case featureName = "FeatureName" + case roleArn = "RoleArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -19320,32 +14086,12 @@ public struct RemoveRoleFromDBClusterInput: Swift.Equatable { } } -struct RemoveRoleFromDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let roleArn: Swift.String? - let featureName: Swift.String? -} - -extension RemoveRoleFromDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case featureName = "FeatureName" - case roleArn = "RoleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded - } -} +extension RemoveRoleFromDBClusterOutput { -extension RemoveRoleFromDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveRoleFromDBClusterOutput() + } } } @@ -19354,19 +14100,31 @@ public struct RemoveRoleFromDBClusterOutput: Swift.Equatable { public init() { } } -enum RemoveRoleFromDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterRoleNotFound": return try await DBClusterRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveRoleFromDBClusterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterRoleNotFound": return try await DBClusterRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveSourceIdentifierFromSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceIdentifier = "SourceIdentifier" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceIdentifier = sourceIdentifier { @@ -19405,34 +14163,15 @@ public struct RemoveSourceIdentifierFromSubscriptionInput: Swift.Equatable { } } -struct RemoveSourceIdentifierFromSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let sourceIdentifier: Swift.String? -} - -extension RemoveSourceIdentifierFromSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceIdentifier = "SourceIdentifier" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - } -} +extension RemoveSourceIdentifierFromSubscriptionOutput { -extension RemoveSourceIdentifierFromSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RemoveSourceIdentifierFromSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RemoveSourceIdentifierFromSubscriptionResult"] + var value = RemoveSourceIdentifierFromSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: NeptuneClientTypes.EventSubscription.readingClosure) + return value } } } @@ -19449,35 +14188,30 @@ public struct RemoveSourceIdentifierFromSubscriptionOutput: Swift.Equatable { } } -struct RemoveSourceIdentifierFromSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: NeptuneClientTypes.EventSubscription? -} - -extension RemoveSourceIdentifierFromSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RemoveSourceIdentifierFromSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum RemoveSourceIdentifierFromSubscriptionOutputError { -enum RemoveSourceIdentifierFromSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveTagsFromResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -19525,66 +14259,46 @@ public struct RemoveTagsFromResourceInput: Swift.Equatable { } } -struct RemoveTagsFromResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tagKeys: [Swift.String]? -} - -extension RemoveTagsFromResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tagKeys = "TagKeys" - } +extension RemoveTagsFromResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveTagsFromResourceOutput() } } } -extension RemoveTagsFromResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct RemoveTagsFromResourceOutput: Swift.Equatable { public init() { } } -enum RemoveTagsFromResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveTagsFromResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResetDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case parameters = "Parameters" + case resetAllParameters = "ResetAllParameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -19638,55 +14352,15 @@ public struct ResetDBClusterParameterGroupInput: Swift.Equatable { } } -struct ResetDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let resetAllParameters: Swift.Bool? - let parameters: [NeptuneClientTypes.Parameter]? -} - -extension ResetDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case parameters = "Parameters" - case resetAllParameters = "ResetAllParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let resetAllParametersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resetAllParameters) - resetAllParameters = resetAllParametersDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[NeptuneClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [NeptuneClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ResetDBClusterParameterGroupOutput { -extension ResetDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroupName = output.dbClusterParameterGroupName - } else { - self.dbClusterParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResetDBClusterParameterGroupResult"] + var value = ResetDBClusterParameterGroupOutput() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + return value } } } @@ -19712,35 +14386,31 @@ public struct ResetDBClusterParameterGroupOutput: Swift.Equatable { } } -struct ResetDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension ResetDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResetDBClusterParameterGroupResult")) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} +enum ResetDBClusterParameterGroupOutputError { -enum ResetDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResetDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + case parameters = "Parameters" + case resetAllParameters = "ResetAllParameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -19796,55 +14466,15 @@ public struct ResetDBParameterGroupInput: Swift.Equatable { } } -struct ResetDBParameterGroupInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let resetAllParameters: Swift.Bool? - let parameters: [NeptuneClientTypes.Parameter]? -} - -extension ResetDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - case parameters = "Parameters" - case resetAllParameters = "ResetAllParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let resetAllParametersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resetAllParameters) - resetAllParameters = resetAllParametersDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([NeptuneClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[NeptuneClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [NeptuneClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ResetDBParameterGroupOutput { -extension ResetDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetDBParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroupName = output.dbParameterGroupName - } else { - self.dbParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResetDBParameterGroupResult"] + var value = ResetDBParameterGroupOutput() + value.dbParameterGroupName = try reader["DBParameterGroupName"].readIfPresent() + return value } } } @@ -19861,45 +14491,33 @@ public struct ResetDBParameterGroupOutput: Swift.Equatable { } } -struct ResetDBParameterGroupOutputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? -} - -extension ResetDBParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResetDBParameterGroupResult")) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - } -} +enum ResetDBParameterGroupOutputError { -enum ResetDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResourceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19928,23 +14546,7 @@ public struct ResourceNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct ResourceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.ResourcePendingMaintenanceActions: Swift.Codable { +extension NeptuneClientTypes.ResourcePendingMaintenanceActions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case pendingMaintenanceActionDetails = "PendingMaintenanceActionDetails" case resourceIdentifier = "ResourceIdentifier" @@ -19969,28 +14571,13 @@ extension NeptuneClientTypes.ResourcePendingMaintenanceActions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - if containerValues.contains(.pendingMaintenanceActionDetails) { - struct KeyVal0{struct PendingMaintenanceAction{}} - let pendingMaintenanceActionDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .pendingMaintenanceActionDetails) - if let pendingMaintenanceActionDetailsWrappedContainer = pendingMaintenanceActionDetailsWrappedContainer { - let pendingMaintenanceActionDetailsContainer = try pendingMaintenanceActionDetailsWrappedContainer.decodeIfPresent([NeptuneClientTypes.PendingMaintenanceAction].self, forKey: .member) - var pendingMaintenanceActionDetailsBuffer:[NeptuneClientTypes.PendingMaintenanceAction]? = nil - if let pendingMaintenanceActionDetailsContainer = pendingMaintenanceActionDetailsContainer { - pendingMaintenanceActionDetailsBuffer = [NeptuneClientTypes.PendingMaintenanceAction]() - for structureContainer0 in pendingMaintenanceActionDetailsContainer { - pendingMaintenanceActionDetailsBuffer?.append(structureContainer0) - } - } - pendingMaintenanceActionDetails = pendingMaintenanceActionDetailsBuffer - } else { - pendingMaintenanceActionDetails = [] - } - } else { - pendingMaintenanceActionDetails = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.ResourcePendingMaintenanceActions() + value.resourceIdentifier = try reader["ResourceIdentifier"].readIfPresent() + value.pendingMaintenanceActionDetails = try reader["PendingMaintenanceActionDetails"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.PendingMaintenanceAction.readingClosure, memberNodeInfo: "PendingMaintenanceAction", isFlattened: false) + return value } } } @@ -20016,6 +14603,28 @@ extension NeptuneClientTypes { } extension RestoreDBClusterFromSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case availabilityZones = "AvailabilityZones" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbSubnetGroupName = "DBSubnetGroupName" + case databaseName = "DatabaseName" + case deletionProtection = "DeletionProtection" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case engine = "Engine" + case engineVersion = "EngineVersion" + case kmsKeyId = "KmsKeyId" + case optionGroupName = "OptionGroupName" + case port = "Port" + case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" + case snapshotIdentifier = "SnapshotIdentifier" + case storageType = "StorageType" + case tags = "Tags" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZones = availabilityZones { @@ -20205,192 +14814,37 @@ public struct RestoreDBClusterFromSnapshotInput: Swift.Equatable { vpcSecurityGroupIds: [Swift.String]? = nil ) { - self.availabilityZones = availabilityZones - self.copyTagsToSnapshot = copyTagsToSnapshot - self.databaseName = databaseName - self.dbClusterIdentifier = dbClusterIdentifier - self.dbClusterParameterGroupName = dbClusterParameterGroupName - self.dbSubnetGroupName = dbSubnetGroupName - self.deletionProtection = deletionProtection - self.enableCloudwatchLogsExports = enableCloudwatchLogsExports - self.enableIAMDatabaseAuthentication = enableIAMDatabaseAuthentication - self.engine = engine - self.engineVersion = engineVersion - self.kmsKeyId = kmsKeyId - self.optionGroupName = optionGroupName - self.port = port - self.serverlessV2ScalingConfiguration = serverlessV2ScalingConfiguration - self.snapshotIdentifier = snapshotIdentifier - self.storageType = storageType - self.tags = tags - self.vpcSecurityGroupIds = vpcSecurityGroupIds - } -} - -struct RestoreDBClusterFromSnapshotInputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let dbClusterIdentifier: Swift.String? - let snapshotIdentifier: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let port: Swift.Int? - let dbSubnetGroupName: Swift.String? - let databaseName: Swift.String? - let optionGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let tags: [NeptuneClientTypes.Tag]? - let kmsKeyId: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enableCloudwatchLogsExports: [Swift.String]? - let dbClusterParameterGroupName: Swift.String? - let deletionProtection: Swift.Bool? - let copyTagsToSnapshot: Swift.Bool? - let serverlessV2ScalingConfiguration: NeptuneClientTypes.ServerlessV2ScalingConfiguration? - let storageType: Swift.String? -} - -extension RestoreDBClusterFromSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case databaseName = "DatabaseName" - case deletionProtection = "DeletionProtection" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case engine = "Engine" - case engineVersion = "EngineVersion" - case kmsKeyId = "KmsKeyId" - case optionGroupName = "OptionGroupName" - case port = "Port" - case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case snapshotIdentifier = "SnapshotIdentifier" - case storageType = "StorageType" - case tags = "Tags" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded + self.availabilityZones = availabilityZones + self.copyTagsToSnapshot = copyTagsToSnapshot + self.databaseName = databaseName + self.dbClusterIdentifier = dbClusterIdentifier + self.dbClusterParameterGroupName = dbClusterParameterGroupName + self.dbSubnetGroupName = dbSubnetGroupName + self.deletionProtection = deletionProtection + self.enableCloudwatchLogsExports = enableCloudwatchLogsExports + self.enableIAMDatabaseAuthentication = enableIAMDatabaseAuthentication + self.engine = engine + self.engineVersion = engineVersion + self.kmsKeyId = kmsKeyId + self.optionGroupName = optionGroupName + self.port = port + self.serverlessV2ScalingConfiguration = serverlessV2ScalingConfiguration + self.snapshotIdentifier = snapshotIdentifier + self.storageType = storageType + self.tags = tags + self.vpcSecurityGroupIds = vpcSecurityGroupIds } } -extension RestoreDBClusterFromSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBClusterFromSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil +extension RestoreDBClusterFromSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBClusterFromSnapshotResult"] + var value = RestoreDBClusterFromSnapshotOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -20407,49 +14861,59 @@ public struct RestoreDBClusterFromSnapshotOutput: Swift.Equatable { } } -struct RestoreDBClusterFromSnapshotOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension RestoreDBClusterFromSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBClusterFromSnapshotResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum RestoreDBClusterFromSnapshotOutputError { -enum RestoreDBClusterFromSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestoreFault": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestoreFault": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RestoreDBClusterToPointInTimeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbSubnetGroupName = "DBSubnetGroupName" + case deletionProtection = "DeletionProtection" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case kmsKeyId = "KmsKeyId" + case optionGroupName = "OptionGroupName" + case port = "Port" + case restoreToTime = "RestoreToTime" + case restoreType = "RestoreType" + case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" + case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" + case storageType = "StorageType" + case tags = "Tags" + case useLatestRestorableTime = "UseLatestRestorableTime" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -20655,145 +15119,15 @@ public struct RestoreDBClusterToPointInTimeInput: Swift.Equatable { } } -struct RestoreDBClusterToPointInTimeInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let restoreType: Swift.String? - let sourceDBClusterIdentifier: Swift.String? - let restoreToTime: ClientRuntime.Date? - let useLatestRestorableTime: Swift.Bool? - let port: Swift.Int? - let dbSubnetGroupName: Swift.String? - let optionGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let tags: [NeptuneClientTypes.Tag]? - let kmsKeyId: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enableCloudwatchLogsExports: [Swift.String]? - let dbClusterParameterGroupName: Swift.String? - let deletionProtection: Swift.Bool? - let serverlessV2ScalingConfiguration: NeptuneClientTypes.ServerlessV2ScalingConfiguration? - let storageType: Swift.String? -} - -extension RestoreDBClusterToPointInTimeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case deletionProtection = "DeletionProtection" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case kmsKeyId = "KmsKeyId" - case optionGroupName = "OptionGroupName" - case port = "Port" - case restoreToTime = "RestoreToTime" - case restoreType = "RestoreType" - case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" - case storageType = "StorageType" - case tags = "Tags" - case useLatestRestorableTime = "UseLatestRestorableTime" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let restoreTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .restoreType) - restoreType = restoreTypeDecoded - let sourceDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterIdentifier) - sourceDBClusterIdentifier = sourceDBClusterIdentifierDecoded - let restoreToTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreToTime) - restoreToTime = restoreToTimeDecoded - let useLatestRestorableTimeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useLatestRestorableTime) - useLatestRestorableTime = useLatestRestorableTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[NeptuneClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [NeptuneClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - } -} +extension RestoreDBClusterToPointInTimeOutput { -extension RestoreDBClusterToPointInTimeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBClusterToPointInTimeOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBClusterToPointInTimeResult"] + var value = RestoreDBClusterToPointInTimeOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -20810,60 +15144,48 @@ public struct RestoreDBClusterToPointInTimeOutput: Swift.Equatable { } } -struct RestoreDBClusterToPointInTimeOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension RestoreDBClusterToPointInTimeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBClusterToPointInTimeResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum RestoreDBClusterToPointInTimeOutputError { -enum RestoreDBClusterToPointInTimeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestoreFault": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestoreFault": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SNSInvalidTopicFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSInvalidTopicFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20892,33 +15214,15 @@ public struct SNSInvalidTopicFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct SNSInvalidTopicFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSInvalidTopicFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSNoAuthorizationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSNoAuthorizationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20947,33 +15251,15 @@ public struct SNSNoAuthorizationFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct SNSNoAuthorizationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSNoAuthorizationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSTopicArnNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSTopicArnNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21002,23 +15288,7 @@ public struct SNSTopicArnNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct SNSTopicArnNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSTopicArnNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.ServerlessV2ScalingConfiguration: Swift.Codable { +extension NeptuneClientTypes.ServerlessV2ScalingConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maxCapacity = "MaxCapacity" case minCapacity = "MinCapacity" @@ -21034,12 +15304,14 @@ extension NeptuneClientTypes.ServerlessV2ScalingConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minCapacity) - minCapacity = minCapacityDecoded - let maxCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxCapacity) - maxCapacity = maxCapacityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.ServerlessV2ScalingConfiguration() + value.minCapacity = try reader["MinCapacity"].readIfPresent() + value.maxCapacity = try reader["MaxCapacity"].readIfPresent() + return value + } } } @@ -21063,7 +15335,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.ServerlessV2ScalingConfigurationInfo: Swift.Codable { +extension NeptuneClientTypes.ServerlessV2ScalingConfigurationInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maxCapacity = "MaxCapacity" case minCapacity = "MinCapacity" @@ -21079,12 +15351,14 @@ extension NeptuneClientTypes.ServerlessV2ScalingConfigurationInfo: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minCapacity) - minCapacity = minCapacityDecoded - let maxCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxCapacity) - maxCapacity = maxCapacityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.ServerlessV2ScalingConfigurationInfo() + value.minCapacity = try reader["MinCapacity"].readIfPresent() + value.maxCapacity = try reader["MaxCapacity"].readIfPresent() + return value + } } } @@ -21109,16 +15383,14 @@ extension NeptuneClientTypes { } extension SharedSnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SharedSnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21147,33 +15419,15 @@ public struct SharedSnapshotQuotaExceededFault: ClientRuntime.ModeledError, AWSC } } -struct SharedSnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SharedSnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21202,33 +15456,15 @@ public struct SnapshotQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct SnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SourceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SourceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21257,22 +15493,6 @@ public struct SourceNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct SourceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SourceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension NeptuneClientTypes { public enum SourceType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case dbCluster @@ -21318,6 +15538,10 @@ extension NeptuneClientTypes { } extension StartDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -21348,30 +15572,15 @@ public struct StartDBClusterInput: Swift.Equatable { } } -struct StartDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} - -extension StartDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} +extension StartDBClusterOutput { -extension StartDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartDBClusterResult"] + var value = StartDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -21388,36 +15597,30 @@ public struct StartDBClusterOutput: Swift.Equatable { } } -struct StartDBClusterOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension StartDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum StartDBClusterOutputError { -enum StartDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StopDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -21448,30 +15651,15 @@ public struct StopDBClusterInput: Swift.Equatable { } } -struct StopDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} - -extension StopDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} +extension StopDBClusterOutput { -extension StopDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StopDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StopDBClusterResult"] + var value = StopDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: NeptuneClientTypes.DBCluster.readingClosure) + return value } } } @@ -21488,46 +15676,34 @@ public struct StopDBClusterOutput: Swift.Equatable { } } -struct StopDBClusterOutputBody: Swift.Equatable { - let dbCluster: NeptuneClientTypes.DBCluster? -} - -extension StopDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StopDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum StopDBClusterOutputError { -enum StopDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StorageQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StorageQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21556,33 +15732,15 @@ public struct StorageQuotaExceededFault: ClientRuntime.ModeledError, AWSClientRu } } -struct StorageQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension StorageQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension StorageTypeNotSupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StorageTypeNotSupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21611,23 +15769,7 @@ public struct StorageTypeNotSupportedFault: ClientRuntime.ModeledError, AWSClien } } -struct StorageTypeNotSupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension StorageTypeNotSupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.Subnet: Swift.Codable { +extension NeptuneClientTypes.Subnet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case subnetAvailabilityZone = "SubnetAvailabilityZone" case subnetIdentifier = "SubnetIdentifier" @@ -21647,14 +15789,15 @@ extension NeptuneClientTypes.Subnet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetIdentifier) - subnetIdentifier = subnetIdentifierDecoded - let subnetAvailabilityZoneDecoded = try containerValues.decodeIfPresent(NeptuneClientTypes.AvailabilityZone.self, forKey: .subnetAvailabilityZone) - subnetAvailabilityZone = subnetAvailabilityZoneDecoded - let subnetStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetStatus) - subnetStatus = subnetStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.Subnet() + value.subnetIdentifier = try reader["SubnetIdentifier"].readIfPresent() + value.subnetAvailabilityZone = try reader["SubnetAvailabilityZone"].readIfPresent(readingClosure: NeptuneClientTypes.AvailabilityZone.readingClosure) + value.subnetStatus = try reader["SubnetStatus"].readIfPresent() + return value + } } } @@ -21683,16 +15826,14 @@ extension NeptuneClientTypes { } extension SubnetAlreadyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubnetAlreadyInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21721,33 +15862,15 @@ public struct SubnetAlreadyInUse: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct SubnetAlreadyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubnetAlreadyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionAlreadyExistFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionAlreadyExistFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21776,33 +15899,15 @@ public struct SubscriptionAlreadyExistFault: ClientRuntime.ModeledError, AWSClie } } -struct SubscriptionAlreadyExistFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionAlreadyExistFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionCategoryNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionCategoryNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21831,33 +15936,15 @@ public struct SubscriptionCategoryNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct SubscriptionCategoryNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionCategoryNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21886,23 +15973,7 @@ public struct SubscriptionNotFoundFault: ClientRuntime.ModeledError, AWSClientRu } } -struct SubscriptionNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension NeptuneClientTypes.Tag: Swift.Codable { +extension NeptuneClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -21918,12 +15989,14 @@ extension NeptuneClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -21947,7 +16020,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.Timezone: Swift.Codable { +extension NeptuneClientTypes.Timezone: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case timezoneName = "TimezoneName" } @@ -21959,10 +16032,13 @@ extension NeptuneClientTypes.Timezone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let timezoneNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezoneName) - timezoneName = timezoneNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.Timezone() + value.timezoneName = try reader["TimezoneName"].readIfPresent() + return value + } } } @@ -21982,7 +16058,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.UpgradeTarget: Swift.Codable { +extension NeptuneClientTypes.UpgradeTarget: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoUpgrade = "AutoUpgrade" case description = "Description" @@ -22014,20 +16090,18 @@ extension NeptuneClientTypes.UpgradeTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let autoUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoUpgrade) - autoUpgrade = autoUpgradeDecoded - let isMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isMajorVersionUpgrade) - isMajorVersionUpgrade = isMajorVersionUpgradeDecoded - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.UpgradeTarget() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.autoUpgrade = try reader["AutoUpgrade"].readIfPresent() + value.isMajorVersionUpgrade = try reader["IsMajorVersionUpgrade"].readIfPresent() + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + return value + } } } @@ -22067,7 +16141,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.ValidDBInstanceModificationsMessage: Swift.Codable { +extension NeptuneClientTypes.ValidDBInstanceModificationsMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case storage = "Storage" } @@ -22088,26 +16162,12 @@ extension NeptuneClientTypes.ValidDBInstanceModificationsMessage: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.storage) { - struct KeyVal0{struct ValidStorageOptions{}} - let storageWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .storage) - if let storageWrappedContainer = storageWrappedContainer { - let storageContainer = try storageWrappedContainer.decodeIfPresent([NeptuneClientTypes.ValidStorageOptions].self, forKey: .member) - var storageBuffer:[NeptuneClientTypes.ValidStorageOptions]? = nil - if let storageContainer = storageContainer { - storageBuffer = [NeptuneClientTypes.ValidStorageOptions]() - for structureContainer0 in storageContainer { - storageBuffer?.append(structureContainer0) - } - } - storage = storageBuffer - } else { - storage = [] - } - } else { - storage = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.ValidDBInstanceModificationsMessage() + value.storage = try reader["Storage"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.ValidStorageOptions.readingClosure, memberNodeInfo: "ValidStorageOptions", isFlattened: false) + return value } } } @@ -22128,7 +16188,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.ValidStorageOptions: Swift.Codable { +extension NeptuneClientTypes.ValidStorageOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case iopsToStorageRatio = "IopsToStorageRatio" case provisionedIops = "ProvisionedIops" @@ -22179,66 +16239,15 @@ extension NeptuneClientTypes.ValidStorageOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - if containerValues.contains(.storageSize) { - struct KeyVal0{struct Range{}} - let storageSizeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .storageSize) - if let storageSizeWrappedContainer = storageSizeWrappedContainer { - let storageSizeContainer = try storageSizeWrappedContainer.decodeIfPresent([NeptuneClientTypes.Range].self, forKey: .member) - var storageSizeBuffer:[NeptuneClientTypes.Range]? = nil - if let storageSizeContainer = storageSizeContainer { - storageSizeBuffer = [NeptuneClientTypes.Range]() - for structureContainer0 in storageSizeContainer { - storageSizeBuffer?.append(structureContainer0) - } - } - storageSize = storageSizeBuffer - } else { - storageSize = [] - } - } else { - storageSize = nil - } - if containerValues.contains(.provisionedIops) { - struct KeyVal0{struct Range{}} - let provisionedIopsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .provisionedIops) - if let provisionedIopsWrappedContainer = provisionedIopsWrappedContainer { - let provisionedIopsContainer = try provisionedIopsWrappedContainer.decodeIfPresent([NeptuneClientTypes.Range].self, forKey: .member) - var provisionedIopsBuffer:[NeptuneClientTypes.Range]? = nil - if let provisionedIopsContainer = provisionedIopsContainer { - provisionedIopsBuffer = [NeptuneClientTypes.Range]() - for structureContainer0 in provisionedIopsContainer { - provisionedIopsBuffer?.append(structureContainer0) - } - } - provisionedIops = provisionedIopsBuffer - } else { - provisionedIops = [] - } - } else { - provisionedIops = nil - } - if containerValues.contains(.iopsToStorageRatio) { - struct KeyVal0{struct DoubleRange{}} - let iopsToStorageRatioWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .iopsToStorageRatio) - if let iopsToStorageRatioWrappedContainer = iopsToStorageRatioWrappedContainer { - let iopsToStorageRatioContainer = try iopsToStorageRatioWrappedContainer.decodeIfPresent([NeptuneClientTypes.DoubleRange].self, forKey: .member) - var iopsToStorageRatioBuffer:[NeptuneClientTypes.DoubleRange]? = nil - if let iopsToStorageRatioContainer = iopsToStorageRatioContainer { - iopsToStorageRatioBuffer = [NeptuneClientTypes.DoubleRange]() - for structureContainer0 in iopsToStorageRatioContainer { - iopsToStorageRatioBuffer?.append(structureContainer0) - } - } - iopsToStorageRatio = iopsToStorageRatioBuffer - } else { - iopsToStorageRatio = [] - } - } else { - iopsToStorageRatio = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.ValidStorageOptions() + value.storageType = try reader["StorageType"].readIfPresent() + value.storageSize = try reader["StorageSize"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Range.readingClosure, memberNodeInfo: "Range", isFlattened: false) + value.provisionedIops = try reader["ProvisionedIops"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.Range.readingClosure, memberNodeInfo: "Range", isFlattened: false) + value.iopsToStorageRatio = try reader["IopsToStorageRatio"].readListIfPresent(memberReadingClosure: NeptuneClientTypes.DoubleRange.readingClosure, memberNodeInfo: "DoubleRange", isFlattened: false) + return value } } } @@ -22271,7 +16280,7 @@ extension NeptuneClientTypes { } -extension NeptuneClientTypes.VpcSecurityGroupMembership: Swift.Codable { +extension NeptuneClientTypes.VpcSecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case status = "Status" case vpcSecurityGroupId = "VpcSecurityGroupId" @@ -22287,12 +16296,14 @@ extension NeptuneClientTypes.VpcSecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcSecurityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcSecurityGroupId) - vpcSecurityGroupId = vpcSecurityGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NeptuneClientTypes.VpcSecurityGroupMembership() + value.vpcSecurityGroupId = try reader["VpcSecurityGroupId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSRDS/RDSClient.swift b/Sources/Services/AWSRDS/RDSClient.swift index 527758efd9e..035da4b5e85 100644 --- a/Sources/Services/AWSRDS/RDSClient.swift +++ b/Sources/Services/AWSRDS/RDSClient.swift @@ -11,14 +11,11 @@ public class RDSClient { let config: RDSClient.RDSClientConfiguration let serviceName = "RDS" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: RDSClient.RDSClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -81,7 +78,6 @@ extension RDSClient { public func addRoleToDBCluster(input: AddRoleToDBClusterInput) async throws -> AddRoleToDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addRoleToDBCluster") @@ -105,7 +101,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddRoleToDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddRoleToDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddRoleToDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -129,7 +125,6 @@ extension RDSClient { public func addRoleToDBInstance(input: AddRoleToDBInstanceInput) async throws -> AddRoleToDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addRoleToDBInstance") @@ -153,7 +148,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddRoleToDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddRoleToDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddRoleToDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -175,7 +170,6 @@ extension RDSClient { public func addSourceIdentifierToSubscription(input: AddSourceIdentifierToSubscriptionInput) async throws -> AddSourceIdentifierToSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addSourceIdentifierToSubscription") @@ -199,7 +193,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddSourceIdentifierToSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddSourceIdentifierToSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddSourceIdentifierToSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -228,7 +222,6 @@ extension RDSClient { public func addTagsToResource(input: AddTagsToResourceInput) async throws -> AddTagsToResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addTagsToResource") @@ -252,7 +245,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddTagsToResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddTagsToResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddTagsToResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -275,7 +268,6 @@ extension RDSClient { public func applyPendingMaintenanceAction(input: ApplyPendingMaintenanceActionInput) async throws -> ApplyPendingMaintenanceActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "applyPendingMaintenanceAction") @@ -299,7 +291,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ApplyPendingMaintenanceActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ApplyPendingMaintenanceActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ApplyPendingMaintenanceActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -323,7 +315,6 @@ extension RDSClient { public func authorizeDBSecurityGroupIngress(input: AuthorizeDBSecurityGroupIngressInput) async throws -> AuthorizeDBSecurityGroupIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeDBSecurityGroupIngress") @@ -347,7 +338,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeDBSecurityGroupIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeDBSecurityGroupIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeDBSecurityGroupIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -369,7 +360,6 @@ extension RDSClient { public func backtrackDBCluster(input: BacktrackDBClusterInput) async throws -> BacktrackDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "backtrackDBCluster") @@ -393,7 +383,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BacktrackDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BacktrackDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BacktrackDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -415,7 +405,6 @@ extension RDSClient { public func cancelExportTask(input: CancelExportTaskInput) async throws -> CancelExportTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelExportTask") @@ -439,7 +428,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelExportTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelExportTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelExportTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -462,7 +451,6 @@ extension RDSClient { public func copyDBClusterParameterGroup(input: CopyDBClusterParameterGroupInput) async throws -> CopyDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBClusterParameterGroup") @@ -486,7 +474,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -521,7 +509,6 @@ extension RDSClient { public func copyDBClusterSnapshot(input: CopyDBClusterSnapshotInput) async throws -> CopyDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBClusterSnapshot") @@ -545,7 +532,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -568,7 +555,6 @@ extension RDSClient { public func copyDBParameterGroup(input: CopyDBParameterGroupInput) async throws -> CopyDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBParameterGroup") @@ -592,7 +578,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -618,7 +604,6 @@ extension RDSClient { public func copyDBSnapshot(input: CopyDBSnapshotInput) async throws -> CopyDBSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyDBSnapshot") @@ -642,7 +627,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyDBSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyDBSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyDBSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -665,7 +650,6 @@ extension RDSClient { public func copyOptionGroup(input: CopyOptionGroupInput) async throws -> CopyOptionGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyOptionGroup") @@ -689,7 +673,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyOptionGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyOptionGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyOptionGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -720,7 +704,6 @@ extension RDSClient { public func createBlueGreenDeployment(input: CreateBlueGreenDeploymentInput) async throws -> CreateBlueGreenDeploymentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createBlueGreenDeployment") @@ -744,7 +727,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateBlueGreenDeploymentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateBlueGreenDeploymentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateBlueGreenDeploymentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -769,7 +752,6 @@ extension RDSClient { public func createCustomDBEngineVersion(input: CreateCustomDBEngineVersionInput) async throws -> CreateCustomDBEngineVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCustomDBEngineVersion") @@ -793,7 +775,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCustomDBEngineVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCustomDBEngineVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCustomDBEngineVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -833,7 +815,6 @@ extension RDSClient { public func createDBCluster(input: CreateDBClusterInput) async throws -> CreateDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBCluster") @@ -857,7 +838,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -894,7 +875,6 @@ extension RDSClient { public func createDBClusterEndpoint(input: CreateDBClusterEndpointInput) async throws -> CreateDBClusterEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBClusterEndpoint") @@ -918,7 +898,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -940,7 +920,6 @@ extension RDSClient { public func createDBClusterParameterGroup(input: CreateDBClusterParameterGroupInput) async throws -> CreateDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBClusterParameterGroup") @@ -964,7 +943,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -989,7 +968,6 @@ extension RDSClient { public func createDBClusterSnapshot(input: CreateDBClusterSnapshotInput) async throws -> CreateDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBClusterSnapshot") @@ -1013,7 +991,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1055,7 +1033,6 @@ extension RDSClient { public func createDBInstance(input: CreateDBInstanceInput) async throws -> CreateDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBInstance") @@ -1079,7 +1056,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1122,7 +1099,6 @@ extension RDSClient { public func createDBInstanceReadReplica(input: CreateDBInstanceReadReplicaInput) async throws -> CreateDBInstanceReadReplicaOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBInstanceReadReplica") @@ -1146,7 +1122,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBInstanceReadReplicaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBInstanceReadReplicaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBInstanceReadReplicaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1168,7 +1144,6 @@ extension RDSClient { public func createDBParameterGroup(input: CreateDBParameterGroupInput) async throws -> CreateDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBParameterGroup") @@ -1192,7 +1167,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1215,7 +1190,6 @@ extension RDSClient { public func createDBProxy(input: CreateDBProxyInput) async throws -> CreateDBProxyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBProxy") @@ -1239,7 +1213,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBProxyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBProxyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBProxyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1264,7 +1238,6 @@ extension RDSClient { public func createDBProxyEndpoint(input: CreateDBProxyEndpointInput) async throws -> CreateDBProxyEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBProxyEndpoint") @@ -1288,7 +1261,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBProxyEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBProxyEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBProxyEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1311,7 +1284,6 @@ extension RDSClient { public func createDBSecurityGroup(input: CreateDBSecurityGroupInput) async throws -> CreateDBSecurityGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBSecurityGroup") @@ -1335,7 +1307,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBSecurityGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBSecurityGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBSecurityGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1359,7 +1331,6 @@ extension RDSClient { public func createDBSnapshot(input: CreateDBSnapshotInput) async throws -> CreateDBSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBSnapshot") @@ -1383,7 +1354,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1408,7 +1379,6 @@ extension RDSClient { public func createDBSubnetGroup(input: CreateDBSubnetGroupInput) async throws -> CreateDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createDBSubnetGroup") @@ -1432,7 +1402,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1459,7 +1429,6 @@ extension RDSClient { public func createEventSubscription(input: CreateEventSubscriptionInput) async throws -> CreateEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createEventSubscription") @@ -1483,7 +1452,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1507,7 +1476,6 @@ extension RDSClient { public func createGlobalCluster(input: CreateGlobalClusterInput) async throws -> CreateGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createGlobalCluster") @@ -1531,7 +1499,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1557,7 +1525,6 @@ extension RDSClient { public func createIntegration(input: CreateIntegrationInput) async throws -> CreateIntegrationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createIntegration") @@ -1581,7 +1548,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateIntegrationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateIntegrationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateIntegrationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1603,7 +1570,6 @@ extension RDSClient { public func createOptionGroup(input: CreateOptionGroupInput) async throws -> CreateOptionGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createOptionGroup") @@ -1627,7 +1593,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateOptionGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateOptionGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateOptionGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1654,7 +1620,6 @@ extension RDSClient { public func createTenantDatabase(input: CreateTenantDatabaseInput) async throws -> CreateTenantDatabaseOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTenantDatabase") @@ -1678,7 +1643,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTenantDatabaseOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTenantDatabaseOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTenantDatabaseOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1700,7 +1665,6 @@ extension RDSClient { public func deleteBlueGreenDeployment(input: DeleteBlueGreenDeploymentInput) async throws -> DeleteBlueGreenDeploymentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteBlueGreenDeployment") @@ -1724,7 +1688,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBlueGreenDeploymentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBlueGreenDeploymentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBlueGreenDeploymentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1753,7 +1717,6 @@ extension RDSClient { public func deleteCustomDBEngineVersion(input: DeleteCustomDBEngineVersionInput) async throws -> DeleteCustomDBEngineVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCustomDBEngineVersion") @@ -1777,7 +1740,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCustomDBEngineVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCustomDBEngineVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCustomDBEngineVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1803,7 +1766,6 @@ extension RDSClient { public func deleteDBCluster(input: DeleteDBClusterInput) async throws -> DeleteDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBCluster") @@ -1827,7 +1789,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1849,7 +1811,6 @@ extension RDSClient { public func deleteDBClusterAutomatedBackup(input: DeleteDBClusterAutomatedBackupInput) async throws -> DeleteDBClusterAutomatedBackupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterAutomatedBackup") @@ -1873,7 +1834,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterAutomatedBackupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterAutomatedBackupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterAutomatedBackupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1907,7 +1868,6 @@ extension RDSClient { public func deleteDBClusterEndpoint(input: DeleteDBClusterEndpointInput) async throws -> DeleteDBClusterEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterEndpoint") @@ -1931,7 +1891,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1953,7 +1913,6 @@ extension RDSClient { public func deleteDBClusterParameterGroup(input: DeleteDBClusterParameterGroupInput) async throws -> DeleteDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterParameterGroup") @@ -1977,7 +1936,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1999,7 +1958,6 @@ extension RDSClient { public func deleteDBClusterSnapshot(input: DeleteDBClusterSnapshotInput) async throws -> DeleteDBClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBClusterSnapshot") @@ -2023,7 +1981,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2056,7 +2014,6 @@ extension RDSClient { public func deleteDBInstance(input: DeleteDBInstanceInput) async throws -> DeleteDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBInstance") @@ -2080,7 +2037,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2102,7 +2059,6 @@ extension RDSClient { public func deleteDBInstanceAutomatedBackup(input: DeleteDBInstanceAutomatedBackupInput) async throws -> DeleteDBInstanceAutomatedBackupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBInstanceAutomatedBackup") @@ -2126,7 +2082,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBInstanceAutomatedBackupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBInstanceAutomatedBackupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBInstanceAutomatedBackupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2148,7 +2104,6 @@ extension RDSClient { public func deleteDBParameterGroup(input: DeleteDBParameterGroupInput) async throws -> DeleteDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBParameterGroup") @@ -2172,7 +2127,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2194,7 +2149,6 @@ extension RDSClient { public func deleteDBProxy(input: DeleteDBProxyInput) async throws -> DeleteDBProxyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBProxy") @@ -2218,7 +2172,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBProxyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBProxyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBProxyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2240,7 +2194,6 @@ extension RDSClient { public func deleteDBProxyEndpoint(input: DeleteDBProxyEndpointInput) async throws -> DeleteDBProxyEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBProxyEndpoint") @@ -2264,7 +2217,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBProxyEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBProxyEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBProxyEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2286,7 +2239,6 @@ extension RDSClient { public func deleteDBSecurityGroup(input: DeleteDBSecurityGroupInput) async throws -> DeleteDBSecurityGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBSecurityGroup") @@ -2310,7 +2262,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBSecurityGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBSecurityGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBSecurityGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2332,7 +2284,6 @@ extension RDSClient { public func deleteDBSnapshot(input: DeleteDBSnapshotInput) async throws -> DeleteDBSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBSnapshot") @@ -2356,7 +2307,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2379,7 +2330,6 @@ extension RDSClient { public func deleteDBSubnetGroup(input: DeleteDBSubnetGroupInput) async throws -> DeleteDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteDBSubnetGroup") @@ -2403,7 +2353,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2425,7 +2375,6 @@ extension RDSClient { public func deleteEventSubscription(input: DeleteEventSubscriptionInput) async throws -> DeleteEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteEventSubscription") @@ -2449,7 +2398,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2471,7 +2420,6 @@ extension RDSClient { public func deleteGlobalCluster(input: DeleteGlobalClusterInput) async throws -> DeleteGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteGlobalCluster") @@ -2495,7 +2443,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2518,7 +2466,6 @@ extension RDSClient { public func deleteIntegration(input: DeleteIntegrationInput) async throws -> DeleteIntegrationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteIntegration") @@ -2542,7 +2489,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteIntegrationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteIntegrationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteIntegrationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2564,7 +2511,6 @@ extension RDSClient { public func deleteOptionGroup(input: DeleteOptionGroupInput) async throws -> DeleteOptionGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteOptionGroup") @@ -2588,7 +2534,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteOptionGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteOptionGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteOptionGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2611,7 +2557,6 @@ extension RDSClient { public func deleteTenantDatabase(input: DeleteTenantDatabaseInput) async throws -> DeleteTenantDatabaseOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTenantDatabase") @@ -2635,7 +2580,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTenantDatabaseOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTenantDatabaseOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTenantDatabaseOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2659,7 +2604,6 @@ extension RDSClient { public func deregisterDBProxyTargets(input: DeregisterDBProxyTargetsInput) async throws -> DeregisterDBProxyTargetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deregisterDBProxyTargets") @@ -2683,7 +2627,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeregisterDBProxyTargetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeregisterDBProxyTargetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeregisterDBProxyTargetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2699,7 +2643,6 @@ extension RDSClient { public func describeAccountAttributes(input: DescribeAccountAttributesInput) async throws -> DescribeAccountAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAccountAttributes") @@ -2723,7 +2666,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAccountAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAccountAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAccountAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2744,7 +2687,6 @@ extension RDSClient { public func describeBlueGreenDeployments(input: DescribeBlueGreenDeploymentsInput) async throws -> DescribeBlueGreenDeploymentsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeBlueGreenDeployments") @@ -2768,7 +2710,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeBlueGreenDeploymentsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeBlueGreenDeploymentsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeBlueGreenDeploymentsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2789,7 +2731,6 @@ extension RDSClient { public func describeCertificates(input: DescribeCertificatesInput) async throws -> DescribeCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCertificates") @@ -2813,7 +2754,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2834,7 +2775,6 @@ extension RDSClient { public func describeDBClusterAutomatedBackups(input: DescribeDBClusterAutomatedBackupsInput) async throws -> DescribeDBClusterAutomatedBackupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterAutomatedBackups") @@ -2858,7 +2798,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterAutomatedBackupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterAutomatedBackupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterAutomatedBackupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2880,7 +2820,6 @@ extension RDSClient { public func describeDBClusterBacktracks(input: DescribeDBClusterBacktracksInput) async throws -> DescribeDBClusterBacktracksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterBacktracks") @@ -2904,7 +2843,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterBacktracksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterBacktracksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterBacktracksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2925,7 +2864,6 @@ extension RDSClient { public func describeDBClusterEndpoints(input: DescribeDBClusterEndpointsInput) async throws -> DescribeDBClusterEndpointsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterEndpoints") @@ -2949,7 +2887,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterEndpointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterEndpointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterEndpointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2970,7 +2908,6 @@ extension RDSClient { public func describeDBClusterParameterGroups(input: DescribeDBClusterParameterGroupsInput) async throws -> DescribeDBClusterParameterGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterParameterGroups") @@ -2994,7 +2931,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterParameterGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterParameterGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterParameterGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3015,7 +2952,6 @@ extension RDSClient { public func describeDBClusterParameters(input: DescribeDBClusterParametersInput) async throws -> DescribeDBClusterParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterParameters") @@ -3039,7 +2975,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3060,7 +2996,6 @@ extension RDSClient { public func describeDBClusterSnapshotAttributes(input: DescribeDBClusterSnapshotAttributesInput) async throws -> DescribeDBClusterSnapshotAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterSnapshotAttributes") @@ -3084,7 +3019,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterSnapshotAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterSnapshotAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterSnapshotAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3105,7 +3040,6 @@ extension RDSClient { public func describeDBClusterSnapshots(input: DescribeDBClusterSnapshotsInput) async throws -> DescribeDBClusterSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusterSnapshots") @@ -3129,7 +3063,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClusterSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClusterSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClusterSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3150,7 +3084,6 @@ extension RDSClient { public func describeDBClusters(input: DescribeDBClustersInput) async throws -> DescribeDBClustersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBClusters") @@ -3174,7 +3107,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBClustersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBClustersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBClustersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3190,7 +3123,6 @@ extension RDSClient { public func describeDBEngineVersions(input: DescribeDBEngineVersionsInput) async throws -> DescribeDBEngineVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBEngineVersions") @@ -3214,7 +3146,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBEngineVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBEngineVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBEngineVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3235,7 +3167,6 @@ extension RDSClient { public func describeDBInstanceAutomatedBackups(input: DescribeDBInstanceAutomatedBackupsInput) async throws -> DescribeDBInstanceAutomatedBackupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBInstanceAutomatedBackups") @@ -3259,7 +3190,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBInstanceAutomatedBackupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBInstanceAutomatedBackupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBInstanceAutomatedBackupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3280,7 +3211,6 @@ extension RDSClient { public func describeDBInstances(input: DescribeDBInstancesInput) async throws -> DescribeDBInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBInstances") @@ -3304,7 +3234,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3325,7 +3255,6 @@ extension RDSClient { public func describeDBLogFiles(input: DescribeDBLogFilesInput) async throws -> DescribeDBLogFilesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBLogFiles") @@ -3349,7 +3278,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBLogFilesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBLogFilesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBLogFilesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3370,7 +3299,6 @@ extension RDSClient { public func describeDBParameterGroups(input: DescribeDBParameterGroupsInput) async throws -> DescribeDBParameterGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBParameterGroups") @@ -3394,7 +3322,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBParameterGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBParameterGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBParameterGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3415,7 +3343,6 @@ extension RDSClient { public func describeDBParameters(input: DescribeDBParametersInput) async throws -> DescribeDBParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBParameters") @@ -3439,7 +3366,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3460,7 +3387,6 @@ extension RDSClient { public func describeDBProxies(input: DescribeDBProxiesInput) async throws -> DescribeDBProxiesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBProxies") @@ -3484,7 +3410,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBProxiesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBProxiesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBProxiesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3506,7 +3432,6 @@ extension RDSClient { public func describeDBProxyEndpoints(input: DescribeDBProxyEndpointsInput) async throws -> DescribeDBProxyEndpointsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBProxyEndpoints") @@ -3530,7 +3455,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBProxyEndpointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBProxyEndpointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBProxyEndpointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3553,7 +3478,6 @@ extension RDSClient { public func describeDBProxyTargetGroups(input: DescribeDBProxyTargetGroupsInput) async throws -> DescribeDBProxyTargetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBProxyTargetGroups") @@ -3577,7 +3501,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBProxyTargetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBProxyTargetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBProxyTargetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3601,7 +3525,6 @@ extension RDSClient { public func describeDBProxyTargets(input: DescribeDBProxyTargetsInput) async throws -> DescribeDBProxyTargetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBProxyTargets") @@ -3625,7 +3548,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBProxyTargetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBProxyTargetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBProxyTargetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3641,7 +3564,6 @@ extension RDSClient { public func describeDBRecommendations(input: DescribeDBRecommendationsInput) async throws -> DescribeDBRecommendationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBRecommendations") @@ -3665,7 +3587,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBRecommendationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBRecommendationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBRecommendationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3686,7 +3608,6 @@ extension RDSClient { public func describeDBSecurityGroups(input: DescribeDBSecurityGroupsInput) async throws -> DescribeDBSecurityGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBSecurityGroups") @@ -3710,7 +3631,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBSecurityGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBSecurityGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBSecurityGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3731,7 +3652,6 @@ extension RDSClient { public func describeDBSnapshotAttributes(input: DescribeDBSnapshotAttributesInput) async throws -> DescribeDBSnapshotAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBSnapshotAttributes") @@ -3755,7 +3675,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBSnapshotAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBSnapshotAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBSnapshotAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3776,7 +3696,6 @@ extension RDSClient { public func describeDBSnapshotTenantDatabases(input: DescribeDBSnapshotTenantDatabasesInput) async throws -> DescribeDBSnapshotTenantDatabasesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBSnapshotTenantDatabases") @@ -3800,7 +3719,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBSnapshotTenantDatabasesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBSnapshotTenantDatabasesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBSnapshotTenantDatabasesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3821,7 +3740,6 @@ extension RDSClient { public func describeDBSnapshots(input: DescribeDBSnapshotsInput) async throws -> DescribeDBSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBSnapshots") @@ -3845,7 +3763,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3866,7 +3784,6 @@ extension RDSClient { public func describeDBSubnetGroups(input: DescribeDBSubnetGroupsInput) async throws -> DescribeDBSubnetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDBSubnetGroups") @@ -3890,7 +3807,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDBSubnetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDBSubnetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDBSubnetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3906,7 +3823,6 @@ extension RDSClient { public func describeEngineDefaultClusterParameters(input: DescribeEngineDefaultClusterParametersInput) async throws -> DescribeEngineDefaultClusterParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEngineDefaultClusterParameters") @@ -3930,7 +3846,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEngineDefaultClusterParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEngineDefaultClusterParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEngineDefaultClusterParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3946,7 +3862,6 @@ extension RDSClient { public func describeEngineDefaultParameters(input: DescribeEngineDefaultParametersInput) async throws -> DescribeEngineDefaultParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEngineDefaultParameters") @@ -3970,7 +3885,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEngineDefaultParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEngineDefaultParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEngineDefaultParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3986,7 +3901,6 @@ extension RDSClient { public func describeEventCategories(input: DescribeEventCategoriesInput) async throws -> DescribeEventCategoriesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEventCategories") @@ -4010,7 +3924,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventCategoriesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventCategoriesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventCategoriesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4031,7 +3945,6 @@ extension RDSClient { public func describeEventSubscriptions(input: DescribeEventSubscriptionsInput) async throws -> DescribeEventSubscriptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEventSubscriptions") @@ -4055,7 +3968,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventSubscriptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventSubscriptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventSubscriptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4071,7 +3984,6 @@ extension RDSClient { public func describeEvents(input: DescribeEventsInput) async throws -> DescribeEventsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEvents") @@ -4095,7 +4007,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4116,7 +4028,6 @@ extension RDSClient { public func describeExportTasks(input: DescribeExportTasksInput) async throws -> DescribeExportTasksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeExportTasks") @@ -4140,7 +4051,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeExportTasksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeExportTasksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeExportTasksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4161,7 +4072,6 @@ extension RDSClient { public func describeGlobalClusters(input: DescribeGlobalClustersInput) async throws -> DescribeGlobalClustersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeGlobalClusters") @@ -4185,7 +4095,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeGlobalClustersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeGlobalClustersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeGlobalClustersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4206,7 +4116,6 @@ extension RDSClient { public func describeIntegrations(input: DescribeIntegrationsInput) async throws -> DescribeIntegrationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeIntegrations") @@ -4230,7 +4139,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeIntegrationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeIntegrationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeIntegrationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4246,7 +4155,6 @@ extension RDSClient { public func describeOptionGroupOptions(input: DescribeOptionGroupOptionsInput) async throws -> DescribeOptionGroupOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeOptionGroupOptions") @@ -4270,7 +4178,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeOptionGroupOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeOptionGroupOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeOptionGroupOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4291,7 +4199,6 @@ extension RDSClient { public func describeOptionGroups(input: DescribeOptionGroupsInput) async throws -> DescribeOptionGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeOptionGroups") @@ -4315,7 +4222,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeOptionGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeOptionGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeOptionGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4331,7 +4238,6 @@ extension RDSClient { public func describeOrderableDBInstanceOptions(input: DescribeOrderableDBInstanceOptionsInput) async throws -> DescribeOrderableDBInstanceOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeOrderableDBInstanceOptions") @@ -4355,7 +4261,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeOrderableDBInstanceOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeOrderableDBInstanceOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeOrderableDBInstanceOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4376,7 +4282,6 @@ extension RDSClient { public func describePendingMaintenanceActions(input: DescribePendingMaintenanceActionsInput) async throws -> DescribePendingMaintenanceActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePendingMaintenanceActions") @@ -4400,7 +4305,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePendingMaintenanceActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePendingMaintenanceActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePendingMaintenanceActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4421,7 +4326,6 @@ extension RDSClient { public func describeReservedDBInstances(input: DescribeReservedDBInstancesInput) async throws -> DescribeReservedDBInstancesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedDBInstances") @@ -4445,7 +4349,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedDBInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedDBInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedDBInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4466,7 +4370,6 @@ extension RDSClient { public func describeReservedDBInstancesOfferings(input: DescribeReservedDBInstancesOfferingsInput) async throws -> DescribeReservedDBInstancesOfferingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedDBInstancesOfferings") @@ -4490,7 +4393,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedDBInstancesOfferingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedDBInstancesOfferingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedDBInstancesOfferingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4506,7 +4409,6 @@ extension RDSClient { public func describeSourceRegions(input: DescribeSourceRegionsInput) async throws -> DescribeSourceRegionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSourceRegions") @@ -4530,7 +4432,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSourceRegionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSourceRegionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSourceRegionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4551,7 +4453,6 @@ extension RDSClient { public func describeTenantDatabases(input: DescribeTenantDatabasesInput) async throws -> DescribeTenantDatabasesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTenantDatabases") @@ -4575,7 +4476,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTenantDatabasesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTenantDatabasesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTenantDatabasesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4597,7 +4498,6 @@ extension RDSClient { public func describeValidDBInstanceModifications(input: DescribeValidDBInstanceModificationsInput) async throws -> DescribeValidDBInstanceModificationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeValidDBInstanceModifications") @@ -4621,7 +4521,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeValidDBInstanceModificationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeValidDBInstanceModificationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeValidDBInstanceModificationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4643,7 +4543,6 @@ extension RDSClient { public func disableHttpEndpoint(input: DisableHttpEndpointInput) async throws -> DisableHttpEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableHttpEndpoint") @@ -4667,7 +4566,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableHttpEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableHttpEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableHttpEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4689,7 +4588,6 @@ extension RDSClient { public func downloadDBLogFilePortion(input: DownloadDBLogFilePortionInput) async throws -> DownloadDBLogFilePortionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "downloadDBLogFilePortion") @@ -4713,7 +4611,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DownloadDBLogFilePortionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DownloadDBLogFilePortionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DownloadDBLogFilePortionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4735,7 +4633,6 @@ extension RDSClient { public func enableHttpEndpoint(input: EnableHttpEndpointInput) async throws -> EnableHttpEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableHttpEndpoint") @@ -4759,7 +4656,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableHttpEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableHttpEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableHttpEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4782,7 +4679,6 @@ extension RDSClient { public func failoverDBCluster(input: FailoverDBClusterInput) async throws -> FailoverDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "failoverDBCluster") @@ -4806,7 +4702,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(FailoverDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(FailoverDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(FailoverDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4841,7 +4737,6 @@ extension RDSClient { public func failoverGlobalCluster(input: FailoverGlobalClusterInput) async throws -> FailoverGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "failoverGlobalCluster") @@ -4865,7 +4760,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(FailoverGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(FailoverGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(FailoverGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4894,7 +4789,6 @@ extension RDSClient { public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -4918,7 +4812,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4941,7 +4835,6 @@ extension RDSClient { public func modifyActivityStream(input: ModifyActivityStreamInput) async throws -> ModifyActivityStreamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyActivityStream") @@ -4965,7 +4858,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyActivityStreamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyActivityStreamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyActivityStreamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4993,7 +4886,6 @@ extension RDSClient { public func modifyCertificates(input: ModifyCertificatesInput) async throws -> ModifyCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCertificates") @@ -5017,7 +4909,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5040,7 +4932,6 @@ extension RDSClient { public func modifyCurrentDBClusterCapacity(input: ModifyCurrentDBClusterCapacityInput) async throws -> ModifyCurrentDBClusterCapacityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCurrentDBClusterCapacity") @@ -5064,7 +4955,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCurrentDBClusterCapacityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCurrentDBClusterCapacityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCurrentDBClusterCapacityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5086,7 +4977,6 @@ extension RDSClient { public func modifyCustomDBEngineVersion(input: ModifyCustomDBEngineVersionInput) async throws -> ModifyCustomDBEngineVersionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCustomDBEngineVersion") @@ -5110,7 +5000,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCustomDBEngineVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCustomDBEngineVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCustomDBEngineVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5145,7 +5035,6 @@ extension RDSClient { public func modifyDBCluster(input: ModifyDBClusterInput) async throws -> ModifyDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBCluster") @@ -5169,7 +5058,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5205,7 +5094,6 @@ extension RDSClient { public func modifyDBClusterEndpoint(input: ModifyDBClusterEndpointInput) async throws -> ModifyDBClusterEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBClusterEndpoint") @@ -5229,7 +5117,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5251,7 +5139,6 @@ extension RDSClient { public func modifyDBClusterParameterGroup(input: ModifyDBClusterParameterGroupInput) async throws -> ModifyDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBClusterParameterGroup") @@ -5275,7 +5162,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5298,7 +5185,6 @@ extension RDSClient { public func modifyDBClusterSnapshotAttribute(input: ModifyDBClusterSnapshotAttributeInput) async throws -> ModifyDBClusterSnapshotAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBClusterSnapshotAttribute") @@ -5322,7 +5208,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBClusterSnapshotAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBClusterSnapshotAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBClusterSnapshotAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5363,7 +5249,6 @@ extension RDSClient { public func modifyDBInstance(input: ModifyDBInstanceInput) async throws -> ModifyDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBInstance") @@ -5387,7 +5272,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5409,7 +5294,6 @@ extension RDSClient { public func modifyDBParameterGroup(input: ModifyDBParameterGroupInput) async throws -> ModifyDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBParameterGroup") @@ -5433,7 +5317,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5456,7 +5340,6 @@ extension RDSClient { public func modifyDBProxy(input: ModifyDBProxyInput) async throws -> ModifyDBProxyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBProxy") @@ -5480,7 +5363,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBProxyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBProxyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBProxyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5504,7 +5387,6 @@ extension RDSClient { public func modifyDBProxyEndpoint(input: ModifyDBProxyEndpointInput) async throws -> ModifyDBProxyEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBProxyEndpoint") @@ -5528,7 +5410,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBProxyEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBProxyEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBProxyEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5551,7 +5433,6 @@ extension RDSClient { public func modifyDBProxyTargetGroup(input: ModifyDBProxyTargetGroupInput) async throws -> ModifyDBProxyTargetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBProxyTargetGroup") @@ -5575,7 +5456,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBProxyTargetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBProxyTargetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBProxyTargetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5591,7 +5472,6 @@ extension RDSClient { public func modifyDBRecommendation(input: ModifyDBRecommendationInput) async throws -> ModifyDBRecommendationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBRecommendation") @@ -5615,7 +5495,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBRecommendationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBRecommendationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBRecommendationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5636,7 +5516,6 @@ extension RDSClient { public func modifyDBSnapshot(input: ModifyDBSnapshotInput) async throws -> ModifyDBSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBSnapshot") @@ -5660,7 +5539,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5683,7 +5562,6 @@ extension RDSClient { public func modifyDBSnapshotAttribute(input: ModifyDBSnapshotAttributeInput) async throws -> ModifyDBSnapshotAttributeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBSnapshotAttribute") @@ -5707,7 +5585,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBSnapshotAttributeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBSnapshotAttributeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBSnapshotAttributeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5732,7 +5610,6 @@ extension RDSClient { public func modifyDBSubnetGroup(input: ModifyDBSubnetGroupInput) async throws -> ModifyDBSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyDBSubnetGroup") @@ -5756,7 +5633,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyDBSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyDBSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyDBSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5782,7 +5659,6 @@ extension RDSClient { public func modifyEventSubscription(input: ModifyEventSubscriptionInput) async throws -> ModifyEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyEventSubscription") @@ -5806,7 +5682,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5830,7 +5706,6 @@ extension RDSClient { public func modifyGlobalCluster(input: ModifyGlobalClusterInput) async throws -> ModifyGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyGlobalCluster") @@ -5854,7 +5729,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5876,7 +5751,6 @@ extension RDSClient { public func modifyOptionGroup(input: ModifyOptionGroupInput) async throws -> ModifyOptionGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyOptionGroup") @@ -5900,7 +5774,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyOptionGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyOptionGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyOptionGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5927,7 +5801,6 @@ extension RDSClient { public func modifyTenantDatabase(input: ModifyTenantDatabaseInput) async throws -> ModifyTenantDatabaseOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyTenantDatabase") @@ -5951,7 +5824,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyTenantDatabaseOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyTenantDatabaseOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyTenantDatabaseOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5977,7 +5850,6 @@ extension RDSClient { public func promoteReadReplica(input: PromoteReadReplicaInput) async throws -> PromoteReadReplicaOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "promoteReadReplica") @@ -6001,7 +5873,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PromoteReadReplicaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PromoteReadReplicaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PromoteReadReplicaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6023,7 +5895,6 @@ extension RDSClient { public func promoteReadReplicaDBCluster(input: PromoteReadReplicaDBClusterInput) async throws -> PromoteReadReplicaDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "promoteReadReplicaDBCluster") @@ -6047,7 +5918,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PromoteReadReplicaDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PromoteReadReplicaDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PromoteReadReplicaDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6070,7 +5941,6 @@ extension RDSClient { public func purchaseReservedDBInstancesOffering(input: PurchaseReservedDBInstancesOfferingInput) async throws -> PurchaseReservedDBInstancesOfferingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "purchaseReservedDBInstancesOffering") @@ -6094,7 +5964,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PurchaseReservedDBInstancesOfferingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PurchaseReservedDBInstancesOfferingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PurchaseReservedDBInstancesOfferingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6117,7 +5987,6 @@ extension RDSClient { public func rebootDBCluster(input: RebootDBClusterInput) async throws -> RebootDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebootDBCluster") @@ -6141,7 +6010,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebootDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebootDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebootDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6163,7 +6032,6 @@ extension RDSClient { public func rebootDBInstance(input: RebootDBInstanceInput) async throws -> RebootDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebootDBInstance") @@ -6187,7 +6055,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebootDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebootDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebootDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6216,7 +6084,6 @@ extension RDSClient { public func registerDBProxyTargets(input: RegisterDBProxyTargetsInput) async throws -> RegisterDBProxyTargetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "registerDBProxyTargets") @@ -6240,7 +6107,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RegisterDBProxyTargetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RegisterDBProxyTargetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RegisterDBProxyTargetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6263,7 +6130,6 @@ extension RDSClient { public func removeFromGlobalCluster(input: RemoveFromGlobalClusterInput) async throws -> RemoveFromGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeFromGlobalCluster") @@ -6287,7 +6153,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveFromGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveFromGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveFromGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6310,7 +6176,6 @@ extension RDSClient { public func removeRoleFromDBCluster(input: RemoveRoleFromDBClusterInput) async throws -> RemoveRoleFromDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeRoleFromDBCluster") @@ -6334,7 +6199,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveRoleFromDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveRoleFromDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveRoleFromDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6357,7 +6222,6 @@ extension RDSClient { public func removeRoleFromDBInstance(input: RemoveRoleFromDBInstanceInput) async throws -> RemoveRoleFromDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeRoleFromDBInstance") @@ -6381,7 +6245,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveRoleFromDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveRoleFromDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveRoleFromDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6403,7 +6267,6 @@ extension RDSClient { public func removeSourceIdentifierFromSubscription(input: RemoveSourceIdentifierFromSubscriptionInput) async throws -> RemoveSourceIdentifierFromSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeSourceIdentifierFromSubscription") @@ -6427,7 +6290,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveSourceIdentifierFromSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveSourceIdentifierFromSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveSourceIdentifierFromSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6456,7 +6319,6 @@ extension RDSClient { public func removeTagsFromResource(input: RemoveTagsFromResourceInput) async throws -> RemoveTagsFromResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removeTagsFromResource") @@ -6480,7 +6342,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemoveTagsFromResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemoveTagsFromResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemoveTagsFromResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6502,7 +6364,6 @@ extension RDSClient { public func resetDBClusterParameterGroup(input: ResetDBClusterParameterGroupInput) async throws -> ResetDBClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetDBClusterParameterGroup") @@ -6526,7 +6387,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetDBClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetDBClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetDBClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6548,7 +6409,6 @@ extension RDSClient { public func resetDBParameterGroup(input: ResetDBParameterGroupInput) async throws -> ResetDBParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetDBParameterGroup") @@ -6572,7 +6432,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetDBParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetDBParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetDBParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6607,7 +6467,6 @@ extension RDSClient { public func restoreDBClusterFromS3(input: RestoreDBClusterFromS3Input) async throws -> RestoreDBClusterFromS3Output { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBClusterFromS3") @@ -6631,7 +6490,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBClusterFromS3OutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBClusterFromS3Output.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBClusterFromS3OutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6670,7 +6529,6 @@ extension RDSClient { public func restoreDBClusterFromSnapshot(input: RestoreDBClusterFromSnapshotInput) async throws -> RestoreDBClusterFromSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBClusterFromSnapshot") @@ -6694,7 +6552,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBClusterFromSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBClusterFromSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBClusterFromSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6733,7 +6591,6 @@ extension RDSClient { public func restoreDBClusterToPointInTime(input: RestoreDBClusterToPointInTimeInput) async throws -> RestoreDBClusterToPointInTimeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBClusterToPointInTime") @@ -6757,7 +6614,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBClusterToPointInTimeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBClusterToPointInTimeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBClusterToPointInTimeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6800,7 +6657,6 @@ extension RDSClient { public func restoreDBInstanceFromDBSnapshot(input: RestoreDBInstanceFromDBSnapshotInput) async throws -> RestoreDBInstanceFromDBSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBInstanceFromDBSnapshot") @@ -6824,7 +6680,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBInstanceFromDBSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBInstanceFromDBSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBInstanceFromDBSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6862,7 +6718,6 @@ extension RDSClient { public func restoreDBInstanceFromS3(input: RestoreDBInstanceFromS3Input) async throws -> RestoreDBInstanceFromS3Output { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBInstanceFromS3") @@ -6886,7 +6741,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBInstanceFromS3OutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBInstanceFromS3Output.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBInstanceFromS3OutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6930,7 +6785,6 @@ extension RDSClient { public func restoreDBInstanceToPointInTime(input: RestoreDBInstanceToPointInTimeInput) async throws -> RestoreDBInstanceToPointInTimeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreDBInstanceToPointInTime") @@ -6954,7 +6808,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreDBInstanceToPointInTimeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreDBInstanceToPointInTimeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreDBInstanceToPointInTimeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6977,7 +6831,6 @@ extension RDSClient { public func revokeDBSecurityGroupIngress(input: RevokeDBSecurityGroupIngressInput) async throws -> RevokeDBSecurityGroupIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "revokeDBSecurityGroupIngress") @@ -7001,7 +6854,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RevokeDBSecurityGroupIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RevokeDBSecurityGroupIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RevokeDBSecurityGroupIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7027,7 +6880,6 @@ extension RDSClient { public func startActivityStream(input: StartActivityStreamInput) async throws -> StartActivityStreamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startActivityStream") @@ -7051,7 +6903,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartActivityStreamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartActivityStreamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartActivityStreamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7074,7 +6926,6 @@ extension RDSClient { public func startDBCluster(input: StartDBClusterInput) async throws -> StartDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startDBCluster") @@ -7098,7 +6949,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7129,7 +6980,6 @@ extension RDSClient { public func startDBInstance(input: StartDBInstanceInput) async throws -> StartDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startDBInstance") @@ -7153,7 +7003,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7178,7 +7028,6 @@ extension RDSClient { public func startDBInstanceAutomatedBackupsReplication(input: StartDBInstanceAutomatedBackupsReplicationInput) async throws -> StartDBInstanceAutomatedBackupsReplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startDBInstanceAutomatedBackupsReplication") @@ -7202,7 +7051,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartDBInstanceAutomatedBackupsReplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartDBInstanceAutomatedBackupsReplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartDBInstanceAutomatedBackupsReplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7232,7 +7081,6 @@ extension RDSClient { public func startExportTask(input: StartExportTaskInput) async throws -> StartExportTaskOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "startExportTask") @@ -7256,7 +7104,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StartExportTaskOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StartExportTaskOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StartExportTaskOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7281,7 +7129,6 @@ extension RDSClient { public func stopActivityStream(input: StopActivityStreamInput) async throws -> StopActivityStreamOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopActivityStream") @@ -7305,7 +7152,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopActivityStreamOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopActivityStreamOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopActivityStreamOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7328,7 +7175,6 @@ extension RDSClient { public func stopDBCluster(input: StopDBClusterInput) async throws -> StopDBClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopDBCluster") @@ -7352,7 +7198,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopDBClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopDBClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopDBClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7377,7 +7223,6 @@ extension RDSClient { public func stopDBInstance(input: StopDBInstanceInput) async throws -> StopDBInstanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopDBInstance") @@ -7401,7 +7246,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopDBInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopDBInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopDBInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7423,7 +7268,6 @@ extension RDSClient { public func stopDBInstanceAutomatedBackupsReplication(input: StopDBInstanceAutomatedBackupsReplicationInput) async throws -> StopDBInstanceAutomatedBackupsReplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "stopDBInstanceAutomatedBackupsReplication") @@ -7447,7 +7291,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(StopDBInstanceAutomatedBackupsReplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(StopDBInstanceAutomatedBackupsReplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(StopDBInstanceAutomatedBackupsReplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7469,7 +7313,6 @@ extension RDSClient { public func switchoverBlueGreenDeployment(input: SwitchoverBlueGreenDeploymentInput) async throws -> SwitchoverBlueGreenDeploymentOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "switchoverBlueGreenDeployment") @@ -7493,7 +7336,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SwitchoverBlueGreenDeploymentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SwitchoverBlueGreenDeploymentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SwitchoverBlueGreenDeploymentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7517,7 +7360,6 @@ extension RDSClient { public func switchoverGlobalCluster(input: SwitchoverGlobalClusterInput) async throws -> SwitchoverGlobalClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "switchoverGlobalCluster") @@ -7541,7 +7383,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SwitchoverGlobalClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SwitchoverGlobalClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SwitchoverGlobalClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -7563,7 +7405,6 @@ extension RDSClient { public func switchoverReadReplica(input: SwitchoverReadReplicaInput) async throws -> SwitchoverReadReplicaOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "switchoverReadReplica") @@ -7587,7 +7428,7 @@ extension RDSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SwitchoverReadReplicaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SwitchoverReadReplicaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SwitchoverReadReplicaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSRDS/models/Models.swift b/Sources/Services/AWSRDS/models/Models.swift index ef3afaf9996..ba1a6ad5ae9 100644 --- a/Sources/Services/AWSRDS/models/Models.swift +++ b/Sources/Services/AWSRDS/models/Models.swift @@ -1,8 +1,10 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML -extension RDSClientTypes.AccountQuota: Swift.Codable { +extension RDSClientTypes.AccountQuota: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accountQuotaName = "AccountQuotaName" case max = "Max" @@ -22,14 +24,15 @@ extension RDSClientTypes.AccountQuota: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountQuotaNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountQuotaName) - accountQuotaName = accountQuotaNameDecoded - let usedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .used) - used = usedDecoded - let maxDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .max) - max = maxDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.AccountQuota() + value.accountQuotaName = try reader["AccountQuotaName"].readIfPresent() + value.used = try reader["Used"].readIfPresent() + value.max = try reader["Max"].readIfPresent() + return value + } } } @@ -205,6 +208,12 @@ extension RDSClientTypes { } extension AddRoleToDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case featureName = "FeatureName" + case roleArn = "RoleArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -250,32 +259,12 @@ public struct AddRoleToDBClusterInput: Swift.Equatable { } } -struct AddRoleToDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let roleArn: Swift.String? - let featureName: Swift.String? -} - -extension AddRoleToDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case featureName = "FeatureName" - case roleArn = "RoleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded - } -} +extension AddRoleToDBClusterOutput { -extension AddRoleToDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddRoleToDBClusterOutput() + } } } @@ -284,20 +273,33 @@ public struct AddRoleToDBClusterOutput: Swift.Equatable { public init() { } } -enum AddRoleToDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterRoleAlreadyExists": return try await DBClusterRoleAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterRoleQuotaExceeded": return try await DBClusterRoleQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddRoleToDBClusterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterRoleAlreadyExists": return try await DBClusterRoleAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterRoleQuotaExceeded": return try await DBClusterRoleQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddRoleToDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case featureName = "FeatureName" + case roleArn = "RoleArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -344,32 +346,12 @@ public struct AddRoleToDBInstanceInput: Swift.Equatable { } } -struct AddRoleToDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let roleArn: Swift.String? - let featureName: Swift.String? -} - -extension AddRoleToDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case featureName = "FeatureName" - case roleArn = "RoleArn" - } +extension AddRoleToDBInstanceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded - } -} - -extension AddRoleToDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddRoleToDBInstanceOutput() + } } } @@ -378,20 +360,32 @@ public struct AddRoleToDBInstanceOutput: Swift.Equatable { public init() { } } -enum AddRoleToDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceRoleAlreadyExists": return try await DBInstanceRoleAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceRoleQuotaExceeded": return try await DBInstanceRoleQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddRoleToDBInstanceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceRoleAlreadyExists": return try await DBInstanceRoleAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceRoleQuotaExceeded": return try await DBInstanceRoleQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddSourceIdentifierToSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceIdentifier = "SourceIdentifier" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceIdentifier = sourceIdentifier { @@ -445,34 +439,15 @@ public struct AddSourceIdentifierToSubscriptionInput: Swift.Equatable { } } -struct AddSourceIdentifierToSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let sourceIdentifier: Swift.String? -} - -extension AddSourceIdentifierToSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceIdentifier = "SourceIdentifier" - case subscriptionName = "SubscriptionName" - } +extension AddSourceIdentifierToSubscriptionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - } -} - -extension AddSourceIdentifierToSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AddSourceIdentifierToSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AddSourceIdentifierToSubscriptionResult"] + var value = AddSourceIdentifierToSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: RDSClientTypes.EventSubscription.readingClosure) + return value } } } @@ -489,35 +464,30 @@ public struct AddSourceIdentifierToSubscriptionOutput: Swift.Equatable { } } -struct AddSourceIdentifierToSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: RDSClientTypes.EventSubscription? -} - -extension AddSourceIdentifierToSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AddSourceIdentifierToSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(RDSClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum AddSourceIdentifierToSubscriptionOutputError { -enum AddSourceIdentifierToSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AddTagsToResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -566,67 +536,41 @@ public struct AddTagsToResourceInput: Swift.Equatable { } } -struct AddTagsToResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tags: [RDSClientTypes.Tag]? -} +extension AddTagsToResourceOutput { -extension AddTagsToResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddTagsToResourceOutput() } } } -extension AddTagsToResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct AddTagsToResourceOutput: Swift.Equatable { public init() { } } -enum AddTagsToResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotTenantDatabaseNotFoundFault": return try await DBSnapshotTenantDatabaseNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddTagsToResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotTenantDatabaseNotFoundFault": return try await DBSnapshotTenantDatabaseNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -664,6 +608,12 @@ extension RDSClientTypes { } extension ApplyPendingMaintenanceActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyAction = "ApplyAction" + case optInType = "OptInType" + case resourceIdentifier = "ResourceIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyAction = applyAction { @@ -717,38 +667,15 @@ public struct ApplyPendingMaintenanceActionInput: Swift.Equatable { } } -struct ApplyPendingMaintenanceActionInputBody: Swift.Equatable { - let resourceIdentifier: Swift.String? - let applyAction: Swift.String? - let optInType: Swift.String? -} - -extension ApplyPendingMaintenanceActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyAction = "ApplyAction" - case optInType = "OptInType" - case resourceIdentifier = "ResourceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - let applyActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyAction) - applyAction = applyActionDecoded - let optInTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optInType) - optInType = optInTypeDecoded - } -} +extension ApplyPendingMaintenanceActionOutput { -extension ApplyPendingMaintenanceActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ApplyPendingMaintenanceActionOutputBody = try responseDecoder.decode(responseBody: data) - self.resourcePendingMaintenanceActions = output.resourcePendingMaintenanceActions - } else { - self.resourcePendingMaintenanceActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ApplyPendingMaintenanceActionResult"] + var value = ApplyPendingMaintenanceActionOutput() + value.resourcePendingMaintenanceActions = try reader["ResourcePendingMaintenanceActions"].readIfPresent(readingClosure: RDSClientTypes.ResourcePendingMaintenanceActions.readingClosure) + return value } } } @@ -765,31 +692,21 @@ public struct ApplyPendingMaintenanceActionOutput: Swift.Equatable { } } -struct ApplyPendingMaintenanceActionOutputBody: Swift.Equatable { - let resourcePendingMaintenanceActions: RDSClientTypes.ResourcePendingMaintenanceActions? -} - -extension ApplyPendingMaintenanceActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourcePendingMaintenanceActions = "ResourcePendingMaintenanceActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ApplyPendingMaintenanceActionResult")) - let resourcePendingMaintenanceActionsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ResourcePendingMaintenanceActions.self, forKey: .resourcePendingMaintenanceActions) - resourcePendingMaintenanceActions = resourcePendingMaintenanceActionsDecoded - } -} +enum ApplyPendingMaintenanceActionOutputError { -enum ApplyPendingMaintenanceActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -856,16 +773,14 @@ extension RDSClientTypes { } extension AuthorizationAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -893,33 +808,15 @@ public struct AuthorizationAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct AuthorizationAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AuthorizationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -947,33 +844,15 @@ public struct AuthorizationNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct AuthorizationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AuthorizationQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1001,23 +880,15 @@ public struct AuthorizationQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct AuthorizationQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationQuotaExceededFaultBody: Swift.Decodable { +extension AuthorizeDBSecurityGroupIngressInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case cidrip = "CIDRIP" + case dbSecurityGroupName = "DBSecurityGroupName" + case ec2SecurityGroupId = "EC2SecurityGroupId" + case ec2SecurityGroupName = "EC2SecurityGroupName" + case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" } -} -extension AuthorizeDBSecurityGroupIngressInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cidrip = cidrip { @@ -1077,46 +948,15 @@ public struct AuthorizeDBSecurityGroupIngressInput: Swift.Equatable { } } -struct AuthorizeDBSecurityGroupIngressInputBody: Swift.Equatable { - let dbSecurityGroupName: Swift.String? - let cidrip: Swift.String? - let ec2SecurityGroupName: Swift.String? - let ec2SecurityGroupId: Swift.String? - let ec2SecurityGroupOwnerId: Swift.String? -} +extension AuthorizeDBSecurityGroupIngressOutput { -extension AuthorizeDBSecurityGroupIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrip = "CIDRIP" - case dbSecurityGroupName = "DBSecurityGroupName" - case ec2SecurityGroupId = "EC2SecurityGroupId" - case ec2SecurityGroupName = "EC2SecurityGroupName" - case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupName) - dbSecurityGroupName = dbSecurityGroupNameDecoded - let cidripDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrip) - cidrip = cidripDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupId) - ec2SecurityGroupId = ec2SecurityGroupIdDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded - } -} - -extension AuthorizeDBSecurityGroupIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeDBSecurityGroupIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSecurityGroup = output.dbSecurityGroup - } else { - self.dbSecurityGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AuthorizeDBSecurityGroupIngressResult"] + var value = AuthorizeDBSecurityGroupIngressOutput() + value.dbSecurityGroup = try reader["DBSecurityGroup"].readIfPresent(readingClosure: RDSClientTypes.DBSecurityGroup.readingClosure) + return value } } } @@ -1133,32 +973,22 @@ public struct AuthorizeDBSecurityGroupIngressOutput: Swift.Equatable { } } -struct AuthorizeDBSecurityGroupIngressOutputBody: Swift.Equatable { - let dbSecurityGroup: RDSClientTypes.DBSecurityGroup? -} +enum AuthorizeDBSecurityGroupIngressOutputError { -extension AuthorizeDBSecurityGroupIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSecurityGroup = "DBSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AuthorizeDBSecurityGroupIngressResult")) - let dbSecurityGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSecurityGroup.self, forKey: .dbSecurityGroup) - dbSecurityGroup = dbSecurityGroupDecoded - } -} - -enum AuthorizeDBSecurityGroupIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationAlreadyExists": return try await AuthorizationAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AuthorizationQuotaExceeded": return try await AuthorizationQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationAlreadyExists": return try await AuthorizationAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "AuthorizationQuotaExceeded": return try await AuthorizationQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -1195,7 +1025,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.AvailabilityZone: Swift.Codable { +extension RDSClientTypes.AvailabilityZone: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -1207,10 +1037,13 @@ extension RDSClientTypes.AvailabilityZone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.AvailabilityZone() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -1230,7 +1063,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.AvailableProcessorFeature: Swift.Codable { +extension RDSClientTypes.AvailableProcessorFeature: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case defaultValue = "DefaultValue" @@ -1250,14 +1083,15 @@ extension RDSClientTypes.AvailableProcessorFeature: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.AvailableProcessorFeature() + value.name = try reader["Name"].readIfPresent() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + return value + } } } @@ -1286,6 +1120,13 @@ extension RDSClientTypes { } extension BacktrackDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case backtrackTo = "BacktrackTo" + case dbClusterIdentifier = "DBClusterIdentifier" + case force = "Force" + case useEarliestTimeOnPointInTimeUnavailable = "UseEarliestTimeOnPointInTimeUnavailable" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let backtrackTo = backtrackTo { @@ -1355,52 +1196,20 @@ public struct BacktrackDBClusterInput: Swift.Equatable { } } -struct BacktrackDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let backtrackTo: ClientRuntime.Date? - let force: Swift.Bool? - let useEarliestTimeOnPointInTimeUnavailable: Swift.Bool? -} +extension BacktrackDBClusterOutput { -extension BacktrackDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case backtrackTo = "BacktrackTo" - case dbClusterIdentifier = "DBClusterIdentifier" - case force = "Force" - case useEarliestTimeOnPointInTimeUnavailable = "UseEarliestTimeOnPointInTimeUnavailable" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let backtrackToDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .backtrackTo) - backtrackTo = backtrackToDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - let useEarliestTimeOnPointInTimeUnavailableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useEarliestTimeOnPointInTimeUnavailable) - useEarliestTimeOnPointInTimeUnavailable = useEarliestTimeOnPointInTimeUnavailableDecoded - } -} - -extension BacktrackDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BacktrackDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.backtrackIdentifier = output.backtrackIdentifier - self.backtrackRequestCreationTime = output.backtrackRequestCreationTime - self.backtrackTo = output.backtrackTo - self.backtrackedFrom = output.backtrackedFrom - self.dbClusterIdentifier = output.dbClusterIdentifier - self.status = output.status - } else { - self.backtrackIdentifier = nil - self.backtrackRequestCreationTime = nil - self.backtrackTo = nil - self.backtrackedFrom = nil - self.dbClusterIdentifier = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BacktrackDBClusterResult"] + var value = BacktrackDBClusterOutput() + value.backtrackIdentifier = try reader["BacktrackIdentifier"].readIfPresent() + value.backtrackRequestCreationTime = try reader["BacktrackRequestCreationTime"].readTimestampIfPresent(format: .dateTime) + value.backtrackTo = try reader["BacktrackTo"].readTimestampIfPresent(format: .dateTime) + value.backtrackedFrom = try reader["BacktrackedFrom"].readTimestampIfPresent(format: .dateTime) + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -1446,65 +1255,33 @@ public struct BacktrackDBClusterOutput: Swift.Equatable { } } -struct BacktrackDBClusterOutputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let backtrackIdentifier: Swift.String? - let backtrackTo: ClientRuntime.Date? - let backtrackedFrom: ClientRuntime.Date? - let backtrackRequestCreationTime: ClientRuntime.Date? - let status: Swift.String? -} +enum BacktrackDBClusterOutputError { -extension BacktrackDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case backtrackIdentifier = "BacktrackIdentifier" - case backtrackRequestCreationTime = "BacktrackRequestCreationTime" - case backtrackTo = "BacktrackTo" - case backtrackedFrom = "BacktrackedFrom" - case dbClusterIdentifier = "DBClusterIdentifier" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BacktrackDBClusterResult")) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let backtrackIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .backtrackIdentifier) - backtrackIdentifier = backtrackIdentifierDecoded - let backtrackToDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .backtrackTo) - backtrackTo = backtrackToDecoded - let backtrackedFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .backtrackedFrom) - backtrackedFrom = backtrackedFromDecoded - let backtrackRequestCreationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .backtrackRequestCreationTime) - backtrackRequestCreationTime = backtrackRequestCreationTimeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - } -} - -enum BacktrackDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension BackupPolicyNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BackupPolicyNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1532,23 +1309,7 @@ public struct BackupPolicyNotFoundFault: ClientRuntime.ModeledError, AWSClientRu } } -struct BackupPolicyNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension BackupPolicyNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.BlueGreenDeployment: Swift.Codable { +extension RDSClientTypes.BlueGreenDeployment: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case blueGreenDeploymentIdentifier = "BlueGreenDeploymentIdentifier" case blueGreenDeploymentName = "BlueGreenDeploymentName" @@ -1627,80 +1388,22 @@ extension RDSClientTypes.BlueGreenDeployment: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let blueGreenDeploymentIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .blueGreenDeploymentIdentifier) - blueGreenDeploymentIdentifier = blueGreenDeploymentIdentifierDecoded - let blueGreenDeploymentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .blueGreenDeploymentName) - blueGreenDeploymentName = blueGreenDeploymentNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let targetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .target) - target = targetDecoded - if containerValues.contains(.switchoverDetails) { - struct KeyVal0{struct member{}} - let switchoverDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .switchoverDetails) - if let switchoverDetailsWrappedContainer = switchoverDetailsWrappedContainer { - let switchoverDetailsContainer = try switchoverDetailsWrappedContainer.decodeIfPresent([RDSClientTypes.SwitchoverDetail].self, forKey: .member) - var switchoverDetailsBuffer:[RDSClientTypes.SwitchoverDetail]? = nil - if let switchoverDetailsContainer = switchoverDetailsContainer { - switchoverDetailsBuffer = [RDSClientTypes.SwitchoverDetail]() - for structureContainer0 in switchoverDetailsContainer { - switchoverDetailsBuffer?.append(structureContainer0) - } - } - switchoverDetails = switchoverDetailsBuffer - } else { - switchoverDetails = [] - } - } else { - switchoverDetails = nil - } - if containerValues.contains(.tasks) { - struct KeyVal0{struct member{}} - let tasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tasks) - if let tasksWrappedContainer = tasksWrappedContainer { - let tasksContainer = try tasksWrappedContainer.decodeIfPresent([RDSClientTypes.BlueGreenDeploymentTask].self, forKey: .member) - var tasksBuffer:[RDSClientTypes.BlueGreenDeploymentTask]? = nil - if let tasksContainer = tasksContainer { - tasksBuffer = [RDSClientTypes.BlueGreenDeploymentTask]() - for structureContainer0 in tasksContainer { - tasksBuffer?.append(structureContainer0) - } - } - tasks = tasksBuffer - } else { - tasks = [] - } - } else { - tasks = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusDetailsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusDetails) - statusDetails = statusDetailsDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - let deleteTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deleteTime) - deleteTime = deleteTimeDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.BlueGreenDeployment() + value.blueGreenDeploymentIdentifier = try reader["BlueGreenDeploymentIdentifier"].readIfPresent() + value.blueGreenDeploymentName = try reader["BlueGreenDeploymentName"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.target = try reader["Target"].readIfPresent() + value.switchoverDetails = try reader["SwitchoverDetails"].readListIfPresent(memberReadingClosure: RDSClientTypes.SwitchoverDetail.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.tasks = try reader["Tasks"].readListIfPresent(memberReadingClosure: RDSClientTypes.BlueGreenDeploymentTask.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.statusDetails = try reader["StatusDetails"].readIfPresent() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.deleteTime = try reader["DeleteTime"].readTimestampIfPresent(format: .dateTime) + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -1776,16 +1479,14 @@ extension RDSClientTypes { } extension BlueGreenDeploymentAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BlueGreenDeploymentAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1813,33 +1514,15 @@ public struct BlueGreenDeploymentAlreadyExistsFault: ClientRuntime.ModeledError, } } -struct BlueGreenDeploymentAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension BlueGreenDeploymentAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension BlueGreenDeploymentNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BlueGreenDeploymentNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1867,23 +1550,7 @@ public struct BlueGreenDeploymentNotFoundFault: ClientRuntime.ModeledError, AWSC } } -struct BlueGreenDeploymentNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension BlueGreenDeploymentNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.BlueGreenDeploymentTask: Swift.Codable { +extension RDSClientTypes.BlueGreenDeploymentTask: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case status = "Status" @@ -1899,12 +1566,14 @@ extension RDSClientTypes.BlueGreenDeploymentTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.BlueGreenDeploymentTask() + value.name = try reader["Name"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -1937,6 +1606,10 @@ extension RDSClientTypes { } extension CancelExportTaskInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case exportTaskIdentifier = "ExportTaskIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let exportTaskIdentifier = exportTaskIdentifier { @@ -1967,60 +1640,30 @@ public struct CancelExportTaskInput: Swift.Equatable { } } -struct CancelExportTaskInputBody: Swift.Equatable { - let exportTaskIdentifier: Swift.String? -} - -extension CancelExportTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportTaskIdentifier = "ExportTaskIdentifier" - } +extension CancelExportTaskOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exportTaskIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportTaskIdentifier) - exportTaskIdentifier = exportTaskIdentifierDecoded - } -} - -extension CancelExportTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelExportTaskOutputBody = try responseDecoder.decode(responseBody: data) - self.exportOnly = output.exportOnly - self.exportTaskIdentifier = output.exportTaskIdentifier - self.failureCause = output.failureCause - self.iamRoleArn = output.iamRoleArn - self.kmsKeyId = output.kmsKeyId - self.percentProgress = output.percentProgress - self.s3Bucket = output.s3Bucket - self.s3Prefix = output.s3Prefix - self.snapshotTime = output.snapshotTime - self.sourceArn = output.sourceArn - self.sourceType = output.sourceType - self.status = output.status - self.taskEndTime = output.taskEndTime - self.taskStartTime = output.taskStartTime - self.totalExtractedDataInGB = output.totalExtractedDataInGB - self.warningMessage = output.warningMessage - } else { - self.exportOnly = nil - self.exportTaskIdentifier = nil - self.failureCause = nil - self.iamRoleArn = nil - self.kmsKeyId = nil - self.percentProgress = nil - self.s3Bucket = nil - self.s3Prefix = nil - self.snapshotTime = nil - self.sourceArn = nil - self.sourceType = nil - self.status = nil - self.taskEndTime = nil - self.taskStartTime = nil - self.totalExtractedDataInGB = nil - self.warningMessage = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CancelExportTaskResult"] + var value = CancelExportTaskOutput() + value.exportOnly = try reader["ExportOnly"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.exportTaskIdentifier = try reader["ExportTaskIdentifier"].readIfPresent() + value.failureCause = try reader["FailureCause"].readIfPresent() + value.iamRoleArn = try reader["IamRoleArn"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.s3Bucket = try reader["S3Bucket"].readIfPresent() + value.s3Prefix = try reader["S3Prefix"].readIfPresent() + value.snapshotTime = try reader["SnapshotTime"].readTimestampIfPresent(format: .dateTime) + value.sourceArn = try reader["SourceArn"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.taskEndTime = try reader["TaskEndTime"].readTimestampIfPresent(format: .dateTime) + value.taskStartTime = try reader["TaskStartTime"].readTimestampIfPresent(format: .dateTime) + value.totalExtractedDataInGB = try reader["TotalExtractedDataInGB"].readIfPresent() + value.warningMessage = try reader["WarningMessage"].readIfPresent() + return value } } } @@ -2118,112 +1761,25 @@ public struct CancelExportTaskOutput: Swift.Equatable { } } -struct CancelExportTaskOutputBody: Swift.Equatable { - let exportTaskIdentifier: Swift.String? - let sourceArn: Swift.String? - let exportOnly: [Swift.String]? - let snapshotTime: ClientRuntime.Date? - let taskStartTime: ClientRuntime.Date? - let taskEndTime: ClientRuntime.Date? - let s3Bucket: Swift.String? - let s3Prefix: Swift.String? - let iamRoleArn: Swift.String? - let kmsKeyId: Swift.String? - let status: Swift.String? - let percentProgress: Swift.Int? - let totalExtractedDataInGB: Swift.Int? - let failureCause: Swift.String? - let warningMessage: Swift.String? - let sourceType: RDSClientTypes.ExportSourceType? -} +enum CancelExportTaskOutputError { -extension CancelExportTaskOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportOnly = "ExportOnly" - case exportTaskIdentifier = "ExportTaskIdentifier" - case failureCause = "FailureCause" - case iamRoleArn = "IamRoleArn" - case kmsKeyId = "KmsKeyId" - case percentProgress = "PercentProgress" - case s3Bucket = "S3Bucket" - case s3Prefix = "S3Prefix" - case snapshotTime = "SnapshotTime" - case sourceArn = "SourceArn" - case sourceType = "SourceType" - case status = "Status" - case taskEndTime = "TaskEndTime" - case taskStartTime = "TaskStartTime" - case totalExtractedDataInGB = "TotalExtractedDataInGB" - case warningMessage = "WarningMessage" + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ExportTaskNotFound": return try await ExportTaskNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidExportTaskStateFault": return try await InvalidExportTaskStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } } +} - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CancelExportTaskResult")) - let exportTaskIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportTaskIdentifier) - exportTaskIdentifier = exportTaskIdentifierDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - if containerValues.contains(.exportOnly) { - struct KeyVal0{struct member{}} - let exportOnlyWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportOnly) - if let exportOnlyWrappedContainer = exportOnlyWrappedContainer { - let exportOnlyContainer = try exportOnlyWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportOnlyBuffer:[Swift.String]? = nil - if let exportOnlyContainer = exportOnlyContainer { - exportOnlyBuffer = [Swift.String]() - for stringContainer0 in exportOnlyContainer { - exportOnlyBuffer?.append(stringContainer0) - } - } - exportOnly = exportOnlyBuffer - } else { - exportOnly = [] - } - } else { - exportOnly = nil - } - let snapshotTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotTime) - snapshotTime = snapshotTimeDecoded - let taskStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .taskStartTime) - taskStartTime = taskStartTimeDecoded - let taskEndTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .taskEndTime) - taskEndTime = taskEndTimeDecoded - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let totalExtractedDataInGBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalExtractedDataInGB) - totalExtractedDataInGB = totalExtractedDataInGBDecoded - let failureCauseDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureCause) - failureCause = failureCauseDecoded - let warningMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .warningMessage) - warningMessage = warningMessageDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ExportSourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - } -} - -enum CancelExportTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ExportTaskNotFound": return try await ExportTaskNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidExportTaskStateFault": return try await InvalidExportTaskStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RDSClientTypes.Certificate: Swift.Codable { +extension RDSClientTypes.Certificate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case certificateArn = "CertificateArn" case certificateIdentifier = "CertificateIdentifier" @@ -2263,24 +1819,20 @@ extension RDSClientTypes.Certificate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateIdentifier) - certificateIdentifier = certificateIdentifierDecoded - let certificateTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateType) - certificateType = certificateTypeDecoded - let thumbprintDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .thumbprint) - thumbprint = thumbprintDecoded - let validFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validFrom) - validFrom = validFromDecoded - let validTillDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validTill) - validTill = validTillDecoded - let certificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateArn) - certificateArn = certificateArnDecoded - let customerOverrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .customerOverride) - customerOverride = customerOverrideDecoded - let customerOverrideValidTillDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .customerOverrideValidTill) - customerOverrideValidTill = customerOverrideValidTillDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Certificate() + value.certificateIdentifier = try reader["CertificateIdentifier"].readIfPresent() + value.certificateType = try reader["CertificateType"].readIfPresent() + value.thumbprint = try reader["Thumbprint"].readIfPresent() + value.validFrom = try reader["ValidFrom"].readTimestampIfPresent(format: .dateTime) + value.validTill = try reader["ValidTill"].readTimestampIfPresent(format: .dateTime) + value.certificateArn = try reader["CertificateArn"].readIfPresent() + value.customerOverride = try reader["CustomerOverride"].readIfPresent() + value.customerOverrideValidTill = try reader["CustomerOverrideValidTill"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -2328,7 +1880,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.CertificateDetails: Swift.Codable { +extension RDSClientTypes.CertificateDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case caIdentifier = "CAIdentifier" case validTill = "ValidTill" @@ -2344,12 +1896,14 @@ extension RDSClientTypes.CertificateDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let caIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caIdentifier) - caIdentifier = caIdentifierDecoded - let validTillDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .validTill) - validTill = validTillDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.CertificateDetails() + value.caIdentifier = try reader["CAIdentifier"].readIfPresent() + value.validTill = try reader["ValidTill"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -2374,16 +1928,14 @@ extension RDSClientTypes { } extension CertificateNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CertificateNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2411,23 +1963,7 @@ public struct CertificateNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct CertificateNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CertificateNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.CharacterSet: Swift.Codable { +extension RDSClientTypes.CharacterSet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case characterSetDescription = "CharacterSetDescription" case characterSetName = "CharacterSetName" @@ -2443,12 +1979,14 @@ extension RDSClientTypes.CharacterSet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let characterSetDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetDescription) - characterSetDescription = characterSetDescriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.CharacterSet() + value.characterSetName = try reader["CharacterSetName"].readIfPresent() + value.characterSetDescription = try reader["CharacterSetDescription"].readIfPresent() + return value + } } } @@ -2510,7 +2048,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.CloudwatchLogsExportConfiguration: Swift.Codable { +extension RDSClientTypes.CloudwatchLogsExportConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case disableLogTypes = "DisableLogTypes" case enableLogTypes = "EnableLogTypes" @@ -2544,45 +2082,13 @@ extension RDSClientTypes.CloudwatchLogsExportConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.enableLogTypes) { - struct KeyVal0{struct member{}} - let enableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableLogTypes) - if let enableLogTypesWrappedContainer = enableLogTypesWrappedContainer { - let enableLogTypesContainer = try enableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableLogTypesBuffer:[Swift.String]? = nil - if let enableLogTypesContainer = enableLogTypesContainer { - enableLogTypesBuffer = [Swift.String]() - for stringContainer0 in enableLogTypesContainer { - enableLogTypesBuffer?.append(stringContainer0) - } - } - enableLogTypes = enableLogTypesBuffer - } else { - enableLogTypes = [] - } - } else { - enableLogTypes = nil - } - if containerValues.contains(.disableLogTypes) { - struct KeyVal0{struct member{}} - let disableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .disableLogTypes) - if let disableLogTypesWrappedContainer = disableLogTypesWrappedContainer { - let disableLogTypesContainer = try disableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var disableLogTypesBuffer:[Swift.String]? = nil - if let disableLogTypesContainer = disableLogTypesContainer { - disableLogTypesBuffer = [Swift.String]() - for stringContainer0 in disableLogTypesContainer { - disableLogTypesBuffer?.append(stringContainer0) - } - } - disableLogTypes = disableLogTypesBuffer - } else { - disableLogTypes = [] - } - } else { - disableLogTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.CloudwatchLogsExportConfiguration() + value.enableLogTypes = try reader["EnableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.disableLogTypes = try reader["DisableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2607,7 +2113,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ClusterPendingModifiedValues: Swift.Codable { +extension RDSClientTypes.ClusterPendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case backupRetentionPeriod = "BackupRetentionPeriod" @@ -2655,28 +2161,22 @@ extension RDSClientTypes.ClusterPendingModifiedValues: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let pendingCloudwatchLogsExportsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.PendingCloudwatchLogsExports.self, forKey: .pendingCloudwatchLogsExports) - pendingCloudwatchLogsExports = pendingCloudwatchLogsExportsDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let rdsCustomClusterConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.RdsCustomClusterConfiguration.self, forKey: .rdsCustomClusterConfiguration) - rdsCustomClusterConfiguration = rdsCustomClusterConfigurationDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ClusterPendingModifiedValues() + value.pendingCloudwatchLogsExports = try reader["PendingCloudwatchLogsExports"].readIfPresent(readingClosure: RDSClientTypes.PendingCloudwatchLogsExports.readingClosure) + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.masterUserPassword = try reader["MasterUserPassword"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.rdsCustomClusterConfiguration = try reader["RdsCustomClusterConfiguration"].readIfPresent(readingClosure: RDSClientTypes.RdsCustomClusterConfiguration.readingClosure) + value.iops = try reader["Iops"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + return value + } } } @@ -2732,7 +2232,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ConnectionPoolConfiguration: Swift.Codable { +extension RDSClientTypes.ConnectionPoolConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case connectionBorrowTimeout = "ConnectionBorrowTimeout" case initQuery = "InitQuery" @@ -2769,35 +2269,17 @@ extension RDSClientTypes.ConnectionPoolConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxConnectionsPercentDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxConnectionsPercent) - maxConnectionsPercent = maxConnectionsPercentDecoded - let maxIdleConnectionsPercentDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxIdleConnectionsPercent) - maxIdleConnectionsPercent = maxIdleConnectionsPercentDecoded - let connectionBorrowTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .connectionBorrowTimeout) - connectionBorrowTimeout = connectionBorrowTimeoutDecoded - if containerValues.contains(.sessionPinningFilters) { - struct KeyVal0{struct member{}} - let sessionPinningFiltersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sessionPinningFilters) - if let sessionPinningFiltersWrappedContainer = sessionPinningFiltersWrappedContainer { - let sessionPinningFiltersContainer = try sessionPinningFiltersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sessionPinningFiltersBuffer:[Swift.String]? = nil - if let sessionPinningFiltersContainer = sessionPinningFiltersContainer { - sessionPinningFiltersBuffer = [Swift.String]() - for stringContainer0 in sessionPinningFiltersContainer { - sessionPinningFiltersBuffer?.append(stringContainer0) - } - } - sessionPinningFilters = sessionPinningFiltersBuffer - } else { - sessionPinningFilters = [] - } - } else { - sessionPinningFilters = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ConnectionPoolConfiguration() + value.maxConnectionsPercent = try reader["MaxConnectionsPercent"].readIfPresent() + value.maxIdleConnectionsPercent = try reader["MaxIdleConnectionsPercent"].readIfPresent() + value.connectionBorrowTimeout = try reader["ConnectionBorrowTimeout"].readIfPresent() + value.sessionPinningFilters = try reader["SessionPinningFilters"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.initQuery = try reader["InitQuery"].readIfPresent() + return value } - let initQueryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .initQuery) - initQuery = initQueryDecoded } } @@ -2839,7 +2321,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ConnectionPoolConfigurationInfo: Swift.Codable { +extension RDSClientTypes.ConnectionPoolConfigurationInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case connectionBorrowTimeout = "ConnectionBorrowTimeout" case initQuery = "InitQuery" @@ -2876,35 +2358,17 @@ extension RDSClientTypes.ConnectionPoolConfigurationInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maxConnectionsPercentDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxConnectionsPercent) - maxConnectionsPercent = maxConnectionsPercentDecoded - let maxIdleConnectionsPercentDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxIdleConnectionsPercent) - maxIdleConnectionsPercent = maxIdleConnectionsPercentDecoded - let connectionBorrowTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .connectionBorrowTimeout) - connectionBorrowTimeout = connectionBorrowTimeoutDecoded - if containerValues.contains(.sessionPinningFilters) { - struct KeyVal0{struct member{}} - let sessionPinningFiltersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sessionPinningFilters) - if let sessionPinningFiltersWrappedContainer = sessionPinningFiltersWrappedContainer { - let sessionPinningFiltersContainer = try sessionPinningFiltersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sessionPinningFiltersBuffer:[Swift.String]? = nil - if let sessionPinningFiltersContainer = sessionPinningFiltersContainer { - sessionPinningFiltersBuffer = [Swift.String]() - for stringContainer0 in sessionPinningFiltersContainer { - sessionPinningFiltersBuffer?.append(stringContainer0) - } - } - sessionPinningFilters = sessionPinningFiltersBuffer - } else { - sessionPinningFilters = [] - } - } else { - sessionPinningFilters = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ConnectionPoolConfigurationInfo() + value.maxConnectionsPercent = try reader["MaxConnectionsPercent"].readIfPresent() + value.maxIdleConnectionsPercent = try reader["MaxIdleConnectionsPercent"].readIfPresent() + value.connectionBorrowTimeout = try reader["ConnectionBorrowTimeout"].readIfPresent() + value.sessionPinningFilters = try reader["SessionPinningFilters"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.initQuery = try reader["InitQuery"].readIfPresent() + return value } - let initQueryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .initQuery) - initQuery = initQueryDecoded } } @@ -2940,7 +2404,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ContextAttribute: Swift.Codable { +extension RDSClientTypes.ContextAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -2956,12 +2420,14 @@ extension RDSClientTypes.ContextAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ContextAttribute() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -2986,6 +2452,13 @@ extension RDSClientTypes { } extension CopyDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceDBClusterParameterGroupIdentifier = "SourceDBClusterParameterGroupIdentifier" + case tags = "Tags" + case targetDBClusterParameterGroupDescription = "TargetDBClusterParameterGroupDescription" + case targetDBClusterParameterGroupIdentifier = "TargetDBClusterParameterGroupIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceDBClusterParameterGroupIdentifier = sourceDBClusterParameterGroupIdentifier { @@ -3061,59 +2534,15 @@ public struct CopyDBClusterParameterGroupInput: Swift.Equatable { } } -struct CopyDBClusterParameterGroupInputBody: Swift.Equatable { - let sourceDBClusterParameterGroupIdentifier: Swift.String? - let targetDBClusterParameterGroupIdentifier: Swift.String? - let targetDBClusterParameterGroupDescription: Swift.String? - let tags: [RDSClientTypes.Tag]? -} +extension CopyDBClusterParameterGroupOutput { -extension CopyDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceDBClusterParameterGroupIdentifier = "SourceDBClusterParameterGroupIdentifier" - case tags = "Tags" - case targetDBClusterParameterGroupDescription = "TargetDBClusterParameterGroupDescription" - case targetDBClusterParameterGroupIdentifier = "TargetDBClusterParameterGroupIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBClusterParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterParameterGroupIdentifier) - sourceDBClusterParameterGroupIdentifier = sourceDBClusterParameterGroupIdentifierDecoded - let targetDBClusterParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterParameterGroupIdentifier) - targetDBClusterParameterGroupIdentifier = targetDBClusterParameterGroupIdentifierDecoded - let targetDBClusterParameterGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterParameterGroupDescription) - targetDBClusterParameterGroupDescription = targetDBClusterParameterGroupDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CopyDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroup = output.dbClusterParameterGroup - } else { - self.dbClusterParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBClusterParameterGroupResult"] + var value = CopyDBClusterParameterGroupOutput() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent(readingClosure: RDSClientTypes.DBClusterParameterGroup.readingClosure) + return value } } } @@ -3130,36 +2559,35 @@ public struct CopyDBClusterParameterGroupOutput: Swift.Equatable { } } -struct CopyDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroup: RDSClientTypes.DBClusterParameterGroup? -} - -extension CopyDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroup = "DBClusterParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBClusterParameterGroupResult")) - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBClusterParameterGroup.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - } -} +enum CopyDBClusterParameterGroupOutputError { -enum CopyDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopyDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case copyTags = "CopyTags" + case kmsKeyId = "KmsKeyId" + case preSignedUrl = "PreSignedUrl" + case sourceDBClusterSnapshotIdentifier = "SourceDBClusterSnapshotIdentifier" + case tags = "Tags" + case targetDBClusterSnapshotIdentifier = "TargetDBClusterSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let copyTags = copyTags { @@ -3263,67 +2691,15 @@ public struct CopyDBClusterSnapshotInput: Swift.Equatable { } } -struct CopyDBClusterSnapshotInputBody: Swift.Equatable { - let sourceDBClusterSnapshotIdentifier: Swift.String? - let targetDBClusterSnapshotIdentifier: Swift.String? - let kmsKeyId: Swift.String? - let preSignedUrl: Swift.String? - let copyTags: Swift.Bool? - let tags: [RDSClientTypes.Tag]? -} +extension CopyDBClusterSnapshotOutput { -extension CopyDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case copyTags = "CopyTags" - case kmsKeyId = "KmsKeyId" - case preSignedUrl = "PreSignedUrl" - case sourceDBClusterSnapshotIdentifier = "SourceDBClusterSnapshotIdentifier" - case tags = "Tags" - case targetDBClusterSnapshotIdentifier = "TargetDBClusterSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterSnapshotIdentifier) - sourceDBClusterSnapshotIdentifier = sourceDBClusterSnapshotIdentifierDecoded - let targetDBClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterSnapshotIdentifier) - targetDBClusterSnapshotIdentifier = targetDBClusterSnapshotIdentifierDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - let copyTagsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTags) - copyTags = copyTagsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CopyDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBClusterSnapshotResult"] + var value = CopyDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: RDSClientTypes.DBClusterSnapshot.readingClosure) + return value } } } @@ -3340,39 +2716,36 @@ public struct CopyDBClusterSnapshotOutput: Swift.Equatable { } } -struct CopyDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: RDSClientTypes.DBClusterSnapshot? -} - -extension CopyDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } +enum CopyDBClusterSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded - } -} - -enum CopyDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopyDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceDBParameterGroupIdentifier = "SourceDBParameterGroupIdentifier" + case tags = "Tags" + case targetDBParameterGroupDescription = "TargetDBParameterGroupDescription" + case targetDBParameterGroupIdentifier = "TargetDBParameterGroupIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceDBParameterGroupIdentifier = sourceDBParameterGroupIdentifier { @@ -3449,59 +2822,15 @@ public struct CopyDBParameterGroupInput: Swift.Equatable { } } -struct CopyDBParameterGroupInputBody: Swift.Equatable { - let sourceDBParameterGroupIdentifier: Swift.String? - let targetDBParameterGroupIdentifier: Swift.String? - let targetDBParameterGroupDescription: Swift.String? - let tags: [RDSClientTypes.Tag]? -} +extension CopyDBParameterGroupOutput { -extension CopyDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceDBParameterGroupIdentifier = "SourceDBParameterGroupIdentifier" - case tags = "Tags" - case targetDBParameterGroupDescription = "TargetDBParameterGroupDescription" - case targetDBParameterGroupIdentifier = "TargetDBParameterGroupIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBParameterGroupIdentifier) - sourceDBParameterGroupIdentifier = sourceDBParameterGroupIdentifierDecoded - let targetDBParameterGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBParameterGroupIdentifier) - targetDBParameterGroupIdentifier = targetDBParameterGroupIdentifierDecoded - let targetDBParameterGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBParameterGroupDescription) - targetDBParameterGroupDescription = targetDBParameterGroupDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CopyDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroup = output.dbParameterGroup - } else { - self.dbParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBParameterGroupResult"] + var value = CopyDBParameterGroupOutput() + value.dbParameterGroup = try reader["DBParameterGroup"].readIfPresent(readingClosure: RDSClientTypes.DBParameterGroup.readingClosure) + return value } } } @@ -3518,36 +2847,38 @@ public struct CopyDBParameterGroupOutput: Swift.Equatable { } } -struct CopyDBParameterGroupOutputBody: Swift.Equatable { - let dbParameterGroup: RDSClientTypes.DBParameterGroup? -} +enum CopyDBParameterGroupOutputError { -extension CopyDBParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroup = "DBParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBParameterGroupResult")) - let dbParameterGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBParameterGroup.self, forKey: .dbParameterGroup) - dbParameterGroup = dbParameterGroupDecoded - } -} - -enum CopyDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopyDBSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case copyOptionGroup = "CopyOptionGroup" + case copyTags = "CopyTags" + case kmsKeyId = "KmsKeyId" + case optionGroupName = "OptionGroupName" + case preSignedUrl = "PreSignedUrl" + case sourceDBSnapshotIdentifier = "SourceDBSnapshotIdentifier" + case tags = "Tags" + case targetCustomAvailabilityZone = "TargetCustomAvailabilityZone" + case targetDBSnapshotIdentifier = "TargetDBSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let copyOptionGroup = copyOptionGroup { @@ -3670,79 +3001,15 @@ public struct CopyDBSnapshotInput: Swift.Equatable { } } -struct CopyDBSnapshotInputBody: Swift.Equatable { - let sourceDBSnapshotIdentifier: Swift.String? - let targetDBSnapshotIdentifier: Swift.String? - let kmsKeyId: Swift.String? - let tags: [RDSClientTypes.Tag]? - let copyTags: Swift.Bool? - let preSignedUrl: Swift.String? - let optionGroupName: Swift.String? - let targetCustomAvailabilityZone: Swift.String? - let copyOptionGroup: Swift.Bool? -} - -extension CopyDBSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case copyOptionGroup = "CopyOptionGroup" - case copyTags = "CopyTags" - case kmsKeyId = "KmsKeyId" - case optionGroupName = "OptionGroupName" - case preSignedUrl = "PreSignedUrl" - case sourceDBSnapshotIdentifier = "SourceDBSnapshotIdentifier" - case tags = "Tags" - case targetCustomAvailabilityZone = "TargetCustomAvailabilityZone" - case targetDBSnapshotIdentifier = "TargetDBSnapshotIdentifier" - } +extension CopyDBSnapshotOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBSnapshotIdentifier) - sourceDBSnapshotIdentifier = sourceDBSnapshotIdentifierDecoded - let targetDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBSnapshotIdentifier) - targetDBSnapshotIdentifier = targetDBSnapshotIdentifierDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let copyTagsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTags) - copyTags = copyTagsDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let targetCustomAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetCustomAvailabilityZone) - targetCustomAvailabilityZone = targetCustomAvailabilityZoneDecoded - let copyOptionGroupDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyOptionGroup) - copyOptionGroup = copyOptionGroupDecoded - } -} - -extension CopyDBSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyDBSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSnapshot = output.dbSnapshot - } else { - self.dbSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyDBSnapshotResult"] + var value = CopyDBSnapshotOutput() + value.dbSnapshot = try reader["DBSnapshot"].readIfPresent(readingClosure: RDSClientTypes.DBSnapshot.readingClosure) + return value } } } @@ -3759,39 +3026,36 @@ public struct CopyDBSnapshotOutput: Swift.Equatable { } } -struct CopyDBSnapshotOutputBody: Swift.Equatable { - let dbSnapshot: RDSClientTypes.DBSnapshot? -} +enum CopyDBSnapshotOutputError { -extension CopyDBSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshot = "DBSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyDBSnapshotResult")) - let dbSnapshotDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSnapshot.self, forKey: .dbSnapshot) - dbSnapshot = dbSnapshotDecoded - } -} - -enum CopyDBSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CustomAvailabilityZoneNotFound": return try await CustomAvailabilityZoneNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CustomAvailabilityZoneNotFound": return try await CustomAvailabilityZoneNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopyOptionGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceOptionGroupIdentifier = "SourceOptionGroupIdentifier" + case tags = "Tags" + case targetOptionGroupDescription = "TargetOptionGroupDescription" + case targetOptionGroupIdentifier = "TargetOptionGroupIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceOptionGroupIdentifier = sourceOptionGroupIdentifier { @@ -3868,59 +3132,15 @@ public struct CopyOptionGroupInput: Swift.Equatable { } } -struct CopyOptionGroupInputBody: Swift.Equatable { - let sourceOptionGroupIdentifier: Swift.String? - let targetOptionGroupIdentifier: Swift.String? - let targetOptionGroupDescription: Swift.String? - let tags: [RDSClientTypes.Tag]? -} - -extension CopyOptionGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceOptionGroupIdentifier = "SourceOptionGroupIdentifier" - case tags = "Tags" - case targetOptionGroupDescription = "TargetOptionGroupDescription" - case targetOptionGroupIdentifier = "TargetOptionGroupIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceOptionGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceOptionGroupIdentifier) - sourceOptionGroupIdentifier = sourceOptionGroupIdentifierDecoded - let targetOptionGroupIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetOptionGroupIdentifier) - targetOptionGroupIdentifier = targetOptionGroupIdentifierDecoded - let targetOptionGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetOptionGroupDescription) - targetOptionGroupDescription = targetOptionGroupDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CopyOptionGroupOutput { -extension CopyOptionGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyOptionGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.optionGroup = output.optionGroup - } else { - self.optionGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyOptionGroupResult"] + var value = CopyOptionGroupOutput() + value.optionGroup = try reader["OptionGroup"].readIfPresent(readingClosure: RDSClientTypes.OptionGroup.readingClosure) + return value } } } @@ -3937,36 +3157,37 @@ public struct CopyOptionGroupOutput: Swift.Equatable { } } -struct CopyOptionGroupOutputBody: Swift.Equatable { - let optionGroup: RDSClientTypes.OptionGroup? -} +enum CopyOptionGroupOutputError { -extension CopyOptionGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case optionGroup = "OptionGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyOptionGroupResult")) - let optionGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.OptionGroup.self, forKey: .optionGroup) - optionGroup = optionGroupDecoded - } -} - -enum CopyOptionGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OptionGroupAlreadyExistsFault": return try await OptionGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupQuotaExceededFault": return try await OptionGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OptionGroupAlreadyExistsFault": return try await OptionGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupQuotaExceededFault": return try await OptionGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateBlueGreenDeploymentInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case blueGreenDeploymentName = "BlueGreenDeploymentName" + case source = "Source" + case tags = "Tags" + case targetDBClusterParameterGroupName = "TargetDBClusterParameterGroupName" + case targetDBInstanceClass = "TargetDBInstanceClass" + case targetDBParameterGroupName = "TargetDBParameterGroupName" + case targetEngineVersion = "TargetEngineVersion" + case upgradeTargetStorageConfig = "UpgradeTargetStorageConfig" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let blueGreenDeploymentName = blueGreenDeploymentName { @@ -4058,75 +3279,15 @@ public struct CreateBlueGreenDeploymentInput: Swift.Equatable { } } -struct CreateBlueGreenDeploymentInputBody: Swift.Equatable { - let blueGreenDeploymentName: Swift.String? - let source: Swift.String? - let targetEngineVersion: Swift.String? - let targetDBParameterGroupName: Swift.String? - let targetDBClusterParameterGroupName: Swift.String? - let tags: [RDSClientTypes.Tag]? - let targetDBInstanceClass: Swift.String? - let upgradeTargetStorageConfig: Swift.Bool? -} +extension CreateBlueGreenDeploymentOutput { -extension CreateBlueGreenDeploymentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blueGreenDeploymentName = "BlueGreenDeploymentName" - case source = "Source" - case tags = "Tags" - case targetDBClusterParameterGroupName = "TargetDBClusterParameterGroupName" - case targetDBInstanceClass = "TargetDBInstanceClass" - case targetDBParameterGroupName = "TargetDBParameterGroupName" - case targetEngineVersion = "TargetEngineVersion" - case upgradeTargetStorageConfig = "UpgradeTargetStorageConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let blueGreenDeploymentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .blueGreenDeploymentName) - blueGreenDeploymentName = blueGreenDeploymentNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let targetEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetEngineVersion) - targetEngineVersion = targetEngineVersionDecoded - let targetDBParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBParameterGroupName) - targetDBParameterGroupName = targetDBParameterGroupNameDecoded - let targetDBClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBClusterParameterGroupName) - targetDBClusterParameterGroupName = targetDBClusterParameterGroupNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let targetDBInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBInstanceClass) - targetDBInstanceClass = targetDBInstanceClassDecoded - let upgradeTargetStorageConfigDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .upgradeTargetStorageConfig) - upgradeTargetStorageConfig = upgradeTargetStorageConfigDecoded - } -} - -extension CreateBlueGreenDeploymentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateBlueGreenDeploymentOutputBody = try responseDecoder.decode(responseBody: data) - self.blueGreenDeployment = output.blueGreenDeployment - } else { - self.blueGreenDeployment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateBlueGreenDeploymentResult"] + var value = CreateBlueGreenDeploymentOutput() + value.blueGreenDeployment = try reader["BlueGreenDeployment"].readIfPresent(readingClosure: RDSClientTypes.BlueGreenDeployment.readingClosure) + return value } } } @@ -4143,54 +3304,42 @@ public struct CreateBlueGreenDeploymentOutput: Swift.Equatable { } } -struct CreateBlueGreenDeploymentOutputBody: Swift.Equatable { - let blueGreenDeployment: RDSClientTypes.BlueGreenDeployment? -} - -extension CreateBlueGreenDeploymentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blueGreenDeployment = "BlueGreenDeployment" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateBlueGreenDeploymentResult")) - let blueGreenDeploymentDecoded = try containerValues.decodeIfPresent(RDSClientTypes.BlueGreenDeployment.self, forKey: .blueGreenDeployment) - blueGreenDeployment = blueGreenDeploymentDecoded - } -} +enum CreateBlueGreenDeploymentOutputError { -enum CreateBlueGreenDeploymentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BlueGreenDeploymentAlreadyExistsFault": return try await BlueGreenDeploymentAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SourceClusterNotSupportedFault": return try await SourceClusterNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SourceDatabaseNotSupportedFault": return try await SourceDatabaseNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BlueGreenDeploymentAlreadyExistsFault": return try await BlueGreenDeploymentAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SourceClusterNotSupportedFault": return try await SourceClusterNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SourceDatabaseNotSupportedFault": return try await SourceDatabaseNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateCustomDBEngineVersionFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CreateCustomDBEngineVersionFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4218,23 +3367,21 @@ public struct CreateCustomDBEngineVersionFault: ClientRuntime.ModeledError, AWSC } } -struct CreateCustomDBEngineVersionFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CreateCustomDBEngineVersionFaultBody: Swift.Decodable { +extension CreateCustomDBEngineVersionInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case databaseInstallationFilesS3BucketName = "DatabaseInstallationFilesS3BucketName" + case databaseInstallationFilesS3Prefix = "DatabaseInstallationFilesS3Prefix" + case description = "Description" + case engine = "Engine" + case engineVersion = "EngineVersion" + case imageId = "ImageId" + case kmsKeyId = "KMSKeyId" + case manifest = "Manifest" + case sourceCustomDbEngineVersionIdentifier = "SourceCustomDbEngineVersionIdentifier" + case tags = "Tags" + case useAwsProvidedLatestImage = "UseAwsProvidedLatestImage" } -} -extension CreateCustomDBEngineVersionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let databaseInstallationFilesS3BucketName = databaseInstallationFilesS3BucketName { @@ -4345,151 +3492,47 @@ public struct CreateCustomDBEngineVersionInput: Swift.Equatable { } } -struct CreateCustomDBEngineVersionInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let databaseInstallationFilesS3BucketName: Swift.String? - let databaseInstallationFilesS3Prefix: Swift.String? - let imageId: Swift.String? - let kmsKeyId: Swift.String? - let description: Swift.String? - let manifest: Swift.String? - let tags: [RDSClientTypes.Tag]? - let sourceCustomDbEngineVersionIdentifier: Swift.String? - let useAwsProvidedLatestImage: Swift.Bool? -} - -extension CreateCustomDBEngineVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case databaseInstallationFilesS3BucketName = "DatabaseInstallationFilesS3BucketName" - case databaseInstallationFilesS3Prefix = "DatabaseInstallationFilesS3Prefix" - case description = "Description" - case engine = "Engine" - case engineVersion = "EngineVersion" - case imageId = "ImageId" - case kmsKeyId = "KMSKeyId" - case manifest = "Manifest" - case sourceCustomDbEngineVersionIdentifier = "SourceCustomDbEngineVersionIdentifier" - case tags = "Tags" - case useAwsProvidedLatestImage = "UseAwsProvidedLatestImage" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let databaseInstallationFilesS3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3BucketName) - databaseInstallationFilesS3BucketName = databaseInstallationFilesS3BucketNameDecoded - let databaseInstallationFilesS3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3Prefix) - databaseInstallationFilesS3Prefix = databaseInstallationFilesS3PrefixDecoded - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let manifestDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .manifest) - manifest = manifestDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let sourceCustomDbEngineVersionIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceCustomDbEngineVersionIdentifier) - sourceCustomDbEngineVersionIdentifier = sourceCustomDbEngineVersionIdentifierDecoded - let useAwsProvidedLatestImageDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useAwsProvidedLatestImage) - useAwsProvidedLatestImage = useAwsProvidedLatestImageDecoded - } -} - -extension CreateCustomDBEngineVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCustomDBEngineVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.createTime = output.createTime - self.customDBEngineVersionManifest = output.customDBEngineVersionManifest - self.databaseInstallationFilesS3BucketName = output.databaseInstallationFilesS3BucketName - self.databaseInstallationFilesS3Prefix = output.databaseInstallationFilesS3Prefix - self.dbEngineDescription = output.dbEngineDescription - self.dbEngineMediaType = output.dbEngineMediaType - self.dbEngineVersionArn = output.dbEngineVersionArn - self.dbEngineVersionDescription = output.dbEngineVersionDescription - self.dbParameterGroupFamily = output.dbParameterGroupFamily - self.defaultCharacterSet = output.defaultCharacterSet - self.engine = output.engine - self.engineVersion = output.engineVersion - self.exportableLogTypes = output.exportableLogTypes - self.image = output.image - self.kmsKeyId = output.kmsKeyId - self.majorEngineVersion = output.majorEngineVersion - self.status = output.status - self.supportedCACertificateIdentifiers = output.supportedCACertificateIdentifiers - self.supportedCharacterSets = output.supportedCharacterSets - self.supportedEngineModes = output.supportedEngineModes - self.supportedFeatureNames = output.supportedFeatureNames - self.supportedNcharCharacterSets = output.supportedNcharCharacterSets - self.supportedTimezones = output.supportedTimezones - self.supportsBabelfish = output.supportsBabelfish - self.supportsCertificateRotationWithoutRestart = output.supportsCertificateRotationWithoutRestart - self.supportsGlobalDatabases = output.supportsGlobalDatabases - self.supportsIntegrations = output.supportsIntegrations - self.supportsLocalWriteForwarding = output.supportsLocalWriteForwarding - self.supportsLogExportsToCloudwatchLogs = output.supportsLogExportsToCloudwatchLogs - self.supportsParallelQuery = output.supportsParallelQuery - self.supportsReadReplica = output.supportsReadReplica - self.tagList = output.tagList - self.validUpgradeTarget = output.validUpgradeTarget - } else { - self.createTime = nil - self.customDBEngineVersionManifest = nil - self.dbEngineDescription = nil - self.dbEngineMediaType = nil - self.dbEngineVersionArn = nil - self.dbEngineVersionDescription = nil - self.dbParameterGroupFamily = nil - self.databaseInstallationFilesS3BucketName = nil - self.databaseInstallationFilesS3Prefix = nil - self.defaultCharacterSet = nil - self.engine = nil - self.engineVersion = nil - self.exportableLogTypes = nil - self.image = nil - self.kmsKeyId = nil - self.majorEngineVersion = nil - self.status = nil - self.supportedCACertificateIdentifiers = nil - self.supportedCharacterSets = nil - self.supportedEngineModes = nil - self.supportedFeatureNames = nil - self.supportedNcharCharacterSets = nil - self.supportedTimezones = nil - self.supportsBabelfish = nil - self.supportsCertificateRotationWithoutRestart = nil - self.supportsGlobalDatabases = nil - self.supportsIntegrations = nil - self.supportsLocalWriteForwarding = nil - self.supportsLogExportsToCloudwatchLogs = nil - self.supportsParallelQuery = nil - self.supportsReadReplica = nil - self.tagList = nil - self.validUpgradeTarget = nil +extension CreateCustomDBEngineVersionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateCustomDBEngineVersionResult"] + var value = CreateCustomDBEngineVersionOutput() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.customDBEngineVersionManifest = try reader["CustomDBEngineVersionManifest"].readIfPresent() + value.dbEngineDescription = try reader["DBEngineDescription"].readIfPresent() + value.dbEngineMediaType = try reader["DBEngineMediaType"].readIfPresent() + value.dbEngineVersionArn = try reader["DBEngineVersionArn"].readIfPresent() + value.dbEngineVersionDescription = try reader["DBEngineVersionDescription"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.databaseInstallationFilesS3BucketName = try reader["DatabaseInstallationFilesS3BucketName"].readIfPresent() + value.databaseInstallationFilesS3Prefix = try reader["DatabaseInstallationFilesS3Prefix"].readIfPresent() + value.defaultCharacterSet = try reader["DefaultCharacterSet"].readIfPresent(readingClosure: RDSClientTypes.CharacterSet.readingClosure) + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.exportableLogTypes = try reader["ExportableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.image = try reader["Image"].readIfPresent(readingClosure: RDSClientTypes.CustomDBEngineVersionAMI.readingClosure) + value.kmsKeyId = try reader["KMSKeyId"].readIfPresent() + value.majorEngineVersion = try reader["MajorEngineVersion"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.supportedCACertificateIdentifiers = try reader["SupportedCACertificateIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedCharacterSets = try reader["SupportedCharacterSets"].readListIfPresent(memberReadingClosure: RDSClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.supportedEngineModes = try reader["SupportedEngineModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedFeatureNames = try reader["SupportedFeatureNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedNcharCharacterSets = try reader["SupportedNcharCharacterSets"].readListIfPresent(memberReadingClosure: RDSClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.supportedTimezones = try reader["SupportedTimezones"].readListIfPresent(memberReadingClosure: RDSClientTypes.Timezone.readingClosure, memberNodeInfo: "Timezone", isFlattened: false) + value.supportsBabelfish = try reader["SupportsBabelfish"].readIfPresent() + value.supportsCertificateRotationWithoutRestart = try reader["SupportsCertificateRotationWithoutRestart"].readIfPresent() + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + value.supportsIntegrations = try reader["SupportsIntegrations"].readIfPresent() + value.supportsLocalWriteForwarding = try reader["SupportsLocalWriteForwarding"].readIfPresent() + value.supportsLogExportsToCloudwatchLogs = try reader["SupportsLogExportsToCloudwatchLogs"].readIfPresent() + value.supportsParallelQuery = try reader["SupportsParallelQuery"].readIfPresent() + value.supportsReadReplica = try reader["SupportsReadReplica"].readIfPresent() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.validUpgradeTarget = try reader["ValidUpgradeTarget"].readListIfPresent(memberReadingClosure: RDSClientTypes.UpgradeTarget.readingClosure, memberNodeInfo: "UpgradeTarget", isFlattened: false) + return value } } } @@ -4635,319 +3678,37 @@ public struct CreateCustomDBEngineVersionOutput: Swift.Equatable { } } -struct CreateCustomDBEngineVersionOutputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbParameterGroupFamily: Swift.String? - let dbEngineDescription: Swift.String? - let dbEngineVersionDescription: Swift.String? - let defaultCharacterSet: RDSClientTypes.CharacterSet? - let image: RDSClientTypes.CustomDBEngineVersionAMI? - let dbEngineMediaType: Swift.String? - let supportedCharacterSets: [RDSClientTypes.CharacterSet]? - let supportedNcharCharacterSets: [RDSClientTypes.CharacterSet]? - let validUpgradeTarget: [RDSClientTypes.UpgradeTarget]? - let supportedTimezones: [RDSClientTypes.Timezone]? - let exportableLogTypes: [Swift.String]? - let supportsLogExportsToCloudwatchLogs: Swift.Bool? - let supportsReadReplica: Swift.Bool? - let supportedEngineModes: [Swift.String]? - let supportedFeatureNames: [Swift.String]? - let status: Swift.String? - let supportsParallelQuery: Swift.Bool? - let supportsGlobalDatabases: Swift.Bool? - let majorEngineVersion: Swift.String? - let databaseInstallationFilesS3BucketName: Swift.String? - let databaseInstallationFilesS3Prefix: Swift.String? - let dbEngineVersionArn: Swift.String? - let kmsKeyId: Swift.String? - let createTime: ClientRuntime.Date? - let tagList: [RDSClientTypes.Tag]? - let supportsBabelfish: Swift.Bool? - let customDBEngineVersionManifest: Swift.String? - let supportsCertificateRotationWithoutRestart: Swift.Bool? - let supportedCACertificateIdentifiers: [Swift.String]? - let supportsLocalWriteForwarding: Swift.Bool? - let supportsIntegrations: Swift.Bool? -} - -extension CreateCustomDBEngineVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "CreateTime" - case customDBEngineVersionManifest = "CustomDBEngineVersionManifest" - case dbEngineDescription = "DBEngineDescription" - case dbEngineMediaType = "DBEngineMediaType" - case dbEngineVersionArn = "DBEngineVersionArn" - case dbEngineVersionDescription = "DBEngineVersionDescription" - case dbParameterGroupFamily = "DBParameterGroupFamily" - case databaseInstallationFilesS3BucketName = "DatabaseInstallationFilesS3BucketName" - case databaseInstallationFilesS3Prefix = "DatabaseInstallationFilesS3Prefix" - case defaultCharacterSet = "DefaultCharacterSet" - case engine = "Engine" - case engineVersion = "EngineVersion" - case exportableLogTypes = "ExportableLogTypes" - case image = "Image" - case kmsKeyId = "KMSKeyId" - case majorEngineVersion = "MajorEngineVersion" - case status = "Status" - case supportedCACertificateIdentifiers = "SupportedCACertificateIdentifiers" - case supportedCharacterSets = "SupportedCharacterSets" - case supportedEngineModes = "SupportedEngineModes" - case supportedFeatureNames = "SupportedFeatureNames" - case supportedNcharCharacterSets = "SupportedNcharCharacterSets" - case supportedTimezones = "SupportedTimezones" - case supportsBabelfish = "SupportsBabelfish" - case supportsCertificateRotationWithoutRestart = "SupportsCertificateRotationWithoutRestart" - case supportsGlobalDatabases = "SupportsGlobalDatabases" - case supportsIntegrations = "SupportsIntegrations" - case supportsLocalWriteForwarding = "SupportsLocalWriteForwarding" - case supportsLogExportsToCloudwatchLogs = "SupportsLogExportsToCloudwatchLogs" - case supportsParallelQuery = "SupportsParallelQuery" - case supportsReadReplica = "SupportsReadReplica" - case tagList = "TagList" - case validUpgradeTarget = "ValidUpgradeTarget" - } +enum CreateCustomDBEngineVersionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateCustomDBEngineVersionResult")) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let dbEngineDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineDescription) - dbEngineDescription = dbEngineDescriptionDecoded - let dbEngineVersionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionDescription) - dbEngineVersionDescription = dbEngineVersionDescriptionDecoded - let defaultCharacterSetDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CharacterSet.self, forKey: .defaultCharacterSet) - defaultCharacterSet = defaultCharacterSetDecoded - let imageDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CustomDBEngineVersionAMI.self, forKey: .image) - image = imageDecoded - let dbEngineMediaTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineMediaType) - dbEngineMediaType = dbEngineMediaTypeDecoded - if containerValues.contains(.supportedCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCharacterSets) - if let supportedCharacterSetsWrappedContainer = supportedCharacterSetsWrappedContainer { - let supportedCharacterSetsContainer = try supportedCharacterSetsWrappedContainer.decodeIfPresent([RDSClientTypes.CharacterSet].self, forKey: .member) - var supportedCharacterSetsBuffer:[RDSClientTypes.CharacterSet]? = nil - if let supportedCharacterSetsContainer = supportedCharacterSetsContainer { - supportedCharacterSetsBuffer = [RDSClientTypes.CharacterSet]() - for structureContainer0 in supportedCharacterSetsContainer { - supportedCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedCharacterSets = supportedCharacterSetsBuffer - } else { - supportedCharacterSets = [] - } - } else { - supportedCharacterSets = nil - } - if containerValues.contains(.supportedNcharCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedNcharCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedNcharCharacterSets) - if let supportedNcharCharacterSetsWrappedContainer = supportedNcharCharacterSetsWrappedContainer { - let supportedNcharCharacterSetsContainer = try supportedNcharCharacterSetsWrappedContainer.decodeIfPresent([RDSClientTypes.CharacterSet].self, forKey: .member) - var supportedNcharCharacterSetsBuffer:[RDSClientTypes.CharacterSet]? = nil - if let supportedNcharCharacterSetsContainer = supportedNcharCharacterSetsContainer { - supportedNcharCharacterSetsBuffer = [RDSClientTypes.CharacterSet]() - for structureContainer0 in supportedNcharCharacterSetsContainer { - supportedNcharCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedNcharCharacterSets = supportedNcharCharacterSetsBuffer - } else { - supportedNcharCharacterSets = [] - } - } else { - supportedNcharCharacterSets = nil - } - if containerValues.contains(.validUpgradeTarget) { - struct KeyVal0{struct UpgradeTarget{}} - let validUpgradeTargetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validUpgradeTarget) - if let validUpgradeTargetWrappedContainer = validUpgradeTargetWrappedContainer { - let validUpgradeTargetContainer = try validUpgradeTargetWrappedContainer.decodeIfPresent([RDSClientTypes.UpgradeTarget].self, forKey: .member) - var validUpgradeTargetBuffer:[RDSClientTypes.UpgradeTarget]? = nil - if let validUpgradeTargetContainer = validUpgradeTargetContainer { - validUpgradeTargetBuffer = [RDSClientTypes.UpgradeTarget]() - for structureContainer0 in validUpgradeTargetContainer { - validUpgradeTargetBuffer?.append(structureContainer0) - } - } - validUpgradeTarget = validUpgradeTargetBuffer - } else { - validUpgradeTarget = [] - } - } else { - validUpgradeTarget = nil - } - if containerValues.contains(.supportedTimezones) { - struct KeyVal0{struct Timezone{}} - let supportedTimezonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedTimezones) - if let supportedTimezonesWrappedContainer = supportedTimezonesWrappedContainer { - let supportedTimezonesContainer = try supportedTimezonesWrappedContainer.decodeIfPresent([RDSClientTypes.Timezone].self, forKey: .member) - var supportedTimezonesBuffer:[RDSClientTypes.Timezone]? = nil - if let supportedTimezonesContainer = supportedTimezonesContainer { - supportedTimezonesBuffer = [RDSClientTypes.Timezone]() - for structureContainer0 in supportedTimezonesContainer { - supportedTimezonesBuffer?.append(structureContainer0) - } - } - supportedTimezones = supportedTimezonesBuffer - } else { - supportedTimezones = [] - } - } else { - supportedTimezones = nil - } - if containerValues.contains(.exportableLogTypes) { - struct KeyVal0{struct member{}} - let exportableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportableLogTypes) - if let exportableLogTypesWrappedContainer = exportableLogTypesWrappedContainer { - let exportableLogTypesContainer = try exportableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportableLogTypesBuffer:[Swift.String]? = nil - if let exportableLogTypesContainer = exportableLogTypesContainer { - exportableLogTypesBuffer = [Swift.String]() - for stringContainer0 in exportableLogTypesContainer { - exportableLogTypesBuffer?.append(stringContainer0) - } - } - exportableLogTypes = exportableLogTypesBuffer - } else { - exportableLogTypes = [] - } - } else { - exportableLogTypes = nil - } - let supportsLogExportsToCloudwatchLogsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLogExportsToCloudwatchLogs) - supportsLogExportsToCloudwatchLogs = supportsLogExportsToCloudwatchLogsDecoded - let supportsReadReplicaDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsReadReplica) - supportsReadReplica = supportsReadReplicaDecoded - if containerValues.contains(.supportedEngineModes) { - struct KeyVal0{struct member{}} - let supportedEngineModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedEngineModes) - if let supportedEngineModesWrappedContainer = supportedEngineModesWrappedContainer { - let supportedEngineModesContainer = try supportedEngineModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedEngineModesBuffer:[Swift.String]? = nil - if let supportedEngineModesContainer = supportedEngineModesContainer { - supportedEngineModesBuffer = [Swift.String]() - for stringContainer0 in supportedEngineModesContainer { - supportedEngineModesBuffer?.append(stringContainer0) - } - } - supportedEngineModes = supportedEngineModesBuffer - } else { - supportedEngineModes = [] - } - } else { - supportedEngineModes = nil - } - if containerValues.contains(.supportedFeatureNames) { - struct KeyVal0{struct member{}} - let supportedFeatureNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedFeatureNames) - if let supportedFeatureNamesWrappedContainer = supportedFeatureNamesWrappedContainer { - let supportedFeatureNamesContainer = try supportedFeatureNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedFeatureNamesBuffer:[Swift.String]? = nil - if let supportedFeatureNamesContainer = supportedFeatureNamesContainer { - supportedFeatureNamesBuffer = [Swift.String]() - for stringContainer0 in supportedFeatureNamesContainer { - supportedFeatureNamesBuffer?.append(stringContainer0) - } - } - supportedFeatureNames = supportedFeatureNamesBuffer - } else { - supportedFeatureNames = [] - } - } else { - supportedFeatureNames = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let supportsParallelQueryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsParallelQuery) - supportsParallelQuery = supportsParallelQueryDecoded - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - let databaseInstallationFilesS3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3BucketName) - databaseInstallationFilesS3BucketName = databaseInstallationFilesS3BucketNameDecoded - let databaseInstallationFilesS3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3Prefix) - databaseInstallationFilesS3Prefix = databaseInstallationFilesS3PrefixDecoded - let dbEngineVersionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionArn) - dbEngineVersionArn = dbEngineVersionArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil - } - let supportsBabelfishDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsBabelfish) - supportsBabelfish = supportsBabelfishDecoded - let customDBEngineVersionManifestDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDBEngineVersionManifest) - customDBEngineVersionManifest = customDBEngineVersionManifestDecoded - let supportsCertificateRotationWithoutRestartDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsCertificateRotationWithoutRestart) - supportsCertificateRotationWithoutRestart = supportsCertificateRotationWithoutRestartDecoded - if containerValues.contains(.supportedCACertificateIdentifiers) { - struct KeyVal0{struct member{}} - let supportedCACertificateIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCACertificateIdentifiers) - if let supportedCACertificateIdentifiersWrappedContainer = supportedCACertificateIdentifiersWrappedContainer { - let supportedCACertificateIdentifiersContainer = try supportedCACertificateIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedCACertificateIdentifiersBuffer:[Swift.String]? = nil - if let supportedCACertificateIdentifiersContainer = supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer = [Swift.String]() - for stringContainer0 in supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer?.append(stringContainer0) - } - } - supportedCACertificateIdentifiers = supportedCACertificateIdentifiersBuffer - } else { - supportedCACertificateIdentifiers = [] - } - } else { - supportedCACertificateIdentifiers = nil - } - let supportsLocalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLocalWriteForwarding) - supportsLocalWriteForwarding = supportsLocalWriteForwardingDecoded - let supportsIntegrationsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIntegrations) - supportsIntegrations = supportsIntegrationsDecoded - } -} - -enum CreateCustomDBEngineVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CreateCustomDBEngineVersionFault": return try await CreateCustomDBEngineVersionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomDBEngineVersionAlreadyExistsFault": return try await CustomDBEngineVersionAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomDBEngineVersionQuotaExceededFault": return try await CustomDBEngineVersionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Ec2ImagePropertiesNotSupportedFault": return try await Ec2ImagePropertiesNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CreateCustomDBEngineVersionFault": return try await CreateCustomDBEngineVersionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomDBEngineVersionAlreadyExistsFault": return try await CustomDBEngineVersionAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomDBEngineVersionQuotaExceededFault": return try await CustomDBEngineVersionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Ec2ImagePropertiesNotSupportedFault": return try await Ec2ImagePropertiesNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" + case dbClusterIdentifier = "DBClusterIdentifier" + case endpointType = "EndpointType" + case excludedMembers = "ExcludedMembers" + case staticMembers = "StaticMembers" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterEndpointIdentifier = dbClusterEndpointIdentifier { @@ -5042,119 +3803,24 @@ public struct CreateDBClusterEndpointInput: Swift.Equatable { } } -struct CreateDBClusterEndpointInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointIdentifier: Swift.String? - let endpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? - let tags: [RDSClientTypes.Tag]? -} +extension CreateDBClusterEndpointOutput { -extension CreateDBClusterEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBClusterEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.customEndpointType = output.customEndpointType - self.dbClusterEndpointArn = output.dbClusterEndpointArn - self.dbClusterEndpointIdentifier = output.dbClusterEndpointIdentifier - self.dbClusterEndpointResourceIdentifier = output.dbClusterEndpointResourceIdentifier - self.dbClusterIdentifier = output.dbClusterIdentifier - self.endpoint = output.endpoint - self.endpointType = output.endpointType - self.excludedMembers = output.excludedMembers - self.staticMembers = output.staticMembers - self.status = output.status - } else { - self.customEndpointType = nil - self.dbClusterEndpointArn = nil - self.dbClusterEndpointIdentifier = nil - self.dbClusterEndpointResourceIdentifier = nil - self.dbClusterIdentifier = nil - self.endpoint = nil - self.endpointType = nil - self.excludedMembers = nil - self.staticMembers = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterEndpointResult"] + var value = CreateDBClusterEndpointOutput() + value.customEndpointType = try reader["CustomEndpointType"].readIfPresent() + value.dbClusterEndpointArn = try reader["DBClusterEndpointArn"].readIfPresent() + value.dbClusterEndpointIdentifier = try reader["DBClusterEndpointIdentifier"].readIfPresent() + value.dbClusterEndpointResourceIdentifier = try reader["DBClusterEndpointResourceIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.endpointType = try reader["EndpointType"].readIfPresent() + value.excludedMembers = try reader["ExcludedMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.staticMembers = try reader["StaticMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -5219,109 +3885,83 @@ public struct CreateDBClusterEndpointOutput: Swift.Equatable { } } -struct CreateDBClusterEndpointOutputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointResourceIdentifier: Swift.String? - let endpoint: Swift.String? - let status: Swift.String? - let endpointType: Swift.String? - let customEndpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? - let dbClusterEndpointArn: Swift.String? -} +enum CreateDBClusterEndpointOutputError { -extension CreateDBClusterEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customEndpointType = "CustomEndpointType" - case dbClusterEndpointArn = "DBClusterEndpointArn" - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterEndpointResourceIdentifier = "DBClusterEndpointResourceIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case endpoint = "Endpoint" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterEndpointResult")) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointResourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointResourceIdentifier) - dbClusterEndpointResourceIdentifier = dbClusterEndpointResourceIdentifierDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let customEndpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customEndpointType) - customEndpointType = customEndpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil - } - let dbClusterEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointArn) - dbClusterEndpointArn = dbClusterEndpointArnDecoded - } -} - -enum CreateDBClusterEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterEndpointAlreadyExistsFault": return try await DBClusterEndpointAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterEndpointQuotaExceededFault": return try await DBClusterEndpointQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterEndpointAlreadyExistsFault": return try await DBClusterEndpointAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterEndpointQuotaExceededFault": return try await DBClusterEndpointQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allocatedStorage = "AllocatedStorage" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case availabilityZones = "AvailabilityZones" + case backtrackWindow = "BacktrackWindow" + case backupRetentionPeriod = "BackupRetentionPeriod" + case characterSetName = "CharacterSetName" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterInstanceClass = "DBClusterInstanceClass" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbSubnetGroupName = "DBSubnetGroupName" + case dbSystemId = "DBSystemId" + case databaseName = "DatabaseName" + case deletionProtection = "DeletionProtection" + case domain = "Domain" + case domainIAMRoleName = "DomainIAMRoleName" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableGlobalWriteForwarding = "EnableGlobalWriteForwarding" + case enableHttpEndpoint = "EnableHttpEndpoint" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enableLocalWriteForwarding = "EnableLocalWriteForwarding" + case enablePerformanceInsights = "EnablePerformanceInsights" + case engine = "Engine" + case engineMode = "EngineMode" + case engineVersion = "EngineVersion" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case iops = "Iops" + case kmsKeyId = "KmsKeyId" + case manageMasterUserPassword = "ManageMasterUserPassword" + case masterUserPassword = "MasterUserPassword" + case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" + case masterUsername = "MasterUsername" + case monitoringInterval = "MonitoringInterval" + case monitoringRoleArn = "MonitoringRoleArn" + case networkType = "NetworkType" + case optionGroupName = "OptionGroupName" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" + case port = "Port" + case preSignedUrl = "PreSignedUrl" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case publiclyAccessible = "PubliclyAccessible" + case rdsCustomClusterConfiguration = "RdsCustomClusterConfiguration" + case replicationSourceIdentifier = "ReplicationSourceIdentifier" + case scalingConfiguration = "ScalingConfiguration" + case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" + case storageEncrypted = "StorageEncrypted" + case storageType = "StorageType" + case tags = "Tags" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -5884,298 +4524,15 @@ public struct CreateDBClusterInput: Swift.Equatable { } } -struct CreateDBClusterInputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let backupRetentionPeriod: Swift.Int? - let characterSetName: Swift.String? - let databaseName: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterParameterGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let dbSubnetGroupName: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let port: Swift.Int? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let optionGroupName: Swift.String? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let replicationSourceIdentifier: Swift.String? - let tags: [RDSClientTypes.Tag]? - let storageEncrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let preSignedUrl: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let backtrackWindow: Swift.Int? - let enableCloudwatchLogsExports: [Swift.String]? - let engineMode: Swift.String? - let scalingConfiguration: RDSClientTypes.ScalingConfiguration? - let rdsCustomClusterConfiguration: RDSClientTypes.RdsCustomClusterConfiguration? - let deletionProtection: Swift.Bool? - let globalClusterIdentifier: Swift.String? - let enableHttpEndpoint: Swift.Bool? - let copyTagsToSnapshot: Swift.Bool? - let domain: Swift.String? - let domainIAMRoleName: Swift.String? - let enableGlobalWriteForwarding: Swift.Bool? - let dbClusterInstanceClass: Swift.String? - let allocatedStorage: Swift.Int? - let storageType: Swift.String? - let iops: Swift.Int? - let publiclyAccessible: Swift.Bool? - let autoMinorVersionUpgrade: Swift.Bool? - let monitoringInterval: Swift.Int? - let monitoringRoleArn: Swift.String? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let performanceInsightsRetentionPeriod: Swift.Int? - let serverlessV2ScalingConfiguration: RDSClientTypes.ServerlessV2ScalingConfiguration? - let networkType: Swift.String? - let dbSystemId: Swift.String? - let manageMasterUserPassword: Swift.Bool? - let masterUserSecretKmsKeyId: Swift.String? - let enableLocalWriteForwarding: Swift.Bool? -} - -extension CreateDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocatedStorage = "AllocatedStorage" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case availabilityZones = "AvailabilityZones" - case backtrackWindow = "BacktrackWindow" - case backupRetentionPeriod = "BackupRetentionPeriod" - case characterSetName = "CharacterSetName" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterInstanceClass = "DBClusterInstanceClass" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case dbSystemId = "DBSystemId" - case databaseName = "DatabaseName" - case deletionProtection = "DeletionProtection" - case domain = "Domain" - case domainIAMRoleName = "DomainIAMRoleName" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableGlobalWriteForwarding = "EnableGlobalWriteForwarding" - case enableHttpEndpoint = "EnableHttpEndpoint" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case enableLocalWriteForwarding = "EnableLocalWriteForwarding" - case enablePerformanceInsights = "EnablePerformanceInsights" - case engine = "Engine" - case engineMode = "EngineMode" - case engineVersion = "EngineVersion" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case iops = "Iops" - case kmsKeyId = "KmsKeyId" - case manageMasterUserPassword = "ManageMasterUserPassword" - case masterUserPassword = "MasterUserPassword" - case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" - case masterUsername = "MasterUsername" - case monitoringInterval = "MonitoringInterval" - case monitoringRoleArn = "MonitoringRoleArn" - case networkType = "NetworkType" - case optionGroupName = "OptionGroupName" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" - case port = "Port" - case preSignedUrl = "PreSignedUrl" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case publiclyAccessible = "PubliclyAccessible" - case rdsCustomClusterConfiguration = "RdsCustomClusterConfiguration" - case replicationSourceIdentifier = "ReplicationSourceIdentifier" - case scalingConfiguration = "ScalingConfiguration" - case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case storageEncrypted = "StorageEncrypted" - case storageType = "StorageType" - case tags = "Tags" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension CreateDBClusterOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let replicationSourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationSourceIdentifier) - replicationSourceIdentifier = replicationSourceIdentifierDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let backtrackWindowDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backtrackWindow) - backtrackWindow = backtrackWindowDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let engineModeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineMode) - engineMode = engineModeDecoded - let scalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ScalingConfiguration.self, forKey: .scalingConfiguration) - scalingConfiguration = scalingConfigurationDecoded - let rdsCustomClusterConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.RdsCustomClusterConfiguration.self, forKey: .rdsCustomClusterConfiguration) - rdsCustomClusterConfiguration = rdsCustomClusterConfigurationDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let enableHttpEndpointDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableHttpEndpoint) - enableHttpEndpoint = enableHttpEndpointDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let enableGlobalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableGlobalWriteForwarding) - enableGlobalWriteForwarding = enableGlobalWriteForwardingDecoded - let dbClusterInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterInstanceClass) - dbClusterInstanceClass = dbClusterInstanceClassDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let performanceInsightsRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .performanceInsightsRetentionPeriod) - performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriodDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let dbSystemIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSystemId) - dbSystemId = dbSystemIdDecoded - let manageMasterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterUserPassword) - manageMasterUserPassword = manageMasterUserPasswordDecoded - let masterUserSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserSecretKmsKeyId) - masterUserSecretKmsKeyId = masterUserSecretKmsKeyIdDecoded - let enableLocalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableLocalWriteForwarding) - enableLocalWriteForwarding = enableLocalWriteForwardingDecoded - } -} - -extension CreateDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterResult"] + var value = CreateDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -6192,53 +4549,50 @@ public struct CreateDBClusterOutput: Swift.Equatable { } } -struct CreateDBClusterOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension CreateDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } +enum CreateDBClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum CreateDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupFault": return try await InvalidDBSubnetGroupFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupFault": return try await InvalidDBSubnetGroupFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbParameterGroupFamily = "DBParameterGroupFamily" + case description = "Description" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -6315,59 +4669,15 @@ public struct CreateDBClusterParameterGroupInput: Swift.Equatable { } } -struct CreateDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let dbParameterGroupFamily: Swift.String? - let description: Swift.String? - let tags: [RDSClientTypes.Tag]? -} +extension CreateDBClusterParameterGroupOutput { -extension CreateDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbParameterGroupFamily = "DBParameterGroupFamily" - case description = "Description" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroup = output.dbClusterParameterGroup - } else { - self.dbClusterParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterParameterGroupResult"] + var value = CreateDBClusterParameterGroupOutput() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent(readingClosure: RDSClientTypes.DBClusterParameterGroup.readingClosure) + return value } } } @@ -6384,35 +4694,31 @@ public struct CreateDBClusterParameterGroupOutput: Swift.Equatable { } } -struct CreateDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroup: RDSClientTypes.DBClusterParameterGroup? -} - -extension CreateDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroup = "DBClusterParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterParameterGroupResult")) - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBClusterParameterGroup.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - } -} +enum CreateDBClusterParameterGroupOutputError { -enum CreateDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -6482,55 +4788,15 @@ public struct CreateDBClusterSnapshotInput: Swift.Equatable { } } -struct CreateDBClusterSnapshotInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let tags: [RDSClientTypes.Tag]? -} +extension CreateDBClusterSnapshotOutput { -extension CreateDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBClusterSnapshotResult"] + var value = CreateDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: RDSClientTypes.DBClusterSnapshot.readingClosure) + return value } } } @@ -6547,38 +4813,93 @@ public struct CreateDBClusterSnapshotOutput: Swift.Equatable { } } -struct CreateDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: RDSClientTypes.DBClusterSnapshot? -} - -extension CreateDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } +enum CreateDBClusterSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded - } -} - -enum CreateDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allocatedStorage = "AllocatedStorage" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case availabilityZone = "AvailabilityZone" + case backupRetentionPeriod = "BackupRetentionPeriod" + case backupTarget = "BackupTarget" + case caCertificateIdentifier = "CACertificateIdentifier" + case characterSetName = "CharacterSetName" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case customIamInstanceProfile = "CustomIamInstanceProfile" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbInstanceClass = "DBInstanceClass" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbName = "DBName" + case dbParameterGroupName = "DBParameterGroupName" + case dbSecurityGroups = "DBSecurityGroups" + case dbSubnetGroupName = "DBSubnetGroupName" + case dbSystemId = "DBSystemId" + case dedicatedLogVolume = "DedicatedLogVolume" + case deletionProtection = "DeletionProtection" + case domain = "Domain" + case domainAuthSecretArn = "DomainAuthSecretArn" + case domainDnsIps = "DomainDnsIps" + case domainFqdn = "DomainFqdn" + case domainIAMRoleName = "DomainIAMRoleName" + case domainOu = "DomainOu" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableCustomerOwnedIp = "EnableCustomerOwnedIp" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enablePerformanceInsights = "EnablePerformanceInsights" + case engine = "Engine" + case engineVersion = "EngineVersion" + case iops = "Iops" + case kmsKeyId = "KmsKeyId" + case licenseModel = "LicenseModel" + case manageMasterUserPassword = "ManageMasterUserPassword" + case masterUserPassword = "MasterUserPassword" + case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" + case masterUsername = "MasterUsername" + case maxAllocatedStorage = "MaxAllocatedStorage" + case monitoringInterval = "MonitoringInterval" + case monitoringRoleArn = "MonitoringRoleArn" + case multiAZ = "MultiAZ" + case multiTenant = "MultiTenant" + case ncharCharacterSetName = "NcharCharacterSetName" + case networkType = "NetworkType" + case optionGroupName = "OptionGroupName" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" + case port = "Port" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case processorFeatures = "ProcessorFeatures" + case promotionTier = "PromotionTier" + case publiclyAccessible = "PubliclyAccessible" + case storageEncrypted = "StorageEncrypted" + case storageThroughput = "StorageThroughput" + case storageType = "StorageType" + case tags = "Tags" + case tdeCredentialArn = "TdeCredentialArn" + case tdeCredentialPassword = "TdeCredentialPassword" + case timezone = "Timezone" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -7486,90 +5807,80 @@ public struct CreateDBInstanceInput: Swift.Equatable { } } -struct CreateDBInstanceInputBody: Swift.Equatable { - let dbName: Swift.String? - let dbInstanceIdentifier: Swift.String? - let allocatedStorage: Swift.Int? - let dbInstanceClass: Swift.String? - let engine: Swift.String? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let dbSecurityGroups: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let availabilityZone: Swift.String? - let dbSubnetGroupName: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let dbParameterGroupName: Swift.String? - let backupRetentionPeriod: Swift.Int? - let preferredBackupWindow: Swift.String? - let port: Swift.Int? - let multiAZ: Swift.Bool? - let engineVersion: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let licenseModel: Swift.String? - let iops: Swift.Int? - let optionGroupName: Swift.String? - let characterSetName: Swift.String? - let ncharCharacterSetName: Swift.String? - let publiclyAccessible: Swift.Bool? - let tags: [RDSClientTypes.Tag]? - let dbClusterIdentifier: Swift.String? - let storageType: Swift.String? - let tdeCredentialArn: Swift.String? - let tdeCredentialPassword: Swift.String? - let storageEncrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let domain: Swift.String? - let domainFqdn: Swift.String? - let domainOu: Swift.String? - let domainAuthSecretArn: Swift.String? - let domainDnsIps: [Swift.String]? - let copyTagsToSnapshot: Swift.Bool? - let monitoringInterval: Swift.Int? - let monitoringRoleArn: Swift.String? - let domainIAMRoleName: Swift.String? - let promotionTier: Swift.Int? - let timezone: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let performanceInsightsRetentionPeriod: Swift.Int? - let enableCloudwatchLogsExports: [Swift.String]? - let processorFeatures: [RDSClientTypes.ProcessorFeature]? - let deletionProtection: Swift.Bool? - let maxAllocatedStorage: Swift.Int? - let enableCustomerOwnedIp: Swift.Bool? - let customIamInstanceProfile: Swift.String? - let backupTarget: Swift.String? - let networkType: Swift.String? - let storageThroughput: Swift.Int? - let manageMasterUserPassword: Swift.Bool? - let masterUserSecretKmsKeyId: Swift.String? - let caCertificateIdentifier: Swift.String? - let dbSystemId: Swift.String? - let dedicatedLogVolume: Swift.Bool? - let multiTenant: Swift.Bool? -} - -extension CreateDBInstanceInputBody: Swift.Decodable { +extension CreateDBInstanceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBInstanceResult"] + var value = CreateDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value + } + } +} + +public struct CreateDBInstanceOutput: Swift.Equatable { + /// Contains the details of an Amazon RDS DB instance. This data type is used as a response element in the operations CreateDBInstance, CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, ModifyDBInstance, PromoteReadReplica, RebootDBInstance, RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. + public var dbInstance: RDSClientTypes.DBInstance? + + public init( + dbInstance: RDSClientTypes.DBInstance? = nil + ) + { + self.dbInstance = dbInstance + } +} + +enum CreateDBInstanceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CertificateNotFound": return try await CertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } +} + +extension CreateDBInstanceReadReplicaInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" case availabilityZone = "AvailabilityZone" - case backupRetentionPeriod = "BackupRetentionPeriod" - case backupTarget = "BackupTarget" - case caCertificateIdentifier = "CACertificateIdentifier" - case characterSetName = "CharacterSetName" case copyTagsToSnapshot = "CopyTagsToSnapshot" case customIamInstanceProfile = "CustomIamInstanceProfile" - case dbClusterIdentifier = "DBClusterIdentifier" case dbInstanceClass = "DBInstanceClass" case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbName = "DBName" case dbParameterGroupName = "DBParameterGroupName" - case dbSecurityGroups = "DBSecurityGroups" case dbSubnetGroupName = "DBSubnetGroupName" - case dbSystemId = "DBSystemId" case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" case domain = "Domain" @@ -7582,345 +5893,31 @@ extension CreateDBInstanceInputBody: Swift.Decodable { case enableCustomerOwnedIp = "EnableCustomerOwnedIp" case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" case enablePerformanceInsights = "EnablePerformanceInsights" - case engine = "Engine" - case engineVersion = "EngineVersion" case iops = "Iops" case kmsKeyId = "KmsKeyId" - case licenseModel = "LicenseModel" - case manageMasterUserPassword = "ManageMasterUserPassword" - case masterUserPassword = "MasterUserPassword" - case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" - case masterUsername = "MasterUsername" case maxAllocatedStorage = "MaxAllocatedStorage" case monitoringInterval = "MonitoringInterval" case monitoringRoleArn = "MonitoringRoleArn" case multiAZ = "MultiAZ" - case multiTenant = "MultiTenant" - case ncharCharacterSetName = "NcharCharacterSetName" case networkType = "NetworkType" case optionGroupName = "OptionGroupName" case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" case port = "Port" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case preSignedUrl = "PreSignedUrl" case processorFeatures = "ProcessorFeatures" - case promotionTier = "PromotionTier" case publiclyAccessible = "PubliclyAccessible" - case storageEncrypted = "StorageEncrypted" + case replicaMode = "ReplicaMode" + case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" + case sourceDBInstanceIdentifier = "SourceDBInstanceIdentifier" case storageThroughput = "StorageThroughput" case storageType = "StorageType" case tags = "Tags" - case tdeCredentialArn = "TdeCredentialArn" - case tdeCredentialPassword = "TdeCredentialPassword" - case timezone = "Timezone" + case upgradeStorageConfig = "UpgradeStorageConfig" + case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" case vpcSecurityGroupIds = "VpcSecurityGroupIds" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - if containerValues.contains(.dbSecurityGroups) { - struct KeyVal0{struct DBSecurityGroupName{}} - let dbSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroups) - if let dbSecurityGroupsWrappedContainer = dbSecurityGroupsWrappedContainer { - let dbSecurityGroupsContainer = try dbSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbSecurityGroupsBuffer:[Swift.String]? = nil - if let dbSecurityGroupsContainer = dbSecurityGroupsContainer { - dbSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in dbSecurityGroupsContainer { - dbSecurityGroupsBuffer?.append(stringContainer0) - } - } - dbSecurityGroups = dbSecurityGroupsBuffer - } else { - dbSecurityGroups = [] - } - } else { - dbSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let ncharCharacterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ncharCharacterSetName) - ncharCharacterSetName = ncharCharacterSetNameDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let tdeCredentialPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialPassword) - tdeCredentialPassword = tdeCredentialPasswordDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainFqdnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainFqdn) - domainFqdn = domainFqdnDecoded - let domainOuDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainOu) - domainOu = domainOuDecoded - let domainAuthSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainAuthSecretArn) - domainAuthSecretArn = domainAuthSecretArnDecoded - if containerValues.contains(.domainDnsIps) { - struct KeyVal0{struct member{}} - let domainDnsIpsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainDnsIps) - if let domainDnsIpsWrappedContainer = domainDnsIpsWrappedContainer { - let domainDnsIpsContainer = try domainDnsIpsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var domainDnsIpsBuffer:[Swift.String]? = nil - if let domainDnsIpsContainer = domainDnsIpsContainer { - domainDnsIpsBuffer = [Swift.String]() - for stringContainer0 in domainDnsIpsContainer { - domainDnsIpsBuffer?.append(stringContainer0) - } - } - domainDnsIps = domainDnsIpsBuffer - } else { - domainDnsIps = [] - } - } else { - domainDnsIps = nil - } - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let timezoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezone) - timezone = timezoneDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let performanceInsightsRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .performanceInsightsRetentionPeriod) - performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriodDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let maxAllocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAllocatedStorage) - maxAllocatedStorage = maxAllocatedStorageDecoded - let enableCustomerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableCustomerOwnedIp) - enableCustomerOwnedIp = enableCustomerOwnedIpDecoded - let customIamInstanceProfileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customIamInstanceProfile) - customIamInstanceProfile = customIamInstanceProfileDecoded - let backupTargetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .backupTarget) - backupTarget = backupTargetDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let manageMasterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterUserPassword) - manageMasterUserPassword = manageMasterUserPasswordDecoded - let masterUserSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserSecretKmsKeyId) - masterUserSecretKmsKeyId = masterUserSecretKmsKeyIdDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - let dbSystemIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSystemId) - dbSystemId = dbSystemIdDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - let multiTenantDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiTenant) - multiTenant = multiTenantDecoded - } -} - -extension CreateDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil - } - } -} - -public struct CreateDBInstanceOutput: Swift.Equatable { - /// Contains the details of an Amazon RDS DB instance. This data type is used as a response element in the operations CreateDBInstance, CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, ModifyDBInstance, PromoteReadReplica, RebootDBInstance, RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. - public var dbInstance: RDSClientTypes.DBInstance? - - public init( - dbInstance: RDSClientTypes.DBInstance? = nil - ) - { - self.dbInstance = dbInstance - } -} - -struct CreateDBInstanceOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension CreateDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum CreateDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CertificateNotFound": return try await CertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension CreateDBInstanceReadReplicaInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -8392,287 +6389,15 @@ public struct CreateDBInstanceReadReplicaInput: Swift.Equatable { } } -struct CreateDBInstanceReadReplicaInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let sourceDBInstanceIdentifier: Swift.String? - let dbInstanceClass: Swift.String? - let availabilityZone: Swift.String? - let port: Swift.Int? - let multiAZ: Swift.Bool? - let autoMinorVersionUpgrade: Swift.Bool? - let iops: Swift.Int? - let optionGroupName: Swift.String? - let dbParameterGroupName: Swift.String? - let publiclyAccessible: Swift.Bool? - let tags: [RDSClientTypes.Tag]? - let dbSubnetGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let storageType: Swift.String? - let copyTagsToSnapshot: Swift.Bool? - let monitoringInterval: Swift.Int? - let monitoringRoleArn: Swift.String? - let kmsKeyId: Swift.String? - let preSignedUrl: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let performanceInsightsRetentionPeriod: Swift.Int? - let enableCloudwatchLogsExports: [Swift.String]? - let processorFeatures: [RDSClientTypes.ProcessorFeature]? - let useDefaultProcessorFeatures: Swift.Bool? - let deletionProtection: Swift.Bool? - let domain: Swift.String? - let domainIAMRoleName: Swift.String? - let domainFqdn: Swift.String? - let domainOu: Swift.String? - let domainAuthSecretArn: Swift.String? - let domainDnsIps: [Swift.String]? - let replicaMode: RDSClientTypes.ReplicaMode? - let maxAllocatedStorage: Swift.Int? - let customIamInstanceProfile: Swift.String? - let networkType: Swift.String? - let storageThroughput: Swift.Int? - let enableCustomerOwnedIp: Swift.Bool? - let allocatedStorage: Swift.Int? - let sourceDBClusterIdentifier: Swift.String? - let dedicatedLogVolume: Swift.Bool? - let upgradeStorageConfig: Swift.Bool? -} - -extension CreateDBInstanceReadReplicaInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocatedStorage = "AllocatedStorage" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case availabilityZone = "AvailabilityZone" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case customIamInstanceProfile = "CustomIamInstanceProfile" - case dbInstanceClass = "DBInstanceClass" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbParameterGroupName = "DBParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case dedicatedLogVolume = "DedicatedLogVolume" - case deletionProtection = "DeletionProtection" - case domain = "Domain" - case domainAuthSecretArn = "DomainAuthSecretArn" - case domainDnsIps = "DomainDnsIps" - case domainFqdn = "DomainFqdn" - case domainIAMRoleName = "DomainIAMRoleName" - case domainOu = "DomainOu" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableCustomerOwnedIp = "EnableCustomerOwnedIp" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case enablePerformanceInsights = "EnablePerformanceInsights" - case iops = "Iops" - case kmsKeyId = "KmsKeyId" - case maxAllocatedStorage = "MaxAllocatedStorage" - case monitoringInterval = "MonitoringInterval" - case monitoringRoleArn = "MonitoringRoleArn" - case multiAZ = "MultiAZ" - case networkType = "NetworkType" - case optionGroupName = "OptionGroupName" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" - case port = "Port" - case preSignedUrl = "PreSignedUrl" - case processorFeatures = "ProcessorFeatures" - case publiclyAccessible = "PubliclyAccessible" - case replicaMode = "ReplicaMode" - case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" - case sourceDBInstanceIdentifier = "SourceDBInstanceIdentifier" - case storageThroughput = "StorageThroughput" - case storageType = "StorageType" - case tags = "Tags" - case upgradeStorageConfig = "UpgradeStorageConfig" - case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension CreateDBInstanceReadReplicaOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let sourceDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBInstanceIdentifier) - sourceDBInstanceIdentifier = sourceDBInstanceIdentifierDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let performanceInsightsRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .performanceInsightsRetentionPeriod) - performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriodDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let useDefaultProcessorFeaturesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useDefaultProcessorFeatures) - useDefaultProcessorFeatures = useDefaultProcessorFeaturesDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let domainFqdnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainFqdn) - domainFqdn = domainFqdnDecoded - let domainOuDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainOu) - domainOu = domainOuDecoded - let domainAuthSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainAuthSecretArn) - domainAuthSecretArn = domainAuthSecretArnDecoded - if containerValues.contains(.domainDnsIps) { - struct KeyVal0{struct member{}} - let domainDnsIpsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainDnsIps) - if let domainDnsIpsWrappedContainer = domainDnsIpsWrappedContainer { - let domainDnsIpsContainer = try domainDnsIpsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var domainDnsIpsBuffer:[Swift.String]? = nil - if let domainDnsIpsContainer = domainDnsIpsContainer { - domainDnsIpsBuffer = [Swift.String]() - for stringContainer0 in domainDnsIpsContainer { - domainDnsIpsBuffer?.append(stringContainer0) - } - } - domainDnsIps = domainDnsIpsBuffer - } else { - domainDnsIps = [] - } - } else { - domainDnsIps = nil - } - let replicaModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ReplicaMode.self, forKey: .replicaMode) - replicaMode = replicaModeDecoded - let maxAllocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAllocatedStorage) - maxAllocatedStorage = maxAllocatedStorageDecoded - let customIamInstanceProfileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customIamInstanceProfile) - customIamInstanceProfile = customIamInstanceProfileDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let enableCustomerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableCustomerOwnedIp) - enableCustomerOwnedIp = enableCustomerOwnedIpDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let sourceDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterIdentifier) - sourceDBClusterIdentifier = sourceDBClusterIdentifierDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - let upgradeStorageConfigDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .upgradeStorageConfig) - upgradeStorageConfig = upgradeStorageConfigDecoded - } -} - -extension CreateDBInstanceReadReplicaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBInstanceReadReplicaOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBInstanceReadReplicaResult"] + var value = CreateDBInstanceReadReplicaOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -8689,56 +6414,53 @@ public struct CreateDBInstanceReadReplicaOutput: Swift.Equatable { } } -struct CreateDBInstanceReadReplicaOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension CreateDBInstanceReadReplicaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBInstanceReadReplicaResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum CreateDBInstanceReadReplicaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotAllowedFault": return try await DBSubnetGroupNotAllowedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupFault": return try await InvalidDBSubnetGroupFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateDBInstanceReadReplicaOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotAllowedFault": return try await DBSubnetGroupNotAllowedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupFault": return try await InvalidDBSubnetGroupFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case dbParameterGroupName = "DBParameterGroupName" + case description = "Description" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -8839,59 +6561,15 @@ public struct CreateDBParameterGroupInput: Swift.Equatable { } } -struct CreateDBParameterGroupInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let dbParameterGroupFamily: Swift.String? - let description: Swift.String? - let tags: [RDSClientTypes.Tag]? -} +extension CreateDBParameterGroupOutput { -extension CreateDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case dbParameterGroupName = "DBParameterGroupName" - case description = "Description" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroup = output.dbParameterGroup - } else { - self.dbParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBParameterGroupResult"] + var value = CreateDBParameterGroupOutput() + value.dbParameterGroup = try reader["DBParameterGroup"].readIfPresent(readingClosure: RDSClientTypes.DBParameterGroup.readingClosure) + return value } } } @@ -8908,35 +6586,34 @@ public struct CreateDBParameterGroupOutput: Swift.Equatable { } } -struct CreateDBParameterGroupOutputBody: Swift.Equatable { - let dbParameterGroup: RDSClientTypes.DBParameterGroup? -} - -extension CreateDBParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroup = "DBParameterGroup" - } +enum CreateDBParameterGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBParameterGroupResult")) - let dbParameterGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBParameterGroup.self, forKey: .dbParameterGroup) - dbParameterGroup = dbParameterGroupDecoded - } -} - -enum CreateDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupAlreadyExists": return try await DBParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupQuotaExceeded": return try await DBParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBProxyEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbProxyEndpointName = "DBProxyEndpointName" + case dbProxyName = "DBProxyName" + case tags = "Tags" + case targetRole = "TargetRole" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + case vpcSubnetIds = "VpcSubnetIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbProxyEndpointName = dbProxyEndpointName { @@ -9031,101 +6708,15 @@ public struct CreateDBProxyEndpointInput: Swift.Equatable { } } -struct CreateDBProxyEndpointInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let dbProxyEndpointName: Swift.String? - let vpcSubnetIds: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let targetRole: RDSClientTypes.DBProxyEndpointTargetRole? - let tags: [RDSClientTypes.Tag]? -} - -extension CreateDBProxyEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyEndpointName = "DBProxyEndpointName" - case dbProxyName = "DBProxyName" - case tags = "Tags" - case targetRole = "TargetRole" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - case vpcSubnetIds = "VpcSubnetIds" - } +extension CreateDBProxyEndpointOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let dbProxyEndpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyEndpointName) - dbProxyEndpointName = dbProxyEndpointNameDecoded - if containerValues.contains(.vpcSubnetIds) { - struct KeyVal0{struct member{}} - let vpcSubnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSubnetIds) - if let vpcSubnetIdsWrappedContainer = vpcSubnetIdsWrappedContainer { - let vpcSubnetIdsContainer = try vpcSubnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSubnetIdsBuffer:[Swift.String]? = nil - if let vpcSubnetIdsContainer = vpcSubnetIdsContainer { - vpcSubnetIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSubnetIdsContainer { - vpcSubnetIdsBuffer?.append(stringContainer0) - } - } - vpcSubnetIds = vpcSubnetIdsBuffer - } else { - vpcSubnetIds = [] - } - } else { - vpcSubnetIds = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct member{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let targetRoleDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxyEndpointTargetRole.self, forKey: .targetRole) - targetRole = targetRoleDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBProxyEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBProxyEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxyEndpoint = output.dbProxyEndpoint - } else { - self.dbProxyEndpoint = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBProxyEndpointResult"] + var value = CreateDBProxyEndpointOutput() + value.dbProxyEndpoint = try reader["DBProxyEndpoint"].readIfPresent(readingClosure: RDSClientTypes.DBProxyEndpoint.readingClosure) + return value } } } @@ -9142,38 +6733,41 @@ public struct CreateDBProxyEndpointOutput: Swift.Equatable { } } -struct CreateDBProxyEndpointOutputBody: Swift.Equatable { - let dbProxyEndpoint: RDSClientTypes.DBProxyEndpoint? -} - -extension CreateDBProxyEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyEndpoint = "DBProxyEndpoint" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBProxyEndpointResult")) - let dbProxyEndpointDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxyEndpoint.self, forKey: .dbProxyEndpoint) - dbProxyEndpoint = dbProxyEndpointDecoded - } -} +enum CreateDBProxyEndpointOutputError { -enum CreateDBProxyEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyEndpointAlreadyExistsFault": return try await DBProxyEndpointAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyEndpointQuotaExceededFault": return try await DBProxyEndpointQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyEndpointAlreadyExistsFault": return try await DBProxyEndpointAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyEndpointQuotaExceededFault": return try await DBProxyEndpointQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBProxyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case auth = "Auth" + case dbProxyName = "DBProxyName" + case debugLogging = "DebugLogging" + case engineFamily = "EngineFamily" + case idleClientTimeout = "IdleClientTimeout" + case requireTLS = "RequireTLS" + case roleArn = "RoleArn" + case tags = "Tags" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + case vpcSubnetIds = "VpcSubnetIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let auth = auth { @@ -9307,134 +6901,15 @@ public struct CreateDBProxyInput: Swift.Equatable { } } -struct CreateDBProxyInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let engineFamily: RDSClientTypes.EngineFamily? - let auth: [RDSClientTypes.UserAuthConfig]? - let roleArn: Swift.String? - let vpcSubnetIds: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let requireTLS: Swift.Bool? - let idleClientTimeout: Swift.Int? - let debugLogging: Swift.Bool? - let tags: [RDSClientTypes.Tag]? -} +extension CreateDBProxyOutput { -extension CreateDBProxyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case auth = "Auth" - case dbProxyName = "DBProxyName" - case debugLogging = "DebugLogging" - case engineFamily = "EngineFamily" - case idleClientTimeout = "IdleClientTimeout" - case requireTLS = "RequireTLS" - case roleArn = "RoleArn" - case tags = "Tags" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - case vpcSubnetIds = "VpcSubnetIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let engineFamilyDecoded = try containerValues.decodeIfPresent(RDSClientTypes.EngineFamily.self, forKey: .engineFamily) - engineFamily = engineFamilyDecoded - if containerValues.contains(.auth) { - struct KeyVal0{struct member{}} - let authWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .auth) - if let authWrappedContainer = authWrappedContainer { - let authContainer = try authWrappedContainer.decodeIfPresent([RDSClientTypes.UserAuthConfig].self, forKey: .member) - var authBuffer:[RDSClientTypes.UserAuthConfig]? = nil - if let authContainer = authContainer { - authBuffer = [RDSClientTypes.UserAuthConfig]() - for structureContainer0 in authContainer { - authBuffer?.append(structureContainer0) - } - } - auth = authBuffer - } else { - auth = [] - } - } else { - auth = nil - } - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - if containerValues.contains(.vpcSubnetIds) { - struct KeyVal0{struct member{}} - let vpcSubnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSubnetIds) - if let vpcSubnetIdsWrappedContainer = vpcSubnetIdsWrappedContainer { - let vpcSubnetIdsContainer = try vpcSubnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSubnetIdsBuffer:[Swift.String]? = nil - if let vpcSubnetIdsContainer = vpcSubnetIdsContainer { - vpcSubnetIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSubnetIdsContainer { - vpcSubnetIdsBuffer?.append(stringContainer0) - } - } - vpcSubnetIds = vpcSubnetIdsBuffer - } else { - vpcSubnetIds = [] - } - } else { - vpcSubnetIds = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct member{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let requireTLSDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireTLS) - requireTLS = requireTLSDecoded - let idleClientTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .idleClientTimeout) - idleClientTimeout = idleClientTimeoutDecoded - let debugLoggingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .debugLogging) - debugLogging = debugLoggingDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBProxyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBProxyOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxy = output.dbProxy - } else { - self.dbProxy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBProxyResult"] + var value = CreateDBProxyOutput() + value.dbProxy = try reader["DBProxy"].readIfPresent(readingClosure: RDSClientTypes.DBProxy.readingClosure) + return value } } } @@ -9451,36 +6926,32 @@ public struct CreateDBProxyOutput: Swift.Equatable { } } -struct CreateDBProxyOutputBody: Swift.Equatable { - let dbProxy: RDSClientTypes.DBProxy? -} - -extension CreateDBProxyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxy = "DBProxy" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBProxyResult")) - let dbProxyDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxy.self, forKey: .dbProxy) - dbProxy = dbProxyDecoded - } -} +enum CreateDBProxyOutputError { -enum CreateDBProxyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyAlreadyExistsFault": return try await DBProxyAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyQuotaExceededFault": return try await DBProxyQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyAlreadyExistsFault": return try await DBProxyAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyQuotaExceededFault": return try await DBProxyQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBSecurityGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSecurityGroupDescription = "DBSecurityGroupDescription" + case dbSecurityGroupName = "DBSecurityGroupName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSecurityGroupDescription = dbSecurityGroupDescription { @@ -9547,55 +7018,15 @@ public struct CreateDBSecurityGroupInput: Swift.Equatable { } } -struct CreateDBSecurityGroupInputBody: Swift.Equatable { - let dbSecurityGroupName: Swift.String? - let dbSecurityGroupDescription: Swift.String? - let tags: [RDSClientTypes.Tag]? -} - -extension CreateDBSecurityGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSecurityGroupDescription = "DBSecurityGroupDescription" - case dbSecurityGroupName = "DBSecurityGroupName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupName) - dbSecurityGroupName = dbSecurityGroupNameDecoded - let dbSecurityGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupDescription) - dbSecurityGroupDescription = dbSecurityGroupDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateDBSecurityGroupOutput { -extension CreateDBSecurityGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBSecurityGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSecurityGroup = output.dbSecurityGroup - } else { - self.dbSecurityGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBSecurityGroupResult"] + var value = CreateDBSecurityGroupOutput() + value.dbSecurityGroup = try reader["DBSecurityGroup"].readIfPresent(readingClosure: RDSClientTypes.DBSecurityGroup.readingClosure) + return value } } } @@ -9612,36 +7043,32 @@ public struct CreateDBSecurityGroupOutput: Swift.Equatable { } } -struct CreateDBSecurityGroupOutputBody: Swift.Equatable { - let dbSecurityGroup: RDSClientTypes.DBSecurityGroup? -} - -extension CreateDBSecurityGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSecurityGroup = "DBSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBSecurityGroupResult")) - let dbSecurityGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSecurityGroup.self, forKey: .dbSecurityGroup) - dbSecurityGroup = dbSecurityGroupDecoded - } -} +enum CreateDBSecurityGroupOutputError { -enum CreateDBSecurityGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSecurityGroupAlreadyExists": return try await DBSecurityGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotSupported": return try await DBSecurityGroupNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "QuotaExceeded.DBSecurityGroup": return try await DBSecurityGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSecurityGroupAlreadyExists": return try await DBSecurityGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotSupported": return try await DBSecurityGroupNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "QuotaExceeded.DBSecurityGroup": return try await DBSecurityGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbSnapshotIdentifier = "DBSnapshotIdentifier" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -9710,55 +7137,15 @@ public struct CreateDBSnapshotInput: Swift.Equatable { } } -struct CreateDBSnapshotInputBody: Swift.Equatable { - let dbSnapshotIdentifier: Swift.String? - let dbInstanceIdentifier: Swift.String? - let tags: [RDSClientTypes.Tag]? -} +extension CreateDBSnapshotOutput { -extension CreateDBSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbSnapshotIdentifier = "DBSnapshotIdentifier" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSnapshot = output.dbSnapshot - } else { - self.dbSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBSnapshotResult"] + var value = CreateDBSnapshotOutput() + value.dbSnapshot = try reader["DBSnapshot"].readIfPresent(readingClosure: RDSClientTypes.DBSnapshot.readingClosure) + return value } } } @@ -9775,37 +7162,34 @@ public struct CreateDBSnapshotOutput: Swift.Equatable { } } -struct CreateDBSnapshotOutputBody: Swift.Equatable { - let dbSnapshot: RDSClientTypes.DBSnapshot? -} - -extension CreateDBSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshot = "DBSnapshot" - } +enum CreateDBSnapshotOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBSnapshotResult")) - let dbSnapshotDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSnapshot.self, forKey: .dbSnapshot) - dbSnapshot = dbSnapshotDecoded - } -} - -enum CreateDBSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupDescription = "DBSubnetGroupDescription" + case dbSubnetGroupName = "DBSubnetGroupName" + case subnetIds = "SubnetIds" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupDescription = dbSubnetGroupDescription { @@ -9887,76 +7271,15 @@ public struct CreateDBSubnetGroupInput: Swift.Equatable { } } -struct CreateDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let dbSubnetGroupDescription: Swift.String? - let subnetIds: [Swift.String]? - let tags: [RDSClientTypes.Tag]? -} +extension CreateDBSubnetGroupOutput { -extension CreateDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupDescription = "DBSubnetGroupDescription" - case dbSubnetGroupName = "DBSubnetGroupName" - case subnetIds = "SubnetIds" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateDBSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroup = output.dbSubnetGroup - } else { - self.dbSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateDBSubnetGroupResult"] + var value = CreateDBSubnetGroupOutput() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: RDSClientTypes.DBSubnetGroup.readingClosure) + return value } } } @@ -9973,38 +7296,38 @@ public struct CreateDBSubnetGroupOutput: Swift.Equatable { } } -struct CreateDBSubnetGroupOutputBody: Swift.Equatable { - let dbSubnetGroup: RDSClientTypes.DBSubnetGroup? -} - -extension CreateDBSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroup = "DBSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateDBSubnetGroupResult")) - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - } -} +enum CreateDBSubnetGroupOutputError { -enum CreateDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupAlreadyExists": return try await DBSubnetGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupQuotaExceeded": return try await DBSubnetGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupAlreadyExists": return try await DBSubnetGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupQuotaExceeded": return try await DBSubnetGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case eventCategories = "EventCategories" + case snsTopicArn = "SnsTopicArn" + case sourceIds = "SourceIds" + case sourceType = "SourceType" + case subscriptionName = "SubscriptionName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -10122,105 +7445,15 @@ public struct CreateEventSubscriptionInput: Swift.Equatable { } } -struct CreateEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let snsTopicArn: Swift.String? - let sourceType: Swift.String? - let eventCategories: [Swift.String]? - let sourceIds: [Swift.String]? - let enabled: Swift.Bool? - let tags: [RDSClientTypes.Tag]? -} +extension CreateEventSubscriptionOutput { -extension CreateEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case eventCategories = "EventCategories" - case snsTopicArn = "SnsTopicArn" - case sourceIds = "SourceIds" - case sourceType = "SourceType" - case subscriptionName = "SubscriptionName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - if containerValues.contains(.sourceIds) { - struct KeyVal0{struct SourceId{}} - let sourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIds) - if let sourceIdsWrappedContainer = sourceIdsWrappedContainer { - let sourceIdsContainer = try sourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsBuffer:[Swift.String]? = nil - if let sourceIdsContainer = sourceIdsContainer { - sourceIdsBuffer = [Swift.String]() - for stringContainer0 in sourceIdsContainer { - sourceIdsBuffer?.append(stringContainer0) - } - } - sourceIds = sourceIdsBuffer - } else { - sourceIds = [] - } - } else { - sourceIds = nil - } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateEventSubscriptionResult"] + var value = CreateEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: RDSClientTypes.EventSubscription.readingClosure) + return value } } } @@ -10237,40 +7470,40 @@ public struct CreateEventSubscriptionOutput: Swift.Equatable { } } -struct CreateEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: RDSClientTypes.EventSubscription? -} - -extension CreateEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(RDSClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum CreateEventSubscriptionOutputError { -enum CreateEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSInvalidTopic": return try await SNSInvalidTopicFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSNoAuthorization": return try await SNSNoAuthorizationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionAlreadyExist": return try await SubscriptionAlreadyExistFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSInvalidTopic": return try await SNSInvalidTopicFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSNoAuthorization": return try await SNSNoAuthorizationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionAlreadyExist": return try await SubscriptionAlreadyExistFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case databaseName = "DatabaseName" + case deletionProtection = "DeletionProtection" + case engine = "Engine" + case engineVersion = "EngineVersion" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" + case storageEncrypted = "StorageEncrypted" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let databaseName = databaseName { @@ -10358,54 +7591,15 @@ public struct CreateGlobalClusterInput: Swift.Equatable { } } -struct CreateGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let sourceDBClusterIdentifier: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let deletionProtection: Swift.Bool? - let databaseName: Swift.String? - let storageEncrypted: Swift.Bool? -} - -extension CreateGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case databaseName = "DatabaseName" - case deletionProtection = "DeletionProtection" - case engine = "Engine" - case engineVersion = "EngineVersion" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" - case storageEncrypted = "StorageEncrypted" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let sourceDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterIdentifier) - sourceDBClusterIdentifier = sourceDBClusterIdentifierDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - } -} +extension CreateGlobalClusterOutput { -extension CreateGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateGlobalClusterResult"] + var value = CreateGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: RDSClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -10422,37 +7616,36 @@ public struct CreateGlobalClusterOutput: Swift.Equatable { } } -struct CreateGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: RDSClientTypes.GlobalCluster? -} - -extension CreateGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum CreateGlobalClusterOutputError { -enum CreateGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterAlreadyExistsFault": return try await GlobalClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterQuotaExceededFault": return try await GlobalClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterAlreadyExistsFault": return try await GlobalClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterQuotaExceededFault": return try await GlobalClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateIntegrationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case additionalEncryptionContext = "AdditionalEncryptionContext" + case integrationName = "IntegrationName" + case kmsKeyId = "KMSKeyId" + case sourceArn = "SourceArn" + case tags = "Tags" + case targetArn = "TargetArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let additionalEncryptionContext = additionalEncryptionContext { @@ -10538,102 +7731,24 @@ public struct CreateIntegrationInput: Swift.Equatable { } } -struct CreateIntegrationInputBody: Swift.Equatable { - let sourceArn: Swift.String? - let targetArn: Swift.String? - let integrationName: Swift.String? - let kmsKeyId: Swift.String? - let additionalEncryptionContext: [Swift.String:Swift.String]? - let tags: [RDSClientTypes.Tag]? -} +extension CreateIntegrationOutput { -extension CreateIntegrationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalEncryptionContext = "AdditionalEncryptionContext" - case integrationName = "IntegrationName" - case kmsKeyId = "KMSKeyId" - case sourceArn = "SourceArn" - case tags = "Tags" - case targetArn = "TargetArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let targetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetArn) - targetArn = targetArnDecoded - let integrationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationName) - integrationName = integrationNameDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.additionalEncryptionContext) { - struct KeyVal0{struct key{}; struct value{}} - let additionalEncryptionContextWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .additionalEncryptionContext) - if let additionalEncryptionContextWrappedContainer = additionalEncryptionContextWrappedContainer { - let additionalEncryptionContextContainer = try additionalEncryptionContextWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var additionalEncryptionContextBuffer: [Swift.String:Swift.String]? = nil - if let additionalEncryptionContextContainer = additionalEncryptionContextContainer { - additionalEncryptionContextBuffer = [Swift.String:Swift.String]() - for stringContainer0 in additionalEncryptionContextContainer { - additionalEncryptionContextBuffer?[stringContainer0.key] = stringContainer0.value - } - } - additionalEncryptionContext = additionalEncryptionContextBuffer - } else { - additionalEncryptionContext = [:] - } - } else { - additionalEncryptionContext = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateIntegrationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateIntegrationOutputBody = try responseDecoder.decode(responseBody: data) - self.additionalEncryptionContext = output.additionalEncryptionContext - self.createTime = output.createTime - self.errors = output.errors - self.integrationArn = output.integrationArn - self.integrationName = output.integrationName - self.kmsKeyId = output.kmsKeyId - self.sourceArn = output.sourceArn - self.status = output.status - self.tags = output.tags - self.targetArn = output.targetArn - } else { - self.additionalEncryptionContext = nil - self.createTime = nil - self.errors = nil - self.integrationArn = nil - self.integrationName = nil - self.kmsKeyId = nil - self.sourceArn = nil - self.status = nil - self.tags = nil - self.targetArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateIntegrationResult"] + var value = CreateIntegrationOutput() + value.additionalEncryptionContext = try reader["AdditionalEncryptionContext"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.errors = try reader["Errors"].readListIfPresent(memberReadingClosure: RDSClientTypes.IntegrationError.readingClosure, memberNodeInfo: "IntegrationError", isFlattened: false) + value.integrationArn = try reader["IntegrationArn"].readIfPresent() + value.integrationName = try reader["IntegrationName"].readIfPresent() + value.kmsKeyId = try reader["KMSKeyId"].readIfPresent() + value.sourceArn = try reader["SourceArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.targetArn = try reader["TargetArn"].readIfPresent() + return value } } } @@ -10687,126 +7802,37 @@ public struct CreateIntegrationOutput: Swift.Equatable { } } -struct CreateIntegrationOutputBody: Swift.Equatable { - let sourceArn: Swift.String? - let targetArn: Swift.String? - let integrationName: Swift.String? - let integrationArn: Swift.String? - let kmsKeyId: Swift.String? - let additionalEncryptionContext: [Swift.String:Swift.String]? - let status: RDSClientTypes.IntegrationStatus? - let tags: [RDSClientTypes.Tag]? - let createTime: ClientRuntime.Date? - let errors: [RDSClientTypes.IntegrationError]? -} - -extension CreateIntegrationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalEncryptionContext = "AdditionalEncryptionContext" - case createTime = "CreateTime" - case errors = "Errors" - case integrationArn = "IntegrationArn" - case integrationName = "IntegrationName" - case kmsKeyId = "KMSKeyId" - case sourceArn = "SourceArn" - case status = "Status" - case tags = "Tags" - case targetArn = "TargetArn" - } +enum CreateIntegrationOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateIntegrationResult")) - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let targetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetArn) - targetArn = targetArnDecoded - let integrationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationName) - integrationName = integrationNameDecoded - let integrationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationArn) - integrationArn = integrationArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.additionalEncryptionContext) { - struct KeyVal0{struct key{}; struct value{}} - let additionalEncryptionContextWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .additionalEncryptionContext) - if let additionalEncryptionContextWrappedContainer = additionalEncryptionContextWrappedContainer { - let additionalEncryptionContextContainer = try additionalEncryptionContextWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var additionalEncryptionContextBuffer: [Swift.String:Swift.String]? = nil - if let additionalEncryptionContextContainer = additionalEncryptionContextContainer { - additionalEncryptionContextBuffer = [Swift.String:Swift.String]() - for stringContainer0 in additionalEncryptionContextContainer { - additionalEncryptionContextBuffer?[stringContainer0.key] = stringContainer0.value - } - } - additionalEncryptionContext = additionalEncryptionContextBuffer - } else { - additionalEncryptionContext = [:] - } - } else { - additionalEncryptionContext = nil - } - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.IntegrationStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - if containerValues.contains(.errors) { - struct KeyVal0{struct IntegrationError{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([RDSClientTypes.IntegrationError].self, forKey: .member) - var errorsBuffer:[RDSClientTypes.IntegrationError]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [RDSClientTypes.IntegrationError]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] - } - } else { - errors = nil - } - } -} - -enum CreateIntegrationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IntegrationAlreadyExistsFault": return try await IntegrationAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IntegrationConflictOperationFault": return try await IntegrationConflictOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IntegrationQuotaExceededFault": return try await IntegrationQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IntegrationAlreadyExistsFault": return try await IntegrationAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IntegrationConflictOperationFault": return try await IntegrationConflictOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IntegrationQuotaExceededFault": return try await IntegrationQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateOptionGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case engineName = "EngineName" + case majorEngineVersion = "MajorEngineVersion" + case optionGroupDescription = "OptionGroupDescription" + case optionGroupName = "OptionGroupName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let engineName = engineName { @@ -10913,63 +7939,15 @@ public struct CreateOptionGroupInput: Swift.Equatable { } } -struct CreateOptionGroupInputBody: Swift.Equatable { - let optionGroupName: Swift.String? - let engineName: Swift.String? - let majorEngineVersion: Swift.String? - let optionGroupDescription: Swift.String? - let tags: [RDSClientTypes.Tag]? -} - -extension CreateOptionGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineName = "EngineName" - case majorEngineVersion = "MajorEngineVersion" - case optionGroupDescription = "OptionGroupDescription" - case optionGroupName = "OptionGroupName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let engineNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineName) - engineName = engineNameDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - let optionGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupDescription) - optionGroupDescription = optionGroupDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateOptionGroupOutput { -extension CreateOptionGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateOptionGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.optionGroup = output.optionGroup - } else { - self.optionGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateOptionGroupResult"] + var value = CreateOptionGroupOutput() + value.optionGroup = try reader["OptionGroup"].readIfPresent(readingClosure: RDSClientTypes.OptionGroup.readingClosure) + return value } } } @@ -10986,30 +7964,20 @@ public struct CreateOptionGroupOutput: Swift.Equatable { } } -struct CreateOptionGroupOutputBody: Swift.Equatable { - let optionGroup: RDSClientTypes.OptionGroup? -} - -extension CreateOptionGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case optionGroup = "OptionGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateOptionGroupResult")) - let optionGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.OptionGroup.self, forKey: .optionGroup) - optionGroup = optionGroupDecoded - } -} +enum CreateOptionGroupOutputError { -enum CreateOptionGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OptionGroupAlreadyExistsFault": return try await OptionGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupQuotaExceededFault": return try await OptionGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OptionGroupAlreadyExistsFault": return try await OptionGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupQuotaExceededFault": return try await OptionGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -11020,6 +7988,16 @@ extension CreateTenantDatabaseInput: Swift.CustomDebugStringConvertible { } extension CreateTenantDatabaseInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case characterSetName = "CharacterSetName" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case masterUserPassword = "MasterUserPassword" + case masterUsername = "MasterUsername" + case ncharCharacterSetName = "NcharCharacterSetName" + case tags = "Tags" + case tenantDBName = "TenantDBName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let characterSetName = characterSetName { @@ -11114,71 +8092,15 @@ public struct CreateTenantDatabaseInput: Swift.Equatable { } } -struct CreateTenantDatabaseInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let tenantDBName: Swift.String? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let characterSetName: Swift.String? - let ncharCharacterSetName: Swift.String? - let tags: [RDSClientTypes.Tag]? -} - -extension CreateTenantDatabaseInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case characterSetName = "CharacterSetName" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case masterUserPassword = "MasterUserPassword" - case masterUsername = "MasterUsername" - case ncharCharacterSetName = "NcharCharacterSetName" - case tags = "Tags" - case tenantDBName = "TenantDBName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let tenantDBNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDBName) - tenantDBName = tenantDBNameDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let ncharCharacterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ncharCharacterSetName) - ncharCharacterSetName = ncharCharacterSetNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateTenantDatabaseOutput { -extension CreateTenantDatabaseOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTenantDatabaseOutputBody = try responseDecoder.decode(responseBody: data) - self.tenantDatabase = output.tenantDatabase - } else { - self.tenantDatabase = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateTenantDatabaseResult"] + var value = CreateTenantDatabaseOutput() + value.tenantDatabase = try reader["TenantDatabase"].readIfPresent(readingClosure: RDSClientTypes.TenantDatabase.readingClosure) + return value } } } @@ -11195,47 +8117,35 @@ public struct CreateTenantDatabaseOutput: Swift.Equatable { } } -struct CreateTenantDatabaseOutputBody: Swift.Equatable { - let tenantDatabase: RDSClientTypes.TenantDatabase? -} - -extension CreateTenantDatabaseOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tenantDatabase = "TenantDatabase" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateTenantDatabaseResult")) - let tenantDatabaseDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TenantDatabase.self, forKey: .tenantDatabase) - tenantDatabase = tenantDatabaseDecoded - } -} +enum CreateTenantDatabaseOutputError { -enum CreateTenantDatabaseOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseAlreadyExists": return try await TenantDatabaseAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseAlreadyExists": return try await TenantDatabaseAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CustomAvailabilityZoneNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomAvailabilityZoneNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11263,23 +8173,7 @@ public struct CustomAvailabilityZoneNotFoundFault: ClientRuntime.ModeledError, A } } -struct CustomAvailabilityZoneNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CustomAvailabilityZoneNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.CustomDBEngineVersionAMI: Swift.Codable { +extension RDSClientTypes.CustomDBEngineVersionAMI: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case imageId = "ImageId" case status = "Status" @@ -11295,12 +8189,14 @@ extension RDSClientTypes.CustomDBEngineVersionAMI: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let imageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .imageId) - imageId = imageIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.CustomDBEngineVersionAMI() + value.imageId = try reader["ImageId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -11325,16 +8221,14 @@ extension RDSClientTypes { } extension CustomDBEngineVersionAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomDBEngineVersionAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11362,33 +8256,15 @@ public struct CustomDBEngineVersionAlreadyExistsFault: ClientRuntime.ModeledErro } } -struct CustomDBEngineVersionAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CustomDBEngineVersionAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CustomDBEngineVersionNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomDBEngineVersionNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11416,33 +8292,15 @@ public struct CustomDBEngineVersionNotFoundFault: ClientRuntime.ModeledError, AW } } -struct CustomDBEngineVersionNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CustomDBEngineVersionNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CustomDBEngineVersionQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomDBEngineVersionQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11470,22 +8328,6 @@ public struct CustomDBEngineVersionQuotaExceededFault: ClientRuntime.ModeledErro } } -struct CustomDBEngineVersionQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CustomDBEngineVersionQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RDSClientTypes { public enum CustomEngineVersionStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case available @@ -11521,7 +8363,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.DBCluster: Swift.Codable { +extension RDSClientTypes.DBCluster: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case activityStreamKinesisStreamName = "ActivityStreamKinesisStreamName" case activityStreamKmsKeyId = "ActivityStreamKmsKeyId" @@ -11932,347 +8774,88 @@ extension RDSClientTypes.DBCluster: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterParameterGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroup) - dbClusterParameterGroup = dbClusterParameterGroupDecoded - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let automaticRestartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .automaticRestartTime) - automaticRestartTime = automaticRestartTimeDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let earliestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .earliestRestorableTime) - earliestRestorableTime = earliestRestorableTimeDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let readerEndpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .readerEndpoint) - readerEndpoint = readerEndpointDecoded - if containerValues.contains(.customEndpoints) { - struct KeyVal0{struct member{}} - let customEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .customEndpoints) - if let customEndpointsWrappedContainer = customEndpointsWrappedContainer { - let customEndpointsContainer = try customEndpointsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var customEndpointsBuffer:[Swift.String]? = nil - if let customEndpointsContainer = customEndpointsContainer { - customEndpointsBuffer = [Swift.String]() - for stringContainer0 in customEndpointsContainer { - customEndpointsBuffer?.append(stringContainer0) - } - } - customEndpoints = customEndpointsBuffer - } else { - customEndpoints = [] - } - } else { - customEndpoints = nil - } - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let latestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestRestorableTime) - latestRestorableTime = latestRestorableTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - if containerValues.contains(.dbClusterOptionGroupMemberships) { - struct KeyVal0{struct DBClusterOptionGroup{}} - let dbClusterOptionGroupMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterOptionGroupMemberships) - if let dbClusterOptionGroupMembershipsWrappedContainer = dbClusterOptionGroupMembershipsWrappedContainer { - let dbClusterOptionGroupMembershipsContainer = try dbClusterOptionGroupMembershipsWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterOptionGroupStatus].self, forKey: .member) - var dbClusterOptionGroupMembershipsBuffer:[RDSClientTypes.DBClusterOptionGroupStatus]? = nil - if let dbClusterOptionGroupMembershipsContainer = dbClusterOptionGroupMembershipsContainer { - dbClusterOptionGroupMembershipsBuffer = [RDSClientTypes.DBClusterOptionGroupStatus]() - for structureContainer0 in dbClusterOptionGroupMembershipsContainer { - dbClusterOptionGroupMembershipsBuffer?.append(structureContainer0) - } - } - dbClusterOptionGroupMemberships = dbClusterOptionGroupMembershipsBuffer - } else { - dbClusterOptionGroupMemberships = [] - } - } else { - dbClusterOptionGroupMemberships = nil - } - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let replicationSourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicationSourceIdentifier) - replicationSourceIdentifier = replicationSourceIdentifierDecoded - if containerValues.contains(.readReplicaIdentifiers) { - struct KeyVal0{struct ReadReplicaIdentifier{}} - let readReplicaIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readReplicaIdentifiers) - if let readReplicaIdentifiersWrappedContainer = readReplicaIdentifiersWrappedContainer { - let readReplicaIdentifiersContainer = try readReplicaIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readReplicaIdentifiersBuffer:[Swift.String]? = nil - if let readReplicaIdentifiersContainer = readReplicaIdentifiersContainer { - readReplicaIdentifiersBuffer = [Swift.String]() - for stringContainer0 in readReplicaIdentifiersContainer { - readReplicaIdentifiersBuffer?.append(stringContainer0) - } - } - readReplicaIdentifiers = readReplicaIdentifiersBuffer - } else { - readReplicaIdentifiers = [] - } - } else { - readReplicaIdentifiers = nil - } - if containerValues.contains(.statusInfos) { - struct KeyVal0{struct DBClusterStatusInfo{}} - let statusInfosWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statusInfos) - if let statusInfosWrappedContainer = statusInfosWrappedContainer { - let statusInfosContainer = try statusInfosWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterStatusInfo].self, forKey: .member) - var statusInfosBuffer:[RDSClientTypes.DBClusterStatusInfo]? = nil - if let statusInfosContainer = statusInfosContainer { - statusInfosBuffer = [RDSClientTypes.DBClusterStatusInfo]() - for structureContainer0 in statusInfosContainer { - statusInfosBuffer?.append(structureContainer0) - } - } - statusInfos = statusInfosBuffer - } else { - statusInfos = [] - } - } else { - statusInfos = nil - } - if containerValues.contains(.dbClusterMembers) { - struct KeyVal0{struct DBClusterMember{}} - let dbClusterMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterMembers) - if let dbClusterMembersWrappedContainer = dbClusterMembersWrappedContainer { - let dbClusterMembersContainer = try dbClusterMembersWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterMember].self, forKey: .member) - var dbClusterMembersBuffer:[RDSClientTypes.DBClusterMember]? = nil - if let dbClusterMembersContainer = dbClusterMembersContainer { - dbClusterMembersBuffer = [RDSClientTypes.DBClusterMember]() - for structureContainer0 in dbClusterMembersContainer { - dbClusterMembersBuffer?.append(structureContainer0) - } - } - dbClusterMembers = dbClusterMembersBuffer - } else { - dbClusterMembers = [] - } - } else { - dbClusterMembers = nil - } - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroupMembership{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[RDSClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [RDSClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] - } - } else { - vpcSecurityGroups = nil - } - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterResourceId) - dbClusterResourceId = dbClusterResourceIdDecoded - let dbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterArn) - dbClusterArn = dbClusterArnDecoded - if containerValues.contains(.associatedRoles) { - struct KeyVal0{struct DBClusterRole{}} - let associatedRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedRoles) - if let associatedRolesWrappedContainer = associatedRolesWrappedContainer { - let associatedRolesContainer = try associatedRolesWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterRole].self, forKey: .member) - var associatedRolesBuffer:[RDSClientTypes.DBClusterRole]? = nil - if let associatedRolesContainer = associatedRolesContainer { - associatedRolesBuffer = [RDSClientTypes.DBClusterRole]() - for structureContainer0 in associatedRolesContainer { - associatedRolesBuffer?.append(structureContainer0) - } - } - associatedRoles = associatedRolesBuffer - } else { - associatedRoles = [] - } - } else { - associatedRoles = nil - } - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let cloneGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloneGroupId) - cloneGroupId = cloneGroupIdDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - let earliestBacktrackTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .earliestBacktrackTime) - earliestBacktrackTime = earliestBacktrackTimeDecoded - let backtrackWindowDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backtrackWindow) - backtrackWindow = backtrackWindowDecoded - let backtrackConsumedChangeRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backtrackConsumedChangeRecords) - backtrackConsumedChangeRecords = backtrackConsumedChangeRecordsDecoded - if containerValues.contains(.enabledCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enabledCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enabledCloudwatchLogsExports) - if let enabledCloudwatchLogsExportsWrappedContainer = enabledCloudwatchLogsExportsWrappedContainer { - let enabledCloudwatchLogsExportsContainer = try enabledCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enabledCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enabledCloudwatchLogsExportsContainer = enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enabledCloudwatchLogsExports = enabledCloudwatchLogsExportsBuffer - } else { - enabledCloudwatchLogsExports = [] - } - } else { - enabledCloudwatchLogsExports = nil - } - let capacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .capacity) - capacity = capacityDecoded - let engineModeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineMode) - engineMode = engineModeDecoded - let scalingConfigurationInfoDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ScalingConfigurationInfo.self, forKey: .scalingConfigurationInfo) - scalingConfigurationInfo = scalingConfigurationInfoDecoded - let rdsCustomClusterConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.RdsCustomClusterConfiguration.self, forKey: .rdsCustomClusterConfiguration) - rdsCustomClusterConfiguration = rdsCustomClusterConfigurationDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let httpEndpointEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .httpEndpointEnabled) - httpEndpointEnabled = httpEndpointEnabledDecoded - let activityStreamModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamMode.self, forKey: .activityStreamMode) - activityStreamMode = activityStreamModeDecoded - let activityStreamStatusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamStatus.self, forKey: .activityStreamStatus) - activityStreamStatus = activityStreamStatusDecoded - let activityStreamKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .activityStreamKmsKeyId) - activityStreamKmsKeyId = activityStreamKmsKeyIdDecoded - let activityStreamKinesisStreamNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .activityStreamKinesisStreamName) - activityStreamKinesisStreamName = activityStreamKinesisStreamNameDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let crossAccountCloneDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .crossAccountClone) - crossAccountClone = crossAccountCloneDecoded - if containerValues.contains(.domainMemberships) { - struct KeyVal0{struct DomainMembership{}} - let domainMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainMemberships) - if let domainMembershipsWrappedContainer = domainMembershipsWrappedContainer { - let domainMembershipsContainer = try domainMembershipsWrappedContainer.decodeIfPresent([RDSClientTypes.DomainMembership].self, forKey: .member) - var domainMembershipsBuffer:[RDSClientTypes.DomainMembership]? = nil - if let domainMembershipsContainer = domainMembershipsContainer { - domainMembershipsBuffer = [RDSClientTypes.DomainMembership]() - for structureContainer0 in domainMembershipsContainer { - domainMembershipsBuffer?.append(structureContainer0) - } - } - domainMemberships = domainMembershipsBuffer - } else { - domainMemberships = [] - } - } else { - domainMemberships = nil - } - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil - } - let globalWriteForwardingStatusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.WriteForwardingStatus.self, forKey: .globalWriteForwardingStatus) - globalWriteForwardingStatus = globalWriteForwardingStatusDecoded - let globalWriteForwardingRequestedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .globalWriteForwardingRequested) - globalWriteForwardingRequested = globalWriteForwardingRequestedDecoded - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ClusterPendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - let dbClusterInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterInstanceClass) - dbClusterInstanceClass = dbClusterInstanceClassDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let performanceInsightsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .performanceInsightsEnabled) - performanceInsightsEnabled = performanceInsightsEnabledDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let performanceInsightsRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .performanceInsightsRetentionPeriod) - performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriodDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ServerlessV2ScalingConfigurationInfo.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let dbSystemIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSystemId) - dbSystemId = dbSystemIdDecoded - let masterUserSecretDecoded = try containerValues.decodeIfPresent(RDSClientTypes.MasterUserSecret.self, forKey: .masterUserSecret) - masterUserSecret = masterUserSecretDecoded - let ioOptimizedNextAllowedModificationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .ioOptimizedNextAllowedModificationTime) - ioOptimizedNextAllowedModificationTime = ioOptimizedNextAllowedModificationTimeDecoded - let localWriteForwardingStatusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.LocalWriteForwardingStatus.self, forKey: .localWriteForwardingStatus) - localWriteForwardingStatus = localWriteForwardingStatusDecoded - let awsBackupRecoveryPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsBackupRecoveryPointArn) - awsBackupRecoveryPointArn = awsBackupRecoveryPointArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBCluster() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.characterSetName = try reader["CharacterSetName"].readIfPresent() + value.databaseName = try reader["DatabaseName"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.dbClusterParameterGroup = try reader["DBClusterParameterGroup"].readIfPresent() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.automaticRestartTime = try reader["AutomaticRestartTime"].readTimestampIfPresent(format: .dateTime) + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.earliestRestorableTime = try reader["EarliestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.endpoint = try reader["Endpoint"].readIfPresent() + value.readerEndpoint = try reader["ReaderEndpoint"].readIfPresent() + value.customEndpoints = try reader["CustomEndpoints"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.latestRestorableTime = try reader["LatestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.port = try reader["Port"].readIfPresent() + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.dbClusterOptionGroupMemberships = try reader["DBClusterOptionGroupMemberships"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterOptionGroupStatus.readingClosure, memberNodeInfo: "DBClusterOptionGroup", isFlattened: false) + value.preferredBackupWindow = try reader["PreferredBackupWindow"].readIfPresent() + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.replicationSourceIdentifier = try reader["ReplicationSourceIdentifier"].readIfPresent() + value.readReplicaIdentifiers = try reader["ReadReplicaIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ReadReplicaIdentifier", isFlattened: false) + value.statusInfos = try reader["StatusInfos"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterStatusInfo.readingClosure, memberNodeInfo: "DBClusterStatusInfo", isFlattened: false) + value.dbClusterMembers = try reader["DBClusterMembers"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterMember.readingClosure, memberNodeInfo: "DBClusterMember", isFlattened: false) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroupMembership", isFlattened: false) + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbClusterResourceId = try reader["DbClusterResourceId"].readIfPresent() + value.dbClusterArn = try reader["DBClusterArn"].readIfPresent() + value.associatedRoles = try reader["AssociatedRoles"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterRole.readingClosure, memberNodeInfo: "DBClusterRole", isFlattened: false) + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.cloneGroupId = try reader["CloneGroupId"].readIfPresent() + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.earliestBacktrackTime = try reader["EarliestBacktrackTime"].readTimestampIfPresent(format: .dateTime) + value.backtrackWindow = try reader["BacktrackWindow"].readIfPresent() + value.backtrackConsumedChangeRecords = try reader["BacktrackConsumedChangeRecords"].readIfPresent() + value.enabledCloudwatchLogsExports = try reader["EnabledCloudwatchLogsExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.capacity = try reader["Capacity"].readIfPresent() + value.engineMode = try reader["EngineMode"].readIfPresent() + value.scalingConfigurationInfo = try reader["ScalingConfigurationInfo"].readIfPresent(readingClosure: RDSClientTypes.ScalingConfigurationInfo.readingClosure) + value.rdsCustomClusterConfiguration = try reader["RdsCustomClusterConfiguration"].readIfPresent(readingClosure: RDSClientTypes.RdsCustomClusterConfiguration.readingClosure) + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + value.httpEndpointEnabled = try reader["HttpEndpointEnabled"].readIfPresent() + value.activityStreamMode = try reader["ActivityStreamMode"].readIfPresent() + value.activityStreamStatus = try reader["ActivityStreamStatus"].readIfPresent() + value.activityStreamKmsKeyId = try reader["ActivityStreamKmsKeyId"].readIfPresent() + value.activityStreamKinesisStreamName = try reader["ActivityStreamKinesisStreamName"].readIfPresent() + value.copyTagsToSnapshot = try reader["CopyTagsToSnapshot"].readIfPresent() + value.crossAccountClone = try reader["CrossAccountClone"].readIfPresent() + value.domainMemberships = try reader["DomainMemberships"].readListIfPresent(memberReadingClosure: RDSClientTypes.DomainMembership.readingClosure, memberNodeInfo: "DomainMembership", isFlattened: false) + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.globalWriteForwardingStatus = try reader["GlobalWriteForwardingStatus"].readIfPresent() + value.globalWriteForwardingRequested = try reader["GlobalWriteForwardingRequested"].readIfPresent() + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: RDSClientTypes.ClusterPendingModifiedValues.readingClosure) + value.dbClusterInstanceClass = try reader["DBClusterInstanceClass"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.publiclyAccessible = try reader["PubliclyAccessible"].readIfPresent() + value.autoMinorVersionUpgrade = try reader["AutoMinorVersionUpgrade"].readIfPresent() + value.monitoringInterval = try reader["MonitoringInterval"].readIfPresent() + value.monitoringRoleArn = try reader["MonitoringRoleArn"].readIfPresent() + value.performanceInsightsEnabled = try reader["PerformanceInsightsEnabled"].readIfPresent() + value.performanceInsightsKMSKeyId = try reader["PerformanceInsightsKMSKeyId"].readIfPresent() + value.performanceInsightsRetentionPeriod = try reader["PerformanceInsightsRetentionPeriod"].readIfPresent() + value.serverlessV2ScalingConfiguration = try reader["ServerlessV2ScalingConfiguration"].readIfPresent(readingClosure: RDSClientTypes.ServerlessV2ScalingConfigurationInfo.readingClosure) + value.networkType = try reader["NetworkType"].readIfPresent() + value.dbSystemId = try reader["DBSystemId"].readIfPresent() + value.masterUserSecret = try reader["MasterUserSecret"].readIfPresent(readingClosure: RDSClientTypes.MasterUserSecret.readingClosure) + value.ioOptimizedNextAllowedModificationTime = try reader["IOOptimizedNextAllowedModificationTime"].readTimestampIfPresent(format: .dateTime) + value.localWriteForwardingStatus = try reader["LocalWriteForwardingStatus"].readIfPresent() + value.awsBackupRecoveryPointArn = try reader["AwsBackupRecoveryPointArn"].readIfPresent() + return value + } } } @@ -12602,16 +9185,14 @@ extension RDSClientTypes { } extension DBClusterAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12639,23 +9220,7 @@ public struct DBClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSClient } } -struct DBClusterAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterAutomatedBackup: Swift.Codable { +extension RDSClientTypes.DBClusterAutomatedBackup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case availabilityZones = "AvailabilityZones" @@ -12768,73 +9333,36 @@ extension RDSClientTypes.DBClusterAutomatedBackup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let dbClusterAutomatedBackupsArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterAutomatedBackupsArn) - dbClusterAutomatedBackupsArn = dbClusterAutomatedBackupsArnDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let restoreWindowDecoded = try containerValues.decodeIfPresent(RDSClientTypes.RestoreWindow.self, forKey: .restoreWindow) - restoreWindow = restoreWindowDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let dbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterResourceId) - dbClusterResourceId = dbClusterResourceIdDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterArn) - dbClusterArn = dbClusterArnDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let engineModeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineMode) - engineMode = engineModeDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let awsBackupRecoveryPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsBackupRecoveryPointArn) - awsBackupRecoveryPointArn = awsBackupRecoveryPointArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterAutomatedBackup() + value.engine = try reader["Engine"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.dbClusterAutomatedBackupsArn = try reader["DBClusterAutomatedBackupsArn"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.restoreWindow = try reader["RestoreWindow"].readIfPresent(readingClosure: RDSClientTypes.RestoreWindow.readingClosure) + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.dbClusterResourceId = try reader["DbClusterResourceId"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.dbClusterArn = try reader["DBClusterArn"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.engineMode = try reader["EngineMode"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.port = try reader["Port"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.awsBackupRecoveryPointArn = try reader["AwsBackupRecoveryPointArn"].readIfPresent() + return value + } } } @@ -12949,16 +9477,14 @@ extension RDSClientTypes { } extension DBClusterAutomatedBackupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterAutomatedBackupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12986,33 +9512,15 @@ public struct DBClusterAutomatedBackupNotFoundFault: ClientRuntime.ModeledError, } } -struct DBClusterAutomatedBackupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterAutomatedBackupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterAutomatedBackupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterAutomatedBackupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13040,23 +9548,7 @@ public struct DBClusterAutomatedBackupQuotaExceededFault: ClientRuntime.ModeledE } } -struct DBClusterAutomatedBackupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterAutomatedBackupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterBacktrack: Swift.Codable { +extension RDSClientTypes.DBClusterBacktrack: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case backtrackIdentifier = "BacktrackIdentifier" case backtrackRequestCreationTime = "BacktrackRequestCreationTime" @@ -13088,20 +9580,18 @@ extension RDSClientTypes.DBClusterBacktrack: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let backtrackIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .backtrackIdentifier) - backtrackIdentifier = backtrackIdentifierDecoded - let backtrackToDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .backtrackTo) - backtrackTo = backtrackToDecoded - let backtrackedFromDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .backtrackedFrom) - backtrackedFrom = backtrackedFromDecoded - let backtrackRequestCreationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .backtrackRequestCreationTime) - backtrackRequestCreationTime = backtrackRequestCreationTimeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterBacktrack() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.backtrackIdentifier = try reader["BacktrackIdentifier"].readIfPresent() + value.backtrackTo = try reader["BacktrackTo"].readTimestampIfPresent(format: .dateTime) + value.backtrackedFrom = try reader["BacktrackedFrom"].readTimestampIfPresent(format: .dateTime) + value.backtrackRequestCreationTime = try reader["BacktrackRequestCreationTime"].readTimestampIfPresent(format: .dateTime) + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -13150,16 +9640,14 @@ extension RDSClientTypes { } extension DBClusterBacktrackNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterBacktrackNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13187,23 +9675,7 @@ public struct DBClusterBacktrackNotFoundFault: ClientRuntime.ModeledError, AWSCl } } -struct DBClusterBacktrackNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterBacktrackNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterEndpoint: Swift.Codable { +extension RDSClientTypes.DBClusterEndpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case customEndpointType = "CustomEndpointType" case dbClusterEndpointArn = "DBClusterEndpointArn" @@ -13269,62 +9741,22 @@ extension RDSClientTypes.DBClusterEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointResourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointResourceIdentifier) - dbClusterEndpointResourceIdentifier = dbClusterEndpointResourceIdentifierDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let customEndpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customEndpointType) - customEndpointType = customEndpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil - } - let dbClusterEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointArn) - dbClusterEndpointArn = dbClusterEndpointArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterEndpoint() + value.dbClusterEndpointIdentifier = try reader["DBClusterEndpointIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.dbClusterEndpointResourceIdentifier = try reader["DBClusterEndpointResourceIdentifier"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.endpointType = try reader["EndpointType"].readIfPresent() + value.customEndpointType = try reader["CustomEndpointType"].readIfPresent() + value.staticMembers = try reader["StaticMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.excludedMembers = try reader["ExcludedMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.dbClusterEndpointArn = try reader["DBClusterEndpointArn"].readIfPresent() + return value + } } } @@ -13392,16 +9824,14 @@ extension RDSClientTypes { } extension DBClusterEndpointAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterEndpointAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13429,33 +9859,15 @@ public struct DBClusterEndpointAlreadyExistsFault: ClientRuntime.ModeledError, A } } -struct DBClusterEndpointAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterEndpointAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterEndpointNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterEndpointNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13483,33 +9895,15 @@ public struct DBClusterEndpointNotFoundFault: ClientRuntime.ModeledError, AWSCli } } -struct DBClusterEndpointNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterEndpointNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterEndpointQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterEndpointQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13537,23 +9931,7 @@ public struct DBClusterEndpointQuotaExceededFault: ClientRuntime.ModeledError, A } } -struct DBClusterEndpointQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterEndpointQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterMember: Swift.Codable { +extension RDSClientTypes.DBClusterMember: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterParameterGroupStatus = "DBClusterParameterGroupStatus" case dbInstanceIdentifier = "DBInstanceIdentifier" @@ -13577,16 +9955,16 @@ extension RDSClientTypes.DBClusterMember: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let isClusterWriterDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isClusterWriter) - isClusterWriter = isClusterWriterDecoded - let dbClusterParameterGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupStatus) - dbClusterParameterGroupStatus = dbClusterParameterGroupStatusDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterMember() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.isClusterWriter = try reader["IsClusterWriter"].readIfPresent() + value.dbClusterParameterGroupStatus = try reader["DBClusterParameterGroupStatus"].readIfPresent() + value.promotionTier = try reader["PromotionTier"].readIfPresent() + return value + } } } @@ -13619,16 +9997,14 @@ extension RDSClientTypes { } extension DBClusterNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13656,23 +10032,7 @@ public struct DBClusterNotFoundFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct DBClusterNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterOptionGroupStatus: Swift.Codable { +extension RDSClientTypes.DBClusterOptionGroupStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterOptionGroupName = "DBClusterOptionGroupName" case status = "Status" @@ -13688,12 +10048,14 @@ extension RDSClientTypes.DBClusterOptionGroupStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterOptionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterOptionGroupName) - dbClusterOptionGroupName = dbClusterOptionGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterOptionGroupStatus() + value.dbClusterOptionGroupName = try reader["DBClusterOptionGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -13717,7 +10079,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.DBClusterParameterGroup: Swift.Codable { +extension RDSClientTypes.DBClusterParameterGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterParameterGroupArn = "DBClusterParameterGroupArn" case dbClusterParameterGroupName = "DBClusterParameterGroupName" @@ -13741,16 +10103,16 @@ extension RDSClientTypes.DBClusterParameterGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dbClusterParameterGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupArn) - dbClusterParameterGroupArn = dbClusterParameterGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterParameterGroup() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.dbClusterParameterGroupArn = try reader["DBClusterParameterGroupArn"].readIfPresent() + return value + } } } @@ -13783,16 +10145,14 @@ extension RDSClientTypes { } extension DBClusterParameterGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterParameterGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13820,33 +10180,15 @@ public struct DBClusterParameterGroupNotFoundFault: ClientRuntime.ModeledError, } } -struct DBClusterParameterGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterParameterGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13874,23 +10216,7 @@ public struct DBClusterQuotaExceededFault: ClientRuntime.ModeledError, AWSClient } } -struct DBClusterQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterRole: Swift.Codable { +extension RDSClientTypes.DBClusterRole: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case featureName = "FeatureName" case roleArn = "RoleArn" @@ -13910,14 +10236,15 @@ extension RDSClientTypes.DBClusterRole: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterRole() + value.roleArn = try reader["RoleArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.featureName = try reader["FeatureName"].readIfPresent() + return value + } } } @@ -13952,16 +10279,14 @@ extension RDSClientTypes { } extension DBClusterRoleAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterRoleAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13989,33 +10314,15 @@ public struct DBClusterRoleAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct DBClusterRoleAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterRoleAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterRoleNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterRoleNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14043,33 +10350,15 @@ public struct DBClusterRoleNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBClusterRoleNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterRoleNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBClusterRoleQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterRoleQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14097,23 +10386,7 @@ public struct DBClusterRoleQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct DBClusterRoleQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterRoleQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterSnapshot: Swift.Codable { +extension RDSClientTypes.DBClusterSnapshot: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case availabilityZones = "AvailabilityZones" @@ -14239,92 +10512,37 @@ extension RDSClientTypes.DBClusterSnapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let snapshotCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotCreateTime) - snapshotCreateTime = snapshotCreateTimeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineModeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineMode) - engineMode = engineModeDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbClusterSnapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotArn) - dbClusterSnapshotArn = dbClusterSnapshotArnDecoded - let sourceDBClusterSnapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterSnapshotArn) - sourceDBClusterSnapshotArn = sourceDBClusterSnapshotArnDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil - } - let dbSystemIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSystemId) - dbSystemId = dbSystemIdDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let dbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterResourceId) - dbClusterResourceId = dbClusterResourceIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterSnapshot() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.dbClusterSnapshotIdentifier = try reader["DBClusterSnapshotIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.snapshotCreateTime = try reader["SnapshotCreateTime"].readTimestampIfPresent(format: .dateTime) + value.engine = try reader["Engine"].readIfPresent() + value.engineMode = try reader["EngineMode"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.snapshotType = try reader["SnapshotType"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbClusterSnapshotArn = try reader["DBClusterSnapshotArn"].readIfPresent() + value.sourceDBClusterSnapshotArn = try reader["SourceDBClusterSnapshotArn"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.dbSystemId = try reader["DBSystemId"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.dbClusterResourceId = try reader["DbClusterResourceId"].readIfPresent() + return value + } } } @@ -14447,16 +10665,14 @@ extension RDSClientTypes { } extension DBClusterSnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterSnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14484,23 +10700,7 @@ public struct DBClusterSnapshotAlreadyExistsFault: ClientRuntime.ModeledError, A } } -struct DBClusterSnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterSnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterSnapshotAttribute: Swift.Codable { +extension RDSClientTypes.DBClusterSnapshotAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeName = "AttributeName" case attributeValues = "AttributeValues" @@ -14525,28 +10725,13 @@ extension RDSClientTypes.DBClusterSnapshotAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.attributeValues) { - struct KeyVal0{struct AttributeValue{}} - let attributeValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeValues) - if let attributeValuesWrappedContainer = attributeValuesWrappedContainer { - let attributeValuesContainer = try attributeValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var attributeValuesBuffer:[Swift.String]? = nil - if let attributeValuesContainer = attributeValuesContainer { - attributeValuesBuffer = [Swift.String]() - for stringContainer0 in attributeValuesContainer { - attributeValuesBuffer?.append(stringContainer0) - } - } - attributeValues = attributeValuesBuffer - } else { - attributeValues = [] - } - } else { - attributeValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterSnapshotAttribute() + value.attributeName = try reader["AttributeName"].readIfPresent() + value.attributeValues = try reader["AttributeValues"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AttributeValue", isFlattened: false) + return value } } } @@ -14571,7 +10756,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.DBClusterSnapshotAttributesResult: Swift.Codable { +extension RDSClientTypes.DBClusterSnapshotAttributesResult: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterSnapshotAttributes = "DBClusterSnapshotAttributes" case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" @@ -14596,28 +10781,13 @@ extension RDSClientTypes.DBClusterSnapshotAttributesResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - if containerValues.contains(.dbClusterSnapshotAttributes) { - struct KeyVal0{struct DBClusterSnapshotAttribute{}} - let dbClusterSnapshotAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterSnapshotAttributes) - if let dbClusterSnapshotAttributesWrappedContainer = dbClusterSnapshotAttributesWrappedContainer { - let dbClusterSnapshotAttributesContainer = try dbClusterSnapshotAttributesWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterSnapshotAttribute].self, forKey: .member) - var dbClusterSnapshotAttributesBuffer:[RDSClientTypes.DBClusterSnapshotAttribute]? = nil - if let dbClusterSnapshotAttributesContainer = dbClusterSnapshotAttributesContainer { - dbClusterSnapshotAttributesBuffer = [RDSClientTypes.DBClusterSnapshotAttribute]() - for structureContainer0 in dbClusterSnapshotAttributesContainer { - dbClusterSnapshotAttributesBuffer?.append(structureContainer0) - } - } - dbClusterSnapshotAttributes = dbClusterSnapshotAttributesBuffer - } else { - dbClusterSnapshotAttributes = [] - } - } else { - dbClusterSnapshotAttributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterSnapshotAttributesResult() + value.dbClusterSnapshotIdentifier = try reader["DBClusterSnapshotIdentifier"].readIfPresent() + value.dbClusterSnapshotAttributes = try reader["DBClusterSnapshotAttributes"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterSnapshotAttribute.readingClosure, memberNodeInfo: "DBClusterSnapshotAttribute", isFlattened: false) + return value } } } @@ -14643,16 +10813,14 @@ extension RDSClientTypes { } extension DBClusterSnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBClusterSnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14680,23 +10848,7 @@ public struct DBClusterSnapshotNotFoundFault: ClientRuntime.ModeledError, AWSCli } } -struct DBClusterSnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBClusterSnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBClusterStatusInfo: Swift.Codable { +extension RDSClientTypes.DBClusterStatusInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case message = "Message" case normal = "Normal" @@ -14720,16 +10872,16 @@ extension RDSClientTypes.DBClusterStatusInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusType) - statusType = statusTypeDecoded - let normalDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .normal) - normal = normalDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBClusterStatusInfo() + value.statusType = try reader["StatusType"].readIfPresent() + value.normal = try reader["Normal"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + return value + } } } @@ -14761,7 +10913,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.DBEngineVersion: Swift.Codable { +extension RDSClientTypes.DBEngineVersion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createTime = "CreateTime" case customDBEngineVersionManifest = "CustomDBEngineVersionManifest" @@ -14982,227 +11134,45 @@ extension RDSClientTypes.DBEngineVersion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let dbEngineDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineDescription) - dbEngineDescription = dbEngineDescriptionDecoded - let dbEngineVersionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionDescription) - dbEngineVersionDescription = dbEngineVersionDescriptionDecoded - let defaultCharacterSetDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CharacterSet.self, forKey: .defaultCharacterSet) - defaultCharacterSet = defaultCharacterSetDecoded - let imageDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CustomDBEngineVersionAMI.self, forKey: .image) - image = imageDecoded - let dbEngineMediaTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineMediaType) - dbEngineMediaType = dbEngineMediaTypeDecoded - if containerValues.contains(.supportedCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCharacterSets) - if let supportedCharacterSetsWrappedContainer = supportedCharacterSetsWrappedContainer { - let supportedCharacterSetsContainer = try supportedCharacterSetsWrappedContainer.decodeIfPresent([RDSClientTypes.CharacterSet].self, forKey: .member) - var supportedCharacterSetsBuffer:[RDSClientTypes.CharacterSet]? = nil - if let supportedCharacterSetsContainer = supportedCharacterSetsContainer { - supportedCharacterSetsBuffer = [RDSClientTypes.CharacterSet]() - for structureContainer0 in supportedCharacterSetsContainer { - supportedCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedCharacterSets = supportedCharacterSetsBuffer - } else { - supportedCharacterSets = [] - } - } else { - supportedCharacterSets = nil - } - if containerValues.contains(.supportedNcharCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedNcharCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedNcharCharacterSets) - if let supportedNcharCharacterSetsWrappedContainer = supportedNcharCharacterSetsWrappedContainer { - let supportedNcharCharacterSetsContainer = try supportedNcharCharacterSetsWrappedContainer.decodeIfPresent([RDSClientTypes.CharacterSet].self, forKey: .member) - var supportedNcharCharacterSetsBuffer:[RDSClientTypes.CharacterSet]? = nil - if let supportedNcharCharacterSetsContainer = supportedNcharCharacterSetsContainer { - supportedNcharCharacterSetsBuffer = [RDSClientTypes.CharacterSet]() - for structureContainer0 in supportedNcharCharacterSetsContainer { - supportedNcharCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedNcharCharacterSets = supportedNcharCharacterSetsBuffer - } else { - supportedNcharCharacterSets = [] - } - } else { - supportedNcharCharacterSets = nil - } - if containerValues.contains(.validUpgradeTarget) { - struct KeyVal0{struct UpgradeTarget{}} - let validUpgradeTargetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validUpgradeTarget) - if let validUpgradeTargetWrappedContainer = validUpgradeTargetWrappedContainer { - let validUpgradeTargetContainer = try validUpgradeTargetWrappedContainer.decodeIfPresent([RDSClientTypes.UpgradeTarget].self, forKey: .member) - var validUpgradeTargetBuffer:[RDSClientTypes.UpgradeTarget]? = nil - if let validUpgradeTargetContainer = validUpgradeTargetContainer { - validUpgradeTargetBuffer = [RDSClientTypes.UpgradeTarget]() - for structureContainer0 in validUpgradeTargetContainer { - validUpgradeTargetBuffer?.append(structureContainer0) - } - } - validUpgradeTarget = validUpgradeTargetBuffer - } else { - validUpgradeTarget = [] - } - } else { - validUpgradeTarget = nil - } - if containerValues.contains(.supportedTimezones) { - struct KeyVal0{struct Timezone{}} - let supportedTimezonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedTimezones) - if let supportedTimezonesWrappedContainer = supportedTimezonesWrappedContainer { - let supportedTimezonesContainer = try supportedTimezonesWrappedContainer.decodeIfPresent([RDSClientTypes.Timezone].self, forKey: .member) - var supportedTimezonesBuffer:[RDSClientTypes.Timezone]? = nil - if let supportedTimezonesContainer = supportedTimezonesContainer { - supportedTimezonesBuffer = [RDSClientTypes.Timezone]() - for structureContainer0 in supportedTimezonesContainer { - supportedTimezonesBuffer?.append(structureContainer0) - } - } - supportedTimezones = supportedTimezonesBuffer - } else { - supportedTimezones = [] - } - } else { - supportedTimezones = nil - } - if containerValues.contains(.exportableLogTypes) { - struct KeyVal0{struct member{}} - let exportableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportableLogTypes) - if let exportableLogTypesWrappedContainer = exportableLogTypesWrappedContainer { - let exportableLogTypesContainer = try exportableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportableLogTypesBuffer:[Swift.String]? = nil - if let exportableLogTypesContainer = exportableLogTypesContainer { - exportableLogTypesBuffer = [Swift.String]() - for stringContainer0 in exportableLogTypesContainer { - exportableLogTypesBuffer?.append(stringContainer0) - } - } - exportableLogTypes = exportableLogTypesBuffer - } else { - exportableLogTypes = [] - } - } else { - exportableLogTypes = nil - } - let supportsLogExportsToCloudwatchLogsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLogExportsToCloudwatchLogs) - supportsLogExportsToCloudwatchLogs = supportsLogExportsToCloudwatchLogsDecoded - let supportsReadReplicaDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsReadReplica) - supportsReadReplica = supportsReadReplicaDecoded - if containerValues.contains(.supportedEngineModes) { - struct KeyVal0{struct member{}} - let supportedEngineModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedEngineModes) - if let supportedEngineModesWrappedContainer = supportedEngineModesWrappedContainer { - let supportedEngineModesContainer = try supportedEngineModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedEngineModesBuffer:[Swift.String]? = nil - if let supportedEngineModesContainer = supportedEngineModesContainer { - supportedEngineModesBuffer = [Swift.String]() - for stringContainer0 in supportedEngineModesContainer { - supportedEngineModesBuffer?.append(stringContainer0) - } - } - supportedEngineModes = supportedEngineModesBuffer - } else { - supportedEngineModes = [] - } - } else { - supportedEngineModes = nil - } - if containerValues.contains(.supportedFeatureNames) { - struct KeyVal0{struct member{}} - let supportedFeatureNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedFeatureNames) - if let supportedFeatureNamesWrappedContainer = supportedFeatureNamesWrappedContainer { - let supportedFeatureNamesContainer = try supportedFeatureNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedFeatureNamesBuffer:[Swift.String]? = nil - if let supportedFeatureNamesContainer = supportedFeatureNamesContainer { - supportedFeatureNamesBuffer = [Swift.String]() - for stringContainer0 in supportedFeatureNamesContainer { - supportedFeatureNamesBuffer?.append(stringContainer0) - } - } - supportedFeatureNames = supportedFeatureNamesBuffer - } else { - supportedFeatureNames = [] - } - } else { - supportedFeatureNames = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let supportsParallelQueryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsParallelQuery) - supportsParallelQuery = supportsParallelQueryDecoded - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - let databaseInstallationFilesS3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3BucketName) - databaseInstallationFilesS3BucketName = databaseInstallationFilesS3BucketNameDecoded - let databaseInstallationFilesS3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3Prefix) - databaseInstallationFilesS3Prefix = databaseInstallationFilesS3PrefixDecoded - let dbEngineVersionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionArn) - dbEngineVersionArn = dbEngineVersionArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil - } - let supportsBabelfishDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsBabelfish) - supportsBabelfish = supportsBabelfishDecoded - let customDBEngineVersionManifestDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDBEngineVersionManifest) - customDBEngineVersionManifest = customDBEngineVersionManifestDecoded - let supportsCertificateRotationWithoutRestartDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsCertificateRotationWithoutRestart) - supportsCertificateRotationWithoutRestart = supportsCertificateRotationWithoutRestartDecoded - if containerValues.contains(.supportedCACertificateIdentifiers) { - struct KeyVal0{struct member{}} - let supportedCACertificateIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCACertificateIdentifiers) - if let supportedCACertificateIdentifiersWrappedContainer = supportedCACertificateIdentifiersWrappedContainer { - let supportedCACertificateIdentifiersContainer = try supportedCACertificateIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedCACertificateIdentifiersBuffer:[Swift.String]? = nil - if let supportedCACertificateIdentifiersContainer = supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer = [Swift.String]() - for stringContainer0 in supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer?.append(stringContainer0) - } - } - supportedCACertificateIdentifiers = supportedCACertificateIdentifiersBuffer - } else { - supportedCACertificateIdentifiers = [] - } - } else { - supportedCACertificateIdentifiers = nil - } - let supportsLocalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLocalWriteForwarding) - supportsLocalWriteForwarding = supportsLocalWriteForwardingDecoded - let supportsIntegrationsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIntegrations) - supportsIntegrations = supportsIntegrationsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBEngineVersion() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.dbEngineDescription = try reader["DBEngineDescription"].readIfPresent() + value.dbEngineVersionDescription = try reader["DBEngineVersionDescription"].readIfPresent() + value.defaultCharacterSet = try reader["DefaultCharacterSet"].readIfPresent(readingClosure: RDSClientTypes.CharacterSet.readingClosure) + value.image = try reader["Image"].readIfPresent(readingClosure: RDSClientTypes.CustomDBEngineVersionAMI.readingClosure) + value.dbEngineMediaType = try reader["DBEngineMediaType"].readIfPresent() + value.supportedCharacterSets = try reader["SupportedCharacterSets"].readListIfPresent(memberReadingClosure: RDSClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.supportedNcharCharacterSets = try reader["SupportedNcharCharacterSets"].readListIfPresent(memberReadingClosure: RDSClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.validUpgradeTarget = try reader["ValidUpgradeTarget"].readListIfPresent(memberReadingClosure: RDSClientTypes.UpgradeTarget.readingClosure, memberNodeInfo: "UpgradeTarget", isFlattened: false) + value.supportedTimezones = try reader["SupportedTimezones"].readListIfPresent(memberReadingClosure: RDSClientTypes.Timezone.readingClosure, memberNodeInfo: "Timezone", isFlattened: false) + value.exportableLogTypes = try reader["ExportableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsLogExportsToCloudwatchLogs = try reader["SupportsLogExportsToCloudwatchLogs"].readIfPresent() + value.supportsReadReplica = try reader["SupportsReadReplica"].readIfPresent() + value.supportedEngineModes = try reader["SupportedEngineModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedFeatureNames = try reader["SupportedFeatureNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.supportsParallelQuery = try reader["SupportsParallelQuery"].readIfPresent() + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + value.majorEngineVersion = try reader["MajorEngineVersion"].readIfPresent() + value.databaseInstallationFilesS3BucketName = try reader["DatabaseInstallationFilesS3BucketName"].readIfPresent() + value.databaseInstallationFilesS3Prefix = try reader["DatabaseInstallationFilesS3Prefix"].readIfPresent() + value.dbEngineVersionArn = try reader["DBEngineVersionArn"].readIfPresent() + value.kmsKeyId = try reader["KMSKeyId"].readIfPresent() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.supportsBabelfish = try reader["SupportsBabelfish"].readIfPresent() + value.customDBEngineVersionManifest = try reader["CustomDBEngineVersionManifest"].readIfPresent() + value.supportsCertificateRotationWithoutRestart = try reader["SupportsCertificateRotationWithoutRestart"].readIfPresent() + value.supportedCACertificateIdentifiers = try reader["SupportedCACertificateIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsLocalWriteForwarding = try reader["SupportsLocalWriteForwarding"].readIfPresent() + value.supportsIntegrations = try reader["SupportsIntegrations"].readIfPresent() + return value + } } } @@ -15350,7 +11320,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.DBInstance: Swift.Codable { +extension RDSClientTypes.DBInstance: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case activityStreamEngineNativeAuditFieldsIncluded = "ActivityStreamEngineNativeAuditFieldsIncluded" case activityStreamKinesisStreamName = "ActivityStreamKinesisStreamName" @@ -15815,399 +11785,97 @@ extension RDSClientTypes.DBInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let dbInstanceStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceStatus) - dbInstanceStatus = dbInstanceStatusDecoded - let automaticRestartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .automaticRestartTime) - automaticRestartTime = automaticRestartTimeDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let endpointDecoded = try containerValues.decodeIfPresent(RDSClientTypes.Endpoint.self, forKey: .endpoint) - endpoint = endpointDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let instanceCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .instanceCreateTime) - instanceCreateTime = instanceCreateTimeDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - if containerValues.contains(.dbSecurityGroups) { - struct KeyVal0{struct DBSecurityGroup{}} - let dbSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroups) - if let dbSecurityGroupsWrappedContainer = dbSecurityGroupsWrappedContainer { - let dbSecurityGroupsContainer = try dbSecurityGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBSecurityGroupMembership].self, forKey: .member) - var dbSecurityGroupsBuffer:[RDSClientTypes.DBSecurityGroupMembership]? = nil - if let dbSecurityGroupsContainer = dbSecurityGroupsContainer { - dbSecurityGroupsBuffer = [RDSClientTypes.DBSecurityGroupMembership]() - for structureContainer0 in dbSecurityGroupsContainer { - dbSecurityGroupsBuffer?.append(structureContainer0) - } - } - dbSecurityGroups = dbSecurityGroupsBuffer - } else { - dbSecurityGroups = [] - } - } else { - dbSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroupMembership{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[RDSClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [RDSClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] - } - } else { - vpcSecurityGroups = nil - } - if containerValues.contains(.dbParameterGroups) { - struct KeyVal0{struct DBParameterGroup{}} - let dbParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbParameterGroups) - if let dbParameterGroupsWrappedContainer = dbParameterGroupsWrappedContainer { - let dbParameterGroupsContainer = try dbParameterGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBParameterGroupStatus].self, forKey: .member) - var dbParameterGroupsBuffer:[RDSClientTypes.DBParameterGroupStatus]? = nil - if let dbParameterGroupsContainer = dbParameterGroupsContainer { - dbParameterGroupsBuffer = [RDSClientTypes.DBParameterGroupStatus]() - for structureContainer0 in dbParameterGroupsContainer { - dbParameterGroupsBuffer?.append(structureContainer0) - } - } - dbParameterGroups = dbParameterGroupsBuffer - } else { - dbParameterGroups = [] - } - } else { - dbParameterGroups = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(RDSClientTypes.PendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - let latestRestorableTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestRestorableTime) - latestRestorableTime = latestRestorableTimeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let readReplicaSourceDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .readReplicaSourceDBInstanceIdentifier) - readReplicaSourceDBInstanceIdentifier = readReplicaSourceDBInstanceIdentifierDecoded - if containerValues.contains(.readReplicaDBInstanceIdentifiers) { - struct KeyVal0{struct ReadReplicaDBInstanceIdentifier{}} - let readReplicaDBInstanceIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readReplicaDBInstanceIdentifiers) - if let readReplicaDBInstanceIdentifiersWrappedContainer = readReplicaDBInstanceIdentifiersWrappedContainer { - let readReplicaDBInstanceIdentifiersContainer = try readReplicaDBInstanceIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readReplicaDBInstanceIdentifiersBuffer:[Swift.String]? = nil - if let readReplicaDBInstanceIdentifiersContainer = readReplicaDBInstanceIdentifiersContainer { - readReplicaDBInstanceIdentifiersBuffer = [Swift.String]() - for stringContainer0 in readReplicaDBInstanceIdentifiersContainer { - readReplicaDBInstanceIdentifiersBuffer?.append(stringContainer0) - } - } - readReplicaDBInstanceIdentifiers = readReplicaDBInstanceIdentifiersBuffer - } else { - readReplicaDBInstanceIdentifiers = [] - } - } else { - readReplicaDBInstanceIdentifiers = nil - } - if containerValues.contains(.readReplicaDBClusterIdentifiers) { - struct KeyVal0{struct ReadReplicaDBClusterIdentifier{}} - let readReplicaDBClusterIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readReplicaDBClusterIdentifiers) - if let readReplicaDBClusterIdentifiersWrappedContainer = readReplicaDBClusterIdentifiersWrappedContainer { - let readReplicaDBClusterIdentifiersContainer = try readReplicaDBClusterIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readReplicaDBClusterIdentifiersBuffer:[Swift.String]? = nil - if let readReplicaDBClusterIdentifiersContainer = readReplicaDBClusterIdentifiersContainer { - readReplicaDBClusterIdentifiersBuffer = [Swift.String]() - for stringContainer0 in readReplicaDBClusterIdentifiersContainer { - readReplicaDBClusterIdentifiersBuffer?.append(stringContainer0) - } - } - readReplicaDBClusterIdentifiers = readReplicaDBClusterIdentifiersBuffer - } else { - readReplicaDBClusterIdentifiers = [] - } - } else { - readReplicaDBClusterIdentifiers = nil - } - let replicaModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ReplicaMode.self, forKey: .replicaMode) - replicaMode = replicaModeDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - if containerValues.contains(.optionGroupMemberships) { - struct KeyVal0{struct OptionGroupMembership{}} - let optionGroupMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionGroupMemberships) - if let optionGroupMembershipsWrappedContainer = optionGroupMembershipsWrappedContainer { - let optionGroupMembershipsContainer = try optionGroupMembershipsWrappedContainer.decodeIfPresent([RDSClientTypes.OptionGroupMembership].self, forKey: .member) - var optionGroupMembershipsBuffer:[RDSClientTypes.OptionGroupMembership]? = nil - if let optionGroupMembershipsContainer = optionGroupMembershipsContainer { - optionGroupMembershipsBuffer = [RDSClientTypes.OptionGroupMembership]() - for structureContainer0 in optionGroupMembershipsContainer { - optionGroupMembershipsBuffer?.append(structureContainer0) - } - } - optionGroupMemberships = optionGroupMembershipsBuffer - } else { - optionGroupMemberships = [] - } - } else { - optionGroupMemberships = nil - } - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let ncharCharacterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ncharCharacterSetName) - ncharCharacterSetName = ncharCharacterSetNameDecoded - let secondaryAvailabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secondaryAvailabilityZone) - secondaryAvailabilityZone = secondaryAvailabilityZoneDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - if containerValues.contains(.statusInfos) { - struct KeyVal0{struct DBInstanceStatusInfo{}} - let statusInfosWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .statusInfos) - if let statusInfosWrappedContainer = statusInfosWrappedContainer { - let statusInfosContainer = try statusInfosWrappedContainer.decodeIfPresent([RDSClientTypes.DBInstanceStatusInfo].self, forKey: .member) - var statusInfosBuffer:[RDSClientTypes.DBInstanceStatusInfo]? = nil - if let statusInfosContainer = statusInfosContainer { - statusInfosBuffer = [RDSClientTypes.DBInstanceStatusInfo]() - for structureContainer0 in statusInfosContainer { - statusInfosBuffer?.append(structureContainer0) - } - } - statusInfos = statusInfosBuffer - } else { - statusInfos = [] - } - } else { - statusInfos = nil - } - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let dbInstancePortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dbInstancePort) - dbInstancePort = dbInstancePortDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - if containerValues.contains(.domainMemberships) { - struct KeyVal0{struct DomainMembership{}} - let domainMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainMemberships) - if let domainMembershipsWrappedContainer = domainMembershipsWrappedContainer { - let domainMembershipsContainer = try domainMembershipsWrappedContainer.decodeIfPresent([RDSClientTypes.DomainMembership].self, forKey: .member) - var domainMembershipsBuffer:[RDSClientTypes.DomainMembership]? = nil - if let domainMembershipsContainer = domainMembershipsContainer { - domainMembershipsBuffer = [RDSClientTypes.DomainMembership]() - for structureContainer0 in domainMembershipsContainer { - domainMembershipsBuffer?.append(structureContainer0) - } - } - domainMemberships = domainMembershipsBuffer - } else { - domainMemberships = [] - } - } else { - domainMemberships = nil - } - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let enhancedMonitoringResourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .enhancedMonitoringResourceArn) - enhancedMonitoringResourceArn = enhancedMonitoringResourceArnDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let dbInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceArn) - dbInstanceArn = dbInstanceArnDecoded - let timezoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezone) - timezone = timezoneDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let performanceInsightsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .performanceInsightsEnabled) - performanceInsightsEnabled = performanceInsightsEnabledDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let performanceInsightsRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .performanceInsightsRetentionPeriod) - performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriodDecoded - if containerValues.contains(.enabledCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enabledCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enabledCloudwatchLogsExports) - if let enabledCloudwatchLogsExportsWrappedContainer = enabledCloudwatchLogsExportsWrappedContainer { - let enabledCloudwatchLogsExportsContainer = try enabledCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enabledCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enabledCloudwatchLogsExportsContainer = enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enabledCloudwatchLogsExportsContainer { - enabledCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enabledCloudwatchLogsExports = enabledCloudwatchLogsExportsBuffer - } else { - enabledCloudwatchLogsExports = [] - } - } else { - enabledCloudwatchLogsExports = nil - } - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - if containerValues.contains(.associatedRoles) { - struct KeyVal0{struct DBInstanceRole{}} - let associatedRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedRoles) - if let associatedRolesWrappedContainer = associatedRolesWrappedContainer { - let associatedRolesContainer = try associatedRolesWrappedContainer.decodeIfPresent([RDSClientTypes.DBInstanceRole].self, forKey: .member) - var associatedRolesBuffer:[RDSClientTypes.DBInstanceRole]? = nil - if let associatedRolesContainer = associatedRolesContainer { - associatedRolesBuffer = [RDSClientTypes.DBInstanceRole]() - for structureContainer0 in associatedRolesContainer { - associatedRolesBuffer?.append(structureContainer0) - } - } - associatedRoles = associatedRolesBuffer - } else { - associatedRoles = [] - } - } else { - associatedRoles = nil - } - let listenerEndpointDecoded = try containerValues.decodeIfPresent(RDSClientTypes.Endpoint.self, forKey: .listenerEndpoint) - listenerEndpoint = listenerEndpointDecoded - let maxAllocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAllocatedStorage) - maxAllocatedStorage = maxAllocatedStorageDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil - } - if containerValues.contains(.dbInstanceAutomatedBackupsReplications) { - struct KeyVal0{struct DBInstanceAutomatedBackupsReplication{}} - let dbInstanceAutomatedBackupsReplicationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbInstanceAutomatedBackupsReplications) - if let dbInstanceAutomatedBackupsReplicationsWrappedContainer = dbInstanceAutomatedBackupsReplicationsWrappedContainer { - let dbInstanceAutomatedBackupsReplicationsContainer = try dbInstanceAutomatedBackupsReplicationsWrappedContainer.decodeIfPresent([RDSClientTypes.DBInstanceAutomatedBackupsReplication].self, forKey: .member) - var dbInstanceAutomatedBackupsReplicationsBuffer:[RDSClientTypes.DBInstanceAutomatedBackupsReplication]? = nil - if let dbInstanceAutomatedBackupsReplicationsContainer = dbInstanceAutomatedBackupsReplicationsContainer { - dbInstanceAutomatedBackupsReplicationsBuffer = [RDSClientTypes.DBInstanceAutomatedBackupsReplication]() - for structureContainer0 in dbInstanceAutomatedBackupsReplicationsContainer { - dbInstanceAutomatedBackupsReplicationsBuffer?.append(structureContainer0) - } - } - dbInstanceAutomatedBackupsReplications = dbInstanceAutomatedBackupsReplicationsBuffer - } else { - dbInstanceAutomatedBackupsReplications = [] - } - } else { - dbInstanceAutomatedBackupsReplications = nil - } - let customerOwnedIpEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .customerOwnedIpEnabled) - customerOwnedIpEnabled = customerOwnedIpEnabledDecoded - let awsBackupRecoveryPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsBackupRecoveryPointArn) - awsBackupRecoveryPointArn = awsBackupRecoveryPointArnDecoded - let activityStreamStatusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamStatus.self, forKey: .activityStreamStatus) - activityStreamStatus = activityStreamStatusDecoded - let activityStreamKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .activityStreamKmsKeyId) - activityStreamKmsKeyId = activityStreamKmsKeyIdDecoded - let activityStreamKinesisStreamNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .activityStreamKinesisStreamName) - activityStreamKinesisStreamName = activityStreamKinesisStreamNameDecoded - let activityStreamModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamMode.self, forKey: .activityStreamMode) - activityStreamMode = activityStreamModeDecoded - let activityStreamEngineNativeAuditFieldsIncludedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .activityStreamEngineNativeAuditFieldsIncluded) - activityStreamEngineNativeAuditFieldsIncluded = activityStreamEngineNativeAuditFieldsIncludedDecoded - let automationModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.AutomationMode.self, forKey: .automationMode) - automationMode = automationModeDecoded - let resumeFullAutomationModeTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .resumeFullAutomationModeTime) - resumeFullAutomationModeTime = resumeFullAutomationModeTimeDecoded - let customIamInstanceProfileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customIamInstanceProfile) - customIamInstanceProfile = customIamInstanceProfileDecoded - let backupTargetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .backupTarget) - backupTarget = backupTargetDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let activityStreamPolicyStatusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamPolicyStatus.self, forKey: .activityStreamPolicyStatus) - activityStreamPolicyStatus = activityStreamPolicyStatusDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let dbSystemIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSystemId) - dbSystemId = dbSystemIdDecoded - let masterUserSecretDecoded = try containerValues.decodeIfPresent(RDSClientTypes.MasterUserSecret.self, forKey: .masterUserSecret) - masterUserSecret = masterUserSecretDecoded - let certificateDetailsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CertificateDetails.self, forKey: .certificateDetails) - certificateDetails = certificateDetailsDecoded - let readReplicaSourceDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .readReplicaSourceDBClusterIdentifier) - readReplicaSourceDBClusterIdentifier = readReplicaSourceDBClusterIdentifierDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - let isStorageConfigUpgradeAvailableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isStorageConfigUpgradeAvailable) - isStorageConfigUpgradeAvailable = isStorageConfigUpgradeAvailableDecoded - let multiTenantDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiTenant) - multiTenant = multiTenantDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBInstance() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.dbInstanceStatus = try reader["DBInstanceStatus"].readIfPresent() + value.automaticRestartTime = try reader["AutomaticRestartTime"].readTimestampIfPresent(format: .dateTime) + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.dbName = try reader["DBName"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent(readingClosure: RDSClientTypes.Endpoint.readingClosure) + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.instanceCreateTime = try reader["InstanceCreateTime"].readTimestampIfPresent(format: .dateTime) + value.preferredBackupWindow = try reader["PreferredBackupWindow"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.dbSecurityGroups = try reader["DBSecurityGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBSecurityGroupMembership.readingClosure, memberNodeInfo: "DBSecurityGroup", isFlattened: false) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroupMembership", isFlattened: false) + value.dbParameterGroups = try reader["DBParameterGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBParameterGroupStatus.readingClosure, memberNodeInfo: "DBParameterGroup", isFlattened: false) + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: RDSClientTypes.DBSubnetGroup.readingClosure) + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: RDSClientTypes.PendingModifiedValues.readingClosure) + value.latestRestorableTime = try reader["LatestRestorableTime"].readTimestampIfPresent(format: .dateTime) + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.autoMinorVersionUpgrade = try reader["AutoMinorVersionUpgrade"].readIfPresent() + value.readReplicaSourceDBInstanceIdentifier = try reader["ReadReplicaSourceDBInstanceIdentifier"].readIfPresent() + value.readReplicaDBInstanceIdentifiers = try reader["ReadReplicaDBInstanceIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ReadReplicaDBInstanceIdentifier", isFlattened: false) + value.readReplicaDBClusterIdentifiers = try reader["ReadReplicaDBClusterIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ReadReplicaDBClusterIdentifier", isFlattened: false) + value.replicaMode = try reader["ReplicaMode"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.optionGroupMemberships = try reader["OptionGroupMemberships"].readListIfPresent(memberReadingClosure: RDSClientTypes.OptionGroupMembership.readingClosure, memberNodeInfo: "OptionGroupMembership", isFlattened: false) + value.characterSetName = try reader["CharacterSetName"].readIfPresent() + value.ncharCharacterSetName = try reader["NcharCharacterSetName"].readIfPresent() + value.secondaryAvailabilityZone = try reader["SecondaryAvailabilityZone"].readIfPresent() + value.publiclyAccessible = try reader["PubliclyAccessible"].readIfPresent() + value.statusInfos = try reader["StatusInfos"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBInstanceStatusInfo.readingClosure, memberNodeInfo: "DBInstanceStatusInfo", isFlattened: false) + value.storageType = try reader["StorageType"].readIfPresent() + value.tdeCredentialArn = try reader["TdeCredentialArn"].readIfPresent() + value.dbInstancePort = try reader["DbInstancePort"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbiResourceId = try reader["DbiResourceId"].readIfPresent() + value.caCertificateIdentifier = try reader["CACertificateIdentifier"].readIfPresent() + value.domainMemberships = try reader["DomainMemberships"].readListIfPresent(memberReadingClosure: RDSClientTypes.DomainMembership.readingClosure, memberNodeInfo: "DomainMembership", isFlattened: false) + value.copyTagsToSnapshot = try reader["CopyTagsToSnapshot"].readIfPresent() + value.monitoringInterval = try reader["MonitoringInterval"].readIfPresent() + value.enhancedMonitoringResourceArn = try reader["EnhancedMonitoringResourceArn"].readIfPresent() + value.monitoringRoleArn = try reader["MonitoringRoleArn"].readIfPresent() + value.promotionTier = try reader["PromotionTier"].readIfPresent() + value.dbInstanceArn = try reader["DBInstanceArn"].readIfPresent() + value.timezone = try reader["Timezone"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.performanceInsightsEnabled = try reader["PerformanceInsightsEnabled"].readIfPresent() + value.performanceInsightsKMSKeyId = try reader["PerformanceInsightsKMSKeyId"].readIfPresent() + value.performanceInsightsRetentionPeriod = try reader["PerformanceInsightsRetentionPeriod"].readIfPresent() + value.enabledCloudwatchLogsExports = try reader["EnabledCloudwatchLogsExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.processorFeatures = try reader["ProcessorFeatures"].readListIfPresent(memberReadingClosure: RDSClientTypes.ProcessorFeature.readingClosure, memberNodeInfo: "ProcessorFeature", isFlattened: false) + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + value.associatedRoles = try reader["AssociatedRoles"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBInstanceRole.readingClosure, memberNodeInfo: "DBInstanceRole", isFlattened: false) + value.listenerEndpoint = try reader["ListenerEndpoint"].readIfPresent(readingClosure: RDSClientTypes.Endpoint.readingClosure) + value.maxAllocatedStorage = try reader["MaxAllocatedStorage"].readIfPresent() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.dbInstanceAutomatedBackupsReplications = try reader["DBInstanceAutomatedBackupsReplications"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBInstanceAutomatedBackupsReplication.readingClosure, memberNodeInfo: "DBInstanceAutomatedBackupsReplication", isFlattened: false) + value.customerOwnedIpEnabled = try reader["CustomerOwnedIpEnabled"].readIfPresent() + value.awsBackupRecoveryPointArn = try reader["AwsBackupRecoveryPointArn"].readIfPresent() + value.activityStreamStatus = try reader["ActivityStreamStatus"].readIfPresent() + value.activityStreamKmsKeyId = try reader["ActivityStreamKmsKeyId"].readIfPresent() + value.activityStreamKinesisStreamName = try reader["ActivityStreamKinesisStreamName"].readIfPresent() + value.activityStreamMode = try reader["ActivityStreamMode"].readIfPresent() + value.activityStreamEngineNativeAuditFieldsIncluded = try reader["ActivityStreamEngineNativeAuditFieldsIncluded"].readIfPresent() + value.automationMode = try reader["AutomationMode"].readIfPresent() + value.resumeFullAutomationModeTime = try reader["ResumeFullAutomationModeTime"].readTimestampIfPresent(format: .dateTime) + value.customIamInstanceProfile = try reader["CustomIamInstanceProfile"].readIfPresent() + value.backupTarget = try reader["BackupTarget"].readIfPresent() + value.networkType = try reader["NetworkType"].readIfPresent() + value.activityStreamPolicyStatus = try reader["ActivityStreamPolicyStatus"].readIfPresent() + value.storageThroughput = try reader["StorageThroughput"].readIfPresent() + value.dbSystemId = try reader["DBSystemId"].readIfPresent() + value.masterUserSecret = try reader["MasterUserSecret"].readIfPresent(readingClosure: RDSClientTypes.MasterUserSecret.readingClosure) + value.certificateDetails = try reader["CertificateDetails"].readIfPresent(readingClosure: RDSClientTypes.CertificateDetails.readingClosure) + value.readReplicaSourceDBClusterIdentifier = try reader["ReadReplicaSourceDBClusterIdentifier"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.dedicatedLogVolume = try reader["DedicatedLogVolume"].readIfPresent() + value.isStorageConfigUpgradeAvailable = try reader["IsStorageConfigUpgradeAvailable"].readIfPresent() + value.multiTenant = try reader["MultiTenant"].readIfPresent() + return value + } } } @@ -16582,16 +12250,14 @@ extension RDSClientTypes { } extension DBInstanceAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16619,23 +12285,7 @@ public struct DBInstanceAlreadyExistsFault: ClientRuntime.ModeledError, AWSClien } } -struct DBInstanceAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBInstanceAutomatedBackup: Swift.Codable { +extension RDSClientTypes.DBInstanceAutomatedBackup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case availabilityZone = "AvailabilityZone" @@ -16776,87 +12426,43 @@ extension RDSClientTypes.DBInstanceAutomatedBackup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceArn) - dbInstanceArn = dbInstanceArnDecoded - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let restoreWindowDecoded = try containerValues.decodeIfPresent(RDSClientTypes.RestoreWindow.self, forKey: .restoreWindow) - restoreWindow = restoreWindowDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let instanceCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .instanceCreateTime) - instanceCreateTime = instanceCreateTimeDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let timezoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezone) - timezone = timezoneDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let dbInstanceAutomatedBackupsArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceAutomatedBackupsArn) - dbInstanceAutomatedBackupsArn = dbInstanceAutomatedBackupsArnDecoded - if containerValues.contains(.dbInstanceAutomatedBackupsReplications) { - struct KeyVal0{struct DBInstanceAutomatedBackupsReplication{}} - let dbInstanceAutomatedBackupsReplicationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbInstanceAutomatedBackupsReplications) - if let dbInstanceAutomatedBackupsReplicationsWrappedContainer = dbInstanceAutomatedBackupsReplicationsWrappedContainer { - let dbInstanceAutomatedBackupsReplicationsContainer = try dbInstanceAutomatedBackupsReplicationsWrappedContainer.decodeIfPresent([RDSClientTypes.DBInstanceAutomatedBackupsReplication].self, forKey: .member) - var dbInstanceAutomatedBackupsReplicationsBuffer:[RDSClientTypes.DBInstanceAutomatedBackupsReplication]? = nil - if let dbInstanceAutomatedBackupsReplicationsContainer = dbInstanceAutomatedBackupsReplicationsContainer { - dbInstanceAutomatedBackupsReplicationsBuffer = [RDSClientTypes.DBInstanceAutomatedBackupsReplication]() - for structureContainer0 in dbInstanceAutomatedBackupsReplicationsContainer { - dbInstanceAutomatedBackupsReplicationsBuffer?.append(structureContainer0) - } - } - dbInstanceAutomatedBackupsReplications = dbInstanceAutomatedBackupsReplicationsBuffer - } else { - dbInstanceAutomatedBackupsReplications = [] - } - } else { - dbInstanceAutomatedBackupsReplications = nil - } - let backupTargetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .backupTarget) - backupTarget = backupTargetDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let awsBackupRecoveryPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsBackupRecoveryPointArn) - awsBackupRecoveryPointArn = awsBackupRecoveryPointArnDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - let multiTenantDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiTenant) - multiTenant = multiTenantDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBInstanceAutomatedBackup() + value.dbInstanceArn = try reader["DBInstanceArn"].readIfPresent() + value.dbiResourceId = try reader["DbiResourceId"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.restoreWindow = try reader["RestoreWindow"].readIfPresent(readingClosure: RDSClientTypes.RestoreWindow.readingClosure) + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.instanceCreateTime = try reader["InstanceCreateTime"].readTimestampIfPresent(format: .dateTime) + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.optionGroupName = try reader["OptionGroupName"].readIfPresent() + value.tdeCredentialArn = try reader["TdeCredentialArn"].readIfPresent() + value.encrypted = try reader["Encrypted"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.timezone = try reader["Timezone"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.dbInstanceAutomatedBackupsArn = try reader["DBInstanceAutomatedBackupsArn"].readIfPresent() + value.dbInstanceAutomatedBackupsReplications = try reader["DBInstanceAutomatedBackupsReplications"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBInstanceAutomatedBackupsReplication.readingClosure, memberNodeInfo: "DBInstanceAutomatedBackupsReplication", isFlattened: false) + value.backupTarget = try reader["BackupTarget"].readIfPresent() + value.storageThroughput = try reader["StorageThroughput"].readIfPresent() + value.awsBackupRecoveryPointArn = try reader["AwsBackupRecoveryPointArn"].readIfPresent() + value.dedicatedLogVolume = try reader["DedicatedLogVolume"].readIfPresent() + value.multiTenant = try reader["MultiTenant"].readIfPresent() + return value + } } } @@ -17003,16 +12609,14 @@ extension RDSClientTypes { } extension DBInstanceAutomatedBackupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceAutomatedBackupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17040,33 +12644,15 @@ public struct DBInstanceAutomatedBackupNotFoundFault: ClientRuntime.ModeledError } } -struct DBInstanceAutomatedBackupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceAutomatedBackupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBInstanceAutomatedBackupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceAutomatedBackupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17094,23 +12680,7 @@ public struct DBInstanceAutomatedBackupQuotaExceededFault: ClientRuntime.Modeled } } -struct DBInstanceAutomatedBackupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceAutomatedBackupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBInstanceAutomatedBackupsReplication: Swift.Codable { +extension RDSClientTypes.DBInstanceAutomatedBackupsReplication: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbInstanceAutomatedBackupsArn = "DBInstanceAutomatedBackupsArn" } @@ -17122,10 +12692,13 @@ extension RDSClientTypes.DBInstanceAutomatedBackupsReplication: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceAutomatedBackupsArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceAutomatedBackupsArn) - dbInstanceAutomatedBackupsArn = dbInstanceAutomatedBackupsArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBInstanceAutomatedBackupsReplication() + value.dbInstanceAutomatedBackupsArn = try reader["DBInstanceAutomatedBackupsArn"].readIfPresent() + return value + } } } @@ -17146,16 +12719,14 @@ extension RDSClientTypes { } extension DBInstanceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17183,23 +12754,7 @@ public struct DBInstanceNotFoundFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct DBInstanceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBInstanceRole: Swift.Codable { +extension RDSClientTypes.DBInstanceRole: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case featureName = "FeatureName" case roleArn = "RoleArn" @@ -17219,14 +12774,15 @@ extension RDSClientTypes.DBInstanceRole: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBInstanceRole() + value.roleArn = try reader["RoleArn"].readIfPresent() + value.featureName = try reader["FeatureName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -17261,16 +12817,14 @@ extension RDSClientTypes { } extension DBInstanceRoleAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceRoleAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17298,33 +12852,15 @@ public struct DBInstanceRoleAlreadyExistsFault: ClientRuntime.ModeledError, AWSC } } -struct DBInstanceRoleAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceRoleAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBInstanceRoleNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceRoleNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17352,33 +12888,15 @@ public struct DBInstanceRoleNotFoundFault: ClientRuntime.ModeledError, AWSClient } } -struct DBInstanceRoleNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceRoleNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBInstanceRoleQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBInstanceRoleQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17406,23 +12924,7 @@ public struct DBInstanceRoleQuotaExceededFault: ClientRuntime.ModeledError, AWSC } } -struct DBInstanceRoleQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBInstanceRoleQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBInstanceStatusInfo: Swift.Codable { +extension RDSClientTypes.DBInstanceStatusInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case message = "Message" case normal = "Normal" @@ -17446,16 +12948,16 @@ extension RDSClientTypes.DBInstanceStatusInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusType) - statusType = statusTypeDecoded - let normalDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .normal) - normal = normalDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBInstanceStatusInfo() + value.statusType = try reader["StatusType"].readIfPresent() + value.normal = try reader["Normal"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + return value + } } } @@ -17488,16 +12990,14 @@ extension RDSClientTypes { } extension DBLogFileNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBLogFileNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17525,23 +13025,7 @@ public struct DBLogFileNotFoundFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct DBLogFileNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBLogFileNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBParameterGroup: Swift.Codable { +extension RDSClientTypes.DBParameterGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbParameterGroupArn = "DBParameterGroupArn" case dbParameterGroupFamily = "DBParameterGroupFamily" @@ -17565,16 +13049,16 @@ extension RDSClientTypes.DBParameterGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let dbParameterGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupArn) - dbParameterGroupArn = dbParameterGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBParameterGroup() + value.dbParameterGroupName = try reader["DBParameterGroupName"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.dbParameterGroupArn = try reader["DBParameterGroupArn"].readIfPresent() + return value + } } } @@ -17607,16 +13091,14 @@ extension RDSClientTypes { } extension DBParameterGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17644,33 +13126,15 @@ public struct DBParameterGroupAlreadyExistsFault: ClientRuntime.ModeledError, AW } } -struct DBParameterGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBParameterGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17698,33 +13162,15 @@ public struct DBParameterGroupNotFoundFault: ClientRuntime.ModeledError, AWSClie } } -struct DBParameterGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBParameterGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBParameterGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -17752,23 +13198,7 @@ public struct DBParameterGroupQuotaExceededFault: ClientRuntime.ModeledError, AW } } -struct DBParameterGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBParameterGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBParameterGroupStatus: Swift.Codable { +extension RDSClientTypes.DBParameterGroupStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbParameterGroupName = "DBParameterGroupName" case parameterApplyStatus = "ParameterApplyStatus" @@ -17784,12 +13214,14 @@ extension RDSClientTypes.DBParameterGroupStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let parameterApplyStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterApplyStatus) - parameterApplyStatus = parameterApplyStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBParameterGroupStatus() + value.dbParameterGroupName = try reader["DBParameterGroupName"].readIfPresent() + value.parameterApplyStatus = try reader["ParameterApplyStatus"].readIfPresent() + return value + } } } @@ -17825,7 +13257,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.DBProxy: Swift.Codable { +extension RDSClientTypes.DBProxy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case auth = "Auth" case createdDate = "CreatedDate" @@ -17920,89 +13352,27 @@ extension RDSClientTypes.DBProxy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let dbProxyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyArn) - dbProxyArn = dbProxyArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxyStatus.self, forKey: .status) - status = statusDecoded - let engineFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineFamily) - engineFamily = engineFamilyDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct member{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - if containerValues.contains(.vpcSubnetIds) { - struct KeyVal0{struct member{}} - let vpcSubnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSubnetIds) - if let vpcSubnetIdsWrappedContainer = vpcSubnetIdsWrappedContainer { - let vpcSubnetIdsContainer = try vpcSubnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSubnetIdsBuffer:[Swift.String]? = nil - if let vpcSubnetIdsContainer = vpcSubnetIdsContainer { - vpcSubnetIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSubnetIdsContainer { - vpcSubnetIdsBuffer?.append(stringContainer0) - } - } - vpcSubnetIds = vpcSubnetIdsBuffer - } else { - vpcSubnetIds = [] - } - } else { - vpcSubnetIds = nil - } - if containerValues.contains(.auth) { - struct KeyVal0{struct member{}} - let authWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .auth) - if let authWrappedContainer = authWrappedContainer { - let authContainer = try authWrappedContainer.decodeIfPresent([RDSClientTypes.UserAuthConfigInfo].self, forKey: .member) - var authBuffer:[RDSClientTypes.UserAuthConfigInfo]? = nil - if let authContainer = authContainer { - authBuffer = [RDSClientTypes.UserAuthConfigInfo]() - for structureContainer0 in authContainer { - authBuffer?.append(structureContainer0) - } - } - auth = authBuffer - } else { - auth = [] - } - } else { - auth = nil - } - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let requireTLSDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireTLS) - requireTLS = requireTLSDecoded - let idleClientTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .idleClientTimeout) - idleClientTimeout = idleClientTimeoutDecoded - let debugLoggingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .debugLogging) - debugLogging = debugLoggingDecoded - let createdDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdDate) - createdDate = createdDateDecoded - let updatedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updatedDate) - updatedDate = updatedDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBProxy() + value.dbProxyName = try reader["DBProxyName"].readIfPresent() + value.dbProxyArn = try reader["DBProxyArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.engineFamily = try reader["EngineFamily"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.vpcSecurityGroupIds = try reader["VpcSecurityGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.vpcSubnetIds = try reader["VpcSubnetIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.auth = try reader["Auth"].readListIfPresent(memberReadingClosure: RDSClientTypes.UserAuthConfigInfo.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.roleArn = try reader["RoleArn"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.requireTLS = try reader["RequireTLS"].readIfPresent() + value.idleClientTimeout = try reader["IdleClientTimeout"].readIfPresent() + value.debugLogging = try reader["DebugLogging"].readIfPresent() + value.createdDate = try reader["CreatedDate"].readTimestampIfPresent(format: .dateTime) + value.updatedDate = try reader["UpdatedDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -18079,16 +13449,14 @@ extension RDSClientTypes { } extension DBProxyAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18116,23 +13484,7 @@ public struct DBProxyAlreadyExistsFault: ClientRuntime.ModeledError, AWSClientRu } } -struct DBProxyAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBProxyEndpoint: Swift.Codable { +extension RDSClientTypes.DBProxyEndpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createdDate = "CreatedDate" case dbProxyEndpointArn = "DBProxyEndpointArn" @@ -18202,64 +13554,23 @@ extension RDSClientTypes.DBProxyEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyEndpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyEndpointName) - dbProxyEndpointName = dbProxyEndpointNameDecoded - let dbProxyEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyEndpointArn) - dbProxyEndpointArn = dbProxyEndpointArnDecoded - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxyEndpointStatus.self, forKey: .status) - status = statusDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct member{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - if containerValues.contains(.vpcSubnetIds) { - struct KeyVal0{struct member{}} - let vpcSubnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSubnetIds) - if let vpcSubnetIdsWrappedContainer = vpcSubnetIdsWrappedContainer { - let vpcSubnetIdsContainer = try vpcSubnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSubnetIdsBuffer:[Swift.String]? = nil - if let vpcSubnetIdsContainer = vpcSubnetIdsContainer { - vpcSubnetIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSubnetIdsContainer { - vpcSubnetIdsBuffer?.append(stringContainer0) - } - } - vpcSubnetIds = vpcSubnetIdsBuffer - } else { - vpcSubnetIds = [] - } - } else { - vpcSubnetIds = nil - } - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let createdDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdDate) - createdDate = createdDateDecoded - let targetRoleDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxyEndpointTargetRole.self, forKey: .targetRole) - targetRole = targetRoleDecoded - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBProxyEndpoint() + value.dbProxyEndpointName = try reader["DBProxyEndpointName"].readIfPresent() + value.dbProxyEndpointArn = try reader["DBProxyEndpointArn"].readIfPresent() + value.dbProxyName = try reader["DBProxyName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.vpcSecurityGroupIds = try reader["VpcSecurityGroupIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.vpcSubnetIds = try reader["VpcSubnetIds"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.endpoint = try reader["Endpoint"].readIfPresent() + value.createdDate = try reader["CreatedDate"].readTimestampIfPresent(format: .dateTime) + value.targetRole = try reader["TargetRole"].readIfPresent() + value.isDefault = try reader["IsDefault"].readIfPresent() + return value + } } } @@ -18320,16 +13631,14 @@ extension RDSClientTypes { } extension DBProxyEndpointAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyEndpointAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18357,33 +13666,15 @@ public struct DBProxyEndpointAlreadyExistsFault: ClientRuntime.ModeledError, AWS } } -struct DBProxyEndpointAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyEndpointAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBProxyEndpointNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyEndpointNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18411,33 +13702,15 @@ public struct DBProxyEndpointNotFoundFault: ClientRuntime.ModeledError, AWSClien } } -struct DBProxyEndpointNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyEndpointNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBProxyEndpointQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyEndpointQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18465,22 +13738,6 @@ public struct DBProxyEndpointQuotaExceededFault: ClientRuntime.ModeledError, AWS } } -struct DBProxyEndpointQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyEndpointQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RDSClientTypes { public enum DBProxyEndpointStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case available @@ -18558,16 +13815,14 @@ extension RDSClientTypes { } extension DBProxyNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18595,33 +13850,15 @@ public struct DBProxyNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct DBProxyNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBProxyQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18649,22 +13886,6 @@ public struct DBProxyQuotaExceededFault: ClientRuntime.ModeledError, AWSClientRu } } -struct DBProxyQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RDSClientTypes { public enum DBProxyStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case available @@ -18718,7 +13939,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.DBProxyTarget: Swift.Codable { +extension RDSClientTypes.DBProxyTarget: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case endpoint = "Endpoint" case port = "Port" @@ -18758,24 +13979,20 @@ extension RDSClientTypes.DBProxyTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetArn) - targetArn = targetArnDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let trackedClusterIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trackedClusterId) - trackedClusterId = trackedClusterIdDecoded - let rdsResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .rdsResourceId) - rdsResourceId = rdsResourceIdDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let typeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TargetType.self, forKey: .type) - type = typeDecoded - let roleDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TargetRole.self, forKey: .role) - role = roleDecoded - let targetHealthDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TargetHealth.self, forKey: .targetHealth) - targetHealth = targetHealthDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBProxyTarget() + value.targetArn = try reader["TargetArn"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.trackedClusterId = try reader["TrackedClusterId"].readIfPresent() + value.rdsResourceId = try reader["RdsResourceId"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + value.role = try reader["Role"].readIfPresent() + value.targetHealth = try reader["TargetHealth"].readIfPresent(readingClosure: RDSClientTypes.TargetHealth.readingClosure) + return value + } } } @@ -18824,16 +14041,14 @@ extension RDSClientTypes { } extension DBProxyTargetAlreadyRegisteredFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyTargetAlreadyRegisteredFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18861,23 +14076,7 @@ public struct DBProxyTargetAlreadyRegisteredFault: ClientRuntime.ModeledError, A } } -struct DBProxyTargetAlreadyRegisteredFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyTargetAlreadyRegisteredFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBProxyTargetGroup: Swift.Codable { +extension RDSClientTypes.DBProxyTargetGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case connectionPoolConfig = "ConnectionPoolConfig" case createdDate = "CreatedDate" @@ -18917,24 +14116,20 @@ extension RDSClientTypes.DBProxyTargetGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let targetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupName) - targetGroupName = targetGroupNameDecoded - let targetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupArn) - targetGroupArn = targetGroupArnDecoded - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let connectionPoolConfigDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ConnectionPoolConfigurationInfo.self, forKey: .connectionPoolConfig) - connectionPoolConfig = connectionPoolConfigDecoded - let createdDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdDate) - createdDate = createdDateDecoded - let updatedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updatedDate) - updatedDate = updatedDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBProxyTargetGroup() + value.dbProxyName = try reader["DBProxyName"].readIfPresent() + value.targetGroupName = try reader["TargetGroupName"].readIfPresent() + value.targetGroupArn = try reader["TargetGroupArn"].readIfPresent() + value.isDefault = try reader["IsDefault"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.connectionPoolConfig = try reader["ConnectionPoolConfig"].readIfPresent(readingClosure: RDSClientTypes.ConnectionPoolConfigurationInfo.readingClosure) + value.createdDate = try reader["CreatedDate"].readTimestampIfPresent(format: .dateTime) + value.updatedDate = try reader["UpdatedDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -18983,16 +14178,14 @@ extension RDSClientTypes { } extension DBProxyTargetGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyTargetGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19020,33 +14213,15 @@ public struct DBProxyTargetGroupNotFoundFault: ClientRuntime.ModeledError, AWSCl } } -struct DBProxyTargetGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyTargetGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBProxyTargetNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBProxyTargetNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19074,23 +14249,7 @@ public struct DBProxyTargetNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBProxyTargetNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBProxyTargetNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBRecommendation: Swift.Codable { +extension RDSClientTypes.DBRecommendation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case additionalInfo = "AdditionalInfo" case category = "Category" @@ -19196,82 +14355,32 @@ extension RDSClientTypes.DBRecommendation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let recommendationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recommendationId) - recommendationId = recommendationIdDecoded - let typeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeId) - typeId = typeIdDecoded - let severityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .severity) - severity = severityDecoded - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let createdTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTime) - createdTime = createdTimeDecoded - let updatedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updatedTime) - updatedTime = updatedTimeDecoded - let detectionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .detection) - detection = detectionDecoded - let recommendationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recommendation) - recommendation = recommendationDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let reasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reason) - reason = reasonDecoded - if containerValues.contains(.recommendedActions) { - struct KeyVal0{struct member{}} - let recommendedActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recommendedActions) - if let recommendedActionsWrappedContainer = recommendedActionsWrappedContainer { - let recommendedActionsContainer = try recommendedActionsWrappedContainer.decodeIfPresent([RDSClientTypes.RecommendedAction].self, forKey: .member) - var recommendedActionsBuffer:[RDSClientTypes.RecommendedAction]? = nil - if let recommendedActionsContainer = recommendedActionsContainer { - recommendedActionsBuffer = [RDSClientTypes.RecommendedAction]() - for structureContainer0 in recommendedActionsContainer { - recommendedActionsBuffer?.append(structureContainer0) - } - } - recommendedActions = recommendedActionsBuffer - } else { - recommendedActions = [] - } - } else { - recommendedActions = nil - } - let categoryDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .category) - category = categoryDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let typeDetectionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeDetection) - typeDetection = typeDetectionDecoded - let typeRecommendationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .typeRecommendation) - typeRecommendation = typeRecommendationDecoded - let impactDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .impact) - impact = impactDecoded - let additionalInfoDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .additionalInfo) - additionalInfo = additionalInfoDecoded - if containerValues.contains(.links) { - struct KeyVal0{struct member{}} - let linksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .links) - if let linksWrappedContainer = linksWrappedContainer { - let linksContainer = try linksWrappedContainer.decodeIfPresent([RDSClientTypes.DocLink].self, forKey: .member) - var linksBuffer:[RDSClientTypes.DocLink]? = nil - if let linksContainer = linksContainer { - linksBuffer = [RDSClientTypes.DocLink]() - for structureContainer0 in linksContainer { - linksBuffer?.append(structureContainer0) - } - } - links = linksBuffer - } else { - links = [] - } - } else { - links = nil - } - let issueDetailsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.IssueDetails.self, forKey: .issueDetails) - issueDetails = issueDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBRecommendation() + value.recommendationId = try reader["RecommendationId"].readIfPresent() + value.typeId = try reader["TypeId"].readIfPresent() + value.severity = try reader["Severity"].readIfPresent() + value.resourceArn = try reader["ResourceArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.createdTime = try reader["CreatedTime"].readTimestampIfPresent(format: .dateTime) + value.updatedTime = try reader["UpdatedTime"].readTimestampIfPresent(format: .dateTime) + value.detection = try reader["Detection"].readIfPresent() + value.recommendation = try reader["Recommendation"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.reason = try reader["Reason"].readIfPresent() + value.recommendedActions = try reader["RecommendedActions"].readListIfPresent(memberReadingClosure: RDSClientTypes.RecommendedAction.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.category = try reader["Category"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.typeDetection = try reader["TypeDetection"].readIfPresent() + value.typeRecommendation = try reader["TypeRecommendation"].readIfPresent() + value.impact = try reader["Impact"].readIfPresent() + value.additionalInfo = try reader["AdditionalInfo"].readIfPresent() + value.links = try reader["Links"].readListIfPresent(memberReadingClosure: RDSClientTypes.DocLink.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.issueDetails = try reader["IssueDetails"].readIfPresent(readingClosure: RDSClientTypes.IssueDetails.readingClosure) + return value + } } } @@ -19395,7 +14504,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.DBSecurityGroup: Swift.Codable { +extension RDSClientTypes.DBSecurityGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSecurityGroupArn = "DBSecurityGroupArn" case dbSecurityGroupDescription = "DBSecurityGroupDescription" @@ -19449,56 +14558,19 @@ extension RDSClientTypes.DBSecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerId) - ownerId = ownerIdDecoded - let dbSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupName) - dbSecurityGroupName = dbSecurityGroupNameDecoded - let dbSecurityGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupDescription) - dbSecurityGroupDescription = dbSecurityGroupDescriptionDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.ec2SecurityGroups) { - struct KeyVal0{struct EC2SecurityGroup{}} - let ec2SecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ec2SecurityGroups) - if let ec2SecurityGroupsWrappedContainer = ec2SecurityGroupsWrappedContainer { - let ec2SecurityGroupsContainer = try ec2SecurityGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.EC2SecurityGroup].self, forKey: .member) - var ec2SecurityGroupsBuffer:[RDSClientTypes.EC2SecurityGroup]? = nil - if let ec2SecurityGroupsContainer = ec2SecurityGroupsContainer { - ec2SecurityGroupsBuffer = [RDSClientTypes.EC2SecurityGroup]() - for structureContainer0 in ec2SecurityGroupsContainer { - ec2SecurityGroupsBuffer?.append(structureContainer0) - } - } - ec2SecurityGroups = ec2SecurityGroupsBuffer - } else { - ec2SecurityGroups = [] - } - } else { - ec2SecurityGroups = nil - } - if containerValues.contains(.ipRanges) { - struct KeyVal0{struct IPRange{}} - let ipRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipRanges) - if let ipRangesWrappedContainer = ipRangesWrappedContainer { - let ipRangesContainer = try ipRangesWrappedContainer.decodeIfPresent([RDSClientTypes.IPRange].self, forKey: .member) - var ipRangesBuffer:[RDSClientTypes.IPRange]? = nil - if let ipRangesContainer = ipRangesContainer { - ipRangesBuffer = [RDSClientTypes.IPRange]() - for structureContainer0 in ipRangesContainer { - ipRangesBuffer?.append(structureContainer0) - } - } - ipRanges = ipRangesBuffer - } else { - ipRanges = [] - } - } else { - ipRanges = nil - } - let dbSecurityGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupArn) - dbSecurityGroupArn = dbSecurityGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBSecurityGroup() + value.ownerId = try reader["OwnerId"].readIfPresent() + value.dbSecurityGroupName = try reader["DBSecurityGroupName"].readIfPresent() + value.dbSecurityGroupDescription = try reader["DBSecurityGroupDescription"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.ec2SecurityGroups = try reader["EC2SecurityGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.EC2SecurityGroup.readingClosure, memberNodeInfo: "EC2SecurityGroup", isFlattened: false) + value.ipRanges = try reader["IPRanges"].readListIfPresent(memberReadingClosure: RDSClientTypes.IPRange.readingClosure, memberNodeInfo: "IPRange", isFlattened: false) + value.dbSecurityGroupArn = try reader["DBSecurityGroupArn"].readIfPresent() + return value + } } } @@ -19543,16 +14615,14 @@ extension RDSClientTypes { } extension DBSecurityGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSecurityGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19580,23 +14650,7 @@ public struct DBSecurityGroupAlreadyExistsFault: ClientRuntime.ModeledError, AWS } } -struct DBSecurityGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSecurityGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBSecurityGroupMembership: Swift.Codable { +extension RDSClientTypes.DBSecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSecurityGroupName = "DBSecurityGroupName" case status = "Status" @@ -19612,12 +14666,14 @@ extension RDSClientTypes.DBSecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupName) - dbSecurityGroupName = dbSecurityGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBSecurityGroupMembership() + value.dbSecurityGroupName = try reader["DBSecurityGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -19650,16 +14706,14 @@ extension RDSClientTypes { } extension DBSecurityGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSecurityGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19687,33 +14741,15 @@ public struct DBSecurityGroupNotFoundFault: ClientRuntime.ModeledError, AWSClien } } -struct DBSecurityGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSecurityGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSecurityGroupNotSupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSecurityGroupNotSupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19741,33 +14777,15 @@ public struct DBSecurityGroupNotSupportedFault: ClientRuntime.ModeledError, AWSC } } -struct DBSecurityGroupNotSupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSecurityGroupNotSupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSecurityGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSecurityGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -19795,23 +14813,7 @@ public struct DBSecurityGroupQuotaExceededFault: ClientRuntime.ModeledError, AWS } } -struct DBSecurityGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSecurityGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBSnapshot: Swift.Codable { +extension RDSClientTypes.DBSnapshot: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case availabilityZone = "AvailabilityZone" @@ -19981,114 +14983,48 @@ extension RDSClientTypes.DBSnapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let snapshotCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotCreateTime) - snapshotCreateTime = snapshotCreateTimeDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let instanceCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .instanceCreateTime) - instanceCreateTime = instanceCreateTimeDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let sourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceRegion) - sourceRegion = sourceRegionDecoded - let sourceDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBSnapshotIdentifier) - sourceDBSnapshotIdentifier = sourceDBSnapshotIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let dbSnapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotArn) - dbSnapshotArn = dbSnapshotArnDecoded - let timezoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezone) - timezone = timezoneDecoded - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil - } - let originalSnapshotCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .originalSnapshotCreateTime) - originalSnapshotCreateTime = originalSnapshotCreateTimeDecoded - let snapshotDatabaseTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotDatabaseTime) - snapshotDatabaseTime = snapshotDatabaseTimeDecoded - let snapshotTargetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotTarget) - snapshotTarget = snapshotTargetDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let dbSystemIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSystemId) - dbSystemId = dbSystemIdDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - let multiTenantDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiTenant) - multiTenant = multiTenantDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBSnapshot() + value.dbSnapshotIdentifier = try reader["DBSnapshotIdentifier"].readIfPresent() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.snapshotCreateTime = try reader["SnapshotCreateTime"].readTimestampIfPresent(format: .dateTime) + value.engine = try reader["Engine"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.instanceCreateTime = try reader["InstanceCreateTime"].readTimestampIfPresent(format: .dateTime) + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.snapshotType = try reader["SnapshotType"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.optionGroupName = try reader["OptionGroupName"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.sourceRegion = try reader["SourceRegion"].readIfPresent() + value.sourceDBSnapshotIdentifier = try reader["SourceDBSnapshotIdentifier"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.tdeCredentialArn = try reader["TdeCredentialArn"].readIfPresent() + value.encrypted = try reader["Encrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.dbSnapshotArn = try reader["DBSnapshotArn"].readIfPresent() + value.timezone = try reader["Timezone"].readIfPresent() + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.processorFeatures = try reader["ProcessorFeatures"].readListIfPresent(memberReadingClosure: RDSClientTypes.ProcessorFeature.readingClosure, memberNodeInfo: "ProcessorFeature", isFlattened: false) + value.dbiResourceId = try reader["DbiResourceId"].readIfPresent() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.originalSnapshotCreateTime = try reader["OriginalSnapshotCreateTime"].readTimestampIfPresent(format: .dateTime) + value.snapshotDatabaseTime = try reader["SnapshotDatabaseTime"].readTimestampIfPresent(format: .dateTime) + value.snapshotTarget = try reader["SnapshotTarget"].readIfPresent() + value.storageThroughput = try reader["StorageThroughput"].readIfPresent() + value.dbSystemId = try reader["DBSystemId"].readIfPresent() + value.dedicatedLogVolume = try reader["DedicatedLogVolume"].readIfPresent() + value.multiTenant = try reader["MultiTenant"].readIfPresent() + return value + } } } @@ -20249,16 +15185,14 @@ extension RDSClientTypes { } extension DBSnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20286,23 +15220,7 @@ public struct DBSnapshotAlreadyExistsFault: ClientRuntime.ModeledError, AWSClien } } -struct DBSnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBSnapshotAttribute: Swift.Codable { +extension RDSClientTypes.DBSnapshotAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeName = "AttributeName" case attributeValues = "AttributeValues" @@ -20327,28 +15245,13 @@ extension RDSClientTypes.DBSnapshotAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.attributeValues) { - struct KeyVal0{struct AttributeValue{}} - let attributeValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeValues) - if let attributeValuesWrappedContainer = attributeValuesWrappedContainer { - let attributeValuesContainer = try attributeValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var attributeValuesBuffer:[Swift.String]? = nil - if let attributeValuesContainer = attributeValuesContainer { - attributeValuesBuffer = [Swift.String]() - for stringContainer0 in attributeValuesContainer { - attributeValuesBuffer?.append(stringContainer0) - } - } - attributeValues = attributeValuesBuffer - } else { - attributeValues = [] - } - } else { - attributeValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBSnapshotAttribute() + value.attributeName = try reader["AttributeName"].readIfPresent() + value.attributeValues = try reader["AttributeValues"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "AttributeValue", isFlattened: false) + return value } } } @@ -20373,7 +15276,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.DBSnapshotAttributesResult: Swift.Codable { +extension RDSClientTypes.DBSnapshotAttributesResult: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSnapshotAttributes = "DBSnapshotAttributes" case dbSnapshotIdentifier = "DBSnapshotIdentifier" @@ -20398,28 +15301,13 @@ extension RDSClientTypes.DBSnapshotAttributesResult: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - if containerValues.contains(.dbSnapshotAttributes) { - struct KeyVal0{struct DBSnapshotAttribute{}} - let dbSnapshotAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSnapshotAttributes) - if let dbSnapshotAttributesWrappedContainer = dbSnapshotAttributesWrappedContainer { - let dbSnapshotAttributesContainer = try dbSnapshotAttributesWrappedContainer.decodeIfPresent([RDSClientTypes.DBSnapshotAttribute].self, forKey: .member) - var dbSnapshotAttributesBuffer:[RDSClientTypes.DBSnapshotAttribute]? = nil - if let dbSnapshotAttributesContainer = dbSnapshotAttributesContainer { - dbSnapshotAttributesBuffer = [RDSClientTypes.DBSnapshotAttribute]() - for structureContainer0 in dbSnapshotAttributesContainer { - dbSnapshotAttributesBuffer?.append(structureContainer0) - } - } - dbSnapshotAttributes = dbSnapshotAttributesBuffer - } else { - dbSnapshotAttributes = [] - } - } else { - dbSnapshotAttributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBSnapshotAttributesResult() + value.dbSnapshotIdentifier = try reader["DBSnapshotIdentifier"].readIfPresent() + value.dbSnapshotAttributes = try reader["DBSnapshotAttributes"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBSnapshotAttribute.readingClosure, memberNodeInfo: "DBSnapshotAttribute", isFlattened: false) + return value } } } @@ -20445,16 +15333,14 @@ extension RDSClientTypes { } extension DBSnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20482,23 +15368,7 @@ public struct DBSnapshotNotFoundFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct DBSnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBSnapshotTenantDatabase: Swift.Codable { +extension RDSClientTypes.DBSnapshotTenantDatabase: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case characterSetName = "CharacterSetName" case dbInstanceIdentifier = "DBInstanceIdentifier" @@ -20567,50 +15437,24 @@ extension RDSClientTypes.DBSnapshotTenantDatabase: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - let engineNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineName) - engineName = engineNameDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let tenantDatabaseCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .tenantDatabaseCreateTime) - tenantDatabaseCreateTime = tenantDatabaseCreateTimeDecoded - let tenantDBNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDBName) - tenantDBName = tenantDBNameDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let tenantDatabaseResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDatabaseResourceId) - tenantDatabaseResourceId = tenantDatabaseResourceIdDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let dbSnapshotTenantDatabaseARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotTenantDatabaseARN) - dbSnapshotTenantDatabaseARN = dbSnapshotTenantDatabaseARNDecoded - let ncharCharacterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ncharCharacterSetName) - ncharCharacterSetName = ncharCharacterSetNameDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBSnapshotTenantDatabase() + value.dbSnapshotIdentifier = try reader["DBSnapshotIdentifier"].readIfPresent() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.dbiResourceId = try reader["DbiResourceId"].readIfPresent() + value.engineName = try reader["EngineName"].readIfPresent() + value.snapshotType = try reader["SnapshotType"].readIfPresent() + value.tenantDatabaseCreateTime = try reader["TenantDatabaseCreateTime"].readTimestampIfPresent(format: .dateTime) + value.tenantDBName = try reader["TenantDBName"].readIfPresent() + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.tenantDatabaseResourceId = try reader["TenantDatabaseResourceId"].readIfPresent() + value.characterSetName = try reader["CharacterSetName"].readIfPresent() + value.dbSnapshotTenantDatabaseARN = try reader["DBSnapshotTenantDatabaseARN"].readIfPresent() + value.ncharCharacterSetName = try reader["NcharCharacterSetName"].readIfPresent() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -20680,16 +15524,14 @@ extension RDSClientTypes { } extension DBSnapshotTenantDatabaseNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSnapshotTenantDatabaseNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20717,23 +15559,7 @@ public struct DBSnapshotTenantDatabaseNotFoundFault: ClientRuntime.ModeledError, } } -struct DBSnapshotTenantDatabaseNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSnapshotTenantDatabaseNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DBSubnetGroup: Swift.Codable { +extension RDSClientTypes.DBSubnetGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSubnetGroupArn = "DBSubnetGroupArn" case dbSubnetGroupDescription = "DBSubnetGroupDescription" @@ -20787,55 +15613,18 @@ extension RDSClientTypes.DBSubnetGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let subnetGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupStatus) - subnetGroupStatus = subnetGroupStatusDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct Subnet{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([RDSClientTypes.Subnet].self, forKey: .member) - var subnetsBuffer:[RDSClientTypes.Subnet]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [RDSClientTypes.Subnet]() - for structureContainer0 in subnetsContainer { - subnetsBuffer?.append(structureContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - let dbSubnetGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupArn) - dbSubnetGroupArn = dbSubnetGroupArnDecoded - if containerValues.contains(.supportedNetworkTypes) { - struct KeyVal0{struct member{}} - let supportedNetworkTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedNetworkTypes) - if let supportedNetworkTypesWrappedContainer = supportedNetworkTypesWrappedContainer { - let supportedNetworkTypesContainer = try supportedNetworkTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedNetworkTypesBuffer:[Swift.String]? = nil - if let supportedNetworkTypesContainer = supportedNetworkTypesContainer { - supportedNetworkTypesBuffer = [Swift.String]() - for stringContainer0 in supportedNetworkTypesContainer { - supportedNetworkTypesBuffer?.append(stringContainer0) - } - } - supportedNetworkTypes = supportedNetworkTypesBuffer - } else { - supportedNetworkTypes = [] - } - } else { - supportedNetworkTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DBSubnetGroup() + value.dbSubnetGroupName = try reader["DBSubnetGroupName"].readIfPresent() + value.dbSubnetGroupDescription = try reader["DBSubnetGroupDescription"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.subnetGroupStatus = try reader["SubnetGroupStatus"].readIfPresent() + value.subnets = try reader["Subnets"].readListIfPresent(memberReadingClosure: RDSClientTypes.Subnet.readingClosure, memberNodeInfo: "Subnet", isFlattened: false) + value.dbSubnetGroupArn = try reader["DBSubnetGroupArn"].readIfPresent() + value.supportedNetworkTypes = try reader["SupportedNetworkTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -20888,16 +15677,14 @@ extension RDSClientTypes { } extension DBSubnetGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20925,33 +15712,15 @@ public struct DBSubnetGroupAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct DBSubnetGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupDoesNotCoverEnoughAZs { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupDoesNotCoverEnoughAZs() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -20979,33 +15748,15 @@ public struct DBSubnetGroupDoesNotCoverEnoughAZs: ClientRuntime.ModeledError, AW } } -struct DBSubnetGroupDoesNotCoverEnoughAZsBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupDoesNotCoverEnoughAZsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupNotAllowedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupNotAllowedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21033,33 +15784,15 @@ public struct DBSubnetGroupNotAllowedFault: ClientRuntime.ModeledError, AWSClien } } -struct DBSubnetGroupNotAllowedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupNotAllowedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21087,33 +15820,15 @@ public struct DBSubnetGroupNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBSubnetGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21141,33 +15856,15 @@ public struct DBSubnetGroupQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct DBSubnetGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBSubnetQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBSubnetQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21195,33 +15892,15 @@ public struct DBSubnetQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct DBSubnetQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBSubnetQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DBUpgradeDependencyFailureFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DBUpgradeDependencyFailureFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21249,23 +15928,12 @@ public struct DBUpgradeDependencyFailureFault: ClientRuntime.ModeledError, AWSCl } } -struct DBUpgradeDependencyFailureFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DBUpgradeDependencyFailureFaultBody: Swift.Decodable { +extension DeleteBlueGreenDeploymentInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case blueGreenDeploymentIdentifier = "BlueGreenDeploymentIdentifier" + case deleteTarget = "DeleteTarget" } -} -extension DeleteBlueGreenDeploymentInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let blueGreenDeploymentIdentifier = blueGreenDeploymentIdentifier { @@ -21305,34 +15973,15 @@ public struct DeleteBlueGreenDeploymentInput: Swift.Equatable { } } -struct DeleteBlueGreenDeploymentInputBody: Swift.Equatable { - let blueGreenDeploymentIdentifier: Swift.String? - let deleteTarget: Swift.Bool? -} - -extension DeleteBlueGreenDeploymentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blueGreenDeploymentIdentifier = "BlueGreenDeploymentIdentifier" - case deleteTarget = "DeleteTarget" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let blueGreenDeploymentIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .blueGreenDeploymentIdentifier) - blueGreenDeploymentIdentifier = blueGreenDeploymentIdentifierDecoded - let deleteTargetDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteTarget) - deleteTarget = deleteTargetDecoded - } -} +extension DeleteBlueGreenDeploymentOutput { -extension DeleteBlueGreenDeploymentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteBlueGreenDeploymentOutputBody = try responseDecoder.decode(responseBody: data) - self.blueGreenDeployment = output.blueGreenDeployment - } else { - self.blueGreenDeployment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteBlueGreenDeploymentResult"] + var value = DeleteBlueGreenDeploymentOutput() + value.blueGreenDeployment = try reader["BlueGreenDeployment"].readIfPresent(readingClosure: RDSClientTypes.BlueGreenDeployment.readingClosure) + return value } } } @@ -21349,35 +15998,30 @@ public struct DeleteBlueGreenDeploymentOutput: Swift.Equatable { } } -struct DeleteBlueGreenDeploymentOutputBody: Swift.Equatable { - let blueGreenDeployment: RDSClientTypes.BlueGreenDeployment? -} - -extension DeleteBlueGreenDeploymentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blueGreenDeployment = "BlueGreenDeployment" - } +enum DeleteBlueGreenDeploymentOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteBlueGreenDeploymentResult")) - let blueGreenDeploymentDecoded = try containerValues.decodeIfPresent(RDSClientTypes.BlueGreenDeployment.self, forKey: .blueGreenDeployment) - blueGreenDeployment = blueGreenDeploymentDecoded - } -} - -enum DeleteBlueGreenDeploymentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidBlueGreenDeploymentStateFault": return try await InvalidBlueGreenDeploymentStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidBlueGreenDeploymentStateFault": return try await InvalidBlueGreenDeploymentStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteCustomDBEngineVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case engine = "Engine" + case engineVersion = "EngineVersion" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let engine = engine { @@ -21416,98 +16060,47 @@ public struct DeleteCustomDBEngineVersionInput: Swift.Equatable { } } -struct DeleteCustomDBEngineVersionInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? -} - -extension DeleteCustomDBEngineVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engine = "Engine" - case engineVersion = "EngineVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - } -} - -extension DeleteCustomDBEngineVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteCustomDBEngineVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.createTime = output.createTime - self.customDBEngineVersionManifest = output.customDBEngineVersionManifest - self.databaseInstallationFilesS3BucketName = output.databaseInstallationFilesS3BucketName - self.databaseInstallationFilesS3Prefix = output.databaseInstallationFilesS3Prefix - self.dbEngineDescription = output.dbEngineDescription - self.dbEngineMediaType = output.dbEngineMediaType - self.dbEngineVersionArn = output.dbEngineVersionArn - self.dbEngineVersionDescription = output.dbEngineVersionDescription - self.dbParameterGroupFamily = output.dbParameterGroupFamily - self.defaultCharacterSet = output.defaultCharacterSet - self.engine = output.engine - self.engineVersion = output.engineVersion - self.exportableLogTypes = output.exportableLogTypes - self.image = output.image - self.kmsKeyId = output.kmsKeyId - self.majorEngineVersion = output.majorEngineVersion - self.status = output.status - self.supportedCACertificateIdentifiers = output.supportedCACertificateIdentifiers - self.supportedCharacterSets = output.supportedCharacterSets - self.supportedEngineModes = output.supportedEngineModes - self.supportedFeatureNames = output.supportedFeatureNames - self.supportedNcharCharacterSets = output.supportedNcharCharacterSets - self.supportedTimezones = output.supportedTimezones - self.supportsBabelfish = output.supportsBabelfish - self.supportsCertificateRotationWithoutRestart = output.supportsCertificateRotationWithoutRestart - self.supportsGlobalDatabases = output.supportsGlobalDatabases - self.supportsIntegrations = output.supportsIntegrations - self.supportsLocalWriteForwarding = output.supportsLocalWriteForwarding - self.supportsLogExportsToCloudwatchLogs = output.supportsLogExportsToCloudwatchLogs - self.supportsParallelQuery = output.supportsParallelQuery - self.supportsReadReplica = output.supportsReadReplica - self.tagList = output.tagList - self.validUpgradeTarget = output.validUpgradeTarget - } else { - self.createTime = nil - self.customDBEngineVersionManifest = nil - self.dbEngineDescription = nil - self.dbEngineMediaType = nil - self.dbEngineVersionArn = nil - self.dbEngineVersionDescription = nil - self.dbParameterGroupFamily = nil - self.databaseInstallationFilesS3BucketName = nil - self.databaseInstallationFilesS3Prefix = nil - self.defaultCharacterSet = nil - self.engine = nil - self.engineVersion = nil - self.exportableLogTypes = nil - self.image = nil - self.kmsKeyId = nil - self.majorEngineVersion = nil - self.status = nil - self.supportedCACertificateIdentifiers = nil - self.supportedCharacterSets = nil - self.supportedEngineModes = nil - self.supportedFeatureNames = nil - self.supportedNcharCharacterSets = nil - self.supportedTimezones = nil - self.supportsBabelfish = nil - self.supportsCertificateRotationWithoutRestart = nil - self.supportsGlobalDatabases = nil - self.supportsIntegrations = nil - self.supportsLocalWriteForwarding = nil - self.supportsLogExportsToCloudwatchLogs = nil - self.supportsParallelQuery = nil - self.supportsReadReplica = nil - self.tagList = nil - self.validUpgradeTarget = nil +extension DeleteCustomDBEngineVersionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteCustomDBEngineVersionResult"] + var value = DeleteCustomDBEngineVersionOutput() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.customDBEngineVersionManifest = try reader["CustomDBEngineVersionManifest"].readIfPresent() + value.dbEngineDescription = try reader["DBEngineDescription"].readIfPresent() + value.dbEngineMediaType = try reader["DBEngineMediaType"].readIfPresent() + value.dbEngineVersionArn = try reader["DBEngineVersionArn"].readIfPresent() + value.dbEngineVersionDescription = try reader["DBEngineVersionDescription"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.databaseInstallationFilesS3BucketName = try reader["DatabaseInstallationFilesS3BucketName"].readIfPresent() + value.databaseInstallationFilesS3Prefix = try reader["DatabaseInstallationFilesS3Prefix"].readIfPresent() + value.defaultCharacterSet = try reader["DefaultCharacterSet"].readIfPresent(readingClosure: RDSClientTypes.CharacterSet.readingClosure) + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.exportableLogTypes = try reader["ExportableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.image = try reader["Image"].readIfPresent(readingClosure: RDSClientTypes.CustomDBEngineVersionAMI.readingClosure) + value.kmsKeyId = try reader["KMSKeyId"].readIfPresent() + value.majorEngineVersion = try reader["MajorEngineVersion"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.supportedCACertificateIdentifiers = try reader["SupportedCACertificateIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedCharacterSets = try reader["SupportedCharacterSets"].readListIfPresent(memberReadingClosure: RDSClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.supportedEngineModes = try reader["SupportedEngineModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedFeatureNames = try reader["SupportedFeatureNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedNcharCharacterSets = try reader["SupportedNcharCharacterSets"].readListIfPresent(memberReadingClosure: RDSClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.supportedTimezones = try reader["SupportedTimezones"].readListIfPresent(memberReadingClosure: RDSClientTypes.Timezone.readingClosure, memberNodeInfo: "Timezone", isFlattened: false) + value.supportsBabelfish = try reader["SupportsBabelfish"].readIfPresent() + value.supportsCertificateRotationWithoutRestart = try reader["SupportsCertificateRotationWithoutRestart"].readIfPresent() + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + value.supportsIntegrations = try reader["SupportsIntegrations"].readIfPresent() + value.supportsLocalWriteForwarding = try reader["SupportsLocalWriteForwarding"].readIfPresent() + value.supportsLogExportsToCloudwatchLogs = try reader["SupportsLogExportsToCloudwatchLogs"].readIfPresent() + value.supportsParallelQuery = try reader["SupportsParallelQuery"].readIfPresent() + value.supportsReadReplica = try reader["SupportsReadReplica"].readIfPresent() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.validUpgradeTarget = try reader["ValidUpgradeTarget"].readListIfPresent(memberReadingClosure: RDSClientTypes.UpgradeTarget.readingClosure, memberNodeInfo: "UpgradeTarget", isFlattened: false) + return value } } } @@ -21653,316 +16246,29 @@ public struct DeleteCustomDBEngineVersionOutput: Swift.Equatable { } } -struct DeleteCustomDBEngineVersionOutputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbParameterGroupFamily: Swift.String? - let dbEngineDescription: Swift.String? - let dbEngineVersionDescription: Swift.String? - let defaultCharacterSet: RDSClientTypes.CharacterSet? - let image: RDSClientTypes.CustomDBEngineVersionAMI? - let dbEngineMediaType: Swift.String? - let supportedCharacterSets: [RDSClientTypes.CharacterSet]? - let supportedNcharCharacterSets: [RDSClientTypes.CharacterSet]? - let validUpgradeTarget: [RDSClientTypes.UpgradeTarget]? - let supportedTimezones: [RDSClientTypes.Timezone]? - let exportableLogTypes: [Swift.String]? - let supportsLogExportsToCloudwatchLogs: Swift.Bool? - let supportsReadReplica: Swift.Bool? - let supportedEngineModes: [Swift.String]? - let supportedFeatureNames: [Swift.String]? - let status: Swift.String? - let supportsParallelQuery: Swift.Bool? - let supportsGlobalDatabases: Swift.Bool? - let majorEngineVersion: Swift.String? - let databaseInstallationFilesS3BucketName: Swift.String? - let databaseInstallationFilesS3Prefix: Swift.String? - let dbEngineVersionArn: Swift.String? - let kmsKeyId: Swift.String? - let createTime: ClientRuntime.Date? - let tagList: [RDSClientTypes.Tag]? - let supportsBabelfish: Swift.Bool? - let customDBEngineVersionManifest: Swift.String? - let supportsCertificateRotationWithoutRestart: Swift.Bool? - let supportedCACertificateIdentifiers: [Swift.String]? - let supportsLocalWriteForwarding: Swift.Bool? - let supportsIntegrations: Swift.Bool? -} - -extension DeleteCustomDBEngineVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "CreateTime" - case customDBEngineVersionManifest = "CustomDBEngineVersionManifest" - case dbEngineDescription = "DBEngineDescription" - case dbEngineMediaType = "DBEngineMediaType" - case dbEngineVersionArn = "DBEngineVersionArn" - case dbEngineVersionDescription = "DBEngineVersionDescription" - case dbParameterGroupFamily = "DBParameterGroupFamily" - case databaseInstallationFilesS3BucketName = "DatabaseInstallationFilesS3BucketName" - case databaseInstallationFilesS3Prefix = "DatabaseInstallationFilesS3Prefix" - case defaultCharacterSet = "DefaultCharacterSet" - case engine = "Engine" - case engineVersion = "EngineVersion" - case exportableLogTypes = "ExportableLogTypes" - case image = "Image" - case kmsKeyId = "KMSKeyId" - case majorEngineVersion = "MajorEngineVersion" - case status = "Status" - case supportedCACertificateIdentifiers = "SupportedCACertificateIdentifiers" - case supportedCharacterSets = "SupportedCharacterSets" - case supportedEngineModes = "SupportedEngineModes" - case supportedFeatureNames = "SupportedFeatureNames" - case supportedNcharCharacterSets = "SupportedNcharCharacterSets" - case supportedTimezones = "SupportedTimezones" - case supportsBabelfish = "SupportsBabelfish" - case supportsCertificateRotationWithoutRestart = "SupportsCertificateRotationWithoutRestart" - case supportsGlobalDatabases = "SupportsGlobalDatabases" - case supportsIntegrations = "SupportsIntegrations" - case supportsLocalWriteForwarding = "SupportsLocalWriteForwarding" - case supportsLogExportsToCloudwatchLogs = "SupportsLogExportsToCloudwatchLogs" - case supportsParallelQuery = "SupportsParallelQuery" - case supportsReadReplica = "SupportsReadReplica" - case tagList = "TagList" - case validUpgradeTarget = "ValidUpgradeTarget" - } +enum DeleteCustomDBEngineVersionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteCustomDBEngineVersionResult")) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let dbEngineDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineDescription) - dbEngineDescription = dbEngineDescriptionDecoded - let dbEngineVersionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionDescription) - dbEngineVersionDescription = dbEngineVersionDescriptionDecoded - let defaultCharacterSetDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CharacterSet.self, forKey: .defaultCharacterSet) - defaultCharacterSet = defaultCharacterSetDecoded - let imageDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CustomDBEngineVersionAMI.self, forKey: .image) - image = imageDecoded - let dbEngineMediaTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineMediaType) - dbEngineMediaType = dbEngineMediaTypeDecoded - if containerValues.contains(.supportedCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCharacterSets) - if let supportedCharacterSetsWrappedContainer = supportedCharacterSetsWrappedContainer { - let supportedCharacterSetsContainer = try supportedCharacterSetsWrappedContainer.decodeIfPresent([RDSClientTypes.CharacterSet].self, forKey: .member) - var supportedCharacterSetsBuffer:[RDSClientTypes.CharacterSet]? = nil - if let supportedCharacterSetsContainer = supportedCharacterSetsContainer { - supportedCharacterSetsBuffer = [RDSClientTypes.CharacterSet]() - for structureContainer0 in supportedCharacterSetsContainer { - supportedCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedCharacterSets = supportedCharacterSetsBuffer - } else { - supportedCharacterSets = [] - } - } else { - supportedCharacterSets = nil - } - if containerValues.contains(.supportedNcharCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedNcharCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedNcharCharacterSets) - if let supportedNcharCharacterSetsWrappedContainer = supportedNcharCharacterSetsWrappedContainer { - let supportedNcharCharacterSetsContainer = try supportedNcharCharacterSetsWrappedContainer.decodeIfPresent([RDSClientTypes.CharacterSet].self, forKey: .member) - var supportedNcharCharacterSetsBuffer:[RDSClientTypes.CharacterSet]? = nil - if let supportedNcharCharacterSetsContainer = supportedNcharCharacterSetsContainer { - supportedNcharCharacterSetsBuffer = [RDSClientTypes.CharacterSet]() - for structureContainer0 in supportedNcharCharacterSetsContainer { - supportedNcharCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedNcharCharacterSets = supportedNcharCharacterSetsBuffer - } else { - supportedNcharCharacterSets = [] - } - } else { - supportedNcharCharacterSets = nil - } - if containerValues.contains(.validUpgradeTarget) { - struct KeyVal0{struct UpgradeTarget{}} - let validUpgradeTargetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validUpgradeTarget) - if let validUpgradeTargetWrappedContainer = validUpgradeTargetWrappedContainer { - let validUpgradeTargetContainer = try validUpgradeTargetWrappedContainer.decodeIfPresent([RDSClientTypes.UpgradeTarget].self, forKey: .member) - var validUpgradeTargetBuffer:[RDSClientTypes.UpgradeTarget]? = nil - if let validUpgradeTargetContainer = validUpgradeTargetContainer { - validUpgradeTargetBuffer = [RDSClientTypes.UpgradeTarget]() - for structureContainer0 in validUpgradeTargetContainer { - validUpgradeTargetBuffer?.append(structureContainer0) - } - } - validUpgradeTarget = validUpgradeTargetBuffer - } else { - validUpgradeTarget = [] - } - } else { - validUpgradeTarget = nil - } - if containerValues.contains(.supportedTimezones) { - struct KeyVal0{struct Timezone{}} - let supportedTimezonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedTimezones) - if let supportedTimezonesWrappedContainer = supportedTimezonesWrappedContainer { - let supportedTimezonesContainer = try supportedTimezonesWrappedContainer.decodeIfPresent([RDSClientTypes.Timezone].self, forKey: .member) - var supportedTimezonesBuffer:[RDSClientTypes.Timezone]? = nil - if let supportedTimezonesContainer = supportedTimezonesContainer { - supportedTimezonesBuffer = [RDSClientTypes.Timezone]() - for structureContainer0 in supportedTimezonesContainer { - supportedTimezonesBuffer?.append(structureContainer0) - } - } - supportedTimezones = supportedTimezonesBuffer - } else { - supportedTimezones = [] - } - } else { - supportedTimezones = nil - } - if containerValues.contains(.exportableLogTypes) { - struct KeyVal0{struct member{}} - let exportableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportableLogTypes) - if let exportableLogTypesWrappedContainer = exportableLogTypesWrappedContainer { - let exportableLogTypesContainer = try exportableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportableLogTypesBuffer:[Swift.String]? = nil - if let exportableLogTypesContainer = exportableLogTypesContainer { - exportableLogTypesBuffer = [Swift.String]() - for stringContainer0 in exportableLogTypesContainer { - exportableLogTypesBuffer?.append(stringContainer0) - } - } - exportableLogTypes = exportableLogTypesBuffer - } else { - exportableLogTypes = [] - } - } else { - exportableLogTypes = nil - } - let supportsLogExportsToCloudwatchLogsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLogExportsToCloudwatchLogs) - supportsLogExportsToCloudwatchLogs = supportsLogExportsToCloudwatchLogsDecoded - let supportsReadReplicaDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsReadReplica) - supportsReadReplica = supportsReadReplicaDecoded - if containerValues.contains(.supportedEngineModes) { - struct KeyVal0{struct member{}} - let supportedEngineModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedEngineModes) - if let supportedEngineModesWrappedContainer = supportedEngineModesWrappedContainer { - let supportedEngineModesContainer = try supportedEngineModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedEngineModesBuffer:[Swift.String]? = nil - if let supportedEngineModesContainer = supportedEngineModesContainer { - supportedEngineModesBuffer = [Swift.String]() - for stringContainer0 in supportedEngineModesContainer { - supportedEngineModesBuffer?.append(stringContainer0) - } - } - supportedEngineModes = supportedEngineModesBuffer - } else { - supportedEngineModes = [] - } - } else { - supportedEngineModes = nil - } - if containerValues.contains(.supportedFeatureNames) { - struct KeyVal0{struct member{}} - let supportedFeatureNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedFeatureNames) - if let supportedFeatureNamesWrappedContainer = supportedFeatureNamesWrappedContainer { - let supportedFeatureNamesContainer = try supportedFeatureNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedFeatureNamesBuffer:[Swift.String]? = nil - if let supportedFeatureNamesContainer = supportedFeatureNamesContainer { - supportedFeatureNamesBuffer = [Swift.String]() - for stringContainer0 in supportedFeatureNamesContainer { - supportedFeatureNamesBuffer?.append(stringContainer0) - } - } - supportedFeatureNames = supportedFeatureNamesBuffer - } else { - supportedFeatureNames = [] - } - } else { - supportedFeatureNames = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let supportsParallelQueryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsParallelQuery) - supportsParallelQuery = supportsParallelQueryDecoded - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - let databaseInstallationFilesS3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3BucketName) - databaseInstallationFilesS3BucketName = databaseInstallationFilesS3BucketNameDecoded - let databaseInstallationFilesS3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3Prefix) - databaseInstallationFilesS3Prefix = databaseInstallationFilesS3PrefixDecoded - let dbEngineVersionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionArn) - dbEngineVersionArn = dbEngineVersionArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil - } - let supportsBabelfishDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsBabelfish) - supportsBabelfish = supportsBabelfishDecoded - let customDBEngineVersionManifestDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDBEngineVersionManifest) - customDBEngineVersionManifest = customDBEngineVersionManifestDecoded - let supportsCertificateRotationWithoutRestartDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsCertificateRotationWithoutRestart) - supportsCertificateRotationWithoutRestart = supportsCertificateRotationWithoutRestartDecoded - if containerValues.contains(.supportedCACertificateIdentifiers) { - struct KeyVal0{struct member{}} - let supportedCACertificateIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCACertificateIdentifiers) - if let supportedCACertificateIdentifiersWrappedContainer = supportedCACertificateIdentifiersWrappedContainer { - let supportedCACertificateIdentifiersContainer = try supportedCACertificateIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedCACertificateIdentifiersBuffer:[Swift.String]? = nil - if let supportedCACertificateIdentifiersContainer = supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer = [Swift.String]() - for stringContainer0 in supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer?.append(stringContainer0) - } - } - supportedCACertificateIdentifiers = supportedCACertificateIdentifiersBuffer - } else { - supportedCACertificateIdentifiers = [] - } - } else { - supportedCACertificateIdentifiers = nil - } - let supportsLocalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLocalWriteForwarding) - supportsLocalWriteForwarding = supportsLocalWriteForwardingDecoded - let supportsIntegrationsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIntegrations) - supportsIntegrations = supportsIntegrationsDecoded - } -} - -enum DeleteCustomDBEngineVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CustomDBEngineVersionNotFoundFault": return try await CustomDBEngineVersionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCustomDBEngineVersionStateFault": return try await InvalidCustomDBEngineVersionStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CustomDBEngineVersionNotFoundFault": return try await CustomDBEngineVersionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCustomDBEngineVersionStateFault": return try await InvalidCustomDBEngineVersionStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterAutomatedBackupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterResourceId = "DbClusterResourceId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterResourceId = dbClusterResourceId { @@ -21993,30 +16299,15 @@ public struct DeleteDBClusterAutomatedBackupInput: Swift.Equatable { } } -struct DeleteDBClusterAutomatedBackupInputBody: Swift.Equatable { - let dbClusterResourceId: Swift.String? -} - -extension DeleteDBClusterAutomatedBackupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterResourceId = "DbClusterResourceId" - } +extension DeleteDBClusterAutomatedBackupOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterResourceId) - dbClusterResourceId = dbClusterResourceIdDecoded - } -} - -extension DeleteDBClusterAutomatedBackupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterAutomatedBackupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterAutomatedBackup = output.dbClusterAutomatedBackup - } else { - self.dbClusterAutomatedBackup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterAutomatedBackupResult"] + var value = DeleteDBClusterAutomatedBackupOutput() + value.dbClusterAutomatedBackup = try reader["DBClusterAutomatedBackup"].readIfPresent(readingClosure: RDSClientTypes.DBClusterAutomatedBackup.readingClosure) + return value } } } @@ -22033,35 +16324,29 @@ public struct DeleteDBClusterAutomatedBackupOutput: Swift.Equatable { } } -struct DeleteDBClusterAutomatedBackupOutputBody: Swift.Equatable { - let dbClusterAutomatedBackup: RDSClientTypes.DBClusterAutomatedBackup? -} - -extension DeleteDBClusterAutomatedBackupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterAutomatedBackup = "DBClusterAutomatedBackup" - } +enum DeleteDBClusterAutomatedBackupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterAutomatedBackupResult")) - let dbClusterAutomatedBackupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBClusterAutomatedBackup.self, forKey: .dbClusterAutomatedBackup) - dbClusterAutomatedBackup = dbClusterAutomatedBackupDecoded - } -} - -enum DeleteDBClusterAutomatedBackupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAutomatedBackupNotFoundFault": return try await DBClusterAutomatedBackupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterAutomatedBackupStateFault": return try await InvalidDBClusterAutomatedBackupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAutomatedBackupNotFoundFault": return try await DBClusterAutomatedBackupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterAutomatedBackupStateFault": return try await InvalidDBClusterAutomatedBackupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterEndpointIdentifier = dbClusterEndpointIdentifier { @@ -22092,48 +16377,24 @@ public struct DeleteDBClusterEndpointInput: Swift.Equatable { } } -struct DeleteDBClusterEndpointInputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? -} - -extension DeleteDBClusterEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - } -} +extension DeleteDBClusterEndpointOutput { -extension DeleteDBClusterEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.customEndpointType = output.customEndpointType - self.dbClusterEndpointArn = output.dbClusterEndpointArn - self.dbClusterEndpointIdentifier = output.dbClusterEndpointIdentifier - self.dbClusterEndpointResourceIdentifier = output.dbClusterEndpointResourceIdentifier - self.dbClusterIdentifier = output.dbClusterIdentifier - self.endpoint = output.endpoint - self.endpointType = output.endpointType - self.excludedMembers = output.excludedMembers - self.staticMembers = output.staticMembers - self.status = output.status - } else { - self.customEndpointType = nil - self.dbClusterEndpointArn = nil - self.dbClusterEndpointIdentifier = nil - self.dbClusterEndpointResourceIdentifier = nil - self.dbClusterIdentifier = nil - self.endpoint = nil - self.endpointType = nil - self.excludedMembers = nil - self.staticMembers = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterEndpointResult"] + var value = DeleteDBClusterEndpointOutput() + value.customEndpointType = try reader["CustomEndpointType"].readIfPresent() + value.dbClusterEndpointArn = try reader["DBClusterEndpointArn"].readIfPresent() + value.dbClusterEndpointIdentifier = try reader["DBClusterEndpointIdentifier"].readIfPresent() + value.dbClusterEndpointResourceIdentifier = try reader["DBClusterEndpointResourceIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.endpointType = try reader["EndpointType"].readIfPresent() + value.excludedMembers = try reader["ExcludedMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.staticMembers = try reader["StaticMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -22198,106 +16459,33 @@ public struct DeleteDBClusterEndpointOutput: Swift.Equatable { } } -struct DeleteDBClusterEndpointOutputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointResourceIdentifier: Swift.String? - let endpoint: Swift.String? - let status: Swift.String? - let endpointType: Swift.String? - let customEndpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? - let dbClusterEndpointArn: Swift.String? -} +enum DeleteDBClusterEndpointOutputError { -extension DeleteDBClusterEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customEndpointType = "CustomEndpointType" - case dbClusterEndpointArn = "DBClusterEndpointArn" - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterEndpointResourceIdentifier = "DBClusterEndpointResourceIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case endpoint = "Endpoint" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterEndpointResult")) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointResourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointResourceIdentifier) - dbClusterEndpointResourceIdentifier = dbClusterEndpointResourceIdentifierDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let customEndpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customEndpointType) - customEndpointType = customEndpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil - } - let dbClusterEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointArn) - dbClusterEndpointArn = dbClusterEndpointArnDecoded - } -} - -enum DeleteDBClusterEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterEndpointNotFoundFault": return try await DBClusterEndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterEndpointStateFault": return try await InvalidDBClusterEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterEndpointNotFoundFault": return try await DBClusterEndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterEndpointStateFault": return try await InvalidDBClusterEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case deleteAutomatedBackups = "DeleteAutomatedBackups" + case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" + case skipFinalSnapshot = "SkipFinalSnapshot" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -22358,42 +16546,15 @@ public struct DeleteDBClusterInput: Swift.Equatable { } } -struct DeleteDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let skipFinalSnapshot: Swift.Bool? - let finalDBSnapshotIdentifier: Swift.String? - let deleteAutomatedBackups: Swift.Bool? -} - -extension DeleteDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case deleteAutomatedBackups = "DeleteAutomatedBackups" - case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" - case skipFinalSnapshot = "SkipFinalSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let skipFinalSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipFinalSnapshot) - skipFinalSnapshot = skipFinalSnapshotDecoded - let finalDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalDBSnapshotIdentifier) - finalDBSnapshotIdentifier = finalDBSnapshotIdentifierDecoded - let deleteAutomatedBackupsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteAutomatedBackups) - deleteAutomatedBackups = deleteAutomatedBackupsDecoded - } -} +extension DeleteDBClusterOutput { -extension DeleteDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterResult"] + var value = DeleteDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -22410,39 +16571,33 @@ public struct DeleteDBClusterOutput: Swift.Equatable { } } -struct DeleteDBClusterOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} +enum DeleteDBClusterOutputError { -extension DeleteDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum DeleteDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAutomatedBackupQuotaExceededFault": return try await DBClusterAutomatedBackupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAutomatedBackupQuotaExceededFault": return try await DBClusterAutomatedBackupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotAlreadyExistsFault": return try await DBClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -22480,24 +16635,12 @@ public struct DeleteDBClusterParameterGroupInput: Swift.Equatable { } } -struct DeleteDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension DeleteDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } +extension DeleteDBClusterParameterGroupOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} - -extension DeleteDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBClusterParameterGroupOutput() + } } } @@ -22506,18 +16649,29 @@ public struct DeleteDBClusterParameterGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBClusterParameterGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifier { @@ -22549,30 +16703,15 @@ public struct DeleteDBClusterSnapshotInput: Swift.Equatable { } } -struct DeleteDBClusterSnapshotInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? -} - -extension DeleteDBClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - } +extension DeleteDBClusterSnapshotOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - } -} - -extension DeleteDBClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshot = output.dbClusterSnapshot - } else { - self.dbClusterSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBClusterSnapshotResult"] + var value = DeleteDBClusterSnapshotOutput() + value.dbClusterSnapshot = try reader["DBClusterSnapshot"].readIfPresent(readingClosure: RDSClientTypes.DBClusterSnapshot.readingClosure) + return value } } } @@ -22589,35 +16728,30 @@ public struct DeleteDBClusterSnapshotOutput: Swift.Equatable { } } -struct DeleteDBClusterSnapshotOutputBody: Swift.Equatable { - let dbClusterSnapshot: RDSClientTypes.DBClusterSnapshot? -} - -extension DeleteDBClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshot = "DBClusterSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBClusterSnapshotResult")) - let dbClusterSnapshotDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBClusterSnapshot.self, forKey: .dbClusterSnapshot) - dbClusterSnapshot = dbClusterSnapshotDecoded - } -} +enum DeleteDBClusterSnapshotOutputError { -enum DeleteDBClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBInstanceAutomatedBackupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceAutomatedBackupsArn = "DBInstanceAutomatedBackupsArn" + case dbiResourceId = "DbiResourceId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceAutomatedBackupsArn = dbInstanceAutomatedBackupsArn { @@ -22655,34 +16789,15 @@ public struct DeleteDBInstanceAutomatedBackupInput: Swift.Equatable { } } -struct DeleteDBInstanceAutomatedBackupInputBody: Swift.Equatable { - let dbiResourceId: Swift.String? - let dbInstanceAutomatedBackupsArn: Swift.String? -} - -extension DeleteDBInstanceAutomatedBackupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceAutomatedBackupsArn = "DBInstanceAutomatedBackupsArn" - case dbiResourceId = "DbiResourceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - let dbInstanceAutomatedBackupsArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceAutomatedBackupsArn) - dbInstanceAutomatedBackupsArn = dbInstanceAutomatedBackupsArnDecoded - } -} +extension DeleteDBInstanceAutomatedBackupOutput { -extension DeleteDBInstanceAutomatedBackupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBInstanceAutomatedBackupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstanceAutomatedBackup = output.dbInstanceAutomatedBackup - } else { - self.dbInstanceAutomatedBackup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBInstanceAutomatedBackupResult"] + var value = DeleteDBInstanceAutomatedBackupOutput() + value.dbInstanceAutomatedBackup = try reader["DBInstanceAutomatedBackup"].readIfPresent(readingClosure: RDSClientTypes.DBInstanceAutomatedBackup.readingClosure) + return value } } } @@ -22699,35 +16814,32 @@ public struct DeleteDBInstanceAutomatedBackupOutput: Swift.Equatable { } } -struct DeleteDBInstanceAutomatedBackupOutputBody: Swift.Equatable { - let dbInstanceAutomatedBackup: RDSClientTypes.DBInstanceAutomatedBackup? -} - -extension DeleteDBInstanceAutomatedBackupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceAutomatedBackup = "DBInstanceAutomatedBackup" - } +enum DeleteDBInstanceAutomatedBackupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBInstanceAutomatedBackupResult")) - let dbInstanceAutomatedBackupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstanceAutomatedBackup.self, forKey: .dbInstanceAutomatedBackup) - dbInstanceAutomatedBackup = dbInstanceAutomatedBackupDecoded - } -} - -enum DeleteDBInstanceAutomatedBackupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceAutomatedBackupNotFound": return try await DBInstanceAutomatedBackupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceAutomatedBackupState": return try await InvalidDBInstanceAutomatedBackupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceAutomatedBackupNotFound": return try await DBInstanceAutomatedBackupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceAutomatedBackupState": return try await InvalidDBInstanceAutomatedBackupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case deleteAutomatedBackups = "DeleteAutomatedBackups" + case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" + case skipFinalSnapshot = "SkipFinalSnapshot" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -22790,42 +16902,15 @@ public struct DeleteDBInstanceInput: Swift.Equatable { } } -struct DeleteDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let skipFinalSnapshot: Swift.Bool? - let finalDBSnapshotIdentifier: Swift.String? - let deleteAutomatedBackups: Swift.Bool? -} +extension DeleteDBInstanceOutput { -extension DeleteDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case deleteAutomatedBackups = "DeleteAutomatedBackups" - case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" - case skipFinalSnapshot = "SkipFinalSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let skipFinalSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipFinalSnapshot) - skipFinalSnapshot = skipFinalSnapshotDecoded - let finalDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalDBSnapshotIdentifier) - finalDBSnapshotIdentifier = finalDBSnapshotIdentifierDecoded - let deleteAutomatedBackupsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteAutomatedBackups) - deleteAutomatedBackups = deleteAutomatedBackupsDecoded - } -} - -extension DeleteDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBInstanceResult"] + var value = DeleteDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -22842,39 +16927,33 @@ public struct DeleteDBInstanceOutput: Swift.Equatable { } } -struct DeleteDBInstanceOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension DeleteDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum DeleteDBInstanceOutputError { -enum DeleteDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceAutomatedBackupQuotaExceeded": return try await DBInstanceAutomatedBackupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceAutomatedBackupQuotaExceeded": return try await DBInstanceAutomatedBackupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -22912,24 +16991,12 @@ public struct DeleteDBParameterGroupInput: Swift.Equatable { } } -struct DeleteDBParameterGroupInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? -} +extension DeleteDBParameterGroupOutput { -extension DeleteDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - } -} - -extension DeleteDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBParameterGroupOutput() + } } } @@ -22938,18 +17005,29 @@ public struct DeleteDBParameterGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBParameterGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBProxyEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbProxyEndpointName = "DBProxyEndpointName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbProxyEndpointName = dbProxyEndpointName { @@ -22980,30 +17058,15 @@ public struct DeleteDBProxyEndpointInput: Swift.Equatable { } } -struct DeleteDBProxyEndpointInputBody: Swift.Equatable { - let dbProxyEndpointName: Swift.String? -} - -extension DeleteDBProxyEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyEndpointName = "DBProxyEndpointName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyEndpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyEndpointName) - dbProxyEndpointName = dbProxyEndpointNameDecoded - } -} +extension DeleteDBProxyEndpointOutput { -extension DeleteDBProxyEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBProxyEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxyEndpoint = output.dbProxyEndpoint - } else { - self.dbProxyEndpoint = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBProxyEndpointResult"] + var value = DeleteDBProxyEndpointOutput() + value.dbProxyEndpoint = try reader["DBProxyEndpoint"].readIfPresent(readingClosure: RDSClientTypes.DBProxyEndpoint.readingClosure) + return value } } } @@ -23020,35 +17083,29 @@ public struct DeleteDBProxyEndpointOutput: Swift.Equatable { } } -struct DeleteDBProxyEndpointOutputBody: Swift.Equatable { - let dbProxyEndpoint: RDSClientTypes.DBProxyEndpoint? -} - -extension DeleteDBProxyEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyEndpoint = "DBProxyEndpoint" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBProxyEndpointResult")) - let dbProxyEndpointDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxyEndpoint.self, forKey: .dbProxyEndpoint) - dbProxyEndpoint = dbProxyEndpointDecoded - } -} +enum DeleteDBProxyEndpointOutputError { -enum DeleteDBProxyEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyEndpointNotFoundFault": return try await DBProxyEndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyEndpointStateFault": return try await InvalidDBProxyEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyEndpointNotFoundFault": return try await DBProxyEndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyEndpointStateFault": return try await InvalidDBProxyEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBProxyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbProxyName = "DBProxyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbProxyName = dbProxyName { @@ -23079,30 +17136,15 @@ public struct DeleteDBProxyInput: Swift.Equatable { } } -struct DeleteDBProxyInputBody: Swift.Equatable { - let dbProxyName: Swift.String? -} - -extension DeleteDBProxyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyName = "DBProxyName" - } +extension DeleteDBProxyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - } -} - -extension DeleteDBProxyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBProxyOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxy = output.dbProxy - } else { - self.dbProxy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBProxyResult"] + var value = DeleteDBProxyOutput() + value.dbProxy = try reader["DBProxy"].readIfPresent(readingClosure: RDSClientTypes.DBProxy.readingClosure) + return value } } } @@ -23119,35 +17161,29 @@ public struct DeleteDBProxyOutput: Swift.Equatable { } } -struct DeleteDBProxyOutputBody: Swift.Equatable { - let dbProxy: RDSClientTypes.DBProxy? -} +enum DeleteDBProxyOutputError { -extension DeleteDBProxyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxy = "DBProxy" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBProxyResult")) - let dbProxyDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxy.self, forKey: .dbProxy) - dbProxy = dbProxyDecoded - } -} - -enum DeleteDBProxyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBSecurityGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSecurityGroupName = "DBSecurityGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSecurityGroupName = dbSecurityGroupName { @@ -23187,24 +17223,12 @@ public struct DeleteDBSecurityGroupInput: Swift.Equatable { } } -struct DeleteDBSecurityGroupInputBody: Swift.Equatable { - let dbSecurityGroupName: Swift.String? -} - -extension DeleteDBSecurityGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSecurityGroupName = "DBSecurityGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupName) - dbSecurityGroupName = dbSecurityGroupNameDecoded - } -} +extension DeleteDBSecurityGroupOutput { -extension DeleteDBSecurityGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBSecurityGroupOutput() + } } } @@ -23213,18 +17237,29 @@ public struct DeleteDBSecurityGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBSecurityGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBSecurityGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSnapshotIdentifier = "DBSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSnapshotIdentifier = dbSnapshotIdentifier { @@ -23256,30 +17291,15 @@ public struct DeleteDBSnapshotInput: Swift.Equatable { } } -struct DeleteDBSnapshotInputBody: Swift.Equatable { - let dbSnapshotIdentifier: Swift.String? -} - -extension DeleteDBSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshotIdentifier = "DBSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - } -} +extension DeleteDBSnapshotOutput { -extension DeleteDBSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteDBSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSnapshot = output.dbSnapshot - } else { - self.dbSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteDBSnapshotResult"] + var value = DeleteDBSnapshotOutput() + value.dbSnapshot = try reader["DBSnapshot"].readIfPresent(readingClosure: RDSClientTypes.DBSnapshot.readingClosure) + return value } } } @@ -23296,35 +17316,29 @@ public struct DeleteDBSnapshotOutput: Swift.Equatable { } } -struct DeleteDBSnapshotOutputBody: Swift.Equatable { - let dbSnapshot: RDSClientTypes.DBSnapshot? -} - -extension DeleteDBSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshot = "DBSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteDBSnapshotResult")) - let dbSnapshotDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSnapshot.self, forKey: .dbSnapshot) - dbSnapshot = dbSnapshotDecoded - } -} +enum DeleteDBSnapshotOutputError { -enum DeleteDBSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupName = "DBSubnetGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupName = dbSubnetGroupName { @@ -23356,24 +17370,12 @@ public struct DeleteDBSubnetGroupInput: Swift.Equatable { } } -struct DeleteDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? -} - -extension DeleteDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupName = "DBSubnetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - } -} +extension DeleteDBSubnetGroupOutput { -extension DeleteDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteDBSubnetGroupOutput() + } } } @@ -23382,19 +17384,30 @@ public struct DeleteDBSubnetGroupOutput: Swift.Equatable { public init() { } } -enum DeleteDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetStateFault": return try await InvalidDBSubnetStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteDBSubnetGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetStateFault": return try await InvalidDBSubnetStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let subscriptionName = subscriptionName { @@ -23426,30 +17439,15 @@ public struct DeleteEventSubscriptionInput: Swift.Equatable { } } -struct DeleteEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? -} - -extension DeleteEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - } -} +extension DeleteEventSubscriptionOutput { -extension DeleteEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteEventSubscriptionResult"] + var value = DeleteEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: RDSClientTypes.EventSubscription.readingClosure) + return value } } } @@ -23466,35 +17464,29 @@ public struct DeleteEventSubscriptionOutput: Swift.Equatable { } } -struct DeleteEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: RDSClientTypes.EventSubscription? -} - -extension DeleteEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(RDSClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum DeleteEventSubscriptionOutputError { -enum DeleteEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidEventSubscriptionState": return try await InvalidEventSubscriptionStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidEventSubscriptionState": return try await InvalidEventSubscriptionStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalClusterIdentifier = "GlobalClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalClusterIdentifier = globalClusterIdentifier { @@ -23525,30 +17517,15 @@ public struct DeleteGlobalClusterInput: Swift.Equatable { } } -struct DeleteGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? -} - -extension DeleteGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusterIdentifier = "GlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - } -} +extension DeleteGlobalClusterOutput { -extension DeleteGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteGlobalClusterResult"] + var value = DeleteGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: RDSClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -23565,35 +17542,29 @@ public struct DeleteGlobalClusterOutput: Swift.Equatable { } } -struct DeleteGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: RDSClientTypes.GlobalCluster? -} - -extension DeleteGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum DeleteGlobalClusterOutputError { -enum DeleteGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteIntegrationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case integrationIdentifier = "IntegrationIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let integrationIdentifier = integrationIdentifier { @@ -23624,48 +17595,24 @@ public struct DeleteIntegrationInput: Swift.Equatable { } } -struct DeleteIntegrationInputBody: Swift.Equatable { - let integrationIdentifier: Swift.String? -} - -extension DeleteIntegrationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case integrationIdentifier = "IntegrationIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let integrationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationIdentifier) - integrationIdentifier = integrationIdentifierDecoded - } -} +extension DeleteIntegrationOutput { -extension DeleteIntegrationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteIntegrationOutputBody = try responseDecoder.decode(responseBody: data) - self.additionalEncryptionContext = output.additionalEncryptionContext - self.createTime = output.createTime - self.errors = output.errors - self.integrationArn = output.integrationArn - self.integrationName = output.integrationName - self.kmsKeyId = output.kmsKeyId - self.sourceArn = output.sourceArn - self.status = output.status - self.tags = output.tags - self.targetArn = output.targetArn - } else { - self.additionalEncryptionContext = nil - self.createTime = nil - self.errors = nil - self.integrationArn = nil - self.integrationName = nil - self.kmsKeyId = nil - self.sourceArn = nil - self.status = nil - self.tags = nil - self.targetArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteIntegrationResult"] + var value = DeleteIntegrationOutput() + value.additionalEncryptionContext = try reader["AdditionalEncryptionContext"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.errors = try reader["Errors"].readListIfPresent(memberReadingClosure: RDSClientTypes.IntegrationError.readingClosure, memberNodeInfo: "IntegrationError", isFlattened: false) + value.integrationArn = try reader["IntegrationArn"].readIfPresent() + value.integrationName = try reader["IntegrationName"].readIfPresent() + value.kmsKeyId = try reader["KMSKeyId"].readIfPresent() + value.sourceArn = try reader["SourceArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.targetArn = try reader["TargetArn"].readIfPresent() + return value } } } @@ -23719,123 +17666,30 @@ public struct DeleteIntegrationOutput: Swift.Equatable { } } -struct DeleteIntegrationOutputBody: Swift.Equatable { - let sourceArn: Swift.String? - let targetArn: Swift.String? - let integrationName: Swift.String? - let integrationArn: Swift.String? - let kmsKeyId: Swift.String? - let additionalEncryptionContext: [Swift.String:Swift.String]? - let status: RDSClientTypes.IntegrationStatus? - let tags: [RDSClientTypes.Tag]? - let createTime: ClientRuntime.Date? - let errors: [RDSClientTypes.IntegrationError]? -} - -extension DeleteIntegrationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalEncryptionContext = "AdditionalEncryptionContext" - case createTime = "CreateTime" - case errors = "Errors" - case integrationArn = "IntegrationArn" - case integrationName = "IntegrationName" - case kmsKeyId = "KMSKeyId" - case sourceArn = "SourceArn" - case status = "Status" - case tags = "Tags" - case targetArn = "TargetArn" - } +enum DeleteIntegrationOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteIntegrationResult")) - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let targetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetArn) - targetArn = targetArnDecoded - let integrationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationName) - integrationName = integrationNameDecoded - let integrationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationArn) - integrationArn = integrationArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.additionalEncryptionContext) { - struct KeyVal0{struct key{}; struct value{}} - let additionalEncryptionContextWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .additionalEncryptionContext) - if let additionalEncryptionContextWrappedContainer = additionalEncryptionContextWrappedContainer { - let additionalEncryptionContextContainer = try additionalEncryptionContextWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var additionalEncryptionContextBuffer: [Swift.String:Swift.String]? = nil - if let additionalEncryptionContextContainer = additionalEncryptionContextContainer { - additionalEncryptionContextBuffer = [Swift.String:Swift.String]() - for stringContainer0 in additionalEncryptionContextContainer { - additionalEncryptionContextBuffer?[stringContainer0.key] = stringContainer0.value - } - } - additionalEncryptionContext = additionalEncryptionContextBuffer - } else { - additionalEncryptionContext = [:] - } - } else { - additionalEncryptionContext = nil - } - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.IntegrationStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - if containerValues.contains(.errors) { - struct KeyVal0{struct IntegrationError{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([RDSClientTypes.IntegrationError].self, forKey: .member) - var errorsBuffer:[RDSClientTypes.IntegrationError]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [RDSClientTypes.IntegrationError]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] - } - } else { - errors = nil - } - } -} - -enum DeleteIntegrationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "IntegrationConflictOperationFault": return try await IntegrationConflictOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIntegrationStateFault": return try await InvalidIntegrationStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "IntegrationConflictOperationFault": return try await IntegrationConflictOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidIntegrationStateFault": return try await InvalidIntegrationStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteOptionGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case optionGroupName = "OptionGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let optionGroupName = optionGroupName { @@ -23867,24 +17721,12 @@ public struct DeleteOptionGroupInput: Swift.Equatable { } } -struct DeleteOptionGroupInputBody: Swift.Equatable { - let optionGroupName: Swift.String? -} +extension DeleteOptionGroupOutput { -extension DeleteOptionGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case optionGroupName = "OptionGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - } -} - -extension DeleteOptionGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteOptionGroupOutput() + } } } @@ -23893,18 +17735,32 @@ public struct DeleteOptionGroupOutput: Swift.Equatable { public init() { } } -enum DeleteOptionGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOptionGroupStateFault": return try await InvalidOptionGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteOptionGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOptionGroupStateFault": return try await InvalidOptionGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteTenantDatabaseInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" + case skipFinalSnapshot = "SkipFinalSnapshot" + case tenantDBName = "TenantDBName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -23957,42 +17813,15 @@ public struct DeleteTenantDatabaseInput: Swift.Equatable { } } -struct DeleteTenantDatabaseInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let tenantDBName: Swift.String? - let skipFinalSnapshot: Swift.Bool? - let finalDBSnapshotIdentifier: Swift.String? -} +extension DeleteTenantDatabaseOutput { -extension DeleteTenantDatabaseInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case finalDBSnapshotIdentifier = "FinalDBSnapshotIdentifier" - case skipFinalSnapshot = "SkipFinalSnapshot" - case tenantDBName = "TenantDBName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let tenantDBNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDBName) - tenantDBName = tenantDBNameDecoded - let skipFinalSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipFinalSnapshot) - skipFinalSnapshot = skipFinalSnapshotDecoded - let finalDBSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalDBSnapshotIdentifier) - finalDBSnapshotIdentifier = finalDBSnapshotIdentifierDecoded - } -} - -extension DeleteTenantDatabaseOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteTenantDatabaseOutputBody = try responseDecoder.decode(responseBody: data) - self.tenantDatabase = output.tenantDatabase - } else { - self.tenantDatabase = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteTenantDatabaseResult"] + var value = DeleteTenantDatabaseOutput() + value.tenantDatabase = try reader["TenantDatabase"].readIfPresent(readingClosure: RDSClientTypes.TenantDatabase.readingClosure) + return value } } } @@ -24009,36 +17838,33 @@ public struct DeleteTenantDatabaseOutput: Swift.Equatable { } } -struct DeleteTenantDatabaseOutputBody: Swift.Equatable { - let tenantDatabase: RDSClientTypes.TenantDatabase? -} - -extension DeleteTenantDatabaseOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tenantDatabase = "TenantDatabase" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteTenantDatabaseResult")) - let tenantDatabaseDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TenantDatabase.self, forKey: .tenantDatabase) - tenantDatabase = tenantDatabaseDecoded - } -} +enum DeleteTenantDatabaseOutputError { -enum DeleteTenantDatabaseOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeregisterDBProxyTargetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifiers = "DBClusterIdentifiers" + case dbInstanceIdentifiers = "DBInstanceIdentifiers" + case dbProxyName = "DBProxyName" + case targetGroupName = "TargetGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifiers = dbClusterIdentifiers { @@ -24108,92 +17934,42 @@ public struct DeregisterDBProxyTargetsInput: Swift.Equatable { } } -struct DeregisterDBProxyTargetsInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let targetGroupName: Swift.String? - let dbInstanceIdentifiers: [Swift.String]? - let dbClusterIdentifiers: [Swift.String]? -} - -extension DeregisterDBProxyTargetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifiers = "DBClusterIdentifiers" - case dbInstanceIdentifiers = "DBInstanceIdentifiers" - case dbProxyName = "DBProxyName" - case targetGroupName = "TargetGroupName" - } +extension DeregisterDBProxyTargetsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let targetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupName) - targetGroupName = targetGroupNameDecoded - if containerValues.contains(.dbInstanceIdentifiers) { - struct KeyVal0{struct member{}} - let dbInstanceIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbInstanceIdentifiers) - if let dbInstanceIdentifiersWrappedContainer = dbInstanceIdentifiersWrappedContainer { - let dbInstanceIdentifiersContainer = try dbInstanceIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbInstanceIdentifiersBuffer:[Swift.String]? = nil - if let dbInstanceIdentifiersContainer = dbInstanceIdentifiersContainer { - dbInstanceIdentifiersBuffer = [Swift.String]() - for stringContainer0 in dbInstanceIdentifiersContainer { - dbInstanceIdentifiersBuffer?.append(stringContainer0) - } - } - dbInstanceIdentifiers = dbInstanceIdentifiersBuffer - } else { - dbInstanceIdentifiers = [] - } - } else { - dbInstanceIdentifiers = nil - } - if containerValues.contains(.dbClusterIdentifiers) { - struct KeyVal0{struct member{}} - let dbClusterIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterIdentifiers) - if let dbClusterIdentifiersWrappedContainer = dbClusterIdentifiersWrappedContainer { - let dbClusterIdentifiersContainer = try dbClusterIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbClusterIdentifiersBuffer:[Swift.String]? = nil - if let dbClusterIdentifiersContainer = dbClusterIdentifiersContainer { - dbClusterIdentifiersBuffer = [Swift.String]() - for stringContainer0 in dbClusterIdentifiersContainer { - dbClusterIdentifiersBuffer?.append(stringContainer0) - } - } - dbClusterIdentifiers = dbClusterIdentifiersBuffer - } else { - dbClusterIdentifiers = [] - } - } else { - dbClusterIdentifiers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeregisterDBProxyTargetsOutput() } } } -extension DeregisterDBProxyTargetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DeregisterDBProxyTargetsOutput: Swift.Equatable { public init() { } } -enum DeregisterDBProxyTargetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetNotFoundFault": return try await DBProxyTargetNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeregisterDBProxyTargetsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetNotFoundFault": return try await DBProxyTargetNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeAccountAttributesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeAccountAttributes", forKey:ClientRuntime.Key("Action")) @@ -24214,14 +17990,15 @@ public struct DescribeAccountAttributesInput: Swift.Equatable { public init() { } } -extension DescribeAccountAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAccountAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.accountQuotas = output.accountQuotas - } else { - self.accountQuotas = nil +extension DescribeAccountAttributesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAccountAttributesResult"] + var value = DescribeAccountAttributesOutput() + value.accountQuotas = try reader["AccountQuotas"].readListIfPresent(memberReadingClosure: RDSClientTypes.AccountQuota.readingClosure, memberNodeInfo: "AccountQuota", isFlattened: false) + return value } } } @@ -24239,50 +18016,30 @@ public struct DescribeAccountAttributesOutput: Swift.Equatable { } } -struct DescribeAccountAttributesOutputBody: Swift.Equatable { - let accountQuotas: [RDSClientTypes.AccountQuota]? -} - -extension DescribeAccountAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountQuotas = "AccountQuotas" - } +enum DescribeAccountAttributesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAccountAttributesResult")) - if containerValues.contains(.accountQuotas) { - struct KeyVal0{struct AccountQuota{}} - let accountQuotasWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accountQuotas) - if let accountQuotasWrappedContainer = accountQuotasWrappedContainer { - let accountQuotasContainer = try accountQuotasWrappedContainer.decodeIfPresent([RDSClientTypes.AccountQuota].self, forKey: .member) - var accountQuotasBuffer:[RDSClientTypes.AccountQuota]? = nil - if let accountQuotasContainer = accountQuotasContainer { - accountQuotasBuffer = [RDSClientTypes.AccountQuota]() - for structureContainer0 in accountQuotasContainer { - accountQuotasBuffer?.append(structureContainer0) - } - } - accountQuotas = accountQuotasBuffer - } else { - accountQuotas = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - accountQuotas = nil } } } -enum DescribeAccountAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeBlueGreenDeploymentsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case blueGreenDeploymentIdentifier = "BlueGreenDeploymentIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeBlueGreenDeploymentsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let blueGreenDeploymentIdentifier = blueGreenDeploymentIdentifier { @@ -24356,61 +18113,16 @@ public struct DescribeBlueGreenDeploymentsInput: Swift.Equatable { } } -struct DescribeBlueGreenDeploymentsInputBody: Swift.Equatable { - let blueGreenDeploymentIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeBlueGreenDeploymentsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blueGreenDeploymentIdentifier = "BlueGreenDeploymentIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let blueGreenDeploymentIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .blueGreenDeploymentIdentifier) - blueGreenDeploymentIdentifier = blueGreenDeploymentIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribeBlueGreenDeploymentsOutput { -extension DescribeBlueGreenDeploymentsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeBlueGreenDeploymentsOutputBody = try responseDecoder.decode(responseBody: data) - self.blueGreenDeployments = output.blueGreenDeployments - self.marker = output.marker - } else { - self.blueGreenDeployments = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeBlueGreenDeploymentsResult"] + var value = DescribeBlueGreenDeploymentsOutput() + value.blueGreenDeployments = try reader["BlueGreenDeployments"].readListIfPresent(memberReadingClosure: RDSClientTypes.BlueGreenDeployment.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -24431,55 +18143,31 @@ public struct DescribeBlueGreenDeploymentsOutput: Swift.Equatable { } } -struct DescribeBlueGreenDeploymentsOutputBody: Swift.Equatable { - let blueGreenDeployments: [RDSClientTypes.BlueGreenDeployment]? - let marker: Swift.String? -} - -extension DescribeBlueGreenDeploymentsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blueGreenDeployments = "BlueGreenDeployments" - case marker = "Marker" - } +enum DescribeBlueGreenDeploymentsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeBlueGreenDeploymentsResult")) - if containerValues.contains(.blueGreenDeployments) { - struct KeyVal0{struct member{}} - let blueGreenDeploymentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .blueGreenDeployments) - if let blueGreenDeploymentsWrappedContainer = blueGreenDeploymentsWrappedContainer { - let blueGreenDeploymentsContainer = try blueGreenDeploymentsWrappedContainer.decodeIfPresent([RDSClientTypes.BlueGreenDeployment].self, forKey: .member) - var blueGreenDeploymentsBuffer:[RDSClientTypes.BlueGreenDeployment]? = nil - if let blueGreenDeploymentsContainer = blueGreenDeploymentsContainer { - blueGreenDeploymentsBuffer = [RDSClientTypes.BlueGreenDeployment]() - for structureContainer0 in blueGreenDeploymentsContainer { - blueGreenDeploymentsBuffer?.append(structureContainer0) - } - } - blueGreenDeployments = blueGreenDeploymentsBuffer - } else { - blueGreenDeployments = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - blueGreenDeployments = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeBlueGreenDeploymentsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateIdentifier = "CertificateIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeCertificatesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificateIdentifier = certificateIdentifier { @@ -24542,63 +18230,17 @@ public struct DescribeCertificatesInput: Swift.Equatable { } } -struct DescribeCertificatesInputBody: Swift.Equatable { - let certificateIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateIdentifier = "CertificateIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateIdentifier) - certificateIdentifier = certificateIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeCertificatesOutput { -extension DescribeCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCertificatesOutputBody = try responseDecoder.decode(responseBody: data) - self.certificates = output.certificates - self.defaultCertificateForNewLaunches = output.defaultCertificateForNewLaunches - self.marker = output.marker - } else { - self.certificates = nil - self.defaultCertificateForNewLaunches = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCertificatesResult"] + var value = DescribeCertificatesOutput() + value.certificates = try reader["Certificates"].readListIfPresent(memberReadingClosure: RDSClientTypes.Certificate.readingClosure, memberNodeInfo: "Certificate", isFlattened: false) + value.defaultCertificateForNewLaunches = try reader["DefaultCertificateForNewLaunches"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -24624,59 +18266,32 @@ public struct DescribeCertificatesOutput: Swift.Equatable { } } -struct DescribeCertificatesOutputBody: Swift.Equatable { - let defaultCertificateForNewLaunches: Swift.String? - let certificates: [RDSClientTypes.Certificate]? - let marker: Swift.String? -} - -extension DescribeCertificatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificates = "Certificates" - case defaultCertificateForNewLaunches = "DefaultCertificateForNewLaunches" - case marker = "Marker" - } +enum DescribeCertificatesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCertificatesResult")) - let defaultCertificateForNewLaunchesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultCertificateForNewLaunches) - defaultCertificateForNewLaunches = defaultCertificateForNewLaunchesDecoded - if containerValues.contains(.certificates) { - struct KeyVal0{struct Certificate{}} - let certificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificates) - if let certificatesWrappedContainer = certificatesWrappedContainer { - let certificatesContainer = try certificatesWrappedContainer.decodeIfPresent([RDSClientTypes.Certificate].self, forKey: .member) - var certificatesBuffer:[RDSClientTypes.Certificate]? = nil - if let certificatesContainer = certificatesContainer { - certificatesBuffer = [RDSClientTypes.Certificate]() - for structureContainer0 in certificatesContainer { - certificatesBuffer?.append(structureContainer0) - } - } - certificates = certificatesBuffer - } else { - certificates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CertificateNotFound": return try await CertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - certificates = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CertificateNotFound": return try await CertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterAutomatedBackupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterResourceId = "DbClusterResourceId" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClusterAutomatedBackupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -24757,65 +18372,16 @@ public struct DescribeDBClusterAutomatedBackupsInput: Swift.Equatable { } } -struct DescribeDBClusterAutomatedBackupsInputBody: Swift.Equatable { - let dbClusterResourceId: Swift.String? - let dbClusterIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeDBClusterAutomatedBackupsOutput { -extension DescribeDBClusterAutomatedBackupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterResourceId = "DbClusterResourceId" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterResourceId) - dbClusterResourceId = dbClusterResourceIdDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBClusterAutomatedBackupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterAutomatedBackupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterAutomatedBackups = output.dbClusterAutomatedBackups - self.marker = output.marker - } else { - self.dbClusterAutomatedBackups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterAutomatedBackupsResult"] + var value = DescribeDBClusterAutomatedBackupsOutput() + value.dbClusterAutomatedBackups = try reader["DBClusterAutomatedBackups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterAutomatedBackup.readingClosure, memberNodeInfo: "DBClusterAutomatedBackup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -24836,55 +18402,32 @@ public struct DescribeDBClusterAutomatedBackupsOutput: Swift.Equatable { } } -struct DescribeDBClusterAutomatedBackupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterAutomatedBackups: [RDSClientTypes.DBClusterAutomatedBackup]? -} +enum DescribeDBClusterAutomatedBackupsOutputError { -extension DescribeDBClusterAutomatedBackupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterAutomatedBackups = "DBClusterAutomatedBackups" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterAutomatedBackupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterAutomatedBackups) { - struct KeyVal0{struct DBClusterAutomatedBackup{}} - let dbClusterAutomatedBackupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterAutomatedBackups) - if let dbClusterAutomatedBackupsWrappedContainer = dbClusterAutomatedBackupsWrappedContainer { - let dbClusterAutomatedBackupsContainer = try dbClusterAutomatedBackupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterAutomatedBackup].self, forKey: .member) - var dbClusterAutomatedBackupsBuffer:[RDSClientTypes.DBClusterAutomatedBackup]? = nil - if let dbClusterAutomatedBackupsContainer = dbClusterAutomatedBackupsContainer { - dbClusterAutomatedBackupsBuffer = [RDSClientTypes.DBClusterAutomatedBackup]() - for structureContainer0 in dbClusterAutomatedBackupsContainer { - dbClusterAutomatedBackupsBuffer?.append(structureContainer0) - } - } - dbClusterAutomatedBackups = dbClusterAutomatedBackupsBuffer - } else { - dbClusterAutomatedBackups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAutomatedBackupNotFoundFault": return try await DBClusterAutomatedBackupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterAutomatedBackups = nil } } } -enum DescribeDBClusterAutomatedBackupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAutomatedBackupNotFoundFault": return try await DBClusterAutomatedBackupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterBacktracksInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case backtrackIdentifier = "BacktrackIdentifier" + case dbClusterIdentifier = "DBClusterIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClusterBacktracksInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let backtrackIdentifier = backtrackIdentifier { @@ -24982,65 +18525,16 @@ public struct DescribeDBClusterBacktracksInput: Swift.Equatable { } } -struct DescribeDBClusterBacktracksInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let backtrackIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClusterBacktracksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case backtrackIdentifier = "BacktrackIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let backtrackIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .backtrackIdentifier) - backtrackIdentifier = backtrackIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBClusterBacktracksOutput { -extension DescribeDBClusterBacktracksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterBacktracksOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterBacktracks = output.dbClusterBacktracks - self.marker = output.marker - } else { - self.dbClusterBacktracks = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterBacktracksResult"] + var value = DescribeDBClusterBacktracksOutput() + value.dbClusterBacktracks = try reader["DBClusterBacktracks"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterBacktrack.readingClosure, memberNodeInfo: "DBClusterBacktrack", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -25062,56 +18556,33 @@ public struct DescribeDBClusterBacktracksOutput: Swift.Equatable { } } -struct DescribeDBClusterBacktracksOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterBacktracks: [RDSClientTypes.DBClusterBacktrack]? -} - -extension DescribeDBClusterBacktracksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterBacktracks = "DBClusterBacktracks" - case marker = "Marker" - } +enum DescribeDBClusterBacktracksOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterBacktracksResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterBacktracks) { - struct KeyVal0{struct DBClusterBacktrack{}} - let dbClusterBacktracksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterBacktracks) - if let dbClusterBacktracksWrappedContainer = dbClusterBacktracksWrappedContainer { - let dbClusterBacktracksContainer = try dbClusterBacktracksWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterBacktrack].self, forKey: .member) - var dbClusterBacktracksBuffer:[RDSClientTypes.DBClusterBacktrack]? = nil - if let dbClusterBacktracksContainer = dbClusterBacktracksContainer { - dbClusterBacktracksBuffer = [RDSClientTypes.DBClusterBacktrack]() - for structureContainer0 in dbClusterBacktracksContainer { - dbClusterBacktracksBuffer?.append(structureContainer0) - } - } - dbClusterBacktracks = dbClusterBacktracksBuffer - } else { - dbClusterBacktracks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterBacktrackNotFoundFault": return try await DBClusterBacktrackNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterBacktracks = nil } } } -enum DescribeDBClusterBacktracksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterBacktrackNotFoundFault": return try await DBClusterBacktrackNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterEndpointsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" + case dbClusterIdentifier = "DBClusterIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClusterEndpointsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterEndpointIdentifier = dbClusterEndpointIdentifier { @@ -25178,65 +18649,16 @@ public struct DescribeDBClusterEndpointsInput: Swift.Equatable { } } -struct DescribeDBClusterEndpointsInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeDBClusterEndpointsOutput { -extension DescribeDBClusterEndpointsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBClusterEndpointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterEndpointsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterEndpoints = output.dbClusterEndpoints - self.marker = output.marker - } else { - self.dbClusterEndpoints = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterEndpointsResult"] + var value = DescribeDBClusterEndpointsOutput() + value.dbClusterEndpoints = try reader["DBClusterEndpoints"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterEndpoint.readingClosure, memberNodeInfo: "DBClusterEndpointList", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -25257,55 +18679,31 @@ public struct DescribeDBClusterEndpointsOutput: Swift.Equatable { } } -struct DescribeDBClusterEndpointsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterEndpoints: [RDSClientTypes.DBClusterEndpoint]? -} - -extension DescribeDBClusterEndpointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpoints = "DBClusterEndpoints" - case marker = "Marker" - } +enum DescribeDBClusterEndpointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterEndpointsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterEndpoints) { - struct KeyVal0{struct DBClusterEndpointList{}} - let dbClusterEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterEndpoints) - if let dbClusterEndpointsWrappedContainer = dbClusterEndpointsWrappedContainer { - let dbClusterEndpointsContainer = try dbClusterEndpointsWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterEndpoint].self, forKey: .member) - var dbClusterEndpointsBuffer:[RDSClientTypes.DBClusterEndpoint]? = nil - if let dbClusterEndpointsContainer = dbClusterEndpointsContainer { - dbClusterEndpointsBuffer = [RDSClientTypes.DBClusterEndpoint]() - for structureContainer0 in dbClusterEndpointsContainer { - dbClusterEndpointsBuffer?.append(structureContainer0) - } - } - dbClusterEndpoints = dbClusterEndpointsBuffer - } else { - dbClusterEndpoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterEndpoints = nil } } } -enum DescribeDBClusterEndpointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterParameterGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClusterParameterGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -25368,61 +18766,16 @@ public struct DescribeDBClusterParameterGroupsInput: Swift.Equatable { } } -struct DescribeDBClusterParameterGroupsInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClusterParameterGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDBClusterParameterGroupsOutput { -extension DescribeDBClusterParameterGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterParameterGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroups = output.dbClusterParameterGroups - self.marker = output.marker - } else { - self.dbClusterParameterGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterParameterGroupsResult"] + var value = DescribeDBClusterParameterGroupsOutput() + value.dbClusterParameterGroups = try reader["DBClusterParameterGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterParameterGroup.readingClosure, memberNodeInfo: "DBClusterParameterGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -25444,55 +18797,32 @@ public struct DescribeDBClusterParameterGroupsOutput: Swift.Equatable { } } -struct DescribeDBClusterParameterGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterParameterGroups: [RDSClientTypes.DBClusterParameterGroup]? -} - -extension DescribeDBClusterParameterGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroups = "DBClusterParameterGroups" - case marker = "Marker" - } +enum DescribeDBClusterParameterGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterParameterGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterParameterGroups) { - struct KeyVal0{struct DBClusterParameterGroup{}} - let dbClusterParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterParameterGroups) - if let dbClusterParameterGroupsWrappedContainer = dbClusterParameterGroupsWrappedContainer { - let dbClusterParameterGroupsContainer = try dbClusterParameterGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterParameterGroup].self, forKey: .member) - var dbClusterParameterGroupsBuffer:[RDSClientTypes.DBClusterParameterGroup]? = nil - if let dbClusterParameterGroupsContainer = dbClusterParameterGroupsContainer { - dbClusterParameterGroupsBuffer = [RDSClientTypes.DBClusterParameterGroup]() - for structureContainer0 in dbClusterParameterGroupsContainer { - dbClusterParameterGroupsBuffer?.append(structureContainer0) - } - } - dbClusterParameterGroups = dbClusterParameterGroupsBuffer - } else { - dbClusterParameterGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterParameterGroups = nil } } } -enum DescribeDBClusterParameterGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case source = "Source" } -} -extension DescribeDBClusterParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -25569,65 +18899,16 @@ public struct DescribeDBClusterParametersInput: Swift.Equatable { } } -struct DescribeDBClusterParametersInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let source: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBClusterParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case source = "Source" - } +extension DescribeDBClusterParametersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBClusterParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.parameters = output.parameters - } else { - self.marker = nil - self.parameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterParametersResult"] + var value = DescribeDBClusterParametersOutput() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: RDSClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -25649,55 +18930,28 @@ public struct DescribeDBClusterParametersOutput: Swift.Equatable { } } -struct DescribeDBClusterParametersOutputBody: Swift.Equatable { - let parameters: [RDSClientTypes.Parameter]? - let marker: Swift.String? -} - -extension DescribeDBClusterParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case parameters = "Parameters" - } +enum DescribeDBClusterParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterParametersResult")) - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RDSClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RDSClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RDSClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - parameters = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBClusterParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClusterSnapshotAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" } -} -extension DescribeDBClusterSnapshotAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifier { @@ -25729,30 +18983,15 @@ public struct DescribeDBClusterSnapshotAttributesInput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotAttributesInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? -} - -extension DescribeDBClusterSnapshotAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - } -} +extension DescribeDBClusterSnapshotAttributesOutput { -extension DescribeDBClusterSnapshotAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterSnapshotAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshotAttributesResult = output.dbClusterSnapshotAttributesResult - } else { - self.dbClusterSnapshotAttributesResult = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterSnapshotAttributesResult"] + var value = DescribeDBClusterSnapshotAttributesOutput() + value.dbClusterSnapshotAttributesResult = try reader["DBClusterSnapshotAttributesResult"].readIfPresent(readingClosure: RDSClientTypes.DBClusterSnapshotAttributesResult.readingClosure) + return value } } } @@ -25769,34 +19008,36 @@ public struct DescribeDBClusterSnapshotAttributesOutput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotAttributesOutputBody: Swift.Equatable { - let dbClusterSnapshotAttributesResult: RDSClientTypes.DBClusterSnapshotAttributesResult? -} - -extension DescribeDBClusterSnapshotAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotAttributesResult = "DBClusterSnapshotAttributesResult" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterSnapshotAttributesResult")) - let dbClusterSnapshotAttributesResultDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBClusterSnapshotAttributesResult.self, forKey: .dbClusterSnapshotAttributesResult) - dbClusterSnapshotAttributesResult = dbClusterSnapshotAttributesResultDecoded - } -} +enum DescribeDBClusterSnapshotAttributesOutputError { -enum DescribeDBClusterSnapshotAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeDBClusterSnapshotsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case dbClusterResourceId = "DbClusterResourceId" + case filters = "Filters" + case includePublic = "IncludePublic" + case includeShared = "IncludeShared" + case marker = "Marker" + case maxRecords = "MaxRecords" + case snapshotType = "SnapshotType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -25917,81 +19158,16 @@ public struct DescribeDBClusterSnapshotsInput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotsInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let dbClusterSnapshotIdentifier: Swift.String? - let snapshotType: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let includeShared: Swift.Bool? - let includePublic: Swift.Bool? - let dbClusterResourceId: Swift.String? -} +extension DescribeDBClusterSnapshotsOutput { -extension DescribeDBClusterSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case dbClusterResourceId = "DbClusterResourceId" - case filters = "Filters" - case includePublic = "IncludePublic" - case includeShared = "IncludeShared" - case marker = "Marker" - case maxRecords = "MaxRecords" - case snapshotType = "SnapshotType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let includeSharedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeShared) - includeShared = includeSharedDecoded - let includePublicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includePublic) - includePublic = includePublicDecoded - let dbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterResourceId) - dbClusterResourceId = dbClusterResourceIdDecoded - } -} - -extension DescribeDBClusterSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClusterSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshots = output.dbClusterSnapshots - self.marker = output.marker - } else { - self.dbClusterSnapshots = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClusterSnapshotsResult"] + var value = DescribeDBClusterSnapshotsOutput() + value.dbClusterSnapshots = try reader["DBClusterSnapshots"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBClusterSnapshot.readingClosure, memberNodeInfo: "DBClusterSnapshot", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -26013,55 +19189,32 @@ public struct DescribeDBClusterSnapshotsOutput: Swift.Equatable { } } -struct DescribeDBClusterSnapshotsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusterSnapshots: [RDSClientTypes.DBClusterSnapshot]? -} - -extension DescribeDBClusterSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshots = "DBClusterSnapshots" - case marker = "Marker" - } +enum DescribeDBClusterSnapshotsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClusterSnapshotsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusterSnapshots) { - struct KeyVal0{struct DBClusterSnapshot{}} - let dbClusterSnapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterSnapshots) - if let dbClusterSnapshotsWrappedContainer = dbClusterSnapshotsWrappedContainer { - let dbClusterSnapshotsContainer = try dbClusterSnapshotsWrappedContainer.decodeIfPresent([RDSClientTypes.DBClusterSnapshot].self, forKey: .member) - var dbClusterSnapshotsBuffer:[RDSClientTypes.DBClusterSnapshot]? = nil - if let dbClusterSnapshotsContainer = dbClusterSnapshotsContainer { - dbClusterSnapshotsBuffer = [RDSClientTypes.DBClusterSnapshot]() - for structureContainer0 in dbClusterSnapshotsContainer { - dbClusterSnapshotsBuffer?.append(structureContainer0) - } - } - dbClusterSnapshots = dbClusterSnapshotsBuffer - } else { - dbClusterSnapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusterSnapshots = nil } } } -enum DescribeDBClusterSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBClustersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case filters = "Filters" + case includeShared = "IncludeShared" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBClustersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -26141,65 +19294,16 @@ public struct DescribeDBClustersInput: Swift.Equatable { } } -struct DescribeDBClustersInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let includeShared: Swift.Bool? -} - -extension DescribeDBClustersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case filters = "Filters" - case includeShared = "IncludeShared" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let includeSharedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeShared) - includeShared = includeSharedDecoded - } -} +extension DescribeDBClustersOutput { -extension DescribeDBClustersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBClustersOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusters = output.dbClusters - self.marker = output.marker - } else { - self.dbClusters = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBClustersResult"] + var value = DescribeDBClustersOutput() + value.dbClusters = try reader["DBClusters"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBCluster.readingClosure, memberNodeInfo: "DBCluster", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -26221,55 +19325,37 @@ public struct DescribeDBClustersOutput: Swift.Equatable { } } -struct DescribeDBClustersOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbClusters: [RDSClientTypes.DBCluster]? -} - -extension DescribeDBClustersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusters = "DBClusters" - case marker = "Marker" - } +enum DescribeDBClustersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBClustersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbClusters) { - struct KeyVal0{struct DBCluster{}} - let dbClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusters) - if let dbClustersWrappedContainer = dbClustersWrappedContainer { - let dbClustersContainer = try dbClustersWrappedContainer.decodeIfPresent([RDSClientTypes.DBCluster].self, forKey: .member) - var dbClustersBuffer:[RDSClientTypes.DBCluster]? = nil - if let dbClustersContainer = dbClustersContainer { - dbClustersBuffer = [RDSClientTypes.DBCluster]() - for structureContainer0 in dbClustersContainer { - dbClustersBuffer?.append(structureContainer0) - } - } - dbClusters = dbClustersBuffer - } else { - dbClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbClusters = nil } } } -enum DescribeDBClustersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBEngineVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case defaultOnly = "DefaultOnly" + case engine = "Engine" + case engineVersion = "EngineVersion" + case filters = "Filters" + case includeAll = "IncludeAll" + case listSupportedCharacterSets = "ListSupportedCharacterSets" + case listSupportedTimezones = "ListSupportedTimezones" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBEngineVersionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -26432,85 +19518,16 @@ public struct DescribeDBEngineVersionsInput: Swift.Equatable { } } -struct DescribeDBEngineVersionsInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbParameterGroupFamily: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let defaultOnly: Swift.Bool? - let listSupportedCharacterSets: Swift.Bool? - let listSupportedTimezones: Swift.Bool? - let includeAll: Swift.Bool? -} +extension DescribeDBEngineVersionsOutput { -extension DescribeDBEngineVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case defaultOnly = "DefaultOnly" - case engine = "Engine" - case engineVersion = "EngineVersion" - case filters = "Filters" - case includeAll = "IncludeAll" - case listSupportedCharacterSets = "ListSupportedCharacterSets" - case listSupportedTimezones = "ListSupportedTimezones" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let defaultOnlyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .defaultOnly) - defaultOnly = defaultOnlyDecoded - let listSupportedCharacterSetsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .listSupportedCharacterSets) - listSupportedCharacterSets = listSupportedCharacterSetsDecoded - let listSupportedTimezonesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .listSupportedTimezones) - listSupportedTimezones = listSupportedTimezonesDecoded - let includeAllDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeAll) - includeAll = includeAllDecoded - } -} - -extension DescribeDBEngineVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBEngineVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbEngineVersions = output.dbEngineVersions - self.marker = output.marker - } else { - self.dbEngineVersions = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBEngineVersionsResult"] + var value = DescribeDBEngineVersionsOutput() + value.dbEngineVersions = try reader["DBEngineVersions"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBEngineVersion.readingClosure, memberNodeInfo: "DBEngineVersion", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -26532,54 +19549,32 @@ public struct DescribeDBEngineVersionsOutput: Swift.Equatable { } } -struct DescribeDBEngineVersionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbEngineVersions: [RDSClientTypes.DBEngineVersion]? -} - -extension DescribeDBEngineVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbEngineVersions = "DBEngineVersions" - case marker = "Marker" - } +enum DescribeDBEngineVersionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBEngineVersionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbEngineVersions) { - struct KeyVal0{struct DBEngineVersion{}} - let dbEngineVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbEngineVersions) - if let dbEngineVersionsWrappedContainer = dbEngineVersionsWrappedContainer { - let dbEngineVersionsContainer = try dbEngineVersionsWrappedContainer.decodeIfPresent([RDSClientTypes.DBEngineVersion].self, forKey: .member) - var dbEngineVersionsBuffer:[RDSClientTypes.DBEngineVersion]? = nil - if let dbEngineVersionsContainer = dbEngineVersionsContainer { - dbEngineVersionsBuffer = [RDSClientTypes.DBEngineVersion]() - for structureContainer0 in dbEngineVersionsContainer { - dbEngineVersionsBuffer?.append(structureContainer0) - } - } - dbEngineVersions = dbEngineVersionsBuffer - } else { - dbEngineVersions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbEngineVersions = nil } } } -enum DescribeDBEngineVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBInstanceAutomatedBackupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceAutomatedBackupsArn = "DBInstanceAutomatedBackupsArn" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbiResourceId = "DbiResourceId" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBInstanceAutomatedBackupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceAutomatedBackupsArn = dbInstanceAutomatedBackupsArn { @@ -26672,69 +19667,16 @@ public struct DescribeDBInstanceAutomatedBackupsInput: Swift.Equatable { } } -struct DescribeDBInstanceAutomatedBackupsInputBody: Swift.Equatable { - let dbiResourceId: Swift.String? - let dbInstanceIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let dbInstanceAutomatedBackupsArn: Swift.String? -} +extension DescribeDBInstanceAutomatedBackupsOutput { -extension DescribeDBInstanceAutomatedBackupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceAutomatedBackupsArn = "DBInstanceAutomatedBackupsArn" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbiResourceId = "DbiResourceId" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let dbInstanceAutomatedBackupsArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceAutomatedBackupsArn) - dbInstanceAutomatedBackupsArn = dbInstanceAutomatedBackupsArnDecoded - } -} - -extension DescribeDBInstanceAutomatedBackupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBInstanceAutomatedBackupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstanceAutomatedBackups = output.dbInstanceAutomatedBackups - self.marker = output.marker - } else { - self.dbInstanceAutomatedBackups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBInstanceAutomatedBackupsResult"] + var value = DescribeDBInstanceAutomatedBackupsOutput() + value.dbInstanceAutomatedBackups = try reader["DBInstanceAutomatedBackups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBInstanceAutomatedBackup.readingClosure, memberNodeInfo: "DBInstanceAutomatedBackup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -26756,55 +19698,31 @@ public struct DescribeDBInstanceAutomatedBackupsOutput: Swift.Equatable { } } -struct DescribeDBInstanceAutomatedBackupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbInstanceAutomatedBackups: [RDSClientTypes.DBInstanceAutomatedBackup]? -} +enum DescribeDBInstanceAutomatedBackupsOutputError { -extension DescribeDBInstanceAutomatedBackupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceAutomatedBackups = "DBInstanceAutomatedBackups" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBInstanceAutomatedBackupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbInstanceAutomatedBackups) { - struct KeyVal0{struct DBInstanceAutomatedBackup{}} - let dbInstanceAutomatedBackupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbInstanceAutomatedBackups) - if let dbInstanceAutomatedBackupsWrappedContainer = dbInstanceAutomatedBackupsWrappedContainer { - let dbInstanceAutomatedBackupsContainer = try dbInstanceAutomatedBackupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBInstanceAutomatedBackup].self, forKey: .member) - var dbInstanceAutomatedBackupsBuffer:[RDSClientTypes.DBInstanceAutomatedBackup]? = nil - if let dbInstanceAutomatedBackupsContainer = dbInstanceAutomatedBackupsContainer { - dbInstanceAutomatedBackupsBuffer = [RDSClientTypes.DBInstanceAutomatedBackup]() - for structureContainer0 in dbInstanceAutomatedBackupsContainer { - dbInstanceAutomatedBackupsBuffer?.append(structureContainer0) - } - } - dbInstanceAutomatedBackups = dbInstanceAutomatedBackupsBuffer - } else { - dbInstanceAutomatedBackups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceAutomatedBackupNotFound": return try await DBInstanceAutomatedBackupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbInstanceAutomatedBackups = nil } } } -enum DescribeDBInstanceAutomatedBackupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceAutomatedBackupNotFound": return try await DBInstanceAutomatedBackupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBInstancesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -26877,61 +19795,16 @@ public struct DescribeDBInstancesInput: Swift.Equatable { } } -struct DescribeDBInstancesInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeDBInstancesOutput { -extension DescribeDBInstancesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstances = output.dbInstances - self.marker = output.marker - } else { - self.dbInstances = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBInstancesResult"] + var value = DescribeDBInstancesOutput() + value.dbInstances = try reader["DBInstances"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBInstance.readingClosure, memberNodeInfo: "DBInstance", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -26953,55 +19826,24 @@ public struct DescribeDBInstancesOutput: Swift.Equatable { } } -struct DescribeDBInstancesOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbInstances: [RDSClientTypes.DBInstance]? -} - -extension DescribeDBInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstances = "DBInstances" - case marker = "Marker" - } +enum DescribeDBInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBInstancesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbInstances) { - struct KeyVal0{struct DBInstance{}} - let dbInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbInstances) - if let dbInstancesWrappedContainer = dbInstancesWrappedContainer { - let dbInstancesContainer = try dbInstancesWrappedContainer.decodeIfPresent([RDSClientTypes.DBInstance].self, forKey: .member) - var dbInstancesBuffer:[RDSClientTypes.DBInstance]? = nil - if let dbInstancesContainer = dbInstancesContainer { - dbInstancesBuffer = [RDSClientTypes.DBInstance]() - for structureContainer0 in dbInstancesContainer { - dbInstancesBuffer?.append(structureContainer0) - } - } - dbInstances = dbInstancesBuffer - } else { - dbInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbInstances = nil } } } -enum DescribeDBInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RDSClientTypes.DescribeDBLogFilesDetails: Swift.Codable { +extension RDSClientTypes.DescribeDBLogFilesDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastWritten = "LastWritten" case logFileName = "LogFileName" @@ -27021,14 +19863,15 @@ extension RDSClientTypes.DescribeDBLogFilesDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let logFileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logFileName) - logFileName = logFileNameDecoded - let lastWrittenDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .lastWritten) - lastWritten = lastWrittenDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DescribeDBLogFilesDetails() + value.logFileName = try reader["LogFileName"].readIfPresent() + value.lastWritten = try reader["LastWritten"].readIfPresent() + value.size = try reader["Size"].readIfPresent() + return value + } } } @@ -27057,6 +19900,16 @@ extension RDSClientTypes { } extension DescribeDBLogFilesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case fileLastWritten = "FileLastWritten" + case fileSize = "FileSize" + case filenameContains = "FilenameContains" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -27141,73 +19994,16 @@ public struct DescribeDBLogFilesInput: Swift.Equatable { } } -struct DescribeDBLogFilesInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let filenameContains: Swift.String? - let fileLastWritten: Swift.Int? - let fileSize: Swift.Int? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBLogFilesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case fileLastWritten = "FileLastWritten" - case fileSize = "FileSize" - case filenameContains = "FilenameContains" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } +extension DescribeDBLogFilesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let filenameContainsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .filenameContains) - filenameContains = filenameContainsDecoded - let fileLastWrittenDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fileLastWritten) - fileLastWritten = fileLastWrittenDecoded - let fileSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .fileSize) - fileSize = fileSizeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBLogFilesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBLogFilesOutputBody = try responseDecoder.decode(responseBody: data) - self.describeDBLogFiles = output.describeDBLogFiles - self.marker = output.marker - } else { - self.describeDBLogFiles = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBLogFilesResult"] + var value = DescribeDBLogFilesOutput() + value.describeDBLogFiles = try reader["DescribeDBLogFiles"].readListIfPresent(memberReadingClosure: RDSClientTypes.DescribeDBLogFilesDetails.readingClosure, memberNodeInfo: "DescribeDBLogFilesDetails", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -27229,55 +20025,31 @@ public struct DescribeDBLogFilesOutput: Swift.Equatable { } } -struct DescribeDBLogFilesOutputBody: Swift.Equatable { - let describeDBLogFiles: [RDSClientTypes.DescribeDBLogFilesDetails]? - let marker: Swift.String? -} +enum DescribeDBLogFilesOutputError { -extension DescribeDBLogFilesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case describeDBLogFiles = "DescribeDBLogFiles" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBLogFilesResult")) - if containerValues.contains(.describeDBLogFiles) { - struct KeyVal0{struct DescribeDBLogFilesDetails{}} - let describeDBLogFilesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .describeDBLogFiles) - if let describeDBLogFilesWrappedContainer = describeDBLogFilesWrappedContainer { - let describeDBLogFilesContainer = try describeDBLogFilesWrappedContainer.decodeIfPresent([RDSClientTypes.DescribeDBLogFilesDetails].self, forKey: .member) - var describeDBLogFilesBuffer:[RDSClientTypes.DescribeDBLogFilesDetails]? = nil - if let describeDBLogFilesContainer = describeDBLogFilesContainer { - describeDBLogFilesBuffer = [RDSClientTypes.DescribeDBLogFilesDetails]() - for structureContainer0 in describeDBLogFilesContainer { - describeDBLogFilesBuffer?.append(structureContainer0) - } - } - describeDBLogFiles = describeDBLogFilesBuffer - } else { - describeDBLogFiles = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - describeDBLogFiles = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBLogFilesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBParameterGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBParameterGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -27340,61 +20112,16 @@ public struct DescribeDBParameterGroupsInput: Swift.Equatable { } } -struct DescribeDBParameterGroupsInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBParameterGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } +extension DescribeDBParameterGroupsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBParameterGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBParameterGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroups = output.dbParameterGroups - self.marker = output.marker - } else { - self.dbParameterGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBParameterGroupsResult"] + var value = DescribeDBParameterGroupsOutput() + value.dbParameterGroups = try reader["DBParameterGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBParameterGroup.readingClosure, memberNodeInfo: "DBParameterGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -27416,55 +20143,32 @@ public struct DescribeDBParameterGroupsOutput: Swift.Equatable { } } -struct DescribeDBParameterGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbParameterGroups: [RDSClientTypes.DBParameterGroup]? -} +enum DescribeDBParameterGroupsOutputError { -extension DescribeDBParameterGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroups = "DBParameterGroups" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBParameterGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbParameterGroups) { - struct KeyVal0{struct DBParameterGroup{}} - let dbParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbParameterGroups) - if let dbParameterGroupsWrappedContainer = dbParameterGroupsWrappedContainer { - let dbParameterGroupsContainer = try dbParameterGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBParameterGroup].self, forKey: .member) - var dbParameterGroupsBuffer:[RDSClientTypes.DBParameterGroup]? = nil - if let dbParameterGroupsContainer = dbParameterGroupsContainer { - dbParameterGroupsBuffer = [RDSClientTypes.DBParameterGroup]() - for structureContainer0 in dbParameterGroupsContainer { - dbParameterGroupsBuffer?.append(structureContainer0) - } - } - dbParameterGroups = dbParameterGroupsBuffer - } else { - dbParameterGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbParameterGroups = nil } } } -enum DescribeDBParameterGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case source = "Source" } -} -extension DescribeDBParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -27534,323 +20238,182 @@ public struct DescribeDBParametersInput: Swift.Equatable { } } -struct DescribeDBParametersInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let source: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? +extension DescribeDBParametersOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBParametersResult"] + var value = DescribeDBParametersOutput() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: RDSClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value + } + } +} + +/// Contains the result of a successful invocation of the DescribeDBParameters action. +public struct DescribeDBParametersOutput: Swift.Equatable { + /// An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. + public var marker: Swift.String? + /// A list of Parameter values. + public var parameters: [RDSClientTypes.Parameter]? + + public init( + marker: Swift.String? = nil, + parameters: [RDSClientTypes.Parameter]? = nil + ) + { + self.marker = marker + self.parameters = parameters + } +} + +enum DescribeDBParametersOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } } -extension DescribeDBParametersInputBody: Swift.Decodable { +extension DescribeDBProxiesInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" + case dbProxyName = "DBProxyName" case filters = "Filters" case marker = "Marker" case maxRecords = "MaxRecords" - case source = "Source" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } + public func encode(to encoder: Swift.Encoder) throws { + var container = encoder.container(keyedBy: ClientRuntime.Key.self) + if let dbProxyName = dbProxyName { + try container.encode(dbProxyName, forKey: ClientRuntime.Key("DBProxyName")) + } + if let filters = filters { + if !filters.isEmpty { + var filtersContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Filters")) + for (index0, filter0) in filters.enumerated() { + try filtersContainer.encode(filter0, forKey: ClientRuntime.Key("Filter.\(index0.advanced(by: 1))")) } - filters = filtersBuffer - } else { - filters = [] } - } else { - filters = nil + else { + var filtersContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Filters")) + try filtersContainer.encode("", forKey: ClientRuntime.Key("")) + } + } + if let marker = marker { + try container.encode(marker, forKey: ClientRuntime.Key("Marker")) + } + if let maxRecords = maxRecords { + try container.encode(maxRecords, forKey: ClientRuntime.Key("MaxRecords")) } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded + try container.encode("DescribeDBProxies", forKey:ClientRuntime.Key("Action")) + try container.encode("2014-10-31", forKey:ClientRuntime.Key("Version")) } } -extension DescribeDBParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.parameters = output.parameters - } else { - self.marker = nil - self.parameters = nil - } +extension DescribeDBProxiesInput { + + static func urlPathProvider(_ value: DescribeDBProxiesInput) -> Swift.String? { + return "/" } } -/// Contains the result of a successful invocation of the DescribeDBParameters action. -public struct DescribeDBParametersOutput: Swift.Equatable { +public struct DescribeDBProxiesInput: Swift.Equatable { + /// The name of the DB proxy. If you omit this parameter, the output includes information about all DB proxies owned by your Amazon Web Services account ID. + public var dbProxyName: Swift.String? + /// This parameter is not currently supported. + public var filters: [RDSClientTypes.Filter]? /// An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. public var marker: Swift.String? - /// A list of Parameter values. - public var parameters: [RDSClientTypes.Parameter]? + /// The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved. Default: 100 Constraints: Minimum 20, maximum 100. + public var maxRecords: Swift.Int? public init( + dbProxyName: Swift.String? = nil, + filters: [RDSClientTypes.Filter]? = nil, marker: Swift.String? = nil, - parameters: [RDSClientTypes.Parameter]? = nil + maxRecords: Swift.Int? = nil ) { + self.dbProxyName = dbProxyName + self.filters = filters self.marker = marker - self.parameters = parameters + self.maxRecords = maxRecords } } -struct DescribeDBParametersOutputBody: Swift.Equatable { - let parameters: [RDSClientTypes.Parameter]? - let marker: Swift.String? +extension DescribeDBProxiesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBProxiesResult"] + var value = DescribeDBProxiesOutput() + value.dbProxies = try reader["DBProxies"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBProxy.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value + } + } } -extension DescribeDBParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case parameters = "Parameters" +public struct DescribeDBProxiesOutput: Swift.Equatable { + /// A return value representing an arbitrary number of DBProxy data structures. + public var dbProxies: [RDSClientTypes.DBProxy]? + /// An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. + public var marker: Swift.String? + + public init( + dbProxies: [RDSClientTypes.DBProxy]? = nil, + marker: Swift.String? = nil + ) + { + self.dbProxies = dbProxies + self.marker = marker } +} - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBParametersResult")) - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RDSClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RDSClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RDSClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] +enum DescribeDBProxiesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - parameters = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBProxyEndpointsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbProxyEndpointName = "DBProxyEndpointName" + case dbProxyName = "DBProxyName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBProxiesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let dbProxyName = dbProxyName { - try container.encode(dbProxyName, forKey: ClientRuntime.Key("DBProxyName")) - } - if let filters = filters { - if !filters.isEmpty { - var filtersContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Filters")) - for (index0, filter0) in filters.enumerated() { - try filtersContainer.encode(filter0, forKey: ClientRuntime.Key("Filter.\(index0.advanced(by: 1))")) - } - } - else { - var filtersContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Filters")) - try filtersContainer.encode("", forKey: ClientRuntime.Key("")) - } - } - if let marker = marker { - try container.encode(marker, forKey: ClientRuntime.Key("Marker")) - } - if let maxRecords = maxRecords { - try container.encode(maxRecords, forKey: ClientRuntime.Key("MaxRecords")) - } - try container.encode("DescribeDBProxies", forKey:ClientRuntime.Key("Action")) - try container.encode("2014-10-31", forKey:ClientRuntime.Key("Version")) - } -} - -extension DescribeDBProxiesInput { - - static func urlPathProvider(_ value: DescribeDBProxiesInput) -> Swift.String? { - return "/" - } -} - -public struct DescribeDBProxiesInput: Swift.Equatable { - /// The name of the DB proxy. If you omit this parameter, the output includes information about all DB proxies owned by your Amazon Web Services account ID. - public var dbProxyName: Swift.String? - /// This parameter is not currently supported. - public var filters: [RDSClientTypes.Filter]? - /// An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. - public var marker: Swift.String? - /// The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved. Default: 100 Constraints: Minimum 20, maximum 100. - public var maxRecords: Swift.Int? - - public init( - dbProxyName: Swift.String? = nil, - filters: [RDSClientTypes.Filter]? = nil, - marker: Swift.String? = nil, - maxRecords: Swift.Int? = nil - ) - { - self.dbProxyName = dbProxyName - self.filters = filters - self.marker = marker - self.maxRecords = maxRecords - } -} - -struct DescribeDBProxiesInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeDBProxiesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyName = "DBProxyName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeDBProxiesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBProxiesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxies = output.dbProxies - self.marker = output.marker - } else { - self.dbProxies = nil - self.marker = nil - } - } -} - -public struct DescribeDBProxiesOutput: Swift.Equatable { - /// A return value representing an arbitrary number of DBProxy data structures. - public var dbProxies: [RDSClientTypes.DBProxy]? - /// An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords. - public var marker: Swift.String? - - public init( - dbProxies: [RDSClientTypes.DBProxy]? = nil, - marker: Swift.String? = nil - ) - { - self.dbProxies = dbProxies - self.marker = marker - } -} - -struct DescribeDBProxiesOutputBody: Swift.Equatable { - let dbProxies: [RDSClientTypes.DBProxy]? - let marker: Swift.String? -} - -extension DescribeDBProxiesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxies = "DBProxies" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBProxiesResult")) - if containerValues.contains(.dbProxies) { - struct KeyVal0{struct member{}} - let dbProxiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbProxies) - if let dbProxiesWrappedContainer = dbProxiesWrappedContainer { - let dbProxiesContainer = try dbProxiesWrappedContainer.decodeIfPresent([RDSClientTypes.DBProxy].self, forKey: .member) - var dbProxiesBuffer:[RDSClientTypes.DBProxy]? = nil - if let dbProxiesContainer = dbProxiesContainer { - dbProxiesBuffer = [RDSClientTypes.DBProxy]() - for structureContainer0 in dbProxiesContainer { - dbProxiesBuffer?.append(structureContainer0) - } - } - dbProxies = dbProxiesBuffer - } else { - dbProxies = [] - } - } else { - dbProxies = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum DescribeDBProxiesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension DescribeDBProxyEndpointsInput: Swift.Encodable { - public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let dbProxyEndpointName = dbProxyEndpointName { - try container.encode(dbProxyEndpointName, forKey: ClientRuntime.Key("DBProxyEndpointName")) - } + if let dbProxyEndpointName = dbProxyEndpointName { + try container.encode(dbProxyEndpointName, forKey: ClientRuntime.Key("DBProxyEndpointName")) + } if let dbProxyName = dbProxyName { try container.encode(dbProxyName, forKey: ClientRuntime.Key("DBProxyName")) } @@ -27912,65 +20475,16 @@ public struct DescribeDBProxyEndpointsInput: Swift.Equatable { } } -struct DescribeDBProxyEndpointsInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let dbProxyEndpointName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} +extension DescribeDBProxyEndpointsOutput { -extension DescribeDBProxyEndpointsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyEndpointName = "DBProxyEndpointName" - case dbProxyName = "DBProxyName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let dbProxyEndpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyEndpointName) - dbProxyEndpointName = dbProxyEndpointNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeDBProxyEndpointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBProxyEndpointsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxyEndpoints = output.dbProxyEndpoints - self.marker = output.marker - } else { - self.dbProxyEndpoints = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBProxyEndpointsResult"] + var value = DescribeDBProxyEndpointsOutput() + value.dbProxyEndpoints = try reader["DBProxyEndpoints"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBProxyEndpoint.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -27991,56 +20505,33 @@ public struct DescribeDBProxyEndpointsOutput: Swift.Equatable { } } -struct DescribeDBProxyEndpointsOutputBody: Swift.Equatable { - let dbProxyEndpoints: [RDSClientTypes.DBProxyEndpoint]? - let marker: Swift.String? -} - -extension DescribeDBProxyEndpointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyEndpoints = "DBProxyEndpoints" - case marker = "Marker" - } +enum DescribeDBProxyEndpointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBProxyEndpointsResult")) - if containerValues.contains(.dbProxyEndpoints) { - struct KeyVal0{struct member{}} - let dbProxyEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbProxyEndpoints) - if let dbProxyEndpointsWrappedContainer = dbProxyEndpointsWrappedContainer { - let dbProxyEndpointsContainer = try dbProxyEndpointsWrappedContainer.decodeIfPresent([RDSClientTypes.DBProxyEndpoint].self, forKey: .member) - var dbProxyEndpointsBuffer:[RDSClientTypes.DBProxyEndpoint]? = nil - if let dbProxyEndpointsContainer = dbProxyEndpointsContainer { - dbProxyEndpointsBuffer = [RDSClientTypes.DBProxyEndpoint]() - for structureContainer0 in dbProxyEndpointsContainer { - dbProxyEndpointsBuffer?.append(structureContainer0) - } - } - dbProxyEndpoints = dbProxyEndpointsBuffer - } else { - dbProxyEndpoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyEndpointNotFoundFault": return try await DBProxyEndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbProxyEndpoints = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBProxyEndpointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyEndpointNotFoundFault": return try await DBProxyEndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBProxyTargetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbProxyName = "DBProxyName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case targetGroupName = "TargetGroupName" } -} -extension DescribeDBProxyTargetGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbProxyName = dbProxyName { @@ -28108,65 +20599,16 @@ public struct DescribeDBProxyTargetGroupsInput: Swift.Equatable { } } -struct DescribeDBProxyTargetGroupsInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let targetGroupName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeDBProxyTargetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyName = "DBProxyName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case targetGroupName = "TargetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let targetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupName) - targetGroupName = targetGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribeDBProxyTargetGroupsOutput { -extension DescribeDBProxyTargetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBProxyTargetGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.targetGroups = output.targetGroups - } else { - self.marker = nil - self.targetGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBProxyTargetGroupsResult"] + var value = DescribeDBProxyTargetGroupsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.targetGroups = try reader["TargetGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBProxyTargetGroup.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -28187,57 +20629,34 @@ public struct DescribeDBProxyTargetGroupsOutput: Swift.Equatable { } } -struct DescribeDBProxyTargetGroupsOutputBody: Swift.Equatable { - let targetGroups: [RDSClientTypes.DBProxyTargetGroup]? - let marker: Swift.String? -} - -extension DescribeDBProxyTargetGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case targetGroups = "TargetGroups" - } +enum DescribeDBProxyTargetGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBProxyTargetGroupsResult")) - if containerValues.contains(.targetGroups) { - struct KeyVal0{struct member{}} - let targetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGroups) - if let targetGroupsWrappedContainer = targetGroupsWrappedContainer { - let targetGroupsContainer = try targetGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBProxyTargetGroup].self, forKey: .member) - var targetGroupsBuffer:[RDSClientTypes.DBProxyTargetGroup]? = nil - if let targetGroupsContainer = targetGroupsContainer { - targetGroupsBuffer = [RDSClientTypes.DBProxyTargetGroup]() - for structureContainer0 in targetGroupsContainer { - targetGroupsBuffer?.append(structureContainer0) - } - } - targetGroups = targetGroupsBuffer - } else { - targetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - targetGroups = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBProxyTargetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBProxyTargetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbProxyName = "DBProxyName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case targetGroupName = "TargetGroupName" } -} -extension DescribeDBProxyTargetsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbProxyName = dbProxyName { @@ -28305,65 +20724,16 @@ public struct DescribeDBProxyTargetsInput: Swift.Equatable { } } -struct DescribeDBProxyTargetsInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let targetGroupName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} +extension DescribeDBProxyTargetsOutput { -extension DescribeDBProxyTargetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyName = "DBProxyName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case targetGroupName = "TargetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let targetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupName) - targetGroupName = targetGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeDBProxyTargetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBProxyTargetsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.targets = output.targets - } else { - self.marker = nil - self.targets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBProxyTargetsResult"] + var value = DescribeDBProxyTargetsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.targets = try reader["Targets"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBProxyTarget.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -28384,58 +20754,36 @@ public struct DescribeDBProxyTargetsOutput: Swift.Equatable { } } -struct DescribeDBProxyTargetsOutputBody: Swift.Equatable { - let targets: [RDSClientTypes.DBProxyTarget]? - let marker: Swift.String? -} - -extension DescribeDBProxyTargetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case targets = "Targets" - } +enum DescribeDBProxyTargetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBProxyTargetsResult")) - if containerValues.contains(.targets) { - struct KeyVal0{struct member{}} - let targetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targets) - if let targetsWrappedContainer = targetsWrappedContainer { - let targetsContainer = try targetsWrappedContainer.decodeIfPresent([RDSClientTypes.DBProxyTarget].self, forKey: .member) - var targetsBuffer:[RDSClientTypes.DBProxyTarget]? = nil - if let targetsContainer = targetsContainer { - targetsBuffer = [RDSClientTypes.DBProxyTarget]() - for structureContainer0 in targetsContainer { - targetsBuffer?.append(structureContainer0) - } - } - targets = targetsBuffer - } else { - targets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetNotFoundFault": return try await DBProxyTargetNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - targets = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBProxyTargetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetNotFoundFault": return try await DBProxyTargetNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBRecommendationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case lastUpdatedAfter = "LastUpdatedAfter" + case lastUpdatedBefore = "LastUpdatedBefore" + case locale = "Locale" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBRecommendationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -28571,69 +20919,16 @@ public struct DescribeDBRecommendationsInput: Swift.Equatable { } } -struct DescribeDBRecommendationsInputBody: Swift.Equatable { - let lastUpdatedAfter: ClientRuntime.Date? - let lastUpdatedBefore: ClientRuntime.Date? - let locale: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeDBRecommendationsOutput { -extension DescribeDBRecommendationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case lastUpdatedAfter = "LastUpdatedAfter" - case lastUpdatedBefore = "LastUpdatedBefore" - case locale = "Locale" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lastUpdatedAfterDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdatedAfter) - lastUpdatedAfter = lastUpdatedAfterDecoded - let lastUpdatedBeforeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastUpdatedBefore) - lastUpdatedBefore = lastUpdatedBeforeDecoded - let localeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locale) - locale = localeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBRecommendationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBRecommendationsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbRecommendations = output.dbRecommendations - self.marker = output.marker - } else { - self.dbRecommendations = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBRecommendationsResult"] + var value = DescribeDBRecommendationsOutput() + value.dbRecommendations = try reader["DBRecommendations"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBRecommendation.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -28654,54 +20949,30 @@ public struct DescribeDBRecommendationsOutput: Swift.Equatable { } } -struct DescribeDBRecommendationsOutputBody: Swift.Equatable { - let dbRecommendations: [RDSClientTypes.DBRecommendation]? - let marker: Swift.String? -} - -extension DescribeDBRecommendationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbRecommendations = "DBRecommendations" - case marker = "Marker" - } +enum DescribeDBRecommendationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBRecommendationsResult")) - if containerValues.contains(.dbRecommendations) { - struct KeyVal0{struct member{}} - let dbRecommendationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbRecommendations) - if let dbRecommendationsWrappedContainer = dbRecommendationsWrappedContainer { - let dbRecommendationsContainer = try dbRecommendationsWrappedContainer.decodeIfPresent([RDSClientTypes.DBRecommendation].self, forKey: .member) - var dbRecommendationsBuffer:[RDSClientTypes.DBRecommendation]? = nil - if let dbRecommendationsContainer = dbRecommendationsContainer { - dbRecommendationsBuffer = [RDSClientTypes.DBRecommendation]() - for structureContainer0 in dbRecommendationsContainer { - dbRecommendationsBuffer?.append(structureContainer0) - } - } - dbRecommendations = dbRecommendationsBuffer - } else { - dbRecommendations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbRecommendations = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDBRecommendationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBSecurityGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSecurityGroupName = "DBSecurityGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBSecurityGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSecurityGroupName = dbSecurityGroupName { @@ -28762,61 +21033,16 @@ public struct DescribeDBSecurityGroupsInput: Swift.Equatable { } } -struct DescribeDBSecurityGroupsInputBody: Swift.Equatable { - let dbSecurityGroupName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeDBSecurityGroupsOutput { -extension DescribeDBSecurityGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSecurityGroupName = "DBSecurityGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupName) - dbSecurityGroupName = dbSecurityGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBSecurityGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBSecurityGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSecurityGroups = output.dbSecurityGroups - self.marker = output.marker - } else { - self.dbSecurityGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBSecurityGroupsResult"] + var value = DescribeDBSecurityGroupsOutput() + value.dbSecurityGroups = try reader["DBSecurityGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBSecurityGroup.readingClosure, memberNodeInfo: "DBSecurityGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -28838,55 +21064,28 @@ public struct DescribeDBSecurityGroupsOutput: Swift.Equatable { } } -struct DescribeDBSecurityGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbSecurityGroups: [RDSClientTypes.DBSecurityGroup]? -} - -extension DescribeDBSecurityGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSecurityGroups = "DBSecurityGroups" - case marker = "Marker" - } +enum DescribeDBSecurityGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBSecurityGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbSecurityGroups) { - struct KeyVal0{struct DBSecurityGroup{}} - let dbSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroups) - if let dbSecurityGroupsWrappedContainer = dbSecurityGroupsWrappedContainer { - let dbSecurityGroupsContainer = try dbSecurityGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBSecurityGroup].self, forKey: .member) - var dbSecurityGroupsBuffer:[RDSClientTypes.DBSecurityGroup]? = nil - if let dbSecurityGroupsContainer = dbSecurityGroupsContainer { - dbSecurityGroupsBuffer = [RDSClientTypes.DBSecurityGroup]() - for structureContainer0 in dbSecurityGroupsContainer { - dbSecurityGroupsBuffer?.append(structureContainer0) - } - } - dbSecurityGroups = dbSecurityGroupsBuffer - } else { - dbSecurityGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbSecurityGroups = nil } } } -enum DescribeDBSecurityGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBSnapshotAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSnapshotIdentifier = "DBSnapshotIdentifier" } -} -extension DescribeDBSnapshotAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSnapshotIdentifier = dbSnapshotIdentifier { @@ -28918,30 +21117,15 @@ public struct DescribeDBSnapshotAttributesInput: Swift.Equatable { } } -struct DescribeDBSnapshotAttributesInputBody: Swift.Equatable { - let dbSnapshotIdentifier: Swift.String? -} - -extension DescribeDBSnapshotAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshotIdentifier = "DBSnapshotIdentifier" - } +extension DescribeDBSnapshotAttributesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - } -} - -extension DescribeDBSnapshotAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBSnapshotAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSnapshotAttributesResult = output.dbSnapshotAttributesResult - } else { - self.dbSnapshotAttributesResult = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBSnapshotAttributesResult"] + var value = DescribeDBSnapshotAttributesOutput() + value.dbSnapshotAttributesResult = try reader["DBSnapshotAttributesResult"].readIfPresent(readingClosure: RDSClientTypes.DBSnapshotAttributesResult.readingClosure) + return value } } } @@ -28958,34 +21142,34 @@ public struct DescribeDBSnapshotAttributesOutput: Swift.Equatable { } } -struct DescribeDBSnapshotAttributesOutputBody: Swift.Equatable { - let dbSnapshotAttributesResult: RDSClientTypes.DBSnapshotAttributesResult? -} +enum DescribeDBSnapshotAttributesOutputError { -extension DescribeDBSnapshotAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshotAttributesResult = "DBSnapshotAttributesResult" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBSnapshotAttributesResult")) - let dbSnapshotAttributesResultDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSnapshotAttributesResult.self, forKey: .dbSnapshotAttributesResult) - dbSnapshotAttributesResult = dbSnapshotAttributesResultDecoded - } -} - -enum DescribeDBSnapshotAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeDBSnapshotTenantDatabasesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbSnapshotIdentifier = "DBSnapshotIdentifier" + case dbiResourceId = "DbiResourceId" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case snapshotType = "SnapshotType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -29094,73 +21278,16 @@ public struct DescribeDBSnapshotTenantDatabasesInput: Swift.Equatable { } } -struct DescribeDBSnapshotTenantDatabasesInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let dbSnapshotIdentifier: Swift.String? - let snapshotType: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let dbiResourceId: Swift.String? -} +extension DescribeDBSnapshotTenantDatabasesOutput { -extension DescribeDBSnapshotTenantDatabasesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbSnapshotIdentifier = "DBSnapshotIdentifier" - case dbiResourceId = "DbiResourceId" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case snapshotType = "SnapshotType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - } -} - -extension DescribeDBSnapshotTenantDatabasesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBSnapshotTenantDatabasesOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSnapshotTenantDatabases = output.dbSnapshotTenantDatabases - self.marker = output.marker - } else { - self.dbSnapshotTenantDatabases = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBSnapshotTenantDatabasesResult"] + var value = DescribeDBSnapshotTenantDatabasesOutput() + value.dbSnapshotTenantDatabases = try reader["DBSnapshotTenantDatabases"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBSnapshotTenantDatabase.readingClosure, memberNodeInfo: "DBSnapshotTenantDatabase", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -29181,55 +21308,36 @@ public struct DescribeDBSnapshotTenantDatabasesOutput: Swift.Equatable { } } -struct DescribeDBSnapshotTenantDatabasesOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbSnapshotTenantDatabases: [RDSClientTypes.DBSnapshotTenantDatabase]? -} - -extension DescribeDBSnapshotTenantDatabasesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshotTenantDatabases = "DBSnapshotTenantDatabases" - case marker = "Marker" - } +enum DescribeDBSnapshotTenantDatabasesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBSnapshotTenantDatabasesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbSnapshotTenantDatabases) { - struct KeyVal0{struct DBSnapshotTenantDatabase{}} - let dbSnapshotTenantDatabasesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSnapshotTenantDatabases) - if let dbSnapshotTenantDatabasesWrappedContainer = dbSnapshotTenantDatabasesWrappedContainer { - let dbSnapshotTenantDatabasesContainer = try dbSnapshotTenantDatabasesWrappedContainer.decodeIfPresent([RDSClientTypes.DBSnapshotTenantDatabase].self, forKey: .member) - var dbSnapshotTenantDatabasesBuffer:[RDSClientTypes.DBSnapshotTenantDatabase]? = nil - if let dbSnapshotTenantDatabasesContainer = dbSnapshotTenantDatabasesContainer { - dbSnapshotTenantDatabasesBuffer = [RDSClientTypes.DBSnapshotTenantDatabase]() - for structureContainer0 in dbSnapshotTenantDatabasesContainer { - dbSnapshotTenantDatabasesBuffer?.append(structureContainer0) - } - } - dbSnapshotTenantDatabases = dbSnapshotTenantDatabasesBuffer - } else { - dbSnapshotTenantDatabases = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbSnapshotTenantDatabases = nil } } } -enum DescribeDBSnapshotTenantDatabasesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBSnapshotsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbSnapshotIdentifier = "DBSnapshotIdentifier" + case dbiResourceId = "DbiResourceId" + case filters = "Filters" + case includePublic = "IncludePublic" + case includeShared = "IncludeShared" + case marker = "Marker" + case maxRecords = "MaxRecords" + case snapshotType = "SnapshotType" } -} -extension DescribeDBSnapshotsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -29354,81 +21462,16 @@ public struct DescribeDBSnapshotsInput: Swift.Equatable { } } -struct DescribeDBSnapshotsInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let dbSnapshotIdentifier: Swift.String? - let snapshotType: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? - let includeShared: Swift.Bool? - let includePublic: Swift.Bool? - let dbiResourceId: Swift.String? -} - -extension DescribeDBSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbSnapshotIdentifier = "DBSnapshotIdentifier" - case dbiResourceId = "DbiResourceId" - case filters = "Filters" - case includePublic = "IncludePublic" - case includeShared = "IncludeShared" - case marker = "Marker" - case maxRecords = "MaxRecords" - case snapshotType = "SnapshotType" - } +extension DescribeDBSnapshotsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let includeSharedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includeShared) - includeShared = includeSharedDecoded - let includePublicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .includePublic) - includePublic = includePublicDecoded - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - } -} - -extension DescribeDBSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSnapshots = output.dbSnapshots - self.marker = output.marker - } else { - self.dbSnapshots = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBSnapshotsResult"] + var value = DescribeDBSnapshotsOutput() + value.dbSnapshots = try reader["DBSnapshots"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBSnapshot.readingClosure, memberNodeInfo: "DBSnapshot", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -29450,55 +21493,31 @@ public struct DescribeDBSnapshotsOutput: Swift.Equatable { } } -struct DescribeDBSnapshotsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbSnapshots: [RDSClientTypes.DBSnapshot]? -} +enum DescribeDBSnapshotsOutputError { -extension DescribeDBSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshots = "DBSnapshots" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBSnapshotsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbSnapshots) { - struct KeyVal0{struct DBSnapshot{}} - let dbSnapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSnapshots) - if let dbSnapshotsWrappedContainer = dbSnapshotsWrappedContainer { - let dbSnapshotsContainer = try dbSnapshotsWrappedContainer.decodeIfPresent([RDSClientTypes.DBSnapshot].self, forKey: .member) - var dbSnapshotsBuffer:[RDSClientTypes.DBSnapshot]? = nil - if let dbSnapshotsContainer = dbSnapshotsContainer { - dbSnapshotsBuffer = [RDSClientTypes.DBSnapshot]() - for structureContainer0 in dbSnapshotsContainer { - dbSnapshotsBuffer?.append(structureContainer0) - } - } - dbSnapshots = dbSnapshotsBuffer - } else { - dbSnapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbSnapshots = nil } } } -enum DescribeDBSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDBSubnetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupName = "DBSubnetGroupName" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDBSubnetGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupName = dbSubnetGroupName { @@ -29559,61 +21578,16 @@ public struct DescribeDBSubnetGroupsInput: Swift.Equatable { } } -struct DescribeDBSubnetGroupsInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDBSubnetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupName = "DBSubnetGroupName" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } +extension DescribeDBSubnetGroupsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeDBSubnetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDBSubnetGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroups = output.dbSubnetGroups - self.marker = output.marker - } else { - self.dbSubnetGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDBSubnetGroupsResult"] + var value = DescribeDBSubnetGroupsOutput() + value.dbSubnetGroups = try reader["DBSubnetGroups"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBSubnetGroup.readingClosure, memberNodeInfo: "DBSubnetGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -29635,55 +21609,31 @@ public struct DescribeDBSubnetGroupsOutput: Swift.Equatable { } } -struct DescribeDBSubnetGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let dbSubnetGroups: [RDSClientTypes.DBSubnetGroup]? -} - -extension DescribeDBSubnetGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroups = "DBSubnetGroups" - case marker = "Marker" - } +enum DescribeDBSubnetGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDBSubnetGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.dbSubnetGroups) { - struct KeyVal0{struct DBSubnetGroup{}} - let dbSubnetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSubnetGroups) - if let dbSubnetGroupsWrappedContainer = dbSubnetGroupsWrappedContainer { - let dbSubnetGroupsContainer = try dbSubnetGroupsWrappedContainer.decodeIfPresent([RDSClientTypes.DBSubnetGroup].self, forKey: .member) - var dbSubnetGroupsBuffer:[RDSClientTypes.DBSubnetGroup]? = nil - if let dbSubnetGroupsContainer = dbSubnetGroupsContainer { - dbSubnetGroupsBuffer = [RDSClientTypes.DBSubnetGroup]() - for structureContainer0 in dbSubnetGroupsContainer { - dbSubnetGroupsBuffer?.append(structureContainer0) - } - } - dbSubnetGroups = dbSubnetGroupsBuffer - } else { - dbSubnetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbSubnetGroups = nil } } } -enum DescribeDBSubnetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEngineDefaultClusterParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeEngineDefaultClusterParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -29745,59 +21695,15 @@ public struct DescribeEngineDefaultClusterParametersInput: Swift.Equatable { } } -struct DescribeEngineDefaultClusterParametersInputBody: Swift.Equatable { - let dbParameterGroupFamily: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEngineDefaultClusterParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } +extension DescribeEngineDefaultClusterParametersOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeEngineDefaultClusterParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEngineDefaultClusterParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.engineDefaults = output.engineDefaults - } else { - self.engineDefaults = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEngineDefaultClusterParametersResult"] + var value = DescribeEngineDefaultClusterParametersOutput() + value.engineDefaults = try reader["EngineDefaults"].readIfPresent(readingClosure: RDSClientTypes.EngineDefaults.readingClosure) + return value } } } @@ -29814,33 +21720,30 @@ public struct DescribeEngineDefaultClusterParametersOutput: Swift.Equatable { } } -struct DescribeEngineDefaultClusterParametersOutputBody: Swift.Equatable { - let engineDefaults: RDSClientTypes.EngineDefaults? -} - -extension DescribeEngineDefaultClusterParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineDefaults = "EngineDefaults" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEngineDefaultClusterParametersResult")) - let engineDefaultsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.EngineDefaults.self, forKey: .engineDefaults) - engineDefaults = engineDefaultsDecoded - } -} +enum DescribeEngineDefaultClusterParametersOutputError { -enum DescribeEngineDefaultClusterParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeEngineDefaultParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupFamily = "DBParameterGroupFamily" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupFamily = dbParameterGroupFamily { @@ -29998,59 +21901,15 @@ public struct DescribeEngineDefaultParametersInput: Swift.Equatable { } } -struct DescribeEngineDefaultParametersInputBody: Swift.Equatable { - let dbParameterGroupFamily: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeEngineDefaultParametersOutput { -extension DescribeEngineDefaultParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupFamily = "DBParameterGroupFamily" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeEngineDefaultParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEngineDefaultParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.engineDefaults = output.engineDefaults - } else { - self.engineDefaults = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEngineDefaultParametersResult"] + var value = DescribeEngineDefaultParametersOutput() + value.engineDefaults = try reader["EngineDefaults"].readIfPresent(readingClosure: RDSClientTypes.EngineDefaults.readingClosure) + return value } } } @@ -30067,33 +21926,28 @@ public struct DescribeEngineDefaultParametersOutput: Swift.Equatable { } } -struct DescribeEngineDefaultParametersOutputBody: Swift.Equatable { - let engineDefaults: RDSClientTypes.EngineDefaults? -} - -extension DescribeEngineDefaultParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineDefaults = "EngineDefaults" - } +enum DescribeEngineDefaultParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEngineDefaultParametersResult")) - let engineDefaultsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.EngineDefaults.self, forKey: .engineDefaults) - engineDefaults = engineDefaultsDecoded - } -} - -enum DescribeEngineDefaultParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeEventCategoriesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case sourceType = "SourceType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -30140,51 +21994,15 @@ public struct DescribeEventCategoriesInput: Swift.Equatable { } } -struct DescribeEventCategoriesInputBody: Swift.Equatable { - let sourceType: Swift.String? - let filters: [RDSClientTypes.Filter]? -} - -extension DescribeEventCategoriesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case sourceType = "SourceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension DescribeEventCategoriesOutput { -extension DescribeEventCategoriesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventCategoriesOutputBody = try responseDecoder.decode(responseBody: data) - self.eventCategoriesMapList = output.eventCategoriesMapList - } else { - self.eventCategoriesMapList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventCategoriesResult"] + var value = DescribeEventCategoriesOutput() + value.eventCategoriesMapList = try reader["EventCategoriesMapList"].readListIfPresent(memberReadingClosure: RDSClientTypes.EventCategoriesMap.readingClosure, memberNodeInfo: "EventCategoriesMap", isFlattened: false) + return value } } } @@ -30202,50 +22020,30 @@ public struct DescribeEventCategoriesOutput: Swift.Equatable { } } -struct DescribeEventCategoriesOutputBody: Swift.Equatable { - let eventCategoriesMapList: [RDSClientTypes.EventCategoriesMap]? -} - -extension DescribeEventCategoriesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventCategoriesMapList = "EventCategoriesMapList" - } +enum DescribeEventCategoriesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventCategoriesResult")) - if containerValues.contains(.eventCategoriesMapList) { - struct KeyVal0{struct EventCategoriesMap{}} - let eventCategoriesMapListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategoriesMapList) - if let eventCategoriesMapListWrappedContainer = eventCategoriesMapListWrappedContainer { - let eventCategoriesMapListContainer = try eventCategoriesMapListWrappedContainer.decodeIfPresent([RDSClientTypes.EventCategoriesMap].self, forKey: .member) - var eventCategoriesMapListBuffer:[RDSClientTypes.EventCategoriesMap]? = nil - if let eventCategoriesMapListContainer = eventCategoriesMapListContainer { - eventCategoriesMapListBuffer = [RDSClientTypes.EventCategoriesMap]() - for structureContainer0 in eventCategoriesMapListContainer { - eventCategoriesMapListBuffer?.append(structureContainer0) - } - } - eventCategoriesMapList = eventCategoriesMapListBuffer - } else { - eventCategoriesMapList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventCategoriesMapList = nil } } } -enum DescribeEventCategoriesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventSubscriptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case subscriptionName = "SubscriptionName" } -} -extension DescribeEventSubscriptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -30306,61 +22104,16 @@ public struct DescribeEventSubscriptionsInput: Swift.Equatable { } } -struct DescribeEventSubscriptionsInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEventSubscriptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case subscriptionName = "SubscriptionName" - } +extension DescribeEventSubscriptionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeEventSubscriptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventSubscriptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscriptionsList = output.eventSubscriptionsList - self.marker = output.marker - } else { - self.eventSubscriptionsList = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventSubscriptionsResult"] + var value = DescribeEventSubscriptionsOutput() + value.eventSubscriptionsList = try reader["EventSubscriptionsList"].readListIfPresent(memberReadingClosure: RDSClientTypes.EventSubscription.readingClosure, memberNodeInfo: "EventSubscription", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -30382,55 +22135,36 @@ public struct DescribeEventSubscriptionsOutput: Swift.Equatable { } } -struct DescribeEventSubscriptionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let eventSubscriptionsList: [RDSClientTypes.EventSubscription]? -} +enum DescribeEventSubscriptionsOutputError { -extension DescribeEventSubscriptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscriptionsList = "EventSubscriptionsList" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventSubscriptionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.eventSubscriptionsList) { - struct KeyVal0{struct EventSubscription{}} - let eventSubscriptionsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventSubscriptionsList) - if let eventSubscriptionsListWrappedContainer = eventSubscriptionsListWrappedContainer { - let eventSubscriptionsListContainer = try eventSubscriptionsListWrappedContainer.decodeIfPresent([RDSClientTypes.EventSubscription].self, forKey: .member) - var eventSubscriptionsListBuffer:[RDSClientTypes.EventSubscription]? = nil - if let eventSubscriptionsListContainer = eventSubscriptionsListContainer { - eventSubscriptionsListBuffer = [RDSClientTypes.EventSubscription]() - for structureContainer0 in eventSubscriptionsListContainer { - eventSubscriptionsListBuffer?.append(structureContainer0) - } - } - eventSubscriptionsList = eventSubscriptionsListBuffer - } else { - eventSubscriptionsList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventSubscriptionsList = nil } } } -enum DescribeEventSubscriptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case duration = "Duration" + case endTime = "EndTime" + case eventCategories = "EventCategories" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case sourceIdentifier = "SourceIdentifier" + case sourceType = "SourceType" + case startTime = "StartTime" } -} -extension DescribeEventsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let duration = duration { @@ -30553,98 +22287,16 @@ public struct DescribeEventsInput: Swift.Equatable { } } -struct DescribeEventsInputBody: Swift.Equatable { - let sourceIdentifier: Swift.String? - let sourceType: RDSClientTypes.SourceType? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let duration: Swift.Int? - let eventCategories: [Swift.String]? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEventsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case duration = "Duration" - case endTime = "EndTime" - case eventCategories = "EventCategories" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case sourceIdentifier = "SourceIdentifier" - case sourceType = "SourceType" - case startTime = "StartTime" - } +extension DescribeEventsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeEventsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventsOutputBody = try responseDecoder.decode(responseBody: data) - self.events = output.events - self.marker = output.marker - } else { - self.events = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventsResult"] + var value = DescribeEventsOutput() + value.events = try reader["Events"].readListIfPresent(memberReadingClosure: RDSClientTypes.Event.readingClosure, memberNodeInfo: "Event", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -30666,54 +22318,32 @@ public struct DescribeEventsOutput: Swift.Equatable { } } -struct DescribeEventsOutputBody: Swift.Equatable { - let marker: Swift.String? - let events: [RDSClientTypes.Event]? -} - -extension DescribeEventsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Events" - case marker = "Marker" - } +enum DescribeEventsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.events) { - struct KeyVal0{struct Event{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([RDSClientTypes.Event].self, forKey: .member) - var eventsBuffer:[RDSClientTypes.Event]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [RDSClientTypes.Event]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - events = nil } } } -enum DescribeEventsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeExportTasksInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case exportTaskIdentifier = "ExportTaskIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case sourceArn = "SourceArn" + case sourceType = "SourceType" } -} -extension DescribeExportTasksInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let exportTaskIdentifier = exportTaskIdentifier { @@ -30807,69 +22437,16 @@ public struct DescribeExportTasksInput: Swift.Equatable { } } -struct DescribeExportTasksInputBody: Swift.Equatable { - let exportTaskIdentifier: Swift.String? - let sourceArn: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? - let sourceType: RDSClientTypes.ExportSourceType? -} +extension DescribeExportTasksOutput { -extension DescribeExportTasksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportTaskIdentifier = "ExportTaskIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case sourceArn = "SourceArn" - case sourceType = "SourceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exportTaskIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportTaskIdentifier) - exportTaskIdentifier = exportTaskIdentifierDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ExportSourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - } -} - -extension DescribeExportTasksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeExportTasksOutputBody = try responseDecoder.decode(responseBody: data) - self.exportTasks = output.exportTasks - self.marker = output.marker - } else { - self.exportTasks = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeExportTasksResult"] + var value = DescribeExportTasksOutput() + value.exportTasks = try reader["ExportTasks"].readListIfPresent(memberReadingClosure: RDSClientTypes.ExportTask.readingClosure, memberNodeInfo: "ExportTask", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -30890,55 +22467,31 @@ public struct DescribeExportTasksOutput: Swift.Equatable { } } -struct DescribeExportTasksOutputBody: Swift.Equatable { - let marker: Swift.String? - let exportTasks: [RDSClientTypes.ExportTask]? -} - -extension DescribeExportTasksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportTasks = "ExportTasks" - case marker = "Marker" - } +enum DescribeExportTasksOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeExportTasksResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.exportTasks) { - struct KeyVal0{struct ExportTask{}} - let exportTasksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportTasks) - if let exportTasksWrappedContainer = exportTasksWrappedContainer { - let exportTasksContainer = try exportTasksWrappedContainer.decodeIfPresent([RDSClientTypes.ExportTask].self, forKey: .member) - var exportTasksBuffer:[RDSClientTypes.ExportTask]? = nil - if let exportTasksContainer = exportTasksContainer { - exportTasksBuffer = [RDSClientTypes.ExportTask]() - for structureContainer0 in exportTasksContainer { - exportTasksBuffer?.append(structureContainer0) - } - } - exportTasks = exportTasksBuffer - } else { - exportTasks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ExportTaskNotFound": return try await ExportTaskNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - exportTasks = nil } } } -enum DescribeExportTasksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ExportTaskNotFound": return try await ExportTaskNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeGlobalClustersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeGlobalClustersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -31000,61 +22553,16 @@ public struct DescribeGlobalClustersInput: Swift.Equatable { } } -struct DescribeGlobalClustersInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeGlobalClustersOutput { -extension DescribeGlobalClustersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeGlobalClustersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeGlobalClustersOutputBody = try responseDecoder.decode(responseBody: data) - self.globalClusters = output.globalClusters - self.marker = output.marker - } else { - self.globalClusters = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeGlobalClustersResult"] + var value = DescribeGlobalClustersOutput() + value.globalClusters = try reader["GlobalClusters"].readListIfPresent(memberReadingClosure: RDSClientTypes.GlobalCluster.readingClosure, memberNodeInfo: "GlobalClusterMember", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -31075,55 +22583,31 @@ public struct DescribeGlobalClustersOutput: Swift.Equatable { } } -struct DescribeGlobalClustersOutputBody: Swift.Equatable { - let marker: Swift.String? - let globalClusters: [RDSClientTypes.GlobalCluster]? -} - -extension DescribeGlobalClustersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusters = "GlobalClusters" - case marker = "Marker" - } +enum DescribeGlobalClustersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeGlobalClustersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.globalClusters) { - struct KeyVal0{struct GlobalClusterMember{}} - let globalClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalClusters) - if let globalClustersWrappedContainer = globalClustersWrappedContainer { - let globalClustersContainer = try globalClustersWrappedContainer.decodeIfPresent([RDSClientTypes.GlobalCluster].self, forKey: .member) - var globalClustersBuffer:[RDSClientTypes.GlobalCluster]? = nil - if let globalClustersContainer = globalClustersContainer { - globalClustersBuffer = [RDSClientTypes.GlobalCluster]() - for structureContainer0 in globalClustersContainer { - globalClustersBuffer?.append(structureContainer0) - } - } - globalClusters = globalClustersBuffer - } else { - globalClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - globalClusters = nil } } } -enum DescribeGlobalClustersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeIntegrationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case integrationIdentifier = "IntegrationIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeIntegrationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -31183,61 +22667,16 @@ public struct DescribeIntegrationsInput: Swift.Equatable { } } -struct DescribeIntegrationsInputBody: Swift.Equatable { - let integrationIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeIntegrationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case integrationIdentifier = "IntegrationIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let integrationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationIdentifier) - integrationIdentifier = integrationIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeIntegrationsOutput { -extension DescribeIntegrationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeIntegrationsOutputBody = try responseDecoder.decode(responseBody: data) - self.integrations = output.integrations - self.marker = output.marker - } else { - self.integrations = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeIntegrationsResult"] + var value = DescribeIntegrationsOutput() + value.integrations = try reader["Integrations"].readListIfPresent(memberReadingClosure: RDSClientTypes.Integration.readingClosure, memberNodeInfo: "Integration", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -31258,55 +22697,32 @@ public struct DescribeIntegrationsOutput: Swift.Equatable { } } -struct DescribeIntegrationsOutputBody: Swift.Equatable { - let marker: Swift.String? - let integrations: [RDSClientTypes.Integration]? -} +enum DescribeIntegrationsOutputError { -extension DescribeIntegrationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case integrations = "Integrations" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeIntegrationsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.integrations) { - struct KeyVal0{struct Integration{}} - let integrationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .integrations) - if let integrationsWrappedContainer = integrationsWrappedContainer { - let integrationsContainer = try integrationsWrappedContainer.decodeIfPresent([RDSClientTypes.Integration].self, forKey: .member) - var integrationsBuffer:[RDSClientTypes.Integration]? = nil - if let integrationsContainer = integrationsContainer { - integrationsBuffer = [RDSClientTypes.Integration]() - for structureContainer0 in integrationsContainer { - integrationsBuffer?.append(structureContainer0) - } - } - integrations = integrationsBuffer - } else { - integrations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - integrations = nil } } } -enum DescribeIntegrationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeOptionGroupOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case engineName = "EngineName" + case filters = "Filters" + case majorEngineVersion = "MajorEngineVersion" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeOptionGroupOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let engineName = engineName { @@ -31401,65 +22817,16 @@ public struct DescribeOptionGroupOptionsInput: Swift.Equatable { } } -struct DescribeOptionGroupOptionsInputBody: Swift.Equatable { - let engineName: Swift.String? - let majorEngineVersion: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeOptionGroupOptionsOutput { -extension DescribeOptionGroupOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineName = "EngineName" - case filters = "Filters" - case majorEngineVersion = "MajorEngineVersion" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineName) - engineName = engineNameDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeOptionGroupOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeOptionGroupOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.optionGroupOptions = output.optionGroupOptions - } else { - self.marker = nil - self.optionGroupOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeOptionGroupOptionsResult"] + var value = DescribeOptionGroupOptionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.optionGroupOptions = try reader["OptionGroupOptions"].readListIfPresent(memberReadingClosure: RDSClientTypes.OptionGroupOption.readingClosure, memberNodeInfo: "OptionGroupOption", isFlattened: false) + return value } } } @@ -31481,54 +22848,32 @@ public struct DescribeOptionGroupOptionsOutput: Swift.Equatable { } } -struct DescribeOptionGroupOptionsOutputBody: Swift.Equatable { - let optionGroupOptions: [RDSClientTypes.OptionGroupOption]? - let marker: Swift.String? -} - -extension DescribeOptionGroupOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case optionGroupOptions = "OptionGroupOptions" - } +enum DescribeOptionGroupOptionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeOptionGroupOptionsResult")) - if containerValues.contains(.optionGroupOptions) { - struct KeyVal0{struct OptionGroupOption{}} - let optionGroupOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionGroupOptions) - if let optionGroupOptionsWrappedContainer = optionGroupOptionsWrappedContainer { - let optionGroupOptionsContainer = try optionGroupOptionsWrappedContainer.decodeIfPresent([RDSClientTypes.OptionGroupOption].self, forKey: .member) - var optionGroupOptionsBuffer:[RDSClientTypes.OptionGroupOption]? = nil - if let optionGroupOptionsContainer = optionGroupOptionsContainer { - optionGroupOptionsBuffer = [RDSClientTypes.OptionGroupOption]() - for structureContainer0 in optionGroupOptionsContainer { - optionGroupOptionsBuffer?.append(structureContainer0) - } - } - optionGroupOptions = optionGroupOptionsBuffer - } else { - optionGroupOptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - optionGroupOptions = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeOptionGroupOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeOptionGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case engineName = "EngineName" + case filters = "Filters" + case majorEngineVersion = "MajorEngineVersion" + case marker = "Marker" + case maxRecords = "MaxRecords" + case optionGroupName = "OptionGroupName" } -} -extension DescribeOptionGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let engineName = engineName { @@ -31629,69 +22974,16 @@ public struct DescribeOptionGroupsInput: Swift.Equatable { } } -struct DescribeOptionGroupsInputBody: Swift.Equatable { - let optionGroupName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? - let engineName: Swift.String? - let majorEngineVersion: Swift.String? -} - -extension DescribeOptionGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineName = "EngineName" - case filters = "Filters" - case majorEngineVersion = "MajorEngineVersion" - case marker = "Marker" - case maxRecords = "MaxRecords" - case optionGroupName = "OptionGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let engineNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineName) - engineName = engineNameDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - } -} +extension DescribeOptionGroupsOutput { -extension DescribeOptionGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeOptionGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.optionGroupsList = output.optionGroupsList - } else { - self.marker = nil - self.optionGroupsList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeOptionGroupsResult"] + var value = DescribeOptionGroupsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.optionGroupsList = try reader["OptionGroupsList"].readListIfPresent(memberReadingClosure: RDSClientTypes.OptionGroup.readingClosure, memberNodeInfo: "OptionGroup", isFlattened: false) + return value } } } @@ -31713,55 +23005,36 @@ public struct DescribeOptionGroupsOutput: Swift.Equatable { } } -struct DescribeOptionGroupsOutputBody: Swift.Equatable { - let optionGroupsList: [RDSClientTypes.OptionGroup]? - let marker: Swift.String? -} - -extension DescribeOptionGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case optionGroupsList = "OptionGroupsList" - } +enum DescribeOptionGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeOptionGroupsResult")) - if containerValues.contains(.optionGroupsList) { - struct KeyVal0{struct OptionGroup{}} - let optionGroupsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionGroupsList) - if let optionGroupsListWrappedContainer = optionGroupsListWrappedContainer { - let optionGroupsListContainer = try optionGroupsListWrappedContainer.decodeIfPresent([RDSClientTypes.OptionGroup].self, forKey: .member) - var optionGroupsListBuffer:[RDSClientTypes.OptionGroup]? = nil - if let optionGroupsListContainer = optionGroupsListContainer { - optionGroupsListBuffer = [RDSClientTypes.OptionGroup]() - for structureContainer0 in optionGroupsListContainer { - optionGroupsListBuffer?.append(structureContainer0) - } - } - optionGroupsList = optionGroupsListBuffer - } else { - optionGroupsList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - optionGroupsList = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeOptionGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeOrderableDBInstanceOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case availabilityZoneGroup = "AvailabilityZoneGroup" + case dbInstanceClass = "DBInstanceClass" + case engine = "Engine" + case engineVersion = "EngineVersion" + case filters = "Filters" + case licenseModel = "LicenseModel" + case marker = "Marker" + case maxRecords = "MaxRecords" + case vpc = "Vpc" } -} -extension DescribeOrderableDBInstanceOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZoneGroup = availabilityZoneGroup { @@ -31890,81 +23163,16 @@ public struct DescribeOrderableDBInstanceOptionsInput: Swift.Equatable { } } -struct DescribeOrderableDBInstanceOptionsInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbInstanceClass: Swift.String? - let licenseModel: Swift.String? - let availabilityZoneGroup: Swift.String? - let vpc: Swift.Bool? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeOrderableDBInstanceOptionsOutput { -extension DescribeOrderableDBInstanceOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZoneGroup = "AvailabilityZoneGroup" - case dbInstanceClass = "DBInstanceClass" - case engine = "Engine" - case engineVersion = "EngineVersion" - case filters = "Filters" - case licenseModel = "LicenseModel" - case marker = "Marker" - case maxRecords = "MaxRecords" - case vpc = "Vpc" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let availabilityZoneGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneGroup) - availabilityZoneGroup = availabilityZoneGroupDecoded - let vpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .vpc) - vpc = vpcDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeOrderableDBInstanceOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeOrderableDBInstanceOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.orderableDBInstanceOptions = output.orderableDBInstanceOptions - } else { - self.marker = nil - self.orderableDBInstanceOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeOrderableDBInstanceOptionsResult"] + var value = DescribeOrderableDBInstanceOptionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.orderableDBInstanceOptions = try reader["OrderableDBInstanceOptions"].readListIfPresent(memberReadingClosure: RDSClientTypes.OrderableDBInstanceOption.readingClosure, memberNodeInfo: "OrderableDBInstanceOption", isFlattened: false) + return value } } } @@ -31986,54 +23194,30 @@ public struct DescribeOrderableDBInstanceOptionsOutput: Swift.Equatable { } } -struct DescribeOrderableDBInstanceOptionsOutputBody: Swift.Equatable { - let orderableDBInstanceOptions: [RDSClientTypes.OrderableDBInstanceOption]? - let marker: Swift.String? -} +enum DescribeOrderableDBInstanceOptionsOutputError { -extension DescribeOrderableDBInstanceOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case orderableDBInstanceOptions = "OrderableDBInstanceOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeOrderableDBInstanceOptionsResult")) - if containerValues.contains(.orderableDBInstanceOptions) { - struct KeyVal0{struct OrderableDBInstanceOption{}} - let orderableDBInstanceOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .orderableDBInstanceOptions) - if let orderableDBInstanceOptionsWrappedContainer = orderableDBInstanceOptionsWrappedContainer { - let orderableDBInstanceOptionsContainer = try orderableDBInstanceOptionsWrappedContainer.decodeIfPresent([RDSClientTypes.OrderableDBInstanceOption].self, forKey: .member) - var orderableDBInstanceOptionsBuffer:[RDSClientTypes.OrderableDBInstanceOption]? = nil - if let orderableDBInstanceOptionsContainer = orderableDBInstanceOptionsContainer { - orderableDBInstanceOptionsBuffer = [RDSClientTypes.OrderableDBInstanceOption]() - for structureContainer0 in orderableDBInstanceOptionsContainer { - orderableDBInstanceOptionsBuffer?.append(structureContainer0) - } - } - orderableDBInstanceOptions = orderableDBInstanceOptionsBuffer - } else { - orderableDBInstanceOptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - orderableDBInstanceOptions = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeOrderableDBInstanceOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribePendingMaintenanceActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case resourceIdentifier = "ResourceIdentifier" } -} -extension DescribePendingMaintenanceActionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -32098,61 +23282,16 @@ public struct DescribePendingMaintenanceActionsInput: Swift.Equatable { } } -struct DescribePendingMaintenanceActionsInputBody: Swift.Equatable { - let resourceIdentifier: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribePendingMaintenanceActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case resourceIdentifier = "ResourceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribePendingMaintenanceActionsOutput { -extension DescribePendingMaintenanceActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePendingMaintenanceActionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.pendingMaintenanceActions = output.pendingMaintenanceActions - } else { - self.marker = nil - self.pendingMaintenanceActions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribePendingMaintenanceActionsResult"] + var value = DescribePendingMaintenanceActionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.pendingMaintenanceActions = try reader["PendingMaintenanceActions"].readListIfPresent(memberReadingClosure: RDSClientTypes.ResourcePendingMaintenanceActions.readingClosure, memberNodeInfo: "ResourcePendingMaintenanceActions", isFlattened: false) + return value } } } @@ -32174,55 +23313,38 @@ public struct DescribePendingMaintenanceActionsOutput: Swift.Equatable { } } -struct DescribePendingMaintenanceActionsOutputBody: Swift.Equatable { - let pendingMaintenanceActions: [RDSClientTypes.ResourcePendingMaintenanceActions]? - let marker: Swift.String? -} - -extension DescribePendingMaintenanceActionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case pendingMaintenanceActions = "PendingMaintenanceActions" - } +enum DescribePendingMaintenanceActionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribePendingMaintenanceActionsResult")) - if containerValues.contains(.pendingMaintenanceActions) { - struct KeyVal0{struct ResourcePendingMaintenanceActions{}} - let pendingMaintenanceActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .pendingMaintenanceActions) - if let pendingMaintenanceActionsWrappedContainer = pendingMaintenanceActionsWrappedContainer { - let pendingMaintenanceActionsContainer = try pendingMaintenanceActionsWrappedContainer.decodeIfPresent([RDSClientTypes.ResourcePendingMaintenanceActions].self, forKey: .member) - var pendingMaintenanceActionsBuffer:[RDSClientTypes.ResourcePendingMaintenanceActions]? = nil - if let pendingMaintenanceActionsContainer = pendingMaintenanceActionsContainer { - pendingMaintenanceActionsBuffer = [RDSClientTypes.ResourcePendingMaintenanceActions]() - for structureContainer0 in pendingMaintenanceActionsContainer { - pendingMaintenanceActionsBuffer?.append(structureContainer0) - } - } - pendingMaintenanceActions = pendingMaintenanceActionsBuffer - } else { - pendingMaintenanceActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - pendingMaintenanceActions = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribePendingMaintenanceActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeReservedDBInstancesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceClass = "DBInstanceClass" + case duration = "Duration" + case filters = "Filters" + case leaseId = "LeaseId" + case marker = "Marker" + case maxRecords = "MaxRecords" + case multiAZ = "MultiAZ" + case offeringType = "OfferingType" + case productDescription = "ProductDescription" + case reservedDBInstanceId = "ReservedDBInstanceId" + case reservedDBInstancesOfferingId = "ReservedDBInstancesOfferingId" } -} -extension DescribeReservedDBInstancesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceClass = dbInstanceClass { @@ -32332,80 +23454,19 @@ public struct DescribeReservedDBInstancesInput: Swift.Equatable { } } -struct DescribeReservedDBInstancesInputBody: Swift.Equatable { - let reservedDBInstanceId: Swift.String? - let reservedDBInstancesOfferingId: Swift.String? - let dbInstanceClass: Swift.String? - let duration: Swift.String? - let productDescription: Swift.String? - let offeringType: Swift.String? - let multiAZ: Swift.Bool? - let leaseId: Swift.String? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeReservedDBInstancesInputBody: Swift.Decodable { +extension DescribeReservedDBInstancesOfferingsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbInstanceClass = "DBInstanceClass" case duration = "Duration" case filters = "Filters" - case leaseId = "LeaseId" case marker = "Marker" case maxRecords = "MaxRecords" case multiAZ = "MultiAZ" case offeringType = "OfferingType" case productDescription = "ProductDescription" - case reservedDBInstanceId = "ReservedDBInstanceId" case reservedDBInstancesOfferingId = "ReservedDBInstancesOfferingId" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedDBInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstanceId) - reservedDBInstanceId = reservedDBInstanceIdDecoded - let reservedDBInstancesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstancesOfferingId) - reservedDBInstancesOfferingId = reservedDBInstancesOfferingIdDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .duration) - duration = durationDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let leaseIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .leaseId) - leaseId = leaseIdDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeReservedDBInstancesOfferingsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceClass = dbInstanceClass { @@ -32501,81 +23562,16 @@ public struct DescribeReservedDBInstancesOfferingsInput: Swift.Equatable { } } -struct DescribeReservedDBInstancesOfferingsInputBody: Swift.Equatable { - let reservedDBInstancesOfferingId: Swift.String? - let dbInstanceClass: Swift.String? - let duration: Swift.String? - let productDescription: Swift.String? - let offeringType: Swift.String? - let multiAZ: Swift.Bool? - let filters: [RDSClientTypes.Filter]? - let maxRecords: Swift.Int? - let marker: Swift.String? -} +extension DescribeReservedDBInstancesOfferingsOutput { -extension DescribeReservedDBInstancesOfferingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceClass = "DBInstanceClass" - case duration = "Duration" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case multiAZ = "MultiAZ" - case offeringType = "OfferingType" - case productDescription = "ProductDescription" - case reservedDBInstancesOfferingId = "ReservedDBInstancesOfferingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedDBInstancesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstancesOfferingId) - reservedDBInstancesOfferingId = reservedDBInstancesOfferingIdDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .duration) - duration = durationDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeReservedDBInstancesOfferingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedDBInstancesOfferingsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedDBInstancesOfferings = output.reservedDBInstancesOfferings - } else { - self.marker = nil - self.reservedDBInstancesOfferings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReservedDBInstancesOfferingsResult"] + var value = DescribeReservedDBInstancesOfferingsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedDBInstancesOfferings = try reader["ReservedDBInstancesOfferings"].readListIfPresent(memberReadingClosure: RDSClientTypes.ReservedDBInstancesOffering.readingClosure, memberNodeInfo: "ReservedDBInstancesOffering", isFlattened: false) + return value } } } @@ -32597,64 +23593,33 @@ public struct DescribeReservedDBInstancesOfferingsOutput: Swift.Equatable { } } -struct DescribeReservedDBInstancesOfferingsOutputBody: Swift.Equatable { - let marker: Swift.String? - let reservedDBInstancesOfferings: [RDSClientTypes.ReservedDBInstancesOffering]? -} - -extension DescribeReservedDBInstancesOfferingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedDBInstancesOfferings = "ReservedDBInstancesOfferings" - } +enum DescribeReservedDBInstancesOfferingsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReservedDBInstancesOfferingsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.reservedDBInstancesOfferings) { - struct KeyVal0{struct ReservedDBInstancesOffering{}} - let reservedDBInstancesOfferingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedDBInstancesOfferings) - if let reservedDBInstancesOfferingsWrappedContainer = reservedDBInstancesOfferingsWrappedContainer { - let reservedDBInstancesOfferingsContainer = try reservedDBInstancesOfferingsWrappedContainer.decodeIfPresent([RDSClientTypes.ReservedDBInstancesOffering].self, forKey: .member) - var reservedDBInstancesOfferingsBuffer:[RDSClientTypes.ReservedDBInstancesOffering]? = nil - if let reservedDBInstancesOfferingsContainer = reservedDBInstancesOfferingsContainer { - reservedDBInstancesOfferingsBuffer = [RDSClientTypes.ReservedDBInstancesOffering]() - for structureContainer0 in reservedDBInstancesOfferingsContainer { - reservedDBInstancesOfferingsBuffer?.append(structureContainer0) - } - } - reservedDBInstancesOfferings = reservedDBInstancesOfferingsBuffer - } else { - reservedDBInstancesOfferings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ReservedDBInstancesOfferingNotFound": return try await ReservedDBInstancesOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedDBInstancesOfferings = nil } } } -enum DescribeReservedDBInstancesOfferingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ReservedDBInstancesOfferingNotFound": return try await ReservedDBInstancesOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} +extension DescribeReservedDBInstancesOutput { -extension DescribeReservedDBInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedDBInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedDBInstances = output.reservedDBInstances - } else { - self.marker = nil - self.reservedDBInstances = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReservedDBInstancesResult"] + var value = DescribeReservedDBInstancesOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedDBInstances = try reader["ReservedDBInstances"].readListIfPresent(memberReadingClosure: RDSClientTypes.ReservedDBInstance.readingClosure, memberNodeInfo: "ReservedDBInstance", isFlattened: false) + return value } } } @@ -32676,55 +23641,31 @@ public struct DescribeReservedDBInstancesOutput: Swift.Equatable { } } -struct DescribeReservedDBInstancesOutputBody: Swift.Equatable { - let marker: Swift.String? - let reservedDBInstances: [RDSClientTypes.ReservedDBInstance]? -} - -extension DescribeReservedDBInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedDBInstances = "ReservedDBInstances" - } +enum DescribeReservedDBInstancesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReservedDBInstancesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.reservedDBInstances) { - struct KeyVal0{struct ReservedDBInstance{}} - let reservedDBInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedDBInstances) - if let reservedDBInstancesWrappedContainer = reservedDBInstancesWrappedContainer { - let reservedDBInstancesContainer = try reservedDBInstancesWrappedContainer.decodeIfPresent([RDSClientTypes.ReservedDBInstance].self, forKey: .member) - var reservedDBInstancesBuffer:[RDSClientTypes.ReservedDBInstance]? = nil - if let reservedDBInstancesContainer = reservedDBInstancesContainer { - reservedDBInstancesBuffer = [RDSClientTypes.ReservedDBInstance]() - for structureContainer0 in reservedDBInstancesContainer { - reservedDBInstancesBuffer?.append(structureContainer0) - } - } - reservedDBInstances = reservedDBInstancesBuffer - } else { - reservedDBInstances = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ReservedDBInstanceNotFound": return try await ReservedDBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedDBInstances = nil } } } -enum DescribeReservedDBInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ReservedDBInstanceNotFound": return try await ReservedDBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeSourceRegionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case regionName = "RegionName" } -} -extension DescribeSourceRegionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -32787,61 +23728,16 @@ public struct DescribeSourceRegionsInput: Swift.Equatable { } } -struct DescribeSourceRegionsInputBody: Swift.Equatable { - let regionName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let filters: [RDSClientTypes.Filter]? -} +extension DescribeSourceRegionsOutput { -extension DescribeSourceRegionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case regionName = "RegionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .regionName) - regionName = regionNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} - -extension DescribeSourceRegionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSourceRegionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.sourceRegions = output.sourceRegions - } else { - self.marker = nil - self.sourceRegions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeSourceRegionsResult"] + var value = DescribeSourceRegionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.sourceRegions = try reader["SourceRegions"].readListIfPresent(memberReadingClosure: RDSClientTypes.SourceRegion.readingClosure, memberNodeInfo: "SourceRegion", isFlattened: false) + return value } } } @@ -32863,54 +23759,31 @@ public struct DescribeSourceRegionsOutput: Swift.Equatable { } } -struct DescribeSourceRegionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let sourceRegions: [RDSClientTypes.SourceRegion]? -} +enum DescribeSourceRegionsOutputError { -extension DescribeSourceRegionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case sourceRegions = "SourceRegions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeSourceRegionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.sourceRegions) { - struct KeyVal0{struct SourceRegion{}} - let sourceRegionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceRegions) - if let sourceRegionsWrappedContainer = sourceRegionsWrappedContainer { - let sourceRegionsContainer = try sourceRegionsWrappedContainer.decodeIfPresent([RDSClientTypes.SourceRegion].self, forKey: .member) - var sourceRegionsBuffer:[RDSClientTypes.SourceRegion]? = nil - if let sourceRegionsContainer = sourceRegionsContainer { - sourceRegionsBuffer = [RDSClientTypes.SourceRegion]() - for structureContainer0 in sourceRegionsContainer { - sourceRegionsBuffer?.append(structureContainer0) - } - } - sourceRegions = sourceRegionsBuffer - } else { - sourceRegions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - sourceRegions = nil } } } -enum DescribeSourceRegionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTenantDatabasesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case tenantDBName = "TenantDBName" } -} -extension DescribeTenantDatabasesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -32983,65 +23856,16 @@ public struct DescribeTenantDatabasesInput: Swift.Equatable { } } -struct DescribeTenantDatabasesInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let tenantDBName: Swift.String? - let filters: [RDSClientTypes.Filter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeTenantDatabasesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case tenantDBName = "TenantDBName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let tenantDBNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDBName) - tenantDBName = tenantDBNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribeTenantDatabasesOutput { -extension DescribeTenantDatabasesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTenantDatabasesOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.tenantDatabases = output.tenantDatabases - } else { - self.marker = nil - self.tenantDatabases = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTenantDatabasesResult"] + var value = DescribeTenantDatabasesOutput() + value.marker = try reader["Marker"].readIfPresent() + value.tenantDatabases = try reader["TenantDatabases"].readListIfPresent(memberReadingClosure: RDSClientTypes.TenantDatabase.readingClosure, memberNodeInfo: "TenantDatabase", isFlattened: false) + return value } } } @@ -33062,55 +23886,28 @@ public struct DescribeTenantDatabasesOutput: Swift.Equatable { } } -struct DescribeTenantDatabasesOutputBody: Swift.Equatable { - let marker: Swift.String? - let tenantDatabases: [RDSClientTypes.TenantDatabase]? -} - -extension DescribeTenantDatabasesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case tenantDatabases = "TenantDatabases" - } +enum DescribeTenantDatabasesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTenantDatabasesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tenantDatabases) { - struct KeyVal0{struct TenantDatabase{}} - let tenantDatabasesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tenantDatabases) - if let tenantDatabasesWrappedContainer = tenantDatabasesWrappedContainer { - let tenantDatabasesContainer = try tenantDatabasesWrappedContainer.decodeIfPresent([RDSClientTypes.TenantDatabase].self, forKey: .member) - var tenantDatabasesBuffer:[RDSClientTypes.TenantDatabase]? = nil - if let tenantDatabasesContainer = tenantDatabasesContainer { - tenantDatabasesBuffer = [RDSClientTypes.TenantDatabase]() - for structureContainer0 in tenantDatabasesContainer { - tenantDatabasesBuffer?.append(structureContainer0) - } - } - tenantDatabases = tenantDatabasesBuffer - } else { - tenantDatabases = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tenantDatabases = nil } } } -enum DescribeTenantDatabasesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeValidDBInstanceModificationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" } -} -extension DescribeValidDBInstanceModificationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -33142,30 +23939,15 @@ public struct DescribeValidDBInstanceModificationsInput: Swift.Equatable { } } -struct DescribeValidDBInstanceModificationsInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? -} - -extension DescribeValidDBInstanceModificationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - } -} +extension DescribeValidDBInstanceModificationsOutput { -extension DescribeValidDBInstanceModificationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeValidDBInstanceModificationsOutputBody = try responseDecoder.decode(responseBody: data) - self.validDBInstanceModificationsMessage = output.validDBInstanceModificationsMessage - } else { - self.validDBInstanceModificationsMessage = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeValidDBInstanceModificationsResult"] + var value = DescribeValidDBInstanceModificationsOutput() + value.validDBInstanceModificationsMessage = try reader["ValidDBInstanceModificationsMessage"].readIfPresent(readingClosure: RDSClientTypes.ValidDBInstanceModificationsMessage.readingClosure) + return value } } } @@ -33182,35 +23964,29 @@ public struct DescribeValidDBInstanceModificationsOutput: Swift.Equatable { } } -struct DescribeValidDBInstanceModificationsOutputBody: Swift.Equatable { - let validDBInstanceModificationsMessage: RDSClientTypes.ValidDBInstanceModificationsMessage? -} +enum DescribeValidDBInstanceModificationsOutputError { -extension DescribeValidDBInstanceModificationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case validDBInstanceModificationsMessage = "ValidDBInstanceModificationsMessage" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeValidDBInstanceModificationsResult")) - let validDBInstanceModificationsMessageDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ValidDBInstanceModificationsMessage.self, forKey: .validDBInstanceModificationsMessage) - validDBInstanceModificationsMessage = validDBInstanceModificationsMessageDecoded - } -} - -enum DescribeValidDBInstanceModificationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DisableHttpEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -33241,32 +24017,16 @@ public struct DisableHttpEndpointInput: Swift.Equatable { } } -struct DisableHttpEndpointInputBody: Swift.Equatable { - let resourceArn: Swift.String? -} - -extension DisableHttpEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - } +extension DisableHttpEndpointOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - } -} - -extension DisableHttpEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableHttpEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.httpEndpointEnabled = output.httpEndpointEnabled - self.resourceArn = output.resourceArn - } else { - self.httpEndpointEnabled = nil - self.resourceArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DisableHttpEndpointResult"] + var value = DisableHttpEndpointOutput() + value.httpEndpointEnabled = try reader["HttpEndpointEnabled"].readIfPresent() + value.resourceArn = try reader["ResourceArn"].readIfPresent() + return value } } } @@ -33287,39 +24047,25 @@ public struct DisableHttpEndpointOutput: Swift.Equatable { } } -struct DisableHttpEndpointOutputBody: Swift.Equatable { - let resourceArn: Swift.String? - let httpEndpointEnabled: Swift.Bool? -} - -extension DisableHttpEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case httpEndpointEnabled = "HttpEndpointEnabled" - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DisableHttpEndpointResult")) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let httpEndpointEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .httpEndpointEnabled) - httpEndpointEnabled = httpEndpointEnabledDecoded - } -} +enum DisableHttpEndpointOutputError { -enum DisableHttpEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidResourceStateFault": return try await InvalidResourceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidResourceStateFault": return try await InvalidResourceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RDSClientTypes.DocLink: Swift.Codable { +extension RDSClientTypes.DocLink: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case text = "Text" case url = "Url" @@ -33335,12 +24081,14 @@ extension RDSClientTypes.DocLink: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let textDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .text) - text = textDecoded - let urlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .url) - url = urlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DocLink() + value.text = try reader["Text"].readIfPresent() + value.url = try reader["Url"].readIfPresent() + return value + } } } @@ -33364,7 +24112,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.DomainMembership: Swift.Codable { +extension RDSClientTypes.DomainMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authSecretArn = "AuthSecretArn" case dnsIps = "DnsIps" @@ -33409,38 +24157,18 @@ extension RDSClientTypes.DomainMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let fqdnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fqdn) - fqdn = fqdnDecoded - let iamRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleName) - iamRoleName = iamRoleNameDecoded - let ouDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ou) - ou = ouDecoded - let authSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authSecretArn) - authSecretArn = authSecretArnDecoded - if containerValues.contains(.dnsIps) { - struct KeyVal0{struct member{}} - let dnsIpsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dnsIps) - if let dnsIpsWrappedContainer = dnsIpsWrappedContainer { - let dnsIpsContainer = try dnsIpsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dnsIpsBuffer:[Swift.String]? = nil - if let dnsIpsContainer = dnsIpsContainer { - dnsIpsBuffer = [Swift.String]() - for stringContainer0 in dnsIpsContainer { - dnsIpsBuffer?.append(stringContainer0) - } - } - dnsIps = dnsIpsBuffer - } else { - dnsIps = [] - } - } else { - dnsIps = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DomainMembership() + value.domain = try reader["Domain"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.fqdn = try reader["FQDN"].readIfPresent() + value.iamRoleName = try reader["IAMRoleName"].readIfPresent() + value.ou = try reader["OU"].readIfPresent() + value.authSecretArn = try reader["AuthSecretArn"].readIfPresent() + value.dnsIps = try reader["DnsIps"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -33486,16 +24214,14 @@ extension RDSClientTypes { } extension DomainNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DomainNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -33523,23 +24249,7 @@ public struct DomainNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct DomainNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DomainNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.DoubleRange: Swift.Codable { +extension RDSClientTypes.DoubleRange: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case from = "From" case to = "To" @@ -33555,12 +24265,14 @@ extension RDSClientTypes.DoubleRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .from) - from = fromDecoded - let toDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .to) - to = toDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.DoubleRange() + value.from = try reader["From"].readIfPresent() + value.to = try reader["To"].readIfPresent() + return value + } } } @@ -33585,6 +24297,13 @@ extension RDSClientTypes { } extension DownloadDBLogFilePortionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case logFileName = "LogFileName" + case marker = "Marker" + case numberOfLines = "NumberOfLines" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -33648,46 +24367,17 @@ public struct DownloadDBLogFilePortionInput: Swift.Equatable { } } -struct DownloadDBLogFilePortionInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let logFileName: Swift.String? - let marker: Swift.String? - let numberOfLines: Swift.Int? -} - -extension DownloadDBLogFilePortionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case logFileName = "LogFileName" - case marker = "Marker" - case numberOfLines = "NumberOfLines" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let logFileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logFileName) - logFileName = logFileNameDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let numberOfLinesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfLines) - numberOfLines = numberOfLinesDecoded - } -} +extension DownloadDBLogFilePortionOutput { -extension DownloadDBLogFilePortionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DownloadDBLogFilePortionOutputBody = try responseDecoder.decode(responseBody: data) - self.additionalDataPending = output.additionalDataPending - self.logFileData = output.logFileData - self.marker = output.marker - } else { - self.additionalDataPending = nil - self.logFileData = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DownloadDBLogFilePortionResult"] + var value = DownloadDBLogFilePortionOutput() + value.additionalDataPending = try reader["AdditionalDataPending"].readIfPresent() + value.logFileData = try reader["LogFileData"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -33713,43 +24403,25 @@ public struct DownloadDBLogFilePortionOutput: Swift.Equatable { } } -struct DownloadDBLogFilePortionOutputBody: Swift.Equatable { - let logFileData: Swift.String? - let marker: Swift.String? - let additionalDataPending: Swift.Bool? -} - -extension DownloadDBLogFilePortionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalDataPending = "AdditionalDataPending" - case logFileData = "LogFileData" - case marker = "Marker" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DownloadDBLogFilePortionResult")) - let logFileDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .logFileData) - logFileData = logFileDataDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let additionalDataPendingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .additionalDataPending) - additionalDataPending = additionalDataPendingDecoded - } -} +enum DownloadDBLogFilePortionOutputError { -enum DownloadDBLogFilePortionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBLogFileNotFoundFault": return try await DBLogFileNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBLogFileNotFoundFault": return try await DBLogFileNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RDSClientTypes.EC2SecurityGroup: Swift.Codable { +extension RDSClientTypes.EC2SecurityGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ec2SecurityGroupId = "EC2SecurityGroupId" case ec2SecurityGroupName = "EC2SecurityGroupName" @@ -33773,16 +24445,16 @@ extension RDSClientTypes.EC2SecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupId) - ec2SecurityGroupId = ec2SecurityGroupIdDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.EC2SecurityGroup() + value.status = try reader["Status"].readIfPresent() + value.ec2SecurityGroupName = try reader["EC2SecurityGroupName"].readIfPresent() + value.ec2SecurityGroupId = try reader["EC2SecurityGroupId"].readIfPresent() + value.ec2SecurityGroupOwnerId = try reader["EC2SecurityGroupOwnerId"].readIfPresent() + return value + } } } @@ -33821,16 +24493,14 @@ extension RDSClientTypes { } extension Ec2ImagePropertiesNotSupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = Ec2ImagePropertiesNotSupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -33858,23 +24528,11 @@ public struct Ec2ImagePropertiesNotSupportedFault: ClientRuntime.ModeledError, A } } -struct Ec2ImagePropertiesNotSupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension Ec2ImagePropertiesNotSupportedFaultBody: Swift.Decodable { +extension EnableHttpEndpointInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case resourceArn = "ResourceArn" } -} -extension EnableHttpEndpointInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -33905,32 +24563,16 @@ public struct EnableHttpEndpointInput: Swift.Equatable { } } -struct EnableHttpEndpointInputBody: Swift.Equatable { - let resourceArn: Swift.String? -} +extension EnableHttpEndpointOutput { -extension EnableHttpEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - } -} - -extension EnableHttpEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableHttpEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.httpEndpointEnabled = output.httpEndpointEnabled - self.resourceArn = output.resourceArn - } else { - self.httpEndpointEnabled = nil - self.resourceArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["EnableHttpEndpointResult"] + var value = EnableHttpEndpointOutput() + value.httpEndpointEnabled = try reader["HttpEndpointEnabled"].readIfPresent() + value.resourceArn = try reader["ResourceArn"].readIfPresent() + return value } } } @@ -33951,39 +24593,25 @@ public struct EnableHttpEndpointOutput: Swift.Equatable { } } -struct EnableHttpEndpointOutputBody: Swift.Equatable { - let resourceArn: Swift.String? - let httpEndpointEnabled: Swift.Bool? -} - -extension EnableHttpEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case httpEndpointEnabled = "HttpEndpointEnabled" - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("EnableHttpEndpointResult")) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let httpEndpointEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .httpEndpointEnabled) - httpEndpointEnabled = httpEndpointEnabledDecoded - } -} +enum EnableHttpEndpointOutputError { -enum EnableHttpEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidResourceStateFault": return try await InvalidResourceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidResourceStateFault": return try await InvalidResourceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RDSClientTypes.Endpoint: Swift.Codable { +extension RDSClientTypes.Endpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case address = "Address" case hostedZoneId = "HostedZoneId" @@ -34003,14 +24631,15 @@ extension RDSClientTypes.Endpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Endpoint() + value.address = try reader["Address"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + return value + } } } @@ -34047,7 +24676,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.EngineDefaults: Swift.Codable { +extension RDSClientTypes.EngineDefaults: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbParameterGroupFamily = "DBParameterGroupFamily" case marker = "Marker" @@ -34076,30 +24705,14 @@ extension RDSClientTypes.EngineDefaults: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RDSClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RDSClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RDSClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.EngineDefaults() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: RDSClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -34163,7 +24776,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.Event: Swift.Codable { +extension RDSClientTypes.Event: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case date = "Date" case eventCategories = "EventCategories" @@ -34204,37 +24817,18 @@ extension RDSClientTypes.Event: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Event() + value.sourceIdentifier = try reader["SourceIdentifier"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.eventCategories = try reader["EventCategories"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + value.sourceArn = try reader["SourceArn"].readIfPresent() + return value } - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded } } @@ -34274,7 +24868,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.EventCategoriesMap: Swift.Codable { +extension RDSClientTypes.EventCategoriesMap: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case eventCategories = "EventCategories" case sourceType = "SourceType" @@ -34299,28 +24893,13 @@ extension RDSClientTypes.EventCategoriesMap: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.EventCategoriesMap() + value.sourceType = try reader["SourceType"].readIfPresent() + value.eventCategories = try reader["EventCategories"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + return value } } } @@ -34345,7 +24924,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.EventSubscription: Swift.Codable { +extension RDSClientTypes.EventSubscription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case custSubscriptionId = "CustSubscriptionId" case customerAwsId = "CustomerAwsId" @@ -34411,62 +24990,22 @@ extension RDSClientTypes.EventSubscription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerAwsIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerAwsId) - customerAwsId = customerAwsIdDecoded - let custSubscriptionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .custSubscriptionId) - custSubscriptionId = custSubscriptionIdDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let subscriptionCreationTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionCreationTime) - subscriptionCreationTime = subscriptionCreationTimeDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.sourceIdsList) { - struct KeyVal0{struct SourceId{}} - let sourceIdsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIdsList) - if let sourceIdsListWrappedContainer = sourceIdsListWrappedContainer { - let sourceIdsListContainer = try sourceIdsListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsListBuffer:[Swift.String]? = nil - if let sourceIdsListContainer = sourceIdsListContainer { - sourceIdsListBuffer = [Swift.String]() - for stringContainer0 in sourceIdsListContainer { - sourceIdsListBuffer?.append(stringContainer0) - } - } - sourceIdsList = sourceIdsListBuffer - } else { - sourceIdsList = [] - } - } else { - sourceIdsList = nil - } - if containerValues.contains(.eventCategoriesList) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategoriesList) - if let eventCategoriesListWrappedContainer = eventCategoriesListWrappedContainer { - let eventCategoriesListContainer = try eventCategoriesListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesListBuffer:[Swift.String]? = nil - if let eventCategoriesListContainer = eventCategoriesListContainer { - eventCategoriesListBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesListContainer { - eventCategoriesListBuffer?.append(stringContainer0) - } - } - eventCategoriesList = eventCategoriesListBuffer - } else { - eventCategoriesList = [] - } - } else { - eventCategoriesList = nil - } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - let eventSubscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventSubscriptionArn) - eventSubscriptionArn = eventSubscriptionArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.EventSubscription() + value.customerAwsId = try reader["CustomerAwsId"].readIfPresent() + value.custSubscriptionId = try reader["CustSubscriptionId"].readIfPresent() + value.snsTopicArn = try reader["SnsTopicArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.subscriptionCreationTime = try reader["SubscriptionCreationTime"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.sourceIdsList = try reader["SourceIdsList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SourceId", isFlattened: false) + value.eventCategoriesList = try reader["EventCategoriesList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.enabled = try reader["Enabled"].readIfPresent() + value.eventSubscriptionArn = try reader["EventSubscriptionArn"].readIfPresent() + return value + } } } @@ -34523,16 +25062,14 @@ extension RDSClientTypes { } extension EventSubscriptionQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EventSubscriptionQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -34560,22 +25097,6 @@ public struct EventSubscriptionQuotaExceededFault: ClientRuntime.ModeledError, A } } -struct EventSubscriptionQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EventSubscriptionQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RDSClientTypes { public enum ExportSourceType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case cluster @@ -34608,7 +25129,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.ExportTask: Swift.Codable { +extension RDSClientTypes.ExportTask: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case exportOnly = "ExportOnly" case exportTaskIdentifier = "ExportTaskIdentifier" @@ -34689,57 +25210,28 @@ extension RDSClientTypes.ExportTask: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exportTaskIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportTaskIdentifier) - exportTaskIdentifier = exportTaskIdentifierDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - if containerValues.contains(.exportOnly) { - struct KeyVal0{struct member{}} - let exportOnlyWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportOnly) - if let exportOnlyWrappedContainer = exportOnlyWrappedContainer { - let exportOnlyContainer = try exportOnlyWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportOnlyBuffer:[Swift.String]? = nil - if let exportOnlyContainer = exportOnlyContainer { - exportOnlyBuffer = [Swift.String]() - for stringContainer0 in exportOnlyContainer { - exportOnlyBuffer?.append(stringContainer0) - } - } - exportOnly = exportOnlyBuffer - } else { - exportOnly = [] - } - } else { - exportOnly = nil - } - let snapshotTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotTime) - snapshotTime = snapshotTimeDecoded - let taskStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .taskStartTime) - taskStartTime = taskStartTimeDecoded - let taskEndTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .taskEndTime) - taskEndTime = taskEndTimeDecoded - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let totalExtractedDataInGBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalExtractedDataInGB) - totalExtractedDataInGB = totalExtractedDataInGBDecoded - let failureCauseDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureCause) - failureCause = failureCauseDecoded - let warningMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .warningMessage) - warningMessage = warningMessageDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ExportSourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ExportTask() + value.exportTaskIdentifier = try reader["ExportTaskIdentifier"].readIfPresent() + value.sourceArn = try reader["SourceArn"].readIfPresent() + value.exportOnly = try reader["ExportOnly"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.snapshotTime = try reader["SnapshotTime"].readTimestampIfPresent(format: .dateTime) + value.taskStartTime = try reader["TaskStartTime"].readTimestampIfPresent(format: .dateTime) + value.taskEndTime = try reader["TaskEndTime"].readTimestampIfPresent(format: .dateTime) + value.s3Bucket = try reader["S3Bucket"].readIfPresent() + value.s3Prefix = try reader["S3Prefix"].readIfPresent() + value.iamRoleArn = try reader["IamRoleArn"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.totalExtractedDataInGB = try reader["TotalExtractedDataInGB"].readIfPresent() + value.failureCause = try reader["FailureCause"].readIfPresent() + value.warningMessage = try reader["WarningMessage"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + return value + } } } @@ -34840,16 +25332,14 @@ extension RDSClientTypes { } extension ExportTaskAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ExportTaskAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -34877,33 +25367,15 @@ public struct ExportTaskAlreadyExistsFault: ClientRuntime.ModeledError, AWSClien } } -struct ExportTaskAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ExportTaskAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ExportTaskNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ExportTaskNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -34931,23 +25403,12 @@ public struct ExportTaskNotFoundFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct ExportTaskNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ExportTaskNotFoundFaultBody: Swift.Decodable { +extension FailoverDBClusterInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dbClusterIdentifier = "DBClusterIdentifier" + case targetDBInstanceIdentifier = "TargetDBInstanceIdentifier" } -} -extension FailoverDBClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -34988,34 +25449,15 @@ public struct FailoverDBClusterInput: Swift.Equatable { } } -struct FailoverDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let targetDBInstanceIdentifier: Swift.String? -} - -extension FailoverDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case targetDBInstanceIdentifier = "TargetDBInstanceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let targetDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBInstanceIdentifier) - targetDBInstanceIdentifier = targetDBInstanceIdentifierDecoded - } -} +extension FailoverDBClusterOutput { -extension FailoverDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: FailoverDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["FailoverDBClusterResult"] + var value = FailoverDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -35032,36 +25474,33 @@ public struct FailoverDBClusterOutput: Swift.Equatable { } } -struct FailoverDBClusterOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension FailoverDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } +enum FailoverDBClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("FailoverDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum FailoverDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension FailoverGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowDataLoss = "AllowDataLoss" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case switchover = "Switchover" + case targetDbClusterIdentifier = "TargetDbClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowDataLoss = allowDataLoss { @@ -35120,42 +25559,15 @@ public struct FailoverGlobalClusterInput: Swift.Equatable { } } -struct FailoverGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let targetDbClusterIdentifier: Swift.String? - let allowDataLoss: Swift.Bool? - let switchover: Swift.Bool? -} +extension FailoverGlobalClusterOutput { -extension FailoverGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowDataLoss = "AllowDataLoss" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case switchover = "Switchover" - case targetDbClusterIdentifier = "TargetDbClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let targetDbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDbClusterIdentifier) - targetDbClusterIdentifier = targetDbClusterIdentifierDecoded - let allowDataLossDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowDataLoss) - allowDataLoss = allowDataLossDecoded - let switchoverDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .switchover) - switchover = switchoverDecoded - } -} - -extension FailoverGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: FailoverGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["FailoverGlobalClusterResult"] + var value = FailoverGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: RDSClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -35172,37 +25584,27 @@ public struct FailoverGlobalClusterOutput: Swift.Equatable { } } -struct FailoverGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: RDSClientTypes.GlobalCluster? -} - -extension FailoverGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("FailoverGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum FailoverGlobalClusterOutputError { -enum FailoverGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RDSClientTypes.FailoverState: Swift.Codable { +extension RDSClientTypes.FailoverState: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case fromDbClusterArn = "FromDbClusterArn" case isDataLossAllowed = "IsDataLossAllowed" @@ -35226,16 +25628,16 @@ extension RDSClientTypes.FailoverState: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.FailoverStatus.self, forKey: .status) - status = statusDecoded - let fromDbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fromDbClusterArn) - fromDbClusterArn = fromDbClusterArnDecoded - let toDbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .toDbClusterArn) - toDbClusterArn = toDbClusterArnDecoded - let isDataLossAllowedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDataLossAllowed) - isDataLossAllowed = isDataLossAllowedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.FailoverState() + value.status = try reader["Status"].readIfPresent() + value.fromDbClusterArn = try reader["FromDbClusterArn"].readIfPresent() + value.toDbClusterArn = try reader["ToDbClusterArn"].readIfPresent() + value.isDataLossAllowed = try reader["IsDataLossAllowed"].readIfPresent() + return value + } } } @@ -35310,7 +25712,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.Filter: Swift.Codable { +extension RDSClientTypes.Filter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case values = "Values" @@ -35335,28 +25737,13 @@ extension RDSClientTypes.Filter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct Value{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Filter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Value", isFlattened: false) + return value } } } @@ -35395,7 +25782,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.GlobalCluster: Swift.Codable { +extension RDSClientTypes.GlobalCluster: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case databaseName = "DatabaseName" case deletionProtection = "DeletionProtection" @@ -35456,47 +25843,23 @@ extension RDSClientTypes.GlobalCluster: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let globalClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterResourceId) - globalClusterResourceId = globalClusterResourceIdDecoded - let globalClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterArn) - globalClusterArn = globalClusterArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - if containerValues.contains(.globalClusterMembers) { - struct KeyVal0{struct GlobalClusterMember{}} - let globalClusterMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .globalClusterMembers) - if let globalClusterMembersWrappedContainer = globalClusterMembersWrappedContainer { - let globalClusterMembersContainer = try globalClusterMembersWrappedContainer.decodeIfPresent([RDSClientTypes.GlobalClusterMember].self, forKey: .member) - var globalClusterMembersBuffer:[RDSClientTypes.GlobalClusterMember]? = nil - if let globalClusterMembersContainer = globalClusterMembersContainer { - globalClusterMembersBuffer = [RDSClientTypes.GlobalClusterMember]() - for structureContainer0 in globalClusterMembersContainer { - globalClusterMembersBuffer?.append(structureContainer0) - } - } - globalClusterMembers = globalClusterMembersBuffer - } else { - globalClusterMembers = [] - } - } else { - globalClusterMembers = nil - } - let failoverStateDecoded = try containerValues.decodeIfPresent(RDSClientTypes.FailoverState.self, forKey: .failoverState) - failoverState = failoverStateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.GlobalCluster() + value.globalClusterIdentifier = try reader["GlobalClusterIdentifier"].readIfPresent() + value.globalClusterResourceId = try reader["GlobalClusterResourceId"].readIfPresent() + value.globalClusterArn = try reader["GlobalClusterArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.databaseName = try reader["DatabaseName"].readIfPresent() + value.storageEncrypted = try reader["StorageEncrypted"].readIfPresent() + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + value.globalClusterMembers = try reader["GlobalClusterMembers"].readListIfPresent(memberReadingClosure: RDSClientTypes.GlobalClusterMember.readingClosure, memberNodeInfo: "GlobalClusterMember", isFlattened: false) + value.failoverState = try reader["FailoverState"].readIfPresent(readingClosure: RDSClientTypes.FailoverState.readingClosure) + return value + } } } @@ -35557,16 +25920,14 @@ extension RDSClientTypes { } extension GlobalClusterAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35594,23 +25955,7 @@ public struct GlobalClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct GlobalClusterAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.GlobalClusterMember: Swift.Codable { +extension RDSClientTypes.GlobalClusterMember: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbClusterArn = "DBClusterArn" case globalWriteForwardingStatus = "GlobalWriteForwardingStatus" @@ -35647,35 +25992,17 @@ extension RDSClientTypes.GlobalClusterMember: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterArn) - dbClusterArn = dbClusterArnDecoded - if containerValues.contains(.readers) { - struct KeyVal0{struct member{}} - let readersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .readers) - if let readersWrappedContainer = readersWrappedContainer { - let readersContainer = try readersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var readersBuffer:[Swift.String]? = nil - if let readersContainer = readersContainer { - readersBuffer = [Swift.String]() - for stringContainer0 in readersContainer { - readersBuffer?.append(stringContainer0) - } - } - readers = readersBuffer - } else { - readers = [] - } - } else { - readers = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.GlobalClusterMember() + value.dbClusterArn = try reader["DBClusterArn"].readIfPresent() + value.readers = try reader["Readers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.isWriter = try reader["IsWriter"].readIfPresent() + value.globalWriteForwardingStatus = try reader["GlobalWriteForwardingStatus"].readIfPresent() + value.synchronizationStatus = try reader["SynchronizationStatus"].readIfPresent() + return value } - let isWriterDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isWriter) - isWriter = isWriterDecoded - let globalWriteForwardingStatusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.WriteForwardingStatus.self, forKey: .globalWriteForwardingStatus) - globalWriteForwardingStatus = globalWriteForwardingStatusDecoded - let synchronizationStatusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.GlobalClusterMemberSynchronizationStatus.self, forKey: .synchronizationStatus) - synchronizationStatus = synchronizationStatusDecoded } } @@ -35744,16 +26071,14 @@ extension RDSClientTypes { } extension GlobalClusterNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35781,33 +26106,15 @@ public struct GlobalClusterNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct GlobalClusterNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension GlobalClusterQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = GlobalClusterQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35835,22 +26142,6 @@ public struct GlobalClusterQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct GlobalClusterQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension GlobalClusterQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RDSClientTypes { public enum IAMAuthMode: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case disabled @@ -35886,7 +26177,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.IPRange: Swift.Codable { +extension RDSClientTypes.IPRange: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cidrip = "CIDRIP" case status = "Status" @@ -35902,12 +26193,14 @@ extension RDSClientTypes.IPRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let cidripDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrip) - cidrip = cidripDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.IPRange() + value.status = try reader["Status"].readIfPresent() + value.cidrip = try reader["CIDRIP"].readIfPresent() + return value + } } } @@ -35932,16 +26225,14 @@ extension RDSClientTypes { } extension IamRoleMissingPermissionsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IamRoleMissingPermissionsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35969,33 +26260,15 @@ public struct IamRoleMissingPermissionsFault: ClientRuntime.ModeledError, AWSCli } } -struct IamRoleMissingPermissionsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension IamRoleMissingPermissionsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IamRoleNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IamRoleNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36023,33 +26296,15 @@ public struct IamRoleNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct IamRoleNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension IamRoleNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InstanceQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InstanceQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36077,33 +26332,15 @@ public struct InstanceQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct InstanceQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InstanceQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientAvailableIPsInSubnetFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientAvailableIPsInSubnetFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36131,33 +26368,15 @@ public struct InsufficientAvailableIPsInSubnetFault: ClientRuntime.ModeledError, } } -struct InsufficientAvailableIPsInSubnetFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientAvailableIPsInSubnetFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientDBClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientDBClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36185,33 +26404,15 @@ public struct InsufficientDBClusterCapacityFault: ClientRuntime.ModeledError, AW } } -struct InsufficientDBClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientDBClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientDBInstanceCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientDBInstanceCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36239,33 +26440,15 @@ public struct InsufficientDBInstanceCapacityFault: ClientRuntime.ModeledError, A } } -struct InsufficientDBInstanceCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientDBInstanceCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientStorageClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientStorageClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36293,23 +26476,7 @@ public struct InsufficientStorageClusterCapacityFault: ClientRuntime.ModeledErro } } -struct InsufficientStorageClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientStorageClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.Integration: Swift.Codable { +extension RDSClientTypes.Integration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case additionalEncryptionContext = "AdditionalEncryptionContext" case createTime = "CreateTime" @@ -36384,78 +26551,21 @@ extension RDSClientTypes.Integration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let targetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetArn) - targetArn = targetArnDecoded - let integrationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationName) - integrationName = integrationNameDecoded - let integrationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationArn) - integrationArn = integrationArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.additionalEncryptionContext) { - struct KeyVal0{struct key{}; struct value{}} - let additionalEncryptionContextWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .additionalEncryptionContext) - if let additionalEncryptionContextWrappedContainer = additionalEncryptionContextWrappedContainer { - let additionalEncryptionContextContainer = try additionalEncryptionContextWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var additionalEncryptionContextBuffer: [Swift.String:Swift.String]? = nil - if let additionalEncryptionContextContainer = additionalEncryptionContextContainer { - additionalEncryptionContextBuffer = [Swift.String:Swift.String]() - for stringContainer0 in additionalEncryptionContextContainer { - additionalEncryptionContextBuffer?[stringContainer0.key] = stringContainer0.value - } - } - additionalEncryptionContext = additionalEncryptionContextBuffer - } else { - additionalEncryptionContext = [:] - } - } else { - additionalEncryptionContext = nil - } - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.IntegrationStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - if containerValues.contains(.errors) { - struct KeyVal0{struct IntegrationError{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([RDSClientTypes.IntegrationError].self, forKey: .member) - var errorsBuffer:[RDSClientTypes.IntegrationError]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [RDSClientTypes.IntegrationError]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] - } - } else { - errors = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Integration() + value.sourceArn = try reader["SourceArn"].readIfPresent() + value.targetArn = try reader["TargetArn"].readIfPresent() + value.integrationName = try reader["IntegrationName"].readIfPresent() + value.integrationArn = try reader["IntegrationArn"].readIfPresent() + value.kmsKeyId = try reader["KMSKeyId"].readIfPresent() + value.additionalEncryptionContext = try reader["AdditionalEncryptionContext"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.errors = try reader["Errors"].readListIfPresent(memberReadingClosure: RDSClientTypes.IntegrationError.readingClosure, memberNodeInfo: "IntegrationError", isFlattened: false) + return value } } } @@ -36513,16 +26623,14 @@ extension RDSClientTypes { } extension IntegrationAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IntegrationAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36550,33 +26658,15 @@ public struct IntegrationAlreadyExistsFault: ClientRuntime.ModeledError, AWSClie } } -struct IntegrationAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension IntegrationAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IntegrationConflictOperationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IntegrationConflictOperationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36604,23 +26694,7 @@ public struct IntegrationConflictOperationFault: ClientRuntime.ModeledError, AWS } } -struct IntegrationConflictOperationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension IntegrationConflictOperationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.IntegrationError: Swift.Codable { +extension RDSClientTypes.IntegrationError: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case errorCode = "ErrorCode" case errorMessage = "ErrorMessage" @@ -36636,12 +26710,14 @@ extension RDSClientTypes.IntegrationError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorCode) - errorCode = errorCodeDecoded - let errorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorMessage) - errorMessage = errorMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.IntegrationError() + value.errorCode = try reader["ErrorCode"].readIfPresent() + value.errorMessage = try reader["ErrorMessage"].readIfPresent() + return value + } } } @@ -36667,16 +26743,14 @@ extension RDSClientTypes { } extension IntegrationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IntegrationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36704,33 +26778,15 @@ public struct IntegrationNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct IntegrationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension IntegrationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IntegrationQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IntegrationQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36758,22 +26814,6 @@ public struct IntegrationQuotaExceededFault: ClientRuntime.ModeledError, AWSClie } } -struct IntegrationQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension IntegrationQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RDSClientTypes { public enum IntegrationStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case active @@ -36822,16 +26862,14 @@ extension RDSClientTypes { } extension InvalidBlueGreenDeploymentStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidBlueGreenDeploymentStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36859,33 +26897,15 @@ public struct InvalidBlueGreenDeploymentStateFault: ClientRuntime.ModeledError, } } -struct InvalidBlueGreenDeploymentStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidBlueGreenDeploymentStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidCustomDBEngineVersionStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidCustomDBEngineVersionStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36913,33 +26933,15 @@ public struct InvalidCustomDBEngineVersionStateFault: ClientRuntime.ModeledError } } -struct InvalidCustomDBEngineVersionStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidCustomDBEngineVersionStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterAutomatedBackupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterAutomatedBackupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36967,33 +26969,15 @@ public struct InvalidDBClusterAutomatedBackupStateFault: ClientRuntime.ModeledEr } } -struct InvalidDBClusterAutomatedBackupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterAutomatedBackupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37021,33 +27005,15 @@ public struct InvalidDBClusterCapacityFault: ClientRuntime.ModeledError, AWSClie } } -struct InvalidDBClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterEndpointStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterEndpointStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37075,33 +27041,15 @@ public struct InvalidDBClusterEndpointStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidDBClusterEndpointStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterEndpointStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37129,33 +27077,15 @@ public struct InvalidDBClusterSnapshotStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidDBClusterSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBClusterStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBClusterStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37183,33 +27113,15 @@ public struct InvalidDBClusterStateFault: ClientRuntime.ModeledError, AWSClientR } } -struct InvalidDBClusterStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBClusterStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBInstanceAutomatedBackupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBInstanceAutomatedBackupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37237,33 +27149,15 @@ public struct InvalidDBInstanceAutomatedBackupStateFault: ClientRuntime.ModeledE } } -struct InvalidDBInstanceAutomatedBackupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBInstanceAutomatedBackupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBInstanceStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBInstanceStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37291,33 +27185,15 @@ public struct InvalidDBInstanceStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidDBInstanceStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBInstanceStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBParameterGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBParameterGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37345,33 +27221,15 @@ public struct InvalidDBParameterGroupStateFault: ClientRuntime.ModeledError, AWS } } -struct InvalidDBParameterGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBParameterGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBProxyEndpointStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBProxyEndpointStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37399,33 +27257,15 @@ public struct InvalidDBProxyEndpointStateFault: ClientRuntime.ModeledError, AWSC } } -struct InvalidDBProxyEndpointStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBProxyEndpointStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBProxyStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBProxyStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37453,33 +27293,15 @@ public struct InvalidDBProxyStateFault: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidDBProxyStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBProxyStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSecurityGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSecurityGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37507,33 +27329,15 @@ public struct InvalidDBSecurityGroupStateFault: ClientRuntime.ModeledError, AWSC } } -struct InvalidDBSecurityGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSecurityGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37561,33 +27365,15 @@ public struct InvalidDBSnapshotStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidDBSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSubnetGroupFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSubnetGroupFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37615,33 +27401,15 @@ public struct InvalidDBSubnetGroupFault: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidDBSubnetGroupFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSubnetGroupFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSubnetGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSubnetGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37669,33 +27437,15 @@ public struct InvalidDBSubnetGroupStateFault: ClientRuntime.ModeledError, AWSCli } } -struct InvalidDBSubnetGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSubnetGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDBSubnetStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDBSubnetStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37723,33 +27473,15 @@ public struct InvalidDBSubnetStateFault: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidDBSubnetStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDBSubnetStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidEventSubscriptionStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidEventSubscriptionStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37777,33 +27509,15 @@ public struct InvalidEventSubscriptionStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidEventSubscriptionStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidEventSubscriptionStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidExportOnlyFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidExportOnlyFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37831,33 +27545,15 @@ public struct InvalidExportOnlyFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidExportOnlyFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidExportOnlyFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidExportSourceStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidExportSourceStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37885,33 +27581,15 @@ public struct InvalidExportSourceStateFault: ClientRuntime.ModeledError, AWSClie } } -struct InvalidExportSourceStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidExportSourceStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidExportTaskStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidExportTaskStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37939,33 +27617,15 @@ public struct InvalidExportTaskStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidExportTaskStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidExportTaskStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidGlobalClusterStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidGlobalClusterStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37993,33 +27653,15 @@ public struct InvalidGlobalClusterStateFault: ClientRuntime.ModeledError, AWSCli } } -struct InvalidGlobalClusterStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidGlobalClusterStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidIntegrationStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidIntegrationStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38047,33 +27689,15 @@ public struct InvalidIntegrationStateFault: ClientRuntime.ModeledError, AWSClien } } -struct InvalidIntegrationStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidIntegrationStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidOptionGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidOptionGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38101,33 +27725,15 @@ public struct InvalidOptionGroupStateFault: ClientRuntime.ModeledError, AWSClien } } -struct InvalidOptionGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidOptionGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidResourceStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidResourceStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38155,33 +27761,15 @@ public struct InvalidResourceStateFault: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidResourceStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidResourceStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidRestoreFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRestoreFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38209,33 +27797,15 @@ public struct InvalidRestoreFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct InvalidRestoreFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRestoreFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidS3BucketFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidS3BucketFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38263,33 +27833,15 @@ public struct InvalidS3BucketFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct InvalidS3BucketFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidS3BucketFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSubnet { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSubnet() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38317,33 +27869,15 @@ public struct InvalidSubnet: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct InvalidSubnetBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSubnetBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidVPCNetworkStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidVPCNetworkStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38371,23 +27905,7 @@ public struct InvalidVPCNetworkStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidVPCNetworkStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidVPCNetworkStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.IssueDetails: Swift.Codable { +extension RDSClientTypes.IssueDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case performanceIssueDetails = "PerformanceIssueDetails" } @@ -38399,10 +27917,13 @@ extension RDSClientTypes.IssueDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let performanceIssueDetailsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.PerformanceIssueDetails.self, forKey: .performanceIssueDetails) - performanceIssueDetails = performanceIssueDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.IssueDetails() + value.performanceIssueDetails = try reader["PerformanceIssueDetails"].readIfPresent(readingClosure: RDSClientTypes.PerformanceIssueDetails.readingClosure) + return value + } } } @@ -38423,16 +27944,14 @@ extension RDSClientTypes { } extension KMSKeyNotAccessibleFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSKeyNotAccessibleFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38460,23 +27979,12 @@ public struct KMSKeyNotAccessibleFault: ClientRuntime.ModeledError, AWSClientRun } } -struct KMSKeyNotAccessibleFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSKeyNotAccessibleFaultBody: Swift.Decodable { +extension ListTagsForResourceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case filters = "Filters" + case resourceName = "ResourceName" } -} -extension ListTagsForResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filters = filters { @@ -38524,51 +28032,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -struct ListTagsForResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let filters: [RDSClientTypes.Filter]? -} - -extension ListTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - case resourceName = "ResourceName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct Filter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RDSClientTypes.Filter].self, forKey: .member) - var filtersBuffer:[RDSClientTypes.Filter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RDSClientTypes.Filter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - } -} +extension ListTagsForResourceOutput { -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tagList = output.tagList - } else { - self.tagList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTagsForResourceResult"] + var value = ListTagsForResourceOutput() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -38586,54 +28058,27 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let tagList: [RDSClientTypes.Tag]? -} - -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagList = "TagList" - } +enum ListTagsForResourceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTagsForResourceResult")) - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotTenantDatabaseNotFoundFault": return try await DBSnapshotTenantDatabaseNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tagList = nil - } - } -} - -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotTenantDatabaseNotFoundFault": return try await DBSnapshotTenantDatabaseNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -38679,7 +28124,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.MasterUserSecret: Swift.Codable { +extension RDSClientTypes.MasterUserSecret: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case kmsKeyId = "KmsKeyId" case secretArn = "SecretArn" @@ -38699,14 +28144,15 @@ extension RDSClientTypes.MasterUserSecret: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let secretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secretArn) - secretArn = secretArnDecoded - let secretStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secretStatus) - secretStatus = secretStatusDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.MasterUserSecret() + value.secretArn = try reader["SecretArn"].readIfPresent() + value.secretStatus = try reader["SecretStatus"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + return value + } } } @@ -38742,7 +28188,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.Metric: Swift.Codable { +extension RDSClientTypes.Metric: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case metricQuery = "MetricQuery" case name = "Name" @@ -38775,33 +28221,16 @@ extension RDSClientTypes.Metric: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.references) { - struct KeyVal0{struct member{}} - let referencesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .references) - if let referencesWrappedContainer = referencesWrappedContainer { - let referencesContainer = try referencesWrappedContainer.decodeIfPresent([RDSClientTypes.MetricReference].self, forKey: .member) - var referencesBuffer:[RDSClientTypes.MetricReference]? = nil - if let referencesContainer = referencesContainer { - referencesBuffer = [RDSClientTypes.MetricReference]() - for structureContainer0 in referencesContainer { - referencesBuffer?.append(structureContainer0) - } - } - references = referencesBuffer - } else { - references = [] - } - } else { - references = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Metric() + value.name = try reader["Name"].readIfPresent() + value.references = try reader["References"].readListIfPresent(memberReadingClosure: RDSClientTypes.MetricReference.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.statisticsDetails = try reader["StatisticsDetails"].readIfPresent() + value.metricQuery = try reader["MetricQuery"].readIfPresent(readingClosure: RDSClientTypes.MetricQuery.readingClosure) + return value } - let statisticsDetailsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statisticsDetails) - statisticsDetails = statisticsDetailsDecoded - let metricQueryDecoded = try containerValues.decodeIfPresent(RDSClientTypes.MetricQuery.self, forKey: .metricQuery) - metricQuery = metricQueryDecoded } } @@ -38833,7 +28262,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.MetricQuery: Swift.Codable { +extension RDSClientTypes.MetricQuery: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case performanceInsightsMetricQuery = "PerformanceInsightsMetricQuery" } @@ -38845,10 +28274,13 @@ extension RDSClientTypes.MetricQuery: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let performanceInsightsMetricQueryDecoded = try containerValues.decodeIfPresent(RDSClientTypes.PerformanceInsightsMetricQuery.self, forKey: .performanceInsightsMetricQuery) - performanceInsightsMetricQuery = performanceInsightsMetricQueryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.MetricQuery() + value.performanceInsightsMetricQuery = try reader["PerformanceInsightsMetricQuery"].readIfPresent(readingClosure: RDSClientTypes.PerformanceInsightsMetricQuery.readingClosure) + return value + } } } @@ -38868,7 +28300,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.MetricReference: Swift.Codable { +extension RDSClientTypes.MetricReference: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case referenceDetails = "ReferenceDetails" @@ -38884,12 +28316,14 @@ extension RDSClientTypes.MetricReference: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let referenceDetailsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ReferenceDetails.self, forKey: .referenceDetails) - referenceDetails = referenceDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.MetricReference() + value.name = try reader["Name"].readIfPresent() + value.referenceDetails = try reader["ReferenceDetails"].readIfPresent(readingClosure: RDSClientTypes.ReferenceDetails.readingClosure) + return value + } } } @@ -38913,7 +28347,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.MinimumEngineVersionPerAllowedValue: Swift.Codable { +extension RDSClientTypes.MinimumEngineVersionPerAllowedValue: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValue = "AllowedValue" case minimumEngineVersion = "MinimumEngineVersion" @@ -38929,12 +28363,14 @@ extension RDSClientTypes.MinimumEngineVersionPerAllowedValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let allowedValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValue) - allowedValue = allowedValueDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.MinimumEngineVersionPerAllowedValue() + value.allowedValue = try reader["AllowedValue"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + return value + } } } @@ -38959,6 +28395,11 @@ extension RDSClientTypes { } extension ModifyActivityStreamInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case auditPolicyState = "AuditPolicyState" + case resourceArn = "ResourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let auditPolicyState = auditPolicyState { @@ -38995,44 +28436,20 @@ public struct ModifyActivityStreamInput: Swift.Equatable { } } -struct ModifyActivityStreamInputBody: Swift.Equatable { - let resourceArn: Swift.String? - let auditPolicyState: RDSClientTypes.AuditPolicyState? -} +extension ModifyActivityStreamOutput { -extension ModifyActivityStreamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case auditPolicyState = "AuditPolicyState" - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let auditPolicyStateDecoded = try containerValues.decodeIfPresent(RDSClientTypes.AuditPolicyState.self, forKey: .auditPolicyState) - auditPolicyState = auditPolicyStateDecoded - } -} - -extension ModifyActivityStreamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyActivityStreamOutputBody = try responseDecoder.decode(responseBody: data) - self.engineNativeAuditFieldsIncluded = output.engineNativeAuditFieldsIncluded - self.kinesisStreamName = output.kinesisStreamName - self.kmsKeyId = output.kmsKeyId - self.mode = output.mode - self.policyStatus = output.policyStatus - self.status = output.status - } else { - self.engineNativeAuditFieldsIncluded = nil - self.kinesisStreamName = nil - self.kmsKeyId = nil - self.mode = nil - self.policyStatus = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyActivityStreamResult"] + var value = ModifyActivityStreamOutput() + value.engineNativeAuditFieldsIncluded = try reader["EngineNativeAuditFieldsIncluded"].readIfPresent() + value.kinesisStreamName = try reader["KinesisStreamName"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.mode = try reader["Mode"].readIfPresent() + value.policyStatus = try reader["PolicyStatus"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -39069,56 +28486,31 @@ public struct ModifyActivityStreamOutput: Swift.Equatable { } } -struct ModifyActivityStreamOutputBody: Swift.Equatable { - let kmsKeyId: Swift.String? - let kinesisStreamName: Swift.String? - let status: RDSClientTypes.ActivityStreamStatus? - let mode: RDSClientTypes.ActivityStreamMode? - let engineNativeAuditFieldsIncluded: Swift.Bool? - let policyStatus: RDSClientTypes.ActivityStreamPolicyStatus? -} +enum ModifyActivityStreamOutputError { -extension ModifyActivityStreamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case engineNativeAuditFieldsIncluded = "EngineNativeAuditFieldsIncluded" - case kinesisStreamName = "KinesisStreamName" - case kmsKeyId = "KmsKeyId" - case mode = "Mode" - case policyStatus = "PolicyStatus" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyActivityStreamResult")) - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let kinesisStreamNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kinesisStreamName) - kinesisStreamName = kinesisStreamNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamStatus.self, forKey: .status) - status = statusDecoded - let modeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamMode.self, forKey: .mode) - mode = modeDecoded - let engineNativeAuditFieldsIncludedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .engineNativeAuditFieldsIncluded) - engineNativeAuditFieldsIncluded = engineNativeAuditFieldsIncludedDecoded - let policyStatusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamPolicyStatus.self, forKey: .policyStatus) - policyStatus = policyStatusDecoded - } -} - -enum ModifyActivityStreamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case certificateIdentifier = "CertificateIdentifier" + case removeCustomerOverride = "RemoveCustomerOverride" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let certificateIdentifier = certificateIdentifier { @@ -39155,34 +28547,15 @@ public struct ModifyCertificatesInput: Swift.Equatable { } } -struct ModifyCertificatesInputBody: Swift.Equatable { - let certificateIdentifier: Swift.String? - let removeCustomerOverride: Swift.Bool? -} - -extension ModifyCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificateIdentifier = "CertificateIdentifier" - case removeCustomerOverride = "RemoveCustomerOverride" - } +extension ModifyCertificatesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let certificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .certificateIdentifier) - certificateIdentifier = certificateIdentifierDecoded - let removeCustomerOverrideDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .removeCustomerOverride) - removeCustomerOverride = removeCustomerOverrideDecoded - } -} - -extension ModifyCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCertificatesOutputBody = try responseDecoder.decode(responseBody: data) - self.certificate = output.certificate - } else { - self.certificate = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyCertificatesResult"] + var value = ModifyCertificatesOutput() + value.certificate = try reader["Certificate"].readIfPresent(readingClosure: RDSClientTypes.Certificate.readingClosure) + return value } } } @@ -39199,34 +28572,31 @@ public struct ModifyCertificatesOutput: Swift.Equatable { } } -struct ModifyCertificatesOutputBody: Swift.Equatable { - let certificate: RDSClientTypes.Certificate? -} +enum ModifyCertificatesOutputError { -extension ModifyCertificatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case certificate = "Certificate" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyCertificatesResult")) - let certificateDecoded = try containerValues.decodeIfPresent(RDSClientTypes.Certificate.self, forKey: .certificate) - certificate = certificateDecoded - } -} - -enum ModifyCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CertificateNotFound": return try await CertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CertificateNotFound": return try await CertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyCurrentDBClusterCapacityInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case capacity = "Capacity" + case dbClusterIdentifier = "DBClusterIdentifier" + case secondsBeforeTimeout = "SecondsBeforeTimeout" + case timeoutAction = "TimeoutAction" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let capacity = capacity { @@ -39284,50 +28654,19 @@ public struct ModifyCurrentDBClusterCapacityInput: Swift.Equatable { } } -struct ModifyCurrentDBClusterCapacityInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let capacity: Swift.Int? - let secondsBeforeTimeout: Swift.Int? - let timeoutAction: Swift.String? -} - -extension ModifyCurrentDBClusterCapacityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case capacity = "Capacity" - case dbClusterIdentifier = "DBClusterIdentifier" - case secondsBeforeTimeout = "SecondsBeforeTimeout" - case timeoutAction = "TimeoutAction" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let capacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .capacity) - capacity = capacityDecoded - let secondsBeforeTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondsBeforeTimeout) - secondsBeforeTimeout = secondsBeforeTimeoutDecoded - let timeoutActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timeoutAction) - timeoutAction = timeoutActionDecoded - } -} +extension ModifyCurrentDBClusterCapacityOutput { -extension ModifyCurrentDBClusterCapacityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCurrentDBClusterCapacityOutputBody = try responseDecoder.decode(responseBody: data) - self.currentCapacity = output.currentCapacity - self.dbClusterIdentifier = output.dbClusterIdentifier - self.pendingCapacity = output.pendingCapacity - self.secondsBeforeTimeout = output.secondsBeforeTimeout - self.timeoutAction = output.timeoutAction - } else { - self.currentCapacity = nil - self.dbClusterIdentifier = nil - self.pendingCapacity = nil - self.secondsBeforeTimeout = nil - self.timeoutAction = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyCurrentDBClusterCapacityResult"] + var value = ModifyCurrentDBClusterCapacityOutput() + value.currentCapacity = try reader["CurrentCapacity"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.pendingCapacity = try reader["PendingCapacity"].readIfPresent() + value.secondsBeforeTimeout = try reader["SecondsBeforeTimeout"].readIfPresent() + value.timeoutAction = try reader["TimeoutAction"].readIfPresent() + return value } } } @@ -39360,52 +28699,33 @@ public struct ModifyCurrentDBClusterCapacityOutput: Swift.Equatable { } } -struct ModifyCurrentDBClusterCapacityOutputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let pendingCapacity: Swift.Int? - let currentCapacity: Swift.Int? - let secondsBeforeTimeout: Swift.Int? - let timeoutAction: Swift.String? -} +enum ModifyCurrentDBClusterCapacityOutputError { -extension ModifyCurrentDBClusterCapacityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case currentCapacity = "CurrentCapacity" - case dbClusterIdentifier = "DBClusterIdentifier" - case pendingCapacity = "PendingCapacity" - case secondsBeforeTimeout = "SecondsBeforeTimeout" - case timeoutAction = "TimeoutAction" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyCurrentDBClusterCapacityResult")) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let pendingCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .pendingCapacity) - pendingCapacity = pendingCapacityDecoded - let currentCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .currentCapacity) - currentCapacity = currentCapacityDecoded - let secondsBeforeTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondsBeforeTimeout) - secondsBeforeTimeout = secondsBeforeTimeoutDecoded - let timeoutActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timeoutAction) - timeoutAction = timeoutActionDecoded - } -} - -enum ModifyCurrentDBClusterCapacityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterCapacityFault": return try await InvalidDBClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterCapacityFault": return try await InvalidDBClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyCustomDBEngineVersionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case description = "Description" + case engine = "Engine" + case engineVersion = "EngineVersion" + case status = "Status" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let description = description { @@ -39458,106 +28778,47 @@ public struct ModifyCustomDBEngineVersionInput: Swift.Equatable { } } -struct ModifyCustomDBEngineVersionInputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let description: Swift.String? - let status: RDSClientTypes.CustomEngineVersionStatus? -} - -extension ModifyCustomDBEngineVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case engine = "Engine" - case engineVersion = "EngineVersion" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CustomEngineVersionStatus.self, forKey: .status) - status = statusDecoded - } -} - -extension ModifyCustomDBEngineVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCustomDBEngineVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.createTime = output.createTime - self.customDBEngineVersionManifest = output.customDBEngineVersionManifest - self.databaseInstallationFilesS3BucketName = output.databaseInstallationFilesS3BucketName - self.databaseInstallationFilesS3Prefix = output.databaseInstallationFilesS3Prefix - self.dbEngineDescription = output.dbEngineDescription - self.dbEngineMediaType = output.dbEngineMediaType - self.dbEngineVersionArn = output.dbEngineVersionArn - self.dbEngineVersionDescription = output.dbEngineVersionDescription - self.dbParameterGroupFamily = output.dbParameterGroupFamily - self.defaultCharacterSet = output.defaultCharacterSet - self.engine = output.engine - self.engineVersion = output.engineVersion - self.exportableLogTypes = output.exportableLogTypes - self.image = output.image - self.kmsKeyId = output.kmsKeyId - self.majorEngineVersion = output.majorEngineVersion - self.status = output.status - self.supportedCACertificateIdentifiers = output.supportedCACertificateIdentifiers - self.supportedCharacterSets = output.supportedCharacterSets - self.supportedEngineModes = output.supportedEngineModes - self.supportedFeatureNames = output.supportedFeatureNames - self.supportedNcharCharacterSets = output.supportedNcharCharacterSets - self.supportedTimezones = output.supportedTimezones - self.supportsBabelfish = output.supportsBabelfish - self.supportsCertificateRotationWithoutRestart = output.supportsCertificateRotationWithoutRestart - self.supportsGlobalDatabases = output.supportsGlobalDatabases - self.supportsIntegrations = output.supportsIntegrations - self.supportsLocalWriteForwarding = output.supportsLocalWriteForwarding - self.supportsLogExportsToCloudwatchLogs = output.supportsLogExportsToCloudwatchLogs - self.supportsParallelQuery = output.supportsParallelQuery - self.supportsReadReplica = output.supportsReadReplica - self.tagList = output.tagList - self.validUpgradeTarget = output.validUpgradeTarget - } else { - self.createTime = nil - self.customDBEngineVersionManifest = nil - self.dbEngineDescription = nil - self.dbEngineMediaType = nil - self.dbEngineVersionArn = nil - self.dbEngineVersionDescription = nil - self.dbParameterGroupFamily = nil - self.databaseInstallationFilesS3BucketName = nil - self.databaseInstallationFilesS3Prefix = nil - self.defaultCharacterSet = nil - self.engine = nil - self.engineVersion = nil - self.exportableLogTypes = nil - self.image = nil - self.kmsKeyId = nil - self.majorEngineVersion = nil - self.status = nil - self.supportedCACertificateIdentifiers = nil - self.supportedCharacterSets = nil - self.supportedEngineModes = nil - self.supportedFeatureNames = nil - self.supportedNcharCharacterSets = nil - self.supportedTimezones = nil - self.supportsBabelfish = nil - self.supportsCertificateRotationWithoutRestart = nil - self.supportsGlobalDatabases = nil - self.supportsIntegrations = nil - self.supportsLocalWriteForwarding = nil - self.supportsLogExportsToCloudwatchLogs = nil - self.supportsParallelQuery = nil - self.supportsReadReplica = nil - self.tagList = nil - self.validUpgradeTarget = nil +extension ModifyCustomDBEngineVersionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyCustomDBEngineVersionResult"] + var value = ModifyCustomDBEngineVersionOutput() + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + value.customDBEngineVersionManifest = try reader["CustomDBEngineVersionManifest"].readIfPresent() + value.dbEngineDescription = try reader["DBEngineDescription"].readIfPresent() + value.dbEngineMediaType = try reader["DBEngineMediaType"].readIfPresent() + value.dbEngineVersionArn = try reader["DBEngineVersionArn"].readIfPresent() + value.dbEngineVersionDescription = try reader["DBEngineVersionDescription"].readIfPresent() + value.dbParameterGroupFamily = try reader["DBParameterGroupFamily"].readIfPresent() + value.databaseInstallationFilesS3BucketName = try reader["DatabaseInstallationFilesS3BucketName"].readIfPresent() + value.databaseInstallationFilesS3Prefix = try reader["DatabaseInstallationFilesS3Prefix"].readIfPresent() + value.defaultCharacterSet = try reader["DefaultCharacterSet"].readIfPresent(readingClosure: RDSClientTypes.CharacterSet.readingClosure) + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.exportableLogTypes = try reader["ExportableLogTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.image = try reader["Image"].readIfPresent(readingClosure: RDSClientTypes.CustomDBEngineVersionAMI.readingClosure) + value.kmsKeyId = try reader["KMSKeyId"].readIfPresent() + value.majorEngineVersion = try reader["MajorEngineVersion"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.supportedCACertificateIdentifiers = try reader["SupportedCACertificateIdentifiers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedCharacterSets = try reader["SupportedCharacterSets"].readListIfPresent(memberReadingClosure: RDSClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.supportedEngineModes = try reader["SupportedEngineModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedFeatureNames = try reader["SupportedFeatureNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportedNcharCharacterSets = try reader["SupportedNcharCharacterSets"].readListIfPresent(memberReadingClosure: RDSClientTypes.CharacterSet.readingClosure, memberNodeInfo: "CharacterSet", isFlattened: false) + value.supportedTimezones = try reader["SupportedTimezones"].readListIfPresent(memberReadingClosure: RDSClientTypes.Timezone.readingClosure, memberNodeInfo: "Timezone", isFlattened: false) + value.supportsBabelfish = try reader["SupportsBabelfish"].readIfPresent() + value.supportsCertificateRotationWithoutRestart = try reader["SupportsCertificateRotationWithoutRestart"].readIfPresent() + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + value.supportsIntegrations = try reader["SupportsIntegrations"].readIfPresent() + value.supportsLocalWriteForwarding = try reader["SupportsLocalWriteForwarding"].readIfPresent() + value.supportsLogExportsToCloudwatchLogs = try reader["SupportsLogExportsToCloudwatchLogs"].readIfPresent() + value.supportsParallelQuery = try reader["SupportsParallelQuery"].readIfPresent() + value.supportsReadReplica = try reader["SupportsReadReplica"].readIfPresent() + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.validUpgradeTarget = try reader["ValidUpgradeTarget"].readListIfPresent(memberReadingClosure: RDSClientTypes.UpgradeTarget.readingClosure, memberNodeInfo: "UpgradeTarget", isFlattened: false) + return value } } } @@ -39703,316 +28964,32 @@ public struct ModifyCustomDBEngineVersionOutput: Swift.Equatable { } } -struct ModifyCustomDBEngineVersionOutputBody: Swift.Equatable { - let engine: Swift.String? - let engineVersion: Swift.String? - let dbParameterGroupFamily: Swift.String? - let dbEngineDescription: Swift.String? - let dbEngineVersionDescription: Swift.String? - let defaultCharacterSet: RDSClientTypes.CharacterSet? - let image: RDSClientTypes.CustomDBEngineVersionAMI? - let dbEngineMediaType: Swift.String? - let supportedCharacterSets: [RDSClientTypes.CharacterSet]? - let supportedNcharCharacterSets: [RDSClientTypes.CharacterSet]? - let validUpgradeTarget: [RDSClientTypes.UpgradeTarget]? - let supportedTimezones: [RDSClientTypes.Timezone]? - let exportableLogTypes: [Swift.String]? - let supportsLogExportsToCloudwatchLogs: Swift.Bool? - let supportsReadReplica: Swift.Bool? - let supportedEngineModes: [Swift.String]? - let supportedFeatureNames: [Swift.String]? - let status: Swift.String? - let supportsParallelQuery: Swift.Bool? - let supportsGlobalDatabases: Swift.Bool? - let majorEngineVersion: Swift.String? - let databaseInstallationFilesS3BucketName: Swift.String? - let databaseInstallationFilesS3Prefix: Swift.String? - let dbEngineVersionArn: Swift.String? - let kmsKeyId: Swift.String? - let createTime: ClientRuntime.Date? - let tagList: [RDSClientTypes.Tag]? - let supportsBabelfish: Swift.Bool? - let customDBEngineVersionManifest: Swift.String? - let supportsCertificateRotationWithoutRestart: Swift.Bool? - let supportedCACertificateIdentifiers: [Swift.String]? - let supportsLocalWriteForwarding: Swift.Bool? - let supportsIntegrations: Swift.Bool? -} - -extension ModifyCustomDBEngineVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createTime = "CreateTime" - case customDBEngineVersionManifest = "CustomDBEngineVersionManifest" - case dbEngineDescription = "DBEngineDescription" - case dbEngineMediaType = "DBEngineMediaType" - case dbEngineVersionArn = "DBEngineVersionArn" - case dbEngineVersionDescription = "DBEngineVersionDescription" - case dbParameterGroupFamily = "DBParameterGroupFamily" - case databaseInstallationFilesS3BucketName = "DatabaseInstallationFilesS3BucketName" - case databaseInstallationFilesS3Prefix = "DatabaseInstallationFilesS3Prefix" - case defaultCharacterSet = "DefaultCharacterSet" - case engine = "Engine" - case engineVersion = "EngineVersion" - case exportableLogTypes = "ExportableLogTypes" - case image = "Image" - case kmsKeyId = "KMSKeyId" - case majorEngineVersion = "MajorEngineVersion" - case status = "Status" - case supportedCACertificateIdentifiers = "SupportedCACertificateIdentifiers" - case supportedCharacterSets = "SupportedCharacterSets" - case supportedEngineModes = "SupportedEngineModes" - case supportedFeatureNames = "SupportedFeatureNames" - case supportedNcharCharacterSets = "SupportedNcharCharacterSets" - case supportedTimezones = "SupportedTimezones" - case supportsBabelfish = "SupportsBabelfish" - case supportsCertificateRotationWithoutRestart = "SupportsCertificateRotationWithoutRestart" - case supportsGlobalDatabases = "SupportsGlobalDatabases" - case supportsIntegrations = "SupportsIntegrations" - case supportsLocalWriteForwarding = "SupportsLocalWriteForwarding" - case supportsLogExportsToCloudwatchLogs = "SupportsLogExportsToCloudwatchLogs" - case supportsParallelQuery = "SupportsParallelQuery" - case supportsReadReplica = "SupportsReadReplica" - case tagList = "TagList" - case validUpgradeTarget = "ValidUpgradeTarget" - } +enum ModifyCustomDBEngineVersionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyCustomDBEngineVersionResult")) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupFamily) - dbParameterGroupFamily = dbParameterGroupFamilyDecoded - let dbEngineDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineDescription) - dbEngineDescription = dbEngineDescriptionDecoded - let dbEngineVersionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionDescription) - dbEngineVersionDescription = dbEngineVersionDescriptionDecoded - let defaultCharacterSetDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CharacterSet.self, forKey: .defaultCharacterSet) - defaultCharacterSet = defaultCharacterSetDecoded - let imageDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CustomDBEngineVersionAMI.self, forKey: .image) - image = imageDecoded - let dbEngineMediaTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineMediaType) - dbEngineMediaType = dbEngineMediaTypeDecoded - if containerValues.contains(.supportedCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCharacterSets) - if let supportedCharacterSetsWrappedContainer = supportedCharacterSetsWrappedContainer { - let supportedCharacterSetsContainer = try supportedCharacterSetsWrappedContainer.decodeIfPresent([RDSClientTypes.CharacterSet].self, forKey: .member) - var supportedCharacterSetsBuffer:[RDSClientTypes.CharacterSet]? = nil - if let supportedCharacterSetsContainer = supportedCharacterSetsContainer { - supportedCharacterSetsBuffer = [RDSClientTypes.CharacterSet]() - for structureContainer0 in supportedCharacterSetsContainer { - supportedCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedCharacterSets = supportedCharacterSetsBuffer - } else { - supportedCharacterSets = [] - } - } else { - supportedCharacterSets = nil - } - if containerValues.contains(.supportedNcharCharacterSets) { - struct KeyVal0{struct CharacterSet{}} - let supportedNcharCharacterSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedNcharCharacterSets) - if let supportedNcharCharacterSetsWrappedContainer = supportedNcharCharacterSetsWrappedContainer { - let supportedNcharCharacterSetsContainer = try supportedNcharCharacterSetsWrappedContainer.decodeIfPresent([RDSClientTypes.CharacterSet].self, forKey: .member) - var supportedNcharCharacterSetsBuffer:[RDSClientTypes.CharacterSet]? = nil - if let supportedNcharCharacterSetsContainer = supportedNcharCharacterSetsContainer { - supportedNcharCharacterSetsBuffer = [RDSClientTypes.CharacterSet]() - for structureContainer0 in supportedNcharCharacterSetsContainer { - supportedNcharCharacterSetsBuffer?.append(structureContainer0) - } - } - supportedNcharCharacterSets = supportedNcharCharacterSetsBuffer - } else { - supportedNcharCharacterSets = [] - } - } else { - supportedNcharCharacterSets = nil - } - if containerValues.contains(.validUpgradeTarget) { - struct KeyVal0{struct UpgradeTarget{}} - let validUpgradeTargetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validUpgradeTarget) - if let validUpgradeTargetWrappedContainer = validUpgradeTargetWrappedContainer { - let validUpgradeTargetContainer = try validUpgradeTargetWrappedContainer.decodeIfPresent([RDSClientTypes.UpgradeTarget].self, forKey: .member) - var validUpgradeTargetBuffer:[RDSClientTypes.UpgradeTarget]? = nil - if let validUpgradeTargetContainer = validUpgradeTargetContainer { - validUpgradeTargetBuffer = [RDSClientTypes.UpgradeTarget]() - for structureContainer0 in validUpgradeTargetContainer { - validUpgradeTargetBuffer?.append(structureContainer0) - } - } - validUpgradeTarget = validUpgradeTargetBuffer - } else { - validUpgradeTarget = [] - } - } else { - validUpgradeTarget = nil - } - if containerValues.contains(.supportedTimezones) { - struct KeyVal0{struct Timezone{}} - let supportedTimezonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedTimezones) - if let supportedTimezonesWrappedContainer = supportedTimezonesWrappedContainer { - let supportedTimezonesContainer = try supportedTimezonesWrappedContainer.decodeIfPresent([RDSClientTypes.Timezone].self, forKey: .member) - var supportedTimezonesBuffer:[RDSClientTypes.Timezone]? = nil - if let supportedTimezonesContainer = supportedTimezonesContainer { - supportedTimezonesBuffer = [RDSClientTypes.Timezone]() - for structureContainer0 in supportedTimezonesContainer { - supportedTimezonesBuffer?.append(structureContainer0) - } - } - supportedTimezones = supportedTimezonesBuffer - } else { - supportedTimezones = [] - } - } else { - supportedTimezones = nil - } - if containerValues.contains(.exportableLogTypes) { - struct KeyVal0{struct member{}} - let exportableLogTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportableLogTypes) - if let exportableLogTypesWrappedContainer = exportableLogTypesWrappedContainer { - let exportableLogTypesContainer = try exportableLogTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportableLogTypesBuffer:[Swift.String]? = nil - if let exportableLogTypesContainer = exportableLogTypesContainer { - exportableLogTypesBuffer = [Swift.String]() - for stringContainer0 in exportableLogTypesContainer { - exportableLogTypesBuffer?.append(stringContainer0) - } - } - exportableLogTypes = exportableLogTypesBuffer - } else { - exportableLogTypes = [] - } - } else { - exportableLogTypes = nil - } - let supportsLogExportsToCloudwatchLogsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLogExportsToCloudwatchLogs) - supportsLogExportsToCloudwatchLogs = supportsLogExportsToCloudwatchLogsDecoded - let supportsReadReplicaDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsReadReplica) - supportsReadReplica = supportsReadReplicaDecoded - if containerValues.contains(.supportedEngineModes) { - struct KeyVal0{struct member{}} - let supportedEngineModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedEngineModes) - if let supportedEngineModesWrappedContainer = supportedEngineModesWrappedContainer { - let supportedEngineModesContainer = try supportedEngineModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedEngineModesBuffer:[Swift.String]? = nil - if let supportedEngineModesContainer = supportedEngineModesContainer { - supportedEngineModesBuffer = [Swift.String]() - for stringContainer0 in supportedEngineModesContainer { - supportedEngineModesBuffer?.append(stringContainer0) - } - } - supportedEngineModes = supportedEngineModesBuffer - } else { - supportedEngineModes = [] - } - } else { - supportedEngineModes = nil - } - if containerValues.contains(.supportedFeatureNames) { - struct KeyVal0{struct member{}} - let supportedFeatureNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedFeatureNames) - if let supportedFeatureNamesWrappedContainer = supportedFeatureNamesWrappedContainer { - let supportedFeatureNamesContainer = try supportedFeatureNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedFeatureNamesBuffer:[Swift.String]? = nil - if let supportedFeatureNamesContainer = supportedFeatureNamesContainer { - supportedFeatureNamesBuffer = [Swift.String]() - for stringContainer0 in supportedFeatureNamesContainer { - supportedFeatureNamesBuffer?.append(stringContainer0) - } - } - supportedFeatureNames = supportedFeatureNamesBuffer - } else { - supportedFeatureNames = [] - } - } else { - supportedFeatureNames = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let supportsParallelQueryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsParallelQuery) - supportsParallelQuery = supportsParallelQueryDecoded - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - let databaseInstallationFilesS3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3BucketName) - databaseInstallationFilesS3BucketName = databaseInstallationFilesS3BucketNameDecoded - let databaseInstallationFilesS3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseInstallationFilesS3Prefix) - databaseInstallationFilesS3Prefix = databaseInstallationFilesS3PrefixDecoded - let dbEngineVersionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbEngineVersionArn) - dbEngineVersionArn = dbEngineVersionArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil - } - let supportsBabelfishDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsBabelfish) - supportsBabelfish = supportsBabelfishDecoded - let customDBEngineVersionManifestDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDBEngineVersionManifest) - customDBEngineVersionManifest = customDBEngineVersionManifestDecoded - let supportsCertificateRotationWithoutRestartDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsCertificateRotationWithoutRestart) - supportsCertificateRotationWithoutRestart = supportsCertificateRotationWithoutRestartDecoded - if containerValues.contains(.supportedCACertificateIdentifiers) { - struct KeyVal0{struct member{}} - let supportedCACertificateIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedCACertificateIdentifiers) - if let supportedCACertificateIdentifiersWrappedContainer = supportedCACertificateIdentifiersWrappedContainer { - let supportedCACertificateIdentifiersContainer = try supportedCACertificateIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedCACertificateIdentifiersBuffer:[Swift.String]? = nil - if let supportedCACertificateIdentifiersContainer = supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer = [Swift.String]() - for stringContainer0 in supportedCACertificateIdentifiersContainer { - supportedCACertificateIdentifiersBuffer?.append(stringContainer0) - } - } - supportedCACertificateIdentifiers = supportedCACertificateIdentifiersBuffer - } else { - supportedCACertificateIdentifiers = [] - } - } else { - supportedCACertificateIdentifiers = nil - } - let supportsLocalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLocalWriteForwarding) - supportsLocalWriteForwarding = supportsLocalWriteForwardingDecoded - let supportsIntegrationsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIntegrations) - supportsIntegrations = supportsIntegrationsDecoded - } -} - -enum ModifyCustomDBEngineVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CustomDBEngineVersionNotFoundFault": return try await CustomDBEngineVersionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCustomDBEngineVersionStateFault": return try await InvalidCustomDBEngineVersionStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CustomDBEngineVersionNotFoundFault": return try await CustomDBEngineVersionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCustomDBEngineVersionStateFault": return try await InvalidCustomDBEngineVersionStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBClusterEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" + case endpointType = "EndpointType" + case excludedMembers = "ExcludedMembers" + case staticMembers = "StaticMembers" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterEndpointIdentifier = dbClusterEndpointIdentifier { @@ -40082,94 +29059,24 @@ public struct ModifyDBClusterEndpointInput: Swift.Equatable { } } -struct ModifyDBClusterEndpointInputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? - let endpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? -} +extension ModifyDBClusterEndpointOutput { -extension ModifyDBClusterEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil - } - } -} - -extension ModifyDBClusterEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.customEndpointType = output.customEndpointType - self.dbClusterEndpointArn = output.dbClusterEndpointArn - self.dbClusterEndpointIdentifier = output.dbClusterEndpointIdentifier - self.dbClusterEndpointResourceIdentifier = output.dbClusterEndpointResourceIdentifier - self.dbClusterIdentifier = output.dbClusterIdentifier - self.endpoint = output.endpoint - self.endpointType = output.endpointType - self.excludedMembers = output.excludedMembers - self.staticMembers = output.staticMembers - self.status = output.status - } else { - self.customEndpointType = nil - self.dbClusterEndpointArn = nil - self.dbClusterEndpointIdentifier = nil - self.dbClusterEndpointResourceIdentifier = nil - self.dbClusterIdentifier = nil - self.endpoint = nil - self.endpointType = nil - self.excludedMembers = nil - self.staticMembers = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterEndpointResult"] + var value = ModifyDBClusterEndpointOutput() + value.customEndpointType = try reader["CustomEndpointType"].readIfPresent() + value.dbClusterEndpointArn = try reader["DBClusterEndpointArn"].readIfPresent() + value.dbClusterEndpointIdentifier = try reader["DBClusterEndpointIdentifier"].readIfPresent() + value.dbClusterEndpointResourceIdentifier = try reader["DBClusterEndpointResourceIdentifier"].readIfPresent() + value.dbClusterIdentifier = try reader["DBClusterIdentifier"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.endpointType = try reader["EndpointType"].readIfPresent() + value.excludedMembers = try reader["ExcludedMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.staticMembers = try reader["StaticMembers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -40234,108 +29141,74 @@ public struct ModifyDBClusterEndpointOutput: Swift.Equatable { } } -struct ModifyDBClusterEndpointOutputBody: Swift.Equatable { - let dbClusterEndpointIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterEndpointResourceIdentifier: Swift.String? - let endpoint: Swift.String? - let status: Swift.String? - let endpointType: Swift.String? - let customEndpointType: Swift.String? - let staticMembers: [Swift.String]? - let excludedMembers: [Swift.String]? - let dbClusterEndpointArn: Swift.String? -} +enum ModifyDBClusterEndpointOutputError { -extension ModifyDBClusterEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customEndpointType = "CustomEndpointType" - case dbClusterEndpointArn = "DBClusterEndpointArn" - case dbClusterEndpointIdentifier = "DBClusterEndpointIdentifier" - case dbClusterEndpointResourceIdentifier = "DBClusterEndpointResourceIdentifier" - case dbClusterIdentifier = "DBClusterIdentifier" - case endpoint = "Endpoint" - case endpointType = "EndpointType" - case excludedMembers = "ExcludedMembers" - case staticMembers = "StaticMembers" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterEndpointResult")) - let dbClusterEndpointIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointIdentifier) - dbClusterEndpointIdentifier = dbClusterEndpointIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterEndpointResourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointResourceIdentifier) - dbClusterEndpointResourceIdentifier = dbClusterEndpointResourceIdentifierDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let endpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointType) - endpointType = endpointTypeDecoded - let customEndpointTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customEndpointType) - customEndpointType = customEndpointTypeDecoded - if containerValues.contains(.staticMembers) { - struct KeyVal0{struct member{}} - let staticMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .staticMembers) - if let staticMembersWrappedContainer = staticMembersWrappedContainer { - let staticMembersContainer = try staticMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var staticMembersBuffer:[Swift.String]? = nil - if let staticMembersContainer = staticMembersContainer { - staticMembersBuffer = [Swift.String]() - for stringContainer0 in staticMembersContainer { - staticMembersBuffer?.append(stringContainer0) - } - } - staticMembers = staticMembersBuffer - } else { - staticMembers = [] - } - } else { - staticMembers = nil - } - if containerValues.contains(.excludedMembers) { - struct KeyVal0{struct member{}} - let excludedMembersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .excludedMembers) - if let excludedMembersWrappedContainer = excludedMembersWrappedContainer { - let excludedMembersContainer = try excludedMembersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludedMembersBuffer:[Swift.String]? = nil - if let excludedMembersContainer = excludedMembersContainer { - excludedMembersBuffer = [Swift.String]() - for stringContainer0 in excludedMembersContainer { - excludedMembersBuffer?.append(stringContainer0) - } - } - excludedMembers = excludedMembersBuffer - } else { - excludedMembers = [] - } - } else { - excludedMembers = nil - } - let dbClusterEndpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterEndpointArn) - dbClusterEndpointArn = dbClusterEndpointArnDecoded - } -} - -enum ModifyDBClusterEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterEndpointNotFoundFault": return try await DBClusterEndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterEndpointStateFault": return try await InvalidDBClusterEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterEndpointNotFoundFault": return try await DBClusterEndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterEndpointStateFault": return try await InvalidDBClusterEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allocatedStorage = "AllocatedStorage" + case allowEngineModeChange = "AllowEngineModeChange" + case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" + case applyImmediately = "ApplyImmediately" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case awsBackupRecoveryPointArn = "AwsBackupRecoveryPointArn" + case backtrackWindow = "BacktrackWindow" + case backupRetentionPeriod = "BackupRetentionPeriod" + case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterInstanceClass = "DBClusterInstanceClass" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbInstanceParameterGroupName = "DBInstanceParameterGroupName" + case deletionProtection = "DeletionProtection" + case domain = "Domain" + case domainIAMRoleName = "DomainIAMRoleName" + case enableGlobalWriteForwarding = "EnableGlobalWriteForwarding" + case enableHttpEndpoint = "EnableHttpEndpoint" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enableLocalWriteForwarding = "EnableLocalWriteForwarding" + case enablePerformanceInsights = "EnablePerformanceInsights" + case engineMode = "EngineMode" + case engineVersion = "EngineVersion" + case iops = "Iops" + case manageMasterUserPassword = "ManageMasterUserPassword" + case masterUserPassword = "MasterUserPassword" + case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" + case monitoringInterval = "MonitoringInterval" + case monitoringRoleArn = "MonitoringRoleArn" + case networkType = "NetworkType" + case newDBClusterIdentifier = "NewDBClusterIdentifier" + case optionGroupName = "OptionGroupName" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" + case port = "Port" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case rotateMasterUserPassword = "RotateMasterUserPassword" + case scalingConfiguration = "ScalingConfiguration" + case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" + case storageType = "StorageType" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -40757,215 +29630,15 @@ public struct ModifyDBClusterInput: Swift.Equatable { } } -struct ModifyDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let newDBClusterIdentifier: Swift.String? - let applyImmediately: Swift.Bool? - let backupRetentionPeriod: Swift.Int? - let dbClusterParameterGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let port: Swift.Int? - let masterUserPassword: Swift.String? - let optionGroupName: Swift.String? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let backtrackWindow: Swift.Int? - let cloudwatchLogsExportConfiguration: RDSClientTypes.CloudwatchLogsExportConfiguration? - let engineVersion: Swift.String? - let allowMajorVersionUpgrade: Swift.Bool? - let dbInstanceParameterGroupName: Swift.String? - let domain: Swift.String? - let domainIAMRoleName: Swift.String? - let scalingConfiguration: RDSClientTypes.ScalingConfiguration? - let deletionProtection: Swift.Bool? - let enableHttpEndpoint: Swift.Bool? - let copyTagsToSnapshot: Swift.Bool? - let enableGlobalWriteForwarding: Swift.Bool? - let dbClusterInstanceClass: Swift.String? - let allocatedStorage: Swift.Int? - let storageType: Swift.String? - let iops: Swift.Int? - let autoMinorVersionUpgrade: Swift.Bool? - let monitoringInterval: Swift.Int? - let monitoringRoleArn: Swift.String? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let performanceInsightsRetentionPeriod: Swift.Int? - let serverlessV2ScalingConfiguration: RDSClientTypes.ServerlessV2ScalingConfiguration? - let networkType: Swift.String? - let manageMasterUserPassword: Swift.Bool? - let rotateMasterUserPassword: Swift.Bool? - let masterUserSecretKmsKeyId: Swift.String? - let engineMode: Swift.String? - let allowEngineModeChange: Swift.Bool? - let enableLocalWriteForwarding: Swift.Bool? - let awsBackupRecoveryPointArn: Swift.String? -} - -extension ModifyDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocatedStorage = "AllocatedStorage" - case allowEngineModeChange = "AllowEngineModeChange" - case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" - case applyImmediately = "ApplyImmediately" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case awsBackupRecoveryPointArn = "AwsBackupRecoveryPointArn" - case backtrackWindow = "BacktrackWindow" - case backupRetentionPeriod = "BackupRetentionPeriod" - case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterInstanceClass = "DBClusterInstanceClass" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbInstanceParameterGroupName = "DBInstanceParameterGroupName" - case deletionProtection = "DeletionProtection" - case domain = "Domain" - case domainIAMRoleName = "DomainIAMRoleName" - case enableGlobalWriteForwarding = "EnableGlobalWriteForwarding" - case enableHttpEndpoint = "EnableHttpEndpoint" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case enableLocalWriteForwarding = "EnableLocalWriteForwarding" - case enablePerformanceInsights = "EnablePerformanceInsights" - case engineMode = "EngineMode" - case engineVersion = "EngineVersion" - case iops = "Iops" - case manageMasterUserPassword = "ManageMasterUserPassword" - case masterUserPassword = "MasterUserPassword" - case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" - case monitoringInterval = "MonitoringInterval" - case monitoringRoleArn = "MonitoringRoleArn" - case networkType = "NetworkType" - case newDBClusterIdentifier = "NewDBClusterIdentifier" - case optionGroupName = "OptionGroupName" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" - case port = "Port" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case rotateMasterUserPassword = "RotateMasterUserPassword" - case scalingConfiguration = "ScalingConfiguration" - case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case storageType = "StorageType" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension ModifyDBClusterOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let newDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newDBClusterIdentifier) - newDBClusterIdentifier = newDBClusterIdentifierDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let backtrackWindowDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backtrackWindow) - backtrackWindow = backtrackWindowDecoded - let cloudwatchLogsExportConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CloudwatchLogsExportConfiguration.self, forKey: .cloudwatchLogsExportConfiguration) - cloudwatchLogsExportConfiguration = cloudwatchLogsExportConfigurationDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let allowMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowMajorVersionUpgrade) - allowMajorVersionUpgrade = allowMajorVersionUpgradeDecoded - let dbInstanceParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceParameterGroupName) - dbInstanceParameterGroupName = dbInstanceParameterGroupNameDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let scalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ScalingConfiguration.self, forKey: .scalingConfiguration) - scalingConfiguration = scalingConfigurationDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let enableHttpEndpointDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableHttpEndpoint) - enableHttpEndpoint = enableHttpEndpointDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let enableGlobalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableGlobalWriteForwarding) - enableGlobalWriteForwarding = enableGlobalWriteForwardingDecoded - let dbClusterInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterInstanceClass) - dbClusterInstanceClass = dbClusterInstanceClassDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let performanceInsightsRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .performanceInsightsRetentionPeriod) - performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriodDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let manageMasterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterUserPassword) - manageMasterUserPassword = manageMasterUserPasswordDecoded - let rotateMasterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .rotateMasterUserPassword) - rotateMasterUserPassword = rotateMasterUserPasswordDecoded - let masterUserSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserSecretKmsKeyId) - masterUserSecretKmsKeyId = masterUserSecretKmsKeyIdDecoded - let engineModeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineMode) - engineMode = engineModeDecoded - let allowEngineModeChangeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowEngineModeChange) - allowEngineModeChange = allowEngineModeChangeDecoded - let enableLocalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableLocalWriteForwarding) - enableLocalWriteForwarding = enableLocalWriteForwardingDecoded - let awsBackupRecoveryPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsBackupRecoveryPointArn) - awsBackupRecoveryPointArn = awsBackupRecoveryPointArnDecoded - } -} - -extension ModifyDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterResult"] + var value = ModifyDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -40982,48 +29655,43 @@ public struct ModifyDBClusterOutput: Swift.Equatable { } } -struct ModifyDBClusterOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension ModifyDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum ModifyDBClusterOutputError { -enum ModifyDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotAvailableFault": return try await StorageTypeNotAvailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotAvailableFault": return try await StorageTypeNotAvailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case parameters = "Parameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -41072,51 +29740,15 @@ public struct ModifyDBClusterParameterGroupInput: Swift.Equatable { } } -struct ModifyDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let parameters: [RDSClientTypes.Parameter]? -} - -extension ModifyDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case parameters = "Parameters" - } +extension ModifyDBClusterParameterGroupOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RDSClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RDSClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RDSClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} - -extension ModifyDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroupName = output.dbClusterParameterGroupName - } else { - self.dbClusterParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterParameterGroupResult"] + var value = ModifyDBClusterParameterGroupOutput() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + return value } } } @@ -41143,35 +29775,32 @@ public struct ModifyDBClusterParameterGroupOutput: Swift.Equatable { } } -struct ModifyDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension ModifyDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } +enum ModifyDBClusterParameterGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterParameterGroupResult")) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} - -enum ModifyDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBClusterSnapshotAttributeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeName = "AttributeName" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case valuesToAdd = "ValuesToAdd" + case valuesToRemove = "ValuesToRemove" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeName = attributeName { @@ -41243,76 +29872,15 @@ public struct ModifyDBClusterSnapshotAttributeInput: Swift.Equatable { } } -struct ModifyDBClusterSnapshotAttributeInputBody: Swift.Equatable { - let dbClusterSnapshotIdentifier: Swift.String? - let attributeName: Swift.String? - let valuesToAdd: [Swift.String]? - let valuesToRemove: [Swift.String]? -} - -extension ModifyDBClusterSnapshotAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeName = "AttributeName" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" - case valuesToAdd = "ValuesToAdd" - case valuesToRemove = "ValuesToRemove" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.valuesToAdd) { - struct KeyVal0{struct AttributeValue{}} - let valuesToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valuesToAdd) - if let valuesToAddWrappedContainer = valuesToAddWrappedContainer { - let valuesToAddContainer = try valuesToAddWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesToAddBuffer:[Swift.String]? = nil - if let valuesToAddContainer = valuesToAddContainer { - valuesToAddBuffer = [Swift.String]() - for stringContainer0 in valuesToAddContainer { - valuesToAddBuffer?.append(stringContainer0) - } - } - valuesToAdd = valuesToAddBuffer - } else { - valuesToAdd = [] - } - } else { - valuesToAdd = nil - } - if containerValues.contains(.valuesToRemove) { - struct KeyVal0{struct AttributeValue{}} - let valuesToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valuesToRemove) - if let valuesToRemoveWrappedContainer = valuesToRemoveWrappedContainer { - let valuesToRemoveContainer = try valuesToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesToRemoveBuffer:[Swift.String]? = nil - if let valuesToRemoveContainer = valuesToRemoveContainer { - valuesToRemoveBuffer = [Swift.String]() - for stringContainer0 in valuesToRemoveContainer { - valuesToRemoveBuffer?.append(stringContainer0) - } - } - valuesToRemove = valuesToRemoveBuffer - } else { - valuesToRemove = [] - } - } else { - valuesToRemove = nil - } - } -} +extension ModifyDBClusterSnapshotAttributeOutput { -extension ModifyDBClusterSnapshotAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBClusterSnapshotAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterSnapshotAttributesResult = output.dbClusterSnapshotAttributesResult - } else { - self.dbClusterSnapshotAttributesResult = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBClusterSnapshotAttributeResult"] + var value = ModifyDBClusterSnapshotAttributeOutput() + value.dbClusterSnapshotAttributesResult = try reader["DBClusterSnapshotAttributesResult"].readIfPresent(readingClosure: RDSClientTypes.DBClusterSnapshotAttributesResult.readingClosure) + return value } } } @@ -41329,36 +29897,89 @@ public struct ModifyDBClusterSnapshotAttributeOutput: Swift.Equatable { } } -struct ModifyDBClusterSnapshotAttributeOutputBody: Swift.Equatable { - let dbClusterSnapshotAttributesResult: RDSClientTypes.DBClusterSnapshotAttributesResult? -} - -extension ModifyDBClusterSnapshotAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterSnapshotAttributesResult = "DBClusterSnapshotAttributesResult" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBClusterSnapshotAttributeResult")) - let dbClusterSnapshotAttributesResultDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBClusterSnapshotAttributesResult.self, forKey: .dbClusterSnapshotAttributesResult) - dbClusterSnapshotAttributesResult = dbClusterSnapshotAttributesResultDecoded - } -} +enum ModifyDBClusterSnapshotAttributeOutputError { -enum ModifyDBClusterSnapshotAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SharedSnapshotQuotaExceeded": return try await SharedSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SharedSnapshotQuotaExceeded": return try await SharedSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allocatedStorage = "AllocatedStorage" + case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" + case applyImmediately = "ApplyImmediately" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case automationMode = "AutomationMode" + case awsBackupRecoveryPointArn = "AwsBackupRecoveryPointArn" + case backupRetentionPeriod = "BackupRetentionPeriod" + case caCertificateIdentifier = "CACertificateIdentifier" + case certificateRotationRestart = "CertificateRotationRestart" + case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbInstanceClass = "DBInstanceClass" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbParameterGroupName = "DBParameterGroupName" + case dbPortNumber = "DBPortNumber" + case dbSecurityGroups = "DBSecurityGroups" + case dbSubnetGroupName = "DBSubnetGroupName" + case dedicatedLogVolume = "DedicatedLogVolume" + case deletionProtection = "DeletionProtection" + case disableDomain = "DisableDomain" + case domain = "Domain" + case domainAuthSecretArn = "DomainAuthSecretArn" + case domainDnsIps = "DomainDnsIps" + case domainFqdn = "DomainFqdn" + case domainIAMRoleName = "DomainIAMRoleName" + case domainOu = "DomainOu" + case enableCustomerOwnedIp = "EnableCustomerOwnedIp" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enablePerformanceInsights = "EnablePerformanceInsights" + case engine = "Engine" + case engineVersion = "EngineVersion" + case iops = "Iops" + case licenseModel = "LicenseModel" + case manageMasterUserPassword = "ManageMasterUserPassword" + case masterUserPassword = "MasterUserPassword" + case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" + case maxAllocatedStorage = "MaxAllocatedStorage" + case monitoringInterval = "MonitoringInterval" + case monitoringRoleArn = "MonitoringRoleArn" + case multiAZ = "MultiAZ" + case multiTenant = "MultiTenant" + case networkType = "NetworkType" + case newDBInstanceIdentifier = "NewDBInstanceIdentifier" + case optionGroupName = "OptionGroupName" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case processorFeatures = "ProcessorFeatures" + case promotionTier = "PromotionTier" + case publiclyAccessible = "PubliclyAccessible" + case replicaMode = "ReplicaMode" + case resumeFullAutomationModeMinutes = "ResumeFullAutomationModeMinutes" + case rotateMasterUserPassword = "RotateMasterUserPassword" + case storageThroughput = "StorageThroughput" + case storageType = "StorageType" + case tdeCredentialArn = "TdeCredentialArn" + case tdeCredentialPassword = "TdeCredentialPassword" + case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -42032,334 +30653,15 @@ public struct ModifyDBInstanceInput: Swift.Equatable { } } -struct ModifyDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let allocatedStorage: Swift.Int? - let dbInstanceClass: Swift.String? - let dbSubnetGroupName: Swift.String? - let dbSecurityGroups: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let applyImmediately: Swift.Bool? - let masterUserPassword: Swift.String? - let dbParameterGroupName: Swift.String? - let backupRetentionPeriod: Swift.Int? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let multiAZ: Swift.Bool? - let engineVersion: Swift.String? - let allowMajorVersionUpgrade: Swift.Bool? - let autoMinorVersionUpgrade: Swift.Bool? - let licenseModel: Swift.String? - let iops: Swift.Int? - let optionGroupName: Swift.String? - let newDBInstanceIdentifier: Swift.String? - let storageType: Swift.String? - let tdeCredentialArn: Swift.String? - let tdeCredentialPassword: Swift.String? - let caCertificateIdentifier: Swift.String? - let domain: Swift.String? - let domainFqdn: Swift.String? - let domainOu: Swift.String? - let domainAuthSecretArn: Swift.String? - let domainDnsIps: [Swift.String]? - let copyTagsToSnapshot: Swift.Bool? - let monitoringInterval: Swift.Int? - let dbPortNumber: Swift.Int? - let publiclyAccessible: Swift.Bool? - let monitoringRoleArn: Swift.String? - let domainIAMRoleName: Swift.String? - let disableDomain: Swift.Bool? - let promotionTier: Swift.Int? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let performanceInsightsRetentionPeriod: Swift.Int? - let cloudwatchLogsExportConfiguration: RDSClientTypes.CloudwatchLogsExportConfiguration? - let processorFeatures: [RDSClientTypes.ProcessorFeature]? - let useDefaultProcessorFeatures: Swift.Bool? - let deletionProtection: Swift.Bool? - let maxAllocatedStorage: Swift.Int? - let certificateRotationRestart: Swift.Bool? - let replicaMode: RDSClientTypes.ReplicaMode? - let enableCustomerOwnedIp: Swift.Bool? - let awsBackupRecoveryPointArn: Swift.String? - let automationMode: RDSClientTypes.AutomationMode? - let resumeFullAutomationModeMinutes: Swift.Int? - let networkType: Swift.String? - let storageThroughput: Swift.Int? - let manageMasterUserPassword: Swift.Bool? - let rotateMasterUserPassword: Swift.Bool? - let masterUserSecretKmsKeyId: Swift.String? - let engine: Swift.String? - let dedicatedLogVolume: Swift.Bool? - let multiTenant: Swift.Bool? -} - -extension ModifyDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocatedStorage = "AllocatedStorage" - case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" - case applyImmediately = "ApplyImmediately" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case automationMode = "AutomationMode" - case awsBackupRecoveryPointArn = "AwsBackupRecoveryPointArn" - case backupRetentionPeriod = "BackupRetentionPeriod" - case caCertificateIdentifier = "CACertificateIdentifier" - case certificateRotationRestart = "CertificateRotationRestart" - case cloudwatchLogsExportConfiguration = "CloudwatchLogsExportConfiguration" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbInstanceClass = "DBInstanceClass" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbParameterGroupName = "DBParameterGroupName" - case dbPortNumber = "DBPortNumber" - case dbSecurityGroups = "DBSecurityGroups" - case dbSubnetGroupName = "DBSubnetGroupName" - case dedicatedLogVolume = "DedicatedLogVolume" - case deletionProtection = "DeletionProtection" - case disableDomain = "DisableDomain" - case domain = "Domain" - case domainAuthSecretArn = "DomainAuthSecretArn" - case domainDnsIps = "DomainDnsIps" - case domainFqdn = "DomainFqdn" - case domainIAMRoleName = "DomainIAMRoleName" - case domainOu = "DomainOu" - case enableCustomerOwnedIp = "EnableCustomerOwnedIp" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case enablePerformanceInsights = "EnablePerformanceInsights" - case engine = "Engine" - case engineVersion = "EngineVersion" - case iops = "Iops" - case licenseModel = "LicenseModel" - case manageMasterUserPassword = "ManageMasterUserPassword" - case masterUserPassword = "MasterUserPassword" - case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" - case maxAllocatedStorage = "MaxAllocatedStorage" - case monitoringInterval = "MonitoringInterval" - case monitoringRoleArn = "MonitoringRoleArn" - case multiAZ = "MultiAZ" - case multiTenant = "MultiTenant" - case networkType = "NetworkType" - case newDBInstanceIdentifier = "NewDBInstanceIdentifier" - case optionGroupName = "OptionGroupName" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case processorFeatures = "ProcessorFeatures" - case promotionTier = "PromotionTier" - case publiclyAccessible = "PubliclyAccessible" - case replicaMode = "ReplicaMode" - case resumeFullAutomationModeMinutes = "ResumeFullAutomationModeMinutes" - case rotateMasterUserPassword = "RotateMasterUserPassword" - case storageThroughput = "StorageThroughput" - case storageType = "StorageType" - case tdeCredentialArn = "TdeCredentialArn" - case tdeCredentialPassword = "TdeCredentialPassword" - case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension ModifyDBInstanceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - if containerValues.contains(.dbSecurityGroups) { - struct KeyVal0{struct DBSecurityGroupName{}} - let dbSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroups) - if let dbSecurityGroupsWrappedContainer = dbSecurityGroupsWrappedContainer { - let dbSecurityGroupsContainer = try dbSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbSecurityGroupsBuffer:[Swift.String]? = nil - if let dbSecurityGroupsContainer = dbSecurityGroupsContainer { - dbSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in dbSecurityGroupsContainer { - dbSecurityGroupsBuffer?.append(stringContainer0) - } - } - dbSecurityGroups = dbSecurityGroupsBuffer - } else { - dbSecurityGroups = [] - } - } else { - dbSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let allowMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowMajorVersionUpgrade) - allowMajorVersionUpgrade = allowMajorVersionUpgradeDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let newDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newDBInstanceIdentifier) - newDBInstanceIdentifier = newDBInstanceIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let tdeCredentialPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialPassword) - tdeCredentialPassword = tdeCredentialPasswordDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainFqdnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainFqdn) - domainFqdn = domainFqdnDecoded - let domainOuDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainOu) - domainOu = domainOuDecoded - let domainAuthSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainAuthSecretArn) - domainAuthSecretArn = domainAuthSecretArnDecoded - if containerValues.contains(.domainDnsIps) { - struct KeyVal0{struct member{}} - let domainDnsIpsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainDnsIps) - if let domainDnsIpsWrappedContainer = domainDnsIpsWrappedContainer { - let domainDnsIpsContainer = try domainDnsIpsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var domainDnsIpsBuffer:[Swift.String]? = nil - if let domainDnsIpsContainer = domainDnsIpsContainer { - domainDnsIpsBuffer = [Swift.String]() - for stringContainer0 in domainDnsIpsContainer { - domainDnsIpsBuffer?.append(stringContainer0) - } - } - domainDnsIps = domainDnsIpsBuffer - } else { - domainDnsIps = [] - } - } else { - domainDnsIps = nil - } - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let dbPortNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dbPortNumber) - dbPortNumber = dbPortNumberDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let disableDomainDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disableDomain) - disableDomain = disableDomainDecoded - let promotionTierDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .promotionTier) - promotionTier = promotionTierDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let performanceInsightsRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .performanceInsightsRetentionPeriod) - performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriodDecoded - let cloudwatchLogsExportConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.CloudwatchLogsExportConfiguration.self, forKey: .cloudwatchLogsExportConfiguration) - cloudwatchLogsExportConfiguration = cloudwatchLogsExportConfigurationDecoded - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let useDefaultProcessorFeaturesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useDefaultProcessorFeatures) - useDefaultProcessorFeatures = useDefaultProcessorFeaturesDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let maxAllocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAllocatedStorage) - maxAllocatedStorage = maxAllocatedStorageDecoded - let certificateRotationRestartDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .certificateRotationRestart) - certificateRotationRestart = certificateRotationRestartDecoded - let replicaModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ReplicaMode.self, forKey: .replicaMode) - replicaMode = replicaModeDecoded - let enableCustomerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableCustomerOwnedIp) - enableCustomerOwnedIp = enableCustomerOwnedIpDecoded - let awsBackupRecoveryPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsBackupRecoveryPointArn) - awsBackupRecoveryPointArn = awsBackupRecoveryPointArnDecoded - let automationModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.AutomationMode.self, forKey: .automationMode) - automationMode = automationModeDecoded - let resumeFullAutomationModeMinutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .resumeFullAutomationModeMinutes) - resumeFullAutomationModeMinutes = resumeFullAutomationModeMinutesDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let manageMasterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterUserPassword) - manageMasterUserPassword = manageMasterUserPasswordDecoded - let rotateMasterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .rotateMasterUserPassword) - rotateMasterUserPassword = rotateMasterUserPasswordDecoded - let masterUserSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserSecretKmsKeyId) - masterUserSecretKmsKeyId = masterUserSecretKmsKeyIdDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - let multiTenantDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiTenant) - multiTenant = multiTenantDecoded - } -} - -extension ModifyDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBInstanceResult"] + var value = ModifyDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -42376,54 +30678,49 @@ public struct ModifyDBInstanceOutput: Swift.Equatable { } } -struct ModifyDBInstanceOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension ModifyDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum ModifyDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CertificateNotFound": return try await CertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBUpgradeDependencyFailure": return try await DBUpgradeDependencyFailureFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ModifyDBInstanceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CertificateNotFound": return try await CertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBUpgradeDependencyFailure": return try await DBUpgradeDependencyFailureFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + case parameters = "Parameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -42474,51 +30771,15 @@ public struct ModifyDBParameterGroupInput: Swift.Equatable { } } -struct ModifyDBParameterGroupInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let parameters: [RDSClientTypes.Parameter]? -} - -extension ModifyDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - case parameters = "Parameters" - } +extension ModifyDBParameterGroupOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RDSClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RDSClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RDSClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} - -extension ModifyDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroupName = output.dbParameterGroupName - } else { - self.dbParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBParameterGroupResult"] + var value = ModifyDBParameterGroupOutput() + value.dbParameterGroupName = try reader["DBParameterGroupName"].readIfPresent() + return value } } } @@ -42536,35 +30797,31 @@ public struct ModifyDBParameterGroupOutput: Swift.Equatable { } } -struct ModifyDBParameterGroupOutputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? -} +enum ModifyDBParameterGroupOutputError { -extension ModifyDBParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBParameterGroupResult")) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - } -} - -enum ModifyDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBProxyEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbProxyEndpointName = "DBProxyEndpointName" + case newDBProxyEndpointName = "NewDBProxyEndpointName" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbProxyEndpointName = dbProxyEndpointName { @@ -42618,55 +30875,15 @@ public struct ModifyDBProxyEndpointInput: Swift.Equatable { } } -struct ModifyDBProxyEndpointInputBody: Swift.Equatable { - let dbProxyEndpointName: Swift.String? - let newDBProxyEndpointName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? -} - -extension ModifyDBProxyEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyEndpointName = "DBProxyEndpointName" - case newDBProxyEndpointName = "NewDBProxyEndpointName" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyEndpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyEndpointName) - dbProxyEndpointName = dbProxyEndpointNameDecoded - let newDBProxyEndpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newDBProxyEndpointName) - newDBProxyEndpointName = newDBProxyEndpointNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct member{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - } -} +extension ModifyDBProxyEndpointOutput { -extension ModifyDBProxyEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBProxyEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxyEndpoint = output.dbProxyEndpoint - } else { - self.dbProxyEndpoint = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBProxyEndpointResult"] + var value = ModifyDBProxyEndpointOutput() + value.dbProxyEndpoint = try reader["DBProxyEndpoint"].readIfPresent(readingClosure: RDSClientTypes.DBProxyEndpoint.readingClosure) + return value } } } @@ -42683,37 +30900,38 @@ public struct ModifyDBProxyEndpointOutput: Swift.Equatable { } } -struct ModifyDBProxyEndpointOutputBody: Swift.Equatable { - let dbProxyEndpoint: RDSClientTypes.DBProxyEndpoint? -} - -extension ModifyDBProxyEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyEndpoint = "DBProxyEndpoint" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBProxyEndpointResult")) - let dbProxyEndpointDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxyEndpoint.self, forKey: .dbProxyEndpoint) - dbProxyEndpoint = dbProxyEndpointDecoded - } -} +enum ModifyDBProxyEndpointOutputError { -enum ModifyDBProxyEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyEndpointAlreadyExistsFault": return try await DBProxyEndpointAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyEndpointNotFoundFault": return try await DBProxyEndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyEndpointStateFault": return try await InvalidDBProxyEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyEndpointAlreadyExistsFault": return try await DBProxyEndpointAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyEndpointNotFoundFault": return try await DBProxyEndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyEndpointStateFault": return try await InvalidDBProxyEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBProxyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case auth = "Auth" + case dbProxyName = "DBProxyName" + case debugLogging = "DebugLogging" + case idleClientTimeout = "IdleClientTimeout" + case newDBProxyName = "NewDBProxyName" + case requireTLS = "RequireTLS" + case roleArn = "RoleArn" + case securityGroups = "SecurityGroups" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let auth = auth { @@ -42811,92 +31029,15 @@ public struct ModifyDBProxyInput: Swift.Equatable { } } -struct ModifyDBProxyInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let newDBProxyName: Swift.String? - let auth: [RDSClientTypes.UserAuthConfig]? - let requireTLS: Swift.Bool? - let idleClientTimeout: Swift.Int? - let debugLogging: Swift.Bool? - let roleArn: Swift.String? - let securityGroups: [Swift.String]? -} - -extension ModifyDBProxyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case auth = "Auth" - case dbProxyName = "DBProxyName" - case debugLogging = "DebugLogging" - case idleClientTimeout = "IdleClientTimeout" - case newDBProxyName = "NewDBProxyName" - case requireTLS = "RequireTLS" - case roleArn = "RoleArn" - case securityGroups = "SecurityGroups" - } +extension ModifyDBProxyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let newDBProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newDBProxyName) - newDBProxyName = newDBProxyNameDecoded - if containerValues.contains(.auth) { - struct KeyVal0{struct member{}} - let authWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .auth) - if let authWrappedContainer = authWrappedContainer { - let authContainer = try authWrappedContainer.decodeIfPresent([RDSClientTypes.UserAuthConfig].self, forKey: .member) - var authBuffer:[RDSClientTypes.UserAuthConfig]? = nil - if let authContainer = authContainer { - authBuffer = [RDSClientTypes.UserAuthConfig]() - for structureContainer0 in authContainer { - authBuffer?.append(structureContainer0) - } - } - auth = authBuffer - } else { - auth = [] - } - } else { - auth = nil - } - let requireTLSDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requireTLS) - requireTLS = requireTLSDecoded - let idleClientTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .idleClientTimeout) - idleClientTimeout = idleClientTimeoutDecoded - let debugLoggingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .debugLogging) - debugLogging = debugLoggingDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - if containerValues.contains(.securityGroups) { - struct KeyVal0{struct member{}} - let securityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .securityGroups) - if let securityGroupsWrappedContainer = securityGroupsWrappedContainer { - let securityGroupsContainer = try securityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var securityGroupsBuffer:[Swift.String]? = nil - if let securityGroupsContainer = securityGroupsContainer { - securityGroupsBuffer = [Swift.String]() - for stringContainer0 in securityGroupsContainer { - securityGroupsBuffer?.append(stringContainer0) - } - } - securityGroups = securityGroupsBuffer - } else { - securityGroups = [] - } - } else { - securityGroups = nil - } - } -} - -extension ModifyDBProxyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBProxyOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxy = output.dbProxy - } else { - self.dbProxy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBProxyResult"] + var value = ModifyDBProxyOutput() + value.dbProxy = try reader["DBProxy"].readIfPresent(readingClosure: RDSClientTypes.DBProxy.readingClosure) + return value } } } @@ -42913,36 +31054,33 @@ public struct ModifyDBProxyOutput: Swift.Equatable { } } -struct ModifyDBProxyOutputBody: Swift.Equatable { - let dbProxy: RDSClientTypes.DBProxy? -} - -extension ModifyDBProxyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxy = "DBProxy" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBProxyResult")) - let dbProxyDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxy.self, forKey: .dbProxy) - dbProxy = dbProxyDecoded - } -} +enum ModifyDBProxyOutputError { -enum ModifyDBProxyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyAlreadyExistsFault": return try await DBProxyAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyAlreadyExistsFault": return try await DBProxyAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBProxyTargetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case connectionPoolConfig = "ConnectionPoolConfig" + case dbProxyName = "DBProxyName" + case newName = "NewName" + case targetGroupName = "TargetGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let connectionPoolConfig = connectionPoolConfig { @@ -42995,42 +31133,15 @@ public struct ModifyDBProxyTargetGroupInput: Swift.Equatable { } } -struct ModifyDBProxyTargetGroupInputBody: Swift.Equatable { - let targetGroupName: Swift.String? - let dbProxyName: Swift.String? - let connectionPoolConfig: RDSClientTypes.ConnectionPoolConfiguration? - let newName: Swift.String? -} +extension ModifyDBProxyTargetGroupOutput { -extension ModifyDBProxyTargetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case connectionPoolConfig = "ConnectionPoolConfig" - case dbProxyName = "DBProxyName" - case newName = "NewName" - case targetGroupName = "TargetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupName) - targetGroupName = targetGroupNameDecoded - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let connectionPoolConfigDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ConnectionPoolConfiguration.self, forKey: .connectionPoolConfig) - connectionPoolConfig = connectionPoolConfigDecoded - let newNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newName) - newName = newNameDecoded - } -} - -extension ModifyDBProxyTargetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBProxyTargetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxyTargetGroup = output.dbProxyTargetGroup - } else { - self.dbProxyTargetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBProxyTargetGroupResult"] + var value = ModifyDBProxyTargetGroupOutput() + value.dbProxyTargetGroup = try reader["DBProxyTargetGroup"].readIfPresent(readingClosure: RDSClientTypes.DBProxyTargetGroup.readingClosure) + return value } } } @@ -43047,36 +31158,33 @@ public struct ModifyDBProxyTargetGroupOutput: Swift.Equatable { } } -struct ModifyDBProxyTargetGroupOutputBody: Swift.Equatable { - let dbProxyTargetGroup: RDSClientTypes.DBProxyTargetGroup? -} - -extension ModifyDBProxyTargetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyTargetGroup = "DBProxyTargetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBProxyTargetGroupResult")) - let dbProxyTargetGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBProxyTargetGroup.self, forKey: .dbProxyTargetGroup) - dbProxyTargetGroup = dbProxyTargetGroupDecoded - } -} +enum ModifyDBProxyTargetGroupOutputError { -enum ModifyDBProxyTargetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBRecommendationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case locale = "Locale" + case recommendationId = "RecommendationId" + case recommendedActionUpdates = "RecommendedActionUpdates" + case status = "Status" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let locale = locale { @@ -43141,59 +31249,15 @@ public struct ModifyDBRecommendationInput: Swift.Equatable { } } -struct ModifyDBRecommendationInputBody: Swift.Equatable { - let recommendationId: Swift.String? - let locale: Swift.String? - let status: Swift.String? - let recommendedActionUpdates: [RDSClientTypes.RecommendedActionUpdate]? -} +extension ModifyDBRecommendationOutput { -extension ModifyDBRecommendationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case locale = "Locale" - case recommendationId = "RecommendationId" - case recommendedActionUpdates = "RecommendedActionUpdates" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let recommendationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recommendationId) - recommendationId = recommendationIdDecoded - let localeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locale) - locale = localeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.recommendedActionUpdates) { - struct KeyVal0{struct member{}} - let recommendedActionUpdatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recommendedActionUpdates) - if let recommendedActionUpdatesWrappedContainer = recommendedActionUpdatesWrappedContainer { - let recommendedActionUpdatesContainer = try recommendedActionUpdatesWrappedContainer.decodeIfPresent([RDSClientTypes.RecommendedActionUpdate].self, forKey: .member) - var recommendedActionUpdatesBuffer:[RDSClientTypes.RecommendedActionUpdate]? = nil - if let recommendedActionUpdatesContainer = recommendedActionUpdatesContainer { - recommendedActionUpdatesBuffer = [RDSClientTypes.RecommendedActionUpdate]() - for structureContainer0 in recommendedActionUpdatesContainer { - recommendedActionUpdatesBuffer?.append(structureContainer0) - } - } - recommendedActionUpdates = recommendedActionUpdatesBuffer - } else { - recommendedActionUpdates = [] - } - } else { - recommendedActionUpdates = nil - } - } -} - -extension ModifyDBRecommendationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBRecommendationOutputBody = try responseDecoder.decode(responseBody: data) - self.dbRecommendation = output.dbRecommendation - } else { - self.dbRecommendation = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBRecommendationResult"] + var value = ModifyDBRecommendationOutput() + value.dbRecommendation = try reader["DBRecommendation"].readIfPresent(readingClosure: RDSClientTypes.DBRecommendation.readingClosure) + return value } } } @@ -43210,33 +31274,30 @@ public struct ModifyDBRecommendationOutput: Swift.Equatable { } } -struct ModifyDBRecommendationOutputBody: Swift.Equatable { - let dbRecommendation: RDSClientTypes.DBRecommendation? -} - -extension ModifyDBRecommendationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbRecommendation = "DBRecommendation" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBRecommendationResult")) - let dbRecommendationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBRecommendation.self, forKey: .dbRecommendation) - dbRecommendation = dbRecommendationDecoded - } -} +enum ModifyDBRecommendationOutputError { -enum ModifyDBRecommendationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBSnapshotAttributeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeName = "AttributeName" + case dbSnapshotIdentifier = "DBSnapshotIdentifier" + case valuesToAdd = "ValuesToAdd" + case valuesToRemove = "ValuesToRemove" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeName = attributeName { @@ -43308,76 +31369,15 @@ public struct ModifyDBSnapshotAttributeInput: Swift.Equatable { } } -struct ModifyDBSnapshotAttributeInputBody: Swift.Equatable { - let dbSnapshotIdentifier: Swift.String? - let attributeName: Swift.String? - let valuesToAdd: [Swift.String]? - let valuesToRemove: [Swift.String]? -} - -extension ModifyDBSnapshotAttributeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeName = "AttributeName" - case dbSnapshotIdentifier = "DBSnapshotIdentifier" - case valuesToAdd = "ValuesToAdd" - case valuesToRemove = "ValuesToRemove" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.valuesToAdd) { - struct KeyVal0{struct AttributeValue{}} - let valuesToAddWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valuesToAdd) - if let valuesToAddWrappedContainer = valuesToAddWrappedContainer { - let valuesToAddContainer = try valuesToAddWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesToAddBuffer:[Swift.String]? = nil - if let valuesToAddContainer = valuesToAddContainer { - valuesToAddBuffer = [Swift.String]() - for stringContainer0 in valuesToAddContainer { - valuesToAddBuffer?.append(stringContainer0) - } - } - valuesToAdd = valuesToAddBuffer - } else { - valuesToAdd = [] - } - } else { - valuesToAdd = nil - } - if containerValues.contains(.valuesToRemove) { - struct KeyVal0{struct AttributeValue{}} - let valuesToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .valuesToRemove) - if let valuesToRemoveWrappedContainer = valuesToRemoveWrappedContainer { - let valuesToRemoveContainer = try valuesToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesToRemoveBuffer:[Swift.String]? = nil - if let valuesToRemoveContainer = valuesToRemoveContainer { - valuesToRemoveBuffer = [Swift.String]() - for stringContainer0 in valuesToRemoveContainer { - valuesToRemoveBuffer?.append(stringContainer0) - } - } - valuesToRemove = valuesToRemoveBuffer - } else { - valuesToRemove = [] - } - } else { - valuesToRemove = nil - } - } -} +extension ModifyDBSnapshotAttributeOutput { -extension ModifyDBSnapshotAttributeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBSnapshotAttributeOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSnapshotAttributesResult = output.dbSnapshotAttributesResult - } else { - self.dbSnapshotAttributesResult = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBSnapshotAttributeResult"] + var value = ModifyDBSnapshotAttributeOutput() + value.dbSnapshotAttributesResult = try reader["DBSnapshotAttributesResult"].readIfPresent(readingClosure: RDSClientTypes.DBSnapshotAttributesResult.readingClosure) + return value } } } @@ -43394,36 +31394,32 @@ public struct ModifyDBSnapshotAttributeOutput: Swift.Equatable { } } -struct ModifyDBSnapshotAttributeOutputBody: Swift.Equatable { - let dbSnapshotAttributesResult: RDSClientTypes.DBSnapshotAttributesResult? -} +enum ModifyDBSnapshotAttributeOutputError { -extension ModifyDBSnapshotAttributeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshotAttributesResult = "DBSnapshotAttributesResult" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBSnapshotAttributeResult")) - let dbSnapshotAttributesResultDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSnapshotAttributesResult.self, forKey: .dbSnapshotAttributesResult) - dbSnapshotAttributesResult = dbSnapshotAttributesResultDecoded - } -} - -enum ModifyDBSnapshotAttributeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SharedSnapshotQuotaExceeded": return try await SharedSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SharedSnapshotQuotaExceeded": return try await SharedSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSnapshotIdentifier = "DBSnapshotIdentifier" + case engineVersion = "EngineVersion" + case optionGroupName = "OptionGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSnapshotIdentifier = dbSnapshotIdentifier { @@ -43481,38 +31477,15 @@ public struct ModifyDBSnapshotInput: Swift.Equatable { } } -struct ModifyDBSnapshotInputBody: Swift.Equatable { - let dbSnapshotIdentifier: Swift.String? - let engineVersion: Swift.String? - let optionGroupName: Swift.String? -} +extension ModifyDBSnapshotOutput { -extension ModifyDBSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshotIdentifier = "DBSnapshotIdentifier" - case engineVersion = "EngineVersion" - case optionGroupName = "OptionGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - } -} - -extension ModifyDBSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSnapshot = output.dbSnapshot - } else { - self.dbSnapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBSnapshotResult"] + var value = ModifyDBSnapshotOutput() + value.dbSnapshot = try reader["DBSnapshot"].readIfPresent(readingClosure: RDSClientTypes.DBSnapshot.readingClosure) + return value } } } @@ -43529,34 +31502,30 @@ public struct ModifyDBSnapshotOutput: Swift.Equatable { } } -struct ModifyDBSnapshotOutputBody: Swift.Equatable { - let dbSnapshot: RDSClientTypes.DBSnapshot? -} +enum ModifyDBSnapshotOutputError { -extension ModifyDBSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSnapshot = "DBSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBSnapshotResult")) - let dbSnapshotDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSnapshot.self, forKey: .dbSnapshot) - dbSnapshot = dbSnapshotDecoded - } -} - -enum ModifyDBSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyDBSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbSubnetGroupDescription = "DBSubnetGroupDescription" + case dbSubnetGroupName = "DBSubnetGroupName" + case subnetIds = "SubnetIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbSubnetGroupDescription = dbSubnetGroupDescription { @@ -43612,55 +31581,15 @@ public struct ModifyDBSubnetGroupInput: Swift.Equatable { } } -struct ModifyDBSubnetGroupInputBody: Swift.Equatable { - let dbSubnetGroupName: Swift.String? - let dbSubnetGroupDescription: Swift.String? - let subnetIds: [Swift.String]? -} - -extension ModifyDBSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroupDescription = "DBSubnetGroupDescription" - case dbSubnetGroupName = "DBSubnetGroupName" - case subnetIds = "SubnetIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let dbSubnetGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupDescription) - dbSubnetGroupDescription = dbSubnetGroupDescriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - } -} +extension ModifyDBSubnetGroupOutput { -extension ModifyDBSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyDBSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSubnetGroup = output.dbSubnetGroup - } else { - self.dbSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyDBSubnetGroupResult"] + var value = ModifyDBSubnetGroupOutput() + value.dbSubnetGroup = try reader["DBSubnetGroup"].readIfPresent(readingClosure: RDSClientTypes.DBSubnetGroup.readingClosure) + return value } } } @@ -43677,38 +31606,36 @@ public struct ModifyDBSubnetGroupOutput: Swift.Equatable { } } -struct ModifyDBSubnetGroupOutputBody: Swift.Equatable { - let dbSubnetGroup: RDSClientTypes.DBSubnetGroup? -} - -extension ModifyDBSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSubnetGroup = "DBSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyDBSubnetGroupResult")) - let dbSubnetGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSubnetGroup.self, forKey: .dbSubnetGroup) - dbSubnetGroup = dbSubnetGroupDecoded - } -} +enum ModifyDBSubnetGroupOutputError { -enum ModifyDBSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetAlreadyInUse": return try await SubnetAlreadyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetQuotaExceededFault": return try await DBSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetAlreadyInUse": return try await SubnetAlreadyInUse.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case eventCategories = "EventCategories" + case snsTopicArn = "SnsTopicArn" + case sourceType = "SourceType" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -43777,63 +31704,15 @@ public struct ModifyEventSubscriptionInput: Swift.Equatable { } } -struct ModifyEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let snsTopicArn: Swift.String? - let sourceType: Swift.String? - let eventCategories: [Swift.String]? - let enabled: Swift.Bool? -} +extension ModifyEventSubscriptionOutput { -extension ModifyEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case eventCategories = "EventCategories" - case snsTopicArn = "SnsTopicArn" - case sourceType = "SourceType" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - } -} - -extension ModifyEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyEventSubscriptionResult"] + var value = ModifyEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: RDSClientTypes.EventSubscription.readingClosure) + return value } } } @@ -43850,39 +31729,37 @@ public struct ModifyEventSubscriptionOutput: Swift.Equatable { } } -struct ModifyEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: RDSClientTypes.EventSubscription? -} +enum ModifyEventSubscriptionOutputError { -extension ModifyEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(RDSClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} - -enum ModifyEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSInvalidTopic": return try await SNSInvalidTopicFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSNoAuthorization": return try await SNSNoAuthorizationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSInvalidTopic": return try await SNSInvalidTopicFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSNoAuthorization": return try await SNSNoAuthorizationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" + case deletionProtection = "DeletionProtection" + case engineVersion = "EngineVersion" + case globalClusterIdentifier = "GlobalClusterIdentifier" + case newGlobalClusterIdentifier = "NewGlobalClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowMajorVersionUpgrade = allowMajorVersionUpgrade { @@ -43951,46 +31828,15 @@ public struct ModifyGlobalClusterInput: Swift.Equatable { } } -struct ModifyGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let newGlobalClusterIdentifier: Swift.String? - let deletionProtection: Swift.Bool? - let engineVersion: Swift.String? - let allowMajorVersionUpgrade: Swift.Bool? -} +extension ModifyGlobalClusterOutput { -extension ModifyGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowMajorVersionUpgrade = "AllowMajorVersionUpgrade" - case deletionProtection = "DeletionProtection" - case engineVersion = "EngineVersion" - case globalClusterIdentifier = "GlobalClusterIdentifier" - case newGlobalClusterIdentifier = "NewGlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let newGlobalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newGlobalClusterIdentifier) - newGlobalClusterIdentifier = newGlobalClusterIdentifierDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let allowMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowMajorVersionUpgrade) - allowMajorVersionUpgrade = allowMajorVersionUpgradeDecoded - } -} - -extension ModifyGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyGlobalClusterResult"] + var value = ModifyGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: RDSClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -44007,37 +31853,34 @@ public struct ModifyGlobalClusterOutput: Swift.Equatable { } } -struct ModifyGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: RDSClientTypes.GlobalCluster? -} - -extension ModifyGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} +enum ModifyGlobalClusterOutputError { -enum ModifyGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyOptionGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case optionGroupName = "OptionGroupName" + case optionsToInclude = "OptionsToInclude" + case optionsToRemove = "OptionsToRemove" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -44108,76 +31951,15 @@ public struct ModifyOptionGroupInput: Swift.Equatable { } } -struct ModifyOptionGroupInputBody: Swift.Equatable { - let optionGroupName: Swift.String? - let optionsToInclude: [RDSClientTypes.OptionConfiguration]? - let optionsToRemove: [Swift.String]? - let applyImmediately: Swift.Bool? -} - -extension ModifyOptionGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case optionGroupName = "OptionGroupName" - case optionsToInclude = "OptionsToInclude" - case optionsToRemove = "OptionsToRemove" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - if containerValues.contains(.optionsToInclude) { - struct KeyVal0{struct OptionConfiguration{}} - let optionsToIncludeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionsToInclude) - if let optionsToIncludeWrappedContainer = optionsToIncludeWrappedContainer { - let optionsToIncludeContainer = try optionsToIncludeWrappedContainer.decodeIfPresent([RDSClientTypes.OptionConfiguration].self, forKey: .member) - var optionsToIncludeBuffer:[RDSClientTypes.OptionConfiguration]? = nil - if let optionsToIncludeContainer = optionsToIncludeContainer { - optionsToIncludeBuffer = [RDSClientTypes.OptionConfiguration]() - for structureContainer0 in optionsToIncludeContainer { - optionsToIncludeBuffer?.append(structureContainer0) - } - } - optionsToInclude = optionsToIncludeBuffer - } else { - optionsToInclude = [] - } - } else { - optionsToInclude = nil - } - if containerValues.contains(.optionsToRemove) { - struct KeyVal0{struct member{}} - let optionsToRemoveWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionsToRemove) - if let optionsToRemoveWrappedContainer = optionsToRemoveWrappedContainer { - let optionsToRemoveContainer = try optionsToRemoveWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var optionsToRemoveBuffer:[Swift.String]? = nil - if let optionsToRemoveContainer = optionsToRemoveContainer { - optionsToRemoveBuffer = [Swift.String]() - for stringContainer0 in optionsToRemoveContainer { - optionsToRemoveBuffer?.append(stringContainer0) - } - } - optionsToRemove = optionsToRemoveBuffer - } else { - optionsToRemove = [] - } - } else { - optionsToRemove = nil - } - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - } -} +extension ModifyOptionGroupOutput { -extension ModifyOptionGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyOptionGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.optionGroup = output.optionGroup - } else { - self.optionGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyOptionGroupResult"] + var value = ModifyOptionGroupOutput() + value.optionGroup = try reader["OptionGroup"].readIfPresent(readingClosure: RDSClientTypes.OptionGroup.readingClosure) + return value } } } @@ -44194,30 +31976,20 @@ public struct ModifyOptionGroupOutput: Swift.Equatable { } } -struct ModifyOptionGroupOutputBody: Swift.Equatable { - let optionGroup: RDSClientTypes.OptionGroup? -} - -extension ModifyOptionGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case optionGroup = "OptionGroup" - } +enum ModifyOptionGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyOptionGroupResult")) - let optionGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.OptionGroup.self, forKey: .optionGroup) - optionGroup = optionGroupDecoded - } -} - -enum ModifyOptionGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidOptionGroupStateFault": return try await InvalidOptionGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidOptionGroupStateFault": return try await InvalidOptionGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -44228,6 +32000,13 @@ extension ModifyTenantDatabaseInput: Swift.CustomDebugStringConvertible { } extension ModifyTenantDatabaseInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case masterUserPassword = "MasterUserPassword" + case newTenantDBName = "NewTenantDBName" + case tenantDBName = "TenantDBName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -44295,42 +32074,15 @@ public struct ModifyTenantDatabaseInput: Swift.Equatable { } } -struct ModifyTenantDatabaseInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let tenantDBName: Swift.String? - let masterUserPassword: Swift.String? - let newTenantDBName: Swift.String? -} +extension ModifyTenantDatabaseOutput { -extension ModifyTenantDatabaseInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case masterUserPassword = "MasterUserPassword" - case newTenantDBName = "NewTenantDBName" - case tenantDBName = "TenantDBName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let tenantDBNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDBName) - tenantDBName = tenantDBNameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let newTenantDBNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newTenantDBName) - newTenantDBName = newTenantDBNameDecoded - } -} - -extension ModifyTenantDatabaseOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyTenantDatabaseOutputBody = try responseDecoder.decode(responseBody: data) - self.tenantDatabase = output.tenantDatabase - } else { - self.tenantDatabase = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyTenantDatabaseResult"] + var value = ModifyTenantDatabaseOutput() + value.tenantDatabase = try reader["TenantDatabase"].readIfPresent(readingClosure: RDSClientTypes.TenantDatabase.readingClosure) + return value } } } @@ -44347,47 +32099,35 @@ public struct ModifyTenantDatabaseOutput: Swift.Equatable { } } -struct ModifyTenantDatabaseOutputBody: Swift.Equatable { - let tenantDatabase: RDSClientTypes.TenantDatabase? -} - -extension ModifyTenantDatabaseOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tenantDatabase = "TenantDatabase" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyTenantDatabaseResult")) - let tenantDatabaseDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TenantDatabase.self, forKey: .tenantDatabase) - tenantDatabase = tenantDatabaseDecoded - } -} +enum ModifyTenantDatabaseOutputError { -enum ModifyTenantDatabaseOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseAlreadyExists": return try await TenantDatabaseAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseAlreadyExists": return try await TenantDatabaseAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension NetworkTypeNotSupported { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NetworkTypeNotSupported() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -44415,23 +32155,7 @@ public struct NetworkTypeNotSupported: ClientRuntime.ModeledError, AWSClientRunt } } -struct NetworkTypeNotSupportedBody: Swift.Equatable { - let message: Swift.String? -} - -extension NetworkTypeNotSupportedBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.Option: Swift.Codable { +extension RDSClientTypes.Option: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSecurityGroupMemberships = "DBSecurityGroupMemberships" case optionDescription = "OptionDescription" @@ -44502,76 +32226,20 @@ extension RDSClientTypes.Option: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionName) - optionName = optionNameDecoded - let optionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionDescription) - optionDescription = optionDescriptionDecoded - let persistentDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .persistent) - persistent = persistentDecoded - let permanentDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .permanent) - permanent = permanentDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let optionVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionVersion) - optionVersion = optionVersionDecoded - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct OptionSetting{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([RDSClientTypes.OptionSetting].self, forKey: .member) - var optionSettingsBuffer:[RDSClientTypes.OptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [RDSClientTypes.OptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil - } - if containerValues.contains(.dbSecurityGroupMemberships) { - struct KeyVal0{struct DBSecurityGroup{}} - let dbSecurityGroupMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroupMemberships) - if let dbSecurityGroupMembershipsWrappedContainer = dbSecurityGroupMembershipsWrappedContainer { - let dbSecurityGroupMembershipsContainer = try dbSecurityGroupMembershipsWrappedContainer.decodeIfPresent([RDSClientTypes.DBSecurityGroupMembership].self, forKey: .member) - var dbSecurityGroupMembershipsBuffer:[RDSClientTypes.DBSecurityGroupMembership]? = nil - if let dbSecurityGroupMembershipsContainer = dbSecurityGroupMembershipsContainer { - dbSecurityGroupMembershipsBuffer = [RDSClientTypes.DBSecurityGroupMembership]() - for structureContainer0 in dbSecurityGroupMembershipsContainer { - dbSecurityGroupMembershipsBuffer?.append(structureContainer0) - } - } - dbSecurityGroupMemberships = dbSecurityGroupMembershipsBuffer - } else { - dbSecurityGroupMemberships = [] - } - } else { - dbSecurityGroupMemberships = nil - } - if containerValues.contains(.vpcSecurityGroupMemberships) { - struct KeyVal0{struct VpcSecurityGroupMembership{}} - let vpcSecurityGroupMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupMemberships) - if let vpcSecurityGroupMembershipsWrappedContainer = vpcSecurityGroupMembershipsWrappedContainer { - let vpcSecurityGroupMembershipsContainer = try vpcSecurityGroupMembershipsWrappedContainer.decodeIfPresent([RDSClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupMembershipsBuffer:[RDSClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupMembershipsContainer = vpcSecurityGroupMembershipsContainer { - vpcSecurityGroupMembershipsBuffer = [RDSClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupMembershipsContainer { - vpcSecurityGroupMembershipsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroupMemberships = vpcSecurityGroupMembershipsBuffer - } else { - vpcSecurityGroupMemberships = [] - } - } else { - vpcSecurityGroupMemberships = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Option() + value.optionName = try reader["OptionName"].readIfPresent() + value.optionDescription = try reader["OptionDescription"].readIfPresent() + value.persistent = try reader["Persistent"].readIfPresent() + value.permanent = try reader["Permanent"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.optionVersion = try reader["OptionVersion"].readIfPresent() + value.optionSettings = try reader["OptionSettings"].readListIfPresent(memberReadingClosure: RDSClientTypes.OptionSetting.readingClosure, memberNodeInfo: "OptionSetting", isFlattened: false) + value.dbSecurityGroupMemberships = try reader["DBSecurityGroupMemberships"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBSecurityGroupMembership.readingClosure, memberNodeInfo: "DBSecurityGroup", isFlattened: false) + value.vpcSecurityGroupMemberships = try reader["VpcSecurityGroupMemberships"].readListIfPresent(memberReadingClosure: RDSClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroupMembership", isFlattened: false) + return value } } } @@ -44624,7 +32292,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.OptionConfiguration: Swift.Codable { +extension RDSClientTypes.OptionConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dbSecurityGroupMemberships = "DBSecurityGroupMemberships" case optionName = "OptionName" @@ -44683,70 +32351,17 @@ extension RDSClientTypes.OptionConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionName) - optionName = optionNameDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let optionVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionVersion) - optionVersion = optionVersionDecoded - if containerValues.contains(.dbSecurityGroupMemberships) { - struct KeyVal0{struct DBSecurityGroupName{}} - let dbSecurityGroupMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroupMemberships) - if let dbSecurityGroupMembershipsWrappedContainer = dbSecurityGroupMembershipsWrappedContainer { - let dbSecurityGroupMembershipsContainer = try dbSecurityGroupMembershipsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbSecurityGroupMembershipsBuffer:[Swift.String]? = nil - if let dbSecurityGroupMembershipsContainer = dbSecurityGroupMembershipsContainer { - dbSecurityGroupMembershipsBuffer = [Swift.String]() - for stringContainer0 in dbSecurityGroupMembershipsContainer { - dbSecurityGroupMembershipsBuffer?.append(stringContainer0) - } - } - dbSecurityGroupMemberships = dbSecurityGroupMembershipsBuffer - } else { - dbSecurityGroupMemberships = [] - } - } else { - dbSecurityGroupMemberships = nil - } - if containerValues.contains(.vpcSecurityGroupMemberships) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupMembershipsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupMemberships) - if let vpcSecurityGroupMembershipsWrappedContainer = vpcSecurityGroupMembershipsWrappedContainer { - let vpcSecurityGroupMembershipsContainer = try vpcSecurityGroupMembershipsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupMembershipsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupMembershipsContainer = vpcSecurityGroupMembershipsContainer { - vpcSecurityGroupMembershipsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupMembershipsContainer { - vpcSecurityGroupMembershipsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupMemberships = vpcSecurityGroupMembershipsBuffer - } else { - vpcSecurityGroupMemberships = [] - } - } else { - vpcSecurityGroupMemberships = nil - } - if containerValues.contains(.optionSettings) { - struct KeyVal0{struct OptionSetting{}} - let optionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionSettings) - if let optionSettingsWrappedContainer = optionSettingsWrappedContainer { - let optionSettingsContainer = try optionSettingsWrappedContainer.decodeIfPresent([RDSClientTypes.OptionSetting].self, forKey: .member) - var optionSettingsBuffer:[RDSClientTypes.OptionSetting]? = nil - if let optionSettingsContainer = optionSettingsContainer { - optionSettingsBuffer = [RDSClientTypes.OptionSetting]() - for structureContainer0 in optionSettingsContainer { - optionSettingsBuffer?.append(structureContainer0) - } - } - optionSettings = optionSettingsBuffer - } else { - optionSettings = [] - } - } else { - optionSettings = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.OptionConfiguration() + value.optionName = try reader["OptionName"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.optionVersion = try reader["OptionVersion"].readIfPresent() + value.dbSecurityGroupMemberships = try reader["DBSecurityGroupMemberships"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "DBSecurityGroupName", isFlattened: false) + value.vpcSecurityGroupMemberships = try reader["VpcSecurityGroupMemberships"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "VpcSecurityGroupId", isFlattened: false) + value.optionSettings = try reader["OptionSettings"].readListIfPresent(memberReadingClosure: RDSClientTypes.OptionSetting.readingClosure, memberNodeInfo: "OptionSetting", isFlattened: false) + return value } } } @@ -44788,7 +32403,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.OptionGroup: Swift.Codable { +extension RDSClientTypes.OptionGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowsVpcAndNonVpcInstanceMemberships = "AllowsVpcAndNonVpcInstanceMemberships" case copyTimestamp = "CopyTimestamp" @@ -44849,47 +32464,23 @@ extension RDSClientTypes.OptionGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let optionGroupDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupDescription) - optionGroupDescription = optionGroupDescriptionDecoded - let engineNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineName) - engineName = engineNameDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - if containerValues.contains(.options) { - struct KeyVal0{struct Option{}} - let optionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .options) - if let optionsWrappedContainer = optionsWrappedContainer { - let optionsContainer = try optionsWrappedContainer.decodeIfPresent([RDSClientTypes.Option].self, forKey: .member) - var optionsBuffer:[RDSClientTypes.Option]? = nil - if let optionsContainer = optionsContainer { - optionsBuffer = [RDSClientTypes.Option]() - for structureContainer0 in optionsContainer { - optionsBuffer?.append(structureContainer0) - } - } - options = optionsBuffer - } else { - options = [] - } - } else { - options = nil - } - let allowsVpcAndNonVpcInstanceMembershipsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowsVpcAndNonVpcInstanceMemberships) - allowsVpcAndNonVpcInstanceMemberships = allowsVpcAndNonVpcInstanceMembershipsDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let optionGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupArn) - optionGroupArn = optionGroupArnDecoded - let sourceOptionGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceOptionGroup) - sourceOptionGroup = sourceOptionGroupDecoded - let sourceAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceAccountId) - sourceAccountId = sourceAccountIdDecoded - let copyTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .copyTimestamp) - copyTimestamp = copyTimestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.OptionGroup() + value.optionGroupName = try reader["OptionGroupName"].readIfPresent() + value.optionGroupDescription = try reader["OptionGroupDescription"].readIfPresent() + value.engineName = try reader["EngineName"].readIfPresent() + value.majorEngineVersion = try reader["MajorEngineVersion"].readIfPresent() + value.options = try reader["Options"].readListIfPresent(memberReadingClosure: RDSClientTypes.Option.readingClosure, memberNodeInfo: "Option", isFlattened: false) + value.allowsVpcAndNonVpcInstanceMemberships = try reader["AllowsVpcAndNonVpcInstanceMemberships"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.optionGroupArn = try reader["OptionGroupArn"].readIfPresent() + value.sourceOptionGroup = try reader["SourceOptionGroup"].readIfPresent() + value.sourceAccountId = try reader["SourceAccountId"].readIfPresent() + value.copyTimestamp = try reader["CopyTimestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -44950,16 +32541,14 @@ extension RDSClientTypes { } extension OptionGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OptionGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -44987,23 +32576,7 @@ public struct OptionGroupAlreadyExistsFault: ClientRuntime.ModeledError, AWSClie } } -struct OptionGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension OptionGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.OptionGroupMembership: Swift.Codable { +extension RDSClientTypes.OptionGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case optionGroupName = "OptionGroupName" case status = "Status" @@ -45019,12 +32592,14 @@ extension RDSClientTypes.OptionGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.OptionGroupMembership() + value.optionGroupName = try reader["OptionGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -45049,16 +32624,14 @@ extension RDSClientTypes { } extension OptionGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OptionGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -45086,23 +32659,7 @@ public struct OptionGroupNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct OptionGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension OptionGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.OptionGroupOption: Swift.Codable { +extension RDSClientTypes.OptionGroupOption: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case copyableCrossAccount = "CopyableCrossAccount" case defaultPort = "DefaultPort" @@ -45214,110 +32771,29 @@ extension RDSClientTypes.OptionGroupOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let engineNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineName) - engineName = engineNameDecoded - let majorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .majorEngineVersion) - majorEngineVersion = majorEngineVersionDecoded - let minimumRequiredMinorEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumRequiredMinorEngineVersion) - minimumRequiredMinorEngineVersion = minimumRequiredMinorEngineVersionDecoded - let portRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .portRequired) - portRequired = portRequiredDecoded - let defaultPortDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .defaultPort) - defaultPort = defaultPortDecoded - if containerValues.contains(.optionsDependedOn) { - struct KeyVal0{struct OptionName{}} - let optionsDependedOnWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionsDependedOn) - if let optionsDependedOnWrappedContainer = optionsDependedOnWrappedContainer { - let optionsDependedOnContainer = try optionsDependedOnWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var optionsDependedOnBuffer:[Swift.String]? = nil - if let optionsDependedOnContainer = optionsDependedOnContainer { - optionsDependedOnBuffer = [Swift.String]() - for stringContainer0 in optionsDependedOnContainer { - optionsDependedOnBuffer?.append(stringContainer0) - } - } - optionsDependedOn = optionsDependedOnBuffer - } else { - optionsDependedOn = [] - } - } else { - optionsDependedOn = nil - } - if containerValues.contains(.optionsConflictsWith) { - struct KeyVal0{struct OptionConflictName{}} - let optionsConflictsWithWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionsConflictsWith) - if let optionsConflictsWithWrappedContainer = optionsConflictsWithWrappedContainer { - let optionsConflictsWithContainer = try optionsConflictsWithWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var optionsConflictsWithBuffer:[Swift.String]? = nil - if let optionsConflictsWithContainer = optionsConflictsWithContainer { - optionsConflictsWithBuffer = [Swift.String]() - for stringContainer0 in optionsConflictsWithContainer { - optionsConflictsWithBuffer?.append(stringContainer0) - } - } - optionsConflictsWith = optionsConflictsWithBuffer - } else { - optionsConflictsWith = [] - } - } else { - optionsConflictsWith = nil - } - let persistentDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .persistent) - persistent = persistentDecoded - let permanentDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .permanent) - permanent = permanentDecoded - let requiresAutoMinorEngineVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requiresAutoMinorEngineVersionUpgrade) - requiresAutoMinorEngineVersionUpgrade = requiresAutoMinorEngineVersionUpgradeDecoded - let vpcOnlyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .vpcOnly) - vpcOnly = vpcOnlyDecoded - let supportsOptionVersionDowngradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsOptionVersionDowngrade) - supportsOptionVersionDowngrade = supportsOptionVersionDowngradeDecoded - if containerValues.contains(.optionGroupOptionSettings) { - struct KeyVal0{struct OptionGroupOptionSetting{}} - let optionGroupOptionSettingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionGroupOptionSettings) - if let optionGroupOptionSettingsWrappedContainer = optionGroupOptionSettingsWrappedContainer { - let optionGroupOptionSettingsContainer = try optionGroupOptionSettingsWrappedContainer.decodeIfPresent([RDSClientTypes.OptionGroupOptionSetting].self, forKey: .member) - var optionGroupOptionSettingsBuffer:[RDSClientTypes.OptionGroupOptionSetting]? = nil - if let optionGroupOptionSettingsContainer = optionGroupOptionSettingsContainer { - optionGroupOptionSettingsBuffer = [RDSClientTypes.OptionGroupOptionSetting]() - for structureContainer0 in optionGroupOptionSettingsContainer { - optionGroupOptionSettingsBuffer?.append(structureContainer0) - } - } - optionGroupOptionSettings = optionGroupOptionSettingsBuffer - } else { - optionGroupOptionSettings = [] - } - } else { - optionGroupOptionSettings = nil - } - if containerValues.contains(.optionGroupOptionVersions) { - struct KeyVal0{struct OptionVersion{}} - let optionGroupOptionVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionGroupOptionVersions) - if let optionGroupOptionVersionsWrappedContainer = optionGroupOptionVersionsWrappedContainer { - let optionGroupOptionVersionsContainer = try optionGroupOptionVersionsWrappedContainer.decodeIfPresent([RDSClientTypes.OptionVersion].self, forKey: .member) - var optionGroupOptionVersionsBuffer:[RDSClientTypes.OptionVersion]? = nil - if let optionGroupOptionVersionsContainer = optionGroupOptionVersionsContainer { - optionGroupOptionVersionsBuffer = [RDSClientTypes.OptionVersion]() - for structureContainer0 in optionGroupOptionVersionsContainer { - optionGroupOptionVersionsBuffer?.append(structureContainer0) - } - } - optionGroupOptionVersions = optionGroupOptionVersionsBuffer - } else { - optionGroupOptionVersions = [] - } - } else { - optionGroupOptionVersions = nil - } - let copyableCrossAccountDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyableCrossAccount) - copyableCrossAccount = copyableCrossAccountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.OptionGroupOption() + value.name = try reader["Name"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.engineName = try reader["EngineName"].readIfPresent() + value.majorEngineVersion = try reader["MajorEngineVersion"].readIfPresent() + value.minimumRequiredMinorEngineVersion = try reader["MinimumRequiredMinorEngineVersion"].readIfPresent() + value.portRequired = try reader["PortRequired"].readIfPresent() + value.defaultPort = try reader["DefaultPort"].readIfPresent() + value.optionsDependedOn = try reader["OptionsDependedOn"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "OptionName", isFlattened: false) + value.optionsConflictsWith = try reader["OptionsConflictsWith"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "OptionConflictName", isFlattened: false) + value.persistent = try reader["Persistent"].readIfPresent() + value.permanent = try reader["Permanent"].readIfPresent() + value.requiresAutoMinorEngineVersionUpgrade = try reader["RequiresAutoMinorEngineVersionUpgrade"].readIfPresent() + value.vpcOnly = try reader["VpcOnly"].readIfPresent() + value.supportsOptionVersionDowngrade = try reader["SupportsOptionVersionDowngrade"].readIfPresent() + value.optionGroupOptionSettings = try reader["OptionGroupOptionSettings"].readListIfPresent(memberReadingClosure: RDSClientTypes.OptionGroupOptionSetting.readingClosure, memberNodeInfo: "OptionGroupOptionSetting", isFlattened: false) + value.optionGroupOptionVersions = try reader["OptionGroupOptionVersions"].readListIfPresent(memberReadingClosure: RDSClientTypes.OptionVersion.readingClosure, memberNodeInfo: "OptionVersion", isFlattened: false) + value.copyableCrossAccount = try reader["CopyableCrossAccount"].readIfPresent() + return value + } } } @@ -45401,7 +32877,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.OptionGroupOptionSetting: Swift.Codable { +extension RDSClientTypes.OptionGroupOptionSetting: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case applyType = "ApplyType" @@ -45450,40 +32926,19 @@ extension RDSClientTypes.OptionGroupOptionSetting: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let settingNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .settingName) - settingName = settingNameDecoded - let settingDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .settingDescription) - settingDescription = settingDescriptionDecoded - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let applyTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyType) - applyType = applyTypeDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded - let isModifiableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isModifiable) - isModifiable = isModifiableDecoded - let isRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isRequired) - isRequired = isRequiredDecoded - if containerValues.contains(.minimumEngineVersionPerAllowedValue) { - struct KeyVal0{struct MinimumEngineVersionPerAllowedValue{}} - let minimumEngineVersionPerAllowedValueWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .minimumEngineVersionPerAllowedValue) - if let minimumEngineVersionPerAllowedValueWrappedContainer = minimumEngineVersionPerAllowedValueWrappedContainer { - let minimumEngineVersionPerAllowedValueContainer = try minimumEngineVersionPerAllowedValueWrappedContainer.decodeIfPresent([RDSClientTypes.MinimumEngineVersionPerAllowedValue].self, forKey: .member) - var minimumEngineVersionPerAllowedValueBuffer:[RDSClientTypes.MinimumEngineVersionPerAllowedValue]? = nil - if let minimumEngineVersionPerAllowedValueContainer = minimumEngineVersionPerAllowedValueContainer { - minimumEngineVersionPerAllowedValueBuffer = [RDSClientTypes.MinimumEngineVersionPerAllowedValue]() - for structureContainer0 in minimumEngineVersionPerAllowedValueContainer { - minimumEngineVersionPerAllowedValueBuffer?.append(structureContainer0) - } - } - minimumEngineVersionPerAllowedValue = minimumEngineVersionPerAllowedValueBuffer - } else { - minimumEngineVersionPerAllowedValue = [] - } - } else { - minimumEngineVersionPerAllowedValue = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.OptionGroupOptionSetting() + value.settingName = try reader["SettingName"].readIfPresent() + value.settingDescription = try reader["SettingDescription"].readIfPresent() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.applyType = try reader["ApplyType"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + value.isModifiable = try reader["IsModifiable"].readIfPresent() + value.isRequired = try reader["IsRequired"].readIfPresent() + value.minimumEngineVersionPerAllowedValue = try reader["MinimumEngineVersionPerAllowedValue"].readListIfPresent(memberReadingClosure: RDSClientTypes.MinimumEngineVersionPerAllowedValue.readingClosure, memberNodeInfo: "MinimumEngineVersionPerAllowedValue", isFlattened: false) + return value } } } @@ -45533,16 +32988,14 @@ extension RDSClientTypes { } extension OptionGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OptionGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -45570,23 +33023,7 @@ public struct OptionGroupQuotaExceededFault: ClientRuntime.ModeledError, AWSClie } } -struct OptionGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension OptionGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.OptionSetting: Swift.Codable { +extension RDSClientTypes.OptionSetting: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case applyType = "ApplyType" @@ -45630,26 +33067,21 @@ extension RDSClientTypes.OptionSetting: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let defaultValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultValue) - defaultValue = defaultValueDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let applyTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyType) - applyType = applyTypeDecoded - let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) - dataType = dataTypeDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded - let isModifiableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isModifiable) - isModifiable = isModifiableDecoded - let isCollectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isCollection) - isCollection = isCollectionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.OptionSetting() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + value.defaultValue = try reader["DefaultValue"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.applyType = try reader["ApplyType"].readIfPresent() + value.dataType = try reader["DataType"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + value.isModifiable = try reader["IsModifiable"].readIfPresent() + value.isCollection = try reader["IsCollection"].readIfPresent() + return value + } } } @@ -45701,7 +33133,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.OptionVersion: Swift.Codable { +extension RDSClientTypes.OptionVersion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case isDefault = "IsDefault" case version = "Version" @@ -45717,12 +33149,14 @@ extension RDSClientTypes.OptionVersion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let versionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .version) - version = versionDecoded - let isDefaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isDefault) - isDefault = isDefaultDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.OptionVersion() + value.version = try reader["Version"].readIfPresent() + value.isDefault = try reader["IsDefault"].readIfPresent() + return value + } } } @@ -45746,7 +33180,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.OrderableDBInstanceOption: Swift.Codable { +extension RDSClientTypes.OrderableDBInstanceOption: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZoneGroup = "AvailabilityZoneGroup" case availabilityZones = "AvailabilityZones" @@ -45943,165 +33377,48 @@ extension RDSClientTypes.OrderableDBInstanceOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let availabilityZoneGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneGroup) - availabilityZoneGroup = availabilityZoneGroupDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([RDSClientTypes.AvailabilityZone].self, forKey: .member) - var availabilityZonesBuffer:[RDSClientTypes.AvailabilityZone]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [RDSClientTypes.AvailabilityZone]() - for structureContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(structureContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let multiAZCapableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZCapable) - multiAZCapable = multiAZCapableDecoded - let readReplicaCapableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .readReplicaCapable) - readReplicaCapable = readReplicaCapableDecoded - let vpcDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .vpc) - vpc = vpcDecoded - let supportsStorageEncryptionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsStorageEncryption) - supportsStorageEncryption = supportsStorageEncryptionDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let supportsIopsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIops) - supportsIops = supportsIopsDecoded - let supportsEnhancedMonitoringDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsEnhancedMonitoring) - supportsEnhancedMonitoring = supportsEnhancedMonitoringDecoded - let supportsIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIAMDatabaseAuthentication) - supportsIAMDatabaseAuthentication = supportsIAMDatabaseAuthenticationDecoded - let supportsPerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsPerformanceInsights) - supportsPerformanceInsights = supportsPerformanceInsightsDecoded - let minStorageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minStorageSize) - minStorageSize = minStorageSizeDecoded - let maxStorageSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxStorageSize) - maxStorageSize = maxStorageSizeDecoded - let minIopsPerDbInstanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minIopsPerDbInstance) - minIopsPerDbInstance = minIopsPerDbInstanceDecoded - let maxIopsPerDbInstanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxIopsPerDbInstance) - maxIopsPerDbInstance = maxIopsPerDbInstanceDecoded - let minIopsPerGibDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minIopsPerGib) - minIopsPerGib = minIopsPerGibDecoded - let maxIopsPerGibDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxIopsPerGib) - maxIopsPerGib = maxIopsPerGibDecoded - if containerValues.contains(.availableProcessorFeatures) { - struct KeyVal0{struct AvailableProcessorFeature{}} - let availableProcessorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availableProcessorFeatures) - if let availableProcessorFeaturesWrappedContainer = availableProcessorFeaturesWrappedContainer { - let availableProcessorFeaturesContainer = try availableProcessorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.AvailableProcessorFeature].self, forKey: .member) - var availableProcessorFeaturesBuffer:[RDSClientTypes.AvailableProcessorFeature]? = nil - if let availableProcessorFeaturesContainer = availableProcessorFeaturesContainer { - availableProcessorFeaturesBuffer = [RDSClientTypes.AvailableProcessorFeature]() - for structureContainer0 in availableProcessorFeaturesContainer { - availableProcessorFeaturesBuffer?.append(structureContainer0) - } - } - availableProcessorFeatures = availableProcessorFeaturesBuffer - } else { - availableProcessorFeatures = [] - } - } else { - availableProcessorFeatures = nil - } - if containerValues.contains(.supportedEngineModes) { - struct KeyVal0{struct member{}} - let supportedEngineModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedEngineModes) - if let supportedEngineModesWrappedContainer = supportedEngineModesWrappedContainer { - let supportedEngineModesContainer = try supportedEngineModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedEngineModesBuffer:[Swift.String]? = nil - if let supportedEngineModesContainer = supportedEngineModesContainer { - supportedEngineModesBuffer = [Swift.String]() - for stringContainer0 in supportedEngineModesContainer { - supportedEngineModesBuffer?.append(stringContainer0) - } - } - supportedEngineModes = supportedEngineModesBuffer - } else { - supportedEngineModes = [] - } - } else { - supportedEngineModes = nil - } - let supportsStorageAutoscalingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsStorageAutoscaling) - supportsStorageAutoscaling = supportsStorageAutoscalingDecoded - let supportsKerberosAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsKerberosAuthentication) - supportsKerberosAuthentication = supportsKerberosAuthenticationDecoded - let outpostCapableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .outpostCapable) - outpostCapable = outpostCapableDecoded - if containerValues.contains(.supportedActivityStreamModes) { - struct KeyVal0{struct member{}} - let supportedActivityStreamModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedActivityStreamModes) - if let supportedActivityStreamModesWrappedContainer = supportedActivityStreamModesWrappedContainer { - let supportedActivityStreamModesContainer = try supportedActivityStreamModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedActivityStreamModesBuffer:[Swift.String]? = nil - if let supportedActivityStreamModesContainer = supportedActivityStreamModesContainer { - supportedActivityStreamModesBuffer = [Swift.String]() - for stringContainer0 in supportedActivityStreamModesContainer { - supportedActivityStreamModesBuffer?.append(stringContainer0) - } - } - supportedActivityStreamModes = supportedActivityStreamModesBuffer - } else { - supportedActivityStreamModes = [] - } - } else { - supportedActivityStreamModes = nil - } - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded - let supportsClustersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsClusters) - supportsClusters = supportsClustersDecoded - if containerValues.contains(.supportedNetworkTypes) { - struct KeyVal0{struct member{}} - let supportedNetworkTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedNetworkTypes) - if let supportedNetworkTypesWrappedContainer = supportedNetworkTypesWrappedContainer { - let supportedNetworkTypesContainer = try supportedNetworkTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedNetworkTypesBuffer:[Swift.String]? = nil - if let supportedNetworkTypesContainer = supportedNetworkTypesContainer { - supportedNetworkTypesBuffer = [Swift.String]() - for stringContainer0 in supportedNetworkTypesContainer { - supportedNetworkTypesBuffer?.append(stringContainer0) - } - } - supportedNetworkTypes = supportedNetworkTypesBuffer - } else { - supportedNetworkTypes = [] - } - } else { - supportedNetworkTypes = nil - } - let supportsStorageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsStorageThroughput) - supportsStorageThroughput = supportsStorageThroughputDecoded - let minStorageThroughputPerDbInstanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minStorageThroughputPerDbInstance) - minStorageThroughputPerDbInstance = minStorageThroughputPerDbInstanceDecoded - let maxStorageThroughputPerDbInstanceDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxStorageThroughputPerDbInstance) - maxStorageThroughputPerDbInstance = maxStorageThroughputPerDbInstanceDecoded - let minStorageThroughputPerIopsDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minStorageThroughputPerIops) - minStorageThroughputPerIops = minStorageThroughputPerIopsDecoded - let maxStorageThroughputPerIopsDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxStorageThroughputPerIops) - maxStorageThroughputPerIops = maxStorageThroughputPerIopsDecoded - let supportsDedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsDedicatedLogVolume) - supportsDedicatedLogVolume = supportsDedicatedLogVolumeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.OrderableDBInstanceOption() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.availabilityZoneGroup = try reader["AvailabilityZoneGroup"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: RDSClientTypes.AvailabilityZone.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + value.multiAZCapable = try reader["MultiAZCapable"].readIfPresent() + value.readReplicaCapable = try reader["ReadReplicaCapable"].readIfPresent() + value.vpc = try reader["Vpc"].readIfPresent() + value.supportsStorageEncryption = try reader["SupportsStorageEncryption"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.supportsIops = try reader["SupportsIops"].readIfPresent() + value.supportsEnhancedMonitoring = try reader["SupportsEnhancedMonitoring"].readIfPresent() + value.supportsIAMDatabaseAuthentication = try reader["SupportsIAMDatabaseAuthentication"].readIfPresent() + value.supportsPerformanceInsights = try reader["SupportsPerformanceInsights"].readIfPresent() + value.minStorageSize = try reader["MinStorageSize"].readIfPresent() + value.maxStorageSize = try reader["MaxStorageSize"].readIfPresent() + value.minIopsPerDbInstance = try reader["MinIopsPerDbInstance"].readIfPresent() + value.maxIopsPerDbInstance = try reader["MaxIopsPerDbInstance"].readIfPresent() + value.minIopsPerGib = try reader["MinIopsPerGib"].readIfPresent() + value.maxIopsPerGib = try reader["MaxIopsPerGib"].readIfPresent() + value.availableProcessorFeatures = try reader["AvailableProcessorFeatures"].readListIfPresent(memberReadingClosure: RDSClientTypes.AvailableProcessorFeature.readingClosure, memberNodeInfo: "AvailableProcessorFeature", isFlattened: false) + value.supportedEngineModes = try reader["SupportedEngineModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsStorageAutoscaling = try reader["SupportsStorageAutoscaling"].readIfPresent() + value.supportsKerberosAuthentication = try reader["SupportsKerberosAuthentication"].readIfPresent() + value.outpostCapable = try reader["OutpostCapable"].readIfPresent() + value.supportedActivityStreamModes = try reader["SupportedActivityStreamModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + value.supportsClusters = try reader["SupportsClusters"].readIfPresent() + value.supportedNetworkTypes = try reader["SupportedNetworkTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsStorageThroughput = try reader["SupportsStorageThroughput"].readIfPresent() + value.minStorageThroughputPerDbInstance = try reader["MinStorageThroughputPerDbInstance"].readIfPresent() + value.maxStorageThroughputPerDbInstance = try reader["MaxStorageThroughputPerDbInstance"].readIfPresent() + value.minStorageThroughputPerIops = try reader["MinStorageThroughputPerIops"].readIfPresent() + value.maxStorageThroughputPerIops = try reader["MaxStorageThroughputPerIops"].readIfPresent() + value.supportsDedicatedLogVolume = try reader["SupportsDedicatedLogVolume"].readIfPresent() + return value + } } } @@ -46261,7 +33578,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.Outpost: Swift.Codable { +extension RDSClientTypes.Outpost: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" } @@ -46273,10 +33590,13 @@ extension RDSClientTypes.Outpost: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Outpost() + value.arn = try reader["Arn"].readIfPresent() + return value + } } } @@ -46296,7 +33616,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.Parameter: Swift.Codable { +extension RDSClientTypes.Parameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case applyMethod = "ApplyMethod" @@ -46357,46 +33677,22 @@ extension RDSClientTypes.Parameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterName) - parameterName = parameterNameDecoded - let parameterValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterValue) - parameterValue = parameterValueDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let applyTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyType) - applyType = applyTypeDecoded - let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) - dataType = dataTypeDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded - let isModifiableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isModifiable) - isModifiable = isModifiableDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded - let applyMethodDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ApplyMethod.self, forKey: .applyMethod) - applyMethod = applyMethodDecoded - if containerValues.contains(.supportedEngineModes) { - struct KeyVal0{struct member{}} - let supportedEngineModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedEngineModes) - if let supportedEngineModesWrappedContainer = supportedEngineModesWrappedContainer { - let supportedEngineModesContainer = try supportedEngineModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedEngineModesBuffer:[Swift.String]? = nil - if let supportedEngineModesContainer = supportedEngineModesContainer { - supportedEngineModesBuffer = [Swift.String]() - for stringContainer0 in supportedEngineModesContainer { - supportedEngineModesBuffer?.append(stringContainer0) - } - } - supportedEngineModes = supportedEngineModesBuffer - } else { - supportedEngineModes = [] - } - } else { - supportedEngineModes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Parameter() + value.parameterName = try reader["ParameterName"].readIfPresent() + value.parameterValue = try reader["ParameterValue"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.applyType = try reader["ApplyType"].readIfPresent() + value.dataType = try reader["DataType"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + value.isModifiable = try reader["IsModifiable"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + value.applyMethod = try reader["ApplyMethod"].readIfPresent() + value.supportedEngineModes = try reader["SupportedEngineModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -46457,7 +33753,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.PendingCloudwatchLogsExports: Swift.Codable { +extension RDSClientTypes.PendingCloudwatchLogsExports: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case logTypesToDisable = "LogTypesToDisable" case logTypesToEnable = "LogTypesToEnable" @@ -46491,45 +33787,13 @@ extension RDSClientTypes.PendingCloudwatchLogsExports: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.logTypesToEnable) { - struct KeyVal0{struct member{}} - let logTypesToEnableWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logTypesToEnable) - if let logTypesToEnableWrappedContainer = logTypesToEnableWrappedContainer { - let logTypesToEnableContainer = try logTypesToEnableWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logTypesToEnableBuffer:[Swift.String]? = nil - if let logTypesToEnableContainer = logTypesToEnableContainer { - logTypesToEnableBuffer = [Swift.String]() - for stringContainer0 in logTypesToEnableContainer { - logTypesToEnableBuffer?.append(stringContainer0) - } - } - logTypesToEnable = logTypesToEnableBuffer - } else { - logTypesToEnable = [] - } - } else { - logTypesToEnable = nil - } - if containerValues.contains(.logTypesToDisable) { - struct KeyVal0{struct member{}} - let logTypesToDisableWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logTypesToDisable) - if let logTypesToDisableWrappedContainer = logTypesToDisableWrappedContainer { - let logTypesToDisableContainer = try logTypesToDisableWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logTypesToDisableBuffer:[Swift.String]? = nil - if let logTypesToDisableContainer = logTypesToDisableContainer { - logTypesToDisableBuffer = [Swift.String]() - for stringContainer0 in logTypesToDisableContainer { - logTypesToDisableBuffer?.append(stringContainer0) - } - } - logTypesToDisable = logTypesToDisableBuffer - } else { - logTypesToDisable = [] - } - } else { - logTypesToDisable = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.PendingCloudwatchLogsExports() + value.logTypesToEnable = try reader["LogTypesToEnable"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.logTypesToDisable = try reader["LogTypesToDisable"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -46554,7 +33818,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.PendingMaintenanceAction: Swift.Codable { +extension RDSClientTypes.PendingMaintenanceAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case action = "Action" case autoAppliedAfterDate = "AutoAppliedAfterDate" @@ -46586,20 +33850,18 @@ extension RDSClientTypes.PendingMaintenanceAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .action) - action = actionDecoded - let autoAppliedAfterDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .autoAppliedAfterDate) - autoAppliedAfterDate = autoAppliedAfterDateDecoded - let forcedApplyDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .forcedApplyDate) - forcedApplyDate = forcedApplyDateDecoded - let optInStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optInStatus) - optInStatus = optInStatusDecoded - let currentApplyDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .currentApplyDate) - currentApplyDate = currentApplyDateDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.PendingMaintenanceAction() + value.action = try reader["Action"].readIfPresent() + value.autoAppliedAfterDate = try reader["AutoAppliedAfterDate"].readTimestampIfPresent(format: .dateTime) + value.forcedApplyDate = try reader["ForcedApplyDate"].readTimestampIfPresent(format: .dateTime) + value.optInStatus = try reader["OptInStatus"].readIfPresent() + value.currentApplyDate = try reader["CurrentApplyDate"].readTimestampIfPresent(format: .dateTime) + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -46639,7 +33901,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.PendingModifiedValues: Swift.Codable { +extension RDSClientTypes.PendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case automationMode = "AutomationMode" @@ -46744,69 +34006,34 @@ extension RDSClientTypes.PendingModifiedValues: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let caCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .caCertificateIdentifier) - caCertificateIdentifier = caCertificateIdentifierDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let pendingCloudwatchLogsExportsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.PendingCloudwatchLogsExports.self, forKey: .pendingCloudwatchLogsExports) - pendingCloudwatchLogsExports = pendingCloudwatchLogsExportsDecoded - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let iamDatabaseAuthenticationEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .iamDatabaseAuthenticationEnabled) - iamDatabaseAuthenticationEnabled = iamDatabaseAuthenticationEnabledDecoded - let automationModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.AutomationMode.self, forKey: .automationMode) - automationMode = automationModeDecoded - let resumeFullAutomationModeTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .resumeFullAutomationModeTime) - resumeFullAutomationModeTime = resumeFullAutomationModeTimeDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - let multiTenantDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiTenant) - multiTenant = multiTenantDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.PendingModifiedValues() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.allocatedStorage = try reader["AllocatedStorage"].readIfPresent() + value.masterUserPassword = try reader["MasterUserPassword"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.backupRetentionPeriod = try reader["BackupRetentionPeriod"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.licenseModel = try reader["LicenseModel"].readIfPresent() + value.iops = try reader["Iops"].readIfPresent() + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.storageType = try reader["StorageType"].readIfPresent() + value.caCertificateIdentifier = try reader["CACertificateIdentifier"].readIfPresent() + value.dbSubnetGroupName = try reader["DBSubnetGroupName"].readIfPresent() + value.pendingCloudwatchLogsExports = try reader["PendingCloudwatchLogsExports"].readIfPresent(readingClosure: RDSClientTypes.PendingCloudwatchLogsExports.readingClosure) + value.processorFeatures = try reader["ProcessorFeatures"].readListIfPresent(memberReadingClosure: RDSClientTypes.ProcessorFeature.readingClosure, memberNodeInfo: "ProcessorFeature", isFlattened: false) + value.iamDatabaseAuthenticationEnabled = try reader["IAMDatabaseAuthenticationEnabled"].readIfPresent() + value.automationMode = try reader["AutomationMode"].readIfPresent() + value.resumeFullAutomationModeTime = try reader["ResumeFullAutomationModeTime"].readTimestampIfPresent(format: .dateTime) + value.storageThroughput = try reader["StorageThroughput"].readIfPresent() + value.engine = try reader["Engine"].readIfPresent() + value.dedicatedLogVolume = try reader["DedicatedLogVolume"].readIfPresent() + value.multiTenant = try reader["MultiTenant"].readIfPresent() + return value + } } } @@ -46910,7 +34137,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.PerformanceInsightsMetricDimensionGroup: Swift.Codable { +extension RDSClientTypes.PerformanceInsightsMetricDimensionGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dimensions = "Dimensions" case group = "Group" @@ -46939,31 +34166,15 @@ extension RDSClientTypes.PerformanceInsightsMetricDimensionGroup: Swift.Codable } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dimensions) { - struct KeyVal0{struct member{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dimensionsBuffer:[Swift.String]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [Swift.String]() - for stringContainer0 in dimensionsContainer { - dimensionsBuffer?.append(stringContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.PerformanceInsightsMetricDimensionGroup() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.group = try reader["Group"].readIfPresent() + value.limit = try reader["Limit"].readIfPresent() + return value } - let groupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .group) - group = groupDecoded - let limitDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .limit) - limit = limitDecoded } } @@ -47002,7 +34213,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.PerformanceInsightsMetricQuery: Swift.Codable { +extension RDSClientTypes.PerformanceInsightsMetricQuery: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case groupBy = "GroupBy" case metric = "Metric" @@ -47018,12 +34229,14 @@ extension RDSClientTypes.PerformanceInsightsMetricQuery: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let groupByDecoded = try containerValues.decodeIfPresent(RDSClientTypes.PerformanceInsightsMetricDimensionGroup.self, forKey: .groupBy) - groupBy = groupByDecoded - let metricDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metric) - metric = metricDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.PerformanceInsightsMetricQuery() + value.groupBy = try reader["GroupBy"].readIfPresent(readingClosure: RDSClientTypes.PerformanceInsightsMetricDimensionGroup.readingClosure) + value.metric = try reader["Metric"].readIfPresent() + return value + } } } @@ -47058,7 +34271,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.PerformanceIssueDetails: Swift.Codable { +extension RDSClientTypes.PerformanceIssueDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case analysis = "Analysis" case endTime = "EndTime" @@ -47091,33 +34304,16 @@ extension RDSClientTypes.PerformanceIssueDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - if containerValues.contains(.metrics) { - struct KeyVal0{struct member{}} - let metricsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .metrics) - if let metricsWrappedContainer = metricsWrappedContainer { - let metricsContainer = try metricsWrappedContainer.decodeIfPresent([RDSClientTypes.Metric].self, forKey: .member) - var metricsBuffer:[RDSClientTypes.Metric]? = nil - if let metricsContainer = metricsContainer { - metricsBuffer = [RDSClientTypes.Metric]() - for structureContainer0 in metricsContainer { - metricsBuffer?.append(structureContainer0) - } - } - metrics = metricsBuffer - } else { - metrics = [] - } - } else { - metrics = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.PerformanceIssueDetails() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + value.metrics = try reader["Metrics"].readListIfPresent(memberReadingClosure: RDSClientTypes.Metric.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.analysis = try reader["Analysis"].readIfPresent() + return value } - let analysisDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .analysis) - analysis = analysisDecoded } } @@ -47150,16 +34346,14 @@ extension RDSClientTypes { } extension PointInTimeRestoreNotEnabledFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PointInTimeRestoreNotEnabledFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -47187,23 +34381,7 @@ public struct PointInTimeRestoreNotEnabledFault: ClientRuntime.ModeledError, AWS } } -struct PointInTimeRestoreNotEnabledFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension PointInTimeRestoreNotEnabledFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.ProcessorFeature: Swift.Codable { +extension RDSClientTypes.ProcessorFeature: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case value = "Value" @@ -47219,12 +34397,14 @@ extension RDSClientTypes.ProcessorFeature: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ProcessorFeature() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -47280,6 +34460,10 @@ extension RDSClientTypes { } extension PromoteReadReplicaDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -47316,30 +34500,15 @@ public struct PromoteReadReplicaDBClusterInput: Swift.Equatable { } } -struct PromoteReadReplicaDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} - -extension PromoteReadReplicaDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } +extension PromoteReadReplicaDBClusterOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} - -extension PromoteReadReplicaDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PromoteReadReplicaDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PromoteReadReplicaDBClusterResult"] + var value = PromoteReadReplicaDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -47356,35 +34525,31 @@ public struct PromoteReadReplicaDBClusterOutput: Swift.Equatable { } } -struct PromoteReadReplicaDBClusterOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension PromoteReadReplicaDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } +enum PromoteReadReplicaDBClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PromoteReadReplicaDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum PromoteReadReplicaDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PromoteReadReplicaInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case backupRetentionPeriod = "BackupRetentionPeriod" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case preferredBackupWindow = "PreferredBackupWindow" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let backupRetentionPeriod = backupRetentionPeriod { @@ -47447,38 +34612,15 @@ public struct PromoteReadReplicaInput: Swift.Equatable { } } -struct PromoteReadReplicaInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let backupRetentionPeriod: Swift.Int? - let preferredBackupWindow: Swift.String? -} +extension PromoteReadReplicaOutput { -extension PromoteReadReplicaInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case backupRetentionPeriod = "BackupRetentionPeriod" - case dbInstanceIdentifier = "DBInstanceIdentifier" - case preferredBackupWindow = "PreferredBackupWindow" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - } -} - -extension PromoteReadReplicaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PromoteReadReplicaOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PromoteReadReplicaResult"] + var value = PromoteReadReplicaOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -47495,45 +34637,33 @@ public struct PromoteReadReplicaOutput: Swift.Equatable { } } -struct PromoteReadReplicaOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension PromoteReadReplicaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PromoteReadReplicaResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum PromoteReadReplicaOutputError { -enum PromoteReadReplicaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ProvisionedIopsNotAvailableInAZFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ProvisionedIopsNotAvailableInAZFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -47561,23 +34691,14 @@ public struct ProvisionedIopsNotAvailableInAZFault: ClientRuntime.ModeledError, } } -struct ProvisionedIopsNotAvailableInAZFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ProvisionedIopsNotAvailableInAZFaultBody: Swift.Decodable { +extension PurchaseReservedDBInstancesOfferingInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dbInstanceCount = "DBInstanceCount" + case reservedDBInstanceId = "ReservedDBInstanceId" + case reservedDBInstancesOfferingId = "ReservedDBInstancesOfferingId" + case tags = "Tags" } -} -extension PurchaseReservedDBInstancesOfferingInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceCount = dbInstanceCount { @@ -47639,59 +34760,15 @@ public struct PurchaseReservedDBInstancesOfferingInput: Swift.Equatable { } } -struct PurchaseReservedDBInstancesOfferingInputBody: Swift.Equatable { - let reservedDBInstancesOfferingId: Swift.String? - let reservedDBInstanceId: Swift.String? - let dbInstanceCount: Swift.Int? - let tags: [RDSClientTypes.Tag]? -} +extension PurchaseReservedDBInstancesOfferingOutput { -extension PurchaseReservedDBInstancesOfferingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceCount = "DBInstanceCount" - case reservedDBInstanceId = "ReservedDBInstanceId" - case reservedDBInstancesOfferingId = "ReservedDBInstancesOfferingId" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedDBInstancesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstancesOfferingId) - reservedDBInstancesOfferingId = reservedDBInstancesOfferingIdDecoded - let reservedDBInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstanceId) - reservedDBInstanceId = reservedDBInstanceIdDecoded - let dbInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dbInstanceCount) - dbInstanceCount = dbInstanceCountDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension PurchaseReservedDBInstancesOfferingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PurchaseReservedDBInstancesOfferingOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedDBInstance = output.reservedDBInstance - } else { - self.reservedDBInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PurchaseReservedDBInstancesOfferingResult"] + var value = PurchaseReservedDBInstancesOfferingOutput() + value.reservedDBInstance = try reader["ReservedDBInstance"].readIfPresent(readingClosure: RDSClientTypes.ReservedDBInstance.readingClosure) + return value } } } @@ -47708,38 +34785,28 @@ public struct PurchaseReservedDBInstancesOfferingOutput: Swift.Equatable { } } -struct PurchaseReservedDBInstancesOfferingOutputBody: Swift.Equatable { - let reservedDBInstance: RDSClientTypes.ReservedDBInstance? -} +enum PurchaseReservedDBInstancesOfferingOutputError { -extension PurchaseReservedDBInstancesOfferingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedDBInstance = "ReservedDBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PurchaseReservedDBInstancesOfferingResult")) - let reservedDBInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ReservedDBInstance.self, forKey: .reservedDBInstance) - reservedDBInstance = reservedDBInstanceDecoded - } -} - -enum PurchaseReservedDBInstancesOfferingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ReservedDBInstanceAlreadyExists": return try await ReservedDBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedDBInstanceQuotaExceeded": return try await ReservedDBInstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedDBInstancesOfferingNotFound": return try await ReservedDBInstancesOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ReservedDBInstanceAlreadyExists": return try await ReservedDBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedDBInstanceQuotaExceeded": return try await ReservedDBInstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedDBInstancesOfferingNotFound": return try await ReservedDBInstancesOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } public enum RDSClientTypes {} -extension RDSClientTypes.Range: Swift.Codable { +extension RDSClientTypes.Range: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case from = "From" case step = "Step" @@ -47759,14 +34826,15 @@ extension RDSClientTypes.Range: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .from) - from = fromDecoded - let toDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .to) - to = toDecoded - let stepDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .step) - step = stepDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Range() + value.from = try reader["From"].readIfPresent() + value.to = try reader["To"].readIfPresent() + value.step = try reader["Step"].readIfPresent() + return value + } } } @@ -47794,7 +34862,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.RdsCustomClusterConfiguration: Swift.Codable { +extension RDSClientTypes.RdsCustomClusterConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case interconnectSubnetId = "InterconnectSubnetId" case replicaMode = "ReplicaMode" @@ -47814,14 +34882,15 @@ extension RDSClientTypes.RdsCustomClusterConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let interconnectSubnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .interconnectSubnetId) - interconnectSubnetId = interconnectSubnetIdDecoded - let transitGatewayMulticastDomainIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .transitGatewayMulticastDomainId) - transitGatewayMulticastDomainId = transitGatewayMulticastDomainIdDecoded - let replicaModeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ReplicaMode.self, forKey: .replicaMode) - replicaMode = replicaModeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.RdsCustomClusterConfiguration() + value.interconnectSubnetId = try reader["InterconnectSubnetId"].readIfPresent() + value.transitGatewayMulticastDomainId = try reader["TransitGatewayMulticastDomainId"].readIfPresent() + value.replicaMode = try reader["ReplicaMode"].readIfPresent() + return value + } } } @@ -47850,6 +34919,10 @@ extension RDSClientTypes { } extension RebootDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -47882,30 +34955,15 @@ public struct RebootDBClusterInput: Swift.Equatable { } } -struct RebootDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} +extension RebootDBClusterOutput { -extension RebootDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} - -extension RebootDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RebootDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RebootDBClusterResult"] + var value = RebootDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -47922,36 +34980,31 @@ public struct RebootDBClusterOutput: Swift.Equatable { } } -struct RebootDBClusterOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension RebootDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } +enum RebootDBClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RebootDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum RebootDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RebootDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case forceFailover = "ForceFailover" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -47992,34 +35045,15 @@ public struct RebootDBInstanceInput: Swift.Equatable { } } -struct RebootDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let forceFailover: Swift.Bool? -} +extension RebootDBInstanceOutput { -extension RebootDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case forceFailover = "ForceFailover" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let forceFailoverDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forceFailover) - forceFailover = forceFailoverDecoded - } -} - -extension RebootDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RebootDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RebootDBInstanceResult"] + var value = RebootDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -48036,35 +35070,25 @@ public struct RebootDBInstanceOutput: Swift.Equatable { } } -struct RebootDBInstanceOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} +enum RebootDBInstanceOutputError { -extension RebootDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RebootDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum RebootDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RDSClientTypes.RecommendedAction: Swift.Codable { +extension RDSClientTypes.RecommendedAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actionId = "ActionId" case applyModes = "ApplyModes" @@ -48135,76 +35159,20 @@ extension RDSClientTypes.RecommendedAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionId) - actionId = actionIdDecoded - let titleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .title) - title = titleDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let operationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operation) - operation = operationDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct member{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RDSClientTypes.RecommendedActionParameter].self, forKey: .member) - var parametersBuffer:[RDSClientTypes.RecommendedActionParameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RDSClientTypes.RecommendedActionParameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - if containerValues.contains(.applyModes) { - struct KeyVal0{struct member{}} - let applyModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .applyModes) - if let applyModesWrappedContainer = applyModesWrappedContainer { - let applyModesContainer = try applyModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var applyModesBuffer:[Swift.String]? = nil - if let applyModesContainer = applyModesContainer { - applyModesBuffer = [Swift.String]() - for stringContainer0 in applyModesContainer { - applyModesBuffer?.append(stringContainer0) - } - } - applyModes = applyModesBuffer - } else { - applyModes = [] - } - } else { - applyModes = nil - } - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let issueDetailsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.IssueDetails.self, forKey: .issueDetails) - issueDetails = issueDetailsDecoded - if containerValues.contains(.contextAttributes) { - struct KeyVal0{struct member{}} - let contextAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .contextAttributes) - if let contextAttributesWrappedContainer = contextAttributesWrappedContainer { - let contextAttributesContainer = try contextAttributesWrappedContainer.decodeIfPresent([RDSClientTypes.ContextAttribute].self, forKey: .member) - var contextAttributesBuffer:[RDSClientTypes.ContextAttribute]? = nil - if let contextAttributesContainer = contextAttributesContainer { - contextAttributesBuffer = [RDSClientTypes.ContextAttribute]() - for structureContainer0 in contextAttributesContainer { - contextAttributesBuffer?.append(structureContainer0) - } - } - contextAttributes = contextAttributesBuffer - } else { - contextAttributes = [] - } - } else { - contextAttributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.RecommendedAction() + value.actionId = try reader["ActionId"].readIfPresent() + value.title = try reader["Title"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.operation = try reader["Operation"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: RDSClientTypes.RecommendedActionParameter.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.applyModes = try reader["ApplyModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent() + value.issueDetails = try reader["IssueDetails"].readIfPresent(readingClosure: RDSClientTypes.IssueDetails.readingClosure) + value.contextAttributes = try reader["ContextAttributes"].readListIfPresent(memberReadingClosure: RDSClientTypes.ContextAttribute.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -48271,7 +35239,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.RecommendedActionParameter: Swift.Codable { +extension RDSClientTypes.RecommendedActionParameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -48287,12 +35255,14 @@ extension RDSClientTypes.RecommendedActionParameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.RecommendedActionParameter() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -48316,7 +35286,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.RecommendedActionUpdate: Swift.Codable { +extension RDSClientTypes.RecommendedActionUpdate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actionId = "ActionId" case status = "Status" @@ -48332,12 +35302,14 @@ extension RDSClientTypes.RecommendedActionUpdate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .actionId) - actionId = actionIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.RecommendedActionUpdate() + value.actionId = try reader["ActionId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -48367,7 +35339,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.RecurringCharge: Swift.Codable { +extension RDSClientTypes.RecurringCharge: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case recurringChargeAmount = "RecurringChargeAmount" case recurringChargeFrequency = "RecurringChargeFrequency" @@ -48383,12 +35355,14 @@ extension RDSClientTypes.RecurringCharge: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let recurringChargeAmountDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .recurringChargeAmount) - recurringChargeAmount = recurringChargeAmountDecoded - let recurringChargeFrequencyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recurringChargeFrequency) - recurringChargeFrequency = recurringChargeFrequencyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.RecurringCharge() + value.recurringChargeAmount = try reader["RecurringChargeAmount"].readIfPresent() + value.recurringChargeFrequency = try reader["RecurringChargeFrequency"].readIfPresent() + return value + } } } @@ -48412,7 +35386,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ReferenceDetails: Swift.Codable { +extension RDSClientTypes.ReferenceDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case scalarReferenceDetails = "ScalarReferenceDetails" } @@ -48424,10 +35398,13 @@ extension RDSClientTypes.ReferenceDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scalarReferenceDetailsDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ScalarReferenceDetails.self, forKey: .scalarReferenceDetails) - scalarReferenceDetails = scalarReferenceDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ReferenceDetails() + value.scalarReferenceDetails = try reader["ScalarReferenceDetails"].readIfPresent(readingClosure: RDSClientTypes.ScalarReferenceDetails.readingClosure) + return value + } } } @@ -48448,6 +35425,13 @@ extension RDSClientTypes { } extension RegisterDBProxyTargetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifiers = "DBClusterIdentifiers" + case dbInstanceIdentifiers = "DBInstanceIdentifiers" + case dbProxyName = "DBProxyName" + case targetGroupName = "TargetGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifiers = dbClusterIdentifiers { @@ -48517,76 +35501,15 @@ public struct RegisterDBProxyTargetsInput: Swift.Equatable { } } -struct RegisterDBProxyTargetsInputBody: Swift.Equatable { - let dbProxyName: Swift.String? - let targetGroupName: Swift.String? - let dbInstanceIdentifiers: [Swift.String]? - let dbClusterIdentifiers: [Swift.String]? -} +extension RegisterDBProxyTargetsOutput { -extension RegisterDBProxyTargetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifiers = "DBClusterIdentifiers" - case dbInstanceIdentifiers = "DBInstanceIdentifiers" - case dbProxyName = "DBProxyName" - case targetGroupName = "TargetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbProxyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbProxyName) - dbProxyName = dbProxyNameDecoded - let targetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetGroupName) - targetGroupName = targetGroupNameDecoded - if containerValues.contains(.dbInstanceIdentifiers) { - struct KeyVal0{struct member{}} - let dbInstanceIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbInstanceIdentifiers) - if let dbInstanceIdentifiersWrappedContainer = dbInstanceIdentifiersWrappedContainer { - let dbInstanceIdentifiersContainer = try dbInstanceIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbInstanceIdentifiersBuffer:[Swift.String]? = nil - if let dbInstanceIdentifiersContainer = dbInstanceIdentifiersContainer { - dbInstanceIdentifiersBuffer = [Swift.String]() - for stringContainer0 in dbInstanceIdentifiersContainer { - dbInstanceIdentifiersBuffer?.append(stringContainer0) - } - } - dbInstanceIdentifiers = dbInstanceIdentifiersBuffer - } else { - dbInstanceIdentifiers = [] - } - } else { - dbInstanceIdentifiers = nil - } - if containerValues.contains(.dbClusterIdentifiers) { - struct KeyVal0{struct member{}} - let dbClusterIdentifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbClusterIdentifiers) - if let dbClusterIdentifiersWrappedContainer = dbClusterIdentifiersWrappedContainer { - let dbClusterIdentifiersContainer = try dbClusterIdentifiersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbClusterIdentifiersBuffer:[Swift.String]? = nil - if let dbClusterIdentifiersContainer = dbClusterIdentifiersContainer { - dbClusterIdentifiersBuffer = [Swift.String]() - for stringContainer0 in dbClusterIdentifiersContainer { - dbClusterIdentifiersBuffer?.append(stringContainer0) - } - } - dbClusterIdentifiers = dbClusterIdentifiersBuffer - } else { - dbClusterIdentifiers = [] - } - } else { - dbClusterIdentifiers = nil - } - } -} - -extension RegisterDBProxyTargetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RegisterDBProxyTargetsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbProxyTargets = output.dbProxyTargets - } else { - self.dbProxyTargets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RegisterDBProxyTargetsResult"] + var value = RegisterDBProxyTargetsOutput() + value.dbProxyTargets = try reader["DBProxyTargets"].readListIfPresent(memberReadingClosure: RDSClientTypes.DBProxyTarget.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -48603,59 +35526,37 @@ public struct RegisterDBProxyTargetsOutput: Swift.Equatable { } } -struct RegisterDBProxyTargetsOutputBody: Swift.Equatable { - let dbProxyTargets: [RDSClientTypes.DBProxyTarget]? -} - -extension RegisterDBProxyTargetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbProxyTargets = "DBProxyTargets" - } +enum RegisterDBProxyTargetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RegisterDBProxyTargetsResult")) - if containerValues.contains(.dbProxyTargets) { - struct KeyVal0{struct member{}} - let dbProxyTargetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbProxyTargets) - if let dbProxyTargetsWrappedContainer = dbProxyTargetsWrappedContainer { - let dbProxyTargetsContainer = try dbProxyTargetsWrappedContainer.decodeIfPresent([RDSClientTypes.DBProxyTarget].self, forKey: .member) - var dbProxyTargetsBuffer:[RDSClientTypes.DBProxyTarget]? = nil - if let dbProxyTargetsContainer = dbProxyTargetsContainer { - dbProxyTargetsBuffer = [RDSClientTypes.DBProxyTarget]() - for structureContainer0 in dbProxyTargetsContainer { - dbProxyTargetsBuffer?.append(structureContainer0) - } - } - dbProxyTargets = dbProxyTargetsBuffer - } else { - dbProxyTargets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetAlreadyRegisteredFault": return try await DBProxyTargetAlreadyRegisteredFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientAvailableIPsInSubnetFault": return try await InsufficientAvailableIPsInSubnetFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dbProxyTargets = nil } } } -enum RegisterDBProxyTargetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetAlreadyRegisteredFault": return try await DBProxyTargetAlreadyRegisteredFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientAvailableIPsInSubnetFault": return try await InsufficientAvailableIPsInSubnetFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBProxyStateFault": return try await InvalidDBProxyStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension RemoveFromGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DbClusterIdentifier" + case globalClusterIdentifier = "GlobalClusterIdentifier" } -} -extension RemoveFromGlobalClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -48692,34 +35593,15 @@ public struct RemoveFromGlobalClusterInput: Swift.Equatable { } } -struct RemoveFromGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let dbClusterIdentifier: Swift.String? -} +extension RemoveFromGlobalClusterOutput { -extension RemoveFromGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DbClusterIdentifier" - case globalClusterIdentifier = "GlobalClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} - -extension RemoveFromGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RemoveFromGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RemoveFromGlobalClusterResult"] + var value = RemoveFromGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: RDSClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -48736,36 +35618,32 @@ public struct RemoveFromGlobalClusterOutput: Swift.Equatable { } } -struct RemoveFromGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: RDSClientTypes.GlobalCluster? -} - -extension RemoveFromGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } +enum RemoveFromGlobalClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RemoveFromGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} - -enum RemoveFromGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveRoleFromDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + case featureName = "FeatureName" + case roleArn = "RoleArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -48811,32 +35689,12 @@ public struct RemoveRoleFromDBClusterInput: Swift.Equatable { } } -struct RemoveRoleFromDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let roleArn: Swift.String? - let featureName: Swift.String? -} - -extension RemoveRoleFromDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - case featureName = "FeatureName" - case roleArn = "RoleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded - } -} +extension RemoveRoleFromDBClusterOutput { -extension RemoveRoleFromDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveRoleFromDBClusterOutput() + } } } @@ -48845,19 +35703,32 @@ public struct RemoveRoleFromDBClusterOutput: Swift.Equatable { public init() { } } -enum RemoveRoleFromDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterRoleNotFound": return try await DBClusterRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveRoleFromDBClusterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterRoleNotFound": return try await DBClusterRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveRoleFromDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case featureName = "FeatureName" + case roleArn = "RoleArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -48904,32 +35775,12 @@ public struct RemoveRoleFromDBInstanceInput: Swift.Equatable { } } -struct RemoveRoleFromDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let roleArn: Swift.String? - let featureName: Swift.String? -} - -extension RemoveRoleFromDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case featureName = "FeatureName" - case roleArn = "RoleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let featureNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .featureName) - featureName = featureNameDecoded - } -} +extension RemoveRoleFromDBInstanceOutput { -extension RemoveRoleFromDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveRoleFromDBInstanceOutput() + } } } @@ -48938,19 +35789,31 @@ public struct RemoveRoleFromDBInstanceOutput: Swift.Equatable { public init() { } } -enum RemoveRoleFromDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceRoleNotFound": return try await DBInstanceRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveRoleFromDBInstanceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceRoleNotFound": return try await DBInstanceRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveSourceIdentifierFromSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceIdentifier = "SourceIdentifier" + case subscriptionName = "SubscriptionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceIdentifier = sourceIdentifier { @@ -48990,34 +35853,15 @@ public struct RemoveSourceIdentifierFromSubscriptionInput: Swift.Equatable { } } -struct RemoveSourceIdentifierFromSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let sourceIdentifier: Swift.String? -} +extension RemoveSourceIdentifierFromSubscriptionOutput { -extension RemoveSourceIdentifierFromSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceIdentifier = "SourceIdentifier" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - } -} - -extension RemoveSourceIdentifierFromSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RemoveSourceIdentifierFromSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RemoveSourceIdentifierFromSubscriptionResult"] + var value = RemoveSourceIdentifierFromSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: RDSClientTypes.EventSubscription.readingClosure) + return value } } } @@ -49034,35 +35878,30 @@ public struct RemoveSourceIdentifierFromSubscriptionOutput: Swift.Equatable { } } -struct RemoveSourceIdentifierFromSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: RDSClientTypes.EventSubscription? -} - -extension RemoveSourceIdentifierFromSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RemoveSourceIdentifierFromSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(RDSClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum RemoveSourceIdentifierFromSubscriptionOutputError { -enum RemoveSourceIdentifierFromSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemoveTagsFromResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -49111,67 +35950,41 @@ public struct RemoveTagsFromResourceInput: Swift.Equatable { } } -struct RemoveTagsFromResourceInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tagKeys: [Swift.String]? -} +extension RemoveTagsFromResourceOutput { -extension RemoveTagsFromResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tagKeys = "TagKeys" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemoveTagsFromResourceOutput() } } } -extension RemoveTagsFromResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct RemoveTagsFromResourceOutput: Swift.Equatable { public init() { } } -enum RemoveTagsFromResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotTenantDatabaseNotFoundFault": return try await DBSnapshotTenantDatabaseNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemoveTagsFromResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyNotFoundFault": return try await DBProxyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBProxyTargetGroupNotFoundFault": return try await DBProxyTargetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotTenantDatabaseNotFoundFault": return try await DBSnapshotTenantDatabaseNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseNotFound": return try await TenantDatabaseNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -49208,7 +36021,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.ReservedDBInstance: Swift.Codable { +extension RDSClientTypes.ReservedDBInstance: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case currencyCode = "CurrencyCode" case dbInstanceClass = "DBInstanceClass" @@ -49289,57 +36102,28 @@ extension RDSClientTypes.ReservedDBInstance: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedDBInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstanceId) - reservedDBInstanceId = reservedDBInstanceIdDecoded - let reservedDBInstancesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstancesOfferingId) - reservedDBInstancesOfferingId = reservedDBInstancesOfferingIdDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let fixedPriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fixedPrice) - fixedPrice = fixedPriceDecoded - let usagePriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .usagePrice) - usagePrice = usagePriceDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let dbInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dbInstanceCount) - dbInstanceCount = dbInstanceCountDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.recurringCharges) { - struct KeyVal0{struct RecurringCharge{}} - let recurringChargesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recurringCharges) - if let recurringChargesWrappedContainer = recurringChargesWrappedContainer { - let recurringChargesContainer = try recurringChargesWrappedContainer.decodeIfPresent([RDSClientTypes.RecurringCharge].self, forKey: .member) - var recurringChargesBuffer:[RDSClientTypes.RecurringCharge]? = nil - if let recurringChargesContainer = recurringChargesContainer { - recurringChargesBuffer = [RDSClientTypes.RecurringCharge]() - for structureContainer0 in recurringChargesContainer { - recurringChargesBuffer?.append(structureContainer0) - } - } - recurringCharges = recurringChargesBuffer - } else { - recurringCharges = [] - } - } else { - recurringCharges = nil - } - let reservedDBInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstanceArn) - reservedDBInstanceArn = reservedDBInstanceArnDecoded - let leaseIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .leaseId) - leaseId = leaseIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ReservedDBInstance() + value.reservedDBInstanceId = try reader["ReservedDBInstanceId"].readIfPresent() + value.reservedDBInstancesOfferingId = try reader["ReservedDBInstancesOfferingId"].readIfPresent() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.duration = try reader["Duration"].readIfPresent() + value.fixedPrice = try reader["FixedPrice"].readIfPresent() + value.usagePrice = try reader["UsagePrice"].readIfPresent() + value.currencyCode = try reader["CurrencyCode"].readIfPresent() + value.dbInstanceCount = try reader["DBInstanceCount"].readIfPresent() + value.productDescription = try reader["ProductDescription"].readIfPresent() + value.offeringType = try reader["OfferingType"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.recurringCharges = try reader["RecurringCharges"].readListIfPresent(memberReadingClosure: RDSClientTypes.RecurringCharge.readingClosure, memberNodeInfo: "RecurringCharge", isFlattened: false) + value.reservedDBInstanceArn = try reader["ReservedDBInstanceArn"].readIfPresent() + value.leaseId = try reader["LeaseId"].readIfPresent() + return value + } } } @@ -49420,16 +36204,14 @@ extension RDSClientTypes { } extension ReservedDBInstanceAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedDBInstanceAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -49457,33 +36239,15 @@ public struct ReservedDBInstanceAlreadyExistsFault: ClientRuntime.ModeledError, } } -struct ReservedDBInstanceAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedDBInstanceAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ReservedDBInstanceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedDBInstanceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -49511,33 +36275,15 @@ public struct ReservedDBInstanceNotFoundFault: ClientRuntime.ModeledError, AWSCl } } -struct ReservedDBInstanceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedDBInstanceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ReservedDBInstanceQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedDBInstanceQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -49565,23 +36311,7 @@ public struct ReservedDBInstanceQuotaExceededFault: ClientRuntime.ModeledError, } } -struct ReservedDBInstanceQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedDBInstanceQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.ReservedDBInstancesOffering: Swift.Codable { +extension RDSClientTypes.ReservedDBInstancesOffering: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case currencyCode = "CurrencyCode" case dbInstanceClass = "DBInstanceClass" @@ -49638,44 +36368,21 @@ extension RDSClientTypes.ReservedDBInstancesOffering: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedDBInstancesOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedDBInstancesOfferingId) - reservedDBInstancesOfferingId = reservedDBInstancesOfferingIdDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let fixedPriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fixedPrice) - fixedPrice = fixedPriceDecoded - let usagePriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .usagePrice) - usagePrice = usagePriceDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let productDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .productDescription) - productDescription = productDescriptionDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - if containerValues.contains(.recurringCharges) { - struct KeyVal0{struct RecurringCharge{}} - let recurringChargesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recurringCharges) - if let recurringChargesWrappedContainer = recurringChargesWrappedContainer { - let recurringChargesContainer = try recurringChargesWrappedContainer.decodeIfPresent([RDSClientTypes.RecurringCharge].self, forKey: .member) - var recurringChargesBuffer:[RDSClientTypes.RecurringCharge]? = nil - if let recurringChargesContainer = recurringChargesContainer { - recurringChargesBuffer = [RDSClientTypes.RecurringCharge]() - for structureContainer0 in recurringChargesContainer { - recurringChargesBuffer?.append(structureContainer0) - } - } - recurringCharges = recurringChargesBuffer - } else { - recurringCharges = [] - } - } else { - recurringCharges = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ReservedDBInstancesOffering() + value.reservedDBInstancesOfferingId = try reader["ReservedDBInstancesOfferingId"].readIfPresent() + value.dbInstanceClass = try reader["DBInstanceClass"].readIfPresent() + value.duration = try reader["Duration"].readIfPresent() + value.fixedPrice = try reader["FixedPrice"].readIfPresent() + value.usagePrice = try reader["UsagePrice"].readIfPresent() + value.currencyCode = try reader["CurrencyCode"].readIfPresent() + value.productDescription = try reader["ProductDescription"].readIfPresent() + value.offeringType = try reader["OfferingType"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.recurringCharges = try reader["RecurringCharges"].readListIfPresent(memberReadingClosure: RDSClientTypes.RecurringCharge.readingClosure, memberNodeInfo: "RecurringCharge", isFlattened: false) + return value } } } @@ -49733,16 +36440,14 @@ extension RDSClientTypes { } extension ReservedDBInstancesOfferingNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedDBInstancesOfferingNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -49770,23 +36475,13 @@ public struct ReservedDBInstancesOfferingNotFoundFault: ClientRuntime.ModeledErr } } -struct ReservedDBInstancesOfferingNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedDBInstancesOfferingNotFoundFaultBody: Swift.Decodable { +extension ResetDBClusterParameterGroupInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case parameters = "Parameters" + case resetAllParameters = "ResetAllParameters" } -} -extension ResetDBClusterParameterGroupInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterParameterGroupName = dbClusterParameterGroupName { @@ -49841,55 +36536,15 @@ public struct ResetDBClusterParameterGroupInput: Swift.Equatable { } } -struct ResetDBClusterParameterGroupInputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? - let resetAllParameters: Swift.Bool? - let parameters: [RDSClientTypes.Parameter]? -} - -extension ResetDBClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case parameters = "Parameters" - case resetAllParameters = "ResetAllParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let resetAllParametersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resetAllParameters) - resetAllParameters = resetAllParametersDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RDSClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RDSClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RDSClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ResetDBClusterParameterGroupOutput { -extension ResetDBClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetDBClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbClusterParameterGroupName = output.dbClusterParameterGroupName - } else { - self.dbClusterParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResetDBClusterParameterGroupResult"] + var value = ResetDBClusterParameterGroupOutput() + value.dbClusterParameterGroupName = try reader["DBClusterParameterGroupName"].readIfPresent() + return value } } } @@ -49916,35 +36571,31 @@ public struct ResetDBClusterParameterGroupOutput: Swift.Equatable { } } -struct ResetDBClusterParameterGroupOutputBody: Swift.Equatable { - let dbClusterParameterGroupName: Swift.String? -} - -extension ResetDBClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResetDBClusterParameterGroupResult")) - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - } -} +enum ResetDBClusterParameterGroupOutputError { -enum ResetDBClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResetDBParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbParameterGroupName = "DBParameterGroupName" + case parameters = "Parameters" + case resetAllParameters = "ResetAllParameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbParameterGroupName = dbParameterGroupName { @@ -50001,55 +36652,15 @@ public struct ResetDBParameterGroupInput: Swift.Equatable { } } -struct ResetDBParameterGroupInputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? - let resetAllParameters: Swift.Bool? - let parameters: [RDSClientTypes.Parameter]? -} - -extension ResetDBParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - case parameters = "Parameters" - case resetAllParameters = "ResetAllParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let resetAllParametersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resetAllParameters) - resetAllParameters = resetAllParametersDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RDSClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RDSClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RDSClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ResetDBParameterGroupOutput { -extension ResetDBParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetDBParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.dbParameterGroupName = output.dbParameterGroupName - } else { - self.dbParameterGroupName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResetDBParameterGroupResult"] + var value = ResetDBParameterGroupOutput() + value.dbParameterGroupName = try reader["DBParameterGroupName"].readIfPresent() + return value } } } @@ -50067,45 +36678,33 @@ public struct ResetDBParameterGroupOutput: Swift.Equatable { } } -struct ResetDBParameterGroupOutputBody: Swift.Equatable { - let dbParameterGroupName: Swift.String? -} +enum ResetDBParameterGroupOutputError { -extension ResetDBParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbParameterGroupName = "DBParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResetDBParameterGroupResult")) - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - } -} - -enum ResetDBParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBParameterGroupState": return try await InvalidDBParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResourceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -50133,23 +36732,7 @@ public struct ResourceNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct ResourceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.ResourcePendingMaintenanceActions: Swift.Codable { +extension RDSClientTypes.ResourcePendingMaintenanceActions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case pendingMaintenanceActionDetails = "PendingMaintenanceActionDetails" case resourceIdentifier = "ResourceIdentifier" @@ -50174,28 +36757,13 @@ extension RDSClientTypes.ResourcePendingMaintenanceActions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceIdentifier) - resourceIdentifier = resourceIdentifierDecoded - if containerValues.contains(.pendingMaintenanceActionDetails) { - struct KeyVal0{struct PendingMaintenanceAction{}} - let pendingMaintenanceActionDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .pendingMaintenanceActionDetails) - if let pendingMaintenanceActionDetailsWrappedContainer = pendingMaintenanceActionDetailsWrappedContainer { - let pendingMaintenanceActionDetailsContainer = try pendingMaintenanceActionDetailsWrappedContainer.decodeIfPresent([RDSClientTypes.PendingMaintenanceAction].self, forKey: .member) - var pendingMaintenanceActionDetailsBuffer:[RDSClientTypes.PendingMaintenanceAction]? = nil - if let pendingMaintenanceActionDetailsContainer = pendingMaintenanceActionDetailsContainer { - pendingMaintenanceActionDetailsBuffer = [RDSClientTypes.PendingMaintenanceAction]() - for structureContainer0 in pendingMaintenanceActionDetailsContainer { - pendingMaintenanceActionDetailsBuffer?.append(structureContainer0) - } - } - pendingMaintenanceActionDetails = pendingMaintenanceActionDetailsBuffer - } else { - pendingMaintenanceActionDetails = [] - } - } else { - pendingMaintenanceActionDetails = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ResourcePendingMaintenanceActions() + value.resourceIdentifier = try reader["ResourceIdentifier"].readIfPresent() + value.pendingMaintenanceActionDetails = try reader["PendingMaintenanceActionDetails"].readListIfPresent(memberReadingClosure: RDSClientTypes.PendingMaintenanceAction.readingClosure, memberNodeInfo: "PendingMaintenanceAction", isFlattened: false) + return value } } } @@ -50221,6 +36789,45 @@ extension RDSClientTypes { } extension RestoreDBClusterFromS3Input: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case availabilityZones = "AvailabilityZones" + case backtrackWindow = "BacktrackWindow" + case backupRetentionPeriod = "BackupRetentionPeriod" + case characterSetName = "CharacterSetName" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterParameterGroupName = "DBClusterParameterGroupName" + case dbSubnetGroupName = "DBSubnetGroupName" + case databaseName = "DatabaseName" + case deletionProtection = "DeletionProtection" + case domain = "Domain" + case domainIAMRoleName = "DomainIAMRoleName" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case engine = "Engine" + case engineVersion = "EngineVersion" + case kmsKeyId = "KmsKeyId" + case manageMasterUserPassword = "ManageMasterUserPassword" + case masterUserPassword = "MasterUserPassword" + case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" + case masterUsername = "MasterUsername" + case networkType = "NetworkType" + case optionGroupName = "OptionGroupName" + case port = "Port" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case s3BucketName = "S3BucketName" + case s3IngestionRoleArn = "S3IngestionRoleArn" + case s3Prefix = "S3Prefix" + case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" + case sourceEngine = "SourceEngine" + case sourceEngineVersion = "SourceEngineVersion" + case storageEncrypted = "StorageEncrypted" + case storageType = "StorageType" + case tags = "Tags" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZones = availabilityZones { @@ -50580,53 +37187,69 @@ public struct RestoreDBClusterFromS3Input: Swift.Equatable { } } -struct RestoreDBClusterFromS3InputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let backupRetentionPeriod: Swift.Int? - let characterSetName: Swift.String? - let databaseName: Swift.String? - let dbClusterIdentifier: Swift.String? - let dbClusterParameterGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let dbSubnetGroupName: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let port: Swift.Int? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let optionGroupName: Swift.String? - let preferredBackupWindow: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let tags: [RDSClientTypes.Tag]? - let storageEncrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let sourceEngine: Swift.String? - let sourceEngineVersion: Swift.String? - let s3BucketName: Swift.String? - let s3Prefix: Swift.String? - let s3IngestionRoleArn: Swift.String? - let backtrackWindow: Swift.Int? - let enableCloudwatchLogsExports: [Swift.String]? - let deletionProtection: Swift.Bool? - let copyTagsToSnapshot: Swift.Bool? - let domain: Swift.String? - let domainIAMRoleName: Swift.String? - let serverlessV2ScalingConfiguration: RDSClientTypes.ServerlessV2ScalingConfiguration? - let networkType: Swift.String? - let manageMasterUserPassword: Swift.Bool? - let masterUserSecretKmsKeyId: Swift.String? - let storageType: Swift.String? -} - -extension RestoreDBClusterFromS3InputBody: Swift.Decodable { +extension RestoreDBClusterFromS3Output { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBClusterFromS3Result"] + var value = RestoreDBClusterFromS3Output() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value + } + } +} + +public struct RestoreDBClusterFromS3Output: Swift.Equatable { + /// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For an Amazon Aurora DB cluster, this data type is used as a response element in the operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ DB cluster, this data type is used as a response element in the operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB clusters, see [ What is Amazon Aurora?](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, see [ Multi-AZ deployments with two readable standby DB instances](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) in the Amazon RDS User Guide. + public var dbCluster: RDSClientTypes.DBCluster? + + public init( + dbCluster: RDSClientTypes.DBCluster? = nil + ) + { + self.dbCluster = dbCluster + } +} + +enum RestoreDBClusterFromS3OutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidS3BucketFault": return try await InvalidS3BucketFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } +} + +extension RestoreDBClusterFromSnapshotInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZones = "AvailabilityZones" case backtrackWindow = "BacktrackWindow" - case backupRetentionPeriod = "BackupRetentionPeriod" - case characterSetName = "CharacterSetName" case copyTagsToSnapshot = "CopyTagsToSnapshot" case dbClusterIdentifier = "DBClusterIdentifier" + case dbClusterInstanceClass = "DBClusterInstanceClass" case dbClusterParameterGroupName = "DBClusterParameterGroupName" case dbSubnetGroupName = "DBSubnetGroupName" case databaseName = "DatabaseName" @@ -50636,240 +37259,23 @@ extension RestoreDBClusterFromS3InputBody: Swift.Decodable { case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" case engine = "Engine" + case engineMode = "EngineMode" case engineVersion = "EngineVersion" + case iops = "Iops" case kmsKeyId = "KmsKeyId" - case manageMasterUserPassword = "ManageMasterUserPassword" - case masterUserPassword = "MasterUserPassword" - case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" - case masterUsername = "MasterUsername" case networkType = "NetworkType" case optionGroupName = "OptionGroupName" case port = "Port" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case s3BucketName = "S3BucketName" - case s3IngestionRoleArn = "S3IngestionRoleArn" - case s3Prefix = "S3Prefix" + case publiclyAccessible = "PubliclyAccessible" + case rdsCustomClusterConfiguration = "RdsCustomClusterConfiguration" + case scalingConfiguration = "ScalingConfiguration" case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case sourceEngine = "SourceEngine" - case sourceEngineVersion = "SourceEngineVersion" - case storageEncrypted = "StorageEncrypted" + case snapshotIdentifier = "SnapshotIdentifier" case storageType = "StorageType" case tags = "Tags" case vpcSecurityGroupIds = "VpcSecurityGroupIds" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let sourceEngineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceEngine) - sourceEngine = sourceEngineDecoded - let sourceEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceEngineVersion) - sourceEngineVersion = sourceEngineVersionDecoded - let s3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3BucketName) - s3BucketName = s3BucketNameDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded - let s3IngestionRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3IngestionRoleArn) - s3IngestionRoleArn = s3IngestionRoleArnDecoded - let backtrackWindowDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backtrackWindow) - backtrackWindow = backtrackWindowDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let manageMasterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterUserPassword) - manageMasterUserPassword = manageMasterUserPasswordDecoded - let masterUserSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserSecretKmsKeyId) - masterUserSecretKmsKeyId = masterUserSecretKmsKeyIdDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - } -} - -extension RestoreDBClusterFromS3Output: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBClusterFromS3OutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil - } - } -} - -public struct RestoreDBClusterFromS3Output: Swift.Equatable { - /// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For an Amazon Aurora DB cluster, this data type is used as a response element in the operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ DB cluster, this data type is used as a response element in the operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB clusters, see [ What is Amazon Aurora?](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, see [ Multi-AZ deployments with two readable standby DB instances](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) in the Amazon RDS User Guide. - public var dbCluster: RDSClientTypes.DBCluster? - - public init( - dbCluster: RDSClientTypes.DBCluster? = nil - ) - { - self.dbCluster = dbCluster - } -} - -struct RestoreDBClusterFromS3OutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension RestoreDBClusterFromS3OutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBClusterFromS3Result")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum RestoreDBClusterFromS3OutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSubnetGroupStateFault": return try await InvalidDBSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidS3BucketFault": return try await InvalidS3BucketFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RestoreDBClusterFromSnapshotInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let availabilityZones = availabilityZones { @@ -51193,56 +37599,80 @@ public struct RestoreDBClusterFromSnapshotInput: Swift.Equatable { } } -struct RestoreDBClusterFromSnapshotInputBody: Swift.Equatable { - let availabilityZones: [Swift.String]? - let dbClusterIdentifier: Swift.String? - let snapshotIdentifier: Swift.String? - let engine: Swift.String? - let engineVersion: Swift.String? - let port: Swift.Int? - let dbSubnetGroupName: Swift.String? - let databaseName: Swift.String? - let optionGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let tags: [RDSClientTypes.Tag]? - let kmsKeyId: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let backtrackWindow: Swift.Int? - let enableCloudwatchLogsExports: [Swift.String]? - let engineMode: Swift.String? - let scalingConfiguration: RDSClientTypes.ScalingConfiguration? - let dbClusterParameterGroupName: Swift.String? - let deletionProtection: Swift.Bool? - let copyTagsToSnapshot: Swift.Bool? - let domain: Swift.String? - let domainIAMRoleName: Swift.String? - let dbClusterInstanceClass: Swift.String? - let storageType: Swift.String? - let iops: Swift.Int? - let publiclyAccessible: Swift.Bool? - let serverlessV2ScalingConfiguration: RDSClientTypes.ServerlessV2ScalingConfiguration? - let networkType: Swift.String? - let rdsCustomClusterConfiguration: RDSClientTypes.RdsCustomClusterConfiguration? -} - -extension RestoreDBClusterFromSnapshotInputBody: Swift.Decodable { +extension RestoreDBClusterFromSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBClusterFromSnapshotResult"] + var value = RestoreDBClusterFromSnapshotOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value + } + } +} + +public struct RestoreDBClusterFromSnapshotOutput: Swift.Equatable { + /// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For an Amazon Aurora DB cluster, this data type is used as a response element in the operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ DB cluster, this data type is used as a response element in the operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB clusters, see [ What is Amazon Aurora?](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, see [ Multi-AZ deployments with two readable standby DB instances](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) in the Amazon RDS User Guide. + public var dbCluster: RDSClientTypes.DBCluster? + + public init( + dbCluster: RDSClientTypes.DBCluster? = nil + ) + { + self.dbCluster = dbCluster + } +} + +enum RestoreDBClusterFromSnapshotOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestoreFault": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } +} + +extension RestoreDBClusterToPointInTimeInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case availabilityZones = "AvailabilityZones" case backtrackWindow = "BacktrackWindow" case copyTagsToSnapshot = "CopyTagsToSnapshot" case dbClusterIdentifier = "DBClusterIdentifier" case dbClusterInstanceClass = "DBClusterInstanceClass" case dbClusterParameterGroupName = "DBClusterParameterGroupName" case dbSubnetGroupName = "DBSubnetGroupName" - case databaseName = "DatabaseName" case deletionProtection = "DeletionProtection" case domain = "Domain" case domainIAMRoleName = "DomainIAMRoleName" case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case engine = "Engine" case engineMode = "EngineMode" - case engineVersion = "EngineVersion" case iops = "Iops" case kmsKeyId = "KmsKeyId" case networkType = "NetworkType" @@ -51250,215 +37680,18 @@ extension RestoreDBClusterFromSnapshotInputBody: Swift.Decodable { case port = "Port" case publiclyAccessible = "PubliclyAccessible" case rdsCustomClusterConfiguration = "RdsCustomClusterConfiguration" + case restoreToTime = "RestoreToTime" + case restoreType = "RestoreType" case scalingConfiguration = "ScalingConfiguration" case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case snapshotIdentifier = "SnapshotIdentifier" + case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" + case sourceDbClusterResourceId = "SourceDbClusterResourceId" case storageType = "StorageType" case tags = "Tags" + case useLatestRestorableTime = "UseLatestRestorableTime" case vpcSecurityGroupIds = "VpcSecurityGroupIds" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var availabilityZonesBuffer:[Swift.String]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [Swift.String]() - for stringContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(stringContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil - } - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let backtrackWindowDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backtrackWindow) - backtrackWindow = backtrackWindowDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let engineModeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineMode) - engineMode = engineModeDecoded - let scalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ScalingConfiguration.self, forKey: .scalingConfiguration) - scalingConfiguration = scalingConfigurationDecoded - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let dbClusterInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterInstanceClass) - dbClusterInstanceClass = dbClusterInstanceClassDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let rdsCustomClusterConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.RdsCustomClusterConfiguration.self, forKey: .rdsCustomClusterConfiguration) - rdsCustomClusterConfiguration = rdsCustomClusterConfigurationDecoded - } -} - -extension RestoreDBClusterFromSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBClusterFromSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil - } - } -} - -public struct RestoreDBClusterFromSnapshotOutput: Swift.Equatable { - /// Contains the details of an Amazon Aurora DB cluster or Multi-AZ DB cluster. For an Amazon Aurora DB cluster, this data type is used as a response element in the operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, ModifyDBCluster, PromoteReadReplicaDBCluster, RestoreDBClusterFromS3, RestoreDBClusterFromSnapshot, RestoreDBClusterToPointInTime, StartDBCluster, and StopDBCluster. For a Multi-AZ DB cluster, this data type is used as a response element in the operations CreateDBCluster, DeleteDBCluster, DescribeDBClusters, FailoverDBCluster, ModifyDBCluster, RebootDBCluster, RestoreDBClusterFromSnapshot, and RestoreDBClusterToPointInTime. For more information on Amazon Aurora DB clusters, see [ What is Amazon Aurora?](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html) in the Amazon Aurora User Guide. For more information on Multi-AZ DB clusters, see [ Multi-AZ deployments with two readable standby DB instances](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) in the Amazon RDS User Guide. - public var dbCluster: RDSClientTypes.DBCluster? - - public init( - dbCluster: RDSClientTypes.DBCluster? = nil - ) - { - self.dbCluster = dbCluster - } -} - -struct RestoreDBClusterFromSnapshotOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension RestoreDBClusterFromSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBClusterFromSnapshotResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum RestoreDBClusterFromSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestoreFault": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RestoreDBClusterToPointInTimeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let backtrackWindow = backtrackWindow { @@ -51789,193 +38022,15 @@ public struct RestoreDBClusterToPointInTimeInput: Swift.Equatable { } } -struct RestoreDBClusterToPointInTimeInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? - let restoreType: Swift.String? - let sourceDBClusterIdentifier: Swift.String? - let restoreToTime: ClientRuntime.Date? - let useLatestRestorableTime: Swift.Bool? - let port: Swift.Int? - let dbSubnetGroupName: Swift.String? - let optionGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let tags: [RDSClientTypes.Tag]? - let kmsKeyId: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let backtrackWindow: Swift.Int? - let enableCloudwatchLogsExports: [Swift.String]? - let dbClusterParameterGroupName: Swift.String? - let deletionProtection: Swift.Bool? - let copyTagsToSnapshot: Swift.Bool? - let domain: Swift.String? - let domainIAMRoleName: Swift.String? - let scalingConfiguration: RDSClientTypes.ScalingConfiguration? - let engineMode: Swift.String? - let dbClusterInstanceClass: Swift.String? - let storageType: Swift.String? - let publiclyAccessible: Swift.Bool? - let iops: Swift.Int? - let serverlessV2ScalingConfiguration: RDSClientTypes.ServerlessV2ScalingConfiguration? - let networkType: Swift.String? - let sourceDbClusterResourceId: Swift.String? - let rdsCustomClusterConfiguration: RDSClientTypes.RdsCustomClusterConfiguration? -} - -extension RestoreDBClusterToPointInTimeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case backtrackWindow = "BacktrackWindow" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case dbClusterIdentifier = "DBClusterIdentifier" - case dbClusterInstanceClass = "DBClusterInstanceClass" - case dbClusterParameterGroupName = "DBClusterParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case deletionProtection = "DeletionProtection" - case domain = "Domain" - case domainIAMRoleName = "DomainIAMRoleName" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case engineMode = "EngineMode" - case iops = "Iops" - case kmsKeyId = "KmsKeyId" - case networkType = "NetworkType" - case optionGroupName = "OptionGroupName" - case port = "Port" - case publiclyAccessible = "PubliclyAccessible" - case rdsCustomClusterConfiguration = "RdsCustomClusterConfiguration" - case restoreToTime = "RestoreToTime" - case restoreType = "RestoreType" - case scalingConfiguration = "ScalingConfiguration" - case serverlessV2ScalingConfiguration = "ServerlessV2ScalingConfiguration" - case sourceDBClusterIdentifier = "SourceDBClusterIdentifier" - case sourceDbClusterResourceId = "SourceDbClusterResourceId" - case storageType = "StorageType" - case tags = "Tags" - case useLatestRestorableTime = "UseLatestRestorableTime" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension RestoreDBClusterToPointInTimeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - let restoreTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .restoreType) - restoreType = restoreTypeDecoded - let sourceDBClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBClusterIdentifier) - sourceDBClusterIdentifier = sourceDBClusterIdentifierDecoded - let restoreToTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreToTime) - restoreToTime = restoreToTimeDecoded - let useLatestRestorableTimeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useLatestRestorableTime) - useLatestRestorableTime = useLatestRestorableTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let backtrackWindowDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backtrackWindow) - backtrackWindow = backtrackWindowDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - let dbClusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterParameterGroupName) - dbClusterParameterGroupName = dbClusterParameterGroupNameDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let scalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ScalingConfiguration.self, forKey: .scalingConfiguration) - scalingConfiguration = scalingConfigurationDecoded - let engineModeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineMode) - engineMode = engineModeDecoded - let dbClusterInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterInstanceClass) - dbClusterInstanceClass = dbClusterInstanceClassDecoded - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let serverlessV2ScalingConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ServerlessV2ScalingConfiguration.self, forKey: .serverlessV2ScalingConfiguration) - serverlessV2ScalingConfiguration = serverlessV2ScalingConfigurationDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let sourceDbClusterResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDbClusterResourceId) - sourceDbClusterResourceId = sourceDbClusterResourceIdDecoded - let rdsCustomClusterConfigurationDecoded = try containerValues.decodeIfPresent(RDSClientTypes.RdsCustomClusterConfiguration.self, forKey: .rdsCustomClusterConfiguration) - rdsCustomClusterConfiguration = rdsCustomClusterConfigurationDecoded - } -} - -extension RestoreDBClusterToPointInTimeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBClusterToPointInTimeOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBClusterToPointInTimeResult"] + var value = RestoreDBClusterToPointInTimeOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -51992,52 +38047,85 @@ public struct RestoreDBClusterToPointInTimeOutput: Swift.Equatable { } } -struct RestoreDBClusterToPointInTimeOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension RestoreDBClusterToPointInTimeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBClusterToPointInTimeResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum RestoreDBClusterToPointInTimeOutputError { -enum RestoreDBClusterToPointInTimeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterAutomatedBackupNotFoundFault": return try await DBClusterAutomatedBackupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestoreFault": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterAlreadyExistsFault": return try await DBClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterAutomatedBackupNotFoundFault": return try await DBClusterAutomatedBackupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterParameterGroupNotFound": return try await DBClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterQuotaExceededFault": return try await DBClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBClusterCapacityFault": return try await InsufficientDBClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientStorageClusterCapacity": return try await InsufficientStorageClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterSnapshotStateFault": return try await InvalidDBClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestoreFault": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RestoreDBInstanceFromDBSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allocatedStorage = "AllocatedStorage" + case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" + case availabilityZone = "AvailabilityZone" + case backupTarget = "BackupTarget" + case copyTagsToSnapshot = "CopyTagsToSnapshot" + case customIamInstanceProfile = "CustomIamInstanceProfile" + case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" + case dbInstanceClass = "DBInstanceClass" + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbName = "DBName" + case dbParameterGroupName = "DBParameterGroupName" + case dbSnapshotIdentifier = "DBSnapshotIdentifier" + case dbSubnetGroupName = "DBSubnetGroupName" + case dedicatedLogVolume = "DedicatedLogVolume" + case deletionProtection = "DeletionProtection" + case domain = "Domain" + case domainAuthSecretArn = "DomainAuthSecretArn" + case domainDnsIps = "DomainDnsIps" + case domainFqdn = "DomainFqdn" + case domainIAMRoleName = "DomainIAMRoleName" + case domainOu = "DomainOu" + case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableCustomerOwnedIp = "EnableCustomerOwnedIp" + case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case engine = "Engine" + case iops = "Iops" + case licenseModel = "LicenseModel" + case multiAZ = "MultiAZ" + case networkType = "NetworkType" + case optionGroupName = "OptionGroupName" + case port = "Port" + case processorFeatures = "ProcessorFeatures" + case publiclyAccessible = "PubliclyAccessible" + case storageThroughput = "StorageThroughput" + case storageType = "StorageType" + case tags = "Tags" + case tdeCredentialArn = "TdeCredentialArn" + case tdeCredentialPassword = "TdeCredentialPassword" + case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -52493,337 +38581,123 @@ public struct RestoreDBInstanceFromDBSnapshotInput: Swift.Equatable { } } -struct RestoreDBInstanceFromDBSnapshotInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let dbSnapshotIdentifier: Swift.String? - let dbInstanceClass: Swift.String? - let port: Swift.Int? - let availabilityZone: Swift.String? - let dbSubnetGroupName: Swift.String? - let multiAZ: Swift.Bool? - let publiclyAccessible: Swift.Bool? - let autoMinorVersionUpgrade: Swift.Bool? - let licenseModel: Swift.String? - let dbName: Swift.String? - let engine: Swift.String? - let iops: Swift.Int? - let optionGroupName: Swift.String? - let tags: [RDSClientTypes.Tag]? - let storageType: Swift.String? - let tdeCredentialArn: Swift.String? - let tdeCredentialPassword: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let domain: Swift.String? - let domainFqdn: Swift.String? - let domainOu: Swift.String? - let domainAuthSecretArn: Swift.String? - let domainDnsIps: [Swift.String]? - let copyTagsToSnapshot: Swift.Bool? - let domainIAMRoleName: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enableCloudwatchLogsExports: [Swift.String]? - let processorFeatures: [RDSClientTypes.ProcessorFeature]? - let useDefaultProcessorFeatures: Swift.Bool? - let dbParameterGroupName: Swift.String? - let deletionProtection: Swift.Bool? - let enableCustomerOwnedIp: Swift.Bool? - let customIamInstanceProfile: Swift.String? - let backupTarget: Swift.String? - let networkType: Swift.String? - let storageThroughput: Swift.Int? - let dbClusterSnapshotIdentifier: Swift.String? - let allocatedStorage: Swift.Int? - let dedicatedLogVolume: Swift.Bool? -} - -extension RestoreDBInstanceFromDBSnapshotInputBody: Swift.Decodable { +extension RestoreDBInstanceFromDBSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBInstanceFromDBSnapshotResult"] + var value = RestoreDBInstanceFromDBSnapshotOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value + } + } +} + +public struct RestoreDBInstanceFromDBSnapshotOutput: Swift.Equatable { + /// Contains the details of an Amazon RDS DB instance. This data type is used as a response element in the operations CreateDBInstance, CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, ModifyDBInstance, PromoteReadReplica, RebootDBInstance, RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. + public var dbInstance: RDSClientTypes.DBInstance? + + public init( + dbInstance: RDSClientTypes.DBInstance? = nil + ) + { + self.dbInstance = dbInstance + } +} + +enum RestoreDBInstanceFromDBSnapshotOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestoreFault": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } +} + +extension RestoreDBInstanceFromS3Input: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" case availabilityZone = "AvailabilityZone" - case backupTarget = "BackupTarget" + case backupRetentionPeriod = "BackupRetentionPeriod" case copyTagsToSnapshot = "CopyTagsToSnapshot" - case customIamInstanceProfile = "CustomIamInstanceProfile" - case dbClusterSnapshotIdentifier = "DBClusterSnapshotIdentifier" case dbInstanceClass = "DBInstanceClass" case dbInstanceIdentifier = "DBInstanceIdentifier" case dbName = "DBName" case dbParameterGroupName = "DBParameterGroupName" - case dbSnapshotIdentifier = "DBSnapshotIdentifier" + case dbSecurityGroups = "DBSecurityGroups" case dbSubnetGroupName = "DBSubnetGroupName" case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" - case domain = "Domain" - case domainAuthSecretArn = "DomainAuthSecretArn" - case domainDnsIps = "DomainDnsIps" - case domainFqdn = "DomainFqdn" - case domainIAMRoleName = "DomainIAMRoleName" - case domainOu = "DomainOu" case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableCustomerOwnedIp = "EnableCustomerOwnedIp" case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" + case enablePerformanceInsights = "EnablePerformanceInsights" case engine = "Engine" + case engineVersion = "EngineVersion" case iops = "Iops" + case kmsKeyId = "KmsKeyId" case licenseModel = "LicenseModel" + case manageMasterUserPassword = "ManageMasterUserPassword" + case masterUserPassword = "MasterUserPassword" + case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" + case masterUsername = "MasterUsername" + case maxAllocatedStorage = "MaxAllocatedStorage" + case monitoringInterval = "MonitoringInterval" + case monitoringRoleArn = "MonitoringRoleArn" case multiAZ = "MultiAZ" case networkType = "NetworkType" case optionGroupName = "OptionGroupName" + case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" + case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" case port = "Port" + case preferredBackupWindow = "PreferredBackupWindow" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" case processorFeatures = "ProcessorFeatures" case publiclyAccessible = "PubliclyAccessible" + case s3BucketName = "S3BucketName" + case s3IngestionRoleArn = "S3IngestionRoleArn" + case s3Prefix = "S3Prefix" + case sourceEngine = "SourceEngine" + case sourceEngineVersion = "SourceEngineVersion" + case storageEncrypted = "StorageEncrypted" case storageThroughput = "StorageThroughput" case storageType = "StorageType" case tags = "Tags" - case tdeCredentialArn = "TdeCredentialArn" - case tdeCredentialPassword = "TdeCredentialPassword" case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" case vpcSecurityGroupIds = "VpcSecurityGroupIds" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let tdeCredentialPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialPassword) - tdeCredentialPassword = tdeCredentialPasswordDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainFqdnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainFqdn) - domainFqdn = domainFqdnDecoded - let domainOuDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainOu) - domainOu = domainOuDecoded - let domainAuthSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainAuthSecretArn) - domainAuthSecretArn = domainAuthSecretArnDecoded - if containerValues.contains(.domainDnsIps) { - struct KeyVal0{struct member{}} - let domainDnsIpsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainDnsIps) - if let domainDnsIpsWrappedContainer = domainDnsIpsWrappedContainer { - let domainDnsIpsContainer = try domainDnsIpsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var domainDnsIpsBuffer:[Swift.String]? = nil - if let domainDnsIpsContainer = domainDnsIpsContainer { - domainDnsIpsBuffer = [Swift.String]() - for stringContainer0 in domainDnsIpsContainer { - domainDnsIpsBuffer?.append(stringContainer0) - } - } - domainDnsIps = domainDnsIpsBuffer - } else { - domainDnsIps = [] - } - } else { - domainDnsIps = nil - } - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let useDefaultProcessorFeaturesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useDefaultProcessorFeatures) - useDefaultProcessorFeatures = useDefaultProcessorFeaturesDecoded - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let enableCustomerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableCustomerOwnedIp) - enableCustomerOwnedIp = enableCustomerOwnedIpDecoded - let customIamInstanceProfileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customIamInstanceProfile) - customIamInstanceProfile = customIamInstanceProfileDecoded - let backupTargetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .backupTarget) - backupTarget = backupTargetDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let dbClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterSnapshotIdentifier) - dbClusterSnapshotIdentifier = dbClusterSnapshotIdentifierDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - } -} - -extension RestoreDBInstanceFromDBSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBInstanceFromDBSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil - } - } -} - -public struct RestoreDBInstanceFromDBSnapshotOutput: Swift.Equatable { - /// Contains the details of an Amazon RDS DB instance. This data type is used as a response element in the operations CreateDBInstance, CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, ModifyDBInstance, PromoteReadReplica, RebootDBInstance, RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. - public var dbInstance: RDSClientTypes.DBInstance? - - public init( - dbInstance: RDSClientTypes.DBInstance? = nil - ) - { - self.dbInstance = dbInstance - } -} - -struct RestoreDBInstanceFromDBSnapshotOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension RestoreDBInstanceFromDBSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBInstanceFromDBSnapshotResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum RestoreDBInstanceFromDBSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSnapshotState": return try await InvalidDBSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestoreFault": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RestoreDBInstanceFromS3Input: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -53322,368 +39196,113 @@ public struct RestoreDBInstanceFromS3Input: Swift.Equatable { } } -struct RestoreDBInstanceFromS3InputBody: Swift.Equatable { - let dbName: Swift.String? - let dbInstanceIdentifier: Swift.String? - let allocatedStorage: Swift.Int? - let dbInstanceClass: Swift.String? - let engine: Swift.String? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let dbSecurityGroups: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let availabilityZone: Swift.String? - let dbSubnetGroupName: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let dbParameterGroupName: Swift.String? - let backupRetentionPeriod: Swift.Int? - let preferredBackupWindow: Swift.String? - let port: Swift.Int? - let multiAZ: Swift.Bool? - let engineVersion: Swift.String? - let autoMinorVersionUpgrade: Swift.Bool? - let licenseModel: Swift.String? - let iops: Swift.Int? - let optionGroupName: Swift.String? - let publiclyAccessible: Swift.Bool? - let tags: [RDSClientTypes.Tag]? - let storageType: Swift.String? - let storageEncrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let copyTagsToSnapshot: Swift.Bool? - let monitoringInterval: Swift.Int? - let monitoringRoleArn: Swift.String? - let enableIAMDatabaseAuthentication: Swift.Bool? - let sourceEngine: Swift.String? - let sourceEngineVersion: Swift.String? - let s3BucketName: Swift.String? - let s3Prefix: Swift.String? - let s3IngestionRoleArn: Swift.String? - let enablePerformanceInsights: Swift.Bool? - let performanceInsightsKMSKeyId: Swift.String? - let performanceInsightsRetentionPeriod: Swift.Int? - let enableCloudwatchLogsExports: [Swift.String]? - let processorFeatures: [RDSClientTypes.ProcessorFeature]? - let useDefaultProcessorFeatures: Swift.Bool? - let deletionProtection: Swift.Bool? - let maxAllocatedStorage: Swift.Int? - let networkType: Swift.String? - let storageThroughput: Swift.Int? - let manageMasterUserPassword: Swift.Bool? - let masterUserSecretKmsKeyId: Swift.String? - let dedicatedLogVolume: Swift.Bool? -} - -extension RestoreDBInstanceFromS3InputBody: Swift.Decodable { +extension RestoreDBInstanceFromS3Output { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBInstanceFromS3Result"] + var value = RestoreDBInstanceFromS3Output() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value + } + } +} + +public struct RestoreDBInstanceFromS3Output: Swift.Equatable { + /// Contains the details of an Amazon RDS DB instance. This data type is used as a response element in the operations CreateDBInstance, CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, ModifyDBInstance, PromoteReadReplica, RebootDBInstance, RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. + public var dbInstance: RDSClientTypes.DBInstance? + + public init( + dbInstance: RDSClientTypes.DBInstance? = nil + ) + { + self.dbInstance = dbInstance + } +} + +enum RestoreDBInstanceFromS3OutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidS3BucketFault": return try await InvalidS3BucketFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } +} + +extension RestoreDBInstanceToPointInTimeInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allocatedStorage = "AllocatedStorage" case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" case availabilityZone = "AvailabilityZone" - case backupRetentionPeriod = "BackupRetentionPeriod" + case backupTarget = "BackupTarget" case copyTagsToSnapshot = "CopyTagsToSnapshot" + case customIamInstanceProfile = "CustomIamInstanceProfile" case dbInstanceClass = "DBInstanceClass" - case dbInstanceIdentifier = "DBInstanceIdentifier" case dbName = "DBName" case dbParameterGroupName = "DBParameterGroupName" - case dbSecurityGroups = "DBSecurityGroups" case dbSubnetGroupName = "DBSubnetGroupName" case dedicatedLogVolume = "DedicatedLogVolume" case deletionProtection = "DeletionProtection" + case domain = "Domain" + case domainAuthSecretArn = "DomainAuthSecretArn" + case domainDnsIps = "DomainDnsIps" + case domainFqdn = "DomainFqdn" + case domainIAMRoleName = "DomainIAMRoleName" + case domainOu = "DomainOu" case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" + case enableCustomerOwnedIp = "EnableCustomerOwnedIp" case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case enablePerformanceInsights = "EnablePerformanceInsights" case engine = "Engine" - case engineVersion = "EngineVersion" case iops = "Iops" - case kmsKeyId = "KmsKeyId" case licenseModel = "LicenseModel" - case manageMasterUserPassword = "ManageMasterUserPassword" - case masterUserPassword = "MasterUserPassword" - case masterUserSecretKmsKeyId = "MasterUserSecretKmsKeyId" - case masterUsername = "MasterUsername" case maxAllocatedStorage = "MaxAllocatedStorage" - case monitoringInterval = "MonitoringInterval" - case monitoringRoleArn = "MonitoringRoleArn" case multiAZ = "MultiAZ" case networkType = "NetworkType" case optionGroupName = "OptionGroupName" - case performanceInsightsKMSKeyId = "PerformanceInsightsKMSKeyId" - case performanceInsightsRetentionPeriod = "PerformanceInsightsRetentionPeriod" case port = "Port" - case preferredBackupWindow = "PreferredBackupWindow" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" case processorFeatures = "ProcessorFeatures" case publiclyAccessible = "PubliclyAccessible" - case s3BucketName = "S3BucketName" - case s3IngestionRoleArn = "S3IngestionRoleArn" - case s3Prefix = "S3Prefix" - case sourceEngine = "SourceEngine" - case sourceEngineVersion = "SourceEngineVersion" - case storageEncrypted = "StorageEncrypted" + case restoreTime = "RestoreTime" + case sourceDBInstanceAutomatedBackupsArn = "SourceDBInstanceAutomatedBackupsArn" + case sourceDBInstanceIdentifier = "SourceDBInstanceIdentifier" + case sourceDbiResourceId = "SourceDbiResourceId" case storageThroughput = "StorageThroughput" case storageType = "StorageType" case tags = "Tags" + case targetDBInstanceIdentifier = "TargetDBInstanceIdentifier" + case tdeCredentialArn = "TdeCredentialArn" + case tdeCredentialPassword = "TdeCredentialPassword" case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" + case useLatestRestorableTime = "UseLatestRestorableTime" case vpcSecurityGroupIds = "VpcSecurityGroupIds" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - if containerValues.contains(.dbSecurityGroups) { - struct KeyVal0{struct DBSecurityGroupName{}} - let dbSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbSecurityGroups) - if let dbSecurityGroupsWrappedContainer = dbSecurityGroupsWrappedContainer { - let dbSecurityGroupsContainer = try dbSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbSecurityGroupsBuffer:[Swift.String]? = nil - if let dbSecurityGroupsContainer = dbSecurityGroupsContainer { - dbSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in dbSecurityGroupsContainer { - dbSecurityGroupsBuffer?.append(stringContainer0) - } - } - dbSecurityGroups = dbSecurityGroupsBuffer - } else { - dbSecurityGroups = [] - } - } else { - dbSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let preferredBackupWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredBackupWindow) - preferredBackupWindow = preferredBackupWindowDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let storageEncryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .storageEncrypted) - storageEncrypted = storageEncryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - let monitoringIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .monitoringInterval) - monitoringInterval = monitoringIntervalDecoded - let monitoringRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .monitoringRoleArn) - monitoringRoleArn = monitoringRoleArnDecoded - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - let sourceEngineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceEngine) - sourceEngine = sourceEngineDecoded - let sourceEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceEngineVersion) - sourceEngineVersion = sourceEngineVersionDecoded - let s3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3BucketName) - s3BucketName = s3BucketNameDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded - let s3IngestionRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3IngestionRoleArn) - s3IngestionRoleArn = s3IngestionRoleArnDecoded - let enablePerformanceInsightsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enablePerformanceInsights) - enablePerformanceInsights = enablePerformanceInsightsDecoded - let performanceInsightsKMSKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .performanceInsightsKMSKeyId) - performanceInsightsKMSKeyId = performanceInsightsKMSKeyIdDecoded - let performanceInsightsRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .performanceInsightsRetentionPeriod) - performanceInsightsRetentionPeriod = performanceInsightsRetentionPeriodDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let useDefaultProcessorFeaturesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useDefaultProcessorFeatures) - useDefaultProcessorFeatures = useDefaultProcessorFeaturesDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let maxAllocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAllocatedStorage) - maxAllocatedStorage = maxAllocatedStorageDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let manageMasterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterUserPassword) - manageMasterUserPassword = manageMasterUserPasswordDecoded - let masterUserSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserSecretKmsKeyId) - masterUserSecretKmsKeyId = masterUserSecretKmsKeyIdDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - } -} - -extension RestoreDBInstanceFromS3Output: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBInstanceFromS3OutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil - } - } -} - -public struct RestoreDBInstanceFromS3Output: Swift.Equatable { - /// Contains the details of an Amazon RDS DB instance. This data type is used as a response element in the operations CreateDBInstance, CreateDBInstanceReadReplica, DeleteDBInstance, DescribeDBInstances, ModifyDBInstance, PromoteReadReplica, RebootDBInstance, RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceFromS3, RestoreDBInstanceToPointInTime, StartDBInstance, and StopDBInstance. - public var dbInstance: RDSClientTypes.DBInstance? - - public init( - dbInstance: RDSClientTypes.DBInstance? = nil - ) - { - self.dbInstance = dbInstance - } -} - -struct RestoreDBInstanceFromS3OutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension RestoreDBInstanceFromS3OutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBInstanceFromS3Result")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum RestoreDBInstanceFromS3OutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidS3BucketFault": return try await InvalidS3BucketFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RestoreDBInstanceToPointInTimeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allocatedStorage = allocatedStorage { @@ -54187,287 +39806,15 @@ public struct RestoreDBInstanceToPointInTimeInput: Swift.Equatable { } } -struct RestoreDBInstanceToPointInTimeInputBody: Swift.Equatable { - let sourceDBInstanceIdentifier: Swift.String? - let targetDBInstanceIdentifier: Swift.String? - let restoreTime: ClientRuntime.Date? - let useLatestRestorableTime: Swift.Bool? - let dbInstanceClass: Swift.String? - let port: Swift.Int? - let availabilityZone: Swift.String? - let dbSubnetGroupName: Swift.String? - let multiAZ: Swift.Bool? - let publiclyAccessible: Swift.Bool? - let autoMinorVersionUpgrade: Swift.Bool? - let licenseModel: Swift.String? - let dbName: Swift.String? - let engine: Swift.String? - let iops: Swift.Int? - let optionGroupName: Swift.String? - let copyTagsToSnapshot: Swift.Bool? - let tags: [RDSClientTypes.Tag]? - let storageType: Swift.String? - let tdeCredentialArn: Swift.String? - let tdeCredentialPassword: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? - let domain: Swift.String? - let domainIAMRoleName: Swift.String? - let domainFqdn: Swift.String? - let domainOu: Swift.String? - let domainAuthSecretArn: Swift.String? - let domainDnsIps: [Swift.String]? - let enableIAMDatabaseAuthentication: Swift.Bool? - let enableCloudwatchLogsExports: [Swift.String]? - let processorFeatures: [RDSClientTypes.ProcessorFeature]? - let useDefaultProcessorFeatures: Swift.Bool? - let dbParameterGroupName: Swift.String? - let deletionProtection: Swift.Bool? - let sourceDbiResourceId: Swift.String? - let maxAllocatedStorage: Swift.Int? - let sourceDBInstanceAutomatedBackupsArn: Swift.String? - let enableCustomerOwnedIp: Swift.Bool? - let customIamInstanceProfile: Swift.String? - let backupTarget: Swift.String? - let networkType: Swift.String? - let storageThroughput: Swift.Int? - let allocatedStorage: Swift.Int? - let dedicatedLogVolume: Swift.Bool? -} - -extension RestoreDBInstanceToPointInTimeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allocatedStorage = "AllocatedStorage" - case autoMinorVersionUpgrade = "AutoMinorVersionUpgrade" - case availabilityZone = "AvailabilityZone" - case backupTarget = "BackupTarget" - case copyTagsToSnapshot = "CopyTagsToSnapshot" - case customIamInstanceProfile = "CustomIamInstanceProfile" - case dbInstanceClass = "DBInstanceClass" - case dbName = "DBName" - case dbParameterGroupName = "DBParameterGroupName" - case dbSubnetGroupName = "DBSubnetGroupName" - case dedicatedLogVolume = "DedicatedLogVolume" - case deletionProtection = "DeletionProtection" - case domain = "Domain" - case domainAuthSecretArn = "DomainAuthSecretArn" - case domainDnsIps = "DomainDnsIps" - case domainFqdn = "DomainFqdn" - case domainIAMRoleName = "DomainIAMRoleName" - case domainOu = "DomainOu" - case enableCloudwatchLogsExports = "EnableCloudwatchLogsExports" - case enableCustomerOwnedIp = "EnableCustomerOwnedIp" - case enableIAMDatabaseAuthentication = "EnableIAMDatabaseAuthentication" - case engine = "Engine" - case iops = "Iops" - case licenseModel = "LicenseModel" - case maxAllocatedStorage = "MaxAllocatedStorage" - case multiAZ = "MultiAZ" - case networkType = "NetworkType" - case optionGroupName = "OptionGroupName" - case port = "Port" - case processorFeatures = "ProcessorFeatures" - case publiclyAccessible = "PubliclyAccessible" - case restoreTime = "RestoreTime" - case sourceDBInstanceAutomatedBackupsArn = "SourceDBInstanceAutomatedBackupsArn" - case sourceDBInstanceIdentifier = "SourceDBInstanceIdentifier" - case sourceDbiResourceId = "SourceDbiResourceId" - case storageThroughput = "StorageThroughput" - case storageType = "StorageType" - case tags = "Tags" - case targetDBInstanceIdentifier = "TargetDBInstanceIdentifier" - case tdeCredentialArn = "TdeCredentialArn" - case tdeCredentialPassword = "TdeCredentialPassword" - case useDefaultProcessorFeatures = "UseDefaultProcessorFeatures" - case useLatestRestorableTime = "UseLatestRestorableTime" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension RestoreDBInstanceToPointInTimeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBInstanceIdentifier) - sourceDBInstanceIdentifier = sourceDBInstanceIdentifierDecoded - let targetDBInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDBInstanceIdentifier) - targetDBInstanceIdentifier = targetDBInstanceIdentifierDecoded - let restoreTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreTime) - restoreTime = restoreTimeDecoded - let useLatestRestorableTimeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useLatestRestorableTime) - useLatestRestorableTime = useLatestRestorableTimeDecoded - let dbInstanceClassDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceClass) - dbInstanceClass = dbInstanceClassDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let dbSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSubnetGroupName) - dbSubnetGroupName = dbSubnetGroupNameDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let autoMinorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoMinorVersionUpgrade) - autoMinorVersionUpgrade = autoMinorVersionUpgradeDecoded - let licenseModelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .licenseModel) - licenseModel = licenseModelDecoded - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let iopsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .iops) - iops = iopsDecoded - let optionGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .optionGroupName) - optionGroupName = optionGroupNameDecoded - let copyTagsToSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .copyTagsToSnapshot) - copyTagsToSnapshot = copyTagsToSnapshotDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RDSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - let tdeCredentialArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialArn) - tdeCredentialArn = tdeCredentialArnDecoded - let tdeCredentialPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tdeCredentialPassword) - tdeCredentialPassword = tdeCredentialPasswordDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - let domainIAMRoleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainIAMRoleName) - domainIAMRoleName = domainIAMRoleNameDecoded - let domainFqdnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainFqdn) - domainFqdn = domainFqdnDecoded - let domainOuDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainOu) - domainOu = domainOuDecoded - let domainAuthSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domainAuthSecretArn) - domainAuthSecretArn = domainAuthSecretArnDecoded - if containerValues.contains(.domainDnsIps) { - struct KeyVal0{struct member{}} - let domainDnsIpsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .domainDnsIps) - if let domainDnsIpsWrappedContainer = domainDnsIpsWrappedContainer { - let domainDnsIpsContainer = try domainDnsIpsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var domainDnsIpsBuffer:[Swift.String]? = nil - if let domainDnsIpsContainer = domainDnsIpsContainer { - domainDnsIpsBuffer = [Swift.String]() - for stringContainer0 in domainDnsIpsContainer { - domainDnsIpsBuffer?.append(stringContainer0) - } - } - domainDnsIps = domainDnsIpsBuffer - } else { - domainDnsIps = [] - } - } else { - domainDnsIps = nil - } - let enableIAMDatabaseAuthenticationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableIAMDatabaseAuthentication) - enableIAMDatabaseAuthentication = enableIAMDatabaseAuthenticationDecoded - if containerValues.contains(.enableCloudwatchLogsExports) { - struct KeyVal0{struct member{}} - let enableCloudwatchLogsExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .enableCloudwatchLogsExports) - if let enableCloudwatchLogsExportsWrappedContainer = enableCloudwatchLogsExportsWrappedContainer { - let enableCloudwatchLogsExportsContainer = try enableCloudwatchLogsExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var enableCloudwatchLogsExportsBuffer:[Swift.String]? = nil - if let enableCloudwatchLogsExportsContainer = enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer = [Swift.String]() - for stringContainer0 in enableCloudwatchLogsExportsContainer { - enableCloudwatchLogsExportsBuffer?.append(stringContainer0) - } - } - enableCloudwatchLogsExports = enableCloudwatchLogsExportsBuffer - } else { - enableCloudwatchLogsExports = [] - } - } else { - enableCloudwatchLogsExports = nil - } - if containerValues.contains(.processorFeatures) { - struct KeyVal0{struct ProcessorFeature{}} - let processorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .processorFeatures) - if let processorFeaturesWrappedContainer = processorFeaturesWrappedContainer { - let processorFeaturesContainer = try processorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.ProcessorFeature].self, forKey: .member) - var processorFeaturesBuffer:[RDSClientTypes.ProcessorFeature]? = nil - if let processorFeaturesContainer = processorFeaturesContainer { - processorFeaturesBuffer = [RDSClientTypes.ProcessorFeature]() - for structureContainer0 in processorFeaturesContainer { - processorFeaturesBuffer?.append(structureContainer0) - } - } - processorFeatures = processorFeaturesBuffer - } else { - processorFeatures = [] - } - } else { - processorFeatures = nil - } - let useDefaultProcessorFeaturesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .useDefaultProcessorFeatures) - useDefaultProcessorFeatures = useDefaultProcessorFeaturesDecoded - let dbParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbParameterGroupName) - dbParameterGroupName = dbParameterGroupNameDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let sourceDbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDbiResourceId) - sourceDbiResourceId = sourceDbiResourceIdDecoded - let maxAllocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAllocatedStorage) - maxAllocatedStorage = maxAllocatedStorageDecoded - let sourceDBInstanceAutomatedBackupsArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBInstanceAutomatedBackupsArn) - sourceDBInstanceAutomatedBackupsArn = sourceDBInstanceAutomatedBackupsArnDecoded - let enableCustomerOwnedIpDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableCustomerOwnedIp) - enableCustomerOwnedIp = enableCustomerOwnedIpDecoded - let customIamInstanceProfileDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customIamInstanceProfile) - customIamInstanceProfile = customIamInstanceProfileDecoded - let backupTargetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .backupTarget) - backupTarget = backupTargetDecoded - let networkTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkType) - networkType = networkTypeDecoded - let storageThroughputDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .storageThroughput) - storageThroughput = storageThroughputDecoded - let allocatedStorageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .allocatedStorage) - allocatedStorage = allocatedStorageDecoded - let dedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dedicatedLogVolume) - dedicatedLogVolume = dedicatedLogVolumeDecoded - } -} - -extension RestoreDBInstanceToPointInTimeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreDBInstanceToPointInTimeOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreDBInstanceToPointInTimeResult"] + var value = RestoreDBInstanceToPointInTimeOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -54484,57 +39831,47 @@ public struct RestoreDBInstanceToPointInTimeOutput: Swift.Equatable { } } -struct RestoreDBInstanceToPointInTimeOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension RestoreDBInstanceToPointInTimeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreDBInstanceToPointInTimeResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum RestoreDBInstanceToPointInTimeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceAutomatedBackupNotFound": return try await DBInstanceAutomatedBackupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DomainNotFoundFault": return try await DomainNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestoreFault": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PointInTimeRestoreNotEnabled": return try await PointInTimeRestoreNotEnabledFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageQuotaExceeded": return try await StorageQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RDSClientTypes.RestoreWindow: Swift.Codable { +enum RestoreDBInstanceToPointInTimeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "BackupPolicyNotFoundFault": return try await BackupPolicyNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAlreadyExists": return try await DBInstanceAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceAutomatedBackupNotFound": return try await DBInstanceAutomatedBackupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBParameterGroupNotFound": return try await DBParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DomainNotFoundFault": return try await DomainNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InstanceQuotaExceeded": return try await InstanceQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestoreFault": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NetworkTypeNotSupported": return try await NetworkTypeNotSupported.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptionGroupNotFoundFault": return try await OptionGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PointInTimeRestoreNotEnabled": return try await PointInTimeRestoreNotEnabledFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProvisionedIopsNotAvailableInAZFault": return try await ProvisionedIopsNotAvailableInAZFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageQuotaExceeded": return try await StorageQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TenantDatabaseQuotaExceeded": return try await TenantDatabaseQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } +} + +extension RDSClientTypes.RestoreWindow: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case earliestTime = "EarliestTime" case latestTime = "LatestTime" @@ -54550,12 +39887,14 @@ extension RDSClientTypes.RestoreWindow: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let earliestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .earliestTime) - earliestTime = earliestTimeDecoded - let latestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .latestTime) - latestTime = latestTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.RestoreWindow() + value.earliestTime = try reader["EarliestTime"].readTimestampIfPresent(format: .dateTime) + value.latestTime = try reader["LatestTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -54580,6 +39919,14 @@ extension RDSClientTypes { } extension RevokeDBSecurityGroupIngressInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cidrip = "CIDRIP" + case dbSecurityGroupName = "DBSecurityGroupName" + case ec2SecurityGroupId = "EC2SecurityGroupId" + case ec2SecurityGroupName = "EC2SecurityGroupName" + case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cidrip = cidrip { @@ -54639,46 +39986,15 @@ public struct RevokeDBSecurityGroupIngressInput: Swift.Equatable { } } -struct RevokeDBSecurityGroupIngressInputBody: Swift.Equatable { - let dbSecurityGroupName: Swift.String? - let cidrip: Swift.String? - let ec2SecurityGroupName: Swift.String? - let ec2SecurityGroupId: Swift.String? - let ec2SecurityGroupOwnerId: Swift.String? -} +extension RevokeDBSecurityGroupIngressOutput { -extension RevokeDBSecurityGroupIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrip = "CIDRIP" - case dbSecurityGroupName = "DBSecurityGroupName" - case ec2SecurityGroupId = "EC2SecurityGroupId" - case ec2SecurityGroupName = "EC2SecurityGroupName" - case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSecurityGroupName) - dbSecurityGroupName = dbSecurityGroupNameDecoded - let cidripDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrip) - cidrip = cidripDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupId) - ec2SecurityGroupId = ec2SecurityGroupIdDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded - } -} - -extension RevokeDBSecurityGroupIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RevokeDBSecurityGroupIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.dbSecurityGroup = output.dbSecurityGroup - } else { - self.dbSecurityGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RevokeDBSecurityGroupIngressResult"] + var value = RevokeDBSecurityGroupIngressOutput() + value.dbSecurityGroup = try reader["DBSecurityGroup"].readIfPresent(readingClosure: RDSClientTypes.DBSecurityGroup.readingClosure) + return value } } } @@ -54695,46 +40011,34 @@ public struct RevokeDBSecurityGroupIngressOutput: Swift.Equatable { } } -struct RevokeDBSecurityGroupIngressOutputBody: Swift.Equatable { - let dbSecurityGroup: RDSClientTypes.DBSecurityGroup? -} +enum RevokeDBSecurityGroupIngressOutputError { -extension RevokeDBSecurityGroupIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbSecurityGroup = "DBSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RevokeDBSecurityGroupIngressResult")) - let dbSecurityGroupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBSecurityGroup.self, forKey: .dbSecurityGroup) - dbSecurityGroup = dbSecurityGroupDecoded - } -} - -enum RevokeDBSecurityGroupIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSecurityGroupNotFound": return try await DBSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBSecurityGroupState": return try await InvalidDBSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SNSInvalidTopicFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSInvalidTopicFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -54762,33 +40066,15 @@ public struct SNSInvalidTopicFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct SNSInvalidTopicFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSInvalidTopicFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSNoAuthorizationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSNoAuthorizationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -54816,33 +40102,15 @@ public struct SNSNoAuthorizationFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct SNSNoAuthorizationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSNoAuthorizationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSTopicArnNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSTopicArnNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -54870,23 +40138,7 @@ public struct SNSTopicArnNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct SNSTopicArnNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSTopicArnNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.ScalarReferenceDetails: Swift.Codable { +extension RDSClientTypes.ScalarReferenceDetails: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case value = "Value" } @@ -54898,10 +40150,13 @@ extension RDSClientTypes.ScalarReferenceDetails: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ScalarReferenceDetails() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -54921,7 +40176,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ScalingConfiguration: Swift.Codable { +extension RDSClientTypes.ScalingConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoPause = "AutoPause" case maxCapacity = "MaxCapacity" @@ -54953,20 +40208,18 @@ extension RDSClientTypes.ScalingConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minCapacity) - minCapacity = minCapacityDecoded - let maxCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxCapacity) - maxCapacity = maxCapacityDecoded - let autoPauseDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoPause) - autoPause = autoPauseDecoded - let secondsUntilAutoPauseDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondsUntilAutoPause) - secondsUntilAutoPause = secondsUntilAutoPauseDecoded - let timeoutActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timeoutAction) - timeoutAction = timeoutActionDecoded - let secondsBeforeTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondsBeforeTimeout) - secondsBeforeTimeout = secondsBeforeTimeoutDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ScalingConfiguration() + value.minCapacity = try reader["MinCapacity"].readIfPresent() + value.maxCapacity = try reader["MaxCapacity"].readIfPresent() + value.autoPause = try reader["AutoPause"].readIfPresent() + value.secondsUntilAutoPause = try reader["SecondsUntilAutoPause"].readIfPresent() + value.timeoutAction = try reader["TimeoutAction"].readIfPresent() + value.secondsBeforeTimeout = try reader["SecondsBeforeTimeout"].readIfPresent() + return value + } } } @@ -55006,7 +40259,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ScalingConfigurationInfo: Swift.Codable { +extension RDSClientTypes.ScalingConfigurationInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoPause = "AutoPause" case maxCapacity = "MaxCapacity" @@ -55038,20 +40291,18 @@ extension RDSClientTypes.ScalingConfigurationInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minCapacity) - minCapacity = minCapacityDecoded - let maxCapacityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxCapacity) - maxCapacity = maxCapacityDecoded - let autoPauseDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoPause) - autoPause = autoPauseDecoded - let secondsUntilAutoPauseDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondsUntilAutoPause) - secondsUntilAutoPause = secondsUntilAutoPauseDecoded - let timeoutActionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timeoutAction) - timeoutAction = timeoutActionDecoded - let secondsBeforeTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .secondsBeforeTimeout) - secondsBeforeTimeout = secondsBeforeTimeoutDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ScalingConfigurationInfo() + value.minCapacity = try reader["MinCapacity"].readIfPresent() + value.maxCapacity = try reader["MaxCapacity"].readIfPresent() + value.autoPause = try reader["AutoPause"].readIfPresent() + value.secondsUntilAutoPause = try reader["SecondsUntilAutoPause"].readIfPresent() + value.timeoutAction = try reader["TimeoutAction"].readIfPresent() + value.secondsBeforeTimeout = try reader["SecondsBeforeTimeout"].readIfPresent() + return value + } } } @@ -55091,7 +40342,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ServerlessV2ScalingConfiguration: Swift.Codable { +extension RDSClientTypes.ServerlessV2ScalingConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maxCapacity = "MaxCapacity" case minCapacity = "MinCapacity" @@ -55107,12 +40358,14 @@ extension RDSClientTypes.ServerlessV2ScalingConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minCapacity) - minCapacity = minCapacityDecoded - let maxCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxCapacity) - maxCapacity = maxCapacityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ServerlessV2ScalingConfiguration() + value.minCapacity = try reader["MinCapacity"].readIfPresent() + value.maxCapacity = try reader["MaxCapacity"].readIfPresent() + return value + } } } @@ -55136,7 +40389,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ServerlessV2ScalingConfigurationInfo: Swift.Codable { +extension RDSClientTypes.ServerlessV2ScalingConfigurationInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case maxCapacity = "MaxCapacity" case minCapacity = "MinCapacity" @@ -55152,12 +40405,14 @@ extension RDSClientTypes.ServerlessV2ScalingConfigurationInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minCapacity) - minCapacity = minCapacityDecoded - let maxCapacityDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxCapacity) - maxCapacity = maxCapacityDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ServerlessV2ScalingConfigurationInfo() + value.minCapacity = try reader["MinCapacity"].readIfPresent() + value.maxCapacity = try reader["MaxCapacity"].readIfPresent() + return value + } } } @@ -55182,16 +40437,14 @@ extension RDSClientTypes { } extension SharedSnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SharedSnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -55219,33 +40472,15 @@ public struct SharedSnapshotQuotaExceededFault: ClientRuntime.ModeledError, AWSC } } -struct SharedSnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SharedSnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -55273,33 +40508,15 @@ public struct SnapshotQuotaExceededFault: ClientRuntime.ModeledError, AWSClientR } } -struct SnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SourceClusterNotSupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SourceClusterNotSupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -55327,33 +40544,15 @@ public struct SourceClusterNotSupportedFault: ClientRuntime.ModeledError, AWSCli } } -struct SourceClusterNotSupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SourceClusterNotSupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SourceDatabaseNotSupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SourceDatabaseNotSupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -55381,33 +40580,15 @@ public struct SourceDatabaseNotSupportedFault: ClientRuntime.ModeledError, AWSCl } } -struct SourceDatabaseNotSupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SourceDatabaseNotSupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SourceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SourceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -55435,23 +40616,7 @@ public struct SourceNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct SourceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SourceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.SourceRegion: Swift.Codable { +extension RDSClientTypes.SourceRegion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case endpoint = "Endpoint" case regionName = "RegionName" @@ -55475,16 +40640,16 @@ extension RDSClientTypes.SourceRegion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .regionName) - regionName = regionNameDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let supportsDBInstanceAutomatedBackupsReplicationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsDBInstanceAutomatedBackupsReplication) - supportsDBInstanceAutomatedBackupsReplication = supportsDBInstanceAutomatedBackupsReplicationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.SourceRegion() + value.regionName = try reader["RegionName"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.supportsDBInstanceAutomatedBackupsReplication = try reader["SupportsDBInstanceAutomatedBackupsReplication"].readIfPresent() + return value + } } } @@ -55570,6 +40735,14 @@ extension RDSClientTypes { } extension StartActivityStreamInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case engineNativeAuditFieldsIncluded = "EngineNativeAuditFieldsIncluded" + case kmsKeyId = "KmsKeyId" + case mode = "Mode" + case resourceArn = "ResourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -55630,56 +40803,20 @@ public struct StartActivityStreamInput: Swift.Equatable { } } -struct StartActivityStreamInputBody: Swift.Equatable { - let resourceArn: Swift.String? - let mode: RDSClientTypes.ActivityStreamMode? - let kmsKeyId: Swift.String? - let applyImmediately: Swift.Bool? - let engineNativeAuditFieldsIncluded: Swift.Bool? -} +extension StartActivityStreamOutput { -extension StartActivityStreamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case engineNativeAuditFieldsIncluded = "EngineNativeAuditFieldsIncluded" - case kmsKeyId = "KmsKeyId" - case mode = "Mode" - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let modeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamMode.self, forKey: .mode) - mode = modeDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let engineNativeAuditFieldsIncludedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .engineNativeAuditFieldsIncluded) - engineNativeAuditFieldsIncluded = engineNativeAuditFieldsIncludedDecoded - } -} - -extension StartActivityStreamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartActivityStreamOutputBody = try responseDecoder.decode(responseBody: data) - self.applyImmediately = output.applyImmediately - self.engineNativeAuditFieldsIncluded = output.engineNativeAuditFieldsIncluded - self.kinesisStreamName = output.kinesisStreamName - self.kmsKeyId = output.kmsKeyId - self.mode = output.mode - self.status = output.status - } else { - self.applyImmediately = nil - self.engineNativeAuditFieldsIncluded = nil - self.kinesisStreamName = nil - self.kmsKeyId = nil - self.mode = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartActivityStreamResult"] + var value = StartActivityStreamOutput() + value.applyImmediately = try reader["ApplyImmediately"].readIfPresent() + value.engineNativeAuditFieldsIncluded = try reader["EngineNativeAuditFieldsIncluded"].readIfPresent() + value.kinesisStreamName = try reader["KinesisStreamName"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.mode = try reader["Mode"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -55716,59 +40853,33 @@ public struct StartActivityStreamOutput: Swift.Equatable { } } -struct StartActivityStreamOutputBody: Swift.Equatable { - let kmsKeyId: Swift.String? - let kinesisStreamName: Swift.String? - let status: RDSClientTypes.ActivityStreamStatus? - let mode: RDSClientTypes.ActivityStreamMode? - let applyImmediately: Swift.Bool? - let engineNativeAuditFieldsIncluded: Swift.Bool? -} - -extension StartActivityStreamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case engineNativeAuditFieldsIncluded = "EngineNativeAuditFieldsIncluded" - case kinesisStreamName = "KinesisStreamName" - case kmsKeyId = "KmsKeyId" - case mode = "Mode" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartActivityStreamResult")) - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let kinesisStreamNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kinesisStreamName) - kinesisStreamName = kinesisStreamNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamStatus.self, forKey: .status) - status = statusDecoded - let modeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamMode.self, forKey: .mode) - mode = modeDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - let engineNativeAuditFieldsIncludedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .engineNativeAuditFieldsIncluded) - engineNativeAuditFieldsIncluded = engineNativeAuditFieldsIncludedDecoded - } -} +enum StartActivityStreamOutputError { -enum StartActivityStreamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StartDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -55799,30 +40910,15 @@ public struct StartDBClusterInput: Swift.Equatable { } } -struct StartDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} - -extension StartDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } +extension StartDBClusterOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} - -extension StartDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartDBClusterResult"] + var value = StartDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -55839,36 +40935,33 @@ public struct StartDBClusterOutput: Swift.Equatable { } } -struct StartDBClusterOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} - -extension StartDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} +enum StartDBClusterOutputError { -enum StartDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StartDBInstanceAutomatedBackupsReplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case backupRetentionPeriod = "BackupRetentionPeriod" + case kmsKeyId = "KmsKeyId" + case preSignedUrl = "PreSignedUrl" + case sourceDBInstanceArn = "SourceDBInstanceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let backupRetentionPeriod = backupRetentionPeriod { @@ -55920,42 +41013,15 @@ public struct StartDBInstanceAutomatedBackupsReplicationInput: Swift.Equatable { } } -struct StartDBInstanceAutomatedBackupsReplicationInputBody: Swift.Equatable { - let sourceDBInstanceArn: Swift.String? - let backupRetentionPeriod: Swift.Int? - let kmsKeyId: Swift.String? - let preSignedUrl: Swift.String? -} +extension StartDBInstanceAutomatedBackupsReplicationOutput { -extension StartDBInstanceAutomatedBackupsReplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case backupRetentionPeriod = "BackupRetentionPeriod" - case kmsKeyId = "KmsKeyId" - case preSignedUrl = "PreSignedUrl" - case sourceDBInstanceArn = "SourceDBInstanceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBInstanceArn) - sourceDBInstanceArn = sourceDBInstanceArnDecoded - let backupRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .backupRetentionPeriod) - backupRetentionPeriod = backupRetentionPeriodDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let preSignedUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preSignedUrl) - preSignedUrl = preSignedUrlDecoded - } -} - -extension StartDBInstanceAutomatedBackupsReplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartDBInstanceAutomatedBackupsReplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstanceAutomatedBackup = output.dbInstanceAutomatedBackup - } else { - self.dbInstanceAutomatedBackup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartDBInstanceAutomatedBackupsReplicationResult"] + var value = StartDBInstanceAutomatedBackupsReplicationOutput() + value.dbInstanceAutomatedBackup = try reader["DBInstanceAutomatedBackup"].readIfPresent(readingClosure: RDSClientTypes.DBInstanceAutomatedBackup.readingClosure) + return value } } } @@ -55972,38 +41038,32 @@ public struct StartDBInstanceAutomatedBackupsReplicationOutput: Swift.Equatable } } -struct StartDBInstanceAutomatedBackupsReplicationOutputBody: Swift.Equatable { - let dbInstanceAutomatedBackup: RDSClientTypes.DBInstanceAutomatedBackup? -} - -extension StartDBInstanceAutomatedBackupsReplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceAutomatedBackup = "DBInstanceAutomatedBackup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartDBInstanceAutomatedBackupsReplicationResult")) - let dbInstanceAutomatedBackupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstanceAutomatedBackup.self, forKey: .dbInstanceAutomatedBackup) - dbInstanceAutomatedBackup = dbInstanceAutomatedBackupDecoded - } -} +enum StartDBInstanceAutomatedBackupsReplicationOutputError { -enum StartDBInstanceAutomatedBackupsReplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceAutomatedBackupQuotaExceeded": return try await DBInstanceAutomatedBackupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceAutomatedBackupQuotaExceeded": return try await DBInstanceAutomatedBackupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StorageTypeNotSupported": return try await StorageTypeNotSupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StartDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -56034,30 +41094,15 @@ public struct StartDBInstanceInput: Swift.Equatable { } } -struct StartDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? -} +extension StartDBInstanceOutput { -extension StartDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - } -} - -extension StartDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartDBInstanceResult"] + var value = StartDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -56074,44 +41119,44 @@ public struct StartDBInstanceOutput: Swift.Equatable { } } -struct StartDBInstanceOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension StartDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum StartDBInstanceOutputError { -enum StartDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupDoesNotCoverEnoughAZs": return try await DBSubnetGroupDoesNotCoverEnoughAZs.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSubnetGroupNotFoundFault": return try await DBSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientDBInstanceCapacity": return try await InsufficientDBInstanceCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StartExportTaskInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case exportOnly = "ExportOnly" + case exportTaskIdentifier = "ExportTaskIdentifier" + case iamRoleArn = "IamRoleArn" + case kmsKeyId = "KmsKeyId" + case s3BucketName = "S3BucketName" + case s3Prefix = "S3Prefix" + case sourceArn = "SourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let exportOnly = exportOnly { @@ -56240,101 +41285,30 @@ public struct StartExportTaskInput: Swift.Equatable { } } -struct StartExportTaskInputBody: Swift.Equatable { - let exportTaskIdentifier: Swift.String? - let sourceArn: Swift.String? - let s3BucketName: Swift.String? - let iamRoleArn: Swift.String? - let kmsKeyId: Swift.String? - let s3Prefix: Swift.String? - let exportOnly: [Swift.String]? -} - -extension StartExportTaskInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportOnly = "ExportOnly" - case exportTaskIdentifier = "ExportTaskIdentifier" - case iamRoleArn = "IamRoleArn" - case kmsKeyId = "KmsKeyId" - case s3BucketName = "S3BucketName" - case s3Prefix = "S3Prefix" - case sourceArn = "SourceArn" - } +extension StartExportTaskOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let exportTaskIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportTaskIdentifier) - exportTaskIdentifier = exportTaskIdentifierDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let s3BucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3BucketName) - s3BucketName = s3BucketNameDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded - if containerValues.contains(.exportOnly) { - struct KeyVal0{struct member{}} - let exportOnlyWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportOnly) - if let exportOnlyWrappedContainer = exportOnlyWrappedContainer { - let exportOnlyContainer = try exportOnlyWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportOnlyBuffer:[Swift.String]? = nil - if let exportOnlyContainer = exportOnlyContainer { - exportOnlyBuffer = [Swift.String]() - for stringContainer0 in exportOnlyContainer { - exportOnlyBuffer?.append(stringContainer0) - } - } - exportOnly = exportOnlyBuffer - } else { - exportOnly = [] - } - } else { - exportOnly = nil - } - } -} - -extension StartExportTaskOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StartExportTaskOutputBody = try responseDecoder.decode(responseBody: data) - self.exportOnly = output.exportOnly - self.exportTaskIdentifier = output.exportTaskIdentifier - self.failureCause = output.failureCause - self.iamRoleArn = output.iamRoleArn - self.kmsKeyId = output.kmsKeyId - self.percentProgress = output.percentProgress - self.s3Bucket = output.s3Bucket - self.s3Prefix = output.s3Prefix - self.snapshotTime = output.snapshotTime - self.sourceArn = output.sourceArn - self.sourceType = output.sourceType - self.status = output.status - self.taskEndTime = output.taskEndTime - self.taskStartTime = output.taskStartTime - self.totalExtractedDataInGB = output.totalExtractedDataInGB - self.warningMessage = output.warningMessage - } else { - self.exportOnly = nil - self.exportTaskIdentifier = nil - self.failureCause = nil - self.iamRoleArn = nil - self.kmsKeyId = nil - self.percentProgress = nil - self.s3Bucket = nil - self.s3Prefix = nil - self.snapshotTime = nil - self.sourceArn = nil - self.sourceType = nil - self.status = nil - self.taskEndTime = nil - self.taskStartTime = nil - self.totalExtractedDataInGB = nil - self.warningMessage = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StartExportTaskResult"] + var value = StartExportTaskOutput() + value.exportOnly = try reader["ExportOnly"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.exportTaskIdentifier = try reader["ExportTaskIdentifier"].readIfPresent() + value.failureCause = try reader["FailureCause"].readIfPresent() + value.iamRoleArn = try reader["IamRoleArn"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.percentProgress = try reader["PercentProgress"].readIfPresent() + value.s3Bucket = try reader["S3Bucket"].readIfPresent() + value.s3Prefix = try reader["S3Prefix"].readIfPresent() + value.snapshotTime = try reader["SnapshotTime"].readTimestampIfPresent(format: .dateTime) + value.sourceArn = try reader["SourceArn"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.taskEndTime = try reader["TaskEndTime"].readTimestampIfPresent(format: .dateTime) + value.taskStartTime = try reader["TaskStartTime"].readTimestampIfPresent(format: .dateTime) + value.totalExtractedDataInGB = try reader["TotalExtractedDataInGB"].readIfPresent() + value.warningMessage = try reader["WarningMessage"].readIfPresent() + return value } } } @@ -56432,120 +41406,38 @@ public struct StartExportTaskOutput: Swift.Equatable { } } -struct StartExportTaskOutputBody: Swift.Equatable { - let exportTaskIdentifier: Swift.String? - let sourceArn: Swift.String? - let exportOnly: [Swift.String]? - let snapshotTime: ClientRuntime.Date? - let taskStartTime: ClientRuntime.Date? - let taskEndTime: ClientRuntime.Date? - let s3Bucket: Swift.String? - let s3Prefix: Swift.String? - let iamRoleArn: Swift.String? - let kmsKeyId: Swift.String? - let status: Swift.String? - let percentProgress: Swift.Int? - let totalExtractedDataInGB: Swift.Int? - let failureCause: Swift.String? - let warningMessage: Swift.String? - let sourceType: RDSClientTypes.ExportSourceType? -} - -extension StartExportTaskOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exportOnly = "ExportOnly" - case exportTaskIdentifier = "ExportTaskIdentifier" - case failureCause = "FailureCause" - case iamRoleArn = "IamRoleArn" - case kmsKeyId = "KmsKeyId" - case percentProgress = "PercentProgress" - case s3Bucket = "S3Bucket" - case s3Prefix = "S3Prefix" - case snapshotTime = "SnapshotTime" - case sourceArn = "SourceArn" - case sourceType = "SourceType" - case status = "Status" - case taskEndTime = "TaskEndTime" - case taskStartTime = "TaskStartTime" - case totalExtractedDataInGB = "TotalExtractedDataInGB" - case warningMessage = "WarningMessage" - } +enum StartExportTaskOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartExportTaskResult")) - let exportTaskIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .exportTaskIdentifier) - exportTaskIdentifier = exportTaskIdentifierDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - if containerValues.contains(.exportOnly) { - struct KeyVal0{struct member{}} - let exportOnlyWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exportOnly) - if let exportOnlyWrappedContainer = exportOnlyWrappedContainer { - let exportOnlyContainer = try exportOnlyWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var exportOnlyBuffer:[Swift.String]? = nil - if let exportOnlyContainer = exportOnlyContainer { - exportOnlyBuffer = [Swift.String]() - for stringContainer0 in exportOnlyContainer { - exportOnlyBuffer?.append(stringContainer0) - } - } - exportOnly = exportOnlyBuffer - } else { - exportOnly = [] - } - } else { - exportOnly = nil - } - let snapshotTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotTime) - snapshotTime = snapshotTimeDecoded - let taskStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .taskStartTime) - taskStartTime = taskStartTimeDecoded - let taskEndTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .taskEndTime) - taskEndTime = taskEndTimeDecoded - let s3BucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Bucket) - s3Bucket = s3BucketDecoded - let s3PrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3Prefix) - s3Prefix = s3PrefixDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let percentProgressDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .percentProgress) - percentProgress = percentProgressDecoded - let totalExtractedDataInGBDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalExtractedDataInGB) - totalExtractedDataInGB = totalExtractedDataInGBDecoded - let failureCauseDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureCause) - failureCause = failureCauseDecoded - let warningMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .warningMessage) - warningMessage = warningMessageDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ExportSourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - } -} - -enum StartExportTaskOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ExportTaskAlreadyExists": return try await ExportTaskAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IamRoleMissingPermissions": return try await IamRoleMissingPermissionsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IamRoleNotFound": return try await IamRoleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidExportOnly": return try await InvalidExportOnlyFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidExportSourceState": return try await InvalidExportSourceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidS3BucketFault": return try await InvalidS3BucketFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBClusterSnapshotNotFoundFault": return try await DBClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotNotFound": return try await DBSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ExportTaskAlreadyExists": return try await ExportTaskAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IamRoleMissingPermissions": return try await IamRoleMissingPermissionsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IamRoleNotFound": return try await IamRoleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidExportOnly": return try await InvalidExportOnlyFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidExportSourceState": return try await InvalidExportSourceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidS3BucketFault": return try await InvalidS3BucketFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSKeyNotAccessibleFault": return try await KMSKeyNotAccessibleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StopActivityStreamInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case applyImmediately = "ApplyImmediately" + case resourceArn = "ResourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let applyImmediately = applyImmediately { @@ -56583,38 +41475,17 @@ public struct StopActivityStreamInput: Swift.Equatable { } } -struct StopActivityStreamInputBody: Swift.Equatable { - let resourceArn: Swift.String? - let applyImmediately: Swift.Bool? -} - -extension StopActivityStreamInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyImmediately = "ApplyImmediately" - case resourceArn = "ResourceArn" - } +extension StopActivityStreamOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let applyImmediatelyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .applyImmediately) - applyImmediately = applyImmediatelyDecoded - } -} - -extension StopActivityStreamOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StopActivityStreamOutputBody = try responseDecoder.decode(responseBody: data) - self.kinesisStreamName = output.kinesisStreamName - self.kmsKeyId = output.kmsKeyId - self.status = output.status - } else { - self.kinesisStreamName = nil - self.kmsKeyId = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StopActivityStreamResult"] + var value = StopActivityStreamOutput() + value.kinesisStreamName = try reader["KinesisStreamName"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -56639,46 +41510,32 @@ public struct StopActivityStreamOutput: Swift.Equatable { } } -struct StopActivityStreamOutputBody: Swift.Equatable { - let kmsKeyId: Swift.String? - let kinesisStreamName: Swift.String? - let status: RDSClientTypes.ActivityStreamStatus? -} +enum StopActivityStreamOutputError { -extension StopActivityStreamOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kinesisStreamName = "KinesisStreamName" - case kmsKeyId = "KmsKeyId" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StopActivityStreamResult")) - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let kinesisStreamNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kinesisStreamName) - kinesisStreamName = kinesisStreamNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ActivityStreamStatus.self, forKey: .status) - status = statusDecoded - } -} - -enum StopActivityStreamOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StopDBClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbClusterIdentifier = "DBClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbClusterIdentifier = dbClusterIdentifier { @@ -56709,30 +41566,15 @@ public struct StopDBClusterInput: Swift.Equatable { } } -struct StopDBClusterInputBody: Swift.Equatable { - let dbClusterIdentifier: Swift.String? -} - -extension StopDBClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbClusterIdentifier = "DBClusterIdentifier" - } +extension StopDBClusterOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbClusterIdentifier) - dbClusterIdentifier = dbClusterIdentifierDecoded - } -} - -extension StopDBClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StopDBClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.dbCluster = output.dbCluster - } else { - self.dbCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StopDBClusterResult"] + var value = StopDBClusterOutput() + value.dbCluster = try reader["DBCluster"].readIfPresent(readingClosure: RDSClientTypes.DBCluster.readingClosure) + return value } } } @@ -56749,36 +41591,30 @@ public struct StopDBClusterOutput: Swift.Equatable { } } -struct StopDBClusterOutputBody: Swift.Equatable { - let dbCluster: RDSClientTypes.DBCluster? -} +enum StopDBClusterOutputError { -extension StopDBClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbCluster = "DBCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StopDBClusterResult")) - let dbClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBCluster.self, forKey: .dbCluster) - dbCluster = dbClusterDecoded - } -} - -enum StopDBClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StopDBInstanceAutomatedBackupsReplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceDBInstanceArn = "SourceDBInstanceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceDBInstanceArn = sourceDBInstanceArn { @@ -56809,30 +41645,15 @@ public struct StopDBInstanceAutomatedBackupsReplicationInput: Swift.Equatable { } } -struct StopDBInstanceAutomatedBackupsReplicationInputBody: Swift.Equatable { - let sourceDBInstanceArn: Swift.String? -} +extension StopDBInstanceAutomatedBackupsReplicationOutput { -extension StopDBInstanceAutomatedBackupsReplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceDBInstanceArn = "SourceDBInstanceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDBInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDBInstanceArn) - sourceDBInstanceArn = sourceDBInstanceArnDecoded - } -} - -extension StopDBInstanceAutomatedBackupsReplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StopDBInstanceAutomatedBackupsReplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstanceAutomatedBackup = output.dbInstanceAutomatedBackup - } else { - self.dbInstanceAutomatedBackup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StopDBInstanceAutomatedBackupsReplicationResult"] + var value = StopDBInstanceAutomatedBackupsReplicationOutput() + value.dbInstanceAutomatedBackup = try reader["DBInstanceAutomatedBackup"].readIfPresent(readingClosure: RDSClientTypes.DBInstanceAutomatedBackup.readingClosure) + return value } } } @@ -56849,35 +41670,30 @@ public struct StopDBInstanceAutomatedBackupsReplicationOutput: Swift.Equatable { } } -struct StopDBInstanceAutomatedBackupsReplicationOutputBody: Swift.Equatable { - let dbInstanceAutomatedBackup: RDSClientTypes.DBInstanceAutomatedBackup? -} - -extension StopDBInstanceAutomatedBackupsReplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceAutomatedBackup = "DBInstanceAutomatedBackup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StopDBInstanceAutomatedBackupsReplicationResult")) - let dbInstanceAutomatedBackupDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstanceAutomatedBackup.self, forKey: .dbInstanceAutomatedBackup) - dbInstanceAutomatedBackup = dbInstanceAutomatedBackupDecoded - } -} +enum StopDBInstanceAutomatedBackupsReplicationOutputError { -enum StopDBInstanceAutomatedBackupsReplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StopDBInstanceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + case dbSnapshotIdentifier = "DBSnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -56915,34 +41731,15 @@ public struct StopDBInstanceInput: Swift.Equatable { } } -struct StopDBInstanceInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? - let dbSnapshotIdentifier: Swift.String? -} +extension StopDBInstanceOutput { -extension StopDBInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - case dbSnapshotIdentifier = "DBSnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let dbSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbSnapshotIdentifier) - dbSnapshotIdentifier = dbSnapshotIdentifierDecoded - } -} - -extension StopDBInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: StopDBInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["StopDBInstanceResult"] + var value = StopDBInstanceOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -56959,48 +41756,36 @@ public struct StopDBInstanceOutput: Swift.Equatable { } } -struct StopDBInstanceOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension StopDBInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StopDBInstanceResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} +enum StopDBInstanceOutputError { -enum StopDBInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DBSnapshotAlreadyExists": return try await DBSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotQuotaExceeded": return try await SnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StorageQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StorageQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -57028,33 +41813,15 @@ public struct StorageQuotaExceededFault: ClientRuntime.ModeledError, AWSClientRu } } -struct StorageQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension StorageQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension StorageTypeNotAvailableFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StorageTypeNotAvailableFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -57082,33 +41849,15 @@ public struct StorageTypeNotAvailableFault: ClientRuntime.ModeledError, AWSClien } } -struct StorageTypeNotAvailableFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension StorageTypeNotAvailableFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension StorageTypeNotSupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StorageTypeNotSupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -57136,23 +41885,7 @@ public struct StorageTypeNotSupportedFault: ClientRuntime.ModeledError, AWSClien } } -struct StorageTypeNotSupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension StorageTypeNotSupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.Subnet: Swift.Codable { +extension RDSClientTypes.Subnet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case subnetAvailabilityZone = "SubnetAvailabilityZone" case subnetIdentifier = "SubnetIdentifier" @@ -57176,16 +41909,16 @@ extension RDSClientTypes.Subnet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetIdentifier) - subnetIdentifier = subnetIdentifierDecoded - let subnetAvailabilityZoneDecoded = try containerValues.decodeIfPresent(RDSClientTypes.AvailabilityZone.self, forKey: .subnetAvailabilityZone) - subnetAvailabilityZone = subnetAvailabilityZoneDecoded - let subnetOutpostDecoded = try containerValues.decodeIfPresent(RDSClientTypes.Outpost.self, forKey: .subnetOutpost) - subnetOutpost = subnetOutpostDecoded - let subnetStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetStatus) - subnetStatus = subnetStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Subnet() + value.subnetIdentifier = try reader["SubnetIdentifier"].readIfPresent() + value.subnetAvailabilityZone = try reader["SubnetAvailabilityZone"].readIfPresent(readingClosure: RDSClientTypes.AvailabilityZone.readingClosure) + value.subnetOutpost = try reader["SubnetOutpost"].readIfPresent(readingClosure: RDSClientTypes.Outpost.readingClosure) + value.subnetStatus = try reader["SubnetStatus"].readIfPresent() + return value + } } } @@ -57218,16 +41951,14 @@ extension RDSClientTypes { } extension SubnetAlreadyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubnetAlreadyInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -57255,33 +41986,15 @@ public struct SubnetAlreadyInUse: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct SubnetAlreadyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubnetAlreadyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionAlreadyExistFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionAlreadyExistFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -57309,33 +42022,15 @@ public struct SubscriptionAlreadyExistFault: ClientRuntime.ModeledError, AWSClie } } -struct SubscriptionAlreadyExistFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionAlreadyExistFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionCategoryNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionCategoryNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -57363,33 +42058,15 @@ public struct SubscriptionCategoryNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct SubscriptionCategoryNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionCategoryNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -57417,23 +42094,12 @@ public struct SubscriptionNotFoundFault: ClientRuntime.ModeledError, AWSClientRu } } -struct SubscriptionNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionNotFoundFaultBody: Swift.Decodable { +extension SwitchoverBlueGreenDeploymentInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message + case blueGreenDeploymentIdentifier = "BlueGreenDeploymentIdentifier" + case switchoverTimeout = "SwitchoverTimeout" } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SwitchoverBlueGreenDeploymentInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let blueGreenDeploymentIdentifier = blueGreenDeploymentIdentifier { @@ -57473,34 +42139,15 @@ public struct SwitchoverBlueGreenDeploymentInput: Swift.Equatable { } } -struct SwitchoverBlueGreenDeploymentInputBody: Swift.Equatable { - let blueGreenDeploymentIdentifier: Swift.String? - let switchoverTimeout: Swift.Int? -} - -extension SwitchoverBlueGreenDeploymentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blueGreenDeploymentIdentifier = "BlueGreenDeploymentIdentifier" - case switchoverTimeout = "SwitchoverTimeout" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let blueGreenDeploymentIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .blueGreenDeploymentIdentifier) - blueGreenDeploymentIdentifier = blueGreenDeploymentIdentifierDecoded - let switchoverTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .switchoverTimeout) - switchoverTimeout = switchoverTimeoutDecoded - } -} +extension SwitchoverBlueGreenDeploymentOutput { -extension SwitchoverBlueGreenDeploymentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SwitchoverBlueGreenDeploymentOutputBody = try responseDecoder.decode(responseBody: data) - self.blueGreenDeployment = output.blueGreenDeployment - } else { - self.blueGreenDeployment = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SwitchoverBlueGreenDeploymentResult"] + var value = SwitchoverBlueGreenDeploymentOutput() + value.blueGreenDeployment = try reader["BlueGreenDeployment"].readIfPresent(readingClosure: RDSClientTypes.BlueGreenDeployment.readingClosure) + return value } } } @@ -57517,35 +42164,25 @@ public struct SwitchoverBlueGreenDeploymentOutput: Swift.Equatable { } } -struct SwitchoverBlueGreenDeploymentOutputBody: Swift.Equatable { - let blueGreenDeployment: RDSClientTypes.BlueGreenDeployment? -} - -extension SwitchoverBlueGreenDeploymentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blueGreenDeployment = "BlueGreenDeployment" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SwitchoverBlueGreenDeploymentResult")) - let blueGreenDeploymentDecoded = try containerValues.decodeIfPresent(RDSClientTypes.BlueGreenDeployment.self, forKey: .blueGreenDeployment) - blueGreenDeployment = blueGreenDeploymentDecoded - } -} +enum SwitchoverBlueGreenDeploymentOutputError { -enum SwitchoverBlueGreenDeploymentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidBlueGreenDeploymentStateFault": return try await InvalidBlueGreenDeploymentStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BlueGreenDeploymentNotFoundFault": return try await BlueGreenDeploymentNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidBlueGreenDeploymentStateFault": return try await InvalidBlueGreenDeploymentStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RDSClientTypes.SwitchoverDetail: Swift.Codable { +extension RDSClientTypes.SwitchoverDetail: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case sourceMember = "SourceMember" case status = "Status" @@ -57565,14 +42202,15 @@ extension RDSClientTypes.SwitchoverDetail: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceMemberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceMember) - sourceMember = sourceMemberDecoded - let targetMemberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetMember) - targetMember = targetMemberDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.SwitchoverDetail() + value.sourceMember = try reader["SourceMember"].readIfPresent() + value.targetMember = try reader["TargetMember"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -57615,6 +42253,11 @@ extension RDSClientTypes { } extension SwitchoverGlobalClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case globalClusterIdentifier = "GlobalClusterIdentifier" + case targetDbClusterIdentifier = "TargetDbClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let globalClusterIdentifier = globalClusterIdentifier { @@ -57655,34 +42298,15 @@ public struct SwitchoverGlobalClusterInput: Swift.Equatable { } } -struct SwitchoverGlobalClusterInputBody: Swift.Equatable { - let globalClusterIdentifier: Swift.String? - let targetDbClusterIdentifier: Swift.String? -} +extension SwitchoverGlobalClusterOutput { -extension SwitchoverGlobalClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalClusterIdentifier = "GlobalClusterIdentifier" - case targetDbClusterIdentifier = "TargetDbClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let globalClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .globalClusterIdentifier) - globalClusterIdentifier = globalClusterIdentifierDecoded - let targetDbClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDbClusterIdentifier) - targetDbClusterIdentifier = targetDbClusterIdentifierDecoded - } -} - -extension SwitchoverGlobalClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SwitchoverGlobalClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.globalCluster = output.globalCluster - } else { - self.globalCluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SwitchoverGlobalClusterResult"] + var value = SwitchoverGlobalClusterOutput() + value.globalCluster = try reader["GlobalCluster"].readIfPresent(readingClosure: RDSClientTypes.GlobalCluster.readingClosure) + return value } } } @@ -57699,37 +42323,31 @@ public struct SwitchoverGlobalClusterOutput: Swift.Equatable { } } -struct SwitchoverGlobalClusterOutputBody: Swift.Equatable { - let globalCluster: RDSClientTypes.GlobalCluster? -} +enum SwitchoverGlobalClusterOutputError { -extension SwitchoverGlobalClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case globalCluster = "GlobalCluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SwitchoverGlobalClusterResult")) - let globalClusterDecoded = try containerValues.decodeIfPresent(RDSClientTypes.GlobalCluster.self, forKey: .globalCluster) - globalCluster = globalClusterDecoded - } -} - -enum SwitchoverGlobalClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBClusterNotFoundFault": return try await DBClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "GlobalClusterNotFoundFault": return try await GlobalClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBClusterStateFault": return try await InvalidDBClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidGlobalClusterStateFault": return try await InvalidGlobalClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SwitchoverReadReplicaInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dbInstanceIdentifier = "DBInstanceIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dbInstanceIdentifier = dbInstanceIdentifier { @@ -57762,30 +42380,15 @@ public struct SwitchoverReadReplicaInput: Swift.Equatable { } } -struct SwitchoverReadReplicaInputBody: Swift.Equatable { - let dbInstanceIdentifier: Swift.String? -} +extension SwitchoverReadReplicaOutput { -extension SwitchoverReadReplicaInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstanceIdentifier = "DBInstanceIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - } -} - -extension SwitchoverReadReplicaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SwitchoverReadReplicaOutputBody = try responseDecoder.decode(responseBody: data) - self.dbInstance = output.dbInstance - } else { - self.dbInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SwitchoverReadReplicaResult"] + var value = SwitchoverReadReplicaOutput() + value.dbInstance = try reader["DBInstance"].readIfPresent(readingClosure: RDSClientTypes.DBInstance.readingClosure) + return value } } } @@ -57802,35 +42405,25 @@ public struct SwitchoverReadReplicaOutput: Swift.Equatable { } } -struct SwitchoverReadReplicaOutputBody: Swift.Equatable { - let dbInstance: RDSClientTypes.DBInstance? -} - -extension SwitchoverReadReplicaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbInstance = "DBInstance" - } +enum SwitchoverReadReplicaOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SwitchoverReadReplicaResult")) - let dbInstanceDecoded = try containerValues.decodeIfPresent(RDSClientTypes.DBInstance.self, forKey: .dbInstance) - dbInstance = dbInstanceDecoded - } -} - -enum SwitchoverReadReplicaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DBInstanceNotFound": return try await DBInstanceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DBInstanceNotFound": return try await DBInstanceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDBInstanceState": return try await InvalidDBInstanceStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RDSClientTypes.Tag: Swift.Codable { +extension RDSClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -57846,12 +42439,14 @@ extension RDSClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -57875,7 +42470,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.TargetHealth: Swift.Codable { +extension RDSClientTypes.TargetHealth: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case reason = "Reason" @@ -57895,14 +42490,15 @@ extension RDSClientTypes.TargetHealth: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let stateDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TargetState.self, forKey: .state) - state = stateDecoded - let reasonDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TargetHealthReason.self, forKey: .reason) - reason = reasonDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.TargetHealth() + value.state = try reader["State"].readIfPresent() + value.reason = try reader["Reason"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -58076,7 +42672,7 @@ extension RDSClientTypes { } } -extension RDSClientTypes.TenantDatabase: Swift.Codable { +extension RDSClientTypes.TenantDatabase: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case characterSetName = "CharacterSetName" case dbInstanceIdentifier = "DBInstanceIdentifier" @@ -58145,50 +42741,24 @@ extension RDSClientTypes.TenantDatabase: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tenantDatabaseCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .tenantDatabaseCreateTime) - tenantDatabaseCreateTime = tenantDatabaseCreateTimeDecoded - let dbInstanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbInstanceIdentifier) - dbInstanceIdentifier = dbInstanceIdentifierDecoded - let tenantDBNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDBName) - tenantDBName = tenantDBNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let dbiResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbiResourceId) - dbiResourceId = dbiResourceIdDecoded - let tenantDatabaseResourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDatabaseResourceId) - tenantDatabaseResourceId = tenantDatabaseResourceIdDecoded - let tenantDatabaseARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDatabaseARN) - tenantDatabaseARN = tenantDatabaseARNDecoded - let characterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .characterSetName) - characterSetName = characterSetNameDecoded - let ncharCharacterSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ncharCharacterSetName) - ncharCharacterSetName = ncharCharacterSetNameDecoded - let deletionProtectionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deletionProtection) - deletionProtection = deletionProtectionDecoded - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(RDSClientTypes.TenantDatabasePendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - if containerValues.contains(.tagList) { - struct KeyVal0{struct Tag{}} - let tagListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagList) - if let tagListWrappedContainer = tagListWrappedContainer { - let tagListContainer = try tagListWrappedContainer.decodeIfPresent([RDSClientTypes.Tag].self, forKey: .member) - var tagListBuffer:[RDSClientTypes.Tag]? = nil - if let tagListContainer = tagListContainer { - tagListBuffer = [RDSClientTypes.Tag]() - for structureContainer0 in tagListContainer { - tagListBuffer?.append(structureContainer0) - } - } - tagList = tagListBuffer - } else { - tagList = [] - } - } else { - tagList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.TenantDatabase() + value.tenantDatabaseCreateTime = try reader["TenantDatabaseCreateTime"].readTimestampIfPresent(format: .dateTime) + value.dbInstanceIdentifier = try reader["DBInstanceIdentifier"].readIfPresent() + value.tenantDBName = try reader["TenantDBName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.dbiResourceId = try reader["DbiResourceId"].readIfPresent() + value.tenantDatabaseResourceId = try reader["TenantDatabaseResourceId"].readIfPresent() + value.tenantDatabaseARN = try reader["TenantDatabaseARN"].readIfPresent() + value.characterSetName = try reader["CharacterSetName"].readIfPresent() + value.ncharCharacterSetName = try reader["NcharCharacterSetName"].readIfPresent() + value.deletionProtection = try reader["DeletionProtection"].readIfPresent() + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: RDSClientTypes.TenantDatabasePendingModifiedValues.readingClosure) + value.tagList = try reader["TagList"].readListIfPresent(memberReadingClosure: RDSClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -58258,16 +42828,14 @@ extension RDSClientTypes { } extension TenantDatabaseAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TenantDatabaseAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -58295,33 +42863,15 @@ public struct TenantDatabaseAlreadyExistsFault: ClientRuntime.ModeledError, AWSC } } -struct TenantDatabaseAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension TenantDatabaseAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TenantDatabaseNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TenantDatabaseNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -58349,23 +42899,7 @@ public struct TenantDatabaseNotFoundFault: ClientRuntime.ModeledError, AWSClient } } -struct TenantDatabaseNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension TenantDatabaseNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.TenantDatabasePendingModifiedValues: Swift.Codable { +extension RDSClientTypes.TenantDatabasePendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case masterUserPassword = "MasterUserPassword" case tenantDBName = "TenantDBName" @@ -58381,12 +42915,14 @@ extension RDSClientTypes.TenantDatabasePendingModifiedValues: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let tenantDBNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tenantDBName) - tenantDBName = tenantDBNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.TenantDatabasePendingModifiedValues() + value.masterUserPassword = try reader["MasterUserPassword"].readIfPresent() + value.tenantDBName = try reader["TenantDBName"].readIfPresent() + return value + } } } @@ -58416,16 +42952,14 @@ extension RDSClientTypes { } extension TenantDatabaseQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TenantDatabaseQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -58453,23 +42987,7 @@ public struct TenantDatabaseQuotaExceededFault: ClientRuntime.ModeledError, AWSC } } -struct TenantDatabaseQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension TenantDatabaseQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RDSClientTypes.Timezone: Swift.Codable { +extension RDSClientTypes.Timezone: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case timezoneName = "TimezoneName" } @@ -58481,10 +42999,13 @@ extension RDSClientTypes.Timezone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let timezoneNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .timezoneName) - timezoneName = timezoneNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.Timezone() + value.timezoneName = try reader["TimezoneName"].readIfPresent() + return value + } } } @@ -58504,7 +43025,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.UpgradeTarget: Swift.Codable { +extension RDSClientTypes.UpgradeTarget: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case autoUpgrade = "AutoUpgrade" case description = "Description" @@ -58565,47 +43086,23 @@ extension RDSClientTypes.UpgradeTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let engineDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engine) - engine = engineDecoded - let engineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineVersion) - engineVersion = engineVersionDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let autoUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoUpgrade) - autoUpgrade = autoUpgradeDecoded - let isMajorVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isMajorVersionUpgrade) - isMajorVersionUpgrade = isMajorVersionUpgradeDecoded - if containerValues.contains(.supportedEngineModes) { - struct KeyVal0{struct member{}} - let supportedEngineModesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedEngineModes) - if let supportedEngineModesWrappedContainer = supportedEngineModesWrappedContainer { - let supportedEngineModesContainer = try supportedEngineModesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedEngineModesBuffer:[Swift.String]? = nil - if let supportedEngineModesContainer = supportedEngineModesContainer { - supportedEngineModesBuffer = [Swift.String]() - for stringContainer0 in supportedEngineModesContainer { - supportedEngineModesBuffer?.append(stringContainer0) - } - } - supportedEngineModes = supportedEngineModesBuffer - } else { - supportedEngineModes = [] - } - } else { - supportedEngineModes = nil - } - let supportsParallelQueryDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsParallelQuery) - supportsParallelQuery = supportsParallelQueryDecoded - let supportsGlobalDatabasesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsGlobalDatabases) - supportsGlobalDatabases = supportsGlobalDatabasesDecoded - let supportsBabelfishDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsBabelfish) - supportsBabelfish = supportsBabelfishDecoded - let supportsLocalWriteForwardingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsLocalWriteForwarding) - supportsLocalWriteForwarding = supportsLocalWriteForwardingDecoded - let supportsIntegrationsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsIntegrations) - supportsIntegrations = supportsIntegrationsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.UpgradeTarget() + value.engine = try reader["Engine"].readIfPresent() + value.engineVersion = try reader["EngineVersion"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.autoUpgrade = try reader["AutoUpgrade"].readIfPresent() + value.isMajorVersionUpgrade = try reader["IsMajorVersionUpgrade"].readIfPresent() + value.supportedEngineModes = try reader["SupportedEngineModes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.supportsParallelQuery = try reader["SupportsParallelQuery"].readIfPresent() + value.supportsGlobalDatabases = try reader["SupportsGlobalDatabases"].readIfPresent() + value.supportsBabelfish = try reader["SupportsBabelfish"].readIfPresent() + value.supportsLocalWriteForwarding = try reader["SupportsLocalWriteForwarding"].readIfPresent() + value.supportsIntegrations = try reader["SupportsIntegrations"].readIfPresent() + return value + } } } @@ -58665,7 +43162,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.UserAuthConfig: Swift.Codable { +extension RDSClientTypes.UserAuthConfig: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authScheme = "AuthScheme" case clientPasswordAuthType = "ClientPasswordAuthType" @@ -58697,20 +43194,18 @@ extension RDSClientTypes.UserAuthConfig: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let authSchemeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.AuthScheme.self, forKey: .authScheme) - authScheme = authSchemeDecoded - let secretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secretArn) - secretArn = secretArnDecoded - let iamAuthDecoded = try containerValues.decodeIfPresent(RDSClientTypes.IAMAuthMode.self, forKey: .iamAuth) - iamAuth = iamAuthDecoded - let clientPasswordAuthTypeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ClientPasswordAuthType.self, forKey: .clientPasswordAuthType) - clientPasswordAuthType = clientPasswordAuthTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.UserAuthConfig() + value.description = try reader["Description"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + value.authScheme = try reader["AuthScheme"].readIfPresent() + value.secretArn = try reader["SecretArn"].readIfPresent() + value.iamAuth = try reader["IAMAuth"].readIfPresent() + value.clientPasswordAuthType = try reader["ClientPasswordAuthType"].readIfPresent() + return value + } } } @@ -58750,7 +43245,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.UserAuthConfigInfo: Swift.Codable { +extension RDSClientTypes.UserAuthConfigInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authScheme = "AuthScheme" case clientPasswordAuthType = "ClientPasswordAuthType" @@ -58782,20 +43277,18 @@ extension RDSClientTypes.UserAuthConfigInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let userNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userName) - userName = userNameDecoded - let authSchemeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.AuthScheme.self, forKey: .authScheme) - authScheme = authSchemeDecoded - let secretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secretArn) - secretArn = secretArnDecoded - let iamAuthDecoded = try containerValues.decodeIfPresent(RDSClientTypes.IAMAuthMode.self, forKey: .iamAuth) - iamAuth = iamAuthDecoded - let clientPasswordAuthTypeDecoded = try containerValues.decodeIfPresent(RDSClientTypes.ClientPasswordAuthType.self, forKey: .clientPasswordAuthType) - clientPasswordAuthType = clientPasswordAuthTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.UserAuthConfigInfo() + value.description = try reader["Description"].readIfPresent() + value.userName = try reader["UserName"].readIfPresent() + value.authScheme = try reader["AuthScheme"].readIfPresent() + value.secretArn = try reader["SecretArn"].readIfPresent() + value.iamAuth = try reader["IAMAuth"].readIfPresent() + value.clientPasswordAuthType = try reader["ClientPasswordAuthType"].readIfPresent() + return value + } } } @@ -58835,7 +43328,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ValidDBInstanceModificationsMessage: Swift.Codable { +extension RDSClientTypes.ValidDBInstanceModificationsMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case storage = "Storage" case supportsDedicatedLogVolume = "SupportsDedicatedLogVolume" @@ -58873,48 +43366,15 @@ extension RDSClientTypes.ValidDBInstanceModificationsMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.storage) { - struct KeyVal0{struct ValidStorageOptions{}} - let storageWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .storage) - if let storageWrappedContainer = storageWrappedContainer { - let storageContainer = try storageWrappedContainer.decodeIfPresent([RDSClientTypes.ValidStorageOptions].self, forKey: .member) - var storageBuffer:[RDSClientTypes.ValidStorageOptions]? = nil - if let storageContainer = storageContainer { - storageBuffer = [RDSClientTypes.ValidStorageOptions]() - for structureContainer0 in storageContainer { - storageBuffer?.append(structureContainer0) - } - } - storage = storageBuffer - } else { - storage = [] - } - } else { - storage = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ValidDBInstanceModificationsMessage() + value.storage = try reader["Storage"].readListIfPresent(memberReadingClosure: RDSClientTypes.ValidStorageOptions.readingClosure, memberNodeInfo: "ValidStorageOptions", isFlattened: false) + value.validProcessorFeatures = try reader["ValidProcessorFeatures"].readListIfPresent(memberReadingClosure: RDSClientTypes.AvailableProcessorFeature.readingClosure, memberNodeInfo: "AvailableProcessorFeature", isFlattened: false) + value.supportsDedicatedLogVolume = try reader["SupportsDedicatedLogVolume"].readIfPresent() + return value } - if containerValues.contains(.validProcessorFeatures) { - struct KeyVal0{struct AvailableProcessorFeature{}} - let validProcessorFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .validProcessorFeatures) - if let validProcessorFeaturesWrappedContainer = validProcessorFeaturesWrappedContainer { - let validProcessorFeaturesContainer = try validProcessorFeaturesWrappedContainer.decodeIfPresent([RDSClientTypes.AvailableProcessorFeature].self, forKey: .member) - var validProcessorFeaturesBuffer:[RDSClientTypes.AvailableProcessorFeature]? = nil - if let validProcessorFeaturesContainer = validProcessorFeaturesContainer { - validProcessorFeaturesBuffer = [RDSClientTypes.AvailableProcessorFeature]() - for structureContainer0 in validProcessorFeaturesContainer { - validProcessorFeaturesBuffer?.append(structureContainer0) - } - } - validProcessorFeatures = validProcessorFeaturesBuffer - } else { - validProcessorFeatures = [] - } - } else { - validProcessorFeatures = nil - } - let supportsDedicatedLogVolumeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsDedicatedLogVolume) - supportsDedicatedLogVolume = supportsDedicatedLogVolumeDecoded } } @@ -58942,7 +43402,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.ValidStorageOptions: Swift.Codable { +extension RDSClientTypes.ValidStorageOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case iopsToStorageRatio = "IopsToStorageRatio" case provisionedIops = "ProvisionedIops" @@ -59023,106 +43483,18 @@ extension RDSClientTypes.ValidStorageOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageType) - storageType = storageTypeDecoded - if containerValues.contains(.storageSize) { - struct KeyVal0{struct Range{}} - let storageSizeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .storageSize) - if let storageSizeWrappedContainer = storageSizeWrappedContainer { - let storageSizeContainer = try storageSizeWrappedContainer.decodeIfPresent([RDSClientTypes.Range].self, forKey: .member) - var storageSizeBuffer:[RDSClientTypes.Range]? = nil - if let storageSizeContainer = storageSizeContainer { - storageSizeBuffer = [RDSClientTypes.Range]() - for structureContainer0 in storageSizeContainer { - storageSizeBuffer?.append(structureContainer0) - } - } - storageSize = storageSizeBuffer - } else { - storageSize = [] - } - } else { - storageSize = nil - } - if containerValues.contains(.provisionedIops) { - struct KeyVal0{struct Range{}} - let provisionedIopsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .provisionedIops) - if let provisionedIopsWrappedContainer = provisionedIopsWrappedContainer { - let provisionedIopsContainer = try provisionedIopsWrappedContainer.decodeIfPresent([RDSClientTypes.Range].self, forKey: .member) - var provisionedIopsBuffer:[RDSClientTypes.Range]? = nil - if let provisionedIopsContainer = provisionedIopsContainer { - provisionedIopsBuffer = [RDSClientTypes.Range]() - for structureContainer0 in provisionedIopsContainer { - provisionedIopsBuffer?.append(structureContainer0) - } - } - provisionedIops = provisionedIopsBuffer - } else { - provisionedIops = [] - } - } else { - provisionedIops = nil - } - if containerValues.contains(.iopsToStorageRatio) { - struct KeyVal0{struct DoubleRange{}} - let iopsToStorageRatioWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .iopsToStorageRatio) - if let iopsToStorageRatioWrappedContainer = iopsToStorageRatioWrappedContainer { - let iopsToStorageRatioContainer = try iopsToStorageRatioWrappedContainer.decodeIfPresent([RDSClientTypes.DoubleRange].self, forKey: .member) - var iopsToStorageRatioBuffer:[RDSClientTypes.DoubleRange]? = nil - if let iopsToStorageRatioContainer = iopsToStorageRatioContainer { - iopsToStorageRatioBuffer = [RDSClientTypes.DoubleRange]() - for structureContainer0 in iopsToStorageRatioContainer { - iopsToStorageRatioBuffer?.append(structureContainer0) - } - } - iopsToStorageRatio = iopsToStorageRatioBuffer - } else { - iopsToStorageRatio = [] - } - } else { - iopsToStorageRatio = nil - } - let supportsStorageAutoscalingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .supportsStorageAutoscaling) - supportsStorageAutoscaling = supportsStorageAutoscalingDecoded - if containerValues.contains(.provisionedStorageThroughput) { - struct KeyVal0{struct Range{}} - let provisionedStorageThroughputWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .provisionedStorageThroughput) - if let provisionedStorageThroughputWrappedContainer = provisionedStorageThroughputWrappedContainer { - let provisionedStorageThroughputContainer = try provisionedStorageThroughputWrappedContainer.decodeIfPresent([RDSClientTypes.Range].self, forKey: .member) - var provisionedStorageThroughputBuffer:[RDSClientTypes.Range]? = nil - if let provisionedStorageThroughputContainer = provisionedStorageThroughputContainer { - provisionedStorageThroughputBuffer = [RDSClientTypes.Range]() - for structureContainer0 in provisionedStorageThroughputContainer { - provisionedStorageThroughputBuffer?.append(structureContainer0) - } - } - provisionedStorageThroughput = provisionedStorageThroughputBuffer - } else { - provisionedStorageThroughput = [] - } - } else { - provisionedStorageThroughput = nil - } - if containerValues.contains(.storageThroughputToIopsRatio) { - struct KeyVal0{struct DoubleRange{}} - let storageThroughputToIopsRatioWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .storageThroughputToIopsRatio) - if let storageThroughputToIopsRatioWrappedContainer = storageThroughputToIopsRatioWrappedContainer { - let storageThroughputToIopsRatioContainer = try storageThroughputToIopsRatioWrappedContainer.decodeIfPresent([RDSClientTypes.DoubleRange].self, forKey: .member) - var storageThroughputToIopsRatioBuffer:[RDSClientTypes.DoubleRange]? = nil - if let storageThroughputToIopsRatioContainer = storageThroughputToIopsRatioContainer { - storageThroughputToIopsRatioBuffer = [RDSClientTypes.DoubleRange]() - for structureContainer0 in storageThroughputToIopsRatioContainer { - storageThroughputToIopsRatioBuffer?.append(structureContainer0) - } - } - storageThroughputToIopsRatio = storageThroughputToIopsRatioBuffer - } else { - storageThroughputToIopsRatio = [] - } - } else { - storageThroughputToIopsRatio = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.ValidStorageOptions() + value.storageType = try reader["StorageType"].readIfPresent() + value.storageSize = try reader["StorageSize"].readListIfPresent(memberReadingClosure: RDSClientTypes.Range.readingClosure, memberNodeInfo: "Range", isFlattened: false) + value.provisionedIops = try reader["ProvisionedIops"].readListIfPresent(memberReadingClosure: RDSClientTypes.Range.readingClosure, memberNodeInfo: "Range", isFlattened: false) + value.iopsToStorageRatio = try reader["IopsToStorageRatio"].readListIfPresent(memberReadingClosure: RDSClientTypes.DoubleRange.readingClosure, memberNodeInfo: "DoubleRange", isFlattened: false) + value.supportsStorageAutoscaling = try reader["SupportsStorageAutoscaling"].readIfPresent() + value.provisionedStorageThroughput = try reader["ProvisionedStorageThroughput"].readListIfPresent(memberReadingClosure: RDSClientTypes.Range.readingClosure, memberNodeInfo: "Range", isFlattened: false) + value.storageThroughputToIopsRatio = try reader["StorageThroughputToIopsRatio"].readListIfPresent(memberReadingClosure: RDSClientTypes.DoubleRange.readingClosure, memberNodeInfo: "DoubleRange", isFlattened: false) + return value } } } @@ -59167,7 +43539,7 @@ extension RDSClientTypes { } -extension RDSClientTypes.VpcSecurityGroupMembership: Swift.Codable { +extension RDSClientTypes.VpcSecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case status = "Status" case vpcSecurityGroupId = "VpcSecurityGroupId" @@ -59183,12 +43555,14 @@ extension RDSClientTypes.VpcSecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcSecurityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcSecurityGroupId) - vpcSecurityGroupId = vpcSecurityGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RDSClientTypes.VpcSecurityGroupMembership() + value.vpcSecurityGroupId = try reader["VpcSecurityGroupId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSRedshift/RedshiftClient.swift b/Sources/Services/AWSRedshift/RedshiftClient.swift index 2bb200e6f18..93a0321b7be 100644 --- a/Sources/Services/AWSRedshift/RedshiftClient.swift +++ b/Sources/Services/AWSRedshift/RedshiftClient.swift @@ -11,14 +11,11 @@ public class RedshiftClient { let config: RedshiftClient.RedshiftClientConfiguration let serviceName = "Redshift" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: RedshiftClient.RedshiftClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -84,7 +81,6 @@ extension RedshiftClient { public func acceptReservedNodeExchange(input: AcceptReservedNodeExchangeInput) async throws -> AcceptReservedNodeExchangeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "acceptReservedNodeExchange") @@ -108,7 +104,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AcceptReservedNodeExchangeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AcceptReservedNodeExchangeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AcceptReservedNodeExchangeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -132,7 +128,6 @@ extension RedshiftClient { public func addPartner(input: AddPartnerInput) async throws -> AddPartnerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addPartner") @@ -156,7 +151,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddPartnerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddPartnerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddPartnerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -178,7 +173,6 @@ extension RedshiftClient { public func associateDataShareConsumer(input: AssociateDataShareConsumerInput) async throws -> AssociateDataShareConsumerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateDataShareConsumer") @@ -202,7 +196,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateDataShareConsumerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateDataShareConsumerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateDataShareConsumerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -226,7 +220,6 @@ extension RedshiftClient { public func authorizeClusterSecurityGroupIngress(input: AuthorizeClusterSecurityGroupIngressInput) async throws -> AuthorizeClusterSecurityGroupIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeClusterSecurityGroupIngress") @@ -250,7 +243,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeClusterSecurityGroupIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeClusterSecurityGroupIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeClusterSecurityGroupIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -271,7 +264,6 @@ extension RedshiftClient { public func authorizeDataShare(input: AuthorizeDataShareInput) async throws -> AuthorizeDataShareOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeDataShare") @@ -295,7 +287,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeDataShareOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeDataShareOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeDataShareOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -321,7 +313,6 @@ extension RedshiftClient { public func authorizeEndpointAccess(input: AuthorizeEndpointAccessInput) async throws -> AuthorizeEndpointAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeEndpointAccess") @@ -345,7 +336,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeEndpointAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeEndpointAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeEndpointAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -372,7 +363,6 @@ extension RedshiftClient { public func authorizeSnapshotAccess(input: AuthorizeSnapshotAccessInput) async throws -> AuthorizeSnapshotAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "authorizeSnapshotAccess") @@ -396,7 +386,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AuthorizeSnapshotAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AuthorizeSnapshotAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AuthorizeSnapshotAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -417,7 +407,6 @@ extension RedshiftClient { public func batchDeleteClusterSnapshots(input: BatchDeleteClusterSnapshotsInput) async throws -> BatchDeleteClusterSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "batchDeleteClusterSnapshots") @@ -441,7 +430,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BatchDeleteClusterSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BatchDeleteClusterSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BatchDeleteClusterSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -463,7 +452,6 @@ extension RedshiftClient { public func batchModifyClusterSnapshots(input: BatchModifyClusterSnapshotsInput) async throws -> BatchModifyClusterSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "batchModifyClusterSnapshots") @@ -487,7 +475,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(BatchModifyClusterSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(BatchModifyClusterSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(BatchModifyClusterSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -511,7 +499,6 @@ extension RedshiftClient { public func cancelResize(input: CancelResizeInput) async throws -> CancelResizeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cancelResize") @@ -535,7 +522,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CancelResizeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CancelResizeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CancelResizeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -561,7 +548,6 @@ extension RedshiftClient { public func copyClusterSnapshot(input: CopyClusterSnapshotInput) async throws -> CopyClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "copyClusterSnapshot") @@ -585,7 +571,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -608,7 +594,6 @@ extension RedshiftClient { public func createAuthenticationProfile(input: CreateAuthenticationProfileInput) async throws -> CreateAuthenticationProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createAuthenticationProfile") @@ -632,7 +617,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAuthenticationProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAuthenticationProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAuthenticationProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -677,7 +662,6 @@ extension RedshiftClient { public func createCluster(input: CreateClusterInput) async throws -> CreateClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCluster") @@ -701,7 +685,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -725,7 +709,6 @@ extension RedshiftClient { public func createClusterParameterGroup(input: CreateClusterParameterGroupInput) async throws -> CreateClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createClusterParameterGroup") @@ -749,7 +732,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -773,7 +756,6 @@ extension RedshiftClient { public func createClusterSecurityGroup(input: CreateClusterSecurityGroupInput) async throws -> CreateClusterSecurityGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createClusterSecurityGroup") @@ -797,7 +779,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateClusterSecurityGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateClusterSecurityGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateClusterSecurityGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -824,7 +806,6 @@ extension RedshiftClient { public func createClusterSnapshot(input: CreateClusterSnapshotInput) async throws -> CreateClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createClusterSnapshot") @@ -848,7 +829,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -876,7 +857,6 @@ extension RedshiftClient { public func createClusterSubnetGroup(input: CreateClusterSubnetGroupInput) async throws -> CreateClusterSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createClusterSubnetGroup") @@ -900,7 +880,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateClusterSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateClusterSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateClusterSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -923,7 +903,6 @@ extension RedshiftClient { public func createCustomDomainAssociation(input: CreateCustomDomainAssociationInput) async throws -> CreateCustomDomainAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCustomDomainAssociation") @@ -947,7 +926,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCustomDomainAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCustomDomainAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCustomDomainAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -977,7 +956,6 @@ extension RedshiftClient { public func createEndpointAccess(input: CreateEndpointAccessInput) async throws -> CreateEndpointAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createEndpointAccess") @@ -1001,7 +979,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateEndpointAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateEndpointAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateEndpointAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1032,7 +1010,6 @@ extension RedshiftClient { public func createEventSubscription(input: CreateEventSubscriptionInput) async throws -> CreateEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createEventSubscription") @@ -1056,7 +1033,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1080,7 +1057,6 @@ extension RedshiftClient { public func createHsmClientCertificate(input: CreateHsmClientCertificateInput) async throws -> CreateHsmClientCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createHsmClientCertificate") @@ -1104,7 +1080,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateHsmClientCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateHsmClientCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateHsmClientCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1128,7 +1104,6 @@ extension RedshiftClient { public func createHsmConfiguration(input: CreateHsmConfigurationInput) async throws -> CreateHsmConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createHsmConfiguration") @@ -1152,7 +1127,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateHsmConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateHsmConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateHsmConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1177,7 +1152,6 @@ extension RedshiftClient { public func createRedshiftIdcApplication(input: CreateRedshiftIdcApplicationInput) async throws -> CreateRedshiftIdcApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createRedshiftIdcApplication") @@ -1201,7 +1175,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateRedshiftIdcApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateRedshiftIdcApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateRedshiftIdcApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1229,7 +1203,6 @@ extension RedshiftClient { public func createScheduledAction(input: CreateScheduledActionInput) async throws -> CreateScheduledActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createScheduledAction") @@ -1253,7 +1226,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateScheduledActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateScheduledActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateScheduledActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1279,7 +1252,6 @@ extension RedshiftClient { public func createSnapshotCopyGrant(input: CreateSnapshotCopyGrantInput) async throws -> CreateSnapshotCopyGrantOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSnapshotCopyGrant") @@ -1303,7 +1275,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSnapshotCopyGrantOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSnapshotCopyGrantOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSnapshotCopyGrantOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1329,7 +1301,6 @@ extension RedshiftClient { public func createSnapshotSchedule(input: CreateSnapshotScheduleInput) async throws -> CreateSnapshotScheduleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSnapshotSchedule") @@ -1353,7 +1324,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSnapshotScheduleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSnapshotScheduleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSnapshotScheduleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1377,7 +1348,6 @@ extension RedshiftClient { public func createTags(input: CreateTagsInput) async throws -> CreateTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTags") @@ -1401,7 +1371,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1428,7 +1398,6 @@ extension RedshiftClient { public func createUsageLimit(input: CreateUsageLimitInput) async throws -> CreateUsageLimitOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createUsageLimit") @@ -1452,7 +1421,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateUsageLimitOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateUsageLimitOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateUsageLimitOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1473,7 +1442,6 @@ extension RedshiftClient { public func deauthorizeDataShare(input: DeauthorizeDataShareInput) async throws -> DeauthorizeDataShareOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deauthorizeDataShare") @@ -1497,7 +1465,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeauthorizeDataShareOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeauthorizeDataShareOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeauthorizeDataShareOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1519,7 +1487,6 @@ extension RedshiftClient { public func deleteAuthenticationProfile(input: DeleteAuthenticationProfileInput) async throws -> DeleteAuthenticationProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteAuthenticationProfile") @@ -1543,7 +1510,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAuthenticationProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAuthenticationProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAuthenticationProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1568,7 +1535,6 @@ extension RedshiftClient { public func deleteCluster(input: DeleteClusterInput) async throws -> DeleteClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCluster") @@ -1592,7 +1558,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1614,7 +1580,6 @@ extension RedshiftClient { public func deleteClusterParameterGroup(input: DeleteClusterParameterGroupInput) async throws -> DeleteClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteClusterParameterGroup") @@ -1638,7 +1603,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1660,7 +1625,6 @@ extension RedshiftClient { public func deleteClusterSecurityGroup(input: DeleteClusterSecurityGroupInput) async throws -> DeleteClusterSecurityGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteClusterSecurityGroup") @@ -1684,7 +1648,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteClusterSecurityGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteClusterSecurityGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteClusterSecurityGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1706,7 +1670,6 @@ extension RedshiftClient { public func deleteClusterSnapshot(input: DeleteClusterSnapshotInput) async throws -> DeleteClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteClusterSnapshot") @@ -1730,7 +1693,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1753,7 +1716,6 @@ extension RedshiftClient { public func deleteClusterSubnetGroup(input: DeleteClusterSubnetGroupInput) async throws -> DeleteClusterSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteClusterSubnetGroup") @@ -1777,7 +1739,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteClusterSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteClusterSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteClusterSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1801,7 +1763,6 @@ extension RedshiftClient { public func deleteCustomDomainAssociation(input: DeleteCustomDomainAssociationInput) async throws -> DeleteCustomDomainAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCustomDomainAssociation") @@ -1825,7 +1786,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCustomDomainAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCustomDomainAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCustomDomainAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1850,7 +1811,6 @@ extension RedshiftClient { public func deleteEndpointAccess(input: DeleteEndpointAccessInput) async throws -> DeleteEndpointAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteEndpointAccess") @@ -1874,7 +1834,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteEndpointAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteEndpointAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteEndpointAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1896,7 +1856,6 @@ extension RedshiftClient { public func deleteEventSubscription(input: DeleteEventSubscriptionInput) async throws -> DeleteEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteEventSubscription") @@ -1920,7 +1879,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1942,7 +1901,6 @@ extension RedshiftClient { public func deleteHsmClientCertificate(input: DeleteHsmClientCertificateInput) async throws -> DeleteHsmClientCertificateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteHsmClientCertificate") @@ -1966,7 +1924,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteHsmClientCertificateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteHsmClientCertificateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteHsmClientCertificateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1988,7 +1946,6 @@ extension RedshiftClient { public func deleteHsmConfiguration(input: DeleteHsmConfigurationInput) async throws -> DeleteHsmConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteHsmConfiguration") @@ -2012,7 +1969,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteHsmConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteHsmConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteHsmConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2036,7 +1993,6 @@ extension RedshiftClient { public func deletePartner(input: DeletePartnerInput) async throws -> DeletePartnerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deletePartner") @@ -2060,7 +2016,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePartnerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePartnerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePartnerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2084,7 +2040,6 @@ extension RedshiftClient { public func deleteRedshiftIdcApplication(input: DeleteRedshiftIdcApplicationInput) async throws -> DeleteRedshiftIdcApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteRedshiftIdcApplication") @@ -2108,7 +2063,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteRedshiftIdcApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteRedshiftIdcApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteRedshiftIdcApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2130,7 +2085,6 @@ extension RedshiftClient { public func deleteResourcePolicy(input: DeleteResourcePolicyInput) async throws -> DeleteResourcePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteResourcePolicy") @@ -2154,7 +2108,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteResourcePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteResourcePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteResourcePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2176,7 +2130,6 @@ extension RedshiftClient { public func deleteScheduledAction(input: DeleteScheduledActionInput) async throws -> DeleteScheduledActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteScheduledAction") @@ -2200,7 +2153,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteScheduledActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteScheduledActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteScheduledActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2222,7 +2175,6 @@ extension RedshiftClient { public func deleteSnapshotCopyGrant(input: DeleteSnapshotCopyGrantInput) async throws -> DeleteSnapshotCopyGrantOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSnapshotCopyGrant") @@ -2246,7 +2198,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSnapshotCopyGrantOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSnapshotCopyGrantOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSnapshotCopyGrantOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2268,7 +2220,6 @@ extension RedshiftClient { public func deleteSnapshotSchedule(input: DeleteSnapshotScheduleInput) async throws -> DeleteSnapshotScheduleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSnapshotSchedule") @@ -2292,7 +2243,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSnapshotScheduleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSnapshotScheduleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSnapshotScheduleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2314,7 +2265,6 @@ extension RedshiftClient { public func deleteTags(input: DeleteTagsInput) async throws -> DeleteTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTags") @@ -2338,7 +2288,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2360,7 +2310,6 @@ extension RedshiftClient { public func deleteUsageLimit(input: DeleteUsageLimitInput) async throws -> DeleteUsageLimitOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteUsageLimit") @@ -2384,7 +2333,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteUsageLimitOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteUsageLimitOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteUsageLimitOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2400,7 +2349,6 @@ extension RedshiftClient { public func describeAccountAttributes(input: DescribeAccountAttributesInput) async throws -> DescribeAccountAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAccountAttributes") @@ -2424,7 +2372,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAccountAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAccountAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAccountAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2446,7 +2394,6 @@ extension RedshiftClient { public func describeAuthenticationProfiles(input: DescribeAuthenticationProfilesInput) async throws -> DescribeAuthenticationProfilesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeAuthenticationProfiles") @@ -2470,7 +2417,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeAuthenticationProfilesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeAuthenticationProfilesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeAuthenticationProfilesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2492,7 +2439,6 @@ extension RedshiftClient { public func describeClusterDbRevisions(input: DescribeClusterDbRevisionsInput) async throws -> DescribeClusterDbRevisionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusterDbRevisions") @@ -2516,7 +2462,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClusterDbRevisionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClusterDbRevisionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClusterDbRevisionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2538,7 +2484,6 @@ extension RedshiftClient { public func describeClusterParameterGroups(input: DescribeClusterParameterGroupsInput) async throws -> DescribeClusterParameterGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusterParameterGroups") @@ -2562,7 +2507,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClusterParameterGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClusterParameterGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClusterParameterGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2583,7 +2528,6 @@ extension RedshiftClient { public func describeClusterParameters(input: DescribeClusterParametersInput) async throws -> DescribeClusterParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusterParameters") @@ -2607,7 +2551,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClusterParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClusterParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClusterParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2629,7 +2573,6 @@ extension RedshiftClient { public func describeClusterSecurityGroups(input: DescribeClusterSecurityGroupsInput) async throws -> DescribeClusterSecurityGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusterSecurityGroups") @@ -2653,7 +2596,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClusterSecurityGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClusterSecurityGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClusterSecurityGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2677,7 +2620,6 @@ extension RedshiftClient { public func describeClusterSnapshots(input: DescribeClusterSnapshotsInput) async throws -> DescribeClusterSnapshotsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusterSnapshots") @@ -2701,7 +2643,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClusterSnapshotsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClusterSnapshotsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClusterSnapshotsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2723,7 +2665,6 @@ extension RedshiftClient { public func describeClusterSubnetGroups(input: DescribeClusterSubnetGroupsInput) async throws -> DescribeClusterSubnetGroupsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusterSubnetGroups") @@ -2747,7 +2688,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClusterSubnetGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClusterSubnetGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClusterSubnetGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2769,7 +2710,6 @@ extension RedshiftClient { public func describeClusterTracks(input: DescribeClusterTracksInput) async throws -> DescribeClusterTracksOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusterTracks") @@ -2793,7 +2733,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClusterTracksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClusterTracksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClusterTracksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2809,7 +2749,6 @@ extension RedshiftClient { public func describeClusterVersions(input: DescribeClusterVersionsInput) async throws -> DescribeClusterVersionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusterVersions") @@ -2833,7 +2772,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClusterVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClusterVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClusterVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2855,7 +2794,6 @@ extension RedshiftClient { public func describeClusters(input: DescribeClustersInput) async throws -> DescribeClustersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeClusters") @@ -2879,7 +2817,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeClustersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeClustersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeClustersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2901,7 +2839,6 @@ extension RedshiftClient { public func describeCustomDomainAssociations(input: DescribeCustomDomainAssociationsInput) async throws -> DescribeCustomDomainAssociationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeCustomDomainAssociations") @@ -2925,7 +2862,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeCustomDomainAssociationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeCustomDomainAssociationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeCustomDomainAssociationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2946,7 +2883,6 @@ extension RedshiftClient { public func describeDataShares(input: DescribeDataSharesInput) async throws -> DescribeDataSharesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDataShares") @@ -2970,7 +2906,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDataSharesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDataSharesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDataSharesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2991,7 +2927,6 @@ extension RedshiftClient { public func describeDataSharesForConsumer(input: DescribeDataSharesForConsumerInput) async throws -> DescribeDataSharesForConsumerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDataSharesForConsumer") @@ -3015,7 +2950,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDataSharesForConsumerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDataSharesForConsumerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDataSharesForConsumerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3036,7 +2971,6 @@ extension RedshiftClient { public func describeDataSharesForProducer(input: DescribeDataSharesForProducerInput) async throws -> DescribeDataSharesForProducerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDataSharesForProducer") @@ -3060,7 +2994,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDataSharesForProducerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDataSharesForProducerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDataSharesForProducerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3076,7 +3010,6 @@ extension RedshiftClient { public func describeDefaultClusterParameters(input: DescribeDefaultClusterParametersInput) async throws -> DescribeDefaultClusterParametersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeDefaultClusterParameters") @@ -3100,7 +3033,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeDefaultClusterParametersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeDefaultClusterParametersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeDefaultClusterParametersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3123,7 +3056,6 @@ extension RedshiftClient { public func describeEndpointAccess(input: DescribeEndpointAccessInput) async throws -> DescribeEndpointAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEndpointAccess") @@ -3147,7 +3079,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEndpointAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEndpointAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEndpointAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3169,7 +3101,6 @@ extension RedshiftClient { public func describeEndpointAuthorization(input: DescribeEndpointAuthorizationInput) async throws -> DescribeEndpointAuthorizationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEndpointAuthorization") @@ -3193,7 +3124,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEndpointAuthorizationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEndpointAuthorizationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEndpointAuthorizationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3209,7 +3140,6 @@ extension RedshiftClient { public func describeEventCategories(input: DescribeEventCategoriesInput) async throws -> DescribeEventCategoriesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEventCategories") @@ -3233,7 +3163,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventCategoriesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventCategoriesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventCategoriesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3255,7 +3185,6 @@ extension RedshiftClient { public func describeEventSubscriptions(input: DescribeEventSubscriptionsInput) async throws -> DescribeEventSubscriptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEventSubscriptions") @@ -3279,7 +3208,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventSubscriptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventSubscriptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventSubscriptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3295,7 +3224,6 @@ extension RedshiftClient { public func describeEvents(input: DescribeEventsInput) async throws -> DescribeEventsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeEvents") @@ -3319,7 +3247,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeEventsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeEventsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeEventsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3341,7 +3269,6 @@ extension RedshiftClient { public func describeHsmClientCertificates(input: DescribeHsmClientCertificatesInput) async throws -> DescribeHsmClientCertificatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeHsmClientCertificates") @@ -3365,7 +3292,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeHsmClientCertificatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeHsmClientCertificatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeHsmClientCertificatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3387,7 +3314,6 @@ extension RedshiftClient { public func describeHsmConfigurations(input: DescribeHsmConfigurationsInput) async throws -> DescribeHsmConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeHsmConfigurations") @@ -3411,7 +3337,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeHsmConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeHsmConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeHsmConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3434,7 +3360,6 @@ extension RedshiftClient { public func describeInboundIntegrations(input: DescribeInboundIntegrationsInput) async throws -> DescribeInboundIntegrationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeInboundIntegrations") @@ -3458,7 +3383,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeInboundIntegrationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeInboundIntegrationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeInboundIntegrationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3480,7 +3405,6 @@ extension RedshiftClient { public func describeLoggingStatus(input: DescribeLoggingStatusInput) async throws -> DescribeLoggingStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeLoggingStatus") @@ -3504,7 +3428,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeLoggingStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeLoggingStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeLoggingStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3529,7 +3453,6 @@ extension RedshiftClient { public func describeNodeConfigurationOptions(input: DescribeNodeConfigurationOptionsInput) async throws -> DescribeNodeConfigurationOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeNodeConfigurationOptions") @@ -3553,7 +3476,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeNodeConfigurationOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeNodeConfigurationOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeNodeConfigurationOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3569,7 +3492,6 @@ extension RedshiftClient { public func describeOrderableClusterOptions(input: DescribeOrderableClusterOptionsInput) async throws -> DescribeOrderableClusterOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeOrderableClusterOptions") @@ -3593,7 +3515,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeOrderableClusterOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeOrderableClusterOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeOrderableClusterOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3616,7 +3538,6 @@ extension RedshiftClient { public func describePartners(input: DescribePartnersInput) async throws -> DescribePartnersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describePartners") @@ -3640,7 +3561,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribePartnersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribePartnersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribePartnersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3664,7 +3585,6 @@ extension RedshiftClient { public func describeRedshiftIdcApplications(input: DescribeRedshiftIdcApplicationsInput) async throws -> DescribeRedshiftIdcApplicationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeRedshiftIdcApplications") @@ -3688,7 +3608,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeRedshiftIdcApplicationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeRedshiftIdcApplicationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeRedshiftIdcApplicationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3711,7 +3631,6 @@ extension RedshiftClient { public func describeReservedNodeExchangeStatus(input: DescribeReservedNodeExchangeStatusInput) async throws -> DescribeReservedNodeExchangeStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedNodeExchangeStatus") @@ -3735,7 +3654,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedNodeExchangeStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedNodeExchangeStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedNodeExchangeStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3758,7 +3677,6 @@ extension RedshiftClient { public func describeReservedNodeOfferings(input: DescribeReservedNodeOfferingsInput) async throws -> DescribeReservedNodeOfferingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedNodeOfferings") @@ -3782,7 +3700,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedNodeOfferingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedNodeOfferingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedNodeOfferingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3804,7 +3722,6 @@ extension RedshiftClient { public func describeReservedNodes(input: DescribeReservedNodesInput) async throws -> DescribeReservedNodesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReservedNodes") @@ -3828,7 +3745,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReservedNodesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReservedNodesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReservedNodesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3851,7 +3768,6 @@ extension RedshiftClient { public func describeResize(input: DescribeResizeInput) async throws -> DescribeResizeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeResize") @@ -3875,7 +3791,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeResizeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeResizeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeResizeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3897,7 +3813,6 @@ extension RedshiftClient { public func describeScheduledActions(input: DescribeScheduledActionsInput) async throws -> DescribeScheduledActionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeScheduledActions") @@ -3921,7 +3836,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeScheduledActionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeScheduledActionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeScheduledActionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3943,7 +3858,6 @@ extension RedshiftClient { public func describeSnapshotCopyGrants(input: DescribeSnapshotCopyGrantsInput) async throws -> DescribeSnapshotCopyGrantsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSnapshotCopyGrants") @@ -3967,7 +3881,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSnapshotCopyGrantsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSnapshotCopyGrantsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSnapshotCopyGrantsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3983,7 +3897,6 @@ extension RedshiftClient { public func describeSnapshotSchedules(input: DescribeSnapshotSchedulesInput) async throws -> DescribeSnapshotSchedulesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeSnapshotSchedules") @@ -4007,7 +3920,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeSnapshotSchedulesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeSnapshotSchedulesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeSnapshotSchedulesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4023,7 +3936,6 @@ extension RedshiftClient { public func describeStorage(input: DescribeStorageInput) async throws -> DescribeStorageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeStorage") @@ -4047,7 +3959,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeStorageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeStorageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeStorageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4069,7 +3981,6 @@ extension RedshiftClient { public func describeTableRestoreStatus(input: DescribeTableRestoreStatusInput) async throws -> DescribeTableRestoreStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTableRestoreStatus") @@ -4093,7 +4004,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTableRestoreStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTableRestoreStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTableRestoreStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4124,7 +4035,6 @@ extension RedshiftClient { public func describeTags(input: DescribeTagsInput) async throws -> DescribeTagsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeTags") @@ -4148,7 +4058,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeTagsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeTagsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeTagsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4178,7 +4088,6 @@ extension RedshiftClient { public func describeUsageLimits(input: DescribeUsageLimitsInput) async throws -> DescribeUsageLimitsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeUsageLimits") @@ -4202,7 +4111,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeUsageLimitsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeUsageLimitsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeUsageLimitsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4225,7 +4134,6 @@ extension RedshiftClient { public func disableLogging(input: DisableLoggingInput) async throws -> DisableLoggingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableLogging") @@ -4249,7 +4157,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableLoggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableLoggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableLoggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4274,7 +4182,6 @@ extension RedshiftClient { public func disableSnapshotCopy(input: DisableSnapshotCopyInput) async throws -> DisableSnapshotCopyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableSnapshotCopy") @@ -4298,7 +4205,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableSnapshotCopyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableSnapshotCopyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableSnapshotCopyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4320,7 +4227,6 @@ extension RedshiftClient { public func disassociateDataShareConsumer(input: DisassociateDataShareConsumerInput) async throws -> DisassociateDataShareConsumerOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateDataShareConsumer") @@ -4344,7 +4250,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateDataShareConsumerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateDataShareConsumerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateDataShareConsumerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4371,7 +4277,6 @@ extension RedshiftClient { public func enableLogging(input: EnableLoggingInput) async throws -> EnableLoggingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableLogging") @@ -4395,7 +4300,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableLoggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableLoggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableLoggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4426,7 +4331,6 @@ extension RedshiftClient { public func enableSnapshotCopy(input: EnableSnapshotCopyInput) async throws -> EnableSnapshotCopyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableSnapshotCopy") @@ -4450,7 +4354,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableSnapshotCopyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableSnapshotCopyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableSnapshotCopyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4474,7 +4378,6 @@ extension RedshiftClient { public func failoverPrimaryCompute(input: FailoverPrimaryComputeInput) async throws -> FailoverPrimaryComputeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "failoverPrimaryCompute") @@ -4498,7 +4401,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(FailoverPrimaryComputeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(FailoverPrimaryComputeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(FailoverPrimaryComputeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4520,7 +4423,6 @@ extension RedshiftClient { public func getClusterCredentials(input: GetClusterCredentialsInput) async throws -> GetClusterCredentialsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getClusterCredentials") @@ -4544,7 +4446,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetClusterCredentialsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetClusterCredentialsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetClusterCredentialsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4566,7 +4468,6 @@ extension RedshiftClient { public func getClusterCredentialsWithIAM(input: GetClusterCredentialsWithIAMInput) async throws -> GetClusterCredentialsWithIAMOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getClusterCredentialsWithIAM") @@ -4590,7 +4491,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetClusterCredentialsWithIAMOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetClusterCredentialsWithIAMOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetClusterCredentialsWithIAMOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4618,7 +4519,6 @@ extension RedshiftClient { public func getReservedNodeExchangeConfigurationOptions(input: GetReservedNodeExchangeConfigurationOptionsInput) async throws -> GetReservedNodeExchangeConfigurationOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getReservedNodeExchangeConfigurationOptions") @@ -4642,7 +4542,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetReservedNodeExchangeConfigurationOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetReservedNodeExchangeConfigurationOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetReservedNodeExchangeConfigurationOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4668,7 +4568,6 @@ extension RedshiftClient { public func getReservedNodeExchangeOfferings(input: GetReservedNodeExchangeOfferingsInput) async throws -> GetReservedNodeExchangeOfferingsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getReservedNodeExchangeOfferings") @@ -4692,7 +4591,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetReservedNodeExchangeOfferingsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetReservedNodeExchangeOfferingsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetReservedNodeExchangeOfferingsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4715,7 +4614,6 @@ extension RedshiftClient { public func getResourcePolicy(input: GetResourcePolicyInput) async throws -> GetResourcePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getResourcePolicy") @@ -4739,7 +4637,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetResourcePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetResourcePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetResourcePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4762,7 +4660,6 @@ extension RedshiftClient { public func modifyAquaConfiguration(input: ModifyAquaConfigurationInput) async throws -> ModifyAquaConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyAquaConfiguration") @@ -4786,7 +4683,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyAquaConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyAquaConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyAquaConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4809,7 +4706,6 @@ extension RedshiftClient { public func modifyAuthenticationProfile(input: ModifyAuthenticationProfileInput) async throws -> ModifyAuthenticationProfileOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyAuthenticationProfile") @@ -4833,7 +4729,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyAuthenticationProfileOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyAuthenticationProfileOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyAuthenticationProfileOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4875,7 +4771,6 @@ extension RedshiftClient { public func modifyCluster(input: ModifyClusterInput) async throws -> ModifyClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCluster") @@ -4899,7 +4794,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4923,7 +4818,6 @@ extension RedshiftClient { public func modifyClusterDbRevision(input: ModifyClusterDbRevisionInput) async throws -> ModifyClusterDbRevisionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyClusterDbRevision") @@ -4947,7 +4841,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClusterDbRevisionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClusterDbRevisionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClusterDbRevisionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4969,7 +4863,6 @@ extension RedshiftClient { public func modifyClusterIamRoles(input: ModifyClusterIamRolesInput) async throws -> ModifyClusterIamRolesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyClusterIamRoles") @@ -4993,7 +4886,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClusterIamRolesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClusterIamRolesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClusterIamRolesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5015,7 +4908,6 @@ extension RedshiftClient { public func modifyClusterMaintenance(input: ModifyClusterMaintenanceInput) async throws -> ModifyClusterMaintenanceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyClusterMaintenance") @@ -5039,7 +4931,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClusterMaintenanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClusterMaintenanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClusterMaintenanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5061,7 +4953,6 @@ extension RedshiftClient { public func modifyClusterParameterGroup(input: ModifyClusterParameterGroupInput) async throws -> ModifyClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyClusterParameterGroup") @@ -5085,7 +4976,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5108,7 +4999,6 @@ extension RedshiftClient { public func modifyClusterSnapshot(input: ModifyClusterSnapshotInput) async throws -> ModifyClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyClusterSnapshot") @@ -5132,7 +5022,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5155,7 +5045,6 @@ extension RedshiftClient { public func modifyClusterSnapshotSchedule(input: ModifyClusterSnapshotScheduleInput) async throws -> ModifyClusterSnapshotScheduleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyClusterSnapshotSchedule") @@ -5179,7 +5068,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClusterSnapshotScheduleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClusterSnapshotScheduleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClusterSnapshotScheduleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5205,7 +5094,6 @@ extension RedshiftClient { public func modifyClusterSubnetGroup(input: ModifyClusterSubnetGroupInput) async throws -> ModifyClusterSubnetGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyClusterSubnetGroup") @@ -5229,7 +5117,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyClusterSubnetGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyClusterSubnetGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyClusterSubnetGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5253,7 +5141,6 @@ extension RedshiftClient { public func modifyCustomDomainAssociation(input: ModifyCustomDomainAssociationInput) async throws -> ModifyCustomDomainAssociationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyCustomDomainAssociation") @@ -5277,7 +5164,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyCustomDomainAssociationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyCustomDomainAssociationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyCustomDomainAssociationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5303,7 +5190,6 @@ extension RedshiftClient { public func modifyEndpointAccess(input: ModifyEndpointAccessInput) async throws -> ModifyEndpointAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyEndpointAccess") @@ -5327,7 +5213,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyEndpointAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyEndpointAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyEndpointAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5356,7 +5242,6 @@ extension RedshiftClient { public func modifyEventSubscription(input: ModifyEventSubscriptionInput) async throws -> ModifyEventSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyEventSubscription") @@ -5380,7 +5265,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyEventSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyEventSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyEventSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5404,7 +5289,6 @@ extension RedshiftClient { public func modifyRedshiftIdcApplication(input: ModifyRedshiftIdcApplicationInput) async throws -> ModifyRedshiftIdcApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyRedshiftIdcApplication") @@ -5428,7 +5312,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyRedshiftIdcApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyRedshiftIdcApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyRedshiftIdcApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5455,7 +5339,6 @@ extension RedshiftClient { public func modifyScheduledAction(input: ModifyScheduledActionInput) async throws -> ModifyScheduledActionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyScheduledAction") @@ -5479,7 +5362,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyScheduledActionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyScheduledActionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyScheduledActionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5504,7 +5387,6 @@ extension RedshiftClient { public func modifySnapshotCopyRetentionPeriod(input: ModifySnapshotCopyRetentionPeriodInput) async throws -> ModifySnapshotCopyRetentionPeriodOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifySnapshotCopyRetentionPeriod") @@ -5528,7 +5410,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifySnapshotCopyRetentionPeriodOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifySnapshotCopyRetentionPeriodOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifySnapshotCopyRetentionPeriodOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5551,7 +5433,6 @@ extension RedshiftClient { public func modifySnapshotSchedule(input: ModifySnapshotScheduleInput) async throws -> ModifySnapshotScheduleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifySnapshotSchedule") @@ -5575,7 +5456,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifySnapshotScheduleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifySnapshotScheduleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifySnapshotScheduleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5598,7 +5479,6 @@ extension RedshiftClient { public func modifyUsageLimit(input: ModifyUsageLimitInput) async throws -> ModifyUsageLimitOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "modifyUsageLimit") @@ -5622,7 +5502,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ModifyUsageLimitOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ModifyUsageLimitOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ModifyUsageLimitOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5645,7 +5525,6 @@ extension RedshiftClient { public func pauseCluster(input: PauseClusterInput) async throws -> PauseClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "pauseCluster") @@ -5669,7 +5548,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PauseClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PauseClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PauseClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5693,7 +5572,6 @@ extension RedshiftClient { public func purchaseReservedNodeOffering(input: PurchaseReservedNodeOfferingInput) async throws -> PurchaseReservedNodeOfferingOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "purchaseReservedNodeOffering") @@ -5717,7 +5595,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PurchaseReservedNodeOfferingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PurchaseReservedNodeOfferingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PurchaseReservedNodeOfferingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5741,7 +5619,6 @@ extension RedshiftClient { public func putResourcePolicy(input: PutResourcePolicyInput) async throws -> PutResourcePolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putResourcePolicy") @@ -5765,7 +5642,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutResourcePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutResourcePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutResourcePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5787,7 +5664,6 @@ extension RedshiftClient { public func rebootCluster(input: RebootClusterInput) async throws -> RebootClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rebootCluster") @@ -5811,7 +5687,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RebootClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RebootClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RebootClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5832,7 +5708,6 @@ extension RedshiftClient { public func rejectDataShare(input: RejectDataShareInput) async throws -> RejectDataShareOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rejectDataShare") @@ -5856,7 +5731,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RejectDataShareOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RejectDataShareOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RejectDataShareOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5878,7 +5753,6 @@ extension RedshiftClient { public func resetClusterParameterGroup(input: ResetClusterParameterGroupInput) async throws -> ResetClusterParameterGroupOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resetClusterParameterGroup") @@ -5902,7 +5776,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResetClusterParameterGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResetClusterParameterGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResetClusterParameterGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5962,7 +5836,6 @@ extension RedshiftClient { public func resizeCluster(input: ResizeClusterInput) async throws -> ResizeClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resizeCluster") @@ -5986,7 +5859,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResizeClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResizeClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResizeClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6039,7 +5912,6 @@ extension RedshiftClient { public func restoreFromClusterSnapshot(input: RestoreFromClusterSnapshotInput) async throws -> RestoreFromClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreFromClusterSnapshot") @@ -6063,7 +5935,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreFromClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreFromClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreFromClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6090,7 +5962,6 @@ extension RedshiftClient { public func restoreTableFromClusterSnapshot(input: RestoreTableFromClusterSnapshotInput) async throws -> RestoreTableFromClusterSnapshotOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreTableFromClusterSnapshot") @@ -6114,7 +5985,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreTableFromClusterSnapshotOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreTableFromClusterSnapshotOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreTableFromClusterSnapshotOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6138,7 +6009,6 @@ extension RedshiftClient { public func resumeCluster(input: ResumeClusterInput) async throws -> ResumeClusterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "resumeCluster") @@ -6162,7 +6032,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ResumeClusterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ResumeClusterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ResumeClusterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6185,7 +6055,6 @@ extension RedshiftClient { public func revokeClusterSecurityGroupIngress(input: RevokeClusterSecurityGroupIngressInput) async throws -> RevokeClusterSecurityGroupIngressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "revokeClusterSecurityGroupIngress") @@ -6209,7 +6078,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RevokeClusterSecurityGroupIngressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RevokeClusterSecurityGroupIngressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RevokeClusterSecurityGroupIngressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6236,7 +6105,6 @@ extension RedshiftClient { public func revokeEndpointAccess(input: RevokeEndpointAccessInput) async throws -> RevokeEndpointAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "revokeEndpointAccess") @@ -6260,7 +6128,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RevokeEndpointAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RevokeEndpointAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RevokeEndpointAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6284,7 +6152,6 @@ extension RedshiftClient { public func revokeSnapshotAccess(input: RevokeSnapshotAccessInput) async throws -> RevokeSnapshotAccessOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "revokeSnapshotAccess") @@ -6308,7 +6175,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RevokeSnapshotAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RevokeSnapshotAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RevokeSnapshotAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6332,7 +6199,6 @@ extension RedshiftClient { public func rotateEncryptionKey(input: RotateEncryptionKeyInput) async throws -> RotateEncryptionKeyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "rotateEncryptionKey") @@ -6356,7 +6222,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RotateEncryptionKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RotateEncryptionKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RotateEncryptionKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -6380,7 +6246,6 @@ extension RedshiftClient { public func updatePartnerStatus(input: UpdatePartnerStatusInput) async throws -> UpdatePartnerStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updatePartnerStatus") @@ -6404,7 +6269,7 @@ extension RedshiftClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdatePartnerStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdatePartnerStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdatePartnerStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSRedshift/models/Models.swift b/Sources/Services/AWSRedshift/models/Models.swift index 5b5555bbe66..60a83442cfc 100644 --- a/Sources/Services/AWSRedshift/models/Models.swift +++ b/Sources/Services/AWSRedshift/models/Models.swift @@ -1,8 +1,15 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension AcceptReservedNodeExchangeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case reservedNodeId = "ReservedNodeId" + case targetReservedNodeOfferingId = "TargetReservedNodeOfferingId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let reservedNodeId = reservedNodeId { @@ -41,34 +48,15 @@ public struct AcceptReservedNodeExchangeInput: Swift.Equatable { } } -struct AcceptReservedNodeExchangeInputBody: Swift.Equatable { - let reservedNodeId: Swift.String? - let targetReservedNodeOfferingId: Swift.String? -} - -extension AcceptReservedNodeExchangeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedNodeId = "ReservedNodeId" - case targetReservedNodeOfferingId = "TargetReservedNodeOfferingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeId) - reservedNodeId = reservedNodeIdDecoded - let targetReservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetReservedNodeOfferingId) - targetReservedNodeOfferingId = targetReservedNodeOfferingIdDecoded - } -} +extension AcceptReservedNodeExchangeOutput { -extension AcceptReservedNodeExchangeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AcceptReservedNodeExchangeOutputBody = try responseDecoder.decode(responseBody: data) - self.exchangedReservedNode = output.exchangedReservedNode - } else { - self.exchangedReservedNode = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AcceptReservedNodeExchangeResult"] + var value = AcceptReservedNodeExchangeOutput() + value.exchangedReservedNode = try reader["ExchangedReservedNode"].readIfPresent(readingClosure: RedshiftClientTypes.ReservedNode.readingClosure) + return value } } } @@ -85,50 +73,38 @@ public struct AcceptReservedNodeExchangeOutput: Swift.Equatable { } } -struct AcceptReservedNodeExchangeOutputBody: Swift.Equatable { - let exchangedReservedNode: RedshiftClientTypes.ReservedNode? -} - -extension AcceptReservedNodeExchangeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exchangedReservedNode = "ExchangedReservedNode" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AcceptReservedNodeExchangeResult")) - let exchangedReservedNodeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNode.self, forKey: .exchangedReservedNode) - exchangedReservedNode = exchangedReservedNodeDecoded - } -} +enum AcceptReservedNodeExchangeOutputError { -enum AcceptReservedNodeExchangeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeAlreadyExists": return try await ReservedNodeAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeAlreadyExists": return try await ReservedNodeAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AccessToClusterDeniedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AccessToClusterDeniedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -156,33 +132,15 @@ public struct AccessToClusterDeniedFault: ClientRuntime.ModeledError, AWSClientR } } -struct AccessToClusterDeniedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AccessToClusterDeniedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AccessToSnapshotDeniedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AccessToSnapshotDeniedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -210,23 +168,7 @@ public struct AccessToSnapshotDeniedFault: ClientRuntime.ModeledError, AWSClient } } -struct AccessToSnapshotDeniedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AccessToSnapshotDeniedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.AccountAttribute: Swift.Codable { +extension RedshiftClientTypes.AccountAttribute: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeName = "AttributeName" case attributeValues = "AttributeValues" @@ -251,28 +193,13 @@ extension RedshiftClientTypes.AccountAttribute: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - if containerValues.contains(.attributeValues) { - struct KeyVal0{struct AttributeValueTarget{}} - let attributeValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeValues) - if let attributeValuesWrappedContainer = attributeValuesWrappedContainer { - let attributeValuesContainer = try attributeValuesWrappedContainer.decodeIfPresent([RedshiftClientTypes.AttributeValueTarget].self, forKey: .member) - var attributeValuesBuffer:[RedshiftClientTypes.AttributeValueTarget]? = nil - if let attributeValuesContainer = attributeValuesContainer { - attributeValuesBuffer = [RedshiftClientTypes.AttributeValueTarget]() - for structureContainer0 in attributeValuesContainer { - attributeValuesBuffer?.append(structureContainer0) - } - } - attributeValues = attributeValuesBuffer - } else { - attributeValues = [] - } - } else { - attributeValues = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.AccountAttribute() + value.attributeName = try reader["AttributeName"].readIfPresent() + value.attributeValues = try reader["AttributeValues"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.AttributeValueTarget.readingClosure, memberNodeInfo: "AttributeValueTarget", isFlattened: false) + return value } } } @@ -297,7 +224,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.AccountWithRestoreAccess: Swift.Codable { +extension RedshiftClientTypes.AccountWithRestoreAccess: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accountAlias = "AccountAlias" case accountId = "AccountId" @@ -313,12 +240,14 @@ extension RedshiftClientTypes.AccountWithRestoreAccess: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let accountAliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountAlias) - accountAlias = accountAliasDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.AccountWithRestoreAccess() + value.accountId = try reader["AccountId"].readIfPresent() + value.accountAlias = try reader["AccountAlias"].readIfPresent() + return value + } } } @@ -378,6 +307,13 @@ extension RedshiftClientTypes { } extension AddPartnerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accountId = "AccountId" + case clusterIdentifier = "ClusterIdentifier" + case databaseName = "DatabaseName" + case partnerName = "PartnerName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accountId = accountId { @@ -432,44 +368,16 @@ public struct AddPartnerInput: Swift.Equatable { } } -struct AddPartnerInputBody: Swift.Equatable { - let accountId: Swift.String? - let clusterIdentifier: Swift.String? - let databaseName: Swift.String? - let partnerName: Swift.String? -} - -extension AddPartnerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "AccountId" - case clusterIdentifier = "ClusterIdentifier" - case databaseName = "DatabaseName" - case partnerName = "PartnerName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let partnerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partnerName) - partnerName = partnerNameDecoded - } -} +extension AddPartnerOutput { -extension AddPartnerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AddPartnerOutputBody = try responseDecoder.decode(responseBody: data) - self.databaseName = output.databaseName - self.partnerName = output.partnerName - } else { - self.databaseName = nil - self.partnerName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AddPartnerResult"] + var value = AddPartnerOutput() + value.databaseName = try reader["DatabaseName"].readIfPresent() + value.partnerName = try reader["PartnerName"].readIfPresent() + return value } } } @@ -490,41 +398,27 @@ public struct AddPartnerOutput: Swift.Equatable { } } -struct AddPartnerOutputBody: Swift.Equatable { - let databaseName: Swift.String? - let partnerName: Swift.String? -} - -extension AddPartnerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case databaseName = "DatabaseName" - case partnerName = "PartnerName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AddPartnerResult")) - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let partnerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partnerName) - partnerName = partnerNameDecoded - } -} +enum AddPartnerOutputError { -enum AddPartnerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PartnerNotFound": return try await PartnerNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedPartnerIntegration": return try await UnauthorizedPartnerIntegrationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PartnerNotFound": return try await PartnerNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedPartnerIntegration": return try await UnauthorizedPartnerIntegrationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.AquaConfiguration: Swift.Codable { +extension RedshiftClientTypes.AquaConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case aquaConfigurationStatus = "AquaConfigurationStatus" case aquaStatus = "AquaStatus" @@ -540,12 +434,14 @@ extension RedshiftClientTypes.AquaConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let aquaStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AquaStatus.self, forKey: .aquaStatus) - aquaStatus = aquaStatusDecoded - let aquaConfigurationStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AquaConfigurationStatus.self, forKey: .aquaConfigurationStatus) - aquaConfigurationStatus = aquaConfigurationStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.AquaConfiguration() + value.aquaStatus = try reader["AquaStatus"].readIfPresent() + value.aquaConfigurationStatus = try reader["AquaConfigurationStatus"].readIfPresent() + return value + } } } @@ -640,6 +536,14 @@ extension RedshiftClientTypes { } extension AssociateDataShareConsumerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowWrites = "AllowWrites" + case associateEntireAccount = "AssociateEntireAccount" + case consumerArn = "ConsumerArn" + case consumerRegion = "ConsumerRegion" + case dataShareArn = "DataShareArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowWrites = allowWrites { @@ -698,54 +602,19 @@ public struct AssociateDataShareConsumerInput: Swift.Equatable { } } -struct AssociateDataShareConsumerInputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let associateEntireAccount: Swift.Bool? - let consumerArn: Swift.String? - let consumerRegion: Swift.String? - let allowWrites: Swift.Bool? -} - -extension AssociateDataShareConsumerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowWrites = "AllowWrites" - case associateEntireAccount = "AssociateEntireAccount" - case consumerArn = "ConsumerArn" - case consumerRegion = "ConsumerRegion" - case dataShareArn = "DataShareArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let associateEntireAccountDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .associateEntireAccount) - associateEntireAccount = associateEntireAccountDecoded - let consumerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerArn) - consumerArn = consumerArnDecoded - let consumerRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerRegion) - consumerRegion = consumerRegionDecoded - let allowWritesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowWrites) - allowWrites = allowWritesDecoded - } -} +extension AssociateDataShareConsumerOutput { -extension AssociateDataShareConsumerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateDataShareConsumerOutputBody = try responseDecoder.decode(responseBody: data) - self.allowPubliclyAccessibleConsumers = output.allowPubliclyAccessibleConsumers - self.dataShareArn = output.dataShareArn - self.dataShareAssociations = output.dataShareAssociations - self.managedBy = output.managedBy - self.producerArn = output.producerArn - } else { - self.allowPubliclyAccessibleConsumers = nil - self.dataShareArn = nil - self.dataShareAssociations = nil - self.managedBy = nil - self.producerArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AssociateDataShareConsumerResult"] + var value = AssociateDataShareConsumerOutput() + value.allowPubliclyAccessibleConsumers = try reader["AllowPubliclyAccessibleConsumers"].readIfPresent() + value.dataShareArn = try reader["DataShareArn"].readIfPresent() + value.dataShareAssociations = try reader["DataShareAssociations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShareAssociation.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.managedBy = try reader["ManagedBy"].readIfPresent() + value.producerArn = try reader["ProducerArn"].readIfPresent() + return value } } } @@ -778,68 +647,25 @@ public struct AssociateDataShareConsumerOutput: Swift.Equatable { } } -struct AssociateDataShareConsumerOutputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let producerArn: Swift.String? - let allowPubliclyAccessibleConsumers: Swift.Bool? - let dataShareAssociations: [RedshiftClientTypes.DataShareAssociation]? - let managedBy: Swift.String? -} - -extension AssociateDataShareConsumerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowPubliclyAccessibleConsumers = "AllowPubliclyAccessibleConsumers" - case dataShareArn = "DataShareArn" - case dataShareAssociations = "DataShareAssociations" - case managedBy = "ManagedBy" - case producerArn = "ProducerArn" - } +enum AssociateDataShareConsumerOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AssociateDataShareConsumerResult")) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let producerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .producerArn) - producerArn = producerArnDecoded - let allowPubliclyAccessibleConsumersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowPubliclyAccessibleConsumers) - allowPubliclyAccessibleConsumers = allowPubliclyAccessibleConsumersDecoded - if containerValues.contains(.dataShareAssociations) { - struct KeyVal0{struct member{}} - let dataShareAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShareAssociations) - if let dataShareAssociationsWrappedContainer = dataShareAssociationsWrappedContainer { - let dataShareAssociationsContainer = try dataShareAssociationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShareAssociation].self, forKey: .member) - var dataShareAssociationsBuffer:[RedshiftClientTypes.DataShareAssociation]? = nil - if let dataShareAssociationsContainer = dataShareAssociationsContainer { - dataShareAssociationsBuffer = [RedshiftClientTypes.DataShareAssociation]() - for structureContainer0 in dataShareAssociationsContainer { - dataShareAssociationsBuffer?.append(structureContainer0) - } - } - dataShareAssociations = dataShareAssociationsBuffer - } else { - dataShareAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidDataShareFault": return try await InvalidDataShareFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidNamespaceFault": return try await InvalidNamespaceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dataShareAssociations = nil } - let managedByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .managedBy) - managedBy = managedByDecoded } } -enum AssociateDataShareConsumerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDataShareFault": return try await InvalidDataShareFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidNamespaceFault": return try await InvalidNamespaceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RedshiftClientTypes.Association: Swift.Codable { +extension RedshiftClientTypes.Association: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case certificateAssociations = "CertificateAssociations" case customDomainCertificateArn = "CustomDomainCertificateArn" @@ -868,30 +694,14 @@ extension RedshiftClientTypes.Association: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customDomainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertificateArn) - customDomainCertificateArn = customDomainCertificateArnDecoded - let customDomainCertificateExpiryDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .customDomainCertificateExpiryDate) - customDomainCertificateExpiryDate = customDomainCertificateExpiryDateDecoded - if containerValues.contains(.certificateAssociations) { - struct KeyVal0{struct CertificateAssociation{}} - let certificateAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .certificateAssociations) - if let certificateAssociationsWrappedContainer = certificateAssociationsWrappedContainer { - let certificateAssociationsContainer = try certificateAssociationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.CertificateAssociation].self, forKey: .member) - var certificateAssociationsBuffer:[RedshiftClientTypes.CertificateAssociation]? = nil - if let certificateAssociationsContainer = certificateAssociationsContainer { - certificateAssociationsBuffer = [RedshiftClientTypes.CertificateAssociation]() - for structureContainer0 in certificateAssociationsContainer { - certificateAssociationsBuffer?.append(structureContainer0) - } - } - certificateAssociations = certificateAssociationsBuffer - } else { - certificateAssociations = [] - } - } else { - certificateAssociations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.Association() + value.customDomainCertificateArn = try reader["CustomDomainCertificateArn"].readIfPresent() + value.customDomainCertificateExpiryDate = try reader["CustomDomainCertificateExpiryDate"].readTimestampIfPresent(format: .dateTime) + value.certificateAssociations = try reader["CertificateAssociations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.CertificateAssociation.readingClosure, memberNodeInfo: "CertificateAssociation", isFlattened: false) + return value } } } @@ -920,7 +730,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.AttributeValueTarget: Swift.Codable { +extension RedshiftClientTypes.AttributeValueTarget: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributeValue = "AttributeValue" } @@ -932,10 +742,13 @@ extension RedshiftClientTypes.AttributeValueTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeValue) - attributeValue = attributeValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.AttributeValueTarget() + value.attributeValue = try reader["AttributeValue"].readIfPresent() + return value + } } } @@ -955,7 +768,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.AuthenticationProfile: Swift.Codable { +extension RedshiftClientTypes.AuthenticationProfile: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authenticationProfileContent = "AuthenticationProfileContent" case authenticationProfileName = "AuthenticationProfileName" @@ -971,12 +784,14 @@ extension RedshiftClientTypes.AuthenticationProfile: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let authenticationProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileName) - authenticationProfileName = authenticationProfileNameDecoded - let authenticationProfileContentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileContent) - authenticationProfileContent = authenticationProfileContentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.AuthenticationProfile() + value.authenticationProfileName = try reader["AuthenticationProfileName"].readIfPresent() + value.authenticationProfileContent = try reader["AuthenticationProfileContent"].readIfPresent() + return value + } } } @@ -1001,16 +816,14 @@ extension RedshiftClientTypes { } extension AuthenticationProfileAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthenticationProfileAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1038,33 +851,15 @@ public struct AuthenticationProfileAlreadyExistsFault: ClientRuntime.ModeledErro } } -struct AuthenticationProfileAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthenticationProfileAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AuthenticationProfileNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthenticationProfileNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1092,33 +887,15 @@ public struct AuthenticationProfileNotFoundFault: ClientRuntime.ModeledError, AW } } -struct AuthenticationProfileNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthenticationProfileNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AuthenticationProfileQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthenticationProfileQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1146,33 +923,15 @@ public struct AuthenticationProfileQuotaExceededFault: ClientRuntime.ModeledErro } } -struct AuthenticationProfileQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthenticationProfileQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AuthorizationAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1200,33 +959,15 @@ public struct AuthorizationAlreadyExistsFault: ClientRuntime.ModeledError, AWSCl } } -struct AuthorizationAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AuthorizationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1254,33 +995,15 @@ public struct AuthorizationNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct AuthorizationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension AuthorizationQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1308,22 +1031,6 @@ public struct AuthorizationQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct AuthorizationQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum AuthorizationStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case authorized @@ -1357,6 +1064,13 @@ extension RedshiftClientTypes { } extension AuthorizeClusterSecurityGroupIngressInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cidrip = "CIDRIP" + case clusterSecurityGroupName = "ClusterSecurityGroupName" + case ec2SecurityGroupName = "EC2SecurityGroupName" + case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cidrip = cidrip { @@ -1409,42 +1123,15 @@ public struct AuthorizeClusterSecurityGroupIngressInput: Swift.Equatable { } } -struct AuthorizeClusterSecurityGroupIngressInputBody: Swift.Equatable { - let clusterSecurityGroupName: Swift.String? - let cidrip: Swift.String? - let ec2SecurityGroupName: Swift.String? - let ec2SecurityGroupOwnerId: Swift.String? -} - -extension AuthorizeClusterSecurityGroupIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrip = "CIDRIP" - case clusterSecurityGroupName = "ClusterSecurityGroupName" - case ec2SecurityGroupName = "EC2SecurityGroupName" - case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSecurityGroupName) - clusterSecurityGroupName = clusterSecurityGroupNameDecoded - let cidripDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrip) - cidrip = cidripDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded - } -} +extension AuthorizeClusterSecurityGroupIngressOutput { -extension AuthorizeClusterSecurityGroupIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeClusterSecurityGroupIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterSecurityGroup = output.clusterSecurityGroup - } else { - self.clusterSecurityGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AuthorizeClusterSecurityGroupIngressResult"] + var value = AuthorizeClusterSecurityGroupIngressOutput() + value.clusterSecurityGroup = try reader["ClusterSecurityGroup"].readIfPresent(readingClosure: RedshiftClientTypes.ClusterSecurityGroup.readingClosure) + return value } } } @@ -1461,37 +1148,33 @@ public struct AuthorizeClusterSecurityGroupIngressOutput: Swift.Equatable { } } -struct AuthorizeClusterSecurityGroupIngressOutputBody: Swift.Equatable { - let clusterSecurityGroup: RedshiftClientTypes.ClusterSecurityGroup? -} - -extension AuthorizeClusterSecurityGroupIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSecurityGroup = "ClusterSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AuthorizeClusterSecurityGroupIngressResult")) - let clusterSecurityGroupDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ClusterSecurityGroup.self, forKey: .clusterSecurityGroup) - clusterSecurityGroup = clusterSecurityGroupDecoded - } -} +enum AuthorizeClusterSecurityGroupIngressOutputError { -enum AuthorizeClusterSecurityGroupIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationAlreadyExists": return try await AuthorizationAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AuthorizationQuotaExceeded": return try await AuthorizationQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationAlreadyExists": return try await AuthorizationAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "AuthorizationQuotaExceeded": return try await AuthorizationQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AuthorizeDataShareInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowWrites = "AllowWrites" + case consumerIdentifier = "ConsumerIdentifier" + case dataShareArn = "DataShareArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowWrites = allowWrites { @@ -1537,46 +1220,19 @@ public struct AuthorizeDataShareInput: Swift.Equatable { } } -struct AuthorizeDataShareInputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let consumerIdentifier: Swift.String? - let allowWrites: Swift.Bool? -} - -extension AuthorizeDataShareInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowWrites = "AllowWrites" - case consumerIdentifier = "ConsumerIdentifier" - case dataShareArn = "DataShareArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let consumerIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerIdentifier) - consumerIdentifier = consumerIdentifierDecoded - let allowWritesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowWrites) - allowWrites = allowWritesDecoded - } -} +extension AuthorizeDataShareOutput { -extension AuthorizeDataShareOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeDataShareOutputBody = try responseDecoder.decode(responseBody: data) - self.allowPubliclyAccessibleConsumers = output.allowPubliclyAccessibleConsumers - self.dataShareArn = output.dataShareArn - self.dataShareAssociations = output.dataShareAssociations - self.managedBy = output.managedBy - self.producerArn = output.producerArn - } else { - self.allowPubliclyAccessibleConsumers = nil - self.dataShareArn = nil - self.dataShareAssociations = nil - self.managedBy = nil - self.producerArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AuthorizeDataShareResult"] + var value = AuthorizeDataShareOutput() + value.allowPubliclyAccessibleConsumers = try reader["AllowPubliclyAccessibleConsumers"].readIfPresent() + value.dataShareArn = try reader["DataShareArn"].readIfPresent() + value.dataShareAssociations = try reader["DataShareAssociations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShareAssociation.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.managedBy = try reader["ManagedBy"].readIfPresent() + value.producerArn = try reader["ProducerArn"].readIfPresent() + return value } } } @@ -1609,67 +1265,30 @@ public struct AuthorizeDataShareOutput: Swift.Equatable { } } -struct AuthorizeDataShareOutputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let producerArn: Swift.String? - let allowPubliclyAccessibleConsumers: Swift.Bool? - let dataShareAssociations: [RedshiftClientTypes.DataShareAssociation]? - let managedBy: Swift.String? -} - -extension AuthorizeDataShareOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowPubliclyAccessibleConsumers = "AllowPubliclyAccessibleConsumers" - case dataShareArn = "DataShareArn" - case dataShareAssociations = "DataShareAssociations" - case managedBy = "ManagedBy" - case producerArn = "ProducerArn" - } +enum AuthorizeDataShareOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AuthorizeDataShareResult")) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let producerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .producerArn) - producerArn = producerArnDecoded - let allowPubliclyAccessibleConsumersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowPubliclyAccessibleConsumers) - allowPubliclyAccessibleConsumers = allowPubliclyAccessibleConsumersDecoded - if containerValues.contains(.dataShareAssociations) { - struct KeyVal0{struct member{}} - let dataShareAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShareAssociations) - if let dataShareAssociationsWrappedContainer = dataShareAssociationsWrappedContainer { - let dataShareAssociationsContainer = try dataShareAssociationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShareAssociation].self, forKey: .member) - var dataShareAssociationsBuffer:[RedshiftClientTypes.DataShareAssociation]? = nil - if let dataShareAssociationsContainer = dataShareAssociationsContainer { - dataShareAssociationsBuffer = [RedshiftClientTypes.DataShareAssociation]() - for structureContainer0 in dataShareAssociationsContainer { - dataShareAssociationsBuffer?.append(structureContainer0) - } - } - dataShareAssociations = dataShareAssociationsBuffer - } else { - dataShareAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidDataShareFault": return try await InvalidDataShareFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dataShareAssociations = nil } - let managedByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .managedBy) - managedBy = managedByDecoded } } -enum AuthorizeDataShareOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDataShareFault": return try await InvalidDataShareFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension AuthorizeEndpointAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case account = "Account" + case clusterIdentifier = "ClusterIdentifier" + case vpcIds = "VpcIds" } -} -extension AuthorizeEndpointAccessInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let account = account { @@ -1723,71 +1342,23 @@ public struct AuthorizeEndpointAccessInput: Swift.Equatable { } } -struct AuthorizeEndpointAccessInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let account: Swift.String? - let vpcIds: [Swift.String]? -} - -extension AuthorizeEndpointAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case account = "Account" - case clusterIdentifier = "ClusterIdentifier" - case vpcIds = "VpcIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - if containerValues.contains(.vpcIds) { - struct KeyVal0{struct VpcIdentifier{}} - let vpcIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcIds) - if let vpcIdsWrappedContainer = vpcIdsWrappedContainer { - let vpcIdsContainer = try vpcIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcIdsBuffer:[Swift.String]? = nil - if let vpcIdsContainer = vpcIdsContainer { - vpcIdsBuffer = [Swift.String]() - for stringContainer0 in vpcIdsContainer { - vpcIdsBuffer?.append(stringContainer0) - } - } - vpcIds = vpcIdsBuffer - } else { - vpcIds = [] - } - } else { - vpcIds = nil - } - } -} +extension AuthorizeEndpointAccessOutput { -extension AuthorizeEndpointAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeEndpointAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.allowedAllVPCs = output.allowedAllVPCs - self.allowedVPCs = output.allowedVPCs - self.authorizeTime = output.authorizeTime - self.clusterIdentifier = output.clusterIdentifier - self.clusterStatus = output.clusterStatus - self.endpointCount = output.endpointCount - self.grantee = output.grantee - self.grantor = output.grantor - self.status = output.status - } else { - self.allowedAllVPCs = nil - self.allowedVPCs = nil - self.authorizeTime = nil - self.clusterIdentifier = nil - self.clusterStatus = nil - self.endpointCount = nil - self.grantee = nil - self.grantor = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AuthorizeEndpointAccessResult"] + var value = AuthorizeEndpointAccessOutput() + value.allowedAllVPCs = try reader["AllowedAllVPCs"].readIfPresent() + value.allowedVPCs = try reader["AllowedVPCs"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "VpcIdentifier", isFlattened: false) + value.authorizeTime = try reader["AuthorizeTime"].readTimestampIfPresent(format: .dateTime) + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.clusterStatus = try reader["ClusterStatus"].readIfPresent() + value.endpointCount = try reader["EndpointCount"].readIfPresent() + value.grantee = try reader["Grantee"].readIfPresent() + value.grantor = try reader["Grantor"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -1837,88 +1408,36 @@ public struct AuthorizeEndpointAccessOutput: Swift.Equatable { } } -struct AuthorizeEndpointAccessOutputBody: Swift.Equatable { - let grantor: Swift.String? - let grantee: Swift.String? - let clusterIdentifier: Swift.String? - let authorizeTime: ClientRuntime.Date? - let clusterStatus: Swift.String? - let status: RedshiftClientTypes.AuthorizationStatus? - let allowedAllVPCs: Swift.Bool? - let allowedVPCs: [Swift.String]? - let endpointCount: Swift.Int? +enum AuthorizeEndpointAccessOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointAuthorizationAlreadyExists": return try await EndpointAuthorizationAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointAuthorizationsPerClusterLimitExceeded": return try await EndpointAuthorizationsPerClusterLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidAuthorizationState": return try await InvalidAuthorizationStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } } -extension AuthorizeEndpointAccessOutputBody: Swift.Decodable { +extension AuthorizeSnapshotAccessInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case allowedAllVPCs = "AllowedAllVPCs" - case allowedVPCs = "AllowedVPCs" - case authorizeTime = "AuthorizeTime" - case clusterIdentifier = "ClusterIdentifier" - case clusterStatus = "ClusterStatus" - case endpointCount = "EndpointCount" - case grantee = "Grantee" - case grantor = "Grantor" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AuthorizeEndpointAccessResult")) - let grantorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantor) - grantor = grantorDecoded - let granteeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantee) - grantee = granteeDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let authorizeTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .authorizeTime) - authorizeTime = authorizeTimeDecoded - let clusterStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterStatus) - clusterStatus = clusterStatusDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AuthorizationStatus.self, forKey: .status) - status = statusDecoded - let allowedAllVPCsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowedAllVPCs) - allowedAllVPCs = allowedAllVPCsDecoded - if containerValues.contains(.allowedVPCs) { - struct KeyVal0{struct VpcIdentifier{}} - let allowedVPCsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedVPCs) - if let allowedVPCsWrappedContainer = allowedVPCsWrappedContainer { - let allowedVPCsContainer = try allowedVPCsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allowedVPCsBuffer:[Swift.String]? = nil - if let allowedVPCsContainer = allowedVPCsContainer { - allowedVPCsBuffer = [Swift.String]() - for stringContainer0 in allowedVPCsContainer { - allowedVPCsBuffer?.append(stringContainer0) - } - } - allowedVPCs = allowedVPCsBuffer - } else { - allowedVPCs = [] - } - } else { - allowedVPCs = nil - } - let endpointCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .endpointCount) - endpointCount = endpointCountDecoded - } -} - -enum AuthorizeEndpointAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointAuthorizationAlreadyExists": return try await EndpointAuthorizationAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointAuthorizationsPerClusterLimitExceeded": return try await EndpointAuthorizationsPerClusterLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidAuthorizationState": return try await InvalidAuthorizationStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } + case accountWithRestoreAccess = "AccountWithRestoreAccess" + case snapshotArn = "SnapshotArn" + case snapshotClusterIdentifier = "SnapshotClusterIdentifier" + case snapshotIdentifier = "SnapshotIdentifier" } -} -extension AuthorizeSnapshotAccessInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accountWithRestoreAccess = accountWithRestoreAccess { @@ -1971,42 +1490,15 @@ public struct AuthorizeSnapshotAccessInput: Swift.Equatable { } } -struct AuthorizeSnapshotAccessInputBody: Swift.Equatable { - let snapshotIdentifier: Swift.String? - let snapshotArn: Swift.String? - let snapshotClusterIdentifier: Swift.String? - let accountWithRestoreAccess: Swift.String? -} - -extension AuthorizeSnapshotAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountWithRestoreAccess = "AccountWithRestoreAccess" - case snapshotArn = "SnapshotArn" - case snapshotClusterIdentifier = "SnapshotClusterIdentifier" - case snapshotIdentifier = "SnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let snapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotArn) - snapshotArn = snapshotArnDecoded - let snapshotClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotClusterIdentifier) - snapshotClusterIdentifier = snapshotClusterIdentifierDecoded - let accountWithRestoreAccessDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountWithRestoreAccess) - accountWithRestoreAccess = accountWithRestoreAccessDecoded - } -} +extension AuthorizeSnapshotAccessOutput { -extension AuthorizeSnapshotAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AuthorizeSnapshotAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AuthorizeSnapshotAccessResult"] + var value = AuthorizeSnapshotAccessOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: RedshiftClientTypes.Snapshot.readingClosure) + return value } } } @@ -2023,40 +1515,30 @@ public struct AuthorizeSnapshotAccessOutput: Swift.Equatable { } } -struct AuthorizeSnapshotAccessOutputBody: Swift.Equatable { - let snapshot: RedshiftClientTypes.Snapshot? -} - -extension AuthorizeSnapshotAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AuthorizeSnapshotAccessResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum AuthorizeSnapshotAccessOutputError { -enum AuthorizeSnapshotAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationAlreadyExists": return try await AuthorizationAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AuthorizationQuotaExceeded": return try await AuthorizationQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededFault": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationAlreadyExists": return try await AuthorizationAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "AuthorizationQuotaExceeded": return try await AuthorizationQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededFault": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.AuthorizedTokenIssuer: Swift.Codable { +extension RedshiftClientTypes.AuthorizedTokenIssuer: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authorizedAudiencesList = "AuthorizedAudiencesList" case trustedTokenIssuerArn = "TrustedTokenIssuerArn" @@ -2081,28 +1563,13 @@ extension RedshiftClientTypes.AuthorizedTokenIssuer: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trustedTokenIssuerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trustedTokenIssuerArn) - trustedTokenIssuerArn = trustedTokenIssuerArnDecoded - if containerValues.contains(.authorizedAudiencesList) { - struct KeyVal0{struct member{}} - let authorizedAudiencesListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .authorizedAudiencesList) - if let authorizedAudiencesListWrappedContainer = authorizedAudiencesListWrappedContainer { - let authorizedAudiencesListContainer = try authorizedAudiencesListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var authorizedAudiencesListBuffer:[Swift.String]? = nil - if let authorizedAudiencesListContainer = authorizedAudiencesListContainer { - authorizedAudiencesListBuffer = [Swift.String]() - for stringContainer0 in authorizedAudiencesListContainer { - authorizedAudiencesListBuffer?.append(stringContainer0) - } - } - authorizedAudiencesList = authorizedAudiencesListBuffer - } else { - authorizedAudiencesList = [] - } - } else { - authorizedAudiencesList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.AuthorizedTokenIssuer() + value.trustedTokenIssuerArn = try reader["TrustedTokenIssuerArn"].readIfPresent() + value.authorizedAudiencesList = try reader["AuthorizedAudiencesList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -2127,7 +1594,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.AvailabilityZone: Swift.Codable { +extension RedshiftClientTypes.AvailabilityZone: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case supportedPlatforms = "SupportedPlatforms" @@ -2152,28 +1619,13 @@ extension RedshiftClientTypes.AvailabilityZone: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.supportedPlatforms) { - struct KeyVal0{struct SupportedPlatform{}} - let supportedPlatformsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedPlatforms) - if let supportedPlatformsWrappedContainer = supportedPlatformsWrappedContainer { - let supportedPlatformsContainer = try supportedPlatformsWrappedContainer.decodeIfPresent([RedshiftClientTypes.SupportedPlatform].self, forKey: .member) - var supportedPlatformsBuffer:[RedshiftClientTypes.SupportedPlatform]? = nil - if let supportedPlatformsContainer = supportedPlatformsContainer { - supportedPlatformsBuffer = [RedshiftClientTypes.SupportedPlatform]() - for structureContainer0 in supportedPlatformsContainer { - supportedPlatformsBuffer?.append(structureContainer0) - } - } - supportedPlatforms = supportedPlatformsBuffer - } else { - supportedPlatforms = [] - } - } else { - supportedPlatforms = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.AvailabilityZone() + value.name = try reader["Name"].readIfPresent() + value.supportedPlatforms = try reader["SupportedPlatforms"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.SupportedPlatform.readingClosure, memberNodeInfo: "SupportedPlatform", isFlattened: false) + return value } } } @@ -2199,6 +1651,10 @@ extension RedshiftClientTypes { } extension BatchDeleteClusterSnapshotsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identifiers = "Identifiers" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identifiers = identifiers { @@ -2238,49 +1694,16 @@ public struct BatchDeleteClusterSnapshotsInput: Swift.Equatable { } } -struct BatchDeleteClusterSnapshotsInputBody: Swift.Equatable { - let identifiers: [RedshiftClientTypes.DeleteClusterSnapshotMessage]? -} - -extension BatchDeleteClusterSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identifiers = "Identifiers" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.identifiers) { - struct KeyVal0{struct DeleteClusterSnapshotMessage{}} - let identifiersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .identifiers) - if let identifiersWrappedContainer = identifiersWrappedContainer { - let identifiersContainer = try identifiersWrappedContainer.decodeIfPresent([RedshiftClientTypes.DeleteClusterSnapshotMessage].self, forKey: .member) - var identifiersBuffer:[RedshiftClientTypes.DeleteClusterSnapshotMessage]? = nil - if let identifiersContainer = identifiersContainer { - identifiersBuffer = [RedshiftClientTypes.DeleteClusterSnapshotMessage]() - for structureContainer0 in identifiersContainer { - identifiersBuffer?.append(structureContainer0) - } - } - identifiers = identifiersBuffer - } else { - identifiers = [] - } - } else { - identifiers = nil - } - } -} +extension BatchDeleteClusterSnapshotsOutput { -extension BatchDeleteClusterSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BatchDeleteClusterSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.errors = output.errors - self.resources = output.resources - } else { - self.errors = nil - self.resources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BatchDeleteClusterSnapshotsResult"] + var value = BatchDeleteClusterSnapshotsOutput() + value.errors = try reader["Errors"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.SnapshotErrorMessage.readingClosure, memberNodeInfo: "SnapshotErrorMessage", isFlattened: false) + value.resources = try reader["Resources"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "String", isFlattened: false) + return value } } } @@ -2301,82 +1724,32 @@ public struct BatchDeleteClusterSnapshotsOutput: Swift.Equatable { } } -struct BatchDeleteClusterSnapshotsOutputBody: Swift.Equatable { - let resources: [Swift.String]? - let errors: [RedshiftClientTypes.SnapshotErrorMessage]? -} +enum BatchDeleteClusterSnapshotsOutputError { -extension BatchDeleteClusterSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errors = "Errors" - case resources = "Resources" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BatchDeleteClusterSnapshotsResult")) - if containerValues.contains(.resources) { - struct KeyVal0{struct String{}} - let resourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resources) - if let resourcesWrappedContainer = resourcesWrappedContainer { - let resourcesContainer = try resourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesBuffer:[Swift.String]? = nil - if let resourcesContainer = resourcesContainer { - resourcesBuffer = [Swift.String]() - for stringContainer0 in resourcesContainer { - resourcesBuffer?.append(stringContainer0) - } - } - resources = resourcesBuffer - } else { - resources = [] - } - } else { - resources = nil - } - if containerValues.contains(.errors) { - struct KeyVal0{struct SnapshotErrorMessage{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([RedshiftClientTypes.SnapshotErrorMessage].self, forKey: .member) - var errorsBuffer:[RedshiftClientTypes.SnapshotErrorMessage]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [RedshiftClientTypes.SnapshotErrorMessage]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BatchDeleteRequestSizeExceeded": return try await BatchDeleteRequestSizeExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - errors = nil - } - } -} - -enum BatchDeleteClusterSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BatchDeleteRequestSizeExceeded": return try await BatchDeleteRequestSizeExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension BatchDeleteRequestSizeExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BatchDeleteRequestSizeExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2404,23 +1777,13 @@ public struct BatchDeleteRequestSizeExceededFault: ClientRuntime.ModeledError, A } } -struct BatchDeleteRequestSizeExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension BatchDeleteRequestSizeExceededFaultBody: Swift.Decodable { +extension BatchModifyClusterSnapshotsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case force = "Force" + case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" + case snapshotIdentifierList = "SnapshotIdentifierList" } -} -extension BatchModifyClusterSnapshotsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let force = force { @@ -2474,58 +1837,15 @@ public struct BatchModifyClusterSnapshotsInput: Swift.Equatable { } } -struct BatchModifyClusterSnapshotsInputBody: Swift.Equatable { - let snapshotIdentifierList: [Swift.String]? - let manualSnapshotRetentionPeriod: Swift.Int? - let force: Swift.Bool? -} - -extension BatchModifyClusterSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case force = "Force" - case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" - case snapshotIdentifierList = "SnapshotIdentifierList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.snapshotIdentifierList) { - struct KeyVal0{struct String{}} - let snapshotIdentifierListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotIdentifierList) - if let snapshotIdentifierListWrappedContainer = snapshotIdentifierListWrappedContainer { - let snapshotIdentifierListContainer = try snapshotIdentifierListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var snapshotIdentifierListBuffer:[Swift.String]? = nil - if let snapshotIdentifierListContainer = snapshotIdentifierListContainer { - snapshotIdentifierListBuffer = [Swift.String]() - for stringContainer0 in snapshotIdentifierListContainer { - snapshotIdentifierListBuffer?.append(stringContainer0) - } - } - snapshotIdentifierList = snapshotIdentifierListBuffer - } else { - snapshotIdentifierList = [] - } - } else { - snapshotIdentifierList = nil - } - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - } -} - extension BatchModifyClusterSnapshotsLimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BatchModifyClusterSnapshotsLimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2553,32 +1873,16 @@ public struct BatchModifyClusterSnapshotsLimitExceededFault: ClientRuntime.Model } } -struct BatchModifyClusterSnapshotsLimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension BatchModifyClusterSnapshotsLimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} +extension BatchModifyClusterSnapshotsOutput { -extension BatchModifyClusterSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: BatchModifyClusterSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.errors = output.errors - self.resources = output.resources - } else { - self.errors = nil - self.resources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["BatchModifyClusterSnapshotsResult"] + var value = BatchModifyClusterSnapshotsOutput() + value.errors = try reader["Errors"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.SnapshotErrorMessage.readingClosure, memberNodeInfo: "SnapshotErrorMessage", isFlattened: false) + value.resources = try reader["Resources"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "String", isFlattened: false) + return value } } } @@ -2599,83 +1903,33 @@ public struct BatchModifyClusterSnapshotsOutput: Swift.Equatable { } } -struct BatchModifyClusterSnapshotsOutputBody: Swift.Equatable { - let resources: [Swift.String]? - let errors: [RedshiftClientTypes.SnapshotErrorMessage]? -} +enum BatchModifyClusterSnapshotsOutputError { -extension BatchModifyClusterSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errors = "Errors" - case resources = "Resources" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("BatchModifyClusterSnapshotsResult")) - if containerValues.contains(.resources) { - struct KeyVal0{struct String{}} - let resourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resources) - if let resourcesWrappedContainer = resourcesWrappedContainer { - let resourcesContainer = try resourcesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourcesBuffer:[Swift.String]? = nil - if let resourcesContainer = resourcesContainer { - resourcesBuffer = [Swift.String]() - for stringContainer0 in resourcesContainer { - resourcesBuffer?.append(stringContainer0) - } - } - resources = resourcesBuffer - } else { - resources = [] - } - } else { - resources = nil - } - if containerValues.contains(.errors) { - struct KeyVal0{struct SnapshotErrorMessage{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([RedshiftClientTypes.SnapshotErrorMessage].self, forKey: .member) - var errorsBuffer:[RedshiftClientTypes.SnapshotErrorMessage]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [RedshiftClientTypes.SnapshotErrorMessage]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BatchModifyClusterSnapshotsLimitExceededFault": return try await BatchModifyClusterSnapshotsLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - errors = nil - } - } -} - -enum BatchModifyClusterSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BatchModifyClusterSnapshotsLimitExceededFault": return try await BatchModifyClusterSnapshotsLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension BucketNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BucketNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2703,23 +1957,11 @@ public struct BucketNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct BucketNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension BucketNotFoundFaultBody: Swift.Decodable { +extension CancelResizeInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case clusterIdentifier = "ClusterIdentifier" } -} -extension CancelResizeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -2750,60 +1992,30 @@ public struct CancelResizeInput: Swift.Equatable { } } -struct CancelResizeInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension CancelResizeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } +extension CancelResizeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} - -extension CancelResizeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CancelResizeOutputBody = try responseDecoder.decode(responseBody: data) - self.avgResizeRateInMegaBytesPerSecond = output.avgResizeRateInMegaBytesPerSecond - self.dataTransferProgressPercent = output.dataTransferProgressPercent - self.elapsedTimeInSeconds = output.elapsedTimeInSeconds - self.estimatedTimeToCompletionInSeconds = output.estimatedTimeToCompletionInSeconds - self.importTablesCompleted = output.importTablesCompleted - self.importTablesInProgress = output.importTablesInProgress - self.importTablesNotStarted = output.importTablesNotStarted - self.message = output.message - self.progressInMegaBytes = output.progressInMegaBytes - self.resizeType = output.resizeType - self.status = output.status - self.targetClusterType = output.targetClusterType - self.targetEncryptionType = output.targetEncryptionType - self.targetNodeType = output.targetNodeType - self.targetNumberOfNodes = output.targetNumberOfNodes - self.totalResizeDataInMegaBytes = output.totalResizeDataInMegaBytes - } else { - self.avgResizeRateInMegaBytesPerSecond = nil - self.dataTransferProgressPercent = nil - self.elapsedTimeInSeconds = nil - self.estimatedTimeToCompletionInSeconds = nil - self.importTablesCompleted = nil - self.importTablesInProgress = nil - self.importTablesNotStarted = nil - self.message = nil - self.progressInMegaBytes = nil - self.resizeType = nil - self.status = nil - self.targetClusterType = nil - self.targetEncryptionType = nil - self.targetNodeType = nil - self.targetNumberOfNodes = nil - self.totalResizeDataInMegaBytes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CancelResizeResult"] + var value = CancelResizeOutput() + value.avgResizeRateInMegaBytesPerSecond = try reader["AvgResizeRateInMegaBytesPerSecond"].readIfPresent() + value.dataTransferProgressPercent = try reader["DataTransferProgressPercent"].readIfPresent() + value.elapsedTimeInSeconds = try reader["ElapsedTimeInSeconds"].readIfPresent() + value.estimatedTimeToCompletionInSeconds = try reader["EstimatedTimeToCompletionInSeconds"].readIfPresent() + value.importTablesCompleted = try reader["ImportTablesCompleted"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.importTablesInProgress = try reader["ImportTablesInProgress"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.importTablesNotStarted = try reader["ImportTablesNotStarted"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.message = try reader["Message"].readIfPresent() + value.progressInMegaBytes = try reader["ProgressInMegaBytes"].readIfPresent() + value.resizeType = try reader["ResizeType"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.targetClusterType = try reader["TargetClusterType"].readIfPresent() + value.targetEncryptionType = try reader["TargetEncryptionType"].readIfPresent() + value.targetNodeType = try reader["TargetNodeType"].readIfPresent() + value.targetNumberOfNodes = try reader["TargetNumberOfNodes"].readIfPresent() + value.totalResizeDataInMegaBytes = try reader["TotalResizeDataInMegaBytes"].readIfPresent() + return value } } } @@ -2881,148 +2093,27 @@ public struct CancelResizeOutput: Swift.Equatable { } } -struct CancelResizeOutputBody: Swift.Equatable { - let targetNodeType: Swift.String? - let targetNumberOfNodes: Swift.Int? - let targetClusterType: Swift.String? - let status: Swift.String? - let importTablesCompleted: [Swift.String]? - let importTablesInProgress: [Swift.String]? - let importTablesNotStarted: [Swift.String]? - let avgResizeRateInMegaBytesPerSecond: Swift.Double? - let totalResizeDataInMegaBytes: Swift.Int? - let progressInMegaBytes: Swift.Int? - let elapsedTimeInSeconds: Swift.Int? - let estimatedTimeToCompletionInSeconds: Swift.Int? - let resizeType: Swift.String? - let message: Swift.String? - let targetEncryptionType: Swift.String? - let dataTransferProgressPercent: Swift.Double? +enum CancelResizeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResizeNotFound": return try await ResizeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } } -extension CancelResizeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case avgResizeRateInMegaBytesPerSecond = "AvgResizeRateInMegaBytesPerSecond" - case dataTransferProgressPercent = "DataTransferProgressPercent" - case elapsedTimeInSeconds = "ElapsedTimeInSeconds" - case estimatedTimeToCompletionInSeconds = "EstimatedTimeToCompletionInSeconds" - case importTablesCompleted = "ImportTablesCompleted" - case importTablesInProgress = "ImportTablesInProgress" - case importTablesNotStarted = "ImportTablesNotStarted" - case message = "Message" - case progressInMegaBytes = "ProgressInMegaBytes" - case resizeType = "ResizeType" - case status = "Status" - case targetClusterType = "TargetClusterType" - case targetEncryptionType = "TargetEncryptionType" - case targetNodeType = "TargetNodeType" - case targetNumberOfNodes = "TargetNumberOfNodes" - case totalResizeDataInMegaBytes = "TotalResizeDataInMegaBytes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CancelResizeResult")) - let targetNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetNodeType) - targetNodeType = targetNodeTypeDecoded - let targetNumberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetNumberOfNodes) - targetNumberOfNodes = targetNumberOfNodesDecoded - let targetClusterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetClusterType) - targetClusterType = targetClusterTypeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.importTablesCompleted) { - struct KeyVal0{struct member{}} - let importTablesCompletedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importTablesCompleted) - if let importTablesCompletedWrappedContainer = importTablesCompletedWrappedContainer { - let importTablesCompletedContainer = try importTablesCompletedWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importTablesCompletedBuffer:[Swift.String]? = nil - if let importTablesCompletedContainer = importTablesCompletedContainer { - importTablesCompletedBuffer = [Swift.String]() - for stringContainer0 in importTablesCompletedContainer { - importTablesCompletedBuffer?.append(stringContainer0) - } - } - importTablesCompleted = importTablesCompletedBuffer - } else { - importTablesCompleted = [] - } - } else { - importTablesCompleted = nil - } - if containerValues.contains(.importTablesInProgress) { - struct KeyVal0{struct member{}} - let importTablesInProgressWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importTablesInProgress) - if let importTablesInProgressWrappedContainer = importTablesInProgressWrappedContainer { - let importTablesInProgressContainer = try importTablesInProgressWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importTablesInProgressBuffer:[Swift.String]? = nil - if let importTablesInProgressContainer = importTablesInProgressContainer { - importTablesInProgressBuffer = [Swift.String]() - for stringContainer0 in importTablesInProgressContainer { - importTablesInProgressBuffer?.append(stringContainer0) - } - } - importTablesInProgress = importTablesInProgressBuffer - } else { - importTablesInProgress = [] - } - } else { - importTablesInProgress = nil - } - if containerValues.contains(.importTablesNotStarted) { - struct KeyVal0{struct member{}} - let importTablesNotStartedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importTablesNotStarted) - if let importTablesNotStartedWrappedContainer = importTablesNotStartedWrappedContainer { - let importTablesNotStartedContainer = try importTablesNotStartedWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importTablesNotStartedBuffer:[Swift.String]? = nil - if let importTablesNotStartedContainer = importTablesNotStartedContainer { - importTablesNotStartedBuffer = [Swift.String]() - for stringContainer0 in importTablesNotStartedContainer { - importTablesNotStartedBuffer?.append(stringContainer0) - } - } - importTablesNotStarted = importTablesNotStartedBuffer - } else { - importTablesNotStarted = [] - } - } else { - importTablesNotStarted = nil - } - let avgResizeRateInMegaBytesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .avgResizeRateInMegaBytesPerSecond) - avgResizeRateInMegaBytesPerSecond = avgResizeRateInMegaBytesPerSecondDecoded - let totalResizeDataInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalResizeDataInMegaBytes) - totalResizeDataInMegaBytes = totalResizeDataInMegaBytesDecoded - let progressInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .progressInMegaBytes) - progressInMegaBytes = progressInMegaBytesDecoded - let elapsedTimeInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .elapsedTimeInSeconds) - elapsedTimeInSeconds = elapsedTimeInSecondsDecoded - let estimatedTimeToCompletionInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .estimatedTimeToCompletionInSeconds) - estimatedTimeToCompletionInSeconds = estimatedTimeToCompletionInSecondsDecoded - let resizeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resizeType) - resizeType = resizeTypeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let targetEncryptionTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetEncryptionType) - targetEncryptionType = targetEncryptionTypeDecoded - let dataTransferProgressPercentDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .dataTransferProgressPercent) - dataTransferProgressPercent = dataTransferProgressPercentDecoded - } -} - -enum CancelResizeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResizeNotFound": return try await ResizeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RedshiftClientTypes.CertificateAssociation: Swift.Codable { +extension RedshiftClientTypes.CertificateAssociation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterIdentifier = "ClusterIdentifier" case customDomainName = "CustomDomainName" @@ -3038,12 +2129,14 @@ extension RedshiftClientTypes.CertificateAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.CertificateAssociation() + value.customDomainName = try reader["CustomDomainName"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + return value + } } } @@ -3067,7 +2160,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.Cluster: Swift.Codable { +extension RedshiftClientTypes.Cluster: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowVersionUpgrade = "AllowVersionUpgrade" case aquaConfiguration = "AquaConfiguration" @@ -3387,264 +2480,72 @@ extension RedshiftClientTypes.Cluster: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let clusterStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterStatus) - clusterStatus = clusterStatusDecoded - let clusterAvailabilityStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterAvailabilityStatus) - clusterAvailabilityStatus = clusterAvailabilityStatusDecoded - let modifyStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .modifyStatus) - modifyStatus = modifyStatusDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let endpointDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Endpoint.self, forKey: .endpoint) - endpoint = endpointDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - let automatedSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .automatedSnapshotRetentionPeriod) - automatedSnapshotRetentionPeriod = automatedSnapshotRetentionPeriodDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - if containerValues.contains(.clusterSecurityGroups) { - struct KeyVal0{struct ClusterSecurityGroup{}} - let clusterSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterSecurityGroups) - if let clusterSecurityGroupsWrappedContainer = clusterSecurityGroupsWrappedContainer { - let clusterSecurityGroupsContainer = try clusterSecurityGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterSecurityGroupMembership].self, forKey: .member) - var clusterSecurityGroupsBuffer:[RedshiftClientTypes.ClusterSecurityGroupMembership]? = nil - if let clusterSecurityGroupsContainer = clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer = [RedshiftClientTypes.ClusterSecurityGroupMembership]() - for structureContainer0 in clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer?.append(structureContainer0) - } - } - clusterSecurityGroups = clusterSecurityGroupsBuffer - } else { - clusterSecurityGroups = [] - } - } else { - clusterSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroup{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[RedshiftClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [RedshiftClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] - } - } else { - vpcSecurityGroups = nil - } - if containerValues.contains(.clusterParameterGroups) { - struct KeyVal0{struct ClusterParameterGroup{}} - let clusterParameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterParameterGroups) - if let clusterParameterGroupsWrappedContainer = clusterParameterGroupsWrappedContainer { - let clusterParameterGroupsContainer = try clusterParameterGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterParameterGroupStatus].self, forKey: .member) - var clusterParameterGroupsBuffer:[RedshiftClientTypes.ClusterParameterGroupStatus]? = nil - if let clusterParameterGroupsContainer = clusterParameterGroupsContainer { - clusterParameterGroupsBuffer = [RedshiftClientTypes.ClusterParameterGroupStatus]() - for structureContainer0 in clusterParameterGroupsContainer { - clusterParameterGroupsBuffer?.append(structureContainer0) - } - } - clusterParameterGroups = clusterParameterGroupsBuffer - } else { - clusterParameterGroups = [] - } - } else { - clusterParameterGroups = nil - } - let clusterSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSubnetGroupName) - clusterSubnetGroupName = clusterSubnetGroupNameDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let pendingModifiedValuesDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.PendingModifiedValues.self, forKey: .pendingModifiedValues) - pendingModifiedValues = pendingModifiedValuesDecoded - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let allowVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowVersionUpgrade) - allowVersionUpgrade = allowVersionUpgradeDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let restoreStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.RestoreStatus.self, forKey: .restoreStatus) - restoreStatus = restoreStatusDecoded - let dataTransferProgressDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.DataTransferProgress.self, forKey: .dataTransferProgress) - dataTransferProgress = dataTransferProgressDecoded - let hsmStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.HsmStatus.self, forKey: .hsmStatus) - hsmStatus = hsmStatusDecoded - let clusterSnapshotCopyStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ClusterSnapshotCopyStatus.self, forKey: .clusterSnapshotCopyStatus) - clusterSnapshotCopyStatus = clusterSnapshotCopyStatusDecoded - let clusterPublicKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterPublicKey) - clusterPublicKey = clusterPublicKeyDecoded - if containerValues.contains(.clusterNodes) { - struct KeyVal0{struct member{}} - let clusterNodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterNodes) - if let clusterNodesWrappedContainer = clusterNodesWrappedContainer { - let clusterNodesContainer = try clusterNodesWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterNode].self, forKey: .member) - var clusterNodesBuffer:[RedshiftClientTypes.ClusterNode]? = nil - if let clusterNodesContainer = clusterNodesContainer { - clusterNodesBuffer = [RedshiftClientTypes.ClusterNode]() - for structureContainer0 in clusterNodesContainer { - clusterNodesBuffer?.append(structureContainer0) - } - } - clusterNodes = clusterNodesBuffer - } else { - clusterNodes = [] - } - } else { - clusterNodes = nil - } - let elasticIpStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ElasticIpStatus.self, forKey: .elasticIpStatus) - elasticIpStatus = elasticIpStatusDecoded - let clusterRevisionNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterRevisionNumber) - clusterRevisionNumber = clusterRevisionNumberDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let enhancedVpcRoutingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enhancedVpcRouting) - enhancedVpcRouting = enhancedVpcRoutingDecoded - if containerValues.contains(.iamRoles) { - struct KeyVal0{struct ClusterIamRole{}} - let iamRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .iamRoles) - if let iamRolesWrappedContainer = iamRolesWrappedContainer { - let iamRolesContainer = try iamRolesWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterIamRole].self, forKey: .member) - var iamRolesBuffer:[RedshiftClientTypes.ClusterIamRole]? = nil - if let iamRolesContainer = iamRolesContainer { - iamRolesBuffer = [RedshiftClientTypes.ClusterIamRole]() - for structureContainer0 in iamRolesContainer { - iamRolesBuffer?.append(structureContainer0) - } - } - iamRoles = iamRolesBuffer - } else { - iamRoles = [] - } - } else { - iamRoles = nil - } - if containerValues.contains(.pendingActions) { - struct KeyVal0{struct member{}} - let pendingActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .pendingActions) - if let pendingActionsWrappedContainer = pendingActionsWrappedContainer { - let pendingActionsContainer = try pendingActionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var pendingActionsBuffer:[Swift.String]? = nil - if let pendingActionsContainer = pendingActionsContainer { - pendingActionsBuffer = [Swift.String]() - for stringContainer0 in pendingActionsContainer { - pendingActionsBuffer?.append(stringContainer0) - } - } - pendingActions = pendingActionsBuffer - } else { - pendingActions = [] - } - } else { - pendingActions = nil - } - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let elasticResizeNumberOfNodeOptionsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticResizeNumberOfNodeOptions) - elasticResizeNumberOfNodeOptions = elasticResizeNumberOfNodeOptionsDecoded - if containerValues.contains(.deferredMaintenanceWindows) { - struct KeyVal0{struct DeferredMaintenanceWindow{}} - let deferredMaintenanceWindowsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .deferredMaintenanceWindows) - if let deferredMaintenanceWindowsWrappedContainer = deferredMaintenanceWindowsWrappedContainer { - let deferredMaintenanceWindowsContainer = try deferredMaintenanceWindowsWrappedContainer.decodeIfPresent([RedshiftClientTypes.DeferredMaintenanceWindow].self, forKey: .member) - var deferredMaintenanceWindowsBuffer:[RedshiftClientTypes.DeferredMaintenanceWindow]? = nil - if let deferredMaintenanceWindowsContainer = deferredMaintenanceWindowsContainer { - deferredMaintenanceWindowsBuffer = [RedshiftClientTypes.DeferredMaintenanceWindow]() - for structureContainer0 in deferredMaintenanceWindowsContainer { - deferredMaintenanceWindowsBuffer?.append(structureContainer0) - } - } - deferredMaintenanceWindows = deferredMaintenanceWindowsBuffer - } else { - deferredMaintenanceWindows = [] - } - } else { - deferredMaintenanceWindows = nil - } - let snapshotScheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotScheduleIdentifier) - snapshotScheduleIdentifier = snapshotScheduleIdentifierDecoded - let snapshotScheduleStateDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduleState.self, forKey: .snapshotScheduleState) - snapshotScheduleState = snapshotScheduleStateDecoded - let expectedNextSnapshotScheduleTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expectedNextSnapshotScheduleTime) - expectedNextSnapshotScheduleTime = expectedNextSnapshotScheduleTimeDecoded - let expectedNextSnapshotScheduleTimeStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expectedNextSnapshotScheduleTimeStatus) - expectedNextSnapshotScheduleTimeStatus = expectedNextSnapshotScheduleTimeStatusDecoded - let nextMaintenanceWindowStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nextMaintenanceWindowStartTime) - nextMaintenanceWindowStartTime = nextMaintenanceWindowStartTimeDecoded - let resizeInfoDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ResizeInfo.self, forKey: .resizeInfo) - resizeInfo = resizeInfoDecoded - let availabilityZoneRelocationStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZoneRelocationStatus) - availabilityZoneRelocationStatus = availabilityZoneRelocationStatusDecoded - let clusterNamespaceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterNamespaceArn) - clusterNamespaceArn = clusterNamespaceArnDecoded - let totalStorageCapacityInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalStorageCapacityInMegaBytes) - totalStorageCapacityInMegaBytes = totalStorageCapacityInMegaBytesDecoded - let aquaConfigurationDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AquaConfiguration.self, forKey: .aquaConfiguration) - aquaConfiguration = aquaConfigurationDecoded - let defaultIamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultIamRoleArn) - defaultIamRoleArn = defaultIamRoleArnDecoded - let reservedNodeExchangeStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNodeExchangeStatus.self, forKey: .reservedNodeExchangeStatus) - reservedNodeExchangeStatus = reservedNodeExchangeStatusDecoded - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - let customDomainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertificateArn) - customDomainCertificateArn = customDomainCertificateArnDecoded - let customDomainCertificateExpiryDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .customDomainCertificateExpiryDate) - customDomainCertificateExpiryDate = customDomainCertificateExpiryDateDecoded - let masterPasswordSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterPasswordSecretArn) - masterPasswordSecretArn = masterPasswordSecretArnDecoded - let masterPasswordSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterPasswordSecretKmsKeyId) - masterPasswordSecretKmsKeyId = masterPasswordSecretKmsKeyIdDecoded - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let multiAZSecondaryDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.SecondaryClusterInfo.self, forKey: .multiAZSecondary) - multiAZSecondary = multiAZSecondaryDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.Cluster() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.nodeType = try reader["NodeType"].readIfPresent() + value.clusterStatus = try reader["ClusterStatus"].readIfPresent() + value.clusterAvailabilityStatus = try reader["ClusterAvailabilityStatus"].readIfPresent() + value.modifyStatus = try reader["ModifyStatus"].readIfPresent() + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.dbName = try reader["DBName"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent(readingClosure: RedshiftClientTypes.Endpoint.readingClosure) + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.automatedSnapshotRetentionPeriod = try reader["AutomatedSnapshotRetentionPeriod"].readIfPresent() + value.manualSnapshotRetentionPeriod = try reader["ManualSnapshotRetentionPeriod"].readIfPresent() + value.clusterSecurityGroups = try reader["ClusterSecurityGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterSecurityGroupMembership.readingClosure, memberNodeInfo: "ClusterSecurityGroup", isFlattened: false) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroup", isFlattened: false) + value.clusterParameterGroups = try reader["ClusterParameterGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterParameterGroupStatus.readingClosure, memberNodeInfo: "ClusterParameterGroup", isFlattened: false) + value.clusterSubnetGroupName = try reader["ClusterSubnetGroupName"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.preferredMaintenanceWindow = try reader["PreferredMaintenanceWindow"].readIfPresent() + value.pendingModifiedValues = try reader["PendingModifiedValues"].readIfPresent(readingClosure: RedshiftClientTypes.PendingModifiedValues.readingClosure) + value.clusterVersion = try reader["ClusterVersion"].readIfPresent() + value.allowVersionUpgrade = try reader["AllowVersionUpgrade"].readIfPresent() + value.numberOfNodes = try reader["NumberOfNodes"].readIfPresent() + value.publiclyAccessible = try reader["PubliclyAccessible"].readIfPresent() + value.encrypted = try reader["Encrypted"].readIfPresent() + value.restoreStatus = try reader["RestoreStatus"].readIfPresent(readingClosure: RedshiftClientTypes.RestoreStatus.readingClosure) + value.dataTransferProgress = try reader["DataTransferProgress"].readIfPresent(readingClosure: RedshiftClientTypes.DataTransferProgress.readingClosure) + value.hsmStatus = try reader["HsmStatus"].readIfPresent(readingClosure: RedshiftClientTypes.HsmStatus.readingClosure) + value.clusterSnapshotCopyStatus = try reader["ClusterSnapshotCopyStatus"].readIfPresent(readingClosure: RedshiftClientTypes.ClusterSnapshotCopyStatus.readingClosure) + value.clusterPublicKey = try reader["ClusterPublicKey"].readIfPresent() + value.clusterNodes = try reader["ClusterNodes"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterNode.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.elasticIpStatus = try reader["ElasticIpStatus"].readIfPresent(readingClosure: RedshiftClientTypes.ElasticIpStatus.readingClosure) + value.clusterRevisionNumber = try reader["ClusterRevisionNumber"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.enhancedVpcRouting = try reader["EnhancedVpcRouting"].readIfPresent() + value.iamRoles = try reader["IamRoles"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterIamRole.readingClosure, memberNodeInfo: "ClusterIamRole", isFlattened: false) + value.pendingActions = try reader["PendingActions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.maintenanceTrackName = try reader["MaintenanceTrackName"].readIfPresent() + value.elasticResizeNumberOfNodeOptions = try reader["ElasticResizeNumberOfNodeOptions"].readIfPresent() + value.deferredMaintenanceWindows = try reader["DeferredMaintenanceWindows"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DeferredMaintenanceWindow.readingClosure, memberNodeInfo: "DeferredMaintenanceWindow", isFlattened: false) + value.snapshotScheduleIdentifier = try reader["SnapshotScheduleIdentifier"].readIfPresent() + value.snapshotScheduleState = try reader["SnapshotScheduleState"].readIfPresent() + value.expectedNextSnapshotScheduleTime = try reader["ExpectedNextSnapshotScheduleTime"].readTimestampIfPresent(format: .dateTime) + value.expectedNextSnapshotScheduleTimeStatus = try reader["ExpectedNextSnapshotScheduleTimeStatus"].readIfPresent() + value.nextMaintenanceWindowStartTime = try reader["NextMaintenanceWindowStartTime"].readTimestampIfPresent(format: .dateTime) + value.resizeInfo = try reader["ResizeInfo"].readIfPresent(readingClosure: RedshiftClientTypes.ResizeInfo.readingClosure) + value.availabilityZoneRelocationStatus = try reader["AvailabilityZoneRelocationStatus"].readIfPresent() + value.clusterNamespaceArn = try reader["ClusterNamespaceArn"].readIfPresent() + value.totalStorageCapacityInMegaBytes = try reader["TotalStorageCapacityInMegaBytes"].readIfPresent() + value.aquaConfiguration = try reader["AquaConfiguration"].readIfPresent(readingClosure: RedshiftClientTypes.AquaConfiguration.readingClosure) + value.defaultIamRoleArn = try reader["DefaultIamRoleArn"].readIfPresent() + value.reservedNodeExchangeStatus = try reader["ReservedNodeExchangeStatus"].readIfPresent(readingClosure: RedshiftClientTypes.ReservedNodeExchangeStatus.readingClosure) + value.customDomainName = try reader["CustomDomainName"].readIfPresent() + value.customDomainCertificateArn = try reader["CustomDomainCertificateArn"].readIfPresent() + value.customDomainCertificateExpiryDate = try reader["CustomDomainCertificateExpiryDate"].readTimestampIfPresent(format: .dateTime) + value.masterPasswordSecretArn = try reader["MasterPasswordSecretArn"].readIfPresent() + value.masterPasswordSecretKmsKeyId = try reader["MasterPasswordSecretKmsKeyId"].readIfPresent() + value.ipAddressType = try reader["IpAddressType"].readIfPresent() + value.multiAZ = try reader["MultiAZ"].readIfPresent() + value.multiAZSecondary = try reader["MultiAZSecondary"].readIfPresent(readingClosure: RedshiftClientTypes.SecondaryClusterInfo.readingClosure) + return value + } } } @@ -3959,16 +2860,14 @@ extension RedshiftClientTypes { } extension ClusterAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3996,23 +2895,7 @@ public struct ClusterAlreadyExistsFault: ClientRuntime.ModeledError, AWSClientRu } } -struct ClusterAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ClusterAssociatedToSchedule: Swift.Codable { +extension RedshiftClientTypes.ClusterAssociatedToSchedule: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterIdentifier = "ClusterIdentifier" case scheduleAssociationState = "ScheduleAssociationState" @@ -4028,12 +2911,14 @@ extension RedshiftClientTypes.ClusterAssociatedToSchedule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let scheduleAssociationStateDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduleState.self, forKey: .scheduleAssociationState) - scheduleAssociationState = scheduleAssociationStateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterAssociatedToSchedule() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.scheduleAssociationState = try reader["ScheduleAssociationState"].readIfPresent() + return value + } } } @@ -4057,7 +2942,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.ClusterDbRevision: Swift.Codable { +extension RedshiftClientTypes.ClusterDbRevision: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterIdentifier = "ClusterIdentifier" case currentDatabaseRevision = "CurrentDatabaseRevision" @@ -4090,32 +2975,15 @@ extension RedshiftClientTypes.ClusterDbRevision: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let currentDatabaseRevisionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currentDatabaseRevision) - currentDatabaseRevision = currentDatabaseRevisionDecoded - let databaseRevisionReleaseDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .databaseRevisionReleaseDate) - databaseRevisionReleaseDate = databaseRevisionReleaseDateDecoded - if containerValues.contains(.revisionTargets) { - struct KeyVal0{struct RevisionTarget{}} - let revisionTargetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .revisionTargets) - if let revisionTargetsWrappedContainer = revisionTargetsWrappedContainer { - let revisionTargetsContainer = try revisionTargetsWrappedContainer.decodeIfPresent([RedshiftClientTypes.RevisionTarget].self, forKey: .member) - var revisionTargetsBuffer:[RedshiftClientTypes.RevisionTarget]? = nil - if let revisionTargetsContainer = revisionTargetsContainer { - revisionTargetsBuffer = [RedshiftClientTypes.RevisionTarget]() - for structureContainer0 in revisionTargetsContainer { - revisionTargetsBuffer?.append(structureContainer0) - } - } - revisionTargets = revisionTargetsBuffer - } else { - revisionTargets = [] - } - } else { - revisionTargets = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterDbRevision() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.currentDatabaseRevision = try reader["CurrentDatabaseRevision"].readIfPresent() + value.databaseRevisionReleaseDate = try reader["DatabaseRevisionReleaseDate"].readTimestampIfPresent(format: .dateTime) + value.revisionTargets = try reader["RevisionTargets"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.RevisionTarget.readingClosure, memberNodeInfo: "RevisionTarget", isFlattened: false) + return value } } } @@ -4148,7 +3016,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.ClusterIamRole: Swift.Codable { +extension RedshiftClientTypes.ClusterIamRole: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case applyStatus = "ApplyStatus" case iamRoleArn = "IamRoleArn" @@ -4164,12 +3032,14 @@ extension RedshiftClientTypes.ClusterIamRole: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - let applyStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applyStatus) - applyStatus = applyStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterIamRole() + value.iamRoleArn = try reader["IamRoleArn"].readIfPresent() + value.applyStatus = try reader["ApplyStatus"].readIfPresent() + return value + } } } @@ -4199,7 +3069,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.ClusterNode: Swift.Codable { +extension RedshiftClientTypes.ClusterNode: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case nodeRole = "NodeRole" case privateIPAddress = "PrivateIPAddress" @@ -4219,14 +3089,15 @@ extension RedshiftClientTypes.ClusterNode: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nodeRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeRole) - nodeRole = nodeRoleDecoded - let privateIPAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIPAddress) - privateIPAddress = privateIPAddressDecoded - let publicIPAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicIPAddress) - publicIPAddress = publicIPAddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterNode() + value.nodeRole = try reader["NodeRole"].readIfPresent() + value.privateIPAddress = try reader["PrivateIPAddress"].readIfPresent() + value.publicIPAddress = try reader["PublicIPAddress"].readIfPresent() + return value + } } } @@ -4255,16 +3126,14 @@ extension RedshiftClientTypes { } extension ClusterNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4292,33 +3161,15 @@ public struct ClusterNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct ClusterNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterOnLatestRevisionFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterOnLatestRevisionFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4346,23 +3197,7 @@ public struct ClusterOnLatestRevisionFault: ClientRuntime.ModeledError, AWSClien } } -struct ClusterOnLatestRevisionFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterOnLatestRevisionFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ClusterParameterGroup: Swift.Codable { +extension RedshiftClientTypes.ClusterParameterGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case parameterGroupFamily = "ParameterGroupFamily" @@ -4395,32 +3230,15 @@ extension RedshiftClientTypes.ClusterParameterGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - let parameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupFamily) - parameterGroupFamily = parameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterParameterGroup() + value.parameterGroupName = try reader["ParameterGroupName"].readIfPresent() + value.parameterGroupFamily = try reader["ParameterGroupFamily"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -4454,16 +3272,14 @@ extension RedshiftClientTypes { } extension ClusterParameterGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterParameterGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4491,33 +3307,15 @@ public struct ClusterParameterGroupAlreadyExistsFault: ClientRuntime.ModeledErro } } -struct ClusterParameterGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterParameterGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterParameterGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterParameterGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4545,33 +3343,15 @@ public struct ClusterParameterGroupNotFoundFault: ClientRuntime.ModeledError, AW } } -struct ClusterParameterGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterParameterGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterParameterGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterParameterGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4599,23 +3379,7 @@ public struct ClusterParameterGroupQuotaExceededFault: ClientRuntime.ModeledErro } } -struct ClusterParameterGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterParameterGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ClusterParameterGroupStatus: Swift.Codable { +extension RedshiftClientTypes.ClusterParameterGroupStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterParameterStatusList = "ClusterParameterStatusList" case parameterApplyStatus = "ParameterApplyStatus" @@ -4644,30 +3408,14 @@ extension RedshiftClientTypes.ClusterParameterGroupStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - let parameterApplyStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterApplyStatus) - parameterApplyStatus = parameterApplyStatusDecoded - if containerValues.contains(.clusterParameterStatusList) { - struct KeyVal0{struct member{}} - let clusterParameterStatusListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterParameterStatusList) - if let clusterParameterStatusListWrappedContainer = clusterParameterStatusListWrappedContainer { - let clusterParameterStatusListContainer = try clusterParameterStatusListWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterParameterStatus].self, forKey: .member) - var clusterParameterStatusListBuffer:[RedshiftClientTypes.ClusterParameterStatus]? = nil - if let clusterParameterStatusListContainer = clusterParameterStatusListContainer { - clusterParameterStatusListBuffer = [RedshiftClientTypes.ClusterParameterStatus]() - for structureContainer0 in clusterParameterStatusListContainer { - clusterParameterStatusListBuffer?.append(structureContainer0) - } - } - clusterParameterStatusList = clusterParameterStatusListBuffer - } else { - clusterParameterStatusList = [] - } - } else { - clusterParameterStatusList = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterParameterGroupStatus() + value.parameterGroupName = try reader["ParameterGroupName"].readIfPresent() + value.parameterApplyStatus = try reader["ParameterApplyStatus"].readIfPresent() + value.clusterParameterStatusList = try reader["ClusterParameterStatusList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterParameterStatus.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4696,7 +3444,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.ClusterParameterStatus: Swift.Codable { +extension RedshiftClientTypes.ClusterParameterStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case parameterApplyErrorDescription = "ParameterApplyErrorDescription" case parameterApplyStatus = "ParameterApplyStatus" @@ -4716,14 +3464,15 @@ extension RedshiftClientTypes.ClusterParameterStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterName) - parameterName = parameterNameDecoded - let parameterApplyStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterApplyStatus) - parameterApplyStatus = parameterApplyStatusDecoded - let parameterApplyErrorDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterApplyErrorDescription) - parameterApplyErrorDescription = parameterApplyErrorDescriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterParameterStatus() + value.parameterName = try reader["ParameterName"].readIfPresent() + value.parameterApplyStatus = try reader["ParameterApplyStatus"].readIfPresent() + value.parameterApplyErrorDescription = try reader["ParameterApplyErrorDescription"].readIfPresent() + return value + } } } @@ -4766,16 +3515,14 @@ extension RedshiftClientTypes { } extension ClusterQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4803,23 +3550,7 @@ public struct ClusterQuotaExceededFault: ClientRuntime.ModeledError, AWSClientRu } } -struct ClusterQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ClusterSecurityGroup: Swift.Codable { +extension RedshiftClientTypes.ClusterSecurityGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterSecurityGroupName = "ClusterSecurityGroupName" case description = "Description" @@ -4874,68 +3605,16 @@ extension RedshiftClientTypes.ClusterSecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSecurityGroupName) - clusterSecurityGroupName = clusterSecurityGroupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.ec2SecurityGroups) { - struct KeyVal0{struct EC2SecurityGroup{}} - let ec2SecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ec2SecurityGroups) - if let ec2SecurityGroupsWrappedContainer = ec2SecurityGroupsWrappedContainer { - let ec2SecurityGroupsContainer = try ec2SecurityGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.EC2SecurityGroup].self, forKey: .member) - var ec2SecurityGroupsBuffer:[RedshiftClientTypes.EC2SecurityGroup]? = nil - if let ec2SecurityGroupsContainer = ec2SecurityGroupsContainer { - ec2SecurityGroupsBuffer = [RedshiftClientTypes.EC2SecurityGroup]() - for structureContainer0 in ec2SecurityGroupsContainer { - ec2SecurityGroupsBuffer?.append(structureContainer0) - } - } - ec2SecurityGroups = ec2SecurityGroupsBuffer - } else { - ec2SecurityGroups = [] - } - } else { - ec2SecurityGroups = nil - } - if containerValues.contains(.ipRanges) { - struct KeyVal0{struct IPRange{}} - let ipRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ipRanges) - if let ipRangesWrappedContainer = ipRangesWrappedContainer { - let ipRangesContainer = try ipRangesWrappedContainer.decodeIfPresent([RedshiftClientTypes.IPRange].self, forKey: .member) - var ipRangesBuffer:[RedshiftClientTypes.IPRange]? = nil - if let ipRangesContainer = ipRangesContainer { - ipRangesBuffer = [RedshiftClientTypes.IPRange]() - for structureContainer0 in ipRangesContainer { - ipRangesBuffer?.append(structureContainer0) - } - } - ipRanges = ipRangesBuffer - } else { - ipRanges = [] - } - } else { - ipRanges = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterSecurityGroup() + value.clusterSecurityGroupName = try reader["ClusterSecurityGroupName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.ec2SecurityGroups = try reader["EC2SecurityGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.EC2SecurityGroup.readingClosure, memberNodeInfo: "EC2SecurityGroup", isFlattened: false) + value.ipRanges = try reader["IPRanges"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.IPRange.readingClosure, memberNodeInfo: "IPRange", isFlattened: false) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -4973,16 +3652,14 @@ extension RedshiftClientTypes { } extension ClusterSecurityGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSecurityGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5010,23 +3687,7 @@ public struct ClusterSecurityGroupAlreadyExistsFault: ClientRuntime.ModeledError } } -struct ClusterSecurityGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSecurityGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ClusterSecurityGroupMembership: Swift.Codable { +extension RedshiftClientTypes.ClusterSecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterSecurityGroupName = "ClusterSecurityGroupName" case status = "Status" @@ -5042,12 +3703,14 @@ extension RedshiftClientTypes.ClusterSecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSecurityGroupName) - clusterSecurityGroupName = clusterSecurityGroupNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterSecurityGroupMembership() + value.clusterSecurityGroupName = try reader["ClusterSecurityGroupName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -5072,16 +3735,14 @@ extension RedshiftClientTypes { } extension ClusterSecurityGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSecurityGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5109,33 +3770,15 @@ public struct ClusterSecurityGroupNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct ClusterSecurityGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSecurityGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterSecurityGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSecurityGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5163,33 +3806,15 @@ public struct ClusterSecurityGroupQuotaExceededFault: ClientRuntime.ModeledError } } -struct ClusterSecurityGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSecurityGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterSnapshotAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSnapshotAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5217,23 +3842,7 @@ public struct ClusterSnapshotAlreadyExistsFault: ClientRuntime.ModeledError, AWS } } -struct ClusterSnapshotAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSnapshotAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ClusterSnapshotCopyStatus: Swift.Codable { +extension RedshiftClientTypes.ClusterSnapshotCopyStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case destinationRegion = "DestinationRegion" case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" @@ -5257,16 +3866,16 @@ extension RedshiftClientTypes.ClusterSnapshotCopyStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationRegion) - destinationRegion = destinationRegionDecoded - let retentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .retentionPeriod) - retentionPeriod = retentionPeriodDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - let snapshotCopyGrantNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotCopyGrantName) - snapshotCopyGrantName = snapshotCopyGrantNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterSnapshotCopyStatus() + value.destinationRegion = try reader["DestinationRegion"].readIfPresent() + value.retentionPeriod = try reader["RetentionPeriod"].readIfPresent() + value.manualSnapshotRetentionPeriod = try reader["ManualSnapshotRetentionPeriod"].readIfPresent() + value.snapshotCopyGrantName = try reader["SnapshotCopyGrantName"].readIfPresent() + return value + } } } @@ -5299,16 +3908,14 @@ extension RedshiftClientTypes { } extension ClusterSnapshotNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSnapshotNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5336,33 +3943,15 @@ public struct ClusterSnapshotNotFoundFault: ClientRuntime.ModeledError, AWSClien } } -struct ClusterSnapshotNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSnapshotNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterSnapshotQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSnapshotQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5390,23 +3979,7 @@ public struct ClusterSnapshotQuotaExceededFault: ClientRuntime.ModeledError, AWS } } -struct ClusterSnapshotQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSnapshotQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ClusterSubnetGroup: Swift.Codable { +extension RedshiftClientTypes.ClusterSubnetGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterSubnetGroupName = "ClusterSubnetGroupName" case description = "Description" @@ -5469,72 +4042,18 @@ extension RedshiftClientTypes.ClusterSubnetGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSubnetGroupName) - clusterSubnetGroupName = clusterSubnetGroupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let subnetGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupStatus) - subnetGroupStatus = subnetGroupStatusDecoded - if containerValues.contains(.subnets) { - struct KeyVal0{struct Subnet{}} - let subnetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnets) - if let subnetsWrappedContainer = subnetsWrappedContainer { - let subnetsContainer = try subnetsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Subnet].self, forKey: .member) - var subnetsBuffer:[RedshiftClientTypes.Subnet]? = nil - if let subnetsContainer = subnetsContainer { - subnetsBuffer = [RedshiftClientTypes.Subnet]() - for structureContainer0 in subnetsContainer { - subnetsBuffer?.append(structureContainer0) - } - } - subnets = subnetsBuffer - } else { - subnets = [] - } - } else { - subnets = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.supportedClusterIpAddressTypes) { - struct KeyVal0{struct item{}} - let supportedClusterIpAddressTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedClusterIpAddressTypes) - if let supportedClusterIpAddressTypesWrappedContainer = supportedClusterIpAddressTypesWrappedContainer { - let supportedClusterIpAddressTypesContainer = try supportedClusterIpAddressTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var supportedClusterIpAddressTypesBuffer:[Swift.String]? = nil - if let supportedClusterIpAddressTypesContainer = supportedClusterIpAddressTypesContainer { - supportedClusterIpAddressTypesBuffer = [Swift.String]() - for stringContainer0 in supportedClusterIpAddressTypesContainer { - supportedClusterIpAddressTypesBuffer?.append(stringContainer0) - } - } - supportedClusterIpAddressTypes = supportedClusterIpAddressTypesBuffer - } else { - supportedClusterIpAddressTypes = [] - } - } else { - supportedClusterIpAddressTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterSubnetGroup() + value.clusterSubnetGroupName = try reader["ClusterSubnetGroupName"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.subnetGroupStatus = try reader["SubnetGroupStatus"].readIfPresent() + value.subnets = try reader["Subnets"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Subnet.readingClosure, memberNodeInfo: "Subnet", isFlattened: false) + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.supportedClusterIpAddressTypes = try reader["SupportedClusterIpAddressTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -5580,16 +4099,14 @@ extension RedshiftClientTypes { } extension ClusterSubnetGroupAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSubnetGroupAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5617,33 +4134,15 @@ public struct ClusterSubnetGroupAlreadyExistsFault: ClientRuntime.ModeledError, } } -struct ClusterSubnetGroupAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSubnetGroupAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterSubnetGroupNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSubnetGroupNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5671,33 +4170,15 @@ public struct ClusterSubnetGroupNotFoundFault: ClientRuntime.ModeledError, AWSCl } } -struct ClusterSubnetGroupNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSubnetGroupNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterSubnetGroupQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSubnetGroupQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5725,33 +4206,15 @@ public struct ClusterSubnetGroupQuotaExceededFault: ClientRuntime.ModeledError, } } -struct ClusterSubnetGroupQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSubnetGroupQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ClusterSubnetQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ClusterSubnetQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5779,23 +4242,7 @@ public struct ClusterSubnetQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct ClusterSubnetQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ClusterSubnetQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ClusterVersion: Swift.Codable { +extension RedshiftClientTypes.ClusterVersion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterParameterGroupFamily = "ClusterParameterGroupFamily" case clusterVersion = "ClusterVersion" @@ -5815,14 +4262,15 @@ extension RedshiftClientTypes.ClusterVersion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let clusterParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterParameterGroupFamily) - clusterParameterGroupFamily = clusterParameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ClusterVersion() + value.clusterVersion = try reader["ClusterVersion"].readIfPresent() + value.clusterParameterGroupFamily = try reader["ClusterParameterGroupFamily"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -5851,16 +4299,14 @@ extension RedshiftClientTypes { } extension ConflictPolicyUpdateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConflictPolicyUpdateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5888,23 +4334,14 @@ public struct ConflictPolicyUpdateFault: ClientRuntime.ModeledError, AWSClientRu } } -struct ConflictPolicyUpdateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ConflictPolicyUpdateFaultBody: Swift.Decodable { +extension CopyClusterSnapshotInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" + case sourceSnapshotClusterIdentifier = "SourceSnapshotClusterIdentifier" + case sourceSnapshotIdentifier = "SourceSnapshotIdentifier" + case targetSnapshotIdentifier = "TargetSnapshotIdentifier" } -} -extension CopyClusterSnapshotInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriod { @@ -5972,42 +4409,15 @@ public struct CopyClusterSnapshotInput: Swift.Equatable { } } -struct CopyClusterSnapshotInputBody: Swift.Equatable { - let sourceSnapshotIdentifier: Swift.String? - let sourceSnapshotClusterIdentifier: Swift.String? - let targetSnapshotIdentifier: Swift.String? - let manualSnapshotRetentionPeriod: Swift.Int? -} - -extension CopyClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" - case sourceSnapshotClusterIdentifier = "SourceSnapshotClusterIdentifier" - case sourceSnapshotIdentifier = "SourceSnapshotIdentifier" - case targetSnapshotIdentifier = "TargetSnapshotIdentifier" - } +extension CopyClusterSnapshotOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSnapshotIdentifier) - sourceSnapshotIdentifier = sourceSnapshotIdentifierDecoded - let sourceSnapshotClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSnapshotClusterIdentifier) - sourceSnapshotClusterIdentifier = sourceSnapshotClusterIdentifierDecoded - let targetSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetSnapshotIdentifier) - targetSnapshotIdentifier = targetSnapshotIdentifierDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - } -} - -extension CopyClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CopyClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CopyClusterSnapshotResult"] + var value = CopyClusterSnapshotOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: RedshiftClientTypes.Snapshot.readingClosure) + return value } } } @@ -6024,49 +4434,37 @@ public struct CopyClusterSnapshotOutput: Swift.Equatable { } } -struct CopyClusterSnapshotOutputBody: Swift.Equatable { - let snapshot: RedshiftClientTypes.Snapshot? -} - -extension CopyClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CopyClusterSnapshotResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum CopyClusterSnapshotOutputError { -enum CopyClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotAlreadyExists": return try await ClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotQuotaExceeded": return try await ClusterSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotAlreadyExists": return try await ClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotQuotaExceeded": return try await ClusterSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CopyToRegionDisabledFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CopyToRegionDisabledFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6094,23 +4492,12 @@ public struct CopyToRegionDisabledFault: ClientRuntime.ModeledError, AWSClientRu } } -struct CopyToRegionDisabledFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CopyToRegionDisabledFaultBody: Swift.Decodable { +extension CreateAuthenticationProfileInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case authenticationProfileContent = "AuthenticationProfileContent" + case authenticationProfileName = "AuthenticationProfileName" } -} -extension CreateAuthenticationProfileInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authenticationProfileContent = authenticationProfileContent { @@ -6149,36 +4536,16 @@ public struct CreateAuthenticationProfileInput: Swift.Equatable { } } -struct CreateAuthenticationProfileInputBody: Swift.Equatable { - let authenticationProfileName: Swift.String? - let authenticationProfileContent: Swift.String? -} - -extension CreateAuthenticationProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationProfileContent = "AuthenticationProfileContent" - case authenticationProfileName = "AuthenticationProfileName" - } +extension CreateAuthenticationProfileOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let authenticationProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileName) - authenticationProfileName = authenticationProfileNameDecoded - let authenticationProfileContentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileContent) - authenticationProfileContent = authenticationProfileContentDecoded - } -} - -extension CreateAuthenticationProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateAuthenticationProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.authenticationProfileContent = output.authenticationProfileContent - self.authenticationProfileName = output.authenticationProfileName - } else { - self.authenticationProfileContent = nil - self.authenticationProfileName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateAuthenticationProfileResult"] + var value = CreateAuthenticationProfileOutput() + value.authenticationProfileContent = try reader["AuthenticationProfileContent"].readIfPresent() + value.authenticationProfileName = try reader["AuthenticationProfileName"].readIfPresent() + return value } } } @@ -6199,35 +4566,21 @@ public struct CreateAuthenticationProfileOutput: Swift.Equatable { } } -struct CreateAuthenticationProfileOutputBody: Swift.Equatable { - let authenticationProfileName: Swift.String? - let authenticationProfileContent: Swift.String? -} - -extension CreateAuthenticationProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationProfileContent = "AuthenticationProfileContent" - case authenticationProfileName = "AuthenticationProfileName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateAuthenticationProfileResult")) - let authenticationProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileName) - authenticationProfileName = authenticationProfileNameDecoded - let authenticationProfileContentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileContent) - authenticationProfileContent = authenticationProfileContentDecoded - } -} +enum CreateAuthenticationProfileOutputError { -enum CreateAuthenticationProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthenticationProfileAlreadyExistsFault": return try await AuthenticationProfileAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AuthenticationProfileQuotaExceededFault": return try await AuthenticationProfileQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidAuthenticationProfileRequestFault": return try await InvalidAuthenticationProfileRequestFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthenticationProfileAlreadyExistsFault": return try await AuthenticationProfileAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "AuthenticationProfileQuotaExceededFault": return try await AuthenticationProfileQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidAuthenticationProfileRequestFault": return try await InvalidAuthenticationProfileRequestFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -6238,6 +4591,48 @@ extension CreateClusterInput: Swift.CustomDebugStringConvertible { } extension CreateClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case additionalInfo = "AdditionalInfo" + case allowVersionUpgrade = "AllowVersionUpgrade" + case aquaConfigurationStatus = "AquaConfigurationStatus" + case automatedSnapshotRetentionPeriod = "AutomatedSnapshotRetentionPeriod" + case availabilityZone = "AvailabilityZone" + case availabilityZoneRelocation = "AvailabilityZoneRelocation" + case clusterIdentifier = "ClusterIdentifier" + case clusterParameterGroupName = "ClusterParameterGroupName" + case clusterSecurityGroups = "ClusterSecurityGroups" + case clusterSubnetGroupName = "ClusterSubnetGroupName" + case clusterType = "ClusterType" + case clusterVersion = "ClusterVersion" + case dbName = "DBName" + case defaultIamRoleArn = "DefaultIamRoleArn" + case elasticIp = "ElasticIp" + case encrypted = "Encrypted" + case enhancedVpcRouting = "EnhancedVpcRouting" + case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" + case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" + case iamRoles = "IamRoles" + case ipAddressType = "IpAddressType" + case kmsKeyId = "KmsKeyId" + case loadSampleData = "LoadSampleData" + case maintenanceTrackName = "MaintenanceTrackName" + case manageMasterPassword = "ManageMasterPassword" + case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" + case masterPasswordSecretKmsKeyId = "MasterPasswordSecretKmsKeyId" + case masterUserPassword = "MasterUserPassword" + case masterUsername = "MasterUsername" + case multiAZ = "MultiAZ" + case nodeType = "NodeType" + case numberOfNodes = "NumberOfNodes" + case port = "Port" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case publiclyAccessible = "PubliclyAccessible" + case redshiftIdcApplicationArn = "RedshiftIdcApplicationArn" + case snapshotScheduleIdentifier = "SnapshotScheduleIdentifier" + case tags = "Tags" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let additionalInfo = additionalInfo { @@ -6625,250 +5020,15 @@ public struct CreateClusterInput: Swift.Equatable { } } -struct CreateClusterInputBody: Swift.Equatable { - let dbName: Swift.String? - let clusterIdentifier: Swift.String? - let clusterType: Swift.String? - let nodeType: Swift.String? - let masterUsername: Swift.String? - let masterUserPassword: Swift.String? - let clusterSecurityGroups: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let clusterSubnetGroupName: Swift.String? - let availabilityZone: Swift.String? - let preferredMaintenanceWindow: Swift.String? - let clusterParameterGroupName: Swift.String? - let automatedSnapshotRetentionPeriod: Swift.Int? - let manualSnapshotRetentionPeriod: Swift.Int? - let port: Swift.Int? - let clusterVersion: Swift.String? - let allowVersionUpgrade: Swift.Bool? - let numberOfNodes: Swift.Int? - let publiclyAccessible: Swift.Bool? - let encrypted: Swift.Bool? - let hsmClientCertificateIdentifier: Swift.String? - let hsmConfigurationIdentifier: Swift.String? - let elasticIp: Swift.String? - let tags: [RedshiftClientTypes.Tag]? - let kmsKeyId: Swift.String? - let enhancedVpcRouting: Swift.Bool? - let additionalInfo: Swift.String? - let iamRoles: [Swift.String]? - let maintenanceTrackName: Swift.String? - let snapshotScheduleIdentifier: Swift.String? - let availabilityZoneRelocation: Swift.Bool? - let aquaConfigurationStatus: RedshiftClientTypes.AquaConfigurationStatus? - let defaultIamRoleArn: Swift.String? - let loadSampleData: Swift.String? - let manageMasterPassword: Swift.Bool? - let masterPasswordSecretKmsKeyId: Swift.String? - let ipAddressType: Swift.String? - let multiAZ: Swift.Bool? - let redshiftIdcApplicationArn: Swift.String? -} - -extension CreateClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalInfo = "AdditionalInfo" - case allowVersionUpgrade = "AllowVersionUpgrade" - case aquaConfigurationStatus = "AquaConfigurationStatus" - case automatedSnapshotRetentionPeriod = "AutomatedSnapshotRetentionPeriod" - case availabilityZone = "AvailabilityZone" - case availabilityZoneRelocation = "AvailabilityZoneRelocation" - case clusterIdentifier = "ClusterIdentifier" - case clusterParameterGroupName = "ClusterParameterGroupName" - case clusterSecurityGroups = "ClusterSecurityGroups" - case clusterSubnetGroupName = "ClusterSubnetGroupName" - case clusterType = "ClusterType" - case clusterVersion = "ClusterVersion" - case dbName = "DBName" - case defaultIamRoleArn = "DefaultIamRoleArn" - case elasticIp = "ElasticIp" - case encrypted = "Encrypted" - case enhancedVpcRouting = "EnhancedVpcRouting" - case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" - case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" - case iamRoles = "IamRoles" - case ipAddressType = "IpAddressType" - case kmsKeyId = "KmsKeyId" - case loadSampleData = "LoadSampleData" - case maintenanceTrackName = "MaintenanceTrackName" - case manageMasterPassword = "ManageMasterPassword" - case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" - case masterPasswordSecretKmsKeyId = "MasterPasswordSecretKmsKeyId" - case masterUserPassword = "MasterUserPassword" - case masterUsername = "MasterUsername" - case multiAZ = "MultiAZ" - case nodeType = "NodeType" - case numberOfNodes = "NumberOfNodes" - case port = "Port" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case publiclyAccessible = "PubliclyAccessible" - case redshiftIdcApplicationArn = "RedshiftIdcApplicationArn" - case snapshotScheduleIdentifier = "SnapshotScheduleIdentifier" - case tags = "Tags" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension CreateClusterOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let clusterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterType) - clusterType = clusterTypeDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - if containerValues.contains(.clusterSecurityGroups) { - struct KeyVal0{struct ClusterSecurityGroupName{}} - let clusterSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterSecurityGroups) - if let clusterSecurityGroupsWrappedContainer = clusterSecurityGroupsWrappedContainer { - let clusterSecurityGroupsContainer = try clusterSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var clusterSecurityGroupsBuffer:[Swift.String]? = nil - if let clusterSecurityGroupsContainer = clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer?.append(stringContainer0) - } - } - clusterSecurityGroups = clusterSecurityGroupsBuffer - } else { - clusterSecurityGroups = [] - } - } else { - clusterSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let clusterSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSubnetGroupName) - clusterSubnetGroupName = clusterSubnetGroupNameDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let clusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterParameterGroupName) - clusterParameterGroupName = clusterParameterGroupNameDecoded - let automatedSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .automatedSnapshotRetentionPeriod) - automatedSnapshotRetentionPeriod = automatedSnapshotRetentionPeriodDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let allowVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowVersionUpgrade) - allowVersionUpgrade = allowVersionUpgradeDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let hsmClientCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificateIdentifier) - hsmClientCertificateIdentifier = hsmClientCertificateIdentifierDecoded - let hsmConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmConfigurationIdentifier) - hsmConfigurationIdentifier = hsmConfigurationIdentifierDecoded - let elasticIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticIp) - elasticIp = elasticIpDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let enhancedVpcRoutingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enhancedVpcRouting) - enhancedVpcRouting = enhancedVpcRoutingDecoded - let additionalInfoDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .additionalInfo) - additionalInfo = additionalInfoDecoded - if containerValues.contains(.iamRoles) { - struct KeyVal0{struct IamRoleArn{}} - let iamRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .iamRoles) - if let iamRolesWrappedContainer = iamRolesWrappedContainer { - let iamRolesContainer = try iamRolesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var iamRolesBuffer:[Swift.String]? = nil - if let iamRolesContainer = iamRolesContainer { - iamRolesBuffer = [Swift.String]() - for stringContainer0 in iamRolesContainer { - iamRolesBuffer?.append(stringContainer0) - } - } - iamRoles = iamRolesBuffer - } else { - iamRoles = [] - } - } else { - iamRoles = nil - } - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let snapshotScheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotScheduleIdentifier) - snapshotScheduleIdentifier = snapshotScheduleIdentifierDecoded - let availabilityZoneRelocationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .availabilityZoneRelocation) - availabilityZoneRelocation = availabilityZoneRelocationDecoded - let aquaConfigurationStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AquaConfigurationStatus.self, forKey: .aquaConfigurationStatus) - aquaConfigurationStatus = aquaConfigurationStatusDecoded - let defaultIamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultIamRoleArn) - defaultIamRoleArn = defaultIamRoleArnDecoded - let loadSampleDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .loadSampleData) - loadSampleData = loadSampleDataDecoded - let manageMasterPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterPassword) - manageMasterPassword = manageMasterPasswordDecoded - let masterPasswordSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterPasswordSecretKmsKeyId) - masterPasswordSecretKmsKeyId = masterPasswordSecretKmsKeyIdDecoded - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - let redshiftIdcApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .redshiftIdcApplicationArn) - redshiftIdcApplicationArn = redshiftIdcApplicationArnDecoded - } -} - -extension CreateClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateClusterResult"] + var value = CreateClusterOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -6885,58 +5045,55 @@ public struct CreateClusterOutput: Swift.Equatable { } } -struct CreateClusterOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension CreateClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateClusterResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} - -enum CreateClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterAlreadyExists": return try await ClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterQuotaExceeded": return try await ClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSubnetGroupStateFault": return try await InvalidClusterSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterTrack": return try await InvalidClusterTrackFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidElasticIpFault": return try await InvalidElasticIpFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Ipv6CidrBlockNotFoundFault": return try await Ipv6CidrBlockNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededFault": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NumberOfNodesPerClusterLimitExceeded": return try await NumberOfNodesPerClusterLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NumberOfNodesQuotaExceeded": return try await NumberOfNodesQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RedshiftIdcApplicationNotExists": return try await RedshiftIdcApplicationNotExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateClusterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterAlreadyExists": return try await ClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterQuotaExceeded": return try await ClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSubnetGroupStateFault": return try await InvalidClusterSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterTrack": return try await InvalidClusterTrackFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidElasticIpFault": return try await InvalidElasticIpFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Ipv6CidrBlockNotFoundFault": return try await Ipv6CidrBlockNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededFault": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NumberOfNodesPerClusterLimitExceeded": return try await NumberOfNodesPerClusterLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NumberOfNodesQuotaExceeded": return try await NumberOfNodesQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RedshiftIdcApplicationNotExists": return try await RedshiftIdcApplicationNotExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case description = "Description" + case parameterGroupFamily = "ParameterGroupFamily" + case parameterGroupName = "ParameterGroupName" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let description = description { @@ -7011,59 +5168,15 @@ public struct CreateClusterParameterGroupInput: Swift.Equatable { } } -struct CreateClusterParameterGroupInputBody: Swift.Equatable { - let parameterGroupName: Swift.String? - let parameterGroupFamily: Swift.String? - let description: Swift.String? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case parameterGroupFamily = "ParameterGroupFamily" - case parameterGroupName = "ParameterGroupName" - case tags = "Tags" - } +extension CreateClusterParameterGroupOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - let parameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupFamily) - parameterGroupFamily = parameterGroupFamilyDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} - -extension CreateClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterParameterGroup = output.clusterParameterGroup - } else { - self.clusterParameterGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateClusterParameterGroupResult"] + var value = CreateClusterParameterGroupOutput() + value.clusterParameterGroup = try reader["ClusterParameterGroup"].readIfPresent(readingClosure: RedshiftClientTypes.ClusterParameterGroup.readingClosure) + return value } } } @@ -7080,37 +5193,33 @@ public struct CreateClusterParameterGroupOutput: Swift.Equatable { } } -struct CreateClusterParameterGroupOutputBody: Swift.Equatable { - let clusterParameterGroup: RedshiftClientTypes.ClusterParameterGroup? -} - -extension CreateClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterParameterGroup = "ClusterParameterGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateClusterParameterGroupResult")) - let clusterParameterGroupDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ClusterParameterGroup.self, forKey: .clusterParameterGroup) - clusterParameterGroup = clusterParameterGroupDecoded - } -} +enum CreateClusterParameterGroupOutputError { -enum CreateClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterParameterGroupAlreadyExists": return try await ClusterParameterGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterParameterGroupQuotaExceeded": return try await ClusterParameterGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterParameterGroupAlreadyExists": return try await ClusterParameterGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterParameterGroupQuotaExceeded": return try await ClusterParameterGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateClusterSecurityGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterSecurityGroupName = "ClusterSecurityGroupName" + case description = "Description" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterSecurityGroupName = clusterSecurityGroupName { @@ -7175,55 +5284,15 @@ public struct CreateClusterSecurityGroupInput: Swift.Equatable { } } -struct CreateClusterSecurityGroupInputBody: Swift.Equatable { - let clusterSecurityGroupName: Swift.String? - let description: Swift.String? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateClusterSecurityGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSecurityGroupName = "ClusterSecurityGroupName" - case description = "Description" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSecurityGroupName) - clusterSecurityGroupName = clusterSecurityGroupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateClusterSecurityGroupOutput { -extension CreateClusterSecurityGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateClusterSecurityGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterSecurityGroup = output.clusterSecurityGroup - } else { - self.clusterSecurityGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateClusterSecurityGroupResult"] + var value = CreateClusterSecurityGroupOutput() + value.clusterSecurityGroup = try reader["ClusterSecurityGroup"].readIfPresent(readingClosure: RedshiftClientTypes.ClusterSecurityGroup.readingClosure) + return value } } } @@ -7240,37 +5309,34 @@ public struct CreateClusterSecurityGroupOutput: Swift.Equatable { } } -struct CreateClusterSecurityGroupOutputBody: Swift.Equatable { - let clusterSecurityGroup: RedshiftClientTypes.ClusterSecurityGroup? -} - -extension CreateClusterSecurityGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSecurityGroup = "ClusterSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateClusterSecurityGroupResult")) - let clusterSecurityGroupDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ClusterSecurityGroup.self, forKey: .clusterSecurityGroup) - clusterSecurityGroup = clusterSecurityGroupDecoded - } -} +enum CreateClusterSecurityGroupOutputError { -enum CreateClusterSecurityGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSecurityGroupAlreadyExists": return try await ClusterSecurityGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "QuotaExceeded.ClusterSecurityGroup": return try await ClusterSecurityGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSecurityGroupAlreadyExists": return try await ClusterSecurityGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "QuotaExceeded.ClusterSecurityGroup": return try await ClusterSecurityGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" + case snapshotIdentifier = "SnapshotIdentifier" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -7344,59 +5410,15 @@ public struct CreateClusterSnapshotInput: Swift.Equatable { } } -struct CreateClusterSnapshotInputBody: Swift.Equatable { - let snapshotIdentifier: Swift.String? - let clusterIdentifier: Swift.String? - let manualSnapshotRetentionPeriod: Swift.Int? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" - case snapshotIdentifier = "SnapshotIdentifier" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateClusterSnapshotOutput { -extension CreateClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateClusterSnapshotResult"] + var value = CreateClusterSnapshotOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: RedshiftClientTypes.Snapshot.readingClosure) + return value } } } @@ -7413,40 +5435,37 @@ public struct CreateClusterSnapshotOutput: Swift.Equatable { } } -struct CreateClusterSnapshotOutputBody: Swift.Equatable { - let snapshot: RedshiftClientTypes.Snapshot? -} - -extension CreateClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateClusterSnapshotResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum CreateClusterSnapshotOutputError { -enum CreateClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotAlreadyExists": return try await ClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotQuotaExceeded": return try await ClusterSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotAlreadyExists": return try await ClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotQuotaExceeded": return try await ClusterSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateClusterSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterSubnetGroupName = "ClusterSubnetGroupName" + case description = "Description" + case subnetIds = "SubnetIds" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterSubnetGroupName = clusterSubnetGroupName { @@ -7528,76 +5547,15 @@ public struct CreateClusterSubnetGroupInput: Swift.Equatable { } } -struct CreateClusterSubnetGroupInputBody: Swift.Equatable { - let clusterSubnetGroupName: Swift.String? - let description: Swift.String? - let subnetIds: [Swift.String]? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateClusterSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSubnetGroupName = "ClusterSubnetGroupName" - case description = "Description" - case subnetIds = "SubnetIds" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSubnetGroupName) - clusterSubnetGroupName = clusterSubnetGroupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateClusterSubnetGroupOutput { -extension CreateClusterSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateClusterSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterSubnetGroup = output.clusterSubnetGroup - } else { - self.clusterSubnetGroup = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateClusterSubnetGroupResult"] + var value = CreateClusterSubnetGroupOutput() + value.clusterSubnetGroup = try reader["ClusterSubnetGroup"].readIfPresent(readingClosure: RedshiftClientTypes.ClusterSubnetGroup.readingClosure) + return value } } } @@ -7614,41 +5572,37 @@ public struct CreateClusterSubnetGroupOutput: Swift.Equatable { } } -struct CreateClusterSubnetGroupOutputBody: Swift.Equatable { - let clusterSubnetGroup: RedshiftClientTypes.ClusterSubnetGroup? -} - -extension CreateClusterSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSubnetGroup = "ClusterSubnetGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateClusterSubnetGroupResult")) - let clusterSubnetGroupDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ClusterSubnetGroup.self, forKey: .clusterSubnetGroup) - clusterSubnetGroup = clusterSubnetGroupDecoded - } -} +enum CreateClusterSubnetGroupOutputError { -enum CreateClusterSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSubnetGroupAlreadyExists": return try await ClusterSubnetGroupAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSubnetGroupQuotaExceeded": return try await ClusterSubnetGroupQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSubnetQuotaExceededFault": return try await ClusterSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSubnetGroupAlreadyExists": return try await ClusterSubnetGroupAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSubnetGroupQuotaExceeded": return try await ClusterSubnetGroupQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSubnetQuotaExceededFault": return try await ClusterSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateCustomDomainAssociationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case customDomainCertificateArn = "CustomDomainCertificateArn" + case customDomainName = "CustomDomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -7695,44 +5649,18 @@ public struct CreateCustomDomainAssociationInput: Swift.Equatable { } } -struct CreateCustomDomainAssociationInputBody: Swift.Equatable { - let customDomainName: Swift.String? - let customDomainCertificateArn: Swift.String? - let clusterIdentifier: Swift.String? -} - -extension CreateCustomDomainAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case customDomainCertificateArn = "CustomDomainCertificateArn" - case customDomainName = "CustomDomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - let customDomainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertificateArn) - customDomainCertificateArn = customDomainCertificateArnDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} +extension CreateCustomDomainAssociationOutput { -extension CreateCustomDomainAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCustomDomainAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterIdentifier = output.clusterIdentifier - self.customDomainCertExpiryTime = output.customDomainCertExpiryTime - self.customDomainCertificateArn = output.customDomainCertificateArn - self.customDomainName = output.customDomainName - } else { - self.clusterIdentifier = nil - self.customDomainCertExpiryTime = nil - self.customDomainCertificateArn = nil - self.customDomainName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateCustomDomainAssociationResult"] + var value = CreateCustomDomainAssociationOutput() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.customDomainCertExpiryTime = try reader["CustomDomainCertExpiryTime"].readIfPresent() + value.customDomainCertificateArn = try reader["CustomDomainCertificateArn"].readIfPresent() + value.customDomainName = try reader["CustomDomainName"].readIfPresent() + return value } } } @@ -7761,48 +5689,34 @@ public struct CreateCustomDomainAssociationOutput: Swift.Equatable { } } -struct CreateCustomDomainAssociationOutputBody: Swift.Equatable { - let customDomainName: Swift.String? - let customDomainCertificateArn: Swift.String? - let clusterIdentifier: Swift.String? - let customDomainCertExpiryTime: Swift.String? -} - -extension CreateCustomDomainAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case customDomainCertExpiryTime = "CustomDomainCertExpiryTime" - case customDomainCertificateArn = "CustomDomainCertificateArn" - case customDomainName = "CustomDomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateCustomDomainAssociationResult")) - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - let customDomainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertificateArn) - customDomainCertificateArn = customDomainCertificateArnDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let customDomainCertExpiryTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertExpiryTime) - customDomainCertExpiryTime = customDomainCertExpiryTimeDecoded - } -} +enum CreateCustomDomainAssociationOutputError { -enum CreateCustomDomainAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomCnameAssociationFault": return try await CustomCnameAssociationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomCnameAssociationFault": return try await CustomCnameAssociationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateEndpointAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case endpointName = "EndpointName" + case resourceOwner = "ResourceOwner" + case subnetGroupName = "SubnetGroupName" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -7871,81 +5785,24 @@ public struct CreateEndpointAccessInput: Swift.Equatable { } } -struct CreateEndpointAccessInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let resourceOwner: Swift.String? - let endpointName: Swift.String? - let subnetGroupName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? -} - -extension CreateEndpointAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case endpointName = "EndpointName" - case resourceOwner = "ResourceOwner" - case subnetGroupName = "SubnetGroupName" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension CreateEndpointAccessOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - let endpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointName) - endpointName = endpointNameDecoded - let subnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupName) - subnetGroupName = subnetGroupNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - } -} - -extension CreateEndpointAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateEndpointAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.address = output.address - self.clusterIdentifier = output.clusterIdentifier - self.endpointCreateTime = output.endpointCreateTime - self.endpointName = output.endpointName - self.endpointStatus = output.endpointStatus - self.port = output.port - self.resourceOwner = output.resourceOwner - self.subnetGroupName = output.subnetGroupName - self.vpcEndpoint = output.vpcEndpoint - self.vpcSecurityGroups = output.vpcSecurityGroups - } else { - self.address = nil - self.clusterIdentifier = nil - self.endpointCreateTime = nil - self.endpointName = nil - self.endpointStatus = nil - self.port = nil - self.resourceOwner = nil - self.subnetGroupName = nil - self.vpcEndpoint = nil - self.vpcSecurityGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateEndpointAccessResult"] + var value = CreateEndpointAccessOutput() + value.address = try reader["Address"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.endpointCreateTime = try reader["EndpointCreateTime"].readTimestampIfPresent(format: .dateTime) + value.endpointName = try reader["EndpointName"].readIfPresent() + value.endpointStatus = try reader["EndpointStatus"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.resourceOwner = try reader["ResourceOwner"].readIfPresent() + value.subnetGroupName = try reader["SubnetGroupName"].readIfPresent() + value.vpcEndpoint = try reader["VpcEndpoint"].readIfPresent(readingClosure: RedshiftClientTypes.VpcEndpoint.readingClosure) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroup", isFlattened: false) + return value } } } @@ -7999,96 +5856,44 @@ public struct CreateEndpointAccessOutput: Swift.Equatable { } } -struct CreateEndpointAccessOutputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let resourceOwner: Swift.String? - let subnetGroupName: Swift.String? - let endpointStatus: Swift.String? - let endpointName: Swift.String? - let endpointCreateTime: ClientRuntime.Date? - let port: Swift.Int? - let address: Swift.String? - let vpcSecurityGroups: [RedshiftClientTypes.VpcSecurityGroupMembership]? - let vpcEndpoint: RedshiftClientTypes.VpcEndpoint? -} - -extension CreateEndpointAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "Address" - case clusterIdentifier = "ClusterIdentifier" - case endpointCreateTime = "EndpointCreateTime" - case endpointName = "EndpointName" - case endpointStatus = "EndpointStatus" - case port = "Port" - case resourceOwner = "ResourceOwner" - case subnetGroupName = "SubnetGroupName" - case vpcEndpoint = "VpcEndpoint" - case vpcSecurityGroups = "VpcSecurityGroups" - } +enum CreateEndpointAccessOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateEndpointAccessResult")) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - let subnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupName) - subnetGroupName = subnetGroupNameDecoded - let endpointStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointStatus) - endpointStatus = endpointStatusDecoded - let endpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointName) - endpointName = endpointNameDecoded - let endpointCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endpointCreateTime) - endpointCreateTime = endpointCreateTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroup{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[RedshiftClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [RedshiftClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AccessToClusterDenied": return try await AccessToClusterDeniedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointAlreadyExists": return try await EndpointAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointsPerAuthorizationLimitExceeded": return try await EndpointsPerAuthorizationLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointsPerClusterLimitExceeded": return try await EndpointsPerClusterLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - vpcSecurityGroups = nil } - let vpcEndpointDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.VpcEndpoint.self, forKey: .vpcEndpoint) - vpcEndpoint = vpcEndpointDecoded } } -enum CreateEndpointAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessToClusterDenied": return try await AccessToClusterDeniedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointAlreadyExists": return try await EndpointAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointsPerAuthorizationLimitExceeded": return try await EndpointsPerAuthorizationLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointsPerClusterLimitExceeded": return try await EndpointsPerClusterLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case eventCategories = "EventCategories" + case severity = "Severity" + case snsTopicArn = "SnsTopicArn" + case sourceIds = "SourceIds" + case sourceType = "SourceType" + case subscriptionName = "SubscriptionName" + case tags = "Tags" } -} -extension CreateEventSubscriptionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -8205,109 +6010,15 @@ public struct CreateEventSubscriptionInput: Swift.Equatable { } } -struct CreateEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let snsTopicArn: Swift.String? - let sourceType: Swift.String? - let sourceIds: [Swift.String]? - let eventCategories: [Swift.String]? - let severity: Swift.String? - let enabled: Swift.Bool? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case eventCategories = "EventCategories" - case severity = "Severity" - case snsTopicArn = "SnsTopicArn" - case sourceIds = "SourceIds" - case sourceType = "SourceType" - case subscriptionName = "SubscriptionName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.sourceIds) { - struct KeyVal0{struct SourceId{}} - let sourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIds) - if let sourceIdsWrappedContainer = sourceIdsWrappedContainer { - let sourceIdsContainer = try sourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsBuffer:[Swift.String]? = nil - if let sourceIdsContainer = sourceIdsContainer { - sourceIdsBuffer = [Swift.String]() - for stringContainer0 in sourceIdsContainer { - sourceIdsBuffer?.append(stringContainer0) - } - } - sourceIds = sourceIdsBuffer - } else { - sourceIds = [] - } - } else { - sourceIds = nil - } - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - let severityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .severity) - severity = severityDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateEventSubscriptionOutput { -extension CreateEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateEventSubscriptionResult"] + var value = CreateEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: RedshiftClientTypes.EventSubscription.readingClosure) + return value } } } @@ -8324,44 +6035,39 @@ public struct CreateEventSubscriptionOutput: Swift.Equatable { } } -struct CreateEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: RedshiftClientTypes.EventSubscription? -} - -extension CreateEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum CreateEventSubscriptionOutputError { -enum CreateEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSInvalidTopic": return try await SNSInvalidTopicFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSNoAuthorization": return try await SNSNoAuthorizationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionAlreadyExist": return try await SubscriptionAlreadyExistFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionEventIdNotFound": return try await SubscriptionEventIdNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionSeverityNotFound": return try await SubscriptionSeverityNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "EventSubscriptionQuotaExceeded": return try await EventSubscriptionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSInvalidTopic": return try await SNSInvalidTopicFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSNoAuthorization": return try await SNSNoAuthorizationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionAlreadyExist": return try await SubscriptionAlreadyExistFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionEventIdNotFound": return try await SubscriptionEventIdNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionSeverityNotFound": return try await SubscriptionSeverityNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateHsmClientCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let hsmClientCertificateIdentifier = hsmClientCertificateIdentifier { @@ -8409,51 +6115,15 @@ public struct CreateHsmClientCertificateInput: Swift.Equatable { } } -struct CreateHsmClientCertificateInputBody: Swift.Equatable { - let hsmClientCertificateIdentifier: Swift.String? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateHsmClientCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmClientCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificateIdentifier) - hsmClientCertificateIdentifier = hsmClientCertificateIdentifierDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateHsmClientCertificateOutput { -extension CreateHsmClientCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateHsmClientCertificateOutputBody = try responseDecoder.decode(responseBody: data) - self.hsmClientCertificate = output.hsmClientCertificate - } else { - self.hsmClientCertificate = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateHsmClientCertificateResult"] + var value = CreateHsmClientCertificateOutput() + value.hsmClientCertificate = try reader["HsmClientCertificate"].readIfPresent(readingClosure: RedshiftClientTypes.HsmClientCertificate.readingClosure) + return value } } } @@ -8470,37 +6140,37 @@ public struct CreateHsmClientCertificateOutput: Swift.Equatable { } } -struct CreateHsmClientCertificateOutputBody: Swift.Equatable { - let hsmClientCertificate: RedshiftClientTypes.HsmClientCertificate? -} - -extension CreateHsmClientCertificateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmClientCertificate = "HsmClientCertificate" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateHsmClientCertificateResult")) - let hsmClientCertificateDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.HsmClientCertificate.self, forKey: .hsmClientCertificate) - hsmClientCertificate = hsmClientCertificateDecoded - } -} +enum CreateHsmClientCertificateOutputError { -enum CreateHsmClientCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HsmClientCertificateAlreadyExistsFault": return try await HsmClientCertificateAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HsmClientCertificateQuotaExceededFault": return try await HsmClientCertificateQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "HsmClientCertificateAlreadyExistsFault": return try await HsmClientCertificateAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "HsmClientCertificateQuotaExceededFault": return try await HsmClientCertificateQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateHsmConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case description = "Description" + case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" + case hsmIpAddress = "HsmIpAddress" + case hsmPartitionName = "HsmPartitionName" + case hsmPartitionPassword = "HsmPartitionPassword" + case hsmServerPublicCertificate = "HsmServerPublicCertificate" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let description = description { @@ -8588,71 +6258,15 @@ public struct CreateHsmConfigurationInput: Swift.Equatable { } } -struct CreateHsmConfigurationInputBody: Swift.Equatable { - let hsmConfigurationIdentifier: Swift.String? - let description: Swift.String? - let hsmIpAddress: Swift.String? - let hsmPartitionName: Swift.String? - let hsmPartitionPassword: Swift.String? - let hsmServerPublicCertificate: Swift.String? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateHsmConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" - case hsmIpAddress = "HsmIpAddress" - case hsmPartitionName = "HsmPartitionName" - case hsmPartitionPassword = "HsmPartitionPassword" - case hsmServerPublicCertificate = "HsmServerPublicCertificate" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmConfigurationIdentifier) - hsmConfigurationIdentifier = hsmConfigurationIdentifierDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let hsmIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmIpAddress) - hsmIpAddress = hsmIpAddressDecoded - let hsmPartitionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmPartitionName) - hsmPartitionName = hsmPartitionNameDecoded - let hsmPartitionPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmPartitionPassword) - hsmPartitionPassword = hsmPartitionPasswordDecoded - let hsmServerPublicCertificateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmServerPublicCertificate) - hsmServerPublicCertificate = hsmServerPublicCertificateDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateHsmConfigurationOutput { -extension CreateHsmConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateHsmConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.hsmConfiguration = output.hsmConfiguration - } else { - self.hsmConfiguration = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateHsmConfigurationResult"] + var value = CreateHsmConfigurationOutput() + value.hsmConfiguration = try reader["HsmConfiguration"].readIfPresent(readingClosure: RedshiftClientTypes.HsmConfiguration.readingClosure) + return value } } } @@ -8669,37 +6283,37 @@ public struct CreateHsmConfigurationOutput: Swift.Equatable { } } -struct CreateHsmConfigurationOutputBody: Swift.Equatable { - let hsmConfiguration: RedshiftClientTypes.HsmConfiguration? -} - -extension CreateHsmConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmConfiguration = "HsmConfiguration" - } +enum CreateHsmConfigurationOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateHsmConfigurationResult")) - let hsmConfigurationDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.HsmConfiguration.self, forKey: .hsmConfiguration) - hsmConfiguration = hsmConfigurationDecoded - } -} - -enum CreateHsmConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HsmConfigurationAlreadyExistsFault": return try await HsmConfigurationAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HsmConfigurationQuotaExceededFault": return try await HsmConfigurationQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "HsmConfigurationAlreadyExistsFault": return try await HsmConfigurationAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "HsmConfigurationQuotaExceededFault": return try await HsmConfigurationQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateRedshiftIdcApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case authorizedTokenIssuerList = "AuthorizedTokenIssuerList" + case iamRoleArn = "IamRoleArn" + case idcDisplayName = "IdcDisplayName" + case idcInstanceArn = "IdcInstanceArn" + case identityNamespace = "IdentityNamespace" + case redshiftIdcApplicationName = "RedshiftIdcApplicationName" + case serviceIntegrations = "ServiceIntegrations" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authorizedTokenIssuerList = authorizedTokenIssuerList { @@ -8793,88 +6407,15 @@ public struct CreateRedshiftIdcApplicationInput: Swift.Equatable { } } -struct CreateRedshiftIdcApplicationInputBody: Swift.Equatable { - let idcInstanceArn: Swift.String? - let redshiftIdcApplicationName: Swift.String? - let identityNamespace: Swift.String? - let idcDisplayName: Swift.String? - let iamRoleArn: Swift.String? - let authorizedTokenIssuerList: [RedshiftClientTypes.AuthorizedTokenIssuer]? - let serviceIntegrations: [RedshiftClientTypes.ServiceIntegrationsUnion]? -} - -extension CreateRedshiftIdcApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authorizedTokenIssuerList = "AuthorizedTokenIssuerList" - case iamRoleArn = "IamRoleArn" - case idcDisplayName = "IdcDisplayName" - case idcInstanceArn = "IdcInstanceArn" - case identityNamespace = "IdentityNamespace" - case redshiftIdcApplicationName = "RedshiftIdcApplicationName" - case serviceIntegrations = "ServiceIntegrations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idcInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idcInstanceArn) - idcInstanceArn = idcInstanceArnDecoded - let redshiftIdcApplicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .redshiftIdcApplicationName) - redshiftIdcApplicationName = redshiftIdcApplicationNameDecoded - let identityNamespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identityNamespace) - identityNamespace = identityNamespaceDecoded - let idcDisplayNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idcDisplayName) - idcDisplayName = idcDisplayNameDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - if containerValues.contains(.authorizedTokenIssuerList) { - struct KeyVal0{struct member{}} - let authorizedTokenIssuerListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .authorizedTokenIssuerList) - if let authorizedTokenIssuerListWrappedContainer = authorizedTokenIssuerListWrappedContainer { - let authorizedTokenIssuerListContainer = try authorizedTokenIssuerListWrappedContainer.decodeIfPresent([RedshiftClientTypes.AuthorizedTokenIssuer].self, forKey: .member) - var authorizedTokenIssuerListBuffer:[RedshiftClientTypes.AuthorizedTokenIssuer]? = nil - if let authorizedTokenIssuerListContainer = authorizedTokenIssuerListContainer { - authorizedTokenIssuerListBuffer = [RedshiftClientTypes.AuthorizedTokenIssuer]() - for structureContainer0 in authorizedTokenIssuerListContainer { - authorizedTokenIssuerListBuffer?.append(structureContainer0) - } - } - authorizedTokenIssuerList = authorizedTokenIssuerListBuffer - } else { - authorizedTokenIssuerList = [] - } - } else { - authorizedTokenIssuerList = nil - } - if containerValues.contains(.serviceIntegrations) { - struct KeyVal0{struct member{}} - let serviceIntegrationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceIntegrations) - if let serviceIntegrationsWrappedContainer = serviceIntegrationsWrappedContainer { - let serviceIntegrationsContainer = try serviceIntegrationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ServiceIntegrationsUnion].self, forKey: .member) - var serviceIntegrationsBuffer:[RedshiftClientTypes.ServiceIntegrationsUnion]? = nil - if let serviceIntegrationsContainer = serviceIntegrationsContainer { - serviceIntegrationsBuffer = [RedshiftClientTypes.ServiceIntegrationsUnion]() - for unionContainer0 in serviceIntegrationsContainer { - serviceIntegrationsBuffer?.append(unionContainer0) - } - } - serviceIntegrations = serviceIntegrationsBuffer - } else { - serviceIntegrations = [] - } - } else { - serviceIntegrations = nil - } - } -} +extension CreateRedshiftIdcApplicationOutput { -extension CreateRedshiftIdcApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateRedshiftIdcApplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.redshiftIdcApplication = output.redshiftIdcApplication - } else { - self.redshiftIdcApplication = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateRedshiftIdcApplicationResult"] + var value = CreateRedshiftIdcApplicationOutput() + value.redshiftIdcApplication = try reader["RedshiftIdcApplication"].readIfPresent(readingClosure: RedshiftClientTypes.RedshiftIdcApplication.readingClosure) + return value } } } @@ -8891,38 +6432,39 @@ public struct CreateRedshiftIdcApplicationOutput: Swift.Equatable { } } -struct CreateRedshiftIdcApplicationOutputBody: Swift.Equatable { - let redshiftIdcApplication: RedshiftClientTypes.RedshiftIdcApplication? -} - -extension CreateRedshiftIdcApplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case redshiftIdcApplication = "RedshiftIdcApplication" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateRedshiftIdcApplicationResult")) - let redshiftIdcApplicationDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.RedshiftIdcApplication.self, forKey: .redshiftIdcApplication) - redshiftIdcApplication = redshiftIdcApplicationDecoded - } -} +enum CreateRedshiftIdcApplicationOutputError { -enum CreateRedshiftIdcApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceAccessDenied": return try await DependentServiceAccessDeniedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RedshiftIdcApplicationAlreadyExists": return try await RedshiftIdcApplicationAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RedshiftIdcApplicationQuotaExceeded": return try await RedshiftIdcApplicationQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceAccessDenied": return try await DependentServiceAccessDeniedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RedshiftIdcApplicationAlreadyExists": return try await RedshiftIdcApplicationAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RedshiftIdcApplicationQuotaExceeded": return try await RedshiftIdcApplicationQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateScheduledActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enable = "Enable" + case endTime = "EndTime" + case iamRole = "IamRole" + case schedule = "Schedule" + case scheduledActionDescription = "ScheduledActionDescription" + case scheduledActionName = "ScheduledActionName" + case startTime = "StartTime" + case targetAction = "TargetAction" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enable = enable { @@ -9005,74 +6547,23 @@ public struct CreateScheduledActionInput: Swift.Equatable { } } -struct CreateScheduledActionInputBody: Swift.Equatable { - let scheduledActionName: Swift.String? - let targetAction: RedshiftClientTypes.ScheduledActionType? - let schedule: Swift.String? - let iamRole: Swift.String? - let scheduledActionDescription: Swift.String? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let enable: Swift.Bool? -} - -extension CreateScheduledActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enable = "Enable" - case endTime = "EndTime" - case iamRole = "IamRole" - case schedule = "Schedule" - case scheduledActionDescription = "ScheduledActionDescription" - case scheduledActionName = "ScheduledActionName" - case startTime = "StartTime" - case targetAction = "TargetAction" - } +extension CreateScheduledActionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let targetActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionType.self, forKey: .targetAction) - targetAction = targetActionDecoded - let scheduleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .schedule) - schedule = scheduleDecoded - let iamRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRole) - iamRole = iamRoleDecoded - let scheduledActionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionDescription) - scheduledActionDescription = scheduledActionDescriptionDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let enableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enable) - enable = enableDecoded - } -} - -extension CreateScheduledActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateScheduledActionOutputBody = try responseDecoder.decode(responseBody: data) - self.endTime = output.endTime - self.iamRole = output.iamRole - self.nextInvocations = output.nextInvocations - self.schedule = output.schedule - self.scheduledActionDescription = output.scheduledActionDescription - self.scheduledActionName = output.scheduledActionName - self.startTime = output.startTime - self.state = output.state - self.targetAction = output.targetAction - } else { - self.endTime = nil - self.iamRole = nil - self.nextInvocations = nil - self.schedule = nil - self.scheduledActionDescription = nil - self.scheduledActionName = nil - self.startTime = nil - self.state = nil - self.targetAction = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateScheduledActionResult"] + var value = CreateScheduledActionOutput() + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + value.iamRole = try reader["IamRole"].readIfPresent() + value.nextInvocations = try reader["NextInvocations"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "ScheduledActionTime", isFlattened: false) + value.schedule = try reader["Schedule"].readIfPresent() + value.scheduledActionDescription = try reader["ScheduledActionDescription"].readIfPresent() + value.scheduledActionName = try reader["ScheduledActionName"].readIfPresent() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.state = try reader["State"].readIfPresent() + value.targetAction = try reader["TargetAction"].readIfPresent(readingClosure: RedshiftClientTypes.ScheduledActionType.readingClosure) + return value } } } @@ -9122,90 +6613,37 @@ public struct CreateScheduledActionOutput: Swift.Equatable { } } -struct CreateScheduledActionOutputBody: Swift.Equatable { - let scheduledActionName: Swift.String? - let targetAction: RedshiftClientTypes.ScheduledActionType? - let schedule: Swift.String? - let iamRole: Swift.String? - let scheduledActionDescription: Swift.String? - let state: RedshiftClientTypes.ScheduledActionState? - let nextInvocations: [ClientRuntime.Date]? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? -} - -extension CreateScheduledActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endTime = "EndTime" - case iamRole = "IamRole" - case nextInvocations = "NextInvocations" - case schedule = "Schedule" - case scheduledActionDescription = "ScheduledActionDescription" - case scheduledActionName = "ScheduledActionName" - case startTime = "StartTime" - case state = "State" - case targetAction = "TargetAction" - } +enum CreateScheduledActionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateScheduledActionResult")) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let targetActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionType.self, forKey: .targetAction) - targetAction = targetActionDecoded - let scheduleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .schedule) - schedule = scheduleDecoded - let iamRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRole) - iamRole = iamRoleDecoded - let scheduledActionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionDescription) - scheduledActionDescription = scheduledActionDescriptionDecoded - let stateDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.nextInvocations) { - struct KeyVal0{struct ScheduledActionTime{}} - let nextInvocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nextInvocations) - if let nextInvocationsWrappedContainer = nextInvocationsWrappedContainer { - let nextInvocationsContainer = try nextInvocationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nextInvocationsBuffer:[ClientRuntime.Date]? = nil - if let nextInvocationsContainer = nextInvocationsContainer { - nextInvocationsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in nextInvocationsContainer { - try nextInvocationsBuffer?.append(nextInvocationsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - nextInvocations = nextInvocationsBuffer - } else { - nextInvocations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidScheduledAction": return try await InvalidScheduledActionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSchedule": return try await InvalidScheduleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScheduledActionAlreadyExists": return try await ScheduledActionAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScheduledActionQuotaExceeded": return try await ScheduledActionQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScheduledActionTypeUnsupported": return try await ScheduledActionTypeUnsupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - nextInvocations = nil } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded } } -enum CreateScheduledActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidScheduledAction": return try await InvalidScheduledActionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSchedule": return try await InvalidScheduleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScheduledActionAlreadyExists": return try await ScheduledActionAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScheduledActionQuotaExceeded": return try await ScheduledActionQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScheduledActionTypeUnsupported": return try await ScheduledActionTypeUnsupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateSnapshotCopyGrantInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case kmsKeyId = "KmsKeyId" + case snapshotCopyGrantName = "SnapshotCopyGrantName" + case tags = "Tags" } -} -extension CreateSnapshotCopyGrantInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let kmsKeyId = kmsKeyId { @@ -9270,55 +6708,15 @@ public struct CreateSnapshotCopyGrantInput: Swift.Equatable { } } -struct CreateSnapshotCopyGrantInputBody: Swift.Equatable { - let snapshotCopyGrantName: Swift.String? - let kmsKeyId: Swift.String? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateSnapshotCopyGrantInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kmsKeyId = "KmsKeyId" - case snapshotCopyGrantName = "SnapshotCopyGrantName" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotCopyGrantNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotCopyGrantName) - snapshotCopyGrantName = snapshotCopyGrantNameDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateSnapshotCopyGrantOutput { -extension CreateSnapshotCopyGrantOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSnapshotCopyGrantOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshotCopyGrant = output.snapshotCopyGrant - } else { - self.snapshotCopyGrant = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateSnapshotCopyGrantResult"] + var value = CreateSnapshotCopyGrantOutput() + value.snapshotCopyGrant = try reader["SnapshotCopyGrant"].readIfPresent(readingClosure: RedshiftClientTypes.SnapshotCopyGrant.readingClosure) + return value } } } @@ -9335,39 +6733,38 @@ public struct CreateSnapshotCopyGrantOutput: Swift.Equatable { } } -struct CreateSnapshotCopyGrantOutputBody: Swift.Equatable { - let snapshotCopyGrant: RedshiftClientTypes.SnapshotCopyGrant? -} - -extension CreateSnapshotCopyGrantOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshotCopyGrant = "SnapshotCopyGrant" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateSnapshotCopyGrantResult")) - let snapshotCopyGrantDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.SnapshotCopyGrant.self, forKey: .snapshotCopyGrant) - snapshotCopyGrant = snapshotCopyGrantDecoded - } -} +enum CreateSnapshotCopyGrantOutputError { -enum CreateSnapshotCopyGrantOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededFault": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotCopyGrantAlreadyExistsFault": return try await SnapshotCopyGrantAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotCopyGrantQuotaExceededFault": return try await SnapshotCopyGrantQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededFault": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotCopyGrantAlreadyExistsFault": return try await SnapshotCopyGrantAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotCopyGrantQuotaExceededFault": return try await SnapshotCopyGrantQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateSnapshotScheduleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dryRun = "DryRun" + case nextInvocations = "NextInvocations" + case scheduleDefinitions = "ScheduleDefinitions" + case scheduleDescription = "ScheduleDescription" + case scheduleIdentifier = "ScheduleIdentifier" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dryRun = dryRun { @@ -9450,96 +6847,21 @@ public struct CreateSnapshotScheduleInput: Swift.Equatable { } } -struct CreateSnapshotScheduleInputBody: Swift.Equatable { - let scheduleDefinitions: [Swift.String]? - let scheduleIdentifier: Swift.String? - let scheduleDescription: Swift.String? - let tags: [RedshiftClientTypes.Tag]? - let dryRun: Swift.Bool? - let nextInvocations: Swift.Int? -} - -extension CreateSnapshotScheduleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dryRun = "DryRun" - case nextInvocations = "NextInvocations" - case scheduleDefinitions = "ScheduleDefinitions" - case scheduleDescription = "ScheduleDescription" - case scheduleIdentifier = "ScheduleIdentifier" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.scheduleDefinitions) { - struct KeyVal0{struct ScheduleDefinition{}} - let scheduleDefinitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduleDefinitions) - if let scheduleDefinitionsWrappedContainer = scheduleDefinitionsWrappedContainer { - let scheduleDefinitionsContainer = try scheduleDefinitionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scheduleDefinitionsBuffer:[Swift.String]? = nil - if let scheduleDefinitionsContainer = scheduleDefinitionsContainer { - scheduleDefinitionsBuffer = [Swift.String]() - for stringContainer0 in scheduleDefinitionsContainer { - scheduleDefinitionsBuffer?.append(stringContainer0) - } - } - scheduleDefinitions = scheduleDefinitionsBuffer - } else { - scheduleDefinitions = [] - } - } else { - scheduleDefinitions = nil - } - let scheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleIdentifier) - scheduleIdentifier = scheduleIdentifierDecoded - let scheduleDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleDescription) - scheduleDescription = scheduleDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let dryRunDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dryRun) - dryRun = dryRunDecoded - let nextInvocationsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .nextInvocations) - nextInvocations = nextInvocationsDecoded - } -} +extension CreateSnapshotScheduleOutput { -extension CreateSnapshotScheduleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSnapshotScheduleOutputBody = try responseDecoder.decode(responseBody: data) - self.associatedClusterCount = output.associatedClusterCount - self.associatedClusters = output.associatedClusters - self.nextInvocations = output.nextInvocations - self.scheduleDefinitions = output.scheduleDefinitions - self.scheduleDescription = output.scheduleDescription - self.scheduleIdentifier = output.scheduleIdentifier - self.tags = output.tags - } else { - self.associatedClusterCount = nil - self.associatedClusters = nil - self.nextInvocations = nil - self.scheduleDefinitions = nil - self.scheduleDescription = nil - self.scheduleIdentifier = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateSnapshotScheduleResult"] + var value = CreateSnapshotScheduleOutput() + value.associatedClusterCount = try reader["AssociatedClusterCount"].readIfPresent() + value.associatedClusters = try reader["AssociatedClusters"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterAssociatedToSchedule.readingClosure, memberNodeInfo: "ClusterAssociatedToSchedule", isFlattened: false) + value.nextInvocations = try reader["NextInvocations"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "SnapshotTime", isFlattened: false) + value.scheduleDefinitions = try reader["ScheduleDefinitions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ScheduleDefinition", isFlattened: false) + value.scheduleDescription = try reader["ScheduleDescription"].readIfPresent() + value.scheduleIdentifier = try reader["ScheduleIdentifier"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -9581,131 +6903,34 @@ public struct CreateSnapshotScheduleOutput: Swift.Equatable { } } -struct CreateSnapshotScheduleOutputBody: Swift.Equatable { - let scheduleDefinitions: [Swift.String]? - let scheduleIdentifier: Swift.String? - let scheduleDescription: Swift.String? - let tags: [RedshiftClientTypes.Tag]? - let nextInvocations: [ClientRuntime.Date]? - let associatedClusterCount: Swift.Int? - let associatedClusters: [RedshiftClientTypes.ClusterAssociatedToSchedule]? -} - -extension CreateSnapshotScheduleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedClusterCount = "AssociatedClusterCount" - case associatedClusters = "AssociatedClusters" - case nextInvocations = "NextInvocations" - case scheduleDefinitions = "ScheduleDefinitions" - case scheduleDescription = "ScheduleDescription" - case scheduleIdentifier = "ScheduleIdentifier" - case tags = "Tags" - } +enum CreateSnapshotScheduleOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateSnapshotScheduleResult")) - if containerValues.contains(.scheduleDefinitions) { - struct KeyVal0{struct ScheduleDefinition{}} - let scheduleDefinitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduleDefinitions) - if let scheduleDefinitionsWrappedContainer = scheduleDefinitionsWrappedContainer { - let scheduleDefinitionsContainer = try scheduleDefinitionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scheduleDefinitionsBuffer:[Swift.String]? = nil - if let scheduleDefinitionsContainer = scheduleDefinitionsContainer { - scheduleDefinitionsBuffer = [Swift.String]() - for stringContainer0 in scheduleDefinitionsContainer { - scheduleDefinitionsBuffer?.append(stringContainer0) - } - } - scheduleDefinitions = scheduleDefinitionsBuffer - } else { - scheduleDefinitions = [] - } - } else { - scheduleDefinitions = nil - } - let scheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleIdentifier) - scheduleIdentifier = scheduleIdentifierDecoded - let scheduleDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleDescription) - scheduleDescription = scheduleDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.nextInvocations) { - struct KeyVal0{struct SnapshotTime{}} - let nextInvocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nextInvocations) - if let nextInvocationsWrappedContainer = nextInvocationsWrappedContainer { - let nextInvocationsContainer = try nextInvocationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nextInvocationsBuffer:[ClientRuntime.Date]? = nil - if let nextInvocationsContainer = nextInvocationsContainer { - nextInvocationsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in nextInvocationsContainer { - try nextInvocationsBuffer?.append(nextInvocationsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - nextInvocations = nextInvocationsBuffer - } else { - nextInvocations = [] - } - } else { - nextInvocations = nil - } - let associatedClusterCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .associatedClusterCount) - associatedClusterCount = associatedClusterCountDecoded - if containerValues.contains(.associatedClusters) { - struct KeyVal0{struct ClusterAssociatedToSchedule{}} - let associatedClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedClusters) - if let associatedClustersWrappedContainer = associatedClustersWrappedContainer { - let associatedClustersContainer = try associatedClustersWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterAssociatedToSchedule].self, forKey: .member) - var associatedClustersBuffer:[RedshiftClientTypes.ClusterAssociatedToSchedule]? = nil - if let associatedClustersContainer = associatedClustersContainer { - associatedClustersBuffer = [RedshiftClientTypes.ClusterAssociatedToSchedule]() - for structureContainer0 in associatedClustersContainer { - associatedClustersBuffer?.append(structureContainer0) - } - } - associatedClusters = associatedClustersBuffer - } else { - associatedClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidSchedule": return try await InvalidScheduleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScheduleDefinitionTypeUnsupported": return try await ScheduleDefinitionTypeUnsupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotScheduleAlreadyExists": return try await SnapshotScheduleAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotScheduleQuotaExceeded": return try await SnapshotScheduleQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - associatedClusters = nil } } } -enum CreateSnapshotScheduleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidSchedule": return try await InvalidScheduleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScheduleDefinitionTypeUnsupported": return try await ScheduleDefinitionTypeUnsupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotScheduleAlreadyExists": return try await SnapshotScheduleAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotScheduleQuotaExceeded": return try await SnapshotScheduleQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension CreateTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tags = "Tags" } -} -extension CreateTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -9754,67 +6979,51 @@ public struct CreateTagsInput: Swift.Equatable { } } -struct CreateTagsInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tags = "Tags" - } +extension CreateTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateTagsOutput() } } } -extension CreateTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct CreateTagsOutput: Swift.Equatable { public init() { } } -enum CreateTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateUsageLimitInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case amount = "Amount" + case breachAction = "BreachAction" + case clusterIdentifier = "ClusterIdentifier" + case featureType = "FeatureType" + case limitType = "LimitType" + case period = "Period" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let amount = amount { @@ -9899,85 +7108,22 @@ public struct CreateUsageLimitInput: Swift.Equatable { } } -struct CreateUsageLimitInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let featureType: RedshiftClientTypes.UsageLimitFeatureType? - let limitType: RedshiftClientTypes.UsageLimitLimitType? - let amount: Swift.Int? - let period: RedshiftClientTypes.UsageLimitPeriod? - let breachAction: RedshiftClientTypes.UsageLimitBreachAction? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateUsageLimitInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amount = "Amount" - case breachAction = "BreachAction" - case clusterIdentifier = "ClusterIdentifier" - case featureType = "FeatureType" - case limitType = "LimitType" - case period = "Period" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let featureTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitFeatureType.self, forKey: .featureType) - featureType = featureTypeDecoded - let limitTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitLimitType.self, forKey: .limitType) - limitType = limitTypeDecoded - let amountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amount) - amount = amountDecoded - let periodDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitPeriod.self, forKey: .period) - period = periodDecoded - let breachActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitBreachAction.self, forKey: .breachAction) - breachAction = breachActionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateUsageLimitOutput { -extension CreateUsageLimitOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateUsageLimitOutputBody = try responseDecoder.decode(responseBody: data) - self.amount = output.amount - self.breachAction = output.breachAction - self.clusterIdentifier = output.clusterIdentifier - self.featureType = output.featureType - self.limitType = output.limitType - self.period = output.period - self.tags = output.tags - self.usageLimitId = output.usageLimitId - } else { - self.amount = nil - self.breachAction = nil - self.clusterIdentifier = nil - self.featureType = nil - self.limitType = nil - self.period = nil - self.tags = nil - self.usageLimitId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateUsageLimitResult"] + var value = CreateUsageLimitOutput() + value.amount = try reader["Amount"].readIfPresent() + value.breachAction = try reader["BreachAction"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.featureType = try reader["FeatureType"].readIfPresent() + value.limitType = try reader["LimitType"].readIfPresent() + value.period = try reader["Period"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.usageLimitId = try reader["UsageLimitId"].readIfPresent() + return value } } } @@ -10029,95 +7175,38 @@ public struct CreateUsageLimitOutput: Swift.Equatable { } } -struct CreateUsageLimitOutputBody: Swift.Equatable { - let usageLimitId: Swift.String? - let clusterIdentifier: Swift.String? - let featureType: RedshiftClientTypes.UsageLimitFeatureType? - let limitType: RedshiftClientTypes.UsageLimitLimitType? - let amount: Swift.Int? - let period: RedshiftClientTypes.UsageLimitPeriod? - let breachAction: RedshiftClientTypes.UsageLimitBreachAction? - let tags: [RedshiftClientTypes.Tag]? -} - -extension CreateUsageLimitOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amount = "Amount" - case breachAction = "BreachAction" - case clusterIdentifier = "ClusterIdentifier" - case featureType = "FeatureType" - case limitType = "LimitType" - case period = "Period" - case tags = "Tags" - case usageLimitId = "UsageLimitId" - } +enum CreateUsageLimitOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateUsageLimitResult")) - let usageLimitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageLimitId) - usageLimitId = usageLimitIdDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let featureTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitFeatureType.self, forKey: .featureType) - featureType = featureTypeDecoded - let limitTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitLimitType.self, forKey: .limitType) - limitType = limitTypeDecoded - let amountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amount) - amount = amountDecoded - let periodDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitPeriod.self, forKey: .period) - period = periodDecoded - let breachActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitBreachAction.self, forKey: .breachAction) - breachAction = breachActionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidUsageLimit": return try await InvalidUsageLimitFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededFault": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UsageLimitAlreadyExists": return try await UsageLimitAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil - } - } -} - -enum CreateUsageLimitOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidUsageLimit": return try await InvalidUsageLimitFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededFault": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UsageLimitAlreadyExists": return try await UsageLimitAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension CustomCnameAssociationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomCnameAssociationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10145,33 +7234,15 @@ public struct CustomCnameAssociationFault: ClientRuntime.ModeledError, AWSClient } } -struct CustomCnameAssociationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CustomCnameAssociationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CustomDomainAssociationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomDomainAssociationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -10199,23 +7270,7 @@ public struct CustomDomainAssociationNotFoundFault: ClientRuntime.ModeledError, } } -struct CustomDomainAssociationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension CustomDomainAssociationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.DataShare: Swift.Codable { +extension RedshiftClientTypes.DataShare: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowPubliclyAccessibleConsumers = "AllowPubliclyAccessibleConsumers" case dataShareArn = "DataShareArn" @@ -10252,35 +7307,17 @@ extension RedshiftClientTypes.DataShare: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let producerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .producerArn) - producerArn = producerArnDecoded - let allowPubliclyAccessibleConsumersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowPubliclyAccessibleConsumers) - allowPubliclyAccessibleConsumers = allowPubliclyAccessibleConsumersDecoded - if containerValues.contains(.dataShareAssociations) { - struct KeyVal0{struct member{}} - let dataShareAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShareAssociations) - if let dataShareAssociationsWrappedContainer = dataShareAssociationsWrappedContainer { - let dataShareAssociationsContainer = try dataShareAssociationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShareAssociation].self, forKey: .member) - var dataShareAssociationsBuffer:[RedshiftClientTypes.DataShareAssociation]? = nil - if let dataShareAssociationsContainer = dataShareAssociationsContainer { - dataShareAssociationsBuffer = [RedshiftClientTypes.DataShareAssociation]() - for structureContainer0 in dataShareAssociationsContainer { - dataShareAssociationsBuffer?.append(structureContainer0) - } - } - dataShareAssociations = dataShareAssociationsBuffer - } else { - dataShareAssociations = [] - } - } else { - dataShareAssociations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.DataShare() + value.dataShareArn = try reader["DataShareArn"].readIfPresent() + value.producerArn = try reader["ProducerArn"].readIfPresent() + value.allowPubliclyAccessibleConsumers = try reader["AllowPubliclyAccessibleConsumers"].readIfPresent() + value.dataShareAssociations = try reader["DataShareAssociations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShareAssociation.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.managedBy = try reader["ManagedBy"].readIfPresent() + return value } - let managedByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .managedBy) - managedBy = managedByDecoded } } @@ -10315,7 +7352,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.DataShareAssociation: Swift.Codable { +extension RedshiftClientTypes.DataShareAssociation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case consumerAcceptedWrites = "ConsumerAcceptedWrites" case consumerIdentifier = "ConsumerIdentifier" @@ -10351,22 +7388,19 @@ extension RedshiftClientTypes.DataShareAssociation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let consumerIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerIdentifier) - consumerIdentifier = consumerIdentifierDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.DataShareStatus.self, forKey: .status) - status = statusDecoded - let consumerRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerRegion) - consumerRegion = consumerRegionDecoded - let createdDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdDate) - createdDate = createdDateDecoded - let statusChangeDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .statusChangeDate) - statusChangeDate = statusChangeDateDecoded - let producerAllowedWritesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .producerAllowedWrites) - producerAllowedWrites = producerAllowedWritesDecoded - let consumerAcceptedWritesDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .consumerAcceptedWrites) - consumerAcceptedWrites = consumerAcceptedWritesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.DataShareAssociation() + value.consumerIdentifier = try reader["ConsumerIdentifier"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.consumerRegion = try reader["ConsumerRegion"].readIfPresent() + value.createdDate = try reader["CreatedDate"].readTimestampIfPresent(format: .dateTime) + value.statusChangeDate = try reader["StatusChangeDate"].readTimestampIfPresent(format: .dateTime) + value.producerAllowedWrites = try reader["ProducerAllowedWrites"].readIfPresent() + value.consumerAcceptedWrites = try reader["ConsumerAcceptedWrites"].readIfPresent() + return value + } } } @@ -10527,7 +7561,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.DataTransferProgress: Swift.Codable { +extension RedshiftClientTypes.DataTransferProgress: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case currentRateInMegaBytesPerSecond = "CurrentRateInMegaBytesPerSecond" case dataTransferredInMegaBytes = "DataTransferredInMegaBytes" @@ -10559,20 +7593,18 @@ extension RedshiftClientTypes.DataTransferProgress: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let currentRateInMegaBytesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .currentRateInMegaBytesPerSecond) - currentRateInMegaBytesPerSecond = currentRateInMegaBytesPerSecondDecoded - let totalDataInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalDataInMegaBytes) - totalDataInMegaBytes = totalDataInMegaBytesDecoded - let dataTransferredInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .dataTransferredInMegaBytes) - dataTransferredInMegaBytes = dataTransferredInMegaBytesDecoded - let estimatedTimeToCompletionInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .estimatedTimeToCompletionInSeconds) - estimatedTimeToCompletionInSeconds = estimatedTimeToCompletionInSecondsDecoded - let elapsedTimeInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .elapsedTimeInSeconds) - elapsedTimeInSeconds = elapsedTimeInSecondsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.DataTransferProgress() + value.status = try reader["Status"].readIfPresent() + value.currentRateInMegaBytesPerSecond = try reader["CurrentRateInMegaBytesPerSecond"].readIfPresent() + value.totalDataInMegaBytes = try reader["TotalDataInMegaBytes"].readIfPresent() + value.dataTransferredInMegaBytes = try reader["DataTransferredInMegaBytes"].readIfPresent() + value.estimatedTimeToCompletionInSeconds = try reader["EstimatedTimeToCompletionInSeconds"].readIfPresent() + value.elapsedTimeInSeconds = try reader["ElapsedTimeInSeconds"].readIfPresent() + return value + } } } @@ -10613,6 +7645,11 @@ extension RedshiftClientTypes { } extension DeauthorizeDataShareInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case consumerIdentifier = "ConsumerIdentifier" + case dataShareArn = "DataShareArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let consumerIdentifier = consumerIdentifier { @@ -10651,42 +7688,19 @@ public struct DeauthorizeDataShareInput: Swift.Equatable { } } -struct DeauthorizeDataShareInputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let consumerIdentifier: Swift.String? -} - -extension DeauthorizeDataShareInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case consumerIdentifier = "ConsumerIdentifier" - case dataShareArn = "DataShareArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let consumerIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerIdentifier) - consumerIdentifier = consumerIdentifierDecoded - } -} +extension DeauthorizeDataShareOutput { -extension DeauthorizeDataShareOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeauthorizeDataShareOutputBody = try responseDecoder.decode(responseBody: data) - self.allowPubliclyAccessibleConsumers = output.allowPubliclyAccessibleConsumers - self.dataShareArn = output.dataShareArn - self.dataShareAssociations = output.dataShareAssociations - self.managedBy = output.managedBy - self.producerArn = output.producerArn - } else { - self.allowPubliclyAccessibleConsumers = nil - self.dataShareArn = nil - self.dataShareAssociations = nil - self.managedBy = nil - self.producerArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeauthorizeDataShareResult"] + var value = DeauthorizeDataShareOutput() + value.allowPubliclyAccessibleConsumers = try reader["AllowPubliclyAccessibleConsumers"].readIfPresent() + value.dataShareArn = try reader["DataShareArn"].readIfPresent() + value.dataShareAssociations = try reader["DataShareAssociations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShareAssociation.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.managedBy = try reader["ManagedBy"].readIfPresent() + value.producerArn = try reader["ProducerArn"].readIfPresent() + return value } } } @@ -10719,67 +7733,24 @@ public struct DeauthorizeDataShareOutput: Swift.Equatable { } } -struct DeauthorizeDataShareOutputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let producerArn: Swift.String? - let allowPubliclyAccessibleConsumers: Swift.Bool? - let dataShareAssociations: [RedshiftClientTypes.DataShareAssociation]? - let managedBy: Swift.String? -} - -extension DeauthorizeDataShareOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowPubliclyAccessibleConsumers = "AllowPubliclyAccessibleConsumers" - case dataShareArn = "DataShareArn" - case dataShareAssociations = "DataShareAssociations" - case managedBy = "ManagedBy" - case producerArn = "ProducerArn" - } +enum DeauthorizeDataShareOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeauthorizeDataShareResult")) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let producerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .producerArn) - producerArn = producerArnDecoded - let allowPubliclyAccessibleConsumersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowPubliclyAccessibleConsumers) - allowPubliclyAccessibleConsumers = allowPubliclyAccessibleConsumersDecoded - if containerValues.contains(.dataShareAssociations) { - struct KeyVal0{struct member{}} - let dataShareAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShareAssociations) - if let dataShareAssociationsWrappedContainer = dataShareAssociationsWrappedContainer { - let dataShareAssociationsContainer = try dataShareAssociationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShareAssociation].self, forKey: .member) - var dataShareAssociationsBuffer:[RedshiftClientTypes.DataShareAssociation]? = nil - if let dataShareAssociationsContainer = dataShareAssociationsContainer { - dataShareAssociationsBuffer = [RedshiftClientTypes.DataShareAssociation]() - for structureContainer0 in dataShareAssociationsContainer { - dataShareAssociationsBuffer?.append(structureContainer0) - } - } - dataShareAssociations = dataShareAssociationsBuffer - } else { - dataShareAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidDataShareFault": return try await InvalidDataShareFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dataShareAssociations = nil } - let managedByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .managedBy) - managedBy = managedByDecoded } } -enum DeauthorizeDataShareOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDataShareFault": return try await InvalidDataShareFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RedshiftClientTypes.DefaultClusterParameters: Swift.Codable { +extension RedshiftClientTypes.DefaultClusterParameters: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case marker = "Marker" case parameterGroupFamily = "ParameterGroupFamily" @@ -10808,30 +7779,14 @@ extension RedshiftClientTypes.DefaultClusterParameters: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupFamily) - parameterGroupFamily = parameterGroupFamilyDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RedshiftClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RedshiftClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RedshiftClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.DefaultClusterParameters() + value.parameterGroupFamily = try reader["ParameterGroupFamily"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -10860,7 +7815,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.DeferredMaintenanceWindow: Swift.Codable { +extension RedshiftClientTypes.DeferredMaintenanceWindow: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deferMaintenanceEndTime = "DeferMaintenanceEndTime" case deferMaintenanceIdentifier = "DeferMaintenanceIdentifier" @@ -10880,14 +7835,15 @@ extension RedshiftClientTypes.DeferredMaintenanceWindow: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deferMaintenanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deferMaintenanceIdentifier) - deferMaintenanceIdentifier = deferMaintenanceIdentifierDecoded - let deferMaintenanceStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deferMaintenanceStartTime) - deferMaintenanceStartTime = deferMaintenanceStartTimeDecoded - let deferMaintenanceEndTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deferMaintenanceEndTime) - deferMaintenanceEndTime = deferMaintenanceEndTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.DeferredMaintenanceWindow() + value.deferMaintenanceIdentifier = try reader["DeferMaintenanceIdentifier"].readIfPresent() + value.deferMaintenanceStartTime = try reader["DeferMaintenanceStartTime"].readTimestampIfPresent(format: .dateTime) + value.deferMaintenanceEndTime = try reader["DeferMaintenanceEndTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -10916,6 +7872,10 @@ extension RedshiftClientTypes { } extension DeleteAuthenticationProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case authenticationProfileName = "AuthenticationProfileName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authenticationProfileName = authenticationProfileName { @@ -10946,30 +7906,15 @@ public struct DeleteAuthenticationProfileInput: Swift.Equatable { } } -struct DeleteAuthenticationProfileInputBody: Swift.Equatable { - let authenticationProfileName: Swift.String? -} - -extension DeleteAuthenticationProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationProfileName = "AuthenticationProfileName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let authenticationProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileName) - authenticationProfileName = authenticationProfileNameDecoded - } -} +extension DeleteAuthenticationProfileOutput { -extension DeleteAuthenticationProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteAuthenticationProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.authenticationProfileName = output.authenticationProfileName - } else { - self.authenticationProfileName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteAuthenticationProfileResult"] + var value = DeleteAuthenticationProfileOutput() + value.authenticationProfileName = try reader["AuthenticationProfileName"].readIfPresent() + return value } } } @@ -10986,35 +7931,32 @@ public struct DeleteAuthenticationProfileOutput: Swift.Equatable { } } -struct DeleteAuthenticationProfileOutputBody: Swift.Equatable { - let authenticationProfileName: Swift.String? -} - -extension DeleteAuthenticationProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationProfileName = "AuthenticationProfileName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteAuthenticationProfileResult")) - let authenticationProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileName) - authenticationProfileName = authenticationProfileNameDecoded - } -} +enum DeleteAuthenticationProfileOutputError { -enum DeleteAuthenticationProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthenticationProfileNotFoundFault": return try await AuthenticationProfileNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidAuthenticationProfileRequestFault": return try await InvalidAuthenticationProfileRequestFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthenticationProfileNotFoundFault": return try await AuthenticationProfileNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidAuthenticationProfileRequestFault": return try await InvalidAuthenticationProfileRequestFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case finalClusterSnapshotIdentifier = "FinalClusterSnapshotIdentifier" + case finalClusterSnapshotRetentionPeriod = "FinalClusterSnapshotRetentionPeriod" + case skipFinalClusterSnapshot = "SkipFinalClusterSnapshot" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -11081,42 +8023,15 @@ public struct DeleteClusterInput: Swift.Equatable { } } -struct DeleteClusterInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let skipFinalClusterSnapshot: Swift.Bool? - let finalClusterSnapshotIdentifier: Swift.String? - let finalClusterSnapshotRetentionPeriod: Swift.Int? -} - -extension DeleteClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case finalClusterSnapshotIdentifier = "FinalClusterSnapshotIdentifier" - case finalClusterSnapshotRetentionPeriod = "FinalClusterSnapshotRetentionPeriod" - case skipFinalClusterSnapshot = "SkipFinalClusterSnapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let skipFinalClusterSnapshotDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .skipFinalClusterSnapshot) - skipFinalClusterSnapshot = skipFinalClusterSnapshotDecoded - let finalClusterSnapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalClusterSnapshotIdentifier) - finalClusterSnapshotIdentifier = finalClusterSnapshotIdentifierDecoded - let finalClusterSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .finalClusterSnapshotRetentionPeriod) - finalClusterSnapshotRetentionPeriod = finalClusterSnapshotRetentionPeriodDecoded - } -} +extension DeleteClusterOutput { -extension DeleteClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteClusterResult"] + var value = DeleteClusterOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -11133,38 +8048,32 @@ public struct DeleteClusterOutput: Swift.Equatable { } } -struct DeleteClusterOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension DeleteClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteClusterResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum DeleteClusterOutputError { -enum DeleteClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotAlreadyExists": return try await ClusterSnapshotAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotQuotaExceeded": return try await ClusterSnapshotQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotAlreadyExists": return try await ClusterSnapshotAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotQuotaExceeded": return try await ClusterSnapshotQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case parameterGroupName = "ParameterGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let parameterGroupName = parameterGroupName { @@ -11200,24 +8109,12 @@ public struct DeleteClusterParameterGroupInput: Swift.Equatable { } } -struct DeleteClusterParameterGroupInputBody: Swift.Equatable { - let parameterGroupName: Swift.String? -} - -extension DeleteClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case parameterGroupName = "ParameterGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - } -} +extension DeleteClusterParameterGroupOutput { -extension DeleteClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteClusterParameterGroupOutput() + } } } @@ -11226,18 +8123,29 @@ public struct DeleteClusterParameterGroupOutput: Swift.Equatable { public init() { } } -enum DeleteClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterParameterGroupState": return try await InvalidClusterParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteClusterParameterGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterParameterGroupState": return try await InvalidClusterParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteClusterSecurityGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterSecurityGroupName = "ClusterSecurityGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterSecurityGroupName = clusterSecurityGroupName { @@ -11269,24 +8177,12 @@ public struct DeleteClusterSecurityGroupInput: Swift.Equatable { } } -struct DeleteClusterSecurityGroupInputBody: Swift.Equatable { - let clusterSecurityGroupName: Swift.String? -} - -extension DeleteClusterSecurityGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSecurityGroupName = "ClusterSecurityGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSecurityGroupName) - clusterSecurityGroupName = clusterSecurityGroupNameDecoded - } -} +extension DeleteClusterSecurityGroupOutput { -extension DeleteClusterSecurityGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteClusterSecurityGroupOutput() + } } } @@ -11295,18 +8191,30 @@ public struct DeleteClusterSecurityGroupOutput: Swift.Equatable { public init() { } } -enum DeleteClusterSecurityGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteClusterSecurityGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case snapshotClusterIdentifier = "SnapshotClusterIdentifier" + case snapshotIdentifier = "SnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let snapshotClusterIdentifier = snapshotClusterIdentifier { @@ -11345,27 +8253,7 @@ public struct DeleteClusterSnapshotInput: Swift.Equatable { } } -struct DeleteClusterSnapshotInputBody: Swift.Equatable { - let snapshotIdentifier: Swift.String? - let snapshotClusterIdentifier: Swift.String? -} - -extension DeleteClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshotClusterIdentifier = "SnapshotClusterIdentifier" - case snapshotIdentifier = "SnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let snapshotClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotClusterIdentifier) - snapshotClusterIdentifier = snapshotClusterIdentifierDecoded - } -} - -extension RedshiftClientTypes.DeleteClusterSnapshotMessage: Swift.Codable { +extension RedshiftClientTypes.DeleteClusterSnapshotMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case snapshotClusterIdentifier = "SnapshotClusterIdentifier" case snapshotIdentifier = "SnapshotIdentifier" @@ -11381,12 +8269,14 @@ extension RedshiftClientTypes.DeleteClusterSnapshotMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let snapshotClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotClusterIdentifier) - snapshotClusterIdentifier = snapshotClusterIdentifierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.DeleteClusterSnapshotMessage() + value.snapshotIdentifier = try reader["SnapshotIdentifier"].readIfPresent() + value.snapshotClusterIdentifier = try reader["SnapshotClusterIdentifier"].readIfPresent() + return value + } } } @@ -11411,14 +8301,15 @@ extension RedshiftClientTypes { } -extension DeleteClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil +extension DeleteClusterSnapshotOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteClusterSnapshotResult"] + var value = DeleteClusterSnapshotOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: RedshiftClientTypes.Snapshot.readingClosure) + return value } } } @@ -11435,35 +8326,29 @@ public struct DeleteClusterSnapshotOutput: Swift.Equatable { } } -struct DeleteClusterSnapshotOutputBody: Swift.Equatable { - let snapshot: RedshiftClientTypes.Snapshot? -} - -extension DeleteClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteClusterSnapshotResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum DeleteClusterSnapshotOutputError { -enum DeleteClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteClusterSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterSubnetGroupName = "ClusterSubnetGroupName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterSubnetGroupName = clusterSubnetGroupName { @@ -11495,24 +8380,12 @@ public struct DeleteClusterSubnetGroupInput: Swift.Equatable { } } -struct DeleteClusterSubnetGroupInputBody: Swift.Equatable { - let clusterSubnetGroupName: Swift.String? -} - -extension DeleteClusterSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSubnetGroupName = "ClusterSubnetGroupName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSubnetGroupName) - clusterSubnetGroupName = clusterSubnetGroupNameDecoded - } -} +extension DeleteClusterSubnetGroupOutput { -extension DeleteClusterSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteClusterSubnetGroupOutput() + } } } @@ -11521,19 +8394,31 @@ public struct DeleteClusterSubnetGroupOutput: Swift.Equatable { public init() { } } -enum DeleteClusterSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSubnetGroupStateFault": return try await InvalidClusterSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSubnetStateFault": return try await InvalidClusterSubnetStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteClusterSubnetGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSubnetGroupStateFault": return try await InvalidClusterSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSubnetStateFault": return try await InvalidClusterSubnetStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteCustomDomainAssociationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case customDomainName = "CustomDomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -11572,28 +8457,12 @@ public struct DeleteCustomDomainAssociationInput: Swift.Equatable { } } -struct DeleteCustomDomainAssociationInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let customDomainName: Swift.String? -} - -extension DeleteCustomDomainAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case customDomainName = "CustomDomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - } -} +extension DeleteCustomDomainAssociationOutput { -extension DeleteCustomDomainAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCustomDomainAssociationOutput() + } } } @@ -11602,20 +8471,31 @@ public struct DeleteCustomDomainAssociationOutput: Swift.Equatable { public init() { } } -enum DeleteCustomDomainAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomCnameAssociationFault": return try await CustomCnameAssociationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomDomainAssociationNotFoundFault": return try await CustomDomainAssociationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteCustomDomainAssociationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomCnameAssociationFault": return try await CustomCnameAssociationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomDomainAssociationNotFoundFault": return try await CustomDomainAssociationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteEndpointAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case endpointName = "EndpointName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let endpointName = endpointName { @@ -11646,48 +8526,24 @@ public struct DeleteEndpointAccessInput: Swift.Equatable { } } -struct DeleteEndpointAccessInputBody: Swift.Equatable { - let endpointName: Swift.String? -} - -extension DeleteEndpointAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpointName = "EndpointName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let endpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointName) - endpointName = endpointNameDecoded - } -} +extension DeleteEndpointAccessOutput { -extension DeleteEndpointAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteEndpointAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.address = output.address - self.clusterIdentifier = output.clusterIdentifier - self.endpointCreateTime = output.endpointCreateTime - self.endpointName = output.endpointName - self.endpointStatus = output.endpointStatus - self.port = output.port - self.resourceOwner = output.resourceOwner - self.subnetGroupName = output.subnetGroupName - self.vpcEndpoint = output.vpcEndpoint - self.vpcSecurityGroups = output.vpcSecurityGroups - } else { - self.address = nil - self.clusterIdentifier = nil - self.endpointCreateTime = nil - self.endpointName = nil - self.endpointStatus = nil - self.port = nil - self.resourceOwner = nil - self.subnetGroupName = nil - self.vpcEndpoint = nil - self.vpcSecurityGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeleteEndpointAccessResult"] + var value = DeleteEndpointAccessOutput() + value.address = try reader["Address"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.endpointCreateTime = try reader["EndpointCreateTime"].readTimestampIfPresent(format: .dateTime) + value.endpointName = try reader["EndpointName"].readIfPresent() + value.endpointStatus = try reader["EndpointStatus"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.resourceOwner = try reader["ResourceOwner"].readIfPresent() + value.subnetGroupName = try reader["SubnetGroupName"].readIfPresent() + value.vpcEndpoint = try reader["VpcEndpoint"].readIfPresent(readingClosure: RedshiftClientTypes.VpcEndpoint.readingClosure) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroup", isFlattened: false) + return value } } } @@ -11741,91 +8597,32 @@ public struct DeleteEndpointAccessOutput: Swift.Equatable { } } -struct DeleteEndpointAccessOutputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let resourceOwner: Swift.String? - let subnetGroupName: Swift.String? - let endpointStatus: Swift.String? - let endpointName: Swift.String? - let endpointCreateTime: ClientRuntime.Date? - let port: Swift.Int? - let address: Swift.String? - let vpcSecurityGroups: [RedshiftClientTypes.VpcSecurityGroupMembership]? - let vpcEndpoint: RedshiftClientTypes.VpcEndpoint? -} - -extension DeleteEndpointAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "Address" - case clusterIdentifier = "ClusterIdentifier" - case endpointCreateTime = "EndpointCreateTime" - case endpointName = "EndpointName" - case endpointStatus = "EndpointStatus" - case port = "Port" - case resourceOwner = "ResourceOwner" - case subnetGroupName = "SubnetGroupName" - case vpcEndpoint = "VpcEndpoint" - case vpcSecurityGroups = "VpcSecurityGroups" - } +enum DeleteEndpointAccessOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteEndpointAccessResult")) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - let subnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupName) - subnetGroupName = subnetGroupNameDecoded - let endpointStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointStatus) - endpointStatus = endpointStatusDecoded - let endpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointName) - endpointName = endpointNameDecoded - let endpointCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endpointCreateTime) - endpointCreateTime = endpointCreateTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroup{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[RedshiftClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [RedshiftClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointNotFound": return try await EndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidEndpointState": return try await InvalidEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - vpcSecurityGroups = nil } - let vpcEndpointDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.VpcEndpoint.self, forKey: .vpcEndpoint) - vpcEndpoint = vpcEndpointDecoded } } -enum DeleteEndpointAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointNotFound": return try await EndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidEndpointState": return try await InvalidEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DeleteEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case subscriptionName = "SubscriptionName" } -} -extension DeleteEventSubscriptionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let subscriptionName = subscriptionName { @@ -11857,24 +8654,12 @@ public struct DeleteEventSubscriptionInput: Swift.Equatable { } } -struct DeleteEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? -} - -extension DeleteEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - } -} +extension DeleteEventSubscriptionOutput { -extension DeleteEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteEventSubscriptionOutput() + } } } @@ -11883,18 +8668,29 @@ public struct DeleteEventSubscriptionOutput: Swift.Equatable { public init() { } } -enum DeleteEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidSubscriptionStateFault": return try await InvalidSubscriptionStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteEventSubscriptionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidSubscriptionStateFault": return try await InvalidSubscriptionStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteHsmClientCertificateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let hsmClientCertificateIdentifier = hsmClientCertificateIdentifier { @@ -11926,24 +8722,12 @@ public struct DeleteHsmClientCertificateInput: Swift.Equatable { } } -struct DeleteHsmClientCertificateInputBody: Swift.Equatable { - let hsmClientCertificateIdentifier: Swift.String? -} - -extension DeleteHsmClientCertificateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmClientCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificateIdentifier) - hsmClientCertificateIdentifier = hsmClientCertificateIdentifierDecoded - } -} +extension DeleteHsmClientCertificateOutput { -extension DeleteHsmClientCertificateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteHsmClientCertificateOutput() + } } } @@ -11952,18 +8736,29 @@ public struct DeleteHsmClientCertificateOutput: Swift.Equatable { public init() { } } -enum DeleteHsmClientCertificateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidHsmClientCertificateStateFault": return try await InvalidHsmClientCertificateStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteHsmClientCertificateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidHsmClientCertificateStateFault": return try await InvalidHsmClientCertificateStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteHsmConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let hsmConfigurationIdentifier = hsmConfigurationIdentifier { @@ -11995,24 +8790,12 @@ public struct DeleteHsmConfigurationInput: Swift.Equatable { } } -struct DeleteHsmConfigurationInputBody: Swift.Equatable { - let hsmConfigurationIdentifier: Swift.String? -} - -extension DeleteHsmConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmConfigurationIdentifier) - hsmConfigurationIdentifier = hsmConfigurationIdentifierDecoded - } -} +extension DeleteHsmConfigurationOutput { -extension DeleteHsmConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteHsmConfigurationOutput() + } } } @@ -12021,18 +8804,32 @@ public struct DeleteHsmConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteHsmConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidHsmConfigurationStateFault": return try await InvalidHsmConfigurationStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteHsmConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidHsmConfigurationStateFault": return try await InvalidHsmConfigurationStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeletePartnerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accountId = "AccountId" + case clusterIdentifier = "ClusterIdentifier" + case databaseName = "DatabaseName" + case partnerName = "PartnerName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accountId = accountId { @@ -12087,44 +8884,16 @@ public struct DeletePartnerInput: Swift.Equatable { } } -struct DeletePartnerInputBody: Swift.Equatable { - let accountId: Swift.String? - let clusterIdentifier: Swift.String? - let databaseName: Swift.String? - let partnerName: Swift.String? -} - -extension DeletePartnerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "AccountId" - case clusterIdentifier = "ClusterIdentifier" - case databaseName = "DatabaseName" - case partnerName = "PartnerName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let partnerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partnerName) - partnerName = partnerNameDecoded - } -} +extension DeletePartnerOutput { -extension DeletePartnerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeletePartnerOutputBody = try responseDecoder.decode(responseBody: data) - self.databaseName = output.databaseName - self.partnerName = output.partnerName - } else { - self.databaseName = nil - self.partnerName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DeletePartnerResult"] + var value = DeletePartnerOutput() + value.databaseName = try reader["DatabaseName"].readIfPresent() + value.partnerName = try reader["PartnerName"].readIfPresent() + return value } } } @@ -12145,41 +8914,31 @@ public struct DeletePartnerOutput: Swift.Equatable { } } -struct DeletePartnerOutputBody: Swift.Equatable { - let databaseName: Swift.String? - let partnerName: Swift.String? -} - -extension DeletePartnerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case databaseName = "DatabaseName" - case partnerName = "PartnerName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeletePartnerResult")) - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let partnerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partnerName) - partnerName = partnerNameDecoded - } -} +enum DeletePartnerOutputError { -enum DeletePartnerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PartnerNotFound": return try await PartnerNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedPartnerIntegration": return try await UnauthorizedPartnerIntegrationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PartnerNotFound": return try await PartnerNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedPartnerIntegration": return try await UnauthorizedPartnerIntegrationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteRedshiftIdcApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case redshiftIdcApplicationArn = "RedshiftIdcApplicationArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let redshiftIdcApplicationArn = redshiftIdcApplicationArn { @@ -12210,24 +8969,12 @@ public struct DeleteRedshiftIdcApplicationInput: Swift.Equatable { } } -struct DeleteRedshiftIdcApplicationInputBody: Swift.Equatable { - let redshiftIdcApplicationArn: Swift.String? -} - -extension DeleteRedshiftIdcApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case redshiftIdcApplicationArn = "RedshiftIdcApplicationArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let redshiftIdcApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .redshiftIdcApplicationArn) - redshiftIdcApplicationArn = redshiftIdcApplicationArnDecoded - } -} +extension DeleteRedshiftIdcApplicationOutput { -extension DeleteRedshiftIdcApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteRedshiftIdcApplicationOutput() + } } } @@ -12236,20 +8983,31 @@ public struct DeleteRedshiftIdcApplicationOutput: Swift.Equatable { public init() { } } -enum DeleteRedshiftIdcApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceAccessDenied": return try await DependentServiceAccessDeniedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RedshiftIdcApplicationNotExists": return try await RedshiftIdcApplicationNotExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +enum DeleteRedshiftIdcApplicationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceAccessDenied": return try await DependentServiceAccessDeniedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RedshiftIdcApplicationNotExists": return try await RedshiftIdcApplicationNotExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } } } extension DeleteResourcePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -12280,24 +9038,12 @@ public struct DeleteResourcePolicyInput: Swift.Equatable { } } -struct DeleteResourcePolicyInputBody: Swift.Equatable { - let resourceArn: Swift.String? -} - -extension DeleteResourcePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - } -} +extension DeleteResourcePolicyOutput { -extension DeleteResourcePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteResourcePolicyOutput() + } } } @@ -12306,18 +9052,29 @@ public struct DeleteResourcePolicyOutput: Swift.Equatable { public init() { } } -enum DeleteResourcePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteResourcePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteScheduledActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case scheduledActionName = "ScheduledActionName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let scheduledActionName = scheduledActionName { @@ -12348,24 +9105,12 @@ public struct DeleteScheduledActionInput: Swift.Equatable { } } -struct DeleteScheduledActionInputBody: Swift.Equatable { - let scheduledActionName: Swift.String? -} - -extension DeleteScheduledActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case scheduledActionName = "ScheduledActionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - } -} +extension DeleteScheduledActionOutput { -extension DeleteScheduledActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteScheduledActionOutput() + } } } @@ -12374,18 +9119,29 @@ public struct DeleteScheduledActionOutput: Swift.Equatable { public init() { } } -enum DeleteScheduledActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ScheduledActionNotFound": return try await ScheduledActionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteScheduledActionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ScheduledActionNotFound": return try await ScheduledActionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteSnapshotCopyGrantInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case snapshotCopyGrantName = "SnapshotCopyGrantName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let snapshotCopyGrantName = snapshotCopyGrantName { @@ -12417,24 +9173,12 @@ public struct DeleteSnapshotCopyGrantInput: Swift.Equatable { } } -struct DeleteSnapshotCopyGrantInputBody: Swift.Equatable { - let snapshotCopyGrantName: Swift.String? -} - -extension DeleteSnapshotCopyGrantInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshotCopyGrantName = "SnapshotCopyGrantName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotCopyGrantNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotCopyGrantName) - snapshotCopyGrantName = snapshotCopyGrantNameDecoded - } -} +extension DeleteSnapshotCopyGrantOutput { -extension DeleteSnapshotCopyGrantOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSnapshotCopyGrantOutput() + } } } @@ -12443,18 +9187,29 @@ public struct DeleteSnapshotCopyGrantOutput: Swift.Equatable { public init() { } } -enum DeleteSnapshotCopyGrantOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidSnapshotCopyGrantStateFault": return try await InvalidSnapshotCopyGrantStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotCopyGrantNotFoundFault": return try await SnapshotCopyGrantNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteSnapshotCopyGrantOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidSnapshotCopyGrantStateFault": return try await InvalidSnapshotCopyGrantStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotCopyGrantNotFoundFault": return try await SnapshotCopyGrantNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteSnapshotScheduleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case scheduleIdentifier = "ScheduleIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let scheduleIdentifier = scheduleIdentifier { @@ -12485,24 +9240,12 @@ public struct DeleteSnapshotScheduleInput: Swift.Equatable { } } -struct DeleteSnapshotScheduleInputBody: Swift.Equatable { - let scheduleIdentifier: Swift.String? -} - -extension DeleteSnapshotScheduleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case scheduleIdentifier = "ScheduleIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleIdentifier) - scheduleIdentifier = scheduleIdentifierDecoded - } -} +extension DeleteSnapshotScheduleOutput { -extension DeleteSnapshotScheduleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSnapshotScheduleOutput() + } } } @@ -12511,18 +9254,30 @@ public struct DeleteSnapshotScheduleOutput: Swift.Equatable { public init() { } } -enum DeleteSnapshotScheduleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidClusterSnapshotScheduleState": return try await InvalidClusterSnapshotScheduleStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteSnapshotScheduleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidClusterSnapshotScheduleState": return try await InvalidClusterSnapshotScheduleStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceName = "ResourceName" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceName = resourceName { @@ -12571,65 +9326,43 @@ public struct DeleteTagsInput: Swift.Equatable { } } -struct DeleteTagsInputBody: Swift.Equatable { - let resourceName: Swift.String? - let tagKeys: [Swift.String]? -} - -extension DeleteTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceName = "ResourceName" - case tagKeys = "TagKeys" - } +extension DeleteTagsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTagsOutput() } } } -extension DeleteTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct DeleteTagsOutput: Swift.Equatable { public init() { } } -enum DeleteTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteTagsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteUsageLimitInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case usageLimitId = "UsageLimitId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let usageLimitId = usageLimitId { @@ -12660,24 +9393,12 @@ public struct DeleteUsageLimitInput: Swift.Equatable { } } -struct DeleteUsageLimitInputBody: Swift.Equatable { - let usageLimitId: Swift.String? -} - -extension DeleteUsageLimitInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case usageLimitId = "UsageLimitId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let usageLimitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageLimitId) - usageLimitId = usageLimitIdDecoded - } -} +extension DeleteUsageLimitOutput { -extension DeleteUsageLimitOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteUsageLimitOutput() + } } } @@ -12686,28 +9407,33 @@ public struct DeleteUsageLimitOutput: Swift.Equatable { public init() { } } -enum DeleteUsageLimitOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UsageLimitNotFound": return try await UsageLimitNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteUsageLimitOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UsageLimitNotFound": return try await UsageLimitNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DependentServiceAccessDeniedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DependentServiceAccessDeniedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12735,33 +9461,15 @@ public struct DependentServiceAccessDeniedFault: ClientRuntime.ModeledError, AWS } } -struct DependentServiceAccessDeniedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DependentServiceAccessDeniedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DependentServiceRequestThrottlingFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DependentServiceRequestThrottlingFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12789,33 +9497,15 @@ public struct DependentServiceRequestThrottlingFault: ClientRuntime.ModeledError } } -struct DependentServiceRequestThrottlingFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DependentServiceRequestThrottlingFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DependentServiceUnavailableFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DependentServiceUnavailableFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12843,23 +9533,11 @@ public struct DependentServiceUnavailableFault: ClientRuntime.ModeledError, AWSC } } -struct DependentServiceUnavailableFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension DependentServiceUnavailableFaultBody: Swift.Decodable { +extension DescribeAccountAttributesInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case attributeNames = "AttributeNames" } -} -extension DescribeAccountAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeNames = attributeNames { @@ -12898,47 +9576,15 @@ public struct DescribeAccountAttributesInput: Swift.Equatable { } } -struct DescribeAccountAttributesInputBody: Swift.Equatable { - let attributeNames: [Swift.String]? -} - -extension DescribeAccountAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeNames = "AttributeNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.attributeNames) { - struct KeyVal0{struct AttributeName{}} - let attributeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributeNames) - if let attributeNamesWrappedContainer = attributeNamesWrappedContainer { - let attributeNamesContainer = try attributeNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var attributeNamesBuffer:[Swift.String]? = nil - if let attributeNamesContainer = attributeNamesContainer { - attributeNamesBuffer = [Swift.String]() - for stringContainer0 in attributeNamesContainer { - attributeNamesBuffer?.append(stringContainer0) - } - } - attributeNames = attributeNamesBuffer - } else { - attributeNames = [] - } - } else { - attributeNames = nil - } - } -} +extension DescribeAccountAttributesOutput { -extension DescribeAccountAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAccountAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.accountAttributes = output.accountAttributes - } else { - self.accountAttributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAccountAttributesResult"] + var value = DescribeAccountAttributesOutput() + value.accountAttributes = try reader["AccountAttributes"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.AccountAttribute.readingClosure, memberNodeInfo: "AccountAttribute", isFlattened: false) + return value } } } @@ -12955,50 +9601,27 @@ public struct DescribeAccountAttributesOutput: Swift.Equatable { } } -struct DescribeAccountAttributesOutputBody: Swift.Equatable { - let accountAttributes: [RedshiftClientTypes.AccountAttribute]? -} +enum DescribeAccountAttributesOutputError { -extension DescribeAccountAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountAttributes = "AccountAttributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAccountAttributesResult")) - if containerValues.contains(.accountAttributes) { - struct KeyVal0{struct AccountAttribute{}} - let accountAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accountAttributes) - if let accountAttributesWrappedContainer = accountAttributesWrappedContainer { - let accountAttributesContainer = try accountAttributesWrappedContainer.decodeIfPresent([RedshiftClientTypes.AccountAttribute].self, forKey: .member) - var accountAttributesBuffer:[RedshiftClientTypes.AccountAttribute]? = nil - if let accountAttributesContainer = accountAttributesContainer { - accountAttributesBuffer = [RedshiftClientTypes.AccountAttribute]() - for structureContainer0 in accountAttributesContainer { - accountAttributesBuffer?.append(structureContainer0) - } - } - accountAttributes = accountAttributesBuffer - } else { - accountAttributes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - accountAttributes = nil } } } -enum DescribeAccountAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeAuthenticationProfilesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case authenticationProfileName = "AuthenticationProfileName" } -} -extension DescribeAuthenticationProfilesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authenticationProfileName = authenticationProfileName { @@ -13028,30 +9651,15 @@ public struct DescribeAuthenticationProfilesInput: Swift.Equatable { } } -struct DescribeAuthenticationProfilesInputBody: Swift.Equatable { - let authenticationProfileName: Swift.String? -} - -extension DescribeAuthenticationProfilesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationProfileName = "AuthenticationProfileName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let authenticationProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileName) - authenticationProfileName = authenticationProfileNameDecoded - } -} +extension DescribeAuthenticationProfilesOutput { -extension DescribeAuthenticationProfilesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeAuthenticationProfilesOutputBody = try responseDecoder.decode(responseBody: data) - self.authenticationProfiles = output.authenticationProfiles - } else { - self.authenticationProfiles = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeAuthenticationProfilesResult"] + var value = DescribeAuthenticationProfilesOutput() + value.authenticationProfiles = try reader["AuthenticationProfiles"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.AuthenticationProfile.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -13068,52 +9676,31 @@ public struct DescribeAuthenticationProfilesOutput: Swift.Equatable { } } -struct DescribeAuthenticationProfilesOutputBody: Swift.Equatable { - let authenticationProfiles: [RedshiftClientTypes.AuthenticationProfile]? -} +enum DescribeAuthenticationProfilesOutputError { -extension DescribeAuthenticationProfilesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationProfiles = "AuthenticationProfiles" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeAuthenticationProfilesResult")) - if containerValues.contains(.authenticationProfiles) { - struct KeyVal0{struct member{}} - let authenticationProfilesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .authenticationProfiles) - if let authenticationProfilesWrappedContainer = authenticationProfilesWrappedContainer { - let authenticationProfilesContainer = try authenticationProfilesWrappedContainer.decodeIfPresent([RedshiftClientTypes.AuthenticationProfile].self, forKey: .member) - var authenticationProfilesBuffer:[RedshiftClientTypes.AuthenticationProfile]? = nil - if let authenticationProfilesContainer = authenticationProfilesContainer { - authenticationProfilesBuffer = [RedshiftClientTypes.AuthenticationProfile]() - for structureContainer0 in authenticationProfilesContainer { - authenticationProfilesBuffer?.append(structureContainer0) - } - } - authenticationProfiles = authenticationProfilesBuffer - } else { - authenticationProfiles = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthenticationProfileNotFoundFault": return try await AuthenticationProfileNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidAuthenticationProfileRequestFault": return try await InvalidAuthenticationProfileRequestFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - authenticationProfiles = nil } } } -enum DescribeAuthenticationProfilesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthenticationProfileNotFoundFault": return try await AuthenticationProfileNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidAuthenticationProfileRequestFault": return try await InvalidAuthenticationProfileRequestFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClusterDbRevisionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeClusterDbRevisionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -13157,40 +9744,16 @@ public struct DescribeClusterDbRevisionsInput: Swift.Equatable { } } -struct DescribeClusterDbRevisionsInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeClusterDbRevisionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeClusterDbRevisionsOutput { -extension DescribeClusterDbRevisionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClusterDbRevisionsOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterDbRevisions = output.clusterDbRevisions - self.marker = output.marker - } else { - self.clusterDbRevisions = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClusterDbRevisionsResult"] + var value = DescribeClusterDbRevisionsOutput() + value.clusterDbRevisions = try reader["ClusterDbRevisions"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterDbRevision.readingClosure, memberNodeInfo: "ClusterDbRevision", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -13211,56 +9774,33 @@ public struct DescribeClusterDbRevisionsOutput: Swift.Equatable { } } -struct DescribeClusterDbRevisionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let clusterDbRevisions: [RedshiftClientTypes.ClusterDbRevision]? -} - -extension DescribeClusterDbRevisionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterDbRevisions = "ClusterDbRevisions" - case marker = "Marker" - } +enum DescribeClusterDbRevisionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClusterDbRevisionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.clusterDbRevisions) { - struct KeyVal0{struct ClusterDbRevision{}} - let clusterDbRevisionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterDbRevisions) - if let clusterDbRevisionsWrappedContainer = clusterDbRevisionsWrappedContainer { - let clusterDbRevisionsContainer = try clusterDbRevisionsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterDbRevision].self, forKey: .member) - var clusterDbRevisionsBuffer:[RedshiftClientTypes.ClusterDbRevision]? = nil - if let clusterDbRevisionsContainer = clusterDbRevisionsContainer { - clusterDbRevisionsBuffer = [RedshiftClientTypes.ClusterDbRevision]() - for structureContainer0 in clusterDbRevisionsContainer { - clusterDbRevisionsBuffer?.append(structureContainer0) - } - } - clusterDbRevisions = clusterDbRevisionsBuffer - } else { - clusterDbRevisions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - clusterDbRevisions = nil } } } -enum DescribeClusterDbRevisionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClusterParameterGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case parameterGroupName = "ParameterGroupName" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeClusterParameterGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -13337,82 +9877,16 @@ public struct DescribeClusterParameterGroupsInput: Swift.Equatable { } } -struct DescribeClusterParameterGroupsInputBody: Swift.Equatable { - let parameterGroupName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeClusterParameterGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case parameterGroupName = "ParameterGroupName" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeClusterParameterGroupsOutput { -extension DescribeClusterParameterGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClusterParameterGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.parameterGroups = output.parameterGroups - } else { - self.marker = nil - self.parameterGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClusterParameterGroupsResult"] + var value = DescribeClusterParameterGroupsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.parameterGroups = try reader["ParameterGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterParameterGroup.readingClosure, memberNodeInfo: "ClusterParameterGroup", isFlattened: false) + return value } } } @@ -13434,56 +9908,32 @@ public struct DescribeClusterParameterGroupsOutput: Swift.Equatable { } } -struct DescribeClusterParameterGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let parameterGroups: [RedshiftClientTypes.ClusterParameterGroup]? -} +enum DescribeClusterParameterGroupsOutputError { -extension DescribeClusterParameterGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case parameterGroups = "ParameterGroups" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClusterParameterGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.parameterGroups) { - struct KeyVal0{struct ClusterParameterGroup{}} - let parameterGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameterGroups) - if let parameterGroupsWrappedContainer = parameterGroupsWrappedContainer { - let parameterGroupsContainer = try parameterGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterParameterGroup].self, forKey: .member) - var parameterGroupsBuffer:[RedshiftClientTypes.ClusterParameterGroup]? = nil - if let parameterGroupsContainer = parameterGroupsContainer { - parameterGroupsBuffer = [RedshiftClientTypes.ClusterParameterGroup]() - for structureContainer0 in parameterGroupsContainer { - parameterGroupsBuffer?.append(structureContainer0) - } - } - parameterGroups = parameterGroupsBuffer - } else { - parameterGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - parameterGroups = nil } } } -enum DescribeClusterParameterGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClusterParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case parameterGroupName = "ParameterGroupName" + case source = "Source" } -} -extension DescribeClusterParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -13536,44 +9986,16 @@ public struct DescribeClusterParametersInput: Swift.Equatable { } } -struct DescribeClusterParametersInputBody: Swift.Equatable { - let parameterGroupName: Swift.String? - let source: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeClusterParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case parameterGroupName = "ParameterGroupName" - case source = "Source" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeClusterParametersOutput { -extension DescribeClusterParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClusterParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.parameters = output.parameters - } else { - self.marker = nil - self.parameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClusterParametersResult"] + var value = DescribeClusterParametersOutput() + value.marker = try reader["Marker"].readIfPresent() + value.parameters = try reader["Parameters"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Parameter.readingClosure, memberNodeInfo: "Parameter", isFlattened: false) + return value } } } @@ -13595,55 +10017,32 @@ public struct DescribeClusterParametersOutput: Swift.Equatable { } } -struct DescribeClusterParametersOutputBody: Swift.Equatable { - let parameters: [RedshiftClientTypes.Parameter]? - let marker: Swift.String? -} - -extension DescribeClusterParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case parameters = "Parameters" - } +enum DescribeClusterParametersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClusterParametersResult")) - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RedshiftClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RedshiftClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RedshiftClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - parameters = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeClusterParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClusterSecurityGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterSecurityGroupName = "ClusterSecurityGroupName" + case marker = "Marker" + case maxRecords = "MaxRecords" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeClusterSecurityGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterSecurityGroupName = clusterSecurityGroupName { @@ -13720,83 +10119,17 @@ public struct DescribeClusterSecurityGroupsInput: Swift.Equatable { } } -struct DescribeClusterSecurityGroupsInputBody: Swift.Equatable { - let clusterSecurityGroupName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} +extension DescribeClusterSecurityGroupsOutput { -extension DescribeClusterSecurityGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSecurityGroupName = "ClusterSecurityGroupName" - case marker = "Marker" - case maxRecords = "MaxRecords" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSecurityGroupName) - clusterSecurityGroupName = clusterSecurityGroupNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} - -extension DescribeClusterSecurityGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClusterSecurityGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterSecurityGroups = output.clusterSecurityGroups - self.marker = output.marker - } else { - self.clusterSecurityGroups = nil - self.marker = nil - } + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClusterSecurityGroupsResult"] + var value = DescribeClusterSecurityGroupsOutput() + value.clusterSecurityGroups = try reader["ClusterSecurityGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterSecurityGroup.readingClosure, memberNodeInfo: "ClusterSecurityGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value + } } } @@ -13817,56 +10150,41 @@ public struct DescribeClusterSecurityGroupsOutput: Swift.Equatable { } } -struct DescribeClusterSecurityGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let clusterSecurityGroups: [RedshiftClientTypes.ClusterSecurityGroup]? -} - -extension DescribeClusterSecurityGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSecurityGroups = "ClusterSecurityGroups" - case marker = "Marker" - } +enum DescribeClusterSecurityGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClusterSecurityGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.clusterSecurityGroups) { - struct KeyVal0{struct ClusterSecurityGroup{}} - let clusterSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterSecurityGroups) - if let clusterSecurityGroupsWrappedContainer = clusterSecurityGroupsWrappedContainer { - let clusterSecurityGroupsContainer = try clusterSecurityGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterSecurityGroup].self, forKey: .member) - var clusterSecurityGroupsBuffer:[RedshiftClientTypes.ClusterSecurityGroup]? = nil - if let clusterSecurityGroupsContainer = clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer = [RedshiftClientTypes.ClusterSecurityGroup]() - for structureContainer0 in clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer?.append(structureContainer0) - } - } - clusterSecurityGroups = clusterSecurityGroupsBuffer - } else { - clusterSecurityGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - clusterSecurityGroups = nil } } } -enum DescribeClusterSecurityGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClusterSnapshotsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterExists = "ClusterExists" + case clusterIdentifier = "ClusterIdentifier" + case endTime = "EndTime" + case marker = "Marker" + case maxRecords = "MaxRecords" + case ownerAccount = "OwnerAccount" + case snapshotArn = "SnapshotArn" + case snapshotIdentifier = "SnapshotIdentifier" + case snapshotType = "SnapshotType" + case sortingEntities = "SortingEntities" + case startTime = "StartTime" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeClusterSnapshotsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterExists = clusterExists { @@ -14016,131 +10334,16 @@ public struct DescribeClusterSnapshotsInput: Swift.Equatable { } } -struct DescribeClusterSnapshotsInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let snapshotIdentifier: Swift.String? - let snapshotArn: Swift.String? - let snapshotType: Swift.String? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let maxRecords: Swift.Int? - let marker: Swift.String? - let ownerAccount: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? - let clusterExists: Swift.Bool? - let sortingEntities: [RedshiftClientTypes.SnapshotSortingEntity]? -} - -extension DescribeClusterSnapshotsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterExists = "ClusterExists" - case clusterIdentifier = "ClusterIdentifier" - case endTime = "EndTime" - case marker = "Marker" - case maxRecords = "MaxRecords" - case ownerAccount = "OwnerAccount" - case snapshotArn = "SnapshotArn" - case snapshotIdentifier = "SnapshotIdentifier" - case snapshotType = "SnapshotType" - case sortingEntities = "SortingEntities" - case startTime = "StartTime" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let snapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotArn) - snapshotArn = snapshotArnDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let ownerAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAccount) - ownerAccount = ownerAccountDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - let clusterExistsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .clusterExists) - clusterExists = clusterExistsDecoded - if containerValues.contains(.sortingEntities) { - struct KeyVal0{struct SnapshotSortingEntity{}} - let sortingEntitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sortingEntities) - if let sortingEntitiesWrappedContainer = sortingEntitiesWrappedContainer { - let sortingEntitiesContainer = try sortingEntitiesWrappedContainer.decodeIfPresent([RedshiftClientTypes.SnapshotSortingEntity].self, forKey: .member) - var sortingEntitiesBuffer:[RedshiftClientTypes.SnapshotSortingEntity]? = nil - if let sortingEntitiesContainer = sortingEntitiesContainer { - sortingEntitiesBuffer = [RedshiftClientTypes.SnapshotSortingEntity]() - for structureContainer0 in sortingEntitiesContainer { - sortingEntitiesBuffer?.append(structureContainer0) - } - } - sortingEntities = sortingEntitiesBuffer - } else { - sortingEntities = [] - } - } else { - sortingEntities = nil - } - } -} +extension DescribeClusterSnapshotsOutput { -extension DescribeClusterSnapshotsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClusterSnapshotsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.snapshots = output.snapshots - } else { - self.marker = nil - self.snapshots = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClusterSnapshotsResult"] + var value = DescribeClusterSnapshotsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.snapshots = try reader["Snapshots"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Snapshot.readingClosure, memberNodeInfo: "Snapshot", isFlattened: false) + return value } } } @@ -14162,58 +10365,35 @@ public struct DescribeClusterSnapshotsOutput: Swift.Equatable { } } -struct DescribeClusterSnapshotsOutputBody: Swift.Equatable { - let marker: Swift.String? - let snapshots: [RedshiftClientTypes.Snapshot]? -} +enum DescribeClusterSnapshotsOutputError { -extension DescribeClusterSnapshotsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case snapshots = "Snapshots" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClusterSnapshotsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.snapshots) { - struct KeyVal0{struct Snapshot{}} - let snapshotsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshots) - if let snapshotsWrappedContainer = snapshotsWrappedContainer { - let snapshotsContainer = try snapshotsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Snapshot].self, forKey: .member) - var snapshotsBuffer:[RedshiftClientTypes.Snapshot]? = nil - if let snapshotsContainer = snapshotsContainer { - snapshotsBuffer = [RedshiftClientTypes.Snapshot]() - for structureContainer0 in snapshotsContainer { - snapshotsBuffer?.append(structureContainer0) - } - } - snapshots = snapshotsBuffer - } else { - snapshots = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - snapshots = nil } } } -enum DescribeClusterSnapshotsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClusterSubnetGroupsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterSubnetGroupName = "ClusterSubnetGroupName" + case marker = "Marker" + case maxRecords = "MaxRecords" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeClusterSubnetGroupsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterSubnetGroupName = clusterSubnetGroupName { @@ -14290,82 +10470,16 @@ public struct DescribeClusterSubnetGroupsInput: Swift.Equatable { } } -struct DescribeClusterSubnetGroupsInputBody: Swift.Equatable { - let clusterSubnetGroupName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeClusterSubnetGroupsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSubnetGroupName = "ClusterSubnetGroupName" - case marker = "Marker" - case maxRecords = "MaxRecords" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSubnetGroupName) - clusterSubnetGroupName = clusterSubnetGroupNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeClusterSubnetGroupsOutput { -extension DescribeClusterSubnetGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClusterSubnetGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterSubnetGroups = output.clusterSubnetGroups - self.marker = output.marker - } else { - self.clusterSubnetGroups = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClusterSubnetGroupsResult"] + var value = DescribeClusterSubnetGroupsOutput() + value.clusterSubnetGroups = try reader["ClusterSubnetGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterSubnetGroup.readingClosure, memberNodeInfo: "ClusterSubnetGroup", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -14387,56 +10501,31 @@ public struct DescribeClusterSubnetGroupsOutput: Swift.Equatable { } } -struct DescribeClusterSubnetGroupsOutputBody: Swift.Equatable { - let marker: Swift.String? - let clusterSubnetGroups: [RedshiftClientTypes.ClusterSubnetGroup]? -} - -extension DescribeClusterSubnetGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSubnetGroups = "ClusterSubnetGroups" - case marker = "Marker" - } +enum DescribeClusterSubnetGroupsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClusterSubnetGroupsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.clusterSubnetGroups) { - struct KeyVal0{struct ClusterSubnetGroup{}} - let clusterSubnetGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterSubnetGroups) - if let clusterSubnetGroupsWrappedContainer = clusterSubnetGroupsWrappedContainer { - let clusterSubnetGroupsContainer = try clusterSubnetGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterSubnetGroup].self, forKey: .member) - var clusterSubnetGroupsBuffer:[RedshiftClientTypes.ClusterSubnetGroup]? = nil - if let clusterSubnetGroupsContainer = clusterSubnetGroupsContainer { - clusterSubnetGroupsBuffer = [RedshiftClientTypes.ClusterSubnetGroup]() - for structureContainer0 in clusterSubnetGroupsContainer { - clusterSubnetGroupsBuffer?.append(structureContainer0) - } - } - clusterSubnetGroups = clusterSubnetGroupsBuffer - } else { - clusterSubnetGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - clusterSubnetGroups = nil } } } -enum DescribeClusterSubnetGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClusterTracksInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maintenanceTrackName = "MaintenanceTrackName" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeClusterTracksInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maintenanceTrackName = maintenanceTrackName { @@ -14480,40 +10569,16 @@ public struct DescribeClusterTracksInput: Swift.Equatable { } } -struct DescribeClusterTracksInputBody: Swift.Equatable { - let maintenanceTrackName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeClusterTracksInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maintenanceTrackName = "MaintenanceTrackName" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeClusterTracksOutput { -extension DescribeClusterTracksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClusterTracksOutputBody = try responseDecoder.decode(responseBody: data) - self.maintenanceTracks = output.maintenanceTracks - self.marker = output.marker - } else { - self.maintenanceTracks = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClusterTracksResult"] + var value = DescribeClusterTracksOutput() + value.maintenanceTracks = try reader["MaintenanceTracks"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.MaintenanceTrack.readingClosure, memberNodeInfo: "MaintenanceTrack", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -14534,56 +10599,32 @@ public struct DescribeClusterTracksOutput: Swift.Equatable { } } -struct DescribeClusterTracksOutputBody: Swift.Equatable { - let maintenanceTracks: [RedshiftClientTypes.MaintenanceTrack]? - let marker: Swift.String? -} - -extension DescribeClusterTracksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maintenanceTracks = "MaintenanceTracks" - case marker = "Marker" - } +enum DescribeClusterTracksOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClusterTracksResult")) - if containerValues.contains(.maintenanceTracks) { - struct KeyVal0{struct MaintenanceTrack{}} - let maintenanceTracksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .maintenanceTracks) - if let maintenanceTracksWrappedContainer = maintenanceTracksWrappedContainer { - let maintenanceTracksContainer = try maintenanceTracksWrappedContainer.decodeIfPresent([RedshiftClientTypes.MaintenanceTrack].self, forKey: .member) - var maintenanceTracksBuffer:[RedshiftClientTypes.MaintenanceTrack]? = nil - if let maintenanceTracksContainer = maintenanceTracksContainer { - maintenanceTracksBuffer = [RedshiftClientTypes.MaintenanceTrack]() - for structureContainer0 in maintenanceTracksContainer { - maintenanceTracksBuffer?.append(structureContainer0) - } - } - maintenanceTracks = maintenanceTracksBuffer - } else { - maintenanceTracks = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidClusterTrack": return try await InvalidClusterTrackFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - maintenanceTracks = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeClusterTracksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidClusterTrack": return try await InvalidClusterTrackFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClusterVersionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterParameterGroupFamily = "ClusterParameterGroupFamily" + case clusterVersion = "ClusterVersion" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeClusterVersionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterParameterGroupFamily = clusterParameterGroupFamily { @@ -14641,44 +10682,16 @@ public struct DescribeClusterVersionsInput: Swift.Equatable { } } -struct DescribeClusterVersionsInputBody: Swift.Equatable { - let clusterVersion: Swift.String? - let clusterParameterGroupFamily: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeClusterVersionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterParameterGroupFamily = "ClusterParameterGroupFamily" - case clusterVersion = "ClusterVersion" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let clusterParameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterParameterGroupFamily) - clusterParameterGroupFamily = clusterParameterGroupFamilyDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeClusterVersionsOutput { -extension DescribeClusterVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClusterVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterVersions = output.clusterVersions - self.marker = output.marker - } else { - self.clusterVersions = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClusterVersionsResult"] + var value = DescribeClusterVersionsOutput() + value.clusterVersions = try reader["ClusterVersions"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterVersion.readingClosure, memberNodeInfo: "ClusterVersion", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -14700,54 +10713,31 @@ public struct DescribeClusterVersionsOutput: Swift.Equatable { } } -struct DescribeClusterVersionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let clusterVersions: [RedshiftClientTypes.ClusterVersion]? -} - -extension DescribeClusterVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterVersions = "ClusterVersions" - case marker = "Marker" - } +enum DescribeClusterVersionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClusterVersionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.clusterVersions) { - struct KeyVal0{struct ClusterVersion{}} - let clusterVersionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterVersions) - if let clusterVersionsWrappedContainer = clusterVersionsWrappedContainer { - let clusterVersionsContainer = try clusterVersionsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterVersion].self, forKey: .member) - var clusterVersionsBuffer:[RedshiftClientTypes.ClusterVersion]? = nil - if let clusterVersionsContainer = clusterVersionsContainer { - clusterVersionsBuffer = [RedshiftClientTypes.ClusterVersion]() - for structureContainer0 in clusterVersionsContainer { - clusterVersionsBuffer?.append(structureContainer0) - } - } - clusterVersions = clusterVersionsBuffer - } else { - clusterVersions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - clusterVersions = nil } } } -enum DescribeClusterVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeClustersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeClustersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -14824,82 +10814,16 @@ public struct DescribeClustersInput: Swift.Equatable { } } -struct DescribeClustersInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeClustersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeClustersOutput { -extension DescribeClustersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeClustersOutputBody = try responseDecoder.decode(responseBody: data) - self.clusters = output.clusters - self.marker = output.marker - } else { - self.clusters = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeClustersResult"] + var value = DescribeClustersOutput() + value.clusters = try reader["Clusters"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Cluster.readingClosure, memberNodeInfo: "Cluster", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -14921,56 +10845,32 @@ public struct DescribeClustersOutput: Swift.Equatable { } } -struct DescribeClustersOutputBody: Swift.Equatable { - let marker: Swift.String? - let clusters: [RedshiftClientTypes.Cluster]? -} - -extension DescribeClustersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusters = "Clusters" - case marker = "Marker" - } +enum DescribeClustersOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeClustersResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.clusters) { - struct KeyVal0{struct Cluster{}} - let clustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusters) - if let clustersWrappedContainer = clustersWrappedContainer { - let clustersContainer = try clustersWrappedContainer.decodeIfPresent([RedshiftClientTypes.Cluster].self, forKey: .member) - var clustersBuffer:[RedshiftClientTypes.Cluster]? = nil - if let clustersContainer = clustersContainer { - clustersBuffer = [RedshiftClientTypes.Cluster]() - for structureContainer0 in clustersContainer { - clustersBuffer?.append(structureContainer0) - } - } - clusters = clustersBuffer - } else { - clusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - clusters = nil } } } -enum DescribeClustersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeCustomDomainAssociationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case customDomainCertificateArn = "CustomDomainCertificateArn" + case customDomainName = "CustomDomainName" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeCustomDomainAssociationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let customDomainCertificateArn = customDomainCertificateArn { @@ -15021,44 +10921,16 @@ public struct DescribeCustomDomainAssociationsInput: Swift.Equatable { } } -struct DescribeCustomDomainAssociationsInputBody: Swift.Equatable { - let customDomainName: Swift.String? - let customDomainCertificateArn: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeCustomDomainAssociationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customDomainCertificateArn = "CustomDomainCertificateArn" - case customDomainName = "CustomDomainName" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - let customDomainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertificateArn) - customDomainCertificateArn = customDomainCertificateArnDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeCustomDomainAssociationsOutput { -extension DescribeCustomDomainAssociationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeCustomDomainAssociationsOutputBody = try responseDecoder.decode(responseBody: data) - self.associations = output.associations - self.marker = output.marker - } else { - self.associations = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeCustomDomainAssociationsResult"] + var value = DescribeCustomDomainAssociationsOutput() + value.associations = try reader["Associations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Association.readingClosure, memberNodeInfo: "Association", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -15079,56 +10951,32 @@ public struct DescribeCustomDomainAssociationsOutput: Swift.Equatable { } } -struct DescribeCustomDomainAssociationsOutputBody: Swift.Equatable { - let marker: Swift.String? - let associations: [RedshiftClientTypes.Association]? -} - -extension DescribeCustomDomainAssociationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associations = "Associations" - case marker = "Marker" - } +enum DescribeCustomDomainAssociationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeCustomDomainAssociationsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.associations) { - struct KeyVal0{struct Association{}} - let associationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associations) - if let associationsWrappedContainer = associationsWrappedContainer { - let associationsContainer = try associationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Association].self, forKey: .member) - var associationsBuffer:[RedshiftClientTypes.Association]? = nil - if let associationsContainer = associationsContainer { - associationsBuffer = [RedshiftClientTypes.Association]() - for structureContainer0 in associationsContainer { - associationsBuffer?.append(structureContainer0) - } - } - associations = associationsBuffer - } else { - associations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CustomDomainAssociationNotFoundFault": return try await CustomDomainAssociationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - associations = nil } } } -enum DescribeCustomDomainAssociationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CustomDomainAssociationNotFoundFault": return try await CustomDomainAssociationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDataSharesForConsumerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case consumerArn = "ConsumerArn" + case marker = "Marker" + case maxRecords = "MaxRecords" + case status = "Status" } -} -extension DescribeDataSharesForConsumerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let consumerArn = consumerArn { @@ -15179,44 +11027,16 @@ public struct DescribeDataSharesForConsumerInput: Swift.Equatable { } } -struct DescribeDataSharesForConsumerInputBody: Swift.Equatable { - let consumerArn: Swift.String? - let status: RedshiftClientTypes.DataShareStatusForConsumer? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDataSharesForConsumerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case consumerArn = "ConsumerArn" - case marker = "Marker" - case maxRecords = "MaxRecords" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let consumerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerArn) - consumerArn = consumerArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.DataShareStatusForConsumer.self, forKey: .status) - status = statusDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDataSharesForConsumerOutput { -extension DescribeDataSharesForConsumerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDataSharesForConsumerOutputBody = try responseDecoder.decode(responseBody: data) - self.dataShares = output.dataShares - self.marker = output.marker - } else { - self.dataShares = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDataSharesForConsumerResult"] + var value = DescribeDataSharesForConsumerOutput() + value.dataShares = try reader["DataShares"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShare.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -15237,55 +11057,31 @@ public struct DescribeDataSharesForConsumerOutput: Swift.Equatable { } } -struct DescribeDataSharesForConsumerOutputBody: Swift.Equatable { - let dataShares: [RedshiftClientTypes.DataShare]? - let marker: Swift.String? -} - -extension DescribeDataSharesForConsumerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataShares = "DataShares" - case marker = "Marker" - } +enum DescribeDataSharesForConsumerOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDataSharesForConsumerResult")) - if containerValues.contains(.dataShares) { - struct KeyVal0{struct member{}} - let dataSharesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShares) - if let dataSharesWrappedContainer = dataSharesWrappedContainer { - let dataSharesContainer = try dataSharesWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShare].self, forKey: .member) - var dataSharesBuffer:[RedshiftClientTypes.DataShare]? = nil - if let dataSharesContainer = dataSharesContainer { - dataSharesBuffer = [RedshiftClientTypes.DataShare]() - for structureContainer0 in dataSharesContainer { - dataSharesBuffer?.append(structureContainer0) - } - } - dataShares = dataSharesBuffer - } else { - dataShares = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNamespaceFault": return try await InvalidNamespaceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dataShares = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDataSharesForConsumerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNamespaceFault": return try await InvalidNamespaceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDataSharesForProducerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case producerArn = "ProducerArn" + case status = "Status" } -} -extension DescribeDataSharesForProducerInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -15336,44 +11132,16 @@ public struct DescribeDataSharesForProducerInput: Swift.Equatable { } } -struct DescribeDataSharesForProducerInputBody: Swift.Equatable { - let producerArn: Swift.String? - let status: RedshiftClientTypes.DataShareStatusForProducer? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDataSharesForProducerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case producerArn = "ProducerArn" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let producerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .producerArn) - producerArn = producerArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.DataShareStatusForProducer.self, forKey: .status) - status = statusDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDataSharesForProducerOutput { -extension DescribeDataSharesForProducerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDataSharesForProducerOutputBody = try responseDecoder.decode(responseBody: data) - self.dataShares = output.dataShares - self.marker = output.marker - } else { - self.dataShares = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDataSharesForProducerResult"] + var value = DescribeDataSharesForProducerOutput() + value.dataShares = try reader["DataShares"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShare.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -15394,55 +11162,30 @@ public struct DescribeDataSharesForProducerOutput: Swift.Equatable { } } -struct DescribeDataSharesForProducerOutputBody: Swift.Equatable { - let dataShares: [RedshiftClientTypes.DataShare]? - let marker: Swift.String? -} - -extension DescribeDataSharesForProducerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataShares = "DataShares" - case marker = "Marker" - } +enum DescribeDataSharesForProducerOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDataSharesForProducerResult")) - if containerValues.contains(.dataShares) { - struct KeyVal0{struct member{}} - let dataSharesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShares) - if let dataSharesWrappedContainer = dataSharesWrappedContainer { - let dataSharesContainer = try dataSharesWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShare].self, forKey: .member) - var dataSharesBuffer:[RedshiftClientTypes.DataShare]? = nil - if let dataSharesContainer = dataSharesContainer { - dataSharesBuffer = [RedshiftClientTypes.DataShare]() - for structureContainer0 in dataSharesContainer { - dataSharesBuffer?.append(structureContainer0) - } - } - dataShares = dataSharesBuffer - } else { - dataShares = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidNamespaceFault": return try await InvalidNamespaceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dataShares = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDataSharesForProducerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidNamespaceFault": return try await InvalidNamespaceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDataSharesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dataShareArn = "DataShareArn" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeDataSharesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dataShareArn = dataShareArn { @@ -15486,40 +11229,16 @@ public struct DescribeDataSharesInput: Swift.Equatable { } } -struct DescribeDataSharesInputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDataSharesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataShareArn = "DataShareArn" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDataSharesOutput { -extension DescribeDataSharesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDataSharesOutputBody = try responseDecoder.decode(responseBody: data) - self.dataShares = output.dataShares - self.marker = output.marker - } else { - self.dataShares = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDataSharesResult"] + var value = DescribeDataSharesOutput() + value.dataShares = try reader["DataShares"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShare.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -15540,55 +11259,30 @@ public struct DescribeDataSharesOutput: Swift.Equatable { } } -struct DescribeDataSharesOutputBody: Swift.Equatable { - let dataShares: [RedshiftClientTypes.DataShare]? - let marker: Swift.String? -} - -extension DescribeDataSharesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataShares = "DataShares" - case marker = "Marker" - } +enum DescribeDataSharesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDataSharesResult")) - if containerValues.contains(.dataShares) { - struct KeyVal0{struct member{}} - let dataSharesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShares) - if let dataSharesWrappedContainer = dataSharesWrappedContainer { - let dataSharesContainer = try dataSharesWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShare].self, forKey: .member) - var dataSharesBuffer:[RedshiftClientTypes.DataShare]? = nil - if let dataSharesContainer = dataSharesContainer { - dataSharesBuffer = [RedshiftClientTypes.DataShare]() - for structureContainer0 in dataSharesContainer { - dataSharesBuffer?.append(structureContainer0) - } - } - dataShares = dataSharesBuffer - } else { - dataShares = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidDataShareFault": return try await InvalidDataShareFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dataShares = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeDataSharesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDataShareFault": return try await InvalidDataShareFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeDefaultClusterParametersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case parameterGroupFamily = "ParameterGroupFamily" } -} -extension DescribeDefaultClusterParametersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -15634,38 +11328,15 @@ public struct DescribeDefaultClusterParametersInput: Swift.Equatable { } } -struct DescribeDefaultClusterParametersInputBody: Swift.Equatable { - let parameterGroupFamily: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeDefaultClusterParametersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case parameterGroupFamily = "ParameterGroupFamily" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupFamilyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupFamily) - parameterGroupFamily = parameterGroupFamilyDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeDefaultClusterParametersOutput { -extension DescribeDefaultClusterParametersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeDefaultClusterParametersOutputBody = try responseDecoder.decode(responseBody: data) - self.defaultClusterParameters = output.defaultClusterParameters - } else { - self.defaultClusterParameters = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeDefaultClusterParametersResult"] + var value = DescribeDefaultClusterParametersOutput() + value.defaultClusterParameters = try reader["DefaultClusterParameters"].readIfPresent(readingClosure: RedshiftClientTypes.DefaultClusterParameters.readingClosure) + return value } } } @@ -15682,33 +11353,32 @@ public struct DescribeDefaultClusterParametersOutput: Swift.Equatable { } } -struct DescribeDefaultClusterParametersOutputBody: Swift.Equatable { - let defaultClusterParameters: RedshiftClientTypes.DefaultClusterParameters? -} - -extension DescribeDefaultClusterParametersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case defaultClusterParameters = "DefaultClusterParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeDefaultClusterParametersResult")) - let defaultClusterParametersDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.DefaultClusterParameters.self, forKey: .defaultClusterParameters) - defaultClusterParameters = defaultClusterParametersDecoded - } -} +enum DescribeDefaultClusterParametersOutputError { -enum DescribeDefaultClusterParametersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeEndpointAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case endpointName = "EndpointName" + case marker = "Marker" + case maxRecords = "MaxRecords" + case resourceOwner = "ResourceOwner" + case vpcId = "VpcId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -15773,52 +11443,16 @@ public struct DescribeEndpointAccessInput: Swift.Equatable { } } -struct DescribeEndpointAccessInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let resourceOwner: Swift.String? - let endpointName: Swift.String? - let vpcId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEndpointAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case endpointName = "EndpointName" - case marker = "Marker" - case maxRecords = "MaxRecords" - case resourceOwner = "ResourceOwner" - case vpcId = "VpcId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - let endpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointName) - endpointName = endpointNameDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEndpointAccessOutput { -extension DescribeEndpointAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEndpointAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.endpointAccessList = output.endpointAccessList - self.marker = output.marker - } else { - self.endpointAccessList = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEndpointAccessResult"] + var value = DescribeEndpointAccessOutput() + value.endpointAccessList = try reader["EndpointAccessList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.EndpointAccess.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -15839,57 +11473,34 @@ public struct DescribeEndpointAccessOutput: Swift.Equatable { } } -struct DescribeEndpointAccessOutputBody: Swift.Equatable { - let endpointAccessList: [RedshiftClientTypes.EndpointAccess]? - let marker: Swift.String? -} - -extension DescribeEndpointAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpointAccessList = "EndpointAccessList" - case marker = "Marker" - } +enum DescribeEndpointAccessOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEndpointAccessResult")) - if containerValues.contains(.endpointAccessList) { - struct KeyVal0{struct member{}} - let endpointAccessListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .endpointAccessList) - if let endpointAccessListWrappedContainer = endpointAccessListWrappedContainer { - let endpointAccessListContainer = try endpointAccessListWrappedContainer.decodeIfPresent([RedshiftClientTypes.EndpointAccess].self, forKey: .member) - var endpointAccessListBuffer:[RedshiftClientTypes.EndpointAccess]? = nil - if let endpointAccessListContainer = endpointAccessListContainer { - endpointAccessListBuffer = [RedshiftClientTypes.EndpointAccess]() - for structureContainer0 in endpointAccessListContainer { - endpointAccessListBuffer?.append(structureContainer0) - } - } - endpointAccessList = endpointAccessListBuffer - } else { - endpointAccessList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointNotFound": return try await EndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - endpointAccessList = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeEndpointAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointNotFound": return try await EndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEndpointAuthorizationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case account = "Account" + case clusterIdentifier = "ClusterIdentifier" + case grantee = "Grantee" + case marker = "Marker" + case maxRecords = "MaxRecords" } -} -extension DescribeEndpointAuthorizationInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let account = account { @@ -15947,48 +11558,16 @@ public struct DescribeEndpointAuthorizationInput: Swift.Equatable { } } -struct DescribeEndpointAuthorizationInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let account: Swift.String? - let grantee: Swift.Bool? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEndpointAuthorizationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case account = "Account" - case clusterIdentifier = "ClusterIdentifier" - case grantee = "Grantee" - case marker = "Marker" - case maxRecords = "MaxRecords" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - let granteeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .grantee) - grantee = granteeDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEndpointAuthorizationOutput { -extension DescribeEndpointAuthorizationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEndpointAuthorizationOutputBody = try responseDecoder.decode(responseBody: data) - self.endpointAuthorizationList = output.endpointAuthorizationList - self.marker = output.marker - } else { - self.endpointAuthorizationList = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEndpointAuthorizationResult"] + var value = DescribeEndpointAuthorizationOutput() + value.endpointAuthorizationList = try reader["EndpointAuthorizationList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.EndpointAuthorization.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -16009,56 +11588,29 @@ public struct DescribeEndpointAuthorizationOutput: Swift.Equatable { } } -struct DescribeEndpointAuthorizationOutputBody: Swift.Equatable { - let endpointAuthorizationList: [RedshiftClientTypes.EndpointAuthorization]? - let marker: Swift.String? -} - -extension DescribeEndpointAuthorizationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpointAuthorizationList = "EndpointAuthorizationList" - case marker = "Marker" - } +enum DescribeEndpointAuthorizationOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEndpointAuthorizationResult")) - if containerValues.contains(.endpointAuthorizationList) { - struct KeyVal0{struct member{}} - let endpointAuthorizationListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .endpointAuthorizationList) - if let endpointAuthorizationListWrappedContainer = endpointAuthorizationListWrappedContainer { - let endpointAuthorizationListContainer = try endpointAuthorizationListWrappedContainer.decodeIfPresent([RedshiftClientTypes.EndpointAuthorization].self, forKey: .member) - var endpointAuthorizationListBuffer:[RedshiftClientTypes.EndpointAuthorization]? = nil - if let endpointAuthorizationListContainer = endpointAuthorizationListContainer { - endpointAuthorizationListBuffer = [RedshiftClientTypes.EndpointAuthorization]() - for structureContainer0 in endpointAuthorizationListContainer { - endpointAuthorizationListBuffer?.append(structureContainer0) - } - } - endpointAuthorizationList = endpointAuthorizationListBuffer - } else { - endpointAuthorizationList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - endpointAuthorizationList = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeEndpointAuthorizationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventCategoriesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case sourceType = "SourceType" } -} -extension DescribeEventCategoriesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let sourceType = sourceType { @@ -16089,30 +11641,15 @@ public struct DescribeEventCategoriesInput: Swift.Equatable { } } -struct DescribeEventCategoriesInputBody: Swift.Equatable { - let sourceType: Swift.String? -} - -extension DescribeEventCategoriesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sourceType = "SourceType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - } -} +extension DescribeEventCategoriesOutput { -extension DescribeEventCategoriesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventCategoriesOutputBody = try responseDecoder.decode(responseBody: data) - self.eventCategoriesMapList = output.eventCategoriesMapList - } else { - self.eventCategoriesMapList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventCategoriesResult"] + var value = DescribeEventCategoriesOutput() + value.eventCategoriesMapList = try reader["EventCategoriesMapList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.EventCategoriesMap.readingClosure, memberNodeInfo: "EventCategoriesMap", isFlattened: false) + return value } } } @@ -16130,50 +11667,31 @@ public struct DescribeEventCategoriesOutput: Swift.Equatable { } } -struct DescribeEventCategoriesOutputBody: Swift.Equatable { - let eventCategoriesMapList: [RedshiftClientTypes.EventCategoriesMap]? -} +enum DescribeEventCategoriesOutputError { -extension DescribeEventCategoriesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventCategoriesMapList = "EventCategoriesMapList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventCategoriesResult")) - if containerValues.contains(.eventCategoriesMapList) { - struct KeyVal0{struct EventCategoriesMap{}} - let eventCategoriesMapListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategoriesMapList) - if let eventCategoriesMapListWrappedContainer = eventCategoriesMapListWrappedContainer { - let eventCategoriesMapListContainer = try eventCategoriesMapListWrappedContainer.decodeIfPresent([RedshiftClientTypes.EventCategoriesMap].self, forKey: .member) - var eventCategoriesMapListBuffer:[RedshiftClientTypes.EventCategoriesMap]? = nil - if let eventCategoriesMapListContainer = eventCategoriesMapListContainer { - eventCategoriesMapListBuffer = [RedshiftClientTypes.EventCategoriesMap]() - for structureContainer0 in eventCategoriesMapListContainer { - eventCategoriesMapListBuffer?.append(structureContainer0) - } - } - eventCategoriesMapList = eventCategoriesMapListBuffer - } else { - eventCategoriesMapList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventCategoriesMapList = nil } } } -enum DescribeEventCategoriesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventSubscriptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case subscriptionName = "SubscriptionName" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeEventSubscriptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -16250,82 +11768,16 @@ public struct DescribeEventSubscriptionsInput: Swift.Equatable { } } -struct DescribeEventSubscriptionsInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeEventSubscriptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case subscriptionName = "SubscriptionName" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeEventSubscriptionsOutput { -extension DescribeEventSubscriptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventSubscriptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscriptionsList = output.eventSubscriptionsList - self.marker = output.marker - } else { - self.eventSubscriptionsList = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventSubscriptionsResult"] + var value = DescribeEventSubscriptionsOutput() + value.eventSubscriptionsList = try reader["EventSubscriptionsList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.EventSubscription.readingClosure, memberNodeInfo: "EventSubscription", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -16347,56 +11799,35 @@ public struct DescribeEventSubscriptionsOutput: Swift.Equatable { } } -struct DescribeEventSubscriptionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let eventSubscriptionsList: [RedshiftClientTypes.EventSubscription]? -} - -extension DescribeEventSubscriptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscriptionsList = "EventSubscriptionsList" - case marker = "Marker" - } +enum DescribeEventSubscriptionsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventSubscriptionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.eventSubscriptionsList) { - struct KeyVal0{struct EventSubscription{}} - let eventSubscriptionsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventSubscriptionsList) - if let eventSubscriptionsListWrappedContainer = eventSubscriptionsListWrappedContainer { - let eventSubscriptionsListContainer = try eventSubscriptionsListWrappedContainer.decodeIfPresent([RedshiftClientTypes.EventSubscription].self, forKey: .member) - var eventSubscriptionsListBuffer:[RedshiftClientTypes.EventSubscription]? = nil - if let eventSubscriptionsListContainer = eventSubscriptionsListContainer { - eventSubscriptionsListBuffer = [RedshiftClientTypes.EventSubscription]() - for structureContainer0 in eventSubscriptionsListContainer { - eventSubscriptionsListBuffer?.append(structureContainer0) - } - } - eventSubscriptionsList = eventSubscriptionsListBuffer - } else { - eventSubscriptionsList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventSubscriptionsList = nil } } } -enum DescribeEventSubscriptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeEventsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case duration = "Duration" + case endTime = "EndTime" + case marker = "Marker" + case maxRecords = "MaxRecords" + case sourceIdentifier = "SourceIdentifier" + case sourceType = "SourceType" + case startTime = "StartTime" } -} -extension DescribeEventsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let duration = duration { @@ -16485,56 +11916,16 @@ public struct DescribeEventsInput: Swift.Equatable { } } -struct DescribeEventsInputBody: Swift.Equatable { - let sourceIdentifier: Swift.String? - let sourceType: RedshiftClientTypes.SourceType? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let duration: Swift.Int? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeEventsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case duration = "Duration" - case endTime = "EndTime" - case marker = "Marker" - case maxRecords = "MaxRecords" - case sourceIdentifier = "SourceIdentifier" - case sourceType = "SourceType" - case startTime = "StartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeEventsOutput { -extension DescribeEventsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeEventsOutputBody = try responseDecoder.decode(responseBody: data) - self.events = output.events - self.marker = output.marker - } else { - self.events = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeEventsResult"] + var value = DescribeEventsOutput() + value.events = try reader["Events"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Event.readingClosure, memberNodeInfo: "Event", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -16556,54 +11947,31 @@ public struct DescribeEventsOutput: Swift.Equatable { } } -struct DescribeEventsOutputBody: Swift.Equatable { - let marker: Swift.String? - let events: [RedshiftClientTypes.Event]? -} - -extension DescribeEventsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Events" - case marker = "Marker" - } +enum DescribeEventsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeEventsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.events) { - struct KeyVal0{struct Event{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Event].self, forKey: .member) - var eventsBuffer:[RedshiftClientTypes.Event]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [RedshiftClientTypes.Event]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - events = nil } } } -enum DescribeEventsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeHsmClientCertificatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeHsmClientCertificatesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let hsmClientCertificateIdentifier = hsmClientCertificateIdentifier { @@ -16680,82 +12048,16 @@ public struct DescribeHsmClientCertificatesInput: Swift.Equatable { } } -struct DescribeHsmClientCertificatesInputBody: Swift.Equatable { - let hsmClientCertificateIdentifier: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeHsmClientCertificatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmClientCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificateIdentifier) - hsmClientCertificateIdentifier = hsmClientCertificateIdentifierDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeHsmClientCertificatesOutput { -extension DescribeHsmClientCertificatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeHsmClientCertificatesOutputBody = try responseDecoder.decode(responseBody: data) - self.hsmClientCertificates = output.hsmClientCertificates - self.marker = output.marker - } else { - self.hsmClientCertificates = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeHsmClientCertificatesResult"] + var value = DescribeHsmClientCertificatesOutput() + value.hsmClientCertificates = try reader["HsmClientCertificates"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.HsmClientCertificate.readingClosure, memberNodeInfo: "HsmClientCertificate", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -16777,56 +12079,33 @@ public struct DescribeHsmClientCertificatesOutput: Swift.Equatable { } } -struct DescribeHsmClientCertificatesOutputBody: Swift.Equatable { - let marker: Swift.String? - let hsmClientCertificates: [RedshiftClientTypes.HsmClientCertificate]? -} - -extension DescribeHsmClientCertificatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmClientCertificates = "HsmClientCertificates" - case marker = "Marker" - } +enum DescribeHsmClientCertificatesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeHsmClientCertificatesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.hsmClientCertificates) { - struct KeyVal0{struct HsmClientCertificate{}} - let hsmClientCertificatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hsmClientCertificates) - if let hsmClientCertificatesWrappedContainer = hsmClientCertificatesWrappedContainer { - let hsmClientCertificatesContainer = try hsmClientCertificatesWrappedContainer.decodeIfPresent([RedshiftClientTypes.HsmClientCertificate].self, forKey: .member) - var hsmClientCertificatesBuffer:[RedshiftClientTypes.HsmClientCertificate]? = nil - if let hsmClientCertificatesContainer = hsmClientCertificatesContainer { - hsmClientCertificatesBuffer = [RedshiftClientTypes.HsmClientCertificate]() - for structureContainer0 in hsmClientCertificatesContainer { - hsmClientCertificatesBuffer?.append(structureContainer0) - } - } - hsmClientCertificates = hsmClientCertificatesBuffer - } else { - hsmClientCertificates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - hsmClientCertificates = nil } } } -enum DescribeHsmClientCertificatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeHsmConfigurationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeHsmConfigurationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let hsmConfigurationIdentifier = hsmConfigurationIdentifier { @@ -16903,82 +12182,16 @@ public struct DescribeHsmConfigurationsInput: Swift.Equatable { } } -struct DescribeHsmConfigurationsInputBody: Swift.Equatable { - let hsmConfigurationIdentifier: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeHsmConfigurationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmConfigurationIdentifier) - hsmConfigurationIdentifier = hsmConfigurationIdentifierDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeHsmConfigurationsOutput { -extension DescribeHsmConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeHsmConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.hsmConfigurations = output.hsmConfigurations - self.marker = output.marker - } else { - self.hsmConfigurations = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeHsmConfigurationsResult"] + var value = DescribeHsmConfigurationsOutput() + value.hsmConfigurations = try reader["HsmConfigurations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.HsmConfiguration.readingClosure, memberNodeInfo: "HsmConfiguration", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -17000,56 +12213,32 @@ public struct DescribeHsmConfigurationsOutput: Swift.Equatable { } } -struct DescribeHsmConfigurationsOutputBody: Swift.Equatable { - let marker: Swift.String? - let hsmConfigurations: [RedshiftClientTypes.HsmConfiguration]? -} - -extension DescribeHsmConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hsmConfigurations = "HsmConfigurations" - case marker = "Marker" - } +enum DescribeHsmConfigurationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeHsmConfigurationsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.hsmConfigurations) { - struct KeyVal0{struct HsmConfiguration{}} - let hsmConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hsmConfigurations) - if let hsmConfigurationsWrappedContainer = hsmConfigurationsWrappedContainer { - let hsmConfigurationsContainer = try hsmConfigurationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.HsmConfiguration].self, forKey: .member) - var hsmConfigurationsBuffer:[RedshiftClientTypes.HsmConfiguration]? = nil - if let hsmConfigurationsContainer = hsmConfigurationsContainer { - hsmConfigurationsBuffer = [RedshiftClientTypes.HsmConfiguration]() - for structureContainer0 in hsmConfigurationsContainer { - hsmConfigurationsBuffer?.append(structureContainer0) - } - } - hsmConfigurations = hsmConfigurationsBuffer - } else { - hsmConfigurations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - hsmConfigurations = nil - } - } -} - -enum DescribeHsmConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DescribeInboundIntegrationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case integrationArn = "IntegrationArn" + case marker = "Marker" + case maxRecords = "MaxRecords" + case targetArn = "TargetArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let integrationArn = integrationArn { @@ -17100,44 +12289,16 @@ public struct DescribeInboundIntegrationsInput: Swift.Equatable { } } -struct DescribeInboundIntegrationsInputBody: Swift.Equatable { - let integrationArn: Swift.String? - let targetArn: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeInboundIntegrationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case integrationArn = "IntegrationArn" - case marker = "Marker" - case maxRecords = "MaxRecords" - case targetArn = "TargetArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let integrationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationArn) - integrationArn = integrationArnDecoded - let targetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetArn) - targetArn = targetArnDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeInboundIntegrationsOutput { -extension DescribeInboundIntegrationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeInboundIntegrationsOutputBody = try responseDecoder.decode(responseBody: data) - self.inboundIntegrations = output.inboundIntegrations - self.marker = output.marker - } else { - self.inboundIntegrations = nil - self.marker = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeInboundIntegrationsResult"] + var value = DescribeInboundIntegrationsOutput() + value.inboundIntegrations = try reader["InboundIntegrations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.InboundIntegration.readingClosure, memberNodeInfo: "InboundIntegration", isFlattened: false) + value.marker = try reader["Marker"].readIfPresent() + return value } } } @@ -17158,57 +12319,30 @@ public struct DescribeInboundIntegrationsOutput: Swift.Equatable { } } -struct DescribeInboundIntegrationsOutputBody: Swift.Equatable { - let marker: Swift.String? - let inboundIntegrations: [RedshiftClientTypes.InboundIntegration]? -} - -extension DescribeInboundIntegrationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case inboundIntegrations = "InboundIntegrations" - case marker = "Marker" - } +enum DescribeInboundIntegrationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeInboundIntegrationsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.inboundIntegrations) { - struct KeyVal0{struct InboundIntegration{}} - let inboundIntegrationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .inboundIntegrations) - if let inboundIntegrationsWrappedContainer = inboundIntegrationsWrappedContainer { - let inboundIntegrationsContainer = try inboundIntegrationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.InboundIntegration].self, forKey: .member) - var inboundIntegrationsBuffer:[RedshiftClientTypes.InboundIntegration]? = nil - if let inboundIntegrationsContainer = inboundIntegrationsContainer { - inboundIntegrationsBuffer = [RedshiftClientTypes.InboundIntegration]() - for structureContainer0 in inboundIntegrationsContainer { - inboundIntegrationsBuffer?.append(structureContainer0) - } - } - inboundIntegrations = inboundIntegrationsBuffer - } else { - inboundIntegrations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidNamespaceFault": return try await InvalidNamespaceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - inboundIntegrations = nil } } } -enum DescribeInboundIntegrationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "IntegrationNotFoundFault": return try await IntegrationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidNamespaceFault": return try await InvalidNamespaceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeLoggingStatusInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" } -} -extension DescribeLoggingStatusInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -17240,44 +12374,22 @@ public struct DescribeLoggingStatusInput: Swift.Equatable { } } -struct DescribeLoggingStatusInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension DescribeLoggingStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} +extension DescribeLoggingStatusOutput { -extension DescribeLoggingStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeLoggingStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.bucketName = output.bucketName - self.lastFailureMessage = output.lastFailureMessage - self.lastFailureTime = output.lastFailureTime - self.lastSuccessfulDeliveryTime = output.lastSuccessfulDeliveryTime - self.logDestinationType = output.logDestinationType - self.logExports = output.logExports - self.loggingEnabled = output.loggingEnabled - self.s3KeyPrefix = output.s3KeyPrefix - } else { - self.bucketName = nil - self.lastFailureMessage = nil - self.lastFailureTime = nil - self.lastSuccessfulDeliveryTime = nil - self.logDestinationType = nil - self.logExports = nil - self.loggingEnabled = nil - self.s3KeyPrefix = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeLoggingStatusResult"] + var value = DescribeLoggingStatusOutput() + value.bucketName = try reader["BucketName"].readIfPresent() + value.lastFailureMessage = try reader["LastFailureMessage"].readIfPresent() + value.lastFailureTime = try reader["LastFailureTime"].readTimestampIfPresent(format: .dateTime) + value.lastSuccessfulDeliveryTime = try reader["LastSuccessfulDeliveryTime"].readTimestampIfPresent(format: .dateTime) + value.logDestinationType = try reader["LogDestinationType"].readIfPresent() + value.logExports = try reader["LogExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.loggingEnabled = try reader["LoggingEnabled"].readIfPresent() + value.s3KeyPrefix = try reader["S3KeyPrefix"].readIfPresent() + return value } } } @@ -17323,80 +12435,36 @@ public struct DescribeLoggingStatusOutput: Swift.Equatable { } } -struct DescribeLoggingStatusOutputBody: Swift.Equatable { - let loggingEnabled: Swift.Bool? - let bucketName: Swift.String? - let s3KeyPrefix: Swift.String? - let lastSuccessfulDeliveryTime: ClientRuntime.Date? - let lastFailureTime: ClientRuntime.Date? - let lastFailureMessage: Swift.String? - let logDestinationType: RedshiftClientTypes.LogDestinationType? - let logExports: [Swift.String]? -} - -extension DescribeLoggingStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketName = "BucketName" - case lastFailureMessage = "LastFailureMessage" - case lastFailureTime = "LastFailureTime" - case lastSuccessfulDeliveryTime = "LastSuccessfulDeliveryTime" - case logDestinationType = "LogDestinationType" - case logExports = "LogExports" - case loggingEnabled = "LoggingEnabled" - case s3KeyPrefix = "S3KeyPrefix" - } +enum DescribeLoggingStatusOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeLoggingStatusResult")) - let loggingEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .loggingEnabled) - loggingEnabled = loggingEnabledDecoded - let bucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketName) - bucketName = bucketNameDecoded - let s3KeyPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3KeyPrefix) - s3KeyPrefix = s3KeyPrefixDecoded - let lastSuccessfulDeliveryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastSuccessfulDeliveryTime) - lastSuccessfulDeliveryTime = lastSuccessfulDeliveryTimeDecoded - let lastFailureTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastFailureTime) - lastFailureTime = lastFailureTimeDecoded - let lastFailureMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastFailureMessage) - lastFailureMessage = lastFailureMessageDecoded - let logDestinationTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.LogDestinationType.self, forKey: .logDestinationType) - logDestinationType = logDestinationTypeDecoded - if containerValues.contains(.logExports) { - struct KeyVal0{struct member{}} - let logExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logExports) - if let logExportsWrappedContainer = logExportsWrappedContainer { - let logExportsContainer = try logExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logExportsBuffer:[Swift.String]? = nil - if let logExportsContainer = logExportsContainer { - logExportsBuffer = [Swift.String]() - for stringContainer0 in logExportsContainer { - logExportsBuffer?.append(stringContainer0) - } - } - logExports = logExportsBuffer - } else { - logExports = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - logExports = nil } } } -enum DescribeLoggingStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeNodeConfigurationOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actionType = "ActionType" + case clusterIdentifier = "ClusterIdentifier" + case filters = "Filter" + case marker = "Marker" + case maxRecords = "MaxRecords" + case ownerAccount = "OwnerAccount" + case snapshotArn = "SnapshotArn" + case snapshotIdentifier = "SnapshotIdentifier" } -} -extension DescribeNodeConfigurationOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actionType = actionType { @@ -17485,77 +12553,16 @@ public struct DescribeNodeConfigurationOptionsInput: Swift.Equatable { } } -struct DescribeNodeConfigurationOptionsInputBody: Swift.Equatable { - let actionType: RedshiftClientTypes.ActionType? - let clusterIdentifier: Swift.String? - let snapshotIdentifier: Swift.String? - let snapshotArn: Swift.String? - let ownerAccount: Swift.String? - let filters: [RedshiftClientTypes.NodeConfigurationOptionsFilter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeNodeConfigurationOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionType = "ActionType" - case clusterIdentifier = "ClusterIdentifier" - case filters = "Filter" - case marker = "Marker" - case maxRecords = "MaxRecords" - case ownerAccount = "OwnerAccount" - case snapshotArn = "SnapshotArn" - case snapshotIdentifier = "SnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ActionType.self, forKey: .actionType) - actionType = actionTypeDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let snapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotArn) - snapshotArn = snapshotArnDecoded - let ownerAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAccount) - ownerAccount = ownerAccountDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct NodeConfigurationOptionsFilter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RedshiftClientTypes.NodeConfigurationOptionsFilter].self, forKey: .member) - var filtersBuffer:[RedshiftClientTypes.NodeConfigurationOptionsFilter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RedshiftClientTypes.NodeConfigurationOptionsFilter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribeNodeConfigurationOptionsOutput { -extension DescribeNodeConfigurationOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeNodeConfigurationOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.nodeConfigurationOptionList = output.nodeConfigurationOptionList - } else { - self.marker = nil - self.nodeConfigurationOptionList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeNodeConfigurationOptionsResult"] + var value = DescribeNodeConfigurationOptionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.nodeConfigurationOptionList = try reader["NodeConfigurationOptionList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.NodeConfigurationOption.readingClosure, memberNodeInfo: "NodeConfigurationOption", isFlattened: false) + return value } } } @@ -17576,59 +12583,35 @@ public struct DescribeNodeConfigurationOptionsOutput: Swift.Equatable { } } -struct DescribeNodeConfigurationOptionsOutputBody: Swift.Equatable { - let nodeConfigurationOptionList: [RedshiftClientTypes.NodeConfigurationOption]? - let marker: Swift.String? -} +enum DescribeNodeConfigurationOptionsOutputError { -extension DescribeNodeConfigurationOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case nodeConfigurationOptionList = "NodeConfigurationOptionList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeNodeConfigurationOptionsResult")) - if containerValues.contains(.nodeConfigurationOptionList) { - struct KeyVal0{struct NodeConfigurationOption{}} - let nodeConfigurationOptionListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nodeConfigurationOptionList) - if let nodeConfigurationOptionListWrappedContainer = nodeConfigurationOptionListWrappedContainer { - let nodeConfigurationOptionListContainer = try nodeConfigurationOptionListWrappedContainer.decodeIfPresent([RedshiftClientTypes.NodeConfigurationOption].self, forKey: .member) - var nodeConfigurationOptionListBuffer:[RedshiftClientTypes.NodeConfigurationOption]? = nil - if let nodeConfigurationOptionListContainer = nodeConfigurationOptionListContainer { - nodeConfigurationOptionListBuffer = [RedshiftClientTypes.NodeConfigurationOption]() - for structureContainer0 in nodeConfigurationOptionListContainer { - nodeConfigurationOptionListBuffer?.append(structureContainer0) - } - } - nodeConfigurationOptionList = nodeConfigurationOptionListBuffer - } else { - nodeConfigurationOptionList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AccessToSnapshotDenied": return try await AccessToSnapshotDeniedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - nodeConfigurationOptionList = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeNodeConfigurationOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessToSnapshotDenied": return try await AccessToSnapshotDeniedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeOrderableClusterOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterVersion = "ClusterVersion" + case marker = "Marker" + case maxRecords = "MaxRecords" + case nodeType = "NodeType" } -} -extension DescribeOrderableClusterOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterVersion = clusterVersion { @@ -17680,44 +12663,16 @@ public struct DescribeOrderableClusterOptionsInput: Swift.Equatable { } } -struct DescribeOrderableClusterOptionsInputBody: Swift.Equatable { - let clusterVersion: Swift.String? - let nodeType: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeOrderableClusterOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterVersion = "ClusterVersion" - case marker = "Marker" - case maxRecords = "MaxRecords" - case nodeType = "NodeType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeOrderableClusterOptionsOutput { -extension DescribeOrderableClusterOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeOrderableClusterOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.orderableClusterOptions = output.orderableClusterOptions - } else { - self.marker = nil - self.orderableClusterOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeOrderableClusterOptionsResult"] + var value = DescribeOrderableClusterOptionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.orderableClusterOptions = try reader["OrderableClusterOptions"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.OrderableClusterOption.readingClosure, memberNodeInfo: "OrderableClusterOption", isFlattened: false) + return value } } } @@ -17739,54 +12694,30 @@ public struct DescribeOrderableClusterOptionsOutput: Swift.Equatable { } } -struct DescribeOrderableClusterOptionsOutputBody: Swift.Equatable { - let orderableClusterOptions: [RedshiftClientTypes.OrderableClusterOption]? - let marker: Swift.String? -} +enum DescribeOrderableClusterOptionsOutputError { -extension DescribeOrderableClusterOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case orderableClusterOptions = "OrderableClusterOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeOrderableClusterOptionsResult")) - if containerValues.contains(.orderableClusterOptions) { - struct KeyVal0{struct OrderableClusterOption{}} - let orderableClusterOptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .orderableClusterOptions) - if let orderableClusterOptionsWrappedContainer = orderableClusterOptionsWrappedContainer { - let orderableClusterOptionsContainer = try orderableClusterOptionsWrappedContainer.decodeIfPresent([RedshiftClientTypes.OrderableClusterOption].self, forKey: .member) - var orderableClusterOptionsBuffer:[RedshiftClientTypes.OrderableClusterOption]? = nil - if let orderableClusterOptionsContainer = orderableClusterOptionsContainer { - orderableClusterOptionsBuffer = [RedshiftClientTypes.OrderableClusterOption]() - for structureContainer0 in orderableClusterOptionsContainer { - orderableClusterOptionsBuffer?.append(structureContainer0) - } - } - orderableClusterOptions = orderableClusterOptionsBuffer - } else { - orderableClusterOptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - orderableClusterOptions = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeOrderableClusterOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribePartnersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accountId = "AccountId" + case clusterIdentifier = "ClusterIdentifier" + case databaseName = "DatabaseName" + case partnerName = "PartnerName" } -} -extension DescribePartnersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accountId = accountId { @@ -17839,42 +12770,15 @@ public struct DescribePartnersInput: Swift.Equatable { } } -struct DescribePartnersInputBody: Swift.Equatable { - let accountId: Swift.String? - let clusterIdentifier: Swift.String? - let databaseName: Swift.String? - let partnerName: Swift.String? -} - -extension DescribePartnersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "AccountId" - case clusterIdentifier = "ClusterIdentifier" - case databaseName = "DatabaseName" - case partnerName = "PartnerName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let partnerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partnerName) - partnerName = partnerNameDecoded - } -} +extension DescribePartnersOutput { -extension DescribePartnersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribePartnersOutputBody = try responseDecoder.decode(responseBody: data) - self.partnerIntegrationInfoList = output.partnerIntegrationInfoList - } else { - self.partnerIntegrationInfoList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribePartnersResult"] + var value = DescribePartnersOutput() + value.partnerIntegrationInfoList = try reader["PartnerIntegrationInfoList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.PartnerIntegrationInfo.readingClosure, memberNodeInfo: "PartnerIntegrationInfo", isFlattened: false) + return value } } } @@ -17891,53 +12795,32 @@ public struct DescribePartnersOutput: Swift.Equatable { } } -struct DescribePartnersOutputBody: Swift.Equatable { - let partnerIntegrationInfoList: [RedshiftClientTypes.PartnerIntegrationInfo]? -} +enum DescribePartnersOutputError { -extension DescribePartnersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case partnerIntegrationInfoList = "PartnerIntegrationInfoList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribePartnersResult")) - if containerValues.contains(.partnerIntegrationInfoList) { - struct KeyVal0{struct PartnerIntegrationInfo{}} - let partnerIntegrationInfoListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .partnerIntegrationInfoList) - if let partnerIntegrationInfoListWrappedContainer = partnerIntegrationInfoListWrappedContainer { - let partnerIntegrationInfoListContainer = try partnerIntegrationInfoListWrappedContainer.decodeIfPresent([RedshiftClientTypes.PartnerIntegrationInfo].self, forKey: .member) - var partnerIntegrationInfoListBuffer:[RedshiftClientTypes.PartnerIntegrationInfo]? = nil - if let partnerIntegrationInfoListContainer = partnerIntegrationInfoListContainer { - partnerIntegrationInfoListBuffer = [RedshiftClientTypes.PartnerIntegrationInfo]() - for structureContainer0 in partnerIntegrationInfoListContainer { - partnerIntegrationInfoListBuffer?.append(structureContainer0) - } - } - partnerIntegrationInfoList = partnerIntegrationInfoListBuffer - } else { - partnerIntegrationInfoList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedPartnerIntegration": return try await UnauthorizedPartnerIntegrationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - partnerIntegrationInfoList = nil } } } -enum DescribePartnersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedPartnerIntegration": return try await UnauthorizedPartnerIntegrationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeRedshiftIdcApplicationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case redshiftIdcApplicationArn = "RedshiftIdcApplicationArn" } -} -extension DescribeRedshiftIdcApplicationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -17981,40 +12864,16 @@ public struct DescribeRedshiftIdcApplicationsInput: Swift.Equatable { } } -struct DescribeRedshiftIdcApplicationsInputBody: Swift.Equatable { - let redshiftIdcApplicationArn: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeRedshiftIdcApplicationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case redshiftIdcApplicationArn = "RedshiftIdcApplicationArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let redshiftIdcApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .redshiftIdcApplicationArn) - redshiftIdcApplicationArn = redshiftIdcApplicationArnDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeRedshiftIdcApplicationsOutput { -extension DescribeRedshiftIdcApplicationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeRedshiftIdcApplicationsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.redshiftIdcApplications = output.redshiftIdcApplications - } else { - self.marker = nil - self.redshiftIdcApplications = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeRedshiftIdcApplicationsResult"] + var value = DescribeRedshiftIdcApplicationsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.redshiftIdcApplications = try reader["RedshiftIdcApplications"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.RedshiftIdcApplication.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -18035,58 +12894,34 @@ public struct DescribeRedshiftIdcApplicationsOutput: Swift.Equatable { } } -struct DescribeRedshiftIdcApplicationsOutputBody: Swift.Equatable { - let redshiftIdcApplications: [RedshiftClientTypes.RedshiftIdcApplication]? - let marker: Swift.String? -} +enum DescribeRedshiftIdcApplicationsOutputError { -extension DescribeRedshiftIdcApplicationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case redshiftIdcApplications = "RedshiftIdcApplications" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeRedshiftIdcApplicationsResult")) - if containerValues.contains(.redshiftIdcApplications) { - struct KeyVal0{struct member{}} - let redshiftIdcApplicationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .redshiftIdcApplications) - if let redshiftIdcApplicationsWrappedContainer = redshiftIdcApplicationsWrappedContainer { - let redshiftIdcApplicationsContainer = try redshiftIdcApplicationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.RedshiftIdcApplication].self, forKey: .member) - var redshiftIdcApplicationsBuffer:[RedshiftClientTypes.RedshiftIdcApplication]? = nil - if let redshiftIdcApplicationsContainer = redshiftIdcApplicationsContainer { - redshiftIdcApplicationsBuffer = [RedshiftClientTypes.RedshiftIdcApplication]() - for structureContainer0 in redshiftIdcApplicationsContainer { - redshiftIdcApplicationsBuffer?.append(structureContainer0) - } - } - redshiftIdcApplications = redshiftIdcApplicationsBuffer - } else { - redshiftIdcApplications = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceAccessDenied": return try await DependentServiceAccessDeniedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RedshiftIdcApplicationNotExists": return try await RedshiftIdcApplicationNotExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - redshiftIdcApplications = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeRedshiftIdcApplicationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceAccessDenied": return try await DependentServiceAccessDeniedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RedshiftIdcApplicationNotExists": return try await RedshiftIdcApplicationNotExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeReservedNodeExchangeStatusInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case reservedNodeExchangeRequestId = "ReservedNodeExchangeRequestId" + case reservedNodeId = "ReservedNodeId" } -} -extension DescribeReservedNodeExchangeStatusInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -18137,44 +12972,16 @@ public struct DescribeReservedNodeExchangeStatusInput: Swift.Equatable { } } -struct DescribeReservedNodeExchangeStatusInputBody: Swift.Equatable { - let reservedNodeId: Swift.String? - let reservedNodeExchangeRequestId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeReservedNodeExchangeStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case reservedNodeExchangeRequestId = "ReservedNodeExchangeRequestId" - case reservedNodeId = "ReservedNodeId" - } +extension DescribeReservedNodeExchangeStatusOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeId) - reservedNodeId = reservedNodeIdDecoded - let reservedNodeExchangeRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeExchangeRequestId) - reservedNodeExchangeRequestId = reservedNodeExchangeRequestIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -extension DescribeReservedNodeExchangeStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedNodeExchangeStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedNodeExchangeStatusDetails = output.reservedNodeExchangeStatusDetails - } else { - self.marker = nil - self.reservedNodeExchangeStatusDetails = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReservedNodeExchangeStatusResult"] + var value = DescribeReservedNodeExchangeStatusOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedNodeExchangeStatusDetails = try reader["ReservedNodeExchangeStatusDetails"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ReservedNodeExchangeStatus.readingClosure, memberNodeInfo: "ReservedNodeExchangeStatus", isFlattened: false) + return value } } } @@ -18195,57 +13002,32 @@ public struct DescribeReservedNodeExchangeStatusOutput: Swift.Equatable { } } -struct DescribeReservedNodeExchangeStatusOutputBody: Swift.Equatable { - let reservedNodeExchangeStatusDetails: [RedshiftClientTypes.ReservedNodeExchangeStatus]? - let marker: Swift.String? -} +enum DescribeReservedNodeExchangeStatusOutputError { -extension DescribeReservedNodeExchangeStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedNodeExchangeStatusDetails = "ReservedNodeExchangeStatusDetails" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReservedNodeExchangeStatusResult")) - if containerValues.contains(.reservedNodeExchangeStatusDetails) { - struct KeyVal0{struct ReservedNodeExchangeStatus{}} - let reservedNodeExchangeStatusDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedNodeExchangeStatusDetails) - if let reservedNodeExchangeStatusDetailsWrappedContainer = reservedNodeExchangeStatusDetailsWrappedContainer { - let reservedNodeExchangeStatusDetailsContainer = try reservedNodeExchangeStatusDetailsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ReservedNodeExchangeStatus].self, forKey: .member) - var reservedNodeExchangeStatusDetailsBuffer:[RedshiftClientTypes.ReservedNodeExchangeStatus]? = nil - if let reservedNodeExchangeStatusDetailsContainer = reservedNodeExchangeStatusDetailsContainer { - reservedNodeExchangeStatusDetailsBuffer = [RedshiftClientTypes.ReservedNodeExchangeStatus]() - for structureContainer0 in reservedNodeExchangeStatusDetailsContainer { - reservedNodeExchangeStatusDetailsBuffer?.append(structureContainer0) - } - } - reservedNodeExchangeStatusDetails = reservedNodeExchangeStatusDetailsBuffer - } else { - reservedNodeExchangeStatusDetails = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ReservedNodeExchangeNotFond": return try await ReservedNodeExchangeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedNodeExchangeStatusDetails = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeReservedNodeExchangeStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ReservedNodeExchangeNotFond": return try await ReservedNodeExchangeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeReservedNodeOfferingsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case reservedNodeOfferingId = "ReservedNodeOfferingId" } -} -extension DescribeReservedNodeOfferingsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -18290,40 +13072,16 @@ public struct DescribeReservedNodeOfferingsInput: Swift.Equatable { } } -struct DescribeReservedNodeOfferingsInputBody: Swift.Equatable { - let reservedNodeOfferingId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeReservedNodeOfferingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case reservedNodeOfferingId = "ReservedNodeOfferingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeOfferingId) - reservedNodeOfferingId = reservedNodeOfferingIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeReservedNodeOfferingsOutput { -extension DescribeReservedNodeOfferingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedNodeOfferingsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedNodeOfferings = output.reservedNodeOfferings - } else { - self.marker = nil - self.reservedNodeOfferings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReservedNodeOfferingsResult"] + var value = DescribeReservedNodeOfferingsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedNodeOfferings = try reader["ReservedNodeOfferings"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ReservedNodeOffering.readingClosure, memberNodeInfo: "ReservedNodeOffering", isFlattened: false) + return value } } } @@ -18345,57 +13103,32 @@ public struct DescribeReservedNodeOfferingsOutput: Swift.Equatable { } } -struct DescribeReservedNodeOfferingsOutputBody: Swift.Equatable { - let marker: Swift.String? - let reservedNodeOfferings: [RedshiftClientTypes.ReservedNodeOffering]? -} +enum DescribeReservedNodeOfferingsOutputError { -extension DescribeReservedNodeOfferingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedNodeOfferings = "ReservedNodeOfferings" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReservedNodeOfferingsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.reservedNodeOfferings) { - struct KeyVal0{struct ReservedNodeOffering{}} - let reservedNodeOfferingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedNodeOfferings) - if let reservedNodeOfferingsWrappedContainer = reservedNodeOfferingsWrappedContainer { - let reservedNodeOfferingsContainer = try reservedNodeOfferingsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ReservedNodeOffering].self, forKey: .member) - var reservedNodeOfferingsBuffer:[RedshiftClientTypes.ReservedNodeOffering]? = nil - if let reservedNodeOfferingsContainer = reservedNodeOfferingsContainer { - reservedNodeOfferingsBuffer = [RedshiftClientTypes.ReservedNodeOffering]() - for structureContainer0 in reservedNodeOfferingsContainer { - reservedNodeOfferingsBuffer?.append(structureContainer0) - } - } - reservedNodeOfferings = reservedNodeOfferingsBuffer - } else { - reservedNodeOfferings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedNodeOfferings = nil } } } -enum DescribeReservedNodeOfferingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeReservedNodesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case reservedNodeId = "ReservedNodeId" } -} -extension DescribeReservedNodesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -18440,40 +13173,16 @@ public struct DescribeReservedNodesInput: Swift.Equatable { } } -struct DescribeReservedNodesInputBody: Swift.Equatable { - let reservedNodeId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeReservedNodesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case reservedNodeId = "ReservedNodeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeId) - reservedNodeId = reservedNodeIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeReservedNodesOutput { -extension DescribeReservedNodesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReservedNodesOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedNodes = output.reservedNodes - } else { - self.marker = nil - self.reservedNodes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReservedNodesResult"] + var value = DescribeReservedNodesOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedNodes = try reader["ReservedNodes"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ReservedNode.readingClosure, memberNodeInfo: "ReservedNode", isFlattened: false) + return value } } } @@ -18495,56 +13204,29 @@ public struct DescribeReservedNodesOutput: Swift.Equatable { } } -struct DescribeReservedNodesOutputBody: Swift.Equatable { - let marker: Swift.String? - let reservedNodes: [RedshiftClientTypes.ReservedNode]? -} +enum DescribeReservedNodesOutputError { -extension DescribeReservedNodesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedNodes = "ReservedNodes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReservedNodesResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.reservedNodes) { - struct KeyVal0{struct ReservedNode{}} - let reservedNodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedNodes) - if let reservedNodesWrappedContainer = reservedNodesWrappedContainer { - let reservedNodesContainer = try reservedNodesWrappedContainer.decodeIfPresent([RedshiftClientTypes.ReservedNode].self, forKey: .member) - var reservedNodesBuffer:[RedshiftClientTypes.ReservedNode]? = nil - if let reservedNodesContainer = reservedNodesContainer { - reservedNodesBuffer = [RedshiftClientTypes.ReservedNode]() - for structureContainer0 in reservedNodesContainer { - reservedNodesBuffer?.append(structureContainer0) - } - } - reservedNodes = reservedNodesBuffer - } else { - reservedNodes = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedNodes = nil } } } -enum DescribeReservedNodesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeResizeInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" } -} -extension DescribeResizeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -18576,60 +13258,30 @@ public struct DescribeResizeInput: Swift.Equatable { } } -struct DescribeResizeInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension DescribeResizeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } +extension DescribeResizeOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} - -extension DescribeResizeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeResizeOutputBody = try responseDecoder.decode(responseBody: data) - self.avgResizeRateInMegaBytesPerSecond = output.avgResizeRateInMegaBytesPerSecond - self.dataTransferProgressPercent = output.dataTransferProgressPercent - self.elapsedTimeInSeconds = output.elapsedTimeInSeconds - self.estimatedTimeToCompletionInSeconds = output.estimatedTimeToCompletionInSeconds - self.importTablesCompleted = output.importTablesCompleted - self.importTablesInProgress = output.importTablesInProgress - self.importTablesNotStarted = output.importTablesNotStarted - self.message = output.message - self.progressInMegaBytes = output.progressInMegaBytes - self.resizeType = output.resizeType - self.status = output.status - self.targetClusterType = output.targetClusterType - self.targetEncryptionType = output.targetEncryptionType - self.targetNodeType = output.targetNodeType - self.targetNumberOfNodes = output.targetNumberOfNodes - self.totalResizeDataInMegaBytes = output.totalResizeDataInMegaBytes - } else { - self.avgResizeRateInMegaBytesPerSecond = nil - self.dataTransferProgressPercent = nil - self.elapsedTimeInSeconds = nil - self.estimatedTimeToCompletionInSeconds = nil - self.importTablesCompleted = nil - self.importTablesInProgress = nil - self.importTablesNotStarted = nil - self.message = nil - self.progressInMegaBytes = nil - self.resizeType = nil - self.status = nil - self.targetClusterType = nil - self.targetEncryptionType = nil - self.targetNodeType = nil - self.targetNumberOfNodes = nil - self.totalResizeDataInMegaBytes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeResizeResult"] + var value = DescribeResizeOutput() + value.avgResizeRateInMegaBytesPerSecond = try reader["AvgResizeRateInMegaBytesPerSecond"].readIfPresent() + value.dataTransferProgressPercent = try reader["DataTransferProgressPercent"].readIfPresent() + value.elapsedTimeInSeconds = try reader["ElapsedTimeInSeconds"].readIfPresent() + value.estimatedTimeToCompletionInSeconds = try reader["EstimatedTimeToCompletionInSeconds"].readIfPresent() + value.importTablesCompleted = try reader["ImportTablesCompleted"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.importTablesInProgress = try reader["ImportTablesInProgress"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.importTablesNotStarted = try reader["ImportTablesNotStarted"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.message = try reader["Message"].readIfPresent() + value.progressInMegaBytes = try reader["ProgressInMegaBytes"].readIfPresent() + value.resizeType = try reader["ResizeType"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.targetClusterType = try reader["TargetClusterType"].readIfPresent() + value.targetEncryptionType = try reader["TargetEncryptionType"].readIfPresent() + value.targetNodeType = try reader["TargetNodeType"].readIfPresent() + value.targetNumberOfNodes = try reader["TargetNumberOfNodes"].readIfPresent() + value.totalResizeDataInMegaBytes = try reader["TotalResizeDataInMegaBytes"].readIfPresent() + return value } } } @@ -18707,147 +13359,37 @@ public struct DescribeResizeOutput: Swift.Equatable { } } -struct DescribeResizeOutputBody: Swift.Equatable { - let targetNodeType: Swift.String? - let targetNumberOfNodes: Swift.Int? - let targetClusterType: Swift.String? - let status: Swift.String? - let importTablesCompleted: [Swift.String]? - let importTablesInProgress: [Swift.String]? - let importTablesNotStarted: [Swift.String]? - let avgResizeRateInMegaBytesPerSecond: Swift.Double? - let totalResizeDataInMegaBytes: Swift.Int? - let progressInMegaBytes: Swift.Int? - let elapsedTimeInSeconds: Swift.Int? - let estimatedTimeToCompletionInSeconds: Swift.Int? - let resizeType: Swift.String? - let message: Swift.String? - let targetEncryptionType: Swift.String? - let dataTransferProgressPercent: Swift.Double? -} +enum DescribeResizeOutputError { -extension DescribeResizeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case avgResizeRateInMegaBytesPerSecond = "AvgResizeRateInMegaBytesPerSecond" - case dataTransferProgressPercent = "DataTransferProgressPercent" - case elapsedTimeInSeconds = "ElapsedTimeInSeconds" - case estimatedTimeToCompletionInSeconds = "EstimatedTimeToCompletionInSeconds" - case importTablesCompleted = "ImportTablesCompleted" - case importTablesInProgress = "ImportTablesInProgress" - case importTablesNotStarted = "ImportTablesNotStarted" - case message = "Message" - case progressInMegaBytes = "ProgressInMegaBytes" - case resizeType = "ResizeType" - case status = "Status" - case targetClusterType = "TargetClusterType" - case targetEncryptionType = "TargetEncryptionType" - case targetNodeType = "TargetNodeType" - case targetNumberOfNodes = "TargetNumberOfNodes" - case totalResizeDataInMegaBytes = "TotalResizeDataInMegaBytes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeResizeResult")) - let targetNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetNodeType) - targetNodeType = targetNodeTypeDecoded - let targetNumberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetNumberOfNodes) - targetNumberOfNodes = targetNumberOfNodesDecoded - let targetClusterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetClusterType) - targetClusterType = targetClusterTypeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.importTablesCompleted) { - struct KeyVal0{struct member{}} - let importTablesCompletedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importTablesCompleted) - if let importTablesCompletedWrappedContainer = importTablesCompletedWrappedContainer { - let importTablesCompletedContainer = try importTablesCompletedWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importTablesCompletedBuffer:[Swift.String]? = nil - if let importTablesCompletedContainer = importTablesCompletedContainer { - importTablesCompletedBuffer = [Swift.String]() - for stringContainer0 in importTablesCompletedContainer { - importTablesCompletedBuffer?.append(stringContainer0) - } - } - importTablesCompleted = importTablesCompletedBuffer - } else { - importTablesCompleted = [] - } - } else { - importTablesCompleted = nil - } - if containerValues.contains(.importTablesInProgress) { - struct KeyVal0{struct member{}} - let importTablesInProgressWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importTablesInProgress) - if let importTablesInProgressWrappedContainer = importTablesInProgressWrappedContainer { - let importTablesInProgressContainer = try importTablesInProgressWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importTablesInProgressBuffer:[Swift.String]? = nil - if let importTablesInProgressContainer = importTablesInProgressContainer { - importTablesInProgressBuffer = [Swift.String]() - for stringContainer0 in importTablesInProgressContainer { - importTablesInProgressBuffer?.append(stringContainer0) - } - } - importTablesInProgress = importTablesInProgressBuffer - } else { - importTablesInProgress = [] - } - } else { - importTablesInProgress = nil - } - if containerValues.contains(.importTablesNotStarted) { - struct KeyVal0{struct member{}} - let importTablesNotStartedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .importTablesNotStarted) - if let importTablesNotStartedWrappedContainer = importTablesNotStartedWrappedContainer { - let importTablesNotStartedContainer = try importTablesNotStartedWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var importTablesNotStartedBuffer:[Swift.String]? = nil - if let importTablesNotStartedContainer = importTablesNotStartedContainer { - importTablesNotStartedBuffer = [Swift.String]() - for stringContainer0 in importTablesNotStartedContainer { - importTablesNotStartedBuffer?.append(stringContainer0) - } - } - importTablesNotStarted = importTablesNotStartedBuffer - } else { - importTablesNotStarted = [] - } - } else { - importTablesNotStarted = nil - } - let avgResizeRateInMegaBytesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .avgResizeRateInMegaBytesPerSecond) - avgResizeRateInMegaBytesPerSecond = avgResizeRateInMegaBytesPerSecondDecoded - let totalResizeDataInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalResizeDataInMegaBytes) - totalResizeDataInMegaBytes = totalResizeDataInMegaBytesDecoded - let progressInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .progressInMegaBytes) - progressInMegaBytes = progressInMegaBytesDecoded - let elapsedTimeInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .elapsedTimeInSeconds) - elapsedTimeInSeconds = elapsedTimeInSecondsDecoded - let estimatedTimeToCompletionInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .estimatedTimeToCompletionInSeconds) - estimatedTimeToCompletionInSeconds = estimatedTimeToCompletionInSecondsDecoded - let resizeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resizeType) - resizeType = resizeTypeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let targetEncryptionTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetEncryptionType) - targetEncryptionType = targetEncryptionTypeDecoded - let dataTransferProgressPercentDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .dataTransferProgressPercent) - dataTransferProgressPercent = dataTransferProgressPercentDecoded - } -} - -enum DescribeResizeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResizeNotFound": return try await ResizeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResizeNotFound": return try await ResizeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeScheduledActionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case active = "Active" + case endTime = "EndTime" + case filters = "Filters" + case marker = "Marker" + case maxRecords = "MaxRecords" + case scheduledActionName = "ScheduledActionName" + case startTime = "StartTime" + case targetActionType = "TargetActionType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let active = active { @@ -18935,79 +13477,18 @@ public struct DescribeScheduledActionsInput: Swift.Equatable { } } -struct DescribeScheduledActionsInputBody: Swift.Equatable { - let scheduledActionName: Swift.String? - let targetActionType: RedshiftClientTypes.ScheduledActionTypeValues? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let active: Swift.Bool? - let filters: [RedshiftClientTypes.ScheduledActionFilter]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeScheduledActionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case active = "Active" - case endTime = "EndTime" - case filters = "Filters" - case marker = "Marker" - case maxRecords = "MaxRecords" - case scheduledActionName = "ScheduledActionName" - case startTime = "StartTime" - case targetActionType = "TargetActionType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let targetActionTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionTypeValues.self, forKey: .targetActionType) - targetActionType = targetActionTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let activeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .active) - active = activeDecoded - if containerValues.contains(.filters) { - struct KeyVal0{struct ScheduledActionFilter{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([RedshiftClientTypes.ScheduledActionFilter].self, forKey: .member) - var filtersBuffer:[RedshiftClientTypes.ScheduledActionFilter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [RedshiftClientTypes.ScheduledActionFilter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] - } - } else { - filters = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} - -extension DescribeScheduledActionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeScheduledActionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.scheduledActions = output.scheduledActions - } else { - self.marker = nil - self.scheduledActions = nil - } - } +extension DescribeScheduledActionsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeScheduledActionsResult"] + var value = DescribeScheduledActionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.scheduledActions = try reader["ScheduledActions"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ScheduledAction.readingClosure, memberNodeInfo: "ScheduledAction", isFlattened: false) + return value + } + } } public struct DescribeScheduledActionsOutput: Swift.Equatable { @@ -19026,56 +13507,33 @@ public struct DescribeScheduledActionsOutput: Swift.Equatable { } } -struct DescribeScheduledActionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let scheduledActions: [RedshiftClientTypes.ScheduledAction]? -} +enum DescribeScheduledActionsOutputError { -extension DescribeScheduledActionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case scheduledActions = "ScheduledActions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeScheduledActionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.scheduledActions) { - struct KeyVal0{struct ScheduledAction{}} - let scheduledActionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduledActions) - if let scheduledActionsWrappedContainer = scheduledActionsWrappedContainer { - let scheduledActionsContainer = try scheduledActionsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ScheduledAction].self, forKey: .member) - var scheduledActionsBuffer:[RedshiftClientTypes.ScheduledAction]? = nil - if let scheduledActionsContainer = scheduledActionsContainer { - scheduledActionsBuffer = [RedshiftClientTypes.ScheduledAction]() - for structureContainer0 in scheduledActionsContainer { - scheduledActionsBuffer?.append(structureContainer0) - } - } - scheduledActions = scheduledActionsBuffer - } else { - scheduledActions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ScheduledActionNotFound": return try await ScheduledActionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - scheduledActions = nil } } } -enum DescribeScheduledActionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ScheduledActionNotFound": return try await ScheduledActionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeSnapshotCopyGrantsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case snapshotCopyGrantName = "SnapshotCopyGrantName" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeSnapshotCopyGrantsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -19152,82 +13610,16 @@ public struct DescribeSnapshotCopyGrantsInput: Swift.Equatable { } } -struct DescribeSnapshotCopyGrantsInputBody: Swift.Equatable { - let snapshotCopyGrantName: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeSnapshotCopyGrantsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case snapshotCopyGrantName = "SnapshotCopyGrantName" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotCopyGrantNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotCopyGrantName) - snapshotCopyGrantName = snapshotCopyGrantNameDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeSnapshotCopyGrantsOutput { -extension DescribeSnapshotCopyGrantsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSnapshotCopyGrantsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.snapshotCopyGrants = output.snapshotCopyGrants - } else { - self.marker = nil - self.snapshotCopyGrants = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeSnapshotCopyGrantsResult"] + var value = DescribeSnapshotCopyGrantsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.snapshotCopyGrants = try reader["SnapshotCopyGrants"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.SnapshotCopyGrant.readingClosure, memberNodeInfo: "SnapshotCopyGrant", isFlattened: false) + return value } } } @@ -19249,56 +13641,34 @@ public struct DescribeSnapshotCopyGrantsOutput: Swift.Equatable { } } -struct DescribeSnapshotCopyGrantsOutputBody: Swift.Equatable { - let marker: Swift.String? - let snapshotCopyGrants: [RedshiftClientTypes.SnapshotCopyGrant]? -} +enum DescribeSnapshotCopyGrantsOutputError { -extension DescribeSnapshotCopyGrantsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case snapshotCopyGrants = "SnapshotCopyGrants" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeSnapshotCopyGrantsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.snapshotCopyGrants) { - struct KeyVal0{struct SnapshotCopyGrant{}} - let snapshotCopyGrantsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotCopyGrants) - if let snapshotCopyGrantsWrappedContainer = snapshotCopyGrantsWrappedContainer { - let snapshotCopyGrantsContainer = try snapshotCopyGrantsWrappedContainer.decodeIfPresent([RedshiftClientTypes.SnapshotCopyGrant].self, forKey: .member) - var snapshotCopyGrantsBuffer:[RedshiftClientTypes.SnapshotCopyGrant]? = nil - if let snapshotCopyGrantsContainer = snapshotCopyGrantsContainer { - snapshotCopyGrantsBuffer = [RedshiftClientTypes.SnapshotCopyGrant]() - for structureContainer0 in snapshotCopyGrantsContainer { - snapshotCopyGrantsBuffer?.append(structureContainer0) - } - } - snapshotCopyGrants = snapshotCopyGrantsBuffer - } else { - snapshotCopyGrants = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotCopyGrantNotFoundFault": return try await SnapshotCopyGrantNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - snapshotCopyGrants = nil } } } -enum DescribeSnapshotCopyGrantsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotCopyGrantNotFoundFault": return try await SnapshotCopyGrantNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeSnapshotSchedulesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" + case scheduleIdentifier = "ScheduleIdentifier" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeSnapshotSchedulesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -19381,86 +13751,16 @@ public struct DescribeSnapshotSchedulesInput: Swift.Equatable { } } -struct DescribeSnapshotSchedulesInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let scheduleIdentifier: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? - let marker: Swift.String? - let maxRecords: Swift.Int? -} - -extension DescribeSnapshotSchedulesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - case scheduleIdentifier = "ScheduleIdentifier" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let scheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleIdentifier) - scheduleIdentifier = scheduleIdentifierDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - } -} +extension DescribeSnapshotSchedulesOutput { -extension DescribeSnapshotSchedulesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeSnapshotSchedulesOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.snapshotSchedules = output.snapshotSchedules - } else { - self.marker = nil - self.snapshotSchedules = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeSnapshotSchedulesResult"] + var value = DescribeSnapshotSchedulesOutput() + value.marker = try reader["Marker"].readIfPresent() + value.snapshotSchedules = try reader["SnapshotSchedules"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.SnapshotSchedule.readingClosure, memberNodeInfo: "SnapshotSchedule", isFlattened: false) + return value } } } @@ -19481,54 +13781,24 @@ public struct DescribeSnapshotSchedulesOutput: Swift.Equatable { } } -struct DescribeSnapshotSchedulesOutputBody: Swift.Equatable { - let snapshotSchedules: [RedshiftClientTypes.SnapshotSchedule]? - let marker: Swift.String? -} +enum DescribeSnapshotSchedulesOutputError { -extension DescribeSnapshotSchedulesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case snapshotSchedules = "SnapshotSchedules" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeSnapshotSchedulesResult")) - if containerValues.contains(.snapshotSchedules) { - struct KeyVal0{struct SnapshotSchedule{}} - let snapshotSchedulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .snapshotSchedules) - if let snapshotSchedulesWrappedContainer = snapshotSchedulesWrappedContainer { - let snapshotSchedulesContainer = try snapshotSchedulesWrappedContainer.decodeIfPresent([RedshiftClientTypes.SnapshotSchedule].self, forKey: .member) - var snapshotSchedulesBuffer:[RedshiftClientTypes.SnapshotSchedule]? = nil - if let snapshotSchedulesContainer = snapshotSchedulesContainer { - snapshotSchedulesBuffer = [RedshiftClientTypes.SnapshotSchedule]() - for structureContainer0 in snapshotSchedulesContainer { - snapshotSchedulesBuffer?.append(structureContainer0) - } - } - snapshotSchedules = snapshotSchedulesBuffer - } else { - snapshotSchedules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - snapshotSchedules = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} - -enum DescribeSnapshotSchedulesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension DescribeStorageInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeStorage", forKey:ClientRuntime.Key("Action")) @@ -19548,16 +13818,16 @@ public struct DescribeStorageInput: Swift.Equatable { public init() { } } -extension DescribeStorageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeStorageOutputBody = try responseDecoder.decode(responseBody: data) - self.totalBackupSizeInMegaBytes = output.totalBackupSizeInMegaBytes - self.totalProvisionedStorageInMegaBytes = output.totalProvisionedStorageInMegaBytes - } else { - self.totalBackupSizeInMegaBytes = nil - self.totalProvisionedStorageInMegaBytes = nil +extension DescribeStorageOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeStorageResult"] + var value = DescribeStorageOutput() + value.totalBackupSizeInMegaBytes = try reader["TotalBackupSizeInMegaBytes"].readIfPresent() + value.totalProvisionedStorageInMegaBytes = try reader["TotalProvisionedStorageInMegaBytes"].readIfPresent() + return value } } } @@ -19578,37 +13848,30 @@ public struct DescribeStorageOutput: Swift.Equatable { } } -struct DescribeStorageOutputBody: Swift.Equatable { - let totalBackupSizeInMegaBytes: Swift.Double? - let totalProvisionedStorageInMegaBytes: Swift.Double? -} - -extension DescribeStorageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case totalBackupSizeInMegaBytes = "TotalBackupSizeInMegaBytes" - case totalProvisionedStorageInMegaBytes = "TotalProvisionedStorageInMegaBytes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeStorageResult")) - let totalBackupSizeInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .totalBackupSizeInMegaBytes) - totalBackupSizeInMegaBytes = totalBackupSizeInMegaBytesDecoded - let totalProvisionedStorageInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .totalProvisionedStorageInMegaBytes) - totalProvisionedStorageInMegaBytes = totalProvisionedStorageInMegaBytesDecoded - } -} +enum DescribeStorageOutputError { -enum DescribeStorageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeTableRestoreStatusInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" + case tableRestoreRequestId = "TableRestoreRequestId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -19660,44 +13923,16 @@ public struct DescribeTableRestoreStatusInput: Swift.Equatable { } } -struct DescribeTableRestoreStatusInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let tableRestoreRequestId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension DescribeTableRestoreStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - case tableRestoreRequestId = "TableRestoreRequestId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let tableRestoreRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tableRestoreRequestId) - tableRestoreRequestId = tableRestoreRequestIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension DescribeTableRestoreStatusOutput { -extension DescribeTableRestoreStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTableRestoreStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.tableRestoreStatusDetails = output.tableRestoreStatusDetails - } else { - self.marker = nil - self.tableRestoreStatusDetails = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTableRestoreStatusResult"] + var value = DescribeTableRestoreStatusOutput() + value.marker = try reader["Marker"].readIfPresent() + value.tableRestoreStatusDetails = try reader["TableRestoreStatusDetails"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.TableRestoreStatus.readingClosure, memberNodeInfo: "TableRestoreStatus", isFlattened: false) + return value } } } @@ -19719,56 +13954,34 @@ public struct DescribeTableRestoreStatusOutput: Swift.Equatable { } } -struct DescribeTableRestoreStatusOutputBody: Swift.Equatable { - let tableRestoreStatusDetails: [RedshiftClientTypes.TableRestoreStatus]? - let marker: Swift.String? -} +enum DescribeTableRestoreStatusOutputError { -extension DescribeTableRestoreStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case tableRestoreStatusDetails = "TableRestoreStatusDetails" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTableRestoreStatusResult")) - if containerValues.contains(.tableRestoreStatusDetails) { - struct KeyVal0{struct TableRestoreStatus{}} - let tableRestoreStatusDetailsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tableRestoreStatusDetails) - if let tableRestoreStatusDetailsWrappedContainer = tableRestoreStatusDetailsWrappedContainer { - let tableRestoreStatusDetailsContainer = try tableRestoreStatusDetailsWrappedContainer.decodeIfPresent([RedshiftClientTypes.TableRestoreStatus].self, forKey: .member) - var tableRestoreStatusDetailsBuffer:[RedshiftClientTypes.TableRestoreStatus]? = nil - if let tableRestoreStatusDetailsContainer = tableRestoreStatusDetailsContainer { - tableRestoreStatusDetailsBuffer = [RedshiftClientTypes.TableRestoreStatus]() - for structureContainer0 in tableRestoreStatusDetailsContainer { - tableRestoreStatusDetailsBuffer?.append(structureContainer0) - } - } - tableRestoreStatusDetails = tableRestoreStatusDetailsBuffer - } else { - tableRestoreStatusDetails = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TableRestoreNotFoundFault": return try await TableRestoreNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tableRestoreStatusDetails = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeTableRestoreStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TableRestoreNotFoundFault": return try await TableRestoreNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case resourceName = "ResourceName" + case resourceType = "ResourceType" + case tagKeys = "TagKeys" + case tagValues = "TagValues" } -} -extension DescribeTagsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -19875,86 +14088,16 @@ public struct DescribeTagsInput: Swift.Equatable { } } -struct DescribeTagsInputBody: Swift.Equatable { - let resourceName: Swift.String? - let resourceType: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeTagsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case resourceName = "ResourceName" - case resourceType = "ResourceType" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeTagsOutput { -extension DescribeTagsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeTagsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.taggedResources = output.taggedResources - } else { - self.marker = nil - self.taggedResources = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeTagsResult"] + var value = DescribeTagsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.taggedResources = try reader["TaggedResources"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.TaggedResource.readingClosure, memberNodeInfo: "TaggedResource", isFlattened: false) + return value } } } @@ -19976,56 +14119,35 @@ public struct DescribeTagsOutput: Swift.Equatable { } } -struct DescribeTagsOutputBody: Swift.Equatable { - let taggedResources: [RedshiftClientTypes.TaggedResource]? - let marker: Swift.String? -} +enum DescribeTagsOutputError { -extension DescribeTagsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case taggedResources = "TaggedResources" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeTagsResult")) - if containerValues.contains(.taggedResources) { - struct KeyVal0{struct TaggedResource{}} - let taggedResourcesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .taggedResources) - if let taggedResourcesWrappedContainer = taggedResourcesWrappedContainer { - let taggedResourcesContainer = try taggedResourcesWrappedContainer.decodeIfPresent([RedshiftClientTypes.TaggedResource].self, forKey: .member) - var taggedResourcesBuffer:[RedshiftClientTypes.TaggedResource]? = nil - if let taggedResourcesContainer = taggedResourcesContainer { - taggedResourcesBuffer = [RedshiftClientTypes.TaggedResource]() - for structureContainer0 in taggedResourcesContainer { - taggedResourcesBuffer?.append(structureContainer0) - } - } - taggedResources = taggedResourcesBuffer - } else { - taggedResources = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - taggedResources = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeTagsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeUsageLimitsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case featureType = "FeatureType" + case marker = "Marker" + case maxRecords = "MaxRecords" + case tagKeys = "TagKeys" + case tagValues = "TagValues" + case usageLimitId = "UsageLimitId" } -} -extension DescribeUsageLimitsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -20115,90 +14237,16 @@ public struct DescribeUsageLimitsInput: Swift.Equatable { } } -struct DescribeUsageLimitsInputBody: Swift.Equatable { - let usageLimitId: Swift.String? - let clusterIdentifier: Swift.String? - let featureType: RedshiftClientTypes.UsageLimitFeatureType? - let maxRecords: Swift.Int? - let marker: Swift.String? - let tagKeys: [Swift.String]? - let tagValues: [Swift.String]? -} - -extension DescribeUsageLimitsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case featureType = "FeatureType" - case marker = "Marker" - case maxRecords = "MaxRecords" - case tagKeys = "TagKeys" - case tagValues = "TagValues" - case usageLimitId = "UsageLimitId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let usageLimitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageLimitId) - usageLimitId = usageLimitIdDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let featureTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitFeatureType.self, forKey: .featureType) - featureType = featureTypeDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct TagKey{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil - } - if containerValues.contains(.tagValues) { - struct KeyVal0{struct TagValue{}} - let tagValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagValues) - if let tagValuesWrappedContainer = tagValuesWrappedContainer { - let tagValuesContainer = try tagValuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagValuesBuffer:[Swift.String]? = nil - if let tagValuesContainer = tagValuesContainer { - tagValuesBuffer = [Swift.String]() - for stringContainer0 in tagValuesContainer { - tagValuesBuffer?.append(stringContainer0) - } - } - tagValues = tagValuesBuffer - } else { - tagValues = [] - } - } else { - tagValues = nil - } - } -} +extension DescribeUsageLimitsOutput { -extension DescribeUsageLimitsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeUsageLimitsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.usageLimits = output.usageLimits - } else { - self.marker = nil - self.usageLimits = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeUsageLimitsResult"] + var value = DescribeUsageLimitsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.usageLimits = try reader["UsageLimits"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.UsageLimit.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -20219,56 +14267,29 @@ public struct DescribeUsageLimitsOutput: Swift.Equatable { } } -struct DescribeUsageLimitsOutputBody: Swift.Equatable { - let usageLimits: [RedshiftClientTypes.UsageLimit]? - let marker: Swift.String? -} +enum DescribeUsageLimitsOutputError { -extension DescribeUsageLimitsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case usageLimits = "UsageLimits" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeUsageLimitsResult")) - if containerValues.contains(.usageLimits) { - struct KeyVal0{struct member{}} - let usageLimitsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .usageLimits) - if let usageLimitsWrappedContainer = usageLimitsWrappedContainer { - let usageLimitsContainer = try usageLimitsWrappedContainer.decodeIfPresent([RedshiftClientTypes.UsageLimit].self, forKey: .member) - var usageLimitsBuffer:[RedshiftClientTypes.UsageLimit]? = nil - if let usageLimitsContainer = usageLimitsContainer { - usageLimitsBuffer = [RedshiftClientTypes.UsageLimit]() - for structureContainer0 in usageLimitsContainer { - usageLimitsBuffer?.append(structureContainer0) - } - } - usageLimits = usageLimitsBuffer - } else { - usageLimits = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - usageLimits = nil } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded } } -enum DescribeUsageLimitsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DisableLoggingInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" } -} -extension DisableLoggingInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -20300,44 +14321,22 @@ public struct DisableLoggingInput: Swift.Equatable { } } -struct DisableLoggingInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension DisableLoggingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} +extension DisableLoggingOutput { -extension DisableLoggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableLoggingOutputBody = try responseDecoder.decode(responseBody: data) - self.bucketName = output.bucketName - self.lastFailureMessage = output.lastFailureMessage - self.lastFailureTime = output.lastFailureTime - self.lastSuccessfulDeliveryTime = output.lastSuccessfulDeliveryTime - self.logDestinationType = output.logDestinationType - self.logExports = output.logExports - self.loggingEnabled = output.loggingEnabled - self.s3KeyPrefix = output.s3KeyPrefix - } else { - self.bucketName = nil - self.lastFailureMessage = nil - self.lastFailureTime = nil - self.lastSuccessfulDeliveryTime = nil - self.logDestinationType = nil - self.logExports = nil - self.loggingEnabled = nil - self.s3KeyPrefix = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DisableLoggingResult"] + var value = DisableLoggingOutput() + value.bucketName = try reader["BucketName"].readIfPresent() + value.lastFailureMessage = try reader["LastFailureMessage"].readIfPresent() + value.lastFailureTime = try reader["LastFailureTime"].readTimestampIfPresent(format: .dateTime) + value.lastSuccessfulDeliveryTime = try reader["LastSuccessfulDeliveryTime"].readTimestampIfPresent(format: .dateTime) + value.logDestinationType = try reader["LogDestinationType"].readIfPresent() + value.logExports = try reader["LogExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.loggingEnabled = try reader["LoggingEnabled"].readIfPresent() + value.s3KeyPrefix = try reader["S3KeyPrefix"].readIfPresent() + return value } } } @@ -20383,81 +14382,30 @@ public struct DisableLoggingOutput: Swift.Equatable { } } -struct DisableLoggingOutputBody: Swift.Equatable { - let loggingEnabled: Swift.Bool? - let bucketName: Swift.String? - let s3KeyPrefix: Swift.String? - let lastSuccessfulDeliveryTime: ClientRuntime.Date? - let lastFailureTime: ClientRuntime.Date? - let lastFailureMessage: Swift.String? - let logDestinationType: RedshiftClientTypes.LogDestinationType? - let logExports: [Swift.String]? -} - -extension DisableLoggingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketName = "BucketName" - case lastFailureMessage = "LastFailureMessage" - case lastFailureTime = "LastFailureTime" - case lastSuccessfulDeliveryTime = "LastSuccessfulDeliveryTime" - case logDestinationType = "LogDestinationType" - case logExports = "LogExports" - case loggingEnabled = "LoggingEnabled" - case s3KeyPrefix = "S3KeyPrefix" - } +enum DisableLoggingOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DisableLoggingResult")) - let loggingEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .loggingEnabled) - loggingEnabled = loggingEnabledDecoded - let bucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketName) - bucketName = bucketNameDecoded - let s3KeyPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3KeyPrefix) - s3KeyPrefix = s3KeyPrefixDecoded - let lastSuccessfulDeliveryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastSuccessfulDeliveryTime) - lastSuccessfulDeliveryTime = lastSuccessfulDeliveryTimeDecoded - let lastFailureTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastFailureTime) - lastFailureTime = lastFailureTimeDecoded - let lastFailureMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastFailureMessage) - lastFailureMessage = lastFailureMessageDecoded - let logDestinationTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.LogDestinationType.self, forKey: .logDestinationType) - logDestinationType = logDestinationTypeDecoded - if containerValues.contains(.logExports) { - struct KeyVal0{struct member{}} - let logExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logExports) - if let logExportsWrappedContainer = logExportsWrappedContainer { - let logExportsContainer = try logExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logExportsBuffer:[Swift.String]? = nil - if let logExportsContainer = logExportsContainer { - logExportsBuffer = [Swift.String]() - for stringContainer0 in logExportsContainer { - logExportsBuffer?.append(stringContainer0) - } - } - logExports = logExportsBuffer - } else { - logExports = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - logExports = nil } } } -enum DisableLoggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DisableSnapshotCopyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" } -} -extension DisableSnapshotCopyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -20489,30 +14437,15 @@ public struct DisableSnapshotCopyInput: Swift.Equatable { } } -struct DisableSnapshotCopyInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension DisableSnapshotCopyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} +extension DisableSnapshotCopyOutput { -extension DisableSnapshotCopyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableSnapshotCopyOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DisableSnapshotCopyResult"] + var value = DisableSnapshotCopyOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -20529,38 +14462,35 @@ public struct DisableSnapshotCopyOutput: Swift.Equatable { } } -struct DisableSnapshotCopyOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension DisableSnapshotCopyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DisableSnapshotCopyResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum DisableSnapshotCopyOutputError { -enum DisableSnapshotCopyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotCopyAlreadyDisabledFault": return try await SnapshotCopyAlreadyDisabledFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotCopyAlreadyDisabledFault": return try await SnapshotCopyAlreadyDisabledFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DisassociateDataShareConsumerInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case consumerArn = "ConsumerArn" + case consumerRegion = "ConsumerRegion" + case dataShareArn = "DataShareArn" + case disassociateEntireAccount = "DisassociateEntireAccount" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let consumerArn = consumerArn { @@ -20612,50 +14542,19 @@ public struct DisassociateDataShareConsumerInput: Swift.Equatable { } } -struct DisassociateDataShareConsumerInputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let disassociateEntireAccount: Swift.Bool? - let consumerArn: Swift.String? - let consumerRegion: Swift.String? -} - -extension DisassociateDataShareConsumerInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case consumerArn = "ConsumerArn" - case consumerRegion = "ConsumerRegion" - case dataShareArn = "DataShareArn" - case disassociateEntireAccount = "DisassociateEntireAccount" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let disassociateEntireAccountDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disassociateEntireAccount) - disassociateEntireAccount = disassociateEntireAccountDecoded - let consumerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerArn) - consumerArn = consumerArnDecoded - let consumerRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .consumerRegion) - consumerRegion = consumerRegionDecoded - } -} +extension DisassociateDataShareConsumerOutput { -extension DisassociateDataShareConsumerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateDataShareConsumerOutputBody = try responseDecoder.decode(responseBody: data) - self.allowPubliclyAccessibleConsumers = output.allowPubliclyAccessibleConsumers - self.dataShareArn = output.dataShareArn - self.dataShareAssociations = output.dataShareAssociations - self.managedBy = output.managedBy - self.producerArn = output.producerArn - } else { - self.allowPubliclyAccessibleConsumers = nil - self.dataShareArn = nil - self.dataShareAssociations = nil - self.managedBy = nil - self.producerArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DisassociateDataShareConsumerResult"] + var value = DisassociateDataShareConsumerOutput() + value.allowPubliclyAccessibleConsumers = try reader["AllowPubliclyAccessibleConsumers"].readIfPresent() + value.dataShareArn = try reader["DataShareArn"].readIfPresent() + value.dataShareAssociations = try reader["DataShareAssociations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShareAssociation.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.managedBy = try reader["ManagedBy"].readIfPresent() + value.producerArn = try reader["ProducerArn"].readIfPresent() + return value } } } @@ -20688,68 +14587,25 @@ public struct DisassociateDataShareConsumerOutput: Swift.Equatable { } } -struct DisassociateDataShareConsumerOutputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let producerArn: Swift.String? - let allowPubliclyAccessibleConsumers: Swift.Bool? - let dataShareAssociations: [RedshiftClientTypes.DataShareAssociation]? - let managedBy: Swift.String? -} +enum DisassociateDataShareConsumerOutputError { -extension DisassociateDataShareConsumerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowPubliclyAccessibleConsumers = "AllowPubliclyAccessibleConsumers" - case dataShareArn = "DataShareArn" - case dataShareAssociations = "DataShareAssociations" - case managedBy = "ManagedBy" - case producerArn = "ProducerArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DisassociateDataShareConsumerResult")) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let producerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .producerArn) - producerArn = producerArnDecoded - let allowPubliclyAccessibleConsumersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowPubliclyAccessibleConsumers) - allowPubliclyAccessibleConsumers = allowPubliclyAccessibleConsumersDecoded - if containerValues.contains(.dataShareAssociations) { - struct KeyVal0{struct member{}} - let dataShareAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShareAssociations) - if let dataShareAssociationsWrappedContainer = dataShareAssociationsWrappedContainer { - let dataShareAssociationsContainer = try dataShareAssociationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShareAssociation].self, forKey: .member) - var dataShareAssociationsBuffer:[RedshiftClientTypes.DataShareAssociation]? = nil - if let dataShareAssociationsContainer = dataShareAssociationsContainer { - dataShareAssociationsBuffer = [RedshiftClientTypes.DataShareAssociation]() - for structureContainer0 in dataShareAssociationsContainer { - dataShareAssociationsBuffer?.append(structureContainer0) - } - } - dataShareAssociations = dataShareAssociationsBuffer - } else { - dataShareAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidDataShareFault": return try await InvalidDataShareFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidNamespaceFault": return try await InvalidNamespaceFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dataShareAssociations = nil - } - let managedByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .managedBy) - managedBy = managedByDecoded - } -} - -enum DisassociateDataShareConsumerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDataShareFault": return try await InvalidDataShareFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidNamespaceFault": return try await InvalidNamespaceFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension RedshiftClientTypes.EC2SecurityGroup: Swift.Codable { +extension RedshiftClientTypes.EC2SecurityGroup: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ec2SecurityGroupName = "EC2SecurityGroupName" case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" @@ -20782,32 +14638,15 @@ extension RedshiftClientTypes.EC2SecurityGroup: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.EC2SecurityGroup() + value.status = try reader["Status"].readIfPresent() + value.ec2SecurityGroupName = try reader["EC2SecurityGroupName"].readIfPresent() + value.ec2SecurityGroupOwnerId = try reader["EC2SecurityGroupOwnerId"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -20840,7 +14679,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.ElasticIpStatus: Swift.Codable { +extension RedshiftClientTypes.ElasticIpStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case elasticIp = "ElasticIp" case status = "Status" @@ -20856,12 +14695,14 @@ extension RedshiftClientTypes.ElasticIpStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let elasticIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticIp) - elasticIp = elasticIpDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ElasticIpStatus() + value.elasticIp = try reader["ElasticIp"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -20886,6 +14727,14 @@ extension RedshiftClientTypes { } extension EnableLoggingInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case bucketName = "BucketName" + case clusterIdentifier = "ClusterIdentifier" + case logDestinationType = "LogDestinationType" + case logExports = "LogExports" + case s3KeyPrefix = "S3KeyPrefix" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let bucketName = bucketName { @@ -20972,77 +14821,22 @@ public struct EnableLoggingInput: Swift.Equatable { } } -struct EnableLoggingInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let bucketName: Swift.String? - let s3KeyPrefix: Swift.String? - let logDestinationType: RedshiftClientTypes.LogDestinationType? - let logExports: [Swift.String]? -} - -extension EnableLoggingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketName = "BucketName" - case clusterIdentifier = "ClusterIdentifier" - case logDestinationType = "LogDestinationType" - case logExports = "LogExports" - case s3KeyPrefix = "S3KeyPrefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let bucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketName) - bucketName = bucketNameDecoded - let s3KeyPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3KeyPrefix) - s3KeyPrefix = s3KeyPrefixDecoded - let logDestinationTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.LogDestinationType.self, forKey: .logDestinationType) - logDestinationType = logDestinationTypeDecoded - if containerValues.contains(.logExports) { - struct KeyVal0{struct member{}} - let logExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logExports) - if let logExportsWrappedContainer = logExportsWrappedContainer { - let logExportsContainer = try logExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logExportsBuffer:[Swift.String]? = nil - if let logExportsContainer = logExportsContainer { - logExportsBuffer = [Swift.String]() - for stringContainer0 in logExportsContainer { - logExportsBuffer?.append(stringContainer0) - } - } - logExports = logExportsBuffer - } else { - logExports = [] - } - } else { - logExports = nil - } - } -} +extension EnableLoggingOutput { -extension EnableLoggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableLoggingOutputBody = try responseDecoder.decode(responseBody: data) - self.bucketName = output.bucketName - self.lastFailureMessage = output.lastFailureMessage - self.lastFailureTime = output.lastFailureTime - self.lastSuccessfulDeliveryTime = output.lastSuccessfulDeliveryTime - self.logDestinationType = output.logDestinationType - self.logExports = output.logExports - self.loggingEnabled = output.loggingEnabled - self.s3KeyPrefix = output.s3KeyPrefix - } else { - self.bucketName = nil - self.lastFailureMessage = nil - self.lastFailureTime = nil - self.lastSuccessfulDeliveryTime = nil - self.logDestinationType = nil - self.logExports = nil - self.loggingEnabled = nil - self.s3KeyPrefix = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["EnableLoggingResult"] + var value = EnableLoggingOutput() + value.bucketName = try reader["BucketName"].readIfPresent() + value.lastFailureMessage = try reader["LastFailureMessage"].readIfPresent() + value.lastFailureTime = try reader["LastFailureTime"].readTimestampIfPresent(format: .dateTime) + value.lastSuccessfulDeliveryTime = try reader["LastSuccessfulDeliveryTime"].readTimestampIfPresent(format: .dateTime) + value.logDestinationType = try reader["LogDestinationType"].readIfPresent() + value.logExports = try reader["LogExports"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.loggingEnabled = try reader["LoggingEnabled"].readIfPresent() + value.s3KeyPrefix = try reader["S3KeyPrefix"].readIfPresent() + return value } } } @@ -21088,85 +14882,38 @@ public struct EnableLoggingOutput: Swift.Equatable { } } -struct EnableLoggingOutputBody: Swift.Equatable { - let loggingEnabled: Swift.Bool? - let bucketName: Swift.String? - let s3KeyPrefix: Swift.String? - let lastSuccessfulDeliveryTime: ClientRuntime.Date? - let lastFailureTime: ClientRuntime.Date? - let lastFailureMessage: Swift.String? - let logDestinationType: RedshiftClientTypes.LogDestinationType? - let logExports: [Swift.String]? -} - -extension EnableLoggingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketName = "BucketName" - case lastFailureMessage = "LastFailureMessage" - case lastFailureTime = "LastFailureTime" - case lastSuccessfulDeliveryTime = "LastSuccessfulDeliveryTime" - case logDestinationType = "LogDestinationType" - case logExports = "LogExports" - case loggingEnabled = "LoggingEnabled" - case s3KeyPrefix = "S3KeyPrefix" - } +enum EnableLoggingOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("EnableLoggingResult")) - let loggingEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .loggingEnabled) - loggingEnabled = loggingEnabledDecoded - let bucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketName) - bucketName = bucketNameDecoded - let s3KeyPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3KeyPrefix) - s3KeyPrefix = s3KeyPrefixDecoded - let lastSuccessfulDeliveryTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastSuccessfulDeliveryTime) - lastSuccessfulDeliveryTime = lastSuccessfulDeliveryTimeDecoded - let lastFailureTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastFailureTime) - lastFailureTime = lastFailureTimeDecoded - let lastFailureMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lastFailureMessage) - lastFailureMessage = lastFailureMessageDecoded - let logDestinationTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.LogDestinationType.self, forKey: .logDestinationType) - logDestinationType = logDestinationTypeDecoded - if containerValues.contains(.logExports) { - struct KeyVal0{struct member{}} - let logExportsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .logExports) - if let logExportsWrappedContainer = logExportsWrappedContainer { - let logExportsContainer = try logExportsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var logExportsBuffer:[Swift.String]? = nil - if let logExportsContainer = logExportsContainer { - logExportsBuffer = [Swift.String]() - for stringContainer0 in logExportsContainer { - logExportsBuffer?.append(stringContainer0) - } - } - logExports = logExportsBuffer - } else { - logExports = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "BucketNotFoundFault": return try await BucketNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientS3BucketPolicyFault": return try await InsufficientS3BucketPolicyFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidS3BucketNameFault": return try await InvalidS3BucketNameFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidS3KeyPrefixFault": return try await InvalidS3KeyPrefixFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - logExports = nil } } } -enum EnableLoggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BucketNotFoundFault": return try await BucketNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientS3BucketPolicyFault": return try await InsufficientS3BucketPolicyFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidS3BucketNameFault": return try await InvalidS3BucketNameFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidS3KeyPrefixFault": return try await InvalidS3KeyPrefixFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension EnableSnapshotCopyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case destinationRegion = "DestinationRegion" + case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" + case retentionPeriod = "RetentionPeriod" + case snapshotCopyGrantName = "SnapshotCopyGrantName" } -} -extension EnableSnapshotCopyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -21227,46 +14974,15 @@ public struct EnableSnapshotCopyInput: Swift.Equatable { } } -struct EnableSnapshotCopyInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let destinationRegion: Swift.String? - let retentionPeriod: Swift.Int? - let snapshotCopyGrantName: Swift.String? - let manualSnapshotRetentionPeriod: Swift.Int? -} - -extension EnableSnapshotCopyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case destinationRegion = "DestinationRegion" - case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" - case retentionPeriod = "RetentionPeriod" - case snapshotCopyGrantName = "SnapshotCopyGrantName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let destinationRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationRegion) - destinationRegion = destinationRegionDecoded - let retentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .retentionPeriod) - retentionPeriod = retentionPeriodDecoded - let snapshotCopyGrantNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotCopyGrantName) - snapshotCopyGrantName = snapshotCopyGrantNameDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - } -} +extension EnableSnapshotCopyOutput { -extension EnableSnapshotCopyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableSnapshotCopyOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["EnableSnapshotCopyResult"] + var value = EnableSnapshotCopyOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -21283,44 +14999,34 @@ public struct EnableSnapshotCopyOutput: Swift.Equatable { } } -struct EnableSnapshotCopyOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension EnableSnapshotCopyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("EnableSnapshotCopyResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum EnableSnapshotCopyOutputError { -enum EnableSnapshotCopyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CopyToRegionDisabledFault": return try await CopyToRegionDisabledFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IncompatibleOrderableOptions": return try await IncompatibleOrderableOptions(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededFault": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotCopyAlreadyEnabledFault": return try await SnapshotCopyAlreadyEnabledFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotCopyGrantNotFoundFault": return try await SnapshotCopyGrantNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnknownSnapshotCopyRegionFault": return try await UnknownSnapshotCopyRegionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CopyToRegionDisabledFault": return try await CopyToRegionDisabledFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IncompatibleOrderableOptions": return try await IncompatibleOrderableOptions.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededFault": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotCopyAlreadyEnabledFault": return try await SnapshotCopyAlreadyEnabledFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotCopyGrantNotFoundFault": return try await SnapshotCopyGrantNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnknownSnapshotCopyRegionFault": return try await UnknownSnapshotCopyRegionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.Endpoint: Swift.Codable { +extension RedshiftClientTypes.Endpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case address = "Address" case port = "Port" @@ -21349,30 +15055,14 @@ extension RedshiftClientTypes.Endpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - if containerValues.contains(.vpcEndpoints) { - struct KeyVal0{struct VpcEndpoint{}} - let vpcEndpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcEndpoints) - if let vpcEndpointsWrappedContainer = vpcEndpointsWrappedContainer { - let vpcEndpointsContainer = try vpcEndpointsWrappedContainer.decodeIfPresent([RedshiftClientTypes.VpcEndpoint].self, forKey: .member) - var vpcEndpointsBuffer:[RedshiftClientTypes.VpcEndpoint]? = nil - if let vpcEndpointsContainer = vpcEndpointsContainer { - vpcEndpointsBuffer = [RedshiftClientTypes.VpcEndpoint]() - for structureContainer0 in vpcEndpointsContainer { - vpcEndpointsBuffer?.append(structureContainer0) - } - } - vpcEndpoints = vpcEndpointsBuffer - } else { - vpcEndpoints = [] - } - } else { - vpcEndpoints = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.Endpoint() + value.address = try reader["Address"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.vpcEndpoints = try reader["VpcEndpoints"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.VpcEndpoint.readingClosure, memberNodeInfo: "VpcEndpoint", isFlattened: false) + return value } } } @@ -21401,7 +15091,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.EndpointAccess: Swift.Codable { +extension RedshiftClientTypes.EndpointAccess: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case address = "Address" case clusterIdentifier = "ClusterIdentifier" @@ -21458,45 +15148,22 @@ extension RedshiftClientTypes.EndpointAccess: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - let subnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupName) - subnetGroupName = subnetGroupNameDecoded - let endpointStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointStatus) - endpointStatus = endpointStatusDecoded - let endpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointName) - endpointName = endpointNameDecoded - let endpointCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endpointCreateTime) - endpointCreateTime = endpointCreateTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroup{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[RedshiftClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [RedshiftClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] - } - } else { - vpcSecurityGroups = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.EndpointAccess() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.resourceOwner = try reader["ResourceOwner"].readIfPresent() + value.subnetGroupName = try reader["SubnetGroupName"].readIfPresent() + value.endpointStatus = try reader["EndpointStatus"].readIfPresent() + value.endpointName = try reader["EndpointName"].readIfPresent() + value.endpointCreateTime = try reader["EndpointCreateTime"].readTimestampIfPresent(format: .dateTime) + value.port = try reader["Port"].readIfPresent() + value.address = try reader["Address"].readIfPresent() + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroup", isFlattened: false) + value.vpcEndpoint = try reader["VpcEndpoint"].readIfPresent(readingClosure: RedshiftClientTypes.VpcEndpoint.readingClosure) + return value } - let vpcEndpointDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.VpcEndpoint.self, forKey: .vpcEndpoint) - vpcEndpoint = vpcEndpointDecoded } } @@ -21553,16 +15220,14 @@ extension RedshiftClientTypes { } extension EndpointAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EndpointAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21590,23 +15255,7 @@ public struct EndpointAlreadyExistsFault: ClientRuntime.ModeledError, AWSClientR } } -struct EndpointAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EndpointAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.EndpointAuthorization: Swift.Codable { +extension RedshiftClientTypes.EndpointAuthorization: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedAllVPCs = "AllowedAllVPCs" case allowedVPCs = "AllowedVPCs" @@ -21659,43 +15308,21 @@ extension RedshiftClientTypes.EndpointAuthorization: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let grantorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantor) - grantor = grantorDecoded - let granteeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantee) - grantee = granteeDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let authorizeTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .authorizeTime) - authorizeTime = authorizeTimeDecoded - let clusterStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterStatus) - clusterStatus = clusterStatusDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AuthorizationStatus.self, forKey: .status) - status = statusDecoded - let allowedAllVPCsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowedAllVPCs) - allowedAllVPCs = allowedAllVPCsDecoded - if containerValues.contains(.allowedVPCs) { - struct KeyVal0{struct VpcIdentifier{}} - let allowedVPCsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedVPCs) - if let allowedVPCsWrappedContainer = allowedVPCsWrappedContainer { - let allowedVPCsContainer = try allowedVPCsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allowedVPCsBuffer:[Swift.String]? = nil - if let allowedVPCsContainer = allowedVPCsContainer { - allowedVPCsBuffer = [Swift.String]() - for stringContainer0 in allowedVPCsContainer { - allowedVPCsBuffer?.append(stringContainer0) - } - } - allowedVPCs = allowedVPCsBuffer - } else { - allowedVPCs = [] - } - } else { - allowedVPCs = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.EndpointAuthorization() + value.grantor = try reader["Grantor"].readIfPresent() + value.grantee = try reader["Grantee"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.authorizeTime = try reader["AuthorizeTime"].readTimestampIfPresent(format: .dateTime) + value.clusterStatus = try reader["ClusterStatus"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.allowedAllVPCs = try reader["AllowedAllVPCs"].readIfPresent() + value.allowedVPCs = try reader["AllowedVPCs"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "VpcIdentifier", isFlattened: false) + value.endpointCount = try reader["EndpointCount"].readIfPresent() + return value } - let endpointCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .endpointCount) - endpointCount = endpointCountDecoded } } @@ -21748,16 +15375,14 @@ extension RedshiftClientTypes { } extension EndpointAuthorizationAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EndpointAuthorizationAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21785,33 +15410,15 @@ public struct EndpointAuthorizationAlreadyExistsFault: ClientRuntime.ModeledErro } } -struct EndpointAuthorizationAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EndpointAuthorizationAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension EndpointAuthorizationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EndpointAuthorizationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21839,33 +15446,15 @@ public struct EndpointAuthorizationNotFoundFault: ClientRuntime.ModeledError, AW } } -struct EndpointAuthorizationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EndpointAuthorizationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension EndpointAuthorizationsPerClusterLimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EndpointAuthorizationsPerClusterLimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21893,33 +15482,15 @@ public struct EndpointAuthorizationsPerClusterLimitExceededFault: ClientRuntime. } } -struct EndpointAuthorizationsPerClusterLimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EndpointAuthorizationsPerClusterLimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension EndpointNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EndpointNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -21947,33 +15518,15 @@ public struct EndpointNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct EndpointNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EndpointNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension EndpointsPerAuthorizationLimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EndpointsPerAuthorizationLimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22001,33 +15554,15 @@ public struct EndpointsPerAuthorizationLimitExceededFault: ClientRuntime.Modeled } } -struct EndpointsPerAuthorizationLimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EndpointsPerAuthorizationLimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension EndpointsPerClusterLimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EndpointsPerClusterLimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22055,23 +15590,7 @@ public struct EndpointsPerClusterLimitExceededFault: ClientRuntime.ModeledError, } } -struct EndpointsPerClusterLimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EndpointsPerClusterLimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.Event: Swift.Codable { +extension RedshiftClientTypes.Event: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case date = "Date" case eventCategories = "EventCategories" @@ -22116,39 +15635,19 @@ extension RedshiftClientTypes.Event: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentifier) - sourceIdentifier = sourceIdentifierDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.SourceType.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.Event() + value.sourceIdentifier = try reader["SourceIdentifier"].readIfPresent() + value.sourceType = try reader["SourceType"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.eventCategories = try reader["EventCategories"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.severity = try reader["Severity"].readIfPresent() + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + value.eventId = try reader["EventId"].readIfPresent() + return value } - let severityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .severity) - severity = severityDecoded - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded - let eventIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventId) - eventId = eventIdDecoded } } @@ -22192,7 +15691,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.EventCategoriesMap: Swift.Codable { +extension RedshiftClientTypes.EventCategoriesMap: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case events = "Events" case sourceType = "SourceType" @@ -22217,28 +15716,13 @@ extension RedshiftClientTypes.EventCategoriesMap: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.events) { - struct KeyVal0{struct EventInfoMap{}} - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .events) - if let eventsWrappedContainer = eventsWrappedContainer { - let eventsContainer = try eventsWrappedContainer.decodeIfPresent([RedshiftClientTypes.EventInfoMap].self, forKey: .member) - var eventsBuffer:[RedshiftClientTypes.EventInfoMap]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [RedshiftClientTypes.EventInfoMap]() - for structureContainer0 in eventsContainer { - eventsBuffer?.append(structureContainer0) - } - } - events = eventsBuffer - } else { - events = [] - } - } else { - events = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.EventCategoriesMap() + value.sourceType = try reader["SourceType"].readIfPresent() + value.events = try reader["Events"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.EventInfoMap.readingClosure, memberNodeInfo: "EventInfoMap", isFlattened: false) + return value } } } @@ -22263,7 +15747,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.EventInfoMap: Swift.Codable { +extension RedshiftClientTypes.EventInfoMap: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case eventCategories = "EventCategories" case eventDescription = "EventDescription" @@ -22296,33 +15780,16 @@ extension RedshiftClientTypes.EventInfoMap: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eventIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventId) - eventId = eventIdDecoded - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.EventInfoMap() + value.eventId = try reader["EventId"].readIfPresent() + value.eventCategories = try reader["EventCategories"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.eventDescription = try reader["EventDescription"].readIfPresent() + value.severity = try reader["Severity"].readIfPresent() + return value } - let eventDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventDescription) - eventDescription = eventDescriptionDecoded - let severityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .severity) - severity = severityDecoded } } @@ -22354,7 +15821,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.EventSubscription: Swift.Codable { +extension RedshiftClientTypes.EventSubscription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case custSubscriptionId = "CustSubscriptionId" case customerAwsId = "CustomerAwsId" @@ -22433,80 +15900,22 @@ extension RedshiftClientTypes.EventSubscription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customerAwsIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customerAwsId) - customerAwsId = customerAwsIdDecoded - let custSubscriptionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .custSubscriptionId) - custSubscriptionId = custSubscriptionIdDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let subscriptionCreationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .subscriptionCreationTime) - subscriptionCreationTime = subscriptionCreationTimeDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.sourceIdsList) { - struct KeyVal0{struct SourceId{}} - let sourceIdsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIdsList) - if let sourceIdsListWrappedContainer = sourceIdsListWrappedContainer { - let sourceIdsListContainer = try sourceIdsListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsListBuffer:[Swift.String]? = nil - if let sourceIdsListContainer = sourceIdsListContainer { - sourceIdsListBuffer = [Swift.String]() - for stringContainer0 in sourceIdsListContainer { - sourceIdsListBuffer?.append(stringContainer0) - } - } - sourceIdsList = sourceIdsListBuffer - } else { - sourceIdsList = [] - } - } else { - sourceIdsList = nil - } - if containerValues.contains(.eventCategoriesList) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategoriesList) - if let eventCategoriesListWrappedContainer = eventCategoriesListWrappedContainer { - let eventCategoriesListContainer = try eventCategoriesListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesListBuffer:[Swift.String]? = nil - if let eventCategoriesListContainer = eventCategoriesListContainer { - eventCategoriesListBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesListContainer { - eventCategoriesListBuffer?.append(stringContainer0) - } - } - eventCategoriesList = eventCategoriesListBuffer - } else { - eventCategoriesList = [] - } - } else { - eventCategoriesList = nil - } - let severityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .severity) - severity = severityDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.EventSubscription() + value.customerAwsId = try reader["CustomerAwsId"].readIfPresent() + value.custSubscriptionId = try reader["CustSubscriptionId"].readIfPresent() + value.snsTopicArn = try reader["SnsTopicArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.subscriptionCreationTime = try reader["SubscriptionCreationTime"].readTimestampIfPresent(format: .dateTime) + value.sourceType = try reader["SourceType"].readIfPresent() + value.sourceIdsList = try reader["SourceIdsList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "SourceId", isFlattened: false) + value.eventCategoriesList = try reader["EventCategoriesList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "EventCategory", isFlattened: false) + value.severity = try reader["Severity"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -22572,16 +15981,14 @@ extension RedshiftClientTypes { } extension EventSubscriptionQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EventSubscriptionQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -22609,23 +16016,11 @@ public struct EventSubscriptionQuotaExceededFault: ClientRuntime.ModeledError, A } } -struct EventSubscriptionQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension EventSubscriptionQuotaExceededFaultBody: Swift.Decodable { +extension FailoverPrimaryComputeInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case clusterIdentifier = "ClusterIdentifier" } -} -extension FailoverPrimaryComputeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -22656,30 +16051,15 @@ public struct FailoverPrimaryComputeInput: Swift.Equatable { } } -struct FailoverPrimaryComputeInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension FailoverPrimaryComputeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} +extension FailoverPrimaryComputeOutput { -extension FailoverPrimaryComputeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: FailoverPrimaryComputeOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["FailoverPrimaryComputeResult"] + var value = FailoverPrimaryComputeOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -22696,37 +16076,37 @@ public struct FailoverPrimaryComputeOutput: Swift.Equatable { } } -struct FailoverPrimaryComputeOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension FailoverPrimaryComputeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("FailoverPrimaryComputeResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum FailoverPrimaryComputeOutputError { -enum FailoverPrimaryComputeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetClusterCredentialsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case autoCreate = "AutoCreate" + case clusterIdentifier = "ClusterIdentifier" + case customDomainName = "CustomDomainName" + case dbGroups = "DbGroups" + case dbName = "DbName" + case dbUser = "DbUser" + case durationSeconds = "DurationSeconds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let autoCreate = autoCreate { @@ -22839,80 +16219,22 @@ public struct GetClusterCredentialsInput: Swift.Equatable { } } -struct GetClusterCredentialsInputBody: Swift.Equatable { - let dbUser: Swift.String? - let dbName: Swift.String? - let clusterIdentifier: Swift.String? - let durationSeconds: Swift.Int? - let autoCreate: Swift.Bool? - let dbGroups: [Swift.String]? - let customDomainName: Swift.String? -} - -extension GetClusterCredentialsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case autoCreate = "AutoCreate" - case clusterIdentifier = "ClusterIdentifier" - case customDomainName = "CustomDomainName" - case dbGroups = "DbGroups" - case dbName = "DbName" - case dbUser = "DbUser" - case durationSeconds = "DurationSeconds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbUserDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbUser) - dbUser = dbUserDecoded - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let durationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .durationSeconds) - durationSeconds = durationSecondsDecoded - let autoCreateDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .autoCreate) - autoCreate = autoCreateDecoded - if containerValues.contains(.dbGroups) { - struct KeyVal0{struct DbGroup{}} - let dbGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dbGroups) - if let dbGroupsWrappedContainer = dbGroupsWrappedContainer { - let dbGroupsContainer = try dbGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dbGroupsBuffer:[Swift.String]? = nil - if let dbGroupsContainer = dbGroupsContainer { - dbGroupsBuffer = [Swift.String]() - for stringContainer0 in dbGroupsContainer { - dbGroupsBuffer?.append(stringContainer0) - } - } - dbGroups = dbGroupsBuffer - } else { - dbGroups = [] - } - } else { - dbGroups = nil - } - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - } -} - extension GetClusterCredentialsOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { "GetClusterCredentialsOutput(dbUser: \(Swift.String(describing: dbUser)), expiration: \(Swift.String(describing: expiration)), dbPassword: \"CONTENT_REDACTED\")"} } -extension GetClusterCredentialsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetClusterCredentialsOutputBody = try responseDecoder.decode(responseBody: data) - self.dbPassword = output.dbPassword - self.dbUser = output.dbUser - self.expiration = output.expiration - } else { - self.dbPassword = nil - self.dbUser = nil - self.expiration = nil +extension GetClusterCredentialsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetClusterCredentialsResult"] + var value = GetClusterCredentialsOutput() + value.dbPassword = try reader["DbPassword"].readIfPresent() + value.dbUser = try reader["DbUser"].readIfPresent() + value.expiration = try reader["Expiration"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -22938,43 +16260,32 @@ public struct GetClusterCredentialsOutput: Swift.Equatable { } } -struct GetClusterCredentialsOutputBody: Swift.Equatable { - let dbUser: Swift.String? - let dbPassword: Swift.String? - let expiration: ClientRuntime.Date? -} - -extension GetClusterCredentialsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbPassword = "DbPassword" - case dbUser = "DbUser" - case expiration = "Expiration" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetClusterCredentialsResult")) - let dbUserDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbUser) - dbUser = dbUserDecoded - let dbPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbPassword) - dbPassword = dbPasswordDecoded - let expirationDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expiration) - expiration = expirationDecoded - } -} +enum GetClusterCredentialsOutputError { -enum GetClusterCredentialsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetClusterCredentialsWithIAMInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case customDomainName = "CustomDomainName" + case dbName = "DbName" + case durationSeconds = "DurationSeconds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -23025,53 +16336,23 @@ public struct GetClusterCredentialsWithIAMInput: Swift.Equatable { } } -struct GetClusterCredentialsWithIAMInputBody: Swift.Equatable { - let dbName: Swift.String? - let clusterIdentifier: Swift.String? - let durationSeconds: Swift.Int? - let customDomainName: Swift.String? -} - -extension GetClusterCredentialsWithIAMInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case customDomainName = "CustomDomainName" - case dbName = "DbName" - case durationSeconds = "DurationSeconds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let durationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .durationSeconds) - durationSeconds = durationSecondsDecoded - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - } -} - extension GetClusterCredentialsWithIAMOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { "GetClusterCredentialsWithIAMOutput(dbUser: \(Swift.String(describing: dbUser)), expiration: \(Swift.String(describing: expiration)), nextRefreshTime: \(Swift.String(describing: nextRefreshTime)), dbPassword: \"CONTENT_REDACTED\")"} } -extension GetClusterCredentialsWithIAMOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetClusterCredentialsWithIAMOutputBody = try responseDecoder.decode(responseBody: data) - self.dbPassword = output.dbPassword - self.dbUser = output.dbUser - self.expiration = output.expiration - self.nextRefreshTime = output.nextRefreshTime - } else { - self.dbPassword = nil - self.dbUser = nil - self.expiration = nil - self.nextRefreshTime = nil +extension GetClusterCredentialsWithIAMOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetClusterCredentialsWithIAMResult"] + var value = GetClusterCredentialsWithIAMOutput() + value.dbPassword = try reader["DbPassword"].readIfPresent() + value.dbUser = try reader["DbUser"].readIfPresent() + value.expiration = try reader["Expiration"].readTimestampIfPresent(format: .dateTime) + value.nextRefreshTime = try reader["NextRefreshTime"].readTimestampIfPresent(format: .dateTime) + return value } } } @@ -23100,48 +16381,34 @@ public struct GetClusterCredentialsWithIAMOutput: Swift.Equatable { } } -struct GetClusterCredentialsWithIAMOutputBody: Swift.Equatable { - let dbUser: Swift.String? - let dbPassword: Swift.String? - let expiration: ClientRuntime.Date? - let nextRefreshTime: ClientRuntime.Date? -} - -extension GetClusterCredentialsWithIAMOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dbPassword = "DbPassword" - case dbUser = "DbUser" - case expiration = "Expiration" - case nextRefreshTime = "NextRefreshTime" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetClusterCredentialsWithIAMResult")) - let dbUserDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbUser) - dbUser = dbUserDecoded - let dbPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbPassword) - dbPassword = dbPasswordDecoded - let expirationDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expiration) - expiration = expirationDecoded - let nextRefreshTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .nextRefreshTime) - nextRefreshTime = nextRefreshTimeDecoded - } -} +enum GetClusterCredentialsWithIAMOutputError { -enum GetClusterCredentialsWithIAMOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetReservedNodeExchangeConfigurationOptionsInput: Swift.Encodable { - public func encode(to encoder: Swift.Encoder) throws { + enum CodingKeys: Swift.String, Swift.CodingKey { + case actionType = "ActionType" + case clusterIdentifier = "ClusterIdentifier" + case marker = "Marker" + case maxRecords = "MaxRecords" + case snapshotIdentifier = "SnapshotIdentifier" + } + + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let actionType = actionType { try container.encode(actionType, forKey: ClientRuntime.Key("ActionType")) @@ -23199,48 +16466,16 @@ public struct GetReservedNodeExchangeConfigurationOptionsInput: Swift.Equatable } } -struct GetReservedNodeExchangeConfigurationOptionsInputBody: Swift.Equatable { - let actionType: RedshiftClientTypes.ReservedNodeExchangeActionType? - let clusterIdentifier: Swift.String? - let snapshotIdentifier: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension GetReservedNodeExchangeConfigurationOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actionType = "ActionType" - case clusterIdentifier = "ClusterIdentifier" - case marker = "Marker" - case maxRecords = "MaxRecords" - case snapshotIdentifier = "SnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNodeExchangeActionType.self, forKey: .actionType) - actionType = actionTypeDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension GetReservedNodeExchangeConfigurationOptionsOutput { -extension GetReservedNodeExchangeConfigurationOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetReservedNodeExchangeConfigurationOptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedNodeConfigurationOptionList = output.reservedNodeConfigurationOptionList - } else { - self.marker = nil - self.reservedNodeConfigurationOptionList = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetReservedNodeExchangeConfigurationOptionsResult"] + var value = GetReservedNodeExchangeConfigurationOptionsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedNodeConfigurationOptionList = try reader["ReservedNodeConfigurationOptionList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ReservedNodeConfigurationOption.readingClosure, memberNodeInfo: "ReservedNodeConfigurationOption", isFlattened: false) + return value } } } @@ -23261,62 +16496,37 @@ public struct GetReservedNodeExchangeConfigurationOptionsOutput: Swift.Equatable } } -struct GetReservedNodeExchangeConfigurationOptionsOutputBody: Swift.Equatable { - let marker: Swift.String? - let reservedNodeConfigurationOptionList: [RedshiftClientTypes.ReservedNodeConfigurationOption]? -} +enum GetReservedNodeExchangeConfigurationOptionsOutputError { -extension GetReservedNodeExchangeConfigurationOptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedNodeConfigurationOptionList = "ReservedNodeConfigurationOptionList" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetReservedNodeExchangeConfigurationOptionsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.reservedNodeConfigurationOptionList) { - struct KeyVal0{struct ReservedNodeConfigurationOption{}} - let reservedNodeConfigurationOptionListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedNodeConfigurationOptionList) - if let reservedNodeConfigurationOptionListWrappedContainer = reservedNodeConfigurationOptionListWrappedContainer { - let reservedNodeConfigurationOptionListContainer = try reservedNodeConfigurationOptionListWrappedContainer.decodeIfPresent([RedshiftClientTypes.ReservedNodeConfigurationOption].self, forKey: .member) - var reservedNodeConfigurationOptionListBuffer:[RedshiftClientTypes.ReservedNodeConfigurationOption]? = nil - if let reservedNodeConfigurationOptionListContainer = reservedNodeConfigurationOptionListContainer { - reservedNodeConfigurationOptionListBuffer = [RedshiftClientTypes.ReservedNodeConfigurationOption]() - for structureContainer0 in reservedNodeConfigurationOptionListContainer { - reservedNodeConfigurationOptionListBuffer?.append(structureContainer0) - } - } - reservedNodeConfigurationOptionList = reservedNodeConfigurationOptionListBuffer - } else { - reservedNodeConfigurationOptionList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedNodeConfigurationOptionList = nil } } } -enum GetReservedNodeExchangeConfigurationOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetReservedNodeExchangeOfferingsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case marker = "Marker" + case maxRecords = "MaxRecords" + case reservedNodeId = "ReservedNodeId" } -} -extension GetReservedNodeExchangeOfferingsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let marker = marker { @@ -23362,40 +16572,16 @@ public struct GetReservedNodeExchangeOfferingsInput: Swift.Equatable { } } -struct GetReservedNodeExchangeOfferingsInputBody: Swift.Equatable { - let reservedNodeId: Swift.String? - let maxRecords: Swift.Int? - let marker: Swift.String? -} - -extension GetReservedNodeExchangeOfferingsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case maxRecords = "MaxRecords" - case reservedNodeId = "ReservedNodeId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeId) - reservedNodeId = reservedNodeIdDecoded - let maxRecordsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxRecords) - maxRecords = maxRecordsDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - } -} +extension GetReservedNodeExchangeOfferingsOutput { -extension GetReservedNodeExchangeOfferingsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetReservedNodeExchangeOfferingsOutputBody = try responseDecoder.decode(responseBody: data) - self.marker = output.marker - self.reservedNodeOfferings = output.reservedNodeOfferings - } else { - self.marker = nil - self.reservedNodeOfferings = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetReservedNodeExchangeOfferingsResult"] + var value = GetReservedNodeExchangeOfferingsOutput() + value.marker = try reader["Marker"].readIfPresent() + value.reservedNodeOfferings = try reader["ReservedNodeOfferings"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ReservedNodeOffering.readingClosure, memberNodeInfo: "ReservedNodeOffering", isFlattened: false) + return value } } } @@ -23416,60 +16602,33 @@ public struct GetReservedNodeExchangeOfferingsOutput: Swift.Equatable { } } -struct GetReservedNodeExchangeOfferingsOutputBody: Swift.Equatable { - let marker: Swift.String? - let reservedNodeOfferings: [RedshiftClientTypes.ReservedNodeOffering]? -} +enum GetReservedNodeExchangeOfferingsOutputError { -extension GetReservedNodeExchangeOfferingsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case marker = "Marker" - case reservedNodeOfferings = "ReservedNodeOfferings" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetReservedNodeExchangeOfferingsResult")) - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - if containerValues.contains(.reservedNodeOfferings) { - struct KeyVal0{struct ReservedNodeOffering{}} - let reservedNodeOfferingsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .reservedNodeOfferings) - if let reservedNodeOfferingsWrappedContainer = reservedNodeOfferingsWrappedContainer { - let reservedNodeOfferingsContainer = try reservedNodeOfferingsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ReservedNodeOffering].self, forKey: .member) - var reservedNodeOfferingsBuffer:[RedshiftClientTypes.ReservedNodeOffering]? = nil - if let reservedNodeOfferingsContainer = reservedNodeOfferingsContainer { - reservedNodeOfferingsBuffer = [RedshiftClientTypes.ReservedNodeOffering]() - for structureContainer0 in reservedNodeOfferingsContainer { - reservedNodeOfferingsBuffer?.append(structureContainer0) - } - } - reservedNodeOfferings = reservedNodeOfferingsBuffer - } else { - reservedNodeOfferings = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - reservedNodeOfferings = nil } } } -enum GetReservedNodeExchangeOfferingsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetResourcePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" } -} -extension GetResourcePolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -23500,30 +16659,15 @@ public struct GetResourcePolicyInput: Swift.Equatable { } } -struct GetResourcePolicyInputBody: Swift.Equatable { - let resourceArn: Swift.String? -} - -extension GetResourcePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - } -} +extension GetResourcePolicyOutput { -extension GetResourcePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetResourcePolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.resourcePolicy = output.resourcePolicy - } else { - self.resourcePolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetResourcePolicyResult"] + var value = GetResourcePolicyOutput() + value.resourcePolicy = try reader["ResourcePolicy"].readIfPresent(readingClosure: RedshiftClientTypes.ResourcePolicy.readingClosure) + return value } } } @@ -23540,36 +16684,26 @@ public struct GetResourcePolicyOutput: Swift.Equatable { } } -struct GetResourcePolicyOutputBody: Swift.Equatable { - let resourcePolicy: RedshiftClientTypes.ResourcePolicy? -} - -extension GetResourcePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourcePolicy = "ResourcePolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetResourcePolicyResult")) - let resourcePolicyDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ResourcePolicy.self, forKey: .resourcePolicy) - resourcePolicy = resourcePolicyDecoded - } -} +enum GetResourcePolicyOutputError { -enum GetResourcePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidPolicyFault": return try await InvalidPolicyFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidPolicyFault": return try await InvalidPolicyFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.HsmClientCertificate: Swift.Codable { +extension RedshiftClientTypes.HsmClientCertificate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" case hsmClientCertificatePublicKey = "HsmClientCertificatePublicKey" @@ -23598,30 +16732,14 @@ extension RedshiftClientTypes.HsmClientCertificate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmClientCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificateIdentifier) - hsmClientCertificateIdentifier = hsmClientCertificateIdentifierDecoded - let hsmClientCertificatePublicKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificatePublicKey) - hsmClientCertificatePublicKey = hsmClientCertificatePublicKeyDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.HsmClientCertificate() + value.hsmClientCertificateIdentifier = try reader["HsmClientCertificateIdentifier"].readIfPresent() + value.hsmClientCertificatePublicKey = try reader["HsmClientCertificatePublicKey"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -23651,16 +16769,14 @@ extension RedshiftClientTypes { } extension HsmClientCertificateAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HsmClientCertificateAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23688,33 +16804,15 @@ public struct HsmClientCertificateAlreadyExistsFault: ClientRuntime.ModeledError } } -struct HsmClientCertificateAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension HsmClientCertificateAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension HsmClientCertificateNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HsmClientCertificateNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23742,33 +16840,15 @@ public struct HsmClientCertificateNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct HsmClientCertificateNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension HsmClientCertificateNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension HsmClientCertificateQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HsmClientCertificateQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23796,23 +16876,7 @@ public struct HsmClientCertificateQuotaExceededFault: ClientRuntime.ModeledError } } -struct HsmClientCertificateQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension HsmClientCertificateQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.HsmConfiguration: Swift.Codable { +extension RedshiftClientTypes.HsmConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case description = "Description" case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" @@ -23849,34 +16913,16 @@ extension RedshiftClientTypes.HsmConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmConfigurationIdentifier) - hsmConfigurationIdentifier = hsmConfigurationIdentifierDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let hsmIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmIpAddress) - hsmIpAddress = hsmIpAddressDecoded - let hsmPartitionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmPartitionName) - hsmPartitionName = hsmPartitionNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.HsmConfiguration() + value.hsmConfigurationIdentifier = try reader["HsmConfigurationIdentifier"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.hsmIpAddress = try reader["HsmIpAddress"].readIfPresent() + value.hsmPartitionName = try reader["HsmPartitionName"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -23914,16 +16960,14 @@ extension RedshiftClientTypes { } extension HsmConfigurationAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HsmConfigurationAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -23951,33 +16995,15 @@ public struct HsmConfigurationAlreadyExistsFault: ClientRuntime.ModeledError, AW } } -struct HsmConfigurationAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension HsmConfigurationAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension HsmConfigurationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HsmConfigurationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24005,33 +17031,15 @@ public struct HsmConfigurationNotFoundFault: ClientRuntime.ModeledError, AWSClie } } -struct HsmConfigurationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension HsmConfigurationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension HsmConfigurationQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HsmConfigurationQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24059,23 +17067,7 @@ public struct HsmConfigurationQuotaExceededFault: ClientRuntime.ModeledError, AW } } -struct HsmConfigurationQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension HsmConfigurationQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.HsmStatus: Swift.Codable { +extension RedshiftClientTypes.HsmStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" @@ -24095,14 +17087,15 @@ extension RedshiftClientTypes.HsmStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hsmClientCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificateIdentifier) - hsmClientCertificateIdentifier = hsmClientCertificateIdentifierDecoded - let hsmConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmConfigurationIdentifier) - hsmConfigurationIdentifier = hsmConfigurationIdentifierDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.HsmStatus() + value.hsmClientCertificateIdentifier = try reader["HsmClientCertificateIdentifier"].readIfPresent() + value.hsmConfigurationIdentifier = try reader["HsmConfigurationIdentifier"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -24130,7 +17123,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.IPRange: Swift.Codable { +extension RedshiftClientTypes.IPRange: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cidrip = "CIDRIP" case status = "Status" @@ -24159,30 +17152,14 @@ extension RedshiftClientTypes.IPRange: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let cidripDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrip) - cidrip = cidripDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.IPRange() + value.status = try reader["Status"].readIfPresent() + value.cidrip = try reader["CIDRIP"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -24212,16 +17189,14 @@ extension RedshiftClientTypes { } extension InProgressTableRestoreQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InProgressTableRestoreQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24249,23 +17224,7 @@ public struct InProgressTableRestoreQuotaExceededFault: ClientRuntime.ModeledErr } } -struct InProgressTableRestoreQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InProgressTableRestoreQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.InboundIntegration: Swift.Codable { +extension RedshiftClientTypes.InboundIntegration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createTime = "CreateTime" case errors = "Errors" @@ -24306,37 +17265,18 @@ extension RedshiftClientTypes.InboundIntegration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let integrationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .integrationArn) - integrationArn = integrationArnDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let targetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetArn) - targetArn = targetArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ZeroETLIntegrationStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.errors) { - struct KeyVal0{struct IntegrationError{}} - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .errors) - if let errorsWrappedContainer = errorsWrappedContainer { - let errorsContainer = try errorsWrappedContainer.decodeIfPresent([RedshiftClientTypes.IntegrationError].self, forKey: .member) - var errorsBuffer:[RedshiftClientTypes.IntegrationError]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [RedshiftClientTypes.IntegrationError]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] - } - } else { - errors = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.InboundIntegration() + value.integrationArn = try reader["IntegrationArn"].readIfPresent() + value.sourceArn = try reader["SourceArn"].readIfPresent() + value.targetArn = try reader["TargetArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.errors = try reader["Errors"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.IntegrationError.readingClosure, memberNodeInfo: "IntegrationError", isFlattened: false) + value.createTime = try reader["CreateTime"].readTimestampIfPresent(format: .dateTime) + return value } - let createTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createTime) - createTime = createTimeDecoded } } @@ -24377,16 +17317,14 @@ extension RedshiftClientTypes { } extension IncompatibleOrderableOptions { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IncompatibleOrderableOptions() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24414,33 +17352,15 @@ public struct IncompatibleOrderableOptions: ClientRuntime.ModeledError, AWSClien } } -struct IncompatibleOrderableOptionsBody: Swift.Equatable { - let message: Swift.String? -} - -extension IncompatibleOrderableOptionsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientClusterCapacityFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientClusterCapacityFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24468,33 +17388,15 @@ public struct InsufficientClusterCapacityFault: ClientRuntime.ModeledError, AWSC } } -struct InsufficientClusterCapacityFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientClusterCapacityFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InsufficientS3BucketPolicyFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientS3BucketPolicyFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24522,23 +17424,7 @@ public struct InsufficientS3BucketPolicyFault: ClientRuntime.ModeledError, AWSCl } } -struct InsufficientS3BucketPolicyFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientS3BucketPolicyFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.IntegrationError: Swift.Codable { +extension RedshiftClientTypes.IntegrationError: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case errorCode = "ErrorCode" case errorMessage = "ErrorMessage" @@ -24554,12 +17440,14 @@ extension RedshiftClientTypes.IntegrationError: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorCode) - errorCode = errorCodeDecoded - let errorMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .errorMessage) - errorMessage = errorMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.IntegrationError() + value.errorCode = try reader["ErrorCode"].readIfPresent() + value.errorMessage = try reader["ErrorMessage"].readIfPresent() + return value + } } } @@ -24585,16 +17473,14 @@ extension RedshiftClientTypes { } extension IntegrationNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IntegrationNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24622,33 +17508,15 @@ public struct IntegrationNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct IntegrationNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension IntegrationNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidAuthenticationProfileRequestFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidAuthenticationProfileRequestFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24676,33 +17544,15 @@ public struct InvalidAuthenticationProfileRequestFault: ClientRuntime.ModeledErr } } -struct InvalidAuthenticationProfileRequestFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidAuthenticationProfileRequestFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidAuthorizationStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidAuthorizationStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24730,33 +17580,15 @@ public struct InvalidAuthorizationStateFault: ClientRuntime.ModeledError, AWSCli } } -struct InvalidAuthorizationStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidAuthorizationStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidClusterParameterGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidClusterParameterGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24784,33 +17616,15 @@ public struct InvalidClusterParameterGroupStateFault: ClientRuntime.ModeledError } } -struct InvalidClusterParameterGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidClusterParameterGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidClusterSecurityGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidClusterSecurityGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24838,33 +17652,15 @@ public struct InvalidClusterSecurityGroupStateFault: ClientRuntime.ModeledError, } } -struct InvalidClusterSecurityGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidClusterSecurityGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidClusterSnapshotScheduleStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidClusterSnapshotScheduleStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24892,33 +17688,15 @@ public struct InvalidClusterSnapshotScheduleStateFault: ClientRuntime.ModeledErr } } -struct InvalidClusterSnapshotScheduleStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidClusterSnapshotScheduleStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidClusterSnapshotStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidClusterSnapshotStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -24946,33 +17724,15 @@ public struct InvalidClusterSnapshotStateFault: ClientRuntime.ModeledError, AWSC } } -struct InvalidClusterSnapshotStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidClusterSnapshotStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidClusterStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidClusterStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25000,33 +17760,15 @@ public struct InvalidClusterStateFault: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidClusterStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidClusterStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidClusterSubnetGroupStateFault { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension InvalidClusterSubnetGroupStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidClusterSubnetGroupStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25054,33 +17796,15 @@ public struct InvalidClusterSubnetGroupStateFault: ClientRuntime.ModeledError, A } } -struct InvalidClusterSubnetGroupStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidClusterSubnetGroupStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidClusterSubnetStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidClusterSubnetStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25108,33 +17832,15 @@ public struct InvalidClusterSubnetStateFault: ClientRuntime.ModeledError, AWSCli } } -struct InvalidClusterSubnetStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidClusterSubnetStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidClusterTrackFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidClusterTrackFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25162,33 +17868,15 @@ public struct InvalidClusterTrackFault: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidClusterTrackFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidClusterTrackFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDataShareFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDataShareFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25216,33 +17904,15 @@ public struct InvalidDataShareFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct InvalidDataShareFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDataShareFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidElasticIpFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidElasticIpFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25270,33 +17940,15 @@ public struct InvalidElasticIpFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct InvalidElasticIpFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidElasticIpFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidEndpointStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidEndpointStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25324,33 +17976,15 @@ public struct InvalidEndpointStateFault: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidEndpointStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidEndpointStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidHsmClientCertificateStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidHsmClientCertificateStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25378,33 +18012,15 @@ public struct InvalidHsmClientCertificateStateFault: ClientRuntime.ModeledError, } } -struct InvalidHsmClientCertificateStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidHsmClientCertificateStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidHsmConfigurationStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidHsmConfigurationStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25432,33 +18048,15 @@ public struct InvalidHsmConfigurationStateFault: ClientRuntime.ModeledError, AWS } } -struct InvalidHsmConfigurationStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidHsmConfigurationStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidNamespaceFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidNamespaceFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25486,33 +18084,15 @@ public struct InvalidNamespaceFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct InvalidNamespaceFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidNamespaceFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidPolicyFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidPolicyFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25540,33 +18120,15 @@ public struct InvalidPolicyFault: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct InvalidPolicyFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidPolicyFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidReservedNodeStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidReservedNodeStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25594,33 +18156,15 @@ public struct InvalidReservedNodeStateFault: ClientRuntime.ModeledError, AWSClie } } -struct InvalidReservedNodeStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidReservedNodeStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidRestoreFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRestoreFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25648,33 +18192,15 @@ public struct InvalidRestoreFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct InvalidRestoreFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRestoreFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidRetentionPeriodFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRetentionPeriodFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25702,33 +18228,15 @@ public struct InvalidRetentionPeriodFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidRetentionPeriodFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRetentionPeriodFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidS3BucketNameFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidS3BucketNameFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25756,33 +18264,15 @@ public struct InvalidS3BucketNameFault: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidS3BucketNameFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidS3BucketNameFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidS3KeyPrefixFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidS3KeyPrefixFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25810,33 +18300,15 @@ public struct InvalidS3KeyPrefixFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct InvalidS3KeyPrefixFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidS3KeyPrefixFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidScheduleFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidScheduleFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25864,33 +18336,15 @@ public struct InvalidScheduleFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct InvalidScheduleFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidScheduleFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidScheduledActionFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidScheduledActionFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25918,33 +18372,15 @@ public struct InvalidScheduledActionFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidScheduledActionFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidScheduledActionFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSnapshotCopyGrantStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSnapshotCopyGrantStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -25972,33 +18408,15 @@ public struct InvalidSnapshotCopyGrantStateFault: ClientRuntime.ModeledError, AW } } -struct InvalidSnapshotCopyGrantStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSnapshotCopyGrantStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSubnet { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSubnet() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26026,33 +18444,15 @@ public struct InvalidSubnet: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct InvalidSubnetBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSubnetBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSubscriptionStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSubscriptionStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26080,33 +18480,15 @@ public struct InvalidSubscriptionStateFault: ClientRuntime.ModeledError, AWSClie } } -struct InvalidSubscriptionStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSubscriptionStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidTableRestoreArgumentFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTableRestoreArgumentFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26134,33 +18516,15 @@ public struct InvalidTableRestoreArgumentFault: ClientRuntime.ModeledError, AWSC } } -struct InvalidTableRestoreArgumentFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidTableRestoreArgumentFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidTagFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTagFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26188,33 +18552,15 @@ public struct InvalidTagFault: ClientRuntime.ModeledError, AWSClientRuntime.AWSS } } -struct InvalidTagFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidTagFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidUsageLimitFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidUsageLimitFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26242,33 +18588,15 @@ public struct InvalidUsageLimitFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidUsageLimitFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidUsageLimitFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidVPCNetworkStateFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidVPCNetworkStateFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26296,33 +18624,15 @@ public struct InvalidVPCNetworkStateFault: ClientRuntime.ModeledError, AWSClient } } -struct InvalidVPCNetworkStateFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidVPCNetworkStateFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension Ipv6CidrBlockNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = Ipv6CidrBlockNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26350,23 +18660,7 @@ public struct Ipv6CidrBlockNotFoundFault: ClientRuntime.ModeledError, AWSClientR } } -struct Ipv6CidrBlockNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension Ipv6CidrBlockNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.LakeFormationQuery: Swift.Codable { +extension RedshiftClientTypes.LakeFormationQuery: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authorization = "Authorization" } @@ -26378,10 +18672,13 @@ extension RedshiftClientTypes.LakeFormationQuery: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let authorizationDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ServiceAuthorization.self, forKey: .authorization) - authorization = authorizationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.LakeFormationQuery() + value.authorization = try reader["Authorization"].readIfPresent() + return value + } } } @@ -26402,7 +18699,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.LakeFormationScopeUnion: Swift.Codable { +extension RedshiftClientTypes.LakeFormationScopeUnion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lakeformationquery = "LakeFormationQuery" case sdkUnknown @@ -26418,14 +18715,17 @@ extension RedshiftClientTypes.LakeFormationScopeUnion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let values = try decoder.container(keyedBy: CodingKeys.self) - let lakeformationqueryDecoded = try values.decodeIfPresent(RedshiftClientTypes.LakeFormationQuery.self, forKey: .lakeformationquery) - if let lakeformationquery = lakeformationqueryDecoded { - self = .lakeformationquery(lakeformationquery) - return + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + let name = reader.children.first?.nodeInfo.name + switch name { + case "LakeFormationQuery": + return .lakeformationquery(try reader["LakeFormationQuery"].read(readingClosure: RedshiftClientTypes.LakeFormationQuery.readingClosure)) + default: + return .sdkUnknown(name ?? "") + } } - self = .sdkUnknown("") } } @@ -26440,16 +18740,14 @@ extension RedshiftClientTypes { } extension LimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -26477,22 +18775,6 @@ public struct LimitExceededFault: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct LimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension LimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum LogDestinationType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case cloudwatch @@ -26525,7 +18807,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.MaintenanceTrack: Swift.Codable { +extension RedshiftClientTypes.MaintenanceTrack: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case databaseVersion = "DatabaseVersion" case maintenanceTrackName = "MaintenanceTrackName" @@ -26554,30 +18836,14 @@ extension RedshiftClientTypes.MaintenanceTrack: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let databaseVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseVersion) - databaseVersion = databaseVersionDecoded - if containerValues.contains(.updateTargets) { - struct KeyVal0{struct UpdateTarget{}} - let updateTargetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .updateTargets) - if let updateTargetsWrappedContainer = updateTargetsWrappedContainer { - let updateTargetsContainer = try updateTargetsWrappedContainer.decodeIfPresent([RedshiftClientTypes.UpdateTarget].self, forKey: .member) - var updateTargetsBuffer:[RedshiftClientTypes.UpdateTarget]? = nil - if let updateTargetsContainer = updateTargetsContainer { - updateTargetsBuffer = [RedshiftClientTypes.UpdateTarget]() - for structureContainer0 in updateTargetsContainer { - updateTargetsBuffer?.append(structureContainer0) - } - } - updateTargets = updateTargetsBuffer - } else { - updateTargets = [] - } - } else { - updateTargets = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.MaintenanceTrack() + value.maintenanceTrackName = try reader["MaintenanceTrackName"].readIfPresent() + value.databaseVersion = try reader["DatabaseVersion"].readIfPresent() + value.updateTargets = try reader["UpdateTargets"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.UpdateTarget.readingClosure, memberNodeInfo: "UpdateTarget", isFlattened: false) + return value } } } @@ -26639,6 +18905,11 @@ extension RedshiftClientTypes { } extension ModifyAquaConfigurationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case aquaConfigurationStatus = "AquaConfigurationStatus" + case clusterIdentifier = "ClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let aquaConfigurationStatus = aquaConfigurationStatus { @@ -26676,34 +18947,15 @@ public struct ModifyAquaConfigurationInput: Swift.Equatable { } } -struct ModifyAquaConfigurationInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let aquaConfigurationStatus: RedshiftClientTypes.AquaConfigurationStatus? -} +extension ModifyAquaConfigurationOutput { -extension ModifyAquaConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case aquaConfigurationStatus = "AquaConfigurationStatus" - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let aquaConfigurationStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AquaConfigurationStatus.self, forKey: .aquaConfigurationStatus) - aquaConfigurationStatus = aquaConfigurationStatusDecoded - } -} - -extension ModifyAquaConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyAquaConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.aquaConfiguration = output.aquaConfiguration - } else { - self.aquaConfiguration = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyAquaConfigurationResult"] + var value = ModifyAquaConfigurationOutput() + value.aquaConfiguration = try reader["AquaConfiguration"].readIfPresent(readingClosure: RedshiftClientTypes.AquaConfiguration.readingClosure) + return value } } } @@ -26720,36 +18972,31 @@ public struct ModifyAquaConfigurationOutput: Swift.Equatable { } } -struct ModifyAquaConfigurationOutputBody: Swift.Equatable { - let aquaConfiguration: RedshiftClientTypes.AquaConfiguration? -} - -extension ModifyAquaConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case aquaConfiguration = "AquaConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyAquaConfigurationResult")) - let aquaConfigurationDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AquaConfiguration.self, forKey: .aquaConfiguration) - aquaConfiguration = aquaConfigurationDecoded - } -} +enum ModifyAquaConfigurationOutputError { -enum ModifyAquaConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyAuthenticationProfileInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case authenticationProfileContent = "AuthenticationProfileContent" + case authenticationProfileName = "AuthenticationProfileName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authenticationProfileContent = authenticationProfileContent { @@ -26788,36 +19035,16 @@ public struct ModifyAuthenticationProfileInput: Swift.Equatable { } } -struct ModifyAuthenticationProfileInputBody: Swift.Equatable { - let authenticationProfileName: Swift.String? - let authenticationProfileContent: Swift.String? -} - -extension ModifyAuthenticationProfileInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationProfileContent = "AuthenticationProfileContent" - case authenticationProfileName = "AuthenticationProfileName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let authenticationProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileName) - authenticationProfileName = authenticationProfileNameDecoded - let authenticationProfileContentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileContent) - authenticationProfileContent = authenticationProfileContentDecoded - } -} +extension ModifyAuthenticationProfileOutput { -extension ModifyAuthenticationProfileOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyAuthenticationProfileOutputBody = try responseDecoder.decode(responseBody: data) - self.authenticationProfileContent = output.authenticationProfileContent - self.authenticationProfileName = output.authenticationProfileName - } else { - self.authenticationProfileContent = nil - self.authenticationProfileName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyAuthenticationProfileResult"] + var value = ModifyAuthenticationProfileOutput() + value.authenticationProfileContent = try reader["AuthenticationProfileContent"].readIfPresent() + value.authenticationProfileName = try reader["AuthenticationProfileName"].readIfPresent() + return value } } } @@ -26838,40 +19065,31 @@ public struct ModifyAuthenticationProfileOutput: Swift.Equatable { } } -struct ModifyAuthenticationProfileOutputBody: Swift.Equatable { - let authenticationProfileName: Swift.String? - let authenticationProfileContent: Swift.String? -} - -extension ModifyAuthenticationProfileOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticationProfileContent = "AuthenticationProfileContent" - case authenticationProfileName = "AuthenticationProfileName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyAuthenticationProfileResult")) - let authenticationProfileNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileName) - authenticationProfileName = authenticationProfileNameDecoded - let authenticationProfileContentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticationProfileContent) - authenticationProfileContent = authenticationProfileContentDecoded - } -} +enum ModifyAuthenticationProfileOutputError { -enum ModifyAuthenticationProfileOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthenticationProfileNotFoundFault": return try await AuthenticationProfileNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AuthenticationProfileQuotaExceededFault": return try await AuthenticationProfileQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidAuthenticationProfileRequestFault": return try await InvalidAuthenticationProfileRequestFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthenticationProfileNotFoundFault": return try await AuthenticationProfileNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "AuthenticationProfileQuotaExceededFault": return try await AuthenticationProfileQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidAuthenticationProfileRequestFault": return try await InvalidAuthenticationProfileRequestFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyClusterDbRevisionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case revisionTarget = "RevisionTarget" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -26910,34 +19128,15 @@ public struct ModifyClusterDbRevisionInput: Swift.Equatable { } } -struct ModifyClusterDbRevisionInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let revisionTarget: Swift.String? -} - -extension ModifyClusterDbRevisionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case revisionTarget = "RevisionTarget" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let revisionTargetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .revisionTarget) - revisionTarget = revisionTargetDecoded - } -} +extension ModifyClusterDbRevisionOutput { -extension ModifyClusterDbRevisionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyClusterDbRevisionOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyClusterDbRevisionResult"] + var value = ModifyClusterDbRevisionOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -26954,37 +19153,34 @@ public struct ModifyClusterDbRevisionOutput: Swift.Equatable { } } -struct ModifyClusterDbRevisionOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension ModifyClusterDbRevisionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } +enum ModifyClusterDbRevisionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyClusterDbRevisionResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} - -enum ModifyClusterDbRevisionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterOnLatestRevision": return try await ClusterOnLatestRevisionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterOnLatestRevision": return try await ClusterOnLatestRevisionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyClusterIamRolesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case addIamRoles = "AddIamRoles" + case clusterIdentifier = "ClusterIdentifier" + case defaultIamRoleArn = "DefaultIamRoleArn" + case removeIamRoles = "RemoveIamRoles" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let addIamRoles = addIamRoles { @@ -27055,76 +19251,15 @@ public struct ModifyClusterIamRolesInput: Swift.Equatable { } } -struct ModifyClusterIamRolesInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let addIamRoles: [Swift.String]? - let removeIamRoles: [Swift.String]? - let defaultIamRoleArn: Swift.String? -} - -extension ModifyClusterIamRolesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addIamRoles = "AddIamRoles" - case clusterIdentifier = "ClusterIdentifier" - case defaultIamRoleArn = "DefaultIamRoleArn" - case removeIamRoles = "RemoveIamRoles" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - if containerValues.contains(.addIamRoles) { - struct KeyVal0{struct IamRoleArn{}} - let addIamRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addIamRoles) - if let addIamRolesWrappedContainer = addIamRolesWrappedContainer { - let addIamRolesContainer = try addIamRolesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var addIamRolesBuffer:[Swift.String]? = nil - if let addIamRolesContainer = addIamRolesContainer { - addIamRolesBuffer = [Swift.String]() - for stringContainer0 in addIamRolesContainer { - addIamRolesBuffer?.append(stringContainer0) - } - } - addIamRoles = addIamRolesBuffer - } else { - addIamRoles = [] - } - } else { - addIamRoles = nil - } - if containerValues.contains(.removeIamRoles) { - struct KeyVal0{struct IamRoleArn{}} - let removeIamRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeIamRoles) - if let removeIamRolesWrappedContainer = removeIamRolesWrappedContainer { - let removeIamRolesContainer = try removeIamRolesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeIamRolesBuffer:[Swift.String]? = nil - if let removeIamRolesContainer = removeIamRolesContainer { - removeIamRolesBuffer = [Swift.String]() - for stringContainer0 in removeIamRolesContainer { - removeIamRolesBuffer?.append(stringContainer0) - } - } - removeIamRoles = removeIamRolesBuffer - } else { - removeIamRoles = [] - } - } else { - removeIamRoles = nil - } - let defaultIamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultIamRoleArn) - defaultIamRoleArn = defaultIamRoleArnDecoded - } -} +extension ModifyClusterIamRolesOutput { -extension ModifyClusterIamRolesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyClusterIamRolesOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyClusterIamRolesResult"] + var value = ModifyClusterIamRolesOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -27141,30 +19276,20 @@ public struct ModifyClusterIamRolesOutput: Swift.Equatable { } } -struct ModifyClusterIamRolesOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension ModifyClusterIamRolesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyClusterIamRolesResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum ModifyClusterIamRolesOutputError { -enum ModifyClusterIamRolesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -27175,6 +19300,38 @@ extension ModifyClusterInput: Swift.CustomDebugStringConvertible { } extension ModifyClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case allowVersionUpgrade = "AllowVersionUpgrade" + case automatedSnapshotRetentionPeriod = "AutomatedSnapshotRetentionPeriod" + case availabilityZone = "AvailabilityZone" + case availabilityZoneRelocation = "AvailabilityZoneRelocation" + case clusterIdentifier = "ClusterIdentifier" + case clusterParameterGroupName = "ClusterParameterGroupName" + case clusterSecurityGroups = "ClusterSecurityGroups" + case clusterType = "ClusterType" + case clusterVersion = "ClusterVersion" + case elasticIp = "ElasticIp" + case encrypted = "Encrypted" + case enhancedVpcRouting = "EnhancedVpcRouting" + case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" + case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" + case ipAddressType = "IpAddressType" + case kmsKeyId = "KmsKeyId" + case maintenanceTrackName = "MaintenanceTrackName" + case manageMasterPassword = "ManageMasterPassword" + case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" + case masterPasswordSecretKmsKeyId = "MasterPasswordSecretKmsKeyId" + case masterUserPassword = "MasterUserPassword" + case multiAZ = "MultiAZ" + case newClusterIdentifier = "NewClusterIdentifier" + case nodeType = "NodeType" + case numberOfNodes = "NumberOfNodes" + case port = "Port" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case publiclyAccessible = "PubliclyAccessible" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let allowVersionUpgrade = allowVersionUpgrade { @@ -27449,169 +19606,16 @@ public struct ModifyClusterInput: Swift.Equatable { } } -struct ModifyClusterInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let clusterType: Swift.String? - let nodeType: Swift.String? - let numberOfNodes: Swift.Int? - let clusterSecurityGroups: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let masterUserPassword: Swift.String? - let clusterParameterGroupName: Swift.String? - let automatedSnapshotRetentionPeriod: Swift.Int? - let manualSnapshotRetentionPeriod: Swift.Int? - let preferredMaintenanceWindow: Swift.String? - let clusterVersion: Swift.String? - let allowVersionUpgrade: Swift.Bool? - let hsmClientCertificateIdentifier: Swift.String? - let hsmConfigurationIdentifier: Swift.String? - let newClusterIdentifier: Swift.String? - let publiclyAccessible: Swift.Bool? - let elasticIp: Swift.String? - let enhancedVpcRouting: Swift.Bool? - let maintenanceTrackName: Swift.String? - let encrypted: Swift.Bool? - let kmsKeyId: Swift.String? - let availabilityZoneRelocation: Swift.Bool? - let availabilityZone: Swift.String? - let port: Swift.Int? - let manageMasterPassword: Swift.Bool? - let masterPasswordSecretKmsKeyId: Swift.String? - let ipAddressType: Swift.String? - let multiAZ: Swift.Bool? -} - -extension ModifyClusterInputBody: Swift.Decodable { +extension ModifyClusterMaintenanceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case allowVersionUpgrade = "AllowVersionUpgrade" - case automatedSnapshotRetentionPeriod = "AutomatedSnapshotRetentionPeriod" - case availabilityZone = "AvailabilityZone" - case availabilityZoneRelocation = "AvailabilityZoneRelocation" case clusterIdentifier = "ClusterIdentifier" - case clusterParameterGroupName = "ClusterParameterGroupName" - case clusterSecurityGroups = "ClusterSecurityGroups" - case clusterType = "ClusterType" - case clusterVersion = "ClusterVersion" - case elasticIp = "ElasticIp" - case encrypted = "Encrypted" - case enhancedVpcRouting = "EnhancedVpcRouting" - case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" - case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" - case ipAddressType = "IpAddressType" - case kmsKeyId = "KmsKeyId" - case maintenanceTrackName = "MaintenanceTrackName" - case manageMasterPassword = "ManageMasterPassword" - case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" - case masterPasswordSecretKmsKeyId = "MasterPasswordSecretKmsKeyId" - case masterUserPassword = "MasterUserPassword" - case multiAZ = "MultiAZ" - case newClusterIdentifier = "NewClusterIdentifier" - case nodeType = "NodeType" - case numberOfNodes = "NumberOfNodes" - case port = "Port" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case publiclyAccessible = "PubliclyAccessible" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let clusterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterType) - clusterType = clusterTypeDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - if containerValues.contains(.clusterSecurityGroups) { - struct KeyVal0{struct ClusterSecurityGroupName{}} - let clusterSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterSecurityGroups) - if let clusterSecurityGroupsWrappedContainer = clusterSecurityGroupsWrappedContainer { - let clusterSecurityGroupsContainer = try clusterSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var clusterSecurityGroupsBuffer:[Swift.String]? = nil - if let clusterSecurityGroupsContainer = clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer?.append(stringContainer0) - } - } - clusterSecurityGroups = clusterSecurityGroupsBuffer - } else { - clusterSecurityGroups = [] - } - } else { - clusterSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let clusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterParameterGroupName) - clusterParameterGroupName = clusterParameterGroupNameDecoded - let automatedSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .automatedSnapshotRetentionPeriod) - automatedSnapshotRetentionPeriod = automatedSnapshotRetentionPeriodDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let allowVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowVersionUpgrade) - allowVersionUpgrade = allowVersionUpgradeDecoded - let hsmClientCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificateIdentifier) - hsmClientCertificateIdentifier = hsmClientCertificateIdentifierDecoded - let hsmConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmConfigurationIdentifier) - hsmConfigurationIdentifier = hsmConfigurationIdentifierDecoded - let newClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newClusterIdentifier) - newClusterIdentifier = newClusterIdentifierDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let elasticIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticIp) - elasticIp = elasticIpDecoded - let enhancedVpcRoutingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enhancedVpcRouting) - enhancedVpcRouting = enhancedVpcRoutingDecoded - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let availabilityZoneRelocationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .availabilityZoneRelocation) - availabilityZoneRelocation = availabilityZoneRelocationDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let manageMasterPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterPassword) - manageMasterPassword = manageMasterPasswordDecoded - let masterPasswordSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterPasswordSecretKmsKeyId) - masterPasswordSecretKmsKeyId = masterPasswordSecretKmsKeyIdDecoded - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded + case deferMaintenance = "DeferMaintenance" + case deferMaintenanceDuration = "DeferMaintenanceDuration" + case deferMaintenanceEndTime = "DeferMaintenanceEndTime" + case deferMaintenanceIdentifier = "DeferMaintenanceIdentifier" + case deferMaintenanceStartTime = "DeferMaintenanceStartTime" } -} -extension ModifyClusterMaintenanceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -27677,50 +19681,15 @@ public struct ModifyClusterMaintenanceInput: Swift.Equatable { } } -struct ModifyClusterMaintenanceInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let deferMaintenance: Swift.Bool? - let deferMaintenanceIdentifier: Swift.String? - let deferMaintenanceStartTime: ClientRuntime.Date? - let deferMaintenanceEndTime: ClientRuntime.Date? - let deferMaintenanceDuration: Swift.Int? -} - -extension ModifyClusterMaintenanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case deferMaintenance = "DeferMaintenance" - case deferMaintenanceDuration = "DeferMaintenanceDuration" - case deferMaintenanceEndTime = "DeferMaintenanceEndTime" - case deferMaintenanceIdentifier = "DeferMaintenanceIdentifier" - case deferMaintenanceStartTime = "DeferMaintenanceStartTime" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let deferMaintenanceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deferMaintenance) - deferMaintenance = deferMaintenanceDecoded - let deferMaintenanceIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deferMaintenanceIdentifier) - deferMaintenanceIdentifier = deferMaintenanceIdentifierDecoded - let deferMaintenanceStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deferMaintenanceStartTime) - deferMaintenanceStartTime = deferMaintenanceStartTimeDecoded - let deferMaintenanceEndTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .deferMaintenanceEndTime) - deferMaintenanceEndTime = deferMaintenanceEndTimeDecoded - let deferMaintenanceDurationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deferMaintenanceDuration) - deferMaintenanceDuration = deferMaintenanceDurationDecoded - } -} +extension ModifyClusterMaintenanceOutput { -extension ModifyClusterMaintenanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyClusterMaintenanceOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyClusterMaintenanceResult"] + var value = ModifyClusterMaintenanceOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -27737,42 +19706,33 @@ public struct ModifyClusterMaintenanceOutput: Swift.Equatable { } } -struct ModifyClusterMaintenanceOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension ModifyClusterMaintenanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyClusterMaintenanceResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum ModifyClusterMaintenanceOutputError { -enum ModifyClusterMaintenanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension ModifyClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil +extension ModifyClusterOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyClusterResult"] + var value = ModifyClusterOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -27789,55 +19749,50 @@ public struct ModifyClusterOutput: Swift.Equatable { } } -struct ModifyClusterOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension ModifyClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyClusterResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} - -enum ModifyClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterAlreadyExists": return try await ClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomCnameAssociationFault": return try await CustomCnameAssociationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterTrack": return try await InvalidClusterTrackFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidElasticIpFault": return try await InvalidElasticIpFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Ipv6CidrBlockNotFoundFault": return try await Ipv6CidrBlockNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededFault": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NumberOfNodesPerClusterLimitExceeded": return try await NumberOfNodesPerClusterLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NumberOfNodesQuotaExceeded": return try await NumberOfNodesQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TableLimitExceeded": return try await TableLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOptionFault": return try await UnsupportedOptionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ModifyClusterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterAlreadyExists": return try await ClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomCnameAssociationFault": return try await CustomCnameAssociationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterTrack": return try await InvalidClusterTrackFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidElasticIpFault": return try await InvalidElasticIpFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Ipv6CidrBlockNotFoundFault": return try await Ipv6CidrBlockNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededFault": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NumberOfNodesPerClusterLimitExceeded": return try await NumberOfNodesPerClusterLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NumberOfNodesQuotaExceeded": return try await NumberOfNodesQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TableLimitExceeded": return try await TableLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOptionFault": return try await UnsupportedOptionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyClusterParameterGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case parameterGroupName = "ParameterGroupName" + case parameters = "Parameters" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let parameterGroupName = parameterGroupName { @@ -27886,53 +19841,16 @@ public struct ModifyClusterParameterGroupInput: Swift.Equatable { } } -struct ModifyClusterParameterGroupInputBody: Swift.Equatable { - let parameterGroupName: Swift.String? - let parameters: [RedshiftClientTypes.Parameter]? -} - -extension ModifyClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case parameterGroupName = "ParameterGroupName" - case parameters = "Parameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RedshiftClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RedshiftClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RedshiftClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ModifyClusterParameterGroupOutput { -extension ModifyClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.parameterGroupName = output.parameterGroupName - self.parameterGroupStatus = output.parameterGroupStatus - } else { - self.parameterGroupName = nil - self.parameterGroupStatus = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyClusterParameterGroupResult"] + var value = ModifyClusterParameterGroupOutput() + value.parameterGroupName = try reader["ParameterGroupName"].readIfPresent() + value.parameterGroupStatus = try reader["ParameterGroupStatus"].readIfPresent() + return value } } } @@ -27954,39 +19872,31 @@ public struct ModifyClusterParameterGroupOutput: Swift.Equatable { } } -struct ModifyClusterParameterGroupOutputBody: Swift.Equatable { - let parameterGroupName: Swift.String? - let parameterGroupStatus: Swift.String? -} - -extension ModifyClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case parameterGroupName = "ParameterGroupName" - case parameterGroupStatus = "ParameterGroupStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyClusterParameterGroupResult")) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - let parameterGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupStatus) - parameterGroupStatus = parameterGroupStatusDecoded - } -} +enum ModifyClusterParameterGroupOutputError { -enum ModifyClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterParameterGroupState": return try await InvalidClusterParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterParameterGroupState": return try await InvalidClusterParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case force = "Force" + case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" + case snapshotIdentifier = "SnapshotIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let force = force { @@ -28031,38 +19941,15 @@ public struct ModifyClusterSnapshotInput: Swift.Equatable { } } -struct ModifyClusterSnapshotInputBody: Swift.Equatable { - let snapshotIdentifier: Swift.String? - let manualSnapshotRetentionPeriod: Swift.Int? - let force: Swift.Bool? -} - -extension ModifyClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case force = "Force" - case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" - case snapshotIdentifier = "SnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - } -} +extension ModifyClusterSnapshotOutput { -extension ModifyClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyClusterSnapshotResult"] + var value = ModifyClusterSnapshotOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: RedshiftClientTypes.Snapshot.readingClosure) + return value } } } @@ -28079,36 +19966,32 @@ public struct ModifyClusterSnapshotOutput: Swift.Equatable { } } -struct ModifyClusterSnapshotOutputBody: Swift.Equatable { - let snapshot: RedshiftClientTypes.Snapshot? -} - -extension ModifyClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyClusterSnapshotResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum ModifyClusterSnapshotOutputError { -enum ModifyClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyClusterSnapshotScheduleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case disassociateSchedule = "DisassociateSchedule" + case scheduleIdentifier = "ScheduleIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -28153,32 +20036,12 @@ public struct ModifyClusterSnapshotScheduleInput: Swift.Equatable { } } -struct ModifyClusterSnapshotScheduleInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let scheduleIdentifier: Swift.String? - let disassociateSchedule: Swift.Bool? -} - -extension ModifyClusterSnapshotScheduleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case disassociateSchedule = "DisassociateSchedule" - case scheduleIdentifier = "ScheduleIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let scheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleIdentifier) - scheduleIdentifier = scheduleIdentifierDecoded - let disassociateScheduleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disassociateSchedule) - disassociateSchedule = disassociateScheduleDecoded - } -} +extension ModifyClusterSnapshotScheduleOutput { -extension ModifyClusterSnapshotScheduleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ModifyClusterSnapshotScheduleOutput() + } } } @@ -28187,19 +20050,32 @@ public struct ModifyClusterSnapshotScheduleOutput: Swift.Equatable { public init() { } } -enum ModifyClusterSnapshotScheduleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSnapshotScheduleState": return try await InvalidClusterSnapshotScheduleStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ModifyClusterSnapshotScheduleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSnapshotScheduleState": return try await InvalidClusterSnapshotScheduleStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyClusterSubnetGroupInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterSubnetGroupName = "ClusterSubnetGroupName" + case description = "Description" + case subnetIds = "SubnetIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterSubnetGroupName = clusterSubnetGroupName { @@ -28245,65 +20121,25 @@ public struct ModifyClusterSubnetGroupInput: Swift.Equatable { public init( clusterSubnetGroupName: Swift.String? = nil, - description: Swift.String? = nil, - subnetIds: [Swift.String]? = nil - ) - { - self.clusterSubnetGroupName = clusterSubnetGroupName - self.description = description - self.subnetIds = subnetIds - } -} - -struct ModifyClusterSubnetGroupInputBody: Swift.Equatable { - let clusterSubnetGroupName: Swift.String? - let description: Swift.String? - let subnetIds: [Swift.String]? -} - -extension ModifyClusterSubnetGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSubnetGroupName = "ClusterSubnetGroupName" - case description = "Description" - case subnetIds = "SubnetIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSubnetGroupName) - clusterSubnetGroupName = clusterSubnetGroupNameDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - if containerValues.contains(.subnetIds) { - struct KeyVal0{struct SubnetIdentifier{}} - let subnetIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subnetIds) - if let subnetIdsWrappedContainer = subnetIdsWrappedContainer { - let subnetIdsContainer = try subnetIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var subnetIdsBuffer:[Swift.String]? = nil - if let subnetIdsContainer = subnetIdsContainer { - subnetIdsBuffer = [Swift.String]() - for stringContainer0 in subnetIdsContainer { - subnetIdsBuffer?.append(stringContainer0) - } - } - subnetIds = subnetIdsBuffer - } else { - subnetIds = [] - } - } else { - subnetIds = nil - } + description: Swift.String? = nil, + subnetIds: [Swift.String]? = nil + ) + { + self.clusterSubnetGroupName = clusterSubnetGroupName + self.description = description + self.subnetIds = subnetIds } } -extension ModifyClusterSubnetGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyClusterSubnetGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterSubnetGroup = output.clusterSubnetGroup - } else { - self.clusterSubnetGroup = nil +extension ModifyClusterSubnetGroupOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyClusterSubnetGroupResult"] + var value = ModifyClusterSubnetGroupOutput() + value.clusterSubnetGroup = try reader["ClusterSubnetGroup"].readIfPresent(readingClosure: RedshiftClientTypes.ClusterSubnetGroup.readingClosure) + return value } } } @@ -28320,39 +20156,35 @@ public struct ModifyClusterSubnetGroupOutput: Swift.Equatable { } } -struct ModifyClusterSubnetGroupOutputBody: Swift.Equatable { - let clusterSubnetGroup: RedshiftClientTypes.ClusterSubnetGroup? -} - -extension ModifyClusterSubnetGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSubnetGroup = "ClusterSubnetGroup" - } +enum ModifyClusterSubnetGroupOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyClusterSubnetGroupResult")) - let clusterSubnetGroupDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ClusterSubnetGroup.self, forKey: .clusterSubnetGroup) - clusterSubnetGroup = clusterSubnetGroupDecoded - } -} - -enum ModifyClusterSubnetGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSubnetQuotaExceededFault": return try await ClusterSubnetQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubnetAlreadyInUse": return try await SubnetAlreadyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSubnetQuotaExceededFault": return try await ClusterSubnetQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubnetAlreadyInUse": return try await SubnetAlreadyInUse.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyCustomDomainAssociationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case customDomainCertificateArn = "CustomDomainCertificateArn" + case customDomainName = "CustomDomainName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -28399,44 +20231,18 @@ public struct ModifyCustomDomainAssociationInput: Swift.Equatable { } } -struct ModifyCustomDomainAssociationInputBody: Swift.Equatable { - let customDomainName: Swift.String? - let customDomainCertificateArn: Swift.String? - let clusterIdentifier: Swift.String? -} - -extension ModifyCustomDomainAssociationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case customDomainCertificateArn = "CustomDomainCertificateArn" - case customDomainName = "CustomDomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - let customDomainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertificateArn) - customDomainCertificateArn = customDomainCertificateArnDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} +extension ModifyCustomDomainAssociationOutput { -extension ModifyCustomDomainAssociationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyCustomDomainAssociationOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterIdentifier = output.clusterIdentifier - self.customDomainCertExpiryTime = output.customDomainCertExpiryTime - self.customDomainCertificateArn = output.customDomainCertificateArn - self.customDomainName = output.customDomainName - } else { - self.clusterIdentifier = nil - self.customDomainCertExpiryTime = nil - self.customDomainCertificateArn = nil - self.customDomainName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyCustomDomainAssociationResult"] + var value = ModifyCustomDomainAssociationOutput() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.customDomainCertExpiryTime = try reader["CustomDomainCertExpiryTime"].readIfPresent() + value.customDomainCertificateArn = try reader["CustomDomainCertificateArn"].readIfPresent() + value.customDomainName = try reader["CustomDomainName"].readIfPresent() + return value } } } @@ -28465,49 +20271,32 @@ public struct ModifyCustomDomainAssociationOutput: Swift.Equatable { } } -struct ModifyCustomDomainAssociationOutputBody: Swift.Equatable { - let customDomainName: Swift.String? - let customDomainCertificateArn: Swift.String? - let clusterIdentifier: Swift.String? - let customDomainCertExpiryTime: Swift.String? -} - -extension ModifyCustomDomainAssociationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case customDomainCertExpiryTime = "CustomDomainCertExpiryTime" - case customDomainCertificateArn = "CustomDomainCertificateArn" - case customDomainName = "CustomDomainName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyCustomDomainAssociationResult")) - let customDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainName) - customDomainName = customDomainNameDecoded - let customDomainCertificateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertificateArn) - customDomainCertificateArn = customDomainCertificateArnDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let customDomainCertExpiryTimeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customDomainCertExpiryTime) - customDomainCertExpiryTime = customDomainCertExpiryTimeDecoded - } -} +enum ModifyCustomDomainAssociationOutputError { -enum ModifyCustomDomainAssociationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomCnameAssociationFault": return try await CustomCnameAssociationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomDomainAssociationNotFoundFault": return try await CustomDomainAssociationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomCnameAssociationFault": return try await CustomCnameAssociationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomDomainAssociationNotFoundFault": return try await CustomDomainAssociationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyEndpointAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case endpointName = "EndpointName" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let endpointName = endpointName { @@ -28554,69 +20343,24 @@ public struct ModifyEndpointAccessInput: Swift.Equatable { } } -struct ModifyEndpointAccessInputBody: Swift.Equatable { - let endpointName: Swift.String? - let vpcSecurityGroupIds: [Swift.String]? -} - -extension ModifyEndpointAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpointName = "EndpointName" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension ModifyEndpointAccessOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let endpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointName) - endpointName = endpointNameDecoded - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - } -} - -extension ModifyEndpointAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyEndpointAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.address = output.address - self.clusterIdentifier = output.clusterIdentifier - self.endpointCreateTime = output.endpointCreateTime - self.endpointName = output.endpointName - self.endpointStatus = output.endpointStatus - self.port = output.port - self.resourceOwner = output.resourceOwner - self.subnetGroupName = output.subnetGroupName - self.vpcEndpoint = output.vpcEndpoint - self.vpcSecurityGroups = output.vpcSecurityGroups - } else { - self.address = nil - self.clusterIdentifier = nil - self.endpointCreateTime = nil - self.endpointName = nil - self.endpointStatus = nil - self.port = nil - self.resourceOwner = nil - self.subnetGroupName = nil - self.vpcEndpoint = nil - self.vpcSecurityGroups = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyEndpointAccessResult"] + var value = ModifyEndpointAccessOutput() + value.address = try reader["Address"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.endpointCreateTime = try reader["EndpointCreateTime"].readTimestampIfPresent(format: .dateTime) + value.endpointName = try reader["EndpointName"].readIfPresent() + value.endpointStatus = try reader["EndpointStatus"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.resourceOwner = try reader["ResourceOwner"].readIfPresent() + value.subnetGroupName = try reader["SubnetGroupName"].readIfPresent() + value.vpcEndpoint = try reader["VpcEndpoint"].readIfPresent(readingClosure: RedshiftClientTypes.VpcEndpoint.readingClosure) + value.vpcSecurityGroups = try reader["VpcSecurityGroups"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.VpcSecurityGroupMembership.readingClosure, memberNodeInfo: "VpcSecurityGroup", isFlattened: false) + return value } } } @@ -28670,92 +20414,39 @@ public struct ModifyEndpointAccessOutput: Swift.Equatable { } } -struct ModifyEndpointAccessOutputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let resourceOwner: Swift.String? - let subnetGroupName: Swift.String? - let endpointStatus: Swift.String? - let endpointName: Swift.String? - let endpointCreateTime: ClientRuntime.Date? - let port: Swift.Int? - let address: Swift.String? - let vpcSecurityGroups: [RedshiftClientTypes.VpcSecurityGroupMembership]? - let vpcEndpoint: RedshiftClientTypes.VpcEndpoint? -} - -extension ModifyEndpointAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case address = "Address" - case clusterIdentifier = "ClusterIdentifier" - case endpointCreateTime = "EndpointCreateTime" - case endpointName = "EndpointName" - case endpointStatus = "EndpointStatus" - case port = "Port" - case resourceOwner = "ResourceOwner" - case subnetGroupName = "SubnetGroupName" - case vpcEndpoint = "VpcEndpoint" - case vpcSecurityGroups = "VpcSecurityGroups" - } +enum ModifyEndpointAccessOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyEndpointAccessResult")) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let resourceOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceOwner) - resourceOwner = resourceOwnerDecoded - let subnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetGroupName) - subnetGroupName = subnetGroupNameDecoded - let endpointStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointStatus) - endpointStatus = endpointStatusDecoded - let endpointNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointName) - endpointName = endpointNameDecoded - let endpointCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endpointCreateTime) - endpointCreateTime = endpointCreateTimeDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let addressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .address) - address = addressDecoded - if containerValues.contains(.vpcSecurityGroups) { - struct KeyVal0{struct VpcSecurityGroup{}} - let vpcSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroups) - if let vpcSecurityGroupsWrappedContainer = vpcSecurityGroupsWrappedContainer { - let vpcSecurityGroupsContainer = try vpcSecurityGroupsWrappedContainer.decodeIfPresent([RedshiftClientTypes.VpcSecurityGroupMembership].self, forKey: .member) - var vpcSecurityGroupsBuffer:[RedshiftClientTypes.VpcSecurityGroupMembership]? = nil - if let vpcSecurityGroupsContainer = vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer = [RedshiftClientTypes.VpcSecurityGroupMembership]() - for structureContainer0 in vpcSecurityGroupsContainer { - vpcSecurityGroupsBuffer?.append(structureContainer0) - } - } - vpcSecurityGroups = vpcSecurityGroupsBuffer - } else { - vpcSecurityGroups = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointNotFound": return try await EndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidEndpointState": return try await InvalidEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - vpcSecurityGroups = nil } - let vpcEndpointDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.VpcEndpoint.self, forKey: .vpcEndpoint) - vpcEndpoint = vpcEndpointDecoded } } -enum ModifyEndpointAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointNotFound": return try await EndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidEndpointState": return try await InvalidEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyEventSubscriptionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case eventCategories = "EventCategories" + case severity = "Severity" + case snsTopicArn = "SnsTopicArn" + case sourceIds = "SourceIds" + case sourceType = "SourceType" + case subscriptionName = "SubscriptionName" } -} -extension ModifyEventSubscriptionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -28847,88 +20538,15 @@ public struct ModifyEventSubscriptionInput: Swift.Equatable { } } -struct ModifyEventSubscriptionInputBody: Swift.Equatable { - let subscriptionName: Swift.String? - let snsTopicArn: Swift.String? - let sourceType: Swift.String? - let sourceIds: [Swift.String]? - let eventCategories: [Swift.String]? - let severity: Swift.String? - let enabled: Swift.Bool? -} - -extension ModifyEventSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case eventCategories = "EventCategories" - case severity = "Severity" - case snsTopicArn = "SnsTopicArn" - case sourceIds = "SourceIds" - case sourceType = "SourceType" - case subscriptionName = "SubscriptionName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionName) - subscriptionName = subscriptionNameDecoded - let snsTopicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopicArn) - snsTopicArn = snsTopicArnDecoded - let sourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceType) - sourceType = sourceTypeDecoded - if containerValues.contains(.sourceIds) { - struct KeyVal0{struct SourceId{}} - let sourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sourceIds) - if let sourceIdsWrappedContainer = sourceIdsWrappedContainer { - let sourceIdsContainer = try sourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var sourceIdsBuffer:[Swift.String]? = nil - if let sourceIdsContainer = sourceIdsContainer { - sourceIdsBuffer = [Swift.String]() - for stringContainer0 in sourceIdsContainer { - sourceIdsBuffer?.append(stringContainer0) - } - } - sourceIds = sourceIdsBuffer - } else { - sourceIds = [] - } - } else { - sourceIds = nil - } - if containerValues.contains(.eventCategories) { - struct KeyVal0{struct EventCategory{}} - let eventCategoriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventCategories) - if let eventCategoriesWrappedContainer = eventCategoriesWrappedContainer { - let eventCategoriesContainer = try eventCategoriesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var eventCategoriesBuffer:[Swift.String]? = nil - if let eventCategoriesContainer = eventCategoriesContainer { - eventCategoriesBuffer = [Swift.String]() - for stringContainer0 in eventCategoriesContainer { - eventCategoriesBuffer?.append(stringContainer0) - } - } - eventCategories = eventCategoriesBuffer - } else { - eventCategories = [] - } - } else { - eventCategories = nil - } - let severityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .severity) - severity = severityDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded - } -} +extension ModifyEventSubscriptionOutput { -extension ModifyEventSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyEventSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.eventSubscription = output.eventSubscription - } else { - self.eventSubscription = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyEventSubscriptionResult"] + var value = ModifyEventSubscriptionOutput() + value.eventSubscription = try reader["EventSubscription"].readIfPresent(readingClosure: RedshiftClientTypes.EventSubscription.readingClosure) + return value } } } @@ -28945,42 +20563,41 @@ public struct ModifyEventSubscriptionOutput: Swift.Equatable { } } -struct ModifyEventSubscriptionOutputBody: Swift.Equatable { - let eventSubscription: RedshiftClientTypes.EventSubscription? -} - -extension ModifyEventSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventSubscription = "EventSubscription" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyEventSubscriptionResult")) - let eventSubscriptionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.EventSubscription.self, forKey: .eventSubscription) - eventSubscription = eventSubscriptionDecoded - } -} +enum ModifyEventSubscriptionOutputError { -enum ModifyEventSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidSubscriptionStateFault": return try await InvalidSubscriptionStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSInvalidTopic": return try await SNSInvalidTopicFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSNoAuthorization": return try await SNSNoAuthorizationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SourceNotFound": return try await SourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionEventIdNotFound": return try await SubscriptionEventIdNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionNotFound": return try await SubscriptionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionSeverityNotFound": return try await SubscriptionSeverityNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidSubscriptionStateFault": return try await InvalidSubscriptionStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSInvalidTopic": return try await SNSInvalidTopicFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSNoAuthorization": return try await SNSNoAuthorizationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SNSTopicArnNotFound": return try await SNSTopicArnNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SourceNotFound": return try await SourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionCategoryNotFound": return try await SubscriptionCategoryNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionEventIdNotFound": return try await SubscriptionEventIdNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionNotFound": return try await SubscriptionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionSeverityNotFound": return try await SubscriptionSeverityNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyRedshiftIdcApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case authorizedTokenIssuerList = "AuthorizedTokenIssuerList" + case iamRoleArn = "IamRoleArn" + case idcDisplayName = "IdcDisplayName" + case identityNamespace = "IdentityNamespace" + case redshiftIdcApplicationArn = "RedshiftIdcApplicationArn" + case serviceIntegrations = "ServiceIntegrations" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authorizedTokenIssuerList = authorizedTokenIssuerList { @@ -29064,84 +20681,15 @@ public struct ModifyRedshiftIdcApplicationInput: Swift.Equatable { } } -struct ModifyRedshiftIdcApplicationInputBody: Swift.Equatable { - let redshiftIdcApplicationArn: Swift.String? - let identityNamespace: Swift.String? - let iamRoleArn: Swift.String? - let idcDisplayName: Swift.String? - let authorizedTokenIssuerList: [RedshiftClientTypes.AuthorizedTokenIssuer]? - let serviceIntegrations: [RedshiftClientTypes.ServiceIntegrationsUnion]? -} - -extension ModifyRedshiftIdcApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authorizedTokenIssuerList = "AuthorizedTokenIssuerList" - case iamRoleArn = "IamRoleArn" - case idcDisplayName = "IdcDisplayName" - case identityNamespace = "IdentityNamespace" - case redshiftIdcApplicationArn = "RedshiftIdcApplicationArn" - case serviceIntegrations = "ServiceIntegrations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let redshiftIdcApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .redshiftIdcApplicationArn) - redshiftIdcApplicationArn = redshiftIdcApplicationArnDecoded - let identityNamespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identityNamespace) - identityNamespace = identityNamespaceDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - let idcDisplayNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idcDisplayName) - idcDisplayName = idcDisplayNameDecoded - if containerValues.contains(.authorizedTokenIssuerList) { - struct KeyVal0{struct member{}} - let authorizedTokenIssuerListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .authorizedTokenIssuerList) - if let authorizedTokenIssuerListWrappedContainer = authorizedTokenIssuerListWrappedContainer { - let authorizedTokenIssuerListContainer = try authorizedTokenIssuerListWrappedContainer.decodeIfPresent([RedshiftClientTypes.AuthorizedTokenIssuer].self, forKey: .member) - var authorizedTokenIssuerListBuffer:[RedshiftClientTypes.AuthorizedTokenIssuer]? = nil - if let authorizedTokenIssuerListContainer = authorizedTokenIssuerListContainer { - authorizedTokenIssuerListBuffer = [RedshiftClientTypes.AuthorizedTokenIssuer]() - for structureContainer0 in authorizedTokenIssuerListContainer { - authorizedTokenIssuerListBuffer?.append(structureContainer0) - } - } - authorizedTokenIssuerList = authorizedTokenIssuerListBuffer - } else { - authorizedTokenIssuerList = [] - } - } else { - authorizedTokenIssuerList = nil - } - if containerValues.contains(.serviceIntegrations) { - struct KeyVal0{struct member{}} - let serviceIntegrationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceIntegrations) - if let serviceIntegrationsWrappedContainer = serviceIntegrationsWrappedContainer { - let serviceIntegrationsContainer = try serviceIntegrationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ServiceIntegrationsUnion].self, forKey: .member) - var serviceIntegrationsBuffer:[RedshiftClientTypes.ServiceIntegrationsUnion]? = nil - if let serviceIntegrationsContainer = serviceIntegrationsContainer { - serviceIntegrationsBuffer = [RedshiftClientTypes.ServiceIntegrationsUnion]() - for unionContainer0 in serviceIntegrationsContainer { - serviceIntegrationsBuffer?.append(unionContainer0) - } - } - serviceIntegrations = serviceIntegrationsBuffer - } else { - serviceIntegrations = [] - } - } else { - serviceIntegrations = nil - } - } -} +extension ModifyRedshiftIdcApplicationOutput { -extension ModifyRedshiftIdcApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyRedshiftIdcApplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.redshiftIdcApplication = output.redshiftIdcApplication - } else { - self.redshiftIdcApplication = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyRedshiftIdcApplicationResult"] + var value = ModifyRedshiftIdcApplicationOutput() + value.redshiftIdcApplication = try reader["RedshiftIdcApplication"].readIfPresent(readingClosure: RedshiftClientTypes.RedshiftIdcApplication.readingClosure) + return value } } } @@ -29158,37 +20706,38 @@ public struct ModifyRedshiftIdcApplicationOutput: Swift.Equatable { } } -struct ModifyRedshiftIdcApplicationOutputBody: Swift.Equatable { - let redshiftIdcApplication: RedshiftClientTypes.RedshiftIdcApplication? -} - -extension ModifyRedshiftIdcApplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case redshiftIdcApplication = "RedshiftIdcApplication" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyRedshiftIdcApplicationResult")) - let redshiftIdcApplicationDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.RedshiftIdcApplication.self, forKey: .redshiftIdcApplication) - redshiftIdcApplication = redshiftIdcApplicationDecoded - } -} +enum ModifyRedshiftIdcApplicationOutputError { -enum ModifyRedshiftIdcApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DependentServiceAccessDenied": return try await DependentServiceAccessDeniedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RedshiftIdcApplicationNotExists": return try await RedshiftIdcApplicationNotExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "DependentServiceAccessDenied": return try await DependentServiceAccessDeniedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RedshiftIdcApplicationNotExists": return try await RedshiftIdcApplicationNotExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifyScheduledActionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enable = "Enable" + case endTime = "EndTime" + case iamRole = "IamRole" + case schedule = "Schedule" + case scheduledActionDescription = "ScheduledActionDescription" + case scheduledActionName = "ScheduledActionName" + case startTime = "StartTime" + case targetAction = "TargetAction" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enable = enable { @@ -29268,74 +20817,23 @@ public struct ModifyScheduledActionInput: Swift.Equatable { } } -struct ModifyScheduledActionInputBody: Swift.Equatable { - let scheduledActionName: Swift.String? - let targetAction: RedshiftClientTypes.ScheduledActionType? - let schedule: Swift.String? - let iamRole: Swift.String? - let scheduledActionDescription: Swift.String? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? - let enable: Swift.Bool? -} - -extension ModifyScheduledActionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enable = "Enable" - case endTime = "EndTime" - case iamRole = "IamRole" - case schedule = "Schedule" - case scheduledActionDescription = "ScheduledActionDescription" - case scheduledActionName = "ScheduledActionName" - case startTime = "StartTime" - case targetAction = "TargetAction" - } +extension ModifyScheduledActionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let targetActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionType.self, forKey: .targetAction) - targetAction = targetActionDecoded - let scheduleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .schedule) - schedule = scheduleDecoded - let iamRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRole) - iamRole = iamRoleDecoded - let scheduledActionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionDescription) - scheduledActionDescription = scheduledActionDescriptionDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded - let enableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enable) - enable = enableDecoded - } -} - -extension ModifyScheduledActionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyScheduledActionOutputBody = try responseDecoder.decode(responseBody: data) - self.endTime = output.endTime - self.iamRole = output.iamRole - self.nextInvocations = output.nextInvocations - self.schedule = output.schedule - self.scheduledActionDescription = output.scheduledActionDescription - self.scheduledActionName = output.scheduledActionName - self.startTime = output.startTime - self.state = output.state - self.targetAction = output.targetAction - } else { - self.endTime = nil - self.iamRole = nil - self.nextInvocations = nil - self.schedule = nil - self.scheduledActionDescription = nil - self.scheduledActionName = nil - self.startTime = nil - self.state = nil - self.targetAction = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyScheduledActionResult"] + var value = ModifyScheduledActionOutput() + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + value.iamRole = try reader["IamRole"].readIfPresent() + value.nextInvocations = try reader["NextInvocations"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "ScheduledActionTime", isFlattened: false) + value.schedule = try reader["Schedule"].readIfPresent() + value.scheduledActionDescription = try reader["ScheduledActionDescription"].readIfPresent() + value.scheduledActionName = try reader["ScheduledActionName"].readIfPresent() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.state = try reader["State"].readIfPresent() + value.targetAction = try reader["TargetAction"].readIfPresent(readingClosure: RedshiftClientTypes.ScheduledActionType.readingClosure) + return value } } } @@ -29385,89 +20883,36 @@ public struct ModifyScheduledActionOutput: Swift.Equatable { } } -struct ModifyScheduledActionOutputBody: Swift.Equatable { - let scheduledActionName: Swift.String? - let targetAction: RedshiftClientTypes.ScheduledActionType? - let schedule: Swift.String? - let iamRole: Swift.String? - let scheduledActionDescription: Swift.String? - let state: RedshiftClientTypes.ScheduledActionState? - let nextInvocations: [ClientRuntime.Date]? - let startTime: ClientRuntime.Date? - let endTime: ClientRuntime.Date? -} - -extension ModifyScheduledActionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endTime = "EndTime" - case iamRole = "IamRole" - case nextInvocations = "NextInvocations" - case schedule = "Schedule" - case scheduledActionDescription = "ScheduledActionDescription" - case scheduledActionName = "ScheduledActionName" - case startTime = "StartTime" - case state = "State" - case targetAction = "TargetAction" - } +enum ModifyScheduledActionOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyScheduledActionResult")) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let targetActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionType.self, forKey: .targetAction) - targetAction = targetActionDecoded - let scheduleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .schedule) - schedule = scheduleDecoded - let iamRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRole) - iamRole = iamRoleDecoded - let scheduledActionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionDescription) - scheduledActionDescription = scheduledActionDescriptionDecoded - let stateDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.nextInvocations) { - struct KeyVal0{struct ScheduledActionTime{}} - let nextInvocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nextInvocations) - if let nextInvocationsWrappedContainer = nextInvocationsWrappedContainer { - let nextInvocationsContainer = try nextInvocationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nextInvocationsBuffer:[ClientRuntime.Date]? = nil - if let nextInvocationsContainer = nextInvocationsContainer { - nextInvocationsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in nextInvocationsContainer { - try nextInvocationsBuffer?.append(nextInvocationsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - nextInvocations = nextInvocationsBuffer - } else { - nextInvocations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidScheduledAction": return try await InvalidScheduledActionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSchedule": return try await InvalidScheduleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScheduledActionNotFound": return try await ScheduledActionNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ScheduledActionTypeUnsupported": return try await ScheduledActionTypeUnsupportedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - nextInvocations = nil } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded } } -enum ModifyScheduledActionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidScheduledAction": return try await InvalidScheduledActionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSchedule": return try await InvalidScheduleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScheduledActionNotFound": return try await ScheduledActionNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ScheduledActionTypeUnsupported": return try await ScheduledActionTypeUnsupportedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifySnapshotCopyRetentionPeriodInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case manual = "Manual" + case retentionPeriod = "RetentionPeriod" } -} -extension ModifySnapshotCopyRetentionPeriodInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -29514,38 +20959,15 @@ public struct ModifySnapshotCopyRetentionPeriodInput: Swift.Equatable { } } -struct ModifySnapshotCopyRetentionPeriodInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let retentionPeriod: Swift.Int? - let manual: Swift.Bool? -} - -extension ModifySnapshotCopyRetentionPeriodInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case manual = "Manual" - case retentionPeriod = "RetentionPeriod" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let retentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .retentionPeriod) - retentionPeriod = retentionPeriodDecoded - let manualDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manual) - manual = manualDecoded - } -} +extension ModifySnapshotCopyRetentionPeriodOutput { -extension ModifySnapshotCopyRetentionPeriodOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifySnapshotCopyRetentionPeriodOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifySnapshotCopyRetentionPeriodResult"] + var value = ModifySnapshotCopyRetentionPeriodOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -29562,38 +20984,33 @@ public struct ModifySnapshotCopyRetentionPeriodOutput: Swift.Equatable { } } -struct ModifySnapshotCopyRetentionPeriodOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension ModifySnapshotCopyRetentionPeriodOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifySnapshotCopyRetentionPeriodResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum ModifySnapshotCopyRetentionPeriodOutputError { -enum ModifySnapshotCopyRetentionPeriodOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotCopyDisabledFault": return try await SnapshotCopyDisabledFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRetentionPeriodFault": return try await InvalidRetentionPeriodFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotCopyDisabledFault": return try await SnapshotCopyDisabledFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ModifySnapshotScheduleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case scheduleDefinitions = "ScheduleDefinitions" + case scheduleIdentifier = "ScheduleIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let scheduleDefinitions = scheduleDefinitions { @@ -29641,63 +21058,21 @@ public struct ModifySnapshotScheduleInput: Swift.Equatable { } } -struct ModifySnapshotScheduleInputBody: Swift.Equatable { - let scheduleIdentifier: Swift.String? - let scheduleDefinitions: [Swift.String]? -} - -extension ModifySnapshotScheduleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case scheduleDefinitions = "ScheduleDefinitions" - case scheduleIdentifier = "ScheduleIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleIdentifier) - scheduleIdentifier = scheduleIdentifierDecoded - if containerValues.contains(.scheduleDefinitions) { - struct KeyVal0{struct ScheduleDefinition{}} - let scheduleDefinitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduleDefinitions) - if let scheduleDefinitionsWrappedContainer = scheduleDefinitionsWrappedContainer { - let scheduleDefinitionsContainer = try scheduleDefinitionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scheduleDefinitionsBuffer:[Swift.String]? = nil - if let scheduleDefinitionsContainer = scheduleDefinitionsContainer { - scheduleDefinitionsBuffer = [Swift.String]() - for stringContainer0 in scheduleDefinitionsContainer { - scheduleDefinitionsBuffer?.append(stringContainer0) - } - } - scheduleDefinitions = scheduleDefinitionsBuffer - } else { - scheduleDefinitions = [] - } - } else { - scheduleDefinitions = nil - } - } -} +extension ModifySnapshotScheduleOutput { -extension ModifySnapshotScheduleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifySnapshotScheduleOutputBody = try responseDecoder.decode(responseBody: data) - self.associatedClusterCount = output.associatedClusterCount - self.associatedClusters = output.associatedClusters - self.nextInvocations = output.nextInvocations - self.scheduleDefinitions = output.scheduleDefinitions - self.scheduleDescription = output.scheduleDescription - self.scheduleIdentifier = output.scheduleIdentifier - self.tags = output.tags - } else { - self.associatedClusterCount = nil - self.associatedClusters = nil - self.nextInvocations = nil - self.scheduleDefinitions = nil - self.scheduleDescription = nil - self.scheduleIdentifier = nil - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifySnapshotScheduleResult"] + var value = ModifySnapshotScheduleOutput() + value.associatedClusterCount = try reader["AssociatedClusterCount"].readIfPresent() + value.associatedClusters = try reader["AssociatedClusters"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterAssociatedToSchedule.readingClosure, memberNodeInfo: "ClusterAssociatedToSchedule", isFlattened: false) + value.nextInvocations = try reader["NextInvocations"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "SnapshotTime", isFlattened: false) + value.scheduleDefinitions = try reader["ScheduleDefinitions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ScheduleDefinition", isFlattened: false) + value.scheduleDescription = try reader["ScheduleDescription"].readIfPresent() + value.scheduleIdentifier = try reader["ScheduleIdentifier"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -29739,128 +21114,32 @@ public struct ModifySnapshotScheduleOutput: Swift.Equatable { } } -struct ModifySnapshotScheduleOutputBody: Swift.Equatable { - let scheduleDefinitions: [Swift.String]? - let scheduleIdentifier: Swift.String? - let scheduleDescription: Swift.String? - let tags: [RedshiftClientTypes.Tag]? - let nextInvocations: [ClientRuntime.Date]? - let associatedClusterCount: Swift.Int? - let associatedClusters: [RedshiftClientTypes.ClusterAssociatedToSchedule]? -} - -extension ModifySnapshotScheduleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case associatedClusterCount = "AssociatedClusterCount" - case associatedClusters = "AssociatedClusters" - case nextInvocations = "NextInvocations" - case scheduleDefinitions = "ScheduleDefinitions" - case scheduleDescription = "ScheduleDescription" - case scheduleIdentifier = "ScheduleIdentifier" - case tags = "Tags" - } +enum ModifySnapshotScheduleOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifySnapshotScheduleResult")) - if containerValues.contains(.scheduleDefinitions) { - struct KeyVal0{struct ScheduleDefinition{}} - let scheduleDefinitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduleDefinitions) - if let scheduleDefinitionsWrappedContainer = scheduleDefinitionsWrappedContainer { - let scheduleDefinitionsContainer = try scheduleDefinitionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scheduleDefinitionsBuffer:[Swift.String]? = nil - if let scheduleDefinitionsContainer = scheduleDefinitionsContainer { - scheduleDefinitionsBuffer = [Swift.String]() - for stringContainer0 in scheduleDefinitionsContainer { - scheduleDefinitionsBuffer?.append(stringContainer0) - } - } - scheduleDefinitions = scheduleDefinitionsBuffer - } else { - scheduleDefinitions = [] - } - } else { - scheduleDefinitions = nil - } - let scheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleIdentifier) - scheduleIdentifier = scheduleIdentifierDecoded - let scheduleDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleDescription) - scheduleDescription = scheduleDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.nextInvocations) { - struct KeyVal0{struct SnapshotTime{}} - let nextInvocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nextInvocations) - if let nextInvocationsWrappedContainer = nextInvocationsWrappedContainer { - let nextInvocationsContainer = try nextInvocationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nextInvocationsBuffer:[ClientRuntime.Date]? = nil - if let nextInvocationsContainer = nextInvocationsContainer { - nextInvocationsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in nextInvocationsContainer { - try nextInvocationsBuffer?.append(nextInvocationsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - nextInvocations = nextInvocationsBuffer - } else { - nextInvocations = [] - } - } else { - nextInvocations = nil - } - let associatedClusterCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .associatedClusterCount) - associatedClusterCount = associatedClusterCountDecoded - if containerValues.contains(.associatedClusters) { - struct KeyVal0{struct ClusterAssociatedToSchedule{}} - let associatedClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedClusters) - if let associatedClustersWrappedContainer = associatedClustersWrappedContainer { - let associatedClustersContainer = try associatedClustersWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterAssociatedToSchedule].self, forKey: .member) - var associatedClustersBuffer:[RedshiftClientTypes.ClusterAssociatedToSchedule]? = nil - if let associatedClustersContainer = associatedClustersContainer { - associatedClustersBuffer = [RedshiftClientTypes.ClusterAssociatedToSchedule]() - for structureContainer0 in associatedClustersContainer { - associatedClustersBuffer?.append(structureContainer0) - } - } - associatedClusters = associatedClustersBuffer - } else { - associatedClusters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidSchedule": return try await InvalidScheduleFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotScheduleUpdateInProgress": return try await SnapshotScheduleUpdateInProgressFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - associatedClusters = nil } } } -enum ModifySnapshotScheduleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidSchedule": return try await InvalidScheduleFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotScheduleUpdateInProgress": return try await SnapshotScheduleUpdateInProgressFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ModifyUsageLimitInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case amount = "Amount" + case breachAction = "BreachAction" + case usageLimitId = "UsageLimitId" } -} -extension ModifyUsageLimitInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let amount = amount { @@ -29905,52 +21184,22 @@ public struct ModifyUsageLimitInput: Swift.Equatable { } } -struct ModifyUsageLimitInputBody: Swift.Equatable { - let usageLimitId: Swift.String? - let amount: Swift.Int? - let breachAction: RedshiftClientTypes.UsageLimitBreachAction? -} - -extension ModifyUsageLimitInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amount = "Amount" - case breachAction = "BreachAction" - case usageLimitId = "UsageLimitId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let usageLimitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageLimitId) - usageLimitId = usageLimitIdDecoded - let amountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amount) - amount = amountDecoded - let breachActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitBreachAction.self, forKey: .breachAction) - breachAction = breachActionDecoded - } -} - -extension ModifyUsageLimitOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ModifyUsageLimitOutputBody = try responseDecoder.decode(responseBody: data) - self.amount = output.amount - self.breachAction = output.breachAction - self.clusterIdentifier = output.clusterIdentifier - self.featureType = output.featureType - self.limitType = output.limitType - self.period = output.period - self.tags = output.tags - self.usageLimitId = output.usageLimitId - } else { - self.amount = nil - self.breachAction = nil - self.clusterIdentifier = nil - self.featureType = nil - self.limitType = nil - self.period = nil - self.tags = nil - self.usageLimitId = nil +extension ModifyUsageLimitOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ModifyUsageLimitResult"] + var value = ModifyUsageLimitOutput() + value.amount = try reader["Amount"].readIfPresent() + value.breachAction = try reader["BreachAction"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.featureType = try reader["FeatureType"].readIfPresent() + value.limitType = try reader["LimitType"].readIfPresent() + value.period = try reader["Period"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.usageLimitId = try reader["UsageLimitId"].readIfPresent() + return value } } } @@ -30002,81 +21251,26 @@ public struct ModifyUsageLimitOutput: Swift.Equatable { } } -struct ModifyUsageLimitOutputBody: Swift.Equatable { - let usageLimitId: Swift.String? - let clusterIdentifier: Swift.String? - let featureType: RedshiftClientTypes.UsageLimitFeatureType? - let limitType: RedshiftClientTypes.UsageLimitLimitType? - let amount: Swift.Int? - let period: RedshiftClientTypes.UsageLimitPeriod? - let breachAction: RedshiftClientTypes.UsageLimitBreachAction? - let tags: [RedshiftClientTypes.Tag]? -} - -extension ModifyUsageLimitOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case amount = "Amount" - case breachAction = "BreachAction" - case clusterIdentifier = "ClusterIdentifier" - case featureType = "FeatureType" - case limitType = "LimitType" - case period = "Period" - case tags = "Tags" - case usageLimitId = "UsageLimitId" - } +enum ModifyUsageLimitOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ModifyUsageLimitResult")) - let usageLimitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageLimitId) - usageLimitId = usageLimitIdDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let featureTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitFeatureType.self, forKey: .featureType) - featureType = featureTypeDecoded - let limitTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitLimitType.self, forKey: .limitType) - limitType = limitTypeDecoded - let amountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amount) - amount = amountDecoded - let periodDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitPeriod.self, forKey: .period) - period = periodDecoded - let breachActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitBreachAction.self, forKey: .breachAction) - breachAction = breachActionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidUsageLimit": return try await InvalidUsageLimitFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UsageLimitNotFound": return try await UsageLimitNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil - } - } -} - -enum ModifyUsageLimitOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidUsageLimit": return try await InvalidUsageLimitFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UsageLimitNotFound": return try await UsageLimitNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension RedshiftClientTypes.NetworkInterface: Swift.Codable { +extension RedshiftClientTypes.NetworkInterface: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZone = "AvailabilityZone" case ipv6Address = "Ipv6Address" @@ -30104,18 +21298,17 @@ extension RedshiftClientTypes.NetworkInterface: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let networkInterfaceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .networkInterfaceId) - networkInterfaceId = networkInterfaceIdDecoded - let subnetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetId) - subnetId = subnetIdDecoded - let privateIpAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .privateIpAddress) - privateIpAddress = privateIpAddressDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let ipv6AddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipv6Address) - ipv6Address = ipv6AddressDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.NetworkInterface() + value.networkInterfaceId = try reader["NetworkInterfaceId"].readIfPresent() + value.subnetId = try reader["SubnetId"].readIfPresent() + value.privateIpAddress = try reader["PrivateIpAddress"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.ipv6Address = try reader["Ipv6Address"].readIfPresent() + return value + } } } @@ -30151,7 +21344,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.NodeConfigurationOption: Swift.Codable { +extension RedshiftClientTypes.NodeConfigurationOption: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case estimatedDiskUtilizationPercent = "EstimatedDiskUtilizationPercent" case mode = "Mode" @@ -30175,16 +21368,16 @@ extension RedshiftClientTypes.NodeConfigurationOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - let estimatedDiskUtilizationPercentDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .estimatedDiskUtilizationPercent) - estimatedDiskUtilizationPercent = estimatedDiskUtilizationPercentDecoded - let modeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Mode.self, forKey: .mode) - mode = modeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.NodeConfigurationOption() + value.nodeType = try reader["NodeType"].readIfPresent() + value.numberOfNodes = try reader["NumberOfNodes"].readIfPresent() + value.estimatedDiskUtilizationPercent = try reader["EstimatedDiskUtilizationPercent"].readIfPresent() + value.mode = try reader["Mode"].readIfPresent() + return value + } } } @@ -30216,7 +21409,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.NodeConfigurationOptionsFilter: Swift.Codable { +extension RedshiftClientTypes.NodeConfigurationOptionsFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case `operator` = "Operator" @@ -30245,30 +21438,14 @@ extension RedshiftClientTypes.NodeConfigurationOptionsFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.NodeConfigurationOptionsFilterName.self, forKey: .name) - name = nameDecoded - let operatorDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.OperatorType.self, forKey: .operator) - `operator` = operatorDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct item{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.NodeConfigurationOptionsFilter() + value.name = try reader["Name"].readIfPresent() + value.`operator` = try reader["Operator"].readIfPresent() + value.values = try reader["Value"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -30336,16 +21513,14 @@ extension RedshiftClientTypes { } extension NumberOfNodesPerClusterLimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NumberOfNodesPerClusterLimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -30373,33 +21548,15 @@ public struct NumberOfNodesPerClusterLimitExceededFault: ClientRuntime.ModeledEr } } -struct NumberOfNodesPerClusterLimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension NumberOfNodesPerClusterLimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension NumberOfNodesQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NumberOfNodesQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -30427,22 +21584,6 @@ public struct NumberOfNodesQuotaExceededFault: ClientRuntime.ModeledError, AWSCl } } -struct NumberOfNodesQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension NumberOfNodesQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum OperatorType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case between @@ -30490,7 +21631,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.OrderableClusterOption: Swift.Codable { +extension RedshiftClientTypes.OrderableClusterOption: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZones = "AvailabilityZones" case clusterType = "ClusterType" @@ -30523,32 +21664,15 @@ extension RedshiftClientTypes.OrderableClusterOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let clusterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterType) - clusterType = clusterTypeDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - if containerValues.contains(.availabilityZones) { - struct KeyVal0{struct AvailabilityZone{}} - let availabilityZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .availabilityZones) - if let availabilityZonesWrappedContainer = availabilityZonesWrappedContainer { - let availabilityZonesContainer = try availabilityZonesWrappedContainer.decodeIfPresent([RedshiftClientTypes.AvailabilityZone].self, forKey: .member) - var availabilityZonesBuffer:[RedshiftClientTypes.AvailabilityZone]? = nil - if let availabilityZonesContainer = availabilityZonesContainer { - availabilityZonesBuffer = [RedshiftClientTypes.AvailabilityZone]() - for structureContainer0 in availabilityZonesContainer { - availabilityZonesBuffer?.append(structureContainer0) - } - } - availabilityZones = availabilityZonesBuffer - } else { - availabilityZones = [] - } - } else { - availabilityZones = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.OrderableClusterOption() + value.clusterVersion = try reader["ClusterVersion"].readIfPresent() + value.clusterType = try reader["ClusterType"].readIfPresent() + value.nodeType = try reader["NodeType"].readIfPresent() + value.availabilityZones = try reader["AvailabilityZones"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.AvailabilityZone.readingClosure, memberNodeInfo: "AvailabilityZone", isFlattened: false) + return value } } } @@ -30581,7 +21705,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.Parameter: Swift.Codable { +extension RedshiftClientTypes.Parameter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowedValues = "AllowedValues" case applyType = "ApplyType" @@ -30625,26 +21749,21 @@ extension RedshiftClientTypes.Parameter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterName) - parameterName = parameterNameDecoded - let parameterValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterValue) - parameterValue = parameterValueDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) - dataType = dataTypeDecoded - let allowedValuesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .allowedValues) - allowedValues = allowedValuesDecoded - let applyTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ParameterApplyType.self, forKey: .applyType) - applyType = applyTypeDecoded - let isModifiableDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isModifiable) - isModifiable = isModifiableDecoded - let minimumEngineVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .minimumEngineVersion) - minimumEngineVersion = minimumEngineVersionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.Parameter() + value.parameterName = try reader["ParameterName"].readIfPresent() + value.parameterValue = try reader["ParameterValue"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.source = try reader["Source"].readIfPresent() + value.dataType = try reader["DataType"].readIfPresent() + value.allowedValues = try reader["AllowedValues"].readIfPresent() + value.applyType = try reader["ApplyType"].readIfPresent() + value.isModifiable = try reader["IsModifiable"].readIfPresent() + value.minimumEngineVersion = try reader["MinimumEngineVersion"].readIfPresent() + return value + } } } @@ -30728,7 +21847,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.PartnerIntegrationInfo: Swift.Codable { +extension RedshiftClientTypes.PartnerIntegrationInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createdAt = "CreatedAt" case databaseName = "DatabaseName" @@ -30760,20 +21879,18 @@ extension RedshiftClientTypes.PartnerIntegrationInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let partnerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partnerName) - partnerName = partnerNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.PartnerIntegrationStatus.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let updatedAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .updatedAt) - updatedAt = updatedAtDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.PartnerIntegrationInfo() + value.databaseName = try reader["DatabaseName"].readIfPresent() + value.partnerName = try reader["PartnerName"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.statusMessage = try reader["StatusMessage"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.updatedAt = try reader["UpdatedAt"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -30852,16 +21969,14 @@ extension RedshiftClientTypes { } extension PartnerNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PartnerNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -30889,23 +22004,11 @@ public struct PartnerNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct PartnerNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension PartnerNotFoundFaultBody: Swift.Decodable { +extension PauseClusterInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case clusterIdentifier = "ClusterIdentifier" } -} -extension PauseClusterInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -30937,23 +22040,7 @@ public struct PauseClusterInput: Swift.Equatable { } } -struct PauseClusterInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension PauseClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} - -extension RedshiftClientTypes.PauseClusterMessage: Swift.Codable { +extension RedshiftClientTypes.PauseClusterMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterIdentifier = "ClusterIdentifier" } @@ -30965,10 +22052,13 @@ extension RedshiftClientTypes.PauseClusterMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.PauseClusterMessage() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + return value + } } } @@ -30989,14 +22079,15 @@ extension RedshiftClientTypes { } -extension PauseClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PauseClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil +extension PauseClusterOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PauseClusterResult"] + var value = PauseClusterOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -31013,36 +22104,26 @@ public struct PauseClusterOutput: Swift.Equatable { } } -struct PauseClusterOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension PauseClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PauseClusterResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum PauseClusterOutputError { -enum PauseClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.PendingModifiedValues: Swift.Codable { +extension RedshiftClientTypes.PendingModifiedValues: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case automatedSnapshotRetentionPeriod = "AutomatedSnapshotRetentionPeriod" case clusterIdentifier = "ClusterIdentifier" @@ -31094,30 +22175,23 @@ extension RedshiftClientTypes.PendingModifiedValues: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let masterUserPasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUserPassword) - masterUserPassword = masterUserPasswordDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - let clusterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterType) - clusterType = clusterTypeDecoded - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let automatedSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .automatedSnapshotRetentionPeriod) - automatedSnapshotRetentionPeriod = automatedSnapshotRetentionPeriodDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let enhancedVpcRoutingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enhancedVpcRouting) - enhancedVpcRouting = enhancedVpcRoutingDecoded - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let encryptionTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .encryptionType) - encryptionType = encryptionTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.PendingModifiedValues() + value.masterUserPassword = try reader["MasterUserPassword"].readIfPresent() + value.nodeType = try reader["NodeType"].readIfPresent() + value.numberOfNodes = try reader["NumberOfNodes"].readIfPresent() + value.clusterType = try reader["ClusterType"].readIfPresent() + value.clusterVersion = try reader["ClusterVersion"].readIfPresent() + value.automatedSnapshotRetentionPeriod = try reader["AutomatedSnapshotRetentionPeriod"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.publiclyAccessible = try reader["PubliclyAccessible"].readIfPresent() + value.enhancedVpcRouting = try reader["EnhancedVpcRouting"].readIfPresent() + value.maintenanceTrackName = try reader["MaintenanceTrackName"].readIfPresent() + value.encryptionType = try reader["EncryptionType"].readIfPresent() + return value + } } } @@ -31183,6 +22257,11 @@ extension RedshiftClientTypes { } extension PurchaseReservedNodeOfferingInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nodeCount = "NodeCount" + case reservedNodeOfferingId = "ReservedNodeOfferingId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nodeCount = nodeCount { @@ -31221,34 +22300,15 @@ public struct PurchaseReservedNodeOfferingInput: Swift.Equatable { } } -struct PurchaseReservedNodeOfferingInputBody: Swift.Equatable { - let reservedNodeOfferingId: Swift.String? - let nodeCount: Swift.Int? -} - -extension PurchaseReservedNodeOfferingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nodeCount = "NodeCount" - case reservedNodeOfferingId = "ReservedNodeOfferingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeOfferingId) - reservedNodeOfferingId = reservedNodeOfferingIdDecoded - let nodeCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .nodeCount) - nodeCount = nodeCountDecoded - } -} +extension PurchaseReservedNodeOfferingOutput { -extension PurchaseReservedNodeOfferingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PurchaseReservedNodeOfferingOutputBody = try responseDecoder.decode(responseBody: data) - self.reservedNode = output.reservedNode - } else { - self.reservedNode = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PurchaseReservedNodeOfferingResult"] + var value = PurchaseReservedNodeOfferingOutput() + value.reservedNode = try reader["ReservedNode"].readIfPresent(readingClosure: RedshiftClientTypes.ReservedNode.readingClosure) + return value } } } @@ -31265,37 +22325,32 @@ public struct PurchaseReservedNodeOfferingOutput: Swift.Equatable { } } -struct PurchaseReservedNodeOfferingOutputBody: Swift.Equatable { - let reservedNode: RedshiftClientTypes.ReservedNode? -} - -extension PurchaseReservedNodeOfferingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case reservedNode = "ReservedNode" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PurchaseReservedNodeOfferingResult")) - let reservedNodeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNode.self, forKey: .reservedNode) - reservedNode = reservedNodeDecoded - } -} +enum PurchaseReservedNodeOfferingOutputError { -enum PurchaseReservedNodeOfferingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ReservedNodeAlreadyExists": return try await ReservedNodeAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeQuotaExceeded": return try await ReservedNodeQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ReservedNodeAlreadyExists": return try await ReservedNodeAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeQuotaExceeded": return try await ReservedNodeQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutResourcePolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case policy = "Policy" + case resourceArn = "ResourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let policy = policy { @@ -31334,34 +22389,15 @@ public struct PutResourcePolicyInput: Swift.Equatable { } } -struct PutResourcePolicyInputBody: Swift.Equatable { - let resourceArn: Swift.String? - let policy: Swift.String? -} - -extension PutResourcePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} +extension PutResourcePolicyOutput { -extension PutResourcePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PutResourcePolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.resourcePolicy = output.resourcePolicy - } else { - self.resourcePolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PutResourcePolicyResult"] + var value = PutResourcePolicyOutput() + value.resourcePolicy = try reader["ResourcePolicy"].readIfPresent(readingClosure: RedshiftClientTypes.ResourcePolicy.readingClosure) + return value } } } @@ -31378,37 +22414,31 @@ public struct PutResourcePolicyOutput: Swift.Equatable { } } -struct PutResourcePolicyOutputBody: Swift.Equatable { - let resourcePolicy: RedshiftClientTypes.ResourcePolicy? -} - -extension PutResourcePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourcePolicy = "ResourcePolicy" - } +enum PutResourcePolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PutResourcePolicyResult")) - let resourcePolicyDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ResourcePolicy.self, forKey: .resourcePolicy) - resourcePolicy = resourcePolicyDecoded - } -} - -enum PutResourcePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConflictPolicyUpdateFault": return try await ConflictPolicyUpdateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidPolicyFault": return try await InvalidPolicyFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFoundFault": return try await ResourceNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConflictPolicyUpdateFault": return try await ConflictPolicyUpdateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidPolicyFault": return try await InvalidPolicyFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFoundFault": return try await ResourceNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RebootClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -31440,30 +22470,15 @@ public struct RebootClusterInput: Swift.Equatable { } } -struct RebootClusterInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension RebootClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} +extension RebootClusterOutput { -extension RebootClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RebootClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RebootClusterResult"] + var value = RebootClusterOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -31480,35 +22495,25 @@ public struct RebootClusterOutput: Swift.Equatable { } } -struct RebootClusterOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension RebootClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RebootClusterResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum RebootClusterOutputError { -enum RebootClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.RecurringCharge: Swift.Codable { +extension RedshiftClientTypes.RecurringCharge: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case recurringChargeAmount = "RecurringChargeAmount" case recurringChargeFrequency = "RecurringChargeFrequency" @@ -31524,12 +22529,14 @@ extension RedshiftClientTypes.RecurringCharge: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let recurringChargeAmountDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .recurringChargeAmount) - recurringChargeAmount = recurringChargeAmountDecoded - let recurringChargeFrequencyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recurringChargeFrequency) - recurringChargeFrequency = recurringChargeFrequencyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.RecurringCharge() + value.recurringChargeAmount = try reader["RecurringChargeAmount"].readIfPresent() + value.recurringChargeFrequency = try reader["RecurringChargeFrequency"].readIfPresent() + return value + } } } @@ -31555,7 +22562,7 @@ extension RedshiftClientTypes { public enum RedshiftClientTypes {} -extension RedshiftClientTypes.RedshiftIdcApplication: Swift.Codable { +extension RedshiftClientTypes.RedshiftIdcApplication: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case authorizedTokenIssuerList = "AuthorizedTokenIssuerList" case iamRoleArn = "IamRoleArn" @@ -31621,61 +22628,21 @@ extension RedshiftClientTypes.RedshiftIdcApplication: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idcInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idcInstanceArn) - idcInstanceArn = idcInstanceArnDecoded - let redshiftIdcApplicationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .redshiftIdcApplicationName) - redshiftIdcApplicationName = redshiftIdcApplicationNameDecoded - let redshiftIdcApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .redshiftIdcApplicationArn) - redshiftIdcApplicationArn = redshiftIdcApplicationArnDecoded - let identityNamespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identityNamespace) - identityNamespace = identityNamespaceDecoded - let idcDisplayNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idcDisplayName) - idcDisplayName = idcDisplayNameDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - let idcManagedApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idcManagedApplicationArn) - idcManagedApplicationArn = idcManagedApplicationArnDecoded - let idcOnboardStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .idcOnboardStatus) - idcOnboardStatus = idcOnboardStatusDecoded - if containerValues.contains(.authorizedTokenIssuerList) { - struct KeyVal0{struct member{}} - let authorizedTokenIssuerListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .authorizedTokenIssuerList) - if let authorizedTokenIssuerListWrappedContainer = authorizedTokenIssuerListWrappedContainer { - let authorizedTokenIssuerListContainer = try authorizedTokenIssuerListWrappedContainer.decodeIfPresent([RedshiftClientTypes.AuthorizedTokenIssuer].self, forKey: .member) - var authorizedTokenIssuerListBuffer:[RedshiftClientTypes.AuthorizedTokenIssuer]? = nil - if let authorizedTokenIssuerListContainer = authorizedTokenIssuerListContainer { - authorizedTokenIssuerListBuffer = [RedshiftClientTypes.AuthorizedTokenIssuer]() - for structureContainer0 in authorizedTokenIssuerListContainer { - authorizedTokenIssuerListBuffer?.append(structureContainer0) - } - } - authorizedTokenIssuerList = authorizedTokenIssuerListBuffer - } else { - authorizedTokenIssuerList = [] - } - } else { - authorizedTokenIssuerList = nil - } - if containerValues.contains(.serviceIntegrations) { - struct KeyVal0{struct member{}} - let serviceIntegrationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .serviceIntegrations) - if let serviceIntegrationsWrappedContainer = serviceIntegrationsWrappedContainer { - let serviceIntegrationsContainer = try serviceIntegrationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.ServiceIntegrationsUnion].self, forKey: .member) - var serviceIntegrationsBuffer:[RedshiftClientTypes.ServiceIntegrationsUnion]? = nil - if let serviceIntegrationsContainer = serviceIntegrationsContainer { - serviceIntegrationsBuffer = [RedshiftClientTypes.ServiceIntegrationsUnion]() - for unionContainer0 in serviceIntegrationsContainer { - serviceIntegrationsBuffer?.append(unionContainer0) - } - } - serviceIntegrations = serviceIntegrationsBuffer - } else { - serviceIntegrations = [] - } - } else { - serviceIntegrations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.RedshiftIdcApplication() + value.idcInstanceArn = try reader["IdcInstanceArn"].readIfPresent() + value.redshiftIdcApplicationName = try reader["RedshiftIdcApplicationName"].readIfPresent() + value.redshiftIdcApplicationArn = try reader["RedshiftIdcApplicationArn"].readIfPresent() + value.identityNamespace = try reader["IdentityNamespace"].readIfPresent() + value.idcDisplayName = try reader["IdcDisplayName"].readIfPresent() + value.iamRoleArn = try reader["IamRoleArn"].readIfPresent() + value.idcManagedApplicationArn = try reader["IdcManagedApplicationArn"].readIfPresent() + value.idcOnboardStatus = try reader["IdcOnboardStatus"].readIfPresent() + value.authorizedTokenIssuerList = try reader["AuthorizedTokenIssuerList"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.AuthorizedTokenIssuer.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.serviceIntegrations = try reader["ServiceIntegrations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ServiceIntegrationsUnion.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -31733,16 +22700,14 @@ extension RedshiftClientTypes { } extension RedshiftIdcApplicationAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RedshiftIdcApplicationAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -31770,33 +22735,15 @@ public struct RedshiftIdcApplicationAlreadyExistsFault: ClientRuntime.ModeledErr } } -struct RedshiftIdcApplicationAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension RedshiftIdcApplicationAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftIdcApplicationNotExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RedshiftIdcApplicationNotExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -31824,33 +22771,15 @@ public struct RedshiftIdcApplicationNotExistsFault: ClientRuntime.ModeledError, } } -struct RedshiftIdcApplicationNotExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension RedshiftIdcApplicationNotExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftIdcApplicationQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RedshiftIdcApplicationQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -31878,23 +22807,11 @@ public struct RedshiftIdcApplicationQuotaExceededFault: ClientRuntime.ModeledErr } } -struct RedshiftIdcApplicationQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension RedshiftIdcApplicationQuotaExceededFaultBody: Swift.Decodable { +extension RejectDataShareInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case dataShareArn = "DataShareArn" } -} -extension RejectDataShareInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dataShareArn = dataShareArn { @@ -31925,38 +22842,19 @@ public struct RejectDataShareInput: Swift.Equatable { } } -struct RejectDataShareInputBody: Swift.Equatable { - let dataShareArn: Swift.String? -} - -extension RejectDataShareInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataShareArn = "DataShareArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - } -} +extension RejectDataShareOutput { -extension RejectDataShareOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RejectDataShareOutputBody = try responseDecoder.decode(responseBody: data) - self.allowPubliclyAccessibleConsumers = output.allowPubliclyAccessibleConsumers - self.dataShareArn = output.dataShareArn - self.dataShareAssociations = output.dataShareAssociations - self.managedBy = output.managedBy - self.producerArn = output.producerArn - } else { - self.allowPubliclyAccessibleConsumers = nil - self.dataShareArn = nil - self.dataShareAssociations = nil - self.managedBy = nil - self.producerArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RejectDataShareResult"] + var value = RejectDataShareOutput() + value.allowPubliclyAccessibleConsumers = try reader["AllowPubliclyAccessibleConsumers"].readIfPresent() + value.dataShareArn = try reader["DataShareArn"].readIfPresent() + value.dataShareAssociations = try reader["DataShareAssociations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.DataShareAssociation.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.managedBy = try reader["ManagedBy"].readIfPresent() + value.producerArn = try reader["ProducerArn"].readIfPresent() + return value } } } @@ -31989,67 +22887,24 @@ public struct RejectDataShareOutput: Swift.Equatable { } } -struct RejectDataShareOutputBody: Swift.Equatable { - let dataShareArn: Swift.String? - let producerArn: Swift.String? - let allowPubliclyAccessibleConsumers: Swift.Bool? - let dataShareAssociations: [RedshiftClientTypes.DataShareAssociation]? - let managedBy: Swift.String? -} - -extension RejectDataShareOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowPubliclyAccessibleConsumers = "AllowPubliclyAccessibleConsumers" - case dataShareArn = "DataShareArn" - case dataShareAssociations = "DataShareAssociations" - case managedBy = "ManagedBy" - case producerArn = "ProducerArn" - } +enum RejectDataShareOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RejectDataShareResult")) - let dataShareArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataShareArn) - dataShareArn = dataShareArnDecoded - let producerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .producerArn) - producerArn = producerArnDecoded - let allowPubliclyAccessibleConsumersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowPubliclyAccessibleConsumers) - allowPubliclyAccessibleConsumers = allowPubliclyAccessibleConsumersDecoded - if containerValues.contains(.dataShareAssociations) { - struct KeyVal0{struct member{}} - let dataShareAssociationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dataShareAssociations) - if let dataShareAssociationsWrappedContainer = dataShareAssociationsWrappedContainer { - let dataShareAssociationsContainer = try dataShareAssociationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.DataShareAssociation].self, forKey: .member) - var dataShareAssociationsBuffer:[RedshiftClientTypes.DataShareAssociation]? = nil - if let dataShareAssociationsContainer = dataShareAssociationsContainer { - dataShareAssociationsBuffer = [RedshiftClientTypes.DataShareAssociation]() - for structureContainer0 in dataShareAssociationsContainer { - dataShareAssociationsBuffer?.append(structureContainer0) - } - } - dataShareAssociations = dataShareAssociationsBuffer - } else { - dataShareAssociations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidDataShareFault": return try await InvalidDataShareFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dataShareAssociations = nil } - let managedByDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .managedBy) - managedBy = managedByDecoded } } -enum RejectDataShareOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDataShareFault": return try await InvalidDataShareFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RedshiftClientTypes.ReservedNode: Swift.Codable { +extension RedshiftClientTypes.ReservedNode: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case currencyCode = "CurrencyCode" case duration = "Duration" @@ -32118,51 +22973,25 @@ extension RedshiftClientTypes.ReservedNode: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeId) - reservedNodeId = reservedNodeIdDecoded - let reservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeOfferingId) - reservedNodeOfferingId = reservedNodeOfferingIdDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let fixedPriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fixedPrice) - fixedPrice = fixedPriceDecoded - let usagePriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .usagePrice) - usagePrice = usagePriceDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let nodeCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .nodeCount) - nodeCount = nodeCountDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - if containerValues.contains(.recurringCharges) { - struct KeyVal0{struct RecurringCharge{}} - let recurringChargesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recurringCharges) - if let recurringChargesWrappedContainer = recurringChargesWrappedContainer { - let recurringChargesContainer = try recurringChargesWrappedContainer.decodeIfPresent([RedshiftClientTypes.RecurringCharge].self, forKey: .member) - var recurringChargesBuffer:[RedshiftClientTypes.RecurringCharge]? = nil - if let recurringChargesContainer = recurringChargesContainer { - recurringChargesBuffer = [RedshiftClientTypes.RecurringCharge]() - for structureContainer0 in recurringChargesContainer { - recurringChargesBuffer?.append(structureContainer0) - } - } - recurringCharges = recurringChargesBuffer - } else { - recurringCharges = [] - } - } else { - recurringCharges = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ReservedNode() + value.reservedNodeId = try reader["ReservedNodeId"].readIfPresent() + value.reservedNodeOfferingId = try reader["ReservedNodeOfferingId"].readIfPresent() + value.nodeType = try reader["NodeType"].readIfPresent() + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.duration = try reader["Duration"].readIfPresent() + value.fixedPrice = try reader["FixedPrice"].readIfPresent() + value.usagePrice = try reader["UsagePrice"].readIfPresent() + value.currencyCode = try reader["CurrencyCode"].readIfPresent() + value.nodeCount = try reader["NodeCount"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.offeringType = try reader["OfferingType"].readIfPresent() + value.recurringCharges = try reader["RecurringCharges"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.RecurringCharge.readingClosure, memberNodeInfo: "RecurringCharge", isFlattened: false) + value.reservedNodeOfferingType = try reader["ReservedNodeOfferingType"].readIfPresent() + return value } - let reservedNodeOfferingTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNodeOfferingType.self, forKey: .reservedNodeOfferingType) - reservedNodeOfferingType = reservedNodeOfferingTypeDecoded } } @@ -32241,16 +23070,14 @@ extension RedshiftClientTypes { } extension ReservedNodeAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedNodeAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -32278,33 +23105,15 @@ public struct ReservedNodeAlreadyExistsFault: ClientRuntime.ModeledError, AWSCli } } -struct ReservedNodeAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedNodeAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ReservedNodeAlreadyMigratedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedNodeAlreadyMigratedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -32332,23 +23141,7 @@ public struct ReservedNodeAlreadyMigratedFault: ClientRuntime.ModeledError, AWSC } } -struct ReservedNodeAlreadyMigratedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedNodeAlreadyMigratedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ReservedNodeConfigurationOption: Swift.Codable { +extension RedshiftClientTypes.ReservedNodeConfigurationOption: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case sourceReservedNode = "SourceReservedNode" case targetReservedNodeCount = "TargetReservedNodeCount" @@ -32368,14 +23161,15 @@ extension RedshiftClientTypes.ReservedNodeConfigurationOption: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceReservedNodeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNode.self, forKey: .sourceReservedNode) - sourceReservedNode = sourceReservedNodeDecoded - let targetReservedNodeCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetReservedNodeCount) - targetReservedNodeCount = targetReservedNodeCountDecoded - let targetReservedNodeOfferingDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNodeOffering.self, forKey: .targetReservedNodeOffering) - targetReservedNodeOffering = targetReservedNodeOfferingDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ReservedNodeConfigurationOption() + value.sourceReservedNode = try reader["SourceReservedNode"].readIfPresent(readingClosure: RedshiftClientTypes.ReservedNode.readingClosure) + value.targetReservedNodeCount = try reader["TargetReservedNodeCount"].readIfPresent() + value.targetReservedNodeOffering = try reader["TargetReservedNodeOffering"].readIfPresent(readingClosure: RedshiftClientTypes.ReservedNodeOffering.readingClosure) + return value + } } } @@ -32436,16 +23230,14 @@ extension RedshiftClientTypes { } extension ReservedNodeExchangeNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedNodeExchangeNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -32473,23 +23265,7 @@ public struct ReservedNodeExchangeNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct ReservedNodeExchangeNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedNodeExchangeNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ReservedNodeExchangeStatus: Swift.Codable { +extension RedshiftClientTypes.ReservedNodeExchangeStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case requestTime = "RequestTime" case reservedNodeExchangeRequestId = "ReservedNodeExchangeRequestId" @@ -32533,26 +23309,21 @@ extension RedshiftClientTypes.ReservedNodeExchangeStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeExchangeRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeExchangeRequestId) - reservedNodeExchangeRequestId = reservedNodeExchangeRequestIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNodeExchangeStatusType.self, forKey: .status) - status = statusDecoded - let requestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .requestTime) - requestTime = requestTimeDecoded - let sourceReservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceReservedNodeId) - sourceReservedNodeId = sourceReservedNodeIdDecoded - let sourceReservedNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceReservedNodeType) - sourceReservedNodeType = sourceReservedNodeTypeDecoded - let sourceReservedNodeCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .sourceReservedNodeCount) - sourceReservedNodeCount = sourceReservedNodeCountDecoded - let targetReservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetReservedNodeOfferingId) - targetReservedNodeOfferingId = targetReservedNodeOfferingIdDecoded - let targetReservedNodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetReservedNodeType) - targetReservedNodeType = targetReservedNodeTypeDecoded - let targetReservedNodeCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .targetReservedNodeCount) - targetReservedNodeCount = targetReservedNodeCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ReservedNodeExchangeStatus() + value.reservedNodeExchangeRequestId = try reader["ReservedNodeExchangeRequestId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.requestTime = try reader["RequestTime"].readTimestampIfPresent(format: .dateTime) + value.sourceReservedNodeId = try reader["SourceReservedNodeId"].readIfPresent() + value.sourceReservedNodeType = try reader["SourceReservedNodeType"].readIfPresent() + value.sourceReservedNodeCount = try reader["SourceReservedNodeCount"].readIfPresent() + value.targetReservedNodeOfferingId = try reader["TargetReservedNodeOfferingId"].readIfPresent() + value.targetReservedNodeType = try reader["TargetReservedNodeType"].readIfPresent() + value.targetReservedNodeCount = try reader["TargetReservedNodeCount"].readIfPresent() + return value + } } } @@ -32649,16 +23420,14 @@ extension RedshiftClientTypes { } extension ReservedNodeNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedNodeNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -32686,23 +23455,7 @@ public struct ReservedNodeNotFoundFault: ClientRuntime.ModeledError, AWSClientRu } } -struct ReservedNodeNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedNodeNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ReservedNodeOffering: Swift.Codable { +extension RedshiftClientTypes.ReservedNodeOffering: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case currencyCode = "CurrencyCode" case duration = "Duration" @@ -32755,43 +23508,21 @@ extension RedshiftClientTypes.ReservedNodeOffering: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeOfferingId) - reservedNodeOfferingId = reservedNodeOfferingIdDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let durationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .duration) - duration = durationDecoded - let fixedPriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .fixedPrice) - fixedPrice = fixedPriceDecoded - let usagePriceDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .usagePrice) - usagePrice = usagePriceDecoded - let currencyCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .currencyCode) - currencyCode = currencyCodeDecoded - let offeringTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .offeringType) - offeringType = offeringTypeDecoded - if containerValues.contains(.recurringCharges) { - struct KeyVal0{struct RecurringCharge{}} - let recurringChargesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recurringCharges) - if let recurringChargesWrappedContainer = recurringChargesWrappedContainer { - let recurringChargesContainer = try recurringChargesWrappedContainer.decodeIfPresent([RedshiftClientTypes.RecurringCharge].self, forKey: .member) - var recurringChargesBuffer:[RedshiftClientTypes.RecurringCharge]? = nil - if let recurringChargesContainer = recurringChargesContainer { - recurringChargesBuffer = [RedshiftClientTypes.RecurringCharge]() - for structureContainer0 in recurringChargesContainer { - recurringChargesBuffer?.append(structureContainer0) - } - } - recurringCharges = recurringChargesBuffer - } else { - recurringCharges = [] - } - } else { - recurringCharges = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ReservedNodeOffering() + value.reservedNodeOfferingId = try reader["ReservedNodeOfferingId"].readIfPresent() + value.nodeType = try reader["NodeType"].readIfPresent() + value.duration = try reader["Duration"].readIfPresent() + value.fixedPrice = try reader["FixedPrice"].readIfPresent() + value.usagePrice = try reader["UsagePrice"].readIfPresent() + value.currencyCode = try reader["CurrencyCode"].readIfPresent() + value.offeringType = try reader["OfferingType"].readIfPresent() + value.recurringCharges = try reader["RecurringCharges"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.RecurringCharge.readingClosure, memberNodeInfo: "RecurringCharge", isFlattened: false) + value.reservedNodeOfferingType = try reader["ReservedNodeOfferingType"].readIfPresent() + return value } - let reservedNodeOfferingTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ReservedNodeOfferingType.self, forKey: .reservedNodeOfferingType) - reservedNodeOfferingType = reservedNodeOfferingTypeDecoded } } @@ -32844,16 +23575,14 @@ extension RedshiftClientTypes { } extension ReservedNodeOfferingNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedNodeOfferingNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -32881,22 +23610,6 @@ public struct ReservedNodeOfferingNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct ReservedNodeOfferingNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedNodeOfferingNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum ReservedNodeOfferingType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case regular @@ -32930,16 +23643,14 @@ extension RedshiftClientTypes { } extension ReservedNodeQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReservedNodeQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -32967,23 +23678,13 @@ public struct ReservedNodeQuotaExceededFault: ClientRuntime.ModeledError, AWSCli } } -struct ReservedNodeQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReservedNodeQuotaExceededFaultBody: Swift.Decodable { +extension ResetClusterParameterGroupInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case parameterGroupName = "ParameterGroupName" + case parameters = "Parameters" + case resetAllParameters = "ResetAllParameters" } -} -extension ResetClusterParameterGroupInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let parameterGroupName = parameterGroupName { @@ -33038,57 +23739,16 @@ public struct ResetClusterParameterGroupInput: Swift.Equatable { } } -struct ResetClusterParameterGroupInputBody: Swift.Equatable { - let parameterGroupName: Swift.String? - let resetAllParameters: Swift.Bool? - let parameters: [RedshiftClientTypes.Parameter]? -} - -extension ResetClusterParameterGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case parameterGroupName = "ParameterGroupName" - case parameters = "Parameters" - case resetAllParameters = "ResetAllParameters" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - let resetAllParametersDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .resetAllParameters) - resetAllParameters = resetAllParametersDecoded - if containerValues.contains(.parameters) { - struct KeyVal0{struct Parameter{}} - let parametersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .parameters) - if let parametersWrappedContainer = parametersWrappedContainer { - let parametersContainer = try parametersWrappedContainer.decodeIfPresent([RedshiftClientTypes.Parameter].self, forKey: .member) - var parametersBuffer:[RedshiftClientTypes.Parameter]? = nil - if let parametersContainer = parametersContainer { - parametersBuffer = [RedshiftClientTypes.Parameter]() - for structureContainer0 in parametersContainer { - parametersBuffer?.append(structureContainer0) - } - } - parameters = parametersBuffer - } else { - parameters = [] - } - } else { - parameters = nil - } - } -} +extension ResetClusterParameterGroupOutput { -extension ResetClusterParameterGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResetClusterParameterGroupOutputBody = try responseDecoder.decode(responseBody: data) - self.parameterGroupName = output.parameterGroupName - self.parameterGroupStatus = output.parameterGroupStatus - } else { - self.parameterGroupName = nil - self.parameterGroupStatus = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResetClusterParameterGroupResult"] + var value = ResetClusterParameterGroupOutput() + value.parameterGroupName = try reader["ParameterGroupName"].readIfPresent() + value.parameterGroupStatus = try reader["ParameterGroupStatus"].readIfPresent() + return value } } } @@ -33110,39 +23770,35 @@ public struct ResetClusterParameterGroupOutput: Swift.Equatable { } } -struct ResetClusterParameterGroupOutputBody: Swift.Equatable { - let parameterGroupName: Swift.String? - let parameterGroupStatus: Swift.String? -} - -extension ResetClusterParameterGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case parameterGroupName = "ParameterGroupName" - case parameterGroupStatus = "ParameterGroupStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResetClusterParameterGroupResult")) - let parameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupName) - parameterGroupName = parameterGroupNameDecoded - let parameterGroupStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .parameterGroupStatus) - parameterGroupStatus = parameterGroupStatusDecoded - } -} +enum ResetClusterParameterGroupOutputError { -enum ResetClusterParameterGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterParameterGroupState": return try await InvalidClusterParameterGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterParameterGroupState": return try await InvalidClusterParameterGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResizeClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case classic = "Classic" + case clusterIdentifier = "ClusterIdentifier" + case clusterType = "ClusterType" + case nodeType = "NodeType" + case numberOfNodes = "NumberOfNodes" + case reservedNodeId = "ReservedNodeId" + case targetReservedNodeOfferingId = "TargetReservedNodeOfferingId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let classic = classic { @@ -33216,47 +23872,7 @@ public struct ResizeClusterInput: Swift.Equatable { } } -struct ResizeClusterInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let clusterType: Swift.String? - let nodeType: Swift.String? - let numberOfNodes: Swift.Int? - let classic: Swift.Bool? - let reservedNodeId: Swift.String? - let targetReservedNodeOfferingId: Swift.String? -} - -extension ResizeClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case classic = "Classic" - case clusterIdentifier = "ClusterIdentifier" - case clusterType = "ClusterType" - case nodeType = "NodeType" - case numberOfNodes = "NumberOfNodes" - case reservedNodeId = "ReservedNodeId" - case targetReservedNodeOfferingId = "TargetReservedNodeOfferingId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let clusterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterType) - clusterType = clusterTypeDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - let classicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .classic) - classic = classicDecoded - let reservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeId) - reservedNodeId = reservedNodeIdDecoded - let targetReservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetReservedNodeOfferingId) - targetReservedNodeOfferingId = targetReservedNodeOfferingIdDecoded - } -} - -extension RedshiftClientTypes.ResizeClusterMessage: Swift.Codable { +extension RedshiftClientTypes.ResizeClusterMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case classic = "Classic" case clusterIdentifier = "ClusterIdentifier" @@ -33292,22 +23908,19 @@ extension RedshiftClientTypes.ResizeClusterMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let clusterTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterType) - clusterType = clusterTypeDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - let classicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .classic) - classic = classicDecoded - let reservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeId) - reservedNodeId = reservedNodeIdDecoded - let targetReservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetReservedNodeOfferingId) - targetReservedNodeOfferingId = targetReservedNodeOfferingIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ResizeClusterMessage() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.clusterType = try reader["ClusterType"].readIfPresent() + value.nodeType = try reader["NodeType"].readIfPresent() + value.numberOfNodes = try reader["NumberOfNodes"].readIfPresent() + value.classic = try reader["Classic"].readIfPresent() + value.reservedNodeId = try reader["ReservedNodeId"].readIfPresent() + value.targetReservedNodeOfferingId = try reader["TargetReservedNodeOfferingId"].readIfPresent() + return value + } } } @@ -33352,14 +23965,15 @@ extension RedshiftClientTypes { } -extension ResizeClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResizeClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil +extension ResizeClusterOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResizeClusterResult"] + var value = ResizeClusterOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -33376,48 +23990,38 @@ public struct ResizeClusterOutput: Swift.Equatable { } } -struct ResizeClusterOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension ResizeClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResizeClusterResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum ResizeClusterOutputError { -enum ResizeClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededFault": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NumberOfNodesPerClusterLimitExceeded": return try await NumberOfNodesPerClusterLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NumberOfNodesQuotaExceeded": return try await NumberOfNodesQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeAlreadyExists": return try await ReservedNodeAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOptionFault": return try await UnsupportedOptionFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededFault": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NumberOfNodesPerClusterLimitExceeded": return try await NumberOfNodesPerClusterLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NumberOfNodesQuotaExceeded": return try await NumberOfNodesQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeAlreadyExists": return try await ReservedNodeAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOptionFault": return try await UnsupportedOptionFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.ResizeInfo: Swift.Codable { +extension RedshiftClientTypes.ResizeInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case allowCancelResize = "AllowCancelResize" case resizeType = "ResizeType" @@ -33433,12 +24037,14 @@ extension RedshiftClientTypes.ResizeInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resizeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resizeType) - resizeType = resizeTypeDecoded - let allowCancelResizeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowCancelResize) - allowCancelResize = allowCancelResizeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ResizeInfo() + value.resizeType = try reader["ResizeType"].readIfPresent() + value.allowCancelResize = try reader["AllowCancelResize"].readIfPresent() + return value + } } } @@ -33463,16 +24069,14 @@ extension RedshiftClientTypes { } extension ResizeNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResizeNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -33500,33 +24104,15 @@ public struct ResizeNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct ResizeNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResizeNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ResourceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -33554,23 +24140,7 @@ public struct ResourceNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct ResourceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ResourcePolicy: Swift.Codable { +extension RedshiftClientTypes.ResourcePolicy: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case policy = "Policy" case resourceArn = "ResourceArn" @@ -33586,12 +24156,14 @@ extension RedshiftClientTypes.ResourcePolicy: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ResourcePolicy() + value.resourceArn = try reader["ResourceArn"].readIfPresent() + value.policy = try reader["Policy"].readIfPresent() + return value + } } } @@ -33616,6 +24188,46 @@ extension RedshiftClientTypes { } extension RestoreFromClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case additionalInfo = "AdditionalInfo" + case allowVersionUpgrade = "AllowVersionUpgrade" + case aquaConfigurationStatus = "AquaConfigurationStatus" + case automatedSnapshotRetentionPeriod = "AutomatedSnapshotRetentionPeriod" + case availabilityZone = "AvailabilityZone" + case availabilityZoneRelocation = "AvailabilityZoneRelocation" + case clusterIdentifier = "ClusterIdentifier" + case clusterParameterGroupName = "ClusterParameterGroupName" + case clusterSecurityGroups = "ClusterSecurityGroups" + case clusterSubnetGroupName = "ClusterSubnetGroupName" + case defaultIamRoleArn = "DefaultIamRoleArn" + case elasticIp = "ElasticIp" + case encrypted = "Encrypted" + case enhancedVpcRouting = "EnhancedVpcRouting" + case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" + case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" + case iamRoles = "IamRoles" + case ipAddressType = "IpAddressType" + case kmsKeyId = "KmsKeyId" + case maintenanceTrackName = "MaintenanceTrackName" + case manageMasterPassword = "ManageMasterPassword" + case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" + case masterPasswordSecretKmsKeyId = "MasterPasswordSecretKmsKeyId" + case multiAZ = "MultiAZ" + case nodeType = "NodeType" + case numberOfNodes = "NumberOfNodes" + case ownerAccount = "OwnerAccount" + case port = "Port" + case preferredMaintenanceWindow = "PreferredMaintenanceWindow" + case publiclyAccessible = "PubliclyAccessible" + case reservedNodeId = "ReservedNodeId" + case snapshotArn = "SnapshotArn" + case snapshotClusterIdentifier = "SnapshotClusterIdentifier" + case snapshotIdentifier = "SnapshotIdentifier" + case snapshotScheduleIdentifier = "SnapshotScheduleIdentifier" + case targetReservedNodeOfferingId = "TargetReservedNodeOfferingId" + case vpcSecurityGroupIds = "VpcSecurityGroupIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let additionalInfo = additionalInfo { @@ -33942,225 +24554,15 @@ public struct RestoreFromClusterSnapshotInput: Swift.Equatable { } } -struct RestoreFromClusterSnapshotInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let snapshotIdentifier: Swift.String? - let snapshotArn: Swift.String? - let snapshotClusterIdentifier: Swift.String? - let port: Swift.Int? - let availabilityZone: Swift.String? - let allowVersionUpgrade: Swift.Bool? - let clusterSubnetGroupName: Swift.String? - let publiclyAccessible: Swift.Bool? - let ownerAccount: Swift.String? - let hsmClientCertificateIdentifier: Swift.String? - let hsmConfigurationIdentifier: Swift.String? - let elasticIp: Swift.String? - let clusterParameterGroupName: Swift.String? - let clusterSecurityGroups: [Swift.String]? - let vpcSecurityGroupIds: [Swift.String]? - let preferredMaintenanceWindow: Swift.String? - let automatedSnapshotRetentionPeriod: Swift.Int? - let manualSnapshotRetentionPeriod: Swift.Int? - let kmsKeyId: Swift.String? - let nodeType: Swift.String? - let enhancedVpcRouting: Swift.Bool? - let additionalInfo: Swift.String? - let iamRoles: [Swift.String]? - let maintenanceTrackName: Swift.String? - let snapshotScheduleIdentifier: Swift.String? - let numberOfNodes: Swift.Int? - let availabilityZoneRelocation: Swift.Bool? - let aquaConfigurationStatus: RedshiftClientTypes.AquaConfigurationStatus? - let defaultIamRoleArn: Swift.String? - let reservedNodeId: Swift.String? - let targetReservedNodeOfferingId: Swift.String? - let encrypted: Swift.Bool? - let manageMasterPassword: Swift.Bool? - let masterPasswordSecretKmsKeyId: Swift.String? - let ipAddressType: Swift.String? - let multiAZ: Swift.Bool? -} - -extension RestoreFromClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case additionalInfo = "AdditionalInfo" - case allowVersionUpgrade = "AllowVersionUpgrade" - case aquaConfigurationStatus = "AquaConfigurationStatus" - case automatedSnapshotRetentionPeriod = "AutomatedSnapshotRetentionPeriod" - case availabilityZone = "AvailabilityZone" - case availabilityZoneRelocation = "AvailabilityZoneRelocation" - case clusterIdentifier = "ClusterIdentifier" - case clusterParameterGroupName = "ClusterParameterGroupName" - case clusterSecurityGroups = "ClusterSecurityGroups" - case clusterSubnetGroupName = "ClusterSubnetGroupName" - case defaultIamRoleArn = "DefaultIamRoleArn" - case elasticIp = "ElasticIp" - case encrypted = "Encrypted" - case enhancedVpcRouting = "EnhancedVpcRouting" - case hsmClientCertificateIdentifier = "HsmClientCertificateIdentifier" - case hsmConfigurationIdentifier = "HsmConfigurationIdentifier" - case iamRoles = "IamRoles" - case ipAddressType = "IpAddressType" - case kmsKeyId = "KmsKeyId" - case maintenanceTrackName = "MaintenanceTrackName" - case manageMasterPassword = "ManageMasterPassword" - case manualSnapshotRetentionPeriod = "ManualSnapshotRetentionPeriod" - case masterPasswordSecretKmsKeyId = "MasterPasswordSecretKmsKeyId" - case multiAZ = "MultiAZ" - case nodeType = "NodeType" - case numberOfNodes = "NumberOfNodes" - case ownerAccount = "OwnerAccount" - case port = "Port" - case preferredMaintenanceWindow = "PreferredMaintenanceWindow" - case publiclyAccessible = "PubliclyAccessible" - case reservedNodeId = "ReservedNodeId" - case snapshotArn = "SnapshotArn" - case snapshotClusterIdentifier = "SnapshotClusterIdentifier" - case snapshotIdentifier = "SnapshotIdentifier" - case snapshotScheduleIdentifier = "SnapshotScheduleIdentifier" - case targetReservedNodeOfferingId = "TargetReservedNodeOfferingId" - case vpcSecurityGroupIds = "VpcSecurityGroupIds" - } +extension RestoreFromClusterSnapshotOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let snapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotArn) - snapshotArn = snapshotArnDecoded - let snapshotClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotClusterIdentifier) - snapshotClusterIdentifier = snapshotClusterIdentifierDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let allowVersionUpgradeDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowVersionUpgrade) - allowVersionUpgrade = allowVersionUpgradeDecoded - let clusterSubnetGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSubnetGroupName) - clusterSubnetGroupName = clusterSubnetGroupNameDecoded - let publiclyAccessibleDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publiclyAccessible) - publiclyAccessible = publiclyAccessibleDecoded - let ownerAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAccount) - ownerAccount = ownerAccountDecoded - let hsmClientCertificateIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmClientCertificateIdentifier) - hsmClientCertificateIdentifier = hsmClientCertificateIdentifierDecoded - let hsmConfigurationIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hsmConfigurationIdentifier) - hsmConfigurationIdentifier = hsmConfigurationIdentifierDecoded - let elasticIpDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .elasticIp) - elasticIp = elasticIpDecoded - let clusterParameterGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterParameterGroupName) - clusterParameterGroupName = clusterParameterGroupNameDecoded - if containerValues.contains(.clusterSecurityGroups) { - struct KeyVal0{struct ClusterSecurityGroupName{}} - let clusterSecurityGroupsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterSecurityGroups) - if let clusterSecurityGroupsWrappedContainer = clusterSecurityGroupsWrappedContainer { - let clusterSecurityGroupsContainer = try clusterSecurityGroupsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var clusterSecurityGroupsBuffer:[Swift.String]? = nil - if let clusterSecurityGroupsContainer = clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer = [Swift.String]() - for stringContainer0 in clusterSecurityGroupsContainer { - clusterSecurityGroupsBuffer?.append(stringContainer0) - } - } - clusterSecurityGroups = clusterSecurityGroupsBuffer - } else { - clusterSecurityGroups = [] - } - } else { - clusterSecurityGroups = nil - } - if containerValues.contains(.vpcSecurityGroupIds) { - struct KeyVal0{struct VpcSecurityGroupId{}} - let vpcSecurityGroupIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcSecurityGroupIds) - if let vpcSecurityGroupIdsWrappedContainer = vpcSecurityGroupIdsWrappedContainer { - let vpcSecurityGroupIdsContainer = try vpcSecurityGroupIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcSecurityGroupIdsBuffer:[Swift.String]? = nil - if let vpcSecurityGroupIdsContainer = vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer = [Swift.String]() - for stringContainer0 in vpcSecurityGroupIdsContainer { - vpcSecurityGroupIdsBuffer?.append(stringContainer0) - } - } - vpcSecurityGroupIds = vpcSecurityGroupIdsBuffer - } else { - vpcSecurityGroupIds = [] - } - } else { - vpcSecurityGroupIds = nil - } - let preferredMaintenanceWindowDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .preferredMaintenanceWindow) - preferredMaintenanceWindow = preferredMaintenanceWindowDecoded - let automatedSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .automatedSnapshotRetentionPeriod) - automatedSnapshotRetentionPeriod = automatedSnapshotRetentionPeriodDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let enhancedVpcRoutingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enhancedVpcRouting) - enhancedVpcRouting = enhancedVpcRoutingDecoded - let additionalInfoDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .additionalInfo) - additionalInfo = additionalInfoDecoded - if containerValues.contains(.iamRoles) { - struct KeyVal0{struct IamRoleArn{}} - let iamRolesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .iamRoles) - if let iamRolesWrappedContainer = iamRolesWrappedContainer { - let iamRolesContainer = try iamRolesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var iamRolesBuffer:[Swift.String]? = nil - if let iamRolesContainer = iamRolesContainer { - iamRolesBuffer = [Swift.String]() - for stringContainer0 in iamRolesContainer { - iamRolesBuffer?.append(stringContainer0) - } - } - iamRoles = iamRolesBuffer - } else { - iamRoles = [] - } - } else { - iamRoles = nil - } - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let snapshotScheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotScheduleIdentifier) - snapshotScheduleIdentifier = snapshotScheduleIdentifierDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - let availabilityZoneRelocationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .availabilityZoneRelocation) - availabilityZoneRelocation = availabilityZoneRelocationDecoded - let aquaConfigurationStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AquaConfigurationStatus.self, forKey: .aquaConfigurationStatus) - aquaConfigurationStatus = aquaConfigurationStatusDecoded - let defaultIamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultIamRoleArn) - defaultIamRoleArn = defaultIamRoleArnDecoded - let reservedNodeIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reservedNodeId) - reservedNodeId = reservedNodeIdDecoded - let targetReservedNodeOfferingIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetReservedNodeOfferingId) - targetReservedNodeOfferingId = targetReservedNodeOfferingIdDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let manageMasterPasswordDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .manageMasterPassword) - manageMasterPassword = manageMasterPasswordDecoded - let masterPasswordSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterPasswordSecretKmsKeyId) - masterPasswordSecretKmsKeyId = masterPasswordSecretKmsKeyIdDecoded - let ipAddressTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddressType) - ipAddressType = ipAddressTypeDecoded - let multiAZDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiAZ) - multiAZ = multiAZDecoded - } -} - -extension RestoreFromClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreFromClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreFromClusterSnapshotResult"] + var value = RestoreFromClusterSnapshotOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -34177,66 +24579,56 @@ public struct RestoreFromClusterSnapshotOutput: Swift.Equatable { } } -struct RestoreFromClusterSnapshotOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension RestoreFromClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreFromClusterSnapshotResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} - -enum RestoreFromClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessToSnapshotDenied": return try await AccessToSnapshotDeniedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterAlreadyExists": return try await ClusterAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterQuotaExceeded": return try await ClusterQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSubnetGroupStateFault": return try await InvalidClusterSubnetGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterTrack": return try await InvalidClusterTrackFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidElasticIpFault": return try await InvalidElasticIpFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRestore": return try await InvalidRestoreFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSubnet": return try await InvalidSubnet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTagFault": return try await InvalidTagFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Ipv6CidrBlockNotFoundFault": return try await Ipv6CidrBlockNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceededFault": return try await LimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NumberOfNodesPerClusterLimitExceeded": return try await NumberOfNodesPerClusterLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NumberOfNodesQuotaExceeded": return try await NumberOfNodesQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeAlreadyExists": return try await ReservedNodeAlreadyExistsFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceededFault": return try await TagLimitExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedOperation": return try await UnauthorizedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension RedshiftClientTypes.RestoreStatus: Swift.Codable { +enum RestoreFromClusterSnapshotOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AccessToSnapshotDenied": return try await AccessToSnapshotDeniedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterAlreadyExists": return try await ClusterAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterParameterGroupNotFound": return try await ClusterParameterGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterQuotaExceeded": return try await ClusterQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSubnetGroupNotFoundFault": return try await ClusterSubnetGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceUnavailableFault": return try await DependentServiceUnavailableFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "HsmClientCertificateNotFoundFault": return try await HsmClientCertificateNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "HsmConfigurationNotFoundFault": return try await HsmConfigurationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSubnetGroupStateFault": return try await InvalidClusterSubnetGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterTrack": return try await InvalidClusterTrackFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidElasticIpFault": return try await InvalidElasticIpFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidReservedNodeState": return try await InvalidReservedNodeStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidRestore": return try await InvalidRestoreFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSubnet": return try await InvalidSubnet.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTagFault": return try await InvalidTagFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidVPCNetworkStateFault": return try await InvalidVPCNetworkStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Ipv6CidrBlockNotFoundFault": return try await Ipv6CidrBlockNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceededFault": return try await LimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NumberOfNodesPerClusterLimitExceeded": return try await NumberOfNodesPerClusterLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NumberOfNodesQuotaExceeded": return try await NumberOfNodesQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeAlreadyExists": return try await ReservedNodeAlreadyExistsFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeAlreadyMigrated": return try await ReservedNodeAlreadyMigratedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeNotFound": return try await ReservedNodeNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReservedNodeOfferingNotFound": return try await ReservedNodeOfferingNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SnapshotScheduleNotFound": return try await SnapshotScheduleNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceededFault": return try await TagLimitExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedOperation": return try await UnauthorizedOperation.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } +} + +extension RedshiftClientTypes.RestoreStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case currentRestoreRateInMegaBytesPerSecond = "CurrentRestoreRateInMegaBytesPerSecond" case elapsedTimeInSeconds = "ElapsedTimeInSeconds" @@ -34268,20 +24660,18 @@ extension RedshiftClientTypes.RestoreStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let currentRestoreRateInMegaBytesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .currentRestoreRateInMegaBytesPerSecond) - currentRestoreRateInMegaBytesPerSecond = currentRestoreRateInMegaBytesPerSecondDecoded - let snapshotSizeInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .snapshotSizeInMegaBytes) - snapshotSizeInMegaBytes = snapshotSizeInMegaBytesDecoded - let progressInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .progressInMegaBytes) - progressInMegaBytes = progressInMegaBytesDecoded - let elapsedTimeInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .elapsedTimeInSeconds) - elapsedTimeInSeconds = elapsedTimeInSecondsDecoded - let estimatedTimeToCompletionInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .estimatedTimeToCompletionInSeconds) - estimatedTimeToCompletionInSeconds = estimatedTimeToCompletionInSecondsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.RestoreStatus() + value.status = try reader["Status"].readIfPresent() + value.currentRestoreRateInMegaBytesPerSecond = try reader["CurrentRestoreRateInMegaBytesPerSecond"].readIfPresent() + value.snapshotSizeInMegaBytes = try reader["SnapshotSizeInMegaBytes"].readIfPresent() + value.progressInMegaBytes = try reader["ProgressInMegaBytes"].readIfPresent() + value.elapsedTimeInSeconds = try reader["ElapsedTimeInSeconds"].readIfPresent() + value.estimatedTimeToCompletionInSeconds = try reader["EstimatedTimeToCompletionInSeconds"].readIfPresent() + return value + } } } @@ -34322,6 +24712,18 @@ extension RedshiftClientTypes { } extension RestoreTableFromClusterSnapshotInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + case enableCaseSensitiveIdentifier = "EnableCaseSensitiveIdentifier" + case newTableName = "NewTableName" + case snapshotIdentifier = "SnapshotIdentifier" + case sourceDatabaseName = "SourceDatabaseName" + case sourceSchemaName = "SourceSchemaName" + case sourceTableName = "SourceTableName" + case targetDatabaseName = "TargetDatabaseName" + case targetSchemaName = "TargetSchemaName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -34413,62 +24815,15 @@ public struct RestoreTableFromClusterSnapshotInput: Swift.Equatable { } } -struct RestoreTableFromClusterSnapshotInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let snapshotIdentifier: Swift.String? - let sourceDatabaseName: Swift.String? - let sourceSchemaName: Swift.String? - let sourceTableName: Swift.String? - let targetDatabaseName: Swift.String? - let targetSchemaName: Swift.String? - let newTableName: Swift.String? - let enableCaseSensitiveIdentifier: Swift.Bool? -} - -extension RestoreTableFromClusterSnapshotInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - case enableCaseSensitiveIdentifier = "EnableCaseSensitiveIdentifier" - case newTableName = "NewTableName" - case snapshotIdentifier = "SnapshotIdentifier" - case sourceDatabaseName = "SourceDatabaseName" - case sourceSchemaName = "SourceSchemaName" - case sourceTableName = "SourceTableName" - case targetDatabaseName = "TargetDatabaseName" - case targetSchemaName = "TargetSchemaName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let sourceDatabaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDatabaseName) - sourceDatabaseName = sourceDatabaseNameDecoded - let sourceSchemaNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSchemaName) - sourceSchemaName = sourceSchemaNameDecoded - let sourceTableNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceTableName) - sourceTableName = sourceTableNameDecoded - let targetDatabaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDatabaseName) - targetDatabaseName = targetDatabaseNameDecoded - let targetSchemaNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetSchemaName) - targetSchemaName = targetSchemaNameDecoded - let newTableNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newTableName) - newTableName = newTableNameDecoded - let enableCaseSensitiveIdentifierDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableCaseSensitiveIdentifier) - enableCaseSensitiveIdentifier = enableCaseSensitiveIdentifierDecoded - } -} +extension RestoreTableFromClusterSnapshotOutput { -extension RestoreTableFromClusterSnapshotOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RestoreTableFromClusterSnapshotOutputBody = try responseDecoder.decode(responseBody: data) - self.tableRestoreStatus = output.tableRestoreStatus - } else { - self.tableRestoreStatus = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RestoreTableFromClusterSnapshotResult"] + var value = RestoreTableFromClusterSnapshotOutput() + value.tableRestoreStatus = try reader["TableRestoreStatus"].readIfPresent(readingClosure: RedshiftClientTypes.TableRestoreStatus.readingClosure) + return value } } } @@ -34485,40 +24840,34 @@ public struct RestoreTableFromClusterSnapshotOutput: Swift.Equatable { } } -struct RestoreTableFromClusterSnapshotOutputBody: Swift.Equatable { - let tableRestoreStatus: RedshiftClientTypes.TableRestoreStatus? -} - -extension RestoreTableFromClusterSnapshotOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tableRestoreStatus = "TableRestoreStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RestoreTableFromClusterSnapshotResult")) - let tableRestoreStatusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.TableRestoreStatus.self, forKey: .tableRestoreStatus) - tableRestoreStatus = tableRestoreStatusDecoded - } -} +enum RestoreTableFromClusterSnapshotOutputError { -enum RestoreTableFromClusterSnapshotOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InProgressTableRestoreQuotaExceededFault": return try await InProgressTableRestoreQuotaExceededFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTableRestoreArgument": return try await InvalidTableRestoreArgumentFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InProgressTableRestoreQuotaExceededFault": return try await InProgressTableRestoreQuotaExceededFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSnapshotState": return try await InvalidClusterSnapshotStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTableRestoreArgument": return try await InvalidTableRestoreArgumentFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ResumeClusterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -34550,23 +24899,7 @@ public struct ResumeClusterInput: Swift.Equatable { } } -struct ResumeClusterInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension ResumeClusterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} - -extension RedshiftClientTypes.ResumeClusterMessage: Swift.Codable { +extension RedshiftClientTypes.ResumeClusterMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterIdentifier = "ClusterIdentifier" } @@ -34578,10 +24911,13 @@ extension RedshiftClientTypes.ResumeClusterMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ResumeClusterMessage() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + return value + } } } @@ -34602,14 +24938,15 @@ extension RedshiftClientTypes { } -extension ResumeClusterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ResumeClusterOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil +extension ResumeClusterOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ResumeClusterResult"] + var value = ResumeClusterOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -34626,37 +24963,27 @@ public struct ResumeClusterOutput: Swift.Equatable { } } -struct ResumeClusterOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension ResumeClusterOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } +enum ResumeClusterOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ResumeClusterResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} - -enum ResumeClusterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InsufficientClusterCapacity": return try await InsufficientClusterCapacityFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.RevisionTarget: Swift.Codable { +extension RedshiftClientTypes.RevisionTarget: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case databaseRevision = "DatabaseRevision" case databaseRevisionReleaseDate = "DatabaseRevisionReleaseDate" @@ -34676,14 +25003,15 @@ extension RedshiftClientTypes.RevisionTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let databaseRevisionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseRevision) - databaseRevision = databaseRevisionDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let databaseRevisionReleaseDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .databaseRevisionReleaseDate) - databaseRevisionReleaseDate = databaseRevisionReleaseDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.RevisionTarget() + value.databaseRevision = try reader["DatabaseRevision"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.databaseRevisionReleaseDate = try reader["DatabaseRevisionReleaseDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -34712,6 +25040,13 @@ extension RedshiftClientTypes { } extension RevokeClusterSecurityGroupIngressInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case cidrip = "CIDRIP" + case clusterSecurityGroupName = "ClusterSecurityGroupName" + case ec2SecurityGroupName = "EC2SecurityGroupName" + case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let cidrip = cidrip { @@ -34757,49 +25092,22 @@ public struct RevokeClusterSecurityGroupIngressInput: Swift.Equatable { ec2SecurityGroupOwnerId: Swift.String? = nil ) { - self.cidrip = cidrip - self.clusterSecurityGroupName = clusterSecurityGroupName - self.ec2SecurityGroupName = ec2SecurityGroupName - self.ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerId - } -} - -struct RevokeClusterSecurityGroupIngressInputBody: Swift.Equatable { - let clusterSecurityGroupName: Swift.String? - let cidrip: Swift.String? - let ec2SecurityGroupName: Swift.String? - let ec2SecurityGroupOwnerId: Swift.String? -} - -extension RevokeClusterSecurityGroupIngressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrip = "CIDRIP" - case clusterSecurityGroupName = "ClusterSecurityGroupName" - case ec2SecurityGroupName = "EC2SecurityGroupName" - case ec2SecurityGroupOwnerId = "EC2SecurityGroupOwnerId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterSecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterSecurityGroupName) - clusterSecurityGroupName = clusterSecurityGroupNameDecoded - let cidripDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrip) - cidrip = cidripDecoded - let ec2SecurityGroupNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupName) - ec2SecurityGroupName = ec2SecurityGroupNameDecoded - let ec2SecurityGroupOwnerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ec2SecurityGroupOwnerId) - ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerIdDecoded + self.cidrip = cidrip + self.clusterSecurityGroupName = clusterSecurityGroupName + self.ec2SecurityGroupName = ec2SecurityGroupName + self.ec2SecurityGroupOwnerId = ec2SecurityGroupOwnerId } } -extension RevokeClusterSecurityGroupIngressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RevokeClusterSecurityGroupIngressOutputBody = try responseDecoder.decode(responseBody: data) - self.clusterSecurityGroup = output.clusterSecurityGroup - } else { - self.clusterSecurityGroup = nil +extension RevokeClusterSecurityGroupIngressOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RevokeClusterSecurityGroupIngressResult"] + var value = RevokeClusterSecurityGroupIngressOutput() + value.clusterSecurityGroup = try reader["ClusterSecurityGroup"].readIfPresent(readingClosure: RedshiftClientTypes.ClusterSecurityGroup.readingClosure) + return value } } } @@ -34816,36 +25124,33 @@ public struct RevokeClusterSecurityGroupIngressOutput: Swift.Equatable { } } -struct RevokeClusterSecurityGroupIngressOutputBody: Swift.Equatable { - let clusterSecurityGroup: RedshiftClientTypes.ClusterSecurityGroup? -} - -extension RevokeClusterSecurityGroupIngressOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterSecurityGroup = "ClusterSecurityGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RevokeClusterSecurityGroupIngressResult")) - let clusterSecurityGroupDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ClusterSecurityGroup.self, forKey: .clusterSecurityGroup) - clusterSecurityGroup = clusterSecurityGroupDecoded - } -} +enum RevokeClusterSecurityGroupIngressOutputError { -enum RevokeClusterSecurityGroupIngressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSecurityGroupNotFound": return try await ClusterSecurityGroupNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RevokeEndpointAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case account = "Account" + case clusterIdentifier = "ClusterIdentifier" + case force = "Force" + case vpcIds = "VpcIds" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let account = account { @@ -34905,75 +25210,23 @@ public struct RevokeEndpointAccessInput: Swift.Equatable { } } -struct RevokeEndpointAccessInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? - let account: Swift.String? - let vpcIds: [Swift.String]? - let force: Swift.Bool? -} - -extension RevokeEndpointAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case account = "Account" - case clusterIdentifier = "ClusterIdentifier" - case force = "Force" - case vpcIds = "VpcIds" - } +extension RevokeEndpointAccessOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - if containerValues.contains(.vpcIds) { - struct KeyVal0{struct VpcIdentifier{}} - let vpcIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpcIds) - if let vpcIdsWrappedContainer = vpcIdsWrappedContainer { - let vpcIdsContainer = try vpcIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var vpcIdsBuffer:[Swift.String]? = nil - if let vpcIdsContainer = vpcIdsContainer { - vpcIdsBuffer = [Swift.String]() - for stringContainer0 in vpcIdsContainer { - vpcIdsBuffer?.append(stringContainer0) - } - } - vpcIds = vpcIdsBuffer - } else { - vpcIds = [] - } - } else { - vpcIds = nil - } - let forceDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .force) - force = forceDecoded - } -} - -extension RevokeEndpointAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RevokeEndpointAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.allowedAllVPCs = output.allowedAllVPCs - self.allowedVPCs = output.allowedVPCs - self.authorizeTime = output.authorizeTime - self.clusterIdentifier = output.clusterIdentifier - self.clusterStatus = output.clusterStatus - self.endpointCount = output.endpointCount - self.grantee = output.grantee - self.grantor = output.grantor - self.status = output.status - } else { - self.allowedAllVPCs = nil - self.allowedVPCs = nil - self.authorizeTime = nil - self.clusterIdentifier = nil - self.clusterStatus = nil - self.endpointCount = nil - self.grantee = nil - self.grantor = nil - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RevokeEndpointAccessResult"] + var value = RevokeEndpointAccessOutput() + value.allowedAllVPCs = try reader["AllowedAllVPCs"].readIfPresent() + value.allowedVPCs = try reader["AllowedVPCs"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "VpcIdentifier", isFlattened: false) + value.authorizeTime = try reader["AuthorizeTime"].readTimestampIfPresent(format: .dateTime) + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.clusterStatus = try reader["ClusterStatus"].readIfPresent() + value.endpointCount = try reader["EndpointCount"].readIfPresent() + value.grantee = try reader["Grantee"].readIfPresent() + value.grantor = try reader["Grantor"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -35023,89 +25276,37 @@ public struct RevokeEndpointAccessOutput: Swift.Equatable { } } -struct RevokeEndpointAccessOutputBody: Swift.Equatable { - let grantor: Swift.String? - let grantee: Swift.String? - let clusterIdentifier: Swift.String? - let authorizeTime: ClientRuntime.Date? - let clusterStatus: Swift.String? - let status: RedshiftClientTypes.AuthorizationStatus? - let allowedAllVPCs: Swift.Bool? - let allowedVPCs: [Swift.String]? - let endpointCount: Swift.Int? -} - -extension RevokeEndpointAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowedAllVPCs = "AllowedAllVPCs" - case allowedVPCs = "AllowedVPCs" - case authorizeTime = "AuthorizeTime" - case clusterIdentifier = "ClusterIdentifier" - case clusterStatus = "ClusterStatus" - case endpointCount = "EndpointCount" - case grantee = "Grantee" - case grantor = "Grantor" - case status = "Status" - } +enum RevokeEndpointAccessOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RevokeEndpointAccessResult")) - let grantorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantor) - grantor = grantorDecoded - let granteeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantee) - grantee = granteeDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let authorizeTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .authorizeTime) - authorizeTime = authorizeTimeDecoded - let clusterStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterStatus) - clusterStatus = clusterStatusDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AuthorizationStatus.self, forKey: .status) - status = statusDecoded - let allowedAllVPCsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowedAllVPCs) - allowedAllVPCs = allowedAllVPCsDecoded - if containerValues.contains(.allowedVPCs) { - struct KeyVal0{struct VpcIdentifier{}} - let allowedVPCsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedVPCs) - if let allowedVPCsWrappedContainer = allowedVPCsWrappedContainer { - let allowedVPCsContainer = try allowedVPCsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var allowedVPCsBuffer:[Swift.String]? = nil - if let allowedVPCsContainer = allowedVPCsContainer { - allowedVPCsBuffer = [Swift.String]() - for stringContainer0 in allowedVPCsContainer { - allowedVPCsBuffer?.append(stringContainer0) - } - } - allowedVPCs = allowedVPCsBuffer - } else { - allowedVPCs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointAuthorizationNotFound": return try await EndpointAuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointNotFound": return try await EndpointNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidAuthorizationState": return try await InvalidAuthorizationStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidEndpointState": return try await InvalidEndpointStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - allowedVPCs = nil } - let endpointCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .endpointCount) - endpointCount = endpointCountDecoded } } -enum RevokeEndpointAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointAuthorizationNotFound": return try await EndpointAuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointNotFound": return try await EndpointNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidAuthorizationState": return try await InvalidAuthorizationStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterSecurityGroupState": return try await InvalidClusterSecurityGroupStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidEndpointState": return try await InvalidEndpointStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension RevokeSnapshotAccessInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accountWithRestoreAccess = "AccountWithRestoreAccess" + case snapshotArn = "SnapshotArn" + case snapshotClusterIdentifier = "SnapshotClusterIdentifier" + case snapshotIdentifier = "SnapshotIdentifier" } -} -extension RevokeSnapshotAccessInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accountWithRestoreAccess = accountWithRestoreAccess { @@ -35158,42 +25359,15 @@ public struct RevokeSnapshotAccessInput: Swift.Equatable { } } -struct RevokeSnapshotAccessInputBody: Swift.Equatable { - let snapshotIdentifier: Swift.String? - let snapshotArn: Swift.String? - let snapshotClusterIdentifier: Swift.String? - let accountWithRestoreAccess: Swift.String? -} - -extension RevokeSnapshotAccessInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountWithRestoreAccess = "AccountWithRestoreAccess" - case snapshotArn = "SnapshotArn" - case snapshotClusterIdentifier = "SnapshotClusterIdentifier" - case snapshotIdentifier = "SnapshotIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let snapshotArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotArn) - snapshotArn = snapshotArnDecoded - let snapshotClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotClusterIdentifier) - snapshotClusterIdentifier = snapshotClusterIdentifierDecoded - let accountWithRestoreAccessDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountWithRestoreAccess) - accountWithRestoreAccess = accountWithRestoreAccessDecoded - } -} +extension RevokeSnapshotAccessOutput { -extension RevokeSnapshotAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RevokeSnapshotAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.snapshot = output.snapshot - } else { - self.snapshot = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RevokeSnapshotAccessResult"] + var value = RevokeSnapshotAccessOutput() + value.snapshot = try reader["Snapshot"].readIfPresent(readingClosure: RedshiftClientTypes.Snapshot.readingClosure) + return value } } } @@ -35210,37 +25384,31 @@ public struct RevokeSnapshotAccessOutput: Swift.Equatable { } } -struct RevokeSnapshotAccessOutputBody: Swift.Equatable { - let snapshot: RedshiftClientTypes.Snapshot? -} - -extension RevokeSnapshotAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case snapshot = "Snapshot" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RevokeSnapshotAccessResult")) - let snapshotDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Snapshot.self, forKey: .snapshot) - snapshot = snapshotDecoded - } -} +enum RevokeSnapshotAccessOutputError { -enum RevokeSnapshotAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccessToSnapshotDenied": return try await AccessToSnapshotDeniedFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AuthorizationNotFound": return try await AuthorizationNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AccessToSnapshotDenied": return try await AccessToSnapshotDeniedFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "AuthorizationNotFound": return try await AuthorizationNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ClusterSnapshotNotFound": return try await ClusterSnapshotNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RotateEncryptionKeyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case clusterIdentifier = "ClusterIdentifier" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let clusterIdentifier = clusterIdentifier { @@ -35272,30 +25440,15 @@ public struct RotateEncryptionKeyInput: Swift.Equatable { } } -struct RotateEncryptionKeyInputBody: Swift.Equatable { - let clusterIdentifier: Swift.String? -} - -extension RotateEncryptionKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clusterIdentifier = "ClusterIdentifier" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - } -} +extension RotateEncryptionKeyOutput { -extension RotateEncryptionKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: RotateEncryptionKeyOutputBody = try responseDecoder.decode(responseBody: data) - self.cluster = output.cluster - } else { - self.cluster = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["RotateEncryptionKeyResult"] + var value = RotateEncryptionKeyOutput() + value.cluster = try reader["Cluster"].readIfPresent(readingClosure: RedshiftClientTypes.Cluster.readingClosure) + return value } } } @@ -35312,47 +25465,35 @@ public struct RotateEncryptionKeyOutput: Swift.Equatable { } } -struct RotateEncryptionKeyOutputBody: Swift.Equatable { - let cluster: RedshiftClientTypes.Cluster? -} - -extension RotateEncryptionKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cluster = "Cluster" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("RotateEncryptionKeyResult")) - let clusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Cluster.self, forKey: .cluster) - cluster = clusterDecoded - } -} +enum RotateEncryptionKeyOutputError { -enum RotateEncryptionKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidClusterState": return try await InvalidClusterStateFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "DependentServiceRequestThrottlingFault": return try await DependentServiceRequestThrottlingFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidClusterState": return try await InvalidClusterStateFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SNSInvalidTopicFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSInvalidTopicFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35380,33 +25521,15 @@ public struct SNSInvalidTopicFault: ClientRuntime.ModeledError, AWSClientRuntime } } -struct SNSInvalidTopicFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSInvalidTopicFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSNoAuthorizationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSNoAuthorizationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35434,33 +25557,15 @@ public struct SNSNoAuthorizationFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct SNSNoAuthorizationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSNoAuthorizationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSTopicArnNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SNSTopicArnNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35488,33 +25593,15 @@ public struct SNSTopicArnNotFoundFault: ClientRuntime.ModeledError, AWSClientRun } } -struct SNSTopicArnNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SNSTopicArnNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ScheduleDefinitionTypeUnsupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ScheduleDefinitionTypeUnsupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35542,22 +25629,6 @@ public struct ScheduleDefinitionTypeUnsupportedFault: ClientRuntime.ModeledError } } -struct ScheduleDefinitionTypeUnsupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ScheduleDefinitionTypeUnsupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum ScheduleState: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case active @@ -35593,7 +25664,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.ScheduledAction: Swift.Codable { +extension RedshiftClientTypes.ScheduledAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case endTime = "EndTime" case iamRole = "IamRole" @@ -35646,43 +25717,21 @@ extension RedshiftClientTypes.ScheduledAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scheduledActionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionName) - scheduledActionName = scheduledActionNameDecoded - let targetActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionType.self, forKey: .targetAction) - targetAction = targetActionDecoded - let scheduleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .schedule) - schedule = scheduleDecoded - let iamRoleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRole) - iamRole = iamRoleDecoded - let scheduledActionDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduledActionDescription) - scheduledActionDescription = scheduledActionDescriptionDecoded - let stateDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionState.self, forKey: .state) - state = stateDecoded - if containerValues.contains(.nextInvocations) { - struct KeyVal0{struct ScheduledActionTime{}} - let nextInvocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nextInvocations) - if let nextInvocationsWrappedContainer = nextInvocationsWrappedContainer { - let nextInvocationsContainer = try nextInvocationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nextInvocationsBuffer:[ClientRuntime.Date]? = nil - if let nextInvocationsContainer = nextInvocationsContainer { - nextInvocationsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in nextInvocationsContainer { - try nextInvocationsBuffer?.append(nextInvocationsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - nextInvocations = nextInvocationsBuffer - } else { - nextInvocations = [] - } - } else { - nextInvocations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ScheduledAction() + value.scheduledActionName = try reader["ScheduledActionName"].readIfPresent() + value.targetAction = try reader["TargetAction"].readIfPresent(readingClosure: RedshiftClientTypes.ScheduledActionType.readingClosure) + value.schedule = try reader["Schedule"].readIfPresent() + value.iamRole = try reader["IamRole"].readIfPresent() + value.scheduledActionDescription = try reader["ScheduledActionDescription"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.nextInvocations = try reader["NextInvocations"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "ScheduledActionTime", isFlattened: false) + value.startTime = try reader["StartTime"].readTimestampIfPresent(format: .dateTime) + value.endTime = try reader["EndTime"].readTimestampIfPresent(format: .dateTime) + return value } - let startTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .startTime) - startTime = startTimeDecoded - let endTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .endTime) - endTime = endTimeDecoded } } @@ -35735,16 +25784,14 @@ extension RedshiftClientTypes { } extension ScheduledActionAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ScheduledActionAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35772,23 +25819,7 @@ public struct ScheduledActionAlreadyExistsFault: ClientRuntime.ModeledError, AWS } } -struct ScheduledActionAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ScheduledActionAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.ScheduledActionFilter: Swift.Codable { +extension RedshiftClientTypes.ScheduledActionFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case values = "Values" @@ -35813,28 +25844,13 @@ extension RedshiftClientTypes.ScheduledActionFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ScheduledActionFilterName.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.values) { - struct KeyVal0{struct item{}} - let valuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .values) - if let valuesWrappedContainer = valuesWrappedContainer { - let valuesContainer = try valuesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var valuesBuffer:[Swift.String]? = nil - if let valuesContainer = valuesContainer { - valuesBuffer = [Swift.String]() - for stringContainer0 in valuesContainer { - valuesBuffer?.append(stringContainer0) - } - } - values = valuesBuffer - } else { - values = [] - } - } else { - values = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ScheduledActionFilter() + value.name = try reader["Name"].readIfPresent() + value.values = try reader["Values"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "item", isFlattened: false) + return value } } } @@ -35894,16 +25910,14 @@ extension RedshiftClientTypes { } extension ScheduledActionNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ScheduledActionNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35931,33 +25945,15 @@ public struct ScheduledActionNotFoundFault: ClientRuntime.ModeledError, AWSClien } } -struct ScheduledActionNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ScheduledActionNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ScheduledActionQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ScheduledActionQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -35985,22 +25981,6 @@ public struct ScheduledActionQuotaExceededFault: ClientRuntime.ModeledError, AWS } } -struct ScheduledActionQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ScheduledActionQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum ScheduledActionState: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case active @@ -36033,7 +26013,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.ScheduledActionType: Swift.Codable { +extension RedshiftClientTypes.ScheduledActionType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case pauseCluster = "PauseCluster" case resizeCluster = "ResizeCluster" @@ -36053,14 +26033,15 @@ extension RedshiftClientTypes.ScheduledActionType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resizeClusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ResizeClusterMessage.self, forKey: .resizeCluster) - resizeCluster = resizeClusterDecoded - let pauseClusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.PauseClusterMessage.self, forKey: .pauseCluster) - pauseCluster = pauseClusterDecoded - let resumeClusterDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.ResumeClusterMessage.self, forKey: .resumeCluster) - resumeCluster = resumeClusterDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.ScheduledActionType() + value.resizeCluster = try reader["ResizeCluster"].readIfPresent(readingClosure: RedshiftClientTypes.ResizeClusterMessage.readingClosure) + value.pauseCluster = try reader["PauseCluster"].readIfPresent(readingClosure: RedshiftClientTypes.PauseClusterMessage.readingClosure) + value.resumeCluster = try reader["ResumeCluster"].readIfPresent(readingClosure: RedshiftClientTypes.ResumeClusterMessage.readingClosure) + return value + } } } @@ -36089,16 +26070,14 @@ extension RedshiftClientTypes { } extension ScheduledActionTypeUnsupportedFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ScheduledActionTypeUnsupportedFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36126,22 +26105,6 @@ public struct ScheduledActionTypeUnsupportedFault: ClientRuntime.ModeledError, A } } -struct ScheduledActionTypeUnsupportedFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension ScheduledActionTypeUnsupportedFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum ScheduledActionTypeValues: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case pauseCluster @@ -36177,7 +26140,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.SecondaryClusterInfo: Swift.Codable { +extension RedshiftClientTypes.SecondaryClusterInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case availabilityZone = "AvailabilityZone" case clusterNodes = "ClusterNodes" @@ -36202,28 +26165,13 @@ extension RedshiftClientTypes.SecondaryClusterInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - if containerValues.contains(.clusterNodes) { - struct KeyVal0{struct member{}} - let clusterNodesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .clusterNodes) - if let clusterNodesWrappedContainer = clusterNodesWrappedContainer { - let clusterNodesContainer = try clusterNodesWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterNode].self, forKey: .member) - var clusterNodesBuffer:[RedshiftClientTypes.ClusterNode]? = nil - if let clusterNodesContainer = clusterNodesContainer { - clusterNodesBuffer = [RedshiftClientTypes.ClusterNode]() - for structureContainer0 in clusterNodesContainer { - clusterNodesBuffer?.append(structureContainer0) - } - } - clusterNodes = clusterNodesBuffer - } else { - clusterNodes = [] - } - } else { - clusterNodes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.SecondaryClusterInfo() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.clusterNodes = try reader["ClusterNodes"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterNode.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -36280,7 +26228,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.ServiceIntegrationsUnion: Swift.Codable { +extension RedshiftClientTypes.ServiceIntegrationsUnion: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lakeformation = "LakeFormation" case sdkUnknown @@ -36299,23 +26247,17 @@ extension RedshiftClientTypes.ServiceIntegrationsUnion: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let values = try decoder.container(keyedBy: CodingKeys.self) - let lakeformationContainer = try values.decodeIfPresent([RedshiftClientTypes.LakeFormationScopeUnion?].self, forKey: .lakeformation) - var lakeformationDecoded0:[RedshiftClientTypes.LakeFormationScopeUnion]? = nil - if let lakeformationContainer = lakeformationContainer { - lakeformationDecoded0 = [RedshiftClientTypes.LakeFormationScopeUnion]() - for union0 in lakeformationContainer { - if let union0 = union0 { - lakeformationDecoded0?.append(union0) - } + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + let name = reader.children.first?.nodeInfo.name + switch name { + case "LakeFormation": + return .lakeformation(try reader["LakeFormation"].readList(memberReadingClosure: RedshiftClientTypes.LakeFormationScopeUnion.readingClosure, memberNodeInfo: "member", isFlattened: false)) + default: + return .sdkUnknown(name ?? "") } } - if let lakeformation = lakeformationDecoded0 { - self = .lakeformation(lakeformation) - return - } - self = .sdkUnknown("") } } @@ -36329,7 +26271,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.Snapshot: Swift.Codable { +extension RedshiftClientTypes.Snapshot: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accountsWithRestoreAccess = "AccountsWithRestoreAccess" case actualIncrementalBackupSizeInMegaBytes = "ActualIncrementalBackupSizeInMegaBytes" @@ -36508,131 +26450,48 @@ extension RedshiftClientTypes.Snapshot: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let snapshotCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotCreateTime) - snapshotCreateTime = snapshotCreateTimeDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let availabilityZoneDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .availabilityZone) - availabilityZone = availabilityZoneDecoded - let clusterCreateTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .clusterCreateTime) - clusterCreateTime = clusterCreateTimeDecoded - let masterUsernameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterUsername) - masterUsername = masterUsernameDecoded - let clusterVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterVersion) - clusterVersion = clusterVersionDecoded - let engineFullVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .engineFullVersion) - engineFullVersion = engineFullVersionDecoded - let snapshotTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotType) - snapshotType = snapshotTypeDecoded - let nodeTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nodeType) - nodeType = nodeTypeDecoded - let numberOfNodesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfNodes) - numberOfNodes = numberOfNodesDecoded - let dbNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dbName) - dbName = dbNameDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - let encryptedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encrypted) - encrypted = encryptedDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let encryptedWithHSMDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .encryptedWithHSM) - encryptedWithHSM = encryptedWithHSMDecoded - if containerValues.contains(.accountsWithRestoreAccess) { - struct KeyVal0{struct AccountWithRestoreAccess{}} - let accountsWithRestoreAccessWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accountsWithRestoreAccess) - if let accountsWithRestoreAccessWrappedContainer = accountsWithRestoreAccessWrappedContainer { - let accountsWithRestoreAccessContainer = try accountsWithRestoreAccessWrappedContainer.decodeIfPresent([RedshiftClientTypes.AccountWithRestoreAccess].self, forKey: .member) - var accountsWithRestoreAccessBuffer:[RedshiftClientTypes.AccountWithRestoreAccess]? = nil - if let accountsWithRestoreAccessContainer = accountsWithRestoreAccessContainer { - accountsWithRestoreAccessBuffer = [RedshiftClientTypes.AccountWithRestoreAccess]() - for structureContainer0 in accountsWithRestoreAccessContainer { - accountsWithRestoreAccessBuffer?.append(structureContainer0) - } - } - accountsWithRestoreAccess = accountsWithRestoreAccessBuffer - } else { - accountsWithRestoreAccess = [] - } - } else { - accountsWithRestoreAccess = nil - } - let ownerAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ownerAccount) - ownerAccount = ownerAccountDecoded - let totalBackupSizeInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .totalBackupSizeInMegaBytes) - totalBackupSizeInMegaBytes = totalBackupSizeInMegaBytesDecoded - let actualIncrementalBackupSizeInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .actualIncrementalBackupSizeInMegaBytes) - actualIncrementalBackupSizeInMegaBytes = actualIncrementalBackupSizeInMegaBytesDecoded - let backupProgressInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .backupProgressInMegaBytes) - backupProgressInMegaBytes = backupProgressInMegaBytesDecoded - let currentBackupRateInMegaBytesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .currentBackupRateInMegaBytesPerSecond) - currentBackupRateInMegaBytesPerSecond = currentBackupRateInMegaBytesPerSecondDecoded - let estimatedSecondsToCompletionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .estimatedSecondsToCompletion) - estimatedSecondsToCompletion = estimatedSecondsToCompletionDecoded - let elapsedTimeInSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .elapsedTimeInSeconds) - elapsedTimeInSeconds = elapsedTimeInSecondsDecoded - let sourceRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceRegion) - sourceRegion = sourceRegionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.restorableNodeTypes) { - struct KeyVal0{struct NodeType{}} - let restorableNodeTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .restorableNodeTypes) - if let restorableNodeTypesWrappedContainer = restorableNodeTypesWrappedContainer { - let restorableNodeTypesContainer = try restorableNodeTypesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var restorableNodeTypesBuffer:[Swift.String]? = nil - if let restorableNodeTypesContainer = restorableNodeTypesContainer { - restorableNodeTypesBuffer = [Swift.String]() - for stringContainer0 in restorableNodeTypesContainer { - restorableNodeTypesBuffer?.append(stringContainer0) - } - } - restorableNodeTypes = restorableNodeTypesBuffer - } else { - restorableNodeTypes = [] - } - } else { - restorableNodeTypes = nil - } - let enhancedVpcRoutingDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enhancedVpcRouting) - enhancedVpcRouting = enhancedVpcRoutingDecoded - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let manualSnapshotRetentionPeriodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRetentionPeriod) - manualSnapshotRetentionPeriod = manualSnapshotRetentionPeriodDecoded - let manualSnapshotRemainingDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .manualSnapshotRemainingDays) - manualSnapshotRemainingDays = manualSnapshotRemainingDaysDecoded - let snapshotRetentionStartTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .snapshotRetentionStartTime) - snapshotRetentionStartTime = snapshotRetentionStartTimeDecoded - let masterPasswordSecretArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterPasswordSecretArn) - masterPasswordSecretArn = masterPasswordSecretArnDecoded - let masterPasswordSecretKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .masterPasswordSecretKmsKeyId) - masterPasswordSecretKmsKeyId = masterPasswordSecretKmsKeyIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.Snapshot() + value.snapshotIdentifier = try reader["SnapshotIdentifier"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.snapshotCreateTime = try reader["SnapshotCreateTime"].readTimestampIfPresent(format: .dateTime) + value.status = try reader["Status"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.availabilityZone = try reader["AvailabilityZone"].readIfPresent() + value.clusterCreateTime = try reader["ClusterCreateTime"].readTimestampIfPresent(format: .dateTime) + value.masterUsername = try reader["MasterUsername"].readIfPresent() + value.clusterVersion = try reader["ClusterVersion"].readIfPresent() + value.engineFullVersion = try reader["EngineFullVersion"].readIfPresent() + value.snapshotType = try reader["SnapshotType"].readIfPresent() + value.nodeType = try reader["NodeType"].readIfPresent() + value.numberOfNodes = try reader["NumberOfNodes"].readIfPresent() + value.dbName = try reader["DBName"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.encrypted = try reader["Encrypted"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.encryptedWithHSM = try reader["EncryptedWithHSM"].readIfPresent() + value.accountsWithRestoreAccess = try reader["AccountsWithRestoreAccess"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.AccountWithRestoreAccess.readingClosure, memberNodeInfo: "AccountWithRestoreAccess", isFlattened: false) + value.ownerAccount = try reader["OwnerAccount"].readIfPresent() + value.totalBackupSizeInMegaBytes = try reader["TotalBackupSizeInMegaBytes"].readIfPresent() + value.actualIncrementalBackupSizeInMegaBytes = try reader["ActualIncrementalBackupSizeInMegaBytes"].readIfPresent() + value.backupProgressInMegaBytes = try reader["BackupProgressInMegaBytes"].readIfPresent() + value.currentBackupRateInMegaBytesPerSecond = try reader["CurrentBackupRateInMegaBytesPerSecond"].readIfPresent() + value.estimatedSecondsToCompletion = try reader["EstimatedSecondsToCompletion"].readIfPresent() + value.elapsedTimeInSeconds = try reader["ElapsedTimeInSeconds"].readIfPresent() + value.sourceRegion = try reader["SourceRegion"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.restorableNodeTypes = try reader["RestorableNodeTypes"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "NodeType", isFlattened: false) + value.enhancedVpcRouting = try reader["EnhancedVpcRouting"].readIfPresent() + value.maintenanceTrackName = try reader["MaintenanceTrackName"].readIfPresent() + value.manualSnapshotRetentionPeriod = try reader["ManualSnapshotRetentionPeriod"].readIfPresent() + value.manualSnapshotRemainingDays = try reader["ManualSnapshotRemainingDays"].readIfPresent() + value.snapshotRetentionStartTime = try reader["SnapshotRetentionStartTime"].readTimestampIfPresent(format: .dateTime) + value.masterPasswordSecretArn = try reader["MasterPasswordSecretArn"].readIfPresent() + value.masterPasswordSecretKmsKeyId = try reader["MasterPasswordSecretKmsKeyId"].readIfPresent() + return value + } } } @@ -36834,16 +26693,14 @@ extension RedshiftClientTypes { } extension SnapshotCopyAlreadyDisabledFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotCopyAlreadyDisabledFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36871,33 +26728,15 @@ public struct SnapshotCopyAlreadyDisabledFault: ClientRuntime.ModeledError, AWSC } } -struct SnapshotCopyAlreadyDisabledFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotCopyAlreadyDisabledFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotCopyAlreadyEnabledFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotCopyAlreadyEnabledFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36925,33 +26764,15 @@ public struct SnapshotCopyAlreadyEnabledFault: ClientRuntime.ModeledError, AWSCl } } -struct SnapshotCopyAlreadyEnabledFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotCopyAlreadyEnabledFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotCopyDisabledFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotCopyDisabledFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -36979,23 +26800,7 @@ public struct SnapshotCopyDisabledFault: ClientRuntime.ModeledError, AWSClientRu } } -struct SnapshotCopyDisabledFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotCopyDisabledFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.SnapshotCopyGrant: Swift.Codable { +extension RedshiftClientTypes.SnapshotCopyGrant: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case kmsKeyId = "KmsKeyId" case snapshotCopyGrantName = "SnapshotCopyGrantName" @@ -37024,30 +26829,14 @@ extension RedshiftClientTypes.SnapshotCopyGrant: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotCopyGrantNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotCopyGrantName) - snapshotCopyGrantName = snapshotCopyGrantNameDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.SnapshotCopyGrant() + value.snapshotCopyGrantName = try reader["SnapshotCopyGrantName"].readIfPresent() + value.kmsKeyId = try reader["KmsKeyId"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -37077,16 +26866,14 @@ extension RedshiftClientTypes { } extension SnapshotCopyGrantAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotCopyGrantAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37114,33 +26901,15 @@ public struct SnapshotCopyGrantAlreadyExistsFault: ClientRuntime.ModeledError, A } } -struct SnapshotCopyGrantAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotCopyGrantAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotCopyGrantNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotCopyGrantNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37168,33 +26937,15 @@ public struct SnapshotCopyGrantNotFoundFault: ClientRuntime.ModeledError, AWSCli } } -struct SnapshotCopyGrantNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotCopyGrantNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotCopyGrantQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotCopyGrantQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37222,23 +26973,7 @@ public struct SnapshotCopyGrantQuotaExceededFault: ClientRuntime.ModeledError, A } } -struct SnapshotCopyGrantQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotCopyGrantQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.SnapshotErrorMessage: Swift.Codable { +extension RedshiftClientTypes.SnapshotErrorMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case failureCode = "FailureCode" case failureReason = "FailureReason" @@ -37262,16 +26997,16 @@ extension RedshiftClientTypes.SnapshotErrorMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let snapshotClusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotClusterIdentifier) - snapshotClusterIdentifier = snapshotClusterIdentifierDecoded - let failureCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureCode) - failureCode = failureCodeDecoded - let failureReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureReason) - failureReason = failureReasonDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.SnapshotErrorMessage() + value.snapshotIdentifier = try reader["SnapshotIdentifier"].readIfPresent() + value.snapshotClusterIdentifier = try reader["SnapshotClusterIdentifier"].readIfPresent() + value.failureCode = try reader["FailureCode"].readIfPresent() + value.failureReason = try reader["FailureReason"].readIfPresent() + return value + } } } @@ -37303,7 +27038,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.SnapshotSchedule: Swift.Codable { +extension RedshiftClientTypes.SnapshotSchedule: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case associatedClusterCount = "AssociatedClusterCount" case associatedClusters = "AssociatedClusters" @@ -37370,94 +27105,23 @@ extension RedshiftClientTypes.SnapshotSchedule: Swift.Codable { } else { var tagsContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Tags")) - try tagsContainer.encode("", forKey: ClientRuntime.Key("")) - } - } - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.scheduleDefinitions) { - struct KeyVal0{struct ScheduleDefinition{}} - let scheduleDefinitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .scheduleDefinitions) - if let scheduleDefinitionsWrappedContainer = scheduleDefinitionsWrappedContainer { - let scheduleDefinitionsContainer = try scheduleDefinitionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var scheduleDefinitionsBuffer:[Swift.String]? = nil - if let scheduleDefinitionsContainer = scheduleDefinitionsContainer { - scheduleDefinitionsBuffer = [Swift.String]() - for stringContainer0 in scheduleDefinitionsContainer { - scheduleDefinitionsBuffer?.append(stringContainer0) - } - } - scheduleDefinitions = scheduleDefinitionsBuffer - } else { - scheduleDefinitions = [] - } - } else { - scheduleDefinitions = nil - } - let scheduleIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleIdentifier) - scheduleIdentifier = scheduleIdentifierDecoded - let scheduleDescriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .scheduleDescription) - scheduleDescription = scheduleDescriptionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.nextInvocations) { - struct KeyVal0{struct SnapshotTime{}} - let nextInvocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nextInvocations) - if let nextInvocationsWrappedContainer = nextInvocationsWrappedContainer { - let nextInvocationsContainer = try nextInvocationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nextInvocationsBuffer:[ClientRuntime.Date]? = nil - if let nextInvocationsContainer = nextInvocationsContainer { - nextInvocationsBuffer = [ClientRuntime.Date]() - for timestampContainer0 in nextInvocationsContainer { - try nextInvocationsBuffer?.append(nextInvocationsWrappedContainer.timestampStringAsDate(timestampContainer0, format: .dateTime, forKey: .member)) - } - } - nextInvocations = nextInvocationsBuffer - } else { - nextInvocations = [] - } - } else { - nextInvocations = nil - } - let associatedClusterCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .associatedClusterCount) - associatedClusterCount = associatedClusterCountDecoded - if containerValues.contains(.associatedClusters) { - struct KeyVal0{struct ClusterAssociatedToSchedule{}} - let associatedClustersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .associatedClusters) - if let associatedClustersWrappedContainer = associatedClustersWrappedContainer { - let associatedClustersContainer = try associatedClustersWrappedContainer.decodeIfPresent([RedshiftClientTypes.ClusterAssociatedToSchedule].self, forKey: .member) - var associatedClustersBuffer:[RedshiftClientTypes.ClusterAssociatedToSchedule]? = nil - if let associatedClustersContainer = associatedClustersContainer { - associatedClustersBuffer = [RedshiftClientTypes.ClusterAssociatedToSchedule]() - for structureContainer0 in associatedClustersContainer { - associatedClustersBuffer?.append(structureContainer0) - } - } - associatedClusters = associatedClustersBuffer - } else { - associatedClusters = [] + try tagsContainer.encode("", forKey: ClientRuntime.Key("")) } - } else { - associatedClusters = nil + } + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.SnapshotSchedule() + value.scheduleDefinitions = try reader["ScheduleDefinitions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ScheduleDefinition", isFlattened: false) + value.scheduleIdentifier = try reader["ScheduleIdentifier"].readIfPresent() + value.scheduleDescription = try reader["ScheduleDescription"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.nextInvocations = try reader["NextInvocations"].readListIfPresent(memberReadingClosure: SmithyXML.timestampReadingClosure(format: .dateTime), memberNodeInfo: "SnapshotTime", isFlattened: false) + value.associatedClusterCount = try reader["AssociatedClusterCount"].readIfPresent() + value.associatedClusters = try reader["AssociatedClusters"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.ClusterAssociatedToSchedule.readingClosure, memberNodeInfo: "ClusterAssociatedToSchedule", isFlattened: false) + return value } } } @@ -37503,16 +27167,14 @@ extension RedshiftClientTypes { } extension SnapshotScheduleAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotScheduleAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37540,33 +27202,15 @@ public struct SnapshotScheduleAlreadyExistsFault: ClientRuntime.ModeledError, AW } } -struct SnapshotScheduleAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotScheduleAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotScheduleNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotScheduleNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37594,33 +27238,15 @@ public struct SnapshotScheduleNotFoundFault: ClientRuntime.ModeledError, AWSClie } } -struct SnapshotScheduleNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotScheduleNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotScheduleQuotaExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotScheduleQuotaExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37648,33 +27274,15 @@ public struct SnapshotScheduleQuotaExceededFault: ClientRuntime.ModeledError, AW } } -struct SnapshotScheduleQuotaExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotScheduleQuotaExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SnapshotScheduleUpdateInProgressFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SnapshotScheduleUpdateInProgressFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37702,23 +27310,7 @@ public struct SnapshotScheduleUpdateInProgressFault: ClientRuntime.ModeledError, } } -struct SnapshotScheduleUpdateInProgressFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SnapshotScheduleUpdateInProgressFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.SnapshotSortingEntity: Swift.Codable { +extension RedshiftClientTypes.SnapshotSortingEntity: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attribute = "Attribute" case sortOrder = "SortOrder" @@ -37734,12 +27326,14 @@ extension RedshiftClientTypes.SnapshotSortingEntity: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let attributeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.SnapshotAttributeToSortBy.self, forKey: .attribute) - attribute = attributeDecoded - let sortOrderDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.SortByOrder.self, forKey: .sortOrder) - sortOrder = sortOrderDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.SnapshotSortingEntity() + value.attribute = try reader["Attribute"].readIfPresent() + value.sortOrder = try reader["SortOrder"].readIfPresent() + return value + } } } @@ -37797,16 +27391,14 @@ extension RedshiftClientTypes { } extension SourceNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SourceNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37834,22 +27426,6 @@ public struct SourceNotFoundFault: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct SourceNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SourceNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum SourceType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case cluster @@ -37891,7 +27467,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.Subnet: Swift.Codable { +extension RedshiftClientTypes.Subnet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case subnetAvailabilityZone = "SubnetAvailabilityZone" case subnetIdentifier = "SubnetIdentifier" @@ -37911,14 +27487,15 @@ extension RedshiftClientTypes.Subnet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subnetIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetIdentifier) - subnetIdentifier = subnetIdentifierDecoded - let subnetAvailabilityZoneDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.AvailabilityZone.self, forKey: .subnetAvailabilityZone) - subnetAvailabilityZone = subnetAvailabilityZoneDecoded - let subnetStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subnetStatus) - subnetStatus = subnetStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.Subnet() + value.subnetIdentifier = try reader["SubnetIdentifier"].readIfPresent() + value.subnetAvailabilityZone = try reader["SubnetAvailabilityZone"].readIfPresent(readingClosure: RedshiftClientTypes.AvailabilityZone.readingClosure) + value.subnetStatus = try reader["SubnetStatus"].readIfPresent() + return value + } } } @@ -37947,16 +27524,14 @@ extension RedshiftClientTypes { } extension SubnetAlreadyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubnetAlreadyInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -37984,33 +27559,15 @@ public struct SubnetAlreadyInUse: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct SubnetAlreadyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubnetAlreadyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionAlreadyExistFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionAlreadyExistFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38038,33 +27595,15 @@ public struct SubscriptionAlreadyExistFault: ClientRuntime.ModeledError, AWSClie } } -struct SubscriptionAlreadyExistFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionAlreadyExistFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionCategoryNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionCategoryNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38092,33 +27631,15 @@ public struct SubscriptionCategoryNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct SubscriptionCategoryNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionCategoryNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionEventIdNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionEventIdNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38146,33 +27667,15 @@ public struct SubscriptionEventIdNotFoundFault: ClientRuntime.ModeledError, AWSC } } -struct SubscriptionEventIdNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionEventIdNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38200,33 +27703,15 @@ public struct SubscriptionNotFoundFault: ClientRuntime.ModeledError, AWSClientRu } } -struct SubscriptionNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SubscriptionSeverityNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionSeverityNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38254,23 +27739,7 @@ public struct SubscriptionSeverityNotFoundFault: ClientRuntime.ModeledError, AWS } } -struct SubscriptionSeverityNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionSeverityNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.SupportedOperation: Swift.Codable { +extension RedshiftClientTypes.SupportedOperation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case operationName = "OperationName" } @@ -38282,10 +27751,13 @@ extension RedshiftClientTypes.SupportedOperation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let operationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .operationName) - operationName = operationNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.SupportedOperation() + value.operationName = try reader["OperationName"].readIfPresent() + return value + } } } @@ -38305,7 +27777,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.SupportedPlatform: Swift.Codable { +extension RedshiftClientTypes.SupportedPlatform: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -38317,10 +27789,13 @@ extension RedshiftClientTypes.SupportedPlatform: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.SupportedPlatform() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -38341,16 +27816,14 @@ extension RedshiftClientTypes { } extension TableLimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TableLimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38378,33 +27851,15 @@ public struct TableLimitExceededFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct TableLimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension TableLimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TableRestoreNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TableRestoreNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38432,23 +27887,7 @@ public struct TableRestoreNotFoundFault: ClientRuntime.ModeledError, AWSClientRu } } -struct TableRestoreNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension TableRestoreNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.TableRestoreStatus: Swift.Codable { +extension RedshiftClientTypes.TableRestoreStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case clusterIdentifier = "ClusterIdentifier" case message = "Message" @@ -38512,36 +27951,26 @@ extension RedshiftClientTypes.TableRestoreStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tableRestoreRequestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tableRestoreRequestId) - tableRestoreRequestId = tableRestoreRequestIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.TableRestoreStatusType.self, forKey: .status) - status = statusDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let requestTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .requestTime) - requestTime = requestTimeDecoded - let progressInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .progressInMegaBytes) - progressInMegaBytes = progressInMegaBytesDecoded - let totalDataInMegaBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalDataInMegaBytes) - totalDataInMegaBytes = totalDataInMegaBytesDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let snapshotIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snapshotIdentifier) - snapshotIdentifier = snapshotIdentifierDecoded - let sourceDatabaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceDatabaseName) - sourceDatabaseName = sourceDatabaseNameDecoded - let sourceSchemaNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceSchemaName) - sourceSchemaName = sourceSchemaNameDecoded - let sourceTableNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceTableName) - sourceTableName = sourceTableNameDecoded - let targetDatabaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetDatabaseName) - targetDatabaseName = targetDatabaseNameDecoded - let targetSchemaNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetSchemaName) - targetSchemaName = targetSchemaNameDecoded - let newTableNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .newTableName) - newTableName = newTableNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.TableRestoreStatus() + value.tableRestoreRequestId = try reader["TableRestoreRequestId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.requestTime = try reader["RequestTime"].readTimestampIfPresent(format: .dateTime) + value.progressInMegaBytes = try reader["ProgressInMegaBytes"].readIfPresent() + value.totalDataInMegaBytes = try reader["TotalDataInMegaBytes"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.snapshotIdentifier = try reader["SnapshotIdentifier"].readIfPresent() + value.sourceDatabaseName = try reader["SourceDatabaseName"].readIfPresent() + value.sourceSchemaName = try reader["SourceSchemaName"].readIfPresent() + value.sourceTableName = try reader["SourceTableName"].readIfPresent() + value.targetDatabaseName = try reader["TargetDatabaseName"].readIfPresent() + value.targetSchemaName = try reader["TargetSchemaName"].readIfPresent() + value.newTableName = try reader["NewTableName"].readIfPresent() + return value + } } } @@ -38654,7 +28083,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.Tag: Swift.Codable { +extension RedshiftClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -38670,12 +28099,14 @@ extension RedshiftClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -38700,16 +28131,14 @@ extension RedshiftClientTypes { } extension TagLimitExceededFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TagLimitExceededFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38737,23 +28166,7 @@ public struct TagLimitExceededFault: ClientRuntime.ModeledError, AWSClientRuntim } } -struct TagLimitExceededFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension TagLimitExceededFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension RedshiftClientTypes.TaggedResource: Swift.Codable { +extension RedshiftClientTypes.TaggedResource: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case resourceName = "ResourceName" case resourceType = "ResourceType" @@ -38773,14 +28186,15 @@ extension RedshiftClientTypes.TaggedResource: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tagDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.Tag.self, forKey: .tag) - tag = tagDecoded - let resourceNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceName) - resourceName = resourceNameDecoded - let resourceTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceType) - resourceType = resourceTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.TaggedResource() + value.tag = try reader["Tag"].readIfPresent(readingClosure: RedshiftClientTypes.Tag.readingClosure) + value.resourceName = try reader["ResourceName"].readIfPresent() + value.resourceType = try reader["ResourceType"].readIfPresent() + return value + } } } @@ -38830,16 +28244,14 @@ extension RedshiftClientTypes { } extension UnauthorizedOperation { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnauthorizedOperation() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38867,33 +28279,15 @@ public struct UnauthorizedOperation: ClientRuntime.ModeledError, AWSClientRuntim } } -struct UnauthorizedOperationBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnauthorizedOperationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UnauthorizedPartnerIntegrationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnauthorizedPartnerIntegrationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38921,33 +28315,15 @@ public struct UnauthorizedPartnerIntegrationFault: ClientRuntime.ModeledError, A } } -struct UnauthorizedPartnerIntegrationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnauthorizedPartnerIntegrationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UnknownSnapshotCopyRegionFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnknownSnapshotCopyRegionFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -38975,33 +28351,15 @@ public struct UnknownSnapshotCopyRegionFault: ClientRuntime.ModeledError, AWSCli } } -struct UnknownSnapshotCopyRegionFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnknownSnapshotCopyRegionFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UnsupportedOperationFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnsupportedOperationFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -39029,33 +28387,15 @@ public struct UnsupportedOperationFault: ClientRuntime.ModeledError, AWSClientRu } } -struct UnsupportedOperationFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnsupportedOperationFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension UnsupportedOptionFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UnsupportedOptionFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -39083,23 +28423,16 @@ public struct UnsupportedOptionFault: ClientRuntime.ModeledError, AWSClientRunti } } -struct UnsupportedOptionFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UnsupportedOptionFaultBody: Swift.Decodable { +extension UpdatePartnerStatusInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case accountId = "AccountId" + case clusterIdentifier = "ClusterIdentifier" + case databaseName = "DatabaseName" + case partnerName = "PartnerName" + case status = "Status" + case statusMessage = "StatusMessage" } -} -extension UpdatePartnerStatusInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accountId = accountId { @@ -39169,52 +28502,16 @@ public struct UpdatePartnerStatusInput: Swift.Equatable { } } -struct UpdatePartnerStatusInputBody: Swift.Equatable { - let accountId: Swift.String? - let clusterIdentifier: Swift.String? - let databaseName: Swift.String? - let partnerName: Swift.String? - let status: RedshiftClientTypes.PartnerIntegrationStatus? - let statusMessage: Swift.String? -} - -extension UpdatePartnerStatusInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "AccountId" - case clusterIdentifier = "ClusterIdentifier" - case databaseName = "DatabaseName" - case partnerName = "PartnerName" - case status = "Status" - case statusMessage = "StatusMessage" - } +extension UpdatePartnerStatusOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let partnerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partnerName) - partnerName = partnerNameDecoded - let statusDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.PartnerIntegrationStatus.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - } -} - -extension UpdatePartnerStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdatePartnerStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.databaseName = output.databaseName - self.partnerName = output.partnerName - } else { - self.databaseName = nil - self.partnerName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["UpdatePartnerStatusResult"] + var value = UpdatePartnerStatusOutput() + value.databaseName = try reader["DatabaseName"].readIfPresent() + value.partnerName = try reader["PartnerName"].readIfPresent() + return value } } } @@ -39235,41 +28532,27 @@ public struct UpdatePartnerStatusOutput: Swift.Equatable { } } -struct UpdatePartnerStatusOutputBody: Swift.Equatable { - let databaseName: Swift.String? - let partnerName: Swift.String? -} - -extension UpdatePartnerStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case databaseName = "DatabaseName" - case partnerName = "PartnerName" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("UpdatePartnerStatusResult")) - let databaseNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseName) - databaseName = databaseNameDecoded - let partnerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partnerName) - partnerName = partnerNameDecoded - } -} +enum UpdatePartnerStatusOutputError { -enum UpdatePartnerStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ClusterNotFound": return try await ClusterNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PartnerNotFound": return try await PartnerNotFoundFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnauthorizedPartnerIntegration": return try await UnauthorizedPartnerIntegrationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UnsupportedOperation": return try await UnsupportedOperationFault(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ClusterNotFound": return try await ClusterNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PartnerNotFound": return try await PartnerNotFoundFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnauthorizedPartnerIntegration": return try await UnauthorizedPartnerIntegrationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UnsupportedOperation": return try await UnsupportedOperationFault.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension RedshiftClientTypes.UpdateTarget: Swift.Codable { +extension RedshiftClientTypes.UpdateTarget: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case databaseVersion = "DatabaseVersion" case maintenanceTrackName = "MaintenanceTrackName" @@ -39298,30 +28581,14 @@ extension RedshiftClientTypes.UpdateTarget: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let maintenanceTrackNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .maintenanceTrackName) - maintenanceTrackName = maintenanceTrackNameDecoded - let databaseVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .databaseVersion) - databaseVersion = databaseVersionDecoded - if containerValues.contains(.supportedOperations) { - struct KeyVal0{struct SupportedOperation{}} - let supportedOperationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .supportedOperations) - if let supportedOperationsWrappedContainer = supportedOperationsWrappedContainer { - let supportedOperationsContainer = try supportedOperationsWrappedContainer.decodeIfPresent([RedshiftClientTypes.SupportedOperation].self, forKey: .member) - var supportedOperationsBuffer:[RedshiftClientTypes.SupportedOperation]? = nil - if let supportedOperationsContainer = supportedOperationsContainer { - supportedOperationsBuffer = [RedshiftClientTypes.SupportedOperation]() - for structureContainer0 in supportedOperationsContainer { - supportedOperationsBuffer?.append(structureContainer0) - } - } - supportedOperations = supportedOperationsBuffer - } else { - supportedOperations = [] - } - } else { - supportedOperations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.UpdateTarget() + value.maintenanceTrackName = try reader["MaintenanceTrackName"].readIfPresent() + value.databaseVersion = try reader["DatabaseVersion"].readIfPresent() + value.supportedOperations = try reader["SupportedOperations"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.SupportedOperation.readingClosure, memberNodeInfo: "SupportedOperation", isFlattened: false) + return value } } } @@ -39350,7 +28617,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.UsageLimit: Swift.Codable { +extension RedshiftClientTypes.UsageLimit: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case amount = "Amount" case breachAction = "BreachAction" @@ -39399,40 +28666,19 @@ extension RedshiftClientTypes.UsageLimit: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let usageLimitIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .usageLimitId) - usageLimitId = usageLimitIdDecoded - let clusterIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clusterIdentifier) - clusterIdentifier = clusterIdentifierDecoded - let featureTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitFeatureType.self, forKey: .featureType) - featureType = featureTypeDecoded - let limitTypeDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitLimitType.self, forKey: .limitType) - limitType = limitTypeDecoded - let amountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .amount) - amount = amountDecoded - let periodDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitPeriod.self, forKey: .period) - period = periodDecoded - let breachActionDecoded = try containerValues.decodeIfPresent(RedshiftClientTypes.UsageLimitBreachAction.self, forKey: .breachAction) - breachAction = breachActionDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([RedshiftClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[RedshiftClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [RedshiftClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.UsageLimit() + value.usageLimitId = try reader["UsageLimitId"].readIfPresent() + value.clusterIdentifier = try reader["ClusterIdentifier"].readIfPresent() + value.featureType = try reader["FeatureType"].readIfPresent() + value.limitType = try reader["LimitType"].readIfPresent() + value.amount = try reader["Amount"].readIfPresent() + value.period = try reader["Period"].readIfPresent() + value.breachAction = try reader["BreachAction"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -39488,16 +28734,14 @@ extension RedshiftClientTypes { } extension UsageLimitAlreadyExistsFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UsageLimitAlreadyExistsFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -39525,22 +28769,6 @@ public struct UsageLimitAlreadyExistsFault: ClientRuntime.ModeledError, AWSClien } } -struct UsageLimitAlreadyExistsFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UsageLimitAlreadyExistsFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum UsageLimitBreachAction: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case disable @@ -39644,16 +28872,14 @@ extension RedshiftClientTypes { } extension UsageLimitNotFoundFault { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UsageLimitNotFoundFault() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -39681,22 +28907,6 @@ public struct UsageLimitNotFoundFault: ClientRuntime.ModeledError, AWSClientRunt } } -struct UsageLimitNotFoundFaultBody: Swift.Equatable { - let message: Swift.String? -} - -extension UsageLimitNotFoundFaultBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RedshiftClientTypes { public enum UsageLimitPeriod: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case daily @@ -39732,7 +28942,7 @@ extension RedshiftClientTypes { } } -extension RedshiftClientTypes.VpcEndpoint: Swift.Codable { +extension RedshiftClientTypes.VpcEndpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case networkInterfaces = "NetworkInterfaces" case vpcEndpointId = "VpcEndpointId" @@ -39761,30 +28971,14 @@ extension RedshiftClientTypes.VpcEndpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcEndpointIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcEndpointId) - vpcEndpointId = vpcEndpointIdDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded - if containerValues.contains(.networkInterfaces) { - struct KeyVal0{struct NetworkInterface{}} - let networkInterfacesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .networkInterfaces) - if let networkInterfacesWrappedContainer = networkInterfacesWrappedContainer { - let networkInterfacesContainer = try networkInterfacesWrappedContainer.decodeIfPresent([RedshiftClientTypes.NetworkInterface].self, forKey: .member) - var networkInterfacesBuffer:[RedshiftClientTypes.NetworkInterface]? = nil - if let networkInterfacesContainer = networkInterfacesContainer { - networkInterfacesBuffer = [RedshiftClientTypes.NetworkInterface]() - for structureContainer0 in networkInterfacesContainer { - networkInterfacesBuffer?.append(structureContainer0) - } - } - networkInterfaces = networkInterfacesBuffer - } else { - networkInterfaces = [] - } - } else { - networkInterfaces = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.VpcEndpoint() + value.vpcEndpointId = try reader["VpcEndpointId"].readIfPresent() + value.vpcId = try reader["VpcId"].readIfPresent() + value.networkInterfaces = try reader["NetworkInterfaces"].readListIfPresent(memberReadingClosure: RedshiftClientTypes.NetworkInterface.readingClosure, memberNodeInfo: "NetworkInterface", isFlattened: false) + return value } } } @@ -39813,7 +29007,7 @@ extension RedshiftClientTypes { } -extension RedshiftClientTypes.VpcSecurityGroupMembership: Swift.Codable { +extension RedshiftClientTypes.VpcSecurityGroupMembership: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case status = "Status" case vpcSecurityGroupId = "VpcSecurityGroupId" @@ -39829,12 +29023,14 @@ extension RedshiftClientTypes.VpcSecurityGroupMembership: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcSecurityGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcSecurityGroupId) - vpcSecurityGroupId = vpcSecurityGroupIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = RedshiftClientTypes.VpcSecurityGroupMembership() + value.vpcSecurityGroupId = try reader["VpcSecurityGroupId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSRoute53/Route53Client.swift b/Sources/Services/AWSRoute53/Route53Client.swift index ecdec45a515..ba217ed8900 100644 --- a/Sources/Services/AWSRoute53/Route53Client.swift +++ b/Sources/Services/AWSRoute53/Route53Client.swift @@ -11,19 +11,9 @@ public class Route53Client { let client: ClientRuntime.SdkHttpClient let config: Route53Client.Route53ClientConfiguration let serviceName = "Route 53" - let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: Route53Client.Route53ClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) - let encoder = ClientRuntime.JSONEncoder() - self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true - self.decoder = config.decoder ?? decoder self.config = config } @@ -87,8 +77,6 @@ extension Route53Client { /// - `NoSuchKeySigningKey` : The specified key-signing key (KSK) doesn't exist. public func activateKeySigningKey(input: ActivateKeySigningKeyInput) async throws -> ActivateKeySigningKeyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "activateKeySigningKey") @@ -110,7 +98,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ActivateKeySigningKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ActivateKeySigningKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ActivateKeySigningKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -152,8 +140,6 @@ extension Route53Client { /// - `PublicZoneVPCAssociation` : You're trying to associate a VPC with a public hosted zone. Amazon Route 53 doesn't support associating a VPC with a public hosted zone. public func associateVPCWithHostedZone(input: AssociateVPCWithHostedZoneInput) async throws -> AssociateVPCWithHostedZoneOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateVPCWithHostedZone") @@ -173,12 +159,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AssociateVPCWithHostedZoneRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: AssociateVPCWithHostedZoneInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AssociateVPCWithHostedZoneRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: AssociateVPCWithHostedZoneInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateVPCWithHostedZoneOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateVPCWithHostedZoneOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateVPCWithHostedZoneOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -207,8 +193,6 @@ extension Route53Client { /// - `NoSuchCidrCollectionException` : The CIDR collection you specified, doesn't exist. public func changeCidrCollection(input: ChangeCidrCollectionInput) async throws -> ChangeCidrCollectionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "changeCidrCollection") @@ -227,12 +211,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ChangeCidrCollectionRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: ChangeCidrCollectionInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ChangeCidrCollectionRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: ChangeCidrCollectionInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ChangeCidrCollectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ChangeCidrCollectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ChangeCidrCollectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -265,8 +249,6 @@ extension Route53Client { /// - `PriorRequestNotComplete` : If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again. public func changeResourceRecordSets(input: ChangeResourceRecordSetsInput) async throws -> ChangeResourceRecordSetsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "changeResourceRecordSets") @@ -286,12 +268,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ChangeResourceRecordSetsRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: ChangeResourceRecordSetsInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ChangeResourceRecordSetsRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: ChangeResourceRecordSetsInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ChangeResourceRecordSetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ChangeResourceRecordSetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ChangeResourceRecordSetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -315,8 +297,6 @@ extension Route53Client { /// - `ThrottlingException` : The limit on the number of requests per second was exceeded. public func changeTagsForResource(input: ChangeTagsForResourceInput) async throws -> ChangeTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "changeTagsForResource") @@ -335,12 +315,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ChangeTagsForResourceRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: ChangeTagsForResourceInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ChangeTagsForResourceRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: ChangeTagsForResourceInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ChangeTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ChangeTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ChangeTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -363,8 +343,6 @@ extension Route53Client { /// - `LimitsExceeded` : This operation can't be completed because the current account has reached the limit on the resource you are trying to create. To request a higher limit, [create a case](http://aws.amazon.com/route53-request) with the Amazon Web Services Support Center. public func createCidrCollection(input: CreateCidrCollectionInput) async throws -> CreateCidrCollectionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCidrCollection") @@ -383,12 +361,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateCidrCollectionRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateCidrCollectionInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateCidrCollectionRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateCidrCollectionInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCidrCollectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCidrCollectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCidrCollectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -420,8 +398,6 @@ extension Route53Client { /// - `TooManyHealthChecks` : This health check can't be created because the current account has reached the limit on the number of active health checks. For information about default limits, see [Limits](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) in the Amazon Route 53 Developer Guide. For information about how to get the current limit for an account, see [GetAccountLimit](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html). To request a higher limit, [create a case](http://aws.amazon.com/route53-request) with the Amazon Web Services Support Center. You have reached the maximum number of active health checks for an Amazon Web Services account. To request a higher limit, [create a case](http://aws.amazon.com/route53-request) with the Amazon Web Services Support Center. public func createHealthCheck(input: CreateHealthCheckInput) async throws -> CreateHealthCheckOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createHealthCheck") @@ -440,12 +416,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateHealthCheckRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateHealthCheckInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateHealthCheckRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateHealthCheckInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateHealthCheckOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateHealthCheckOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateHealthCheckOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -497,8 +473,6 @@ extension Route53Client { /// - `TooManyHostedZones` : This operation can't be completed either because the current account has reached the limit on the number of hosted zones or because you've reached the limit on the number of hosted zones that can be associated with a reusable delegation set. For information about default limits, see [Limits](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html) in the Amazon Route 53 Developer Guide. To get the current limit on hosted zones that can be created by an account, see [GetAccountLimit](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html). To get the current limit on hosted zones that can be associated with a reusable delegation set, see [GetReusableDelegationSetLimit](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSetLimit.html). To request a higher limit, [create a case](http://aws.amazon.com/route53-request) with the Amazon Web Services Support Center. public func createHostedZone(input: CreateHostedZoneInput) async throws -> CreateHostedZoneOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createHostedZone") @@ -517,12 +491,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateHostedZoneRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateHostedZoneInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateHostedZoneRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateHostedZoneInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateHostedZoneOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateHostedZoneOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateHostedZoneOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -551,8 +525,6 @@ extension Route53Client { /// - `TooManyKeySigningKeys` : You've reached the limit for the number of key-signing keys (KSKs). Remove at least one KSK, and then try again. public func createKeySigningKey(input: CreateKeySigningKeyInput) async throws -> CreateKeySigningKeyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createKeySigningKey") @@ -571,12 +543,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateKeySigningKeyRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateKeySigningKeyInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateKeySigningKeyRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateKeySigningKeyInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateKeySigningKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateKeySigningKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateKeySigningKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -652,8 +624,6 @@ extension Route53Client { /// - `QueryLoggingConfigAlreadyExists` : You can create only one query logging configuration for a hosted zone, and a query logging configuration already exists for this hosted zone. public func createQueryLoggingConfig(input: CreateQueryLoggingConfigInput) async throws -> CreateQueryLoggingConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createQueryLoggingConfig") @@ -672,12 +642,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateQueryLoggingConfigRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateQueryLoggingConfigInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateQueryLoggingConfigRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateQueryLoggingConfigInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateQueryLoggingConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateQueryLoggingConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateQueryLoggingConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -724,8 +694,6 @@ extension Route53Client { /// - `LimitsExceeded` : This operation can't be completed because the current account has reached the limit on the resource you are trying to create. To request a higher limit, [create a case](http://aws.amazon.com/route53-request) with the Amazon Web Services Support Center. public func createReusableDelegationSet(input: CreateReusableDelegationSetInput) async throws -> CreateReusableDelegationSetOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createReusableDelegationSet") @@ -744,12 +712,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateReusableDelegationSetRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateReusableDelegationSetInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateReusableDelegationSetRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateReusableDelegationSetInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateReusableDelegationSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateReusableDelegationSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateReusableDelegationSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -772,8 +740,6 @@ extension Route53Client { /// - `TrafficPolicyAlreadyExists` : A traffic policy that has the same value for Name already exists. public func createTrafficPolicy(input: CreateTrafficPolicyInput) async throws -> CreateTrafficPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTrafficPolicy") @@ -792,12 +758,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateTrafficPolicyRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateTrafficPolicyInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateTrafficPolicyRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateTrafficPolicyInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTrafficPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTrafficPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTrafficPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -821,8 +787,6 @@ extension Route53Client { /// - `TrafficPolicyInstanceAlreadyExists` : There is already a traffic policy instance with the specified ID. public func createTrafficPolicyInstance(input: CreateTrafficPolicyInstanceInput) async throws -> CreateTrafficPolicyInstanceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTrafficPolicyInstance") @@ -841,12 +805,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateTrafficPolicyInstanceRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateTrafficPolicyInstanceInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateTrafficPolicyInstanceRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateTrafficPolicyInstanceInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTrafficPolicyInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTrafficPolicyInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTrafficPolicyInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -870,8 +834,6 @@ extension Route53Client { /// - `TooManyTrafficPolicyVersionsForCurrentPolicy` : This traffic policy version can't be created because you've reached the limit of 1000 on the number of versions that you can create for the current traffic policy. To create more traffic policy versions, you can use [GetTrafficPolicy](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetTrafficPolicy.html) to get the traffic policy document for a specified traffic policy version, and then use [CreateTrafficPolicy](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateTrafficPolicy.html) to create a new traffic policy using the traffic policy document. public func createTrafficPolicyVersion(input: CreateTrafficPolicyVersionInput) async throws -> CreateTrafficPolicyVersionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTrafficPolicyVersion") @@ -890,12 +852,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateTrafficPolicyVersionRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateTrafficPolicyVersionInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateTrafficPolicyVersionRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateTrafficPolicyVersionInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTrafficPolicyVersionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTrafficPolicyVersionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTrafficPolicyVersionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -919,8 +881,6 @@ extension Route53Client { /// - `TooManyVPCAssociationAuthorizations` : You've created the maximum number of authorizations that can be created for the specified hosted zone. To authorize another VPC to be associated with the hosted zone, submit a DeleteVPCAssociationAuthorization request to remove an existing authorization. To get a list of existing authorizations, submit a ListVPCAssociationAuthorizations request. public func createVPCAssociationAuthorization(input: CreateVPCAssociationAuthorizationInput) async throws -> CreateVPCAssociationAuthorizationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createVPCAssociationAuthorization") @@ -940,12 +900,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateVPCAssociationAuthorizationRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateVPCAssociationAuthorizationInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateVPCAssociationAuthorizationRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: CreateVPCAssociationAuthorizationInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateVPCAssociationAuthorizationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateVPCAssociationAuthorizationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateVPCAssociationAuthorizationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -971,8 +931,6 @@ extension Route53Client { /// - `NoSuchKeySigningKey` : The specified key-signing key (KSK) doesn't exist. public func deactivateKeySigningKey(input: DeactivateKeySigningKeyInput) async throws -> DeactivateKeySigningKeyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deactivateKeySigningKey") @@ -994,7 +952,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeactivateKeySigningKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeactivateKeySigningKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeactivateKeySigningKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1017,8 +975,6 @@ extension Route53Client { /// - `NoSuchCidrCollectionException` : The CIDR collection you specified, doesn't exist. public func deleteCidrCollection(input: DeleteCidrCollectionInput) async throws -> DeleteCidrCollectionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteCidrCollection") @@ -1039,7 +995,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCidrCollectionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCidrCollectionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCidrCollectionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1061,8 +1017,6 @@ extension Route53Client { /// - `NoSuchHealthCheck` : No health check exists with the specified ID. public func deleteHealthCheck(input: DeleteHealthCheckInput) async throws -> DeleteHealthCheckOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteHealthCheck") @@ -1083,7 +1037,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteHealthCheckOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteHealthCheckOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteHealthCheckOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1111,8 +1065,6 @@ extension Route53Client { /// - `PriorRequestNotComplete` : If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again. public func deleteHostedZone(input: DeleteHostedZoneInput) async throws -> DeleteHostedZoneOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteHostedZone") @@ -1133,7 +1085,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteHostedZoneOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteHostedZoneOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteHostedZoneOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1158,8 +1110,6 @@ extension Route53Client { /// - `NoSuchKeySigningKey` : The specified key-signing key (KSK) doesn't exist. public func deleteKeySigningKey(input: DeleteKeySigningKeyInput) async throws -> DeleteKeySigningKeyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteKeySigningKey") @@ -1181,7 +1131,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteKeySigningKeyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteKeySigningKeyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteKeySigningKeyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1203,8 +1153,6 @@ extension Route53Client { /// - `NoSuchQueryLoggingConfig` : There is no DNS query logging configuration with the specified ID. public func deleteQueryLoggingConfig(input: DeleteQueryLoggingConfigInput) async throws -> DeleteQueryLoggingConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteQueryLoggingConfig") @@ -1225,7 +1173,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteQueryLoggingConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteQueryLoggingConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteQueryLoggingConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1248,8 +1196,6 @@ extension Route53Client { /// - `NoSuchDelegationSet` : A reusable delegation set with the specified ID does not exist. public func deleteReusableDelegationSet(input: DeleteReusableDelegationSetInput) async throws -> DeleteReusableDelegationSetOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteReusableDelegationSet") @@ -1270,7 +1216,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteReusableDelegationSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteReusableDelegationSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteReusableDelegationSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1299,8 +1245,6 @@ extension Route53Client { /// - `TrafficPolicyInUse` : One or more traffic policy instances were created by using the specified traffic policy. public func deleteTrafficPolicy(input: DeleteTrafficPolicyInput) async throws -> DeleteTrafficPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteTrafficPolicy") @@ -1321,7 +1265,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTrafficPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTrafficPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTrafficPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1343,8 +1287,6 @@ extension Route53Client { /// - `PriorRequestNotComplete` : If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again. public func deleteTrafficPolicyInstance(input: DeleteTrafficPolicyInstanceInput) async throws -> DeleteTrafficPolicyInstanceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteTrafficPolicyInstance") @@ -1365,7 +1307,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTrafficPolicyInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTrafficPolicyInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTrafficPolicyInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1389,8 +1331,6 @@ extension Route53Client { /// - `VPCAssociationAuthorizationNotFound` : The VPC that you specified is not authorized to be associated with the hosted zone. public func deleteVPCAssociationAuthorization(input: DeleteVPCAssociationAuthorizationInput) async throws -> DeleteVPCAssociationAuthorizationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVPCAssociationAuthorization") @@ -1410,12 +1350,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DeleteVPCAssociationAuthorizationRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: DeleteVPCAssociationAuthorizationInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DeleteVPCAssociationAuthorizationRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: DeleteVPCAssociationAuthorizationInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVPCAssociationAuthorizationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVPCAssociationAuthorizationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVPCAssociationAuthorizationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1442,8 +1382,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func disableHostedZoneDNSSEC(input: DisableHostedZoneDNSSECInput) async throws -> DisableHostedZoneDNSSECOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disableHostedZoneDNSSEC") @@ -1465,7 +1403,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisableHostedZoneDNSSECOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisableHostedZoneDNSSECOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisableHostedZoneDNSSECOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1509,8 +1447,6 @@ extension Route53Client { /// - `VPCAssociationNotFound` : The specified VPC and hosted zone are not currently associated. public func disassociateVPCFromHostedZone(input: DisassociateVPCFromHostedZoneInput) async throws -> DisassociateVPCFromHostedZoneOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "disassociateVPCFromHostedZone") @@ -1530,12 +1466,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DisassociateVPCFromHostedZoneRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: DisassociateVPCFromHostedZoneInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DisassociateVPCFromHostedZoneRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: DisassociateVPCFromHostedZoneInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DisassociateVPCFromHostedZoneOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DisassociateVPCFromHostedZoneOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DisassociateVPCFromHostedZoneOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1563,8 +1499,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func enableHostedZoneDNSSEC(input: EnableHostedZoneDNSSECInput) async throws -> EnableHostedZoneDNSSECOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "enableHostedZoneDNSSEC") @@ -1586,7 +1520,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(EnableHostedZoneDNSSECOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(EnableHostedZoneDNSSECOutput.httpBinding, responseDocumentBinding), responseErrorClosure(EnableHostedZoneDNSSECOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1606,8 +1540,6 @@ extension Route53Client { /// - `InvalidInput` : The input is not valid. public func getAccountLimit(input: GetAccountLimitInput) async throws -> GetAccountLimitOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccountLimit") @@ -1628,7 +1560,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccountLimitOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccountLimitOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccountLimitOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1653,8 +1585,6 @@ extension Route53Client { /// - `NoSuchChange` : A change with the specified change ID does not exist. public func getChange(input: GetChangeInput) async throws -> GetChangeOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getChange") @@ -1675,7 +1605,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetChangeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetChangeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetChangeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1690,8 +1620,6 @@ extension Route53Client { /// - Returns: `GetCheckerIpRangesOutput` : A complex type that contains the CheckerIpRanges element. public func getCheckerIpRanges(input: GetCheckerIpRangesInput) async throws -> GetCheckerIpRangesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getCheckerIpRanges") @@ -1712,7 +1640,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCheckerIpRangesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCheckerIpRangesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCheckerIpRangesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1734,8 +1662,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func getDNSSEC(input: GetDNSSECInput) async throws -> GetDNSSECOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getDNSSEC") @@ -1757,7 +1683,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetDNSSECOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetDNSSECOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetDNSSECOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1778,8 +1704,6 @@ extension Route53Client { /// - `NoSuchGeoLocation` : Amazon Route 53 doesn't support the specified geographic location. For a list of supported geolocation codes, see the [GeoLocation](https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html) data type. public func getGeoLocation(input: GetGeoLocationInput) async throws -> GetGeoLocationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getGeoLocation") @@ -1801,7 +1725,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetGeoLocationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetGeoLocationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetGeoLocationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1823,8 +1747,6 @@ extension Route53Client { /// - `NoSuchHealthCheck` : No health check exists with the specified ID. public func getHealthCheck(input: GetHealthCheckInput) async throws -> GetHealthCheckOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getHealthCheck") @@ -1845,7 +1767,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetHealthCheckOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetHealthCheckOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetHealthCheckOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1860,8 +1782,6 @@ extension Route53Client { /// - Returns: `GetHealthCheckCountOutput` : A complex type that contains the response to a GetHealthCheckCount request. public func getHealthCheckCount(input: GetHealthCheckCountInput) async throws -> GetHealthCheckCountOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getHealthCheckCount") @@ -1882,7 +1802,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetHealthCheckCountOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetHealthCheckCountOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetHealthCheckCountOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1903,8 +1823,6 @@ extension Route53Client { /// - `NoSuchHealthCheck` : No health check exists with the specified ID. public func getHealthCheckLastFailureReason(input: GetHealthCheckLastFailureReasonInput) async throws -> GetHealthCheckLastFailureReasonOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getHealthCheckLastFailureReason") @@ -1925,7 +1843,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetHealthCheckLastFailureReasonOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetHealthCheckLastFailureReasonOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetHealthCheckLastFailureReasonOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1946,8 +1864,6 @@ extension Route53Client { /// - `NoSuchHealthCheck` : No health check exists with the specified ID. public func getHealthCheckStatus(input: GetHealthCheckStatusInput) async throws -> GetHealthCheckStatusOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getHealthCheckStatus") @@ -1968,7 +1884,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetHealthCheckStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetHealthCheckStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetHealthCheckStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1989,8 +1905,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func getHostedZone(input: GetHostedZoneInput) async throws -> GetHostedZoneOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getHostedZone") @@ -2011,7 +1925,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetHostedZoneOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetHostedZoneOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetHostedZoneOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2031,8 +1945,6 @@ extension Route53Client { /// - `InvalidInput` : The input is not valid. public func getHostedZoneCount(input: GetHostedZoneCountInput) async throws -> GetHostedZoneCountOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getHostedZoneCount") @@ -2053,7 +1965,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetHostedZoneCountOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetHostedZoneCountOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetHostedZoneCountOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2075,8 +1987,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func getHostedZoneLimit(input: GetHostedZoneLimitInput) async throws -> GetHostedZoneLimitOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getHostedZoneLimit") @@ -2098,7 +2008,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetHostedZoneLimitOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetHostedZoneLimitOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetHostedZoneLimitOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2119,8 +2029,6 @@ extension Route53Client { /// - `NoSuchQueryLoggingConfig` : There is no DNS query logging configuration with the specified ID. public func getQueryLoggingConfig(input: GetQueryLoggingConfigInput) async throws -> GetQueryLoggingConfigOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getQueryLoggingConfig") @@ -2141,7 +2049,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetQueryLoggingConfigOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetQueryLoggingConfigOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetQueryLoggingConfigOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2163,8 +2071,6 @@ extension Route53Client { /// - `NoSuchDelegationSet` : A reusable delegation set with the specified ID does not exist. public func getReusableDelegationSet(input: GetReusableDelegationSetInput) async throws -> GetReusableDelegationSetOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getReusableDelegationSet") @@ -2185,7 +2091,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetReusableDelegationSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetReusableDelegationSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetReusableDelegationSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2206,8 +2112,6 @@ extension Route53Client { /// - `NoSuchDelegationSet` : A reusable delegation set with the specified ID does not exist. public func getReusableDelegationSetLimit(input: GetReusableDelegationSetLimitInput) async throws -> GetReusableDelegationSetLimitOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getReusableDelegationSetLimit") @@ -2228,7 +2132,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetReusableDelegationSetLimitOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetReusableDelegationSetLimitOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetReusableDelegationSetLimitOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2249,8 +2153,6 @@ extension Route53Client { /// - `NoSuchTrafficPolicy` : No traffic policy exists with the specified ID. public func getTrafficPolicy(input: GetTrafficPolicyInput) async throws -> GetTrafficPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getTrafficPolicy") @@ -2271,7 +2173,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTrafficPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTrafficPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTrafficPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2292,8 +2194,6 @@ extension Route53Client { /// - `NoSuchTrafficPolicyInstance` : No traffic policy instance exists with the specified ID. public func getTrafficPolicyInstance(input: GetTrafficPolicyInstanceInput) async throws -> GetTrafficPolicyInstanceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getTrafficPolicyInstance") @@ -2314,7 +2214,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTrafficPolicyInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTrafficPolicyInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTrafficPolicyInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2329,8 +2229,6 @@ extension Route53Client { /// - Returns: `GetTrafficPolicyInstanceCountOutput` : A complex type that contains information about the resource record sets that Amazon Route 53 created based on a specified traffic policy. public func getTrafficPolicyInstanceCount(input: GetTrafficPolicyInstanceCountInput) async throws -> GetTrafficPolicyInstanceCountOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getTrafficPolicyInstanceCount") @@ -2351,7 +2249,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTrafficPolicyInstanceCountOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTrafficPolicyInstanceCountOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTrafficPolicyInstanceCountOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2373,8 +2271,6 @@ extension Route53Client { /// - `NoSuchCidrLocationException` : The CIDR collection location doesn't match any locations in your account. public func listCidrBlocks(input: ListCidrBlocksInput) async throws -> ListCidrBlocksOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listCidrBlocks") @@ -2396,7 +2292,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListCidrBlocksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListCidrBlocksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListCidrBlocksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2416,8 +2312,6 @@ extension Route53Client { /// - `InvalidInput` : The input is not valid. public func listCidrCollections(input: ListCidrCollectionsInput) async throws -> ListCidrCollectionsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listCidrCollections") @@ -2439,7 +2333,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListCidrCollectionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListCidrCollectionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListCidrCollectionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2460,8 +2354,6 @@ extension Route53Client { /// - `NoSuchCidrCollectionException` : The CIDR collection you specified, doesn't exist. public func listCidrLocations(input: ListCidrLocationsInput) async throws -> ListCidrLocationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listCidrLocations") @@ -2483,7 +2375,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListCidrLocationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListCidrLocationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListCidrLocationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2503,8 +2395,6 @@ extension Route53Client { /// - `InvalidInput` : The input is not valid. public func listGeoLocations(input: ListGeoLocationsInput) async throws -> ListGeoLocationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listGeoLocations") @@ -2526,7 +2416,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListGeoLocationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListGeoLocationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListGeoLocationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2547,8 +2437,6 @@ extension Route53Client { /// - `InvalidInput` : The input is not valid. public func listHealthChecks(input: ListHealthChecksInput) async throws -> ListHealthChecksOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listHealthChecks") @@ -2570,7 +2458,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListHealthChecksOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListHealthChecksOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListHealthChecksOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2592,8 +2480,6 @@ extension Route53Client { /// - `NoSuchDelegationSet` : A reusable delegation set with the specified ID does not exist. public func listHostedZones(input: ListHostedZonesInput) async throws -> ListHostedZonesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listHostedZones") @@ -2615,7 +2501,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListHostedZonesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListHostedZonesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListHostedZonesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2644,8 +2530,6 @@ extension Route53Client { /// - `InvalidInput` : The input is not valid. public func listHostedZonesByName(input: ListHostedZonesByNameInput) async throws -> ListHostedZonesByNameOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listHostedZonesByName") @@ -2667,7 +2551,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListHostedZonesByNameOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListHostedZonesByNameOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListHostedZonesByNameOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2704,8 +2588,6 @@ extension Route53Client { /// - `InvalidPaginationToken` : The value that you specified to get the second or subsequent page of results is invalid. public func listHostedZonesByVPC(input: ListHostedZonesByVPCInput) async throws -> ListHostedZonesByVPCOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listHostedZonesByVPC") @@ -2727,7 +2609,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListHostedZonesByVPCOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListHostedZonesByVPCOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListHostedZonesByVPCOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2749,8 +2631,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func listQueryLoggingConfigs(input: ListQueryLoggingConfigsInput) async throws -> ListQueryLoggingConfigsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listQueryLoggingConfigs") @@ -2772,7 +2652,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListQueryLoggingConfigsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListQueryLoggingConfigsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListQueryLoggingConfigsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2793,8 +2673,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func listResourceRecordSets(input: ListResourceRecordSetsInput) async throws -> ListResourceRecordSetsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listResourceRecordSets") @@ -2817,7 +2695,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListResourceRecordSetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListResourceRecordSetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListResourceRecordSetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2837,8 +2715,6 @@ extension Route53Client { /// - `InvalidInput` : The input is not valid. public func listReusableDelegationSets(input: ListReusableDelegationSetsInput) async throws -> ListReusableDelegationSetsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listReusableDelegationSets") @@ -2860,7 +2736,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListReusableDelegationSetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListReusableDelegationSetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListReusableDelegationSetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2884,8 +2760,6 @@ extension Route53Client { /// - `ThrottlingException` : The limit on the number of requests per second was exceeded. public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -2906,7 +2780,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2930,8 +2804,6 @@ extension Route53Client { /// - `ThrottlingException` : The limit on the number of requests per second was exceeded. public func listTagsForResources(input: ListTagsForResourcesInput) async throws -> ListTagsForResourcesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResources") @@ -2950,12 +2822,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ListTagsForResourcesRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: ListTagsForResourcesInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ListTagsForResourcesRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: ListTagsForResourcesInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourcesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourcesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourcesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2975,8 +2847,6 @@ extension Route53Client { /// - `InvalidInput` : The input is not valid. public func listTrafficPolicies(input: ListTrafficPoliciesInput) async throws -> ListTrafficPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listTrafficPolicies") @@ -2998,7 +2868,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTrafficPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTrafficPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTrafficPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3019,8 +2889,6 @@ extension Route53Client { /// - `NoSuchTrafficPolicyInstance` : No traffic policy instance exists with the specified ID. public func listTrafficPolicyInstances(input: ListTrafficPolicyInstancesInput) async throws -> ListTrafficPolicyInstancesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listTrafficPolicyInstances") @@ -3042,7 +2910,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTrafficPolicyInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTrafficPolicyInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTrafficPolicyInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3064,8 +2932,6 @@ extension Route53Client { /// - `NoSuchTrafficPolicyInstance` : No traffic policy instance exists with the specified ID. public func listTrafficPolicyInstancesByHostedZone(input: ListTrafficPolicyInstancesByHostedZoneInput) async throws -> ListTrafficPolicyInstancesByHostedZoneOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listTrafficPolicyInstancesByHostedZone") @@ -3087,7 +2953,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTrafficPolicyInstancesByHostedZoneOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTrafficPolicyInstancesByHostedZoneOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTrafficPolicyInstancesByHostedZoneOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3109,8 +2975,6 @@ extension Route53Client { /// - `NoSuchTrafficPolicyInstance` : No traffic policy instance exists with the specified ID. public func listTrafficPolicyInstancesByPolicy(input: ListTrafficPolicyInstancesByPolicyInput) async throws -> ListTrafficPolicyInstancesByPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listTrafficPolicyInstancesByPolicy") @@ -3132,7 +2996,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTrafficPolicyInstancesByPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTrafficPolicyInstancesByPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTrafficPolicyInstancesByPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3153,8 +3017,6 @@ extension Route53Client { /// - `NoSuchTrafficPolicy` : No traffic policy exists with the specified ID. public func listTrafficPolicyVersions(input: ListTrafficPolicyVersionsInput) async throws -> ListTrafficPolicyVersionsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listTrafficPolicyVersions") @@ -3176,7 +3038,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTrafficPolicyVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTrafficPolicyVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTrafficPolicyVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3198,8 +3060,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func listVPCAssociationAuthorizations(input: ListVPCAssociationAuthorizationsInput) async throws -> ListVPCAssociationAuthorizationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listVPCAssociationAuthorizations") @@ -3222,7 +3082,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListVPCAssociationAuthorizationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListVPCAssociationAuthorizationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListVPCAssociationAuthorizationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3243,8 +3103,6 @@ extension Route53Client { /// - `NoSuchHostedZone` : No hosted zone exists with the ID that you specified. public func testDNSAnswer(input: TestDNSAnswerInput) async throws -> TestDNSAnswerOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "testDNSAnswer") @@ -3266,7 +3124,7 @@ extension Route53Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TestDNSAnswerOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TestDNSAnswerOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TestDNSAnswerOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3288,8 +3146,6 @@ extension Route53Client { /// - `NoSuchHealthCheck` : No health check exists with the specified ID. public func updateHealthCheck(input: UpdateHealthCheckInput) async throws -> UpdateHealthCheckOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateHealthCheck") @@ -3308,12 +3164,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateHealthCheckRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: UpdateHealthCheckInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateHealthCheckRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: UpdateHealthCheckInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateHealthCheckOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateHealthCheckOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateHealthCheckOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3335,8 +3191,6 @@ extension Route53Client { /// - `PriorRequestNotComplete` : If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again. public func updateHostedZoneComment(input: UpdateHostedZoneCommentInput) async throws -> UpdateHostedZoneCommentOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateHostedZoneComment") @@ -3355,12 +3209,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateHostedZoneCommentRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: UpdateHostedZoneCommentInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateHostedZoneCommentRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: UpdateHostedZoneCommentInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateHostedZoneCommentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateHostedZoneCommentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateHostedZoneCommentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3382,8 +3236,6 @@ extension Route53Client { /// - `NoSuchTrafficPolicy` : No traffic policy exists with the specified ID. public func updateTrafficPolicyComment(input: UpdateTrafficPolicyCommentInput) async throws -> UpdateTrafficPolicyCommentOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateTrafficPolicyComment") @@ -3402,12 +3254,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateTrafficPolicyCommentRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: UpdateTrafficPolicyCommentInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateTrafficPolicyCommentRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: UpdateTrafficPolicyCommentInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateTrafficPolicyCommentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateTrafficPolicyCommentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateTrafficPolicyCommentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3437,8 +3289,6 @@ extension Route53Client { /// - `PriorRequestNotComplete` : If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again. public func updateTrafficPolicyInstance(input: UpdateTrafficPolicyInstanceInput) async throws -> UpdateTrafficPolicyInstanceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateTrafficPolicyInstance") @@ -3457,12 +3307,12 @@ extension Route53Client { operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateTrafficPolicyInstanceRequest", namespace: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: UpdateTrafficPolicyInstanceInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateTrafficPolicyInstanceRequest", namespaceDef: .init(prefix: "", uri: "https://route53.amazonaws.com/doc/2013-04-01/"))), inputWritingClosure: UpdateTrafficPolicyInstanceInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateTrafficPolicyInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateTrafficPolicyInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateTrafficPolicyInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSRoute53/models/Models.swift b/Sources/Services/AWSRoute53/models/Models.swift index e5506533df2..432085b13d7 100644 --- a/Sources/Services/AWSRoute53/models/Models.swift +++ b/Sources/Services/AWSRoute53/models/Models.swift @@ -1,26 +1,25 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite import SmithyXML -extension Route53ClientTypes.AccountLimit: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case type = "Type" - case value = "Value" - } +extension Route53ClientTypes.AccountLimit { static func writingClosure(_ value: Route53ClientTypes.AccountLimit?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Type")].write(value.type) - try writer[.init("Value")].write(value.value) + try writer["Type"].write(value.type) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.AccountLimitType.self, forKey: .type) - type = typeDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.AccountLimit() + value.type = try reader["Type"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -153,14 +152,15 @@ public struct ActivateKeySigningKeyInput: Swift.Equatable { } } -extension ActivateKeySigningKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ActivateKeySigningKeyOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil +extension ActivateKeySigningKeyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ActivateKeySigningKeyOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -178,55 +178,42 @@ public struct ActivateKeySigningKeyOutput: Swift.Equatable { } } -struct ActivateKeySigningKeyOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension ActivateKeySigningKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} +enum ActivateKeySigningKeyOutputError { -enum ActivateKeySigningKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSArn": return try await InvalidKMSArn(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSigningStatus": return try await InvalidSigningStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchKeySigningKey": return try await NoSuchKeySigningKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKMSArn": return try await InvalidKMSArn.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidSigningStatus": return try await InvalidSigningStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchKeySigningKey": return try await NoSuchKeySigningKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.AlarmIdentifier: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case region = "Region" - } +extension Route53ClientTypes.AlarmIdentifier { static func writingClosure(_ value: Route53ClientTypes.AlarmIdentifier?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) - try writer[.init("Region")].write(value.region) + try writer["Name"].write(value.name) + try writer["Region"].write(value.region) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.CloudWatchRegion.self, forKey: .region) - region = regionDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.AlarmIdentifier() + value.region = try reader["Region"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -256,28 +243,24 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.AliasTarget: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dnsName = "DNSName" - case evaluateTargetHealth = "EvaluateTargetHealth" - case hostedZoneId = "HostedZoneId" - } +extension Route53ClientTypes.AliasTarget { static func writingClosure(_ value: Route53ClientTypes.AliasTarget?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DNSName")].write(value.dnsName) - try writer[.init("EvaluateTargetHealth")].write(value.evaluateTargetHealth) - try writer[.init("HostedZoneId")].write(value.hostedZoneId) + try writer["DNSName"].write(value.dnsName) + try writer["EvaluateTargetHealth"].write(value.evaluateTargetHealth) + try writer["HostedZoneId"].write(value.hostedZoneId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - let evaluateTargetHealthDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .evaluateTargetHealth) ?? false - evaluateTargetHealth = evaluateTargetHealthDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.AliasTarget() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.dnsName = try reader["DNSName"].readIfPresent() + value.evaluateTargetHealth = try reader["EvaluateTargetHealth"].readIfPresent() ?? false + return value + } } } @@ -403,15 +386,10 @@ extension Route53ClientTypes { } extension AssociateVPCWithHostedZoneInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case vpc = "VPC" - } - static func writingClosure(_ value: AssociateVPCWithHostedZoneInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("VPC")].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) + try writer["Comment"].write(value.comment) + try writer["VPC"].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) } } @@ -473,34 +451,15 @@ public struct AssociateVPCWithHostedZoneInput: Swift.Equatable { } } -struct AssociateVPCWithHostedZoneInputBody: Swift.Equatable { - let vpc: Route53ClientTypes.VPC? - let comment: Swift.String? -} - -extension AssociateVPCWithHostedZoneInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case vpc = "VPC" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.VPC.self, forKey: .vpc) - vpc = vpcDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - } -} +extension AssociateVPCWithHostedZoneOutput { -extension AssociateVPCWithHostedZoneOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssociateVPCWithHostedZoneOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = AssociateVPCWithHostedZoneOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -519,57 +478,44 @@ public struct AssociateVPCWithHostedZoneOutput: Swift.Equatable { } } -struct AssociateVPCWithHostedZoneOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension AssociateVPCWithHostedZoneOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} - -enum AssociateVPCWithHostedZoneOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConflictingDomainExists": return try await ConflictingDomainExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCId": return try await InvalidVPCId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitsExceeded": return try await LimitsExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotAuthorizedException": return try await NotAuthorizedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PublicZoneVPCAssociation": return try await PublicZoneVPCAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AssociateVPCWithHostedZoneOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConflictingDomainExists": return try await ConflictingDomainExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidVPCId": return try await InvalidVPCId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "LimitsExceeded": return try await LimitsExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NotAuthorizedException": return try await NotAuthorizedException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PublicZoneVPCAssociation": return try await PublicZoneVPCAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.Change: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case action = "Action" - case resourceRecordSet = "ResourceRecordSet" - } +extension Route53ClientTypes.Change { static func writingClosure(_ value: Route53ClientTypes.Change?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Action")].write(value.action) - try writer[.init("ResourceRecordSet")].write(value.resourceRecordSet, writingClosure: Route53ClientTypes.ResourceRecordSet.writingClosure(_:to:)) + try writer["Action"].write(value.action) + try writer["ResourceRecordSet"].write(value.resourceRecordSet, writingClosure: Route53ClientTypes.ResourceRecordSet.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let actionDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeAction.self, forKey: .action) - action = actionDecoded - let resourceRecordSetDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ResourceRecordSet.self, forKey: .resourceRecordSet) - resourceRecordSet = resourceRecordSetDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.Change() + value.action = try reader["Action"].readIfPresent() + value.resourceRecordSet = try reader["ResourceRecordSet"].readIfPresent(readingClosure: Route53ClientTypes.ResourceRecordSet.readingClosure) + return value + } } } @@ -636,40 +582,21 @@ extension Route53ClientTypes { } } -extension Route53ClientTypes.ChangeBatch: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changes = "Changes" - case comment = "Comment" - } +extension Route53ClientTypes.ChangeBatch { static func writingClosure(_ value: Route53ClientTypes.ChangeBatch?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Changes")].writeList(value.changes, memberWritingClosure: Route53ClientTypes.Change.writingClosure(_:to:), memberNodeInfo: .init("Change"), isFlattened: false) - try writer[.init("Comment")].write(value.comment) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - if containerValues.contains(.changes) { - struct KeyVal0{struct Change{}} - let changesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .changes) - if let changesWrappedContainer = changesWrappedContainer { - let changesContainer = try changesWrappedContainer.decodeIfPresent([Route53ClientTypes.Change].self, forKey: .member) - var changesBuffer:[Route53ClientTypes.Change]? = nil - if let changesContainer = changesContainer { - changesBuffer = [Route53ClientTypes.Change]() - for structureContainer0 in changesContainer { - changesBuffer?.append(structureContainer0) - } - } - changes = changesBuffer - } else { - changes = [] - } - } else { - changes = nil + try writer["Changes"].writeList(value.changes, memberWritingClosure: Route53ClientTypes.Change.writingClosure(_:to:), memberNodeInfo: "Change", isFlattened: false) + try writer["Comment"].write(value.comment) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.ChangeBatch() + value.comment = try reader["Comment"].readIfPresent() + value.changes = try reader["Changes"].readListIfPresent(memberReadingClosure: Route53ClientTypes.Change.readingClosure, memberNodeInfo: "Change", isFlattened: false) + return value } } } @@ -696,15 +623,10 @@ extension Route53ClientTypes { } extension ChangeCidrCollectionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changes = "Changes" - case collectionVersion = "CollectionVersion" - } - static func writingClosure(_ value: ChangeCidrCollectionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Changes")].writeList(value.changes, memberWritingClosure: Route53ClientTypes.CidrCollectionChange.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("CollectionVersion")].write(value.collectionVersion) + try writer["Changes"].writeList(value.changes, memberWritingClosure: Route53ClientTypes.CidrCollectionChange.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["CollectionVersion"].write(value.collectionVersion) } } @@ -744,51 +666,15 @@ public struct ChangeCidrCollectionInput: Swift.Equatable { } } -struct ChangeCidrCollectionInputBody: Swift.Equatable { - let collectionVersion: Swift.Int? - let changes: [Route53ClientTypes.CidrCollectionChange]? -} - -extension ChangeCidrCollectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changes = "Changes" - case collectionVersion = "CollectionVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let collectionVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .collectionVersion) - collectionVersion = collectionVersionDecoded - if containerValues.contains(.changes) { - struct KeyVal0{struct member{}} - let changesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .changes) - if let changesWrappedContainer = changesWrappedContainer { - let changesContainer = try changesWrappedContainer.decodeIfPresent([Route53ClientTypes.CidrCollectionChange].self, forKey: .member) - var changesBuffer:[Route53ClientTypes.CidrCollectionChange]? = nil - if let changesContainer = changesContainer { - changesBuffer = [Route53ClientTypes.CidrCollectionChange]() - for structureContainer0 in changesContainer { - changesBuffer?.append(structureContainer0) - } - } - changes = changesBuffer - } else { - changes = [] - } - } else { - changes = nil - } - } -} +extension ChangeCidrCollectionOutput { -extension ChangeCidrCollectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ChangeCidrCollectionOutputBody = try responseDecoder.decode(responseBody: data) - self.id = output.id - } else { - self.id = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ChangeCidrCollectionOutput() + value.id = try reader["Id"].readIfPresent() + return value } } } @@ -806,63 +692,46 @@ public struct ChangeCidrCollectionOutput: Swift.Equatable { } } -struct ChangeCidrCollectionOutputBody: Swift.Equatable { - let id: Swift.String? -} - -extension ChangeCidrCollectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case id = "Id" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - } -} +enum ChangeCidrCollectionOutputError { -enum ChangeCidrCollectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CidrBlockInUseException": return try await CidrBlockInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CidrCollectionVersionMismatchException": return try await CidrCollectionVersionMismatchException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitsExceeded": return try await LimitsExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCidrCollectionException": return try await NoSuchCidrCollectionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "CidrBlockInUseException": return try await CidrBlockInUseException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "CidrCollectionVersionMismatchException": return try await CidrCollectionVersionMismatchException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "LimitsExceeded": return try await LimitsExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCidrCollectionException": return try await NoSuchCidrCollectionException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.ChangeInfo: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case id = "Id" - case status = "Status" - case submittedAt = "SubmittedAt" - } +extension Route53ClientTypes.ChangeInfo { static func writingClosure(_ value: Route53ClientTypes.ChangeInfo?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("Id")].write(value.id) - try writer[.init("Status")].write(value.status) - try writer[.init("SubmittedAt")].writeTimestamp(value.submittedAt, format: .dateTime) + try writer["Comment"].write(value.comment) + try writer["Id"].write(value.id) + try writer["Status"].write(value.status) + try writer["SubmittedAt"].writeTimestamp(value.submittedAt, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let statusDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeStatus.self, forKey: .status) - status = statusDecoded - let submittedAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .submittedAt) - submittedAt = submittedAtDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.ChangeInfo() + value.id = try reader["Id"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.submittedAt = try reader["SubmittedAt"].readTimestampIfPresent(format: .dateTime) + value.comment = try reader["Comment"].readIfPresent() + return value + } } } @@ -898,13 +767,9 @@ extension Route53ClientTypes { } extension ChangeResourceRecordSetsInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeBatch = "ChangeBatch" - } - static func writingClosure(_ value: ChangeResourceRecordSetsInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChangeBatch")].write(value.changeBatch, writingClosure: Route53ClientTypes.ChangeBatch.writingClosure(_:to:)) + try writer["ChangeBatch"].write(value.changeBatch, writingClosure: Route53ClientTypes.ChangeBatch.writingClosure(_:to:)) } } @@ -962,30 +827,15 @@ public struct ChangeResourceRecordSetsInput: Swift.Equatable { } } -struct ChangeResourceRecordSetsInputBody: Swift.Equatable { - let changeBatch: Route53ClientTypes.ChangeBatch? -} - -extension ChangeResourceRecordSetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeBatch = "ChangeBatch" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeBatchDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeBatch.self, forKey: .changeBatch) - changeBatch = changeBatchDecoded - } -} +extension ChangeResourceRecordSetsOutput { -extension ChangeResourceRecordSetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ChangeResourceRecordSetsOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ChangeResourceRecordSetsOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -1004,54 +854,40 @@ public struct ChangeResourceRecordSetsOutput: Swift.Equatable { } } -struct ChangeResourceRecordSetsOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension ChangeResourceRecordSetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } +struct CustomInvalidBatchError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} + struct Message { + var message: String? -struct CustomInvalidBatchError: Decodable { + init() {} - struct Message: Decodable { - let message: String - enum CodingKeys: String, CodingKey { - case message = "Message" + static func readingClosure(from reader: SmithyXML.Reader) throws -> Message? { + guard reader.content != nil else { return nil } + var value = Message() + value.message = try reader["Message"].readIfPresent() + return value } } - let requestID: String? - let message: String? - let messages: [String]? + var requestID: String? + var message: String? + var messages: [String]? - enum CodingKeys: String, CodingKey { - case message = "Message" - case messages = "Messages" - case requestID = "RequestId" - } + init() {} - init(from decoder: Decoder) throws { - let container = try decoder.container(keyedBy: CodingKeys.self) - self.requestID = try container.decode(String.self, forKey: .requestID) - self.message = try container.decodeIfPresent(String.self, forKey: .message) - let messages = try container.decodeIfPresent([Message].self, forKey: .messages) - self.messages = messages?.map(\.message) + static func readingClosure(from reader: SmithyXML.Reader) throws -> CustomInvalidBatchError? { + guard reader.content != nil else { return nil } + var value = CustomInvalidBatchError() + value.requestID = try reader["RequestId"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.messages = try reader["Messages"].readListIfPresent(memberReadingClosure: Message.readingClosure(from:), memberNodeInfo: "Message", isFlattened: false)?.compactMap(\.message) + return value } static func makeFromHttpResponse(_ httpResponse: ClientRuntime.HttpResponse) async throws -> CustomInvalidBatchError? { - guard let data = try await httpResponse.body.readData() else { - return nil - } - return try? XMLDecoder().decode(CustomInvalidBatchError.self, from: data) + guard let data = try await httpResponse.body.readData() else { return nil } + let reader = try SmithyXML.Reader.from(data: data) + return try Self.readingClosure(from: reader) } } @@ -1064,22 +900,27 @@ extension InvalidChangeBatch { } } -enum ChangeResourceRecordSetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - if let customBatchError = try await CustomInvalidBatchError.makeFromHttpResponse(httpResponse) { - return InvalidChangeBatch( - customError: customBatchError, - httpResponse: httpResponse - ) - } - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidChangeBatch": return try await InvalidChangeBatch(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ChangeResourceRecordSetsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + if let customBatchError = try await CustomInvalidBatchError.makeFromHttpResponse(httpResponse) { + return InvalidChangeBatch( + customError: customBatchError, + httpResponse: httpResponse + ) + } + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidChangeBatch": return try await InvalidChangeBatch.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -1117,15 +958,10 @@ extension Route53ClientTypes { } extension ChangeTagsForResourceInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addTags = "AddTags" - case removeTagKeys = "RemoveTagKeys" - } - static func writingClosure(_ value: ChangeTagsForResourceInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AddTags")].writeList(value.addTags, memberWritingClosure: Route53ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) - try writer[.init("RemoveTagKeys")].writeList(value.removeTagKeys, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Key"), isFlattened: false) + try writer["AddTags"].writeList(value.addTags, memberWritingClosure: Route53ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) + try writer["RemoveTagKeys"].writeList(value.removeTagKeys, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Key", isFlattened: false) } } @@ -1173,96 +1009,61 @@ public struct ChangeTagsForResourceInput: Swift.Equatable { } } -struct ChangeTagsForResourceInputBody: Swift.Equatable { - let addTags: [Route53ClientTypes.Tag]? - let removeTagKeys: [Swift.String]? -} - -extension ChangeTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case addTags = "AddTags" - case removeTagKeys = "RemoveTagKeys" - } +extension ChangeTagsForResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.addTags) { - struct KeyVal0{struct Tag{}} - let addTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .addTags) - if let addTagsWrappedContainer = addTagsWrappedContainer { - let addTagsContainer = try addTagsWrappedContainer.decodeIfPresent([Route53ClientTypes.Tag].self, forKey: .member) - var addTagsBuffer:[Route53ClientTypes.Tag]? = nil - if let addTagsContainer = addTagsContainer { - addTagsBuffer = [Route53ClientTypes.Tag]() - for structureContainer0 in addTagsContainer { - addTagsBuffer?.append(structureContainer0) - } - } - addTags = addTagsBuffer - } else { - addTags = [] - } - } else { - addTags = nil - } - if containerValues.contains(.removeTagKeys) { - struct KeyVal0{struct Key{}} - let removeTagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .removeTagKeys) - if let removeTagKeysWrappedContainer = removeTagKeysWrappedContainer { - let removeTagKeysContainer = try removeTagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var removeTagKeysBuffer:[Swift.String]? = nil - if let removeTagKeysContainer = removeTagKeysContainer { - removeTagKeysBuffer = [Swift.String]() - for stringContainer0 in removeTagKeysContainer { - removeTagKeysBuffer?.append(stringContainer0) - } - } - removeTagKeys = removeTagKeysBuffer - } else { - removeTagKeys = [] - } - } else { - removeTagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ChangeTagsForResourceOutput() } } } -extension ChangeTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// Empty response for the request. public struct ChangeTagsForResourceOutput: Swift.Equatable { public init() { } } -enum ChangeTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ChangeTagsForResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ThrottlingException": return try await ThrottlingException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CidrBlockInUseException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CidrBlockInUseException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension CidrBlockInUseException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CidrBlockInUseException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1290,40 +1091,22 @@ public struct CidrBlockInUseException: ClientRuntime.ModeledError, AWSClientRunt } } -struct CidrBlockInUseExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CidrBlockInUseExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.CidrBlockSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlock = "CidrBlock" - case locationName = "LocationName" - } +extension Route53ClientTypes.CidrBlockSummary { static func writingClosure(_ value: Route53ClientTypes.CidrBlockSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CidrBlock")].write(value.cidrBlock) - try writer[.init("LocationName")].write(value.locationName) + try writer["CidrBlock"].write(value.cidrBlock) + try writer["LocationName"].write(value.locationName) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cidrBlockDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidrBlock) - cidrBlock = cidrBlockDecoded - let locationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationName) - locationName = locationNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.CidrBlockSummary() + value.cidrBlock = try reader["CidrBlock"].readIfPresent() + value.locationName = try reader["LocationName"].readIfPresent() + return value + } } } @@ -1347,32 +1130,26 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.CidrCollection: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case id = "Id" - case name = "Name" - case version = "Version" - } +extension Route53ClientTypes.CidrCollection { static func writingClosure(_ value: Route53ClientTypes.CidrCollection?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Arn")].write(value.arn) - try writer[.init("Id")].write(value.id) - try writer[.init("Name")].write(value.name) - try writer[.init("Version")].write(value.version) + try writer["Arn"].write(value.arn) + try writer["Id"].write(value.id) + try writer["Name"].write(value.name) + try writer["Version"].write(value.version) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.CidrCollection() + value.arn = try reader["Arn"].readIfPresent() + value.id = try reader["Id"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -1405,16 +1182,26 @@ extension Route53ClientTypes { } extension CidrCollectionAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CidrCollectionAlreadyExistsException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension CidrCollectionAlreadyExistsException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CidrCollectionAlreadyExistsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1442,60 +1229,23 @@ public struct CidrCollectionAlreadyExistsException: ClientRuntime.ModeledError, } } -struct CidrCollectionAlreadyExistsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CidrCollectionAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.CidrCollectionChange: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case action = "Action" - case cidrList = "CidrList" - case locationName = "LocationName" - } +extension Route53ClientTypes.CidrCollectionChange { static func writingClosure(_ value: Route53ClientTypes.CidrCollectionChange?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Action")].write(value.action) - try writer[.init("CidrList")].writeList(value.cidrList, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Cidr"), isFlattened: false) - try writer[.init("LocationName")].write(value.locationName) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let locationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationName) - locationName = locationNameDecoded - let actionDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.CidrCollectionChangeAction.self, forKey: .action) - action = actionDecoded - if containerValues.contains(.cidrList) { - struct KeyVal0{struct Cidr{}} - let cidrListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cidrList) - if let cidrListWrappedContainer = cidrListWrappedContainer { - let cidrListContainer = try cidrListWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var cidrListBuffer:[Swift.String]? = nil - if let cidrListContainer = cidrListContainer { - cidrListBuffer = [Swift.String]() - for stringContainer0 in cidrListContainer { - cidrListBuffer?.append(stringContainer0) - } - } - cidrList = cidrListBuffer - } else { - cidrList = [] - } - } else { - cidrList = nil + try writer["Action"].write(value.action) + try writer["CidrList"].writeList(value.cidrList, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Cidr", isFlattened: false) + try writer["LocationName"].write(value.locationName) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.CidrCollectionChange() + value.locationName = try reader["LocationName"].readIfPresent() + value.action = try reader["Action"].readIfPresent() + value.cidrList = try reader["CidrList"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Cidr", isFlattened: false) + return value } } } @@ -1560,16 +1310,26 @@ extension Route53ClientTypes { } extension CidrCollectionInUseException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CidrCollectionInUseException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension CidrCollectionInUseException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CidrCollectionInUseException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1597,33 +1357,27 @@ public struct CidrCollectionInUseException: ClientRuntime.ModeledError, AWSClien } } -struct CidrCollectionInUseExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CidrCollectionInUseExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension CidrCollectionVersionMismatchException { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = CidrCollectionVersionMismatchException() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension CidrCollectionVersionMismatchException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CidrCollectionVersionMismatchException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1651,40 +1405,22 @@ public struct CidrCollectionVersionMismatchException: ClientRuntime.ModeledError } } -struct CidrCollectionVersionMismatchExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CidrCollectionVersionMismatchExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.CidrRoutingConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case collectionId = "CollectionId" - case locationName = "LocationName" - } +extension Route53ClientTypes.CidrRoutingConfig { static func writingClosure(_ value: Route53ClientTypes.CidrRoutingConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CollectionId")].write(value.collectionId) - try writer[.init("LocationName")].write(value.locationName) + try writer["CollectionId"].write(value.collectionId) + try writer["LocationName"].write(value.locationName) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let collectionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .collectionId) - collectionId = collectionIdDecoded - let locationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationName) - locationName = locationNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.CidrRoutingConfig() + value.collectionId = try reader["CollectionId"].readIfPresent() + value.locationName = try reader["LocationName"].readIfPresent() + return value + } } } @@ -1710,64 +1446,33 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.CloudWatchAlarmConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comparisonOperator = "ComparisonOperator" - case dimensions = "Dimensions" - case evaluationPeriods = "EvaluationPeriods" - case metricName = "MetricName" - case namespace = "Namespace" - case period = "Period" - case statistic = "Statistic" - case threshold = "Threshold" - } +extension Route53ClientTypes.CloudWatchAlarmConfiguration { static func writingClosure(_ value: Route53ClientTypes.CloudWatchAlarmConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ComparisonOperator")].write(value.comparisonOperator) - try writer[.init("Dimensions")].writeList(value.dimensions, memberWritingClosure: Route53ClientTypes.Dimension.writingClosure(_:to:), memberNodeInfo: .init("Dimension"), isFlattened: false) - try writer[.init("EvaluationPeriods")].write(value.evaluationPeriods) - try writer[.init("MetricName")].write(value.metricName) - try writer[.init("Namespace")].write(value.namespace) - try writer[.init("Period")].write(value.period) - try writer[.init("Statistic")].write(value.statistic) - try writer[.init("Threshold")].write(value.threshold) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let evaluationPeriodsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .evaluationPeriods) - evaluationPeriods = evaluationPeriodsDecoded - let thresholdDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .threshold) - threshold = thresholdDecoded - let comparisonOperatorDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ComparisonOperator.self, forKey: .comparisonOperator) - comparisonOperator = comparisonOperatorDecoded - let periodDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .period) - period = periodDecoded - let metricNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .metricName) - metricName = metricNameDecoded - let namespaceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .namespace) - namespace = namespaceDecoded - let statisticDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.Statistic.self, forKey: .statistic) - statistic = statisticDecoded - if containerValues.contains(.dimensions) { - struct KeyVal0{struct Dimension{}} - let dimensionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensions) - if let dimensionsWrappedContainer = dimensionsWrappedContainer { - let dimensionsContainer = try dimensionsWrappedContainer.decodeIfPresent([Route53ClientTypes.Dimension].self, forKey: .member) - var dimensionsBuffer:[Route53ClientTypes.Dimension]? = nil - if let dimensionsContainer = dimensionsContainer { - dimensionsBuffer = [Route53ClientTypes.Dimension]() - for structureContainer0 in dimensionsContainer { - dimensionsBuffer?.append(structureContainer0) - } - } - dimensions = dimensionsBuffer - } else { - dimensions = [] - } - } else { - dimensions = nil + try writer["ComparisonOperator"].write(value.comparisonOperator) + try writer["Dimensions"].writeList(value.dimensions, memberWritingClosure: Route53ClientTypes.Dimension.writingClosure(_:to:), memberNodeInfo: "Dimension", isFlattened: false) + try writer["EvaluationPeriods"].write(value.evaluationPeriods) + try writer["MetricName"].write(value.metricName) + try writer["Namespace"].write(value.namespace) + try writer["Period"].write(value.period) + try writer["Statistic"].write(value.statistic) + try writer["Threshold"].write(value.threshold) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.CloudWatchAlarmConfiguration() + value.evaluationPeriods = try reader["EvaluationPeriods"].readIfPresent() + value.threshold = try reader["Threshold"].readIfPresent() + value.comparisonOperator = try reader["ComparisonOperator"].readIfPresent() + value.period = try reader["Period"].readIfPresent() + value.metricName = try reader["MetricName"].readIfPresent() + value.namespace = try reader["Namespace"].readIfPresent() + value.statistic = try reader["Statistic"].readIfPresent() + value.dimensions = try reader["Dimensions"].readListIfPresent(memberReadingClosure: Route53ClientTypes.Dimension.readingClosure, memberNodeInfo: "Dimension", isFlattened: false) + return value } } } @@ -1957,32 +1662,26 @@ extension Route53ClientTypes { } } -extension Route53ClientTypes.CollectionSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - case id = "Id" - case name = "Name" - case version = "Version" - } +extension Route53ClientTypes.CollectionSummary { static func writingClosure(_ value: Route53ClientTypes.CollectionSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Arn")].write(value.arn) - try writer[.init("Id")].write(value.id) - try writer[.init("Name")].write(value.name) - try writer[.init("Version")].write(value.version) + try writer["Arn"].write(value.arn) + try writer["Id"].write(value.id) + try writer["Name"].write(value.name) + try writer["Version"].write(value.version) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .version) - version = versionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.CollectionSummary() + value.arn = try reader["Arn"].readIfPresent() + value.id = try reader["Id"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + return value + } } } @@ -2053,16 +1752,26 @@ extension Route53ClientTypes { } extension ConcurrentModification { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ConcurrentModification() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension ConcurrentModification { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConcurrentModification() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2091,33 +1800,27 @@ public struct ConcurrentModification: ClientRuntime.ModeledError, AWSClientRunti } } -struct ConcurrentModificationBody: Swift.Equatable { - let message: Swift.String? -} - -extension ConcurrentModificationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension ConflictingDomainExists { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ConflictingDomainExists() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension ConflictingDomainExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConflictingDomainExists() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2151,33 +1854,27 @@ public struct ConflictingDomainExists: ClientRuntime.ModeledError, AWSClientRunt } } -struct ConflictingDomainExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension ConflictingDomainExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension ConflictingTypes { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ConflictingTypes() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension ConflictingTypes { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConflictingTypes() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2206,40 +1903,22 @@ public struct ConflictingTypes: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct ConflictingTypesBody: Swift.Equatable { - let message: Swift.String? -} - -extension ConflictingTypesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.Coordinates: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case latitude = "Latitude" - case longitude = "Longitude" - } +extension Route53ClientTypes.Coordinates { static func writingClosure(_ value: Route53ClientTypes.Coordinates?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Latitude")].write(value.latitude) - try writer[.init("Longitude")].write(value.longitude) + try writer["Latitude"].write(value.latitude) + try writer["Longitude"].write(value.longitude) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let latitudeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .latitude) - latitude = latitudeDecoded - let longitudeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .longitude) - longitude = longitudeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.Coordinates() + value.latitude = try reader["Latitude"].readIfPresent() + value.longitude = try reader["Longitude"].readIfPresent() + return value + } } } @@ -2266,15 +1945,10 @@ extension Route53ClientTypes { } extension CreateCidrCollectionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case name = "Name" - } - static func writingClosure(_ value: CreateCidrCollectionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Name")].write(value.name) + try writer["CallerReference"].write(value.callerReference) + try writer["Name"].write(value.name) } } @@ -2303,39 +1977,18 @@ public struct CreateCidrCollectionInput: Swift.Equatable { } } -struct CreateCidrCollectionInputBody: Swift.Equatable { - let name: Swift.String? - let callerReference: Swift.String? -} - -extension CreateCidrCollectionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case name = "Name" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - } -} +extension CreateCidrCollectionOutput { -extension CreateCidrCollectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateCidrCollectionOutputBody = try responseDecoder.decode(responseBody: data) - self.collection = output.collection - } else { - self.collection = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateCidrCollectionOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.collection = try reader["Collection"].readIfPresent(readingClosure: Route53ClientTypes.CidrCollection.readingClosure) + return value } } } @@ -2356,45 +2009,29 @@ public struct CreateCidrCollectionOutput: Swift.Equatable { } } -struct CreateCidrCollectionOutputBody: Swift.Equatable { - let collection: Route53ClientTypes.CidrCollection? -} - -extension CreateCidrCollectionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case collection = "Collection" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let collectionDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.CidrCollection.self, forKey: .collection) - collection = collectionDecoded - } -} +enum CreateCidrCollectionOutputError { -enum CreateCidrCollectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CidrCollectionAlreadyExistsException": return try await CidrCollectionAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitsExceeded": return try await LimitsExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "CidrCollectionAlreadyExistsException": return try await CidrCollectionAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "LimitsExceeded": return try await LimitsExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateHealthCheckInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case healthCheckConfig = "HealthCheckConfig" - } - static func writingClosure(_ value: CreateHealthCheckInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("HealthCheckConfig")].write(value.healthCheckConfig, writingClosure: Route53ClientTypes.HealthCheckConfig.writingClosure(_:to:)) + try writer["CallerReference"].write(value.callerReference) + try writer["HealthCheckConfig"].write(value.healthCheckConfig, writingClosure: Route53ClientTypes.HealthCheckConfig.writingClosure(_:to:)) } } @@ -2435,39 +2072,18 @@ public struct CreateHealthCheckInput: Swift.Equatable { } } -struct CreateHealthCheckInputBody: Swift.Equatable { - let callerReference: Swift.String? - let healthCheckConfig: Route53ClientTypes.HealthCheckConfig? -} - -extension CreateHealthCheckInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case healthCheckConfig = "HealthCheckConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let healthCheckConfigDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HealthCheckConfig.self, forKey: .healthCheckConfig) - healthCheckConfig = healthCheckConfigDecoded - } -} +extension CreateHealthCheckOutput { -extension CreateHealthCheckOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateHealthCheckOutputBody = try responseDecoder.decode(responseBody: data) - self.healthCheck = output.healthCheck - } else { - self.healthCheck = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateHealthCheckOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.healthCheck = try reader["HealthCheck"].readIfPresent(readingClosure: Route53ClientTypes.HealthCheck.readingClosure) + return value } } } @@ -2491,50 +2107,31 @@ public struct CreateHealthCheckOutput: Swift.Equatable { } } -struct CreateHealthCheckOutputBody: Swift.Equatable { - let healthCheck: Route53ClientTypes.HealthCheck? -} - -extension CreateHealthCheckOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheck = "HealthCheck" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let healthCheckDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HealthCheck.self, forKey: .healthCheck) - healthCheck = healthCheckDecoded - } -} +enum CreateHealthCheckOutputError { -enum CreateHealthCheckOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HealthCheckAlreadyExists": return try await HealthCheckAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHealthChecks": return try await TooManyHealthChecks(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "HealthCheckAlreadyExists": return try await HealthCheckAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHealthChecks": return try await TooManyHealthChecks.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateHostedZoneInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case delegationSetId = "DelegationSetId" - case hostedZoneConfig = "HostedZoneConfig" - case name = "Name" - case vpc = "VPC" - } - static func writingClosure(_ value: CreateHostedZoneInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("DelegationSetId")].write(value.delegationSetId) - try writer[.init("HostedZoneConfig")].write(value.hostedZoneConfig, writingClosure: Route53ClientTypes.HostedZoneConfig.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) - try writer[.init("VPC")].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) + try writer["CallerReference"].write(value.callerReference) + try writer["DelegationSetId"].write(value.delegationSetId) + try writer["HostedZoneConfig"].write(value.hostedZoneConfig, writingClosure: Route53ClientTypes.HostedZoneConfig.writingClosure(_:to:)) + try writer["Name"].write(value.name) + try writer["VPC"].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) } } @@ -2583,57 +2180,21 @@ public struct CreateHostedZoneInput: Swift.Equatable { } } -struct CreateHostedZoneInputBody: Swift.Equatable { - let name: Swift.String? - let vpc: Route53ClientTypes.VPC? - let callerReference: Swift.String? - let hostedZoneConfig: Route53ClientTypes.HostedZoneConfig? - let delegationSetId: Swift.String? -} - -extension CreateHostedZoneInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case delegationSetId = "DelegationSetId" - case hostedZoneConfig = "HostedZoneConfig" - case name = "Name" - case vpc = "VPC" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let vpcDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.VPC.self, forKey: .vpc) - vpc = vpcDecoded - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let hostedZoneConfigDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HostedZoneConfig.self, forKey: .hostedZoneConfig) - hostedZoneConfig = hostedZoneConfigDecoded - let delegationSetIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .delegationSetId) - delegationSetId = delegationSetIdDecoded - } -} +extension CreateHostedZoneOutput { -extension CreateHostedZoneOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateHostedZoneOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - self.delegationSet = output.delegationSet - self.hostedZone = output.hostedZone - self.vpc = output.vpc - } else { - self.changeInfo = nil - self.delegationSet = nil - self.hostedZone = nil - self.vpc = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateHostedZoneOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + value.delegationSet = try reader["DelegationSet"].readIfPresent(readingClosure: Route53ClientTypes.DelegationSet.readingClosure) + value.hostedZone = try reader["HostedZone"].readIfPresent(readingClosure: Route53ClientTypes.HostedZone.readingClosure) + value.vpc = try reader["VPC"].readIfPresent(readingClosure: Route53ClientTypes.VPC.readingClosure) + return value } } } @@ -2671,68 +2232,37 @@ public struct CreateHostedZoneOutput: Swift.Equatable { } } -struct CreateHostedZoneOutputBody: Swift.Equatable { - let hostedZone: Route53ClientTypes.HostedZone? - let changeInfo: Route53ClientTypes.ChangeInfo? - let delegationSet: Route53ClientTypes.DelegationSet? - let vpc: Route53ClientTypes.VPC? -} - -extension CreateHostedZoneOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - case delegationSet = "DelegationSet" - case hostedZone = "HostedZone" - case vpc = "VPC" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HostedZone.self, forKey: .hostedZone) - hostedZone = hostedZoneDecoded - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - let delegationSetDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.DelegationSet.self, forKey: .delegationSet) - delegationSet = delegationSetDecoded - let vpcDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.VPC.self, forKey: .vpc) - vpc = vpcDecoded - } -} - -enum CreateHostedZoneOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConflictingDomainExists": return try await ConflictingDomainExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DelegationSetNotAvailable": return try await DelegationSetNotAvailable(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DelegationSetNotReusable": return try await DelegationSetNotReusable(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HostedZoneAlreadyExists": return try await HostedZoneAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDomainName": return try await InvalidDomainName(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCId": return try await InvalidVPCId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDelegationSet": return try await NoSuchDelegationSet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyHostedZones": return try await TooManyHostedZones(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateHostedZoneOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConflictingDomainExists": return try await ConflictingDomainExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DelegationSetNotAvailable": return try await DelegationSetNotAvailable.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DelegationSetNotReusable": return try await DelegationSetNotReusable.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "HostedZoneAlreadyExists": return try await HostedZoneAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDomainName": return try await InvalidDomainName.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidVPCId": return try await InvalidVPCId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDelegationSet": return try await NoSuchDelegationSet.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyHostedZones": return try await TooManyHostedZones.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateKeySigningKeyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case hostedZoneId = "HostedZoneId" - case keyManagementServiceArn = "KeyManagementServiceArn" - case name = "Name" - case status = "Status" - } - static func writingClosure(_ value: CreateKeySigningKeyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("HostedZoneId")].write(value.hostedZoneId) - try writer[.init("KeyManagementServiceArn")].write(value.keyManagementServiceArn) - try writer[.init("Name")].write(value.name) - try writer[.init("Status")].write(value.status) + try writer["CallerReference"].write(value.callerReference) + try writer["HostedZoneId"].write(value.hostedZoneId) + try writer["KeyManagementServiceArn"].write(value.keyManagementServiceArn) + try writer["Name"].write(value.name) + try writer["Status"].write(value.status) } } @@ -2790,53 +2320,19 @@ public struct CreateKeySigningKeyInput: Swift.Equatable { } } -struct CreateKeySigningKeyInputBody: Swift.Equatable { - let callerReference: Swift.String? - let hostedZoneId: Swift.String? - let keyManagementServiceArn: Swift.String? - let name: Swift.String? - let status: Swift.String? -} - -extension CreateKeySigningKeyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case hostedZoneId = "HostedZoneId" - case keyManagementServiceArn = "KeyManagementServiceArn" - case name = "Name" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let keyManagementServiceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyManagementServiceArn) - keyManagementServiceArn = keyManagementServiceArnDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - } -} +extension CreateKeySigningKeyOutput { -extension CreateKeySigningKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateKeySigningKeyOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - self.keySigningKey = output.keySigningKey - } else { - self.changeInfo = nil - self.keySigningKey = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateKeySigningKeyOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + value.keySigningKey = try reader["KeySigningKey"].readIfPresent(readingClosure: Route53ClientTypes.KeySigningKey.readingClosure) + return value } } } @@ -2864,55 +2360,35 @@ public struct CreateKeySigningKeyOutput: Swift.Equatable { } } -struct CreateKeySigningKeyOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? - let keySigningKey: Route53ClientTypes.KeySigningKey? -} - -extension CreateKeySigningKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - case keySigningKey = "KeySigningKey" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - let keySigningKeyDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.KeySigningKey.self, forKey: .keySigningKey) - keySigningKey = keySigningKeyDecoded - } -} - -enum CreateKeySigningKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKeySigningKeyName": return try await InvalidKeySigningKeyName(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSArn": return try await InvalidKMSArn(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSigningStatus": return try await InvalidSigningStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KeySigningKeyAlreadyExists": return try await KeySigningKeyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyKeySigningKeys": return try await TooManyKeySigningKeys(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateKeySigningKeyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKeySigningKeyName": return try await InvalidKeySigningKeyName.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKMSArn": return try await InvalidKMSArn.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidSigningStatus": return try await InvalidSigningStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "KeySigningKeyAlreadyExists": return try await KeySigningKeyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyKeySigningKeys": return try await TooManyKeySigningKeys.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateQueryLoggingConfigInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudWatchLogsLogGroupArn = "CloudWatchLogsLogGroupArn" - case hostedZoneId = "HostedZoneId" - } - static func writingClosure(_ value: CreateQueryLoggingConfigInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CloudWatchLogsLogGroupArn")].write(value.cloudWatchLogsLogGroupArn) - try writer[.init("HostedZoneId")].write(value.hostedZoneId) + try writer["CloudWatchLogsLogGroupArn"].write(value.cloudWatchLogsLogGroupArn) + try writer["HostedZoneId"].write(value.hostedZoneId) } } @@ -2941,42 +2417,21 @@ public struct CreateQueryLoggingConfigInput: Swift.Equatable { } } -struct CreateQueryLoggingConfigInputBody: Swift.Equatable { - let hostedZoneId: Swift.String? - let cloudWatchLogsLogGroupArn: Swift.String? -} +extension CreateQueryLoggingConfigOutput { -extension CreateQueryLoggingConfigInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudWatchLogsLogGroupArn = "CloudWatchLogsLogGroupArn" - case hostedZoneId = "HostedZoneId" + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateQueryLoggingConfigOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.queryLoggingConfig = try reader["QueryLoggingConfig"].readIfPresent(readingClosure: Route53ClientTypes.QueryLoggingConfig.readingClosure) + return value + } } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let cloudWatchLogsLogGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloudWatchLogsLogGroupArn) - cloudWatchLogsLogGroupArn = cloudWatchLogsLogGroupArnDecoded - } -} - -extension CreateQueryLoggingConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateQueryLoggingConfigOutputBody = try responseDecoder.decode(responseBody: data) - self.queryLoggingConfig = output.queryLoggingConfig - } else { - self.queryLoggingConfig = nil - } - } -} +} public struct CreateQueryLoggingConfigOutput: Swift.Equatable { /// The unique URL representing the new query logging configuration. @@ -2996,47 +2451,31 @@ public struct CreateQueryLoggingConfigOutput: Swift.Equatable { } } -struct CreateQueryLoggingConfigOutputBody: Swift.Equatable { - let queryLoggingConfig: Route53ClientTypes.QueryLoggingConfig? -} - -extension CreateQueryLoggingConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case queryLoggingConfig = "QueryLoggingConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let queryLoggingConfigDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.QueryLoggingConfig.self, forKey: .queryLoggingConfig) - queryLoggingConfig = queryLoggingConfigDecoded - } -} +enum CreateQueryLoggingConfigOutputError { -enum CreateQueryLoggingConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InsufficientCloudWatchLogsResourcePolicy": return try await InsufficientCloudWatchLogsResourcePolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCloudWatchLogsLogGroup": return try await NoSuchCloudWatchLogsLogGroup(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "QueryLoggingConfigAlreadyExists": return try await QueryLoggingConfigAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InsufficientCloudWatchLogsResourcePolicy": return try await InsufficientCloudWatchLogsResourcePolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCloudWatchLogsLogGroup": return try await NoSuchCloudWatchLogsLogGroup.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "QueryLoggingConfigAlreadyExists": return try await QueryLoggingConfigAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateReusableDelegationSetInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case hostedZoneId = "HostedZoneId" - } - static func writingClosure(_ value: CreateReusableDelegationSetInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("HostedZoneId")].write(value.hostedZoneId) + try writer["CallerReference"].write(value.callerReference) + try writer["HostedZoneId"].write(value.hostedZoneId) } } @@ -3064,39 +2503,18 @@ public struct CreateReusableDelegationSetInput: Swift.Equatable { } } -struct CreateReusableDelegationSetInputBody: Swift.Equatable { - let callerReference: Swift.String? - let hostedZoneId: Swift.String? -} - -extension CreateReusableDelegationSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case hostedZoneId = "HostedZoneId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - } -} +extension CreateReusableDelegationSetOutput { -extension CreateReusableDelegationSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateReusableDelegationSetOutputBody = try responseDecoder.decode(responseBody: data) - self.delegationSet = output.delegationSet - } else { - self.delegationSet = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateReusableDelegationSetOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.delegationSet = try reader["DelegationSet"].readIfPresent(readingClosure: Route53ClientTypes.DelegationSet.readingClosure) + return value } } } @@ -3119,50 +2537,33 @@ public struct CreateReusableDelegationSetOutput: Swift.Equatable { } } -struct CreateReusableDelegationSetOutputBody: Swift.Equatable { - let delegationSet: Route53ClientTypes.DelegationSet? -} - -extension CreateReusableDelegationSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delegationSet = "DelegationSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let delegationSetDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.DelegationSet.self, forKey: .delegationSet) - delegationSet = delegationSetDecoded - } -} +enum CreateReusableDelegationSetOutputError { -enum CreateReusableDelegationSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DelegationSetAlreadyCreated": return try await DelegationSetAlreadyCreated(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DelegationSetAlreadyReusable": return try await DelegationSetAlreadyReusable(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DelegationSetNotAvailable": return try await DelegationSetNotAvailable(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HostedZoneNotFound": return try await HostedZoneNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitsExceeded": return try await LimitsExceeded(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "DelegationSetAlreadyCreated": return try await DelegationSetAlreadyCreated.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DelegationSetAlreadyReusable": return try await DelegationSetAlreadyReusable.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DelegationSetNotAvailable": return try await DelegationSetNotAvailable.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "HostedZoneNotFound": return try await HostedZoneNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "LimitsExceeded": return try await LimitsExceeded.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateTrafficPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case document = "Document" - case name = "Name" - } - static func writingClosure(_ value: CreateTrafficPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("Document")].write(value.document) - try writer[.init("Name")].write(value.name) + try writer["Comment"].write(value.comment) + try writer["Document"].write(value.document) + try writer["Name"].write(value.name) } } @@ -3196,46 +2597,14 @@ public struct CreateTrafficPolicyInput: Swift.Equatable { } } -struct CreateTrafficPolicyInputBody: Swift.Equatable { - let name: Swift.String? - let document: Swift.String? - let comment: Swift.String? -} - -extension CreateTrafficPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case document = "Document" - case name = "Name" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let documentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .document) - document = documentDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - } -} - extension CreateTrafficPolicyInstanceInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneId = "HostedZoneId" - case name = "Name" - case ttl = "TTL" - case trafficPolicyId = "TrafficPolicyId" - case trafficPolicyVersion = "TrafficPolicyVersion" - } - static func writingClosure(_ value: CreateTrafficPolicyInstanceInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HostedZoneId")].write(value.hostedZoneId) - try writer[.init("Name")].write(value.name) - try writer[.init("TTL")].write(value.ttl) - try writer[.init("TrafficPolicyId")].write(value.trafficPolicyId) - try writer[.init("TrafficPolicyVersion")].write(value.trafficPolicyVersion) + try writer["HostedZoneId"].write(value.hostedZoneId) + try writer["Name"].write(value.name) + try writer["TTL"].write(value.ttl) + try writer["TrafficPolicyId"].write(value.trafficPolicyId) + try writer["TrafficPolicyVersion"].write(value.trafficPolicyVersion) } } @@ -3280,51 +2649,18 @@ public struct CreateTrafficPolicyInstanceInput: Swift.Equatable { } } -struct CreateTrafficPolicyInstanceInputBody: Swift.Equatable { - let hostedZoneId: Swift.String? - let name: Swift.String? - let ttl: Swift.Int? - let trafficPolicyId: Swift.String? - let trafficPolicyVersion: Swift.Int? -} - -extension CreateTrafficPolicyInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneId = "HostedZoneId" - case name = "Name" - case ttl = "TTL" - case trafficPolicyId = "TrafficPolicyId" - case trafficPolicyVersion = "TrafficPolicyVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let ttlDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ttl) - ttl = ttlDecoded - let trafficPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyId) - trafficPolicyId = trafficPolicyIdDecoded - let trafficPolicyVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .trafficPolicyVersion) - trafficPolicyVersion = trafficPolicyVersionDecoded - } -} +extension CreateTrafficPolicyInstanceOutput { -extension CreateTrafficPolicyInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTrafficPolicyInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficPolicyInstance = output.trafficPolicyInstance - } else { - self.trafficPolicyInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTrafficPolicyInstanceOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.trafficPolicyInstance = try reader["TrafficPolicyInstance"].readIfPresent(readingClosure: Route53ClientTypes.TrafficPolicyInstance.readingClosure) + return value } } } @@ -3348,49 +2684,37 @@ public struct CreateTrafficPolicyInstanceOutput: Swift.Equatable { } } -struct CreateTrafficPolicyInstanceOutputBody: Swift.Equatable { - let trafficPolicyInstance: Route53ClientTypes.TrafficPolicyInstance? -} - -extension CreateTrafficPolicyInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficPolicyInstance = "TrafficPolicyInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficPolicyInstanceDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.TrafficPolicyInstance.self, forKey: .trafficPolicyInstance) - trafficPolicyInstance = trafficPolicyInstanceDecoded - } -} +enum CreateTrafficPolicyInstanceOutputError { -enum CreateTrafficPolicyInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrafficPolicyInstances": return try await TooManyTrafficPolicyInstances(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrafficPolicyInstanceAlreadyExists": return try await TrafficPolicyInstanceAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrafficPolicyInstances": return try await TooManyTrafficPolicyInstances.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrafficPolicyInstanceAlreadyExists": return try await TrafficPolicyInstanceAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension CreateTrafficPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTrafficPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficPolicy = output.trafficPolicy - } else { - self.trafficPolicy = nil +extension CreateTrafficPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTrafficPolicyOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.trafficPolicy = try reader["TrafficPolicy"].readIfPresent(readingClosure: Route53ClientTypes.TrafficPolicy.readingClosure) + return value } } } @@ -3414,45 +2738,29 @@ public struct CreateTrafficPolicyOutput: Swift.Equatable { } } -struct CreateTrafficPolicyOutputBody: Swift.Equatable { - let trafficPolicy: Route53ClientTypes.TrafficPolicy? -} - -extension CreateTrafficPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficPolicy = "TrafficPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficPolicyDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.TrafficPolicy.self, forKey: .trafficPolicy) - trafficPolicy = trafficPolicyDecoded - } -} +enum CreateTrafficPolicyOutputError { -enum CreateTrafficPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTrafficPolicyDocument": return try await InvalidTrafficPolicyDocument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrafficPolicies": return try await TooManyTrafficPolicies(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrafficPolicyAlreadyExists": return try await TrafficPolicyAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTrafficPolicyDocument": return try await InvalidTrafficPolicyDocument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrafficPolicies": return try await TooManyTrafficPolicies.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrafficPolicyAlreadyExists": return try await TrafficPolicyAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateTrafficPolicyVersionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case document = "Document" - } - static func writingClosure(_ value: CreateTrafficPolicyVersionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("Document")].write(value.document) + try writer["Comment"].write(value.comment) + try writer["Document"].write(value.document) } } @@ -3489,39 +2797,18 @@ public struct CreateTrafficPolicyVersionInput: Swift.Equatable { } } -struct CreateTrafficPolicyVersionInputBody: Swift.Equatable { - let document: Swift.String? - let comment: Swift.String? -} - -extension CreateTrafficPolicyVersionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case document = "Document" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let documentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .document) - document = documentDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - } -} +extension CreateTrafficPolicyVersionOutput { -extension CreateTrafficPolicyVersionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTrafficPolicyVersionOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficPolicy = output.trafficPolicy - } else { - self.trafficPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateTrafficPolicyVersionOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.trafficPolicy = try reader["TrafficPolicy"].readIfPresent(readingClosure: Route53ClientTypes.TrafficPolicy.readingClosure) + return value } } } @@ -3545,44 +2832,29 @@ public struct CreateTrafficPolicyVersionOutput: Swift.Equatable { } } -struct CreateTrafficPolicyVersionOutputBody: Swift.Equatable { - let trafficPolicy: Route53ClientTypes.TrafficPolicy? -} - -extension CreateTrafficPolicyVersionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficPolicy = "TrafficPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficPolicyDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.TrafficPolicy.self, forKey: .trafficPolicy) - trafficPolicy = trafficPolicyDecoded - } -} +enum CreateTrafficPolicyVersionOutputError { -enum CreateTrafficPolicyVersionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTrafficPolicyDocument": return try await InvalidTrafficPolicyDocument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTrafficPolicyVersionsForCurrentPolicy": return try await TooManyTrafficPolicyVersionsForCurrentPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidTrafficPolicyDocument": return try await InvalidTrafficPolicyDocument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTrafficPolicyVersionsForCurrentPolicy": return try await TooManyTrafficPolicyVersionsForCurrentPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateVPCAssociationAuthorizationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpc = "VPC" - } - static func writingClosure(_ value: CreateVPCAssociationAuthorizationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("VPC")].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) + try writer["VPC"].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) } } @@ -3640,32 +2912,16 @@ public struct CreateVPCAssociationAuthorizationInput: Swift.Equatable { } } -struct CreateVPCAssociationAuthorizationInputBody: Swift.Equatable { - let vpc: Route53ClientTypes.VPC? -} - -extension CreateVPCAssociationAuthorizationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpc = "VPC" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.VPC.self, forKey: .vpc) - vpc = vpcDecoded - } -} +extension CreateVPCAssociationAuthorizationOutput { -extension CreateVPCAssociationAuthorizationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateVPCAssociationAuthorizationOutputBody = try responseDecoder.decode(responseBody: data) - self.hostedZoneId = output.hostedZoneId - self.vpc = output.vpc - } else { - self.hostedZoneId = nil - self.vpc = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateVPCAssociationAuthorizationOutput() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.vpc = try reader["VPC"].readIfPresent(readingClosure: Route53ClientTypes.VPC.readingClosure) + return value } } } @@ -3689,51 +2945,46 @@ public struct CreateVPCAssociationAuthorizationOutput: Swift.Equatable { } } -struct CreateVPCAssociationAuthorizationOutputBody: Swift.Equatable { - let hostedZoneId: Swift.String? - let vpc: Route53ClientTypes.VPC? -} - -extension CreateVPCAssociationAuthorizationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneId = "HostedZoneId" - case vpc = "VPC" - } +enum CreateVPCAssociationAuthorizationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let vpcDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.VPC.self, forKey: .vpc) - vpc = vpcDecoded + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidVPCId": return try await InvalidVPCId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyVPCAssociationAuthorizations": return try await TooManyVPCAssociationAuthorizations.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } + } } } -enum CreateVPCAssociationAuthorizationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCId": return try await InvalidVPCId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyVPCAssociationAuthorizations": return try await TooManyVPCAssociationAuthorizations(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +extension DNSSECNotFound { + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DNSSECNotFound() + value.properties.message = try reader["message"].readIfPresent() + return value } } } extension DNSSECNotFound { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DNSSECNotFound() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3761,40 +3012,22 @@ public struct DNSSECNotFound: ClientRuntime.ModeledError, AWSClientRuntime.AWSSe } } -struct DNSSECNotFoundBody: Swift.Equatable { - let message: Swift.String? -} - -extension DNSSECNotFoundBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.DNSSECStatus: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serveSignature = "ServeSignature" - case statusMessage = "StatusMessage" - } +extension Route53ClientTypes.DNSSECStatus { static func writingClosure(_ value: Route53ClientTypes.DNSSECStatus?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ServeSignature")].write(value.serveSignature) - try writer[.init("StatusMessage")].write(value.statusMessage) + try writer["ServeSignature"].write(value.serveSignature) + try writer["StatusMessage"].write(value.statusMessage) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serveSignatureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serveSignature) - serveSignature = serveSignatureDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.DNSSECStatus() + value.serveSignature = try reader["ServeSignature"].readIfPresent() + value.statusMessage = try reader["StatusMessage"].readIfPresent() + return value + } } } @@ -3874,14 +3107,15 @@ public struct DeactivateKeySigningKeyInput: Swift.Equatable { } } -extension DeactivateKeySigningKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeactivateKeySigningKeyOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil +extension DeactivateKeySigningKeyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeactivateKeySigningKeyOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -3899,76 +3133,44 @@ public struct DeactivateKeySigningKeyOutput: Swift.Equatable { } } -struct DeactivateKeySigningKeyOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension DeactivateKeySigningKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} +enum DeactivateKeySigningKeyOutputError { -enum DeactivateKeySigningKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSigningStatus": return try await InvalidSigningStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KeySigningKeyInParentDSRecord": return try await KeySigningKeyInParentDSRecord(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KeySigningKeyInUse": return try await KeySigningKeyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchKeySigningKey": return try await NoSuchKeySigningKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidSigningStatus": return try await InvalidSigningStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "KeySigningKeyInParentDSRecord": return try await KeySigningKeyInParentDSRecord.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "KeySigningKeyInUse": return try await KeySigningKeyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchKeySigningKey": return try await NoSuchKeySigningKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.DelegationSet: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case id = "Id" - case nameServers = "NameServers" - } +extension Route53ClientTypes.DelegationSet { static func writingClosure(_ value: Route53ClientTypes.DelegationSet?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Id")].write(value.id) - try writer[.init("NameServers")].writeList(value.nameServers, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("NameServer"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - if containerValues.contains(.nameServers) { - struct KeyVal0{struct NameServer{}} - let nameServersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .nameServers) - if let nameServersWrappedContainer = nameServersWrappedContainer { - let nameServersContainer = try nameServersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var nameServersBuffer:[Swift.String]? = nil - if let nameServersContainer = nameServersContainer { - nameServersBuffer = [Swift.String]() - for stringContainer0 in nameServersContainer { - nameServersBuffer?.append(stringContainer0) - } - } - nameServers = nameServersBuffer - } else { - nameServers = [] - } - } else { - nameServers = nil + try writer["CallerReference"].write(value.callerReference) + try writer["Id"].write(value.id) + try writer["NameServers"].writeList(value.nameServers, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "NameServer", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.DelegationSet() + value.id = try reader["Id"].readIfPresent() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.nameServers = try reader["NameServers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "NameServer", isFlattened: false) + return value } } } @@ -3999,16 +3201,26 @@ extension Route53ClientTypes { } extension DelegationSetAlreadyCreated { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DelegationSetAlreadyCreated() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension DelegationSetAlreadyCreated { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DelegationSetAlreadyCreated() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4037,33 +3249,27 @@ public struct DelegationSetAlreadyCreated: ClientRuntime.ModeledError, AWSClient } } -struct DelegationSetAlreadyCreatedBody: Swift.Equatable { - let message: Swift.String? -} - -extension DelegationSetAlreadyCreatedBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension DelegationSetAlreadyReusable { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DelegationSetAlreadyReusable() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension DelegationSetAlreadyReusable { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DelegationSetAlreadyReusable() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4092,33 +3298,27 @@ public struct DelegationSetAlreadyReusable: ClientRuntime.ModeledError, AWSClien } } -struct DelegationSetAlreadyReusableBody: Swift.Equatable { - let message: Swift.String? -} - -extension DelegationSetAlreadyReusableBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension DelegationSetInUse { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DelegationSetInUse() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension DelegationSetInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DelegationSetInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4147,33 +3347,27 @@ public struct DelegationSetInUse: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct DelegationSetInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension DelegationSetInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension DelegationSetNotAvailable { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DelegationSetNotAvailable() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension DelegationSetNotAvailable { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DelegationSetNotAvailable() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4202,33 +3396,27 @@ public struct DelegationSetNotAvailable: ClientRuntime.ModeledError, AWSClientRu } } -struct DelegationSetNotAvailableBody: Swift.Equatable { - let message: Swift.String? -} - -extension DelegationSetNotAvailableBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension DelegationSetNotReusable { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = DelegationSetNotReusable() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension DelegationSetNotReusable { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = DelegationSetNotReusable() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4257,22 +3445,6 @@ public struct DelegationSetNotReusable: ClientRuntime.ModeledError, AWSClientRun } } -struct DelegationSetNotReusableBody: Swift.Equatable { - let message: Swift.String? -} - -extension DelegationSetNotReusableBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension DeleteCidrCollectionInput { static func urlPathProvider(_ value: DeleteCidrCollectionInput) -> Swift.String? { @@ -4296,8 +3468,12 @@ public struct DeleteCidrCollectionInput: Swift.Equatable { } } -extension DeleteCidrCollectionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteCidrCollectionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCidrCollectionOutput() + } } } @@ -4306,15 +3482,20 @@ public struct DeleteCidrCollectionOutput: Swift.Equatable { public init() { } } -enum DeleteCidrCollectionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CidrCollectionInUseException": return try await CidrCollectionInUseException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCidrCollectionException": return try await NoSuchCidrCollectionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteCidrCollectionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "CidrCollectionInUseException": return try await CidrCollectionInUseException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCidrCollectionException": return try await NoSuchCidrCollectionException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4343,8 +3524,12 @@ public struct DeleteHealthCheckInput: Swift.Equatable { } } -extension DeleteHealthCheckOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteHealthCheckOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteHealthCheckOutput() + } } } @@ -4354,14 +3539,19 @@ public struct DeleteHealthCheckOutput: Swift.Equatable { public init() { } } -enum DeleteHealthCheckOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HealthCheckInUse": return try await HealthCheckInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteHealthCheckOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "HealthCheckInUse": return try await HealthCheckInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4390,14 +3580,15 @@ public struct DeleteHostedZoneInput: Swift.Equatable { } } -extension DeleteHostedZoneOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteHostedZoneOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil +extension DeleteHostedZoneOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteHostedZoneOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -4416,32 +3607,21 @@ public struct DeleteHostedZoneOutput: Swift.Equatable { } } -struct DeleteHostedZoneOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension DeleteHostedZoneOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} +enum DeleteHostedZoneOutputError { -enum DeleteHostedZoneOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HostedZoneNotEmpty": return try await HostedZoneNotEmpty(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDomainName": return try await InvalidDomainName(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "HostedZoneNotEmpty": return try await HostedZoneNotEmpty.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidDomainName": return try await InvalidDomainName.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4502,14 +3682,15 @@ public struct DeleteKeySigningKeyInput: Swift.Equatable { } } -extension DeleteKeySigningKeyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteKeySigningKeyOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil +extension DeleteKeySigningKeyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteKeySigningKeyOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -4527,33 +3708,22 @@ public struct DeleteKeySigningKeyOutput: Swift.Equatable { } } -struct DeleteKeySigningKeyOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension DeleteKeySigningKeyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} +enum DeleteKeySigningKeyOutputError { -enum DeleteKeySigningKeyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSArn": return try await InvalidKMSArn(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSigningStatus": return try await InvalidSigningStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchKeySigningKey": return try await NoSuchKeySigningKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKMSArn": return try await InvalidKMSArn.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidSigningStatus": return try await InvalidSigningStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchKeySigningKey": return try await NoSuchKeySigningKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4581,8 +3751,12 @@ public struct DeleteQueryLoggingConfigInput: Swift.Equatable { } } -extension DeleteQueryLoggingConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteQueryLoggingConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteQueryLoggingConfigOutput() + } } } @@ -4591,14 +3765,19 @@ public struct DeleteQueryLoggingConfigOutput: Swift.Equatable { public init() { } } -enum DeleteQueryLoggingConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchQueryLoggingConfig": return try await NoSuchQueryLoggingConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteQueryLoggingConfigOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchQueryLoggingConfig": return try await NoSuchQueryLoggingConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4627,8 +3806,12 @@ public struct DeleteReusableDelegationSetInput: Swift.Equatable { } } -extension DeleteReusableDelegationSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteReusableDelegationSetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteReusableDelegationSetOutput() + } } } @@ -4638,15 +3821,20 @@ public struct DeleteReusableDelegationSetOutput: Swift.Equatable { public init() { } } -enum DeleteReusableDelegationSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DelegationSetInUse": return try await DelegationSetInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DelegationSetNotReusable": return try await DelegationSetNotReusable(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDelegationSet": return try await NoSuchDelegationSet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteReusableDelegationSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "DelegationSetInUse": return try await DelegationSetInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DelegationSetNotReusable": return try await DelegationSetNotReusable.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDelegationSet": return try await NoSuchDelegationSet.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4707,8 +3895,12 @@ public struct DeleteTrafficPolicyInstanceInput: Swift.Equatable { } } -extension DeleteTrafficPolicyInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteTrafficPolicyInstanceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTrafficPolicyInstanceOutput() + } } } @@ -4718,20 +3910,29 @@ public struct DeleteTrafficPolicyInstanceOutput: Swift.Equatable { public init() { } } -enum DeleteTrafficPolicyInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteTrafficPolicyInstanceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension DeleteTrafficPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteTrafficPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTrafficPolicyOutput() + } } } @@ -4741,27 +3942,28 @@ public struct DeleteTrafficPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteTrafficPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrafficPolicyInUse": return try await TrafficPolicyInUse(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteTrafficPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TrafficPolicyInUse": return try await TrafficPolicyInUse.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension DeleteVPCAssociationAuthorizationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpc = "VPC" - } - static func writingClosure(_ value: DeleteVPCAssociationAuthorizationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("VPC")].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) + try writer["VPC"].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) } } @@ -4819,24 +4021,12 @@ public struct DeleteVPCAssociationAuthorizationInput: Swift.Equatable { } } -struct DeleteVPCAssociationAuthorizationInputBody: Swift.Equatable { - let vpc: Route53ClientTypes.VPC? -} - -extension DeleteVPCAssociationAuthorizationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpc = "VPC" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.VPC.self, forKey: .vpc) - vpc = vpcDecoded - } -} +extension DeleteVPCAssociationAuthorizationOutput { -extension DeleteVPCAssociationAuthorizationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteVPCAssociationAuthorizationOutput() + } } } @@ -4846,38 +4036,41 @@ public struct DeleteVPCAssociationAuthorizationOutput: Swift.Equatable { public init() { } } -enum DeleteVPCAssociationAuthorizationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCId": return try await InvalidVPCId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "VPCAssociationAuthorizationNotFound": return try await VPCAssociationAuthorizationNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteVPCAssociationAuthorizationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidVPCId": return try await InvalidVPCId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "VPCAssociationAuthorizationNotFound": return try await VPCAssociationAuthorizationNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.Dimension: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case value = "Value" - } +extension Route53ClientTypes.Dimension { static func writingClosure(_ value: Route53ClientTypes.Dimension?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) - try writer[.init("Value")].write(value.value) + try writer["Name"].write(value.name) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.Dimension() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -4951,14 +4144,15 @@ public struct DisableHostedZoneDNSSECInput: Swift.Equatable { } } -extension DisableHostedZoneDNSSECOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisableHostedZoneDNSSECOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil +extension DisableHostedZoneDNSSECOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisableHostedZoneDNSSECOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -4976,49 +4170,33 @@ public struct DisableHostedZoneDNSSECOutput: Swift.Equatable { } } -struct DisableHostedZoneDNSSECOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension DisableHostedZoneDNSSECOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} - -enum DisableHostedZoneDNSSECOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DNSSECNotFound": return try await DNSSECNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSArn": return try await InvalidKMSArn(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KeySigningKeyInParentDSRecord": return try await KeySigningKeyInParentDSRecord(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DisableHostedZoneDNSSECOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DNSSECNotFound": return try await DNSSECNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKMSArn": return try await InvalidKMSArn.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "KeySigningKeyInParentDSRecord": return try await KeySigningKeyInParentDSRecord.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension DisassociateVPCFromHostedZoneInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case vpc = "VPC" - } - static func writingClosure(_ value: DisassociateVPCFromHostedZoneInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("VPC")].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) + try writer["Comment"].write(value.comment) + try writer["VPC"].write(value.vpc, writingClosure: Route53ClientTypes.VPC.writingClosure(_:to:)) } } @@ -5080,34 +4258,15 @@ public struct DisassociateVPCFromHostedZoneInput: Swift.Equatable { } } -struct DisassociateVPCFromHostedZoneInputBody: Swift.Equatable { - let vpc: Route53ClientTypes.VPC? - let comment: Swift.String? -} - -extension DisassociateVPCFromHostedZoneInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case vpc = "VPC" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.VPC.self, forKey: .vpc) - vpc = vpcDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - } -} +extension DisassociateVPCFromHostedZoneOutput { -extension DisassociateVPCFromHostedZoneOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DisassociateVPCFromHostedZoneOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DisassociateVPCFromHostedZoneOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -5126,32 +4285,21 @@ public struct DisassociateVPCFromHostedZoneOutput: Swift.Equatable { } } -struct DisassociateVPCFromHostedZoneOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension DisassociateVPCFromHostedZoneOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} +enum DisassociateVPCFromHostedZoneOutputError { -enum DisassociateVPCFromHostedZoneOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidVPCId": return try await InvalidVPCId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LastVPCAssociation": return try await LastVPCAssociation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "VPCAssociationNotFound": return try await VPCAssociationNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidVPCId": return try await InvalidVPCId.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "LastVPCAssociation": return try await LastVPCAssociation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "VPCAssociationNotFound": return try await VPCAssociationNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5204,14 +4352,15 @@ public struct EnableHostedZoneDNSSECInput: Swift.Equatable { } } -extension EnableHostedZoneDNSSECOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: EnableHostedZoneDNSSECOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil +extension EnableHostedZoneDNSSECOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = EnableHostedZoneDNSSECOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -5229,62 +4378,47 @@ public struct EnableHostedZoneDNSSECOutput: Swift.Equatable { } } -struct EnableHostedZoneDNSSECOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} - -extension EnableHostedZoneDNSSECOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} - -enum EnableHostedZoneDNSSECOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "DNSSECNotFound": return try await DNSSECNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "HostedZonePartiallyDelegated": return try await HostedZonePartiallyDelegated(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidKMSArn": return try await InvalidKMSArn(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KeySigningKeyWithActiveStatusNotFound": return try await KeySigningKeyWithActiveStatusNotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum EnableHostedZoneDNSSECOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "DNSSECNotFound": return try await DNSSECNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "HostedZonePartiallyDelegated": return try await HostedZonePartiallyDelegated.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKeySigningKeyStatus": return try await InvalidKeySigningKeyStatus.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidKMSArn": return try await InvalidKMSArn.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "KeySigningKeyWithActiveStatusNotFound": return try await KeySigningKeyWithActiveStatusNotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.GeoLocation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continentCode = "ContinentCode" - case countryCode = "CountryCode" - case subdivisionCode = "SubdivisionCode" - } +extension Route53ClientTypes.GeoLocation { static func writingClosure(_ value: Route53ClientTypes.GeoLocation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContinentCode")].write(value.continentCode) - try writer[.init("CountryCode")].write(value.countryCode) - try writer[.init("SubdivisionCode")].write(value.subdivisionCode) + try writer["ContinentCode"].write(value.continentCode) + try writer["CountryCode"].write(value.countryCode) + try writer["SubdivisionCode"].write(value.subdivisionCode) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continentCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continentCode) - continentCode = continentCodeDecoded - let countryCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .countryCode) - countryCode = countryCodeDecoded - let subdivisionCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subdivisionCode) - subdivisionCode = subdivisionCodeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.GeoLocation() + value.continentCode = try reader["ContinentCode"].readIfPresent() + value.countryCode = try reader["CountryCode"].readIfPresent() + value.subdivisionCode = try reader["SubdivisionCode"].readIfPresent() + return value + } } } @@ -5329,40 +4463,30 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.GeoLocationDetails: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continentCode = "ContinentCode" - case continentName = "ContinentName" - case countryCode = "CountryCode" - case countryName = "CountryName" - case subdivisionCode = "SubdivisionCode" - case subdivisionName = "SubdivisionName" - } +extension Route53ClientTypes.GeoLocationDetails { static func writingClosure(_ value: Route53ClientTypes.GeoLocationDetails?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ContinentCode")].write(value.continentCode) - try writer[.init("ContinentName")].write(value.continentName) - try writer[.init("CountryCode")].write(value.countryCode) - try writer[.init("CountryName")].write(value.countryName) - try writer[.init("SubdivisionCode")].write(value.subdivisionCode) - try writer[.init("SubdivisionName")].write(value.subdivisionName) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continentCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continentCode) - continentCode = continentCodeDecoded - let continentNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continentName) - continentName = continentNameDecoded - let countryCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .countryCode) - countryCode = countryCodeDecoded - let countryNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .countryName) - countryName = countryNameDecoded - let subdivisionCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subdivisionCode) - subdivisionCode = subdivisionCodeDecoded - let subdivisionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subdivisionName) - subdivisionName = subdivisionNameDecoded + try writer["ContinentCode"].write(value.continentCode) + try writer["ContinentName"].write(value.continentName) + try writer["CountryCode"].write(value.countryCode) + try writer["CountryName"].write(value.countryName) + try writer["SubdivisionCode"].write(value.subdivisionCode) + try writer["SubdivisionName"].write(value.subdivisionName) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.GeoLocationDetails() + value.continentCode = try reader["ContinentCode"].readIfPresent() + value.continentName = try reader["ContinentName"].readIfPresent() + value.countryCode = try reader["CountryCode"].readIfPresent() + value.countryName = try reader["CountryName"].readIfPresent() + value.subdivisionCode = try reader["SubdivisionCode"].readIfPresent() + value.subdivisionName = try reader["SubdivisionName"].readIfPresent() + return value + } } } @@ -5402,32 +4526,26 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.GeoProximityLocation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case awsRegion = "AWSRegion" - case bias = "Bias" - case coordinates = "Coordinates" - case localZoneGroup = "LocalZoneGroup" - } +extension Route53ClientTypes.GeoProximityLocation { static func writingClosure(_ value: Route53ClientTypes.GeoProximityLocation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AWSRegion")].write(value.awsRegion) - try writer[.init("Bias")].write(value.bias) - try writer[.init("Coordinates")].write(value.coordinates, writingClosure: Route53ClientTypes.Coordinates.writingClosure(_:to:)) - try writer[.init("LocalZoneGroup")].write(value.localZoneGroup) + try writer["AWSRegion"].write(value.awsRegion) + try writer["Bias"].write(value.bias) + try writer["Coordinates"].write(value.coordinates, writingClosure: Route53ClientTypes.Coordinates.writingClosure(_:to:)) + try writer["LocalZoneGroup"].write(value.localZoneGroup) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let awsRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .awsRegion) - awsRegion = awsRegionDecoded - let localZoneGroupDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .localZoneGroup) - localZoneGroup = localZoneGroupDecoded - let coordinatesDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.Coordinates.self, forKey: .coordinates) - coordinates = coordinatesDecoded - let biasDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bias) - bias = biasDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.GeoProximityLocation() + value.awsRegion = try reader["AWSRegion"].readIfPresent() + value.localZoneGroup = try reader["LocalZoneGroup"].readIfPresent() + value.coordinates = try reader["Coordinates"].readIfPresent(readingClosure: Route53ClientTypes.Coordinates.readingClosure) + value.bias = try reader["Bias"].readIfPresent() + return value + } } } @@ -5497,16 +4615,16 @@ public struct GetAccountLimitInput: Swift.Equatable { } } -extension GetAccountLimitOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccountLimitOutputBody = try responseDecoder.decode(responseBody: data) - self.count = output.count - self.limit = output.limit - } else { - self.count = 0 - self.limit = nil +extension GetAccountLimitOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccountLimitOutput() + value.count = try reader["Count"].readIfPresent() ?? 0 + value.limit = try reader["Limit"].readIfPresent(readingClosure: Route53ClientTypes.AccountLimit.readingClosure) + return value } } } @@ -5530,32 +4648,17 @@ public struct GetAccountLimitOutput: Swift.Equatable { } } -struct GetAccountLimitOutputBody: Swift.Equatable { - let limit: Route53ClientTypes.AccountLimit? - let count: Swift.Int -} - -extension GetAccountLimitOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "Count" - case limit = "Limit" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let limitDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.AccountLimit.self, forKey: .limit) - limit = limitDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) ?? 0 - count = countDecoded - } -} +enum GetAccountLimitOutputError { -enum GetAccountLimitOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5584,14 +4687,15 @@ public struct GetChangeInput: Swift.Equatable { } } -extension GetChangeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetChangeOutputBody = try responseDecoder.decode(responseBody: data) - self.changeInfo = output.changeInfo - } else { - self.changeInfo = nil +extension GetChangeOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetChangeOutput() + value.changeInfo = try reader["ChangeInfo"].readIfPresent(readingClosure: Route53ClientTypes.ChangeInfo.readingClosure) + return value } } } @@ -5610,29 +4714,18 @@ public struct GetChangeOutput: Swift.Equatable { } } -struct GetChangeOutputBody: Swift.Equatable { - let changeInfo: Route53ClientTypes.ChangeInfo? -} +enum GetChangeOutputError { -extension GetChangeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case changeInfo = "ChangeInfo" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let changeInfoDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ChangeInfo.self, forKey: .changeInfo) - changeInfo = changeInfoDecoded - } -} - -enum GetChangeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchChange": return try await NoSuchChange(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchChange": return try await NoSuchChange.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5650,14 +4743,15 @@ public struct GetCheckerIpRangesInput: Swift.Equatable { public init() { } } -extension GetCheckerIpRangesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetCheckerIpRangesOutputBody = try responseDecoder.decode(responseBody: data) - self.checkerIpRanges = output.checkerIpRanges - } else { - self.checkerIpRanges = nil +extension GetCheckerIpRangesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetCheckerIpRangesOutput() + value.checkerIpRanges = try reader["CheckerIpRanges"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5676,44 +4770,15 @@ public struct GetCheckerIpRangesOutput: Swift.Equatable { } } -struct GetCheckerIpRangesOutputBody: Swift.Equatable { - let checkerIpRanges: [Swift.String]? -} - -extension GetCheckerIpRangesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checkerIpRanges = "CheckerIpRanges" - } +enum GetCheckerIpRangesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.checkerIpRanges) { - struct KeyVal0{struct member{}} - let checkerIpRangesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .checkerIpRanges) - if let checkerIpRangesWrappedContainer = checkerIpRangesWrappedContainer { - let checkerIpRangesContainer = try checkerIpRangesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var checkerIpRangesBuffer:[Swift.String]? = nil - if let checkerIpRangesContainer = checkerIpRangesContainer { - checkerIpRangesBuffer = [Swift.String]() - for stringContainer0 in checkerIpRangesContainer { - checkerIpRangesBuffer?.append(stringContainer0) - } - } - checkerIpRanges = checkerIpRangesBuffer - } else { - checkerIpRanges = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - checkerIpRanges = nil - } - } -} - -enum GetCheckerIpRangesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -5766,16 +4831,16 @@ public struct GetDNSSECInput: Swift.Equatable { } } -extension GetDNSSECOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetDNSSECOutputBody = try responseDecoder.decode(responseBody: data) - self.keySigningKeys = output.keySigningKeys - self.status = output.status - } else { - self.keySigningKeys = nil - self.status = nil +extension GetDNSSECOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetDNSSECOutput() + value.keySigningKeys = try reader["KeySigningKeys"].readListIfPresent(memberReadingClosure: Route53ClientTypes.KeySigningKey.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.status = try reader["Status"].readIfPresent(readingClosure: Route53ClientTypes.DNSSECStatus.readingClosure) + return value } } } @@ -5798,51 +4863,19 @@ public struct GetDNSSECOutput: Swift.Equatable { } } -struct GetDNSSECOutputBody: Swift.Equatable { - let status: Route53ClientTypes.DNSSECStatus? - let keySigningKeys: [Route53ClientTypes.KeySigningKey]? -} - -extension GetDNSSECOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keySigningKeys = "KeySigningKeys" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.DNSSECStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.keySigningKeys) { - struct KeyVal0{struct member{}} - let keySigningKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .keySigningKeys) - if let keySigningKeysWrappedContainer = keySigningKeysWrappedContainer { - let keySigningKeysContainer = try keySigningKeysWrappedContainer.decodeIfPresent([Route53ClientTypes.KeySigningKey].self, forKey: .member) - var keySigningKeysBuffer:[Route53ClientTypes.KeySigningKey]? = nil - if let keySigningKeysContainer = keySigningKeysContainer { - keySigningKeysBuffer = [Route53ClientTypes.KeySigningKey]() - for structureContainer0 in keySigningKeysContainer { - keySigningKeysBuffer?.append(structureContainer0) - } - } - keySigningKeys = keySigningKeysBuffer - } else { - keySigningKeys = [] - } - } else { - keySigningKeys = nil - } - } -} +enum GetDNSSECOutputError { -enum GetDNSSECOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidArgument": return try await InvalidArgument(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidArgument": return try await InvalidArgument.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5909,14 +4942,15 @@ public struct GetGeoLocationInput: Swift.Equatable { } } -extension GetGeoLocationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetGeoLocationOutputBody = try responseDecoder.decode(responseBody: data) - self.geoLocationDetails = output.geoLocationDetails - } else { - self.geoLocationDetails = nil +extension GetGeoLocationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetGeoLocationOutput() + value.geoLocationDetails = try reader["GeoLocationDetails"].readIfPresent(readingClosure: Route53ClientTypes.GeoLocationDetails.readingClosure) + return value } } } @@ -5935,29 +4969,18 @@ public struct GetGeoLocationOutput: Swift.Equatable { } } -struct GetGeoLocationOutputBody: Swift.Equatable { - let geoLocationDetails: Route53ClientTypes.GeoLocationDetails? -} - -extension GetGeoLocationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case geoLocationDetails = "GeoLocationDetails" - } +enum GetGeoLocationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let geoLocationDetailsDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.GeoLocationDetails.self, forKey: .geoLocationDetails) - geoLocationDetails = geoLocationDetailsDecoded - } -} - -enum GetGeoLocationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchGeoLocation": return try await NoSuchGeoLocation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchGeoLocation": return try await NoSuchGeoLocation.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5975,14 +4998,15 @@ public struct GetHealthCheckCountInput: Swift.Equatable { public init() { } } -extension GetHealthCheckCountOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetHealthCheckCountOutputBody = try responseDecoder.decode(responseBody: data) - self.healthCheckCount = output.healthCheckCount - } else { - self.healthCheckCount = nil +extension GetHealthCheckCountOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetHealthCheckCountOutput() + value.healthCheckCount = try reader["HealthCheckCount"].readIfPresent() + return value } } } @@ -6001,27 +5025,15 @@ public struct GetHealthCheckCountOutput: Swift.Equatable { } } -struct GetHealthCheckCountOutputBody: Swift.Equatable { - let healthCheckCount: Swift.Int? -} - -extension GetHealthCheckCountOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheckCount = "HealthCheckCount" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let healthCheckCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckCount) - healthCheckCount = healthCheckCountDecoded - } -} +enum GetHealthCheckCountOutputError { -enum GetHealthCheckCountOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6074,14 +5086,15 @@ public struct GetHealthCheckLastFailureReasonInput: Swift.Equatable { } } -extension GetHealthCheckLastFailureReasonOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetHealthCheckLastFailureReasonOutputBody = try responseDecoder.decode(responseBody: data) - self.healthCheckObservations = output.healthCheckObservations - } else { - self.healthCheckObservations = nil +extension GetHealthCheckLastFailureReasonOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetHealthCheckLastFailureReasonOutput() + value.healthCheckObservations = try reader["HealthCheckObservations"].readListIfPresent(memberReadingClosure: Route53ClientTypes.HealthCheckObservation.readingClosure, memberNodeInfo: "HealthCheckObservation", isFlattened: false) + return value } } } @@ -6100,58 +5113,31 @@ public struct GetHealthCheckLastFailureReasonOutput: Swift.Equatable { } } -struct GetHealthCheckLastFailureReasonOutputBody: Swift.Equatable { - let healthCheckObservations: [Route53ClientTypes.HealthCheckObservation]? -} +enum GetHealthCheckLastFailureReasonOutputError { -extension GetHealthCheckLastFailureReasonOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheckObservations = "HealthCheckObservations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.healthCheckObservations) { - struct KeyVal0{struct HealthCheckObservation{}} - let healthCheckObservationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .healthCheckObservations) - if let healthCheckObservationsWrappedContainer = healthCheckObservationsWrappedContainer { - let healthCheckObservationsContainer = try healthCheckObservationsWrappedContainer.decodeIfPresent([Route53ClientTypes.HealthCheckObservation].self, forKey: .member) - var healthCheckObservationsBuffer:[Route53ClientTypes.HealthCheckObservation]? = nil - if let healthCheckObservationsContainer = healthCheckObservationsContainer { - healthCheckObservationsBuffer = [Route53ClientTypes.HealthCheckObservation]() - for structureContainer0 in healthCheckObservationsContainer { - healthCheckObservationsBuffer?.append(structureContainer0) - } - } - healthCheckObservations = healthCheckObservationsBuffer - } else { - healthCheckObservations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - healthCheckObservations = nil } } } -enum GetHealthCheckLastFailureReasonOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} +extension GetHealthCheckOutput { -extension GetHealthCheckOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetHealthCheckOutputBody = try responseDecoder.decode(responseBody: data) - self.healthCheck = output.healthCheck - } else { - self.healthCheck = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetHealthCheckOutput() + value.healthCheck = try reader["HealthCheck"].readIfPresent(readingClosure: Route53ClientTypes.HealthCheck.readingClosure) + return value } } } @@ -6170,30 +5156,19 @@ public struct GetHealthCheckOutput: Swift.Equatable { } } -struct GetHealthCheckOutputBody: Swift.Equatable { - let healthCheck: Route53ClientTypes.HealthCheck? -} - -extension GetHealthCheckOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheck = "HealthCheck" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let healthCheckDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HealthCheck.self, forKey: .healthCheck) - healthCheck = healthCheckDecoded - } -} +enum GetHealthCheckOutputError { -enum GetHealthCheckOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "IncompatibleVersion": return try await IncompatibleVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "IncompatibleVersion": return try await IncompatibleVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6222,14 +5197,15 @@ public struct GetHealthCheckStatusInput: Swift.Equatable { } } -extension GetHealthCheckStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetHealthCheckStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.healthCheckObservations = output.healthCheckObservations - } else { - self.healthCheckObservations = nil +extension GetHealthCheckStatusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetHealthCheckStatusOutput() + value.healthCheckObservations = try reader["HealthCheckObservations"].readListIfPresent(memberReadingClosure: Route53ClientTypes.HealthCheckObservation.readingClosure, memberNodeInfo: "HealthCheckObservation", isFlattened: false) + return value } } } @@ -6248,46 +5224,18 @@ public struct GetHealthCheckStatusOutput: Swift.Equatable { } } -struct GetHealthCheckStatusOutputBody: Swift.Equatable { - let healthCheckObservations: [Route53ClientTypes.HealthCheckObservation]? -} +enum GetHealthCheckStatusOutputError { -extension GetHealthCheckStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheckObservations = "HealthCheckObservations" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.healthCheckObservations) { - struct KeyVal0{struct HealthCheckObservation{}} - let healthCheckObservationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .healthCheckObservations) - if let healthCheckObservationsWrappedContainer = healthCheckObservationsWrappedContainer { - let healthCheckObservationsContainer = try healthCheckObservationsWrappedContainer.decodeIfPresent([Route53ClientTypes.HealthCheckObservation].self, forKey: .member) - var healthCheckObservationsBuffer:[Route53ClientTypes.HealthCheckObservation]? = nil - if let healthCheckObservationsContainer = healthCheckObservationsContainer { - healthCheckObservationsBuffer = [Route53ClientTypes.HealthCheckObservation]() - for structureContainer0 in healthCheckObservationsContainer { - healthCheckObservationsBuffer?.append(structureContainer0) - } - } - healthCheckObservations = healthCheckObservationsBuffer - } else { - healthCheckObservations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - healthCheckObservations = nil - } - } -} - -enum GetHealthCheckStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -6305,14 +5253,15 @@ public struct GetHostedZoneCountInput: Swift.Equatable { public init() { } } -extension GetHostedZoneCountOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetHostedZoneCountOutputBody = try responseDecoder.decode(responseBody: data) - self.hostedZoneCount = output.hostedZoneCount - } else { - self.hostedZoneCount = nil +extension GetHostedZoneCountOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetHostedZoneCountOutput() + value.hostedZoneCount = try reader["HostedZoneCount"].readIfPresent() + return value } } } @@ -6331,28 +5280,17 @@ public struct GetHostedZoneCountOutput: Swift.Equatable { } } -struct GetHostedZoneCountOutputBody: Swift.Equatable { - let hostedZoneCount: Swift.Int? -} - -extension GetHostedZoneCountOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneCount = "HostedZoneCount" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .hostedZoneCount) - hostedZoneCount = hostedZoneCountDecoded - } -} +enum GetHostedZoneCountOutputError { -enum GetHostedZoneCountOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6442,16 +5380,16 @@ public struct GetHostedZoneLimitInput: Swift.Equatable { } } -extension GetHostedZoneLimitOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetHostedZoneLimitOutputBody = try responseDecoder.decode(responseBody: data) - self.count = output.count - self.limit = output.limit - } else { - self.count = 0 - self.limit = nil +extension GetHostedZoneLimitOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetHostedZoneLimitOutput() + value.count = try reader["Count"].readIfPresent() ?? 0 + value.limit = try reader["Limit"].readIfPresent(readingClosure: Route53ClientTypes.HostedZoneLimit.readingClosure) + return value } } } @@ -6475,50 +5413,34 @@ public struct GetHostedZoneLimitOutput: Swift.Equatable { } } -struct GetHostedZoneLimitOutputBody: Swift.Equatable { - let limit: Route53ClientTypes.HostedZoneLimit? - let count: Swift.Int -} +enum GetHostedZoneLimitOutputError { -extension GetHostedZoneLimitOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "Count" - case limit = "Limit" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let limitDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HostedZoneLimit.self, forKey: .limit) - limit = limitDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) ?? 0 - count = countDecoded - } -} - -enum GetHostedZoneLimitOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HostedZoneNotPrivate": return try await HostedZoneNotPrivate(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "HostedZoneNotPrivate": return try await HostedZoneNotPrivate.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension GetHostedZoneOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetHostedZoneOutputBody = try responseDecoder.decode(responseBody: data) - self.delegationSet = output.delegationSet - self.hostedZone = output.hostedZone - self.vpCs = output.vpCs - } else { - self.delegationSet = nil - self.hostedZone = nil - self.vpCs = nil +extension GetHostedZoneOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetHostedZoneOutput() + value.delegationSet = try reader["DelegationSet"].readIfPresent(readingClosure: Route53ClientTypes.DelegationSet.readingClosure) + value.hostedZone = try reader["HostedZone"].readIfPresent(readingClosure: Route53ClientTypes.HostedZone.readingClosure) + value.vpCs = try reader["VPCs"].readListIfPresent(memberReadingClosure: Route53ClientTypes.VPC.readingClosure, memberNodeInfo: "VPC", isFlattened: false) + return value } } } @@ -6545,54 +5467,18 @@ public struct GetHostedZoneOutput: Swift.Equatable { } } -struct GetHostedZoneOutputBody: Swift.Equatable { - let hostedZone: Route53ClientTypes.HostedZone? - let delegationSet: Route53ClientTypes.DelegationSet? - let vpCs: [Route53ClientTypes.VPC]? -} - -extension GetHostedZoneOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delegationSet = "DelegationSet" - case hostedZone = "HostedZone" - case vpCs = "VPCs" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HostedZone.self, forKey: .hostedZone) - hostedZone = hostedZoneDecoded - let delegationSetDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.DelegationSet.self, forKey: .delegationSet) - delegationSet = delegationSetDecoded - if containerValues.contains(.vpCs) { - struct KeyVal0{struct VPC{}} - let vpCsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpCs) - if let vpCsWrappedContainer = vpCsWrappedContainer { - let vpCsContainer = try vpCsWrappedContainer.decodeIfPresent([Route53ClientTypes.VPC].self, forKey: .member) - var vpCsBuffer:[Route53ClientTypes.VPC]? = nil - if let vpCsContainer = vpCsContainer { - vpCsBuffer = [Route53ClientTypes.VPC]() - for structureContainer0 in vpCsContainer { - vpCsBuffer?.append(structureContainer0) - } - } - vpCs = vpCsBuffer - } else { - vpCs = [] - } - } else { - vpCs = nil - } - } -} +enum GetHostedZoneOutputError { -enum GetHostedZoneOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6620,14 +5506,15 @@ public struct GetQueryLoggingConfigInput: Swift.Equatable { } } -extension GetQueryLoggingConfigOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetQueryLoggingConfigOutputBody = try responseDecoder.decode(responseBody: data) - self.queryLoggingConfig = output.queryLoggingConfig - } else { - self.queryLoggingConfig = nil +extension GetQueryLoggingConfigOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetQueryLoggingConfigOutput() + value.queryLoggingConfig = try reader["QueryLoggingConfig"].readIfPresent(readingClosure: Route53ClientTypes.QueryLoggingConfig.readingClosure) + return value } } } @@ -6645,29 +5532,18 @@ public struct GetQueryLoggingConfigOutput: Swift.Equatable { } } -struct GetQueryLoggingConfigOutputBody: Swift.Equatable { - let queryLoggingConfig: Route53ClientTypes.QueryLoggingConfig? -} - -extension GetQueryLoggingConfigOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case queryLoggingConfig = "QueryLoggingConfig" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let queryLoggingConfigDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.QueryLoggingConfig.self, forKey: .queryLoggingConfig) - queryLoggingConfig = queryLoggingConfigDecoded - } -} +enum GetQueryLoggingConfigOutputError { -enum GetQueryLoggingConfigOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchQueryLoggingConfig": return try await NoSuchQueryLoggingConfig(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchQueryLoggingConfig": return try await NoSuchQueryLoggingConfig.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6728,16 +5604,16 @@ public struct GetReusableDelegationSetLimitInput: Swift.Equatable { } } -extension GetReusableDelegationSetLimitOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetReusableDelegationSetLimitOutputBody = try responseDecoder.decode(responseBody: data) - self.count = output.count - self.limit = output.limit - } else { - self.count = 0 - self.limit = nil +extension GetReusableDelegationSetLimitOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetReusableDelegationSetLimitOutput() + value.count = try reader["Count"].readIfPresent() ?? 0 + value.limit = try reader["Limit"].readIfPresent(readingClosure: Route53ClientTypes.ReusableDelegationSetLimit.readingClosure) + return value } } } @@ -6761,45 +5637,31 @@ public struct GetReusableDelegationSetLimitOutput: Swift.Equatable { } } -struct GetReusableDelegationSetLimitOutputBody: Swift.Equatable { - let limit: Route53ClientTypes.ReusableDelegationSetLimit? - let count: Swift.Int -} +enum GetReusableDelegationSetLimitOutputError { -extension GetReusableDelegationSetLimitOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case count = "Count" - case limit = "Limit" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let limitDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ReusableDelegationSetLimit.self, forKey: .limit) - limit = limitDecoded - let countDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .count) ?? 0 - count = countDecoded - } -} - -enum GetReusableDelegationSetLimitOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDelegationSet": return try await NoSuchDelegationSet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDelegationSet": return try await NoSuchDelegationSet.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension GetReusableDelegationSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetReusableDelegationSetOutputBody = try responseDecoder.decode(responseBody: data) - self.delegationSet = output.delegationSet - } else { - self.delegationSet = nil +extension GetReusableDelegationSetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetReusableDelegationSetOutput() + value.delegationSet = try reader["DelegationSet"].readIfPresent(readingClosure: Route53ClientTypes.DelegationSet.readingClosure) + return value } } } @@ -6818,30 +5680,19 @@ public struct GetReusableDelegationSetOutput: Swift.Equatable { } } -struct GetReusableDelegationSetOutputBody: Swift.Equatable { - let delegationSet: Route53ClientTypes.DelegationSet? -} - -extension GetReusableDelegationSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delegationSet = "DelegationSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let delegationSetDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.DelegationSet.self, forKey: .delegationSet) - delegationSet = delegationSetDecoded - } -} +enum GetReusableDelegationSetOutputError { -enum GetReusableDelegationSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DelegationSetNotReusable": return try await DelegationSetNotReusable(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDelegationSet": return try await NoSuchDelegationSet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "DelegationSetNotReusable": return try await DelegationSetNotReusable.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDelegationSet": return try await NoSuchDelegationSet.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6891,14 +5742,15 @@ public struct GetTrafficPolicyInstanceCountInput: Swift.Equatable { public init() { } } -extension GetTrafficPolicyInstanceCountOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTrafficPolicyInstanceCountOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficPolicyInstanceCount = output.trafficPolicyInstanceCount - } else { - self.trafficPolicyInstanceCount = nil +extension GetTrafficPolicyInstanceCountOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTrafficPolicyInstanceCountOutput() + value.trafficPolicyInstanceCount = try reader["TrafficPolicyInstanceCount"].readIfPresent() + return value } } } @@ -6917,27 +5769,15 @@ public struct GetTrafficPolicyInstanceCountOutput: Swift.Equatable { } } -struct GetTrafficPolicyInstanceCountOutputBody: Swift.Equatable { - let trafficPolicyInstanceCount: Swift.Int? -} +enum GetTrafficPolicyInstanceCountOutputError { -extension GetTrafficPolicyInstanceCountOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficPolicyInstanceCount = "TrafficPolicyInstanceCount" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficPolicyInstanceCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .trafficPolicyInstanceCount) - trafficPolicyInstanceCount = trafficPolicyInstanceCountDecoded - } -} - -enum GetTrafficPolicyInstanceCountOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6966,14 +5806,15 @@ public struct GetTrafficPolicyInstanceInput: Swift.Equatable { } } -extension GetTrafficPolicyInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTrafficPolicyInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficPolicyInstance = output.trafficPolicyInstance - } else { - self.trafficPolicyInstance = nil +extension GetTrafficPolicyInstanceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTrafficPolicyInstanceOutput() + value.trafficPolicyInstance = try reader["TrafficPolicyInstance"].readIfPresent(readingClosure: Route53ClientTypes.TrafficPolicyInstance.readingClosure) + return value } } } @@ -6992,41 +5833,31 @@ public struct GetTrafficPolicyInstanceOutput: Swift.Equatable { } } -struct GetTrafficPolicyInstanceOutputBody: Swift.Equatable { - let trafficPolicyInstance: Route53ClientTypes.TrafficPolicyInstance? -} - -extension GetTrafficPolicyInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficPolicyInstance = "TrafficPolicyInstance" - } +enum GetTrafficPolicyInstanceOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficPolicyInstanceDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.TrafficPolicyInstance.self, forKey: .trafficPolicyInstance) - trafficPolicyInstance = trafficPolicyInstanceDecoded - } -} - -enum GetTrafficPolicyInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension GetTrafficPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTrafficPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficPolicy = output.trafficPolicy - } else { - self.trafficPolicy = nil +extension GetTrafficPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetTrafficPolicyOutput() + value.trafficPolicy = try reader["TrafficPolicy"].readIfPresent(readingClosure: Route53ClientTypes.TrafficPolicy.readingClosure) + return value } } } @@ -7045,67 +5876,46 @@ public struct GetTrafficPolicyOutput: Swift.Equatable { } } -struct GetTrafficPolicyOutputBody: Swift.Equatable { - let trafficPolicy: Route53ClientTypes.TrafficPolicy? -} - -extension GetTrafficPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficPolicy = "TrafficPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficPolicyDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.TrafficPolicy.self, forKey: .trafficPolicy) - trafficPolicy = trafficPolicyDecoded - } -} +enum GetTrafficPolicyOutputError { -enum GetTrafficPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.HealthCheck: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case cloudWatchAlarmConfiguration = "CloudWatchAlarmConfiguration" - case healthCheckConfig = "HealthCheckConfig" - case healthCheckVersion = "HealthCheckVersion" - case id = "Id" - case linkedService = "LinkedService" - } +extension Route53ClientTypes.HealthCheck { static func writingClosure(_ value: Route53ClientTypes.HealthCheck?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("CloudWatchAlarmConfiguration")].write(value.cloudWatchAlarmConfiguration, writingClosure: Route53ClientTypes.CloudWatchAlarmConfiguration.writingClosure(_:to:)) - try writer[.init("HealthCheckConfig")].write(value.healthCheckConfig, writingClosure: Route53ClientTypes.HealthCheckConfig.writingClosure(_:to:)) - try writer[.init("HealthCheckVersion")].write(value.healthCheckVersion) - try writer[.init("Id")].write(value.id) - try writer[.init("LinkedService")].write(value.linkedService, writingClosure: Route53ClientTypes.LinkedService.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let linkedServiceDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.LinkedService.self, forKey: .linkedService) - linkedService = linkedServiceDecoded - let healthCheckConfigDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HealthCheckConfig.self, forKey: .healthCheckConfig) - healthCheckConfig = healthCheckConfigDecoded - let healthCheckVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckVersion) - healthCheckVersion = healthCheckVersionDecoded - let cloudWatchAlarmConfigurationDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.CloudWatchAlarmConfiguration.self, forKey: .cloudWatchAlarmConfiguration) - cloudWatchAlarmConfiguration = cloudWatchAlarmConfigurationDecoded + try writer["CallerReference"].write(value.callerReference) + try writer["CloudWatchAlarmConfiguration"].write(value.cloudWatchAlarmConfiguration, writingClosure: Route53ClientTypes.CloudWatchAlarmConfiguration.writingClosure(_:to:)) + try writer["HealthCheckConfig"].write(value.healthCheckConfig, writingClosure: Route53ClientTypes.HealthCheckConfig.writingClosure(_:to:)) + try writer["HealthCheckVersion"].write(value.healthCheckVersion) + try writer["Id"].write(value.id) + try writer["LinkedService"].write(value.linkedService, writingClosure: Route53ClientTypes.LinkedService.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.HealthCheck() + value.id = try reader["Id"].readIfPresent() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.linkedService = try reader["LinkedService"].readIfPresent(readingClosure: Route53ClientTypes.LinkedService.readingClosure) + value.healthCheckConfig = try reader["HealthCheckConfig"].readIfPresent(readingClosure: Route53ClientTypes.HealthCheckConfig.readingClosure) + value.healthCheckVersion = try reader["HealthCheckVersion"].readIfPresent() + value.cloudWatchAlarmConfiguration = try reader["CloudWatchAlarmConfiguration"].readIfPresent(readingClosure: Route53ClientTypes.CloudWatchAlarmConfiguration.readingClosure) + return value + } } } @@ -7150,16 +5960,26 @@ extension Route53ClientTypes { } extension HealthCheckAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = HealthCheckAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension HealthCheckAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HealthCheckAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7192,138 +6012,54 @@ public struct HealthCheckAlreadyExists: ClientRuntime.ModeledError, AWSClientRun } } -struct HealthCheckAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension HealthCheckAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.HealthCheckConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmIdentifier = "AlarmIdentifier" - case childHealthChecks = "ChildHealthChecks" - case disabled = "Disabled" - case enableSNI = "EnableSNI" - case failureThreshold = "FailureThreshold" - case fullyQualifiedDomainName = "FullyQualifiedDomainName" - case healthThreshold = "HealthThreshold" - case ipAddress = "IPAddress" - case insufficientDataHealthStatus = "InsufficientDataHealthStatus" - case inverted = "Inverted" - case measureLatency = "MeasureLatency" - case port = "Port" - case regions = "Regions" - case requestInterval = "RequestInterval" - case resourcePath = "ResourcePath" - case routingControlArn = "RoutingControlArn" - case searchString = "SearchString" - case type = "Type" - } +extension Route53ClientTypes.HealthCheckConfig { static func writingClosure(_ value: Route53ClientTypes.HealthCheckConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AlarmIdentifier")].write(value.alarmIdentifier, writingClosure: Route53ClientTypes.AlarmIdentifier.writingClosure(_:to:)) - try writer[.init("ChildHealthChecks")].writeList(value.childHealthChecks, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("ChildHealthCheck"), isFlattened: false) - try writer[.init("Disabled")].write(value.disabled) - try writer[.init("EnableSNI")].write(value.enableSNI) - try writer[.init("FailureThreshold")].write(value.failureThreshold) - try writer[.init("FullyQualifiedDomainName")].write(value.fullyQualifiedDomainName) - try writer[.init("HealthThreshold")].write(value.healthThreshold) - try writer[.init("IPAddress")].write(value.ipAddress) - try writer[.init("InsufficientDataHealthStatus")].write(value.insufficientDataHealthStatus) - try writer[.init("Inverted")].write(value.inverted) - try writer[.init("MeasureLatency")].write(value.measureLatency) - try writer[.init("Port")].write(value.port) - try writer[.init("Regions")].writeList(value.regions, memberWritingClosure: Route53ClientTypes.HealthCheckRegion.writingClosure(_:to:), memberNodeInfo: .init("Region"), isFlattened: false) - try writer[.init("RequestInterval")].write(value.requestInterval) - try writer[.init("ResourcePath")].write(value.resourcePath) - try writer[.init("RoutingControlArn")].write(value.routingControlArn) - try writer[.init("SearchString")].write(value.searchString) - try writer[.init("Type")].write(value.type) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ipAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddress) - ipAddress = ipAddressDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let typeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HealthCheckType.self, forKey: .type) - type = typeDecoded - let resourcePathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourcePath) - resourcePath = resourcePathDecoded - let fullyQualifiedDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fullyQualifiedDomainName) - fullyQualifiedDomainName = fullyQualifiedDomainNameDecoded - let searchStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .searchString) - searchString = searchStringDecoded - let requestIntervalDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .requestInterval) - requestInterval = requestIntervalDecoded - let failureThresholdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .failureThreshold) - failureThreshold = failureThresholdDecoded - let measureLatencyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .measureLatency) - measureLatency = measureLatencyDecoded - let invertedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .inverted) - inverted = invertedDecoded - let disabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disabled) - disabled = disabledDecoded - let healthThresholdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthThreshold) - healthThreshold = healthThresholdDecoded - if containerValues.contains(.childHealthChecks) { - struct KeyVal0{struct ChildHealthCheck{}} - let childHealthChecksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .childHealthChecks) - if let childHealthChecksWrappedContainer = childHealthChecksWrappedContainer { - let childHealthChecksContainer = try childHealthChecksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var childHealthChecksBuffer:[Swift.String]? = nil - if let childHealthChecksContainer = childHealthChecksContainer { - childHealthChecksBuffer = [Swift.String]() - for stringContainer0 in childHealthChecksContainer { - childHealthChecksBuffer?.append(stringContainer0) - } - } - childHealthChecks = childHealthChecksBuffer - } else { - childHealthChecks = [] - } - } else { - childHealthChecks = nil - } - let enableSNIDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableSNI) - enableSNI = enableSNIDecoded - if containerValues.contains(.regions) { - struct KeyVal0{struct Region{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Route53ClientTypes.HealthCheckRegion].self, forKey: .member) - var regionsBuffer:[Route53ClientTypes.HealthCheckRegion]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Route53ClientTypes.HealthCheckRegion]() - for enumContainer0 in regionsContainer { - regionsBuffer?.append(enumContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil + try writer["AlarmIdentifier"].write(value.alarmIdentifier, writingClosure: Route53ClientTypes.AlarmIdentifier.writingClosure(_:to:)) + try writer["ChildHealthChecks"].writeList(value.childHealthChecks, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "ChildHealthCheck", isFlattened: false) + try writer["Disabled"].write(value.disabled) + try writer["EnableSNI"].write(value.enableSNI) + try writer["FailureThreshold"].write(value.failureThreshold) + try writer["FullyQualifiedDomainName"].write(value.fullyQualifiedDomainName) + try writer["HealthThreshold"].write(value.healthThreshold) + try writer["IPAddress"].write(value.ipAddress) + try writer["InsufficientDataHealthStatus"].write(value.insufficientDataHealthStatus) + try writer["Inverted"].write(value.inverted) + try writer["MeasureLatency"].write(value.measureLatency) + try writer["Port"].write(value.port) + try writer["Regions"].writeList(value.regions, memberWritingClosure: Route53ClientTypes.HealthCheckRegion.writingClosure(_:to:), memberNodeInfo: "Region", isFlattened: false) + try writer["RequestInterval"].write(value.requestInterval) + try writer["ResourcePath"].write(value.resourcePath) + try writer["RoutingControlArn"].write(value.routingControlArn) + try writer["SearchString"].write(value.searchString) + try writer["Type"].write(value.type) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.HealthCheckConfig() + value.ipAddress = try reader["IPAddress"].readIfPresent() + value.port = try reader["Port"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + value.resourcePath = try reader["ResourcePath"].readIfPresent() + value.fullyQualifiedDomainName = try reader["FullyQualifiedDomainName"].readIfPresent() + value.searchString = try reader["SearchString"].readIfPresent() + value.requestInterval = try reader["RequestInterval"].readIfPresent() + value.failureThreshold = try reader["FailureThreshold"].readIfPresent() + value.measureLatency = try reader["MeasureLatency"].readIfPresent() + value.inverted = try reader["Inverted"].readIfPresent() + value.disabled = try reader["Disabled"].readIfPresent() + value.healthThreshold = try reader["HealthThreshold"].readIfPresent() + value.childHealthChecks = try reader["ChildHealthChecks"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "ChildHealthCheck", isFlattened: false) + value.enableSNI = try reader["EnableSNI"].readIfPresent() + value.regions = try reader["Regions"].readListIfPresent(memberReadingClosure: Route53ClientTypes.HealthCheckRegion.readingClosure, memberNodeInfo: "Region", isFlattened: false) + value.alarmIdentifier = try reader["AlarmIdentifier"].readIfPresent(readingClosure: Route53ClientTypes.AlarmIdentifier.readingClosure) + value.insufficientDataHealthStatus = try reader["InsufficientDataHealthStatus"].readIfPresent() + value.routingControlArn = try reader["RoutingControlArn"].readIfPresent() + return value } - let alarmIdentifierDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.AlarmIdentifier.self, forKey: .alarmIdentifier) - alarmIdentifier = alarmIdentifierDecoded - let insufficientDataHealthStatusDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.InsufficientDataHealthStatus.self, forKey: .insufficientDataHealthStatus) - insufficientDataHealthStatus = insufficientDataHealthStatusDecoded - let routingControlArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .routingControlArn) - routingControlArn = routingControlArnDecoded } } @@ -7476,16 +6212,26 @@ extension Route53ClientTypes { } extension HealthCheckInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = HealthCheckInUse() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension HealthCheckInUse { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HealthCheckInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7515,44 +6261,24 @@ public struct HealthCheckInUse: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct HealthCheckInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension HealthCheckInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.HealthCheckObservation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ipAddress = "IPAddress" - case region = "Region" - case statusReport = "StatusReport" - } +extension Route53ClientTypes.HealthCheckObservation { static func writingClosure(_ value: Route53ClientTypes.HealthCheckObservation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IPAddress")].write(value.ipAddress) - try writer[.init("Region")].write(value.region) - try writer[.init("StatusReport")].write(value.statusReport, writingClosure: Route53ClientTypes.StatusReport.writingClosure(_:to:)) + try writer["IPAddress"].write(value.ipAddress) + try writer["Region"].write(value.region) + try writer["StatusReport"].write(value.statusReport, writingClosure: Route53ClientTypes.StatusReport.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let regionDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HealthCheckRegion.self, forKey: .region) - region = regionDecoded - let ipAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddress) - ipAddress = ipAddressDecoded - let statusReportDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.StatusReport.self, forKey: .statusReport) - statusReport = statusReportDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.HealthCheckObservation() + value.region = try reader["Region"].readIfPresent() + value.ipAddress = try reader["IPAddress"].readIfPresent() + value.statusReport = try reader["StatusReport"].readIfPresent(readingClosure: Route53ClientTypes.StatusReport.readingClosure) + return value + } } } @@ -7681,16 +6407,26 @@ extension Route53ClientTypes { } extension HealthCheckVersionMismatch { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = HealthCheckVersionMismatch() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension HealthCheckVersionMismatch { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HealthCheckVersionMismatch() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7718,56 +6454,30 @@ public struct HealthCheckVersionMismatch: ClientRuntime.ModeledError, AWSClientR } } -struct HealthCheckVersionMismatchBody: Swift.Equatable { - let message: Swift.String? -} - -extension HealthCheckVersionMismatchBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.HostedZone: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case callerReference = "CallerReference" - case config = "Config" - case id = "Id" - case linkedService = "LinkedService" - case name = "Name" - case resourceRecordSetCount = "ResourceRecordSetCount" - } +extension Route53ClientTypes.HostedZone { static func writingClosure(_ value: Route53ClientTypes.HostedZone?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CallerReference")].write(value.callerReference) - try writer[.init("Config")].write(value.config, writingClosure: Route53ClientTypes.HostedZoneConfig.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("LinkedService")].write(value.linkedService, writingClosure: Route53ClientTypes.LinkedService.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) - try writer[.init("ResourceRecordSetCount")].write(value.resourceRecordSetCount) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let callerReferenceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .callerReference) - callerReference = callerReferenceDecoded - let configDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HostedZoneConfig.self, forKey: .config) - config = configDecoded - let resourceRecordSetCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .resourceRecordSetCount) - resourceRecordSetCount = resourceRecordSetCountDecoded - let linkedServiceDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.LinkedService.self, forKey: .linkedService) - linkedService = linkedServiceDecoded + try writer["CallerReference"].write(value.callerReference) + try writer["Config"].write(value.config, writingClosure: Route53ClientTypes.HostedZoneConfig.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["LinkedService"].write(value.linkedService, writingClosure: Route53ClientTypes.LinkedService.writingClosure(_:to:)) + try writer["Name"].write(value.name) + try writer["ResourceRecordSetCount"].write(value.resourceRecordSetCount) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.HostedZone() + value.id = try reader["Id"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.callerReference = try reader["CallerReference"].readIfPresent() + value.config = try reader["Config"].readIfPresent(readingClosure: Route53ClientTypes.HostedZoneConfig.readingClosure) + value.resourceRecordSetCount = try reader["ResourceRecordSetCount"].readIfPresent() + value.linkedService = try reader["LinkedService"].readIfPresent(readingClosure: Route53ClientTypes.LinkedService.readingClosure) + return value + } } } @@ -7811,16 +6521,26 @@ extension Route53ClientTypes { } extension HostedZoneAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = HostedZoneAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension HostedZoneAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HostedZoneAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7849,40 +6569,22 @@ public struct HostedZoneAlreadyExists: ClientRuntime.ModeledError, AWSClientRunt } } -struct HostedZoneAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension HostedZoneAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.HostedZoneConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case privateZone = "PrivateZone" - } +extension Route53ClientTypes.HostedZoneConfig { static func writingClosure(_ value: Route53ClientTypes.HostedZoneConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("PrivateZone")].write(value.privateZone) + try writer["Comment"].write(value.comment) + try writer["PrivateZone"].write(value.privateZone) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - let privateZoneDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .privateZone) ?? false - privateZone = privateZoneDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.HostedZoneConfig() + value.comment = try reader["Comment"].readIfPresent() + value.privateZone = try reader["PrivateZone"].readIfPresent() ?? false + return value + } } } @@ -7906,24 +6608,22 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.HostedZoneLimit: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case type = "Type" - case value = "Value" - } +extension Route53ClientTypes.HostedZoneLimit { static func writingClosure(_ value: Route53ClientTypes.HostedZoneLimit?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Type")].write(value.type) - try writer[.init("Value")].write(value.value) + try writer["Type"].write(value.type) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HostedZoneLimitType.self, forKey: .type) - type = typeDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.HostedZoneLimit() + value.type = try reader["Type"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -7986,16 +6686,26 @@ extension Route53ClientTypes { } extension HostedZoneNotEmpty { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = HostedZoneNotEmpty() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension HostedZoneNotEmpty { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HostedZoneNotEmpty() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8024,33 +6734,27 @@ public struct HostedZoneNotEmpty: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct HostedZoneNotEmptyBody: Swift.Equatable { - let message: Swift.String? -} - -extension HostedZoneNotEmptyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension HostedZoneNotFound { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = HostedZoneNotFound() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension HostedZoneNotFound { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HostedZoneNotFound() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8079,33 +6783,27 @@ public struct HostedZoneNotFound: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct HostedZoneNotFoundBody: Swift.Equatable { - let message: Swift.String? -} - -extension HostedZoneNotFoundBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension HostedZoneNotPrivate { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = HostedZoneNotPrivate() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension HostedZoneNotPrivate { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HostedZoneNotPrivate() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8134,40 +6832,22 @@ public struct HostedZoneNotPrivate: ClientRuntime.ModeledError, AWSClientRuntime } } -struct HostedZoneNotPrivateBody: Swift.Equatable { - let message: Swift.String? -} - -extension HostedZoneNotPrivateBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.HostedZoneOwner: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case owningAccount = "OwningAccount" - case owningService = "OwningService" - } +extension Route53ClientTypes.HostedZoneOwner { static func writingClosure(_ value: Route53ClientTypes.HostedZoneOwner?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OwningAccount")].write(value.owningAccount) - try writer[.init("OwningService")].write(value.owningService) + try writer["OwningAccount"].write(value.owningAccount) + try writer["OwningService"].write(value.owningService) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let owningAccountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .owningAccount) - owningAccount = owningAccountDecoded - let owningServiceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .owningService) - owningService = owningServiceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.HostedZoneOwner() + value.owningAccount = try reader["OwningAccount"].readIfPresent() + value.owningService = try reader["OwningService"].readIfPresent() + return value + } } } @@ -8192,16 +6872,26 @@ extension Route53ClientTypes { } extension HostedZonePartiallyDelegated { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = HostedZonePartiallyDelegated() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension HostedZonePartiallyDelegated { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = HostedZonePartiallyDelegated() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8229,44 +6919,24 @@ public struct HostedZonePartiallyDelegated: ClientRuntime.ModeledError, AWSClien } } -struct HostedZonePartiallyDelegatedBody: Swift.Equatable { - let message: Swift.String? -} - -extension HostedZonePartiallyDelegatedBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.HostedZoneSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneId = "HostedZoneId" - case name = "Name" - case owner = "Owner" - } +extension Route53ClientTypes.HostedZoneSummary { static func writingClosure(_ value: Route53ClientTypes.HostedZoneSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HostedZoneId")].write(value.hostedZoneId) - try writer[.init("Name")].write(value.name) - try writer[.init("Owner")].write(value.owner, writingClosure: Route53ClientTypes.HostedZoneOwner.writingClosure(_:to:)) + try writer["HostedZoneId"].write(value.hostedZoneId) + try writer["Name"].write(value.name) + try writer["Owner"].write(value.owner, writingClosure: Route53ClientTypes.HostedZoneOwner.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let ownerDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HostedZoneOwner.self, forKey: .owner) - owner = ownerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.HostedZoneSummary() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.owner = try reader["Owner"].readIfPresent(readingClosure: Route53ClientTypes.HostedZoneOwner.readingClosure) + return value + } } } @@ -8327,16 +6997,26 @@ extension Route53ClientTypes { } extension IncompatibleVersion { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IncompatibleVersion() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension IncompatibleVersion { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IncompatibleVersion() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8364,33 +7044,27 @@ public struct IncompatibleVersion: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct IncompatibleVersionBody: Swift.Equatable { - let message: Swift.String? -} - -extension IncompatibleVersionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InsufficientCloudWatchLogsResourcePolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InsufficientCloudWatchLogsResourcePolicy() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InsufficientCloudWatchLogsResourcePolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InsufficientCloudWatchLogsResourcePolicy() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8428,22 +7102,6 @@ public struct InsufficientCloudWatchLogsResourcePolicy: ClientRuntime.ModeledErr } } -struct InsufficientCloudWatchLogsResourcePolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension InsufficientCloudWatchLogsResourcePolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension Route53ClientTypes { public enum InsufficientDataHealthStatus: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case healthy @@ -8480,16 +7138,26 @@ extension Route53ClientTypes { } extension InvalidArgument { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidArgument() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension InvalidArgument { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidArgument() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8518,35 +7186,29 @@ public struct InvalidArgument: ClientRuntime.ModeledError, AWSClientRuntime.AWSS } } -struct InvalidArgumentBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidArgumentBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidChangeBatch { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidChangeBatch() + value.properties.messages = try reader["messages"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Message", isFlattened: false) + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidChangeBatch { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.messages = output.error.messages - } else { - self.properties.message = nil - self.properties.messages = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidChangeBatch() + value.properties.message = try reader["message"].readIfPresent() + value.properties.messages = try reader["messages"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Message", isFlattened: false) + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8578,54 +7240,27 @@ public struct InvalidChangeBatch: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct InvalidChangeBatchBody: Swift.Equatable { - let messages: [Swift.String]? - let message: Swift.String? -} - -extension InvalidChangeBatchBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - case messages - } +extension InvalidDomainName { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.messages) { - struct KeyVal0{struct Message{}} - let messagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .messages) - if let messagesWrappedContainer = messagesWrappedContainer { - let messagesContainer = try messagesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var messagesBuffer:[Swift.String]? = nil - if let messagesContainer = messagesContainer { - messagesBuffer = [Swift.String]() - for stringContainer0 in messagesContainer { - messagesBuffer?.append(stringContainer0) - } - } - messages = messagesBuffer - } else { - messages = [] - } - } else { - messages = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidDomainName() + value.properties.message = try reader["message"].readIfPresent() + return value } - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded } } extension InvalidDomainName { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDomainName() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8654,33 +7289,27 @@ public struct InvalidDomainName: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct InvalidDomainNameBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDomainNameBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidInput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidInput() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidInput { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidInput() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8709,33 +7338,27 @@ public struct InvalidInput: ClientRuntime.ModeledError, AWSClientRuntime.AWSServ } } -struct InvalidInputBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidKMSArn { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidKMSArn() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidKMSArn { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidKMSArn() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8763,33 +7386,27 @@ public struct InvalidKMSArn: ClientRuntime.ModeledError, AWSClientRuntime.AWSSer } } -struct InvalidKMSArnBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidKMSArnBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidKeySigningKeyName { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidKeySigningKeyName() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidKeySigningKeyName { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidKeySigningKeyName() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8817,33 +7434,27 @@ public struct InvalidKeySigningKeyName: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidKeySigningKeyNameBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidKeySigningKeyNameBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidKeySigningKeyStatus { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidKeySigningKeyStatus() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidKeySigningKeyStatus { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidKeySigningKeyStatus() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8871,33 +7482,27 @@ public struct InvalidKeySigningKeyStatus: ClientRuntime.ModeledError, AWSClientR } } -struct InvalidKeySigningKeyStatusBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidKeySigningKeyStatusBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidPaginationToken { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidPaginationToken() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidPaginationToken { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidPaginationToken() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8925,33 +7530,27 @@ public struct InvalidPaginationToken: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidPaginationTokenBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidPaginationTokenBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidSigningStatus { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidSigningStatus() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidSigningStatus { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSigningStatus() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8979,33 +7578,27 @@ public struct InvalidSigningStatus: ClientRuntime.ModeledError, AWSClientRuntime } } -struct InvalidSigningStatusBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSigningStatusBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidTrafficPolicyDocument { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidTrafficPolicyDocument() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidTrafficPolicyDocument { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTrafficPolicyDocument() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9034,33 +7627,27 @@ public struct InvalidTrafficPolicyDocument: ClientRuntime.ModeledError, AWSClien } } -struct InvalidTrafficPolicyDocumentBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidTrafficPolicyDocumentBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension InvalidVPCId { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidVPCId() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension InvalidVPCId { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidVPCId() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9089,96 +7676,50 @@ public struct InvalidVPCId: ClientRuntime.ModeledError, AWSClientRuntime.AWSServ } } -struct InvalidVPCIdBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidVPCIdBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.KeySigningKey: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createdDate = "CreatedDate" - case dnskeyRecord = "DNSKEYRecord" - case dsRecord = "DSRecord" - case digestAlgorithmMnemonic = "DigestAlgorithmMnemonic" - case digestAlgorithmType = "DigestAlgorithmType" - case digestValue = "DigestValue" - case flag = "Flag" - case keyTag = "KeyTag" - case kmsArn = "KmsArn" - case lastModifiedDate = "LastModifiedDate" - case name = "Name" - case publicKey = "PublicKey" - case signingAlgorithmMnemonic = "SigningAlgorithmMnemonic" - case signingAlgorithmType = "SigningAlgorithmType" - case status = "Status" - case statusMessage = "StatusMessage" - } +extension Route53ClientTypes.KeySigningKey { static func writingClosure(_ value: Route53ClientTypes.KeySigningKey?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreatedDate")].writeTimestamp(value.createdDate, format: .dateTime) - try writer[.init("DNSKEYRecord")].write(value.dnskeyRecord) - try writer[.init("DSRecord")].write(value.dsRecord) - try writer[.init("DigestAlgorithmMnemonic")].write(value.digestAlgorithmMnemonic) - try writer[.init("DigestAlgorithmType")].write(value.digestAlgorithmType) - try writer[.init("DigestValue")].write(value.digestValue) - try writer[.init("Flag")].write(value.flag) - try writer[.init("KeyTag")].write(value.keyTag) - try writer[.init("KmsArn")].write(value.kmsArn) - try writer[.init("LastModifiedDate")].writeTimestamp(value.lastModifiedDate, format: .dateTime) - try writer[.init("Name")].write(value.name) - try writer[.init("PublicKey")].write(value.publicKey) - try writer[.init("SigningAlgorithmMnemonic")].write(value.signingAlgorithmMnemonic) - try writer[.init("SigningAlgorithmType")].write(value.signingAlgorithmType) - try writer[.init("Status")].write(value.status) - try writer[.init("StatusMessage")].write(value.statusMessage) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let kmsArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsArn) - kmsArn = kmsArnDecoded - let flagDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .flag) ?? 0 - flag = flagDecoded - let signingAlgorithmMnemonicDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .signingAlgorithmMnemonic) - signingAlgorithmMnemonic = signingAlgorithmMnemonicDecoded - let signingAlgorithmTypeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .signingAlgorithmType) ?? 0 - signingAlgorithmType = signingAlgorithmTypeDecoded - let digestAlgorithmMnemonicDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .digestAlgorithmMnemonic) - digestAlgorithmMnemonic = digestAlgorithmMnemonicDecoded - let digestAlgorithmTypeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .digestAlgorithmType) ?? 0 - digestAlgorithmType = digestAlgorithmTypeDecoded - let keyTagDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .keyTag) ?? 0 - keyTag = keyTagDecoded - let digestValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .digestValue) - digestValue = digestValueDecoded - let publicKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .publicKey) - publicKey = publicKeyDecoded - let dsRecordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dsRecord) - dsRecord = dsRecordDecoded - let dnskeyRecordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnskeyRecord) - dnskeyRecord = dnskeyRecordDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let statusMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusMessage) - statusMessage = statusMessageDecoded - let createdDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdDate) - createdDate = createdDateDecoded - let lastModifiedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModifiedDate) - lastModifiedDate = lastModifiedDateDecoded + try writer["CreatedDate"].writeTimestamp(value.createdDate, format: .dateTime) + try writer["DNSKEYRecord"].write(value.dnskeyRecord) + try writer["DSRecord"].write(value.dsRecord) + try writer["DigestAlgorithmMnemonic"].write(value.digestAlgorithmMnemonic) + try writer["DigestAlgorithmType"].write(value.digestAlgorithmType) + try writer["DigestValue"].write(value.digestValue) + try writer["Flag"].write(value.flag) + try writer["KeyTag"].write(value.keyTag) + try writer["KmsArn"].write(value.kmsArn) + try writer["LastModifiedDate"].writeTimestamp(value.lastModifiedDate, format: .dateTime) + try writer["Name"].write(value.name) + try writer["PublicKey"].write(value.publicKey) + try writer["SigningAlgorithmMnemonic"].write(value.signingAlgorithmMnemonic) + try writer["SigningAlgorithmType"].write(value.signingAlgorithmType) + try writer["Status"].write(value.status) + try writer["StatusMessage"].write(value.statusMessage) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.KeySigningKey() + value.name = try reader["Name"].readIfPresent() + value.kmsArn = try reader["KmsArn"].readIfPresent() + value.flag = try reader["Flag"].readIfPresent() ?? 0 + value.signingAlgorithmMnemonic = try reader["SigningAlgorithmMnemonic"].readIfPresent() + value.signingAlgorithmType = try reader["SigningAlgorithmType"].readIfPresent() ?? 0 + value.digestAlgorithmMnemonic = try reader["DigestAlgorithmMnemonic"].readIfPresent() + value.digestAlgorithmType = try reader["DigestAlgorithmType"].readIfPresent() ?? 0 + value.keyTag = try reader["KeyTag"].readIfPresent() ?? 0 + value.digestValue = try reader["DigestValue"].readIfPresent() + value.publicKey = try reader["PublicKey"].readIfPresent() + value.dsRecord = try reader["DSRecord"].readIfPresent() + value.dnskeyRecord = try reader["DNSKEYRecord"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.statusMessage = try reader["StatusMessage"].readIfPresent() + value.createdDate = try reader["CreatedDate"].readTimestampIfPresent(format: .dateTime) + value.lastModifiedDate = try reader["LastModifiedDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -9273,16 +7814,26 @@ extension Route53ClientTypes { } extension KeySigningKeyAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = KeySigningKeyAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension KeySigningKeyAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KeySigningKeyAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9310,33 +7861,27 @@ public struct KeySigningKeyAlreadyExists: ClientRuntime.ModeledError, AWSClientR } } -struct KeySigningKeyAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension KeySigningKeyAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension KeySigningKeyInParentDSRecord { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = KeySigningKeyInParentDSRecord() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension KeySigningKeyInParentDSRecord { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KeySigningKeyInParentDSRecord() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9364,33 +7909,27 @@ public struct KeySigningKeyInParentDSRecord: ClientRuntime.ModeledError, AWSClie } } -struct KeySigningKeyInParentDSRecordBody: Swift.Equatable { - let message: Swift.String? -} - -extension KeySigningKeyInParentDSRecordBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension KeySigningKeyInUse { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = KeySigningKeyInUse() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension KeySigningKeyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KeySigningKeyInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9418,33 +7957,27 @@ public struct KeySigningKeyInUse: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct KeySigningKeyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension KeySigningKeyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension KeySigningKeyWithActiveStatusNotFound { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = KeySigningKeyWithActiveStatusNotFound() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } -extension KeySigningKeyWithActiveStatusNotFound { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message +extension KeySigningKeyWithActiveStatusNotFound { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KeySigningKeyWithActiveStatusNotFound() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9472,33 +8005,27 @@ public struct KeySigningKeyWithActiveStatusNotFound: ClientRuntime.ModeledError, } } -struct KeySigningKeyWithActiveStatusNotFoundBody: Swift.Equatable { - let message: Swift.String? -} - -extension KeySigningKeyWithActiveStatusNotFoundBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension LastVPCAssociation { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = LastVPCAssociation() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension LastVPCAssociation { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LastVPCAssociation() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9527,33 +8054,27 @@ public struct LastVPCAssociation: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct LastVPCAssociationBody: Swift.Equatable { - let message: Swift.String? -} - -extension LastVPCAssociationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension LimitsExceeded { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = LimitsExceeded() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension LimitsExceeded { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitsExceeded() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9582,40 +8103,22 @@ public struct LimitsExceeded: ClientRuntime.ModeledError, AWSClientRuntime.AWSSe } } -struct LimitsExceededBody: Swift.Equatable { - let message: Swift.String? -} - -extension LimitsExceededBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.LinkedService: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case description = "Description" - case servicePrincipal = "ServicePrincipal" - } +extension Route53ClientTypes.LinkedService { static func writingClosure(_ value: Route53ClientTypes.LinkedService?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Description")].write(value.description) - try writer[.init("ServicePrincipal")].write(value.servicePrincipal) + try writer["Description"].write(value.description) + try writer["ServicePrincipal"].write(value.servicePrincipal) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let servicePrincipalDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .servicePrincipal) - servicePrincipal = servicePrincipalDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.LinkedService() + value.servicePrincipal = try reader["ServicePrincipal"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + return value + } } } @@ -9694,16 +8197,16 @@ public struct ListCidrBlocksInput: Swift.Equatable { } } -extension ListCidrBlocksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListCidrBlocksOutputBody = try responseDecoder.decode(responseBody: data) - self.cidrBlocks = output.cidrBlocks - self.nextToken = output.nextToken - } else { - self.cidrBlocks = nil - self.nextToken = nil +extension ListCidrBlocksOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListCidrBlocksOutput() + value.cidrBlocks = try reader["CidrBlocks"].readListIfPresent(memberReadingClosure: Route53ClientTypes.CidrBlockSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -9724,51 +8227,19 @@ public struct ListCidrBlocksOutput: Swift.Equatable { } } -struct ListCidrBlocksOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let cidrBlocks: [Route53ClientTypes.CidrBlockSummary]? -} - -extension ListCidrBlocksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrBlocks = "CidrBlocks" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.cidrBlocks) { - struct KeyVal0{struct member{}} - let cidrBlocksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cidrBlocks) - if let cidrBlocksWrappedContainer = cidrBlocksWrappedContainer { - let cidrBlocksContainer = try cidrBlocksWrappedContainer.decodeIfPresent([Route53ClientTypes.CidrBlockSummary].self, forKey: .member) - var cidrBlocksBuffer:[Route53ClientTypes.CidrBlockSummary]? = nil - if let cidrBlocksContainer = cidrBlocksContainer { - cidrBlocksBuffer = [Route53ClientTypes.CidrBlockSummary]() - for structureContainer0 in cidrBlocksContainer { - cidrBlocksBuffer?.append(structureContainer0) - } - } - cidrBlocks = cidrBlocksBuffer - } else { - cidrBlocks = [] - } - } else { - cidrBlocks = nil - } - } -} +enum ListCidrBlocksOutputError { -enum ListCidrBlocksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCidrCollectionException": return try await NoSuchCidrCollectionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCidrLocationException": return try await NoSuchCidrLocationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCidrCollectionException": return try await NoSuchCidrCollectionException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCidrLocationException": return try await NoSuchCidrLocationException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -9812,16 +8283,16 @@ public struct ListCidrCollectionsInput: Swift.Equatable { } } -extension ListCidrCollectionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListCidrCollectionsOutputBody = try responseDecoder.decode(responseBody: data) - self.cidrCollections = output.cidrCollections - self.nextToken = output.nextToken - } else { - self.cidrCollections = nil - self.nextToken = nil +extension ListCidrCollectionsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListCidrCollectionsOutput() + value.cidrCollections = try reader["CidrCollections"].readListIfPresent(memberReadingClosure: Route53ClientTypes.CollectionSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -9842,49 +8313,17 @@ public struct ListCidrCollectionsOutput: Swift.Equatable { } } -struct ListCidrCollectionsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let cidrCollections: [Route53ClientTypes.CollectionSummary]? -} - -extension ListCidrCollectionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrCollections = "CidrCollections" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.cidrCollections) { - struct KeyVal0{struct member{}} - let cidrCollectionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cidrCollections) - if let cidrCollectionsWrappedContainer = cidrCollectionsWrappedContainer { - let cidrCollectionsContainer = try cidrCollectionsWrappedContainer.decodeIfPresent([Route53ClientTypes.CollectionSummary].self, forKey: .member) - var cidrCollectionsBuffer:[Route53ClientTypes.CollectionSummary]? = nil - if let cidrCollectionsContainer = cidrCollectionsContainer { - cidrCollectionsBuffer = [Route53ClientTypes.CollectionSummary]() - for structureContainer0 in cidrCollectionsContainer { - cidrCollectionsBuffer?.append(structureContainer0) - } - } - cidrCollections = cidrCollectionsBuffer - } else { - cidrCollections = [] - } - } else { - cidrCollections = nil - } - } -} +enum ListCidrCollectionsOutputError { -enum ListCidrCollectionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -9936,16 +8375,16 @@ public struct ListCidrLocationsInput: Swift.Equatable { } } -extension ListCidrLocationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListCidrLocationsOutputBody = try responseDecoder.decode(responseBody: data) - self.cidrLocations = output.cidrLocations - self.nextToken = output.nextToken - } else { - self.cidrLocations = nil - self.nextToken = nil +extension ListCidrLocationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListCidrLocationsOutput() + value.cidrLocations = try reader["CidrLocations"].readListIfPresent(memberReadingClosure: Route53ClientTypes.LocationSummary.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -9966,50 +8405,18 @@ public struct ListCidrLocationsOutput: Swift.Equatable { } } -struct ListCidrLocationsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let cidrLocations: [Route53ClientTypes.LocationSummary]? -} - -extension ListCidrLocationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cidrLocations = "CidrLocations" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.cidrLocations) { - struct KeyVal0{struct member{}} - let cidrLocationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .cidrLocations) - if let cidrLocationsWrappedContainer = cidrLocationsWrappedContainer { - let cidrLocationsContainer = try cidrLocationsWrappedContainer.decodeIfPresent([Route53ClientTypes.LocationSummary].self, forKey: .member) - var cidrLocationsBuffer:[Route53ClientTypes.LocationSummary]? = nil - if let cidrLocationsContainer = cidrLocationsContainer { - cidrLocationsBuffer = [Route53ClientTypes.LocationSummary]() - for structureContainer0 in cidrLocationsContainer { - cidrLocationsBuffer?.append(structureContainer0) - } - } - cidrLocations = cidrLocationsBuffer - } else { - cidrLocations = [] - } - } else { - cidrLocations = nil - } - } -} +enum ListCidrLocationsOutputError { -enum ListCidrLocationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchCidrCollectionException": return try await NoSuchCidrCollectionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchCidrCollectionException": return try await NoSuchCidrCollectionException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10070,24 +8477,20 @@ public struct ListGeoLocationsInput: Swift.Equatable { } } -extension ListGeoLocationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListGeoLocationsOutputBody = try responseDecoder.decode(responseBody: data) - self.geoLocationDetailsList = output.geoLocationDetailsList - self.isTruncated = output.isTruncated - self.maxItems = output.maxItems - self.nextContinentCode = output.nextContinentCode - self.nextCountryCode = output.nextCountryCode - self.nextSubdivisionCode = output.nextSubdivisionCode - } else { - self.geoLocationDetailsList = nil - self.isTruncated = false - self.maxItems = nil - self.nextContinentCode = nil - self.nextCountryCode = nil - self.nextSubdivisionCode = nil +extension ListGeoLocationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListGeoLocationsOutput() + value.geoLocationDetailsList = try reader["GeoLocationDetailsList"].readListIfPresent(memberReadingClosure: Route53ClientTypes.GeoLocationDetails.readingClosure, memberNodeInfo: "GeoLocationDetails", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.maxItems = try reader["MaxItems"].readIfPresent() + value.nextContinentCode = try reader["NextContinentCode"].readIfPresent() + value.nextCountryCode = try reader["NextCountryCode"].readIfPresent() + value.nextSubdivisionCode = try reader["NextSubdivisionCode"].readIfPresent() + return value } } } @@ -10128,65 +8531,17 @@ public struct ListGeoLocationsOutput: Swift.Equatable { } } -struct ListGeoLocationsOutputBody: Swift.Equatable { - let geoLocationDetailsList: [Route53ClientTypes.GeoLocationDetails]? - let isTruncated: Swift.Bool - let nextContinentCode: Swift.String? - let nextCountryCode: Swift.String? - let nextSubdivisionCode: Swift.String? - let maxItems: Swift.Int? -} - -extension ListGeoLocationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case geoLocationDetailsList = "GeoLocationDetailsList" - case isTruncated = "IsTruncated" - case maxItems = "MaxItems" - case nextContinentCode = "NextContinentCode" - case nextCountryCode = "NextCountryCode" - case nextSubdivisionCode = "NextSubdivisionCode" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.geoLocationDetailsList) { - struct KeyVal0{struct GeoLocationDetails{}} - let geoLocationDetailsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .geoLocationDetailsList) - if let geoLocationDetailsListWrappedContainer = geoLocationDetailsListWrappedContainer { - let geoLocationDetailsListContainer = try geoLocationDetailsListWrappedContainer.decodeIfPresent([Route53ClientTypes.GeoLocationDetails].self, forKey: .member) - var geoLocationDetailsListBuffer:[Route53ClientTypes.GeoLocationDetails]? = nil - if let geoLocationDetailsListContainer = geoLocationDetailsListContainer { - geoLocationDetailsListBuffer = [Route53ClientTypes.GeoLocationDetails]() - for structureContainer0 in geoLocationDetailsListContainer { - geoLocationDetailsListBuffer?.append(structureContainer0) - } - } - geoLocationDetailsList = geoLocationDetailsListBuffer - } else { - geoLocationDetailsList = [] - } - } else { - geoLocationDetailsList = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let nextContinentCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextContinentCode) - nextContinentCode = nextContinentCodeDecoded - let nextCountryCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextCountryCode) - nextCountryCode = nextCountryCodeDecoded - let nextSubdivisionCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextSubdivisionCode) - nextSubdivisionCode = nextSubdivisionCodeDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListGeoLocationsOutputError { -enum ListGeoLocationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10231,22 +8586,19 @@ public struct ListHealthChecksInput: Swift.Equatable { } } -extension ListHealthChecksOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListHealthChecksOutputBody = try responseDecoder.decode(responseBody: data) - self.healthChecks = output.healthChecks - self.isTruncated = output.isTruncated - self.marker = output.marker - self.maxItems = output.maxItems - self.nextMarker = output.nextMarker - } else { - self.healthChecks = nil - self.isTruncated = false - self.marker = nil - self.maxItems = nil - self.nextMarker = nil +extension ListHealthChecksOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListHealthChecksOutput() + value.healthChecks = try reader["HealthChecks"].readListIfPresent(memberReadingClosure: Route53ClientTypes.HealthCheck.readingClosure, memberNodeInfo: "HealthCheck", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -10284,62 +8636,18 @@ public struct ListHealthChecksOutput: Swift.Equatable { } } -struct ListHealthChecksOutputBody: Swift.Equatable { - let healthChecks: [Route53ClientTypes.HealthCheck]? - let marker: Swift.String? - let isTruncated: Swift.Bool - let nextMarker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListHealthChecksOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthChecks = "HealthChecks" - case isTruncated = "IsTruncated" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.healthChecks) { - struct KeyVal0{struct HealthCheck{}} - let healthChecksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .healthChecks) - if let healthChecksWrappedContainer = healthChecksWrappedContainer { - let healthChecksContainer = try healthChecksWrappedContainer.decodeIfPresent([Route53ClientTypes.HealthCheck].self, forKey: .member) - var healthChecksBuffer:[Route53ClientTypes.HealthCheck]? = nil - if let healthChecksContainer = healthChecksContainer { - healthChecksBuffer = [Route53ClientTypes.HealthCheck]() - for structureContainer0 in healthChecksContainer { - healthChecksBuffer?.append(structureContainer0) - } - } - healthChecks = healthChecksBuffer - } else { - healthChecks = [] - } - } else { - healthChecks = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListHealthChecksOutputError { -enum ListHealthChecksOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "IncompatibleVersion": return try await IncompatibleVersion(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "IncompatibleVersion": return try await IncompatibleVersion.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10392,26 +8700,21 @@ public struct ListHostedZonesByNameInput: Swift.Equatable { } } -extension ListHostedZonesByNameOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListHostedZonesByNameOutputBody = try responseDecoder.decode(responseBody: data) - self.dnsName = output.dnsName - self.hostedZoneId = output.hostedZoneId - self.hostedZones = output.hostedZones - self.isTruncated = output.isTruncated - self.maxItems = output.maxItems - self.nextDNSName = output.nextDNSName - self.nextHostedZoneId = output.nextHostedZoneId - } else { - self.dnsName = nil - self.hostedZoneId = nil - self.hostedZones = nil - self.isTruncated = false - self.maxItems = nil - self.nextDNSName = nil - self.nextHostedZoneId = nil +extension ListHostedZonesByNameOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListHostedZonesByNameOutput() + value.dnsName = try reader["DNSName"].readIfPresent() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.hostedZones = try reader["HostedZones"].readListIfPresent(memberReadingClosure: Route53ClientTypes.HostedZone.readingClosure, memberNodeInfo: "HostedZone", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.maxItems = try reader["MaxItems"].readIfPresent() + value.nextDNSName = try reader["NextDNSName"].readIfPresent() + value.nextHostedZoneId = try reader["NextHostedZoneId"].readIfPresent() + return value } } } @@ -10456,70 +8759,18 @@ public struct ListHostedZonesByNameOutput: Swift.Equatable { } } -struct ListHostedZonesByNameOutputBody: Swift.Equatable { - let hostedZones: [Route53ClientTypes.HostedZone]? - let dnsName: Swift.String? - let hostedZoneId: Swift.String? - let isTruncated: Swift.Bool - let nextDNSName: Swift.String? - let nextHostedZoneId: Swift.String? - let maxItems: Swift.Int? -} - -extension ListHostedZonesByNameOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dnsName = "DNSName" - case hostedZoneId = "HostedZoneId" - case hostedZones = "HostedZones" - case isTruncated = "IsTruncated" - case maxItems = "MaxItems" - case nextDNSName = "NextDNSName" - case nextHostedZoneId = "NextHostedZoneId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.hostedZones) { - struct KeyVal0{struct HostedZone{}} - let hostedZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostedZones) - if let hostedZonesWrappedContainer = hostedZonesWrappedContainer { - let hostedZonesContainer = try hostedZonesWrappedContainer.decodeIfPresent([Route53ClientTypes.HostedZone].self, forKey: .member) - var hostedZonesBuffer:[Route53ClientTypes.HostedZone]? = nil - if let hostedZonesContainer = hostedZonesContainer { - hostedZonesBuffer = [Route53ClientTypes.HostedZone]() - for structureContainer0 in hostedZonesContainer { - hostedZonesBuffer?.append(structureContainer0) - } - } - hostedZones = hostedZonesBuffer - } else { - hostedZones = [] - } - } else { - hostedZones = nil - } - let dnsNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dnsName) - dnsName = dnsNameDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let nextDNSNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextDNSName) - nextDNSName = nextDNSNameDecoded - let nextHostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextHostedZoneId) - nextHostedZoneId = nextHostedZoneIdDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListHostedZonesByNameOutputError { -enum ListHostedZonesByNameOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidDomainName": return try await InvalidDomainName(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidDomainName": return try await InvalidDomainName.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10586,18 +8837,17 @@ public struct ListHostedZonesByVPCInput: Swift.Equatable { } } -extension ListHostedZonesByVPCOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListHostedZonesByVPCOutputBody = try responseDecoder.decode(responseBody: data) - self.hostedZoneSummaries = output.hostedZoneSummaries - self.maxItems = output.maxItems - self.nextToken = output.nextToken - } else { - self.hostedZoneSummaries = nil - self.maxItems = nil - self.nextToken = nil +extension ListHostedZonesByVPCOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListHostedZonesByVPCOutput() + value.hostedZoneSummaries = try reader["HostedZoneSummaries"].readListIfPresent(memberReadingClosure: Route53ClientTypes.HostedZoneSummary.readingClosure, memberNodeInfo: "HostedZoneSummary", isFlattened: false) + value.maxItems = try reader["MaxItems"].readIfPresent() + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -10624,54 +8874,18 @@ public struct ListHostedZonesByVPCOutput: Swift.Equatable { } } -struct ListHostedZonesByVPCOutputBody: Swift.Equatable { - let hostedZoneSummaries: [Route53ClientTypes.HostedZoneSummary]? - let maxItems: Swift.Int? - let nextToken: Swift.String? -} - -extension ListHostedZonesByVPCOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneSummaries = "HostedZoneSummaries" - case maxItems = "MaxItems" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.hostedZoneSummaries) { - struct KeyVal0{struct HostedZoneSummary{}} - let hostedZoneSummariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostedZoneSummaries) - if let hostedZoneSummariesWrappedContainer = hostedZoneSummariesWrappedContainer { - let hostedZoneSummariesContainer = try hostedZoneSummariesWrappedContainer.decodeIfPresent([Route53ClientTypes.HostedZoneSummary].self, forKey: .member) - var hostedZoneSummariesBuffer:[Route53ClientTypes.HostedZoneSummary]? = nil - if let hostedZoneSummariesContainer = hostedZoneSummariesContainer { - hostedZoneSummariesBuffer = [Route53ClientTypes.HostedZoneSummary]() - for structureContainer0 in hostedZoneSummariesContainer { - hostedZoneSummariesBuffer?.append(structureContainer0) - } - } - hostedZoneSummaries = hostedZoneSummariesBuffer - } else { - hostedZoneSummaries = [] - } - } else { - hostedZoneSummaries = nil - } - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +enum ListHostedZonesByVPCOutputError { -enum ListHostedZonesByVPCOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidPaginationToken": return try await InvalidPaginationToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidPaginationToken": return try await InvalidPaginationToken.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10732,22 +8946,19 @@ public struct ListHostedZonesInput: Swift.Equatable { } } -extension ListHostedZonesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListHostedZonesOutputBody = try responseDecoder.decode(responseBody: data) - self.hostedZones = output.hostedZones - self.isTruncated = output.isTruncated - self.marker = output.marker - self.maxItems = output.maxItems - self.nextMarker = output.nextMarker - } else { - self.hostedZones = nil - self.isTruncated = false - self.marker = nil - self.maxItems = nil - self.nextMarker = nil +extension ListHostedZonesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListHostedZonesOutput() + value.hostedZones = try reader["HostedZones"].readListIfPresent(memberReadingClosure: Route53ClientTypes.HostedZone.readingClosure, memberNodeInfo: "HostedZone", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -10784,63 +8995,19 @@ public struct ListHostedZonesOutput: Swift.Equatable { } } -struct ListHostedZonesOutputBody: Swift.Equatable { - let hostedZones: [Route53ClientTypes.HostedZone]? - let marker: Swift.String? - let isTruncated: Swift.Bool - let nextMarker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListHostedZonesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZones = "HostedZones" - case isTruncated = "IsTruncated" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.hostedZones) { - struct KeyVal0{struct HostedZone{}} - let hostedZonesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .hostedZones) - if let hostedZonesWrappedContainer = hostedZonesWrappedContainer { - let hostedZonesContainer = try hostedZonesWrappedContainer.decodeIfPresent([Route53ClientTypes.HostedZone].self, forKey: .member) - var hostedZonesBuffer:[Route53ClientTypes.HostedZone]? = nil - if let hostedZonesContainer = hostedZonesContainer { - hostedZonesBuffer = [Route53ClientTypes.HostedZone]() - for structureContainer0 in hostedZonesContainer { - hostedZonesBuffer?.append(structureContainer0) - } - } - hostedZones = hostedZonesBuffer - } else { - hostedZones = [] - } - } else { - hostedZones = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListHostedZonesOutputError { -enum ListHostedZonesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "DelegationSetNotReusable": return try await DelegationSetNotReusable(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchDelegationSet": return try await NoSuchDelegationSet(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "DelegationSetNotReusable": return try await DelegationSetNotReusable.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchDelegationSet": return try await NoSuchDelegationSet.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10892,16 +9059,16 @@ public struct ListQueryLoggingConfigsInput: Swift.Equatable { } } -extension ListQueryLoggingConfigsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListQueryLoggingConfigsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.queryLoggingConfigs = output.queryLoggingConfigs - } else { - self.nextToken = nil - self.queryLoggingConfigs = nil +extension ListQueryLoggingConfigsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListQueryLoggingConfigsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.queryLoggingConfigs = try reader["QueryLoggingConfigs"].readListIfPresent(memberReadingClosure: Route53ClientTypes.QueryLoggingConfig.readingClosure, memberNodeInfo: "QueryLoggingConfig", isFlattened: false) + return value } } } @@ -10923,51 +9090,19 @@ public struct ListQueryLoggingConfigsOutput: Swift.Equatable { } } -struct ListQueryLoggingConfigsOutputBody: Swift.Equatable { - let queryLoggingConfigs: [Route53ClientTypes.QueryLoggingConfig]? - let nextToken: Swift.String? -} - -extension ListQueryLoggingConfigsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case queryLoggingConfigs = "QueryLoggingConfigs" - } +enum ListQueryLoggingConfigsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.queryLoggingConfigs) { - struct KeyVal0{struct QueryLoggingConfig{}} - let queryLoggingConfigsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .queryLoggingConfigs) - if let queryLoggingConfigsWrappedContainer = queryLoggingConfigsWrappedContainer { - let queryLoggingConfigsContainer = try queryLoggingConfigsWrappedContainer.decodeIfPresent([Route53ClientTypes.QueryLoggingConfig].self, forKey: .member) - var queryLoggingConfigsBuffer:[Route53ClientTypes.QueryLoggingConfig]? = nil - if let queryLoggingConfigsContainer = queryLoggingConfigsContainer { - queryLoggingConfigsBuffer = [Route53ClientTypes.QueryLoggingConfig]() - for structureContainer0 in queryLoggingConfigsContainer { - queryLoggingConfigsBuffer?.append(structureContainer0) - } - } - queryLoggingConfigs = queryLoggingConfigsBuffer - } else { - queryLoggingConfigs = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidPaginationToken": return try await InvalidPaginationToken.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - queryLoggingConfigs = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListQueryLoggingConfigsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidPaginationToken": return try await InvalidPaginationToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -11078,24 +9213,20 @@ public struct ListResourceRecordSetsInput: Swift.Equatable { } } -extension ListResourceRecordSetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListResourceRecordSetsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.maxItems = output.maxItems - self.nextRecordIdentifier = output.nextRecordIdentifier - self.nextRecordName = output.nextRecordName - self.nextRecordType = output.nextRecordType - self.resourceRecordSets = output.resourceRecordSets - } else { - self.isTruncated = false - self.maxItems = nil - self.nextRecordIdentifier = nil - self.nextRecordName = nil - self.nextRecordType = nil - self.resourceRecordSets = nil +extension ListResourceRecordSetsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListResourceRecordSetsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.maxItems = try reader["MaxItems"].readIfPresent() + value.nextRecordIdentifier = try reader["NextRecordIdentifier"].readIfPresent() + value.nextRecordName = try reader["NextRecordName"].readIfPresent() + value.nextRecordType = try reader["NextRecordType"].readIfPresent() + value.resourceRecordSets = try reader["ResourceRecordSets"].readListIfPresent(memberReadingClosure: Route53ClientTypes.ResourceRecordSet.readingClosure, memberNodeInfo: "ResourceRecordSet", isFlattened: false) + return value } } } @@ -11136,66 +9267,18 @@ public struct ListResourceRecordSetsOutput: Swift.Equatable { } } -struct ListResourceRecordSetsOutputBody: Swift.Equatable { - let resourceRecordSets: [Route53ClientTypes.ResourceRecordSet]? - let isTruncated: Swift.Bool - let nextRecordName: Swift.String? - let nextRecordType: Route53ClientTypes.RRType? - let nextRecordIdentifier: Swift.String? - let maxItems: Swift.Int? -} - -extension ListResourceRecordSetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case maxItems = "MaxItems" - case nextRecordIdentifier = "NextRecordIdentifier" - case nextRecordName = "NextRecordName" - case nextRecordType = "NextRecordType" - case resourceRecordSets = "ResourceRecordSets" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.resourceRecordSets) { - struct KeyVal0{struct ResourceRecordSet{}} - let resourceRecordSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceRecordSets) - if let resourceRecordSetsWrappedContainer = resourceRecordSetsWrappedContainer { - let resourceRecordSetsContainer = try resourceRecordSetsWrappedContainer.decodeIfPresent([Route53ClientTypes.ResourceRecordSet].self, forKey: .member) - var resourceRecordSetsBuffer:[Route53ClientTypes.ResourceRecordSet]? = nil - if let resourceRecordSetsContainer = resourceRecordSetsContainer { - resourceRecordSetsBuffer = [Route53ClientTypes.ResourceRecordSet]() - for structureContainer0 in resourceRecordSetsContainer { - resourceRecordSetsBuffer?.append(structureContainer0) - } - } - resourceRecordSets = resourceRecordSetsBuffer - } else { - resourceRecordSets = [] - } - } else { - resourceRecordSets = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let nextRecordNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextRecordName) - nextRecordName = nextRecordNameDecoded - let nextRecordTypeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .nextRecordType) - nextRecordType = nextRecordTypeDecoded - let nextRecordIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextRecordIdentifier) - nextRecordIdentifier = nextRecordIdentifierDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListResourceRecordSetsOutputError { -enum ListResourceRecordSetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11240,22 +9323,19 @@ public struct ListReusableDelegationSetsInput: Swift.Equatable { } } -extension ListReusableDelegationSetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListReusableDelegationSetsOutputBody = try responseDecoder.decode(responseBody: data) - self.delegationSets = output.delegationSets - self.isTruncated = output.isTruncated - self.marker = output.marker - self.maxItems = output.maxItems - self.nextMarker = output.nextMarker - } else { - self.delegationSets = nil - self.isTruncated = false - self.marker = nil - self.maxItems = nil - self.nextMarker = nil +extension ListReusableDelegationSetsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListReusableDelegationSetsOutput() + value.delegationSets = try reader["DelegationSets"].readListIfPresent(memberReadingClosure: Route53ClientTypes.DelegationSet.readingClosure, memberNodeInfo: "DelegationSet", isFlattened: false) + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.marker = try reader["Marker"].readIfPresent() + value.maxItems = try reader["MaxItems"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + return value } } } @@ -11293,61 +9373,17 @@ public struct ListReusableDelegationSetsOutput: Swift.Equatable { } } -struct ListReusableDelegationSetsOutputBody: Swift.Equatable { - let delegationSets: [Route53ClientTypes.DelegationSet]? - let marker: Swift.String? - let isTruncated: Swift.Bool - let nextMarker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListReusableDelegationSetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delegationSets = "DelegationSets" - case isTruncated = "IsTruncated" - case marker = "Marker" - case maxItems = "MaxItems" - case nextMarker = "NextMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.delegationSets) { - struct KeyVal0{struct DelegationSet{}} - let delegationSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .delegationSets) - if let delegationSetsWrappedContainer = delegationSetsWrappedContainer { - let delegationSetsContainer = try delegationSetsWrappedContainer.decodeIfPresent([Route53ClientTypes.DelegationSet].self, forKey: .member) - var delegationSetsBuffer:[Route53ClientTypes.DelegationSet]? = nil - if let delegationSetsContainer = delegationSetsContainer { - delegationSetsBuffer = [Route53ClientTypes.DelegationSet]() - for structureContainer0 in delegationSetsContainer { - delegationSetsBuffer?.append(structureContainer0) - } - } - delegationSets = delegationSetsBuffer - } else { - delegationSets = [] - } - } else { - delegationSets = nil - } - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListReusableDelegationSetsOutputError { -enum ListReusableDelegationSetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11388,14 +9424,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.resourceTagSet = output.resourceTagSet - } else { - self.resourceTagSet = nil +extension ListTagsForResourceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTagsForResourceOutput() + value.resourceTagSet = try reader["ResourceTagSet"].readIfPresent(readingClosure: Route53ClientTypes.ResourceTagSet.readingClosure) + return value } } } @@ -11414,44 +9451,29 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let resourceTagSet: Route53ClientTypes.ResourceTagSet? -} - -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceTagSet = "ResourceTagSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTagSetDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ResourceTagSet.self, forKey: .resourceTagSet) - resourceTagSet = resourceTagSetDecoded - } -} +enum ListTagsForResourceOutputError { -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ThrottlingException": return try await ThrottlingException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension ListTagsForResourcesInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceIds = "ResourceIds" - } - static func writingClosure(_ value: ListTagsForResourcesInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ResourceIds")].writeList(value.resourceIds, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("ResourceId"), isFlattened: false) + try writer["ResourceIds"].writeList(value.resourceIds, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "ResourceId", isFlattened: false) } } @@ -11488,47 +9510,15 @@ public struct ListTagsForResourcesInput: Swift.Equatable { } } -struct ListTagsForResourcesInputBody: Swift.Equatable { - let resourceIds: [Swift.String]? -} - -extension ListTagsForResourcesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceIds = "ResourceIds" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.resourceIds) { - struct KeyVal0{struct ResourceId{}} - let resourceIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceIds) - if let resourceIdsWrappedContainer = resourceIdsWrappedContainer { - let resourceIdsContainer = try resourceIdsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var resourceIdsBuffer:[Swift.String]? = nil - if let resourceIdsContainer = resourceIdsContainer { - resourceIdsBuffer = [Swift.String]() - for stringContainer0 in resourceIdsContainer { - resourceIdsBuffer?.append(stringContainer0) - } - } - resourceIds = resourceIdsBuffer - } else { - resourceIds = [] - } - } else { - resourceIds = nil - } - } -} +extension ListTagsForResourcesOutput { -extension ListTagsForResourcesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourcesOutputBody = try responseDecoder.decode(responseBody: data) - self.resourceTagSets = output.resourceTagSets - } else { - self.resourceTagSets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTagsForResourcesOutput() + value.resourceTagSets = try reader["ResourceTagSets"].readListIfPresent(memberReadingClosure: Route53ClientTypes.ResourceTagSet.readingClosure, memberNodeInfo: "ResourceTagSet", isFlattened: false) + return value } } } @@ -11547,49 +9537,21 @@ public struct ListTagsForResourcesOutput: Swift.Equatable { } } -struct ListTagsForResourcesOutputBody: Swift.Equatable { - let resourceTagSets: [Route53ClientTypes.ResourceTagSet]? -} - -extension ListTagsForResourcesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceTagSets = "ResourceTagSets" - } +enum ListTagsForResourcesOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.resourceTagSets) { - struct KeyVal0{struct ResourceTagSet{}} - let resourceTagSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceTagSets) - if let resourceTagSetsWrappedContainer = resourceTagSetsWrappedContainer { - let resourceTagSetsContainer = try resourceTagSetsWrappedContainer.decodeIfPresent([Route53ClientTypes.ResourceTagSet].self, forKey: .member) - var resourceTagSetsBuffer:[Route53ClientTypes.ResourceTagSet]? = nil - if let resourceTagSetsContainer = resourceTagSetsContainer { - resourceTagSetsBuffer = [Route53ClientTypes.ResourceTagSet]() - for structureContainer0 in resourceTagSetsContainer { - resourceTagSetsBuffer?.append(structureContainer0) - } - } - resourceTagSets = resourceTagSetsBuffer - } else { - resourceTagSets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "ThrottlingException": return try await ThrottlingException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - resourceTagSets = nil - } - } -} - -enum ListTagsForResourcesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ThrottlingException": return try await ThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -11634,20 +9596,18 @@ public struct ListTrafficPoliciesInput: Swift.Equatable { } } -extension ListTrafficPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTrafficPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.maxItems = output.maxItems - self.trafficPolicyIdMarker = output.trafficPolicyIdMarker - self.trafficPolicySummaries = output.trafficPolicySummaries - } else { - self.isTruncated = false - self.maxItems = nil - self.trafficPolicyIdMarker = nil - self.trafficPolicySummaries = nil +extension ListTrafficPoliciesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTrafficPoliciesOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.maxItems = try reader["MaxItems"].readIfPresent() + value.trafficPolicyIdMarker = try reader["TrafficPolicyIdMarker"].readIfPresent() + value.trafficPolicySummaries = try reader["TrafficPolicySummaries"].readListIfPresent(memberReadingClosure: Route53ClientTypes.TrafficPolicySummary.readingClosure, memberNodeInfo: "TrafficPolicySummary", isFlattened: false) + return value } } } @@ -11681,57 +9641,17 @@ public struct ListTrafficPoliciesOutput: Swift.Equatable { } } -struct ListTrafficPoliciesOutputBody: Swift.Equatable { - let trafficPolicySummaries: [Route53ClientTypes.TrafficPolicySummary]? - let isTruncated: Swift.Bool - let trafficPolicyIdMarker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListTrafficPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case maxItems = "MaxItems" - case trafficPolicyIdMarker = "TrafficPolicyIdMarker" - case trafficPolicySummaries = "TrafficPolicySummaries" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficPolicySummaries) { - struct KeyVal0{struct TrafficPolicySummary{}} - let trafficPolicySummariesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficPolicySummaries) - if let trafficPolicySummariesWrappedContainer = trafficPolicySummariesWrappedContainer { - let trafficPolicySummariesContainer = try trafficPolicySummariesWrappedContainer.decodeIfPresent([Route53ClientTypes.TrafficPolicySummary].self, forKey: .member) - var trafficPolicySummariesBuffer:[Route53ClientTypes.TrafficPolicySummary]? = nil - if let trafficPolicySummariesContainer = trafficPolicySummariesContainer { - trafficPolicySummariesBuffer = [Route53ClientTypes.TrafficPolicySummary]() - for structureContainer0 in trafficPolicySummariesContainer { - trafficPolicySummariesBuffer?.append(structureContainer0) - } - } - trafficPolicySummaries = trafficPolicySummariesBuffer - } else { - trafficPolicySummaries = [] - } - } else { - trafficPolicySummaries = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let trafficPolicyIdMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyIdMarker) - trafficPolicyIdMarker = trafficPolicyIdMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListTrafficPoliciesOutputError { -enum ListTrafficPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11795,22 +9715,19 @@ public struct ListTrafficPolicyInstancesByHostedZoneInput: Swift.Equatable { } } -extension ListTrafficPolicyInstancesByHostedZoneOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTrafficPolicyInstancesByHostedZoneOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.maxItems = output.maxItems - self.trafficPolicyInstanceNameMarker = output.trafficPolicyInstanceNameMarker - self.trafficPolicyInstanceTypeMarker = output.trafficPolicyInstanceTypeMarker - self.trafficPolicyInstances = output.trafficPolicyInstances - } else { - self.isTruncated = false - self.maxItems = nil - self.trafficPolicyInstanceNameMarker = nil - self.trafficPolicyInstanceTypeMarker = nil - self.trafficPolicyInstances = nil +extension ListTrafficPolicyInstancesByHostedZoneOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTrafficPolicyInstancesByHostedZoneOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.maxItems = try reader["MaxItems"].readIfPresent() + value.trafficPolicyInstanceNameMarker = try reader["TrafficPolicyInstanceNameMarker"].readIfPresent() + value.trafficPolicyInstanceTypeMarker = try reader["TrafficPolicyInstanceTypeMarker"].readIfPresent() + value.trafficPolicyInstances = try reader["TrafficPolicyInstances"].readListIfPresent(memberReadingClosure: Route53ClientTypes.TrafficPolicyInstance.readingClosure, memberNodeInfo: "TrafficPolicyInstance", isFlattened: false) + return value } } } @@ -11847,63 +9764,19 @@ public struct ListTrafficPolicyInstancesByHostedZoneOutput: Swift.Equatable { } } -struct ListTrafficPolicyInstancesByHostedZoneOutputBody: Swift.Equatable { - let trafficPolicyInstances: [Route53ClientTypes.TrafficPolicyInstance]? - let trafficPolicyInstanceNameMarker: Swift.String? - let trafficPolicyInstanceTypeMarker: Route53ClientTypes.RRType? - let isTruncated: Swift.Bool - let maxItems: Swift.Int? -} - -extension ListTrafficPolicyInstancesByHostedZoneOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case maxItems = "MaxItems" - case trafficPolicyInstanceNameMarker = "TrafficPolicyInstanceNameMarker" - case trafficPolicyInstanceTypeMarker = "TrafficPolicyInstanceTypeMarker" - case trafficPolicyInstances = "TrafficPolicyInstances" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficPolicyInstances) { - struct KeyVal0{struct TrafficPolicyInstance{}} - let trafficPolicyInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficPolicyInstances) - if let trafficPolicyInstancesWrappedContainer = trafficPolicyInstancesWrappedContainer { - let trafficPolicyInstancesContainer = try trafficPolicyInstancesWrappedContainer.decodeIfPresent([Route53ClientTypes.TrafficPolicyInstance].self, forKey: .member) - var trafficPolicyInstancesBuffer:[Route53ClientTypes.TrafficPolicyInstance]? = nil - if let trafficPolicyInstancesContainer = trafficPolicyInstancesContainer { - trafficPolicyInstancesBuffer = [Route53ClientTypes.TrafficPolicyInstance]() - for structureContainer0 in trafficPolicyInstancesContainer { - trafficPolicyInstancesBuffer?.append(structureContainer0) - } - } - trafficPolicyInstances = trafficPolicyInstancesBuffer - } else { - trafficPolicyInstances = [] - } - } else { - trafficPolicyInstances = nil - } - let trafficPolicyInstanceNameMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyInstanceNameMarker) - trafficPolicyInstanceNameMarker = trafficPolicyInstanceNameMarkerDecoded - let trafficPolicyInstanceTypeMarkerDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .trafficPolicyInstanceTypeMarker) - trafficPolicyInstanceTypeMarker = trafficPolicyInstanceTypeMarkerDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListTrafficPolicyInstancesByHostedZoneOutputError { -enum ListTrafficPolicyInstancesByHostedZoneOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11986,24 +9859,20 @@ public struct ListTrafficPolicyInstancesByPolicyInput: Swift.Equatable { } } -extension ListTrafficPolicyInstancesByPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTrafficPolicyInstancesByPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.hostedZoneIdMarker = output.hostedZoneIdMarker - self.isTruncated = output.isTruncated - self.maxItems = output.maxItems - self.trafficPolicyInstanceNameMarker = output.trafficPolicyInstanceNameMarker - self.trafficPolicyInstanceTypeMarker = output.trafficPolicyInstanceTypeMarker - self.trafficPolicyInstances = output.trafficPolicyInstances - } else { - self.hostedZoneIdMarker = nil - self.isTruncated = false - self.maxItems = nil - self.trafficPolicyInstanceNameMarker = nil - self.trafficPolicyInstanceTypeMarker = nil - self.trafficPolicyInstances = nil +extension ListTrafficPolicyInstancesByPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTrafficPolicyInstancesByPolicyOutput() + value.hostedZoneIdMarker = try reader["HostedZoneIdMarker"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.maxItems = try reader["MaxItems"].readIfPresent() + value.trafficPolicyInstanceNameMarker = try reader["TrafficPolicyInstanceNameMarker"].readIfPresent() + value.trafficPolicyInstanceTypeMarker = try reader["TrafficPolicyInstanceTypeMarker"].readIfPresent() + value.trafficPolicyInstances = try reader["TrafficPolicyInstances"].readListIfPresent(memberReadingClosure: Route53ClientTypes.TrafficPolicyInstance.readingClosure, memberNodeInfo: "TrafficPolicyInstance", isFlattened: false) + return value } } } @@ -12044,67 +9913,19 @@ public struct ListTrafficPolicyInstancesByPolicyOutput: Swift.Equatable { } } -struct ListTrafficPolicyInstancesByPolicyOutputBody: Swift.Equatable { - let trafficPolicyInstances: [Route53ClientTypes.TrafficPolicyInstance]? - let hostedZoneIdMarker: Swift.String? - let trafficPolicyInstanceNameMarker: Swift.String? - let trafficPolicyInstanceTypeMarker: Route53ClientTypes.RRType? - let isTruncated: Swift.Bool - let maxItems: Swift.Int? -} - -extension ListTrafficPolicyInstancesByPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneIdMarker = "HostedZoneIdMarker" - case isTruncated = "IsTruncated" - case maxItems = "MaxItems" - case trafficPolicyInstanceNameMarker = "TrafficPolicyInstanceNameMarker" - case trafficPolicyInstanceTypeMarker = "TrafficPolicyInstanceTypeMarker" - case trafficPolicyInstances = "TrafficPolicyInstances" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficPolicyInstances) { - struct KeyVal0{struct TrafficPolicyInstance{}} - let trafficPolicyInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficPolicyInstances) - if let trafficPolicyInstancesWrappedContainer = trafficPolicyInstancesWrappedContainer { - let trafficPolicyInstancesContainer = try trafficPolicyInstancesWrappedContainer.decodeIfPresent([Route53ClientTypes.TrafficPolicyInstance].self, forKey: .member) - var trafficPolicyInstancesBuffer:[Route53ClientTypes.TrafficPolicyInstance]? = nil - if let trafficPolicyInstancesContainer = trafficPolicyInstancesContainer { - trafficPolicyInstancesBuffer = [Route53ClientTypes.TrafficPolicyInstance]() - for structureContainer0 in trafficPolicyInstancesContainer { - trafficPolicyInstancesBuffer?.append(structureContainer0) - } - } - trafficPolicyInstances = trafficPolicyInstancesBuffer - } else { - trafficPolicyInstances = [] - } - } else { - trafficPolicyInstances = nil - } - let hostedZoneIdMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneIdMarker) - hostedZoneIdMarker = hostedZoneIdMarkerDecoded - let trafficPolicyInstanceNameMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyInstanceNameMarker) - trafficPolicyInstanceNameMarker = trafficPolicyInstanceNameMarkerDecoded - let trafficPolicyInstanceTypeMarkerDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .trafficPolicyInstanceTypeMarker) - trafficPolicyInstanceTypeMarker = trafficPolicyInstanceTypeMarkerDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListTrafficPolicyInstancesByPolicyOutputError { -enum ListTrafficPolicyInstancesByPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -12165,24 +9986,20 @@ public struct ListTrafficPolicyInstancesInput: Swift.Equatable { } } -extension ListTrafficPolicyInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTrafficPolicyInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.hostedZoneIdMarker = output.hostedZoneIdMarker - self.isTruncated = output.isTruncated - self.maxItems = output.maxItems - self.trafficPolicyInstanceNameMarker = output.trafficPolicyInstanceNameMarker - self.trafficPolicyInstanceTypeMarker = output.trafficPolicyInstanceTypeMarker - self.trafficPolicyInstances = output.trafficPolicyInstances - } else { - self.hostedZoneIdMarker = nil - self.isTruncated = false - self.maxItems = nil - self.trafficPolicyInstanceNameMarker = nil - self.trafficPolicyInstanceTypeMarker = nil - self.trafficPolicyInstances = nil +extension ListTrafficPolicyInstancesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTrafficPolicyInstancesOutput() + value.hostedZoneIdMarker = try reader["HostedZoneIdMarker"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.maxItems = try reader["MaxItems"].readIfPresent() + value.trafficPolicyInstanceNameMarker = try reader["TrafficPolicyInstanceNameMarker"].readIfPresent() + value.trafficPolicyInstanceTypeMarker = try reader["TrafficPolicyInstanceTypeMarker"].readIfPresent() + value.trafficPolicyInstances = try reader["TrafficPolicyInstances"].readListIfPresent(memberReadingClosure: Route53ClientTypes.TrafficPolicyInstance.readingClosure, memberNodeInfo: "TrafficPolicyInstance", isFlattened: false) + return value } } } @@ -12223,66 +10040,18 @@ public struct ListTrafficPolicyInstancesOutput: Swift.Equatable { } } -struct ListTrafficPolicyInstancesOutputBody: Swift.Equatable { - let trafficPolicyInstances: [Route53ClientTypes.TrafficPolicyInstance]? - let hostedZoneIdMarker: Swift.String? - let trafficPolicyInstanceNameMarker: Swift.String? - let trafficPolicyInstanceTypeMarker: Route53ClientTypes.RRType? - let isTruncated: Swift.Bool - let maxItems: Swift.Int? -} - -extension ListTrafficPolicyInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneIdMarker = "HostedZoneIdMarker" - case isTruncated = "IsTruncated" - case maxItems = "MaxItems" - case trafficPolicyInstanceNameMarker = "TrafficPolicyInstanceNameMarker" - case trafficPolicyInstanceTypeMarker = "TrafficPolicyInstanceTypeMarker" - case trafficPolicyInstances = "TrafficPolicyInstances" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficPolicyInstances) { - struct KeyVal0{struct TrafficPolicyInstance{}} - let trafficPolicyInstancesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficPolicyInstances) - if let trafficPolicyInstancesWrappedContainer = trafficPolicyInstancesWrappedContainer { - let trafficPolicyInstancesContainer = try trafficPolicyInstancesWrappedContainer.decodeIfPresent([Route53ClientTypes.TrafficPolicyInstance].self, forKey: .member) - var trafficPolicyInstancesBuffer:[Route53ClientTypes.TrafficPolicyInstance]? = nil - if let trafficPolicyInstancesContainer = trafficPolicyInstancesContainer { - trafficPolicyInstancesBuffer = [Route53ClientTypes.TrafficPolicyInstance]() - for structureContainer0 in trafficPolicyInstancesContainer { - trafficPolicyInstancesBuffer?.append(structureContainer0) - } - } - trafficPolicyInstances = trafficPolicyInstancesBuffer - } else { - trafficPolicyInstances = [] - } - } else { - trafficPolicyInstances = nil - } - let hostedZoneIdMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneIdMarker) - hostedZoneIdMarker = hostedZoneIdMarkerDecoded - let trafficPolicyInstanceNameMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyInstanceNameMarker) - trafficPolicyInstanceNameMarker = trafficPolicyInstanceNameMarkerDecoded - let trafficPolicyInstanceTypeMarkerDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .trafficPolicyInstanceTypeMarker) - trafficPolicyInstanceTypeMarker = trafficPolicyInstanceTypeMarkerDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListTrafficPolicyInstancesOutputError { -enum ListTrafficPolicyInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -12335,20 +10104,18 @@ public struct ListTrafficPolicyVersionsInput: Swift.Equatable { } } -extension ListTrafficPolicyVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTrafficPolicyVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.isTruncated = output.isTruncated - self.maxItems = output.maxItems - self.trafficPolicies = output.trafficPolicies - self.trafficPolicyVersionMarker = output.trafficPolicyVersionMarker - } else { - self.isTruncated = false - self.maxItems = nil - self.trafficPolicies = nil - self.trafficPolicyVersionMarker = nil +extension ListTrafficPolicyVersionsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTrafficPolicyVersionsOutput() + value.isTruncated = try reader["IsTruncated"].readIfPresent() ?? false + value.maxItems = try reader["MaxItems"].readIfPresent() + value.trafficPolicies = try reader["TrafficPolicies"].readListIfPresent(memberReadingClosure: Route53ClientTypes.TrafficPolicy.readingClosure, memberNodeInfo: "TrafficPolicy", isFlattened: false) + value.trafficPolicyVersionMarker = try reader["TrafficPolicyVersionMarker"].readIfPresent() + return value } } } @@ -12382,58 +10149,18 @@ public struct ListTrafficPolicyVersionsOutput: Swift.Equatable { } } -struct ListTrafficPolicyVersionsOutputBody: Swift.Equatable { - let trafficPolicies: [Route53ClientTypes.TrafficPolicy]? - let isTruncated: Swift.Bool - let trafficPolicyVersionMarker: Swift.String? - let maxItems: Swift.Int? -} - -extension ListTrafficPolicyVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case maxItems = "MaxItems" - case trafficPolicies = "TrafficPolicies" - case trafficPolicyVersionMarker = "TrafficPolicyVersionMarker" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.trafficPolicies) { - struct KeyVal0{struct TrafficPolicy{}} - let trafficPoliciesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .trafficPolicies) - if let trafficPoliciesWrappedContainer = trafficPoliciesWrappedContainer { - let trafficPoliciesContainer = try trafficPoliciesWrappedContainer.decodeIfPresent([Route53ClientTypes.TrafficPolicy].self, forKey: .member) - var trafficPoliciesBuffer:[Route53ClientTypes.TrafficPolicy]? = nil - if let trafficPoliciesContainer = trafficPoliciesContainer { - trafficPoliciesBuffer = [Route53ClientTypes.TrafficPolicy]() - for structureContainer0 in trafficPoliciesContainer { - trafficPoliciesBuffer?.append(structureContainer0) - } - } - trafficPolicies = trafficPoliciesBuffer - } else { - trafficPolicies = [] - } - } else { - trafficPolicies = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) ?? false - isTruncated = isTruncatedDecoded - let trafficPolicyVersionMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyVersionMarker) - trafficPolicyVersionMarker = trafficPolicyVersionMarkerDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +enum ListTrafficPolicyVersionsOutputError { -enum ListTrafficPolicyVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -12511,18 +10238,17 @@ public struct ListVPCAssociationAuthorizationsInput: Swift.Equatable { } } -extension ListVPCAssociationAuthorizationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListVPCAssociationAuthorizationsOutputBody = try responseDecoder.decode(responseBody: data) - self.hostedZoneId = output.hostedZoneId - self.nextToken = output.nextToken - self.vpCs = output.vpCs - } else { - self.hostedZoneId = nil - self.nextToken = nil - self.vpCs = nil +extension ListVPCAssociationAuthorizationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListVPCAssociationAuthorizationsOutput() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.nextToken = try reader["NextToken"].readIfPresent() + value.vpCs = try reader["VPCs"].readListIfPresent(memberReadingClosure: Route53ClientTypes.VPC.readingClosure, memberNodeInfo: "VPC", isFlattened: false) + return value } } } @@ -12550,73 +10276,37 @@ public struct ListVPCAssociationAuthorizationsOutput: Swift.Equatable { } } -struct ListVPCAssociationAuthorizationsOutputBody: Swift.Equatable { - let hostedZoneId: Swift.String? - let nextToken: Swift.String? - let vpCs: [Route53ClientTypes.VPC]? -} - -extension ListVPCAssociationAuthorizationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneId = "HostedZoneId" - case nextToken = "NextToken" - case vpCs = "VPCs" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.vpCs) { - struct KeyVal0{struct VPC{}} - let vpCsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .vpCs) - if let vpCsWrappedContainer = vpCsWrappedContainer { - let vpCsContainer = try vpCsWrappedContainer.decodeIfPresent([Route53ClientTypes.VPC].self, forKey: .member) - var vpCsBuffer:[Route53ClientTypes.VPC]? = nil - if let vpCsContainer = vpCsContainer { - vpCsBuffer = [Route53ClientTypes.VPC]() - for structureContainer0 in vpCsContainer { - vpCsBuffer?.append(structureContainer0) - } - } - vpCs = vpCsBuffer - } else { - vpCs = [] - } - } else { - vpCs = nil - } - } -} +enum ListVPCAssociationAuthorizationsOutputError { -enum ListVPCAssociationAuthorizationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidPaginationToken": return try await InvalidPaginationToken(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidPaginationToken": return try await InvalidPaginationToken.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.LocationSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case locationName = "LocationName" - } +extension Route53ClientTypes.LocationSummary { static func writingClosure(_ value: Route53ClientTypes.LocationSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("LocationName")].write(value.locationName) + try writer["LocationName"].write(value.locationName) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let locationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationName) - locationName = locationNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.LocationSummary() + value.locationName = try reader["LocationName"].readIfPresent() + return value + } } } @@ -12637,16 +10327,26 @@ extension Route53ClientTypes { } extension NoSuchChange { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchChange() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension NoSuchChange { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchChange() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12674,33 +10374,27 @@ public struct NoSuchChange: ClientRuntime.ModeledError, AWSClientRuntime.AWSServ } } -struct NoSuchChangeBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchChangeBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchCidrCollectionException { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchCidrCollectionException() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchCidrCollectionException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchCidrCollectionException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12728,33 +10422,27 @@ public struct NoSuchCidrCollectionException: ClientRuntime.ModeledError, AWSClie } } -struct NoSuchCidrCollectionExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchCidrCollectionExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchCidrLocationException { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchCidrLocationException() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension NoSuchCidrLocationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchCidrLocationException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12782,33 +10470,27 @@ public struct NoSuchCidrLocationException: ClientRuntime.ModeledError, AWSClient } } -struct NoSuchCidrLocationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchCidrLocationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension NoSuchCloudWatchLogsLogGroup { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchCloudWatchLogsLogGroup() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchCloudWatchLogsLogGroup { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchCloudWatchLogsLogGroup() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12836,33 +10518,27 @@ public struct NoSuchCloudWatchLogsLogGroup: ClientRuntime.ModeledError, AWSClien } } -struct NoSuchCloudWatchLogsLogGroupBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchCloudWatchLogsLogGroupBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchDelegationSet { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchDelegationSet() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchDelegationSet { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchDelegationSet() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12891,33 +10567,27 @@ public struct NoSuchDelegationSet: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct NoSuchDelegationSetBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchDelegationSetBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchGeoLocation { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchGeoLocation() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchGeoLocation { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchGeoLocation() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12946,33 +10616,27 @@ public struct NoSuchGeoLocation: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct NoSuchGeoLocationBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchGeoLocationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchHealthCheck { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchHealthCheck() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchHealthCheck { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchHealthCheck() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13001,33 +10665,27 @@ public struct NoSuchHealthCheck: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct NoSuchHealthCheckBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchHealthCheckBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchHostedZone { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchHostedZone() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchHostedZone { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchHostedZone() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13056,33 +10714,27 @@ public struct NoSuchHostedZone: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct NoSuchHostedZoneBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchHostedZoneBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchKeySigningKey { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchKeySigningKey() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchKeySigningKey { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchKeySigningKey() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13110,33 +10762,27 @@ public struct NoSuchKeySigningKey: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct NoSuchKeySigningKeyBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchKeySigningKeyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchQueryLoggingConfig { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchQueryLoggingConfig() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchQueryLoggingConfig { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchQueryLoggingConfig() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13164,33 +10810,27 @@ public struct NoSuchQueryLoggingConfig: ClientRuntime.ModeledError, AWSClientRun } } -struct NoSuchQueryLoggingConfigBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchQueryLoggingConfigBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchTrafficPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchTrafficPolicy() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchTrafficPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchTrafficPolicy() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13219,33 +10859,27 @@ public struct NoSuchTrafficPolicy: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct NoSuchTrafficPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchTrafficPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NoSuchTrafficPolicyInstance { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchTrafficPolicyInstance() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NoSuchTrafficPolicyInstance { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchTrafficPolicyInstance() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13274,33 +10908,27 @@ public struct NoSuchTrafficPolicyInstance: ClientRuntime.ModeledError, AWSClient } } -struct NoSuchTrafficPolicyInstanceBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchTrafficPolicyInstanceBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension NotAuthorizedException { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NotAuthorizedException() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension NotAuthorizedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NotAuthorizedException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13329,33 +10957,27 @@ public struct NotAuthorizedException: ClientRuntime.ModeledError, AWSClientRunti } } -struct NotAuthorizedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NotAuthorizedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension PriorRequestNotComplete { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = PriorRequestNotComplete() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension PriorRequestNotComplete { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PriorRequestNotComplete() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13383,33 +11005,27 @@ public struct PriorRequestNotComplete: ClientRuntime.ModeledError, AWSClientRunt } } -struct PriorRequestNotCompleteBody: Swift.Equatable { - let message: Swift.String? -} - -extension PriorRequestNotCompleteBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension PublicZoneVPCAssociation { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = PublicZoneVPCAssociation() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension PublicZoneVPCAssociation { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PublicZoneVPCAssociation() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13438,44 +11054,24 @@ public struct PublicZoneVPCAssociation: ClientRuntime.ModeledError, AWSClientRun } } -struct PublicZoneVPCAssociationBody: Swift.Equatable { - let message: Swift.String? -} - -extension PublicZoneVPCAssociationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.QueryLoggingConfig: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudWatchLogsLogGroupArn = "CloudWatchLogsLogGroupArn" - case hostedZoneId = "HostedZoneId" - case id = "Id" - } +extension Route53ClientTypes.QueryLoggingConfig { static func writingClosure(_ value: Route53ClientTypes.QueryLoggingConfig?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CloudWatchLogsLogGroupArn")].write(value.cloudWatchLogsLogGroupArn) - try writer[.init("HostedZoneId")].write(value.hostedZoneId) - try writer[.init("Id")].write(value.id) + try writer["CloudWatchLogsLogGroupArn"].write(value.cloudWatchLogsLogGroupArn) + try writer["HostedZoneId"].write(value.hostedZoneId) + try writer["Id"].write(value.id) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let cloudWatchLogsLogGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cloudWatchLogsLogGroupArn) - cloudWatchLogsLogGroupArn = cloudWatchLogsLogGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.QueryLoggingConfig() + value.id = try reader["Id"].readIfPresent() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.cloudWatchLogsLogGroupArn = try reader["CloudWatchLogsLogGroupArn"].readIfPresent() + return value + } } } @@ -13507,16 +11103,26 @@ extension Route53ClientTypes { } extension QueryLoggingConfigAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = QueryLoggingConfigAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension QueryLoggingConfigAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = QueryLoggingConfigAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -13544,22 +11150,6 @@ public struct QueryLoggingConfigAlreadyExists: ClientRuntime.ModeledError, AWSCl } } -struct QueryLoggingConfigAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension QueryLoggingConfigAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension Route53ClientTypes { public enum RRType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case a @@ -13663,20 +11253,20 @@ extension Route53ClientTypes { } } -extension Route53ClientTypes.ResourceRecord: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case value = "Value" - } +extension Route53ClientTypes.ResourceRecord { static func writingClosure(_ value: Route53ClientTypes.ResourceRecord?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Value")].write(value.value) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.ResourceRecord() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -13697,93 +11287,48 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.ResourceRecordSet: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case aliasTarget = "AliasTarget" - case cidrRoutingConfig = "CidrRoutingConfig" - case failover = "Failover" - case geoLocation = "GeoLocation" - case geoProximityLocation = "GeoProximityLocation" - case healthCheckId = "HealthCheckId" - case multiValueAnswer = "MultiValueAnswer" - case name = "Name" - case region = "Region" - case resourceRecords = "ResourceRecords" - case setIdentifier = "SetIdentifier" - case ttl = "TTL" - case trafficPolicyInstanceId = "TrafficPolicyInstanceId" - case type = "Type" - case weight = "Weight" - } +extension Route53ClientTypes.ResourceRecordSet { static func writingClosure(_ value: Route53ClientTypes.ResourceRecordSet?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AliasTarget")].write(value.aliasTarget, writingClosure: Route53ClientTypes.AliasTarget.writingClosure(_:to:)) - try writer[.init("CidrRoutingConfig")].write(value.cidrRoutingConfig, writingClosure: Route53ClientTypes.CidrRoutingConfig.writingClosure(_:to:)) - try writer[.init("Failover")].write(value.failover) - try writer[.init("GeoLocation")].write(value.geoLocation, writingClosure: Route53ClientTypes.GeoLocation.writingClosure(_:to:)) - try writer[.init("GeoProximityLocation")].write(value.geoProximityLocation, writingClosure: Route53ClientTypes.GeoProximityLocation.writingClosure(_:to:)) - try writer[.init("HealthCheckId")].write(value.healthCheckId) - try writer[.init("MultiValueAnswer")].write(value.multiValueAnswer) - try writer[.init("Name")].write(value.name) - try writer[.init("Region")].write(value.region) - try writer[.init("ResourceRecords")].writeList(value.resourceRecords, memberWritingClosure: Route53ClientTypes.ResourceRecord.writingClosure(_:to:), memberNodeInfo: .init("ResourceRecord"), isFlattened: false) - try writer[.init("SetIdentifier")].write(value.setIdentifier) - try writer[.init("TTL")].write(value.ttl) - try writer[.init("TrafficPolicyInstanceId")].write(value.trafficPolicyInstanceId) - try writer[.init("Type")].write(value.type) - try writer[.init("Weight")].write(value.weight) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let typeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .type) - type = typeDecoded - let setIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .setIdentifier) - setIdentifier = setIdentifierDecoded - let weightDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .weight) - weight = weightDecoded - let regionDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ResourceRecordSetRegion.self, forKey: .region) - region = regionDecoded - let geoLocationDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.GeoLocation.self, forKey: .geoLocation) - geoLocation = geoLocationDecoded - let failoverDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ResourceRecordSetFailover.self, forKey: .failover) - failover = failoverDecoded - let multiValueAnswerDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .multiValueAnswer) - multiValueAnswer = multiValueAnswerDecoded - let ttlDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ttl) - ttl = ttlDecoded - if containerValues.contains(.resourceRecords) { - struct KeyVal0{struct ResourceRecord{}} - let resourceRecordsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resourceRecords) - if let resourceRecordsWrappedContainer = resourceRecordsWrappedContainer { - let resourceRecordsContainer = try resourceRecordsWrappedContainer.decodeIfPresent([Route53ClientTypes.ResourceRecord].self, forKey: .member) - var resourceRecordsBuffer:[Route53ClientTypes.ResourceRecord]? = nil - if let resourceRecordsContainer = resourceRecordsContainer { - resourceRecordsBuffer = [Route53ClientTypes.ResourceRecord]() - for structureContainer0 in resourceRecordsContainer { - resourceRecordsBuffer?.append(structureContainer0) - } - } - resourceRecords = resourceRecordsBuffer - } else { - resourceRecords = [] - } - } else { - resourceRecords = nil + try writer["AliasTarget"].write(value.aliasTarget, writingClosure: Route53ClientTypes.AliasTarget.writingClosure(_:to:)) + try writer["CidrRoutingConfig"].write(value.cidrRoutingConfig, writingClosure: Route53ClientTypes.CidrRoutingConfig.writingClosure(_:to:)) + try writer["Failover"].write(value.failover) + try writer["GeoLocation"].write(value.geoLocation, writingClosure: Route53ClientTypes.GeoLocation.writingClosure(_:to:)) + try writer["GeoProximityLocation"].write(value.geoProximityLocation, writingClosure: Route53ClientTypes.GeoProximityLocation.writingClosure(_:to:)) + try writer["HealthCheckId"].write(value.healthCheckId) + try writer["MultiValueAnswer"].write(value.multiValueAnswer) + try writer["Name"].write(value.name) + try writer["Region"].write(value.region) + try writer["ResourceRecords"].writeList(value.resourceRecords, memberWritingClosure: Route53ClientTypes.ResourceRecord.writingClosure(_:to:), memberNodeInfo: "ResourceRecord", isFlattened: false) + try writer["SetIdentifier"].write(value.setIdentifier) + try writer["TTL"].write(value.ttl) + try writer["TrafficPolicyInstanceId"].write(value.trafficPolicyInstanceId) + try writer["Type"].write(value.type) + try writer["Weight"].write(value.weight) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.ResourceRecordSet() + value.name = try reader["Name"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + value.setIdentifier = try reader["SetIdentifier"].readIfPresent() + value.weight = try reader["Weight"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.geoLocation = try reader["GeoLocation"].readIfPresent(readingClosure: Route53ClientTypes.GeoLocation.readingClosure) + value.failover = try reader["Failover"].readIfPresent() + value.multiValueAnswer = try reader["MultiValueAnswer"].readIfPresent() + value.ttl = try reader["TTL"].readIfPresent() + value.resourceRecords = try reader["ResourceRecords"].readListIfPresent(memberReadingClosure: Route53ClientTypes.ResourceRecord.readingClosure, memberNodeInfo: "ResourceRecord", isFlattened: false) + value.aliasTarget = try reader["AliasTarget"].readIfPresent(readingClosure: Route53ClientTypes.AliasTarget.readingClosure) + value.healthCheckId = try reader["HealthCheckId"].readIfPresent() + value.trafficPolicyInstanceId = try reader["TrafficPolicyInstanceId"].readIfPresent() + value.cidrRoutingConfig = try reader["CidrRoutingConfig"].readIfPresent(readingClosure: Route53ClientTypes.CidrRoutingConfig.readingClosure) + value.geoProximityLocation = try reader["GeoProximityLocation"].readIfPresent(readingClosure: Route53ClientTypes.GeoProximityLocation.readingClosure) + return value } - let aliasTargetDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.AliasTarget.self, forKey: .aliasTarget) - aliasTarget = aliasTargetDecoded - let healthCheckIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .healthCheckId) - healthCheckId = healthCheckIdDecoded - let trafficPolicyInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyInstanceId) - trafficPolicyInstanceId = trafficPolicyInstanceIdDecoded - let cidrRoutingConfigDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.CidrRoutingConfig.self, forKey: .cidrRoutingConfig) - cidrRoutingConfig = cidrRoutingConfigDecoded - let geoProximityLocationDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.GeoProximityLocation.self, forKey: .geoProximityLocation) - geoProximityLocation = geoProximityLocationDecoded } } @@ -14139,44 +11684,23 @@ extension Route53ClientTypes { } } -extension Route53ClientTypes.ResourceTagSet: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceId = "ResourceId" - case resourceType = "ResourceType" - case tags = "Tags" - } +extension Route53ClientTypes.ResourceTagSet { static func writingClosure(_ value: Route53ClientTypes.ResourceTagSet?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ResourceId")].write(value.resourceId) - try writer[.init("ResourceType")].write(value.resourceType) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: Route53ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceTypeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.TagResourceType.self, forKey: .resourceType) - resourceType = resourceTypeDecoded - let resourceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceId) - resourceId = resourceIdDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([Route53ClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[Route53ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [Route53ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + try writer["ResourceId"].write(value.resourceId) + try writer["ResourceType"].write(value.resourceType) + try writer["Tags"].writeList(value.tags, memberWritingClosure: Route53ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.ResourceTagSet() + value.resourceType = try reader["ResourceType"].readIfPresent() + value.resourceId = try reader["ResourceId"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: Route53ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -14209,24 +11733,22 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.ReusableDelegationSetLimit: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case type = "Type" - case value = "Value" - } +extension Route53ClientTypes.ReusableDelegationSetLimit { static func writingClosure(_ value: Route53ClientTypes.ReusableDelegationSetLimit?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Type")].write(value.type) - try writer[.init("Value")].write(value.value) + try writer["Type"].write(value.type) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.ReusableDelegationSetLimitType.self, forKey: .type) - type = typeDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.ReusableDelegationSetLimit() + value.type = try reader["Type"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -14324,24 +11846,22 @@ extension Route53ClientTypes { } } -extension Route53ClientTypes.StatusReport: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checkedTime = "CheckedTime" - case status = "Status" - } +extension Route53ClientTypes.StatusReport { static func writingClosure(_ value: Route53ClientTypes.StatusReport?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CheckedTime")].writeTimestamp(value.checkedTime, format: .dateTime) - try writer[.init("Status")].write(value.status) + try writer["CheckedTime"].writeTimestamp(value.checkedTime, format: .dateTime) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let checkedTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .checkedTime) - checkedTime = checkedTimeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.StatusReport() + value.status = try reader["Status"].readIfPresent() + value.checkedTime = try reader["CheckedTime"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -14365,24 +11885,22 @@ extension Route53ClientTypes { } -extension Route53ClientTypes.Tag: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case value = "Value" - } +extension Route53ClientTypes.Tag { static func writingClosure(_ value: Route53ClientTypes.Tag?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Key")].write(value.key) - try writer[.init("Value")].write(value.value) + try writer["Key"].write(value.key) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -14535,24 +12053,20 @@ public struct TestDNSAnswerInput: Swift.Equatable { } } -extension TestDNSAnswerOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TestDNSAnswerOutputBody = try responseDecoder.decode(responseBody: data) - self.`protocol` = output.`protocol` - self.nameserver = output.nameserver - self.recordData = output.recordData - self.recordName = output.recordName - self.recordType = output.recordType - self.responseCode = output.responseCode - } else { - self.nameserver = nil - self.`protocol` = nil - self.recordData = nil - self.recordName = nil - self.recordType = nil - self.responseCode = nil +extension TestDNSAnswerOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = TestDNSAnswerOutput() + value.nameserver = try reader["Nameserver"].readIfPresent() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.recordData = try reader["RecordData"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "RecordDataEntry", isFlattened: false) + value.recordName = try reader["RecordName"].readIfPresent() + value.recordType = try reader["RecordType"].readIfPresent() + value.responseCode = try reader["ResponseCode"].readIfPresent() + return value } } } @@ -14596,81 +12110,43 @@ public struct TestDNSAnswerOutput: Swift.Equatable { } } -struct TestDNSAnswerOutputBody: Swift.Equatable { - let nameserver: Swift.String? - let recordName: Swift.String? - let recordType: Route53ClientTypes.RRType? - let recordData: [Swift.String]? - let responseCode: Swift.String? - let `protocol`: Swift.String? -} - -extension TestDNSAnswerOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nameserver = "Nameserver" - case `protocol` = "Protocol" - case recordData = "RecordData" - case recordName = "RecordName" - case recordType = "RecordType" - case responseCode = "ResponseCode" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameserverDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nameserver) - nameserver = nameserverDecoded - let recordNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recordName) - recordName = recordNameDecoded - let recordTypeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .recordType) - recordType = recordTypeDecoded - if containerValues.contains(.recordData) { - struct KeyVal0{struct RecordDataEntry{}} - let recordDataWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recordData) - if let recordDataWrappedContainer = recordDataWrappedContainer { - let recordDataContainer = try recordDataWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var recordDataBuffer:[Swift.String]? = nil - if let recordDataContainer = recordDataContainer { - recordDataBuffer = [Swift.String]() - for stringContainer0 in recordDataContainer { - recordDataBuffer?.append(stringContainer0) - } - } - recordData = recordDataBuffer - } else { - recordData = [] +enum TestDNSAnswerOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - recordData = nil } - let responseCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .responseCode) - responseCode = responseCodeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded } } -enum TestDNSAnswerOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +extension ThrottlingException { + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = ThrottlingException() + value.properties.message = try reader["message"].readIfPresent() + return value } } } extension ThrottlingException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ThrottlingException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14698,33 +12174,27 @@ public struct ThrottlingException: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct ThrottlingExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ThrottlingExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension TooManyHealthChecks { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyHealthChecks() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension TooManyHealthChecks { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyHealthChecks() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14752,33 +12222,27 @@ public struct TooManyHealthChecks: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct TooManyHealthChecksBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyHealthChecksBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension TooManyHostedZones { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyHostedZones() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension TooManyHostedZones { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyHostedZones() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14807,33 +12271,27 @@ public struct TooManyHostedZones: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct TooManyHostedZonesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyHostedZonesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension TooManyKeySigningKeys { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyKeySigningKeys() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension TooManyKeySigningKeys { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyKeySigningKeys() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14861,33 +12319,27 @@ public struct TooManyKeySigningKeys: ClientRuntime.ModeledError, AWSClientRuntim } } -struct TooManyKeySigningKeysBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyKeySigningKeysBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension TooManyTrafficPolicies { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyTrafficPolicies() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension TooManyTrafficPolicies { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTrafficPolicies() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14916,33 +12368,27 @@ public struct TooManyTrafficPolicies: ClientRuntime.ModeledError, AWSClientRunti } } -struct TooManyTrafficPoliciesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTrafficPoliciesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension TooManyTrafficPolicyInstances { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyTrafficPolicyInstances() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension TooManyTrafficPolicyInstances { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTrafficPolicyInstances() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -14971,33 +12417,27 @@ public struct TooManyTrafficPolicyInstances: ClientRuntime.ModeledError, AWSClie } } -struct TooManyTrafficPolicyInstancesBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTrafficPolicyInstancesBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension TooManyTrafficPolicyVersionsForCurrentPolicy { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyTrafficPolicyVersionsForCurrentPolicy() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension TooManyTrafficPolicyVersionsForCurrentPolicy { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTrafficPolicyVersionsForCurrentPolicy() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15026,33 +12466,27 @@ public struct TooManyTrafficPolicyVersionsForCurrentPolicy: ClientRuntime.Modele } } -struct TooManyTrafficPolicyVersionsForCurrentPolicyBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTrafficPolicyVersionsForCurrentPolicyBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension TooManyVPCAssociationAuthorizations { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyVPCAssociationAuthorizations() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension TooManyVPCAssociationAuthorizations { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyVPCAssociationAuthorizations() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15081,56 +12515,30 @@ public struct TooManyVPCAssociationAuthorizations: ClientRuntime.ModeledError, A } } -struct TooManyVPCAssociationAuthorizationsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyVPCAssociationAuthorizationsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.TrafficPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - case document = "Document" - case id = "Id" - case name = "Name" - case type = "Type" - case version = "Version" - } +extension Route53ClientTypes.TrafficPolicy { static func writingClosure(_ value: Route53ClientTypes.TrafficPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) - try writer[.init("Document")].write(value.document) - try writer[.init("Id")].write(value.id) - try writer[.init("Name")].write(value.name) - try writer[.init("Type")].write(value.type) - try writer[.init("Version")].write(value.version) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let versionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .version) - version = versionDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let typeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .type) - type = typeDecoded - let documentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .document) - document = documentDecoded - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded + try writer["Comment"].write(value.comment) + try writer["Document"].write(value.document) + try writer["Id"].write(value.id) + try writer["Name"].write(value.name) + try writer["Type"].write(value.type) + try writer["Version"].write(value.version) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.TrafficPolicy() + value.id = try reader["Id"].readIfPresent() + value.version = try reader["Version"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + value.document = try reader["Document"].readIfPresent() + value.comment = try reader["Comment"].readIfPresent() + return value + } } } @@ -15176,16 +12584,26 @@ extension Route53ClientTypes { } extension TrafficPolicyAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TrafficPolicyAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TrafficPolicyAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrafficPolicyAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15214,33 +12632,27 @@ public struct TrafficPolicyAlreadyExists: ClientRuntime.ModeledError, AWSClientR } } -struct TrafficPolicyAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TrafficPolicyAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension TrafficPolicyInUse { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TrafficPolicyInUse() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension TrafficPolicyInUse { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrafficPolicyInUse() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15269,68 +12681,36 @@ public struct TrafficPolicyInUse: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct TrafficPolicyInUseBody: Swift.Equatable { - let message: Swift.String? -} - -extension TrafficPolicyInUseBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.TrafficPolicyInstance: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZoneId = "HostedZoneId" - case id = "Id" - case message = "Message" - case name = "Name" - case state = "State" - case ttl = "TTL" - case trafficPolicyId = "TrafficPolicyId" - case trafficPolicyType = "TrafficPolicyType" - case trafficPolicyVersion = "TrafficPolicyVersion" - } +extension Route53ClientTypes.TrafficPolicyInstance { static func writingClosure(_ value: Route53ClientTypes.TrafficPolicyInstance?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HostedZoneId")].write(value.hostedZoneId) - try writer[.init("Id")].write(value.id) - try writer[.init("Message")].write(value.message) - try writer[.init("Name")].write(value.name) - try writer[.init("State")].write(value.state) - try writer[.init("TTL")].write(value.ttl) - try writer[.init("TrafficPolicyId")].write(value.trafficPolicyId) - try writer[.init("TrafficPolicyType")].write(value.trafficPolicyType) - try writer[.init("TrafficPolicyVersion")].write(value.trafficPolicyVersion) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let hostedZoneIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostedZoneId) - hostedZoneId = hostedZoneIdDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let ttlDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ttl) - ttl = ttlDecoded - let stateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .state) - state = stateDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let trafficPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyId) - trafficPolicyId = trafficPolicyIdDecoded - let trafficPolicyVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .trafficPolicyVersion) - trafficPolicyVersion = trafficPolicyVersionDecoded - let trafficPolicyTypeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .trafficPolicyType) - trafficPolicyType = trafficPolicyTypeDecoded + try writer["HostedZoneId"].write(value.hostedZoneId) + try writer["Id"].write(value.id) + try writer["Message"].write(value.message) + try writer["Name"].write(value.name) + try writer["State"].write(value.state) + try writer["TTL"].write(value.ttl) + try writer["TrafficPolicyId"].write(value.trafficPolicyId) + try writer["TrafficPolicyType"].write(value.trafficPolicyType) + try writer["TrafficPolicyVersion"].write(value.trafficPolicyVersion) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.TrafficPolicyInstance() + value.id = try reader["Id"].readIfPresent() + value.hostedZoneId = try reader["HostedZoneId"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.ttl = try reader["TTL"].readIfPresent() + value.state = try reader["State"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.trafficPolicyId = try reader["TrafficPolicyId"].readIfPresent() + value.trafficPolicyVersion = try reader["TrafficPolicyVersion"].readIfPresent() + value.trafficPolicyType = try reader["TrafficPolicyType"].readIfPresent() + return value + } } } @@ -15392,16 +12772,26 @@ extension Route53ClientTypes { } extension TrafficPolicyInstanceAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TrafficPolicyInstanceAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TrafficPolicyInstanceAlreadyExists { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrafficPolicyInstanceAlreadyExists() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -15430,52 +12820,28 @@ public struct TrafficPolicyInstanceAlreadyExists: ClientRuntime.ModeledError, AW } } -struct TrafficPolicyInstanceAlreadyExistsBody: Swift.Equatable { - let message: Swift.String? -} - -extension TrafficPolicyInstanceAlreadyExistsBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension Route53ClientTypes.TrafficPolicySummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case id = "Id" - case latestVersion = "LatestVersion" - case name = "Name" - case trafficPolicyCount = "TrafficPolicyCount" - case type = "Type" - } +extension Route53ClientTypes.TrafficPolicySummary { static func writingClosure(_ value: Route53ClientTypes.TrafficPolicySummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Id")].write(value.id) - try writer[.init("LatestVersion")].write(value.latestVersion) - try writer[.init("Name")].write(value.name) - try writer[.init("TrafficPolicyCount")].write(value.trafficPolicyCount) - try writer[.init("Type")].write(value.type) + try writer["Id"].write(value.id) + try writer["LatestVersion"].write(value.latestVersion) + try writer["Name"].write(value.name) + try writer["TrafficPolicyCount"].write(value.trafficPolicyCount) + try writer["Type"].write(value.type) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let typeDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.RRType.self, forKey: .type) - type = typeDecoded - let latestVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .latestVersion) - latestVersion = latestVersionDecoded - let trafficPolicyCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .trafficPolicyCount) - trafficPolicyCount = trafficPolicyCountDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.TrafficPolicySummary() + value.id = try reader["Id"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + value.latestVersion = try reader["LatestVersion"].readIfPresent() + value.trafficPolicyCount = try reader["TrafficPolicyCount"].readIfPresent() + return value + } } } @@ -15517,43 +12883,24 @@ extension Route53ClientTypes { } extension UpdateHealthCheckInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmIdentifier = "AlarmIdentifier" - case childHealthChecks = "ChildHealthChecks" - case disabled = "Disabled" - case enableSNI = "EnableSNI" - case failureThreshold = "FailureThreshold" - case fullyQualifiedDomainName = "FullyQualifiedDomainName" - case healthCheckVersion = "HealthCheckVersion" - case healthThreshold = "HealthThreshold" - case ipAddress = "IPAddress" - case insufficientDataHealthStatus = "InsufficientDataHealthStatus" - case inverted = "Inverted" - case port = "Port" - case regions = "Regions" - case resetElements = "ResetElements" - case resourcePath = "ResourcePath" - case searchString = "SearchString" - } - static func writingClosure(_ value: UpdateHealthCheckInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AlarmIdentifier")].write(value.alarmIdentifier, writingClosure: Route53ClientTypes.AlarmIdentifier.writingClosure(_:to:)) - try writer[.init("ChildHealthChecks")].writeList(value.childHealthChecks, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("ChildHealthCheck"), isFlattened: false) - try writer[.init("Disabled")].write(value.disabled) - try writer[.init("EnableSNI")].write(value.enableSNI) - try writer[.init("FailureThreshold")].write(value.failureThreshold) - try writer[.init("FullyQualifiedDomainName")].write(value.fullyQualifiedDomainName) - try writer[.init("HealthCheckVersion")].write(value.healthCheckVersion) - try writer[.init("HealthThreshold")].write(value.healthThreshold) - try writer[.init("IPAddress")].write(value.ipAddress) - try writer[.init("InsufficientDataHealthStatus")].write(value.insufficientDataHealthStatus) - try writer[.init("Inverted")].write(value.inverted) - try writer[.init("Port")].write(value.port) - try writer[.init("Regions")].writeList(value.regions, memberWritingClosure: Route53ClientTypes.HealthCheckRegion.writingClosure(_:to:), memberNodeInfo: .init("Region"), isFlattened: false) - try writer[.init("ResetElements")].writeList(value.resetElements, memberWritingClosure: Route53ClientTypes.ResettableElementName.writingClosure(_:to:), memberNodeInfo: .init("ResettableElementName"), isFlattened: false) - try writer[.init("ResourcePath")].write(value.resourcePath) - try writer[.init("SearchString")].write(value.searchString) + try writer["AlarmIdentifier"].write(value.alarmIdentifier, writingClosure: Route53ClientTypes.AlarmIdentifier.writingClosure(_:to:)) + try writer["ChildHealthChecks"].writeList(value.childHealthChecks, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "ChildHealthCheck", isFlattened: false) + try writer["Disabled"].write(value.disabled) + try writer["EnableSNI"].write(value.enableSNI) + try writer["FailureThreshold"].write(value.failureThreshold) + try writer["FullyQualifiedDomainName"].write(value.fullyQualifiedDomainName) + try writer["HealthCheckVersion"].write(value.healthCheckVersion) + try writer["HealthThreshold"].write(value.healthThreshold) + try writer["IPAddress"].write(value.ipAddress) + try writer["InsufficientDataHealthStatus"].write(value.insufficientDataHealthStatus) + try writer["Inverted"].write(value.inverted) + try writer["Port"].write(value.port) + try writer["Regions"].writeList(value.regions, memberWritingClosure: Route53ClientTypes.HealthCheckRegion.writingClosure(_:to:), memberNodeInfo: "Region", isFlattened: false) + try writer["ResetElements"].writeList(value.resetElements, memberWritingClosure: Route53ClientTypes.ResettableElementName.writingClosure(_:to:), memberNodeInfo: "ResettableElementName", isFlattened: false) + try writer["ResourcePath"].write(value.resourcePath) + try writer["SearchString"].write(value.searchString) } } @@ -15705,141 +13052,15 @@ public struct UpdateHealthCheckInput: Swift.Equatable { } } -struct UpdateHealthCheckInputBody: Swift.Equatable { - let healthCheckVersion: Swift.Int? - let ipAddress: Swift.String? - let port: Swift.Int? - let resourcePath: Swift.String? - let fullyQualifiedDomainName: Swift.String? - let searchString: Swift.String? - let failureThreshold: Swift.Int? - let inverted: Swift.Bool? - let disabled: Swift.Bool? - let healthThreshold: Swift.Int? - let childHealthChecks: [Swift.String]? - let enableSNI: Swift.Bool? - let regions: [Route53ClientTypes.HealthCheckRegion]? - let alarmIdentifier: Route53ClientTypes.AlarmIdentifier? - let insufficientDataHealthStatus: Route53ClientTypes.InsufficientDataHealthStatus? - let resetElements: [Route53ClientTypes.ResettableElementName]? -} - -extension UpdateHealthCheckInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alarmIdentifier = "AlarmIdentifier" - case childHealthChecks = "ChildHealthChecks" - case disabled = "Disabled" - case enableSNI = "EnableSNI" - case failureThreshold = "FailureThreshold" - case fullyQualifiedDomainName = "FullyQualifiedDomainName" - case healthCheckVersion = "HealthCheckVersion" - case healthThreshold = "HealthThreshold" - case ipAddress = "IPAddress" - case insufficientDataHealthStatus = "InsufficientDataHealthStatus" - case inverted = "Inverted" - case port = "Port" - case regions = "Regions" - case resetElements = "ResetElements" - case resourcePath = "ResourcePath" - case searchString = "SearchString" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let healthCheckVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthCheckVersion) - healthCheckVersion = healthCheckVersionDecoded - let ipAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ipAddress) - ipAddress = ipAddressDecoded - let portDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .port) - port = portDecoded - let resourcePathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourcePath) - resourcePath = resourcePathDecoded - let fullyQualifiedDomainNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fullyQualifiedDomainName) - fullyQualifiedDomainName = fullyQualifiedDomainNameDecoded - let searchStringDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .searchString) - searchString = searchStringDecoded - let failureThresholdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .failureThreshold) - failureThreshold = failureThresholdDecoded - let invertedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .inverted) - inverted = invertedDecoded - let disabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .disabled) - disabled = disabledDecoded - let healthThresholdDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .healthThreshold) - healthThreshold = healthThresholdDecoded - if containerValues.contains(.childHealthChecks) { - struct KeyVal0{struct ChildHealthCheck{}} - let childHealthChecksWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .childHealthChecks) - if let childHealthChecksWrappedContainer = childHealthChecksWrappedContainer { - let childHealthChecksContainer = try childHealthChecksWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var childHealthChecksBuffer:[Swift.String]? = nil - if let childHealthChecksContainer = childHealthChecksContainer { - childHealthChecksBuffer = [Swift.String]() - for stringContainer0 in childHealthChecksContainer { - childHealthChecksBuffer?.append(stringContainer0) - } - } - childHealthChecks = childHealthChecksBuffer - } else { - childHealthChecks = [] - } - } else { - childHealthChecks = nil - } - let enableSNIDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableSNI) - enableSNI = enableSNIDecoded - if containerValues.contains(.regions) { - struct KeyVal0{struct Region{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Route53ClientTypes.HealthCheckRegion].self, forKey: .member) - var regionsBuffer:[Route53ClientTypes.HealthCheckRegion]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Route53ClientTypes.HealthCheckRegion]() - for enumContainer0 in regionsContainer { - regionsBuffer?.append(enumContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil - } - let alarmIdentifierDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.AlarmIdentifier.self, forKey: .alarmIdentifier) - alarmIdentifier = alarmIdentifierDecoded - let insufficientDataHealthStatusDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.InsufficientDataHealthStatus.self, forKey: .insufficientDataHealthStatus) - insufficientDataHealthStatus = insufficientDataHealthStatusDecoded - if containerValues.contains(.resetElements) { - struct KeyVal0{struct ResettableElementName{}} - let resetElementsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .resetElements) - if let resetElementsWrappedContainer = resetElementsWrappedContainer { - let resetElementsContainer = try resetElementsWrappedContainer.decodeIfPresent([Route53ClientTypes.ResettableElementName].self, forKey: .member) - var resetElementsBuffer:[Route53ClientTypes.ResettableElementName]? = nil - if let resetElementsContainer = resetElementsContainer { - resetElementsBuffer = [Route53ClientTypes.ResettableElementName]() - for enumContainer0 in resetElementsContainer { - resetElementsBuffer?.append(enumContainer0) - } - } - resetElements = resetElementsBuffer - } else { - resetElements = [] - } - } else { - resetElements = nil - } - } -} +extension UpdateHealthCheckOutput { -extension UpdateHealthCheckOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateHealthCheckOutputBody = try responseDecoder.decode(responseBody: data) - self.healthCheck = output.healthCheck - } else { - self.healthCheck = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateHealthCheckOutput() + value.healthCheck = try reader["HealthCheck"].readIfPresent(readingClosure: Route53ClientTypes.HealthCheck.readingClosure) + return value } } } @@ -15858,42 +13079,27 @@ public struct UpdateHealthCheckOutput: Swift.Equatable { } } -struct UpdateHealthCheckOutputBody: Swift.Equatable { - let healthCheck: Route53ClientTypes.HealthCheck? -} - -extension UpdateHealthCheckOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case healthCheck = "HealthCheck" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let healthCheckDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HealthCheck.self, forKey: .healthCheck) - healthCheck = healthCheckDecoded - } -} +enum UpdateHealthCheckOutputError { -enum UpdateHealthCheckOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "HealthCheckVersionMismatch": return try await HealthCheckVersionMismatch(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHealthCheck": return try await NoSuchHealthCheck(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "HealthCheckVersionMismatch": return try await HealthCheckVersionMismatch.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHealthCheck": return try await NoSuchHealthCheck.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateHostedZoneCommentInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - } - static func writingClosure(_ value: UpdateHostedZoneCommentInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) + try writer["Comment"].write(value.comment) } } @@ -15925,30 +13131,15 @@ public struct UpdateHostedZoneCommentInput: Swift.Equatable { } } -struct UpdateHostedZoneCommentInputBody: Swift.Equatable { - let comment: Swift.String? -} - -extension UpdateHostedZoneCommentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - } -} +extension UpdateHostedZoneCommentOutput { -extension UpdateHostedZoneCommentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateHostedZoneCommentOutputBody = try responseDecoder.decode(responseBody: data) - self.hostedZone = output.hostedZone - } else { - self.hostedZone = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateHostedZoneCommentOutput() + value.hostedZone = try reader["HostedZone"].readIfPresent(readingClosure: Route53ClientTypes.HostedZone.readingClosure) + return value } } } @@ -15967,42 +13158,27 @@ public struct UpdateHostedZoneCommentOutput: Swift.Equatable { } } -struct UpdateHostedZoneCommentOutputBody: Swift.Equatable { - let hostedZone: Route53ClientTypes.HostedZone? -} - -extension UpdateHostedZoneCommentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostedZone = "HostedZone" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostedZoneDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.HostedZone.self, forKey: .hostedZone) - hostedZone = hostedZoneDecoded - } -} +enum UpdateHostedZoneCommentOutputError { -enum UpdateHostedZoneCommentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchHostedZone": return try await NoSuchHostedZone(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchHostedZone": return try await NoSuchHostedZone.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateTrafficPolicyCommentInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - } - static func writingClosure(_ value: UpdateTrafficPolicyCommentInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Comment")].write(value.comment) + try writer["Comment"].write(value.comment) } } @@ -16043,30 +13219,15 @@ public struct UpdateTrafficPolicyCommentInput: Swift.Equatable { } } -struct UpdateTrafficPolicyCommentInputBody: Swift.Equatable { - let comment: Swift.String? -} - -extension UpdateTrafficPolicyCommentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case comment = "Comment" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let commentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comment) - comment = commentDecoded - } -} +extension UpdateTrafficPolicyCommentOutput { -extension UpdateTrafficPolicyCommentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateTrafficPolicyCommentOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficPolicy = output.trafficPolicy - } else { - self.trafficPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateTrafficPolicyCommentOutput() + value.trafficPolicy = try reader["TrafficPolicy"].readIfPresent(readingClosure: Route53ClientTypes.TrafficPolicy.readingClosure) + return value } } } @@ -16085,46 +13246,29 @@ public struct UpdateTrafficPolicyCommentOutput: Swift.Equatable { } } -struct UpdateTrafficPolicyCommentOutputBody: Swift.Equatable { - let trafficPolicy: Route53ClientTypes.TrafficPolicy? -} - -extension UpdateTrafficPolicyCommentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficPolicy = "TrafficPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficPolicyDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.TrafficPolicy.self, forKey: .trafficPolicy) - trafficPolicy = trafficPolicyDecoded - } -} +enum UpdateTrafficPolicyCommentOutputError { -enum UpdateTrafficPolicyCommentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConcurrentModification": return try await ConcurrentModification(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConcurrentModification": return try await ConcurrentModification.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateTrafficPolicyInstanceInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ttl = "TTL" - case trafficPolicyId = "TrafficPolicyId" - case trafficPolicyVersion = "TrafficPolicyVersion" - } - static func writingClosure(_ value: UpdateTrafficPolicyInstanceInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("TTL")].write(value.ttl) - try writer[.init("TrafficPolicyId")].write(value.trafficPolicyId) - try writer[.init("TrafficPolicyVersion")].write(value.trafficPolicyVersion) + try writer["TTL"].write(value.ttl) + try writer["TrafficPolicyId"].write(value.trafficPolicyId) + try writer["TrafficPolicyVersion"].write(value.trafficPolicyVersion) } } @@ -16167,38 +13311,15 @@ public struct UpdateTrafficPolicyInstanceInput: Swift.Equatable { } } -struct UpdateTrafficPolicyInstanceInputBody: Swift.Equatable { - let ttl: Swift.Int? - let trafficPolicyId: Swift.String? - let trafficPolicyVersion: Swift.Int? -} - -extension UpdateTrafficPolicyInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ttl = "TTL" - case trafficPolicyId = "TrafficPolicyId" - case trafficPolicyVersion = "TrafficPolicyVersion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ttlDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .ttl) - ttl = ttlDecoded - let trafficPolicyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .trafficPolicyId) - trafficPolicyId = trafficPolicyIdDecoded - let trafficPolicyVersionDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .trafficPolicyVersion) - trafficPolicyVersion = trafficPolicyVersionDecoded - } -} +extension UpdateTrafficPolicyInstanceOutput { -extension UpdateTrafficPolicyInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateTrafficPolicyInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.trafficPolicyInstance = output.trafficPolicyInstance - } else { - self.trafficPolicyInstance = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateTrafficPolicyInstanceOutput() + value.trafficPolicyInstance = try reader["TrafficPolicyInstance"].readIfPresent(readingClosure: Route53ClientTypes.TrafficPolicyInstance.readingClosure) + return value } } } @@ -16217,54 +13338,41 @@ public struct UpdateTrafficPolicyInstanceOutput: Swift.Equatable { } } -struct UpdateTrafficPolicyInstanceOutputBody: Swift.Equatable { - let trafficPolicyInstance: Route53ClientTypes.TrafficPolicyInstance? -} - -extension UpdateTrafficPolicyInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case trafficPolicyInstance = "TrafficPolicyInstance" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let trafficPolicyInstanceDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.TrafficPolicyInstance.self, forKey: .trafficPolicyInstance) - trafficPolicyInstance = trafficPolicyInstanceDecoded - } -} +enum UpdateTrafficPolicyInstanceOutputError { -enum UpdateTrafficPolicyInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConflictingTypes": return try await ConflictingTypes(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidInput": return try await InvalidInput(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PriorRequestNotComplete": return try await PriorRequestNotComplete(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "ConflictingTypes": return try await ConflictingTypes.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidInput": return try await InvalidInput.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicy": return try await NoSuchTrafficPolicy.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NoSuchTrafficPolicyInstance": return try await NoSuchTrafficPolicyInstance.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "PriorRequestNotComplete": return try await PriorRequestNotComplete.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension Route53ClientTypes.VPC: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpcId = "VPCId" - case vpcRegion = "VPCRegion" - } +extension Route53ClientTypes.VPC { static func writingClosure(_ value: Route53ClientTypes.VPC?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("VPCId")].write(value.vpcId) - try writer[.init("VPCRegion")].write(value.vpcRegion) + try writer["VPCId"].write(value.vpcId) + try writer["VPCRegion"].write(value.vpcRegion) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcRegionDecoded = try containerValues.decodeIfPresent(Route53ClientTypes.VPCRegion.self, forKey: .vpcRegion) - vpcRegion = vpcRegionDecoded - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = Route53ClientTypes.VPC() + value.vpcRegion = try reader["VPCRegion"].readIfPresent() + value.vpcId = try reader["VPCId"].readIfPresent() + return value + } } } @@ -16289,16 +13397,26 @@ extension Route53ClientTypes { } extension VPCAssociationAuthorizationNotFound { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = VPCAssociationAuthorizationNotFound() + value.properties.message = try reader["message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension VPCAssociationAuthorizationNotFound { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = VPCAssociationAuthorizationNotFound() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16327,33 +13445,27 @@ public struct VPCAssociationAuthorizationNotFound: ClientRuntime.ModeledError, A } } -struct VPCAssociationAuthorizationNotFoundBody: Swift.Equatable { - let message: Swift.String? -} - -extension VPCAssociationAuthorizationNotFoundBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } +extension VPCAssociationNotFound { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = VPCAssociationNotFound() + value.properties.message = try reader["message"].readIfPresent() + return value + } } } extension VPCAssociationNotFound { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = VPCAssociationNotFound() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -16382,22 +13494,6 @@ public struct VPCAssociationNotFound: ClientRuntime.ModeledError, AWSClientRunti } } -struct VPCAssociationNotFoundBody: Swift.Equatable { - let message: Swift.String? -} - -extension VPCAssociationNotFoundBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension Route53ClientTypes { public enum VPCRegion: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case afSouth1 diff --git a/Sources/Services/AWSS3/S3Client.swift b/Sources/Services/AWSS3/S3Client.swift index 7ea499174cd..f67b4dbda8b 100644 --- a/Sources/Services/AWSS3/S3Client.swift +++ b/Sources/Services/AWSS3/S3Client.swift @@ -14,19 +14,9 @@ public class S3Client { let client: ClientRuntime.SdkHttpClient let config: S3Client.S3ClientConfiguration let serviceName = "S3" - let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: S3Client.S3ClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) - let encoder = ClientRuntime.JSONEncoder() - self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true - self.decoder = config.decoder ?? decoder self.config = config } @@ -108,8 +98,6 @@ extension S3Client { /// - `NoSuchUpload` : The specified multipart upload does not exist. public func abortMultipartUpload(input: AbortMultipartUploadInput) async throws -> AbortMultipartUploadOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "abortMultipartUpload") @@ -132,7 +120,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AbortMultipartUploadOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AbortMultipartUploadOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AbortMultipartUploadOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -204,8 +192,6 @@ extension S3Client { /// - Returns: `CompleteMultipartUploadOutput` : [no documentation found] public func completeMultipartUpload(input: CompleteMultipartUploadInput) async throws -> CompleteMultipartUploadOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "completeMultipartUpload") @@ -226,12 +212,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CompleteMultipartUploadInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(CompleteMultipartUploadInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CompleteMultipartUpload", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.CompletedMultipartUpload.writingClosure(_:to:), keyPath: \.multipartUpload, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CompleteMultipartUpload", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.CompletedMultipartUpload.writingClosure(_:to:), keyPath: \.multipartUpload, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CompleteMultipartUploadOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CompleteMultipartUploadOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CompleteMultipartUploadOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -291,8 +277,6 @@ extension S3Client { /// - `ObjectNotInActiveTierError` : The source object of the COPY action is not in the active tier and is only stored in Amazon S3 Glacier. public func copyObject(input: CopyObjectInput) async throws -> CopyObjectOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "copyObject") @@ -315,7 +299,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CopyObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CopyObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CopyObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -366,8 +350,6 @@ extension S3Client { /// - `BucketAlreadyOwnedByYou` : The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). public func createBucket(input: CreateBucketInput) async throws -> CreateBucketOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "createBucket") @@ -387,12 +369,12 @@ extension S3Client { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateBucketInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateBucketConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.CreateBucketConfiguration.writingClosure(_:to:), keyPath: \.createBucketConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateBucketConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.CreateBucketConfiguration.writingClosure(_:to:), keyPath: \.createBucketConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateBucketOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateBucketOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateBucketOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -475,8 +457,6 @@ extension S3Client { /// - Returns: `CreateMultipartUploadOutput` : [no documentation found] public func createMultipartUpload(input: CreateMultipartUploadInput) async throws -> CreateMultipartUploadOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createMultipartUpload") @@ -499,7 +479,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateMultipartUploadOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateMultipartUploadOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateMultipartUploadOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -529,8 +509,6 @@ extension S3Client { /// - `NoSuchBucket` : The specified bucket does not exist. public func createSession(input: CreateSessionInput) async throws -> CreateSessionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "createSession") @@ -553,7 +531,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSessionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSessionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSessionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -587,8 +565,6 @@ extension S3Client { /// - Returns: `DeleteBucketOutput` : [no documentation found] public func deleteBucket(input: DeleteBucketInput) async throws -> DeleteBucketOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucket") @@ -610,7 +586,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -632,8 +608,6 @@ extension S3Client { /// - Returns: `DeleteBucketAnalyticsConfigurationOutput` : [no documentation found] public func deleteBucketAnalyticsConfiguration(input: DeleteBucketAnalyticsConfigurationInput) async throws -> DeleteBucketAnalyticsConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketAnalyticsConfiguration") @@ -656,7 +630,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketAnalyticsConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketAnalyticsConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketAnalyticsConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -676,8 +650,6 @@ extension S3Client { /// - Returns: `DeleteBucketCorsOutput` : [no documentation found] public func deleteBucketCors(input: DeleteBucketCorsInput) async throws -> DeleteBucketCorsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketCors") @@ -700,7 +672,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketCorsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketCorsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketCorsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -720,8 +692,6 @@ extension S3Client { /// - Returns: `DeleteBucketEncryptionOutput` : [no documentation found] public func deleteBucketEncryption(input: DeleteBucketEncryptionInput) async throws -> DeleteBucketEncryptionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketEncryption") @@ -744,7 +714,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketEncryptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketEncryptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketEncryptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -766,8 +736,6 @@ extension S3Client { /// - Returns: `DeleteBucketIntelligentTieringConfigurationOutput` : [no documentation found] public func deleteBucketIntelligentTieringConfiguration(input: DeleteBucketIntelligentTieringConfigurationInput) async throws -> DeleteBucketIntelligentTieringConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketIntelligentTieringConfiguration") @@ -789,7 +757,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketIntelligentTieringConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketIntelligentTieringConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketIntelligentTieringConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -811,8 +779,6 @@ extension S3Client { /// - Returns: `DeleteBucketInventoryConfigurationOutput` : [no documentation found] public func deleteBucketInventoryConfiguration(input: DeleteBucketInventoryConfigurationInput) async throws -> DeleteBucketInventoryConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketInventoryConfiguration") @@ -835,7 +801,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketInventoryConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketInventoryConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketInventoryConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -855,8 +821,6 @@ extension S3Client { /// - Returns: `DeleteBucketLifecycleOutput` : [no documentation found] public func deleteBucketLifecycle(input: DeleteBucketLifecycleInput) async throws -> DeleteBucketLifecycleOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketLifecycle") @@ -879,7 +843,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketLifecycleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketLifecycleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketLifecycleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -903,8 +867,6 @@ extension S3Client { /// - Returns: `DeleteBucketMetricsConfigurationOutput` : [no documentation found] public func deleteBucketMetricsConfiguration(input: DeleteBucketMetricsConfigurationInput) async throws -> DeleteBucketMetricsConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketMetricsConfiguration") @@ -927,7 +889,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketMetricsConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketMetricsConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketMetricsConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -947,8 +909,6 @@ extension S3Client { /// - Returns: `DeleteBucketOwnershipControlsOutput` : [no documentation found] public func deleteBucketOwnershipControls(input: DeleteBucketOwnershipControlsInput) async throws -> DeleteBucketOwnershipControlsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketOwnershipControls") @@ -971,7 +931,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketOwnershipControlsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketOwnershipControlsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketOwnershipControlsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -998,8 +958,6 @@ extension S3Client { /// - Returns: `DeleteBucketPolicyOutput` : [no documentation found] public func deleteBucketPolicy(input: DeleteBucketPolicyInput) async throws -> DeleteBucketPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketPolicy") @@ -1022,7 +980,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1042,8 +1000,6 @@ extension S3Client { /// - Returns: `DeleteBucketReplicationOutput` : [no documentation found] public func deleteBucketReplication(input: DeleteBucketReplicationInput) async throws -> DeleteBucketReplicationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketReplication") @@ -1066,7 +1022,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketReplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketReplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketReplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1086,8 +1042,6 @@ extension S3Client { /// - Returns: `DeleteBucketTaggingOutput` : [no documentation found] public func deleteBucketTagging(input: DeleteBucketTaggingInput) async throws -> DeleteBucketTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketTagging") @@ -1110,7 +1064,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1130,8 +1084,6 @@ extension S3Client { /// - Returns: `DeleteBucketWebsiteOutput` : [no documentation found] public func deleteBucketWebsite(input: DeleteBucketWebsiteInput) async throws -> DeleteBucketWebsiteOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketWebsite") @@ -1154,7 +1106,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketWebsiteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketWebsiteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketWebsiteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1200,8 +1152,6 @@ extension S3Client { /// - Returns: `DeleteObjectOutput` : [no documentation found] public func deleteObject(input: DeleteObjectInput) async throws -> DeleteObjectOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteObject") @@ -1224,7 +1174,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1244,8 +1194,6 @@ extension S3Client { /// - Returns: `DeleteObjectTaggingOutput` : [no documentation found] public func deleteObjectTagging(input: DeleteObjectTaggingInput) async throws -> DeleteObjectTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteObjectTagging") @@ -1268,7 +1216,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteObjectTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteObjectTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteObjectTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1322,8 +1270,6 @@ extension S3Client { /// - Returns: `DeleteObjectsOutput` : [no documentation found] public func deleteObjects(input: DeleteObjectsInput) async throws -> DeleteObjectsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteObjects") @@ -1345,12 +1291,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(DeleteObjectsInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(DeleteObjectsInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Delete", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.Delete.writingClosure(_:to:), keyPath: \.delete, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Delete", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.Delete.writingClosure(_:to:), keyPath: \.delete, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteObjectsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteObjectsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteObjectsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1374,8 +1321,6 @@ extension S3Client { /// - Returns: `DeletePublicAccessBlockOutput` : [no documentation found] public func deletePublicAccessBlock(input: DeletePublicAccessBlockInput) async throws -> DeletePublicAccessBlockOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deletePublicAccessBlock") @@ -1398,7 +1343,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePublicAccessBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePublicAccessBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePublicAccessBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1416,8 +1361,6 @@ extension S3Client { /// - Returns: `GetBucketAccelerateConfigurationOutput` : [no documentation found] public func getBucketAccelerateConfiguration(input: GetBucketAccelerateConfigurationInput) async throws -> GetBucketAccelerateConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketAccelerateConfiguration") @@ -1440,7 +1383,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketAccelerateConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketAccelerateConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketAccelerateConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1458,8 +1401,6 @@ extension S3Client { /// - Returns: `GetBucketAclOutput` : [no documentation found] public func getBucketAcl(input: GetBucketAclInput) async throws -> GetBucketAclOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketAcl") @@ -1482,7 +1423,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketAclOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketAclOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketAclOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1504,8 +1445,6 @@ extension S3Client { /// - Returns: `GetBucketAnalyticsConfigurationOutput` : [no documentation found] public func getBucketAnalyticsConfiguration(input: GetBucketAnalyticsConfigurationInput) async throws -> GetBucketAnalyticsConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketAnalyticsConfiguration") @@ -1528,7 +1467,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketAnalyticsConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketAnalyticsConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketAnalyticsConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1548,8 +1487,6 @@ extension S3Client { /// - Returns: `GetBucketCorsOutput` : [no documentation found] public func getBucketCors(input: GetBucketCorsInput) async throws -> GetBucketCorsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketCors") @@ -1572,7 +1509,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketCorsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketCorsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketCorsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1592,8 +1529,6 @@ extension S3Client { /// - Returns: `GetBucketEncryptionOutput` : [no documentation found] public func getBucketEncryption(input: GetBucketEncryptionInput) async throws -> GetBucketEncryptionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketEncryption") @@ -1616,7 +1551,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketEncryptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketEncryptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketEncryptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1638,8 +1573,6 @@ extension S3Client { /// - Returns: `GetBucketIntelligentTieringConfigurationOutput` : [no documentation found] public func getBucketIntelligentTieringConfiguration(input: GetBucketIntelligentTieringConfigurationInput) async throws -> GetBucketIntelligentTieringConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketIntelligentTieringConfiguration") @@ -1661,7 +1594,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketIntelligentTieringConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketIntelligentTieringConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketIntelligentTieringConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1683,8 +1616,6 @@ extension S3Client { /// - Returns: `GetBucketInventoryConfigurationOutput` : [no documentation found] public func getBucketInventoryConfiguration(input: GetBucketInventoryConfigurationInput) async throws -> GetBucketInventoryConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketInventoryConfiguration") @@ -1707,7 +1638,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketInventoryConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketInventoryConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketInventoryConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1743,8 +1674,6 @@ extension S3Client { /// - Returns: `GetBucketLifecycleConfigurationOutput` : [no documentation found] public func getBucketLifecycleConfiguration(input: GetBucketLifecycleConfigurationInput) async throws -> GetBucketLifecycleConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketLifecycleConfiguration") @@ -1767,7 +1696,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketLifecycleConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketLifecycleConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketLifecycleConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1787,8 +1716,6 @@ extension S3Client { /// - Returns: `GetBucketLocationOutput` : [no documentation found] public func getBucketLocation(input: GetBucketLocationInput) async throws -> GetBucketLocationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketLocation") @@ -1811,7 +1738,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketLocationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketLocationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketLocationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1831,8 +1758,6 @@ extension S3Client { /// - Returns: `GetBucketLoggingOutput` : [no documentation found] public func getBucketLogging(input: GetBucketLoggingInput) async throws -> GetBucketLoggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketLogging") @@ -1855,7 +1780,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketLoggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketLoggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketLoggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1879,8 +1804,6 @@ extension S3Client { /// - Returns: `GetBucketMetricsConfigurationOutput` : [no documentation found] public func getBucketMetricsConfiguration(input: GetBucketMetricsConfigurationInput) async throws -> GetBucketMetricsConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketMetricsConfiguration") @@ -1903,7 +1826,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketMetricsConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketMetricsConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketMetricsConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1921,8 +1844,6 @@ extension S3Client { /// - Returns: `GetBucketNotificationConfigurationOutput` : A container for specifying the notification configuration of the bucket. If this element is empty, notifications are turned off for the bucket. public func getBucketNotificationConfiguration(input: GetBucketNotificationConfigurationInput) async throws -> GetBucketNotificationConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketNotificationConfiguration") @@ -1945,7 +1866,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketNotificationConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketNotificationConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketNotificationConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -1965,8 +1886,6 @@ extension S3Client { /// - Returns: `GetBucketOwnershipControlsOutput` : [no documentation found] public func getBucketOwnershipControls(input: GetBucketOwnershipControlsInput) async throws -> GetBucketOwnershipControlsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketOwnershipControls") @@ -1989,7 +1908,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketOwnershipControlsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketOwnershipControlsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketOwnershipControlsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2014,8 +1933,6 @@ extension S3Client { /// - Returns: `GetBucketPolicyOutput` : [no documentation found] public func getBucketPolicy(input: GetBucketPolicyInput) async throws -> GetBucketPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketPolicy") @@ -2038,7 +1955,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2062,8 +1979,6 @@ extension S3Client { /// - Returns: `GetBucketPolicyStatusOutput` : [no documentation found] public func getBucketPolicyStatus(input: GetBucketPolicyStatusInput) async throws -> GetBucketPolicyStatusOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketPolicyStatus") @@ -2086,7 +2001,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketPolicyStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketPolicyStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketPolicyStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2106,8 +2021,6 @@ extension S3Client { /// - Returns: `GetBucketReplicationOutput` : [no documentation found] public func getBucketReplication(input: GetBucketReplicationInput) async throws -> GetBucketReplicationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketReplication") @@ -2130,7 +2043,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketReplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketReplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketReplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2148,8 +2061,6 @@ extension S3Client { /// - Returns: `GetBucketRequestPaymentOutput` : [no documentation found] public func getBucketRequestPayment(input: GetBucketRequestPaymentInput) async throws -> GetBucketRequestPaymentOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketRequestPayment") @@ -2172,7 +2083,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketRequestPaymentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketRequestPaymentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketRequestPaymentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2202,8 +2113,6 @@ extension S3Client { /// - Returns: `GetBucketTaggingOutput` : [no documentation found] public func getBucketTagging(input: GetBucketTaggingInput) async throws -> GetBucketTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketTagging") @@ -2226,7 +2135,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2248,8 +2157,6 @@ extension S3Client { /// - Returns: `GetBucketVersioningOutput` : [no documentation found] public func getBucketVersioning(input: GetBucketVersioningInput) async throws -> GetBucketVersioningOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketVersioning") @@ -2272,7 +2179,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketVersioningOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketVersioningOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketVersioningOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2292,8 +2199,6 @@ extension S3Client { /// - Returns: `GetBucketWebsiteOutput` : [no documentation found] public func getBucketWebsite(input: GetBucketWebsiteInput) async throws -> GetBucketWebsiteOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketWebsite") @@ -2316,7 +2221,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketWebsiteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketWebsiteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketWebsiteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2371,8 +2276,6 @@ extension S3Client { /// - `NoSuchKey` : The specified key does not exist. public func getObject(input: GetObjectInput) async throws -> GetObjectOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObject") @@ -2395,8 +2298,9 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsResponseMiddleware(validationMode: true)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result } @@ -2423,8 +2327,6 @@ extension S3Client { /// - `NoSuchKey` : The specified key does not exist. public func getObjectAcl(input: GetObjectAclInput) async throws -> GetObjectAclOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObjectAcl") @@ -2447,7 +2349,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectAclOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectAclOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectAclOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2528,8 +2430,6 @@ extension S3Client { /// - `NoSuchKey` : The specified key does not exist. public func getObjectAttributes(input: GetObjectAttributesInput) async throws -> GetObjectAttributesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObjectAttributes") @@ -2552,7 +2452,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2570,8 +2470,6 @@ extension S3Client { /// - Returns: `GetObjectLegalHoldOutput` : [no documentation found] public func getObjectLegalHold(input: GetObjectLegalHoldInput) async throws -> GetObjectLegalHoldOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObjectLegalHold") @@ -2594,7 +2492,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectLegalHoldOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectLegalHoldOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectLegalHoldOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2612,8 +2510,6 @@ extension S3Client { /// - Returns: `GetObjectLockConfigurationOutput` : [no documentation found] public func getObjectLockConfiguration(input: GetObjectLockConfigurationInput) async throws -> GetObjectLockConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObjectLockConfiguration") @@ -2636,7 +2532,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectLockConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectLockConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectLockConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2654,8 +2550,6 @@ extension S3Client { /// - Returns: `GetObjectRetentionOutput` : [no documentation found] public func getObjectRetention(input: GetObjectRetentionInput) async throws -> GetObjectRetentionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObjectRetention") @@ -2678,7 +2572,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectRetentionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectRetentionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectRetentionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2700,8 +2594,6 @@ extension S3Client { /// - Returns: `GetObjectTaggingOutput` : [no documentation found] public func getObjectTagging(input: GetObjectTaggingInput) async throws -> GetObjectTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObjectTagging") @@ -2724,7 +2616,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2742,8 +2634,6 @@ extension S3Client { /// - Returns: `GetObjectTorrentOutput` : [no documentation found] public func getObjectTorrent(input: GetObjectTorrentInput) async throws -> GetObjectTorrentOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObjectTorrent") @@ -2766,7 +2656,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectTorrentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectTorrentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectTorrentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2789,8 +2679,6 @@ extension S3Client { /// - Returns: `GetPublicAccessBlockOutput` : [no documentation found] public func getPublicAccessBlock(input: GetPublicAccessBlockInput) async throws -> GetPublicAccessBlockOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getPublicAccessBlock") @@ -2813,7 +2701,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPublicAccessBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPublicAccessBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPublicAccessBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2841,8 +2729,6 @@ extension S3Client { /// - `NotFound` : The specified content does not exist. public func headBucket(input: HeadBucketInput) async throws -> HeadBucketOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .head) .withServiceName(value: serviceName) .withOperation(value: "headBucket") @@ -2864,7 +2750,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(HeadBucketOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(HeadBucketOutput.httpBinding, responseDocumentBinding), responseErrorClosure(HeadBucketOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2926,8 +2812,6 @@ extension S3Client { /// - `NotFound` : The specified content does not exist. public func headObject(input: HeadObjectInput) async throws -> HeadObjectOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .head) .withServiceName(value: serviceName) .withOperation(value: "headObject") @@ -2950,7 +2834,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(HeadObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(HeadObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(HeadObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -2972,8 +2856,6 @@ extension S3Client { /// - Returns: `ListBucketAnalyticsConfigurationsOutput` : [no documentation found] public func listBucketAnalyticsConfigurations(input: ListBucketAnalyticsConfigurationsInput) async throws -> ListBucketAnalyticsConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listBucketAnalyticsConfigurations") @@ -2996,7 +2878,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListBucketAnalyticsConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListBucketAnalyticsConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListBucketAnalyticsConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3018,8 +2900,6 @@ extension S3Client { /// - Returns: `ListBucketIntelligentTieringConfigurationsOutput` : [no documentation found] public func listBucketIntelligentTieringConfigurations(input: ListBucketIntelligentTieringConfigurationsInput) async throws -> ListBucketIntelligentTieringConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listBucketIntelligentTieringConfigurations") @@ -3041,7 +2921,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListBucketIntelligentTieringConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListBucketIntelligentTieringConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListBucketIntelligentTieringConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3063,8 +2943,6 @@ extension S3Client { /// - Returns: `ListBucketInventoryConfigurationsOutput` : [no documentation found] public func listBucketInventoryConfigurations(input: ListBucketInventoryConfigurationsInput) async throws -> ListBucketInventoryConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listBucketInventoryConfigurations") @@ -3087,7 +2965,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListBucketInventoryConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListBucketInventoryConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListBucketInventoryConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3109,8 +2987,6 @@ extension S3Client { /// - Returns: `ListBucketMetricsConfigurationsOutput` : [no documentation found] public func listBucketMetricsConfigurations(input: ListBucketMetricsConfigurationsInput) async throws -> ListBucketMetricsConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listBucketMetricsConfigurations") @@ -3133,7 +3009,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListBucketMetricsConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListBucketMetricsConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListBucketMetricsConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3149,8 +3025,6 @@ extension S3Client { /// - Returns: `ListBucketsOutput` : [no documentation found] public func listBuckets(input: ListBucketsInput) async throws -> ListBucketsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listBuckets") @@ -3172,7 +3046,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListBucketsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListBucketsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListBucketsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3188,8 +3062,6 @@ extension S3Client { /// - Returns: `ListDirectoryBucketsOutput` : [no documentation found] public func listDirectoryBuckets(input: ListDirectoryBucketsInput) async throws -> ListDirectoryBucketsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listDirectoryBuckets") @@ -3211,7 +3083,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListDirectoryBucketsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListDirectoryBucketsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListDirectoryBucketsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3258,8 +3130,6 @@ extension S3Client { /// - Returns: `ListMultipartUploadsOutput` : [no documentation found] public func listMultipartUploads(input: ListMultipartUploadsInput) async throws -> ListMultipartUploadsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listMultipartUploads") @@ -3282,7 +3152,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListMultipartUploadsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListMultipartUploadsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListMultipartUploadsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3306,8 +3176,6 @@ extension S3Client { /// - Returns: `ListObjectVersionsOutput` : [no documentation found] public func listObjectVersions(input: ListObjectVersionsInput) async throws -> ListObjectVersionsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listObjectVersions") @@ -3330,7 +3198,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListObjectVersionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListObjectVersionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListObjectVersionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3361,8 +3229,6 @@ extension S3Client { /// - `NoSuchBucket` : The specified bucket does not exist. public func listObjects(input: ListObjectsInput) async throws -> ListObjectsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listObjects") @@ -3385,7 +3251,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListObjectsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListObjectsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListObjectsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3426,8 +3292,6 @@ extension S3Client { /// - `NoSuchBucket` : The specified bucket does not exist. public func listObjectsV2(input: ListObjectsV2Input) async throws -> ListObjectsV2Output { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listObjectsV2") @@ -3450,7 +3314,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListObjectsV2OutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListObjectsV2Output.httpBinding, responseDocumentBinding), responseErrorClosure(ListObjectsV2OutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3485,8 +3349,6 @@ extension S3Client { /// - Returns: `ListPartsOutput` : [no documentation found] public func listParts(input: ListPartsInput) async throws -> ListPartsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listParts") @@ -3509,7 +3371,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPartsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPartsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPartsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3536,8 +3398,6 @@ extension S3Client { /// - Returns: `PutBucketAccelerateConfigurationOutput` : [no documentation found] public func putBucketAccelerateConfiguration(input: PutBucketAccelerateConfigurationInput) async throws -> PutBucketAccelerateConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketAccelerateConfiguration") @@ -3558,12 +3418,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketAccelerateConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketAccelerateConfigurationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AccelerateConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.AccelerateConfiguration.writingClosure(_:to:), keyPath: \.accelerateConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AccelerateConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.AccelerateConfiguration.writingClosure(_:to:), keyPath: \.accelerateConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketAccelerateConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketAccelerateConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketAccelerateConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3655,8 +3516,6 @@ extension S3Client { /// - Returns: `PutBucketAclOutput` : [no documentation found] public func putBucketAcl(input: PutBucketAclInput) async throws -> PutBucketAclOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketAcl") @@ -3678,12 +3537,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketAclInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketAclInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AccessControlPolicy", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.AccessControlPolicy.writingClosure(_:to:), keyPath: \.accessControlPolicy, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AccessControlPolicy", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.AccessControlPolicy.writingClosure(_:to:), keyPath: \.accessControlPolicy, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketAclOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketAclOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketAclOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3738,8 +3598,6 @@ extension S3Client { /// - Returns: `PutBucketAnalyticsConfigurationOutput` : [no documentation found] public func putBucketAnalyticsConfiguration(input: PutBucketAnalyticsConfigurationInput) async throws -> PutBucketAnalyticsConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketAnalyticsConfiguration") @@ -3760,12 +3618,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketAnalyticsConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketAnalyticsConfigurationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AnalyticsConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.AnalyticsConfiguration.writingClosure(_:to:), keyPath: \.analyticsConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AnalyticsConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.AnalyticsConfiguration.writingClosure(_:to:), keyPath: \.analyticsConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketAnalyticsConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketAnalyticsConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketAnalyticsConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3796,8 +3654,6 @@ extension S3Client { /// - Returns: `PutBucketCorsOutput` : [no documentation found] public func putBucketCors(input: PutBucketCorsInput) async throws -> PutBucketCorsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketCors") @@ -3819,12 +3675,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketCorsInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketCorsInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CORSConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.CORSConfiguration.writingClosure(_:to:), keyPath: \.corsConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CORSConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.CORSConfiguration.writingClosure(_:to:), keyPath: \.corsConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketCorsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketCorsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketCorsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3844,8 +3701,6 @@ extension S3Client { /// - Returns: `PutBucketEncryptionOutput` : [no documentation found] public func putBucketEncryption(input: PutBucketEncryptionInput) async throws -> PutBucketEncryptionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketEncryption") @@ -3867,12 +3722,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketEncryptionInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketEncryptionInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ServerSideEncryptionConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ServerSideEncryptionConfiguration.writingClosure(_:to:), keyPath: \.serverSideEncryptionConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ServerSideEncryptionConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ServerSideEncryptionConfiguration.writingClosure(_:to:), keyPath: \.serverSideEncryptionConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketEncryptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketEncryptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketEncryptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3897,8 +3753,6 @@ extension S3Client { /// - Returns: `PutBucketIntelligentTieringConfigurationOutput` : [no documentation found] public func putBucketIntelligentTieringConfiguration(input: PutBucketIntelligentTieringConfigurationInput) async throws -> PutBucketIntelligentTieringConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketIntelligentTieringConfiguration") @@ -3918,12 +3772,12 @@ extension S3Client { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketIntelligentTieringConfigurationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("IntelligentTieringConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.IntelligentTieringConfiguration.writingClosure(_:to:), keyPath: \.intelligentTieringConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("IntelligentTieringConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.IntelligentTieringConfiguration.writingClosure(_:to:), keyPath: \.intelligentTieringConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketIntelligentTieringConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketIntelligentTieringConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketIntelligentTieringConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -3945,8 +3799,6 @@ extension S3Client { /// - Returns: `PutBucketInventoryConfigurationOutput` : [no documentation found] public func putBucketInventoryConfiguration(input: PutBucketInventoryConfigurationInput) async throws -> PutBucketInventoryConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketInventoryConfiguration") @@ -3967,12 +3819,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketInventoryConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketInventoryConfigurationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("InventoryConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.InventoryConfiguration.writingClosure(_:to:), keyPath: \.inventoryConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("InventoryConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.InventoryConfiguration.writingClosure(_:to:), keyPath: \.inventoryConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketInventoryConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketInventoryConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketInventoryConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4012,8 +3864,6 @@ extension S3Client { /// - Returns: `PutBucketLifecycleConfigurationOutput` : [no documentation found] public func putBucketLifecycleConfiguration(input: PutBucketLifecycleConfigurationInput) async throws -> PutBucketLifecycleConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketLifecycleConfiguration") @@ -4035,12 +3885,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketLifecycleConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketLifecycleConfigurationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("LifecycleConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.BucketLifecycleConfiguration.writingClosure(_:to:), keyPath: \.lifecycleConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("LifecycleConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.BucketLifecycleConfiguration.writingClosure(_:to:), keyPath: \.lifecycleConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketLifecycleConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketLifecycleConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketLifecycleConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4073,8 +3924,6 @@ extension S3Client { /// - Returns: `PutBucketLoggingOutput` : [no documentation found] public func putBucketLogging(input: PutBucketLoggingInput) async throws -> PutBucketLoggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketLogging") @@ -4096,12 +3945,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketLoggingInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketLoggingInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("BucketLoggingStatus", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.BucketLoggingStatus.writingClosure(_:to:), keyPath: \.bucketLoggingStatus, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("BucketLoggingStatus", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.BucketLoggingStatus.writingClosure(_:to:), keyPath: \.bucketLoggingStatus, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketLoggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketLoggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketLoggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4132,8 +3982,6 @@ extension S3Client { /// - Returns: `PutBucketMetricsConfigurationOutput` : [no documentation found] public func putBucketMetricsConfiguration(input: PutBucketMetricsConfigurationInput) async throws -> PutBucketMetricsConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketMetricsConfiguration") @@ -4154,12 +4002,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketMetricsConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketMetricsConfigurationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("MetricsConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.MetricsConfiguration.writingClosure(_:to:), keyPath: \.metricsConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("MetricsConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.MetricsConfiguration.writingClosure(_:to:), keyPath: \.metricsConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketMetricsConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketMetricsConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketMetricsConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4177,8 +4025,6 @@ extension S3Client { /// - Returns: `PutBucketNotificationConfigurationOutput` : [no documentation found] public func putBucketNotificationConfiguration(input: PutBucketNotificationConfigurationInput) async throws -> PutBucketNotificationConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketNotificationConfiguration") @@ -4199,12 +4045,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketNotificationConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketNotificationConfigurationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("NotificationConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.NotificationConfiguration.writingClosure(_:to:), keyPath: \.notificationConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("NotificationConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.NotificationConfiguration.writingClosure(_:to:), keyPath: \.notificationConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketNotificationConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketNotificationConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketNotificationConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4224,8 +4070,6 @@ extension S3Client { /// - Returns: `PutBucketOwnershipControlsOutput` : [no documentation found] public func putBucketOwnershipControls(input: PutBucketOwnershipControlsInput) async throws -> PutBucketOwnershipControlsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketOwnershipControls") @@ -4247,12 +4091,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketOwnershipControlsInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketOwnershipControlsInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OwnershipControls", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.OwnershipControls.writingClosure(_:to:), keyPath: \.ownershipControls, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("OwnershipControls", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.OwnershipControls.writingClosure(_:to:), keyPath: \.ownershipControls, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketOwnershipControlsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketOwnershipControlsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketOwnershipControlsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4279,8 +4123,6 @@ extension S3Client { /// - Returns: `PutBucketPolicyOutput` : [no documentation found] public func putBucketPolicy(input: PutBucketPolicyInput) async throws -> PutBucketPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketPolicy") @@ -4303,11 +4145,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketPolicyInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "text/plain")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.StringBodyMiddleware(keyPath: \.policy)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4327,8 +4170,6 @@ extension S3Client { /// - Returns: `PutBucketReplicationOutput` : [no documentation found] public func putBucketReplication(input: PutBucketReplicationInput) async throws -> PutBucketReplicationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketReplication") @@ -4350,12 +4191,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketReplicationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketReplicationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ReplicationConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ReplicationConfiguration.writingClosure(_:to:), keyPath: \.replicationConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ReplicationConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ReplicationConfiguration.writingClosure(_:to:), keyPath: \.replicationConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketReplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketReplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketReplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4375,8 +4217,6 @@ extension S3Client { /// - Returns: `PutBucketRequestPaymentOutput` : [no documentation found] public func putBucketRequestPayment(input: PutBucketRequestPaymentInput) async throws -> PutBucketRequestPaymentOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketRequestPayment") @@ -4398,12 +4238,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketRequestPaymentInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketRequestPaymentInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("RequestPaymentConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.RequestPaymentConfiguration.writingClosure(_:to:), keyPath: \.requestPaymentConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("RequestPaymentConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.RequestPaymentConfiguration.writingClosure(_:to:), keyPath: \.requestPaymentConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketRequestPaymentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketRequestPaymentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketRequestPaymentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4434,8 +4275,6 @@ extension S3Client { /// - Returns: `PutBucketTaggingOutput` : [no documentation found] public func putBucketTagging(input: PutBucketTaggingInput) async throws -> PutBucketTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketTagging") @@ -4457,12 +4296,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketTaggingInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketTaggingInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Tagging", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.Tagging.writingClosure(_:to:), keyPath: \.tagging, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Tagging", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.Tagging.writingClosure(_:to:), keyPath: \.tagging, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4484,8 +4324,6 @@ extension S3Client { /// - Returns: `PutBucketVersioningOutput` : [no documentation found] public func putBucketVersioning(input: PutBucketVersioningInput) async throws -> PutBucketVersioningOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketVersioning") @@ -4507,12 +4345,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketVersioningInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketVersioningInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("VersioningConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.VersioningConfiguration.writingClosure(_:to:), keyPath: \.versioningConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("VersioningConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.VersioningConfiguration.writingClosure(_:to:), keyPath: \.versioningConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketVersioningOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketVersioningOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketVersioningOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4574,8 +4413,6 @@ extension S3Client { /// - Returns: `PutBucketWebsiteOutput` : [no documentation found] public func putBucketWebsite(input: PutBucketWebsiteInput) async throws -> PutBucketWebsiteOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketWebsite") @@ -4597,12 +4434,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketWebsiteInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutBucketWebsiteInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("WebsiteConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.WebsiteConfiguration.writingClosure(_:to:), keyPath: \.websiteConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("WebsiteConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.WebsiteConfiguration.writingClosure(_:to:), keyPath: \.websiteConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketWebsiteOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketWebsiteOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketWebsiteOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4661,8 +4499,6 @@ extension S3Client { /// - Returns: `PutObjectOutput` : [no documentation found] public func putObject(input: PutObjectInput) async throws -> PutObjectOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putObject") @@ -4684,11 +4520,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutObjectInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/octet-stream")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BlobStreamBodyMiddleware(keyPath: \.body)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4776,8 +4613,6 @@ extension S3Client { /// - `NoSuchKey` : The specified key does not exist. public func putObjectAcl(input: PutObjectAclInput) async throws -> PutObjectAclOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putObjectAcl") @@ -4799,12 +4634,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutObjectAclInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutObjectAclInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AccessControlPolicy", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.AccessControlPolicy.writingClosure(_:to:), keyPath: \.accessControlPolicy, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AccessControlPolicy", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.AccessControlPolicy.writingClosure(_:to:), keyPath: \.accessControlPolicy, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutObjectAclOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutObjectAclOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutObjectAclOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4820,8 +4656,6 @@ extension S3Client { /// - Returns: `PutObjectLegalHoldOutput` : [no documentation found] public func putObjectLegalHold(input: PutObjectLegalHoldInput) async throws -> PutObjectLegalHoldOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putObjectLegalHold") @@ -4843,12 +4677,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutObjectLegalHoldInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutObjectLegalHoldInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("LegalHold", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ObjectLockLegalHold.writingClosure(_:to:), keyPath: \.legalHold, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("LegalHold", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ObjectLockLegalHold.writingClosure(_:to:), keyPath: \.legalHold, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutObjectLegalHoldOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutObjectLegalHoldOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutObjectLegalHoldOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4870,8 +4705,6 @@ extension S3Client { /// - Returns: `PutObjectLockConfigurationOutput` : [no documentation found] public func putObjectLockConfiguration(input: PutObjectLockConfigurationInput) async throws -> PutObjectLockConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putObjectLockConfiguration") @@ -4893,12 +4726,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutObjectLockConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutObjectLockConfigurationInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ObjectLockConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ObjectLockConfiguration.writingClosure(_:to:), keyPath: \.objectLockConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ObjectLockConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ObjectLockConfiguration.writingClosure(_:to:), keyPath: \.objectLockConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutObjectLockConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutObjectLockConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutObjectLockConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4914,8 +4748,6 @@ extension S3Client { /// - Returns: `PutObjectRetentionOutput` : [no documentation found] public func putObjectRetention(input: PutObjectRetentionInput) async throws -> PutObjectRetentionOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putObjectRetention") @@ -4937,12 +4769,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutObjectRetentionInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutObjectRetentionInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Retention", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ObjectLockRetention.writingClosure(_:to:), keyPath: \.retention, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Retention", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.ObjectLockRetention.writingClosure(_:to:), keyPath: \.retention, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutObjectRetentionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutObjectRetentionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutObjectRetentionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -4973,8 +4806,6 @@ extension S3Client { /// - Returns: `PutObjectTaggingOutput` : [no documentation found] public func putObjectTagging(input: PutObjectTaggingInput) async throws -> PutObjectTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putObjectTagging") @@ -4996,12 +4827,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutObjectTaggingInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutObjectTaggingInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Tagging", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.Tagging.writingClosure(_:to:), keyPath: \.tagging, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Tagging", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.Tagging.writingClosure(_:to:), keyPath: \.tagging, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutObjectTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutObjectTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutObjectTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -5025,8 +4857,6 @@ extension S3Client { /// - Returns: `PutPublicAccessBlockOutput` : [no documentation found] public func putPublicAccessBlock(input: PutPublicAccessBlockInput) async throws -> PutPublicAccessBlockOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putPublicAccessBlock") @@ -5048,12 +4878,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutPublicAccessBlockInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutPublicAccessBlockInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PublicAccessBlockConfiguration", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:), keyPath: \.publicAccessBlockConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PublicAccessBlockConfiguration", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:), keyPath: \.publicAccessBlockConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutPublicAccessBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutPublicAccessBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutPublicAccessBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -5163,8 +4994,6 @@ extension S3Client { /// - `ObjectAlreadyInActiveTierError` : This action is not allowed against this storage tier. public func restoreObject(input: RestoreObjectInput) async throws -> RestoreObjectOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "restoreObject") @@ -5185,12 +5014,13 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(RestoreObjectInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(RestoreObjectInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("RestoreRequest", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.RestoreRequest.writingClosure(_:to:), keyPath: \.restoreRequest, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("RestoreRequest", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: S3ClientTypes.RestoreRequest.writingClosure(_:to:), keyPath: \.restoreRequest, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RestoreObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RestoreObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RestoreObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -5230,8 +5060,6 @@ extension S3Client { /// - Returns: `SelectObjectContentOutput` : [no documentation found] public func selectObjectContent(input: SelectObjectContentInput) async throws -> SelectObjectContentOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "selectObjectContent") @@ -5252,12 +5080,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(SelectObjectContentInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(SelectObjectContentInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("SelectObjectContentRequest", namespace: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: SelectObjectContentInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("SelectObjectContentRequest", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/"))), inputWritingClosure: SelectObjectContentInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SelectObjectContentOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SelectObjectContentOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SelectObjectContentOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -5319,8 +5147,6 @@ extension S3Client { /// - Returns: `UploadPartOutput` : [no documentation found] public func uploadPart(input: UploadPartInput) async throws -> UploadPartOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "uploadPart") @@ -5342,11 +5168,12 @@ extension S3Client { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(UploadPartInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/octet-stream")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BlobStreamBodyMiddleware(keyPath: \.body)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UploadPartOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UploadPartOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UploadPartOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -5423,8 +5250,6 @@ extension S3Client { /// - Returns: `UploadPartCopyOutput` : [no documentation found] public func uploadPartCopy(input: UploadPartCopyInput) async throws -> UploadPartCopyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "uploadPartCopy") @@ -5447,7 +5272,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UploadPartCopyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UploadPartCopyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UploadPartCopyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) @@ -5463,8 +5288,6 @@ extension S3Client { /// - Returns: `WriteGetObjectResponseOutput` : [no documentation found] public func writeGetObjectResponse(input: WriteGetObjectResponseInput) async throws -> WriteGetObjectResponseOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "writeGetObjectResponse") @@ -5490,7 +5313,7 @@ extension S3Client { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, unsignedBody: true, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(WriteGetObjectResponseOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(WriteGetObjectResponseOutput.httpBinding, responseDocumentBinding), responseErrorClosure(WriteGetObjectResponseOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) diff --git a/Sources/Services/AWSS3/models/Models.swift b/Sources/Services/AWSS3/models/Models.swift index 72ec8177220..fd96361916e 100644 --- a/Sources/Services/AWSS3/models/Models.swift +++ b/Sources/Services/AWSS3/models/Models.swift @@ -1,23 +1,24 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite import SmithyXML import typealias Foundation.TimeInterval -extension S3ClientTypes.AbortIncompleteMultipartUpload: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case daysAfterInitiation = "DaysAfterInitiation" - } +extension S3ClientTypes.AbortIncompleteMultipartUpload { static func writingClosure(_ value: S3ClientTypes.AbortIncompleteMultipartUpload?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DaysAfterInitiation")].write(value.daysAfterInitiation) + try writer["DaysAfterInitiation"].write(value.daysAfterInitiation) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let daysAfterInitiationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .daysAfterInitiation) - daysAfterInitiation = daysAfterInitiationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.AbortIncompleteMultipartUpload() + value.daysAfterInitiation = try reader["DaysAfterInitiation"].readIfPresent() + return value + } } } @@ -107,12 +108,15 @@ public struct AbortMultipartUploadInput: Swift.Equatable { } } -extension AbortMultipartUploadOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil +extension AbortMultipartUploadOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = AbortMultipartUploadOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + return value } } } @@ -129,30 +133,35 @@ public struct AbortMultipartUploadOutput: Swift.Equatable { } } -enum AbortMultipartUploadOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NoSuchUpload": return try await NoSuchUpload(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum AbortMultipartUploadOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NoSuchUpload": return try await NoSuchUpload.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.AccelerateConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ClientTypes.AccelerateConfiguration { static func writingClosure(_ value: S3ClientTypes.AccelerateConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketAccelerateStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.AccelerateConfiguration() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -172,41 +181,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.AccessControlPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case grants = "AccessControlList" - case owner = "Owner" - } +extension S3ClientTypes.AccessControlPolicy { static func writingClosure(_ value: S3ClientTypes.AccessControlPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlList")].writeList(value.grants, memberWritingClosure: S3ClientTypes.Grant.writingClosure(_:to:), memberNodeInfo: .init("Grant"), isFlattened: false) - try writer[.init("Owner")].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.grants) { - struct KeyVal0{struct Grant{}} - let grantsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .grants) - if let grantsWrappedContainer = grantsWrappedContainer { - let grantsContainer = try grantsWrappedContainer.decodeIfPresent([S3ClientTypes.Grant].self, forKey: .member) - var grantsBuffer:[S3ClientTypes.Grant]? = nil - if let grantsContainer = grantsContainer { - grantsBuffer = [S3ClientTypes.Grant]() - for structureContainer0 in grantsContainer { - grantsBuffer?.append(structureContainer0) - } - } - grants = grantsBuffer - } else { - grants = [] - } - } else { - grants = nil + try writer["AccessControlList"].writeList(value.grants, memberWritingClosure: S3ClientTypes.Grant.writingClosure(_:to:), memberNodeInfo: "Grant", isFlattened: false) + try writer["Owner"].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.AccessControlPolicy() + value.grants = try reader["AccessControlList"].readListIfPresent(memberReadingClosure: S3ClientTypes.Grant.readingClosure, memberNodeInfo: "Grant", isFlattened: false) + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + return value } - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded } } @@ -230,20 +220,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.AccessControlTranslation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case owner = "Owner" - } +extension S3ClientTypes.AccessControlTranslation { static func writingClosure(_ value: S3ClientTypes.AccessControlTranslation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Owner")].write(value.owner) + try writer["Owner"].write(value.owner) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.OwnerOverride.self, forKey: .owner) - owner = ownerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.AccessControlTranslation() + value.owner = try reader["Owner"].readIfPresent() + return value + } } } @@ -264,39 +254,21 @@ extension S3ClientTypes { } -extension S3ClientTypes.AnalyticsAndOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `prefix` = "Prefix" - case tags = "Tag" - } +extension S3ClientTypes.AnalyticsAndOperator { static func writingClosure(_ value: S3ClientTypes.AnalyticsAndOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tag")].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - if containerValues.contains(.tags) { - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .tags) - if tagsWrappedContainer != nil { - let tagsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Tag].self, forKey: .tags) - var tagsBuffer:[S3ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + try writer["Prefix"].write(value.`prefix`) + try writer["Tag"].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.AnalyticsAndOperator() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tags = try reader["Tag"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: true) + return value } } } @@ -321,28 +293,24 @@ extension S3ClientTypes { } -extension S3ClientTypes.AnalyticsConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "Filter" - case id = "Id" - case storageClassAnalysis = "StorageClassAnalysis" - } +extension S3ClientTypes.AnalyticsConfiguration { static func writingClosure(_ value: S3ClientTypes.AnalyticsConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.AnalyticsFilter.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("StorageClassAnalysis")].write(value.storageClassAnalysis, writingClosure: S3ClientTypes.StorageClassAnalysis.writingClosure(_:to:)) + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.AnalyticsFilter.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["StorageClassAnalysis"].write(value.storageClassAnalysis, writingClosure: S3ClientTypes.StorageClassAnalysis.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AnalyticsFilter.self, forKey: .filter) - filter = filterDecoded - let storageClassAnalysisDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClassAnalysis.self, forKey: .storageClassAnalysis) - storageClassAnalysis = storageClassAnalysisDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.AnalyticsConfiguration() + value.id = try reader["Id"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.AnalyticsFilter.readingClosure) + value.storageClassAnalysis = try reader["StorageClassAnalysis"].readIfPresent(readingClosure: S3ClientTypes.StorageClassAnalysis.readingClosure) + return value + } } } @@ -372,20 +340,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.AnalyticsExportDestination: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3BucketDestination = "S3BucketDestination" - } +extension S3ClientTypes.AnalyticsExportDestination { static func writingClosure(_ value: S3ClientTypes.AnalyticsExportDestination?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("S3BucketDestination")].write(value.s3BucketDestination, writingClosure: S3ClientTypes.AnalyticsS3BucketDestination.writingClosure(_:to:)) + try writer["S3BucketDestination"].write(value.s3BucketDestination, writingClosure: S3ClientTypes.AnalyticsS3BucketDestination.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDestinationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AnalyticsS3BucketDestination.self, forKey: .s3BucketDestination) - s3BucketDestination = s3BucketDestinationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.AnalyticsExportDestination() + value.s3BucketDestination = try reader["S3BucketDestination"].readIfPresent(readingClosure: S3ClientTypes.AnalyticsS3BucketDestination.readingClosure) + return value + } } } @@ -406,43 +374,36 @@ extension S3ClientTypes { } -extension S3ClientTypes.AnalyticsFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case and = "And" - case `prefix` = "Prefix" - case tag = "Tag" - case sdkUnknown - } +extension S3ClientTypes.AnalyticsFilter { static func writingClosure(_ value: S3ClientTypes.AnalyticsFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } switch value { case let .and(and): - try writer[.init("And")].write(and, writingClosure: S3ClientTypes.AnalyticsAndOperator.writingClosure(_:to:)) + try writer["And"].write(and, writingClosure: S3ClientTypes.AnalyticsAndOperator.writingClosure(_:to:)) case let .`prefix`(`prefix`): - try writer[.init("Prefix")].write(`prefix`) + try writer["Prefix"].write(`prefix`) case let .tag(tag): - try writer[.init("Tag")].write(tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) + try writer["Tag"].write(tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) case let .sdkUnknown(sdkUnknown): try writer[.init("sdkUnknown")].write(sdkUnknown) } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let key = containerValues.allKeys.first - switch key { - case .`prefix`: - let prefixDecoded = try containerValues.decode(Swift.String.self, forKey: .prefix) - self = .prefix(prefixDecoded) - case .tag: - let tagDecoded = try containerValues.decode(S3ClientTypes.Tag.self, forKey: .tag) - self = .tag(tagDecoded) - case .and: - let andDecoded = try containerValues.decode(S3ClientTypes.AnalyticsAndOperator.self, forKey: .and) - self = .and(andDecoded) - default: - self = .sdkUnknown("") + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + let name = reader.children.first?.nodeInfo.name + switch name { + case "Prefix": + return .`prefix`(try reader["Prefix"].read()) + case "Tag": + return .tag(try reader["Tag"].read(readingClosure: S3ClientTypes.Tag.readingClosure)) + case "And": + return .and(try reader["And"].read(readingClosure: S3ClientTypes.AnalyticsAndOperator.readingClosure)) + default: + return .sdkUnknown(name ?? "") + } } } } @@ -461,32 +422,26 @@ extension S3ClientTypes { } -extension S3ClientTypes.AnalyticsS3BucketDestination: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case bucketAccountId = "BucketAccountId" - case format = "Format" - case `prefix` = "Prefix" - } +extension S3ClientTypes.AnalyticsS3BucketDestination { static func writingClosure(_ value: S3ClientTypes.AnalyticsS3BucketDestination?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("BucketAccountId")].write(value.bucketAccountId) - try writer[.init("Format")].write(value.format) - try writer[.init("Prefix")].write(value.`prefix`) + try writer["Bucket"].write(value.bucket) + try writer["BucketAccountId"].write(value.bucketAccountId) + try writer["Format"].write(value.format) + try writer["Prefix"].write(value.`prefix`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let formatDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AnalyticsS3ExportFileFormat.self, forKey: .format) - format = formatDecoded - let bucketAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketAccountId) - bucketAccountId = bucketAccountIdDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.AnalyticsS3BucketDestination() + value.format = try reader["Format"].readIfPresent() + value.bucketAccountId = try reader["BucketAccountId"].readIfPresent() + value.bucket = try reader["Bucket"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + return value + } } } @@ -581,24 +536,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.Bucket: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationDate = "CreationDate" - case name = "Name" - } +extension S3ClientTypes.Bucket { static func writingClosure(_ value: S3ClientTypes.Bucket?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreationDate")].writeTimestamp(value.creationDate, format: .dateTime) - try writer[.init("Name")].write(value.name) + try writer["CreationDate"].writeTimestamp(value.creationDate, format: .dateTime) + try writer["Name"].write(value.name) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let creationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationDate) - creationDate = creationDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Bucket() + value.name = try reader["Name"].readIfPresent() + value.creationDate = try reader["CreationDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -655,11 +608,14 @@ extension S3ClientTypes { } extension BucketAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = BucketAlreadyExists() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -678,11 +634,14 @@ public struct BucketAlreadyExists: ClientRuntime.ModeledError, AWSClientRuntime. } extension BucketAlreadyOwnedByYou { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = BucketAlreadyOwnedByYou() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -738,24 +697,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.BucketInfo: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataRedundancy = "DataRedundancy" - case type = "Type" - } +extension S3ClientTypes.BucketInfo { static func writingClosure(_ value: S3ClientTypes.BucketInfo?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DataRedundancy")].write(value.dataRedundancy) - try writer[.init("Type")].write(value.type) + try writer["DataRedundancy"].write(value.dataRedundancy) + try writer["Type"].write(value.type) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataRedundancyDecoded = try containerValues.decodeIfPresent(S3ClientTypes.DataRedundancy.self, forKey: .dataRedundancy) - dataRedundancy = dataRedundancyDecoded - let typeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketType.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.BucketInfo() + value.dataRedundancy = try reader["DataRedundancy"].readIfPresent() + value.type = try reader["Type"].readIfPresent() + return value + } } } @@ -779,35 +736,19 @@ extension S3ClientTypes { } -extension S3ClientTypes.BucketLifecycleConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rule" - } +extension S3ClientTypes.BucketLifecycleConfiguration { static func writingClosure(_ value: S3ClientTypes.BucketLifecycleConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Rule")].writeList(value.rules, memberWritingClosure: S3ClientTypes.LifecycleRule.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.rules) { - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .rules) - if rulesWrappedContainer != nil { - let rulesContainer = try containerValues.decodeIfPresent([S3ClientTypes.LifecycleRule].self, forKey: .rules) - var rulesBuffer:[S3ClientTypes.LifecycleRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [S3ClientTypes.LifecycleRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] - } - } else { - rules = nil + try writer["Rule"].writeList(value.rules, memberWritingClosure: S3ClientTypes.LifecycleRule.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.BucketLifecycleConfiguration() + value.rules = try reader["Rule"].readListIfPresent(memberReadingClosure: S3ClientTypes.LifecycleRule.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -939,20 +880,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.BucketLoggingStatus: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loggingEnabled = "LoggingEnabled" - } +extension S3ClientTypes.BucketLoggingStatus { static func writingClosure(_ value: S3ClientTypes.BucketLoggingStatus?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("LoggingEnabled")].write(value.loggingEnabled, writingClosure: S3ClientTypes.LoggingEnabled.writingClosure(_:to:)) + try writer["LoggingEnabled"].write(value.loggingEnabled, writingClosure: S3ClientTypes.LoggingEnabled.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loggingEnabledDecoded = try containerValues.decodeIfPresent(S3ClientTypes.LoggingEnabled.self, forKey: .loggingEnabled) - loggingEnabled = loggingEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.BucketLoggingStatus() + value.loggingEnabled = try reader["LoggingEnabled"].readIfPresent(readingClosure: S3ClientTypes.LoggingEnabled.readingClosure) + return value + } } } @@ -1068,35 +1009,19 @@ extension S3ClientTypes { } } -extension S3ClientTypes.CORSConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case corsRules = "CORSRule" - } +extension S3ClientTypes.CORSConfiguration { static func writingClosure(_ value: S3ClientTypes.CORSConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CORSRule")].writeList(value.corsRules, memberWritingClosure: S3ClientTypes.CORSRule.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.corsRules) { - let corsRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .corsRules) - if corsRulesWrappedContainer != nil { - let corsRulesContainer = try containerValues.decodeIfPresent([S3ClientTypes.CORSRule].self, forKey: .corsRules) - var corsRulesBuffer:[S3ClientTypes.CORSRule]? = nil - if let corsRulesContainer = corsRulesContainer { - corsRulesBuffer = [S3ClientTypes.CORSRule]() - for structureContainer0 in corsRulesContainer { - corsRulesBuffer?.append(structureContainer0) - } - } - corsRules = corsRulesBuffer - } else { - corsRules = [] - } - } else { - corsRules = nil + try writer["CORSRule"].writeList(value.corsRules, memberWritingClosure: S3ClientTypes.CORSRule.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CORSConfiguration() + value.corsRules = try reader["CORSRule"].readListIfPresent(memberReadingClosure: S3ClientTypes.CORSRule.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -1118,104 +1043,30 @@ extension S3ClientTypes { } -extension S3ClientTypes.CORSRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowedHeaders = "AllowedHeader" - case allowedMethods = "AllowedMethod" - case allowedOrigins = "AllowedOrigin" - case exposeHeaders = "ExposeHeader" - case id = "ID" - case maxAgeSeconds = "MaxAgeSeconds" - } +extension S3ClientTypes.CORSRule { static func writingClosure(_ value: S3ClientTypes.CORSRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AllowedHeader")].writeList(value.allowedHeaders, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("AllowedMethod")].writeList(value.allowedMethods, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("AllowedOrigin")].writeList(value.allowedOrigins, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("ExposeHeader")].writeList(value.exposeHeaders, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("ID")].write(value.id) - try writer[.init("MaxAgeSeconds")].write(value.maxAgeSeconds) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - if containerValues.contains(.allowedHeaders) { - let allowedHeadersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .allowedHeaders) - if allowedHeadersWrappedContainer != nil { - let allowedHeadersContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .allowedHeaders) - var allowedHeadersBuffer:[Swift.String]? = nil - if let allowedHeadersContainer = allowedHeadersContainer { - allowedHeadersBuffer = [Swift.String]() - for stringContainer0 in allowedHeadersContainer { - allowedHeadersBuffer?.append(stringContainer0) - } - } - allowedHeaders = allowedHeadersBuffer - } else { - allowedHeaders = [] - } - } else { - allowedHeaders = nil - } - if containerValues.contains(.allowedMethods) { - let allowedMethodsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .allowedMethods) - if allowedMethodsWrappedContainer != nil { - let allowedMethodsContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .allowedMethods) - var allowedMethodsBuffer:[Swift.String]? = nil - if let allowedMethodsContainer = allowedMethodsContainer { - allowedMethodsBuffer = [Swift.String]() - for stringContainer0 in allowedMethodsContainer { - allowedMethodsBuffer?.append(stringContainer0) - } - } - allowedMethods = allowedMethodsBuffer - } else { - allowedMethods = [] - } - } else { - allowedMethods = nil - } - if containerValues.contains(.allowedOrigins) { - let allowedOriginsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .allowedOrigins) - if allowedOriginsWrappedContainer != nil { - let allowedOriginsContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .allowedOrigins) - var allowedOriginsBuffer:[Swift.String]? = nil - if let allowedOriginsContainer = allowedOriginsContainer { - allowedOriginsBuffer = [Swift.String]() - for stringContainer0 in allowedOriginsContainer { - allowedOriginsBuffer?.append(stringContainer0) - } - } - allowedOrigins = allowedOriginsBuffer - } else { - allowedOrigins = [] - } - } else { - allowedOrigins = nil - } - if containerValues.contains(.exposeHeaders) { - let exposeHeadersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .exposeHeaders) - if exposeHeadersWrappedContainer != nil { - let exposeHeadersContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .exposeHeaders) - var exposeHeadersBuffer:[Swift.String]? = nil - if let exposeHeadersContainer = exposeHeadersContainer { - exposeHeadersBuffer = [Swift.String]() - for stringContainer0 in exposeHeadersContainer { - exposeHeadersBuffer?.append(stringContainer0) - } - } - exposeHeaders = exposeHeadersBuffer - } else { - exposeHeaders = [] - } - } else { - exposeHeaders = nil + try writer["AllowedHeader"].writeList(value.allowedHeaders, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["AllowedMethod"].writeList(value.allowedMethods, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["AllowedOrigin"].writeList(value.allowedOrigins, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["ExposeHeader"].writeList(value.exposeHeaders, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["ID"].write(value.id) + try writer["MaxAgeSeconds"].write(value.maxAgeSeconds) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CORSRule() + value.id = try reader["ID"].readIfPresent() + value.allowedHeaders = try reader["AllowedHeader"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.allowedMethods = try reader["AllowedMethod"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.allowedOrigins = try reader["AllowedOrigin"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.exposeHeaders = try reader["ExposeHeader"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.maxAgeSeconds = try reader["MaxAgeSeconds"].readIfPresent() + return value } - let maxAgeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxAgeSeconds) - maxAgeSeconds = maxAgeSecondsDecoded } } @@ -1257,44 +1108,32 @@ extension S3ClientTypes { } -extension S3ClientTypes.CSVInput: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowQuotedRecordDelimiter = "AllowQuotedRecordDelimiter" - case comments = "Comments" - case fieldDelimiter = "FieldDelimiter" - case fileHeaderInfo = "FileHeaderInfo" - case quoteCharacter = "QuoteCharacter" - case quoteEscapeCharacter = "QuoteEscapeCharacter" - case recordDelimiter = "RecordDelimiter" - } +extension S3ClientTypes.CSVInput { static func writingClosure(_ value: S3ClientTypes.CSVInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AllowQuotedRecordDelimiter")].write(value.allowQuotedRecordDelimiter) - try writer[.init("Comments")].write(value.comments) - try writer[.init("FieldDelimiter")].write(value.fieldDelimiter) - try writer[.init("FileHeaderInfo")].write(value.fileHeaderInfo) - try writer[.init("QuoteCharacter")].write(value.quoteCharacter) - try writer[.init("QuoteEscapeCharacter")].write(value.quoteEscapeCharacter) - try writer[.init("RecordDelimiter")].write(value.recordDelimiter) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fileHeaderInfoDecoded = try containerValues.decodeIfPresent(S3ClientTypes.FileHeaderInfo.self, forKey: .fileHeaderInfo) - fileHeaderInfo = fileHeaderInfoDecoded - let commentsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .comments) - comments = commentsDecoded - let quoteEscapeCharacterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .quoteEscapeCharacter) - quoteEscapeCharacter = quoteEscapeCharacterDecoded - let recordDelimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recordDelimiter) - recordDelimiter = recordDelimiterDecoded - let fieldDelimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fieldDelimiter) - fieldDelimiter = fieldDelimiterDecoded - let quoteCharacterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .quoteCharacter) - quoteCharacter = quoteCharacterDecoded - let allowQuotedRecordDelimiterDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .allowQuotedRecordDelimiter) - allowQuotedRecordDelimiter = allowQuotedRecordDelimiterDecoded + try writer["AllowQuotedRecordDelimiter"].write(value.allowQuotedRecordDelimiter) + try writer["Comments"].write(value.comments) + try writer["FieldDelimiter"].write(value.fieldDelimiter) + try writer["FileHeaderInfo"].write(value.fileHeaderInfo) + try writer["QuoteCharacter"].write(value.quoteCharacter) + try writer["QuoteEscapeCharacter"].write(value.quoteEscapeCharacter) + try writer["RecordDelimiter"].write(value.recordDelimiter) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CSVInput() + value.fileHeaderInfo = try reader["FileHeaderInfo"].readIfPresent() + value.comments = try reader["Comments"].readIfPresent() + value.quoteEscapeCharacter = try reader["QuoteEscapeCharacter"].readIfPresent() + value.recordDelimiter = try reader["RecordDelimiter"].readIfPresent() + value.fieldDelimiter = try reader["FieldDelimiter"].readIfPresent() + value.quoteCharacter = try reader["QuoteCharacter"].readIfPresent() + value.allowQuotedRecordDelimiter = try reader["AllowQuotedRecordDelimiter"].readIfPresent() + return value + } } } @@ -1344,36 +1183,28 @@ extension S3ClientTypes { } -extension S3ClientTypes.CSVOutput: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fieldDelimiter = "FieldDelimiter" - case quoteCharacter = "QuoteCharacter" - case quoteEscapeCharacter = "QuoteEscapeCharacter" - case quoteFields = "QuoteFields" - case recordDelimiter = "RecordDelimiter" - } +extension S3ClientTypes.CSVOutput { static func writingClosure(_ value: S3ClientTypes.CSVOutput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FieldDelimiter")].write(value.fieldDelimiter) - try writer[.init("QuoteCharacter")].write(value.quoteCharacter) - try writer[.init("QuoteEscapeCharacter")].write(value.quoteEscapeCharacter) - try writer[.init("QuoteFields")].write(value.quoteFields) - try writer[.init("RecordDelimiter")].write(value.recordDelimiter) + try writer["FieldDelimiter"].write(value.fieldDelimiter) + try writer["QuoteCharacter"].write(value.quoteCharacter) + try writer["QuoteEscapeCharacter"].write(value.quoteEscapeCharacter) + try writer["QuoteFields"].write(value.quoteFields) + try writer["RecordDelimiter"].write(value.recordDelimiter) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let quoteFieldsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.QuoteFields.self, forKey: .quoteFields) - quoteFields = quoteFieldsDecoded - let quoteEscapeCharacterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .quoteEscapeCharacter) - quoteEscapeCharacter = quoteEscapeCharacterDecoded - let recordDelimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recordDelimiter) - recordDelimiter = recordDelimiterDecoded - let fieldDelimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fieldDelimiter) - fieldDelimiter = fieldDelimiterDecoded - let quoteCharacterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .quoteCharacter) - quoteCharacter = quoteCharacterDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CSVOutput() + value.quoteFields = try reader["QuoteFields"].readIfPresent() + value.quoteEscapeCharacter = try reader["QuoteEscapeCharacter"].readIfPresent() + value.recordDelimiter = try reader["RecordDelimiter"].readIfPresent() + value.fieldDelimiter = try reader["FieldDelimiter"].readIfPresent() + value.quoteCharacter = try reader["QuoteCharacter"].readIfPresent() + return value + } } } @@ -1413,32 +1244,26 @@ extension S3ClientTypes { } -extension S3ClientTypes.Checksum: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumCRC32 = "ChecksumCRC32" - case checksumCRC32C = "ChecksumCRC32C" - case checksumSHA1 = "ChecksumSHA1" - case checksumSHA256 = "ChecksumSHA256" - } +extension S3ClientTypes.Checksum { static func writingClosure(_ value: S3ClientTypes.Checksum?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumCRC32")].write(value.checksumCRC32) - try writer[.init("ChecksumCRC32C")].write(value.checksumCRC32C) - try writer[.init("ChecksumSHA1")].write(value.checksumSHA1) - try writer[.init("ChecksumSHA256")].write(value.checksumSHA256) + try writer["ChecksumCRC32"].write(value.checksumCRC32) + try writer["ChecksumCRC32C"].write(value.checksumCRC32C) + try writer["ChecksumSHA1"].write(value.checksumSHA1) + try writer["ChecksumSHA256"].write(value.checksumSHA256) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let checksumCRC32Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32) - checksumCRC32 = checksumCRC32Decoded - let checksumCRC32CDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32C) - checksumCRC32C = checksumCRC32CDecoded - let checksumSHA1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA1) - checksumSHA1 = checksumSHA1Decoded - let checksumSHA256Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA256) - checksumSHA256 = checksumSHA256Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Checksum() + value.checksumCRC32 = try reader["ChecksumCRC32"].readIfPresent() + value.checksumCRC32C = try reader["ChecksumCRC32C"].readIfPresent() + value.checksumSHA1 = try reader["ChecksumSHA1"].readIfPresent() + value.checksumSHA256 = try reader["ChecksumSHA256"].readIfPresent() + return value + } } } @@ -1537,20 +1362,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.CommonPrefix: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `prefix` = "Prefix" - } +extension S3ClientTypes.CommonPrefix { static func writingClosure(_ value: S3ClientTypes.CommonPrefix?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Prefix")].write(value.`prefix`) + try writer["Prefix"].write(value.`prefix`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CommonPrefix() + value.`prefix` = try reader["Prefix"].readIfPresent() + return value + } } } @@ -1576,13 +1401,9 @@ extension CompleteMultipartUploadInput: Swift.CustomDebugStringConvertible { } extension CompleteMultipartUploadInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case multipartUpload = "CompleteMultipartUpload" - } - static func writingClosure(_ value: CompleteMultipartUploadInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CompleteMultipartUpload")].write(value.multipartUpload, writingClosure: S3ClientTypes.CompletedMultipartUpload.writingClosure(_:to:)) + try writer["CompleteMultipartUpload"].write(value.multipartUpload, writingClosure: S3ClientTypes.CompletedMultipartUpload.writingClosure(_:to:)) } } @@ -1709,79 +1530,45 @@ public struct CompleteMultipartUploadInput: Swift.Equatable { } } -struct CompleteMultipartUploadInputBody: Swift.Equatable { - let multipartUpload: S3ClientTypes.CompletedMultipartUpload? -} - -extension CompleteMultipartUploadInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case multipartUpload = "CompleteMultipartUpload" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let multipartUploadDecoded = try containerValues.decodeIfPresent(S3ClientTypes.CompletedMultipartUpload.self, forKey: .multipartUpload) - multipartUpload = multipartUploadDecoded - } -} - extension CompleteMultipartUploadOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { "CompleteMultipartUploadOutput(bucket: \(Swift.String(describing: bucket)), bucketKeyEnabled: \(Swift.String(describing: bucketKeyEnabled)), checksumCRC32: \(Swift.String(describing: checksumCRC32)), checksumCRC32C: \(Swift.String(describing: checksumCRC32C)), checksumSHA1: \(Swift.String(describing: checksumSHA1)), checksumSHA256: \(Swift.String(describing: checksumSHA256)), eTag: \(Swift.String(describing: eTag)), expiration: \(Swift.String(describing: expiration)), key: \(Swift.String(describing: key)), location: \(Swift.String(describing: location)), requestCharged: \(Swift.String(describing: requestCharged)), serverSideEncryption: \(Swift.String(describing: serverSideEncryption)), versionId: \(Swift.String(describing: versionId)), ssekmsKeyId: \"CONTENT_REDACTED\")"} } -extension CompleteMultipartUploadOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { - self.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false - } else { - self.bucketKeyEnabled = nil - } - if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { - self.expiration = expirationHeaderValue - } else { - self.expiration = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { - self.ssekmsKeyId = ssekmsKeyIdHeaderValue - } else { - self.ssekmsKeyId = nil - } - if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { - self.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) - } else { - self.serverSideEncryption = nil - } - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CompleteMultipartUploadOutputBody = try responseDecoder.decode(responseBody: data) - self.bucket = output.bucket - self.checksumCRC32 = output.checksumCRC32 - self.checksumCRC32C = output.checksumCRC32C - self.checksumSHA1 = output.checksumSHA1 - self.checksumSHA256 = output.checksumSHA256 - self.eTag = output.eTag - self.key = output.key - self.location = output.location - } else { - self.bucket = nil - self.checksumCRC32 = nil - self.checksumCRC32C = nil - self.checksumSHA1 = nil - self.checksumSHA256 = nil - self.eTag = nil - self.key = nil - self.location = nil +extension CompleteMultipartUploadOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CompleteMultipartUploadOutput() + if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { + value.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false + } + if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { + value.expiration = expirationHeaderValue + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { + value.ssekmsKeyId = ssekmsKeyIdHeaderValue + } + if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { + value.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) + } + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + value.bucket = try reader["Bucket"].readIfPresent() + value.checksumCRC32 = try reader["ChecksumCRC32"].readIfPresent() + value.checksumCRC32C = try reader["ChecksumCRC32C"].readIfPresent() + value.checksumSHA1 = try reader["ChecksumSHA1"].readIfPresent() + value.checksumSHA256 = try reader["ChecksumSHA256"].readIfPresent() + value.eTag = try reader["ETag"].readIfPresent() + value.key = try reader["Key"].readIfPresent() + value.location = try reader["Location"].readIfPresent() + return value } } } @@ -1850,88 +1637,32 @@ public struct CompleteMultipartUploadOutput: Swift.Equatable { } } -struct CompleteMultipartUploadOutputBody: Swift.Equatable { - let location: Swift.String? - let bucket: Swift.String? - let key: Swift.String? - let eTag: Swift.String? - let checksumCRC32: Swift.String? - let checksumCRC32C: Swift.String? - let checksumSHA1: Swift.String? - let checksumSHA256: Swift.String? -} - -extension CompleteMultipartUploadOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case checksumCRC32 = "ChecksumCRC32" - case checksumCRC32C = "ChecksumCRC32C" - case checksumSHA1 = "ChecksumSHA1" - case checksumSHA256 = "ChecksumSHA256" - case eTag = "ETag" - case key = "Key" - case location = "Location" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let locationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .location) - location = locationDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded - let checksumCRC32Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32) - checksumCRC32 = checksumCRC32Decoded - let checksumCRC32CDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32C) - checksumCRC32C = checksumCRC32CDecoded - let checksumSHA1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA1) - checksumSHA1 = checksumSHA1Decoded - let checksumSHA256Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA256) - checksumSHA256 = checksumSHA256Decoded - } -} +enum CompleteMultipartUploadOutputError { -enum CompleteMultipartUploadOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.CompletedMultipartUpload: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case parts = "Part" - } +extension S3ClientTypes.CompletedMultipartUpload { static func writingClosure(_ value: S3ClientTypes.CompletedMultipartUpload?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Part")].writeList(value.parts, memberWritingClosure: S3ClientTypes.CompletedPart.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.parts) { - let partsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .parts) - if partsWrappedContainer != nil { - let partsContainer = try containerValues.decodeIfPresent([S3ClientTypes.CompletedPart].self, forKey: .parts) - var partsBuffer:[S3ClientTypes.CompletedPart]? = nil - if let partsContainer = partsContainer { - partsBuffer = [S3ClientTypes.CompletedPart]() - for structureContainer0 in partsContainer { - partsBuffer?.append(structureContainer0) - } - } - parts = partsBuffer - } else { - parts = [] - } - } else { - parts = nil + try writer["Part"].writeList(value.parts, memberWritingClosure: S3ClientTypes.CompletedPart.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CompletedMultipartUpload() + value.parts = try reader["Part"].readListIfPresent(memberReadingClosure: S3ClientTypes.CompletedPart.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -1952,40 +1683,30 @@ extension S3ClientTypes { } -extension S3ClientTypes.CompletedPart: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumCRC32 = "ChecksumCRC32" - case checksumCRC32C = "ChecksumCRC32C" - case checksumSHA1 = "ChecksumSHA1" - case checksumSHA256 = "ChecksumSHA256" - case eTag = "ETag" - case partNumber = "PartNumber" - } +extension S3ClientTypes.CompletedPart { static func writingClosure(_ value: S3ClientTypes.CompletedPart?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumCRC32")].write(value.checksumCRC32) - try writer[.init("ChecksumCRC32C")].write(value.checksumCRC32C) - try writer[.init("ChecksumSHA1")].write(value.checksumSHA1) - try writer[.init("ChecksumSHA256")].write(value.checksumSHA256) - try writer[.init("ETag")].write(value.eTag) - try writer[.init("PartNumber")].write(value.partNumber) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded - let checksumCRC32Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32) - checksumCRC32 = checksumCRC32Decoded - let checksumCRC32CDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32C) - checksumCRC32C = checksumCRC32CDecoded - let checksumSHA1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA1) - checksumSHA1 = checksumSHA1Decoded - let checksumSHA256Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA256) - checksumSHA256 = checksumSHA256Decoded - let partNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partNumber) - partNumber = partNumberDecoded + try writer["ChecksumCRC32"].write(value.checksumCRC32) + try writer["ChecksumCRC32C"].write(value.checksumCRC32C) + try writer["ChecksumSHA1"].write(value.checksumSHA1) + try writer["ChecksumSHA256"].write(value.checksumSHA256) + try writer["ETag"].write(value.eTag) + try writer["PartNumber"].write(value.partNumber) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CompletedPart() + value.eTag = try reader["ETag"].readIfPresent() + value.checksumCRC32 = try reader["ChecksumCRC32"].readIfPresent() + value.checksumCRC32C = try reader["ChecksumCRC32C"].readIfPresent() + value.checksumSHA1 = try reader["ChecksumSHA1"].readIfPresent() + value.checksumSHA256 = try reader["ChecksumSHA256"].readIfPresent() + value.partNumber = try reader["PartNumber"].readIfPresent() + return value + } } } @@ -2064,24 +1785,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.Condition: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case httpErrorCodeReturnedEquals = "HttpErrorCodeReturnedEquals" - case keyPrefixEquals = "KeyPrefixEquals" - } +extension S3ClientTypes.Condition { static func writingClosure(_ value: S3ClientTypes.Condition?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HttpErrorCodeReturnedEquals")].write(value.httpErrorCodeReturnedEquals) - try writer[.init("KeyPrefixEquals")].write(value.keyPrefixEquals) + try writer["HttpErrorCodeReturnedEquals"].write(value.httpErrorCodeReturnedEquals) + try writer["KeyPrefixEquals"].write(value.keyPrefixEquals) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let httpErrorCodeReturnedEqualsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .httpErrorCodeReturnedEquals) - httpErrorCodeReturnedEquals = httpErrorCodeReturnedEqualsDecoded - let keyPrefixEqualsDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyPrefixEquals) - keyPrefixEquals = keyPrefixEqualsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Condition() + value.httpErrorCodeReturnedEquals = try reader["HttpErrorCodeReturnedEquals"].readIfPresent() + value.keyPrefixEquals = try reader["KeyPrefixEquals"].readIfPresent() + return value + } } } @@ -2105,13 +1824,17 @@ extension S3ClientTypes { } -extension S3ClientTypes.ContinuationEvent: Swift.Decodable { +extension S3ClientTypes.ContinuationEvent { static func writingClosure(_ value: S3ClientTypes.ContinuationEvent?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ClientTypes.ContinuationEvent() + } } } @@ -2555,63 +2278,45 @@ extension CopyObjectOutput: Swift.CustomDebugStringConvertible { "CopyObjectOutput(bucketKeyEnabled: \(Swift.String(describing: bucketKeyEnabled)), copyObjectResult: \(Swift.String(describing: copyObjectResult)), copySourceVersionId: \(Swift.String(describing: copySourceVersionId)), expiration: \(Swift.String(describing: expiration)), requestCharged: \(Swift.String(describing: requestCharged)), sseCustomerAlgorithm: \(Swift.String(describing: sseCustomerAlgorithm)), sseCustomerKeyMD5: \(Swift.String(describing: sseCustomerKeyMD5)), serverSideEncryption: \(Swift.String(describing: serverSideEncryption)), versionId: \(Swift.String(describing: versionId)), ssekmsEncryptionContext: \"CONTENT_REDACTED\", ssekmsKeyId: \"CONTENT_REDACTED\")"} } -extension CopyObjectOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { - self.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false - } else { - self.bucketKeyEnabled = nil - } - if let copySourceVersionIdHeaderValue = httpResponse.headers.value(for: "x-amz-copy-source-version-id") { - self.copySourceVersionId = copySourceVersionIdHeaderValue - } else { - self.copySourceVersionId = nil - } - if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { - self.expiration = expirationHeaderValue - } else { - self.expiration = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { - self.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue - } else { - self.sseCustomerAlgorithm = nil - } - if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { - self.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue - } else { - self.sseCustomerKeyMD5 = nil - } - if let ssekmsEncryptionContextHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-context") { - self.ssekmsEncryptionContext = ssekmsEncryptionContextHeaderValue - } else { - self.ssekmsEncryptionContext = nil - } - if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { - self.ssekmsKeyId = ssekmsKeyIdHeaderValue - } else { - self.ssekmsKeyId = nil - } - if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { - self.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) - } else { - self.serverSideEncryption = nil - } - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.CopyObjectResult = try responseDecoder.decode(responseBody: data) - self.copyObjectResult = output - } else { - self.copyObjectResult = nil +extension CopyObjectOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CopyObjectOutput() + if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { + value.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false + } + if let copySourceVersionIdHeaderValue = httpResponse.headers.value(for: "x-amz-copy-source-version-id") { + value.copySourceVersionId = copySourceVersionIdHeaderValue + } + if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { + value.expiration = expirationHeaderValue + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { + value.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue + } + if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { + value.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue + } + if let ssekmsEncryptionContextHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-context") { + value.ssekmsEncryptionContext = ssekmsEncryptionContextHeaderValue + } + if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { + value.ssekmsKeyId = ssekmsKeyIdHeaderValue + } + if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { + value.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) + } + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + value.copyObjectResult = try reader.readIfPresent(readingClosure: S3ClientTypes.CopyObjectResult.readingClosure) + return value } } } @@ -2668,66 +2373,45 @@ public struct CopyObjectOutput: Swift.Equatable { } } -struct CopyObjectOutputBody: Swift.Equatable { - let copyObjectResult: S3ClientTypes.CopyObjectResult? -} - -extension CopyObjectOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case copyObjectResult = "CopyObjectResult" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let copyObjectResultDecoded = try containerValues.decodeIfPresent(S3ClientTypes.CopyObjectResult.self, forKey: .copyObjectResult) - copyObjectResult = copyObjectResultDecoded - } -} +enum CopyObjectOutputError { -enum CopyObjectOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "ObjectNotInActiveTierError": return try await ObjectNotInActiveTierError(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "ObjectNotInActiveTierError": return try await ObjectNotInActiveTierError.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.CopyObjectResult: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumCRC32 = "ChecksumCRC32" - case checksumCRC32C = "ChecksumCRC32C" - case checksumSHA1 = "ChecksumSHA1" - case checksumSHA256 = "ChecksumSHA256" - case eTag = "ETag" - case lastModified = "LastModified" - } +extension S3ClientTypes.CopyObjectResult { static func writingClosure(_ value: S3ClientTypes.CopyObjectResult?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumCRC32")].write(value.checksumCRC32) - try writer[.init("ChecksumCRC32C")].write(value.checksumCRC32C) - try writer[.init("ChecksumSHA1")].write(value.checksumSHA1) - try writer[.init("ChecksumSHA256")].write(value.checksumSHA256) - try writer[.init("ETag")].write(value.eTag) - try writer[.init("LastModified")].writeTimestamp(value.lastModified, format: .dateTime) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded - let lastModifiedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModified) - lastModified = lastModifiedDecoded - let checksumCRC32Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32) - checksumCRC32 = checksumCRC32Decoded - let checksumCRC32CDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32C) - checksumCRC32C = checksumCRC32CDecoded - let checksumSHA1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA1) - checksumSHA1 = checksumSHA1Decoded - let checksumSHA256Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA256) - checksumSHA256 = checksumSHA256Decoded + try writer["ChecksumCRC32"].write(value.checksumCRC32) + try writer["ChecksumCRC32C"].write(value.checksumCRC32C) + try writer["ChecksumSHA1"].write(value.checksumSHA1) + try writer["ChecksumSHA256"].write(value.checksumSHA256) + try writer["ETag"].write(value.eTag) + try writer["LastModified"].writeTimestamp(value.lastModified, format: .dateTime) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CopyObjectResult() + value.eTag = try reader["ETag"].readIfPresent() + value.lastModified = try reader["LastModified"].readTimestampIfPresent(format: .dateTime) + value.checksumCRC32 = try reader["ChecksumCRC32"].readIfPresent() + value.checksumCRC32C = try reader["ChecksumCRC32C"].readIfPresent() + value.checksumSHA1 = try reader["ChecksumSHA1"].readIfPresent() + value.checksumSHA256 = try reader["ChecksumSHA256"].readIfPresent() + return value + } } } @@ -2767,40 +2451,30 @@ extension S3ClientTypes { } -extension S3ClientTypes.CopyPartResult: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumCRC32 = "ChecksumCRC32" - case checksumCRC32C = "ChecksumCRC32C" - case checksumSHA1 = "ChecksumSHA1" - case checksumSHA256 = "ChecksumSHA256" - case eTag = "ETag" - case lastModified = "LastModified" - } +extension S3ClientTypes.CopyPartResult { static func writingClosure(_ value: S3ClientTypes.CopyPartResult?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumCRC32")].write(value.checksumCRC32) - try writer[.init("ChecksumCRC32C")].write(value.checksumCRC32C) - try writer[.init("ChecksumSHA1")].write(value.checksumSHA1) - try writer[.init("ChecksumSHA256")].write(value.checksumSHA256) - try writer[.init("ETag")].write(value.eTag) - try writer[.init("LastModified")].writeTimestamp(value.lastModified, format: .dateTime) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded - let lastModifiedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModified) - lastModified = lastModifiedDecoded - let checksumCRC32Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32) - checksumCRC32 = checksumCRC32Decoded - let checksumCRC32CDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32C) - checksumCRC32C = checksumCRC32CDecoded - let checksumSHA1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA1) - checksumSHA1 = checksumSHA1Decoded - let checksumSHA256Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA256) - checksumSHA256 = checksumSHA256Decoded + try writer["ChecksumCRC32"].write(value.checksumCRC32) + try writer["ChecksumCRC32C"].write(value.checksumCRC32C) + try writer["ChecksumSHA1"].write(value.checksumSHA1) + try writer["ChecksumSHA256"].write(value.checksumSHA256) + try writer["ETag"].write(value.eTag) + try writer["LastModified"].writeTimestamp(value.lastModified, format: .dateTime) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CopyPartResult() + value.eTag = try reader["ETag"].readIfPresent() + value.lastModified = try reader["LastModified"].readTimestampIfPresent(format: .dateTime) + value.checksumCRC32 = try reader["ChecksumCRC32"].readIfPresent() + value.checksumCRC32C = try reader["ChecksumCRC32C"].readIfPresent() + value.checksumSHA1 = try reader["ChecksumSHA1"].readIfPresent() + value.checksumSHA256 = try reader["ChecksumSHA256"].readIfPresent() + return value + } } } @@ -2840,28 +2514,24 @@ extension S3ClientTypes { } -extension S3ClientTypes.CreateBucketConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case location = "Location" - case locationConstraint = "LocationConstraint" - } +extension S3ClientTypes.CreateBucketConfiguration { static func writingClosure(_ value: S3ClientTypes.CreateBucketConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket, writingClosure: S3ClientTypes.BucketInfo.writingClosure(_:to:)) - try writer[.init("Location")].write(value.location, writingClosure: S3ClientTypes.LocationInfo.writingClosure(_:to:)) - try writer[.init("LocationConstraint")].write(value.locationConstraint) + try writer["Bucket"].write(value.bucket, writingClosure: S3ClientTypes.BucketInfo.writingClosure(_:to:)) + try writer["Location"].write(value.location, writingClosure: S3ClientTypes.LocationInfo.writingClosure(_:to:)) + try writer["LocationConstraint"].write(value.locationConstraint) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let locationConstraintDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketLocationConstraint.self, forKey: .locationConstraint) - locationConstraint = locationConstraintDecoded - let locationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.LocationInfo.self, forKey: .location) - location = locationDecoded - let bucketDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketInfo.self, forKey: .bucket) - bucket = bucketDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.CreateBucketConfiguration() + value.locationConstraint = try reader["LocationConstraint"].readIfPresent() + value.location = try reader["Location"].readIfPresent(readingClosure: S3ClientTypes.LocationInfo.readingClosure) + value.bucket = try reader["Bucket"].readIfPresent(readingClosure: S3ClientTypes.BucketInfo.readingClosure) + return value + } } } @@ -2890,13 +2560,9 @@ extension S3ClientTypes { } extension CreateBucketInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createBucketConfiguration = "CreateBucketConfiguration" - } - static func writingClosure(_ value: CreateBucketInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreateBucketConfiguration")].write(value.createBucketConfiguration, writingClosure: S3ClientTypes.CreateBucketConfiguration.writingClosure(_:to:)) + try writer["CreateBucketConfiguration"].write(value.createBucketConfiguration, writingClosure: S3ClientTypes.CreateBucketConfiguration.writingClosure(_:to:)) } } @@ -2988,28 +2654,15 @@ public struct CreateBucketInput: Swift.Equatable { } } -struct CreateBucketInputBody: Swift.Equatable { - let createBucketConfiguration: S3ClientTypes.CreateBucketConfiguration? -} - -extension CreateBucketInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createBucketConfiguration = "CreateBucketConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createBucketConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.CreateBucketConfiguration.self, forKey: .createBucketConfiguration) - createBucketConfiguration = createBucketConfigurationDecoded - } -} +extension CreateBucketOutput { -extension CreateBucketOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = CreateBucketOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + return value } } } @@ -3026,13 +2679,18 @@ public struct CreateBucketOutput: Swift.Equatable { } } -enum CreateBucketOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "BucketAlreadyExists": return try await BucketAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - case "BucketAlreadyOwnedByYou": return try await BucketAlreadyOwnedByYou(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum CreateBucketOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "BucketAlreadyExists": return try await BucketAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + case "BucketAlreadyOwnedByYou": return try await BucketAlreadyOwnedByYou.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -3427,68 +3085,47 @@ extension CreateMultipartUploadOutput: Swift.CustomDebugStringConvertible { "CreateMultipartUploadOutput(abortDate: \(Swift.String(describing: abortDate)), abortRuleId: \(Swift.String(describing: abortRuleId)), bucket: \(Swift.String(describing: bucket)), bucketKeyEnabled: \(Swift.String(describing: bucketKeyEnabled)), checksumAlgorithm: \(Swift.String(describing: checksumAlgorithm)), key: \(Swift.String(describing: key)), requestCharged: \(Swift.String(describing: requestCharged)), sseCustomerAlgorithm: \(Swift.String(describing: sseCustomerAlgorithm)), sseCustomerKeyMD5: \(Swift.String(describing: sseCustomerKeyMD5)), serverSideEncryption: \(Swift.String(describing: serverSideEncryption)), uploadId: \(Swift.String(describing: uploadId)), ssekmsEncryptionContext: \"CONTENT_REDACTED\", ssekmsKeyId: \"CONTENT_REDACTED\")"} } -extension CreateMultipartUploadOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let abortDateHeaderValue = httpResponse.headers.value(for: "x-amz-abort-date") { - self.abortDate = TimestampFormatter(format: .httpDate).date(from: abortDateHeaderValue) - } else { - self.abortDate = nil - } - if let abortRuleIdHeaderValue = httpResponse.headers.value(for: "x-amz-abort-rule-id") { - self.abortRuleId = abortRuleIdHeaderValue - } else { - self.abortRuleId = nil - } - if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { - self.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false - } else { - self.bucketKeyEnabled = nil - } - if let checksumAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-algorithm") { - self.checksumAlgorithm = S3ClientTypes.ChecksumAlgorithm(rawValue: checksumAlgorithmHeaderValue) - } else { - self.checksumAlgorithm = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { - self.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue - } else { - self.sseCustomerAlgorithm = nil - } - if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { - self.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue - } else { - self.sseCustomerKeyMD5 = nil - } - if let ssekmsEncryptionContextHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-context") { - self.ssekmsEncryptionContext = ssekmsEncryptionContextHeaderValue - } else { - self.ssekmsEncryptionContext = nil - } - if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { - self.ssekmsKeyId = ssekmsKeyIdHeaderValue - } else { - self.ssekmsKeyId = nil - } - if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { - self.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) - } else { - self.serverSideEncryption = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateMultipartUploadOutputBody = try responseDecoder.decode(responseBody: data) - self.bucket = output.bucket - self.key = output.key - self.uploadId = output.uploadId - } else { - self.bucket = nil - self.key = nil - self.uploadId = nil +extension CreateMultipartUploadOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateMultipartUploadOutput() + if let abortDateHeaderValue = httpResponse.headers.value(for: "x-amz-abort-date") { + value.abortDate = TimestampFormatter(format: .httpDate).date(from: abortDateHeaderValue) + } + if let abortRuleIdHeaderValue = httpResponse.headers.value(for: "x-amz-abort-rule-id") { + value.abortRuleId = abortRuleIdHeaderValue + } + if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { + value.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false + } + if let checksumAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-algorithm") { + value.checksumAlgorithm = S3ClientTypes.ChecksumAlgorithm(rawValue: checksumAlgorithmHeaderValue) + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { + value.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue + } + if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { + value.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue + } + if let ssekmsEncryptionContextHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-context") { + value.ssekmsEncryptionContext = ssekmsEncryptionContextHeaderValue + } + if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { + value.ssekmsKeyId = ssekmsKeyIdHeaderValue + } + if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { + value.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) + } + value.bucket = try reader["Bucket"].readIfPresent() + value.key = try reader["Key"].readIfPresent() + value.uploadId = try reader["UploadId"].readIfPresent() + return value } } } @@ -3553,35 +3190,15 @@ public struct CreateMultipartUploadOutput: Swift.Equatable { } } -struct CreateMultipartUploadOutputBody: Swift.Equatable { - let bucket: Swift.String? - let key: Swift.String? - let uploadId: Swift.String? -} - -extension CreateMultipartUploadOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case key = "Key" - case uploadId = "UploadId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let uploadIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uploadId) - uploadId = uploadIdDecoded - } -} +enum CreateMultipartUploadOutputError { -enum CreateMultipartUploadOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -3630,14 +3247,15 @@ public struct CreateSessionInput: Swift.Equatable { } } -extension CreateSessionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateSessionOutputBody = try responseDecoder.decode(responseBody: data) - self.credentials = output.credentials - } else { - self.credentials = nil +extension CreateSessionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateSessionOutput() + value.credentials = try reader["Credentials"].readIfPresent(readingClosure: S3ClientTypes.SessionCredentials.readingClosure) + return value } } } @@ -3655,28 +3273,17 @@ public struct CreateSessionOutput: Swift.Equatable { } } -struct CreateSessionOutputBody: Swift.Equatable { - let credentials: S3ClientTypes.SessionCredentials? -} - -extension CreateSessionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case credentials = "Credentials" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let credentialsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.SessionCredentials.self, forKey: .credentials) - credentials = credentialsDecoded - } -} +enum CreateSessionOutputError { -enum CreateSessionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NoSuchBucket": return try await NoSuchBucket(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NoSuchBucket": return try await NoSuchBucket.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -3710,28 +3317,24 @@ extension S3ClientTypes { } } -extension S3ClientTypes.DefaultRetention: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case days = "Days" - case mode = "Mode" - case years = "Years" - } +extension S3ClientTypes.DefaultRetention { static func writingClosure(_ value: S3ClientTypes.DefaultRetention?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Days")].write(value.days) - try writer[.init("Mode")].write(value.mode) - try writer[.init("Years")].write(value.years) + try writer["Days"].write(value.days) + try writer["Mode"].write(value.mode) + try writer["Years"].write(value.years) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let modeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockRetentionMode.self, forKey: .mode) - mode = modeDecoded - let daysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .days) - days = daysDecoded - let yearsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .years) - years = yearsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.DefaultRetention() + value.mode = try reader["Mode"].readIfPresent() + value.days = try reader["Days"].readIfPresent() + value.years = try reader["Years"].readIfPresent() + return value + } } } @@ -3763,40 +3366,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.Delete: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objects = "Object" - case quiet = "Quiet" - } +extension S3ClientTypes.Delete { static func writingClosure(_ value: S3ClientTypes.Delete?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Object")].writeList(value.objects, memberWritingClosure: S3ClientTypes.ObjectIdentifier.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("Quiet")].write(value.quiet) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.objects) { - let objectsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .objects) - if objectsWrappedContainer != nil { - let objectsContainer = try containerValues.decodeIfPresent([S3ClientTypes.ObjectIdentifier].self, forKey: .objects) - var objectsBuffer:[S3ClientTypes.ObjectIdentifier]? = nil - if let objectsContainer = objectsContainer { - objectsBuffer = [S3ClientTypes.ObjectIdentifier]() - for structureContainer0 in objectsContainer { - objectsBuffer?.append(structureContainer0) - } - } - objects = objectsBuffer - } else { - objects = [] - } - } else { - objects = nil + try writer["Object"].writeList(value.objects, memberWritingClosure: S3ClientTypes.ObjectIdentifier.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["Quiet"].write(value.quiet) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Delete() + value.objects = try reader["Object"].readListIfPresent(memberReadingClosure: S3ClientTypes.ObjectIdentifier.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.quiet = try reader["Quiet"].readIfPresent() + return value } - let quietDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .quiet) - quiet = quietDecoded } } @@ -3876,8 +3461,12 @@ public struct DeleteBucketAnalyticsConfigurationInput: Swift.Equatable { } } -extension DeleteBucketAnalyticsConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketAnalyticsConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketAnalyticsConfigurationOutput() + } } } @@ -3886,11 +3475,15 @@ public struct DeleteBucketAnalyticsConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteBucketAnalyticsConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketAnalyticsConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -3939,8 +3532,12 @@ public struct DeleteBucketCorsInput: Swift.Equatable { } } -extension DeleteBucketCorsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketCorsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketCorsOutput() + } } } @@ -3949,11 +3546,15 @@ public struct DeleteBucketCorsOutput: Swift.Equatable { public init() { } } -enum DeleteBucketCorsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketCorsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4002,8 +3603,12 @@ public struct DeleteBucketEncryptionInput: Swift.Equatable { } } -extension DeleteBucketEncryptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketEncryptionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketEncryptionOutput() + } } } @@ -4012,11 +3617,15 @@ public struct DeleteBucketEncryptionOutput: Swift.Equatable { public init() { } } -enum DeleteBucketEncryptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketEncryptionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4096,8 +3705,12 @@ public struct DeleteBucketIntelligentTieringConfigurationInput: Swift.Equatable } } -extension DeleteBucketIntelligentTieringConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketIntelligentTieringConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketIntelligentTieringConfigurationOutput() + } } } @@ -4106,11 +3719,15 @@ public struct DeleteBucketIntelligentTieringConfigurationOutput: Swift.Equatable public init() { } } -enum DeleteBucketIntelligentTieringConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketIntelligentTieringConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4170,8 +3787,12 @@ public struct DeleteBucketInventoryConfigurationInput: Swift.Equatable { } } -extension DeleteBucketInventoryConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketInventoryConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketInventoryConfigurationOutput() + } } } @@ -4180,11 +3801,15 @@ public struct DeleteBucketInventoryConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteBucketInventoryConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketInventoryConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4233,8 +3858,12 @@ public struct DeleteBucketLifecycleInput: Swift.Equatable { } } -extension DeleteBucketLifecycleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketLifecycleOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketLifecycleOutput() + } } } @@ -4243,11 +3872,15 @@ public struct DeleteBucketLifecycleOutput: Swift.Equatable { public init() { } } -enum DeleteBucketLifecycleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketLifecycleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4307,8 +3940,12 @@ public struct DeleteBucketMetricsConfigurationInput: Swift.Equatable { } } -extension DeleteBucketMetricsConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketMetricsConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketMetricsConfigurationOutput() + } } } @@ -4317,17 +3954,25 @@ public struct DeleteBucketMetricsConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteBucketMetricsConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketMetricsConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension DeleteBucketOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketOutput() + } } } @@ -4336,11 +3981,15 @@ public struct DeleteBucketOutput: Swift.Equatable { public init() { } } -enum DeleteBucketOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4389,8 +4038,12 @@ public struct DeleteBucketOwnershipControlsInput: Swift.Equatable { } } -extension DeleteBucketOwnershipControlsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketOwnershipControlsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketOwnershipControlsOutput() + } } } @@ -4399,11 +4052,15 @@ public struct DeleteBucketOwnershipControlsOutput: Swift.Equatable { public init() { } } -enum DeleteBucketOwnershipControlsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketOwnershipControlsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4452,8 +4109,12 @@ public struct DeleteBucketPolicyInput: Swift.Equatable { } } -extension DeleteBucketPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketPolicyOutput() + } } } @@ -4462,11 +4123,15 @@ public struct DeleteBucketPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteBucketPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4515,8 +4180,12 @@ public struct DeleteBucketReplicationInput: Swift.Equatable { } } -extension DeleteBucketReplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketReplicationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketReplicationOutput() + } } } @@ -4525,11 +4194,15 @@ public struct DeleteBucketReplicationOutput: Swift.Equatable { public init() { } } -enum DeleteBucketReplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketReplicationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4578,8 +4251,12 @@ public struct DeleteBucketTaggingInput: Swift.Equatable { } } -extension DeleteBucketTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketTaggingOutput() + } } } @@ -4588,11 +4265,15 @@ public struct DeleteBucketTaggingOutput: Swift.Equatable { public init() { } } -enum DeleteBucketTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4641,8 +4322,12 @@ public struct DeleteBucketWebsiteInput: Swift.Equatable { } } -extension DeleteBucketWebsiteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketWebsiteOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketWebsiteOutput() + } } } @@ -4651,45 +4336,41 @@ public struct DeleteBucketWebsiteOutput: Swift.Equatable { public init() { } } -enum DeleteBucketWebsiteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteBucketWebsiteOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.DeleteMarkerEntry: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isLatest = "IsLatest" - case key = "Key" - case lastModified = "LastModified" - case owner = "Owner" - case versionId = "VersionId" - } +extension S3ClientTypes.DeleteMarkerEntry { static func writingClosure(_ value: S3ClientTypes.DeleteMarkerEntry?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsLatest")].write(value.isLatest) - try writer[.init("Key")].write(value.key) - try writer[.init("LastModified")].writeTimestamp(value.lastModified, format: .dateTime) - try writer[.init("Owner")].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) - try writer[.init("VersionId")].write(value.versionId) + try writer["IsLatest"].write(value.isLatest) + try writer["Key"].write(value.key) + try writer["LastModified"].writeTimestamp(value.lastModified, format: .dateTime) + try writer["Owner"].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) + try writer["VersionId"].write(value.versionId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - let isLatestDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isLatest) - isLatest = isLatestDecoded - let lastModifiedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModified) - lastModified = lastModifiedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.DeleteMarkerEntry() + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + value.key = try reader["Key"].readIfPresent() + value.versionId = try reader["VersionId"].readIfPresent() + value.isLatest = try reader["IsLatest"].readIfPresent() + value.lastModified = try reader["LastModified"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -4725,20 +4406,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.DeleteMarkerReplication: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ClientTypes.DeleteMarkerReplication { static func writingClosure(_ value: S3ClientTypes.DeleteMarkerReplication?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.DeleteMarkerReplicationStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.DeleteMarkerReplication() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -4871,22 +4552,21 @@ public struct DeleteObjectInput: Swift.Equatable { } } -extension DeleteObjectOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let deleteMarkerHeaderValue = httpResponse.headers.value(for: "x-amz-delete-marker") { - self.deleteMarker = Swift.Bool(deleteMarkerHeaderValue) ?? false - } else { - self.deleteMarker = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil +extension DeleteObjectOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = DeleteObjectOutput() + if let deleteMarkerHeaderValue = httpResponse.headers.value(for: "x-amz-delete-marker") { + value.deleteMarker = Swift.Bool(deleteMarkerHeaderValue) ?? false + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + return value } } } @@ -4911,11 +4591,15 @@ public struct DeleteObjectOutput: Swift.Equatable { } } -enum DeleteObjectOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteObjectOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -4980,12 +4664,15 @@ public struct DeleteObjectTaggingInput: Swift.Equatable { } } -extension DeleteObjectTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil +extension DeleteObjectTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = DeleteObjectTaggingOutput() + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + return value } } } @@ -5002,23 +4689,23 @@ public struct DeleteObjectTaggingOutput: Swift.Equatable { } } -enum DeleteObjectTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeleteObjectTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension DeleteObjectsInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delete = "Delete" - } - static func writingClosure(_ value: DeleteObjectsInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Delete")].write(value.delete, writingClosure: S3ClientTypes.Delete.writingClosure(_:to:)) + try writer["Delete"].write(value.delete, writingClosure: S3ClientTypes.Delete.writingClosure(_:to:)) } } @@ -5111,37 +4798,19 @@ public struct DeleteObjectsInput: Swift.Equatable { } } -struct DeleteObjectsInputBody: Swift.Equatable { - let delete: S3ClientTypes.Delete? -} - -extension DeleteObjectsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delete = "Delete" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let deleteDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Delete.self, forKey: .delete) - delete = deleteDecoded - } -} +extension DeleteObjectsOutput { -extension DeleteObjectsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteObjectsOutputBody = try responseDecoder.decode(responseBody: data) - self.deleted = output.deleted - self.errors = output.errors - } else { - self.deleted = nil - self.errors = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteObjectsOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + value.deleted = try reader["Deleted"].readListIfPresent(memberReadingClosure: S3ClientTypes.DeletedObject.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.errors = try reader["Error"].readListIfPresent(memberReadingClosure: S3ClientTypes.Error.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -5166,63 +4835,15 @@ public struct DeleteObjectsOutput: Swift.Equatable { } } -struct DeleteObjectsOutputBody: Swift.Equatable { - let deleted: [S3ClientTypes.DeletedObject]? - let errors: [S3ClientTypes.Error]? -} - -extension DeleteObjectsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deleted = "Deleted" - case errors = "Error" - } +enum DeleteObjectsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.deleted) { - let deletedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .deleted) - if deletedWrappedContainer != nil { - let deletedContainer = try containerValues.decodeIfPresent([S3ClientTypes.DeletedObject].self, forKey: .deleted) - var deletedBuffer:[S3ClientTypes.DeletedObject]? = nil - if let deletedContainer = deletedContainer { - deletedBuffer = [S3ClientTypes.DeletedObject]() - for structureContainer0 in deletedContainer { - deletedBuffer?.append(structureContainer0) - } - } - deleted = deletedBuffer - } else { - deleted = [] - } - } else { - deleted = nil - } - if containerValues.contains(.errors) { - let errorsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .errors) - if errorsWrappedContainer != nil { - let errorsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Error].self, forKey: .errors) - var errorsBuffer:[S3ClientTypes.Error]? = nil - if let errorsContainer = errorsContainer { - errorsBuffer = [S3ClientTypes.Error]() - for structureContainer0 in errorsContainer { - errorsBuffer?.append(structureContainer0) - } - } - errors = errorsBuffer - } else { - errors = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - errors = nil - } - } -} - -enum DeleteObjectsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -5271,8 +4892,12 @@ public struct DeletePublicAccessBlockInput: Swift.Equatable { } } -extension DeletePublicAccessBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeletePublicAccessBlockOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeletePublicAccessBlockOutput() + } } } @@ -5281,41 +4906,39 @@ public struct DeletePublicAccessBlockOutput: Swift.Equatable { public init() { } } -enum DeletePublicAccessBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum DeletePublicAccessBlockOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.DeletedObject: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deleteMarker = "DeleteMarker" - case deleteMarkerVersionId = "DeleteMarkerVersionId" - case key = "Key" - case versionId = "VersionId" - } +extension S3ClientTypes.DeletedObject { static func writingClosure(_ value: S3ClientTypes.DeletedObject?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DeleteMarker")].write(value.deleteMarker) - try writer[.init("DeleteMarkerVersionId")].write(value.deleteMarkerVersionId) - try writer[.init("Key")].write(value.key) - try writer[.init("VersionId")].write(value.versionId) + try writer["DeleteMarker"].write(value.deleteMarker) + try writer["DeleteMarkerVersionId"].write(value.deleteMarkerVersionId) + try writer["Key"].write(value.key) + try writer["VersionId"].write(value.versionId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - let deleteMarkerDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .deleteMarker) - deleteMarker = deleteMarkerDecoded - let deleteMarkerVersionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deleteMarkerVersionId) - deleteMarkerVersionId = deleteMarkerVersionIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.DeletedObject() + value.key = try reader["Key"].readIfPresent() + value.versionId = try reader["VersionId"].readIfPresent() + value.deleteMarker = try reader["DeleteMarker"].readIfPresent() + value.deleteMarkerVersionId = try reader["DeleteMarkerVersionId"].readIfPresent() + return value + } } } @@ -5347,44 +4970,32 @@ extension S3ClientTypes { } -extension S3ClientTypes.Destination: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlTranslation = "AccessControlTranslation" - case account = "Account" - case bucket = "Bucket" - case encryptionConfiguration = "EncryptionConfiguration" - case metrics = "Metrics" - case replicationTime = "ReplicationTime" - case storageClass = "StorageClass" - } +extension S3ClientTypes.Destination { static func writingClosure(_ value: S3ClientTypes.Destination?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlTranslation")].write(value.accessControlTranslation, writingClosure: S3ClientTypes.AccessControlTranslation.writingClosure(_:to:)) - try writer[.init("Account")].write(value.account) - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("EncryptionConfiguration")].write(value.encryptionConfiguration, writingClosure: S3ClientTypes.EncryptionConfiguration.writingClosure(_:to:)) - try writer[.init("Metrics")].write(value.metrics, writingClosure: S3ClientTypes.Metrics.writingClosure(_:to:)) - try writer[.init("ReplicationTime")].write(value.replicationTime, writingClosure: S3ClientTypes.ReplicationTime.writingClosure(_:to:)) - try writer[.init("StorageClass")].write(value.storageClass) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let accessControlTranslationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AccessControlTranslation.self, forKey: .accessControlTranslation) - accessControlTranslation = accessControlTranslationDecoded - let encryptionConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.EncryptionConfiguration.self, forKey: .encryptionConfiguration) - encryptionConfiguration = encryptionConfigurationDecoded - let replicationTimeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicationTime.self, forKey: .replicationTime) - replicationTime = replicationTimeDecoded - let metricsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Metrics.self, forKey: .metrics) - metrics = metricsDecoded + try writer["AccessControlTranslation"].write(value.accessControlTranslation, writingClosure: S3ClientTypes.AccessControlTranslation.writingClosure(_:to:)) + try writer["Account"].write(value.account) + try writer["Bucket"].write(value.bucket) + try writer["EncryptionConfiguration"].write(value.encryptionConfiguration, writingClosure: S3ClientTypes.EncryptionConfiguration.writingClosure(_:to:)) + try writer["Metrics"].write(value.metrics, writingClosure: S3ClientTypes.Metrics.writingClosure(_:to:)) + try writer["ReplicationTime"].write(value.replicationTime, writingClosure: S3ClientTypes.ReplicationTime.writingClosure(_:to:)) + try writer["StorageClass"].write(value.storageClass) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Destination() + value.bucket = try reader["Bucket"].readIfPresent() + value.account = try reader["Account"].readIfPresent() + value.storageClass = try reader["StorageClass"].readIfPresent() + value.accessControlTranslation = try reader["AccessControlTranslation"].readIfPresent(readingClosure: S3ClientTypes.AccessControlTranslation.readingClosure) + value.encryptionConfiguration = try reader["EncryptionConfiguration"].readIfPresent(readingClosure: S3ClientTypes.EncryptionConfiguration.readingClosure) + value.replicationTime = try reader["ReplicationTime"].readIfPresent(readingClosure: S3ClientTypes.ReplicationTime.readingClosure) + value.metrics = try reader["Metrics"].readIfPresent(readingClosure: S3ClientTypes.Metrics.readingClosure) + return value + } } } @@ -5459,28 +5070,24 @@ extension S3ClientTypes { } } -extension S3ClientTypes.Encryption: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case encryptionType = "EncryptionType" - case kmsContext = "KMSContext" - case kmsKeyId = "KMSKeyId" - } +extension S3ClientTypes.Encryption { static func writingClosure(_ value: S3ClientTypes.Encryption?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EncryptionType")].write(value.encryptionType) - try writer[.init("KMSContext")].write(value.kmsContext) - try writer[.init("KMSKeyId")].write(value.kmsKeyId) + try writer["EncryptionType"].write(value.encryptionType) + try writer["KMSContext"].write(value.kmsContext) + try writer["KMSKeyId"].write(value.kmsKeyId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let encryptionTypeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ServerSideEncryption.self, forKey: .encryptionType) - encryptionType = encryptionTypeDecoded - let kmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyId) - kmsKeyId = kmsKeyIdDecoded - let kmsContextDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsContext) - kmsContext = kmsContextDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Encryption() + value.encryptionType = try reader["EncryptionType"].readIfPresent() + value.kmsKeyId = try reader["KMSKeyId"].readIfPresent() + value.kmsContext = try reader["KMSContext"].readIfPresent() + return value + } } } @@ -5514,20 +5121,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.EncryptionConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicaKmsKeyID = "ReplicaKmsKeyID" - } +extension S3ClientTypes.EncryptionConfiguration { static func writingClosure(_ value: S3ClientTypes.EncryptionConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ReplicaKmsKeyID")].write(value.replicaKmsKeyID) + try writer["ReplicaKmsKeyID"].write(value.replicaKmsKeyID) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicaKmsKeyIDDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicaKmsKeyID) - replicaKmsKeyID = replicaKmsKeyIDDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.EncryptionConfiguration() + value.replicaKmsKeyID = try reader["ReplicaKmsKeyID"].readIfPresent() + return value + } } } @@ -5547,13 +5154,17 @@ extension S3ClientTypes { } -extension S3ClientTypes.EndEvent: Swift.Decodable { +extension S3ClientTypes.EndEvent { static func writingClosure(_ value: S3ClientTypes.EndEvent?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ClientTypes.EndEvent() + } } } @@ -5566,32 +5177,26 @@ extension S3ClientTypes { } -extension S3ClientTypes.Error: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case key = "Key" - case message = "Message" - case versionId = "VersionId" - } +extension S3ClientTypes.Error { static func writingClosure(_ value: S3ClientTypes.Error?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Code")].write(value.code) - try writer[.init("Key")].write(value.key) - try writer[.init("Message")].write(value.message) - try writer[.init("VersionId")].write(value.versionId) + try writer["Code"].write(value.code) + try writer["Key"].write(value.key) + try writer["Message"].write(value.message) + try writer["VersionId"].write(value.versionId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Error() + value.key = try reader["Key"].readIfPresent() + value.versionId = try reader["VersionId"].readIfPresent() + value.code = try reader["Code"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + return value + } } } @@ -6676,20 +6281,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.ErrorDocument: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - } +extension S3ClientTypes.ErrorDocument { static func writingClosure(_ value: S3ClientTypes.ErrorDocument?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Key")].write(value.key) + try writer["Key"].write(value.key) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ErrorDocument() + value.key = try reader["Key"].readIfPresent() + return value + } } } @@ -6818,13 +6423,17 @@ extension S3ClientTypes { } } -extension S3ClientTypes.EventBridgeConfiguration: Swift.Decodable { +extension S3ClientTypes.EventBridgeConfiguration { static func writingClosure(_ value: S3ClientTypes.EventBridgeConfiguration?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ClientTypes.EventBridgeConfiguration() + } } } @@ -6837,20 +6446,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.ExistingObjectReplication: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ClientTypes.ExistingObjectReplication { static func writingClosure(_ value: S3ClientTypes.ExistingObjectReplication?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ExistingObjectReplicationStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ExistingObjectReplication() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -6999,24 +6608,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.FilterRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case value = "Value" - } +extension S3ClientTypes.FilterRule { static func writingClosure(_ value: S3ClientTypes.FilterRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) - try writer[.init("Value")].write(value.value) + try writer["Name"].write(value.name) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(S3ClientTypes.FilterRuleName.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.FilterRule() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -7123,19 +6730,18 @@ public struct GetBucketAccelerateConfigurationInput: Swift.Equatable { } } -extension GetBucketAccelerateConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketAccelerateConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.status = output.status - } else { - self.status = nil +extension GetBucketAccelerateConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketAccelerateConfigurationOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -7156,27 +6762,15 @@ public struct GetBucketAccelerateConfigurationOutput: Swift.Equatable { } } -struct GetBucketAccelerateConfigurationOutputBody: Swift.Equatable { - let status: S3ClientTypes.BucketAccelerateStatus? -} - -extension GetBucketAccelerateConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketAccelerateStatus.self, forKey: .status) - status = statusDecoded - } -} +enum GetBucketAccelerateConfigurationOutputError { -enum GetBucketAccelerateConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -7225,16 +6819,16 @@ public struct GetBucketAclInput: Swift.Equatable { } } -extension GetBucketAclOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketAclOutputBody = try responseDecoder.decode(responseBody: data) - self.grants = output.grants - self.owner = output.owner - } else { - self.grants = nil - self.owner = nil +extension GetBucketAclOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketAclOutput() + value.grants = try reader["AccessControlList"].readListIfPresent(memberReadingClosure: S3ClientTypes.Grant.readingClosure, memberNodeInfo: "Grant", isFlattened: false) + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + return value } } } @@ -7255,48 +6849,15 @@ public struct GetBucketAclOutput: Swift.Equatable { } } -struct GetBucketAclOutputBody: Swift.Equatable { - let owner: S3ClientTypes.Owner? - let grants: [S3ClientTypes.Grant]? -} - -extension GetBucketAclOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case grants = "AccessControlList" - case owner = "Owner" - } +enum GetBucketAclOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded - if containerValues.contains(.grants) { - struct KeyVal0{struct Grant{}} - let grantsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .grants) - if let grantsWrappedContainer = grantsWrappedContainer { - let grantsContainer = try grantsWrappedContainer.decodeIfPresent([S3ClientTypes.Grant].self, forKey: .member) - var grantsBuffer:[S3ClientTypes.Grant]? = nil - if let grantsContainer = grantsContainer { - grantsBuffer = [S3ClientTypes.Grant]() - for structureContainer0 in grantsContainer { - grantsBuffer?.append(structureContainer0) - } - } - grants = grantsBuffer - } else { - grants = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - grants = nil - } - } -} - -enum GetBucketAclOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -7357,13 +6918,15 @@ public struct GetBucketAnalyticsConfigurationInput: Swift.Equatable { } } -extension GetBucketAnalyticsConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.AnalyticsConfiguration = try responseDecoder.decode(responseBody: data) - self.analyticsConfiguration = output - } else { - self.analyticsConfiguration = nil +extension GetBucketAnalyticsConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketAnalyticsConfigurationOutput() + value.analyticsConfiguration = try reader.readIfPresent(readingClosure: S3ClientTypes.AnalyticsConfiguration.readingClosure) + return value } } } @@ -7380,27 +6943,15 @@ public struct GetBucketAnalyticsConfigurationOutput: Swift.Equatable { } } -struct GetBucketAnalyticsConfigurationOutputBody: Swift.Equatable { - let analyticsConfiguration: S3ClientTypes.AnalyticsConfiguration? -} - -extension GetBucketAnalyticsConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analyticsConfiguration = "AnalyticsConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let analyticsConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AnalyticsConfiguration.self, forKey: .analyticsConfiguration) - analyticsConfiguration = analyticsConfigurationDecoded - } -} +enum GetBucketAnalyticsConfigurationOutputError { -enum GetBucketAnalyticsConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -7449,14 +7000,15 @@ public struct GetBucketCorsInput: Swift.Equatable { } } -extension GetBucketCorsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketCorsOutputBody = try responseDecoder.decode(responseBody: data) - self.corsRules = output.corsRules - } else { - self.corsRules = nil +extension GetBucketCorsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketCorsOutput() + value.corsRules = try reader["CORSRule"].readListIfPresent(memberReadingClosure: S3ClientTypes.CORSRule.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -7473,43 +7025,15 @@ public struct GetBucketCorsOutput: Swift.Equatable { } } -struct GetBucketCorsOutputBody: Swift.Equatable { - let corsRules: [S3ClientTypes.CORSRule]? -} - -extension GetBucketCorsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case corsRules = "CORSRule" - } +enum GetBucketCorsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.corsRules) { - let corsRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .corsRules) - if corsRulesWrappedContainer != nil { - let corsRulesContainer = try containerValues.decodeIfPresent([S3ClientTypes.CORSRule].self, forKey: .corsRules) - var corsRulesBuffer:[S3ClientTypes.CORSRule]? = nil - if let corsRulesContainer = corsRulesContainer { - corsRulesBuffer = [S3ClientTypes.CORSRule]() - for structureContainer0 in corsRulesContainer { - corsRulesBuffer?.append(structureContainer0) - } - } - corsRules = corsRulesBuffer - } else { - corsRules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - corsRules = nil - } - } -} - -enum GetBucketCorsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -7558,13 +7082,15 @@ public struct GetBucketEncryptionInput: Swift.Equatable { } } -extension GetBucketEncryptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.ServerSideEncryptionConfiguration = try responseDecoder.decode(responseBody: data) - self.serverSideEncryptionConfiguration = output - } else { - self.serverSideEncryptionConfiguration = nil +extension GetBucketEncryptionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketEncryptionOutput() + value.serverSideEncryptionConfiguration = try reader.readIfPresent(readingClosure: S3ClientTypes.ServerSideEncryptionConfiguration.readingClosure) + return value } } } @@ -7581,27 +7107,15 @@ public struct GetBucketEncryptionOutput: Swift.Equatable { } } -struct GetBucketEncryptionOutputBody: Swift.Equatable { - let serverSideEncryptionConfiguration: S3ClientTypes.ServerSideEncryptionConfiguration? -} - -extension GetBucketEncryptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverSideEncryptionConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ServerSideEncryptionConfiguration.self, forKey: .serverSideEncryptionConfiguration) - serverSideEncryptionConfiguration = serverSideEncryptionConfigurationDecoded - } -} +enum GetBucketEncryptionOutputError { -enum GetBucketEncryptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -7647,13 +7161,15 @@ public struct GetBucketIntelligentTieringConfigurationInput: Swift.Equatable { } } -extension GetBucketIntelligentTieringConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.IntelligentTieringConfiguration = try responseDecoder.decode(responseBody: data) - self.intelligentTieringConfiguration = output - } else { - self.intelligentTieringConfiguration = nil +extension GetBucketIntelligentTieringConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketIntelligentTieringConfigurationOutput() + value.intelligentTieringConfiguration = try reader.readIfPresent(readingClosure: S3ClientTypes.IntelligentTieringConfiguration.readingClosure) + return value } } } @@ -7670,27 +7186,15 @@ public struct GetBucketIntelligentTieringConfigurationOutput: Swift.Equatable { } } -struct GetBucketIntelligentTieringConfigurationOutputBody: Swift.Equatable { - let intelligentTieringConfiguration: S3ClientTypes.IntelligentTieringConfiguration? -} - -extension GetBucketIntelligentTieringConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case intelligentTieringConfiguration = "IntelligentTieringConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let intelligentTieringConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IntelligentTieringConfiguration.self, forKey: .intelligentTieringConfiguration) - intelligentTieringConfiguration = intelligentTieringConfigurationDecoded - } -} +enum GetBucketIntelligentTieringConfigurationOutputError { -enum GetBucketIntelligentTieringConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -7751,13 +7255,15 @@ public struct GetBucketInventoryConfigurationInput: Swift.Equatable { } } -extension GetBucketInventoryConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.InventoryConfiguration = try responseDecoder.decode(responseBody: data) - self.inventoryConfiguration = output - } else { - self.inventoryConfiguration = nil +extension GetBucketInventoryConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketInventoryConfigurationOutput() + value.inventoryConfiguration = try reader.readIfPresent(readingClosure: S3ClientTypes.InventoryConfiguration.readingClosure) + return value } } } @@ -7774,27 +7280,15 @@ public struct GetBucketInventoryConfigurationOutput: Swift.Equatable { } } -struct GetBucketInventoryConfigurationOutputBody: Swift.Equatable { - let inventoryConfiguration: S3ClientTypes.InventoryConfiguration? -} - -extension GetBucketInventoryConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case inventoryConfiguration = "InventoryConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let inventoryConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryConfiguration.self, forKey: .inventoryConfiguration) - inventoryConfiguration = inventoryConfigurationDecoded - } -} +enum GetBucketInventoryConfigurationOutputError { -enum GetBucketInventoryConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -7843,14 +7337,15 @@ public struct GetBucketLifecycleConfigurationInput: Swift.Equatable { } } -extension GetBucketLifecycleConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketLifecycleConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.rules = output.rules - } else { - self.rules = nil +extension GetBucketLifecycleConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketLifecycleConfigurationOutput() + value.rules = try reader["Rule"].readListIfPresent(memberReadingClosure: S3ClientTypes.LifecycleRule.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -7867,43 +7362,15 @@ public struct GetBucketLifecycleConfigurationOutput: Swift.Equatable { } } -struct GetBucketLifecycleConfigurationOutputBody: Swift.Equatable { - let rules: [S3ClientTypes.LifecycleRule]? -} - -extension GetBucketLifecycleConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rule" - } +enum GetBucketLifecycleConfigurationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.rules) { - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .rules) - if rulesWrappedContainer != nil { - let rulesContainer = try containerValues.decodeIfPresent([S3ClientTypes.LifecycleRule].self, forKey: .rules) - var rulesBuffer:[S3ClientTypes.LifecycleRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [S3ClientTypes.LifecycleRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - rules = nil - } - } -} - -enum GetBucketLifecycleConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -7952,14 +7419,15 @@ public struct GetBucketLocationInput: Swift.Equatable { } } -extension GetBucketLocationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketLocationOutputBody = try responseDecoder.decode(responseBody: data) - self.locationConstraint = output.locationConstraint - } else { - self.locationConstraint = nil +extension GetBucketLocationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader.unwrap() + var value = GetBucketLocationOutput() + value.locationConstraint = try reader["LocationConstraint"].readIfPresent() + return value } } } @@ -7976,27 +7444,15 @@ public struct GetBucketLocationOutput: Swift.Equatable { } } -struct GetBucketLocationOutputBody: Swift.Equatable { - let locationConstraint: S3ClientTypes.BucketLocationConstraint? -} - -extension GetBucketLocationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case locationConstraint = "LocationConstraint" - } - - public init(from decoder: Swift.Decoder) throws { - var containerValues = try decoder.unkeyedContainer() - let locationConstraintDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketLocationConstraint.self) - locationConstraint = locationConstraintDecoded - } -} +enum GetBucketLocationOutputError { -enum GetBucketLocationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -8045,14 +7501,15 @@ public struct GetBucketLoggingInput: Swift.Equatable { } } -extension GetBucketLoggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketLoggingOutputBody = try responseDecoder.decode(responseBody: data) - self.loggingEnabled = output.loggingEnabled - } else { - self.loggingEnabled = nil +extension GetBucketLoggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketLoggingOutput() + value.loggingEnabled = try reader["LoggingEnabled"].readIfPresent(readingClosure: S3ClientTypes.LoggingEnabled.readingClosure) + return value } } } @@ -8069,27 +7526,15 @@ public struct GetBucketLoggingOutput: Swift.Equatable { } } -struct GetBucketLoggingOutputBody: Swift.Equatable { - let loggingEnabled: S3ClientTypes.LoggingEnabled? -} - -extension GetBucketLoggingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case loggingEnabled = "LoggingEnabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let loggingEnabledDecoded = try containerValues.decodeIfPresent(S3ClientTypes.LoggingEnabled.self, forKey: .loggingEnabled) - loggingEnabled = loggingEnabledDecoded - } -} +enum GetBucketLoggingOutputError { -enum GetBucketLoggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -8150,13 +7595,15 @@ public struct GetBucketMetricsConfigurationInput: Swift.Equatable { } } -extension GetBucketMetricsConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.MetricsConfiguration = try responseDecoder.decode(responseBody: data) - self.metricsConfiguration = output - } else { - self.metricsConfiguration = nil +extension GetBucketMetricsConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketMetricsConfigurationOutput() + value.metricsConfiguration = try reader.readIfPresent(readingClosure: S3ClientTypes.MetricsConfiguration.readingClosure) + return value } } } @@ -8173,27 +7620,15 @@ public struct GetBucketMetricsConfigurationOutput: Swift.Equatable { } } -struct GetBucketMetricsConfigurationOutputBody: Swift.Equatable { - let metricsConfiguration: S3ClientTypes.MetricsConfiguration? -} - -extension GetBucketMetricsConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metricsConfiguration = "MetricsConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricsConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.MetricsConfiguration.self, forKey: .metricsConfiguration) - metricsConfiguration = metricsConfigurationDecoded - } -} +enum GetBucketMetricsConfigurationOutputError { -enum GetBucketMetricsConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -8242,20 +7677,18 @@ public struct GetBucketNotificationConfigurationInput: Swift.Equatable { } } -extension GetBucketNotificationConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketNotificationConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.eventBridgeConfiguration = output.eventBridgeConfiguration - self.lambdaFunctionConfigurations = output.lambdaFunctionConfigurations - self.queueConfigurations = output.queueConfigurations - self.topicConfigurations = output.topicConfigurations - } else { - self.eventBridgeConfiguration = nil - self.lambdaFunctionConfigurations = nil - self.queueConfigurations = nil - self.topicConfigurations = nil +extension GetBucketNotificationConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketNotificationConfigurationOutput() + value.eventBridgeConfiguration = try reader["EventBridgeConfiguration"].readIfPresent(readingClosure: S3ClientTypes.EventBridgeConfiguration.readingClosure) + value.lambdaFunctionConfigurations = try reader["CloudFunctionConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.LambdaFunctionConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.queueConfigurations = try reader["QueueConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.QueueConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.topicConfigurations = try reader["TopicConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.TopicConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -8285,87 +7718,15 @@ public struct GetBucketNotificationConfigurationOutput: Swift.Equatable { } } -struct GetBucketNotificationConfigurationOutputBody: Swift.Equatable { - let topicConfigurations: [S3ClientTypes.TopicConfiguration]? - let queueConfigurations: [S3ClientTypes.QueueConfiguration]? - let lambdaFunctionConfigurations: [S3ClientTypes.LambdaFunctionConfiguration]? - let eventBridgeConfiguration: S3ClientTypes.EventBridgeConfiguration? -} - -extension GetBucketNotificationConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventBridgeConfiguration = "EventBridgeConfiguration" - case lambdaFunctionConfigurations = "CloudFunctionConfiguration" - case queueConfigurations = "QueueConfiguration" - case topicConfigurations = "TopicConfiguration" - } +enum GetBucketNotificationConfigurationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.topicConfigurations) { - let topicConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .topicConfigurations) - if topicConfigurationsWrappedContainer != nil { - let topicConfigurationsContainer = try containerValues.decodeIfPresent([S3ClientTypes.TopicConfiguration].self, forKey: .topicConfigurations) - var topicConfigurationsBuffer:[S3ClientTypes.TopicConfiguration]? = nil - if let topicConfigurationsContainer = topicConfigurationsContainer { - topicConfigurationsBuffer = [S3ClientTypes.TopicConfiguration]() - for structureContainer0 in topicConfigurationsContainer { - topicConfigurationsBuffer?.append(structureContainer0) - } - } - topicConfigurations = topicConfigurationsBuffer - } else { - topicConfigurations = [] - } - } else { - topicConfigurations = nil - } - if containerValues.contains(.queueConfigurations) { - let queueConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .queueConfigurations) - if queueConfigurationsWrappedContainer != nil { - let queueConfigurationsContainer = try containerValues.decodeIfPresent([S3ClientTypes.QueueConfiguration].self, forKey: .queueConfigurations) - var queueConfigurationsBuffer:[S3ClientTypes.QueueConfiguration]? = nil - if let queueConfigurationsContainer = queueConfigurationsContainer { - queueConfigurationsBuffer = [S3ClientTypes.QueueConfiguration]() - for structureContainer0 in queueConfigurationsContainer { - queueConfigurationsBuffer?.append(structureContainer0) - } - } - queueConfigurations = queueConfigurationsBuffer - } else { - queueConfigurations = [] - } - } else { - queueConfigurations = nil - } - if containerValues.contains(.lambdaFunctionConfigurations) { - let lambdaFunctionConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .lambdaFunctionConfigurations) - if lambdaFunctionConfigurationsWrappedContainer != nil { - let lambdaFunctionConfigurationsContainer = try containerValues.decodeIfPresent([S3ClientTypes.LambdaFunctionConfiguration].self, forKey: .lambdaFunctionConfigurations) - var lambdaFunctionConfigurationsBuffer:[S3ClientTypes.LambdaFunctionConfiguration]? = nil - if let lambdaFunctionConfigurationsContainer = lambdaFunctionConfigurationsContainer { - lambdaFunctionConfigurationsBuffer = [S3ClientTypes.LambdaFunctionConfiguration]() - for structureContainer0 in lambdaFunctionConfigurationsContainer { - lambdaFunctionConfigurationsBuffer?.append(structureContainer0) - } - } - lambdaFunctionConfigurations = lambdaFunctionConfigurationsBuffer - } else { - lambdaFunctionConfigurations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - lambdaFunctionConfigurations = nil - } - let eventBridgeConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.EventBridgeConfiguration.self, forKey: .eventBridgeConfiguration) - eventBridgeConfiguration = eventBridgeConfigurationDecoded - } -} - -enum GetBucketNotificationConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -8414,13 +7775,15 @@ public struct GetBucketOwnershipControlsInput: Swift.Equatable { } } -extension GetBucketOwnershipControlsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.OwnershipControls = try responseDecoder.decode(responseBody: data) - self.ownershipControls = output - } else { - self.ownershipControls = nil +extension GetBucketOwnershipControlsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketOwnershipControlsOutput() + value.ownershipControls = try reader.readIfPresent(readingClosure: S3ClientTypes.OwnershipControls.readingClosure) + return value } } } @@ -8437,27 +7800,15 @@ public struct GetBucketOwnershipControlsOutput: Swift.Equatable { } } -struct GetBucketOwnershipControlsOutputBody: Swift.Equatable { - let ownershipControls: S3ClientTypes.OwnershipControls? -} - -extension GetBucketOwnershipControlsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ownershipControls = "OwnershipControls" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownershipControlsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.OwnershipControls.self, forKey: .ownershipControls) - ownershipControls = ownershipControlsDecoded - } -} +enum GetBucketOwnershipControlsOutputError { -enum GetBucketOwnershipControlsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -8506,12 +7857,17 @@ public struct GetBucketPolicyInput: Swift.Equatable { } } -extension GetBucketPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let output = Swift.String(data: data, encoding: .utf8) { - self.policy = output - } else { - self.policy = nil +extension GetBucketPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketPolicyOutput() + if let data = try await httpResponse.body.readData(), let output = Swift.String(data: data, encoding: .utf8) { + value.policy = output + } + return value } } } @@ -8528,27 +7884,15 @@ public struct GetBucketPolicyOutput: Swift.Equatable { } } -struct GetBucketPolicyOutputBody: Swift.Equatable { - let policy: Swift.String? -} - -extension GetBucketPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} +enum GetBucketPolicyOutputError { -enum GetBucketPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -8597,13 +7941,15 @@ public struct GetBucketPolicyStatusInput: Swift.Equatable { } } -extension GetBucketPolicyStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.PolicyStatus = try responseDecoder.decode(responseBody: data) - self.policyStatus = output - } else { - self.policyStatus = nil +extension GetBucketPolicyStatusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketPolicyStatusOutput() + value.policyStatus = try reader.readIfPresent(readingClosure: S3ClientTypes.PolicyStatus.readingClosure) + return value } } } @@ -8620,27 +7966,15 @@ public struct GetBucketPolicyStatusOutput: Swift.Equatable { } } -struct GetBucketPolicyStatusOutputBody: Swift.Equatable { - let policyStatus: S3ClientTypes.PolicyStatus? -} - -extension GetBucketPolicyStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyStatus = "PolicyStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyStatusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.PolicyStatus.self, forKey: .policyStatus) - policyStatus = policyStatusDecoded - } -} +enum GetBucketPolicyStatusOutputError { -enum GetBucketPolicyStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -8689,13 +8023,15 @@ public struct GetBucketReplicationInput: Swift.Equatable { } } -extension GetBucketReplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.ReplicationConfiguration = try responseDecoder.decode(responseBody: data) - self.replicationConfiguration = output - } else { - self.replicationConfiguration = nil +extension GetBucketReplicationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketReplicationOutput() + value.replicationConfiguration = try reader.readIfPresent(readingClosure: S3ClientTypes.ReplicationConfiguration.readingClosure) + return value } } } @@ -8712,27 +8048,15 @@ public struct GetBucketReplicationOutput: Swift.Equatable { } } -struct GetBucketReplicationOutputBody: Swift.Equatable { - let replicationConfiguration: S3ClientTypes.ReplicationConfiguration? -} - -extension GetBucketReplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationConfiguration = "ReplicationConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicationConfiguration.self, forKey: .replicationConfiguration) - replicationConfiguration = replicationConfigurationDecoded - } -} +enum GetBucketReplicationOutputError { -enum GetBucketReplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -8781,14 +8105,15 @@ public struct GetBucketRequestPaymentInput: Swift.Equatable { } } -extension GetBucketRequestPaymentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketRequestPaymentOutputBody = try responseDecoder.decode(responseBody: data) - self.payer = output.payer - } else { - self.payer = nil +extension GetBucketRequestPaymentOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketRequestPaymentOutput() + value.payer = try reader["Payer"].readIfPresent() + return value } } } @@ -8805,27 +8130,15 @@ public struct GetBucketRequestPaymentOutput: Swift.Equatable { } } -struct GetBucketRequestPaymentOutputBody: Swift.Equatable { - let payer: S3ClientTypes.Payer? -} - -extension GetBucketRequestPaymentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case payer = "Payer" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let payerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Payer.self, forKey: .payer) - payer = payerDecoded - } -} +enum GetBucketRequestPaymentOutputError { -enum GetBucketRequestPaymentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -8874,14 +8187,15 @@ public struct GetBucketTaggingInput: Swift.Equatable { } } -extension GetBucketTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketTaggingOutputBody = try responseDecoder.decode(responseBody: data) - self.tagSet = output.tagSet - } else { - self.tagSet = nil +extension GetBucketTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketTaggingOutput() + value.tagSet = try reader["TagSet"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -8899,44 +8213,15 @@ public struct GetBucketTaggingOutput: Swift.Equatable { } } -struct GetBucketTaggingOutputBody: Swift.Equatable { - let tagSet: [S3ClientTypes.Tag]? -} - -extension GetBucketTaggingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagSet = "TagSet" - } +enum GetBucketTaggingOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tagSet) { - struct KeyVal0{struct Tag{}} - let tagSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSet) - if let tagSetWrappedContainer = tagSetWrappedContainer { - let tagSetContainer = try tagSetWrappedContainer.decodeIfPresent([S3ClientTypes.Tag].self, forKey: .member) - var tagSetBuffer:[S3ClientTypes.Tag]? = nil - if let tagSetContainer = tagSetContainer { - tagSetBuffer = [S3ClientTypes.Tag]() - for structureContainer0 in tagSetContainer { - tagSetBuffer?.append(structureContainer0) - } - } - tagSet = tagSetBuffer - } else { - tagSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - tagSet = nil - } - } -} - -enum GetBucketTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -8985,16 +8270,16 @@ public struct GetBucketVersioningInput: Swift.Equatable { } } -extension GetBucketVersioningOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketVersioningOutputBody = try responseDecoder.decode(responseBody: data) - self.mfaDelete = output.mfaDelete - self.status = output.status - } else { - self.mfaDelete = nil - self.status = nil +extension GetBucketVersioningOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketVersioningOutput() + value.mfaDelete = try reader["MfaDelete"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -9015,31 +8300,15 @@ public struct GetBucketVersioningOutput: Swift.Equatable { } } -struct GetBucketVersioningOutputBody: Swift.Equatable { - let status: S3ClientTypes.BucketVersioningStatus? - let mfaDelete: S3ClientTypes.MFADeleteStatus? -} - -extension GetBucketVersioningOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case mfaDelete = "MfaDelete" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketVersioningStatus.self, forKey: .status) - status = statusDecoded - let mfaDeleteDecoded = try containerValues.decodeIfPresent(S3ClientTypes.MFADeleteStatus.self, forKey: .mfaDelete) - mfaDelete = mfaDeleteDecoded - } -} +enum GetBucketVersioningOutputError { -enum GetBucketVersioningOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -9088,20 +8357,18 @@ public struct GetBucketWebsiteInput: Swift.Equatable { } } -extension GetBucketWebsiteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketWebsiteOutputBody = try responseDecoder.decode(responseBody: data) - self.errorDocument = output.errorDocument - self.indexDocument = output.indexDocument - self.redirectAllRequestsTo = output.redirectAllRequestsTo - self.routingRules = output.routingRules - } else { - self.errorDocument = nil - self.indexDocument = nil - self.redirectAllRequestsTo = nil - self.routingRules = nil +extension GetBucketWebsiteOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketWebsiteOutput() + value.errorDocument = try reader["ErrorDocument"].readIfPresent(readingClosure: S3ClientTypes.ErrorDocument.readingClosure) + value.indexDocument = try reader["IndexDocument"].readIfPresent(readingClosure: S3ClientTypes.IndexDocument.readingClosure) + value.redirectAllRequestsTo = try reader["RedirectAllRequestsTo"].readIfPresent(readingClosure: S3ClientTypes.RedirectAllRequestsTo.readingClosure) + value.routingRules = try reader["RoutingRules"].readListIfPresent(memberReadingClosure: S3ClientTypes.RoutingRule.readingClosure, memberNodeInfo: "RoutingRule", isFlattened: false) + return value } } } @@ -9130,56 +8397,15 @@ public struct GetBucketWebsiteOutput: Swift.Equatable { } } -struct GetBucketWebsiteOutputBody: Swift.Equatable { - let redirectAllRequestsTo: S3ClientTypes.RedirectAllRequestsTo? - let indexDocument: S3ClientTypes.IndexDocument? - let errorDocument: S3ClientTypes.ErrorDocument? - let routingRules: [S3ClientTypes.RoutingRule]? -} - -extension GetBucketWebsiteOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errorDocument = "ErrorDocument" - case indexDocument = "IndexDocument" - case redirectAllRequestsTo = "RedirectAllRequestsTo" - case routingRules = "RoutingRules" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let redirectAllRequestsToDecoded = try containerValues.decodeIfPresent(S3ClientTypes.RedirectAllRequestsTo.self, forKey: .redirectAllRequestsTo) - redirectAllRequestsTo = redirectAllRequestsToDecoded - let indexDocumentDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IndexDocument.self, forKey: .indexDocument) - indexDocument = indexDocumentDecoded - let errorDocumentDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ErrorDocument.self, forKey: .errorDocument) - errorDocument = errorDocumentDecoded - if containerValues.contains(.routingRules) { - struct KeyVal0{struct RoutingRule{}} - let routingRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routingRules) - if let routingRulesWrappedContainer = routingRulesWrappedContainer { - let routingRulesContainer = try routingRulesWrappedContainer.decodeIfPresent([S3ClientTypes.RoutingRule].self, forKey: .member) - var routingRulesBuffer:[S3ClientTypes.RoutingRule]? = nil - if let routingRulesContainer = routingRulesContainer { - routingRulesBuffer = [S3ClientTypes.RoutingRule]() - for structureContainer0 in routingRulesContainer { - routingRulesBuffer?.append(structureContainer0) - } - } - routingRules = routingRulesBuffer - } else { - routingRules = [] - } - } else { - routingRules = nil - } - } -} +enum GetBucketWebsiteOutputError { -enum GetBucketWebsiteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -9251,21 +8477,19 @@ public struct GetObjectAclInput: Swift.Equatable { } } -extension GetObjectAclOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetObjectAclOutputBody = try responseDecoder.decode(responseBody: data) - self.grants = output.grants - self.owner = output.owner - } else { - self.grants = nil - self.owner = nil +extension GetObjectAclOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetObjectAclOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + value.grants = try reader["AccessControlList"].readListIfPresent(memberReadingClosure: S3ClientTypes.Grant.readingClosure, memberNodeInfo: "Grant", isFlattened: false) + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + return value } } } @@ -9290,49 +8514,17 @@ public struct GetObjectAclOutput: Swift.Equatable { } } -struct GetObjectAclOutputBody: Swift.Equatable { - let owner: S3ClientTypes.Owner? - let grants: [S3ClientTypes.Grant]? -} - -extension GetObjectAclOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case grants = "AccessControlList" - case owner = "Owner" - } +enum GetObjectAclOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded - if containerValues.contains(.grants) { - struct KeyVal0{struct Grant{}} - let grantsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .grants) - if let grantsWrappedContainer = grantsWrappedContainer { - let grantsContainer = try grantsWrappedContainer.decodeIfPresent([S3ClientTypes.Grant].self, forKey: .member) - var grantsBuffer:[S3ClientTypes.Grant]? = nil - if let grantsContainer = grantsContainer { - grantsBuffer = [S3ClientTypes.Grant]() - for structureContainer0 in grantsContainer { - grantsBuffer?.append(structureContainer0) - } - } - grants = grantsBuffer - } else { - grants = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NoSuchKey": return try await NoSuchKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - grants = nil - } - } -} - -enum GetObjectAclOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NoSuchKey": return try await NoSuchKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -9454,42 +8646,31 @@ public struct GetObjectAttributesInput: Swift.Equatable { } } -extension GetObjectAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let deleteMarkerHeaderValue = httpResponse.headers.value(for: "x-amz-delete-marker") { - self.deleteMarker = Swift.Bool(deleteMarkerHeaderValue) ?? false - } else { - self.deleteMarker = nil - } - if let lastModifiedHeaderValue = httpResponse.headers.value(for: "Last-Modified") { - self.lastModified = TimestampFormatter(format: .httpDate).date(from: lastModifiedHeaderValue) - } else { - self.lastModified = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetObjectAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.checksum = output.checksum - self.eTag = output.eTag - self.objectParts = output.objectParts - self.objectSize = output.objectSize - self.storageClass = output.storageClass - } else { - self.checksum = nil - self.eTag = nil - self.objectParts = nil - self.objectSize = nil - self.storageClass = nil +extension GetObjectAttributesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetObjectAttributesOutput() + if let deleteMarkerHeaderValue = httpResponse.headers.value(for: "x-amz-delete-marker") { + value.deleteMarker = Swift.Bool(deleteMarkerHeaderValue) ?? false + } + if let lastModifiedHeaderValue = httpResponse.headers.value(for: "Last-Modified") { + value.lastModified = TimestampFormatter(format: .httpDate).date(from: lastModifiedHeaderValue) + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + value.checksum = try reader["Checksum"].readIfPresent(readingClosure: S3ClientTypes.Checksum.readingClosure) + value.eTag = try reader["ETag"].readIfPresent() + value.objectParts = try reader["ObjectParts"].readIfPresent(readingClosure: S3ClientTypes.GetObjectAttributesParts.readingClosure) + value.objectSize = try reader["ObjectSize"].readIfPresent() + value.storageClass = try reader["StorageClass"].readIfPresent() + return value } } } @@ -9538,97 +8719,44 @@ public struct GetObjectAttributesOutput: Swift.Equatable { } } -struct GetObjectAttributesOutputBody: Swift.Equatable { - let eTag: Swift.String? - let checksum: S3ClientTypes.Checksum? - let objectParts: S3ClientTypes.GetObjectAttributesParts? - let storageClass: S3ClientTypes.StorageClass? - let objectSize: Swift.Int? -} - -extension GetObjectAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksum = "Checksum" - case eTag = "ETag" - case objectParts = "ObjectParts" - case objectSize = "ObjectSize" - case storageClass = "StorageClass" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded - let checksumDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Checksum.self, forKey: .checksum) - checksum = checksumDecoded - let objectPartsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.GetObjectAttributesParts.self, forKey: .objectParts) - objectParts = objectPartsDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let objectSizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSize) - objectSize = objectSizeDecoded - } -} +enum GetObjectAttributesOutputError { -enum GetObjectAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NoSuchKey": return try await NoSuchKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NoSuchKey": return try await NoSuchKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.GetObjectAttributesParts: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isTruncated = "IsTruncated" - case maxParts = "MaxParts" - case nextPartNumberMarker = "NextPartNumberMarker" - case partNumberMarker = "PartNumberMarker" - case parts = "Part" - case totalPartsCount = "PartsCount" - } +extension S3ClientTypes.GetObjectAttributesParts { static func writingClosure(_ value: S3ClientTypes.GetObjectAttributesParts?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsTruncated")].write(value.isTruncated) - try writer[.init("MaxParts")].write(value.maxParts) - try writer[.init("NextPartNumberMarker")].write(value.nextPartNumberMarker) - try writer[.init("PartNumberMarker")].write(value.partNumberMarker) - try writer[.init("Part")].writeList(value.parts, memberWritingClosure: S3ClientTypes.ObjectPart.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("PartsCount")].write(value.totalPartsCount) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let totalPartsCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalPartsCount) - totalPartsCount = totalPartsCountDecoded - let partNumberMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partNumberMarker) - partNumberMarker = partNumberMarkerDecoded - let nextPartNumberMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextPartNumberMarker) - nextPartNumberMarker = nextPartNumberMarkerDecoded - let maxPartsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxParts) - maxParts = maxPartsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - if containerValues.contains(.parts) { - let partsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .parts) - if partsWrappedContainer != nil { - let partsContainer = try containerValues.decodeIfPresent([S3ClientTypes.ObjectPart].self, forKey: .parts) - var partsBuffer:[S3ClientTypes.ObjectPart]? = nil - if let partsContainer = partsContainer { - partsBuffer = [S3ClientTypes.ObjectPart]() - for structureContainer0 in partsContainer { - partsBuffer?.append(structureContainer0) - } - } - parts = partsBuffer - } else { - parts = [] - } - } else { - parts = nil + try writer["IsTruncated"].write(value.isTruncated) + try writer["MaxParts"].write(value.maxParts) + try writer["NextPartNumberMarker"].write(value.nextPartNumberMarker) + try writer["PartNumberMarker"].write(value.partNumberMarker) + try writer["Part"].writeList(value.parts, memberWritingClosure: S3ClientTypes.ObjectPart.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["PartsCount"].write(value.totalPartsCount) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.GetObjectAttributesParts() + value.totalPartsCount = try reader["PartsCount"].readIfPresent() + value.partNumberMarker = try reader["PartNumberMarker"].readIfPresent() + value.nextPartNumberMarker = try reader["NextPartNumberMarker"].readIfPresent() + value.maxParts = try reader["MaxParts"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.parts = try reader["Part"].readListIfPresent(memberReadingClosure: S3ClientTypes.ObjectPart.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -9723,15 +8851,7 @@ extension GetObjectInput { public func presignURL(config: S3Client.S3ClientConfiguration, expiration: Foundation.TimeInterval) async throws -> ClientRuntime.URL? { let serviceName = "S3" let input = self - let encoder = ClientRuntime.JSONEncoder() - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObject") @@ -9752,8 +8872,9 @@ extension GetObjectInput { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signatureType: .requestQueryParams, useDoubleURIEncode: false, shouldNormalizeURIPath: false, expiration: expiration, unsignedBody: true, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsResponseMiddleware(validationMode: true)) let presignedRequestBuilder = try await operation.presignedRequest(context: context, input: input, output: GetObjectOutput(), next: ClientRuntime.NoopHandler()) guard let builtRequest = presignedRequestBuilder?.build(), let presignedURL = builtRequest.endpoint.url else { return nil @@ -9766,15 +8887,7 @@ extension GetObjectInput { public func presign(config: S3Client.S3ClientConfiguration, expiration: Foundation.TimeInterval) async throws -> ClientRuntime.SdkHttpRequest? { let serviceName = "S3" let input = self - let encoder = ClientRuntime.JSONEncoder() - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getObject") @@ -9797,8 +8910,9 @@ extension GetObjectInput { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, expiration: expiration, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsResponseMiddleware(validationMode: true)) let presignedRequestBuilder = try await operation.presignedRequest(context: context, input: input, output: GetObjectOutput(), next: ClientRuntime.NoopHandler()) guard let builtRequest = presignedRequestBuilder?.build() else { return nil @@ -10144,13 +9258,15 @@ public struct GetObjectLegalHoldInput: Swift.Equatable { } } -extension GetObjectLegalHoldOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.ObjectLockLegalHold = try responseDecoder.decode(responseBody: data) - self.legalHold = output - } else { - self.legalHold = nil +extension GetObjectLegalHoldOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetObjectLegalHoldOutput() + value.legalHold = try reader.readIfPresent(readingClosure: S3ClientTypes.ObjectLockLegalHold.readingClosure) + return value } } } @@ -10167,27 +9283,15 @@ public struct GetObjectLegalHoldOutput: Swift.Equatable { } } -struct GetObjectLegalHoldOutputBody: Swift.Equatable { - let legalHold: S3ClientTypes.ObjectLockLegalHold? -} - -extension GetObjectLegalHoldOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case legalHold = "LegalHold" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let legalHoldDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockLegalHold.self, forKey: .legalHold) - legalHold = legalHoldDecoded - } -} +enum GetObjectLegalHoldOutputError { -enum GetObjectLegalHoldOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -10236,13 +9340,15 @@ public struct GetObjectLockConfigurationInput: Swift.Equatable { } } -extension GetObjectLockConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.ObjectLockConfiguration = try responseDecoder.decode(responseBody: data) - self.objectLockConfiguration = output - } else { - self.objectLockConfiguration = nil +extension GetObjectLockConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetObjectLockConfigurationOutput() + value.objectLockConfiguration = try reader.readIfPresent(readingClosure: S3ClientTypes.ObjectLockConfiguration.readingClosure) + return value } } } @@ -10259,27 +9365,15 @@ public struct GetObjectLockConfigurationOutput: Swift.Equatable { } } -struct GetObjectLockConfigurationOutputBody: Swift.Equatable { - let objectLockConfiguration: S3ClientTypes.ObjectLockConfiguration? -} - -extension GetObjectLockConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objectLockConfiguration = "ObjectLockConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let objectLockConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockConfiguration.self, forKey: .objectLockConfiguration) - objectLockConfiguration = objectLockConfigurationDecoded - } -} +enum GetObjectLockConfigurationOutputError { -enum GetObjectLockConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -10289,197 +9383,134 @@ extension GetObjectOutput: Swift.CustomDebugStringConvertible { "GetObjectOutput(acceptRanges: \(Swift.String(describing: acceptRanges)), body: \(Swift.String(describing: body)), bucketKeyEnabled: \(Swift.String(describing: bucketKeyEnabled)), cacheControl: \(Swift.String(describing: cacheControl)), checksumCRC32: \(Swift.String(describing: checksumCRC32)), checksumCRC32C: \(Swift.String(describing: checksumCRC32C)), checksumSHA1: \(Swift.String(describing: checksumSHA1)), checksumSHA256: \(Swift.String(describing: checksumSHA256)), contentDisposition: \(Swift.String(describing: contentDisposition)), contentEncoding: \(Swift.String(describing: contentEncoding)), contentLanguage: \(Swift.String(describing: contentLanguage)), contentLength: \(Swift.String(describing: contentLength)), contentRange: \(Swift.String(describing: contentRange)), contentType: \(Swift.String(describing: contentType)), deleteMarker: \(Swift.String(describing: deleteMarker)), eTag: \(Swift.String(describing: eTag)), expiration: \(Swift.String(describing: expiration)), expires: \(Swift.String(describing: expires)), lastModified: \(Swift.String(describing: lastModified)), metadata: \(Swift.String(describing: metadata)), missingMeta: \(Swift.String(describing: missingMeta)), objectLockLegalHoldStatus: \(Swift.String(describing: objectLockLegalHoldStatus)), objectLockMode: \(Swift.String(describing: objectLockMode)), objectLockRetainUntilDate: \(Swift.String(describing: objectLockRetainUntilDate)), partsCount: \(Swift.String(describing: partsCount)), replicationStatus: \(Swift.String(describing: replicationStatus)), requestCharged: \(Swift.String(describing: requestCharged)), restore: \(Swift.String(describing: restore)), sseCustomerAlgorithm: \(Swift.String(describing: sseCustomerAlgorithm)), sseCustomerKeyMD5: \(Swift.String(describing: sseCustomerKeyMD5)), serverSideEncryption: \(Swift.String(describing: serverSideEncryption)), storageClass: \(Swift.String(describing: storageClass)), tagCount: \(Swift.String(describing: tagCount)), versionId: \(Swift.String(describing: versionId)), websiteRedirectLocation: \(Swift.String(describing: websiteRedirectLocation)), ssekmsKeyId: \"CONTENT_REDACTED\")"} } -extension GetObjectOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let acceptRangesHeaderValue = httpResponse.headers.value(for: "accept-ranges") { - self.acceptRanges = acceptRangesHeaderValue - } else { - self.acceptRanges = nil - } - if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { - self.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false - } else { - self.bucketKeyEnabled = nil - } - if let cacheControlHeaderValue = httpResponse.headers.value(for: "Cache-Control") { - self.cacheControl = cacheControlHeaderValue - } else { - self.cacheControl = nil - } - if let checksumCRC32HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32") { - self.checksumCRC32 = checksumCRC32HeaderValue - } else { - self.checksumCRC32 = nil - } - if let checksumCRC32CHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32c") { - self.checksumCRC32C = checksumCRC32CHeaderValue - } else { - self.checksumCRC32C = nil - } - if let checksumSHA1HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha1") { - self.checksumSHA1 = checksumSHA1HeaderValue - } else { - self.checksumSHA1 = nil - } - if let checksumSHA256HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha256") { - self.checksumSHA256 = checksumSHA256HeaderValue - } else { - self.checksumSHA256 = nil - } - if let contentDispositionHeaderValue = httpResponse.headers.value(for: "Content-Disposition") { - self.contentDisposition = contentDispositionHeaderValue - } else { - self.contentDisposition = nil - } - if let contentEncodingHeaderValue = httpResponse.headers.value(for: "Content-Encoding") { - self.contentEncoding = contentEncodingHeaderValue - } else { - self.contentEncoding = nil - } - if let contentLanguageHeaderValue = httpResponse.headers.value(for: "Content-Language") { - self.contentLanguage = contentLanguageHeaderValue - } else { - self.contentLanguage = nil - } - if let contentLengthHeaderValue = httpResponse.headers.value(for: "Content-Length") { - self.contentLength = Swift.Int(contentLengthHeaderValue) ?? 0 - } else { - self.contentLength = nil - } - if let contentRangeHeaderValue = httpResponse.headers.value(for: "Content-Range") { - self.contentRange = contentRangeHeaderValue - } else { - self.contentRange = nil - } - if let contentTypeHeaderValue = httpResponse.headers.value(for: "Content-Type") { - self.contentType = contentTypeHeaderValue - } else { - self.contentType = nil - } - if let deleteMarkerHeaderValue = httpResponse.headers.value(for: "x-amz-delete-marker") { - self.deleteMarker = Swift.Bool(deleteMarkerHeaderValue) ?? false - } else { - self.deleteMarker = nil - } - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { - self.expiration = expirationHeaderValue - } else { - self.expiration = nil - } - if let expiresHeaderValue = httpResponse.headers.value(for: "Expires") { - self.expires = expiresHeaderValue - } else { - self.expires = nil - } - if let lastModifiedHeaderValue = httpResponse.headers.value(for: "Last-Modified") { - self.lastModified = TimestampFormatter(format: .httpDate).date(from: lastModifiedHeaderValue) - } else { - self.lastModified = nil - } - if let missingMetaHeaderValue = httpResponse.headers.value(for: "x-amz-missing-meta") { - self.missingMeta = Swift.Int(missingMetaHeaderValue) ?? 0 - } else { - self.missingMeta = nil - } - if let objectLockLegalHoldStatusHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-legal-hold") { - self.objectLockLegalHoldStatus = S3ClientTypes.ObjectLockLegalHoldStatus(rawValue: objectLockLegalHoldStatusHeaderValue) - } else { - self.objectLockLegalHoldStatus = nil - } - if let objectLockModeHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-mode") { - self.objectLockMode = S3ClientTypes.ObjectLockMode(rawValue: objectLockModeHeaderValue) - } else { - self.objectLockMode = nil - } - if let objectLockRetainUntilDateHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-retain-until-date") { - self.objectLockRetainUntilDate = TimestampFormatter(format: .dateTime).date(from: objectLockRetainUntilDateHeaderValue) - } else { - self.objectLockRetainUntilDate = nil - } - if let partsCountHeaderValue = httpResponse.headers.value(for: "x-amz-mp-parts-count") { - self.partsCount = Swift.Int(partsCountHeaderValue) ?? 0 - } else { - self.partsCount = nil - } - if let replicationStatusHeaderValue = httpResponse.headers.value(for: "x-amz-replication-status") { - self.replicationStatus = S3ClientTypes.ReplicationStatus(rawValue: replicationStatusHeaderValue) - } else { - self.replicationStatus = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let restoreHeaderValue = httpResponse.headers.value(for: "x-amz-restore") { - self.restore = restoreHeaderValue - } else { - self.restore = nil - } - if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { - self.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue - } else { - self.sseCustomerAlgorithm = nil - } - if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { - self.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue - } else { - self.sseCustomerKeyMD5 = nil - } - if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { - self.ssekmsKeyId = ssekmsKeyIdHeaderValue - } else { - self.ssekmsKeyId = nil - } - if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { - self.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) - } else { - self.serverSideEncryption = nil - } - if let storageClassHeaderValue = httpResponse.headers.value(for: "x-amz-storage-class") { - self.storageClass = S3ClientTypes.StorageClass(rawValue: storageClassHeaderValue) - } else { - self.storageClass = nil - } - if let tagCountHeaderValue = httpResponse.headers.value(for: "x-amz-tagging-count") { - self.tagCount = Swift.Int(tagCountHeaderValue) ?? 0 - } else { - self.tagCount = nil - } - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil - } - if let websiteRedirectLocationHeaderValue = httpResponse.headers.value(for: "x-amz-website-redirect-location") { - self.websiteRedirectLocation = websiteRedirectLocationHeaderValue - } else { - self.websiteRedirectLocation = nil - } - let keysForMetadata = httpResponse.headers.dictionary.keys.filter({ $0.starts(with: "x-amz-meta-") }) - if (!keysForMetadata.isEmpty) { - var mapMember = [Swift.String: String]() - for headerKey in keysForMetadata { - let mapMemberValue = httpResponse.headers.dictionary[headerKey]?[0] - let mapMemberKey = headerKey.removePrefix("x-amz-meta-") - mapMember[mapMemberKey] = mapMemberValue - } - self.metadata = mapMember - } else { - self.metadata = [:] - } - switch httpResponse.body { - case .data(let data): - self.body = .data(data) - case .stream(let stream): - self.body = .stream(stream) - case .noStream: - self.body = nil +extension GetObjectOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = GetObjectOutput() + if let acceptRangesHeaderValue = httpResponse.headers.value(for: "accept-ranges") { + value.acceptRanges = acceptRangesHeaderValue + } + if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { + value.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false + } + if let cacheControlHeaderValue = httpResponse.headers.value(for: "Cache-Control") { + value.cacheControl = cacheControlHeaderValue + } + if let checksumCRC32HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32") { + value.checksumCRC32 = checksumCRC32HeaderValue + } + if let checksumCRC32CHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32c") { + value.checksumCRC32C = checksumCRC32CHeaderValue + } + if let checksumSHA1HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha1") { + value.checksumSHA1 = checksumSHA1HeaderValue + } + if let checksumSHA256HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha256") { + value.checksumSHA256 = checksumSHA256HeaderValue + } + if let contentDispositionHeaderValue = httpResponse.headers.value(for: "Content-Disposition") { + value.contentDisposition = contentDispositionHeaderValue + } + if let contentEncodingHeaderValue = httpResponse.headers.value(for: "Content-Encoding") { + value.contentEncoding = contentEncodingHeaderValue + } + if let contentLanguageHeaderValue = httpResponse.headers.value(for: "Content-Language") { + value.contentLanguage = contentLanguageHeaderValue + } + if let contentLengthHeaderValue = httpResponse.headers.value(for: "Content-Length") { + value.contentLength = Swift.Int(contentLengthHeaderValue) ?? 0 + } + if let contentRangeHeaderValue = httpResponse.headers.value(for: "Content-Range") { + value.contentRange = contentRangeHeaderValue + } + if let contentTypeHeaderValue = httpResponse.headers.value(for: "Content-Type") { + value.contentType = contentTypeHeaderValue + } + if let deleteMarkerHeaderValue = httpResponse.headers.value(for: "x-amz-delete-marker") { + value.deleteMarker = Swift.Bool(deleteMarkerHeaderValue) ?? false + } + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { + value.expiration = expirationHeaderValue + } + if let expiresHeaderValue = httpResponse.headers.value(for: "Expires") { + value.expires = expiresHeaderValue + } + if let lastModifiedHeaderValue = httpResponse.headers.value(for: "Last-Modified") { + value.lastModified = TimestampFormatter(format: .httpDate).date(from: lastModifiedHeaderValue) + } + if let missingMetaHeaderValue = httpResponse.headers.value(for: "x-amz-missing-meta") { + value.missingMeta = Swift.Int(missingMetaHeaderValue) ?? 0 + } + if let objectLockLegalHoldStatusHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-legal-hold") { + value.objectLockLegalHoldStatus = S3ClientTypes.ObjectLockLegalHoldStatus(rawValue: objectLockLegalHoldStatusHeaderValue) + } + if let objectLockModeHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-mode") { + value.objectLockMode = S3ClientTypes.ObjectLockMode(rawValue: objectLockModeHeaderValue) + } + if let objectLockRetainUntilDateHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-retain-until-date") { + value.objectLockRetainUntilDate = TimestampFormatter(format: .dateTime).date(from: objectLockRetainUntilDateHeaderValue) + } + if let partsCountHeaderValue = httpResponse.headers.value(for: "x-amz-mp-parts-count") { + value.partsCount = Swift.Int(partsCountHeaderValue) ?? 0 + } + if let replicationStatusHeaderValue = httpResponse.headers.value(for: "x-amz-replication-status") { + value.replicationStatus = S3ClientTypes.ReplicationStatus(rawValue: replicationStatusHeaderValue) + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let restoreHeaderValue = httpResponse.headers.value(for: "x-amz-restore") { + value.restore = restoreHeaderValue + } + if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { + value.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue + } + if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { + value.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue + } + if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { + value.ssekmsKeyId = ssekmsKeyIdHeaderValue + } + if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { + value.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) + } + if let storageClassHeaderValue = httpResponse.headers.value(for: "x-amz-storage-class") { + value.storageClass = S3ClientTypes.StorageClass(rawValue: storageClassHeaderValue) + } + if let tagCountHeaderValue = httpResponse.headers.value(for: "x-amz-tagging-count") { + value.tagCount = Swift.Int(tagCountHeaderValue) ?? 0 + } + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + if let websiteRedirectLocationHeaderValue = httpResponse.headers.value(for: "x-amz-website-redirect-location") { + value.websiteRedirectLocation = websiteRedirectLocationHeaderValue + } + let keysForMetadata = httpResponse.headers.dictionary.keys.filter({ $0.starts(with: "x-amz-meta-") }) + if (!keysForMetadata.isEmpty) { + var mapMember = [Swift.String: String]() + for headerKey in keysForMetadata { + let mapMemberValue = httpResponse.headers.dictionary[headerKey]?[0] + let mapMemberKey = headerKey.removePrefix("x-amz-meta-") + mapMember[mapMemberKey] = mapMemberValue + } + value.metadata = mapMember + } else { + value.metadata = [:] + } + switch httpResponse.body { + case .data(let data): + value.body = .data(data) + case .stream(let stream): + value.body = .stream(stream) + case .noStream: + value.body = nil + } + return value } } } @@ -10640,37 +9671,18 @@ public struct GetObjectOutput: Swift.Equatable { } } -struct GetObjectOutputBody: Swift.Equatable { - let body: ClientRuntime.ByteStream? -} - -extension GetObjectOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - } +enum GetObjectOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.body) { - do { - let bodyDecoded = try containerValues.decodeIfPresent(ClientRuntime.ByteStream.self, forKey: .body) - body = bodyDecoded - } catch { - body = ClientRuntime.ByteStream.data("".data(using: .utf8)!) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "InvalidObjectState": return try await InvalidObjectState.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + case "NoSuchKey": return try await NoSuchKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - body = nil - } - } -} - -enum GetObjectOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "InvalidObjectState": return try await InvalidObjectState(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - case "NoSuchKey": return try await NoSuchKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -10742,13 +9754,15 @@ public struct GetObjectRetentionInput: Swift.Equatable { } } -extension GetObjectRetentionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.ObjectLockRetention = try responseDecoder.decode(responseBody: data) - self.retention = output - } else { - self.retention = nil +extension GetObjectRetentionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetObjectRetentionOutput() + value.retention = try reader.readIfPresent(readingClosure: S3ClientTypes.ObjectLockRetention.readingClosure) + return value } } } @@ -10765,27 +9779,15 @@ public struct GetObjectRetentionOutput: Swift.Equatable { } } -struct GetObjectRetentionOutputBody: Swift.Equatable { - let retention: S3ClientTypes.ObjectLockRetention? -} - -extension GetObjectRetentionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case retention = "Retention" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let retentionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockRetention.self, forKey: .retention) - retention = retentionDecoded - } -} +enum GetObjectRetentionOutputError { -enum GetObjectRetentionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -10857,19 +9859,18 @@ public struct GetObjectTaggingInput: Swift.Equatable { } } -extension GetObjectTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetObjectTaggingOutputBody = try responseDecoder.decode(responseBody: data) - self.tagSet = output.tagSet - } else { - self.tagSet = nil +extension GetObjectTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetObjectTaggingOutput() + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + value.tagSet = try reader["TagSet"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -10891,44 +9892,15 @@ public struct GetObjectTaggingOutput: Swift.Equatable { } } -struct GetObjectTaggingOutputBody: Swift.Equatable { - let tagSet: [S3ClientTypes.Tag]? -} - -extension GetObjectTaggingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagSet = "TagSet" - } +enum GetObjectTaggingOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tagSet) { - struct KeyVal0{struct Tag{}} - let tagSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSet) - if let tagSetWrappedContainer = tagSetWrappedContainer { - let tagSetContainer = try tagSetWrappedContainer.decodeIfPresent([S3ClientTypes.Tag].self, forKey: .member) - var tagSetBuffer:[S3ClientTypes.Tag]? = nil - if let tagSetContainer = tagSetContainer { - tagSetBuffer = [S3ClientTypes.Tag]() - for structureContainer0 in tagSetContainer { - tagSetBuffer?.append(structureContainer0) - } - } - tagSet = tagSetBuffer - } else { - tagSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - tagSet = nil - } - } -} - -enum GetObjectTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -10992,20 +9964,23 @@ public struct GetObjectTorrentInput: Swift.Equatable { } } -extension GetObjectTorrentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - switch httpResponse.body { - case .data(let data): - self.body = .data(data) - case .stream(let stream): - self.body = .stream(stream) - case .noStream: - self.body = nil +extension GetObjectTorrentOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = GetObjectTorrentOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + switch httpResponse.body { + case .data(let data): + value.body = .data(data) + case .stream(let stream): + value.body = .stream(stream) + case .noStream: + value.body = nil + } + return value } } } @@ -11026,35 +10001,15 @@ public struct GetObjectTorrentOutput: Swift.Equatable { } } -struct GetObjectTorrentOutputBody: Swift.Equatable { - let body: ClientRuntime.ByteStream? -} - -extension GetObjectTorrentOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - } +enum GetObjectTorrentOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.body) { - do { - let bodyDecoded = try containerValues.decodeIfPresent(ClientRuntime.ByteStream.self, forKey: .body) - body = bodyDecoded - } catch { - body = ClientRuntime.ByteStream.data("".data(using: .utf8)!) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - body = nil - } - } -} - -enum GetObjectTorrentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -11103,13 +10058,15 @@ public struct GetPublicAccessBlockInput: Swift.Equatable { } } -extension GetPublicAccessBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.PublicAccessBlockConfiguration = try responseDecoder.decode(responseBody: data) - self.publicAccessBlockConfiguration = output - } else { - self.publicAccessBlockConfiguration = nil +extension GetPublicAccessBlockOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetPublicAccessBlockOutput() + value.publicAccessBlockConfiguration = try reader.readIfPresent(readingClosure: S3ClientTypes.PublicAccessBlockConfiguration.readingClosure) + return value } } } @@ -11126,45 +10083,33 @@ public struct GetPublicAccessBlockOutput: Swift.Equatable { } } -struct GetPublicAccessBlockOutputBody: Swift.Equatable { - let publicAccessBlockConfiguration: S3ClientTypes.PublicAccessBlockConfiguration? -} - -extension GetPublicAccessBlockOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicAccessBlockConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlockConfiguration) - publicAccessBlockConfiguration = publicAccessBlockConfigurationDecoded - } -} +enum GetPublicAccessBlockOutputError { -enum GetPublicAccessBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.GlacierJobParameters: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tier = "Tier" - } +extension S3ClientTypes.GlacierJobParameters { static func writingClosure(_ value: S3ClientTypes.GlacierJobParameters?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Tier")].write(value.tier) + try writer["Tier"].write(value.tier) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tierDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Tier.self, forKey: .tier) - tier = tierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.GlacierJobParameters() + value.tier = try reader["Tier"].readIfPresent() + return value + } } } @@ -11185,24 +10130,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.Grant: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case grantee = "Grantee" - case permission = "Permission" - } +extension S3ClientTypes.Grant { static func writingClosure(_ value: S3ClientTypes.Grant?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Grantee", namespace: .init(prefix: "xsi", uri: "http://www.w3.org/2001/XMLSchema-instance"))].write(value.grantee, writingClosure: S3ClientTypes.Grantee.writingClosure(_:to:)) - try writer[.init("Permission")].write(value.permission) + try writer[.init("Grantee", namespaceDef: .init(prefix: "xsi", uri: "http://www.w3.org/2001/XMLSchema-instance"))].write(value.grantee, writingClosure: S3ClientTypes.Grantee.writingClosure(_:to:)) + try writer["Permission"].write(value.permission) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let granteeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Grantee.self, forKey: .grantee) - grantee = granteeDecoded - let permissionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Permission.self, forKey: .permission) - permission = permissionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Grant() + value.grantee = try reader[.init("Grantee", namespaceDef: .init(prefix: "xsi", uri: "http://www.w3.org/2001/XMLSchema-instance"))].readIfPresent(readingClosure: S3ClientTypes.Grantee.readingClosure) + value.permission = try reader["Permission"].readIfPresent() + return value + } } } @@ -11226,36 +10169,28 @@ extension S3ClientTypes { } -extension S3ClientTypes.Grantee: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case displayName = "DisplayName" - case emailAddress = "EmailAddress" - case id = "ID" - case type = "xsi:type" - case uri = "URI" - } +extension S3ClientTypes.Grantee { static func writingClosure(_ value: S3ClientTypes.Grantee?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DisplayName")].write(value.displayName) - try writer[.init("EmailAddress")].write(value.emailAddress) - try writer[.init("ID")].write(value.id) + try writer["DisplayName"].write(value.displayName) + try writer["EmailAddress"].write(value.emailAddress) + try writer["ID"].write(value.id) try writer[.init("xsi:type", location: .attribute)].write(value.type) - try writer[.init("URI")].write(value.uri) + try writer["URI"].write(value.uri) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let displayNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .displayName) - displayName = displayNameDecoded - let emailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .emailAddress) - emailAddress = emailAddressDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let uriDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uri) - uri = uriDecoded - let typeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ModelType.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Grantee() + value.displayName = try reader["DisplayName"].readIfPresent() + value.emailAddress = try reader["EmailAddress"].readIfPresent() + value.id = try reader["ID"].readIfPresent() + value.uri = try reader["URI"].readIfPresent() + value.type = try reader[.init("xsi:type", location: .attribute)].readIfPresent() + return value + } } } @@ -11346,27 +10281,24 @@ public struct HeadBucketInput: Swift.Equatable { } } -extension HeadBucketOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let accessPointAliasHeaderValue = httpResponse.headers.value(for: "x-amz-access-point-alias") { - self.accessPointAlias = Swift.Bool(accessPointAliasHeaderValue) ?? false - } else { - self.accessPointAlias = nil - } - if let bucketLocationNameHeaderValue = httpResponse.headers.value(for: "x-amz-bucket-location-name") { - self.bucketLocationName = bucketLocationNameHeaderValue - } else { - self.bucketLocationName = nil - } - if let bucketLocationTypeHeaderValue = httpResponse.headers.value(for: "x-amz-bucket-location-type") { - self.bucketLocationType = S3ClientTypes.LocationType(rawValue: bucketLocationTypeHeaderValue) - } else { - self.bucketLocationType = nil - } - if let bucketRegionHeaderValue = httpResponse.headers.value(for: "x-amz-bucket-region") { - self.bucketRegion = bucketRegionHeaderValue - } else { - self.bucketRegion = nil +extension HeadBucketOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = HeadBucketOutput() + if let accessPointAliasHeaderValue = httpResponse.headers.value(for: "x-amz-access-point-alias") { + value.accessPointAlias = Swift.Bool(accessPointAliasHeaderValue) ?? false + } + if let bucketLocationNameHeaderValue = httpResponse.headers.value(for: "x-amz-bucket-location-name") { + value.bucketLocationName = bucketLocationNameHeaderValue + } + if let bucketLocationTypeHeaderValue = httpResponse.headers.value(for: "x-amz-bucket-location-type") { + value.bucketLocationType = S3ClientTypes.LocationType(rawValue: bucketLocationTypeHeaderValue) + } + if let bucketRegionHeaderValue = httpResponse.headers.value(for: "x-amz-bucket-region") { + value.bucketRegion = bucketRegionHeaderValue + } + return value } } } @@ -11395,12 +10327,17 @@ public struct HeadBucketOutput: Swift.Equatable { } } -enum HeadBucketOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NotFound": return try await NotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum HeadBucketOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NotFound": return try await NotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -11580,184 +10517,123 @@ extension HeadObjectOutput: Swift.CustomDebugStringConvertible { "HeadObjectOutput(acceptRanges: \(Swift.String(describing: acceptRanges)), archiveStatus: \(Swift.String(describing: archiveStatus)), bucketKeyEnabled: \(Swift.String(describing: bucketKeyEnabled)), cacheControl: \(Swift.String(describing: cacheControl)), checksumCRC32: \(Swift.String(describing: checksumCRC32)), checksumCRC32C: \(Swift.String(describing: checksumCRC32C)), checksumSHA1: \(Swift.String(describing: checksumSHA1)), checksumSHA256: \(Swift.String(describing: checksumSHA256)), contentDisposition: \(Swift.String(describing: contentDisposition)), contentEncoding: \(Swift.String(describing: contentEncoding)), contentLanguage: \(Swift.String(describing: contentLanguage)), contentLength: \(Swift.String(describing: contentLength)), contentType: \(Swift.String(describing: contentType)), deleteMarker: \(Swift.String(describing: deleteMarker)), eTag: \(Swift.String(describing: eTag)), expiration: \(Swift.String(describing: expiration)), expires: \(Swift.String(describing: expires)), lastModified: \(Swift.String(describing: lastModified)), metadata: \(Swift.String(describing: metadata)), missingMeta: \(Swift.String(describing: missingMeta)), objectLockLegalHoldStatus: \(Swift.String(describing: objectLockLegalHoldStatus)), objectLockMode: \(Swift.String(describing: objectLockMode)), objectLockRetainUntilDate: \(Swift.String(describing: objectLockRetainUntilDate)), partsCount: \(Swift.String(describing: partsCount)), replicationStatus: \(Swift.String(describing: replicationStatus)), requestCharged: \(Swift.String(describing: requestCharged)), restore: \(Swift.String(describing: restore)), sseCustomerAlgorithm: \(Swift.String(describing: sseCustomerAlgorithm)), sseCustomerKeyMD5: \(Swift.String(describing: sseCustomerKeyMD5)), serverSideEncryption: \(Swift.String(describing: serverSideEncryption)), storageClass: \(Swift.String(describing: storageClass)), versionId: \(Swift.String(describing: versionId)), websiteRedirectLocation: \(Swift.String(describing: websiteRedirectLocation)), ssekmsKeyId: \"CONTENT_REDACTED\")"} } -extension HeadObjectOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let acceptRangesHeaderValue = httpResponse.headers.value(for: "accept-ranges") { - self.acceptRanges = acceptRangesHeaderValue - } else { - self.acceptRanges = nil - } - if let archiveStatusHeaderValue = httpResponse.headers.value(for: "x-amz-archive-status") { - self.archiveStatus = S3ClientTypes.ArchiveStatus(rawValue: archiveStatusHeaderValue) - } else { - self.archiveStatus = nil - } - if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { - self.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false - } else { - self.bucketKeyEnabled = nil - } - if let cacheControlHeaderValue = httpResponse.headers.value(for: "Cache-Control") { - self.cacheControl = cacheControlHeaderValue - } else { - self.cacheControl = nil - } - if let checksumCRC32HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32") { - self.checksumCRC32 = checksumCRC32HeaderValue - } else { - self.checksumCRC32 = nil - } - if let checksumCRC32CHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32c") { - self.checksumCRC32C = checksumCRC32CHeaderValue - } else { - self.checksumCRC32C = nil - } - if let checksumSHA1HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha1") { - self.checksumSHA1 = checksumSHA1HeaderValue - } else { - self.checksumSHA1 = nil - } - if let checksumSHA256HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha256") { - self.checksumSHA256 = checksumSHA256HeaderValue - } else { - self.checksumSHA256 = nil - } - if let contentDispositionHeaderValue = httpResponse.headers.value(for: "Content-Disposition") { - self.contentDisposition = contentDispositionHeaderValue - } else { - self.contentDisposition = nil - } - if let contentEncodingHeaderValue = httpResponse.headers.value(for: "Content-Encoding") { - self.contentEncoding = contentEncodingHeaderValue - } else { - self.contentEncoding = nil - } - if let contentLanguageHeaderValue = httpResponse.headers.value(for: "Content-Language") { - self.contentLanguage = contentLanguageHeaderValue - } else { - self.contentLanguage = nil - } - if let contentLengthHeaderValue = httpResponse.headers.value(for: "Content-Length") { - self.contentLength = Swift.Int(contentLengthHeaderValue) ?? 0 - } else { - self.contentLength = nil - } - if let contentTypeHeaderValue = httpResponse.headers.value(for: "Content-Type") { - self.contentType = contentTypeHeaderValue - } else { - self.contentType = nil - } - if let deleteMarkerHeaderValue = httpResponse.headers.value(for: "x-amz-delete-marker") { - self.deleteMarker = Swift.Bool(deleteMarkerHeaderValue) ?? false - } else { - self.deleteMarker = nil - } - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { - self.expiration = expirationHeaderValue - } else { - self.expiration = nil - } - if let expiresHeaderValue = httpResponse.headers.value(for: "Expires") { - self.expires = expiresHeaderValue - } else { - self.expires = nil - } - if let lastModifiedHeaderValue = httpResponse.headers.value(for: "Last-Modified") { - self.lastModified = TimestampFormatter(format: .httpDate).date(from: lastModifiedHeaderValue) - } else { - self.lastModified = nil - } - if let missingMetaHeaderValue = httpResponse.headers.value(for: "x-amz-missing-meta") { - self.missingMeta = Swift.Int(missingMetaHeaderValue) ?? 0 - } else { - self.missingMeta = nil - } - if let objectLockLegalHoldStatusHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-legal-hold") { - self.objectLockLegalHoldStatus = S3ClientTypes.ObjectLockLegalHoldStatus(rawValue: objectLockLegalHoldStatusHeaderValue) - } else { - self.objectLockLegalHoldStatus = nil - } - if let objectLockModeHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-mode") { - self.objectLockMode = S3ClientTypes.ObjectLockMode(rawValue: objectLockModeHeaderValue) - } else { - self.objectLockMode = nil - } - if let objectLockRetainUntilDateHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-retain-until-date") { - self.objectLockRetainUntilDate = TimestampFormatter(format: .dateTime).date(from: objectLockRetainUntilDateHeaderValue) - } else { - self.objectLockRetainUntilDate = nil - } - if let partsCountHeaderValue = httpResponse.headers.value(for: "x-amz-mp-parts-count") { - self.partsCount = Swift.Int(partsCountHeaderValue) ?? 0 - } else { - self.partsCount = nil - } - if let replicationStatusHeaderValue = httpResponse.headers.value(for: "x-amz-replication-status") { - self.replicationStatus = S3ClientTypes.ReplicationStatus(rawValue: replicationStatusHeaderValue) - } else { - self.replicationStatus = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let restoreHeaderValue = httpResponse.headers.value(for: "x-amz-restore") { - self.restore = restoreHeaderValue - } else { - self.restore = nil - } - if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { - self.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue - } else { - self.sseCustomerAlgorithm = nil - } - if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { - self.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue - } else { - self.sseCustomerKeyMD5 = nil - } - if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { - self.ssekmsKeyId = ssekmsKeyIdHeaderValue - } else { - self.ssekmsKeyId = nil - } - if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { - self.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) - } else { - self.serverSideEncryption = nil - } - if let storageClassHeaderValue = httpResponse.headers.value(for: "x-amz-storage-class") { - self.storageClass = S3ClientTypes.StorageClass(rawValue: storageClassHeaderValue) - } else { - self.storageClass = nil - } - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil - } - if let websiteRedirectLocationHeaderValue = httpResponse.headers.value(for: "x-amz-website-redirect-location") { - self.websiteRedirectLocation = websiteRedirectLocationHeaderValue - } else { - self.websiteRedirectLocation = nil - } - let keysForMetadata = httpResponse.headers.dictionary.keys.filter({ $0.starts(with: "x-amz-meta-") }) - if (!keysForMetadata.isEmpty) { - var mapMember = [Swift.String: String]() - for headerKey in keysForMetadata { - let mapMemberValue = httpResponse.headers.dictionary[headerKey]?[0] - let mapMemberKey = headerKey.removePrefix("x-amz-meta-") - mapMember[mapMemberKey] = mapMemberValue - } - self.metadata = mapMember - } else { - self.metadata = [:] +extension HeadObjectOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = HeadObjectOutput() + if let acceptRangesHeaderValue = httpResponse.headers.value(for: "accept-ranges") { + value.acceptRanges = acceptRangesHeaderValue + } + if let archiveStatusHeaderValue = httpResponse.headers.value(for: "x-amz-archive-status") { + value.archiveStatus = S3ClientTypes.ArchiveStatus(rawValue: archiveStatusHeaderValue) + } + if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { + value.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false + } + if let cacheControlHeaderValue = httpResponse.headers.value(for: "Cache-Control") { + value.cacheControl = cacheControlHeaderValue + } + if let checksumCRC32HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32") { + value.checksumCRC32 = checksumCRC32HeaderValue + } + if let checksumCRC32CHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32c") { + value.checksumCRC32C = checksumCRC32CHeaderValue + } + if let checksumSHA1HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha1") { + value.checksumSHA1 = checksumSHA1HeaderValue + } + if let checksumSHA256HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha256") { + value.checksumSHA256 = checksumSHA256HeaderValue + } + if let contentDispositionHeaderValue = httpResponse.headers.value(for: "Content-Disposition") { + value.contentDisposition = contentDispositionHeaderValue + } + if let contentEncodingHeaderValue = httpResponse.headers.value(for: "Content-Encoding") { + value.contentEncoding = contentEncodingHeaderValue + } + if let contentLanguageHeaderValue = httpResponse.headers.value(for: "Content-Language") { + value.contentLanguage = contentLanguageHeaderValue + } + if let contentLengthHeaderValue = httpResponse.headers.value(for: "Content-Length") { + value.contentLength = Swift.Int(contentLengthHeaderValue) ?? 0 + } + if let contentTypeHeaderValue = httpResponse.headers.value(for: "Content-Type") { + value.contentType = contentTypeHeaderValue + } + if let deleteMarkerHeaderValue = httpResponse.headers.value(for: "x-amz-delete-marker") { + value.deleteMarker = Swift.Bool(deleteMarkerHeaderValue) ?? false + } + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { + value.expiration = expirationHeaderValue + } + if let expiresHeaderValue = httpResponse.headers.value(for: "Expires") { + value.expires = expiresHeaderValue + } + if let lastModifiedHeaderValue = httpResponse.headers.value(for: "Last-Modified") { + value.lastModified = TimestampFormatter(format: .httpDate).date(from: lastModifiedHeaderValue) + } + if let missingMetaHeaderValue = httpResponse.headers.value(for: "x-amz-missing-meta") { + value.missingMeta = Swift.Int(missingMetaHeaderValue) ?? 0 + } + if let objectLockLegalHoldStatusHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-legal-hold") { + value.objectLockLegalHoldStatus = S3ClientTypes.ObjectLockLegalHoldStatus(rawValue: objectLockLegalHoldStatusHeaderValue) + } + if let objectLockModeHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-mode") { + value.objectLockMode = S3ClientTypes.ObjectLockMode(rawValue: objectLockModeHeaderValue) + } + if let objectLockRetainUntilDateHeaderValue = httpResponse.headers.value(for: "x-amz-object-lock-retain-until-date") { + value.objectLockRetainUntilDate = TimestampFormatter(format: .dateTime).date(from: objectLockRetainUntilDateHeaderValue) + } + if let partsCountHeaderValue = httpResponse.headers.value(for: "x-amz-mp-parts-count") { + value.partsCount = Swift.Int(partsCountHeaderValue) ?? 0 + } + if let replicationStatusHeaderValue = httpResponse.headers.value(for: "x-amz-replication-status") { + value.replicationStatus = S3ClientTypes.ReplicationStatus(rawValue: replicationStatusHeaderValue) + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let restoreHeaderValue = httpResponse.headers.value(for: "x-amz-restore") { + value.restore = restoreHeaderValue + } + if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { + value.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue + } + if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { + value.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue + } + if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { + value.ssekmsKeyId = ssekmsKeyIdHeaderValue + } + if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { + value.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) + } + if let storageClassHeaderValue = httpResponse.headers.value(for: "x-amz-storage-class") { + value.storageClass = S3ClientTypes.StorageClass(rawValue: storageClassHeaderValue) + } + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + if let websiteRedirectLocationHeaderValue = httpResponse.headers.value(for: "x-amz-website-redirect-location") { + value.websiteRedirectLocation = websiteRedirectLocationHeaderValue + } + let keysForMetadata = httpResponse.headers.dictionary.keys.filter({ $0.starts(with: "x-amz-meta-") }) + if (!keysForMetadata.isEmpty) { + var mapMember = [Swift.String: String]() + for headerKey in keysForMetadata { + let mapMemberValue = httpResponse.headers.dictionary[headerKey]?[0] + let mapMemberKey = headerKey.removePrefix("x-amz-meta-") + mapMember[mapMemberKey] = mapMemberValue + } + value.metadata = mapMember + } else { + value.metadata = [:] + } + return value } } } @@ -11915,30 +10791,35 @@ public struct HeadObjectOutput: Swift.Equatable { } } -enum HeadObjectOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NotFound": return try await NotFound(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum HeadObjectOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NotFound": return try await NotFound.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.IndexDocument: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case suffix = "Suffix" - } +extension S3ClientTypes.IndexDocument { static func writingClosure(_ value: S3ClientTypes.IndexDocument?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Suffix")].write(value.suffix) + try writer["Suffix"].write(value.suffix) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let suffixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .suffix) - suffix = suffixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.IndexDocument() + value.suffix = try reader["Suffix"].readIfPresent() + return value + } } } @@ -11959,24 +10840,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.Initiator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case displayName = "DisplayName" - case id = "ID" - } +extension S3ClientTypes.Initiator { static func writingClosure(_ value: S3ClientTypes.Initiator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DisplayName")].write(value.displayName) - try writer[.init("ID")].write(value.id) + try writer["DisplayName"].write(value.displayName) + try writer["ID"].write(value.id) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let displayNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .displayName) - displayName = displayNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Initiator() + value.id = try reader["ID"].readIfPresent() + value.displayName = try reader["DisplayName"].readIfPresent() + return value + } } } @@ -12000,32 +10879,26 @@ extension S3ClientTypes { } -extension S3ClientTypes.InputSerialization: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case csv = "CSV" - case compressionType = "CompressionType" - case json = "JSON" - case parquet = "Parquet" - } +extension S3ClientTypes.InputSerialization { static func writingClosure(_ value: S3ClientTypes.InputSerialization?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CSV")].write(value.csv, writingClosure: S3ClientTypes.CSVInput.writingClosure(_:to:)) - try writer[.init("CompressionType")].write(value.compressionType) - try writer[.init("JSON")].write(value.json, writingClosure: S3ClientTypes.JSONInput.writingClosure(_:to:)) - try writer[.init("Parquet")].write(value.parquet, writingClosure: S3ClientTypes.ParquetInput.writingClosure(_:to:)) + try writer["CSV"].write(value.csv, writingClosure: S3ClientTypes.CSVInput.writingClosure(_:to:)) + try writer["CompressionType"].write(value.compressionType) + try writer["JSON"].write(value.json, writingClosure: S3ClientTypes.JSONInput.writingClosure(_:to:)) + try writer["Parquet"].write(value.parquet, writingClosure: S3ClientTypes.ParquetInput.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let csvDecoded = try containerValues.decodeIfPresent(S3ClientTypes.CSVInput.self, forKey: .csv) - csv = csvDecoded - let compressionTypeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.CompressionType.self, forKey: .compressionType) - compressionType = compressionTypeDecoded - let jsonDecoded = try containerValues.decodeIfPresent(S3ClientTypes.JSONInput.self, forKey: .json) - json = jsonDecoded - let parquetDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ParquetInput.self, forKey: .parquet) - parquet = parquetDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.InputSerialization() + value.csv = try reader["CSV"].readIfPresent(readingClosure: S3ClientTypes.CSVInput.readingClosure) + value.compressionType = try reader["CompressionType"].readIfPresent() + value.json = try reader["JSON"].readIfPresent(readingClosure: S3ClientTypes.JSONInput.readingClosure) + value.parquet = try reader["Parquet"].readIfPresent(readingClosure: S3ClientTypes.ParquetInput.readingClosure) + return value + } } } @@ -12089,39 +10962,21 @@ extension S3ClientTypes { } } -extension S3ClientTypes.IntelligentTieringAndOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `prefix` = "Prefix" - case tags = "Tag" - } +extension S3ClientTypes.IntelligentTieringAndOperator { static func writingClosure(_ value: S3ClientTypes.IntelligentTieringAndOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tag")].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - if containerValues.contains(.tags) { - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .tags) - if tagsWrappedContainer != nil { - let tagsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Tag].self, forKey: .tags) - var tagsBuffer:[S3ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + try writer["Prefix"].write(value.`prefix`) + try writer["Tag"].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.IntelligentTieringAndOperator() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tags = try reader["Tag"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: true) + return value } } } @@ -12146,47 +11001,25 @@ extension S3ClientTypes { } -extension S3ClientTypes.IntelligentTieringConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "Filter" - case id = "Id" - case status = "Status" - case tierings = "Tiering" - } +extension S3ClientTypes.IntelligentTieringConfiguration { static func writingClosure(_ value: S3ClientTypes.IntelligentTieringConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.IntelligentTieringFilter.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("Status")].write(value.status) - try writer[.init("Tiering")].writeList(value.tierings, memberWritingClosure: S3ClientTypes.Tiering.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IntelligentTieringFilter.self, forKey: .filter) - filter = filterDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IntelligentTieringStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.tierings) { - let tieringsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .tierings) - if tieringsWrappedContainer != nil { - let tieringsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Tiering].self, forKey: .tierings) - var tieringsBuffer:[S3ClientTypes.Tiering]? = nil - if let tieringsContainer = tieringsContainer { - tieringsBuffer = [S3ClientTypes.Tiering]() - for structureContainer0 in tieringsContainer { - tieringsBuffer?.append(structureContainer0) - } - } - tierings = tieringsBuffer - } else { - tierings = [] - } - } else { - tierings = nil + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.IntelligentTieringFilter.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["Status"].write(value.status) + try writer["Tiering"].writeList(value.tierings, memberWritingClosure: S3ClientTypes.Tiering.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.IntelligentTieringConfiguration() + value.id = try reader["Id"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.IntelligentTieringFilter.readingClosure) + value.status = try reader["Status"].readIfPresent() + value.tierings = try reader["Tiering"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tiering.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -12222,28 +11055,24 @@ extension S3ClientTypes { } -extension S3ClientTypes.IntelligentTieringFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case and = "And" - case `prefix` = "Prefix" - case tag = "Tag" - } +extension S3ClientTypes.IntelligentTieringFilter { static func writingClosure(_ value: S3ClientTypes.IntelligentTieringFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("And")].write(value.and, writingClosure: S3ClientTypes.IntelligentTieringAndOperator.writingClosure(_:to:)) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tag")].write(value.tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) + try writer["And"].write(value.and, writingClosure: S3ClientTypes.IntelligentTieringAndOperator.writingClosure(_:to:)) + try writer["Prefix"].write(value.`prefix`) + try writer["Tag"].write(value.tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let tagDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Tag.self, forKey: .tag) - tag = tagDecoded - let andDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IntelligentTieringAndOperator.self, forKey: .and) - and = andDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.IntelligentTieringFilter() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tag = try reader["Tag"].readIfPresent(readingClosure: S3ClientTypes.Tag.readingClosure) + value.and = try reader["And"].readIfPresent(readingClosure: S3ClientTypes.IntelligentTieringAndOperator.readingClosure) + return value + } } } @@ -12304,19 +11133,29 @@ extension S3ClientTypes { } extension InvalidObjectState { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: InvalidObjectStateBody = try responseDecoder.decode(responseBody: data) - self.properties.accessTier = output.accessTier - self.properties.storageClass = output.storageClass - } else { - self.properties.accessTier = nil - self.properties.storageClass = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidObjectState() + value.properties.storageClass = try reader["StorageClass"].readIfPresent() + value.properties.accessTier = try reader["AccessTier"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + } +} + +extension InvalidObjectState { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidObjectState() + value.properties.accessTier = try reader["AccessTier"].readIfPresent() + value.properties.storageClass = try reader["StorageClass"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -12348,81 +11187,32 @@ public struct InvalidObjectState: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct InvalidObjectStateBody: Swift.Equatable { - let storageClass: S3ClientTypes.StorageClass? - let accessTier: S3ClientTypes.IntelligentTieringAccessTier? -} - -extension InvalidObjectStateBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessTier = "AccessTier" - case storageClass = "StorageClass" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let accessTierDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IntelligentTieringAccessTier.self, forKey: .accessTier) - accessTier = accessTierDecoded - } -} - -extension S3ClientTypes.InventoryConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "Destination" - case filter = "Filter" - case id = "Id" - case includedObjectVersions = "IncludedObjectVersions" - case isEnabled = "IsEnabled" - case optionalFields = "OptionalFields" - case schedule = "Schedule" - } +extension S3ClientTypes.InventoryConfiguration { static func writingClosure(_ value: S3ClientTypes.InventoryConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Destination")].write(value.destination, writingClosure: S3ClientTypes.InventoryDestination.writingClosure(_:to:)) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.InventoryFilter.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("IncludedObjectVersions")].write(value.includedObjectVersions) - try writer[.init("IsEnabled")].write(value.isEnabled) - try writer[.init("OptionalFields")].writeList(value.optionalFields, memberWritingClosure: S3ClientTypes.InventoryOptionalField.writingClosure(_:to:), memberNodeInfo: .init("Field"), isFlattened: false) - try writer[.init("Schedule")].write(value.schedule, writingClosure: S3ClientTypes.InventorySchedule.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryDestination.self, forKey: .destination) - destination = destinationDecoded - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) - isEnabled = isEnabledDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryFilter.self, forKey: .filter) - filter = filterDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let includedObjectVersionsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryIncludedObjectVersions.self, forKey: .includedObjectVersions) - includedObjectVersions = includedObjectVersionsDecoded - if containerValues.contains(.optionalFields) { - struct KeyVal0{struct Field{}} - let optionalFieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .optionalFields) - if let optionalFieldsWrappedContainer = optionalFieldsWrappedContainer { - let optionalFieldsContainer = try optionalFieldsWrappedContainer.decodeIfPresent([S3ClientTypes.InventoryOptionalField].self, forKey: .member) - var optionalFieldsBuffer:[S3ClientTypes.InventoryOptionalField]? = nil - if let optionalFieldsContainer = optionalFieldsContainer { - optionalFieldsBuffer = [S3ClientTypes.InventoryOptionalField]() - for enumContainer0 in optionalFieldsContainer { - optionalFieldsBuffer?.append(enumContainer0) - } - } - optionalFields = optionalFieldsBuffer - } else { - optionalFields = [] - } - } else { - optionalFields = nil + try writer["Destination"].write(value.destination, writingClosure: S3ClientTypes.InventoryDestination.writingClosure(_:to:)) + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.InventoryFilter.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["IncludedObjectVersions"].write(value.includedObjectVersions) + try writer["IsEnabled"].write(value.isEnabled) + try writer["OptionalFields"].writeList(value.optionalFields, memberWritingClosure: S3ClientTypes.InventoryOptionalField.writingClosure(_:to:), memberNodeInfo: "Field", isFlattened: false) + try writer["Schedule"].write(value.schedule, writingClosure: S3ClientTypes.InventorySchedule.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.InventoryConfiguration() + value.destination = try reader["Destination"].readIfPresent(readingClosure: S3ClientTypes.InventoryDestination.readingClosure) + value.isEnabled = try reader["IsEnabled"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.InventoryFilter.readingClosure) + value.id = try reader["Id"].readIfPresent() + value.includedObjectVersions = try reader["IncludedObjectVersions"].readIfPresent() + value.optionalFields = try reader["OptionalFields"].readListIfPresent(memberReadingClosure: S3ClientTypes.InventoryOptionalField.readingClosure, memberNodeInfo: "Field", isFlattened: false) + value.schedule = try reader["Schedule"].readIfPresent(readingClosure: S3ClientTypes.InventorySchedule.readingClosure) + return value } - let scheduleDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventorySchedule.self, forKey: .schedule) - schedule = scheduleDecoded } } @@ -12471,20 +11261,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.InventoryDestination: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3BucketDestination = "S3BucketDestination" - } +extension S3ClientTypes.InventoryDestination { static func writingClosure(_ value: S3ClientTypes.InventoryDestination?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("S3BucketDestination")].write(value.s3BucketDestination, writingClosure: S3ClientTypes.InventoryS3BucketDestination.writingClosure(_:to:)) + try writer["S3BucketDestination"].write(value.s3BucketDestination, writingClosure: S3ClientTypes.InventoryS3BucketDestination.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDestinationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryS3BucketDestination.self, forKey: .s3BucketDestination) - s3BucketDestination = s3BucketDestinationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.InventoryDestination() + value.s3BucketDestination = try reader["S3BucketDestination"].readIfPresent(readingClosure: S3ClientTypes.InventoryS3BucketDestination.readingClosure) + return value + } } } @@ -12505,24 +11295,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.InventoryEncryption: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ssekms = "SSE-KMS" - case sses3 = "SSE-S3" - } +extension S3ClientTypes.InventoryEncryption { static func writingClosure(_ value: S3ClientTypes.InventoryEncryption?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("SSE-KMS")].write(value.ssekms, writingClosure: S3ClientTypes.SSEKMS.writingClosure(_:to:)) - try writer[.init("SSE-S3")].write(value.sses3, writingClosure: S3ClientTypes.SSES3.writingClosure(_:to:)) + try writer["SSE-KMS"].write(value.ssekms, writingClosure: S3ClientTypes.SSEKMS.writingClosure(_:to:)) + try writer["SSE-S3"].write(value.sses3, writingClosure: S3ClientTypes.SSES3.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sses3Decoded = try containerValues.decodeIfPresent(S3ClientTypes.SSES3.self, forKey: .sses3) - sses3 = sses3Decoded - let ssekmsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.SSEKMS.self, forKey: .ssekms) - ssekms = ssekmsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.InventoryEncryption() + value.sses3 = try reader["SSE-S3"].readIfPresent(readingClosure: S3ClientTypes.SSES3.readingClosure) + value.ssekms = try reader["SSE-KMS"].readIfPresent(readingClosure: S3ClientTypes.SSEKMS.readingClosure) + return value + } } } @@ -12546,20 +11334,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.InventoryFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `prefix` = "Prefix" - } +extension S3ClientTypes.InventoryFilter { static func writingClosure(_ value: S3ClientTypes.InventoryFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Prefix")].write(value.`prefix`) + try writer["Prefix"].write(value.`prefix`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.InventoryFilter() + value.`prefix` = try reader["Prefix"].readIfPresent() + return value + } } } @@ -12750,36 +11538,28 @@ extension S3ClientTypes { } } -extension S3ClientTypes.InventoryS3BucketDestination: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "AccountId" - case bucket = "Bucket" - case encryption = "Encryption" - case format = "Format" - case `prefix` = "Prefix" - } +extension S3ClientTypes.InventoryS3BucketDestination { static func writingClosure(_ value: S3ClientTypes.InventoryS3BucketDestination?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccountId")].write(value.accountId) - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("Encryption")].write(value.encryption, writingClosure: S3ClientTypes.InventoryEncryption.writingClosure(_:to:)) - try writer[.init("Format")].write(value.format) - try writer[.init("Prefix")].write(value.`prefix`) + try writer["AccountId"].write(value.accountId) + try writer["Bucket"].write(value.bucket) + try writer["Encryption"].write(value.encryption, writingClosure: S3ClientTypes.InventoryEncryption.writingClosure(_:to:)) + try writer["Format"].write(value.format) + try writer["Prefix"].write(value.`prefix`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let formatDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryFormat.self, forKey: .format) - format = formatDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let encryptionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryEncryption.self, forKey: .encryption) - encryption = encryptionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.InventoryS3BucketDestination() + value.accountId = try reader["AccountId"].readIfPresent() + value.bucket = try reader["Bucket"].readIfPresent() + value.format = try reader["Format"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.encryption = try reader["Encryption"].readIfPresent(readingClosure: S3ClientTypes.InventoryEncryption.readingClosure) + return value + } } } @@ -12817,20 +11597,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.InventorySchedule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case frequency = "Frequency" - } +extension S3ClientTypes.InventorySchedule { static func writingClosure(_ value: S3ClientTypes.InventorySchedule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Frequency")].write(value.frequency) + try writer["Frequency"].write(value.frequency) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let frequencyDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryFrequency.self, forKey: .frequency) - frequency = frequencyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.InventorySchedule() + value.frequency = try reader["Frequency"].readIfPresent() + return value + } } } @@ -12851,20 +11631,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.JSONInput: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case type = "Type" - } +extension S3ClientTypes.JSONInput { static func writingClosure(_ value: S3ClientTypes.JSONInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Type")].write(value.type) + try writer["Type"].write(value.type) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.JSONType.self, forKey: .type) - type = typeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.JSONInput() + value.type = try reader["Type"].readIfPresent() + return value + } } } @@ -12884,20 +11664,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.JSONOutput: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case recordDelimiter = "RecordDelimiter" - } +extension S3ClientTypes.JSONOutput { static func writingClosure(_ value: S3ClientTypes.JSONOutput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("RecordDelimiter")].write(value.recordDelimiter) + try writer["RecordDelimiter"].write(value.recordDelimiter) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let recordDelimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recordDelimiter) - recordDelimiter = recordDelimiterDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.JSONOutput() + value.recordDelimiter = try reader["RecordDelimiter"].readIfPresent() + return value + } } } @@ -12949,48 +11729,26 @@ extension S3ClientTypes { } } -extension S3ClientTypes.LambdaFunctionConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Event" - case filter = "Filter" - case id = "Id" - case lambdaFunctionArn = "CloudFunction" - } +extension S3ClientTypes.LambdaFunctionConfiguration { static func writingClosure(_ value: S3ClientTypes.LambdaFunctionConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Event")].writeList(value.events, memberWritingClosure: S3ClientTypes.Event.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.NotificationConfigurationFilter.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("CloudFunction")].write(value.lambdaFunctionArn) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let lambdaFunctionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .lambdaFunctionArn) - lambdaFunctionArn = lambdaFunctionArnDecoded - if containerValues.contains(.events) { - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .events) - if eventsWrappedContainer != nil { - let eventsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Event].self, forKey: .events) - var eventsBuffer:[S3ClientTypes.Event]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [S3ClientTypes.Event]() - for enumContainer0 in eventsContainer { - eventsBuffer?.append(enumContainer0) - } - } - events = eventsBuffer - } else { - events = [] - } - } else { - events = nil + try writer["Event"].writeList(value.events, memberWritingClosure: S3ClientTypes.Event.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.NotificationConfigurationFilter.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["CloudFunction"].write(value.lambdaFunctionArn) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.LambdaFunctionConfiguration() + value.id = try reader["Id"].readIfPresent() + value.lambdaFunctionArn = try reader["CloudFunction"].readIfPresent() + value.events = try reader["Event"].readListIfPresent(memberReadingClosure: S3ClientTypes.Event.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.NotificationConfigurationFilter.readingClosure) + return value } - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.NotificationConfigurationFilter.self, forKey: .filter) - filter = filterDecoded } } @@ -13024,28 +11782,24 @@ extension S3ClientTypes { } -extension S3ClientTypes.LifecycleExpiration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case date = "Date" - case days = "Days" - case expiredObjectDeleteMarker = "ExpiredObjectDeleteMarker" - } +extension S3ClientTypes.LifecycleExpiration { static func writingClosure(_ value: S3ClientTypes.LifecycleExpiration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Date")].writeTimestamp(value.date, format: .dateTime) - try writer[.init("Days")].write(value.days) - try writer[.init("ExpiredObjectDeleteMarker")].write(value.expiredObjectDeleteMarker) + try writer["Date"].writeTimestamp(value.date, format: .dateTime) + try writer["Days"].write(value.days) + try writer["ExpiredObjectDeleteMarker"].write(value.expiredObjectDeleteMarker) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded - let daysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .days) - days = daysDecoded - let expiredObjectDeleteMarkerDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .expiredObjectDeleteMarker) - expiredObjectDeleteMarker = expiredObjectDeleteMarkerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.LifecycleExpiration() + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + value.days = try reader["Days"].readIfPresent() + value.expiredObjectDeleteMarker = try reader["ExpiredObjectDeleteMarker"].readIfPresent() + return value + } } } @@ -13073,84 +11827,36 @@ extension S3ClientTypes { } -extension S3ClientTypes.LifecycleRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case abortIncompleteMultipartUpload = "AbortIncompleteMultipartUpload" - case expiration = "Expiration" - case filter = "Filter" - case id = "ID" - case noncurrentVersionExpiration = "NoncurrentVersionExpiration" - case noncurrentVersionTransitions = "NoncurrentVersionTransition" - case `prefix` = "Prefix" - case status = "Status" - case transitions = "Transition" - } +extension S3ClientTypes.LifecycleRule { static func writingClosure(_ value: S3ClientTypes.LifecycleRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AbortIncompleteMultipartUpload")].write(value.abortIncompleteMultipartUpload, writingClosure: S3ClientTypes.AbortIncompleteMultipartUpload.writingClosure(_:to:)) - try writer[.init("Expiration")].write(value.expiration, writingClosure: S3ClientTypes.LifecycleExpiration.writingClosure(_:to:)) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.LifecycleRuleFilter.writingClosure(_:to:)) - try writer[.init("ID")].write(value.id) - try writer[.init("NoncurrentVersionExpiration")].write(value.noncurrentVersionExpiration, writingClosure: S3ClientTypes.NoncurrentVersionExpiration.writingClosure(_:to:)) - try writer[.init("NoncurrentVersionTransition")].writeList(value.noncurrentVersionTransitions, memberWritingClosure: S3ClientTypes.NoncurrentVersionTransition.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Status")].write(value.status) - try writer[.init("Transition")].writeList(value.transitions, memberWritingClosure: S3ClientTypes.Transition.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let expirationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.LifecycleExpiration.self, forKey: .expiration) - expiration = expirationDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.LifecycleRuleFilter.self, forKey: .filter) - filter = filterDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ExpirationStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.transitions) { - let transitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .transitions) - if transitionsWrappedContainer != nil { - let transitionsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Transition].self, forKey: .transitions) - var transitionsBuffer:[S3ClientTypes.Transition]? = nil - if let transitionsContainer = transitionsContainer { - transitionsBuffer = [S3ClientTypes.Transition]() - for structureContainer0 in transitionsContainer { - transitionsBuffer?.append(structureContainer0) - } - } - transitions = transitionsBuffer - } else { - transitions = [] - } - } else { - transitions = nil - } - if containerValues.contains(.noncurrentVersionTransitions) { - let noncurrentVersionTransitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .noncurrentVersionTransitions) - if noncurrentVersionTransitionsWrappedContainer != nil { - let noncurrentVersionTransitionsContainer = try containerValues.decodeIfPresent([S3ClientTypes.NoncurrentVersionTransition].self, forKey: .noncurrentVersionTransitions) - var noncurrentVersionTransitionsBuffer:[S3ClientTypes.NoncurrentVersionTransition]? = nil - if let noncurrentVersionTransitionsContainer = noncurrentVersionTransitionsContainer { - noncurrentVersionTransitionsBuffer = [S3ClientTypes.NoncurrentVersionTransition]() - for structureContainer0 in noncurrentVersionTransitionsContainer { - noncurrentVersionTransitionsBuffer?.append(structureContainer0) - } - } - noncurrentVersionTransitions = noncurrentVersionTransitionsBuffer - } else { - noncurrentVersionTransitions = [] - } - } else { - noncurrentVersionTransitions = nil + try writer["AbortIncompleteMultipartUpload"].write(value.abortIncompleteMultipartUpload, writingClosure: S3ClientTypes.AbortIncompleteMultipartUpload.writingClosure(_:to:)) + try writer["Expiration"].write(value.expiration, writingClosure: S3ClientTypes.LifecycleExpiration.writingClosure(_:to:)) + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.LifecycleRuleFilter.writingClosure(_:to:)) + try writer["ID"].write(value.id) + try writer["NoncurrentVersionExpiration"].write(value.noncurrentVersionExpiration, writingClosure: S3ClientTypes.NoncurrentVersionExpiration.writingClosure(_:to:)) + try writer["NoncurrentVersionTransition"].writeList(value.noncurrentVersionTransitions, memberWritingClosure: S3ClientTypes.NoncurrentVersionTransition.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["Prefix"].write(value.`prefix`) + try writer["Status"].write(value.status) + try writer["Transition"].writeList(value.transitions, memberWritingClosure: S3ClientTypes.Transition.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.LifecycleRule() + value.expiration = try reader["Expiration"].readIfPresent(readingClosure: S3ClientTypes.LifecycleExpiration.readingClosure) + value.id = try reader["ID"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.LifecycleRuleFilter.readingClosure) + value.status = try reader["Status"].readIfPresent() + value.transitions = try reader["Transition"].readListIfPresent(memberReadingClosure: S3ClientTypes.Transition.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.noncurrentVersionTransitions = try reader["NoncurrentVersionTransition"].readListIfPresent(memberReadingClosure: S3ClientTypes.NoncurrentVersionTransition.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.noncurrentVersionExpiration = try reader["NoncurrentVersionExpiration"].readIfPresent(readingClosure: S3ClientTypes.NoncurrentVersionExpiration.readingClosure) + value.abortIncompleteMultipartUpload = try reader["AbortIncompleteMultipartUpload"].readIfPresent(readingClosure: S3ClientTypes.AbortIncompleteMultipartUpload.readingClosure) + return value } - let noncurrentVersionExpirationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.NoncurrentVersionExpiration.self, forKey: .noncurrentVersionExpiration) - noncurrentVersionExpiration = noncurrentVersionExpirationDecoded - let abortIncompleteMultipartUploadDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AbortIncompleteMultipartUpload.self, forKey: .abortIncompleteMultipartUpload) - abortIncompleteMultipartUpload = abortIncompleteMultipartUploadDecoded } } @@ -13204,48 +11910,26 @@ extension S3ClientTypes { } -extension S3ClientTypes.LifecycleRuleAndOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objectSizeGreaterThan = "ObjectSizeGreaterThan" - case objectSizeLessThan = "ObjectSizeLessThan" - case `prefix` = "Prefix" - case tags = "Tag" - } +extension S3ClientTypes.LifecycleRuleAndOperator { static func writingClosure(_ value: S3ClientTypes.LifecycleRuleAndOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ObjectSizeGreaterThan")].write(value.objectSizeGreaterThan) - try writer[.init("ObjectSizeLessThan")].write(value.objectSizeLessThan) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tag")].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - if containerValues.contains(.tags) { - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .tags) - if tagsWrappedContainer != nil { - let tagsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Tag].self, forKey: .tags) - var tagsBuffer:[S3ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + try writer["ObjectSizeGreaterThan"].write(value.objectSizeGreaterThan) + try writer["ObjectSizeLessThan"].write(value.objectSizeLessThan) + try writer["Prefix"].write(value.`prefix`) + try writer["Tag"].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.LifecycleRuleAndOperator() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tags = try reader["Tag"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: true) + value.objectSizeGreaterThan = try reader["ObjectSizeGreaterThan"].readIfPresent() + value.objectSizeLessThan = try reader["ObjectSizeLessThan"].readIfPresent() + return value } - let objectSizeGreaterThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSizeGreaterThan) - objectSizeGreaterThan = objectSizeGreaterThanDecoded - let objectSizeLessThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSizeLessThan) - objectSizeLessThan = objectSizeLessThanDecoded } } @@ -13277,55 +11961,44 @@ extension S3ClientTypes { } -extension S3ClientTypes.LifecycleRuleFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case and = "And" - case objectsizegreaterthan = "ObjectSizeGreaterThan" - case objectsizelessthan = "ObjectSizeLessThan" - case `prefix` = "Prefix" - case tag = "Tag" - case sdkUnknown - } +extension S3ClientTypes.LifecycleRuleFilter { static func writingClosure(_ value: S3ClientTypes.LifecycleRuleFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } switch value { case let .and(and): - try writer[.init("And")].write(and, writingClosure: S3ClientTypes.LifecycleRuleAndOperator.writingClosure(_:to:)) + try writer["And"].write(and, writingClosure: S3ClientTypes.LifecycleRuleAndOperator.writingClosure(_:to:)) case let .objectsizegreaterthan(objectsizegreaterthan): - try writer[.init("ObjectSizeGreaterThan")].write(objectsizegreaterthan) + try writer["ObjectSizeGreaterThan"].write(objectsizegreaterthan) case let .objectsizelessthan(objectsizelessthan): - try writer[.init("ObjectSizeLessThan")].write(objectsizelessthan) + try writer["ObjectSizeLessThan"].write(objectsizelessthan) case let .`prefix`(`prefix`): - try writer[.init("Prefix")].write(`prefix`) + try writer["Prefix"].write(`prefix`) case let .tag(tag): - try writer[.init("Tag")].write(tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) + try writer["Tag"].write(tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) case let .sdkUnknown(sdkUnknown): try writer[.init("sdkUnknown")].write(sdkUnknown) } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let key = containerValues.allKeys.first - switch key { - case .`prefix`: - let prefixDecoded = try containerValues.decode(Swift.String.self, forKey: .prefix) - self = .prefix(prefixDecoded) - case .tag: - let tagDecoded = try containerValues.decode(S3ClientTypes.Tag.self, forKey: .tag) - self = .tag(tagDecoded) - case .objectsizegreaterthan: - let objectsizegreaterthanDecoded = try containerValues.decode(Swift.Int.self, forKey: .objectsizegreaterthan) - self = .objectsizegreaterthan(objectsizegreaterthanDecoded) - case .objectsizelessthan: - let objectsizelessthanDecoded = try containerValues.decode(Swift.Int.self, forKey: .objectsizelessthan) - self = .objectsizelessthan(objectsizelessthanDecoded) - case .and: - let andDecoded = try containerValues.decode(S3ClientTypes.LifecycleRuleAndOperator.self, forKey: .and) - self = .and(andDecoded) - default: - self = .sdkUnknown("") + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + let name = reader.children.first?.nodeInfo.name + switch name { + case "Prefix": + return .`prefix`(try reader["Prefix"].read()) + case "Tag": + return .tag(try reader["Tag"].read(readingClosure: S3ClientTypes.Tag.readingClosure)) + case "ObjectSizeGreaterThan": + return .objectsizegreaterthan(try reader["ObjectSizeGreaterThan"].read()) + case "ObjectSizeLessThan": + return .objectsizelessthan(try reader["ObjectSizeLessThan"].read()) + case "And": + return .and(try reader["And"].read(readingClosure: S3ClientTypes.LifecycleRuleAndOperator.readingClosure)) + default: + return .sdkUnknown(name ?? "") + } } } } @@ -13401,20 +12074,18 @@ public struct ListBucketAnalyticsConfigurationsInput: Swift.Equatable { } } -extension ListBucketAnalyticsConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListBucketAnalyticsConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.analyticsConfigurationList = output.analyticsConfigurationList - self.continuationToken = output.continuationToken - self.isTruncated = output.isTruncated - self.nextContinuationToken = output.nextContinuationToken - } else { - self.analyticsConfigurationList = nil - self.continuationToken = nil - self.isTruncated = nil - self.nextContinuationToken = nil +extension ListBucketAnalyticsConfigurationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListBucketAnalyticsConfigurationsOutput() + value.analyticsConfigurationList = try reader["AnalyticsConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.AnalyticsConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.continuationToken = try reader["ContinuationToken"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.nextContinuationToken = try reader["NextContinuationToken"].readIfPresent() + return value } } } @@ -13443,55 +12114,15 @@ public struct ListBucketAnalyticsConfigurationsOutput: Swift.Equatable { } } -struct ListBucketAnalyticsConfigurationsOutputBody: Swift.Equatable { - let isTruncated: Swift.Bool? - let continuationToken: Swift.String? - let nextContinuationToken: Swift.String? - let analyticsConfigurationList: [S3ClientTypes.AnalyticsConfiguration]? -} - -extension ListBucketAnalyticsConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analyticsConfigurationList = "AnalyticsConfiguration" - case continuationToken = "ContinuationToken" - case isTruncated = "IsTruncated" - case nextContinuationToken = "NextContinuationToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let continuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continuationToken) - continuationToken = continuationTokenDecoded - let nextContinuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextContinuationToken) - nextContinuationToken = nextContinuationTokenDecoded - if containerValues.contains(.analyticsConfigurationList) { - let analyticsConfigurationListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .analyticsConfigurationList) - if analyticsConfigurationListWrappedContainer != nil { - let analyticsConfigurationListContainer = try containerValues.decodeIfPresent([S3ClientTypes.AnalyticsConfiguration].self, forKey: .analyticsConfigurationList) - var analyticsConfigurationListBuffer:[S3ClientTypes.AnalyticsConfiguration]? = nil - if let analyticsConfigurationListContainer = analyticsConfigurationListContainer { - analyticsConfigurationListBuffer = [S3ClientTypes.AnalyticsConfiguration]() - for structureContainer0 in analyticsConfigurationListContainer { - analyticsConfigurationListBuffer?.append(structureContainer0) - } - } - analyticsConfigurationList = analyticsConfigurationListBuffer - } else { - analyticsConfigurationList = [] - } - } else { - analyticsConfigurationList = nil - } - } -} +enum ListBucketAnalyticsConfigurationsOutputError { -enum ListBucketAnalyticsConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -13534,20 +12165,18 @@ public struct ListBucketIntelligentTieringConfigurationsInput: Swift.Equatable { } } -extension ListBucketIntelligentTieringConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListBucketIntelligentTieringConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.continuationToken = output.continuationToken - self.intelligentTieringConfigurationList = output.intelligentTieringConfigurationList - self.isTruncated = output.isTruncated - self.nextContinuationToken = output.nextContinuationToken - } else { - self.continuationToken = nil - self.intelligentTieringConfigurationList = nil - self.isTruncated = nil - self.nextContinuationToken = nil +extension ListBucketIntelligentTieringConfigurationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListBucketIntelligentTieringConfigurationsOutput() + value.continuationToken = try reader["ContinuationToken"].readIfPresent() + value.intelligentTieringConfigurationList = try reader["IntelligentTieringConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.IntelligentTieringConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.nextContinuationToken = try reader["NextContinuationToken"].readIfPresent() + return value } } } @@ -13576,55 +12205,15 @@ public struct ListBucketIntelligentTieringConfigurationsOutput: Swift.Equatable } } -struct ListBucketIntelligentTieringConfigurationsOutputBody: Swift.Equatable { - let isTruncated: Swift.Bool? - let continuationToken: Swift.String? - let nextContinuationToken: Swift.String? - let intelligentTieringConfigurationList: [S3ClientTypes.IntelligentTieringConfiguration]? -} - -extension ListBucketIntelligentTieringConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuationToken = "ContinuationToken" - case intelligentTieringConfigurationList = "IntelligentTieringConfiguration" - case isTruncated = "IsTruncated" - case nextContinuationToken = "NextContinuationToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let continuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continuationToken) - continuationToken = continuationTokenDecoded - let nextContinuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextContinuationToken) - nextContinuationToken = nextContinuationTokenDecoded - if containerValues.contains(.intelligentTieringConfigurationList) { - let intelligentTieringConfigurationListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .intelligentTieringConfigurationList) - if intelligentTieringConfigurationListWrappedContainer != nil { - let intelligentTieringConfigurationListContainer = try containerValues.decodeIfPresent([S3ClientTypes.IntelligentTieringConfiguration].self, forKey: .intelligentTieringConfigurationList) - var intelligentTieringConfigurationListBuffer:[S3ClientTypes.IntelligentTieringConfiguration]? = nil - if let intelligentTieringConfigurationListContainer = intelligentTieringConfigurationListContainer { - intelligentTieringConfigurationListBuffer = [S3ClientTypes.IntelligentTieringConfiguration]() - for structureContainer0 in intelligentTieringConfigurationListContainer { - intelligentTieringConfigurationListBuffer?.append(structureContainer0) - } - } - intelligentTieringConfigurationList = intelligentTieringConfigurationListBuffer - } else { - intelligentTieringConfigurationList = [] - } - } else { - intelligentTieringConfigurationList = nil - } - } -} +enum ListBucketIntelligentTieringConfigurationsOutputError { -enum ListBucketIntelligentTieringConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -13682,20 +12271,18 @@ public struct ListBucketInventoryConfigurationsInput: Swift.Equatable { } } -extension ListBucketInventoryConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListBucketInventoryConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.continuationToken = output.continuationToken - self.inventoryConfigurationList = output.inventoryConfigurationList - self.isTruncated = output.isTruncated - self.nextContinuationToken = output.nextContinuationToken - } else { - self.continuationToken = nil - self.inventoryConfigurationList = nil - self.isTruncated = nil - self.nextContinuationToken = nil +extension ListBucketInventoryConfigurationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListBucketInventoryConfigurationsOutput() + value.continuationToken = try reader["ContinuationToken"].readIfPresent() + value.inventoryConfigurationList = try reader["InventoryConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.InventoryConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.nextContinuationToken = try reader["NextContinuationToken"].readIfPresent() + return value } } } @@ -13724,55 +12311,15 @@ public struct ListBucketInventoryConfigurationsOutput: Swift.Equatable { } } -struct ListBucketInventoryConfigurationsOutputBody: Swift.Equatable { - let continuationToken: Swift.String? - let inventoryConfigurationList: [S3ClientTypes.InventoryConfiguration]? - let isTruncated: Swift.Bool? - let nextContinuationToken: Swift.String? -} - -extension ListBucketInventoryConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuationToken = "ContinuationToken" - case inventoryConfigurationList = "InventoryConfiguration" - case isTruncated = "IsTruncated" - case nextContinuationToken = "NextContinuationToken" - } +enum ListBucketInventoryConfigurationsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let continuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continuationToken) - continuationToken = continuationTokenDecoded - if containerValues.contains(.inventoryConfigurationList) { - let inventoryConfigurationListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .inventoryConfigurationList) - if inventoryConfigurationListWrappedContainer != nil { - let inventoryConfigurationListContainer = try containerValues.decodeIfPresent([S3ClientTypes.InventoryConfiguration].self, forKey: .inventoryConfigurationList) - var inventoryConfigurationListBuffer:[S3ClientTypes.InventoryConfiguration]? = nil - if let inventoryConfigurationListContainer = inventoryConfigurationListContainer { - inventoryConfigurationListBuffer = [S3ClientTypes.InventoryConfiguration]() - for structureContainer0 in inventoryConfigurationListContainer { - inventoryConfigurationListBuffer?.append(structureContainer0) - } - } - inventoryConfigurationList = inventoryConfigurationListBuffer - } else { - inventoryConfigurationList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - inventoryConfigurationList = nil - } - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let nextContinuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextContinuationToken) - nextContinuationToken = nextContinuationTokenDecoded - } -} - -enum ListBucketInventoryConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -13830,20 +12377,18 @@ public struct ListBucketMetricsConfigurationsInput: Swift.Equatable { } } -extension ListBucketMetricsConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListBucketMetricsConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.continuationToken = output.continuationToken - self.isTruncated = output.isTruncated - self.metricsConfigurationList = output.metricsConfigurationList - self.nextContinuationToken = output.nextContinuationToken - } else { - self.continuationToken = nil - self.isTruncated = nil - self.metricsConfigurationList = nil - self.nextContinuationToken = nil +extension ListBucketMetricsConfigurationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListBucketMetricsConfigurationsOutput() + value.continuationToken = try reader["ContinuationToken"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.metricsConfigurationList = try reader["MetricsConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.MetricsConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.nextContinuationToken = try reader["NextContinuationToken"].readIfPresent() + return value } } } @@ -13872,55 +12417,15 @@ public struct ListBucketMetricsConfigurationsOutput: Swift.Equatable { } } -struct ListBucketMetricsConfigurationsOutputBody: Swift.Equatable { - let isTruncated: Swift.Bool? - let continuationToken: Swift.String? - let nextContinuationToken: Swift.String? - let metricsConfigurationList: [S3ClientTypes.MetricsConfiguration]? -} - -extension ListBucketMetricsConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case continuationToken = "ContinuationToken" - case isTruncated = "IsTruncated" - case metricsConfigurationList = "MetricsConfiguration" - case nextContinuationToken = "NextContinuationToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let continuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continuationToken) - continuationToken = continuationTokenDecoded - let nextContinuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextContinuationToken) - nextContinuationToken = nextContinuationTokenDecoded - if containerValues.contains(.metricsConfigurationList) { - let metricsConfigurationListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .metricsConfigurationList) - if metricsConfigurationListWrappedContainer != nil { - let metricsConfigurationListContainer = try containerValues.decodeIfPresent([S3ClientTypes.MetricsConfiguration].self, forKey: .metricsConfigurationList) - var metricsConfigurationListBuffer:[S3ClientTypes.MetricsConfiguration]? = nil - if let metricsConfigurationListContainer = metricsConfigurationListContainer { - metricsConfigurationListBuffer = [S3ClientTypes.MetricsConfiguration]() - for structureContainer0 in metricsConfigurationListContainer { - metricsConfigurationListBuffer?.append(structureContainer0) - } - } - metricsConfigurationList = metricsConfigurationListBuffer - } else { - metricsConfigurationList = [] - } - } else { - metricsConfigurationList = nil - } - } -} +enum ListBucketMetricsConfigurationsOutputError { -enum ListBucketMetricsConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -13946,16 +12451,16 @@ public struct ListBucketsInput: Swift.Equatable { public init() { } } -extension ListBucketsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListBucketsOutputBody = try responseDecoder.decode(responseBody: data) - self.buckets = output.buckets - self.owner = output.owner - } else { - self.buckets = nil - self.owner = nil +extension ListBucketsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListBucketsOutput() + value.buckets = try reader["Buckets"].readListIfPresent(memberReadingClosure: S3ClientTypes.Bucket.readingClosure, memberNodeInfo: "Bucket", isFlattened: false) + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + return value } } } @@ -13976,48 +12481,15 @@ public struct ListBucketsOutput: Swift.Equatable { } } -struct ListBucketsOutputBody: Swift.Equatable { - let buckets: [S3ClientTypes.Bucket]? - let owner: S3ClientTypes.Owner? -} - -extension ListBucketsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case buckets = "Buckets" - case owner = "Owner" - } +enum ListBucketsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.buckets) { - struct KeyVal0{struct Bucket{}} - let bucketsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .buckets) - if let bucketsWrappedContainer = bucketsWrappedContainer { - let bucketsContainer = try bucketsWrappedContainer.decodeIfPresent([S3ClientTypes.Bucket].self, forKey: .member) - var bucketsBuffer:[S3ClientTypes.Bucket]? = nil - if let bucketsContainer = bucketsContainer { - bucketsBuffer = [S3ClientTypes.Bucket]() - for structureContainer0 in bucketsContainer { - bucketsBuffer?.append(structureContainer0) - } - } - buckets = bucketsBuffer - } else { - buckets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - buckets = nil - } - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded - } -} - -enum ListBucketsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -14062,16 +12534,16 @@ public struct ListDirectoryBucketsInput: Swift.Equatable { } } -extension ListDirectoryBucketsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListDirectoryBucketsOutputBody = try responseDecoder.decode(responseBody: data) - self.buckets = output.buckets - self.continuationToken = output.continuationToken - } else { - self.buckets = nil - self.continuationToken = nil +extension ListDirectoryBucketsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListDirectoryBucketsOutput() + value.buckets = try reader["Buckets"].readListIfPresent(memberReadingClosure: S3ClientTypes.Bucket.readingClosure, memberNodeInfo: "Bucket", isFlattened: false) + value.continuationToken = try reader["ContinuationToken"].readIfPresent() + return value } } } @@ -14092,48 +12564,15 @@ public struct ListDirectoryBucketsOutput: Swift.Equatable { } } -struct ListDirectoryBucketsOutputBody: Swift.Equatable { - let buckets: [S3ClientTypes.Bucket]? - let continuationToken: Swift.String? -} - -extension ListDirectoryBucketsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case buckets = "Buckets" - case continuationToken = "ContinuationToken" - } +enum ListDirectoryBucketsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.buckets) { - struct KeyVal0{struct Bucket{}} - let bucketsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .buckets) - if let bucketsWrappedContainer = bucketsWrappedContainer { - let bucketsContainer = try bucketsWrappedContainer.decodeIfPresent([S3ClientTypes.Bucket].self, forKey: .member) - var bucketsBuffer:[S3ClientTypes.Bucket]? = nil - if let bucketsContainer = bucketsContainer { - bucketsBuffer = [S3ClientTypes.Bucket]() - for structureContainer0 in bucketsContainer { - bucketsBuffer?.append(structureContainer0) - } - } - buckets = bucketsBuffer - } else { - buckets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) } - } else { - buckets = nil - } - let continuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continuationToken) - continuationToken = continuationTokenDecoded - } -} - -enum ListDirectoryBucketsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) } } } @@ -14241,41 +12680,29 @@ public struct ListMultipartUploadsInput: Swift.Equatable { } } -extension ListMultipartUploadsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListMultipartUploadsOutputBody = try responseDecoder.decode(responseBody: data) - self.`prefix` = output.`prefix` - self.bucket = output.bucket - self.commonPrefixes = output.commonPrefixes - self.delimiter = output.delimiter - self.encodingType = output.encodingType - self.isTruncated = output.isTruncated - self.keyMarker = output.keyMarker - self.maxUploads = output.maxUploads - self.nextKeyMarker = output.nextKeyMarker - self.nextUploadIdMarker = output.nextUploadIdMarker - self.uploadIdMarker = output.uploadIdMarker - self.uploads = output.uploads - } else { - self.bucket = nil - self.commonPrefixes = nil - self.delimiter = nil - self.encodingType = nil - self.isTruncated = nil - self.keyMarker = nil - self.maxUploads = nil - self.nextKeyMarker = nil - self.nextUploadIdMarker = nil - self.`prefix` = nil - self.uploadIdMarker = nil - self.uploads = nil +extension ListMultipartUploadsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListMultipartUploadsOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + value.bucket = try reader["Bucket"].readIfPresent() + value.commonPrefixes = try reader["CommonPrefixes"].readListIfPresent(memberReadingClosure: S3ClientTypes.CommonPrefix.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.delimiter = try reader["Delimiter"].readIfPresent() + value.encodingType = try reader["EncodingType"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.keyMarker = try reader["KeyMarker"].readIfPresent() + value.maxUploads = try reader["MaxUploads"].readIfPresent() + value.nextKeyMarker = try reader["NextKeyMarker"].readIfPresent() + value.nextUploadIdMarker = try reader["NextUploadIdMarker"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.uploadIdMarker = try reader["UploadIdMarker"].readIfPresent() + value.uploads = try reader["Upload"].readListIfPresent(memberReadingClosure: S3ClientTypes.MultipartUpload.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -14340,103 +12767,15 @@ public struct ListMultipartUploadsOutput: Swift.Equatable { } } -struct ListMultipartUploadsOutputBody: Swift.Equatable { - let bucket: Swift.String? - let keyMarker: Swift.String? - let uploadIdMarker: Swift.String? - let nextKeyMarker: Swift.String? - let `prefix`: Swift.String? - let delimiter: Swift.String? - let nextUploadIdMarker: Swift.String? - let maxUploads: Swift.Int? - let isTruncated: Swift.Bool? - let uploads: [S3ClientTypes.MultipartUpload]? - let commonPrefixes: [S3ClientTypes.CommonPrefix]? - let encodingType: S3ClientTypes.EncodingType? -} - -extension ListMultipartUploadsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case commonPrefixes = "CommonPrefixes" - case delimiter = "Delimiter" - case encodingType = "EncodingType" - case isTruncated = "IsTruncated" - case keyMarker = "KeyMarker" - case maxUploads = "MaxUploads" - case nextKeyMarker = "NextKeyMarker" - case nextUploadIdMarker = "NextUploadIdMarker" - case `prefix` = "Prefix" - case uploadIdMarker = "UploadIdMarker" - case uploads = "Upload" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let keyMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyMarker) - keyMarker = keyMarkerDecoded - let uploadIdMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uploadIdMarker) - uploadIdMarker = uploadIdMarkerDecoded - let nextKeyMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextKeyMarker) - nextKeyMarker = nextKeyMarkerDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let delimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .delimiter) - delimiter = delimiterDecoded - let nextUploadIdMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextUploadIdMarker) - nextUploadIdMarker = nextUploadIdMarkerDecoded - let maxUploadsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxUploads) - maxUploads = maxUploadsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - if containerValues.contains(.uploads) { - let uploadsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .uploads) - if uploadsWrappedContainer != nil { - let uploadsContainer = try containerValues.decodeIfPresent([S3ClientTypes.MultipartUpload].self, forKey: .uploads) - var uploadsBuffer:[S3ClientTypes.MultipartUpload]? = nil - if let uploadsContainer = uploadsContainer { - uploadsBuffer = [S3ClientTypes.MultipartUpload]() - for structureContainer0 in uploadsContainer { - uploadsBuffer?.append(structureContainer0) - } - } - uploads = uploadsBuffer - } else { - uploads = [] - } - } else { - uploads = nil - } - if containerValues.contains(.commonPrefixes) { - let commonPrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .commonPrefixes) - if commonPrefixesWrappedContainer != nil { - let commonPrefixesContainer = try containerValues.decodeIfPresent([S3ClientTypes.CommonPrefix].self, forKey: .commonPrefixes) - var commonPrefixesBuffer:[S3ClientTypes.CommonPrefix]? = nil - if let commonPrefixesContainer = commonPrefixesContainer { - commonPrefixesBuffer = [S3ClientTypes.CommonPrefix]() - for structureContainer0 in commonPrefixesContainer { - commonPrefixesBuffer?.append(structureContainer0) - } - } - commonPrefixes = commonPrefixesBuffer - } else { - commonPrefixes = [] - } - } else { - commonPrefixes = nil - } - let encodingTypeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.EncodingType.self, forKey: .encodingType) - encodingType = encodingTypeDecoded - } -} +enum ListMultipartUploadsOutputError { -enum ListMultipartUploadsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -14549,43 +12888,30 @@ public struct ListObjectVersionsInput: Swift.Equatable { } } -extension ListObjectVersionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListObjectVersionsOutputBody = try responseDecoder.decode(responseBody: data) - self.`prefix` = output.`prefix` - self.commonPrefixes = output.commonPrefixes - self.deleteMarkers = output.deleteMarkers - self.delimiter = output.delimiter - self.encodingType = output.encodingType - self.isTruncated = output.isTruncated - self.keyMarker = output.keyMarker - self.maxKeys = output.maxKeys - self.name = output.name - self.nextKeyMarker = output.nextKeyMarker - self.nextVersionIdMarker = output.nextVersionIdMarker - self.versionIdMarker = output.versionIdMarker - self.versions = output.versions - } else { - self.commonPrefixes = nil - self.deleteMarkers = nil - self.delimiter = nil - self.encodingType = nil - self.isTruncated = nil - self.keyMarker = nil - self.maxKeys = nil - self.name = nil - self.nextKeyMarker = nil - self.nextVersionIdMarker = nil - self.`prefix` = nil - self.versionIdMarker = nil - self.versions = nil +extension ListObjectVersionsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListObjectVersionsOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + value.commonPrefixes = try reader["CommonPrefixes"].readListIfPresent(memberReadingClosure: S3ClientTypes.CommonPrefix.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.deleteMarkers = try reader["DeleteMarker"].readListIfPresent(memberReadingClosure: S3ClientTypes.DeleteMarkerEntry.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.delimiter = try reader["Delimiter"].readIfPresent() + value.encodingType = try reader["EncodingType"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.keyMarker = try reader["KeyMarker"].readIfPresent() + value.maxKeys = try reader["MaxKeys"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.nextKeyMarker = try reader["NextKeyMarker"].readIfPresent() + value.nextVersionIdMarker = try reader["NextVersionIdMarker"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.versionIdMarker = try reader["VersionIdMarker"].readIfPresent() + value.versions = try reader["Version"].readListIfPresent(memberReadingClosure: S3ClientTypes.ObjectVersion.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -14654,123 +12980,15 @@ public struct ListObjectVersionsOutput: Swift.Equatable { } } -struct ListObjectVersionsOutputBody: Swift.Equatable { - let isTruncated: Swift.Bool? - let keyMarker: Swift.String? - let versionIdMarker: Swift.String? - let nextKeyMarker: Swift.String? - let nextVersionIdMarker: Swift.String? - let versions: [S3ClientTypes.ObjectVersion]? - let deleteMarkers: [S3ClientTypes.DeleteMarkerEntry]? - let name: Swift.String? - let `prefix`: Swift.String? - let delimiter: Swift.String? - let maxKeys: Swift.Int? - let commonPrefixes: [S3ClientTypes.CommonPrefix]? - let encodingType: S3ClientTypes.EncodingType? -} - -extension ListObjectVersionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case commonPrefixes = "CommonPrefixes" - case deleteMarkers = "DeleteMarker" - case delimiter = "Delimiter" - case encodingType = "EncodingType" - case isTruncated = "IsTruncated" - case keyMarker = "KeyMarker" - case maxKeys = "MaxKeys" - case name = "Name" - case nextKeyMarker = "NextKeyMarker" - case nextVersionIdMarker = "NextVersionIdMarker" - case `prefix` = "Prefix" - case versionIdMarker = "VersionIdMarker" - case versions = "Version" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let keyMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyMarker) - keyMarker = keyMarkerDecoded - let versionIdMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionIdMarker) - versionIdMarker = versionIdMarkerDecoded - let nextKeyMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextKeyMarker) - nextKeyMarker = nextKeyMarkerDecoded - let nextVersionIdMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextVersionIdMarker) - nextVersionIdMarker = nextVersionIdMarkerDecoded - if containerValues.contains(.versions) { - let versionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .versions) - if versionsWrappedContainer != nil { - let versionsContainer = try containerValues.decodeIfPresent([S3ClientTypes.ObjectVersion].self, forKey: .versions) - var versionsBuffer:[S3ClientTypes.ObjectVersion]? = nil - if let versionsContainer = versionsContainer { - versionsBuffer = [S3ClientTypes.ObjectVersion]() - for structureContainer0 in versionsContainer { - versionsBuffer?.append(structureContainer0) - } - } - versions = versionsBuffer - } else { - versions = [] - } - } else { - versions = nil - } - if containerValues.contains(.deleteMarkers) { - let deleteMarkersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .deleteMarkers) - if deleteMarkersWrappedContainer != nil { - let deleteMarkersContainer = try containerValues.decodeIfPresent([S3ClientTypes.DeleteMarkerEntry].self, forKey: .deleteMarkers) - var deleteMarkersBuffer:[S3ClientTypes.DeleteMarkerEntry]? = nil - if let deleteMarkersContainer = deleteMarkersContainer { - deleteMarkersBuffer = [S3ClientTypes.DeleteMarkerEntry]() - for structureContainer0 in deleteMarkersContainer { - deleteMarkersBuffer?.append(structureContainer0) - } - } - deleteMarkers = deleteMarkersBuffer - } else { - deleteMarkers = [] - } - } else { - deleteMarkers = nil - } - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let delimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .delimiter) - delimiter = delimiterDecoded - let maxKeysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxKeys) - maxKeys = maxKeysDecoded - if containerValues.contains(.commonPrefixes) { - let commonPrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .commonPrefixes) - if commonPrefixesWrappedContainer != nil { - let commonPrefixesContainer = try containerValues.decodeIfPresent([S3ClientTypes.CommonPrefix].self, forKey: .commonPrefixes) - var commonPrefixesBuffer:[S3ClientTypes.CommonPrefix]? = nil - if let commonPrefixesContainer = commonPrefixesContainer { - commonPrefixesBuffer = [S3ClientTypes.CommonPrefix]() - for structureContainer0 in commonPrefixesContainer { - commonPrefixesBuffer?.append(structureContainer0) - } - } - commonPrefixes = commonPrefixesBuffer - } else { - commonPrefixes = [] - } - } else { - commonPrefixes = nil - } - let encodingTypeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.EncodingType.self, forKey: .encodingType) - encodingType = encodingTypeDecoded - } -} +enum ListObjectVersionsOutputError { -enum ListObjectVersionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -14874,37 +13092,27 @@ public struct ListObjectsInput: Swift.Equatable { } } -extension ListObjectsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListObjectsOutputBody = try responseDecoder.decode(responseBody: data) - self.`prefix` = output.`prefix` - self.commonPrefixes = output.commonPrefixes - self.contents = output.contents - self.delimiter = output.delimiter - self.encodingType = output.encodingType - self.isTruncated = output.isTruncated - self.marker = output.marker - self.maxKeys = output.maxKeys - self.name = output.name - self.nextMarker = output.nextMarker - } else { - self.commonPrefixes = nil - self.contents = nil - self.delimiter = nil - self.encodingType = nil - self.isTruncated = nil - self.marker = nil - self.maxKeys = nil - self.name = nil - self.nextMarker = nil - self.`prefix` = nil +extension ListObjectsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListObjectsOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + value.commonPrefixes = try reader["CommonPrefixes"].readListIfPresent(memberReadingClosure: S3ClientTypes.CommonPrefix.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.contents = try reader["Contents"].readListIfPresent(memberReadingClosure: S3ClientTypes.Object.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.delimiter = try reader["Delimiter"].readIfPresent() + value.encodingType = try reader["EncodingType"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.marker = try reader["Marker"].readIfPresent() + value.maxKeys = try reader["MaxKeys"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.nextMarker = try reader["NextMarker"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + return value } } } @@ -14961,96 +13169,17 @@ public struct ListObjectsOutput: Swift.Equatable { } } -struct ListObjectsOutputBody: Swift.Equatable { - let isTruncated: Swift.Bool? - let marker: Swift.String? - let nextMarker: Swift.String? - let contents: [S3ClientTypes.Object]? - let name: Swift.String? - let `prefix`: Swift.String? - let delimiter: Swift.String? - let maxKeys: Swift.Int? - let commonPrefixes: [S3ClientTypes.CommonPrefix]? - let encodingType: S3ClientTypes.EncodingType? -} - -extension ListObjectsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case commonPrefixes = "CommonPrefixes" - case contents = "Contents" - case delimiter = "Delimiter" - case encodingType = "EncodingType" - case isTruncated = "IsTruncated" - case marker = "Marker" - case maxKeys = "MaxKeys" - case name = "Name" - case nextMarker = "NextMarker" - case `prefix` = "Prefix" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - let markerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .marker) - marker = markerDecoded - let nextMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextMarker) - nextMarker = nextMarkerDecoded - if containerValues.contains(.contents) { - let contentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .contents) - if contentsWrappedContainer != nil { - let contentsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Object].self, forKey: .contents) - var contentsBuffer:[S3ClientTypes.Object]? = nil - if let contentsContainer = contentsContainer { - contentsBuffer = [S3ClientTypes.Object]() - for structureContainer0 in contentsContainer { - contentsBuffer?.append(structureContainer0) - } - } - contents = contentsBuffer - } else { - contents = [] - } - } else { - contents = nil - } - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let delimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .delimiter) - delimiter = delimiterDecoded - let maxKeysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxKeys) - maxKeys = maxKeysDecoded - if containerValues.contains(.commonPrefixes) { - let commonPrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .commonPrefixes) - if commonPrefixesWrappedContainer != nil { - let commonPrefixesContainer = try containerValues.decodeIfPresent([S3ClientTypes.CommonPrefix].self, forKey: .commonPrefixes) - var commonPrefixesBuffer:[S3ClientTypes.CommonPrefix]? = nil - if let commonPrefixesContainer = commonPrefixesContainer { - commonPrefixesBuffer = [S3ClientTypes.CommonPrefix]() - for structureContainer0 in commonPrefixesContainer { - commonPrefixesBuffer?.append(structureContainer0) - } - } - commonPrefixes = commonPrefixesBuffer - } else { - commonPrefixes = [] - } - } else { - commonPrefixes = nil - } - let encodingTypeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.EncodingType.self, forKey: .encodingType) - encodingType = encodingTypeDecoded - } -} +enum ListObjectsOutputError { -enum ListObjectsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NoSuchBucket": return try await NoSuchBucket(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NoSuchBucket": return try await NoSuchBucket.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -15175,41 +13304,29 @@ public struct ListObjectsV2Input: Swift.Equatable { } } -extension ListObjectsV2Output: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListObjectsV2OutputBody = try responseDecoder.decode(responseBody: data) - self.`prefix` = output.`prefix` - self.commonPrefixes = output.commonPrefixes - self.contents = output.contents - self.continuationToken = output.continuationToken - self.delimiter = output.delimiter - self.encodingType = output.encodingType - self.isTruncated = output.isTruncated - self.keyCount = output.keyCount - self.maxKeys = output.maxKeys - self.name = output.name - self.nextContinuationToken = output.nextContinuationToken - self.startAfter = output.startAfter - } else { - self.commonPrefixes = nil - self.contents = nil - self.continuationToken = nil - self.delimiter = nil - self.encodingType = nil - self.isTruncated = nil - self.keyCount = nil - self.maxKeys = nil - self.name = nil - self.nextContinuationToken = nil - self.`prefix` = nil - self.startAfter = nil +extension ListObjectsV2Output { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListObjectsV2Output() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + value.commonPrefixes = try reader["CommonPrefixes"].readListIfPresent(memberReadingClosure: S3ClientTypes.CommonPrefix.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.contents = try reader["Contents"].readListIfPresent(memberReadingClosure: S3ClientTypes.Object.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.continuationToken = try reader["ContinuationToken"].readIfPresent() + value.delimiter = try reader["Delimiter"].readIfPresent() + value.encodingType = try reader["EncodingType"].readIfPresent() + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.keyCount = try reader["KeyCount"].readIfPresent() + value.maxKeys = try reader["MaxKeys"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + value.nextContinuationToken = try reader["NextContinuationToken"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.startAfter = try reader["StartAfter"].readIfPresent() + return value } } } @@ -15278,104 +13395,17 @@ public struct ListObjectsV2Output: Swift.Equatable { } } -struct ListObjectsV2OutputBody: Swift.Equatable { - let isTruncated: Swift.Bool? - let contents: [S3ClientTypes.Object]? - let name: Swift.String? - let `prefix`: Swift.String? - let delimiter: Swift.String? - let maxKeys: Swift.Int? - let commonPrefixes: [S3ClientTypes.CommonPrefix]? - let encodingType: S3ClientTypes.EncodingType? - let keyCount: Swift.Int? - let continuationToken: Swift.String? - let nextContinuationToken: Swift.String? - let startAfter: Swift.String? -} - -extension ListObjectsV2OutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case commonPrefixes = "CommonPrefixes" - case contents = "Contents" - case continuationToken = "ContinuationToken" - case delimiter = "Delimiter" - case encodingType = "EncodingType" - case isTruncated = "IsTruncated" - case keyCount = "KeyCount" - case maxKeys = "MaxKeys" - case name = "Name" - case nextContinuationToken = "NextContinuationToken" - case `prefix` = "Prefix" - case startAfter = "StartAfter" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - if containerValues.contains(.contents) { - let contentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .contents) - if contentsWrappedContainer != nil { - let contentsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Object].self, forKey: .contents) - var contentsBuffer:[S3ClientTypes.Object]? = nil - if let contentsContainer = contentsContainer { - contentsBuffer = [S3ClientTypes.Object]() - for structureContainer0 in contentsContainer { - contentsBuffer?.append(structureContainer0) - } - } - contents = contentsBuffer - } else { - contents = [] - } - } else { - contents = nil - } - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let delimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .delimiter) - delimiter = delimiterDecoded - let maxKeysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxKeys) - maxKeys = maxKeysDecoded - if containerValues.contains(.commonPrefixes) { - let commonPrefixesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .commonPrefixes) - if commonPrefixesWrappedContainer != nil { - let commonPrefixesContainer = try containerValues.decodeIfPresent([S3ClientTypes.CommonPrefix].self, forKey: .commonPrefixes) - var commonPrefixesBuffer:[S3ClientTypes.CommonPrefix]? = nil - if let commonPrefixesContainer = commonPrefixesContainer { - commonPrefixesBuffer = [S3ClientTypes.CommonPrefix]() - for structureContainer0 in commonPrefixesContainer { - commonPrefixesBuffer?.append(structureContainer0) - } - } - commonPrefixes = commonPrefixesBuffer - } else { - commonPrefixes = [] - } - } else { - commonPrefixes = nil - } - let encodingTypeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.EncodingType.self, forKey: .encodingType) - encodingType = encodingTypeDecoded - let keyCountDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .keyCount) - keyCount = keyCountDecoded - let continuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .continuationToken) - continuationToken = continuationTokenDecoded - let nextContinuationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextContinuationToken) - nextContinuationToken = nextContinuationTokenDecoded - let startAfterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .startAfter) - startAfter = startAfterDecoded - } -} +enum ListObjectsV2OutputError { -enum ListObjectsV2OutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NoSuchBucket": return try await NoSuchBucket(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NoSuchBucket": return try await NoSuchBucket.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -15492,51 +13522,35 @@ public struct ListPartsInput: Swift.Equatable { } } -extension ListPartsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let abortDateHeaderValue = httpResponse.headers.value(for: "x-amz-abort-date") { - self.abortDate = TimestampFormatter(format: .httpDate).date(from: abortDateHeaderValue) - } else { - self.abortDate = nil - } - if let abortRuleIdHeaderValue = httpResponse.headers.value(for: "x-amz-abort-rule-id") { - self.abortRuleId = abortRuleIdHeaderValue - } else { - self.abortRuleId = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPartsOutputBody = try responseDecoder.decode(responseBody: data) - self.bucket = output.bucket - self.checksumAlgorithm = output.checksumAlgorithm - self.initiator = output.initiator - self.isTruncated = output.isTruncated - self.key = output.key - self.maxParts = output.maxParts - self.nextPartNumberMarker = output.nextPartNumberMarker - self.owner = output.owner - self.partNumberMarker = output.partNumberMarker - self.parts = output.parts - self.storageClass = output.storageClass - self.uploadId = output.uploadId - } else { - self.bucket = nil - self.checksumAlgorithm = nil - self.initiator = nil - self.isTruncated = nil - self.key = nil - self.maxParts = nil - self.nextPartNumberMarker = nil - self.owner = nil - self.partNumberMarker = nil - self.parts = nil - self.storageClass = nil - self.uploadId = nil +extension ListPartsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListPartsOutput() + if let abortDateHeaderValue = httpResponse.headers.value(for: "x-amz-abort-date") { + value.abortDate = TimestampFormatter(format: .httpDate).date(from: abortDateHeaderValue) + } + if let abortRuleIdHeaderValue = httpResponse.headers.value(for: "x-amz-abort-rule-id") { + value.abortRuleId = abortRuleIdHeaderValue + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + value.bucket = try reader["Bucket"].readIfPresent() + value.checksumAlgorithm = try reader["ChecksumAlgorithm"].readIfPresent() + value.initiator = try reader["Initiator"].readIfPresent(readingClosure: S3ClientTypes.Initiator.readingClosure) + value.isTruncated = try reader["IsTruncated"].readIfPresent() + value.key = try reader["Key"].readIfPresent() + value.maxParts = try reader["MaxParts"].readIfPresent() + value.nextPartNumberMarker = try reader["NextPartNumberMarker"].readIfPresent() + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + value.partNumberMarker = try reader["PartNumberMarker"].readIfPresent() + value.parts = try reader["Part"].readListIfPresent(memberReadingClosure: S3ClientTypes.Part.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.storageClass = try reader["StorageClass"].readIfPresent() + value.uploadId = try reader["UploadId"].readIfPresent() + return value } } } @@ -15609,109 +13623,35 @@ public struct ListPartsOutput: Swift.Equatable { } } -struct ListPartsOutputBody: Swift.Equatable { - let bucket: Swift.String? - let key: Swift.String? - let uploadId: Swift.String? - let partNumberMarker: Swift.String? - let nextPartNumberMarker: Swift.String? - let maxParts: Swift.Int? - let isTruncated: Swift.Bool? - let parts: [S3ClientTypes.Part]? - let initiator: S3ClientTypes.Initiator? - let owner: S3ClientTypes.Owner? - let storageClass: S3ClientTypes.StorageClass? - let checksumAlgorithm: S3ClientTypes.ChecksumAlgorithm? -} - -extension ListPartsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case checksumAlgorithm = "ChecksumAlgorithm" - case initiator = "Initiator" - case isTruncated = "IsTruncated" - case key = "Key" - case maxParts = "MaxParts" - case nextPartNumberMarker = "NextPartNumberMarker" - case owner = "Owner" - case partNumberMarker = "PartNumberMarker" - case parts = "Part" - case storageClass = "StorageClass" - case uploadId = "UploadId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let uploadIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uploadId) - uploadId = uploadIdDecoded - let partNumberMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .partNumberMarker) - partNumberMarker = partNumberMarkerDecoded - let nextPartNumberMarkerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextPartNumberMarker) - nextPartNumberMarker = nextPartNumberMarkerDecoded - let maxPartsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxParts) - maxParts = maxPartsDecoded - let isTruncatedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isTruncated) - isTruncated = isTruncatedDecoded - if containerValues.contains(.parts) { - let partsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .parts) - if partsWrappedContainer != nil { - let partsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Part].self, forKey: .parts) - var partsBuffer:[S3ClientTypes.Part]? = nil - if let partsContainer = partsContainer { - partsBuffer = [S3ClientTypes.Part]() - for structureContainer0 in partsContainer { - partsBuffer?.append(structureContainer0) - } - } - parts = partsBuffer - } else { - parts = [] - } - } else { - parts = nil - } - let initiatorDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Initiator.self, forKey: .initiator) - initiator = initiatorDecoded - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let checksumAlgorithmDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ChecksumAlgorithm.self, forKey: .checksumAlgorithm) - checksumAlgorithm = checksumAlgorithmDecoded - } -} +enum ListPartsOutputError { -enum ListPartsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.LocationInfo: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case type = "Type" - } +extension S3ClientTypes.LocationInfo { static func writingClosure(_ value: S3ClientTypes.LocationInfo?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) - try writer[.init("Type")].write(value.type) + try writer["Name"].write(value.name) + try writer["Type"].write(value.type) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.LocationType.self, forKey: .type) - type = typeDecoded - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.LocationInfo() + value.type = try reader["Type"].readIfPresent() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -15764,49 +13704,26 @@ extension S3ClientTypes { } } -extension S3ClientTypes.LoggingEnabled: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case targetBucket = "TargetBucket" - case targetGrants = "TargetGrants" - case targetObjectKeyFormat = "TargetObjectKeyFormat" - case targetPrefix = "TargetPrefix" - } +extension S3ClientTypes.LoggingEnabled { static func writingClosure(_ value: S3ClientTypes.LoggingEnabled?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("TargetBucket")].write(value.targetBucket) - try writer[.init("TargetGrants")].writeList(value.targetGrants, memberWritingClosure: S3ClientTypes.TargetGrant.writingClosure(_:to:), memberNodeInfo: .init("Grant"), isFlattened: false) - try writer[.init("TargetObjectKeyFormat")].write(value.targetObjectKeyFormat, writingClosure: S3ClientTypes.TargetObjectKeyFormat.writingClosure(_:to:)) - try writer[.init("TargetPrefix")].write(value.targetPrefix) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetBucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetBucket) - targetBucket = targetBucketDecoded - if containerValues.contains(.targetGrants) { - struct KeyVal0{struct Grant{}} - let targetGrantsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .targetGrants) - if let targetGrantsWrappedContainer = targetGrantsWrappedContainer { - let targetGrantsContainer = try targetGrantsWrappedContainer.decodeIfPresent([S3ClientTypes.TargetGrant].self, forKey: .member) - var targetGrantsBuffer:[S3ClientTypes.TargetGrant]? = nil - if let targetGrantsContainer = targetGrantsContainer { - targetGrantsBuffer = [S3ClientTypes.TargetGrant]() - for structureContainer0 in targetGrantsContainer { - targetGrantsBuffer?.append(structureContainer0) - } - } - targetGrants = targetGrantsBuffer - } else { - targetGrants = [] - } - } else { - targetGrants = nil + try writer["TargetBucket"].write(value.targetBucket) + try writer["TargetGrants"].writeList(value.targetGrants, memberWritingClosure: S3ClientTypes.TargetGrant.writingClosure(_:to:), memberNodeInfo: "Grant", isFlattened: false) + try writer["TargetObjectKeyFormat"].write(value.targetObjectKeyFormat, writingClosure: S3ClientTypes.TargetObjectKeyFormat.writingClosure(_:to:)) + try writer["TargetPrefix"].write(value.targetPrefix) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.LoggingEnabled() + value.targetBucket = try reader["TargetBucket"].readIfPresent() + value.targetGrants = try reader["TargetGrants"].readListIfPresent(memberReadingClosure: S3ClientTypes.TargetGrant.readingClosure, memberNodeInfo: "Grant", isFlattened: false) + value.targetPrefix = try reader["TargetPrefix"].readIfPresent() + value.targetObjectKeyFormat = try reader["TargetObjectKeyFormat"].readIfPresent(readingClosure: S3ClientTypes.TargetObjectKeyFormat.readingClosure) + return value } - let targetPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetPrefix) - targetPrefix = targetPrefixDecoded - let targetObjectKeyFormatDecoded = try containerValues.decodeIfPresent(S3ClientTypes.TargetObjectKeyFormat.self, forKey: .targetObjectKeyFormat) - targetObjectKeyFormat = targetObjectKeyFormatDecoded } } @@ -15936,24 +13853,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.MetadataEntry: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case value = "Value" - } +extension S3ClientTypes.MetadataEntry { static func writingClosure(_ value: S3ClientTypes.MetadataEntry?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) - try writer[.init("Value")].write(value.value) + try writer["Name"].write(value.name) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.MetadataEntry() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -15977,24 +13892,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.Metrics: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventThreshold = "EventThreshold" - case status = "Status" - } +extension S3ClientTypes.Metrics { static func writingClosure(_ value: S3ClientTypes.Metrics?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EventThreshold")].write(value.eventThreshold, writingClosure: S3ClientTypes.ReplicationTimeValue.writingClosure(_:to:)) - try writer[.init("Status")].write(value.status) + try writer["EventThreshold"].write(value.eventThreshold, writingClosure: S3ClientTypes.ReplicationTimeValue.writingClosure(_:to:)) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.MetricsStatus.self, forKey: .status) - status = statusDecoded - let eventThresholdDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicationTimeValue.self, forKey: .eventThreshold) - eventThreshold = eventThresholdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Metrics() + value.status = try reader["Status"].readIfPresent() + value.eventThreshold = try reader["EventThreshold"].readIfPresent(readingClosure: S3ClientTypes.ReplicationTimeValue.readingClosure) + return value + } } } @@ -16019,44 +13932,24 @@ extension S3ClientTypes { } -extension S3ClientTypes.MetricsAndOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPointArn = "AccessPointArn" - case `prefix` = "Prefix" - case tags = "Tag" - } +extension S3ClientTypes.MetricsAndOperator { static func writingClosure(_ value: S3ClientTypes.MetricsAndOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessPointArn")].write(value.accessPointArn) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tag")].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - if containerValues.contains(.tags) { - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .tags) - if tagsWrappedContainer != nil { - let tagsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Tag].self, forKey: .tags) - var tagsBuffer:[S3ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + try writer["AccessPointArn"].write(value.accessPointArn) + try writer["Prefix"].write(value.`prefix`) + try writer["Tag"].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.MetricsAndOperator() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tags = try reader["Tag"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: true) + value.accessPointArn = try reader["AccessPointArn"].readIfPresent() + return value } - let accessPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessPointArn) - accessPointArn = accessPointArnDecoded } } @@ -16084,24 +13977,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.MetricsConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "Filter" - case id = "Id" - } +extension S3ClientTypes.MetricsConfiguration { static func writingClosure(_ value: S3ClientTypes.MetricsConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.MetricsFilter.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.MetricsFilter.writingClosure(_:to:)) + try writer["Id"].write(value.id) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.MetricsFilter.self, forKey: .filter) - filter = filterDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.MetricsConfiguration() + value.id = try reader["Id"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.MetricsFilter.readingClosure) + return value + } } } @@ -16126,49 +14017,40 @@ extension S3ClientTypes { } -extension S3ClientTypes.MetricsFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accesspointarn = "AccessPointArn" - case and = "And" - case `prefix` = "Prefix" - case tag = "Tag" - case sdkUnknown - } +extension S3ClientTypes.MetricsFilter { static func writingClosure(_ value: S3ClientTypes.MetricsFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } switch value { case let .accesspointarn(accesspointarn): - try writer[.init("AccessPointArn")].write(accesspointarn) + try writer["AccessPointArn"].write(accesspointarn) case let .and(and): - try writer[.init("And")].write(and, writingClosure: S3ClientTypes.MetricsAndOperator.writingClosure(_:to:)) + try writer["And"].write(and, writingClosure: S3ClientTypes.MetricsAndOperator.writingClosure(_:to:)) case let .`prefix`(`prefix`): - try writer[.init("Prefix")].write(`prefix`) + try writer["Prefix"].write(`prefix`) case let .tag(tag): - try writer[.init("Tag")].write(tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) + try writer["Tag"].write(tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) case let .sdkUnknown(sdkUnknown): try writer[.init("sdkUnknown")].write(sdkUnknown) } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let key = containerValues.allKeys.first - switch key { - case .`prefix`: - let prefixDecoded = try containerValues.decode(Swift.String.self, forKey: .prefix) - self = .prefix(prefixDecoded) - case .tag: - let tagDecoded = try containerValues.decode(S3ClientTypes.Tag.self, forKey: .tag) - self = .tag(tagDecoded) - case .accesspointarn: - let accesspointarnDecoded = try containerValues.decode(Swift.String.self, forKey: .accesspointarn) - self = .accesspointarn(accesspointarnDecoded) - case .and: - let andDecoded = try containerValues.decode(S3ClientTypes.MetricsAndOperator.self, forKey: .and) - self = .and(andDecoded) - default: - self = .sdkUnknown("") + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + let name = reader.children.first?.nodeInfo.name + switch name { + case "Prefix": + return .`prefix`(try reader["Prefix"].read()) + case "Tag": + return .tag(try reader["Tag"].read(readingClosure: S3ClientTypes.Tag.readingClosure)) + case "AccessPointArn": + return .accesspointarn(try reader["AccessPointArn"].read()) + case "And": + return .and(try reader["And"].read(readingClosure: S3ClientTypes.MetricsAndOperator.readingClosure)) + default: + return .sdkUnknown(name ?? "") + } } } } @@ -16221,44 +14103,32 @@ extension S3ClientTypes { } } -extension S3ClientTypes.MultipartUpload: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumAlgorithm = "ChecksumAlgorithm" - case initiated = "Initiated" - case initiator = "Initiator" - case key = "Key" - case owner = "Owner" - case storageClass = "StorageClass" - case uploadId = "UploadId" - } +extension S3ClientTypes.MultipartUpload { static func writingClosure(_ value: S3ClientTypes.MultipartUpload?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumAlgorithm")].write(value.checksumAlgorithm) - try writer[.init("Initiated")].writeTimestamp(value.initiated, format: .dateTime) - try writer[.init("Initiator")].write(value.initiator, writingClosure: S3ClientTypes.Initiator.writingClosure(_:to:)) - try writer[.init("Key")].write(value.key) - try writer[.init("Owner")].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) - try writer[.init("StorageClass")].write(value.storageClass) - try writer[.init("UploadId")].write(value.uploadId) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let uploadIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .uploadId) - uploadId = uploadIdDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let initiatedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .initiated) - initiated = initiatedDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded - let initiatorDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Initiator.self, forKey: .initiator) - initiator = initiatorDecoded - let checksumAlgorithmDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ChecksumAlgorithm.self, forKey: .checksumAlgorithm) - checksumAlgorithm = checksumAlgorithmDecoded + try writer["ChecksumAlgorithm"].write(value.checksumAlgorithm) + try writer["Initiated"].writeTimestamp(value.initiated, format: .dateTime) + try writer["Initiator"].write(value.initiator, writingClosure: S3ClientTypes.Initiator.writingClosure(_:to:)) + try writer["Key"].write(value.key) + try writer["Owner"].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) + try writer["StorageClass"].write(value.storageClass) + try writer["UploadId"].write(value.uploadId) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.MultipartUpload() + value.uploadId = try reader["UploadId"].readIfPresent() + value.key = try reader["Key"].readIfPresent() + value.initiated = try reader["Initiated"].readTimestampIfPresent(format: .dateTime) + value.storageClass = try reader["StorageClass"].readIfPresent() + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + value.initiator = try reader["Initiator"].readIfPresent(readingClosure: S3ClientTypes.Initiator.readingClosure) + value.checksumAlgorithm = try reader["ChecksumAlgorithm"].readIfPresent() + return value + } } } @@ -16303,11 +14173,14 @@ extension S3ClientTypes { } extension NoSuchBucket { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchBucket() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -16326,11 +14199,14 @@ public struct NoSuchBucket: ClientRuntime.ModeledError, AWSClientRuntime.AWSS3Se } extension NoSuchKey { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchKey() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -16349,11 +14225,14 @@ public struct NoSuchKey: ClientRuntime.ModeledError, AWSClientRuntime.AWSS3Servi } extension NoSuchUpload { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchUpload() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -16371,24 +14250,22 @@ public struct NoSuchUpload: ClientRuntime.ModeledError, AWSClientRuntime.AWSS3Se public init() { } } -extension S3ClientTypes.NoncurrentVersionExpiration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case newerNoncurrentVersions = "NewerNoncurrentVersions" - case noncurrentDays = "NoncurrentDays" - } +extension S3ClientTypes.NoncurrentVersionExpiration { static func writingClosure(_ value: S3ClientTypes.NoncurrentVersionExpiration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("NewerNoncurrentVersions")].write(value.newerNoncurrentVersions) - try writer[.init("NoncurrentDays")].write(value.noncurrentDays) + try writer["NewerNoncurrentVersions"].write(value.newerNoncurrentVersions) + try writer["NoncurrentDays"].write(value.noncurrentDays) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let noncurrentDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .noncurrentDays) - noncurrentDays = noncurrentDaysDecoded - let newerNoncurrentVersionsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .newerNoncurrentVersions) - newerNoncurrentVersions = newerNoncurrentVersionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.NoncurrentVersionExpiration() + value.noncurrentDays = try reader["NoncurrentDays"].readIfPresent() + value.newerNoncurrentVersions = try reader["NewerNoncurrentVersions"].readIfPresent() + return value + } } } @@ -16412,28 +14289,24 @@ extension S3ClientTypes { } -extension S3ClientTypes.NoncurrentVersionTransition: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case newerNoncurrentVersions = "NewerNoncurrentVersions" - case noncurrentDays = "NoncurrentDays" - case storageClass = "StorageClass" - } +extension S3ClientTypes.NoncurrentVersionTransition { static func writingClosure(_ value: S3ClientTypes.NoncurrentVersionTransition?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("NewerNoncurrentVersions")].write(value.newerNoncurrentVersions) - try writer[.init("NoncurrentDays")].write(value.noncurrentDays) - try writer[.init("StorageClass")].write(value.storageClass) + try writer["NewerNoncurrentVersions"].write(value.newerNoncurrentVersions) + try writer["NoncurrentDays"].write(value.noncurrentDays) + try writer["StorageClass"].write(value.storageClass) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let noncurrentDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .noncurrentDays) - noncurrentDays = noncurrentDaysDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.TransitionStorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let newerNoncurrentVersionsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .newerNoncurrentVersions) - newerNoncurrentVersions = newerNoncurrentVersionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.NoncurrentVersionTransition() + value.noncurrentDays = try reader["NoncurrentDays"].readIfPresent() + value.storageClass = try reader["StorageClass"].readIfPresent() + value.newerNoncurrentVersions = try reader["NewerNoncurrentVersions"].readIfPresent() + return value + } } } @@ -16462,11 +14335,14 @@ extension S3ClientTypes { } extension NotFound { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = NotFound() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -16484,80 +14360,26 @@ public struct NotFound: ClientRuntime.ModeledError, AWSClientRuntime.AWSS3Servic public init() { } } -extension S3ClientTypes.NotificationConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventBridgeConfiguration = "EventBridgeConfiguration" - case lambdaFunctionConfigurations = "CloudFunctionConfiguration" - case queueConfigurations = "QueueConfiguration" - case topicConfigurations = "TopicConfiguration" - } +extension S3ClientTypes.NotificationConfiguration { static func writingClosure(_ value: S3ClientTypes.NotificationConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EventBridgeConfiguration")].write(value.eventBridgeConfiguration, writingClosure: S3ClientTypes.EventBridgeConfiguration.writingClosure(_:to:)) - try writer[.init("CloudFunctionConfiguration")].writeList(value.lambdaFunctionConfigurations, memberWritingClosure: S3ClientTypes.LambdaFunctionConfiguration.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("QueueConfiguration")].writeList(value.queueConfigurations, memberWritingClosure: S3ClientTypes.QueueConfiguration.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("TopicConfiguration")].writeList(value.topicConfigurations, memberWritingClosure: S3ClientTypes.TopicConfiguration.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.topicConfigurations) { - let topicConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .topicConfigurations) - if topicConfigurationsWrappedContainer != nil { - let topicConfigurationsContainer = try containerValues.decodeIfPresent([S3ClientTypes.TopicConfiguration].self, forKey: .topicConfigurations) - var topicConfigurationsBuffer:[S3ClientTypes.TopicConfiguration]? = nil - if let topicConfigurationsContainer = topicConfigurationsContainer { - topicConfigurationsBuffer = [S3ClientTypes.TopicConfiguration]() - for structureContainer0 in topicConfigurationsContainer { - topicConfigurationsBuffer?.append(structureContainer0) - } - } - topicConfigurations = topicConfigurationsBuffer - } else { - topicConfigurations = [] - } - } else { - topicConfigurations = nil - } - if containerValues.contains(.queueConfigurations) { - let queueConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .queueConfigurations) - if queueConfigurationsWrappedContainer != nil { - let queueConfigurationsContainer = try containerValues.decodeIfPresent([S3ClientTypes.QueueConfiguration].self, forKey: .queueConfigurations) - var queueConfigurationsBuffer:[S3ClientTypes.QueueConfiguration]? = nil - if let queueConfigurationsContainer = queueConfigurationsContainer { - queueConfigurationsBuffer = [S3ClientTypes.QueueConfiguration]() - for structureContainer0 in queueConfigurationsContainer { - queueConfigurationsBuffer?.append(structureContainer0) - } - } - queueConfigurations = queueConfigurationsBuffer - } else { - queueConfigurations = [] - } - } else { - queueConfigurations = nil - } - if containerValues.contains(.lambdaFunctionConfigurations) { - let lambdaFunctionConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .lambdaFunctionConfigurations) - if lambdaFunctionConfigurationsWrappedContainer != nil { - let lambdaFunctionConfigurationsContainer = try containerValues.decodeIfPresent([S3ClientTypes.LambdaFunctionConfiguration].self, forKey: .lambdaFunctionConfigurations) - var lambdaFunctionConfigurationsBuffer:[S3ClientTypes.LambdaFunctionConfiguration]? = nil - if let lambdaFunctionConfigurationsContainer = lambdaFunctionConfigurationsContainer { - lambdaFunctionConfigurationsBuffer = [S3ClientTypes.LambdaFunctionConfiguration]() - for structureContainer0 in lambdaFunctionConfigurationsContainer { - lambdaFunctionConfigurationsBuffer?.append(structureContainer0) - } - } - lambdaFunctionConfigurations = lambdaFunctionConfigurationsBuffer - } else { - lambdaFunctionConfigurations = [] - } - } else { - lambdaFunctionConfigurations = nil + try writer["EventBridgeConfiguration"].write(value.eventBridgeConfiguration, writingClosure: S3ClientTypes.EventBridgeConfiguration.writingClosure(_:to:)) + try writer["CloudFunctionConfiguration"].writeList(value.lambdaFunctionConfigurations, memberWritingClosure: S3ClientTypes.LambdaFunctionConfiguration.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["QueueConfiguration"].writeList(value.queueConfigurations, memberWritingClosure: S3ClientTypes.QueueConfiguration.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["TopicConfiguration"].writeList(value.topicConfigurations, memberWritingClosure: S3ClientTypes.TopicConfiguration.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.NotificationConfiguration() + value.topicConfigurations = try reader["TopicConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.TopicConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.queueConfigurations = try reader["QueueConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.QueueConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.lambdaFunctionConfigurations = try reader["CloudFunctionConfiguration"].readListIfPresent(memberReadingClosure: S3ClientTypes.LambdaFunctionConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.eventBridgeConfiguration = try reader["EventBridgeConfiguration"].readIfPresent(readingClosure: S3ClientTypes.EventBridgeConfiguration.readingClosure) + return value } - let eventBridgeConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.EventBridgeConfiguration.self, forKey: .eventBridgeConfiguration) - eventBridgeConfiguration = eventBridgeConfigurationDecoded } } @@ -16589,20 +14411,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.NotificationConfigurationFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "S3Key" - } +extension S3ClientTypes.NotificationConfigurationFilter { static func writingClosure(_ value: S3ClientTypes.NotificationConfigurationFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("S3Key")].write(value.key, writingClosure: S3ClientTypes.S3KeyFilter.writingClosure(_:to:)) + try writer["S3Key"].write(value.key, writingClosure: S3ClientTypes.S3KeyFilter.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(S3ClientTypes.S3KeyFilter.self, forKey: .key) - key = keyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.NotificationConfigurationFilter() + value.key = try reader["S3Key"].readIfPresent(readingClosure: S3ClientTypes.S3KeyFilter.readingClosure) + return value + } } } @@ -16622,64 +14444,34 @@ extension S3ClientTypes { } -extension S3ClientTypes.Object: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumAlgorithm = "ChecksumAlgorithm" - case eTag = "ETag" - case key = "Key" - case lastModified = "LastModified" - case owner = "Owner" - case restoreStatus = "RestoreStatus" - case size = "Size" - case storageClass = "StorageClass" - } +extension S3ClientTypes.Object { static func writingClosure(_ value: S3ClientTypes.Object?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumAlgorithm")].writeList(value.checksumAlgorithm, memberWritingClosure: S3ClientTypes.ChecksumAlgorithm.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("ETag")].write(value.eTag) - try writer[.init("Key")].write(value.key) - try writer[.init("LastModified")].writeTimestamp(value.lastModified, format: .dateTime) - try writer[.init("Owner")].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) - try writer[.init("RestoreStatus")].write(value.restoreStatus, writingClosure: S3ClientTypes.RestoreStatus.writingClosure(_:to:)) - try writer[.init("Size")].write(value.size) - try writer[.init("StorageClass")].write(value.storageClass) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let lastModifiedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModified) - lastModified = lastModifiedDecoded - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded - if containerValues.contains(.checksumAlgorithm) { - let checksumAlgorithmWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .checksumAlgorithm) - if checksumAlgorithmWrappedContainer != nil { - let checksumAlgorithmContainer = try containerValues.decodeIfPresent([S3ClientTypes.ChecksumAlgorithm].self, forKey: .checksumAlgorithm) - var checksumAlgorithmBuffer:[S3ClientTypes.ChecksumAlgorithm]? = nil - if let checksumAlgorithmContainer = checksumAlgorithmContainer { - checksumAlgorithmBuffer = [S3ClientTypes.ChecksumAlgorithm]() - for enumContainer0 in checksumAlgorithmContainer { - checksumAlgorithmBuffer?.append(enumContainer0) - } - } - checksumAlgorithm = checksumAlgorithmBuffer - } else { - checksumAlgorithm = [] - } - } else { - checksumAlgorithm = nil + try writer["ChecksumAlgorithm"].writeList(value.checksumAlgorithm, memberWritingClosure: S3ClientTypes.ChecksumAlgorithm.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["ETag"].write(value.eTag) + try writer["Key"].write(value.key) + try writer["LastModified"].writeTimestamp(value.lastModified, format: .dateTime) + try writer["Owner"].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) + try writer["RestoreStatus"].write(value.restoreStatus, writingClosure: S3ClientTypes.RestoreStatus.writingClosure(_:to:)) + try writer["Size"].write(value.size) + try writer["StorageClass"].write(value.storageClass) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Object() + value.key = try reader["Key"].readIfPresent() + value.lastModified = try reader["LastModified"].readTimestampIfPresent(format: .dateTime) + value.eTag = try reader["ETag"].readIfPresent() + value.checksumAlgorithm = try reader["ChecksumAlgorithm"].readListIfPresent(memberReadingClosure: S3ClientTypes.ChecksumAlgorithm.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.size = try reader["Size"].readIfPresent() + value.storageClass = try reader["StorageClass"].readIfPresent() + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + value.restoreStatus = try reader["RestoreStatus"].readIfPresent(readingClosure: S3ClientTypes.RestoreStatus.readingClosure) + return value } - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectStorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded - let restoreStatusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.RestoreStatus.self, forKey: .restoreStatus) - restoreStatus = restoreStatusDecoded } } @@ -16737,11 +14529,14 @@ extension S3ClientTypes { } extension ObjectAlreadyInActiveTierError { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = ObjectAlreadyInActiveTierError() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -16847,24 +14642,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ObjectIdentifier: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case versionId = "VersionId" - } +extension S3ClientTypes.ObjectIdentifier { static func writingClosure(_ value: S3ClientTypes.ObjectIdentifier?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Key")].write(value.key) - try writer[.init("VersionId")].write(value.versionId) + try writer["Key"].write(value.key) + try writer["VersionId"].write(value.versionId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ObjectIdentifier() + value.key = try reader["Key"].readIfPresent() + value.versionId = try reader["VersionId"].readIfPresent() + return value + } } } @@ -16889,24 +14682,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.ObjectLockConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objectLockEnabled = "ObjectLockEnabled" - case rule = "Rule" - } +extension S3ClientTypes.ObjectLockConfiguration { static func writingClosure(_ value: S3ClientTypes.ObjectLockConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ObjectLockEnabled")].write(value.objectLockEnabled) - try writer[.init("Rule")].write(value.rule, writingClosure: S3ClientTypes.ObjectLockRule.writingClosure(_:to:)) + try writer["ObjectLockEnabled"].write(value.objectLockEnabled) + try writer["Rule"].write(value.rule, writingClosure: S3ClientTypes.ObjectLockRule.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let objectLockEnabledDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockEnabled.self, forKey: .objectLockEnabled) - objectLockEnabled = objectLockEnabledDecoded - let ruleDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockRule.self, forKey: .rule) - rule = ruleDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ObjectLockConfiguration() + value.objectLockEnabled = try reader["ObjectLockEnabled"].readIfPresent() + value.rule = try reader["Rule"].readIfPresent(readingClosure: S3ClientTypes.ObjectLockRule.readingClosure) + return value + } } } @@ -16959,20 +14750,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ObjectLockLegalHold: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ClientTypes.ObjectLockLegalHold { static func writingClosure(_ value: S3ClientTypes.ObjectLockLegalHold?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockLegalHoldStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ObjectLockLegalHold() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -17056,24 +14847,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ObjectLockRetention: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case mode = "Mode" - case retainUntilDate = "RetainUntilDate" - } +extension S3ClientTypes.ObjectLockRetention { static func writingClosure(_ value: S3ClientTypes.ObjectLockRetention?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Mode")].write(value.mode) - try writer[.init("RetainUntilDate")].writeTimestamp(value.retainUntilDate, format: .dateTime) + try writer["Mode"].write(value.mode) + try writer["RetainUntilDate"].writeTimestamp(value.retainUntilDate, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let modeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockRetentionMode.self, forKey: .mode) - mode = modeDecoded - let retainUntilDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .retainUntilDate) - retainUntilDate = retainUntilDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ObjectLockRetention() + value.mode = try reader["Mode"].readIfPresent() + value.retainUntilDate = try reader["RetainUntilDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -17129,20 +14918,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ObjectLockRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case defaultRetention = "DefaultRetention" - } +extension S3ClientTypes.ObjectLockRule { static func writingClosure(_ value: S3ClientTypes.ObjectLockRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DefaultRetention")].write(value.defaultRetention, writingClosure: S3ClientTypes.DefaultRetention.writingClosure(_:to:)) + try writer["DefaultRetention"].write(value.defaultRetention, writingClosure: S3ClientTypes.DefaultRetention.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let defaultRetentionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.DefaultRetention.self, forKey: .defaultRetention) - defaultRetention = defaultRetentionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ObjectLockRule() + value.defaultRetention = try reader["DefaultRetention"].readIfPresent(readingClosure: S3ClientTypes.DefaultRetention.readingClosure) + return value + } } } @@ -17163,11 +14952,14 @@ extension S3ClientTypes { } extension ObjectNotInActiveTierError { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - self.requestID2 = requestID2 + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil, requestID2: Swift.String? = nil) async throws -> Swift.Error { + var value = ObjectNotInActiveTierError() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + value.requestID2 = requestID2 + return value } } @@ -17221,40 +15013,30 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ObjectPart: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumCRC32 = "ChecksumCRC32" - case checksumCRC32C = "ChecksumCRC32C" - case checksumSHA1 = "ChecksumSHA1" - case checksumSHA256 = "ChecksumSHA256" - case partNumber = "PartNumber" - case size = "Size" - } +extension S3ClientTypes.ObjectPart { static func writingClosure(_ value: S3ClientTypes.ObjectPart?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumCRC32")].write(value.checksumCRC32) - try writer[.init("ChecksumCRC32C")].write(value.checksumCRC32C) - try writer[.init("ChecksumSHA1")].write(value.checksumSHA1) - try writer[.init("ChecksumSHA256")].write(value.checksumSHA256) - try writer[.init("PartNumber")].write(value.partNumber) - try writer[.init("Size")].write(value.size) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let partNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partNumber) - partNumber = partNumberDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded - let checksumCRC32Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32) - checksumCRC32 = checksumCRC32Decoded - let checksumCRC32CDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32C) - checksumCRC32C = checksumCRC32CDecoded - let checksumSHA1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA1) - checksumSHA1 = checksumSHA1Decoded - let checksumSHA256Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA256) - checksumSHA256 = checksumSHA256Decoded + try writer["ChecksumCRC32"].write(value.checksumCRC32) + try writer["ChecksumCRC32C"].write(value.checksumCRC32C) + try writer["ChecksumSHA1"].write(value.checksumSHA1) + try writer["ChecksumSHA256"].write(value.checksumSHA256) + try writer["PartNumber"].write(value.partNumber) + try writer["Size"].write(value.size) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ObjectPart() + value.partNumber = try reader["PartNumber"].readIfPresent() + value.size = try reader["Size"].readIfPresent() + value.checksumCRC32 = try reader["ChecksumCRC32"].readIfPresent() + value.checksumCRC32C = try reader["ChecksumCRC32C"].readIfPresent() + value.checksumSHA1 = try reader["ChecksumSHA1"].readIfPresent() + value.checksumSHA256 = try reader["ChecksumSHA256"].readIfPresent() + return value + } } } @@ -17353,72 +15135,38 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ObjectVersion: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumAlgorithm = "ChecksumAlgorithm" - case eTag = "ETag" - case isLatest = "IsLatest" - case key = "Key" - case lastModified = "LastModified" - case owner = "Owner" - case restoreStatus = "RestoreStatus" - case size = "Size" - case storageClass = "StorageClass" - case versionId = "VersionId" - } +extension S3ClientTypes.ObjectVersion { static func writingClosure(_ value: S3ClientTypes.ObjectVersion?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumAlgorithm")].writeList(value.checksumAlgorithm, memberWritingClosure: S3ClientTypes.ChecksumAlgorithm.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("ETag")].write(value.eTag) - try writer[.init("IsLatest")].write(value.isLatest) - try writer[.init("Key")].write(value.key) - try writer[.init("LastModified")].writeTimestamp(value.lastModified, format: .dateTime) - try writer[.init("Owner")].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) - try writer[.init("RestoreStatus")].write(value.restoreStatus, writingClosure: S3ClientTypes.RestoreStatus.writingClosure(_:to:)) - try writer[.init("Size")].write(value.size) - try writer[.init("StorageClass")].write(value.storageClass) - try writer[.init("VersionId")].write(value.versionId) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded - if containerValues.contains(.checksumAlgorithm) { - let checksumAlgorithmWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .checksumAlgorithm) - if checksumAlgorithmWrappedContainer != nil { - let checksumAlgorithmContainer = try containerValues.decodeIfPresent([S3ClientTypes.ChecksumAlgorithm].self, forKey: .checksumAlgorithm) - var checksumAlgorithmBuffer:[S3ClientTypes.ChecksumAlgorithm]? = nil - if let checksumAlgorithmContainer = checksumAlgorithmContainer { - checksumAlgorithmBuffer = [S3ClientTypes.ChecksumAlgorithm]() - for enumContainer0 in checksumAlgorithmContainer { - checksumAlgorithmBuffer?.append(enumContainer0) - } - } - checksumAlgorithm = checksumAlgorithmBuffer - } else { - checksumAlgorithm = [] - } - } else { - checksumAlgorithm = nil - } - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectVersionStorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let versionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .versionId) - versionId = versionIdDecoded - let isLatestDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isLatest) - isLatest = isLatestDecoded - let lastModifiedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModified) - lastModified = lastModifiedDecoded - let ownerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Owner.self, forKey: .owner) - owner = ownerDecoded - let restoreStatusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.RestoreStatus.self, forKey: .restoreStatus) - restoreStatus = restoreStatusDecoded + try writer["ChecksumAlgorithm"].writeList(value.checksumAlgorithm, memberWritingClosure: S3ClientTypes.ChecksumAlgorithm.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["ETag"].write(value.eTag) + try writer["IsLatest"].write(value.isLatest) + try writer["Key"].write(value.key) + try writer["LastModified"].writeTimestamp(value.lastModified, format: .dateTime) + try writer["Owner"].write(value.owner, writingClosure: S3ClientTypes.Owner.writingClosure(_:to:)) + try writer["RestoreStatus"].write(value.restoreStatus, writingClosure: S3ClientTypes.RestoreStatus.writingClosure(_:to:)) + try writer["Size"].write(value.size) + try writer["StorageClass"].write(value.storageClass) + try writer["VersionId"].write(value.versionId) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ObjectVersion() + value.eTag = try reader["ETag"].readIfPresent() + value.checksumAlgorithm = try reader["ChecksumAlgorithm"].readListIfPresent(memberReadingClosure: S3ClientTypes.ChecksumAlgorithm.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.size = try reader["Size"].readIfPresent() + value.storageClass = try reader["StorageClass"].readIfPresent() + value.key = try reader["Key"].readIfPresent() + value.versionId = try reader["VersionId"].readIfPresent() + value.isLatest = try reader["IsLatest"].readIfPresent() + value.lastModified = try reader["LastModified"].readTimestampIfPresent(format: .dateTime) + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ClientTypes.Owner.readingClosure) + value.restoreStatus = try reader["RestoreStatus"].readIfPresent(readingClosure: S3ClientTypes.RestoreStatus.readingClosure) + return value + } } } @@ -17532,20 +15280,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.OutputLocation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3 = "S3" - } +extension S3ClientTypes.OutputLocation { static func writingClosure(_ value: S3ClientTypes.OutputLocation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("S3")].write(value.s3, writingClosure: S3ClientTypes.S3Location.writingClosure(_:to:)) + try writer["S3"].write(value.s3, writingClosure: S3ClientTypes.S3Location.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3Decoded = try containerValues.decodeIfPresent(S3ClientTypes.S3Location.self, forKey: .s3) - s3 = s3Decoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.OutputLocation() + value.s3 = try reader["S3"].readIfPresent(readingClosure: S3ClientTypes.S3Location.readingClosure) + return value + } } } @@ -17565,24 +15313,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.OutputSerialization: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case csv = "CSV" - case json = "JSON" - } +extension S3ClientTypes.OutputSerialization { static func writingClosure(_ value: S3ClientTypes.OutputSerialization?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CSV")].write(value.csv, writingClosure: S3ClientTypes.CSVOutput.writingClosure(_:to:)) - try writer[.init("JSON")].write(value.json, writingClosure: S3ClientTypes.JSONOutput.writingClosure(_:to:)) + try writer["CSV"].write(value.csv, writingClosure: S3ClientTypes.CSVOutput.writingClosure(_:to:)) + try writer["JSON"].write(value.json, writingClosure: S3ClientTypes.JSONOutput.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let csvDecoded = try containerValues.decodeIfPresent(S3ClientTypes.CSVOutput.self, forKey: .csv) - csv = csvDecoded - let jsonDecoded = try containerValues.decodeIfPresent(S3ClientTypes.JSONOutput.self, forKey: .json) - json = jsonDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.OutputSerialization() + value.csv = try reader["CSV"].readIfPresent(readingClosure: S3ClientTypes.CSVOutput.readingClosure) + value.json = try reader["JSON"].readIfPresent(readingClosure: S3ClientTypes.JSONOutput.readingClosure) + return value + } } } @@ -17606,24 +15352,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.Owner: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case displayName = "DisplayName" - case id = "ID" - } +extension S3ClientTypes.Owner { static func writingClosure(_ value: S3ClientTypes.Owner?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DisplayName")].write(value.displayName) - try writer[.init("ID")].write(value.id) + try writer["DisplayName"].write(value.displayName) + try writer["ID"].write(value.id) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let displayNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .displayName) - displayName = displayNameDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Owner() + value.displayName = try reader["DisplayName"].readIfPresent() + value.id = try reader["ID"].readIfPresent() + return value + } } } @@ -17695,35 +15439,19 @@ extension S3ClientTypes { } } -extension S3ClientTypes.OwnershipControls: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rule" - } +extension S3ClientTypes.OwnershipControls { static func writingClosure(_ value: S3ClientTypes.OwnershipControls?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Rule")].writeList(value.rules, memberWritingClosure: S3ClientTypes.OwnershipControlsRule.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.rules) { - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .rules) - if rulesWrappedContainer != nil { - let rulesContainer = try containerValues.decodeIfPresent([S3ClientTypes.OwnershipControlsRule].self, forKey: .rules) - var rulesBuffer:[S3ClientTypes.OwnershipControlsRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [S3ClientTypes.OwnershipControlsRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] - } - } else { - rules = nil + try writer["Rule"].writeList(value.rules, memberWritingClosure: S3ClientTypes.OwnershipControlsRule.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.OwnershipControls() + value.rules = try reader["Rule"].readListIfPresent(memberReadingClosure: S3ClientTypes.OwnershipControlsRule.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -17745,20 +15473,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.OwnershipControlsRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objectOwnership = "ObjectOwnership" - } +extension S3ClientTypes.OwnershipControlsRule { static func writingClosure(_ value: S3ClientTypes.OwnershipControlsRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ObjectOwnership")].write(value.objectOwnership) + try writer["ObjectOwnership"].write(value.objectOwnership) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let objectOwnershipDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectOwnership.self, forKey: .objectOwnership) - objectOwnership = objectOwnershipDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.OwnershipControlsRule() + value.objectOwnership = try reader["ObjectOwnership"].readIfPresent() + return value + } } } @@ -17779,13 +15507,17 @@ extension S3ClientTypes { } -extension S3ClientTypes.ParquetInput: Swift.Decodable { +extension S3ClientTypes.ParquetInput { static func writingClosure(_ value: S3ClientTypes.ParquetInput?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ClientTypes.ParquetInput() + } } } @@ -17798,48 +15530,34 @@ extension S3ClientTypes { } -extension S3ClientTypes.Part: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case checksumCRC32 = "ChecksumCRC32" - case checksumCRC32C = "ChecksumCRC32C" - case checksumSHA1 = "ChecksumSHA1" - case checksumSHA256 = "ChecksumSHA256" - case eTag = "ETag" - case lastModified = "LastModified" - case partNumber = "PartNumber" - case size = "Size" - } +extension S3ClientTypes.Part { static func writingClosure(_ value: S3ClientTypes.Part?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ChecksumCRC32")].write(value.checksumCRC32) - try writer[.init("ChecksumCRC32C")].write(value.checksumCRC32C) - try writer[.init("ChecksumSHA1")].write(value.checksumSHA1) - try writer[.init("ChecksumSHA256")].write(value.checksumSHA256) - try writer[.init("ETag")].write(value.eTag) - try writer[.init("LastModified")].writeTimestamp(value.lastModified, format: .dateTime) - try writer[.init("PartNumber")].write(value.partNumber) - try writer[.init("Size")].write(value.size) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let partNumberDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .partNumber) - partNumber = partNumberDecoded - let lastModifiedDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastModified) - lastModified = lastModifiedDecoded - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded - let sizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .size) - size = sizeDecoded - let checksumCRC32Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32) - checksumCRC32 = checksumCRC32Decoded - let checksumCRC32CDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumCRC32C) - checksumCRC32C = checksumCRC32CDecoded - let checksumSHA1Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA1) - checksumSHA1 = checksumSHA1Decoded - let checksumSHA256Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .checksumSHA256) - checksumSHA256 = checksumSHA256Decoded + try writer["ChecksumCRC32"].write(value.checksumCRC32) + try writer["ChecksumCRC32C"].write(value.checksumCRC32C) + try writer["ChecksumSHA1"].write(value.checksumSHA1) + try writer["ChecksumSHA256"].write(value.checksumSHA256) + try writer["ETag"].write(value.eTag) + try writer["LastModified"].writeTimestamp(value.lastModified, format: .dateTime) + try writer["PartNumber"].write(value.partNumber) + try writer["Size"].write(value.size) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Part() + value.partNumber = try reader["PartNumber"].readIfPresent() + value.lastModified = try reader["LastModified"].readTimestampIfPresent(format: .dateTime) + value.eTag = try reader["ETag"].readIfPresent() + value.size = try reader["Size"].readIfPresent() + value.checksumCRC32 = try reader["ChecksumCRC32"].readIfPresent() + value.checksumCRC32C = try reader["ChecksumCRC32C"].readIfPresent() + value.checksumSHA1 = try reader["ChecksumSHA1"].readIfPresent() + value.checksumSHA256 = try reader["ChecksumSHA256"].readIfPresent() + return value + } } } @@ -17919,20 +15637,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.PartitionedPrefix: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case partitionDateSource = "PartitionDateSource" - } +extension S3ClientTypes.PartitionedPrefix { static func writingClosure(_ value: S3ClientTypes.PartitionedPrefix?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("PartitionDateSource")].write(value.partitionDateSource) + try writer["PartitionDateSource"].write(value.partitionDateSource) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let partitionDateSourceDecoded = try containerValues.decodeIfPresent(S3ClientTypes.PartitionDateSource.self, forKey: .partitionDateSource) - partitionDateSource = partitionDateSourceDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.PartitionedPrefix() + value.partitionDateSource = try reader["PartitionDateSource"].readIfPresent() + return value + } } } @@ -18025,20 +15743,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.PolicyStatus: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isPublic = "IsPublic" - } +extension S3ClientTypes.PolicyStatus { static func writingClosure(_ value: S3ClientTypes.PolicyStatus?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsPublic")].write(value.isPublic) + try writer["IsPublic"].write(value.isPublic) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isPublicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isPublic) - isPublic = isPublicDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.PolicyStatus() + value.isPublic = try reader["IsPublic"].readIfPresent() + return value + } } } @@ -18058,28 +15776,24 @@ extension S3ClientTypes { } -extension S3ClientTypes.Progress: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bytesProcessed = "BytesProcessed" - case bytesReturned = "BytesReturned" - case bytesScanned = "BytesScanned" - } +extension S3ClientTypes.Progress { static func writingClosure(_ value: S3ClientTypes.Progress?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("BytesProcessed")].write(value.bytesProcessed) - try writer[.init("BytesReturned")].write(value.bytesReturned) - try writer[.init("BytesScanned")].write(value.bytesScanned) + try writer["BytesProcessed"].write(value.bytesProcessed) + try writer["BytesReturned"].write(value.bytesReturned) + try writer["BytesScanned"].write(value.bytesScanned) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bytesScannedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesScanned) - bytesScanned = bytesScannedDecoded - let bytesProcessedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesProcessed) - bytesProcessed = bytesProcessedDecoded - let bytesReturnedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesReturned) - bytesReturned = bytesReturnedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Progress() + value.bytesScanned = try reader["BytesScanned"].readIfPresent() + value.bytesProcessed = try reader["BytesProcessed"].readIfPresent() + value.bytesReturned = try reader["BytesReturned"].readIfPresent() + return value + } } } @@ -18107,20 +15821,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.ProgressEvent: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case details = "Details" - } +extension S3ClientTypes.ProgressEvent { static func writingClosure(_ value: S3ClientTypes.ProgressEvent?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Details")].write(value.details, writingClosure: S3ClientTypes.Progress.writingClosure(_:to:)) + try writer["Details"].write(value.details, writingClosure: S3ClientTypes.Progress.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let detailsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Progress.self, forKey: .details) - details = detailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ProgressEvent() + value.details = try reader["Details"].readIfPresent(readingClosure: S3ClientTypes.Progress.readingClosure) + return value + } } } @@ -18172,32 +15886,26 @@ extension S3ClientTypes { } } -extension S3ClientTypes.PublicAccessBlockConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockPublicAcls = "BlockPublicAcls" - case blockPublicPolicy = "BlockPublicPolicy" - case ignorePublicAcls = "IgnorePublicAcls" - case restrictPublicBuckets = "RestrictPublicBuckets" - } +extension S3ClientTypes.PublicAccessBlockConfiguration { static func writingClosure(_ value: S3ClientTypes.PublicAccessBlockConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("BlockPublicAcls")].write(value.blockPublicAcls) - try writer[.init("BlockPublicPolicy")].write(value.blockPublicPolicy) - try writer[.init("IgnorePublicAcls")].write(value.ignorePublicAcls) - try writer[.init("RestrictPublicBuckets")].write(value.restrictPublicBuckets) + try writer["BlockPublicAcls"].write(value.blockPublicAcls) + try writer["BlockPublicPolicy"].write(value.blockPublicPolicy) + try writer["IgnorePublicAcls"].write(value.ignorePublicAcls) + try writer["RestrictPublicBuckets"].write(value.restrictPublicBuckets) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let blockPublicAclsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blockPublicAcls) - blockPublicAcls = blockPublicAclsDecoded - let ignorePublicAclsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ignorePublicAcls) - ignorePublicAcls = ignorePublicAclsDecoded - let blockPublicPolicyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blockPublicPolicy) - blockPublicPolicy = blockPublicPolicyDecoded - let restrictPublicBucketsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .restrictPublicBuckets) - restrictPublicBuckets = restrictPublicBucketsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.PublicAccessBlockConfiguration() + value.blockPublicAcls = try reader["BlockPublicAcls"].readIfPresent() + value.ignorePublicAcls = try reader["IgnorePublicAcls"].readIfPresent() + value.blockPublicPolicy = try reader["BlockPublicPolicy"].readIfPresent() + value.restrictPublicBuckets = try reader["RestrictPublicBuckets"].readIfPresent() + return value + } } } @@ -18239,13 +15947,9 @@ extension S3ClientTypes { } extension PutBucketAccelerateConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accelerateConfiguration = "AccelerateConfiguration" - } - static func writingClosure(_ value: PutBucketAccelerateConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccelerateConfiguration")].write(value.accelerateConfiguration, writingClosure: S3ClientTypes.AccelerateConfiguration.writingClosure(_:to:)) + try writer["AccelerateConfiguration"].write(value.accelerateConfiguration, writingClosure: S3ClientTypes.AccelerateConfiguration.writingClosure(_:to:)) } } @@ -18305,24 +16009,12 @@ public struct PutBucketAccelerateConfigurationInput: Swift.Equatable { } } -struct PutBucketAccelerateConfigurationInputBody: Swift.Equatable { - let accelerateConfiguration: S3ClientTypes.AccelerateConfiguration? -} - -extension PutBucketAccelerateConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accelerateConfiguration = "AccelerateConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accelerateConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AccelerateConfiguration.self, forKey: .accelerateConfiguration) - accelerateConfiguration = accelerateConfigurationDecoded - } -} +extension PutBucketAccelerateConfigurationOutput { -extension PutBucketAccelerateConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketAccelerateConfigurationOutput() + } } } @@ -18331,23 +16023,23 @@ public struct PutBucketAccelerateConfigurationOutput: Swift.Equatable { public init() { } } -enum PutBucketAccelerateConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketAccelerateConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketAclInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlPolicy = "AccessControlPolicy" - } - static func writingClosure(_ value: PutBucketAclInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlPolicy")].write(value.accessControlPolicy, writingClosure: S3ClientTypes.AccessControlPolicy.writingClosure(_:to:)) + try writer["AccessControlPolicy"].write(value.accessControlPolicy, writingClosure: S3ClientTypes.AccessControlPolicy.writingClosure(_:to:)) } } @@ -18455,24 +16147,12 @@ public struct PutBucketAclInput: Swift.Equatable { } } -struct PutBucketAclInputBody: Swift.Equatable { - let accessControlPolicy: S3ClientTypes.AccessControlPolicy? -} +extension PutBucketAclOutput { -extension PutBucketAclInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlPolicy = "AccessControlPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessControlPolicyDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AccessControlPolicy.self, forKey: .accessControlPolicy) - accessControlPolicy = accessControlPolicyDecoded - } -} - -extension PutBucketAclOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketAclOutput() + } } } @@ -18481,23 +16161,23 @@ public struct PutBucketAclOutput: Swift.Equatable { public init() { } } -enum PutBucketAclOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketAclOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketAnalyticsConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analyticsConfiguration = "AnalyticsConfiguration" - } - static func writingClosure(_ value: PutBucketAnalyticsConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AnalyticsConfiguration")].write(value.analyticsConfiguration, writingClosure: S3ClientTypes.AnalyticsConfiguration.writingClosure(_:to:)) + try writer["AnalyticsConfiguration"].write(value.analyticsConfiguration, writingClosure: S3ClientTypes.AnalyticsConfiguration.writingClosure(_:to:)) } } @@ -18561,24 +16241,12 @@ public struct PutBucketAnalyticsConfigurationInput: Swift.Equatable { } } -struct PutBucketAnalyticsConfigurationInputBody: Swift.Equatable { - let analyticsConfiguration: S3ClientTypes.AnalyticsConfiguration? -} - -extension PutBucketAnalyticsConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case analyticsConfiguration = "AnalyticsConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let analyticsConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AnalyticsConfiguration.self, forKey: .analyticsConfiguration) - analyticsConfiguration = analyticsConfigurationDecoded - } -} +extension PutBucketAnalyticsConfigurationOutput { -extension PutBucketAnalyticsConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketAnalyticsConfigurationOutput() + } } } @@ -18587,23 +16255,23 @@ public struct PutBucketAnalyticsConfigurationOutput: Swift.Equatable { public init() { } } -enum PutBucketAnalyticsConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketAnalyticsConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketCorsInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case corsConfiguration = "CORSConfiguration" - } - static func writingClosure(_ value: PutBucketCorsInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CORSConfiguration")].write(value.corsConfiguration, writingClosure: S3ClientTypes.CORSConfiguration.writingClosure(_:to:)) + try writer["CORSConfiguration"].write(value.corsConfiguration, writingClosure: S3ClientTypes.CORSConfiguration.writingClosure(_:to:)) } } @@ -18670,24 +16338,12 @@ public struct PutBucketCorsInput: Swift.Equatable { } } -struct PutBucketCorsInputBody: Swift.Equatable { - let corsConfiguration: S3ClientTypes.CORSConfiguration? -} - -extension PutBucketCorsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case corsConfiguration = "CORSConfiguration" - } +extension PutBucketCorsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let corsConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.CORSConfiguration.self, forKey: .corsConfiguration) - corsConfiguration = corsConfigurationDecoded - } -} - -extension PutBucketCorsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketCorsOutput() + } } } @@ -18696,23 +16352,23 @@ public struct PutBucketCorsOutput: Swift.Equatable { public init() { } } -enum PutBucketCorsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketCorsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketEncryptionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration" - } - static func writingClosure(_ value: PutBucketEncryptionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ServerSideEncryptionConfiguration")].write(value.serverSideEncryptionConfiguration, writingClosure: S3ClientTypes.ServerSideEncryptionConfiguration.writingClosure(_:to:)) + try writer["ServerSideEncryptionConfiguration"].write(value.serverSideEncryptionConfiguration, writingClosure: S3ClientTypes.ServerSideEncryptionConfiguration.writingClosure(_:to:)) } } @@ -18779,24 +16435,12 @@ public struct PutBucketEncryptionInput: Swift.Equatable { } } -struct PutBucketEncryptionInputBody: Swift.Equatable { - let serverSideEncryptionConfiguration: S3ClientTypes.ServerSideEncryptionConfiguration? -} - -extension PutBucketEncryptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case serverSideEncryptionConfiguration = "ServerSideEncryptionConfiguration" - } +extension PutBucketEncryptionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let serverSideEncryptionConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ServerSideEncryptionConfiguration.self, forKey: .serverSideEncryptionConfiguration) - serverSideEncryptionConfiguration = serverSideEncryptionConfigurationDecoded - } -} - -extension PutBucketEncryptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketEncryptionOutput() + } } } @@ -18805,23 +16449,23 @@ public struct PutBucketEncryptionOutput: Swift.Equatable { public init() { } } -enum PutBucketEncryptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketEncryptionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketIntelligentTieringConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case intelligentTieringConfiguration = "IntelligentTieringConfiguration" - } - static func writingClosure(_ value: PutBucketIntelligentTieringConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IntelligentTieringConfiguration")].write(value.intelligentTieringConfiguration, writingClosure: S3ClientTypes.IntelligentTieringConfiguration.writingClosure(_:to:)) + try writer["IntelligentTieringConfiguration"].write(value.intelligentTieringConfiguration, writingClosure: S3ClientTypes.IntelligentTieringConfiguration.writingClosure(_:to:)) } } @@ -18870,24 +16514,12 @@ public struct PutBucketIntelligentTieringConfigurationInput: Swift.Equatable { } } -struct PutBucketIntelligentTieringConfigurationInputBody: Swift.Equatable { - let intelligentTieringConfiguration: S3ClientTypes.IntelligentTieringConfiguration? -} - -extension PutBucketIntelligentTieringConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case intelligentTieringConfiguration = "IntelligentTieringConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let intelligentTieringConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IntelligentTieringConfiguration.self, forKey: .intelligentTieringConfiguration) - intelligentTieringConfiguration = intelligentTieringConfigurationDecoded - } -} +extension PutBucketIntelligentTieringConfigurationOutput { -extension PutBucketIntelligentTieringConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketIntelligentTieringConfigurationOutput() + } } } @@ -18896,23 +16528,23 @@ public struct PutBucketIntelligentTieringConfigurationOutput: Swift.Equatable { public init() { } } -enum PutBucketIntelligentTieringConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketIntelligentTieringConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketInventoryConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case inventoryConfiguration = "InventoryConfiguration" - } - static func writingClosure(_ value: PutBucketInventoryConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("InventoryConfiguration")].write(value.inventoryConfiguration, writingClosure: S3ClientTypes.InventoryConfiguration.writingClosure(_:to:)) + try writer["InventoryConfiguration"].write(value.inventoryConfiguration, writingClosure: S3ClientTypes.InventoryConfiguration.writingClosure(_:to:)) } } @@ -18976,24 +16608,12 @@ public struct PutBucketInventoryConfigurationInput: Swift.Equatable { } } -struct PutBucketInventoryConfigurationInputBody: Swift.Equatable { - let inventoryConfiguration: S3ClientTypes.InventoryConfiguration? -} - -extension PutBucketInventoryConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case inventoryConfiguration = "InventoryConfiguration" - } +extension PutBucketInventoryConfigurationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let inventoryConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InventoryConfiguration.self, forKey: .inventoryConfiguration) - inventoryConfiguration = inventoryConfigurationDecoded - } -} - -extension PutBucketInventoryConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketInventoryConfigurationOutput() + } } } @@ -19002,23 +16622,23 @@ public struct PutBucketInventoryConfigurationOutput: Swift.Equatable { public init() { } } -enum PutBucketInventoryConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketInventoryConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketLifecycleConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case lifecycleConfiguration = "LifecycleConfiguration" - } - static func writingClosure(_ value: PutBucketLifecycleConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("LifecycleConfiguration")].write(value.lifecycleConfiguration, writingClosure: S3ClientTypes.BucketLifecycleConfiguration.writingClosure(_:to:)) + try writer["LifecycleConfiguration"].write(value.lifecycleConfiguration, writingClosure: S3ClientTypes.BucketLifecycleConfiguration.writingClosure(_:to:)) } } @@ -19077,24 +16697,12 @@ public struct PutBucketLifecycleConfigurationInput: Swift.Equatable { } } -struct PutBucketLifecycleConfigurationInputBody: Swift.Equatable { - let lifecycleConfiguration: S3ClientTypes.BucketLifecycleConfiguration? -} +extension PutBucketLifecycleConfigurationOutput { -extension PutBucketLifecycleConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case lifecycleConfiguration = "LifecycleConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lifecycleConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketLifecycleConfiguration.self, forKey: .lifecycleConfiguration) - lifecycleConfiguration = lifecycleConfigurationDecoded - } -} - -extension PutBucketLifecycleConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketLifecycleConfigurationOutput() + } } } @@ -19103,23 +16711,23 @@ public struct PutBucketLifecycleConfigurationOutput: Swift.Equatable { public init() { } } -enum PutBucketLifecycleConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketLifecycleConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketLoggingInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketLoggingStatus = "BucketLoggingStatus" - } - static func writingClosure(_ value: PutBucketLoggingInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("BucketLoggingStatus")].write(value.bucketLoggingStatus, writingClosure: S3ClientTypes.BucketLoggingStatus.writingClosure(_:to:)) + try writer["BucketLoggingStatus"].write(value.bucketLoggingStatus, writingClosure: S3ClientTypes.BucketLoggingStatus.writingClosure(_:to:)) } } @@ -19186,24 +16794,12 @@ public struct PutBucketLoggingInput: Swift.Equatable { } } -struct PutBucketLoggingInputBody: Swift.Equatable { - let bucketLoggingStatus: S3ClientTypes.BucketLoggingStatus? -} - -extension PutBucketLoggingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketLoggingStatus = "BucketLoggingStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketLoggingStatusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketLoggingStatus.self, forKey: .bucketLoggingStatus) - bucketLoggingStatus = bucketLoggingStatusDecoded - } -} +extension PutBucketLoggingOutput { -extension PutBucketLoggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketLoggingOutput() + } } } @@ -19212,23 +16808,23 @@ public struct PutBucketLoggingOutput: Swift.Equatable { public init() { } } -enum PutBucketLoggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketLoggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketMetricsConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metricsConfiguration = "MetricsConfiguration" - } - static func writingClosure(_ value: PutBucketMetricsConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("MetricsConfiguration")].write(value.metricsConfiguration, writingClosure: S3ClientTypes.MetricsConfiguration.writingClosure(_:to:)) + try writer["MetricsConfiguration"].write(value.metricsConfiguration, writingClosure: S3ClientTypes.MetricsConfiguration.writingClosure(_:to:)) } } @@ -19292,24 +16888,12 @@ public struct PutBucketMetricsConfigurationInput: Swift.Equatable { } } -struct PutBucketMetricsConfigurationInputBody: Swift.Equatable { - let metricsConfiguration: S3ClientTypes.MetricsConfiguration? -} +extension PutBucketMetricsConfigurationOutput { -extension PutBucketMetricsConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metricsConfiguration = "MetricsConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let metricsConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.MetricsConfiguration.self, forKey: .metricsConfiguration) - metricsConfiguration = metricsConfigurationDecoded - } -} - -extension PutBucketMetricsConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketMetricsConfigurationOutput() + } } } @@ -19318,23 +16902,23 @@ public struct PutBucketMetricsConfigurationOutput: Swift.Equatable { public init() { } } -enum PutBucketMetricsConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketMetricsConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketNotificationConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case notificationConfiguration = "NotificationConfiguration" - } - static func writingClosure(_ value: PutBucketNotificationConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("NotificationConfiguration")].write(value.notificationConfiguration, writingClosure: S3ClientTypes.NotificationConfiguration.writingClosure(_:to:)) + try writer["NotificationConfiguration"].write(value.notificationConfiguration, writingClosure: S3ClientTypes.NotificationConfiguration.writingClosure(_:to:)) } } @@ -19394,24 +16978,12 @@ public struct PutBucketNotificationConfigurationInput: Swift.Equatable { } } -struct PutBucketNotificationConfigurationInputBody: Swift.Equatable { - let notificationConfiguration: S3ClientTypes.NotificationConfiguration? -} +extension PutBucketNotificationConfigurationOutput { -extension PutBucketNotificationConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case notificationConfiguration = "NotificationConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let notificationConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.NotificationConfiguration.self, forKey: .notificationConfiguration) - notificationConfiguration = notificationConfigurationDecoded - } -} - -extension PutBucketNotificationConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketNotificationConfigurationOutput() + } } } @@ -19420,23 +16992,23 @@ public struct PutBucketNotificationConfigurationOutput: Swift.Equatable { public init() { } } -enum PutBucketNotificationConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketNotificationConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketOwnershipControlsInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ownershipControls = "OwnershipControls" - } - static func writingClosure(_ value: PutBucketOwnershipControlsInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("OwnershipControls")].write(value.ownershipControls, writingClosure: S3ClientTypes.OwnershipControls.writingClosure(_:to:)) + try writer["OwnershipControls"].write(value.ownershipControls, writingClosure: S3ClientTypes.OwnershipControls.writingClosure(_:to:)) } } @@ -19496,24 +17068,12 @@ public struct PutBucketOwnershipControlsInput: Swift.Equatable { } } -struct PutBucketOwnershipControlsInputBody: Swift.Equatable { - let ownershipControls: S3ClientTypes.OwnershipControls? -} - -extension PutBucketOwnershipControlsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ownershipControls = "OwnershipControls" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownershipControlsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.OwnershipControls.self, forKey: .ownershipControls) - ownershipControls = ownershipControlsDecoded - } -} +extension PutBucketOwnershipControlsOutput { -extension PutBucketOwnershipControlsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketOwnershipControlsOutput() + } } } @@ -19522,23 +17082,23 @@ public struct PutBucketOwnershipControlsOutput: Swift.Equatable { public init() { } } -enum PutBucketOwnershipControlsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketOwnershipControlsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - static func writingClosure(_ value: PutBucketPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Policy")].write(value.policy) + try writer["Policy"].write(value.policy) } } @@ -19623,24 +17183,12 @@ public struct PutBucketPolicyInput: Swift.Equatable { } } -struct PutBucketPolicyInputBody: Swift.Equatable { - let policy: Swift.String? -} - -extension PutBucketPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} +extension PutBucketPolicyOutput { -extension PutBucketPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketPolicyOutput() + } } } @@ -19649,23 +17197,23 @@ public struct PutBucketPolicyOutput: Swift.Equatable { public init() { } } -enum PutBucketPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketReplicationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationConfiguration = "ReplicationConfiguration" - } - static func writingClosure(_ value: PutBucketReplicationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ReplicationConfiguration")].write(value.replicationConfiguration, writingClosure: S3ClientTypes.ReplicationConfiguration.writingClosure(_:to:)) + try writer["ReplicationConfiguration"].write(value.replicationConfiguration, writingClosure: S3ClientTypes.ReplicationConfiguration.writingClosure(_:to:)) } } @@ -19739,24 +17287,12 @@ public struct PutBucketReplicationInput: Swift.Equatable { } } -struct PutBucketReplicationInputBody: Swift.Equatable { - let replicationConfiguration: S3ClientTypes.ReplicationConfiguration? -} - -extension PutBucketReplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationConfiguration = "ReplicationConfiguration" - } +extension PutBucketReplicationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicationConfiguration.self, forKey: .replicationConfiguration) - replicationConfiguration = replicationConfigurationDecoded - } -} - -extension PutBucketReplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketReplicationOutput() + } } } @@ -19765,23 +17301,23 @@ public struct PutBucketReplicationOutput: Swift.Equatable { public init() { } } -enum PutBucketReplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketReplicationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketRequestPaymentInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case requestPaymentConfiguration = "RequestPaymentConfiguration" - } - static func writingClosure(_ value: PutBucketRequestPaymentInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("RequestPaymentConfiguration")].write(value.requestPaymentConfiguration, writingClosure: S3ClientTypes.RequestPaymentConfiguration.writingClosure(_:to:)) + try writer["RequestPaymentConfiguration"].write(value.requestPaymentConfiguration, writingClosure: S3ClientTypes.RequestPaymentConfiguration.writingClosure(_:to:)) } } @@ -19848,24 +17384,12 @@ public struct PutBucketRequestPaymentInput: Swift.Equatable { } } -struct PutBucketRequestPaymentInputBody: Swift.Equatable { - let requestPaymentConfiguration: S3ClientTypes.RequestPaymentConfiguration? -} - -extension PutBucketRequestPaymentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case requestPaymentConfiguration = "RequestPaymentConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let requestPaymentConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.RequestPaymentConfiguration.self, forKey: .requestPaymentConfiguration) - requestPaymentConfiguration = requestPaymentConfigurationDecoded - } -} +extension PutBucketRequestPaymentOutput { -extension PutBucketRequestPaymentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketRequestPaymentOutput() + } } } @@ -19874,23 +17398,23 @@ public struct PutBucketRequestPaymentOutput: Swift.Equatable { public init() { } } -enum PutBucketRequestPaymentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketRequestPaymentOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketTaggingInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagging = "Tagging" - } - static func writingClosure(_ value: PutBucketTaggingInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Tagging")].write(value.tagging, writingClosure: S3ClientTypes.Tagging.writingClosure(_:to:)) + try writer["Tagging"].write(value.tagging, writingClosure: S3ClientTypes.Tagging.writingClosure(_:to:)) } } @@ -19957,24 +17481,12 @@ public struct PutBucketTaggingInput: Swift.Equatable { } } -struct PutBucketTaggingInputBody: Swift.Equatable { - let tagging: S3ClientTypes.Tagging? -} - -extension PutBucketTaggingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagging = "Tagging" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let taggingDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Tagging.self, forKey: .tagging) - tagging = taggingDecoded - } -} +extension PutBucketTaggingOutput { -extension PutBucketTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketTaggingOutput() + } } } @@ -19983,23 +17495,23 @@ public struct PutBucketTaggingOutput: Swift.Equatable { public init() { } } -enum PutBucketTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketVersioningInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case versioningConfiguration = "VersioningConfiguration" - } - static func writingClosure(_ value: PutBucketVersioningInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("VersioningConfiguration")].write(value.versioningConfiguration, writingClosure: S3ClientTypes.VersioningConfiguration.writingClosure(_:to:)) + try writer["VersioningConfiguration"].write(value.versioningConfiguration, writingClosure: S3ClientTypes.VersioningConfiguration.writingClosure(_:to:)) } } @@ -20073,24 +17585,12 @@ public struct PutBucketVersioningInput: Swift.Equatable { } } -struct PutBucketVersioningInputBody: Swift.Equatable { - let versioningConfiguration: S3ClientTypes.VersioningConfiguration? -} - -extension PutBucketVersioningInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case versioningConfiguration = "VersioningConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let versioningConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.VersioningConfiguration.self, forKey: .versioningConfiguration) - versioningConfiguration = versioningConfigurationDecoded - } -} +extension PutBucketVersioningOutput { -extension PutBucketVersioningOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketVersioningOutput() + } } } @@ -20099,23 +17599,23 @@ public struct PutBucketVersioningOutput: Swift.Equatable { public init() { } } -enum PutBucketVersioningOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketVersioningOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutBucketWebsiteInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case websiteConfiguration = "WebsiteConfiguration" - } - static func writingClosure(_ value: PutBucketWebsiteInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("WebsiteConfiguration")].write(value.websiteConfiguration, writingClosure: S3ClientTypes.WebsiteConfiguration.writingClosure(_:to:)) + try writer["WebsiteConfiguration"].write(value.websiteConfiguration, writingClosure: S3ClientTypes.WebsiteConfiguration.writingClosure(_:to:)) } } @@ -20182,24 +17682,12 @@ public struct PutBucketWebsiteInput: Swift.Equatable { } } -struct PutBucketWebsiteInputBody: Swift.Equatable { - let websiteConfiguration: S3ClientTypes.WebsiteConfiguration? -} +extension PutBucketWebsiteOutput { -extension PutBucketWebsiteInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case websiteConfiguration = "WebsiteConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let websiteConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.WebsiteConfiguration.self, forKey: .websiteConfiguration) - websiteConfiguration = websiteConfigurationDecoded - } -} - -extension PutBucketWebsiteOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketWebsiteOutput() + } } } @@ -20208,23 +17696,23 @@ public struct PutBucketWebsiteOutput: Swift.Equatable { public init() { } } -enum PutBucketWebsiteOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutBucketWebsiteOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutObjectAclInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlPolicy = "AccessControlPolicy" - } - static func writingClosure(_ value: PutObjectAclInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlPolicy")].write(value.accessControlPolicy, writingClosure: S3ClientTypes.AccessControlPolicy.writingClosure(_:to:)) + try writer["AccessControlPolicy"].write(value.accessControlPolicy, writingClosure: S3ClientTypes.AccessControlPolicy.writingClosure(_:to:)) } } @@ -20355,28 +17843,15 @@ public struct PutObjectAclInput: Swift.Equatable { } } -struct PutObjectAclInputBody: Swift.Equatable { - let accessControlPolicy: S3ClientTypes.AccessControlPolicy? -} - -extension PutObjectAclInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlPolicy = "AccessControlPolicy" - } +extension PutObjectAclOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessControlPolicyDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AccessControlPolicy.self, forKey: .accessControlPolicy) - accessControlPolicy = accessControlPolicyDecoded - } -} - -extension PutObjectAclOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = PutObjectAclOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + return value } } } @@ -20393,12 +17868,17 @@ public struct PutObjectAclOutput: Swift.Equatable { } } -enum PutObjectAclOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "NoSuchKey": return try await NoSuchKey(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutObjectAclOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "NoSuchKey": return try await NoSuchKey.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -20409,13 +17889,9 @@ extension PutObjectInput: Swift.CustomDebugStringConvertible { } extension PutObjectInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - } - static func writingClosure(_ value: PutObjectInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Body")].write(value.body) + try writer["Body"].write(value.body) } } @@ -20535,15 +18011,7 @@ extension PutObjectInput { public func presignURL(config: S3Client.S3ClientConfiguration, expiration: Foundation.TimeInterval) async throws -> ClientRuntime.URL? { let serviceName = "S3" let input = self - let encoder = ClientRuntime.JSONEncoder() - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putObject") @@ -20560,11 +18028,12 @@ extension PutObjectInput { operation.initializeStep.intercept(position: .after, middleware: ClientRuntime.URLHostMiddleware()) let endpointParams = EndpointParams(accelerate: config.serviceSpecific.accelerate ?? false, bucket: input.bucket, disableMultiRegionAccessPoints: config.serviceSpecific.disableMultiRegionAccessPoints ?? false, disableS3ExpressSessionAuth: config.serviceSpecific.disableS3ExpressSessionAuth, endpoint: config.endpoint, forcePathStyle: config.serviceSpecific.forcePathStyle ?? false, key: input.key, region: config.region, useArnRegion: config.serviceSpecific.useArnRegion, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false, useGlobalEndpoint: config.serviceSpecific.useGlobalEndpoint ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.serializeStep.intercept(position: .after, middleware: PutObjectPresignedURLMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signatureType: .requestQueryParams, useDoubleURIEncode: false, shouldNormalizeURIPath: false, expiration: expiration, unsignedBody: true, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let presignedRequestBuilder = try await operation.presignedRequest(context: context, input: input, output: PutObjectOutput(), next: ClientRuntime.NoopHandler()) @@ -20579,15 +18048,7 @@ extension PutObjectInput { public func presign(config: S3Client.S3ClientConfiguration, expiration: Foundation.TimeInterval) async throws -> ClientRuntime.SdkHttpRequest? { let serviceName = "S3" let input = self - let encoder = ClientRuntime.JSONEncoder() - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putObject") @@ -20609,11 +18070,12 @@ extension PutObjectInput { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(PutObjectInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/octet-stream")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BlobStreamBodyMiddleware(keyPath: \.body)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, expiration: expiration, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutObjectOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutObjectOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutObjectOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let presignedRequestBuilder = try await operation.presignedRequest(context: context, input: input, output: PutObjectOutput(), next: ClientRuntime.NoopHandler()) @@ -20865,38 +18327,10 @@ public struct PutObjectInput: Swift.Equatable { } } -struct PutObjectInputBody: Swift.Equatable { - let body: ClientRuntime.ByteStream? -} - -extension PutObjectInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.body) { - do { - let bodyDecoded = try containerValues.decodeIfPresent(ClientRuntime.ByteStream.self, forKey: .body) - body = bodyDecoded - } catch { - body = ClientRuntime.ByteStream.data("".data(using: .utf8)!) - } - } else { - body = nil - } - } -} - extension PutObjectLegalHoldInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case legalHold = "LegalHold" - } - static func writingClosure(_ value: PutObjectLegalHoldInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("LegalHold")].write(value.legalHold, writingClosure: S3ClientTypes.ObjectLockLegalHold.writingClosure(_:to:)) + try writer["LegalHold"].write(value.legalHold, writingClosure: S3ClientTypes.ObjectLockLegalHold.writingClosure(_:to:)) } } @@ -20985,28 +18419,15 @@ public struct PutObjectLegalHoldInput: Swift.Equatable { } } -struct PutObjectLegalHoldInputBody: Swift.Equatable { - let legalHold: S3ClientTypes.ObjectLockLegalHold? -} +extension PutObjectLegalHoldOutput { -extension PutObjectLegalHoldInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case legalHold = "LegalHold" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let legalHoldDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockLegalHold.self, forKey: .legalHold) - legalHold = legalHoldDecoded - } -} - -extension PutObjectLegalHoldOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = PutObjectLegalHoldOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + return value } } } @@ -21023,23 +18444,23 @@ public struct PutObjectLegalHoldOutput: Swift.Equatable { } } -enum PutObjectLegalHoldOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutObjectLegalHoldOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutObjectLockConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objectLockConfiguration = "ObjectLockConfiguration" - } - static func writingClosure(_ value: PutObjectLockConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ObjectLockConfiguration")].write(value.objectLockConfiguration, writingClosure: S3ClientTypes.ObjectLockConfiguration.writingClosure(_:to:)) + try writer["ObjectLockConfiguration"].write(value.objectLockConfiguration, writingClosure: S3ClientTypes.ObjectLockConfiguration.writingClosure(_:to:)) } } @@ -21119,28 +18540,15 @@ public struct PutObjectLockConfigurationInput: Swift.Equatable { } } -struct PutObjectLockConfigurationInputBody: Swift.Equatable { - let objectLockConfiguration: S3ClientTypes.ObjectLockConfiguration? -} +extension PutObjectLockConfigurationOutput { -extension PutObjectLockConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objectLockConfiguration = "ObjectLockConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let objectLockConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockConfiguration.self, forKey: .objectLockConfiguration) - objectLockConfiguration = objectLockConfigurationDecoded - } -} - -extension PutObjectLockConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = PutObjectLockConfigurationOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + return value } } } @@ -21157,11 +18565,15 @@ public struct PutObjectLockConfigurationOutput: Swift.Equatable { } } -enum PutObjectLockConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutObjectLockConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -21171,77 +18583,54 @@ extension PutObjectOutput: Swift.CustomDebugStringConvertible { "PutObjectOutput(bucketKeyEnabled: \(Swift.String(describing: bucketKeyEnabled)), checksumCRC32: \(Swift.String(describing: checksumCRC32)), checksumCRC32C: \(Swift.String(describing: checksumCRC32C)), checksumSHA1: \(Swift.String(describing: checksumSHA1)), checksumSHA256: \(Swift.String(describing: checksumSHA256)), eTag: \(Swift.String(describing: eTag)), expiration: \(Swift.String(describing: expiration)), requestCharged: \(Swift.String(describing: requestCharged)), sseCustomerAlgorithm: \(Swift.String(describing: sseCustomerAlgorithm)), sseCustomerKeyMD5: \(Swift.String(describing: sseCustomerKeyMD5)), serverSideEncryption: \(Swift.String(describing: serverSideEncryption)), versionId: \(Swift.String(describing: versionId)), ssekmsEncryptionContext: \"CONTENT_REDACTED\", ssekmsKeyId: \"CONTENT_REDACTED\")"} } -extension PutObjectOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { - self.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false - } else { - self.bucketKeyEnabled = nil - } - if let checksumCRC32HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32") { - self.checksumCRC32 = checksumCRC32HeaderValue - } else { - self.checksumCRC32 = nil - } - if let checksumCRC32CHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32c") { - self.checksumCRC32C = checksumCRC32CHeaderValue - } else { - self.checksumCRC32C = nil - } - if let checksumSHA1HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha1") { - self.checksumSHA1 = checksumSHA1HeaderValue - } else { - self.checksumSHA1 = nil - } - if let checksumSHA256HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha256") { - self.checksumSHA256 = checksumSHA256HeaderValue - } else { - self.checksumSHA256 = nil - } - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { - self.expiration = expirationHeaderValue - } else { - self.expiration = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { - self.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue - } else { - self.sseCustomerAlgorithm = nil - } - if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { - self.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue - } else { - self.sseCustomerKeyMD5 = nil - } - if let ssekmsEncryptionContextHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-context") { - self.ssekmsEncryptionContext = ssekmsEncryptionContextHeaderValue - } else { - self.ssekmsEncryptionContext = nil - } - if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { - self.ssekmsKeyId = ssekmsKeyIdHeaderValue - } else { - self.ssekmsKeyId = nil - } - if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { - self.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) - } else { - self.serverSideEncryption = nil - } - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil +extension PutObjectOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = PutObjectOutput() + if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { + value.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false + } + if let checksumCRC32HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32") { + value.checksumCRC32 = checksumCRC32HeaderValue + } + if let checksumCRC32CHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32c") { + value.checksumCRC32C = checksumCRC32CHeaderValue + } + if let checksumSHA1HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha1") { + value.checksumSHA1 = checksumSHA1HeaderValue + } + if let checksumSHA256HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha256") { + value.checksumSHA256 = checksumSHA256HeaderValue + } + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let expirationHeaderValue = httpResponse.headers.value(for: "x-amz-expiration") { + value.expiration = expirationHeaderValue + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { + value.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue + } + if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { + value.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue + } + if let ssekmsEncryptionContextHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-context") { + value.ssekmsEncryptionContext = ssekmsEncryptionContextHeaderValue + } + if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { + value.ssekmsKeyId = ssekmsKeyIdHeaderValue + } + if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { + value.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) + } + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + return value } } } @@ -21310,23 +18699,23 @@ public struct PutObjectOutput: Swift.Equatable { } } -enum PutObjectOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutObjectOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutObjectRetentionInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case retention = "Retention" - } - static func writingClosure(_ value: PutObjectRetentionInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Retention")].write(value.retention, writingClosure: S3ClientTypes.ObjectLockRetention.writingClosure(_:to:)) + try writer["Retention"].write(value.retention, writingClosure: S3ClientTypes.ObjectLockRetention.writingClosure(_:to:)) } } @@ -21418,32 +18807,19 @@ public struct PutObjectRetentionInput: Swift.Equatable { self.key = key self.requestPayer = requestPayer self.retention = retention - self.versionId = versionId - } -} - -struct PutObjectRetentionInputBody: Swift.Equatable { - let retention: S3ClientTypes.ObjectLockRetention? -} - -extension PutObjectRetentionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case retention = "Retention" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let retentionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectLockRetention.self, forKey: .retention) - retention = retentionDecoded + self.versionId = versionId } } -extension PutObjectRetentionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil +extension PutObjectRetentionOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = PutObjectRetentionOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + return value } } } @@ -21460,23 +18836,23 @@ public struct PutObjectRetentionOutput: Swift.Equatable { } } -enum PutObjectRetentionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutObjectRetentionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutObjectTaggingInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagging = "Tagging" - } - static func writingClosure(_ value: PutObjectTaggingInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Tagging")].write(value.tagging, writingClosure: S3ClientTypes.Tagging.writingClosure(_:to:)) + try writer["Tagging"].write(value.tagging, writingClosure: S3ClientTypes.Tagging.writingClosure(_:to:)) } } @@ -21566,28 +18942,15 @@ public struct PutObjectTaggingInput: Swift.Equatable { } } -struct PutObjectTaggingInputBody: Swift.Equatable { - let tagging: S3ClientTypes.Tagging? -} - -extension PutObjectTaggingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagging = "Tagging" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let taggingDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Tagging.self, forKey: .tagging) - tagging = taggingDecoded - } -} +extension PutObjectTaggingOutput { -extension PutObjectTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { - self.versionId = versionIdHeaderValue - } else { - self.versionId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = PutObjectTaggingOutput() + if let versionIdHeaderValue = httpResponse.headers.value(for: "x-amz-version-id") { + value.versionId = versionIdHeaderValue + } + return value } } } @@ -21604,23 +18967,23 @@ public struct PutObjectTaggingOutput: Swift.Equatable { } } -enum PutObjectTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutObjectTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } extension PutPublicAccessBlockInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - } - static func writingClosure(_ value: PutPublicAccessBlockInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("PublicAccessBlockConfiguration")].write(value.publicAccessBlockConfiguration, writingClosure: S3ClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) + try writer["PublicAccessBlockConfiguration"].write(value.publicAccessBlockConfiguration, writingClosure: S3ClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) } } @@ -21687,24 +19050,12 @@ public struct PutPublicAccessBlockInput: Swift.Equatable { } } -struct PutPublicAccessBlockInputBody: Swift.Equatable { - let publicAccessBlockConfiguration: S3ClientTypes.PublicAccessBlockConfiguration? -} - -extension PutPublicAccessBlockInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicAccessBlockConfigurationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlockConfiguration) - publicAccessBlockConfiguration = publicAccessBlockConfigurationDecoded - } -} +extension PutPublicAccessBlockOutput { -extension PutPublicAccessBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutPublicAccessBlockOutput() + } } } @@ -21713,57 +19064,39 @@ public struct PutPublicAccessBlockOutput: Swift.Equatable { public init() { } } -enum PutPublicAccessBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum PutPublicAccessBlockOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.QueueConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Event" - case filter = "Filter" - case id = "Id" - case queueArn = "Queue" - } +extension S3ClientTypes.QueueConfiguration { static func writingClosure(_ value: S3ClientTypes.QueueConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Event")].writeList(value.events, memberWritingClosure: S3ClientTypes.Event.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.NotificationConfigurationFilter.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("Queue")].write(value.queueArn) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let queueArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueArn) - queueArn = queueArnDecoded - if containerValues.contains(.events) { - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .events) - if eventsWrappedContainer != nil { - let eventsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Event].self, forKey: .events) - var eventsBuffer:[S3ClientTypes.Event]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [S3ClientTypes.Event]() - for enumContainer0 in eventsContainer { - eventsBuffer?.append(enumContainer0) - } - } - events = eventsBuffer - } else { - events = [] - } - } else { - events = nil + try writer["Event"].writeList(value.events, memberWritingClosure: S3ClientTypes.Event.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.NotificationConfigurationFilter.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["Queue"].write(value.queueArn) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.QueueConfiguration() + value.id = try reader["Id"].readIfPresent() + value.queueArn = try reader["Queue"].readIfPresent() + value.events = try reader["Event"].readListIfPresent(memberReadingClosure: S3ClientTypes.Event.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.NotificationConfigurationFilter.readingClosure) + return value } - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.NotificationConfigurationFilter.self, forKey: .filter) - filter = filterDecoded } } @@ -21829,27 +19162,19 @@ extension S3ClientTypes { } } -extension S3ClientTypes.RecordsEvent: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case payload = "Payload" - } +extension S3ClientTypes.RecordsEvent { static func writingClosure(_ value: S3ClientTypes.RecordsEvent?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Payload")].write(value.payload) + try writer["Payload"].write(value.payload) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.payload) { - do { - let payloadDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .payload) - payload = payloadDecoded - } catch { - payload = "".data(using: .utf8) - } - } else { - payload = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.RecordsEvent() + value.payload = try reader["Payload"].readIfPresent() + return value } } } @@ -21870,36 +19195,28 @@ extension S3ClientTypes { } -extension S3ClientTypes.Redirect: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostName = "HostName" - case httpRedirectCode = "HttpRedirectCode" - case `protocol` = "Protocol" - case replaceKeyPrefixWith = "ReplaceKeyPrefixWith" - case replaceKeyWith = "ReplaceKeyWith" - } +extension S3ClientTypes.Redirect { static func writingClosure(_ value: S3ClientTypes.Redirect?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HostName")].write(value.hostName) - try writer[.init("HttpRedirectCode")].write(value.httpRedirectCode) - try writer[.init("Protocol")].write(value.`protocol`) - try writer[.init("ReplaceKeyPrefixWith")].write(value.replaceKeyPrefixWith) - try writer[.init("ReplaceKeyWith")].write(value.replaceKeyWith) + try writer["HostName"].write(value.hostName) + try writer["HttpRedirectCode"].write(value.httpRedirectCode) + try writer["Protocol"].write(value.`protocol`) + try writer["ReplaceKeyPrefixWith"].write(value.replaceKeyPrefixWith) + try writer["ReplaceKeyWith"].write(value.replaceKeyWith) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostName) - hostName = hostNameDecoded - let httpRedirectCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .httpRedirectCode) - httpRedirectCode = httpRedirectCodeDecoded - let protocolDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ModelProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded - let replaceKeyPrefixWithDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replaceKeyPrefixWith) - replaceKeyPrefixWith = replaceKeyPrefixWithDecoded - let replaceKeyWithDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replaceKeyWith) - replaceKeyWith = replaceKeyWithDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Redirect() + value.hostName = try reader["HostName"].readIfPresent() + value.httpRedirectCode = try reader["HttpRedirectCode"].readIfPresent() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.replaceKeyPrefixWith = try reader["ReplaceKeyPrefixWith"].readIfPresent() + value.replaceKeyWith = try reader["ReplaceKeyWith"].readIfPresent() + return value + } } } @@ -21935,24 +19252,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.RedirectAllRequestsTo: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case hostName = "HostName" - case `protocol` = "Protocol" - } +extension S3ClientTypes.RedirectAllRequestsTo { static func writingClosure(_ value: S3ClientTypes.RedirectAllRequestsTo?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HostName")].write(value.hostName) - try writer[.init("Protocol")].write(value.`protocol`) + try writer["HostName"].write(value.hostName) + try writer["Protocol"].write(value.`protocol`) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let hostNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .hostName) - hostName = hostNameDecoded - let protocolDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ModelProtocol.self, forKey: .protocol) - `protocol` = protocolDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.RedirectAllRequestsTo() + value.hostName = try reader["HostName"].readIfPresent() + value.`protocol` = try reader["Protocol"].readIfPresent() + return value + } } } @@ -21977,20 +19292,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.ReplicaModifications: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ClientTypes.ReplicaModifications { static func writingClosure(_ value: S3ClientTypes.ReplicaModifications?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicaModificationsStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ReplicaModifications() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -22043,39 +19358,21 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ReplicationConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case role = "Role" - case rules = "Rule" - } +extension S3ClientTypes.ReplicationConfiguration { static func writingClosure(_ value: S3ClientTypes.ReplicationConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Role")].write(value.role) - try writer[.init("Rule")].writeList(value.rules, memberWritingClosure: S3ClientTypes.ReplicationRule.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .role) - role = roleDecoded - if containerValues.contains(.rules) { - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .rules) - if rulesWrappedContainer != nil { - let rulesContainer = try containerValues.decodeIfPresent([S3ClientTypes.ReplicationRule].self, forKey: .rules) - var rulesBuffer:[S3ClientTypes.ReplicationRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [S3ClientTypes.ReplicationRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] - } - } else { - rules = nil + try writer["Role"].write(value.role) + try writer["Rule"].writeList(value.rules, memberWritingClosure: S3ClientTypes.ReplicationRule.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ReplicationConfiguration() + value.role = try reader["Role"].readIfPresent() + value.rules = try reader["Rule"].readListIfPresent(memberReadingClosure: S3ClientTypes.ReplicationRule.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -22102,52 +19399,36 @@ extension S3ClientTypes { } -extension S3ClientTypes.ReplicationRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case deleteMarkerReplication = "DeleteMarkerReplication" - case destination = "Destination" - case existingObjectReplication = "ExistingObjectReplication" - case filter = "Filter" - case id = "ID" - case `prefix` = "Prefix" - case priority = "Priority" - case sourceSelectionCriteria = "SourceSelectionCriteria" - case status = "Status" - } +extension S3ClientTypes.ReplicationRule { static func writingClosure(_ value: S3ClientTypes.ReplicationRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DeleteMarkerReplication")].write(value.deleteMarkerReplication, writingClosure: S3ClientTypes.DeleteMarkerReplication.writingClosure(_:to:)) - try writer[.init("Destination")].write(value.destination, writingClosure: S3ClientTypes.Destination.writingClosure(_:to:)) - try writer[.init("ExistingObjectReplication")].write(value.existingObjectReplication, writingClosure: S3ClientTypes.ExistingObjectReplication.writingClosure(_:to:)) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.ReplicationRuleFilter.writingClosure(_:to:)) - try writer[.init("ID")].write(value.id) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Priority")].write(value.priority) - try writer[.init("SourceSelectionCriteria")].write(value.sourceSelectionCriteria, writingClosure: S3ClientTypes.SourceSelectionCriteria.writingClosure(_:to:)) - try writer[.init("Status")].write(value.status) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) - priority = priorityDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicationRuleFilter.self, forKey: .filter) - filter = filterDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicationRuleStatus.self, forKey: .status) - status = statusDecoded - let sourceSelectionCriteriaDecoded = try containerValues.decodeIfPresent(S3ClientTypes.SourceSelectionCriteria.self, forKey: .sourceSelectionCriteria) - sourceSelectionCriteria = sourceSelectionCriteriaDecoded - let existingObjectReplicationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ExistingObjectReplication.self, forKey: .existingObjectReplication) - existingObjectReplication = existingObjectReplicationDecoded - let destinationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Destination.self, forKey: .destination) - destination = destinationDecoded - let deleteMarkerReplicationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.DeleteMarkerReplication.self, forKey: .deleteMarkerReplication) - deleteMarkerReplication = deleteMarkerReplicationDecoded + try writer["DeleteMarkerReplication"].write(value.deleteMarkerReplication, writingClosure: S3ClientTypes.DeleteMarkerReplication.writingClosure(_:to:)) + try writer["Destination"].write(value.destination, writingClosure: S3ClientTypes.Destination.writingClosure(_:to:)) + try writer["ExistingObjectReplication"].write(value.existingObjectReplication, writingClosure: S3ClientTypes.ExistingObjectReplication.writingClosure(_:to:)) + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.ReplicationRuleFilter.writingClosure(_:to:)) + try writer["ID"].write(value.id) + try writer["Prefix"].write(value.`prefix`) + try writer["Priority"].write(value.priority) + try writer["SourceSelectionCriteria"].write(value.sourceSelectionCriteria, writingClosure: S3ClientTypes.SourceSelectionCriteria.writingClosure(_:to:)) + try writer["Status"].write(value.status) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ReplicationRule() + value.id = try reader["ID"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.ReplicationRuleFilter.readingClosure) + value.status = try reader["Status"].readIfPresent() + value.sourceSelectionCriteria = try reader["SourceSelectionCriteria"].readIfPresent(readingClosure: S3ClientTypes.SourceSelectionCriteria.readingClosure) + value.existingObjectReplication = try reader["ExistingObjectReplication"].readIfPresent(readingClosure: S3ClientTypes.ExistingObjectReplication.readingClosure) + value.destination = try reader["Destination"].readIfPresent(readingClosure: S3ClientTypes.Destination.readingClosure) + value.deleteMarkerReplication = try reader["DeleteMarkerReplication"].readIfPresent(readingClosure: S3ClientTypes.DeleteMarkerReplication.readingClosure) + return value + } } } @@ -22202,39 +19483,21 @@ extension S3ClientTypes { } -extension S3ClientTypes.ReplicationRuleAndOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `prefix` = "Prefix" - case tags = "Tag" - } +extension S3ClientTypes.ReplicationRuleAndOperator { static func writingClosure(_ value: S3ClientTypes.ReplicationRuleAndOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tag")].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - if containerValues.contains(.tags) { - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .tags) - if tagsWrappedContainer != nil { - let tagsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Tag].self, forKey: .tags) - var tagsBuffer:[S3ClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + try writer["Prefix"].write(value.`prefix`) + try writer["Tag"].writeList(value.tags, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ReplicationRuleAndOperator() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tags = try reader["Tag"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: true) + return value } } } @@ -22263,43 +19526,36 @@ extension S3ClientTypes { } -extension S3ClientTypes.ReplicationRuleFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case and = "And" - case `prefix` = "Prefix" - case tag = "Tag" - case sdkUnknown - } +extension S3ClientTypes.ReplicationRuleFilter { static func writingClosure(_ value: S3ClientTypes.ReplicationRuleFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } switch value { case let .and(and): - try writer[.init("And")].write(and, writingClosure: S3ClientTypes.ReplicationRuleAndOperator.writingClosure(_:to:)) + try writer["And"].write(and, writingClosure: S3ClientTypes.ReplicationRuleAndOperator.writingClosure(_:to:)) case let .`prefix`(`prefix`): - try writer[.init("Prefix")].write(`prefix`) + try writer["Prefix"].write(`prefix`) case let .tag(tag): - try writer[.init("Tag")].write(tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) + try writer["Tag"].write(tag, writingClosure: S3ClientTypes.Tag.writingClosure(_:to:)) case let .sdkUnknown(sdkUnknown): try writer[.init("sdkUnknown")].write(sdkUnknown) } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let key = containerValues.allKeys.first - switch key { - case .`prefix`: - let prefixDecoded = try containerValues.decode(Swift.String.self, forKey: .prefix) - self = .prefix(prefixDecoded) - case .tag: - let tagDecoded = try containerValues.decode(S3ClientTypes.Tag.self, forKey: .tag) - self = .tag(tagDecoded) - case .and: - let andDecoded = try containerValues.decode(S3ClientTypes.ReplicationRuleAndOperator.self, forKey: .and) - self = .and(andDecoded) - default: - self = .sdkUnknown("") + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + let name = reader.children.first?.nodeInfo.name + switch name { + case "Prefix": + return .`prefix`(try reader["Prefix"].read()) + case "Tag": + return .tag(try reader["Tag"].read(readingClosure: S3ClientTypes.Tag.readingClosure)) + case "And": + return .and(try reader["And"].read(readingClosure: S3ClientTypes.ReplicationRuleAndOperator.readingClosure)) + default: + return .sdkUnknown(name ?? "") + } } } } @@ -22395,24 +19651,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ReplicationTime: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - case time = "Time" - } +extension S3ClientTypes.ReplicationTime { static func writingClosure(_ value: S3ClientTypes.ReplicationTime?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) - try writer[.init("Time")].write(value.time, writingClosure: S3ClientTypes.ReplicationTimeValue.writingClosure(_:to:)) + try writer["Status"].write(value.status) + try writer["Time"].write(value.time, writingClosure: S3ClientTypes.ReplicationTimeValue.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicationTimeStatus.self, forKey: .status) - status = statusDecoded - let timeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicationTimeValue.self, forKey: .time) - time = timeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ReplicationTime() + value.status = try reader["Status"].readIfPresent() + value.time = try reader["Time"].readIfPresent(readingClosure: S3ClientTypes.ReplicationTimeValue.readingClosure) + return value + } } } @@ -22470,20 +19724,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ReplicationTimeValue: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case minutes = "Minutes" - } +extension S3ClientTypes.ReplicationTimeValue { static func writingClosure(_ value: S3ClientTypes.ReplicationTimeValue?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Minutes")].write(value.minutes) + try writer["Minutes"].write(value.minutes) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minutes) - minutes = minutesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ReplicationTimeValue() + value.minutes = try reader["Minutes"].readIfPresent() + return value + } } } @@ -22563,20 +19817,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.RequestPaymentConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case payer = "Payer" - } +extension S3ClientTypes.RequestPaymentConfiguration { static func writingClosure(_ value: S3ClientTypes.RequestPaymentConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Payer")].write(value.payer) + try writer["Payer"].write(value.payer) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let payerDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Payer.self, forKey: .payer) - payer = payerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.RequestPaymentConfiguration() + value.payer = try reader["Payer"].readIfPresent() + return value + } } } @@ -22597,20 +19851,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.RequestProgress: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - } +extension S3ClientTypes.RequestProgress { static func writingClosure(_ value: S3ClientTypes.RequestProgress?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Enabled")].write(value.enabled) + try writer["Enabled"].write(value.enabled) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) - enabled = enabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.RequestProgress() + value.enabled = try reader["Enabled"].readIfPresent() + return value + } } } @@ -22631,13 +19885,9 @@ extension S3ClientTypes { } extension RestoreObjectInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case restoreRequest = "RestoreRequest" - } - static func writingClosure(_ value: RestoreObjectInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("RestoreRequest")].write(value.restoreRequest, writingClosure: S3ClientTypes.RestoreRequest.writingClosure(_:to:)) + try writer["RestoreRequest"].write(value.restoreRequest, writingClosure: S3ClientTypes.RestoreRequest.writingClosure(_:to:)) } } @@ -22720,33 +19970,18 @@ public struct RestoreObjectInput: Swift.Equatable { } } -struct RestoreObjectInputBody: Swift.Equatable { - let restoreRequest: S3ClientTypes.RestoreRequest? -} - -extension RestoreObjectInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case restoreRequest = "RestoreRequest" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let restoreRequestDecoded = try containerValues.decodeIfPresent(S3ClientTypes.RestoreRequest.self, forKey: .restoreRequest) - restoreRequest = restoreRequestDecoded - } -} +extension RestoreObjectOutput { -extension RestoreObjectOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let restoreOutputPathHeaderValue = httpResponse.headers.value(for: "x-amz-restore-output-path") { - self.restoreOutputPath = restoreOutputPathHeaderValue - } else { - self.restoreOutputPath = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = RestoreObjectOutput() + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let restoreOutputPathHeaderValue = httpResponse.headers.value(for: "x-amz-restore-output-path") { + value.restoreOutputPath = restoreOutputPathHeaderValue + } + return value } } } @@ -22767,54 +20002,47 @@ public struct RestoreObjectOutput: Swift.Equatable { } } -enum RestoreObjectOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - case "ObjectAlreadyInActiveTierError": return try await ObjectAlreadyInActiveTierError(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum RestoreObjectOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: true) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + case "ObjectAlreadyInActiveTierError": return try await ObjectAlreadyInActiveTierError.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.RestoreRequest: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case days = "Days" - case description = "Description" - case glacierJobParameters = "GlacierJobParameters" - case outputLocation = "OutputLocation" - case selectParameters = "SelectParameters" - case tier = "Tier" - case type = "Type" - } +extension S3ClientTypes.RestoreRequest { static func writingClosure(_ value: S3ClientTypes.RestoreRequest?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Days")].write(value.days) - try writer[.init("Description")].write(value.description) - try writer[.init("GlacierJobParameters")].write(value.glacierJobParameters, writingClosure: S3ClientTypes.GlacierJobParameters.writingClosure(_:to:)) - try writer[.init("OutputLocation")].write(value.outputLocation, writingClosure: S3ClientTypes.OutputLocation.writingClosure(_:to:)) - try writer[.init("SelectParameters")].write(value.selectParameters, writingClosure: S3ClientTypes.SelectParameters.writingClosure(_:to:)) - try writer[.init("Tier")].write(value.tier) - try writer[.init("Type")].write(value.type) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let daysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .days) - days = daysDecoded - let glacierJobParametersDecoded = try containerValues.decodeIfPresent(S3ClientTypes.GlacierJobParameters.self, forKey: .glacierJobParameters) - glacierJobParameters = glacierJobParametersDecoded - let typeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.RestoreRequestType.self, forKey: .type) - type = typeDecoded - let tierDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Tier.self, forKey: .tier) - tier = tierDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let selectParametersDecoded = try containerValues.decodeIfPresent(S3ClientTypes.SelectParameters.self, forKey: .selectParameters) - selectParameters = selectParametersDecoded - let outputLocationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.OutputLocation.self, forKey: .outputLocation) - outputLocation = outputLocationDecoded + try writer["Days"].write(value.days) + try writer["Description"].write(value.description) + try writer["GlacierJobParameters"].write(value.glacierJobParameters, writingClosure: S3ClientTypes.GlacierJobParameters.writingClosure(_:to:)) + try writer["OutputLocation"].write(value.outputLocation, writingClosure: S3ClientTypes.OutputLocation.writingClosure(_:to:)) + try writer["SelectParameters"].write(value.selectParameters, writingClosure: S3ClientTypes.SelectParameters.writingClosure(_:to:)) + try writer["Tier"].write(value.tier) + try writer["Type"].write(value.type) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.RestoreRequest() + value.days = try reader["Days"].readIfPresent() + value.glacierJobParameters = try reader["GlacierJobParameters"].readIfPresent(readingClosure: S3ClientTypes.GlacierJobParameters.readingClosure) + value.type = try reader["Type"].readIfPresent() + value.tier = try reader["Tier"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.selectParameters = try reader["SelectParameters"].readIfPresent(readingClosure: S3ClientTypes.SelectParameters.readingClosure) + value.outputLocation = try reader["OutputLocation"].readIfPresent(readingClosure: S3ClientTypes.OutputLocation.readingClosure) + return value + } } } @@ -22887,24 +20115,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.RestoreStatus: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isRestoreInProgress = "IsRestoreInProgress" - case restoreExpiryDate = "RestoreExpiryDate" - } +extension S3ClientTypes.RestoreStatus { static func writingClosure(_ value: S3ClientTypes.RestoreStatus?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsRestoreInProgress")].write(value.isRestoreInProgress) - try writer[.init("RestoreExpiryDate")].writeTimestamp(value.restoreExpiryDate, format: .dateTime) + try writer["IsRestoreInProgress"].write(value.isRestoreInProgress) + try writer["RestoreExpiryDate"].writeTimestamp(value.restoreExpiryDate, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isRestoreInProgressDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isRestoreInProgress) - isRestoreInProgress = isRestoreInProgressDecoded - let restoreExpiryDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .restoreExpiryDate) - restoreExpiryDate = restoreExpiryDateDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.RestoreStatus() + value.isRestoreInProgress = try reader["IsRestoreInProgress"].readIfPresent() + value.restoreExpiryDate = try reader["RestoreExpiryDate"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -22928,24 +20154,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.RoutingRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case condition = "Condition" - case redirect = "Redirect" - } +extension S3ClientTypes.RoutingRule { static func writingClosure(_ value: S3ClientTypes.RoutingRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Condition")].write(value.condition, writingClosure: S3ClientTypes.Condition.writingClosure(_:to:)) - try writer[.init("Redirect")].write(value.redirect, writingClosure: S3ClientTypes.Redirect.writingClosure(_:to:)) + try writer["Condition"].write(value.condition, writingClosure: S3ClientTypes.Condition.writingClosure(_:to:)) + try writer["Redirect"].write(value.redirect, writingClosure: S3ClientTypes.Redirect.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let conditionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Condition.self, forKey: .condition) - condition = conditionDecoded - let redirectDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Redirect.self, forKey: .redirect) - redirect = redirectDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.RoutingRule() + value.condition = try reader["Condition"].readIfPresent(readingClosure: S3ClientTypes.Condition.readingClosure) + value.redirect = try reader["Redirect"].readIfPresent(readingClosure: S3ClientTypes.Redirect.readingClosure) + return value + } } } @@ -22972,35 +20196,19 @@ extension S3ClientTypes { public enum S3ClientTypes {} -extension S3ClientTypes.S3KeyFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filterRules = "FilterRule" - } +extension S3ClientTypes.S3KeyFilter { static func writingClosure(_ value: S3ClientTypes.S3KeyFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FilterRule")].writeList(value.filterRules, memberWritingClosure: S3ClientTypes.FilterRule.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.filterRules) { - let filterRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .filterRules) - if filterRulesWrappedContainer != nil { - let filterRulesContainer = try containerValues.decodeIfPresent([S3ClientTypes.FilterRule].self, forKey: .filterRules) - var filterRulesBuffer:[S3ClientTypes.FilterRule]? = nil - if let filterRulesContainer = filterRulesContainer { - filterRulesBuffer = [S3ClientTypes.FilterRule]() - for structureContainer0 in filterRulesContainer { - filterRulesBuffer?.append(structureContainer0) - } - } - filterRules = filterRulesBuffer - } else { - filterRules = [] - } - } else { - filterRules = nil + try writer["FilterRule"].writeList(value.filterRules, memberWritingClosure: S3ClientTypes.FilterRule.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.S3KeyFilter() + value.filterRules = try reader["FilterRule"].readListIfPresent(memberReadingClosure: S3ClientTypes.FilterRule.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -23021,82 +20229,34 @@ extension S3ClientTypes { } -extension S3ClientTypes.S3Location: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlList = "AccessControlList" - case bucketName = "BucketName" - case cannedACL = "CannedACL" - case encryption = "Encryption" - case `prefix` = "Prefix" - case storageClass = "StorageClass" - case tagging = "Tagging" - case userMetadata = "UserMetadata" - } +extension S3ClientTypes.S3Location { static func writingClosure(_ value: S3ClientTypes.S3Location?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlList")].writeList(value.accessControlList, memberWritingClosure: S3ClientTypes.Grant.writingClosure(_:to:), memberNodeInfo: .init("Grant"), isFlattened: false) - try writer[.init("BucketName")].write(value.bucketName) - try writer[.init("CannedACL")].write(value.cannedACL) - try writer[.init("Encryption")].write(value.encryption, writingClosure: S3ClientTypes.Encryption.writingClosure(_:to:)) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("StorageClass")].write(value.storageClass) - try writer[.init("Tagging")].write(value.tagging, writingClosure: S3ClientTypes.Tagging.writingClosure(_:to:)) - try writer[.init("UserMetadata")].writeList(value.userMetadata, memberWritingClosure: S3ClientTypes.MetadataEntry.writingClosure(_:to:), memberNodeInfo: .init("MetadataEntry"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketName) - bucketName = bucketNameDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let encryptionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Encryption.self, forKey: .encryption) - encryption = encryptionDecoded - let cannedACLDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ObjectCannedACL.self, forKey: .cannedACL) - cannedACL = cannedACLDecoded - if containerValues.contains(.accessControlList) { - struct KeyVal0{struct Grant{}} - let accessControlListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessControlList) - if let accessControlListWrappedContainer = accessControlListWrappedContainer { - let accessControlListContainer = try accessControlListWrappedContainer.decodeIfPresent([S3ClientTypes.Grant].self, forKey: .member) - var accessControlListBuffer:[S3ClientTypes.Grant]? = nil - if let accessControlListContainer = accessControlListContainer { - accessControlListBuffer = [S3ClientTypes.Grant]() - for structureContainer0 in accessControlListContainer { - accessControlListBuffer?.append(structureContainer0) - } - } - accessControlList = accessControlListBuffer - } else { - accessControlList = [] - } - } else { - accessControlList = nil - } - let taggingDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Tagging.self, forKey: .tagging) - tagging = taggingDecoded - if containerValues.contains(.userMetadata) { - struct KeyVal0{struct MetadataEntry{}} - let userMetadataWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .userMetadata) - if let userMetadataWrappedContainer = userMetadataWrappedContainer { - let userMetadataContainer = try userMetadataWrappedContainer.decodeIfPresent([S3ClientTypes.MetadataEntry].self, forKey: .member) - var userMetadataBuffer:[S3ClientTypes.MetadataEntry]? = nil - if let userMetadataContainer = userMetadataContainer { - userMetadataBuffer = [S3ClientTypes.MetadataEntry]() - for structureContainer0 in userMetadataContainer { - userMetadataBuffer?.append(structureContainer0) - } - } - userMetadata = userMetadataBuffer - } else { - userMetadata = [] - } - } else { - userMetadata = nil + try writer["AccessControlList"].writeList(value.accessControlList, memberWritingClosure: S3ClientTypes.Grant.writingClosure(_:to:), memberNodeInfo: "Grant", isFlattened: false) + try writer["BucketName"].write(value.bucketName) + try writer["CannedACL"].write(value.cannedACL) + try writer["Encryption"].write(value.encryption, writingClosure: S3ClientTypes.Encryption.writingClosure(_:to:)) + try writer["Prefix"].write(value.`prefix`) + try writer["StorageClass"].write(value.storageClass) + try writer["Tagging"].write(value.tagging, writingClosure: S3ClientTypes.Tagging.writingClosure(_:to:)) + try writer["UserMetadata"].writeList(value.userMetadata, memberWritingClosure: S3ClientTypes.MetadataEntry.writingClosure(_:to:), memberNodeInfo: "MetadataEntry", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.S3Location() + value.bucketName = try reader["BucketName"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.encryption = try reader["Encryption"].readIfPresent(readingClosure: S3ClientTypes.Encryption.readingClosure) + value.cannedACL = try reader["CannedACL"].readIfPresent() + value.accessControlList = try reader["AccessControlList"].readListIfPresent(memberReadingClosure: S3ClientTypes.Grant.readingClosure, memberNodeInfo: "Grant", isFlattened: false) + value.tagging = try reader["Tagging"].readIfPresent(readingClosure: S3ClientTypes.Tagging.readingClosure) + value.userMetadata = try reader["UserMetadata"].readListIfPresent(memberReadingClosure: S3ClientTypes.MetadataEntry.readingClosure, memberNodeInfo: "MetadataEntry", isFlattened: false) + value.storageClass = try reader["StorageClass"].readIfPresent() + return value } - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded } } @@ -23146,20 +20306,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.SSEKMS: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyId = "KeyId" - } +extension S3ClientTypes.SSEKMS { static func writingClosure(_ value: S3ClientTypes.SSEKMS?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KeyId")].write(value.keyId) + try writer["KeyId"].write(value.keyId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyId) - keyId = keyIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.SSEKMS() + value.keyId = try reader["KeyId"].readIfPresent() + return value + } } } @@ -23185,13 +20345,17 @@ extension S3ClientTypes { } -extension S3ClientTypes.SSES3: Swift.Decodable { +extension S3ClientTypes.SSES3 { static func writingClosure(_ value: S3ClientTypes.SSES3?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ClientTypes.SSES3() + } } } @@ -23204,24 +20368,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.ScanRange: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case end = "End" - case start = "Start" - } +extension S3ClientTypes.ScanRange { static func writingClosure(_ value: S3ClientTypes.ScanRange?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("End")].write(value.end) - try writer[.init("Start")].write(value.start) + try writer["End"].write(value.end) + try writer["Start"].write(value.start) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let startDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .start) - start = startDecoded - let endDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .end) - end = endDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ScanRange() + value.start = try reader["Start"].readIfPresent() + value.end = try reader["End"].readIfPresent() + return value + } } } @@ -23245,9 +20407,48 @@ extension S3ClientTypes { } -extension S3ClientTypes.SelectObjectContentEventStream: ClientRuntime.MessageUnmarshallable { - public init(message: ClientRuntime.EventStream.Message, decoder: ClientRuntime.ResponseDecoder) throws { - fatalError("Not implemented") +extension S3ClientTypes.SelectObjectContentEventStream { + static var unmarshal: ClientRuntime.UnmarshalClosure { + { message in + switch try message.type() { + case .event(let params): + switch params.eventType { + case "Records": + var event = S3ClientTypes.RecordsEvent() + event.payload = message.payload + return .records(event) + case "Stats": + var event = S3ClientTypes.StatsEvent() + event.details = try SmithyXML.XMLReadWrite.documentReadingClosure(rootNodeInfo: .init("Stats", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/")))(message.payload, S3ClientTypes.Stats.readingClosure) + return .stats(event) + case "Progress": + var event = S3ClientTypes.ProgressEvent() + event.details = try SmithyXML.XMLReadWrite.documentReadingClosure(rootNodeInfo: .init("Progress", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/")))(message.payload, S3ClientTypes.Progress.readingClosure) + return .progress(event) + case "Cont": + return .cont(try SmithyXML.XMLReadWrite.documentReadingClosure(rootNodeInfo: .init("ContinuationEvent", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/")))(message.payload, S3ClientTypes.ContinuationEvent.readingClosure)) + case "End": + return .end(try SmithyXML.XMLReadWrite.documentReadingClosure(rootNodeInfo: .init("EndEvent", namespaceDef: .init(prefix: "", uri: "http://s3.amazonaws.com/doc/2006-03-01/")))(message.payload, S3ClientTypes.EndEvent.readingClosure)) + default: + return .sdkUnknown("error processing event stream, unrecognized event: \(params.eventType)") + } + case .exception(let params): + let makeError: (ClientRuntime.EventStream.Message, ClientRuntime.EventStream.MessageType.ExceptionParams) throws -> Swift.Error = { message, params in + switch params.exceptionType { + default: + let httpResponse = HttpResponse(body: .data(message.payload), statusCode: .ok) + return AWSClientRuntime.UnknownAWSHTTPServiceError(httpResponse: httpResponse, message: "error processing event stream, unrecognized ':exceptionType': \(params.exceptionType); contentType: \(params.contentType ?? "nil")", requestID: nil, typeName: nil) + } + } + let error = try makeError(message, params) + throw error + case .error(let params): + let httpResponse = HttpResponse(body: .data(message.payload), statusCode: .ok) + throw AWSClientRuntime.UnknownAWSHTTPServiceError(httpResponse: httpResponse, message: "error processing event stream, unrecognized ':errorType': \(params.errorCode); message: \(params.message ?? "nil")", requestID: nil, typeName: nil) + case .unknown(messageType: let messageType): + throw ClientRuntime.ClientError.unknownError("unrecognized event stream message ':message-type': \(messageType)") + } + } } } @@ -23275,23 +20476,14 @@ extension SelectObjectContentInput: Swift.CustomDebugStringConvertible { } extension SelectObjectContentInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case expression = "Expression" - case expressionType = "ExpressionType" - case inputSerialization = "InputSerialization" - case outputSerialization = "OutputSerialization" - case requestProgress = "RequestProgress" - case scanRange = "ScanRange" - } - static func writingClosure(_ value: SelectObjectContentInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Expression")].write(value.expression) - try writer[.init("ExpressionType")].write(value.expressionType) - try writer[.init("InputSerialization")].write(value.inputSerialization, writingClosure: S3ClientTypes.InputSerialization.writingClosure(_:to:)) - try writer[.init("OutputSerialization")].write(value.outputSerialization, writingClosure: S3ClientTypes.OutputSerialization.writingClosure(_:to:)) - try writer[.init("RequestProgress")].write(value.requestProgress, writingClosure: S3ClientTypes.RequestProgress.writingClosure(_:to:)) - try writer[.init("ScanRange")].write(value.scanRange, writingClosure: S3ClientTypes.ScanRange.writingClosure(_:to:)) + try writer["Expression"].write(value.expression) + try writer["ExpressionType"].write(value.expressionType) + try writer["InputSerialization"].write(value.inputSerialization, writingClosure: S3ClientTypes.InputSerialization.writingClosure(_:to:)) + try writer["OutputSerialization"].write(value.outputSerialization, writingClosure: S3ClientTypes.OutputSerialization.writingClosure(_:to:)) + try writer["RequestProgress"].write(value.requestProgress, writingClosure: S3ClientTypes.RequestProgress.writingClosure(_:to:)) + try writer["ScanRange"].write(value.scanRange, writingClosure: S3ClientTypes.ScanRange.writingClosure(_:to:)) } } @@ -23405,50 +20597,17 @@ public struct SelectObjectContentInput: Swift.Equatable { } } -struct SelectObjectContentInputBody: Swift.Equatable { - let expression: Swift.String? - let expressionType: S3ClientTypes.ExpressionType? - let requestProgress: S3ClientTypes.RequestProgress? - let inputSerialization: S3ClientTypes.InputSerialization? - let outputSerialization: S3ClientTypes.OutputSerialization? - let scanRange: S3ClientTypes.ScanRange? -} - -extension SelectObjectContentInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case expression = "Expression" - case expressionType = "ExpressionType" - case inputSerialization = "InputSerialization" - case outputSerialization = "OutputSerialization" - case requestProgress = "RequestProgress" - case scanRange = "ScanRange" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let expressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expression) - expression = expressionDecoded - let expressionTypeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ExpressionType.self, forKey: .expressionType) - expressionType = expressionTypeDecoded - let requestProgressDecoded = try containerValues.decodeIfPresent(S3ClientTypes.RequestProgress.self, forKey: .requestProgress) - requestProgress = requestProgressDecoded - let inputSerializationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InputSerialization.self, forKey: .inputSerialization) - inputSerialization = inputSerializationDecoded - let outputSerializationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.OutputSerialization.self, forKey: .outputSerialization) - outputSerialization = outputSerializationDecoded - let scanRangeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ScanRange.self, forKey: .scanRange) - scanRange = scanRangeDecoded - } -} +extension SelectObjectContentOutput { -extension SelectObjectContentOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { - let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) - self.payload = decoderStream.toAsyncStream() - } else { - self.payload = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = SelectObjectContentOutput() + if case .stream(let stream) = httpResponse.body { + let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: S3ClientTypes.SelectObjectContentEventStream.unmarshal) + value.payload = decoderStream.toAsyncStream() + } + return value } } } @@ -23465,41 +20624,39 @@ public struct SelectObjectContentOutput: Swift.Equatable { } } -enum SelectObjectContentOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum SelectObjectContentOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.SelectParameters: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case expression = "Expression" - case expressionType = "ExpressionType" - case inputSerialization = "InputSerialization" - case outputSerialization = "OutputSerialization" - } +extension S3ClientTypes.SelectParameters { static func writingClosure(_ value: S3ClientTypes.SelectParameters?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Expression")].write(value.expression) - try writer[.init("ExpressionType")].write(value.expressionType) - try writer[.init("InputSerialization")].write(value.inputSerialization, writingClosure: S3ClientTypes.InputSerialization.writingClosure(_:to:)) - try writer[.init("OutputSerialization")].write(value.outputSerialization, writingClosure: S3ClientTypes.OutputSerialization.writingClosure(_:to:)) + try writer["Expression"].write(value.expression) + try writer["ExpressionType"].write(value.expressionType) + try writer["InputSerialization"].write(value.inputSerialization, writingClosure: S3ClientTypes.InputSerialization.writingClosure(_:to:)) + try writer["OutputSerialization"].write(value.outputSerialization, writingClosure: S3ClientTypes.OutputSerialization.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let inputSerializationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.InputSerialization.self, forKey: .inputSerialization) - inputSerialization = inputSerializationDecoded - let expressionTypeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ExpressionType.self, forKey: .expressionType) - expressionType = expressionTypeDecoded - let expressionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expression) - expression = expressionDecoded - let outputSerializationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.OutputSerialization.self, forKey: .outputSerialization) - outputSerialization = outputSerializationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.SelectParameters() + value.inputSerialization = try reader["InputSerialization"].readIfPresent(readingClosure: S3ClientTypes.InputSerialization.readingClosure) + value.expressionType = try reader["ExpressionType"].readIfPresent() + value.expression = try reader["Expression"].readIfPresent() + value.outputSerialization = try reader["OutputSerialization"].readIfPresent(readingClosure: S3ClientTypes.OutputSerialization.readingClosure) + return value + } } } @@ -23570,24 +20727,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.ServerSideEncryptionByDefault: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case kmsMasterKeyID = "KMSMasterKeyID" - case sseAlgorithm = "SSEAlgorithm" - } +extension S3ClientTypes.ServerSideEncryptionByDefault { static func writingClosure(_ value: S3ClientTypes.ServerSideEncryptionByDefault?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KMSMasterKeyID")].write(value.kmsMasterKeyID) - try writer[.init("SSEAlgorithm")].write(value.sseAlgorithm) + try writer["KMSMasterKeyID"].write(value.kmsMasterKeyID) + try writer["SSEAlgorithm"].write(value.sseAlgorithm) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sseAlgorithmDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ServerSideEncryption.self, forKey: .sseAlgorithm) - sseAlgorithm = sseAlgorithmDecoded - let kmsMasterKeyIDDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsMasterKeyID) - kmsMasterKeyID = kmsMasterKeyIDDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ServerSideEncryptionByDefault() + value.sseAlgorithm = try reader["SSEAlgorithm"].readIfPresent() + value.kmsMasterKeyID = try reader["KMSMasterKeyID"].readIfPresent() + return value + } } } @@ -23626,35 +20781,19 @@ extension S3ClientTypes { } -extension S3ClientTypes.ServerSideEncryptionConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rule" - } +extension S3ClientTypes.ServerSideEncryptionConfiguration { static func writingClosure(_ value: S3ClientTypes.ServerSideEncryptionConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Rule")].writeList(value.rules, memberWritingClosure: S3ClientTypes.ServerSideEncryptionRule.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.rules) { - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .rules) - if rulesWrappedContainer != nil { - let rulesContainer = try containerValues.decodeIfPresent([S3ClientTypes.ServerSideEncryptionRule].self, forKey: .rules) - var rulesBuffer:[S3ClientTypes.ServerSideEncryptionRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [S3ClientTypes.ServerSideEncryptionRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] - } - } else { - rules = nil + try writer["Rule"].writeList(value.rules, memberWritingClosure: S3ClientTypes.ServerSideEncryptionRule.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ServerSideEncryptionConfiguration() + value.rules = try reader["Rule"].readListIfPresent(memberReadingClosure: S3ClientTypes.ServerSideEncryptionRule.readingClosure, memberNodeInfo: "member", isFlattened: true) + return value } } } @@ -23676,24 +20815,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.ServerSideEncryptionRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case applyServerSideEncryptionByDefault = "ApplyServerSideEncryptionByDefault" - case bucketKeyEnabled = "BucketKeyEnabled" - } +extension S3ClientTypes.ServerSideEncryptionRule { static func writingClosure(_ value: S3ClientTypes.ServerSideEncryptionRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ApplyServerSideEncryptionByDefault")].write(value.applyServerSideEncryptionByDefault, writingClosure: S3ClientTypes.ServerSideEncryptionByDefault.writingClosure(_:to:)) - try writer[.init("BucketKeyEnabled")].write(value.bucketKeyEnabled) + try writer["ApplyServerSideEncryptionByDefault"].write(value.applyServerSideEncryptionByDefault, writingClosure: S3ClientTypes.ServerSideEncryptionByDefault.writingClosure(_:to:)) + try writer["BucketKeyEnabled"].write(value.bucketKeyEnabled) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let applyServerSideEncryptionByDefaultDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ServerSideEncryptionByDefault.self, forKey: .applyServerSideEncryptionByDefault) - applyServerSideEncryptionByDefault = applyServerSideEncryptionByDefaultDecoded - let bucketKeyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .bucketKeyEnabled) - bucketKeyEnabled = bucketKeyEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.ServerSideEncryptionRule() + value.applyServerSideEncryptionByDefault = try reader["ApplyServerSideEncryptionByDefault"].readIfPresent(readingClosure: S3ClientTypes.ServerSideEncryptionByDefault.readingClosure) + value.bucketKeyEnabled = try reader["BucketKeyEnabled"].readIfPresent() + return value + } } } @@ -23717,32 +20854,26 @@ extension S3ClientTypes { } -extension S3ClientTypes.SessionCredentials: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKeyId = "AccessKeyId" - case expiration = "Expiration" - case secretAccessKey = "SecretAccessKey" - case sessionToken = "SessionToken" - } +extension S3ClientTypes.SessionCredentials { static func writingClosure(_ value: S3ClientTypes.SessionCredentials?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessKeyId")].write(value.accessKeyId) - try writer[.init("Expiration")].writeTimestamp(value.expiration, format: .dateTime) - try writer[.init("SecretAccessKey")].write(value.secretAccessKey) - try writer[.init("SessionToken")].write(value.sessionToken) + try writer["AccessKeyId"].write(value.accessKeyId) + try writer["Expiration"].writeTimestamp(value.expiration, format: .dateTime) + try writer["SecretAccessKey"].write(value.secretAccessKey) + try writer["SessionToken"].write(value.sessionToken) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - let secretAccessKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secretAccessKey) - secretAccessKey = secretAccessKeyDecoded - let sessionTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sessionToken) - sessionToken = sessionTokenDecoded - let expirationDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expiration) - expiration = expirationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.SessionCredentials() + value.accessKeyId = try reader["AccessKeyId"].readIfPresent() + value.secretAccessKey = try reader["SecretAccessKey"].readIfPresent() + value.sessionToken = try reader["SessionToken"].readIfPresent() + value.expiration = try reader["Expiration"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -23815,13 +20946,17 @@ extension S3ClientTypes { } } -extension S3ClientTypes.SimplePrefix: Swift.Decodable { +extension S3ClientTypes.SimplePrefix { static func writingClosure(_ value: S3ClientTypes.SimplePrefix?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ClientTypes.SimplePrefix() + } } } @@ -23834,24 +20969,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.SourceSelectionCriteria: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicaModifications = "ReplicaModifications" - case sseKmsEncryptedObjects = "SseKmsEncryptedObjects" - } +extension S3ClientTypes.SourceSelectionCriteria { static func writingClosure(_ value: S3ClientTypes.SourceSelectionCriteria?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ReplicaModifications")].write(value.replicaModifications, writingClosure: S3ClientTypes.ReplicaModifications.writingClosure(_:to:)) - try writer[.init("SseKmsEncryptedObjects")].write(value.sseKmsEncryptedObjects, writingClosure: S3ClientTypes.SseKmsEncryptedObjects.writingClosure(_:to:)) + try writer["ReplicaModifications"].write(value.replicaModifications, writingClosure: S3ClientTypes.ReplicaModifications.writingClosure(_:to:)) + try writer["SseKmsEncryptedObjects"].write(value.sseKmsEncryptedObjects, writingClosure: S3ClientTypes.SseKmsEncryptedObjects.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sseKmsEncryptedObjectsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.SseKmsEncryptedObjects.self, forKey: .sseKmsEncryptedObjects) - sseKmsEncryptedObjects = sseKmsEncryptedObjectsDecoded - let replicaModificationsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ReplicaModifications.self, forKey: .replicaModifications) - replicaModifications = replicaModificationsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.SourceSelectionCriteria() + value.sseKmsEncryptedObjects = try reader["SseKmsEncryptedObjects"].readIfPresent(readingClosure: S3ClientTypes.SseKmsEncryptedObjects.readingClosure) + value.replicaModifications = try reader["ReplicaModifications"].readIfPresent(readingClosure: S3ClientTypes.ReplicaModifications.readingClosure) + return value + } } } @@ -23875,20 +21008,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.SseKmsEncryptedObjects: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ClientTypes.SseKmsEncryptedObjects { static func writingClosure(_ value: S3ClientTypes.SseKmsEncryptedObjects?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.SseKmsEncryptedObjectsStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.SseKmsEncryptedObjects() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -23941,28 +21074,24 @@ extension S3ClientTypes { } } -extension S3ClientTypes.Stats: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bytesProcessed = "BytesProcessed" - case bytesReturned = "BytesReturned" - case bytesScanned = "BytesScanned" - } +extension S3ClientTypes.Stats { static func writingClosure(_ value: S3ClientTypes.Stats?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("BytesProcessed")].write(value.bytesProcessed) - try writer[.init("BytesReturned")].write(value.bytesReturned) - try writer[.init("BytesScanned")].write(value.bytesScanned) + try writer["BytesProcessed"].write(value.bytesProcessed) + try writer["BytesReturned"].write(value.bytesReturned) + try writer["BytesScanned"].write(value.bytesScanned) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bytesScannedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesScanned) - bytesScanned = bytesScannedDecoded - let bytesProcessedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesProcessed) - bytesProcessed = bytesProcessedDecoded - let bytesReturnedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesReturned) - bytesReturned = bytesReturnedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Stats() + value.bytesScanned = try reader["BytesScanned"].readIfPresent() + value.bytesProcessed = try reader["BytesProcessed"].readIfPresent() + value.bytesReturned = try reader["BytesReturned"].readIfPresent() + return value + } } } @@ -23990,20 +21119,20 @@ extension S3ClientTypes { } -extension S3ClientTypes.StatsEvent: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case details = "Details" - } +extension S3ClientTypes.StatsEvent { static func writingClosure(_ value: S3ClientTypes.StatsEvent?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Details")].write(value.details, writingClosure: S3ClientTypes.Stats.writingClosure(_:to:)) + try writer["Details"].write(value.details, writingClosure: S3ClientTypes.Stats.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let detailsDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Stats.self, forKey: .details) - details = detailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.StatsEvent() + value.details = try reader["Details"].readIfPresent(readingClosure: S3ClientTypes.Stats.readingClosure) + return value + } } } @@ -24082,20 +21211,20 @@ extension S3ClientTypes { } } -extension S3ClientTypes.StorageClassAnalysis: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataExport = "DataExport" - } +extension S3ClientTypes.StorageClassAnalysis { static func writingClosure(_ value: S3ClientTypes.StorageClassAnalysis?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DataExport")].write(value.dataExport, writingClosure: S3ClientTypes.StorageClassAnalysisDataExport.writingClosure(_:to:)) + try writer["DataExport"].write(value.dataExport, writingClosure: S3ClientTypes.StorageClassAnalysisDataExport.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataExportDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClassAnalysisDataExport.self, forKey: .dataExport) - dataExport = dataExportDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.StorageClassAnalysis() + value.dataExport = try reader["DataExport"].readIfPresent(readingClosure: S3ClientTypes.StorageClassAnalysisDataExport.readingClosure) + return value + } } } @@ -24115,24 +21244,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.StorageClassAnalysisDataExport: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case destination = "Destination" - case outputSchemaVersion = "OutputSchemaVersion" - } +extension S3ClientTypes.StorageClassAnalysisDataExport { static func writingClosure(_ value: S3ClientTypes.StorageClassAnalysisDataExport?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Destination")].write(value.destination, writingClosure: S3ClientTypes.AnalyticsExportDestination.writingClosure(_:to:)) - try writer[.init("OutputSchemaVersion")].write(value.outputSchemaVersion) + try writer["Destination"].write(value.destination, writingClosure: S3ClientTypes.AnalyticsExportDestination.writingClosure(_:to:)) + try writer["OutputSchemaVersion"].write(value.outputSchemaVersion) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let outputSchemaVersionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.StorageClassAnalysisSchemaVersion.self, forKey: .outputSchemaVersion) - outputSchemaVersion = outputSchemaVersionDecoded - let destinationDecoded = try containerValues.decodeIfPresent(S3ClientTypes.AnalyticsExportDestination.self, forKey: .destination) - destination = destinationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.StorageClassAnalysisDataExport() + value.outputSchemaVersion = try reader["OutputSchemaVersion"].readIfPresent() + value.destination = try reader["Destination"].readIfPresent(readingClosure: S3ClientTypes.AnalyticsExportDestination.readingClosure) + return value + } } } @@ -24187,24 +21314,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.Tag: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case value = "Value" - } +extension S3ClientTypes.Tag { static func writingClosure(_ value: S3ClientTypes.Tag?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Key")].write(value.key) - try writer[.init("Value")].write(value.value) + try writer["Key"].write(value.key) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -24230,36 +21355,19 @@ extension S3ClientTypes { } -extension S3ClientTypes.Tagging: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagSet = "TagSet" - } +extension S3ClientTypes.Tagging { static func writingClosure(_ value: S3ClientTypes.Tagging?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("TagSet")].writeList(value.tagSet, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tagSet) { - struct KeyVal0{struct Tag{}} - let tagSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSet) - if let tagSetWrappedContainer = tagSetWrappedContainer { - let tagSetContainer = try tagSetWrappedContainer.decodeIfPresent([S3ClientTypes.Tag].self, forKey: .member) - var tagSetBuffer:[S3ClientTypes.Tag]? = nil - if let tagSetContainer = tagSetContainer { - tagSetBuffer = [S3ClientTypes.Tag]() - for structureContainer0 in tagSetContainer { - tagSetBuffer?.append(structureContainer0) - } - } - tagSet = tagSetBuffer - } else { - tagSet = [] - } - } else { - tagSet = nil + try writer["TagSet"].writeList(value.tagSet, memberWritingClosure: S3ClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Tagging() + value.tagSet = try reader["TagSet"].readListIfPresent(memberReadingClosure: S3ClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -24313,24 +21421,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.TargetGrant: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case grantee = "Grantee" - case permission = "Permission" - } +extension S3ClientTypes.TargetGrant { static func writingClosure(_ value: S3ClientTypes.TargetGrant?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Grantee", namespace: .init(prefix: "xsi", uri: "http://www.w3.org/2001/XMLSchema-instance"))].write(value.grantee, writingClosure: S3ClientTypes.Grantee.writingClosure(_:to:)) - try writer[.init("Permission")].write(value.permission) + try writer[.init("Grantee", namespaceDef: .init(prefix: "xsi", uri: "http://www.w3.org/2001/XMLSchema-instance"))].write(value.grantee, writingClosure: S3ClientTypes.Grantee.writingClosure(_:to:)) + try writer["Permission"].write(value.permission) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let granteeDecoded = try containerValues.decodeIfPresent(S3ClientTypes.Grantee.self, forKey: .grantee) - grantee = granteeDecoded - let permissionDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketLogsPermission.self, forKey: .permission) - permission = permissionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.TargetGrant() + value.grantee = try reader[.init("Grantee", namespaceDef: .init(prefix: "xsi", uri: "http://www.w3.org/2001/XMLSchema-instance"))].readIfPresent(readingClosure: S3ClientTypes.Grantee.readingClosure) + value.permission = try reader["Permission"].readIfPresent() + return value + } } } @@ -24354,24 +21460,22 @@ extension S3ClientTypes { } -extension S3ClientTypes.TargetObjectKeyFormat: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case partitionedPrefix = "PartitionedPrefix" - case simplePrefix = "SimplePrefix" - } +extension S3ClientTypes.TargetObjectKeyFormat { static func writingClosure(_ value: S3ClientTypes.TargetObjectKeyFormat?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("PartitionedPrefix")].write(value.partitionedPrefix, writingClosure: S3ClientTypes.PartitionedPrefix.writingClosure(_:to:)) - try writer[.init("SimplePrefix")].write(value.simplePrefix, writingClosure: S3ClientTypes.SimplePrefix.writingClosure(_:to:)) + try writer["PartitionedPrefix"].write(value.partitionedPrefix, writingClosure: S3ClientTypes.PartitionedPrefix.writingClosure(_:to:)) + try writer["SimplePrefix"].write(value.simplePrefix, writingClosure: S3ClientTypes.SimplePrefix.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let simplePrefixDecoded = try containerValues.decodeIfPresent(S3ClientTypes.SimplePrefix.self, forKey: .simplePrefix) - simplePrefix = simplePrefixDecoded - let partitionedPrefixDecoded = try containerValues.decodeIfPresent(S3ClientTypes.PartitionedPrefix.self, forKey: .partitionedPrefix) - partitionedPrefix = partitionedPrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.TargetObjectKeyFormat() + value.simplePrefix = try reader["SimplePrefix"].readIfPresent(readingClosure: S3ClientTypes.SimplePrefix.readingClosure) + value.partitionedPrefix = try reader["PartitionedPrefix"].readIfPresent(readingClosure: S3ClientTypes.PartitionedPrefix.readingClosure) + return value + } } } @@ -24430,24 +21534,22 @@ extension S3ClientTypes { } } -extension S3ClientTypes.Tiering: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessTier = "AccessTier" - case days = "Days" - } +extension S3ClientTypes.Tiering { static func writingClosure(_ value: S3ClientTypes.Tiering?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessTier")].write(value.accessTier) - try writer[.init("Days")].write(value.days) + try writer["AccessTier"].write(value.accessTier) + try writer["Days"].write(value.days) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let daysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .days) - days = daysDecoded - let accessTierDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IntelligentTieringAccessTier.self, forKey: .accessTier) - accessTier = accessTierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Tiering() + value.days = try reader["Days"].readIfPresent() + value.accessTier = try reader["AccessTier"].readIfPresent() + return value + } } } @@ -24473,48 +21575,26 @@ extension S3ClientTypes { } -extension S3ClientTypes.TopicConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case events = "Event" - case filter = "Filter" - case id = "Id" - case topicArn = "Topic" - } +extension S3ClientTypes.TopicConfiguration { static func writingClosure(_ value: S3ClientTypes.TopicConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Event")].writeList(value.events, memberWritingClosure: S3ClientTypes.Event.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: true) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ClientTypes.NotificationConfigurationFilter.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("Topic")].write(value.topicArn) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - if containerValues.contains(.events) { - let eventsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .events) - if eventsWrappedContainer != nil { - let eventsContainer = try containerValues.decodeIfPresent([S3ClientTypes.Event].self, forKey: .events) - var eventsBuffer:[S3ClientTypes.Event]? = nil - if let eventsContainer = eventsContainer { - eventsBuffer = [S3ClientTypes.Event]() - for enumContainer0 in eventsContainer { - eventsBuffer?.append(enumContainer0) - } - } - events = eventsBuffer - } else { - events = [] - } - } else { - events = nil + try writer["Event"].writeList(value.events, memberWritingClosure: S3ClientTypes.Event.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: true) + try writer["Filter"].write(value.filter, writingClosure: S3ClientTypes.NotificationConfigurationFilter.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["Topic"].write(value.topicArn) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.TopicConfiguration() + value.id = try reader["Id"].readIfPresent() + value.topicArn = try reader["Topic"].readIfPresent() + value.events = try reader["Event"].readListIfPresent(memberReadingClosure: S3ClientTypes.Event.readingClosure, memberNodeInfo: "member", isFlattened: true) + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ClientTypes.NotificationConfigurationFilter.readingClosure) + return value } - let filterDecoded = try containerValues.decodeIfPresent(S3ClientTypes.NotificationConfigurationFilter.self, forKey: .filter) - filter = filterDecoded } } @@ -24548,28 +21628,24 @@ extension S3ClientTypes { } -extension S3ClientTypes.Transition: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case date = "Date" - case days = "Days" - case storageClass = "StorageClass" - } +extension S3ClientTypes.Transition { static func writingClosure(_ value: S3ClientTypes.Transition?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Date")].writeTimestamp(value.date, format: .dateTime) - try writer[.init("Days")].write(value.days) - try writer[.init("StorageClass")].write(value.storageClass) + try writer["Date"].writeTimestamp(value.date, format: .dateTime) + try writer["Days"].write(value.days) + try writer["StorageClass"].write(value.storageClass) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded - let daysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .days) - days = daysDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ClientTypes.TransitionStorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.Transition() + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + value.days = try reader["Days"].readIfPresent() + value.storageClass = try reader["StorageClass"].readIfPresent() + return value + } } } @@ -24873,48 +21949,36 @@ extension UploadPartCopyOutput: Swift.CustomDebugStringConvertible { "UploadPartCopyOutput(bucketKeyEnabled: \(Swift.String(describing: bucketKeyEnabled)), copyPartResult: \(Swift.String(describing: copyPartResult)), copySourceVersionId: \(Swift.String(describing: copySourceVersionId)), requestCharged: \(Swift.String(describing: requestCharged)), sseCustomerAlgorithm: \(Swift.String(describing: sseCustomerAlgorithm)), sseCustomerKeyMD5: \(Swift.String(describing: sseCustomerKeyMD5)), serverSideEncryption: \(Swift.String(describing: serverSideEncryption)), ssekmsKeyId: \"CONTENT_REDACTED\")"} } -extension UploadPartCopyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { - self.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false - } else { - self.bucketKeyEnabled = nil - } - if let copySourceVersionIdHeaderValue = httpResponse.headers.value(for: "x-amz-copy-source-version-id") { - self.copySourceVersionId = copySourceVersionIdHeaderValue - } else { - self.copySourceVersionId = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { - self.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue - } else { - self.sseCustomerAlgorithm = nil - } - if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { - self.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue - } else { - self.sseCustomerKeyMD5 = nil - } - if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { - self.ssekmsKeyId = ssekmsKeyIdHeaderValue - } else { - self.ssekmsKeyId = nil - } - if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { - self.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) - } else { - self.serverSideEncryption = nil - } - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ClientTypes.CopyPartResult = try responseDecoder.decode(responseBody: data) - self.copyPartResult = output - } else { - self.copyPartResult = nil +extension UploadPartCopyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UploadPartCopyOutput() + if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { + value.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false + } + if let copySourceVersionIdHeaderValue = httpResponse.headers.value(for: "x-amz-copy-source-version-id") { + value.copySourceVersionId = copySourceVersionIdHeaderValue + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { + value.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue + } + if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { + value.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue + } + if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { + value.ssekmsKeyId = ssekmsKeyIdHeaderValue + } + if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { + value.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) + } + value.copyPartResult = try reader.readIfPresent(readingClosure: S3ClientTypes.CopyPartResult.readingClosure) + return value } } } @@ -24959,27 +22023,15 @@ public struct UploadPartCopyOutput: Swift.Equatable { } } -struct UploadPartCopyOutputBody: Swift.Equatable { - let copyPartResult: S3ClientTypes.CopyPartResult? -} - -extension UploadPartCopyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case copyPartResult = "CopyPartResult" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let copyPartResultDecoded = try containerValues.decodeIfPresent(S3ClientTypes.CopyPartResult.self, forKey: .copyPartResult) - copyPartResult = copyPartResultDecoded - } -} +enum UploadPartCopyOutputError { -enum UploadPartCopyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } @@ -24990,13 +22042,9 @@ extension UploadPartInput: Swift.CustomDebugStringConvertible { } extension UploadPartInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - } - static func writingClosure(_ value: UploadPartInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Body")].write(value.body) + try writer["Body"].write(value.body) } } @@ -25048,15 +22096,7 @@ extension UploadPartInput { public func presign(config: S3Client.S3ClientConfiguration, expiration: Foundation.TimeInterval) async throws -> ClientRuntime.SdkHttpRequest? { let serviceName = "S3" let input = self - let encoder = ClientRuntime.JSONEncoder() - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "uploadPart") @@ -25078,11 +22118,12 @@ extension UploadPartInput { operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.QueryItemMiddleware(UploadPartInput.queryItemProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/octet-stream")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BlobStreamBodyMiddleware(keyPath: \.body)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.FlexibleChecksumsRequestMiddleware(checksumAlgorithm: input.checksumAlgorithm?.rawValue)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(useDoubleURIEncode: false, shouldNormalizeURIPath: false, expiration: expiration, signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UploadPartOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UploadPartOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UploadPartOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) operation.deserializeStep.intercept(position: .after, middleware: AWSClientRuntime.AWSS3ErrorWith200StatusXMLMiddleware()) let presignedRequestBuilder = try await operation.presignedRequest(context: context, input: input, output: UploadPartOutput(), next: ClientRuntime.NoopHandler()) @@ -25204,91 +22245,50 @@ public struct UploadPartInput: Swift.Equatable { } } -struct UploadPartInputBody: Swift.Equatable { - let body: ClientRuntime.ByteStream? -} - -extension UploadPartInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.body) { - do { - let bodyDecoded = try containerValues.decodeIfPresent(ClientRuntime.ByteStream.self, forKey: .body) - body = bodyDecoded - } catch { - body = ClientRuntime.ByteStream.data("".data(using: .utf8)!) - } - } else { - body = nil - } - } -} - extension UploadPartOutput: Swift.CustomDebugStringConvertible { public var debugDescription: Swift.String { "UploadPartOutput(bucketKeyEnabled: \(Swift.String(describing: bucketKeyEnabled)), checksumCRC32: \(Swift.String(describing: checksumCRC32)), checksumCRC32C: \(Swift.String(describing: checksumCRC32C)), checksumSHA1: \(Swift.String(describing: checksumSHA1)), checksumSHA256: \(Swift.String(describing: checksumSHA256)), eTag: \(Swift.String(describing: eTag)), requestCharged: \(Swift.String(describing: requestCharged)), sseCustomerAlgorithm: \(Swift.String(describing: sseCustomerAlgorithm)), sseCustomerKeyMD5: \(Swift.String(describing: sseCustomerKeyMD5)), serverSideEncryption: \(Swift.String(describing: serverSideEncryption)), ssekmsKeyId: \"CONTENT_REDACTED\")"} } -extension UploadPartOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { - self.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false - } else { - self.bucketKeyEnabled = nil - } - if let checksumCRC32HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32") { - self.checksumCRC32 = checksumCRC32HeaderValue - } else { - self.checksumCRC32 = nil - } - if let checksumCRC32CHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32c") { - self.checksumCRC32C = checksumCRC32CHeaderValue - } else { - self.checksumCRC32C = nil - } - if let checksumSHA1HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha1") { - self.checksumSHA1 = checksumSHA1HeaderValue - } else { - self.checksumSHA1 = nil - } - if let checksumSHA256HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha256") { - self.checksumSHA256 = checksumSHA256HeaderValue - } else { - self.checksumSHA256 = nil - } - if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { - self.eTag = eTagHeaderValue - } else { - self.eTag = nil - } - if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { - self.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) - } else { - self.requestCharged = nil - } - if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { - self.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue - } else { - self.sseCustomerAlgorithm = nil - } - if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { - self.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue - } else { - self.sseCustomerKeyMD5 = nil - } - if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { - self.ssekmsKeyId = ssekmsKeyIdHeaderValue - } else { - self.ssekmsKeyId = nil - } - if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { - self.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) - } else { - self.serverSideEncryption = nil +extension UploadPartOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + var value = UploadPartOutput() + if let bucketKeyEnabledHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-bucket-key-enabled") { + value.bucketKeyEnabled = Swift.Bool(bucketKeyEnabledHeaderValue) ?? false + } + if let checksumCRC32HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32") { + value.checksumCRC32 = checksumCRC32HeaderValue + } + if let checksumCRC32CHeaderValue = httpResponse.headers.value(for: "x-amz-checksum-crc32c") { + value.checksumCRC32C = checksumCRC32CHeaderValue + } + if let checksumSHA1HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha1") { + value.checksumSHA1 = checksumSHA1HeaderValue + } + if let checksumSHA256HeaderValue = httpResponse.headers.value(for: "x-amz-checksum-sha256") { + value.checksumSHA256 = checksumSHA256HeaderValue + } + if let eTagHeaderValue = httpResponse.headers.value(for: "ETag") { + value.eTag = eTagHeaderValue + } + if let requestChargedHeaderValue = httpResponse.headers.value(for: "x-amz-request-charged") { + value.requestCharged = S3ClientTypes.RequestCharged(rawValue: requestChargedHeaderValue) + } + if let sseCustomerAlgorithmHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-algorithm") { + value.sseCustomerAlgorithm = sseCustomerAlgorithmHeaderValue + } + if let sseCustomerKeyMD5HeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-customer-key-MD5") { + value.sseCustomerKeyMD5 = sseCustomerKeyMD5HeaderValue + } + if let ssekmsKeyIdHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption-aws-kms-key-id") { + value.ssekmsKeyId = ssekmsKeyIdHeaderValue + } + if let serverSideEncryptionHeaderValue = httpResponse.headers.value(for: "x-amz-server-side-encryption") { + value.serverSideEncryption = S3ClientTypes.ServerSideEncryption(rawValue: serverSideEncryptionHeaderValue) + } + return value } } } @@ -25345,33 +22345,35 @@ public struct UploadPartOutput: Swift.Equatable { } } -enum UploadPartOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum UploadPartOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } -extension S3ClientTypes.VersioningConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case mfaDelete = "MfaDelete" - case status = "Status" - } +extension S3ClientTypes.VersioningConfiguration { static func writingClosure(_ value: S3ClientTypes.VersioningConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("MfaDelete")].write(value.mfaDelete) - try writer[.init("Status")].write(value.status) + try writer["MfaDelete"].write(value.mfaDelete) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let mfaDeleteDecoded = try containerValues.decodeIfPresent(S3ClientTypes.MFADelete.self, forKey: .mfaDelete) - mfaDelete = mfaDeleteDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ClientTypes.BucketVersioningStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.VersioningConfiguration() + value.mfaDelete = try reader["MfaDelete"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -25395,48 +22397,25 @@ extension S3ClientTypes { } -extension S3ClientTypes.WebsiteConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errorDocument = "ErrorDocument" - case indexDocument = "IndexDocument" - case redirectAllRequestsTo = "RedirectAllRequestsTo" - case routingRules = "RoutingRules" - } +extension S3ClientTypes.WebsiteConfiguration { static func writingClosure(_ value: S3ClientTypes.WebsiteConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ErrorDocument")].write(value.errorDocument, writingClosure: S3ClientTypes.ErrorDocument.writingClosure(_:to:)) - try writer[.init("IndexDocument")].write(value.indexDocument, writingClosure: S3ClientTypes.IndexDocument.writingClosure(_:to:)) - try writer[.init("RedirectAllRequestsTo")].write(value.redirectAllRequestsTo, writingClosure: S3ClientTypes.RedirectAllRequestsTo.writingClosure(_:to:)) - try writer[.init("RoutingRules")].writeList(value.routingRules, memberWritingClosure: S3ClientTypes.RoutingRule.writingClosure(_:to:), memberNodeInfo: .init("RoutingRule"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let errorDocumentDecoded = try containerValues.decodeIfPresent(S3ClientTypes.ErrorDocument.self, forKey: .errorDocument) - errorDocument = errorDocumentDecoded - let indexDocumentDecoded = try containerValues.decodeIfPresent(S3ClientTypes.IndexDocument.self, forKey: .indexDocument) - indexDocument = indexDocumentDecoded - let redirectAllRequestsToDecoded = try containerValues.decodeIfPresent(S3ClientTypes.RedirectAllRequestsTo.self, forKey: .redirectAllRequestsTo) - redirectAllRequestsTo = redirectAllRequestsToDecoded - if containerValues.contains(.routingRules) { - struct KeyVal0{struct RoutingRule{}} - let routingRulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routingRules) - if let routingRulesWrappedContainer = routingRulesWrappedContainer { - let routingRulesContainer = try routingRulesWrappedContainer.decodeIfPresent([S3ClientTypes.RoutingRule].self, forKey: .member) - var routingRulesBuffer:[S3ClientTypes.RoutingRule]? = nil - if let routingRulesContainer = routingRulesContainer { - routingRulesBuffer = [S3ClientTypes.RoutingRule]() - for structureContainer0 in routingRulesContainer { - routingRulesBuffer?.append(structureContainer0) - } - } - routingRules = routingRulesBuffer - } else { - routingRules = [] - } - } else { - routingRules = nil + try writer["ErrorDocument"].write(value.errorDocument, writingClosure: S3ClientTypes.ErrorDocument.writingClosure(_:to:)) + try writer["IndexDocument"].write(value.indexDocument, writingClosure: S3ClientTypes.IndexDocument.writingClosure(_:to:)) + try writer["RedirectAllRequestsTo"].write(value.redirectAllRequestsTo, writingClosure: S3ClientTypes.RedirectAllRequestsTo.writingClosure(_:to:)) + try writer["RoutingRules"].writeList(value.routingRules, memberWritingClosure: S3ClientTypes.RoutingRule.writingClosure(_:to:), memberNodeInfo: "RoutingRule", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ClientTypes.WebsiteConfiguration() + value.errorDocument = try reader["ErrorDocument"].readIfPresent(readingClosure: S3ClientTypes.ErrorDocument.readingClosure) + value.indexDocument = try reader["IndexDocument"].readIfPresent(readingClosure: S3ClientTypes.IndexDocument.readingClosure) + value.redirectAllRequestsTo = try reader["RedirectAllRequestsTo"].readIfPresent(readingClosure: S3ClientTypes.RedirectAllRequestsTo.readingClosure) + value.routingRules = try reader["RoutingRules"].readListIfPresent(memberReadingClosure: S3ClientTypes.RoutingRule.readingClosure, memberNodeInfo: "RoutingRule", isFlattened: false) + return value } } } @@ -25475,13 +22454,9 @@ extension WriteGetObjectResponseInput: Swift.CustomDebugStringConvertible { } extension WriteGetObjectResponseInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - } - static func writingClosure(_ value: WriteGetObjectResponseInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Body")].write(value.body) + try writer["Body"].write(value.body) } } @@ -25826,45 +22801,29 @@ public struct WriteGetObjectResponseInput: Swift.Equatable { } } -struct WriteGetObjectResponseInputBody: Swift.Equatable { - let body: ClientRuntime.ByteStream? -} - -extension WriteGetObjectResponseInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - } +extension WriteGetObjectResponseOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.body) { - do { - let bodyDecoded = try containerValues.decodeIfPresent(ClientRuntime.ByteStream.self, forKey: .body) - body = bodyDecoded - } catch { - body = ClientRuntime.ByteStream.data("".data(using: .utf8)!) - } - } else { - body = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return WriteGetObjectResponseOutput() } } } -extension WriteGetObjectResponseOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct WriteGetObjectResponseOutput: Swift.Equatable { public init() { } } -enum WriteGetObjectResponseOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError.makeError(from: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, requestID2: httpResponse.requestId2, typeName: restXMLError.errorCode) +enum WriteGetObjectResponseOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: true) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, requestID2: httpResponse.requestId2, typeName: restXMLError.code) + } } } } diff --git a/Sources/Services/AWSS3Control/S3ControlClient.swift b/Sources/Services/AWSS3Control/S3ControlClient.swift index ef67700fe82..48f42349d57 100644 --- a/Sources/Services/AWSS3Control/S3ControlClient.swift +++ b/Sources/Services/AWSS3Control/S3ControlClient.swift @@ -11,19 +11,9 @@ public class S3ControlClient { let client: ClientRuntime.SdkHttpClient let config: S3ControlClient.S3ControlClientConfiguration let serviceName = "S3 Control" - let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: S3ControlClient.S3ControlClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) - let encoder = ClientRuntime.JSONEncoder() - self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - decoder.dateDecodingStrategy = .secondsSince1970 - decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") - decoder.trimValueWhitespaces = false - decoder.removeWhitespaceElements = true - self.decoder = config.decoder ?? decoder self.config = config } @@ -78,8 +68,6 @@ extension S3ControlClient { /// - Returns: `AssociateAccessGrantsIdentityCenterOutput` : [no documentation found] public func associateAccessGrantsIdentityCenter(input: AssociateAccessGrantsIdentityCenterInput) async throws -> AssociateAccessGrantsIdentityCenterOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "associateAccessGrantsIdentityCenter") @@ -100,12 +88,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(AssociateAccessGrantsIdentityCenterInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AssociateAccessGrantsIdentityCenterRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: AssociateAccessGrantsIdentityCenterInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("AssociateAccessGrantsIdentityCenterRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: AssociateAccessGrantsIdentityCenterInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssociateAccessGrantsIdentityCenterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssociateAccessGrantsIdentityCenterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssociateAccessGrantsIdentityCenterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -120,8 +108,6 @@ extension S3ControlClient { /// - Returns: `CreateAccessGrantOutput` : [no documentation found] public func createAccessGrant(input: CreateAccessGrantInput) async throws -> CreateAccessGrantOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createAccessGrant") @@ -142,12 +128,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateAccessGrantInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessGrantRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessGrantInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessGrantRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessGrantInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAccessGrantOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAccessGrantOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAccessGrantOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -162,8 +148,6 @@ extension S3ControlClient { /// - Returns: `CreateAccessGrantsInstanceOutput` : [no documentation found] public func createAccessGrantsInstance(input: CreateAccessGrantsInstanceInput) async throws -> CreateAccessGrantsInstanceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createAccessGrantsInstance") @@ -184,12 +168,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateAccessGrantsInstanceInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessGrantsInstanceRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessGrantsInstanceInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessGrantsInstanceRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessGrantsInstanceInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAccessGrantsInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAccessGrantsInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAccessGrantsInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -213,8 +197,6 @@ extension S3ControlClient { /// - Returns: `CreateAccessGrantsLocationOutput` : [no documentation found] public func createAccessGrantsLocation(input: CreateAccessGrantsLocationInput) async throws -> CreateAccessGrantsLocationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createAccessGrantsLocation") @@ -235,12 +217,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateAccessGrantsLocationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessGrantsLocationRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessGrantsLocationInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessGrantsLocationRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessGrantsLocationInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAccessGrantsLocationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAccessGrantsLocationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAccessGrantsLocationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -261,8 +243,6 @@ extension S3ControlClient { /// - Returns: `CreateAccessPointOutput` : [no documentation found] public func createAccessPoint(input: CreateAccessPointInput) async throws -> CreateAccessPointOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "createAccessPoint") @@ -282,12 +262,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateAccessPointInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessPointRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessPointInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessPointRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessPointInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAccessPointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAccessPointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAccessPointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -308,8 +288,6 @@ extension S3ControlClient { /// - Returns: `CreateAccessPointForObjectLambdaOutput` : [no documentation found] public func createAccessPointForObjectLambda(input: CreateAccessPointForObjectLambdaInput) async throws -> CreateAccessPointForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "createAccessPointForObjectLambda") @@ -329,12 +307,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateAccessPointForObjectLambdaInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessPointForObjectLambdaRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessPointForObjectLambdaInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateAccessPointForObjectLambdaRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateAccessPointForObjectLambdaInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateAccessPointForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateAccessPointForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateAccessPointForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -372,8 +350,6 @@ extension S3ControlClient { /// - `BucketAlreadyOwnedByYou` : The Outposts bucket you tried to create already exists, and you own it. public func createBucket(input: CreateBucketInput) async throws -> CreateBucketOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "createBucket") @@ -394,12 +370,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateBucketInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateBucketConfiguration", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.CreateBucketConfiguration.writingClosure(_:to:), keyPath: \.createBucketConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateBucketConfiguration", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.CreateBucketConfiguration.writingClosure(_:to:), keyPath: \.createBucketConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateBucketOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateBucketOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateBucketOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -432,8 +408,6 @@ extension S3ControlClient { /// - `TooManyRequestsException` : public func createJob(input: CreateJobInput) async throws -> CreateJobOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createJob") @@ -454,12 +428,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateJobInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateJobRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateJobInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateJobRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateJobInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateJobOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateJobOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateJobOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -482,8 +456,6 @@ extension S3ControlClient { /// - Returns: `CreateMultiRegionAccessPointOutput` : [no documentation found] public func createMultiRegionAccessPoint(input: CreateMultiRegionAccessPointInput) async throws -> CreateMultiRegionAccessPointOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createMultiRegionAccessPoint") @@ -505,12 +477,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateMultiRegionAccessPointInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateMultiRegionAccessPointRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateMultiRegionAccessPointInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateMultiRegionAccessPointRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateMultiRegionAccessPointInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateMultiRegionAccessPointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateMultiRegionAccessPointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateMultiRegionAccessPointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -525,8 +497,6 @@ extension S3ControlClient { /// - Returns: `CreateStorageLensGroupOutput` : [no documentation found] public func createStorageLensGroup(input: CreateStorageLensGroupInput) async throws -> CreateStorageLensGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createStorageLensGroup") @@ -546,12 +516,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(CreateStorageLensGroupInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateStorageLensGroupRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateStorageLensGroupInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("CreateStorageLensGroupRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: CreateStorageLensGroupInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateStorageLensGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateStorageLensGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateStorageLensGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -566,8 +536,6 @@ extension S3ControlClient { /// - Returns: `DeleteAccessGrantOutput` : [no documentation found] public func deleteAccessGrant(input: DeleteAccessGrantInput) async throws -> DeleteAccessGrantOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessGrant") @@ -590,7 +558,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessGrantOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessGrantOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessGrantOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -605,8 +573,6 @@ extension S3ControlClient { /// - Returns: `DeleteAccessGrantsInstanceOutput` : [no documentation found] public func deleteAccessGrantsInstance(input: DeleteAccessGrantsInstanceInput) async throws -> DeleteAccessGrantsInstanceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessGrantsInstance") @@ -629,7 +595,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessGrantsInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessGrantsInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessGrantsInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -644,8 +610,6 @@ extension S3ControlClient { /// - Returns: `DeleteAccessGrantsInstanceResourcePolicyOutput` : [no documentation found] public func deleteAccessGrantsInstanceResourcePolicy(input: DeleteAccessGrantsInstanceResourcePolicyInput) async throws -> DeleteAccessGrantsInstanceResourcePolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessGrantsInstanceResourcePolicy") @@ -668,7 +632,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessGrantsInstanceResourcePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessGrantsInstanceResourcePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessGrantsInstanceResourcePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -683,8 +647,6 @@ extension S3ControlClient { /// - Returns: `DeleteAccessGrantsLocationOutput` : [no documentation found] public func deleteAccessGrantsLocation(input: DeleteAccessGrantsLocationInput) async throws -> DeleteAccessGrantsLocationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessGrantsLocation") @@ -707,7 +669,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessGrantsLocationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessGrantsLocationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessGrantsLocationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -728,8 +690,6 @@ extension S3ControlClient { /// - Returns: `DeleteAccessPointOutput` : [no documentation found] public func deleteAccessPoint(input: DeleteAccessPointInput) async throws -> DeleteAccessPointOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessPoint") @@ -751,7 +711,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessPointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessPointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessPointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -772,8 +732,6 @@ extension S3ControlClient { /// - Returns: `DeleteAccessPointForObjectLambdaOutput` : [no documentation found] public func deleteAccessPointForObjectLambda(input: DeleteAccessPointForObjectLambdaInput) async throws -> DeleteAccessPointForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessPointForObjectLambda") @@ -795,7 +753,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessPointForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessPointForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessPointForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -814,8 +772,6 @@ extension S3ControlClient { /// - Returns: `DeleteAccessPointPolicyOutput` : [no documentation found] public func deleteAccessPointPolicy(input: DeleteAccessPointPolicyInput) async throws -> DeleteAccessPointPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessPointPolicy") @@ -837,7 +793,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessPointPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessPointPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessPointPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -856,8 +812,6 @@ extension S3ControlClient { /// - Returns: `DeleteAccessPointPolicyForObjectLambdaOutput` : [no documentation found] public func deleteAccessPointPolicyForObjectLambda(input: DeleteAccessPointPolicyForObjectLambdaInput) async throws -> DeleteAccessPointPolicyForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteAccessPointPolicyForObjectLambda") @@ -879,7 +833,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteAccessPointPolicyForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteAccessPointPolicyForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteAccessPointPolicyForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -900,8 +854,6 @@ extension S3ControlClient { /// - Returns: `DeleteBucketOutput` : [no documentation found] public func deleteBucket(input: DeleteBucketInput) async throws -> DeleteBucketOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucket") @@ -923,7 +875,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -942,8 +894,6 @@ extension S3ControlClient { /// - Returns: `DeleteBucketLifecycleConfigurationOutput` : [no documentation found] public func deleteBucketLifecycleConfiguration(input: DeleteBucketLifecycleConfigurationInput) async throws -> DeleteBucketLifecycleConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketLifecycleConfiguration") @@ -965,7 +915,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketLifecycleConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketLifecycleConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketLifecycleConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -984,8 +934,6 @@ extension S3ControlClient { /// - Returns: `DeleteBucketPolicyOutput` : [no documentation found] public func deleteBucketPolicy(input: DeleteBucketPolicyInput) async throws -> DeleteBucketPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketPolicy") @@ -1007,7 +955,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1026,8 +974,6 @@ extension S3ControlClient { /// - Returns: `DeleteBucketReplicationOutput` : [no documentation found] public func deleteBucketReplication(input: DeleteBucketReplicationInput) async throws -> DeleteBucketReplicationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketReplication") @@ -1049,7 +995,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketReplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketReplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketReplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1068,8 +1014,6 @@ extension S3ControlClient { /// - Returns: `DeleteBucketTaggingOutput` : [no documentation found] public func deleteBucketTagging(input: DeleteBucketTaggingInput) async throws -> DeleteBucketTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteBucketTagging") @@ -1091,7 +1035,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteBucketTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteBucketTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteBucketTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1119,8 +1063,6 @@ extension S3ControlClient { /// - `TooManyRequestsException` : public func deleteJobTagging(input: DeleteJobTaggingInput) async throws -> DeleteJobTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteJobTagging") @@ -1142,7 +1084,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteJobTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteJobTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteJobTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1165,8 +1107,6 @@ extension S3ControlClient { /// - Returns: `DeleteMultiRegionAccessPointOutput` : [no documentation found] public func deleteMultiRegionAccessPoint(input: DeleteMultiRegionAccessPointInput) async throws -> DeleteMultiRegionAccessPointOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteMultiRegionAccessPoint") @@ -1188,12 +1128,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(DeleteMultiRegionAccessPointInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DeleteMultiRegionAccessPointRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: DeleteMultiRegionAccessPointInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("DeleteMultiRegionAccessPointRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: DeleteMultiRegionAccessPointInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteMultiRegionAccessPointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteMultiRegionAccessPointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteMultiRegionAccessPointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1212,8 +1152,6 @@ extension S3ControlClient { /// - Returns: `DeletePublicAccessBlockOutput` : [no documentation found] public func deletePublicAccessBlock(input: DeletePublicAccessBlockInput) async throws -> DeletePublicAccessBlockOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deletePublicAccessBlock") @@ -1235,7 +1173,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePublicAccessBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePublicAccessBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePublicAccessBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1250,8 +1188,6 @@ extension S3ControlClient { /// - Returns: `DeleteStorageLensConfigurationOutput` : [no documentation found] public func deleteStorageLensConfiguration(input: DeleteStorageLensConfigurationInput) async throws -> DeleteStorageLensConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteStorageLensConfiguration") @@ -1273,7 +1209,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteStorageLensConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteStorageLensConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteStorageLensConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1288,8 +1224,6 @@ extension S3ControlClient { /// - Returns: `DeleteStorageLensConfigurationTaggingOutput` : [no documentation found] public func deleteStorageLensConfigurationTagging(input: DeleteStorageLensConfigurationTaggingInput) async throws -> DeleteStorageLensConfigurationTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteStorageLensConfigurationTagging") @@ -1311,7 +1245,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteStorageLensConfigurationTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteStorageLensConfigurationTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteStorageLensConfigurationTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1326,8 +1260,6 @@ extension S3ControlClient { /// - Returns: `DeleteStorageLensGroupOutput` : [no documentation found] public func deleteStorageLensGroup(input: DeleteStorageLensGroupInput) async throws -> DeleteStorageLensGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "deleteStorageLensGroup") @@ -1349,7 +1281,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteStorageLensGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteStorageLensGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteStorageLensGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1380,8 +1312,6 @@ extension S3ControlClient { /// - `TooManyRequestsException` : public func describeJob(input: DescribeJobInput) async throws -> DescribeJobOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "describeJob") @@ -1403,7 +1333,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeJobOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeJobOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeJobOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1426,8 +1356,6 @@ extension S3ControlClient { /// - Returns: `DescribeMultiRegionAccessPointOperationOutput` : [no documentation found] public func describeMultiRegionAccessPointOperation(input: DescribeMultiRegionAccessPointOperationInput) async throws -> DescribeMultiRegionAccessPointOperationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "describeMultiRegionAccessPointOperation") @@ -1450,7 +1378,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeMultiRegionAccessPointOperationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeMultiRegionAccessPointOperationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeMultiRegionAccessPointOperationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1465,8 +1393,6 @@ extension S3ControlClient { /// - Returns: `DissociateAccessGrantsIdentityCenterOutput` : [no documentation found] public func dissociateAccessGrantsIdentityCenter(input: DissociateAccessGrantsIdentityCenterInput) async throws -> DissociateAccessGrantsIdentityCenterOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "dissociateAccessGrantsIdentityCenter") @@ -1489,7 +1415,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DissociateAccessGrantsIdentityCenterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DissociateAccessGrantsIdentityCenterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DissociateAccessGrantsIdentityCenterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1504,8 +1430,6 @@ extension S3ControlClient { /// - Returns: `GetAccessGrantOutput` : [no documentation found] public func getAccessGrant(input: GetAccessGrantInput) async throws -> GetAccessGrantOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessGrant") @@ -1528,7 +1452,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessGrantOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessGrantOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessGrantOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1543,8 +1467,6 @@ extension S3ControlClient { /// - Returns: `GetAccessGrantsInstanceOutput` : [no documentation found] public func getAccessGrantsInstance(input: GetAccessGrantsInstanceInput) async throws -> GetAccessGrantsInstanceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessGrantsInstance") @@ -1567,7 +1489,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessGrantsInstanceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessGrantsInstanceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessGrantsInstanceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1582,8 +1504,6 @@ extension S3ControlClient { /// - Returns: `GetAccessGrantsInstanceForPrefixOutput` : [no documentation found] public func getAccessGrantsInstanceForPrefix(input: GetAccessGrantsInstanceForPrefixInput) async throws -> GetAccessGrantsInstanceForPrefixOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessGrantsInstanceForPrefix") @@ -1607,7 +1527,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessGrantsInstanceForPrefixOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessGrantsInstanceForPrefixOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessGrantsInstanceForPrefixOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1622,8 +1542,6 @@ extension S3ControlClient { /// - Returns: `GetAccessGrantsInstanceResourcePolicyOutput` : [no documentation found] public func getAccessGrantsInstanceResourcePolicy(input: GetAccessGrantsInstanceResourcePolicyInput) async throws -> GetAccessGrantsInstanceResourcePolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessGrantsInstanceResourcePolicy") @@ -1646,7 +1564,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessGrantsInstanceResourcePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessGrantsInstanceResourcePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessGrantsInstanceResourcePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1661,8 +1579,6 @@ extension S3ControlClient { /// - Returns: `GetAccessGrantsLocationOutput` : [no documentation found] public func getAccessGrantsLocation(input: GetAccessGrantsLocationInput) async throws -> GetAccessGrantsLocationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessGrantsLocation") @@ -1685,7 +1601,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessGrantsLocationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessGrantsLocationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessGrantsLocationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1706,8 +1622,6 @@ extension S3ControlClient { /// - Returns: `GetAccessPointOutput` : [no documentation found] public func getAccessPoint(input: GetAccessPointInput) async throws -> GetAccessPointOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessPoint") @@ -1729,7 +1643,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessPointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessPointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessPointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1746,8 +1660,6 @@ extension S3ControlClient { /// - Returns: `GetAccessPointConfigurationForObjectLambdaOutput` : [no documentation found] public func getAccessPointConfigurationForObjectLambda(input: GetAccessPointConfigurationForObjectLambdaInput) async throws -> GetAccessPointConfigurationForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessPointConfigurationForObjectLambda") @@ -1769,7 +1681,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessPointConfigurationForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessPointConfigurationForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessPointConfigurationForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1790,8 +1702,6 @@ extension S3ControlClient { /// - Returns: `GetAccessPointForObjectLambdaOutput` : [no documentation found] public func getAccessPointForObjectLambda(input: GetAccessPointForObjectLambdaInput) async throws -> GetAccessPointForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessPointForObjectLambda") @@ -1813,7 +1723,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessPointForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessPointForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessPointForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1832,8 +1742,6 @@ extension S3ControlClient { /// - Returns: `GetAccessPointPolicyOutput` : [no documentation found] public func getAccessPointPolicy(input: GetAccessPointPolicyInput) async throws -> GetAccessPointPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessPointPolicy") @@ -1855,7 +1763,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessPointPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessPointPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessPointPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1874,8 +1782,6 @@ extension S3ControlClient { /// - Returns: `GetAccessPointPolicyForObjectLambdaOutput` : [no documentation found] public func getAccessPointPolicyForObjectLambda(input: GetAccessPointPolicyForObjectLambdaInput) async throws -> GetAccessPointPolicyForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessPointPolicyForObjectLambda") @@ -1897,7 +1803,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessPointPolicyForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessPointPolicyForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessPointPolicyForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1912,8 +1818,6 @@ extension S3ControlClient { /// - Returns: `GetAccessPointPolicyStatusOutput` : [no documentation found] public func getAccessPointPolicyStatus(input: GetAccessPointPolicyStatusInput) async throws -> GetAccessPointPolicyStatusOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessPointPolicyStatus") @@ -1935,7 +1839,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessPointPolicyStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessPointPolicyStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessPointPolicyStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1950,8 +1854,6 @@ extension S3ControlClient { /// - Returns: `GetAccessPointPolicyStatusForObjectLambdaOutput` : [no documentation found] public func getAccessPointPolicyStatusForObjectLambda(input: GetAccessPointPolicyStatusForObjectLambdaInput) async throws -> GetAccessPointPolicyStatusForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getAccessPointPolicyStatusForObjectLambda") @@ -1973,7 +1875,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessPointPolicyStatusForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessPointPolicyStatusForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessPointPolicyStatusForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1994,8 +1896,6 @@ extension S3ControlClient { /// - Returns: `GetBucketOutput` : [no documentation found] public func getBucket(input: GetBucketInput) async throws -> GetBucketOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucket") @@ -2017,7 +1917,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2050,8 +1950,6 @@ extension S3ControlClient { /// - Returns: `GetBucketLifecycleConfigurationOutput` : [no documentation found] public func getBucketLifecycleConfiguration(input: GetBucketLifecycleConfigurationInput) async throws -> GetBucketLifecycleConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketLifecycleConfiguration") @@ -2073,7 +1971,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketLifecycleConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketLifecycleConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketLifecycleConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2094,8 +1992,6 @@ extension S3ControlClient { /// - Returns: `GetBucketPolicyOutput` : [no documentation found] public func getBucketPolicy(input: GetBucketPolicyInput) async throws -> GetBucketPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketPolicy") @@ -2117,7 +2013,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2136,8 +2032,6 @@ extension S3ControlClient { /// - Returns: `GetBucketReplicationOutput` : [no documentation found] public func getBucketReplication(input: GetBucketReplicationInput) async throws -> GetBucketReplicationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketReplication") @@ -2159,7 +2053,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketReplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketReplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketReplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2188,8 +2082,6 @@ extension S3ControlClient { /// - Returns: `GetBucketTaggingOutput` : [no documentation found] public func getBucketTagging(input: GetBucketTaggingInput) async throws -> GetBucketTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketTagging") @@ -2211,7 +2103,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2232,8 +2124,6 @@ extension S3ControlClient { /// - Returns: `GetBucketVersioningOutput` : [no documentation found] public func getBucketVersioning(input: GetBucketVersioningInput) async throws -> GetBucketVersioningOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getBucketVersioning") @@ -2255,7 +2145,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetBucketVersioningOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetBucketVersioningOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetBucketVersioningOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2270,8 +2160,6 @@ extension S3ControlClient { /// - Returns: `GetDataAccessOutput` : [no documentation found] public func getDataAccess(input: GetDataAccessInput) async throws -> GetDataAccessOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getDataAccess") @@ -2295,7 +2183,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetDataAccessOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetDataAccessOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetDataAccessOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2323,8 +2211,6 @@ extension S3ControlClient { /// - `TooManyRequestsException` : public func getJobTagging(input: GetJobTaggingInput) async throws -> GetJobTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getJobTagging") @@ -2346,7 +2232,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetJobTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetJobTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetJobTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2369,8 +2255,6 @@ extension S3ControlClient { /// - Returns: `GetMultiRegionAccessPointOutput` : [no documentation found] public func getMultiRegionAccessPoint(input: GetMultiRegionAccessPointInput) async throws -> GetMultiRegionAccessPointOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getMultiRegionAccessPoint") @@ -2393,7 +2277,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMultiRegionAccessPointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMultiRegionAccessPointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMultiRegionAccessPointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2412,8 +2296,6 @@ extension S3ControlClient { /// - Returns: `GetMultiRegionAccessPointPolicyOutput` : [no documentation found] public func getMultiRegionAccessPointPolicy(input: GetMultiRegionAccessPointPolicyInput) async throws -> GetMultiRegionAccessPointPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getMultiRegionAccessPointPolicy") @@ -2436,7 +2318,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMultiRegionAccessPointPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMultiRegionAccessPointPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMultiRegionAccessPointPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2455,8 +2337,6 @@ extension S3ControlClient { /// - Returns: `GetMultiRegionAccessPointPolicyStatusOutput` : [no documentation found] public func getMultiRegionAccessPointPolicyStatus(input: GetMultiRegionAccessPointPolicyStatusInput) async throws -> GetMultiRegionAccessPointPolicyStatusOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getMultiRegionAccessPointPolicyStatus") @@ -2479,7 +2359,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMultiRegionAccessPointPolicyStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMultiRegionAccessPointPolicyStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMultiRegionAccessPointPolicyStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2507,8 +2387,6 @@ extension S3ControlClient { /// - Returns: `GetMultiRegionAccessPointRoutesOutput` : [no documentation found] public func getMultiRegionAccessPointRoutes(input: GetMultiRegionAccessPointRoutesInput) async throws -> GetMultiRegionAccessPointRoutesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getMultiRegionAccessPointRoutes") @@ -2531,7 +2409,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetMultiRegionAccessPointRoutesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetMultiRegionAccessPointRoutesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetMultiRegionAccessPointRoutesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2555,8 +2433,6 @@ extension S3ControlClient { /// - `NoSuchPublicAccessBlockConfiguration` : Amazon S3 throws this exception if you make a GetPublicAccessBlock request against an account that doesn't have a PublicAccessBlockConfiguration set. public func getPublicAccessBlock(input: GetPublicAccessBlockInput) async throws -> GetPublicAccessBlockOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getPublicAccessBlock") @@ -2578,7 +2454,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPublicAccessBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPublicAccessBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPublicAccessBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2593,8 +2469,6 @@ extension S3ControlClient { /// - Returns: `GetStorageLensConfigurationOutput` : [no documentation found] public func getStorageLensConfiguration(input: GetStorageLensConfigurationInput) async throws -> GetStorageLensConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getStorageLensConfiguration") @@ -2616,7 +2490,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetStorageLensConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetStorageLensConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetStorageLensConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2631,8 +2505,6 @@ extension S3ControlClient { /// - Returns: `GetStorageLensConfigurationTaggingOutput` : [no documentation found] public func getStorageLensConfigurationTagging(input: GetStorageLensConfigurationTaggingInput) async throws -> GetStorageLensConfigurationTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getStorageLensConfigurationTagging") @@ -2654,7 +2526,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetStorageLensConfigurationTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetStorageLensConfigurationTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetStorageLensConfigurationTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2669,8 +2541,6 @@ extension S3ControlClient { /// - Returns: `GetStorageLensGroupOutput` : [no documentation found] public func getStorageLensGroup(input: GetStorageLensGroupInput) async throws -> GetStorageLensGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "getStorageLensGroup") @@ -2692,7 +2562,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetStorageLensGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetStorageLensGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetStorageLensGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2707,8 +2577,6 @@ extension S3ControlClient { /// - Returns: `ListAccessGrantsOutput` : [no documentation found] public func listAccessGrants(input: ListAccessGrantsInput) async throws -> ListAccessGrantsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listAccessGrants") @@ -2732,7 +2600,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAccessGrantsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAccessGrantsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAccessGrantsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2747,8 +2615,6 @@ extension S3ControlClient { /// - Returns: `ListAccessGrantsInstancesOutput` : [no documentation found] public func listAccessGrantsInstances(input: ListAccessGrantsInstancesInput) async throws -> ListAccessGrantsInstancesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listAccessGrantsInstances") @@ -2772,7 +2638,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAccessGrantsInstancesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAccessGrantsInstancesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAccessGrantsInstancesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2787,8 +2653,6 @@ extension S3ControlClient { /// - Returns: `ListAccessGrantsLocationsOutput` : [no documentation found] public func listAccessGrantsLocations(input: ListAccessGrantsLocationsInput) async throws -> ListAccessGrantsLocationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listAccessGrantsLocations") @@ -2812,7 +2676,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAccessGrantsLocationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAccessGrantsLocationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAccessGrantsLocationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2833,8 +2697,6 @@ extension S3ControlClient { /// - Returns: `ListAccessPointsOutput` : [no documentation found] public func listAccessPoints(input: ListAccessPointsInput) async throws -> ListAccessPointsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listAccessPoints") @@ -2857,7 +2719,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAccessPointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAccessPointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAccessPointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2878,8 +2740,6 @@ extension S3ControlClient { /// - Returns: `ListAccessPointsForObjectLambdaOutput` : [no documentation found] public func listAccessPointsForObjectLambda(input: ListAccessPointsForObjectLambdaInput) async throws -> ListAccessPointsForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listAccessPointsForObjectLambda") @@ -2902,7 +2762,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListAccessPointsForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListAccessPointsForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListAccessPointsForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2932,8 +2792,6 @@ extension S3ControlClient { /// - `InvalidRequestException` : public func listJobs(input: ListJobsInput) async throws -> ListJobsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listJobs") @@ -2956,7 +2814,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListJobsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListJobsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListJobsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2979,8 +2837,6 @@ extension S3ControlClient { /// - Returns: `ListMultiRegionAccessPointsOutput` : [no documentation found] public func listMultiRegionAccessPoints(input: ListMultiRegionAccessPointsInput) async throws -> ListMultiRegionAccessPointsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listMultiRegionAccessPoints") @@ -3004,7 +2860,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListMultiRegionAccessPointsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListMultiRegionAccessPointsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListMultiRegionAccessPointsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3019,8 +2875,6 @@ extension S3ControlClient { /// - Returns: `ListRegionalBucketsOutput` : [no documentation found] public func listRegionalBuckets(input: ListRegionalBucketsInput) async throws -> ListRegionalBucketsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listRegionalBuckets") @@ -3043,7 +2897,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListRegionalBucketsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListRegionalBucketsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListRegionalBucketsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3058,8 +2912,6 @@ extension S3ControlClient { /// - Returns: `ListStorageLensConfigurationsOutput` : [no documentation found] public func listStorageLensConfigurations(input: ListStorageLensConfigurationsInput) async throws -> ListStorageLensConfigurationsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listStorageLensConfigurations") @@ -3082,7 +2934,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStorageLensConfigurationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStorageLensConfigurationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStorageLensConfigurationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3097,8 +2949,6 @@ extension S3ControlClient { /// - Returns: `ListStorageLensGroupsOutput` : [no documentation found] public func listStorageLensGroups(input: ListStorageLensGroupsInput) async throws -> ListStorageLensGroupsOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listStorageLensGroups") @@ -3121,7 +2971,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListStorageLensGroupsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListStorageLensGroupsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListStorageLensGroupsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3136,8 +2986,6 @@ extension S3ControlClient { /// - Returns: `ListTagsForResourceOutput` : [no documentation found] public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .get) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -3159,7 +3007,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3174,8 +3022,6 @@ extension S3ControlClient { /// - Returns: `PutAccessGrantsInstanceResourcePolicyOutput` : [no documentation found] public func putAccessGrantsInstanceResourcePolicy(input: PutAccessGrantsInstanceResourcePolicyInput) async throws -> PutAccessGrantsInstanceResourcePolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putAccessGrantsInstanceResourcePolicy") @@ -3196,12 +3042,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutAccessGrantsInstanceResourcePolicyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutAccessGrantsInstanceResourcePolicyRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutAccessGrantsInstanceResourcePolicyInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutAccessGrantsInstanceResourcePolicyRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutAccessGrantsInstanceResourcePolicyInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutAccessGrantsInstanceResourcePolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutAccessGrantsInstanceResourcePolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutAccessGrantsInstanceResourcePolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3218,8 +3064,6 @@ extension S3ControlClient { /// - Returns: `PutAccessPointConfigurationForObjectLambdaOutput` : [no documentation found] public func putAccessPointConfigurationForObjectLambda(input: PutAccessPointConfigurationForObjectLambdaInput) async throws -> PutAccessPointConfigurationForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putAccessPointConfigurationForObjectLambda") @@ -3239,12 +3083,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutAccessPointConfigurationForObjectLambdaInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutAccessPointConfigurationForObjectLambdaRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutAccessPointConfigurationForObjectLambdaInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutAccessPointConfigurationForObjectLambdaRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutAccessPointConfigurationForObjectLambdaInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutAccessPointConfigurationForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutAccessPointConfigurationForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutAccessPointConfigurationForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3263,8 +3107,6 @@ extension S3ControlClient { /// - Returns: `PutAccessPointPolicyOutput` : [no documentation found] public func putAccessPointPolicy(input: PutAccessPointPolicyInput) async throws -> PutAccessPointPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putAccessPointPolicy") @@ -3284,12 +3126,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutAccessPointPolicyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutAccessPointPolicyRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutAccessPointPolicyInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutAccessPointPolicyRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutAccessPointPolicyInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutAccessPointPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutAccessPointPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutAccessPointPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3308,8 +3150,6 @@ extension S3ControlClient { /// - Returns: `PutAccessPointPolicyForObjectLambdaOutput` : [no documentation found] public func putAccessPointPolicyForObjectLambda(input: PutAccessPointPolicyForObjectLambdaInput) async throws -> PutAccessPointPolicyForObjectLambdaOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putAccessPointPolicyForObjectLambda") @@ -3329,12 +3169,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutAccessPointPolicyForObjectLambdaInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutAccessPointPolicyForObjectLambdaRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutAccessPointPolicyForObjectLambdaInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutAccessPointPolicyForObjectLambdaRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutAccessPointPolicyForObjectLambdaInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutAccessPointPolicyForObjectLambdaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutAccessPointPolicyForObjectLambdaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutAccessPointPolicyForObjectLambdaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3353,8 +3193,6 @@ extension S3ControlClient { /// - Returns: `PutBucketLifecycleConfigurationOutput` : [no documentation found] public func putBucketLifecycleConfiguration(input: PutBucketLifecycleConfigurationInput) async throws -> PutBucketLifecycleConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketLifecycleConfiguration") @@ -3375,12 +3213,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketLifecycleConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("LifecycleConfiguration", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.LifecycleConfiguration.writingClosure(_:to:), keyPath: \.lifecycleConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("LifecycleConfiguration", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.LifecycleConfiguration.writingClosure(_:to:), keyPath: \.lifecycleConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketLifecycleConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketLifecycleConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketLifecycleConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3399,8 +3237,6 @@ extension S3ControlClient { /// - Returns: `PutBucketPolicyOutput` : [no documentation found] public func putBucketPolicy(input: PutBucketPolicyInput) async throws -> PutBucketPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketPolicy") @@ -3421,12 +3257,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketPolicyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutBucketPolicyRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutBucketPolicyInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutBucketPolicyRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutBucketPolicyInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3454,8 +3290,6 @@ extension S3ControlClient { /// - Returns: `PutBucketReplicationOutput` : [no documentation found] public func putBucketReplication(input: PutBucketReplicationInput) async throws -> PutBucketReplicationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketReplication") @@ -3476,12 +3310,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketReplicationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ReplicationConfiguration", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.ReplicationConfiguration.writingClosure(_:to:), keyPath: \.replicationConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("ReplicationConfiguration", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.ReplicationConfiguration.writingClosure(_:to:), keyPath: \.replicationConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketReplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketReplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketReplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3531,8 +3365,6 @@ extension S3ControlClient { /// - Returns: `PutBucketTaggingOutput` : [no documentation found] public func putBucketTagging(input: PutBucketTaggingInput) async throws -> PutBucketTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketTagging") @@ -3553,12 +3385,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketTaggingInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Tagging", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.Tagging.writingClosure(_:to:), keyPath: \.tagging, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("Tagging", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.Tagging.writingClosure(_:to:), keyPath: \.tagging, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3586,8 +3418,6 @@ extension S3ControlClient { /// - Returns: `PutBucketVersioningOutput` : [no documentation found] public func putBucketVersioning(input: PutBucketVersioningInput) async throws -> PutBucketVersioningOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putBucketVersioning") @@ -3608,12 +3438,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutBucketVersioningInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("VersioningConfiguration", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.VersioningConfiguration.writingClosure(_:to:), keyPath: \.versioningConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("VersioningConfiguration", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.VersioningConfiguration.writingClosure(_:to:), keyPath: \.versioningConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutBucketVersioningOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutBucketVersioningOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutBucketVersioningOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3664,8 +3494,6 @@ extension S3ControlClient { /// - `TooManyTagsException` : Amazon S3 throws this exception if you have too many tags in your tag set. public func putJobTagging(input: PutJobTaggingInput) async throws -> PutJobTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putJobTagging") @@ -3685,12 +3513,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutJobTaggingInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutJobTaggingRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutJobTaggingInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutJobTaggingRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutJobTaggingInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutJobTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutJobTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutJobTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3709,8 +3537,6 @@ extension S3ControlClient { /// - Returns: `PutMultiRegionAccessPointPolicyOutput` : [no documentation found] public func putMultiRegionAccessPointPolicy(input: PutMultiRegionAccessPointPolicyInput) async throws -> PutMultiRegionAccessPointPolicyOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putMultiRegionAccessPointPolicy") @@ -3732,12 +3558,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutMultiRegionAccessPointPolicyInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutMultiRegionAccessPointPolicyRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutMultiRegionAccessPointPolicyInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutMultiRegionAccessPointPolicyRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutMultiRegionAccessPointPolicyInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutMultiRegionAccessPointPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutMultiRegionAccessPointPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutMultiRegionAccessPointPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3756,8 +3582,6 @@ extension S3ControlClient { /// - Returns: `PutPublicAccessBlockOutput` : [no documentation found] public func putPublicAccessBlock(input: PutPublicAccessBlockInput) async throws -> PutPublicAccessBlockOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putPublicAccessBlock") @@ -3777,12 +3601,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutPublicAccessBlockInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PublicAccessBlockConfiguration", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:), keyPath: \.publicAccessBlockConfiguration, defaultBody: nil)) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.PayloadBodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PublicAccessBlockConfiguration", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:), keyPath: \.publicAccessBlockConfiguration, defaultBody: nil)) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutPublicAccessBlockOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutPublicAccessBlockOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutPublicAccessBlockOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3797,8 +3621,6 @@ extension S3ControlClient { /// - Returns: `PutStorageLensConfigurationOutput` : [no documentation found] public func putStorageLensConfiguration(input: PutStorageLensConfigurationInput) async throws -> PutStorageLensConfigurationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putStorageLensConfiguration") @@ -3818,12 +3640,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutStorageLensConfigurationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutStorageLensConfigurationRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutStorageLensConfigurationInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutStorageLensConfigurationRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutStorageLensConfigurationInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutStorageLensConfigurationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutStorageLensConfigurationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutStorageLensConfigurationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3838,8 +3660,6 @@ extension S3ControlClient { /// - Returns: `PutStorageLensConfigurationTaggingOutput` : [no documentation found] public func putStorageLensConfigurationTagging(input: PutStorageLensConfigurationTaggingInput) async throws -> PutStorageLensConfigurationTaggingOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "putStorageLensConfigurationTagging") @@ -3859,12 +3679,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(PutStorageLensConfigurationTaggingInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutStorageLensConfigurationTaggingRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutStorageLensConfigurationTaggingInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("PutStorageLensConfigurationTaggingRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: PutStorageLensConfigurationTaggingInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutStorageLensConfigurationTaggingOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutStorageLensConfigurationTaggingOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutStorageLensConfigurationTaggingOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3892,8 +3712,6 @@ extension S3ControlClient { /// - Returns: `SubmitMultiRegionAccessPointRoutesOutput` : [no documentation found] public func submitMultiRegionAccessPointRoutes(input: SubmitMultiRegionAccessPointRoutesInput) async throws -> SubmitMultiRegionAccessPointRoutesOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .patch) .withServiceName(value: serviceName) .withOperation(value: "submitMultiRegionAccessPointRoutes") @@ -3914,12 +3732,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(SubmitMultiRegionAccessPointRoutesInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("SubmitMultiRegionAccessPointRoutesRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: SubmitMultiRegionAccessPointRoutesInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("SubmitMultiRegionAccessPointRoutesRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: SubmitMultiRegionAccessPointRoutesInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SubmitMultiRegionAccessPointRoutesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SubmitMultiRegionAccessPointRoutesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SubmitMultiRegionAccessPointRoutesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3934,8 +3752,6 @@ extension S3ControlClient { /// - Returns: `TagResourceOutput` : [no documentation found] public func tagResource(input: TagResourceInput) async throws -> TagResourceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagResource") @@ -3955,12 +3771,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(TagResourceInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("TagResourceRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: TagResourceInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("TagResourceRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: TagResourceInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3975,8 +3791,6 @@ extension S3ControlClient { /// - Returns: `UntagResourceOutput` : [no documentation found] public func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .delete) .withServiceName(value: serviceName) .withOperation(value: "untagResource") @@ -3999,7 +3813,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4014,8 +3828,6 @@ extension S3ControlClient { /// - Returns: `UpdateAccessGrantsLocationOutput` : [no documentation found] public func updateAccessGrantsLocation(input: UpdateAccessGrantsLocationInput) async throws -> UpdateAccessGrantsLocationOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateAccessGrantsLocation") @@ -4036,12 +3848,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateAccessGrantsLocationInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateAccessGrantsLocationRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: UpdateAccessGrantsLocationInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateAccessGrantsLocationRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: UpdateAccessGrantsLocationInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateAccessGrantsLocationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateAccessGrantsLocationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateAccessGrantsLocationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4072,8 +3884,6 @@ extension S3ControlClient { /// - `TooManyRequestsException` : public func updateJobPriority(input: UpdateJobPriorityInput) async throws -> UpdateJobPriorityOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateJobPriority") @@ -4096,7 +3906,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateJobPriorityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateJobPriorityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateJobPriorityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4128,8 +3938,6 @@ extension S3ControlClient { /// - `TooManyRequestsException` : public func updateJobStatus(input: UpdateJobStatusInput) async throws -> UpdateJobStatusOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateJobStatus") @@ -4152,7 +3960,7 @@ extension S3ControlClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateJobStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateJobStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateJobStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -4167,8 +3975,6 @@ extension S3ControlClient { /// - Returns: `UpdateStorageLensGroupOutput` : [no documentation found] public func updateStorageLensGroup(input: UpdateStorageLensGroupInput) async throws -> UpdateStorageLensGroupOutput { let context = ClientRuntime.HttpContextBuilder() - .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .put) .withServiceName(value: serviceName) .withOperation(value: "updateStorageLensGroup") @@ -4188,12 +3994,12 @@ extension S3ControlClient { operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.HeaderMiddleware(UpdateStorageLensGroupInput.headerProvider(_:))) operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/xml")) - operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateStorageLensGroupRequest", namespace: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: UpdateStorageLensGroupInput.writingClosure(_:to:))) + operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.BodyMiddleware(documentWritingClosure: SmithyXML.XMLReadWrite.documentWritingClosure(rootNodeInfo: .init("UpdateStorageLensGroupRequest", namespaceDef: .init(prefix: "", uri: "http://awss3control.amazonaws.com/doc/2018-08-20/"))), inputWritingClosure: UpdateStorageLensGroupInput.writingClosure(_:to:))) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(signedBodyHeader: .contentSha256, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateStorageLensGroupOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateStorageLensGroupOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateStorageLensGroupOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSS3Control/models/Models.swift b/Sources/Services/AWSS3Control/models/Models.swift index 71247035845..e4294d546e2 100644 --- a/Sources/Services/AWSS3Control/models/Models.swift +++ b/Sources/Services/AWSS3Control/models/Models.swift @@ -1,22 +1,23 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite import SmithyXML -extension S3ControlClientTypes.AbortIncompleteMultipartUpload: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case daysAfterInitiation = "DaysAfterInitiation" - } +extension S3ControlClientTypes.AbortIncompleteMultipartUpload { static func writingClosure(_ value: S3ControlClientTypes.AbortIncompleteMultipartUpload?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DaysAfterInitiation")].write(value.daysAfterInitiation) + try writer["DaysAfterInitiation"].write(value.daysAfterInitiation) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let daysAfterInitiationDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .daysAfterInitiation) ?? 0 - daysAfterInitiation = daysAfterInitiationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AbortIncompleteMultipartUpload() + value.daysAfterInitiation = try reader["DaysAfterInitiation"].readIfPresent() ?? 0 + return value + } } } @@ -36,20 +37,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AccessControlTranslation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case owner = "Owner" - } +extension S3ControlClientTypes.AccessControlTranslation { static func writingClosure(_ value: S3ControlClientTypes.AccessControlTranslation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Owner")].write(value.owner) + try writer["Owner"].write(value.owner) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.OwnerOverride.self, forKey: .owner) - owner = ownerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AccessControlTranslation() + value.owner = try reader["Owner"].readIfPresent() + return value + } } } @@ -70,20 +71,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AccessGrantsLocationConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3SubPrefix = "S3SubPrefix" - } +extension S3ControlClientTypes.AccessGrantsLocationConfiguration { static func writingClosure(_ value: S3ControlClientTypes.AccessGrantsLocationConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("S3SubPrefix")].write(value.s3SubPrefix) + try writer["S3SubPrefix"].write(value.s3SubPrefix) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3SubPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .s3SubPrefix) - s3SubPrefix = s3SubPrefixDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AccessGrantsLocationConfiguration() + value.s3SubPrefix = try reader["S3SubPrefix"].readIfPresent() + return value + } } } @@ -103,44 +104,32 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AccessPoint: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPointArn = "AccessPointArn" - case alias = "Alias" - case bucket = "Bucket" - case bucketAccountId = "BucketAccountId" - case name = "Name" - case networkOrigin = "NetworkOrigin" - case vpcConfiguration = "VpcConfiguration" - } +extension S3ControlClientTypes.AccessPoint { static func writingClosure(_ value: S3ControlClientTypes.AccessPoint?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessPointArn")].write(value.accessPointArn) - try writer[.init("Alias")].write(value.alias) - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("BucketAccountId")].write(value.bucketAccountId) - try writer[.init("Name")].write(value.name) - try writer[.init("NetworkOrigin")].write(value.networkOrigin) - try writer[.init("VpcConfiguration")].write(value.vpcConfiguration, writingClosure: S3ControlClientTypes.VpcConfiguration.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let networkOriginDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.NetworkOrigin.self, forKey: .networkOrigin) - networkOrigin = networkOriginDecoded - let vpcConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.VpcConfiguration.self, forKey: .vpcConfiguration) - vpcConfiguration = vpcConfigurationDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let accessPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessPointArn) - accessPointArn = accessPointArnDecoded - let aliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alias) - alias = aliasDecoded - let bucketAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketAccountId) - bucketAccountId = bucketAccountIdDecoded + try writer["AccessPointArn"].write(value.accessPointArn) + try writer["Alias"].write(value.alias) + try writer["Bucket"].write(value.bucket) + try writer["BucketAccountId"].write(value.bucketAccountId) + try writer["Name"].write(value.name) + try writer["NetworkOrigin"].write(value.networkOrigin) + try writer["VpcConfiguration"].write(value.vpcConfiguration, writingClosure: S3ControlClientTypes.VpcConfiguration.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AccessPoint() + value.name = try reader["Name"].readIfPresent() + value.networkOrigin = try reader["NetworkOrigin"].readIfPresent() + value.vpcConfiguration = try reader["VpcConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.VpcConfiguration.readingClosure) + value.bucket = try reader["Bucket"].readIfPresent() + value.accessPointArn = try reader["AccessPointArn"].readIfPresent() + value.alias = try reader["Alias"].readIfPresent() + value.bucketAccountId = try reader["BucketAccountId"].readIfPresent() + return value + } } } @@ -187,40 +176,30 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AccountLevel: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activityMetrics = "ActivityMetrics" - case advancedCostOptimizationMetrics = "AdvancedCostOptimizationMetrics" - case advancedDataProtectionMetrics = "AdvancedDataProtectionMetrics" - case bucketLevel = "BucketLevel" - case detailedStatusCodesMetrics = "DetailedStatusCodesMetrics" - case storageLensGroupLevel = "StorageLensGroupLevel" - } +extension S3ControlClientTypes.AccountLevel { static func writingClosure(_ value: S3ControlClientTypes.AccountLevel?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ActivityMetrics")].write(value.activityMetrics, writingClosure: S3ControlClientTypes.ActivityMetrics.writingClosure(_:to:)) - try writer[.init("AdvancedCostOptimizationMetrics")].write(value.advancedCostOptimizationMetrics, writingClosure: S3ControlClientTypes.AdvancedCostOptimizationMetrics.writingClosure(_:to:)) - try writer[.init("AdvancedDataProtectionMetrics")].write(value.advancedDataProtectionMetrics, writingClosure: S3ControlClientTypes.AdvancedDataProtectionMetrics.writingClosure(_:to:)) - try writer[.init("BucketLevel")].write(value.bucketLevel, writingClosure: S3ControlClientTypes.BucketLevel.writingClosure(_:to:)) - try writer[.init("DetailedStatusCodesMetrics")].write(value.detailedStatusCodesMetrics, writingClosure: S3ControlClientTypes.DetailedStatusCodesMetrics.writingClosure(_:to:)) - try writer[.init("StorageLensGroupLevel")].write(value.storageLensGroupLevel, writingClosure: S3ControlClientTypes.StorageLensGroupLevel.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let activityMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ActivityMetrics.self, forKey: .activityMetrics) - activityMetrics = activityMetricsDecoded - let bucketLevelDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.BucketLevel.self, forKey: .bucketLevel) - bucketLevel = bucketLevelDecoded - let advancedCostOptimizationMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AdvancedCostOptimizationMetrics.self, forKey: .advancedCostOptimizationMetrics) - advancedCostOptimizationMetrics = advancedCostOptimizationMetricsDecoded - let advancedDataProtectionMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AdvancedDataProtectionMetrics.self, forKey: .advancedDataProtectionMetrics) - advancedDataProtectionMetrics = advancedDataProtectionMetricsDecoded - let detailedStatusCodesMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.DetailedStatusCodesMetrics.self, forKey: .detailedStatusCodesMetrics) - detailedStatusCodesMetrics = detailedStatusCodesMetricsDecoded - let storageLensGroupLevelDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensGroupLevel.self, forKey: .storageLensGroupLevel) - storageLensGroupLevel = storageLensGroupLevelDecoded + try writer["ActivityMetrics"].write(value.activityMetrics, writingClosure: S3ControlClientTypes.ActivityMetrics.writingClosure(_:to:)) + try writer["AdvancedCostOptimizationMetrics"].write(value.advancedCostOptimizationMetrics, writingClosure: S3ControlClientTypes.AdvancedCostOptimizationMetrics.writingClosure(_:to:)) + try writer["AdvancedDataProtectionMetrics"].write(value.advancedDataProtectionMetrics, writingClosure: S3ControlClientTypes.AdvancedDataProtectionMetrics.writingClosure(_:to:)) + try writer["BucketLevel"].write(value.bucketLevel, writingClosure: S3ControlClientTypes.BucketLevel.writingClosure(_:to:)) + try writer["DetailedStatusCodesMetrics"].write(value.detailedStatusCodesMetrics, writingClosure: S3ControlClientTypes.DetailedStatusCodesMetrics.writingClosure(_:to:)) + try writer["StorageLensGroupLevel"].write(value.storageLensGroupLevel, writingClosure: S3ControlClientTypes.StorageLensGroupLevel.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AccountLevel() + value.activityMetrics = try reader["ActivityMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.ActivityMetrics.readingClosure) + value.bucketLevel = try reader["BucketLevel"].readIfPresent(readingClosure: S3ControlClientTypes.BucketLevel.readingClosure) + value.advancedCostOptimizationMetrics = try reader["AdvancedCostOptimizationMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.AdvancedCostOptimizationMetrics.readingClosure) + value.advancedDataProtectionMetrics = try reader["AdvancedDataProtectionMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.AdvancedDataProtectionMetrics.readingClosure) + value.detailedStatusCodesMetrics = try reader["DetailedStatusCodesMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.DetailedStatusCodesMetrics.readingClosure) + value.storageLensGroupLevel = try reader["StorageLensGroupLevel"].readIfPresent(readingClosure: S3ControlClientTypes.StorageLensGroupLevel.readingClosure) + return value + } } } @@ -261,20 +240,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ActivityMetrics: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isEnabled = "IsEnabled" - } +extension S3ControlClientTypes.ActivityMetrics { static func writingClosure(_ value: S3ControlClientTypes.ActivityMetrics?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsEnabled")].write(value.isEnabled) + try writer["IsEnabled"].write(value.isEnabled) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) ?? false - isEnabled = isEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ActivityMetrics() + value.isEnabled = try reader["IsEnabled"].readIfPresent() ?? false + return value + } } } @@ -294,20 +273,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AdvancedCostOptimizationMetrics: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isEnabled = "IsEnabled" - } +extension S3ControlClientTypes.AdvancedCostOptimizationMetrics { static func writingClosure(_ value: S3ControlClientTypes.AdvancedCostOptimizationMetrics?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsEnabled")].write(value.isEnabled) + try writer["IsEnabled"].write(value.isEnabled) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) ?? false - isEnabled = isEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AdvancedCostOptimizationMetrics() + value.isEnabled = try reader["IsEnabled"].readIfPresent() ?? false + return value + } } } @@ -327,20 +306,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AdvancedDataProtectionMetrics: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isEnabled = "IsEnabled" - } +extension S3ControlClientTypes.AdvancedDataProtectionMetrics { static func writingClosure(_ value: S3ControlClientTypes.AdvancedDataProtectionMetrics?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsEnabled")].write(value.isEnabled) + try writer["IsEnabled"].write(value.isEnabled) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) ?? false - isEnabled = isEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AdvancedDataProtectionMetrics() + value.isEnabled = try reader["IsEnabled"].readIfPresent() ?? false + return value + } } } @@ -361,13 +340,9 @@ extension S3ControlClientTypes { } extension AssociateAccessGrantsIdentityCenterInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identityCenterArn = "IdentityCenterArn" - } - static func writingClosure(_ value: AssociateAccessGrantsIdentityCenterInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IdentityCenterArn")].write(value.identityCenterArn) + try writer["IdentityCenterArn"].write(value.identityCenterArn) } } @@ -407,24 +382,12 @@ public struct AssociateAccessGrantsIdentityCenterInput: Swift.Equatable { } } -struct AssociateAccessGrantsIdentityCenterInputBody: Swift.Equatable { - let identityCenterArn: Swift.String? -} - -extension AssociateAccessGrantsIdentityCenterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identityCenterArn = "IdentityCenterArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityCenterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identityCenterArn) - identityCenterArn = identityCenterArnDecoded - } -} +extension AssociateAccessGrantsIdentityCenterOutput { -extension AssociateAccessGrantsIdentityCenterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AssociateAccessGrantsIdentityCenterOutput() + } } } @@ -433,41 +396,39 @@ public struct AssociateAccessGrantsIdentityCenterOutput: Swift.Equatable { public init() { } } -enum AssociateAccessGrantsIdentityCenterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AssociateAccessGrantsIdentityCenterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.AsyncErrorDetails: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case code = "Code" - case message = "Message" - case requestId = "RequestId" - case resource = "Resource" - } +extension S3ControlClientTypes.AsyncErrorDetails { static func writingClosure(_ value: S3ControlClientTypes.AsyncErrorDetails?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Code")].write(value.code) - try writer[.init("Message")].write(value.message) - try writer[.init("RequestId")].write(value.requestId) - try writer[.init("Resource")].write(value.resource) + try writer["Code"].write(value.code) + try writer["Message"].write(value.message) + try writer["RequestId"].write(value.requestId) + try writer["Resource"].write(value.resource) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let resourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resource) - resource = resourceDecoded - let requestIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestId) - requestId = requestIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AsyncErrorDetails() + value.code = try reader["Code"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.resource = try reader["Resource"].readIfPresent() + value.requestId = try reader["RequestId"].readIfPresent() + return value + } } } @@ -499,40 +460,30 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AsyncOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "CreationTime" - case operation = "Operation" - case requestParameters = "RequestParameters" - case requestStatus = "RequestStatus" - case requestTokenARN = "RequestTokenARN" - case responseDetails = "ResponseDetails" - } +extension S3ControlClientTypes.AsyncOperation { static func writingClosure(_ value: S3ControlClientTypes.AsyncOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreationTime")].writeTimestamp(value.creationTime, format: .dateTime) - try writer[.init("Operation")].write(value.operation) - try writer[.init("RequestParameters")].write(value.requestParameters, writingClosure: S3ControlClientTypes.AsyncRequestParameters.writingClosure(_:to:)) - try writer[.init("RequestStatus")].write(value.requestStatus) - try writer[.init("RequestTokenARN")].write(value.requestTokenARN) - try writer[.init("ResponseDetails")].write(value.responseDetails, writingClosure: S3ControlClientTypes.AsyncResponseDetails.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let operationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AsyncOperationName.self, forKey: .operation) - operation = operationDecoded - let requestTokenARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestTokenARN) - requestTokenARN = requestTokenARNDecoded - let requestParametersDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AsyncRequestParameters.self, forKey: .requestParameters) - requestParameters = requestParametersDecoded - let requestStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestStatus) - requestStatus = requestStatusDecoded - let responseDetailsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AsyncResponseDetails.self, forKey: .responseDetails) - responseDetails = responseDetailsDecoded + try writer["CreationTime"].writeTimestamp(value.creationTime, format: .dateTime) + try writer["Operation"].write(value.operation) + try writer["RequestParameters"].write(value.requestParameters, writingClosure: S3ControlClientTypes.AsyncRequestParameters.writingClosure(_:to:)) + try writer["RequestStatus"].write(value.requestStatus) + try writer["RequestTokenARN"].write(value.requestTokenARN) + try writer["ResponseDetails"].write(value.responseDetails, writingClosure: S3ControlClientTypes.AsyncResponseDetails.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AsyncOperation() + value.creationTime = try reader["CreationTime"].readTimestampIfPresent(format: .dateTime) + value.operation = try reader["Operation"].readIfPresent() + value.requestTokenARN = try reader["RequestTokenARN"].readIfPresent() + value.requestParameters = try reader["RequestParameters"].readIfPresent(readingClosure: S3ControlClientTypes.AsyncRequestParameters.readingClosure) + value.requestStatus = try reader["RequestStatus"].readIfPresent() + value.responseDetails = try reader["ResponseDetails"].readIfPresent(readingClosure: S3ControlClientTypes.AsyncResponseDetails.readingClosure) + return value + } } } @@ -607,28 +558,24 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.AsyncRequestParameters: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createMultiRegionAccessPointRequest = "CreateMultiRegionAccessPointRequest" - case deleteMultiRegionAccessPointRequest = "DeleteMultiRegionAccessPointRequest" - case putMultiRegionAccessPointPolicyRequest = "PutMultiRegionAccessPointPolicyRequest" - } +extension S3ControlClientTypes.AsyncRequestParameters { static func writingClosure(_ value: S3ControlClientTypes.AsyncRequestParameters?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreateMultiRegionAccessPointRequest")].write(value.createMultiRegionAccessPointRequest, writingClosure: S3ControlClientTypes.CreateMultiRegionAccessPointInput.writingClosure(_:to:)) - try writer[.init("DeleteMultiRegionAccessPointRequest")].write(value.deleteMultiRegionAccessPointRequest, writingClosure: S3ControlClientTypes.DeleteMultiRegionAccessPointInput.writingClosure(_:to:)) - try writer[.init("PutMultiRegionAccessPointPolicyRequest")].write(value.putMultiRegionAccessPointPolicyRequest, writingClosure: S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput.writingClosure(_:to:)) + try writer["CreateMultiRegionAccessPointRequest"].write(value.createMultiRegionAccessPointRequest, writingClosure: S3ControlClientTypes.CreateMultiRegionAccessPointInput.writingClosure(_:to:)) + try writer["DeleteMultiRegionAccessPointRequest"].write(value.deleteMultiRegionAccessPointRequest, writingClosure: S3ControlClientTypes.DeleteMultiRegionAccessPointInput.writingClosure(_:to:)) + try writer["PutMultiRegionAccessPointPolicyRequest"].write(value.putMultiRegionAccessPointPolicyRequest, writingClosure: S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createMultiRegionAccessPointRequestDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.CreateMultiRegionAccessPointInput.self, forKey: .createMultiRegionAccessPointRequest) - createMultiRegionAccessPointRequest = createMultiRegionAccessPointRequestDecoded - let deleteMultiRegionAccessPointRequestDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.DeleteMultiRegionAccessPointInput.self, forKey: .deleteMultiRegionAccessPointRequest) - deleteMultiRegionAccessPointRequest = deleteMultiRegionAccessPointRequestDecoded - let putMultiRegionAccessPointPolicyRequestDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput.self, forKey: .putMultiRegionAccessPointPolicyRequest) - putMultiRegionAccessPointPolicyRequest = putMultiRegionAccessPointPolicyRequestDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AsyncRequestParameters() + value.createMultiRegionAccessPointRequest = try reader["CreateMultiRegionAccessPointRequest"].readIfPresent(readingClosure: S3ControlClientTypes.CreateMultiRegionAccessPointInput.readingClosure) + value.deleteMultiRegionAccessPointRequest = try reader["DeleteMultiRegionAccessPointRequest"].readIfPresent(readingClosure: S3ControlClientTypes.DeleteMultiRegionAccessPointInput.readingClosure) + value.putMultiRegionAccessPointPolicyRequest = try reader["PutMultiRegionAccessPointPolicyRequest"].readIfPresent(readingClosure: S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput.readingClosure) + return value + } } } @@ -656,24 +603,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AsyncResponseDetails: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case errorDetails = "ErrorDetails" - case multiRegionAccessPointDetails = "MultiRegionAccessPointDetails" - } +extension S3ControlClientTypes.AsyncResponseDetails { static func writingClosure(_ value: S3ControlClientTypes.AsyncResponseDetails?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ErrorDetails")].write(value.errorDetails, writingClosure: S3ControlClientTypes.AsyncErrorDetails.writingClosure(_:to:)) - try writer[.init("MultiRegionAccessPointDetails")].write(value.multiRegionAccessPointDetails, writingClosure: S3ControlClientTypes.MultiRegionAccessPointsAsyncResponse.writingClosure(_:to:)) + try writer["ErrorDetails"].write(value.errorDetails, writingClosure: S3ControlClientTypes.AsyncErrorDetails.writingClosure(_:to:)) + try writer["MultiRegionAccessPointDetails"].write(value.multiRegionAccessPointDetails, writingClosure: S3ControlClientTypes.MultiRegionAccessPointsAsyncResponse.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let multiRegionAccessPointDetailsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MultiRegionAccessPointsAsyncResponse.self, forKey: .multiRegionAccessPointDetails) - multiRegionAccessPointDetails = multiRegionAccessPointDetailsDecoded - let errorDetailsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AsyncErrorDetails.self, forKey: .errorDetails) - errorDetails = errorDetailsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AsyncResponseDetails() + value.multiRegionAccessPointDetails = try reader["MultiRegionAccessPointDetails"].readIfPresent(readingClosure: S3ControlClientTypes.MultiRegionAccessPointsAsyncResponse.readingClosure) + value.errorDetails = try reader["ErrorDetails"].readIfPresent(readingClosure: S3ControlClientTypes.AsyncErrorDetails.readingClosure) + return value + } } } @@ -697,24 +642,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.AwsLambdaTransformation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionArn = "FunctionArn" - case functionPayload = "FunctionPayload" - } +extension S3ControlClientTypes.AwsLambdaTransformation { static func writingClosure(_ value: S3ControlClientTypes.AwsLambdaTransformation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FunctionArn")].write(value.functionArn) - try writer[.init("FunctionPayload")].write(value.functionPayload) + try writer["FunctionArn"].write(value.functionArn) + try writer["FunctionPayload"].write(value.functionPayload) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionArn) - functionArn = functionArnDecoded - let functionPayloadDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionPayload) - functionPayload = functionPayloadDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.AwsLambdaTransformation() + value.functionArn = try reader["FunctionArn"].readIfPresent() + value.functionPayload = try reader["FunctionPayload"].readIfPresent() + return value + } } } @@ -740,16 +683,26 @@ extension S3ControlClientTypes { } extension BadRequestException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = BadRequestException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension BadRequestException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BadRequestException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -777,27 +730,14 @@ public struct BadRequestException: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct BadRequestExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension BadRequestExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension BucketAlreadyExists { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BucketAlreadyExists() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -815,10 +755,13 @@ public struct BucketAlreadyExists: ClientRuntime.ModeledError, AWSClientRuntime. } extension BucketAlreadyOwnedByYou { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BucketAlreadyOwnedByYou() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -873,36 +816,28 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.BucketLevel: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case activityMetrics = "ActivityMetrics" - case advancedCostOptimizationMetrics = "AdvancedCostOptimizationMetrics" - case advancedDataProtectionMetrics = "AdvancedDataProtectionMetrics" - case detailedStatusCodesMetrics = "DetailedStatusCodesMetrics" - case prefixLevel = "PrefixLevel" - } +extension S3ControlClientTypes.BucketLevel { static func writingClosure(_ value: S3ControlClientTypes.BucketLevel?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ActivityMetrics")].write(value.activityMetrics, writingClosure: S3ControlClientTypes.ActivityMetrics.writingClosure(_:to:)) - try writer[.init("AdvancedCostOptimizationMetrics")].write(value.advancedCostOptimizationMetrics, writingClosure: S3ControlClientTypes.AdvancedCostOptimizationMetrics.writingClosure(_:to:)) - try writer[.init("AdvancedDataProtectionMetrics")].write(value.advancedDataProtectionMetrics, writingClosure: S3ControlClientTypes.AdvancedDataProtectionMetrics.writingClosure(_:to:)) - try writer[.init("DetailedStatusCodesMetrics")].write(value.detailedStatusCodesMetrics, writingClosure: S3ControlClientTypes.DetailedStatusCodesMetrics.writingClosure(_:to:)) - try writer[.init("PrefixLevel")].write(value.prefixLevel, writingClosure: S3ControlClientTypes.PrefixLevel.writingClosure(_:to:)) + try writer["ActivityMetrics"].write(value.activityMetrics, writingClosure: S3ControlClientTypes.ActivityMetrics.writingClosure(_:to:)) + try writer["AdvancedCostOptimizationMetrics"].write(value.advancedCostOptimizationMetrics, writingClosure: S3ControlClientTypes.AdvancedCostOptimizationMetrics.writingClosure(_:to:)) + try writer["AdvancedDataProtectionMetrics"].write(value.advancedDataProtectionMetrics, writingClosure: S3ControlClientTypes.AdvancedDataProtectionMetrics.writingClosure(_:to:)) + try writer["DetailedStatusCodesMetrics"].write(value.detailedStatusCodesMetrics, writingClosure: S3ControlClientTypes.DetailedStatusCodesMetrics.writingClosure(_:to:)) + try writer["PrefixLevel"].write(value.prefixLevel, writingClosure: S3ControlClientTypes.PrefixLevel.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let activityMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ActivityMetrics.self, forKey: .activityMetrics) - activityMetrics = activityMetricsDecoded - let prefixLevelDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PrefixLevel.self, forKey: .prefixLevel) - prefixLevel = prefixLevelDecoded - let advancedCostOptimizationMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AdvancedCostOptimizationMetrics.self, forKey: .advancedCostOptimizationMetrics) - advancedCostOptimizationMetrics = advancedCostOptimizationMetricsDecoded - let advancedDataProtectionMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AdvancedDataProtectionMetrics.self, forKey: .advancedDataProtectionMetrics) - advancedDataProtectionMetrics = advancedDataProtectionMetricsDecoded - let detailedStatusCodesMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.DetailedStatusCodesMetrics.self, forKey: .detailedStatusCodesMetrics) - detailedStatusCodesMetrics = detailedStatusCodesMetricsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.BucketLevel() + value.activityMetrics = try reader["ActivityMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.ActivityMetrics.readingClosure) + value.prefixLevel = try reader["PrefixLevel"].readIfPresent(readingClosure: S3ControlClientTypes.PrefixLevel.readingClosure) + value.advancedCostOptimizationMetrics = try reader["AdvancedCostOptimizationMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.AdvancedCostOptimizationMetrics.readingClosure) + value.advancedDataProtectionMetrics = try reader["AdvancedDataProtectionMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.AdvancedDataProtectionMetrics.readingClosure) + value.detailedStatusCodesMetrics = try reader["DetailedStatusCodesMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.DetailedStatusCodesMetrics.readingClosure) + return value + } } } @@ -1029,20 +964,20 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.CloudWatchMetrics: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isEnabled = "IsEnabled" - } +extension S3ControlClientTypes.CloudWatchMetrics { static func writingClosure(_ value: S3ControlClientTypes.CloudWatchMetrics?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsEnabled")].write(value.isEnabled) + try writer["IsEnabled"].write(value.isEnabled) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) ?? false - isEnabled = isEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.CloudWatchMetrics() + value.isEnabled = try reader["IsEnabled"].readIfPresent() ?? false + return value + } } } @@ -1064,25 +999,15 @@ extension S3ControlClientTypes { } extension CreateAccessGrantInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsLocationConfiguration = "AccessGrantsLocationConfiguration" - case accessGrantsLocationId = "AccessGrantsLocationId" - case applicationArn = "ApplicationArn" - case grantee = "Grantee" - case permission = "Permission" - case s3PrefixType = "S3PrefixType" - case tags = "Tags" - } - static func writingClosure(_ value: CreateAccessGrantInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessGrantsLocationConfiguration")].write(value.accessGrantsLocationConfiguration, writingClosure: S3ControlClientTypes.AccessGrantsLocationConfiguration.writingClosure(_:to:)) - try writer[.init("AccessGrantsLocationId")].write(value.accessGrantsLocationId) - try writer[.init("ApplicationArn")].write(value.applicationArn) - try writer[.init("Grantee")].write(value.grantee, writingClosure: S3ControlClientTypes.Grantee.writingClosure(_:to:)) - try writer[.init("Permission")].write(value.permission) - try writer[.init("S3PrefixType")].write(value.s3PrefixType) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) + try writer["AccessGrantsLocationConfiguration"].write(value.accessGrantsLocationConfiguration, writingClosure: S3ControlClientTypes.AccessGrantsLocationConfiguration.writingClosure(_:to:)) + try writer["AccessGrantsLocationId"].write(value.accessGrantsLocationId) + try writer["ApplicationArn"].write(value.applicationArn) + try writer["Grantee"].write(value.grantee, writingClosure: S3ControlClientTypes.Grantee.writingClosure(_:to:)) + try writer["Permission"].write(value.permission) + try writer["S3PrefixType"].write(value.s3PrefixType) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) } } @@ -1154,87 +1079,23 @@ public struct CreateAccessGrantInput: Swift.Equatable { } } -struct CreateAccessGrantInputBody: Swift.Equatable { - let accessGrantsLocationId: Swift.String? - let accessGrantsLocationConfiguration: S3ControlClientTypes.AccessGrantsLocationConfiguration? - let grantee: S3ControlClientTypes.Grantee? - let permission: S3ControlClientTypes.Permission? - let applicationArn: Swift.String? - let s3PrefixType: S3ControlClientTypes.S3PrefixType? - let tags: [S3ControlClientTypes.Tag]? -} - -extension CreateAccessGrantInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsLocationConfiguration = "AccessGrantsLocationConfiguration" - case accessGrantsLocationId = "AccessGrantsLocationId" - case applicationArn = "ApplicationArn" - case grantee = "Grantee" - case permission = "Permission" - case s3PrefixType = "S3PrefixType" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessGrantsLocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationId) - accessGrantsLocationId = accessGrantsLocationIdDecoded - let accessGrantsLocationConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AccessGrantsLocationConfiguration.self, forKey: .accessGrantsLocationConfiguration) - accessGrantsLocationConfiguration = accessGrantsLocationConfigurationDecoded - let granteeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Grantee.self, forKey: .grantee) - grantee = granteeDecoded - let permissionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Permission.self, forKey: .permission) - permission = permissionDecoded - let applicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationArn) - applicationArn = applicationArnDecoded - let s3PrefixTypeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3PrefixType.self, forKey: .s3PrefixType) - s3PrefixType = s3PrefixTypeDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateAccessGrantOutput { -extension CreateAccessGrantOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateAccessGrantOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantArn = output.accessGrantArn - self.accessGrantId = output.accessGrantId - self.accessGrantsLocationConfiguration = output.accessGrantsLocationConfiguration - self.accessGrantsLocationId = output.accessGrantsLocationId - self.applicationArn = output.applicationArn - self.createdAt = output.createdAt - self.grantScope = output.grantScope - self.grantee = output.grantee - self.permission = output.permission - } else { - self.accessGrantArn = nil - self.accessGrantId = nil - self.accessGrantsLocationConfiguration = nil - self.accessGrantsLocationId = nil - self.applicationArn = nil - self.createdAt = nil - self.grantScope = nil - self.grantee = nil - self.permission = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateAccessGrantOutput() + value.accessGrantArn = try reader["AccessGrantArn"].readIfPresent() + value.accessGrantId = try reader["AccessGrantId"].readIfPresent() + value.accessGrantsLocationConfiguration = try reader["AccessGrantsLocationConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.AccessGrantsLocationConfiguration.readingClosure) + value.accessGrantsLocationId = try reader["AccessGrantsLocationId"].readIfPresent() + value.applicationArn = try reader["ApplicationArn"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.grantScope = try reader["GrantScope"].readIfPresent() + value.grantee = try reader["Grantee"].readIfPresent(readingClosure: S3ControlClientTypes.Grantee.readingClosure) + value.permission = try reader["Permission"].readIfPresent() + return value } } } @@ -1289,73 +1150,24 @@ public struct CreateAccessGrantOutput: Swift.Equatable { } } -struct CreateAccessGrantOutputBody: Swift.Equatable { - let createdAt: ClientRuntime.Date? - let accessGrantId: Swift.String? - let accessGrantArn: Swift.String? - let grantee: S3ControlClientTypes.Grantee? - let accessGrantsLocationId: Swift.String? - let accessGrantsLocationConfiguration: S3ControlClientTypes.AccessGrantsLocationConfiguration? - let permission: S3ControlClientTypes.Permission? - let applicationArn: Swift.String? - let grantScope: Swift.String? -} - -extension CreateAccessGrantOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantArn = "AccessGrantArn" - case accessGrantId = "AccessGrantId" - case accessGrantsLocationConfiguration = "AccessGrantsLocationConfiguration" - case accessGrantsLocationId = "AccessGrantsLocationId" - case applicationArn = "ApplicationArn" - case createdAt = "CreatedAt" - case grantScope = "GrantScope" - case grantee = "Grantee" - case permission = "Permission" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let accessGrantIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantId) - accessGrantId = accessGrantIdDecoded - let accessGrantArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantArn) - accessGrantArn = accessGrantArnDecoded - let granteeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Grantee.self, forKey: .grantee) - grantee = granteeDecoded - let accessGrantsLocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationId) - accessGrantsLocationId = accessGrantsLocationIdDecoded - let accessGrantsLocationConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AccessGrantsLocationConfiguration.self, forKey: .accessGrantsLocationConfiguration) - accessGrantsLocationConfiguration = accessGrantsLocationConfigurationDecoded - let permissionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Permission.self, forKey: .permission) - permission = permissionDecoded - let applicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationArn) - applicationArn = applicationArnDecoded - let grantScopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantScope) - grantScope = grantScopeDecoded - } -} - -enum CreateAccessGrantOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateAccessGrantOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateAccessGrantsInstanceInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identityCenterArn = "IdentityCenterArn" - case tags = "Tags" - } - static func writingClosure(_ value: CreateAccessGrantsInstanceInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IdentityCenterArn")].write(value.identityCenterArn) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) + try writer["IdentityCenterArn"].write(value.identityCenterArn) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) } } @@ -1398,57 +1210,18 @@ public struct CreateAccessGrantsInstanceInput: Swift.Equatable { } } -struct CreateAccessGrantsInstanceInputBody: Swift.Equatable { - let identityCenterArn: Swift.String? - let tags: [S3ControlClientTypes.Tag]? -} - -extension CreateAccessGrantsInstanceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identityCenterArn = "IdentityCenterArn" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityCenterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identityCenterArn) - identityCenterArn = identityCenterArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateAccessGrantsInstanceOutput { -extension CreateAccessGrantsInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateAccessGrantsInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsInstanceArn = output.accessGrantsInstanceArn - self.accessGrantsInstanceId = output.accessGrantsInstanceId - self.createdAt = output.createdAt - self.identityCenterArn = output.identityCenterArn - } else { - self.accessGrantsInstanceArn = nil - self.accessGrantsInstanceId = nil - self.createdAt = nil - self.identityCenterArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateAccessGrantsInstanceOutput() + value.accessGrantsInstanceArn = try reader["AccessGrantsInstanceArn"].readIfPresent() + value.accessGrantsInstanceId = try reader["AccessGrantsInstanceId"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.identityCenterArn = try reader["IdentityCenterArn"].readIfPresent() + return value } } } @@ -1477,55 +1250,25 @@ public struct CreateAccessGrantsInstanceOutput: Swift.Equatable { } } -struct CreateAccessGrantsInstanceOutputBody: Swift.Equatable { - let createdAt: ClientRuntime.Date? - let accessGrantsInstanceId: Swift.String? - let accessGrantsInstanceArn: Swift.String? - let identityCenterArn: Swift.String? -} - -extension CreateAccessGrantsInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsInstanceArn = "AccessGrantsInstanceArn" - case accessGrantsInstanceId = "AccessGrantsInstanceId" - case createdAt = "CreatedAt" - case identityCenterArn = "IdentityCenterArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let accessGrantsInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsInstanceId) - accessGrantsInstanceId = accessGrantsInstanceIdDecoded - let accessGrantsInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsInstanceArn) - accessGrantsInstanceArn = accessGrantsInstanceArnDecoded - let identityCenterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identityCenterArn) - identityCenterArn = identityCenterArnDecoded - } -} +enum CreateAccessGrantsInstanceOutputError { -enum CreateAccessGrantsInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateAccessGrantsLocationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamRoleArn = "IAMRoleArn" - case locationScope = "LocationScope" - case tags = "Tags" - } - static func writingClosure(_ value: CreateAccessGrantsLocationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IAMRoleArn")].write(value.iamRoleArn) - try writer[.init("LocationScope")].write(value.locationScope) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) + try writer["IAMRoleArn"].write(value.iamRoleArn) + try writer["LocationScope"].write(value.locationScope) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) } } @@ -1574,63 +1317,19 @@ public struct CreateAccessGrantsLocationInput: Swift.Equatable { } } -struct CreateAccessGrantsLocationInputBody: Swift.Equatable { - let locationScope: Swift.String? - let iamRoleArn: Swift.String? - let tags: [S3ControlClientTypes.Tag]? -} - -extension CreateAccessGrantsLocationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamRoleArn = "IAMRoleArn" - case locationScope = "LocationScope" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let locationScopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationScope) - locationScope = locationScopeDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateAccessGrantsLocationOutput { -extension CreateAccessGrantsLocationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateAccessGrantsLocationOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsLocationArn = output.accessGrantsLocationArn - self.accessGrantsLocationId = output.accessGrantsLocationId - self.createdAt = output.createdAt - self.iamRoleArn = output.iamRoleArn - self.locationScope = output.locationScope - } else { - self.accessGrantsLocationArn = nil - self.accessGrantsLocationId = nil - self.createdAt = nil - self.iamRoleArn = nil - self.locationScope = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateAccessGrantsLocationOutput() + value.accessGrantsLocationArn = try reader["AccessGrantsLocationArn"].readIfPresent() + value.accessGrantsLocationId = try reader["AccessGrantsLocationId"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.iamRoleArn = try reader["IAMRoleArn"].readIfPresent() + value.locationScope = try reader["LocationScope"].readIfPresent() + return value } } } @@ -1663,55 +1362,23 @@ public struct CreateAccessGrantsLocationOutput: Swift.Equatable { } } -struct CreateAccessGrantsLocationOutputBody: Swift.Equatable { - let createdAt: ClientRuntime.Date? - let accessGrantsLocationId: Swift.String? - let accessGrantsLocationArn: Swift.String? - let locationScope: Swift.String? - let iamRoleArn: Swift.String? -} - -extension CreateAccessGrantsLocationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsLocationArn = "AccessGrantsLocationArn" - case accessGrantsLocationId = "AccessGrantsLocationId" - case createdAt = "CreatedAt" - case iamRoleArn = "IAMRoleArn" - case locationScope = "LocationScope" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let accessGrantsLocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationId) - accessGrantsLocationId = accessGrantsLocationIdDecoded - let accessGrantsLocationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationArn) - accessGrantsLocationArn = accessGrantsLocationArnDecoded - let locationScopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationScope) - locationScope = locationScopeDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - } -} +enum CreateAccessGrantsLocationOutputError { -enum CreateAccessGrantsLocationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateAccessPointForObjectLambdaInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configuration = "Configuration" - } - static func writingClosure(_ value: CreateAccessPointForObjectLambdaInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Configuration")].write(value.configuration, writingClosure: S3ControlClientTypes.ObjectLambdaConfiguration.writingClosure(_:to:)) + try writer["Configuration"].write(value.configuration, writingClosure: S3ControlClientTypes.ObjectLambdaConfiguration.writingClosure(_:to:)) } } @@ -1759,32 +1426,16 @@ public struct CreateAccessPointForObjectLambdaInput: Swift.Equatable { } } -struct CreateAccessPointForObjectLambdaInputBody: Swift.Equatable { - let configuration: S3ControlClientTypes.ObjectLambdaConfiguration? -} - -extension CreateAccessPointForObjectLambdaInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configuration = "Configuration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ObjectLambdaConfiguration.self, forKey: .configuration) - configuration = configurationDecoded - } -} +extension CreateAccessPointForObjectLambdaOutput { -extension CreateAccessPointForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateAccessPointForObjectLambdaOutputBody = try responseDecoder.decode(responseBody: data) - self.alias = output.alias - self.objectLambdaAccessPointArn = output.objectLambdaAccessPointArn - } else { - self.alias = nil - self.objectLambdaAccessPointArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateAccessPointForObjectLambdaOutput() + value.alias = try reader["Alias"].readIfPresent(readingClosure: S3ControlClientTypes.ObjectLambdaAccessPointAlias.readingClosure) + value.objectLambdaAccessPointArn = try reader["ObjectLambdaAccessPointArn"].readIfPresent() + return value } } } @@ -1805,49 +1456,26 @@ public struct CreateAccessPointForObjectLambdaOutput: Swift.Equatable { } } -struct CreateAccessPointForObjectLambdaOutputBody: Swift.Equatable { - let objectLambdaAccessPointArn: Swift.String? - let alias: S3ControlClientTypes.ObjectLambdaAccessPointAlias? -} - -extension CreateAccessPointForObjectLambdaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alias = "Alias" - case objectLambdaAccessPointArn = "ObjectLambdaAccessPointArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let objectLambdaAccessPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .objectLambdaAccessPointArn) - objectLambdaAccessPointArn = objectLambdaAccessPointArnDecoded - let aliasDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ObjectLambdaAccessPointAlias.self, forKey: .alias) - alias = aliasDecoded - } -} +enum CreateAccessPointForObjectLambdaOutputError { -enum CreateAccessPointForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateAccessPointInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case bucketAccountId = "BucketAccountId" - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - case vpcConfiguration = "VpcConfiguration" - } - static func writingClosure(_ value: CreateAccessPointInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("BucketAccountId")].write(value.bucketAccountId) - try writer[.init("PublicAccessBlockConfiguration")].write(value.publicAccessBlockConfiguration, writingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) - try writer[.init("VpcConfiguration")].write(value.vpcConfiguration, writingClosure: S3ControlClientTypes.VpcConfiguration.writingClosure(_:to:)) + try writer["Bucket"].write(value.bucket) + try writer["BucketAccountId"].write(value.bucketAccountId) + try writer["PublicAccessBlockConfiguration"].write(value.publicAccessBlockConfiguration, writingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) + try writer["VpcConfiguration"].write(value.vpcConfiguration, writingClosure: S3ControlClientTypes.VpcConfiguration.writingClosure(_:to:)) } } @@ -1907,44 +1535,16 @@ public struct CreateAccessPointInput: Swift.Equatable { } } -struct CreateAccessPointInputBody: Swift.Equatable { - let bucket: Swift.String? - let vpcConfiguration: S3ControlClientTypes.VpcConfiguration? - let publicAccessBlockConfiguration: S3ControlClientTypes.PublicAccessBlockConfiguration? - let bucketAccountId: Swift.String? -} - -extension CreateAccessPointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case bucketAccountId = "BucketAccountId" - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - case vpcConfiguration = "VpcConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let vpcConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.VpcConfiguration.self, forKey: .vpcConfiguration) - vpcConfiguration = vpcConfigurationDecoded - let publicAccessBlockConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlockConfiguration) - publicAccessBlockConfiguration = publicAccessBlockConfigurationDecoded - let bucketAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketAccountId) - bucketAccountId = bucketAccountIdDecoded - } -} +extension CreateAccessPointOutput { -extension CreateAccessPointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateAccessPointOutputBody = try responseDecoder.decode(responseBody: data) - self.accessPointArn = output.accessPointArn - self.alias = output.alias - } else { - self.accessPointArn = nil - self.alias = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateAccessPointOutput() + value.accessPointArn = try reader["AccessPointArn"].readIfPresent() + value.alias = try reader["Alias"].readIfPresent() + return value } } } @@ -1965,49 +1565,33 @@ public struct CreateAccessPointOutput: Swift.Equatable { } } -struct CreateAccessPointOutputBody: Swift.Equatable { - let accessPointArn: Swift.String? - let alias: Swift.String? -} - -extension CreateAccessPointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPointArn = "AccessPointArn" - case alias = "Alias" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessPointArn) - accessPointArn = accessPointArnDecoded - let aliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alias) - alias = aliasDecoded - } -} +enum CreateAccessPointOutputError { -enum CreateAccessPointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.CreateBucketConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case locationConstraint = "LocationConstraint" - } +extension S3ControlClientTypes.CreateBucketConfiguration { static func writingClosure(_ value: S3ControlClientTypes.CreateBucketConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("LocationConstraint")].write(value.locationConstraint) + try writer["LocationConstraint"].write(value.locationConstraint) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let locationConstraintDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.BucketLocationConstraint.self, forKey: .locationConstraint) - locationConstraint = locationConstraintDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.CreateBucketConfiguration() + value.locationConstraint = try reader["LocationConstraint"].readIfPresent() + return value + } } } @@ -2028,13 +1612,9 @@ extension S3ControlClientTypes { } extension CreateBucketInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createBucketConfiguration = "CreateBucketConfiguration" - } - static func writingClosure(_ value: CreateBucketInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreateBucketConfiguration")].write(value.createBucketConfiguration, writingClosure: S3ControlClientTypes.CreateBucketConfiguration.writingClosure(_:to:)) + try writer["CreateBucketConfiguration"].write(value.createBucketConfiguration, writingClosure: S3ControlClientTypes.CreateBucketConfiguration.writingClosure(_:to:)) } } @@ -2129,35 +1709,18 @@ public struct CreateBucketInput: Swift.Equatable { } } -struct CreateBucketInputBody: Swift.Equatable { - let createBucketConfiguration: S3ControlClientTypes.CreateBucketConfiguration? -} - -extension CreateBucketInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createBucketConfiguration = "CreateBucketConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createBucketConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.CreateBucketConfiguration.self, forKey: .createBucketConfiguration) - createBucketConfiguration = createBucketConfigurationDecoded - } -} +extension CreateBucketOutput { -extension CreateBucketOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let locationHeaderValue = httpResponse.headers.value(for: "Location") { - self.location = locationHeaderValue - } else { - self.location = nil - } - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateBucketOutputBody = try responseDecoder.decode(responseBody: data) - self.bucketArn = output.bucketArn - } else { - self.bucketArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateBucketOutput() + if let locationHeaderValue = httpResponse.headers.value(for: "Location") { + value.location = locationHeaderValue + } + value.bucketArn = try reader["BucketArn"].readIfPresent() + return value } } } @@ -2178,59 +1741,35 @@ public struct CreateBucketOutput: Swift.Equatable { } } -struct CreateBucketOutputBody: Swift.Equatable { - let bucketArn: Swift.String? -} - -extension CreateBucketOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucketArn = "BucketArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketArn) - bucketArn = bucketArnDecoded - } -} +enum CreateBucketOutputError { -enum CreateBucketOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BucketAlreadyExists": return try await BucketAlreadyExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BucketAlreadyOwnedByYou": return try await BucketAlreadyOwnedByYou(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "BucketAlreadyExists": return try await BucketAlreadyExists.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "BucketAlreadyOwnedByYou": return try await BucketAlreadyOwnedByYou.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateJobInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRequestToken = "ClientRequestToken" - case confirmationRequired = "ConfirmationRequired" - case description = "Description" - case manifest = "Manifest" - case manifestGenerator = "ManifestGenerator" - case operation = "Operation" - case priority = "Priority" - case report = "Report" - case roleArn = "RoleArn" - case tags = "Tags" - } - static func writingClosure(_ value: CreateJobInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ClientRequestToken")].write(value.clientRequestToken) - try writer[.init("ConfirmationRequired")].write(value.confirmationRequired) - try writer[.init("Description")].write(value.description) - try writer[.init("Manifest")].write(value.manifest, writingClosure: S3ControlClientTypes.JobManifest.writingClosure(_:to:)) - try writer[.init("ManifestGenerator")].write(value.manifestGenerator, writingClosure: S3ControlClientTypes.JobManifestGenerator.writingClosure(_:to:)) - try writer[.init("Operation")].write(value.operation, writingClosure: S3ControlClientTypes.JobOperation.writingClosure(_:to:)) - try writer[.init("Priority")].write(value.priority) - try writer[.init("Report")].write(value.report, writingClosure: S3ControlClientTypes.JobReport.writingClosure(_:to:)) - try writer[.init("RoleArn")].write(value.roleArn) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) + try writer["ClientRequestToken"].write(value.clientRequestToken) + try writer["ConfirmationRequired"].write(value.confirmationRequired) + try writer["Description"].write(value.description) + try writer["Manifest"].write(value.manifest, writingClosure: S3ControlClientTypes.JobManifest.writingClosure(_:to:)) + try writer["ManifestGenerator"].write(value.manifestGenerator, writingClosure: S3ControlClientTypes.JobManifestGenerator.writingClosure(_:to:)) + try writer["Operation"].write(value.operation, writingClosure: S3ControlClientTypes.JobOperation.writingClosure(_:to:)) + try writer["Priority"].write(value.priority) + try writer["Report"].write(value.report, writingClosure: S3ControlClientTypes.JobReport.writingClosure(_:to:)) + try writer["RoleArn"].write(value.roleArn) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) } } @@ -2310,83 +1849,15 @@ public struct CreateJobInput: Swift.Equatable { } } -struct CreateJobInputBody: Swift.Equatable { - let confirmationRequired: Swift.Bool? - let operation: S3ControlClientTypes.JobOperation? - let report: S3ControlClientTypes.JobReport? - let clientRequestToken: Swift.String? - let manifest: S3ControlClientTypes.JobManifest? - let description: Swift.String? - let priority: Swift.Int? - let roleArn: Swift.String? - let tags: [S3ControlClientTypes.S3Tag]? - let manifestGenerator: S3ControlClientTypes.JobManifestGenerator? -} - -extension CreateJobInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientRequestToken = "ClientRequestToken" - case confirmationRequired = "ConfirmationRequired" - case description = "Description" - case manifest = "Manifest" - case manifestGenerator = "ManifestGenerator" - case operation = "Operation" - case priority = "Priority" - case report = "Report" - case roleArn = "RoleArn" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let confirmationRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .confirmationRequired) ?? nil - confirmationRequired = confirmationRequiredDecoded - let operationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobOperation.self, forKey: .operation) - operation = operationDecoded - let reportDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobReport.self, forKey: .report) - report = reportDecoded - let clientRequestTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientRequestToken) - clientRequestToken = clientRequestTokenDecoded - let manifestDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifest.self, forKey: .manifest) - manifest = manifestDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) ?? nil - priority = priorityDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let manifestGeneratorDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifestGenerator.self, forKey: .manifestGenerator) - manifestGenerator = manifestGeneratorDecoded - } -} +extension CreateJobOutput { -extension CreateJobOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateJobOutputBody = try responseDecoder.decode(responseBody: data) - self.jobId = output.jobId - } else { - self.jobId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateJobOutput() + value.jobId = try reader["JobId"].readIfPresent() + return value } } } @@ -2403,87 +1874,50 @@ public struct CreateJobOutput: Swift.Equatable { } } -struct CreateJobOutputBody: Swift.Equatable { - let jobId: Swift.String? -} - -extension CreateJobOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobId = "JobId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - } -} +enum CreateJobOutputError { -enum CreateJobOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IdempotencyException": return try await IdempotencyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRequestsException": return try await TooManyRequestsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "BadRequestException": return try await BadRequestException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "IdempotencyException": return try await IdempotencyException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InternalServiceException": return try await InternalServiceException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRequestsException": return try await TooManyRequestsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.CreateMultiRegionAccessPointInput: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case publicAccessBlock = "PublicAccessBlock" - case regions = "Regions" - } +extension S3ControlClientTypes.CreateMultiRegionAccessPointInput { static func writingClosure(_ value: S3ControlClientTypes.CreateMultiRegionAccessPointInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) - try writer[.init("PublicAccessBlock")].write(value.publicAccessBlock, writingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) - try writer[.init("Regions")].writeList(value.regions, memberWritingClosure: S3ControlClientTypes.Region.writingClosure(_:to:), memberNodeInfo: .init("Region"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let publicAccessBlockDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlock) - publicAccessBlock = publicAccessBlockDecoded - if containerValues.contains(.regions) { - struct KeyVal0{struct Region{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([S3ControlClientTypes.Region].self, forKey: .member) - var regionsBuffer:[S3ControlClientTypes.Region]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [S3ControlClientTypes.Region]() - for structureContainer0 in regionsContainer { - regionsBuffer?.append(structureContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil + try writer["Name"].write(value.name) + try writer["PublicAccessBlock"].write(value.publicAccessBlock, writingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) + try writer["Regions"].writeList(value.regions, memberWritingClosure: S3ControlClientTypes.Region.writingClosure(_:to:), memberNodeInfo: "Region", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.CreateMultiRegionAccessPointInput() + value.name = try reader["Name"].readIfPresent() + value.publicAccessBlock = try reader["PublicAccessBlock"].readIfPresent(readingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.readingClosure) + value.regions = try reader["Regions"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.Region.readingClosure, memberNodeInfo: "Region", isFlattened: false) + return value } } } extension CreateMultiRegionAccessPointInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case details = "Details" - } - static func writingClosure(_ value: CreateMultiRegionAccessPointInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ClientToken")].write(value.clientToken) - try writer[.init("Details")].write(value.details, writingClosure: S3ControlClientTypes.CreateMultiRegionAccessPointInput.writingClosure(_:to:)) + try writer["ClientToken"].write(value.clientToken) + try writer["Details"].write(value.details, writingClosure: S3ControlClientTypes.CreateMultiRegionAccessPointInput.writingClosure(_:to:)) } } @@ -2554,34 +1988,15 @@ public struct CreateMultiRegionAccessPointInput: Swift.Equatable { } } -struct CreateMultiRegionAccessPointInputBody: Swift.Equatable { - let clientToken: Swift.String? - let details: S3ControlClientTypes.CreateMultiRegionAccessPointInput? -} - -extension CreateMultiRegionAccessPointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case details = "Details" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let detailsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.CreateMultiRegionAccessPointInput.self, forKey: .details) - details = detailsDecoded - } -} +extension CreateMultiRegionAccessPointOutput { -extension CreateMultiRegionAccessPointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateMultiRegionAccessPointOutputBody = try responseDecoder.decode(responseBody: data) - self.requestTokenARN = output.requestTokenARN - } else { - self.requestTokenARN = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = CreateMultiRegionAccessPointOutput() + value.requestTokenARN = try reader["RequestTokenARN"].readIfPresent() + return value } } } @@ -2598,41 +2013,24 @@ public struct CreateMultiRegionAccessPointOutput: Swift.Equatable { } } -struct CreateMultiRegionAccessPointOutputBody: Swift.Equatable { - let requestTokenARN: Swift.String? -} - -extension CreateMultiRegionAccessPointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case requestTokenARN = "RequestTokenARN" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let requestTokenARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestTokenARN) - requestTokenARN = requestTokenARNDecoded - } -} +enum CreateMultiRegionAccessPointOutputError { -enum CreateMultiRegionAccessPointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension CreateStorageLensGroupInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageLensGroup = "StorageLensGroup" - case tags = "Tags" - } - static func writingClosure(_ value: CreateStorageLensGroupInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StorageLensGroup")].write(value.storageLensGroup, writingClosure: S3ControlClientTypes.StorageLensGroup.writingClosure(_:to:)) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) + try writer["StorageLensGroup"].write(value.storageLensGroup, writingClosure: S3ControlClientTypes.StorageLensGroup.writingClosure(_:to:)) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) } } @@ -2676,45 +2074,12 @@ public struct CreateStorageLensGroupInput: Swift.Equatable { } } -struct CreateStorageLensGroupInputBody: Swift.Equatable { - let storageLensGroup: S3ControlClientTypes.StorageLensGroup? - let tags: [S3ControlClientTypes.Tag]? -} - -extension CreateStorageLensGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageLensGroup = "StorageLensGroup" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageLensGroupDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensGroup.self, forKey: .storageLensGroup) - storageLensGroup = storageLensGroupDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension CreateStorageLensGroupOutput { -extension CreateStorageLensGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateStorageLensGroupOutput() + } } } @@ -2723,41 +2088,39 @@ public struct CreateStorageLensGroupOutput: Swift.Equatable { public init() { } } -enum CreateStorageLensGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateStorageLensGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.Credentials: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKeyId = "AccessKeyId" - case expiration = "Expiration" - case secretAccessKey = "SecretAccessKey" - case sessionToken = "SessionToken" - } +extension S3ControlClientTypes.Credentials { static func writingClosure(_ value: S3ControlClientTypes.Credentials?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessKeyId")].write(value.accessKeyId) - try writer[.init("Expiration")].writeTimestamp(value.expiration, format: .dateTime) - try writer[.init("SecretAccessKey")].write(value.secretAccessKey) - try writer[.init("SessionToken")].write(value.sessionToken) + try writer["AccessKeyId"].write(value.accessKeyId) + try writer["Expiration"].writeTimestamp(value.expiration, format: .dateTime) + try writer["SecretAccessKey"].write(value.secretAccessKey) + try writer["SessionToken"].write(value.sessionToken) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - let secretAccessKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secretAccessKey) - secretAccessKey = secretAccessKeyDecoded - let sessionTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sessionToken) - sessionToken = sessionTokenDecoded - let expirationDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expiration) - expiration = expirationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Credentials() + value.accessKeyId = try reader["AccessKeyId"].readIfPresent() + value.secretAccessKey = try reader["SecretAccessKey"].readIfPresent() + value.sessionToken = try reader["SessionToken"].readIfPresent() + value.expiration = try reader["Expiration"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -2834,8 +2197,12 @@ public struct DeleteAccessGrantInput: Swift.Equatable { } } -extension DeleteAccessGrantOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccessGrantOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessGrantOutput() + } } } @@ -2844,11 +2211,15 @@ public struct DeleteAccessGrantOutput: Swift.Equatable { public init() { } } -enum DeleteAccessGrantOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessGrantOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -2884,8 +2255,12 @@ public struct DeleteAccessGrantsInstanceInput: Swift.Equatable { } } -extension DeleteAccessGrantsInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccessGrantsInstanceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessGrantsInstanceOutput() + } } } @@ -2894,11 +2269,15 @@ public struct DeleteAccessGrantsInstanceOutput: Swift.Equatable { public init() { } } -enum DeleteAccessGrantsInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessGrantsInstanceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -2934,8 +2313,12 @@ public struct DeleteAccessGrantsInstanceResourcePolicyInput: Swift.Equatable { } } -extension DeleteAccessGrantsInstanceResourcePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccessGrantsInstanceResourcePolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessGrantsInstanceResourcePolicyOutput() + } } } @@ -2944,11 +2327,15 @@ public struct DeleteAccessGrantsInstanceResourcePolicyOutput: Swift.Equatable { public init() { } } -enum DeleteAccessGrantsInstanceResourcePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessGrantsInstanceResourcePolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -2992,8 +2379,12 @@ public struct DeleteAccessGrantsLocationInput: Swift.Equatable { } } -extension DeleteAccessGrantsLocationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccessGrantsLocationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessGrantsLocationOutput() + } } } @@ -3002,11 +2393,15 @@ public struct DeleteAccessGrantsLocationOutput: Swift.Equatable { public init() { } } -enum DeleteAccessGrantsLocationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessGrantsLocationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3050,8 +2445,12 @@ public struct DeleteAccessPointForObjectLambdaInput: Swift.Equatable { } } -extension DeleteAccessPointForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccessPointForObjectLambdaOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessPointForObjectLambdaOutput() + } } } @@ -3060,11 +2459,15 @@ public struct DeleteAccessPointForObjectLambdaOutput: Swift.Equatable { public init() { } } -enum DeleteAccessPointForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessPointForObjectLambdaOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3108,8 +2511,12 @@ public struct DeleteAccessPointInput: Swift.Equatable { } } -extension DeleteAccessPointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccessPointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessPointOutput() + } } } @@ -3118,11 +2525,15 @@ public struct DeleteAccessPointOutput: Swift.Equatable { public init() { } } -enum DeleteAccessPointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessPointOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3166,8 +2577,12 @@ public struct DeleteAccessPointPolicyForObjectLambdaInput: Swift.Equatable { } } -extension DeleteAccessPointPolicyForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccessPointPolicyForObjectLambdaOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessPointPolicyForObjectLambdaOutput() + } } } @@ -3176,11 +2591,15 @@ public struct DeleteAccessPointPolicyForObjectLambdaOutput: Swift.Equatable { public init() { } } -enum DeleteAccessPointPolicyForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessPointPolicyForObjectLambdaOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3224,8 +2643,12 @@ public struct DeleteAccessPointPolicyInput: Swift.Equatable { } } -extension DeleteAccessPointPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteAccessPointPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteAccessPointPolicyOutput() + } } } @@ -3234,11 +2657,15 @@ public struct DeleteAccessPointPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteAccessPointPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteAccessPointPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3321,8 +2748,12 @@ public struct DeleteBucketLifecycleConfigurationInput: Swift.Equatable { } } -extension DeleteBucketLifecycleConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketLifecycleConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketLifecycleConfigurationOutput() + } } } @@ -3331,17 +2762,25 @@ public struct DeleteBucketLifecycleConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteBucketLifecycleConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteBucketLifecycleConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension DeleteBucketOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketOutput() + } } } @@ -3350,11 +2789,15 @@ public struct DeleteBucketOutput: Swift.Equatable { public init() { } } -enum DeleteBucketOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteBucketOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3398,8 +2841,12 @@ public struct DeleteBucketPolicyInput: Swift.Equatable { } } -extension DeleteBucketPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketPolicyOutput() + } } } @@ -3408,11 +2855,15 @@ public struct DeleteBucketPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteBucketPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteBucketPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3456,8 +2907,12 @@ public struct DeleteBucketReplicationInput: Swift.Equatable { } } -extension DeleteBucketReplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketReplicationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketReplicationOutput() + } } } @@ -3466,11 +2921,15 @@ public struct DeleteBucketReplicationOutput: Swift.Equatable { public init() { } } -enum DeleteBucketReplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteBucketReplicationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3514,8 +2973,12 @@ public struct DeleteBucketTaggingInput: Swift.Equatable { } } -extension DeleteBucketTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteBucketTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteBucketTaggingOutput() + } } } @@ -3524,11 +2987,15 @@ public struct DeleteBucketTaggingOutput: Swift.Equatable { public init() { } } -enum DeleteBucketTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteBucketTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3572,8 +3039,12 @@ public struct DeleteJobTaggingInput: Swift.Equatable { } } -extension DeleteJobTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteJobTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteJobTaggingOutput() + } } } @@ -3582,32 +3053,37 @@ public struct DeleteJobTaggingOutput: Swift.Equatable { public init() { } } -enum DeleteJobTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRequestsException": return try await TooManyRequestsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteJobTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InternalServiceException": return try await InternalServiceException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NotFoundException": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRequestsException": return try await TooManyRequestsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.DeleteMarkerReplication: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ControlClientTypes.DeleteMarkerReplication { static func writingClosure(_ value: S3ControlClientTypes.DeleteMarkerReplication?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.DeleteMarkerReplicationStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.DeleteMarkerReplication() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -3660,33 +3136,28 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.DeleteMultiRegionAccessPointInput: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - } +extension S3ControlClientTypes.DeleteMultiRegionAccessPointInput { static func writingClosure(_ value: S3ControlClientTypes.DeleteMultiRegionAccessPointInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) + try writer["Name"].write(value.name) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.DeleteMultiRegionAccessPointInput() + value.name = try reader["Name"].readIfPresent() + return value + } } } extension DeleteMultiRegionAccessPointInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case details = "Details" - } - static func writingClosure(_ value: DeleteMultiRegionAccessPointInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ClientToken")].write(value.clientToken) - try writer[.init("Details")].write(value.details, writingClosure: S3ControlClientTypes.DeleteMultiRegionAccessPointInput.writingClosure(_:to:)) + try writer["ClientToken"].write(value.clientToken) + try writer["Details"].write(value.details, writingClosure: S3ControlClientTypes.DeleteMultiRegionAccessPointInput.writingClosure(_:to:)) } } @@ -3748,34 +3219,15 @@ public struct DeleteMultiRegionAccessPointInput: Swift.Equatable { } } -struct DeleteMultiRegionAccessPointInputBody: Swift.Equatable { - let clientToken: Swift.String? - let details: S3ControlClientTypes.DeleteMultiRegionAccessPointInput? -} - -extension DeleteMultiRegionAccessPointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case details = "Details" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let detailsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.DeleteMultiRegionAccessPointInput.self, forKey: .details) - details = detailsDecoded - } -} +extension DeleteMultiRegionAccessPointOutput { -extension DeleteMultiRegionAccessPointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DeleteMultiRegionAccessPointOutputBody = try responseDecoder.decode(responseBody: data) - self.requestTokenARN = output.requestTokenARN - } else { - self.requestTokenARN = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DeleteMultiRegionAccessPointOutput() + value.requestTokenARN = try reader["RequestTokenARN"].readIfPresent() + return value } } } @@ -3792,27 +3244,15 @@ public struct DeleteMultiRegionAccessPointOutput: Swift.Equatable { } } -struct DeleteMultiRegionAccessPointOutputBody: Swift.Equatable { - let requestTokenARN: Swift.String? -} - -extension DeleteMultiRegionAccessPointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case requestTokenARN = "RequestTokenARN" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let requestTokenARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestTokenARN) - requestTokenARN = requestTokenARNDecoded - } -} +enum DeleteMultiRegionAccessPointOutputError { -enum DeleteMultiRegionAccessPointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3848,8 +3288,12 @@ public struct DeletePublicAccessBlockInput: Swift.Equatable { } } -extension DeletePublicAccessBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeletePublicAccessBlockOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeletePublicAccessBlockOutput() + } } } @@ -3858,11 +3302,15 @@ public struct DeletePublicAccessBlockOutput: Swift.Equatable { public init() { } } -enum DeletePublicAccessBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeletePublicAccessBlockOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3906,8 +3354,12 @@ public struct DeleteStorageLensConfigurationInput: Swift.Equatable { } } -extension DeleteStorageLensConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteStorageLensConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteStorageLensConfigurationOutput() + } } } @@ -3916,11 +3368,15 @@ public struct DeleteStorageLensConfigurationOutput: Swift.Equatable { public init() { } } -enum DeleteStorageLensConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteStorageLensConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -3964,8 +3420,12 @@ public struct DeleteStorageLensConfigurationTaggingInput: Swift.Equatable { } } -extension DeleteStorageLensConfigurationTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteStorageLensConfigurationTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteStorageLensConfigurationTaggingOutput() + } } } @@ -3974,11 +3434,15 @@ public struct DeleteStorageLensConfigurationTaggingOutput: Swift.Equatable { public init() { } } -enum DeleteStorageLensConfigurationTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteStorageLensConfigurationTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4022,8 +3486,12 @@ public struct DeleteStorageLensGroupInput: Swift.Equatable { } } -extension DeleteStorageLensGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DeleteStorageLensGroupOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteStorageLensGroupOutput() + } } } @@ -4032,11 +3500,15 @@ public struct DeleteStorageLensGroupOutput: Swift.Equatable { public init() { } } -enum DeleteStorageLensGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteStorageLensGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4080,14 +3552,15 @@ public struct DescribeJobInput: Swift.Equatable { } } -extension DescribeJobOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeJobOutputBody = try responseDecoder.decode(responseBody: data) - self.job = output.job - } else { - self.job = nil +extension DescribeJobOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeJobOutput() + value.job = try reader["Job"].readIfPresent(readingClosure: S3ControlClientTypes.JobDescriptor.readingClosure) + return value } } } @@ -4104,31 +3577,20 @@ public struct DescribeJobOutput: Swift.Equatable { } } -struct DescribeJobOutputBody: Swift.Equatable { - let job: S3ControlClientTypes.JobDescriptor? -} - -extension DescribeJobOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case job = "Job" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobDescriptor.self, forKey: .job) - job = jobDecoded - } -} +enum DescribeJobOutputError { -enum DescribeJobOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRequestsException": return try await TooManyRequestsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "BadRequestException": return try await BadRequestException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InternalServiceException": return try await InternalServiceException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NotFoundException": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRequestsException": return try await TooManyRequestsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4172,14 +3634,15 @@ public struct DescribeMultiRegionAccessPointOperationInput: Swift.Equatable { } } -extension DescribeMultiRegionAccessPointOperationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeMultiRegionAccessPointOperationOutputBody = try responseDecoder.decode(responseBody: data) - self.asyncOperation = output.asyncOperation - } else { - self.asyncOperation = nil +extension DescribeMultiRegionAccessPointOperationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = DescribeMultiRegionAccessPointOperationOutput() + value.asyncOperation = try reader["AsyncOperation"].readIfPresent(readingClosure: S3ControlClientTypes.AsyncOperation.readingClosure) + return value } } } @@ -4196,69 +3659,45 @@ public struct DescribeMultiRegionAccessPointOperationOutput: Swift.Equatable { } } -struct DescribeMultiRegionAccessPointOperationOutputBody: Swift.Equatable { - let asyncOperation: S3ControlClientTypes.AsyncOperation? -} - -extension DescribeMultiRegionAccessPointOperationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case asyncOperation = "AsyncOperation" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let asyncOperationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AsyncOperation.self, forKey: .asyncOperation) - asyncOperation = asyncOperationDecoded - } -} +enum DescribeMultiRegionAccessPointOperationOutputError { -enum DescribeMultiRegionAccessPointOperationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.Destination: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlTranslation = "AccessControlTranslation" - case account = "Account" - case bucket = "Bucket" - case encryptionConfiguration = "EncryptionConfiguration" - case metrics = "Metrics" - case replicationTime = "ReplicationTime" - case storageClass = "StorageClass" - } +extension S3ControlClientTypes.Destination { static func writingClosure(_ value: S3ControlClientTypes.Destination?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlTranslation")].write(value.accessControlTranslation, writingClosure: S3ControlClientTypes.AccessControlTranslation.writingClosure(_:to:)) - try writer[.init("Account")].write(value.account) - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("EncryptionConfiguration")].write(value.encryptionConfiguration, writingClosure: S3ControlClientTypes.EncryptionConfiguration.writingClosure(_:to:)) - try writer[.init("Metrics")].write(value.metrics, writingClosure: S3ControlClientTypes.Metrics.writingClosure(_:to:)) - try writer[.init("ReplicationTime")].write(value.replicationTime, writingClosure: S3ControlClientTypes.ReplicationTime.writingClosure(_:to:)) - try writer[.init("StorageClass")].write(value.storageClass) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let replicationTimeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationTime.self, forKey: .replicationTime) - replicationTime = replicationTimeDecoded - let accessControlTranslationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AccessControlTranslation.self, forKey: .accessControlTranslation) - accessControlTranslation = accessControlTranslationDecoded - let encryptionConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.EncryptionConfiguration.self, forKey: .encryptionConfiguration) - encryptionConfiguration = encryptionConfigurationDecoded - let metricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Metrics.self, forKey: .metrics) - metrics = metricsDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationStorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded + try writer["AccessControlTranslation"].write(value.accessControlTranslation, writingClosure: S3ControlClientTypes.AccessControlTranslation.writingClosure(_:to:)) + try writer["Account"].write(value.account) + try writer["Bucket"].write(value.bucket) + try writer["EncryptionConfiguration"].write(value.encryptionConfiguration, writingClosure: S3ControlClientTypes.EncryptionConfiguration.writingClosure(_:to:)) + try writer["Metrics"].write(value.metrics, writingClosure: S3ControlClientTypes.Metrics.writingClosure(_:to:)) + try writer["ReplicationTime"].write(value.replicationTime, writingClosure: S3ControlClientTypes.ReplicationTime.writingClosure(_:to:)) + try writer["StorageClass"].write(value.storageClass) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Destination() + value.account = try reader["Account"].readIfPresent() + value.bucket = try reader["Bucket"].readIfPresent() + value.replicationTime = try reader["ReplicationTime"].readIfPresent(readingClosure: S3ControlClientTypes.ReplicationTime.readingClosure) + value.accessControlTranslation = try reader["AccessControlTranslation"].readIfPresent(readingClosure: S3ControlClientTypes.AccessControlTranslation.readingClosure) + value.encryptionConfiguration = try reader["EncryptionConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.EncryptionConfiguration.readingClosure) + value.metrics = try reader["Metrics"].readIfPresent(readingClosure: S3ControlClientTypes.Metrics.readingClosure) + value.storageClass = try reader["StorageClass"].readIfPresent() + return value + } } } @@ -4303,20 +3742,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.DetailedStatusCodesMetrics: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isEnabled = "IsEnabled" - } +extension S3ControlClientTypes.DetailedStatusCodesMetrics { static func writingClosure(_ value: S3ControlClientTypes.DetailedStatusCodesMetrics?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsEnabled")].write(value.isEnabled) + try writer["IsEnabled"].write(value.isEnabled) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) ?? false - isEnabled = isEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.DetailedStatusCodesMetrics() + value.isEnabled = try reader["IsEnabled"].readIfPresent() ?? false + return value + } } } @@ -4367,8 +3806,12 @@ public struct DissociateAccessGrantsIdentityCenterInput: Swift.Equatable { } } -extension DissociateAccessGrantsIdentityCenterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension DissociateAccessGrantsIdentityCenterOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DissociateAccessGrantsIdentityCenterOutput() + } } } @@ -4377,29 +3820,33 @@ public struct DissociateAccessGrantsIdentityCenterOutput: Swift.Equatable { public init() { } } -enum DissociateAccessGrantsIdentityCenterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DissociateAccessGrantsIdentityCenterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.EncryptionConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicaKmsKeyID = "ReplicaKmsKeyID" - } +extension S3ControlClientTypes.EncryptionConfiguration { static func writingClosure(_ value: S3ControlClientTypes.EncryptionConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ReplicaKmsKeyID")].write(value.replicaKmsKeyID) + try writer["ReplicaKmsKeyID"].write(value.replicaKmsKeyID) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicaKmsKeyIDDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replicaKmsKeyID) - replicaKmsKeyID = replicaKmsKeyIDDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.EncryptionConfiguration() + value.replicaKmsKeyID = try reader["ReplicaKmsKeyID"].readIfPresent() + return value + } } } @@ -4419,20 +3866,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.EstablishedMultiRegionAccessPointPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } +extension S3ControlClientTypes.EstablishedMultiRegionAccessPointPolicy { static func writingClosure(_ value: S3ControlClientTypes.EstablishedMultiRegionAccessPointPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Policy")].write(value.policy) + try writer["Policy"].write(value.policy) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.EstablishedMultiRegionAccessPointPolicy() + value.policy = try reader["Policy"].readIfPresent() + return value + } } } @@ -4452,57 +3899,21 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.Exclude: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case buckets = "Buckets" - case regions = "Regions" - } +extension S3ControlClientTypes.Exclude { static func writingClosure(_ value: S3ControlClientTypes.Exclude?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Buckets")].writeList(value.buckets, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Arn"), isFlattened: false) - try writer[.init("Regions")].writeList(value.regions, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Region"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.buckets) { - struct KeyVal0{struct Arn{}} - let bucketsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .buckets) - if let bucketsWrappedContainer = bucketsWrappedContainer { - let bucketsContainer = try bucketsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var bucketsBuffer:[Swift.String]? = nil - if let bucketsContainer = bucketsContainer { - bucketsBuffer = [Swift.String]() - for stringContainer0 in bucketsContainer { - bucketsBuffer?.append(stringContainer0) - } - } - buckets = bucketsBuffer - } else { - buckets = [] - } - } else { - buckets = nil - } - if containerValues.contains(.regions) { - struct KeyVal0{struct Region{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionsBuffer:[Swift.String]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Swift.String]() - for stringContainer0 in regionsContainer { - regionsBuffer?.append(stringContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil + try writer["Buckets"].writeList(value.buckets, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Arn", isFlattened: false) + try writer["Regions"].writeList(value.regions, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Region", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Exclude() + value.buckets = try reader["Buckets"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Arn", isFlattened: false) + value.regions = try reader["Regions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Region", isFlattened: false) + return value } } } @@ -4527,20 +3938,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ExistingObjectReplication: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ControlClientTypes.ExistingObjectReplication { static func writingClosure(_ value: S3ControlClientTypes.ExistingObjectReplication?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ExistingObjectReplicationStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ExistingObjectReplication() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -4657,24 +4068,22 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.GeneratedManifestEncryption: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ssekms = "SSE-KMS" - case sses3 = "SSE-S3" - } +extension S3ControlClientTypes.GeneratedManifestEncryption { static func writingClosure(_ value: S3ControlClientTypes.GeneratedManifestEncryption?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("SSE-KMS")].write(value.ssekms, writingClosure: S3ControlClientTypes.SSEKMSEncryption.writingClosure(_:to:)) - try writer[.init("SSE-S3")].write(value.sses3, writingClosure: S3ControlClientTypes.SSES3Encryption.writingClosure(_:to:)) + try writer["SSE-KMS"].write(value.ssekms, writingClosure: S3ControlClientTypes.SSEKMSEncryption.writingClosure(_:to:)) + try writer["SSE-S3"].write(value.sses3, writingClosure: S3ControlClientTypes.SSES3Encryption.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sses3Decoded = try containerValues.decodeIfPresent(S3ControlClientTypes.SSES3Encryption.self, forKey: .sses3) - sses3 = sses3Decoded - let ssekmsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.SSEKMSEncryption.self, forKey: .ssekms) - ssekms = ssekmsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.GeneratedManifestEncryption() + value.sses3 = try reader["SSE-S3"].readIfPresent(readingClosure: S3ControlClientTypes.SSES3Encryption.readingClosure) + value.ssekms = try reader["SSE-KMS"].readIfPresent(readingClosure: S3ControlClientTypes.SSEKMSEncryption.readingClosure) + return value + } } } @@ -4766,30 +4175,23 @@ public struct GetAccessGrantInput: Swift.Equatable { } } -extension GetAccessGrantOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessGrantOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantArn = output.accessGrantArn - self.accessGrantId = output.accessGrantId - self.accessGrantsLocationConfiguration = output.accessGrantsLocationConfiguration - self.accessGrantsLocationId = output.accessGrantsLocationId - self.applicationArn = output.applicationArn - self.createdAt = output.createdAt - self.grantScope = output.grantScope - self.grantee = output.grantee - self.permission = output.permission - } else { - self.accessGrantArn = nil - self.accessGrantId = nil - self.accessGrantsLocationConfiguration = nil - self.accessGrantsLocationId = nil - self.applicationArn = nil - self.createdAt = nil - self.grantScope = nil - self.grantee = nil - self.permission = nil +extension GetAccessGrantOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessGrantOutput() + value.accessGrantArn = try reader["AccessGrantArn"].readIfPresent() + value.accessGrantId = try reader["AccessGrantId"].readIfPresent() + value.accessGrantsLocationConfiguration = try reader["AccessGrantsLocationConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.AccessGrantsLocationConfiguration.readingClosure) + value.accessGrantsLocationId = try reader["AccessGrantsLocationId"].readIfPresent() + value.applicationArn = try reader["ApplicationArn"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.grantScope = try reader["GrantScope"].readIfPresent() + value.grantee = try reader["Grantee"].readIfPresent(readingClosure: S3ControlClientTypes.Grantee.readingClosure) + value.permission = try reader["Permission"].readIfPresent() + return value } } } @@ -4844,59 +4246,15 @@ public struct GetAccessGrantOutput: Swift.Equatable { } } -struct GetAccessGrantOutputBody: Swift.Equatable { - let createdAt: ClientRuntime.Date? - let accessGrantId: Swift.String? - let accessGrantArn: Swift.String? - let grantee: S3ControlClientTypes.Grantee? - let permission: S3ControlClientTypes.Permission? - let accessGrantsLocationId: Swift.String? - let accessGrantsLocationConfiguration: S3ControlClientTypes.AccessGrantsLocationConfiguration? - let grantScope: Swift.String? - let applicationArn: Swift.String? -} - -extension GetAccessGrantOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantArn = "AccessGrantArn" - case accessGrantId = "AccessGrantId" - case accessGrantsLocationConfiguration = "AccessGrantsLocationConfiguration" - case accessGrantsLocationId = "AccessGrantsLocationId" - case applicationArn = "ApplicationArn" - case createdAt = "CreatedAt" - case grantScope = "GrantScope" - case grantee = "Grantee" - case permission = "Permission" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let accessGrantIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantId) - accessGrantId = accessGrantIdDecoded - let accessGrantArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantArn) - accessGrantArn = accessGrantArnDecoded - let granteeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Grantee.self, forKey: .grantee) - grantee = granteeDecoded - let permissionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Permission.self, forKey: .permission) - permission = permissionDecoded - let accessGrantsLocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationId) - accessGrantsLocationId = accessGrantsLocationIdDecoded - let accessGrantsLocationConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AccessGrantsLocationConfiguration.self, forKey: .accessGrantsLocationConfiguration) - accessGrantsLocationConfiguration = accessGrantsLocationConfigurationDecoded - let grantScopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantScope) - grantScope = grantScopeDecoded - let applicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationArn) - applicationArn = applicationArnDecoded - } -} - -enum GetAccessGrantOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum GetAccessGrantOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -4951,16 +4309,16 @@ public struct GetAccessGrantsInstanceForPrefixInput: Swift.Equatable { } } -extension GetAccessGrantsInstanceForPrefixOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessGrantsInstanceForPrefixOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsInstanceArn = output.accessGrantsInstanceArn - self.accessGrantsInstanceId = output.accessGrantsInstanceId - } else { - self.accessGrantsInstanceArn = nil - self.accessGrantsInstanceId = nil +extension GetAccessGrantsInstanceForPrefixOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessGrantsInstanceForPrefixOutput() + value.accessGrantsInstanceArn = try reader["AccessGrantsInstanceArn"].readIfPresent() + value.accessGrantsInstanceId = try reader["AccessGrantsInstanceId"].readIfPresent() + return value } } } @@ -4981,31 +4339,15 @@ public struct GetAccessGrantsInstanceForPrefixOutput: Swift.Equatable { } } -struct GetAccessGrantsInstanceForPrefixOutputBody: Swift.Equatable { - let accessGrantsInstanceArn: Swift.String? - let accessGrantsInstanceId: Swift.String? -} - -extension GetAccessGrantsInstanceForPrefixOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsInstanceArn = "AccessGrantsInstanceArn" - case accessGrantsInstanceId = "AccessGrantsInstanceId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessGrantsInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsInstanceArn) - accessGrantsInstanceArn = accessGrantsInstanceArnDecoded - let accessGrantsInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsInstanceId) - accessGrantsInstanceId = accessGrantsInstanceIdDecoded - } -} +enum GetAccessGrantsInstanceForPrefixOutputError { -enum GetAccessGrantsInstanceForPrefixOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5041,20 +4383,18 @@ public struct GetAccessGrantsInstanceInput: Swift.Equatable { } } -extension GetAccessGrantsInstanceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessGrantsInstanceOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsInstanceArn = output.accessGrantsInstanceArn - self.accessGrantsInstanceId = output.accessGrantsInstanceId - self.createdAt = output.createdAt - self.identityCenterArn = output.identityCenterArn - } else { - self.accessGrantsInstanceArn = nil - self.accessGrantsInstanceId = nil - self.createdAt = nil - self.identityCenterArn = nil +extension GetAccessGrantsInstanceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessGrantsInstanceOutput() + value.accessGrantsInstanceArn = try reader["AccessGrantsInstanceArn"].readIfPresent() + value.accessGrantsInstanceId = try reader["AccessGrantsInstanceId"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.identityCenterArn = try reader["IdentityCenterArn"].readIfPresent() + return value } } } @@ -5083,39 +4423,15 @@ public struct GetAccessGrantsInstanceOutput: Swift.Equatable { } } -struct GetAccessGrantsInstanceOutputBody: Swift.Equatable { - let accessGrantsInstanceArn: Swift.String? - let accessGrantsInstanceId: Swift.String? - let identityCenterArn: Swift.String? - let createdAt: ClientRuntime.Date? -} - -extension GetAccessGrantsInstanceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsInstanceArn = "AccessGrantsInstanceArn" - case accessGrantsInstanceId = "AccessGrantsInstanceId" - case createdAt = "CreatedAt" - case identityCenterArn = "IdentityCenterArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessGrantsInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsInstanceArn) - accessGrantsInstanceArn = accessGrantsInstanceArnDecoded - let accessGrantsInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsInstanceId) - accessGrantsInstanceId = accessGrantsInstanceIdDecoded - let identityCenterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identityCenterArn) - identityCenterArn = identityCenterArnDecoded - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - } -} +enum GetAccessGrantsInstanceOutputError { -enum GetAccessGrantsInstanceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5151,18 +4467,17 @@ public struct GetAccessGrantsInstanceResourcePolicyInput: Swift.Equatable { } } -extension GetAccessGrantsInstanceResourcePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessGrantsInstanceResourcePolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.createdAt = output.createdAt - self.organization = output.organization - self.policy = output.policy - } else { - self.createdAt = nil - self.organization = nil - self.policy = nil +extension GetAccessGrantsInstanceResourcePolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessGrantsInstanceResourcePolicyOutput() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.organization = try reader["Organization"].readIfPresent() + value.policy = try reader["Policy"].readIfPresent() + return value } } } @@ -5187,35 +4502,15 @@ public struct GetAccessGrantsInstanceResourcePolicyOutput: Swift.Equatable { } } -struct GetAccessGrantsInstanceResourcePolicyOutputBody: Swift.Equatable { - let policy: Swift.String? - let organization: Swift.String? - let createdAt: ClientRuntime.Date? -} - -extension GetAccessGrantsInstanceResourcePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createdAt = "CreatedAt" - case organization = "Organization" - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - let organizationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organization) - organization = organizationDecoded - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - } -} +enum GetAccessGrantsInstanceResourcePolicyOutputError { -enum GetAccessGrantsInstanceResourcePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5259,22 +4554,19 @@ public struct GetAccessGrantsLocationInput: Swift.Equatable { } } -extension GetAccessGrantsLocationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessGrantsLocationOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsLocationArn = output.accessGrantsLocationArn - self.accessGrantsLocationId = output.accessGrantsLocationId - self.createdAt = output.createdAt - self.iamRoleArn = output.iamRoleArn - self.locationScope = output.locationScope - } else { - self.accessGrantsLocationArn = nil - self.accessGrantsLocationId = nil - self.createdAt = nil - self.iamRoleArn = nil - self.locationScope = nil +extension GetAccessGrantsLocationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessGrantsLocationOutput() + value.accessGrantsLocationArn = try reader["AccessGrantsLocationArn"].readIfPresent() + value.accessGrantsLocationId = try reader["AccessGrantsLocationId"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.iamRoleArn = try reader["IAMRoleArn"].readIfPresent() + value.locationScope = try reader["LocationScope"].readIfPresent() + return value } } } @@ -5307,43 +4599,15 @@ public struct GetAccessGrantsLocationOutput: Swift.Equatable { } } -struct GetAccessGrantsLocationOutputBody: Swift.Equatable { - let createdAt: ClientRuntime.Date? - let accessGrantsLocationId: Swift.String? - let accessGrantsLocationArn: Swift.String? - let locationScope: Swift.String? - let iamRoleArn: Swift.String? -} - -extension GetAccessGrantsLocationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsLocationArn = "AccessGrantsLocationArn" - case accessGrantsLocationId = "AccessGrantsLocationId" - case createdAt = "CreatedAt" - case iamRoleArn = "IAMRoleArn" - case locationScope = "LocationScope" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let accessGrantsLocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationId) - accessGrantsLocationId = accessGrantsLocationIdDecoded - let accessGrantsLocationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationArn) - accessGrantsLocationArn = accessGrantsLocationArnDecoded - let locationScopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationScope) - locationScope = locationScopeDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - } -} +enum GetAccessGrantsLocationOutputError { -enum GetAccessGrantsLocationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5387,14 +4651,15 @@ public struct GetAccessPointConfigurationForObjectLambdaInput: Swift.Equatable { } } -extension GetAccessPointConfigurationForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessPointConfigurationForObjectLambdaOutputBody = try responseDecoder.decode(responseBody: data) - self.configuration = output.configuration - } else { - self.configuration = nil +extension GetAccessPointConfigurationForObjectLambdaOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessPointConfigurationForObjectLambdaOutput() + value.configuration = try reader["Configuration"].readIfPresent(readingClosure: S3ControlClientTypes.ObjectLambdaConfiguration.readingClosure) + return value } } } @@ -5411,27 +4676,15 @@ public struct GetAccessPointConfigurationForObjectLambdaOutput: Swift.Equatable } } -struct GetAccessPointConfigurationForObjectLambdaOutputBody: Swift.Equatable { - let configuration: S3ControlClientTypes.ObjectLambdaConfiguration? -} - -extension GetAccessPointConfigurationForObjectLambdaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configuration = "Configuration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ObjectLambdaConfiguration.self, forKey: .configuration) - configuration = configurationDecoded - } -} +enum GetAccessPointConfigurationForObjectLambdaOutputError { -enum GetAccessPointConfigurationForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5475,20 +4728,18 @@ public struct GetAccessPointForObjectLambdaInput: Swift.Equatable { } } -extension GetAccessPointForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessPointForObjectLambdaOutputBody = try responseDecoder.decode(responseBody: data) - self.alias = output.alias - self.creationDate = output.creationDate - self.name = output.name - self.publicAccessBlockConfiguration = output.publicAccessBlockConfiguration - } else { - self.alias = nil - self.creationDate = nil - self.name = nil - self.publicAccessBlockConfiguration = nil +extension GetAccessPointForObjectLambdaOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessPointForObjectLambdaOutput() + value.alias = try reader["Alias"].readIfPresent(readingClosure: S3ControlClientTypes.ObjectLambdaAccessPointAlias.readingClosure) + value.creationDate = try reader["CreationDate"].readTimestampIfPresent(format: .dateTime) + value.name = try reader["Name"].readIfPresent() + value.publicAccessBlockConfiguration = try reader["PublicAccessBlockConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.readingClosure) + return value } } } @@ -5517,39 +4768,15 @@ public struct GetAccessPointForObjectLambdaOutput: Swift.Equatable { } } -struct GetAccessPointForObjectLambdaOutputBody: Swift.Equatable { - let name: Swift.String? - let publicAccessBlockConfiguration: S3ControlClientTypes.PublicAccessBlockConfiguration? - let creationDate: ClientRuntime.Date? - let alias: S3ControlClientTypes.ObjectLambdaAccessPointAlias? -} - -extension GetAccessPointForObjectLambdaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alias = "Alias" - case creationDate = "CreationDate" - case name = "Name" - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let publicAccessBlockConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlockConfiguration) - publicAccessBlockConfiguration = publicAccessBlockConfigurationDecoded - let creationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationDate) - creationDate = creationDateDecoded - let aliasDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ObjectLambdaAccessPointAlias.self, forKey: .alias) - alias = aliasDecoded - } -} +enum GetAccessPointForObjectLambdaOutputError { -enum GetAccessPointForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5593,32 +4820,24 @@ public struct GetAccessPointInput: Swift.Equatable { } } -extension GetAccessPointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessPointOutputBody = try responseDecoder.decode(responseBody: data) - self.accessPointArn = output.accessPointArn - self.alias = output.alias - self.bucket = output.bucket - self.bucketAccountId = output.bucketAccountId - self.creationDate = output.creationDate - self.endpoints = output.endpoints - self.name = output.name - self.networkOrigin = output.networkOrigin - self.publicAccessBlockConfiguration = output.publicAccessBlockConfiguration - self.vpcConfiguration = output.vpcConfiguration - } else { - self.accessPointArn = nil - self.alias = nil - self.bucket = nil - self.bucketAccountId = nil - self.creationDate = nil - self.endpoints = nil - self.name = nil - self.networkOrigin = nil - self.publicAccessBlockConfiguration = nil - self.vpcConfiguration = nil +extension GetAccessPointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessPointOutput() + value.accessPointArn = try reader["AccessPointArn"].readIfPresent() + value.alias = try reader["Alias"].readIfPresent() + value.bucket = try reader["Bucket"].readIfPresent() + value.bucketAccountId = try reader["BucketAccountId"].readIfPresent() + value.creationDate = try reader["CreationDate"].readTimestampIfPresent(format: .dateTime) + value.endpoints = try reader["Endpoints"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.name = try reader["Name"].readIfPresent() + value.networkOrigin = try reader["NetworkOrigin"].readIfPresent() + value.publicAccessBlockConfiguration = try reader["PublicAccessBlockConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.readingClosure) + value.vpcConfiguration = try reader["VpcConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.VpcConfiguration.readingClosure) + return value } } } @@ -5671,80 +4890,15 @@ public struct GetAccessPointOutput: Swift.Equatable { } } -struct GetAccessPointOutputBody: Swift.Equatable { - let name: Swift.String? - let bucket: Swift.String? - let networkOrigin: S3ControlClientTypes.NetworkOrigin? - let vpcConfiguration: S3ControlClientTypes.VpcConfiguration? - let publicAccessBlockConfiguration: S3ControlClientTypes.PublicAccessBlockConfiguration? - let creationDate: ClientRuntime.Date? - let alias: Swift.String? - let accessPointArn: Swift.String? - let endpoints: [Swift.String:Swift.String]? - let bucketAccountId: Swift.String? -} - -extension GetAccessPointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPointArn = "AccessPointArn" - case alias = "Alias" - case bucket = "Bucket" - case bucketAccountId = "BucketAccountId" - case creationDate = "CreationDate" - case endpoints = "Endpoints" - case name = "Name" - case networkOrigin = "NetworkOrigin" - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - case vpcConfiguration = "VpcConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let networkOriginDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.NetworkOrigin.self, forKey: .networkOrigin) - networkOrigin = networkOriginDecoded - let vpcConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.VpcConfiguration.self, forKey: .vpcConfiguration) - vpcConfiguration = vpcConfigurationDecoded - let publicAccessBlockConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlockConfiguration) - publicAccessBlockConfiguration = publicAccessBlockConfigurationDecoded - let creationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationDate) - creationDate = creationDateDecoded - let aliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alias) - alias = aliasDecoded - let accessPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessPointArn) - accessPointArn = accessPointArnDecoded - if containerValues.contains(.endpoints) { - struct KeyVal0{struct key{}; struct value{}} - let endpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .endpoints) - if let endpointsWrappedContainer = endpointsWrappedContainer { - let endpointsContainer = try endpointsWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var endpointsBuffer: [Swift.String:Swift.String]? = nil - if let endpointsContainer = endpointsContainer { - endpointsBuffer = [Swift.String:Swift.String]() - for stringContainer0 in endpointsContainer { - endpointsBuffer?[stringContainer0.key] = stringContainer0.value - } - } - endpoints = endpointsBuffer - } else { - endpoints = [:] - } - } else { - endpoints = nil - } - let bucketAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketAccountId) - bucketAccountId = bucketAccountIdDecoded - } -} +enum GetAccessPointOutputError { -enum GetAccessPointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5788,14 +4942,15 @@ public struct GetAccessPointPolicyForObjectLambdaInput: Swift.Equatable { } } -extension GetAccessPointPolicyForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessPointPolicyForObjectLambdaOutputBody = try responseDecoder.decode(responseBody: data) - self.policy = output.policy - } else { - self.policy = nil +extension GetAccessPointPolicyForObjectLambdaOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessPointPolicyForObjectLambdaOutput() + value.policy = try reader["Policy"].readIfPresent() + return value } } } @@ -5812,27 +4967,15 @@ public struct GetAccessPointPolicyForObjectLambdaOutput: Swift.Equatable { } } -struct GetAccessPointPolicyForObjectLambdaOutputBody: Swift.Equatable { - let policy: Swift.String? -} - -extension GetAccessPointPolicyForObjectLambdaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} +enum GetAccessPointPolicyForObjectLambdaOutputError { -enum GetAccessPointPolicyForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5876,14 +5019,15 @@ public struct GetAccessPointPolicyInput: Swift.Equatable { } } -extension GetAccessPointPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessPointPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policy = output.policy - } else { - self.policy = nil +extension GetAccessPointPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessPointPolicyOutput() + value.policy = try reader["Policy"].readIfPresent() + return value } } } @@ -5900,27 +5044,15 @@ public struct GetAccessPointPolicyOutput: Swift.Equatable { } } -struct GetAccessPointPolicyOutputBody: Swift.Equatable { - let policy: Swift.String? -} - -extension GetAccessPointPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} +enum GetAccessPointPolicyOutputError { -enum GetAccessPointPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -5964,14 +5096,15 @@ public struct GetAccessPointPolicyStatusForObjectLambdaInput: Swift.Equatable { } } -extension GetAccessPointPolicyStatusForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessPointPolicyStatusForObjectLambdaOutputBody = try responseDecoder.decode(responseBody: data) - self.policyStatus = output.policyStatus - } else { - self.policyStatus = nil +extension GetAccessPointPolicyStatusForObjectLambdaOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessPointPolicyStatusForObjectLambdaOutput() + value.policyStatus = try reader["PolicyStatus"].readIfPresent(readingClosure: S3ControlClientTypes.PolicyStatus.readingClosure) + return value } } } @@ -5988,27 +5121,15 @@ public struct GetAccessPointPolicyStatusForObjectLambdaOutput: Swift.Equatable { } } -struct GetAccessPointPolicyStatusForObjectLambdaOutputBody: Swift.Equatable { - let policyStatus: S3ControlClientTypes.PolicyStatus? -} - -extension GetAccessPointPolicyStatusForObjectLambdaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyStatus = "PolicyStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyStatusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PolicyStatus.self, forKey: .policyStatus) - policyStatus = policyStatusDecoded - } -} +enum GetAccessPointPolicyStatusForObjectLambdaOutputError { -enum GetAccessPointPolicyStatusForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6052,14 +5173,15 @@ public struct GetAccessPointPolicyStatusInput: Swift.Equatable { } } -extension GetAccessPointPolicyStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessPointPolicyStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.policyStatus = output.policyStatus - } else { - self.policyStatus = nil +extension GetAccessPointPolicyStatusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetAccessPointPolicyStatusOutput() + value.policyStatus = try reader["PolicyStatus"].readIfPresent(readingClosure: S3ControlClientTypes.PolicyStatus.readingClosure) + return value } } } @@ -6076,27 +5198,15 @@ public struct GetAccessPointPolicyStatusOutput: Swift.Equatable { } } -struct GetAccessPointPolicyStatusOutputBody: Swift.Equatable { - let policyStatus: S3ControlClientTypes.PolicyStatus? -} - -extension GetAccessPointPolicyStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyStatus = "PolicyStatus" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyStatusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PolicyStatus.self, forKey: .policyStatus) - policyStatus = policyStatusDecoded - } -} +enum GetAccessPointPolicyStatusOutputError { -enum GetAccessPointPolicyStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6179,14 +5289,15 @@ public struct GetBucketLifecycleConfigurationInput: Swift.Equatable { } } -extension GetBucketLifecycleConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketLifecycleConfigurationOutputBody = try responseDecoder.decode(responseBody: data) - self.rules = output.rules - } else { - self.rules = nil +extension GetBucketLifecycleConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketLifecycleConfigurationOutput() + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.LifecycleRule.readingClosure, memberNodeInfo: "Rule", isFlattened: false) + return value } } } @@ -6203,60 +5314,30 @@ public struct GetBucketLifecycleConfigurationOutput: Swift.Equatable { } } -struct GetBucketLifecycleConfigurationOutputBody: Swift.Equatable { - let rules: [S3ControlClientTypes.LifecycleRule]? -} - -extension GetBucketLifecycleConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rules" - } +enum GetBucketLifecycleConfigurationOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.rules) { - struct KeyVal0{struct Rule{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([S3ControlClientTypes.LifecycleRule].self, forKey: .member) - var rulesBuffer:[S3ControlClientTypes.LifecycleRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [S3ControlClientTypes.LifecycleRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - rules = nil } } } -enum GetBucketLifecycleConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} +extension GetBucketOutput { -extension GetBucketOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketOutputBody = try responseDecoder.decode(responseBody: data) - self.bucket = output.bucket - self.creationDate = output.creationDate - self.publicAccessBlockEnabled = output.publicAccessBlockEnabled - } else { - self.bucket = nil - self.creationDate = nil - self.publicAccessBlockEnabled = false + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketOutput() + value.bucket = try reader["Bucket"].readIfPresent() + value.creationDate = try reader["CreationDate"].readTimestampIfPresent(format: .dateTime) + value.publicAccessBlockEnabled = try reader["PublicAccessBlockEnabled"].readIfPresent() ?? false + return value } } } @@ -6281,35 +5362,15 @@ public struct GetBucketOutput: Swift.Equatable { } } -struct GetBucketOutputBody: Swift.Equatable { - let bucket: Swift.String? - let publicAccessBlockEnabled: Swift.Bool - let creationDate: ClientRuntime.Date? -} - -extension GetBucketOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case creationDate = "CreationDate" - case publicAccessBlockEnabled = "PublicAccessBlockEnabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let publicAccessBlockEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publicAccessBlockEnabled) ?? false - publicAccessBlockEnabled = publicAccessBlockEnabledDecoded - let creationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationDate) - creationDate = creationDateDecoded - } -} +enum GetBucketOutputError { -enum GetBucketOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6353,14 +5414,15 @@ public struct GetBucketPolicyInput: Swift.Equatable { } } -extension GetBucketPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policy = output.policy - } else { - self.policy = nil +extension GetBucketPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketPolicyOutput() + value.policy = try reader["Policy"].readIfPresent() + return value } } } @@ -6377,27 +5439,15 @@ public struct GetBucketPolicyOutput: Swift.Equatable { } } -struct GetBucketPolicyOutputBody: Swift.Equatable { - let policy: Swift.String? -} - -extension GetBucketPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} +enum GetBucketPolicyOutputError { -enum GetBucketPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6441,14 +5491,15 @@ public struct GetBucketReplicationInput: Swift.Equatable { } } -extension GetBucketReplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketReplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.replicationConfiguration = output.replicationConfiguration - } else { - self.replicationConfiguration = nil +extension GetBucketReplicationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketReplicationOutput() + value.replicationConfiguration = try reader["ReplicationConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.ReplicationConfiguration.readingClosure) + return value } } } @@ -6465,27 +5516,15 @@ public struct GetBucketReplicationOutput: Swift.Equatable { } } -struct GetBucketReplicationOutputBody: Swift.Equatable { - let replicationConfiguration: S3ControlClientTypes.ReplicationConfiguration? -} - -extension GetBucketReplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationConfiguration = "ReplicationConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationConfiguration.self, forKey: .replicationConfiguration) - replicationConfiguration = replicationConfigurationDecoded - } -} +enum GetBucketReplicationOutputError { -enum GetBucketReplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6529,14 +5568,15 @@ public struct GetBucketTaggingInput: Swift.Equatable { } } -extension GetBucketTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketTaggingOutputBody = try responseDecoder.decode(responseBody: data) - self.tagSet = output.tagSet - } else { - self.tagSet = nil +extension GetBucketTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketTaggingOutput() + value.tagSet = try reader["TagSet"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6554,44 +5594,15 @@ public struct GetBucketTaggingOutput: Swift.Equatable { } } -struct GetBucketTaggingOutputBody: Swift.Equatable { - let tagSet: [S3ControlClientTypes.S3Tag]? -} - -extension GetBucketTaggingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagSet = "TagSet" - } +enum GetBucketTaggingOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tagSet) { - struct KeyVal0{struct member{}} - let tagSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSet) - if let tagSetWrappedContainer = tagSetWrappedContainer { - let tagSetContainer = try tagSetWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var tagSetBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let tagSetContainer = tagSetContainer { - tagSetBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in tagSetContainer { - tagSetBuffer?.append(structureContainer0) - } - } - tagSet = tagSetBuffer - } else { - tagSet = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - tagSet = nil - } - } -} - -enum GetBucketTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -6635,16 +5646,16 @@ public struct GetBucketVersioningInput: Swift.Equatable { } } -extension GetBucketVersioningOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetBucketVersioningOutputBody = try responseDecoder.decode(responseBody: data) - self.mfaDelete = output.mfaDelete - self.status = output.status - } else { - self.mfaDelete = nil - self.status = nil +extension GetBucketVersioningOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetBucketVersioningOutput() + value.mfaDelete = try reader["MfaDelete"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value } } } @@ -6665,31 +5676,15 @@ public struct GetBucketVersioningOutput: Swift.Equatable { } } -struct GetBucketVersioningOutputBody: Swift.Equatable { - let status: S3ControlClientTypes.BucketVersioningStatus? - let mfaDelete: S3ControlClientTypes.MFADeleteStatus? -} - -extension GetBucketVersioningOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case mfaDelete = "MfaDelete" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.BucketVersioningStatus.self, forKey: .status) - status = statusDecoded - let mfaDeleteDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MFADeleteStatus.self, forKey: .mfaDelete) - mfaDelete = mfaDeleteDecoded - } -} +enum GetBucketVersioningOutputError { -enum GetBucketVersioningOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6794,16 +5789,16 @@ extension GetDataAccessOutput: Swift.CustomDebugStringConvertible { "GetDataAccessOutput(matchedGrantTarget: \(Swift.String(describing: matchedGrantTarget)), credentials: \"CONTENT_REDACTED\")"} } -extension GetDataAccessOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetDataAccessOutputBody = try responseDecoder.decode(responseBody: data) - self.credentials = output.credentials - self.matchedGrantTarget = output.matchedGrantTarget - } else { - self.credentials = nil - self.matchedGrantTarget = nil +extension GetDataAccessOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetDataAccessOutput() + value.credentials = try reader["Credentials"].readIfPresent(readingClosure: S3ControlClientTypes.Credentials.readingClosure) + value.matchedGrantTarget = try reader["MatchedGrantTarget"].readIfPresent() + return value } } } @@ -6824,31 +5819,15 @@ public struct GetDataAccessOutput: Swift.Equatable { } } -struct GetDataAccessOutputBody: Swift.Equatable { - let credentials: S3ControlClientTypes.Credentials? - let matchedGrantTarget: Swift.String? -} - -extension GetDataAccessOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case credentials = "Credentials" - case matchedGrantTarget = "MatchedGrantTarget" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let credentialsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Credentials.self, forKey: .credentials) - credentials = credentialsDecoded - let matchedGrantTargetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .matchedGrantTarget) - matchedGrantTarget = matchedGrantTargetDecoded - } -} +enum GetDataAccessOutputError { -enum GetDataAccessOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -6892,14 +5871,15 @@ public struct GetJobTaggingInput: Swift.Equatable { } } -extension GetJobTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetJobTaggingOutputBody = try responseDecoder.decode(responseBody: data) - self.tags = output.tags - } else { - self.tags = nil +extension GetJobTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetJobTaggingOutput() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -6916,47 +5896,19 @@ public struct GetJobTaggingOutput: Swift.Equatable { } } -struct GetJobTaggingOutputBody: Swift.Equatable { - let tags: [S3ControlClientTypes.S3Tag]? -} - -extension GetJobTaggingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +enum GetJobTaggingOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InternalServiceException": return try await InternalServiceException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NotFoundException": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRequestsException": return try await TooManyRequestsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - tags = nil - } - } -} - -enum GetJobTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRequestsException": return try await TooManyRequestsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -7000,14 +5952,15 @@ public struct GetMultiRegionAccessPointInput: Swift.Equatable { } } -extension GetMultiRegionAccessPointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMultiRegionAccessPointOutputBody = try responseDecoder.decode(responseBody: data) - self.accessPoint = output.accessPoint - } else { - self.accessPoint = nil +extension GetMultiRegionAccessPointOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetMultiRegionAccessPointOutput() + value.accessPoint = try reader["AccessPoint"].readIfPresent(readingClosure: S3ControlClientTypes.MultiRegionAccessPointReport.readingClosure) + return value } } } @@ -7024,27 +5977,15 @@ public struct GetMultiRegionAccessPointOutput: Swift.Equatable { } } -struct GetMultiRegionAccessPointOutputBody: Swift.Equatable { - let accessPoint: S3ControlClientTypes.MultiRegionAccessPointReport? -} - -extension GetMultiRegionAccessPointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPoint = "AccessPoint" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessPointDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MultiRegionAccessPointReport.self, forKey: .accessPoint) - accessPoint = accessPointDecoded - } -} +enum GetMultiRegionAccessPointOutputError { -enum GetMultiRegionAccessPointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -7088,14 +6029,15 @@ public struct GetMultiRegionAccessPointPolicyInput: Swift.Equatable { } } -extension GetMultiRegionAccessPointPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMultiRegionAccessPointPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.policy = output.policy - } else { - self.policy = nil +extension GetMultiRegionAccessPointPolicyOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetMultiRegionAccessPointPolicyOutput() + value.policy = try reader["Policy"].readIfPresent(readingClosure: S3ControlClientTypes.MultiRegionAccessPointPolicyDocument.readingClosure) + return value } } } @@ -7112,27 +6054,15 @@ public struct GetMultiRegionAccessPointPolicyOutput: Swift.Equatable { } } -struct GetMultiRegionAccessPointPolicyOutputBody: Swift.Equatable { - let policy: S3ControlClientTypes.MultiRegionAccessPointPolicyDocument? -} - -extension GetMultiRegionAccessPointPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MultiRegionAccessPointPolicyDocument.self, forKey: .policy) - policy = policyDecoded - } -} +enum GetMultiRegionAccessPointPolicyOutputError { -enum GetMultiRegionAccessPointPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -7176,14 +6106,15 @@ public struct GetMultiRegionAccessPointPolicyStatusInput: Swift.Equatable { } } -extension GetMultiRegionAccessPointPolicyStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMultiRegionAccessPointPolicyStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.established = output.established - } else { - self.established = nil +extension GetMultiRegionAccessPointPolicyStatusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetMultiRegionAccessPointPolicyStatusOutput() + value.established = try reader["Established"].readIfPresent(readingClosure: S3ControlClientTypes.PolicyStatus.readingClosure) + return value } } } @@ -7200,27 +6131,15 @@ public struct GetMultiRegionAccessPointPolicyStatusOutput: Swift.Equatable { } } -struct GetMultiRegionAccessPointPolicyStatusOutputBody: Swift.Equatable { - let established: S3ControlClientTypes.PolicyStatus? -} - -extension GetMultiRegionAccessPointPolicyStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case established = "Established" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let establishedDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PolicyStatus.self, forKey: .established) - established = establishedDecoded - } -} +enum GetMultiRegionAccessPointPolicyStatusOutputError { -enum GetMultiRegionAccessPointPolicyStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -7264,16 +6183,16 @@ public struct GetMultiRegionAccessPointRoutesInput: Swift.Equatable { } } -extension GetMultiRegionAccessPointRoutesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetMultiRegionAccessPointRoutesOutputBody = try responseDecoder.decode(responseBody: data) - self.mrap = output.mrap - self.routes = output.routes - } else { - self.mrap = nil - self.routes = nil +extension GetMultiRegionAccessPointRoutesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetMultiRegionAccessPointRoutesOutput() + value.mrap = try reader["Mrap"].readIfPresent() + value.routes = try reader["Routes"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.MultiRegionAccessPointRoute.readingClosure, memberNodeInfo: "Route", isFlattened: false) + return value } } } @@ -7294,48 +6213,15 @@ public struct GetMultiRegionAccessPointRoutesOutput: Swift.Equatable { } } -struct GetMultiRegionAccessPointRoutesOutputBody: Swift.Equatable { - let mrap: Swift.String? - let routes: [S3ControlClientTypes.MultiRegionAccessPointRoute]? -} - -extension GetMultiRegionAccessPointRoutesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case mrap = "Mrap" - case routes = "Routes" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let mrapDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .mrap) - mrap = mrapDecoded - if containerValues.contains(.routes) { - struct KeyVal0{struct Route{}} - let routesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routes) - if let routesWrappedContainer = routesWrappedContainer { - let routesContainer = try routesWrappedContainer.decodeIfPresent([S3ControlClientTypes.MultiRegionAccessPointRoute].self, forKey: .member) - var routesBuffer:[S3ControlClientTypes.MultiRegionAccessPointRoute]? = nil - if let routesContainer = routesContainer { - routesBuffer = [S3ControlClientTypes.MultiRegionAccessPointRoute]() - for structureContainer0 in routesContainer { - routesBuffer?.append(structureContainer0) - } - } - routes = routesBuffer - } else { - routes = [] - } - } else { - routes = nil - } - } -} +enum GetMultiRegionAccessPointRoutesOutputError { -enum GetMultiRegionAccessPointRoutesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -7371,13 +6257,15 @@ public struct GetPublicAccessBlockInput: Swift.Equatable { } } -extension GetPublicAccessBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ControlClientTypes.PublicAccessBlockConfiguration = try responseDecoder.decode(responseBody: data) - self.publicAccessBlockConfiguration = output - } else { - self.publicAccessBlockConfiguration = nil +extension GetPublicAccessBlockOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetPublicAccessBlockOutput() + value.publicAccessBlockConfiguration = try reader.readIfPresent(readingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.readingClosure) + return value } } } @@ -7394,28 +6282,17 @@ public struct GetPublicAccessBlockOutput: Swift.Equatable { } } -struct GetPublicAccessBlockOutputBody: Swift.Equatable { - let publicAccessBlockConfiguration: S3ControlClientTypes.PublicAccessBlockConfiguration? -} - -extension GetPublicAccessBlockOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicAccessBlockConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlockConfiguration) - publicAccessBlockConfiguration = publicAccessBlockConfigurationDecoded - } -} +enum GetPublicAccessBlockOutputError { -enum GetPublicAccessBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "NoSuchPublicAccessBlockConfiguration": return try await NoSuchPublicAccessBlockConfiguration(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "NoSuchPublicAccessBlockConfiguration": return try await NoSuchPublicAccessBlockConfiguration.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -7459,13 +6336,15 @@ public struct GetStorageLensConfigurationInput: Swift.Equatable { } } -extension GetStorageLensConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ControlClientTypes.StorageLensConfiguration = try responseDecoder.decode(responseBody: data) - self.storageLensConfiguration = output - } else { - self.storageLensConfiguration = nil +extension GetStorageLensConfigurationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetStorageLensConfigurationOutput() + value.storageLensConfiguration = try reader.readIfPresent(readingClosure: S3ControlClientTypes.StorageLensConfiguration.readingClosure) + return value } } } @@ -7482,30 +6361,18 @@ public struct GetStorageLensConfigurationOutput: Swift.Equatable { } } -struct GetStorageLensConfigurationOutputBody: Swift.Equatable { - let storageLensConfiguration: S3ControlClientTypes.StorageLensConfiguration? -} +enum GetStorageLensConfigurationOutputError { -extension GetStorageLensConfigurationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageLensConfiguration = "StorageLensConfiguration" + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } + } } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageLensConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensConfiguration.self, forKey: .storageLensConfiguration) - storageLensConfiguration = storageLensConfigurationDecoded - } -} - -enum GetStorageLensConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} +} extension GetStorageLensConfigurationTaggingInput { @@ -7546,14 +6413,15 @@ public struct GetStorageLensConfigurationTaggingInput: Swift.Equatable { } } -extension GetStorageLensConfigurationTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetStorageLensConfigurationTaggingOutputBody = try responseDecoder.decode(responseBody: data) - self.tags = output.tags - } else { - self.tags = nil +extension GetStorageLensConfigurationTaggingOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetStorageLensConfigurationTaggingOutput() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.StorageLensTag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -7570,44 +6438,15 @@ public struct GetStorageLensConfigurationTaggingOutput: Swift.Equatable { } } -struct GetStorageLensConfigurationTaggingOutputBody: Swift.Equatable { - let tags: [S3ControlClientTypes.StorageLensTag]? -} - -extension GetStorageLensConfigurationTaggingOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +enum GetStorageLensConfigurationTaggingOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.StorageLensTag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.StorageLensTag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.StorageLensTag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - tags = nil - } - } -} - -enum GetStorageLensConfigurationTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -7651,13 +6490,15 @@ public struct GetStorageLensGroupInput: Swift.Equatable { } } -extension GetStorageLensGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: S3ControlClientTypes.StorageLensGroup = try responseDecoder.decode(responseBody: data) - self.storageLensGroup = output - } else { - self.storageLensGroup = nil +extension GetStorageLensGroupOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = GetStorageLensGroupOutput() + value.storageLensGroup = try reader.readIfPresent(readingClosure: S3ControlClientTypes.StorageLensGroup.readingClosure) + return value } } } @@ -7674,49 +6515,35 @@ public struct GetStorageLensGroupOutput: Swift.Equatable { } } -struct GetStorageLensGroupOutputBody: Swift.Equatable { - let storageLensGroup: S3ControlClientTypes.StorageLensGroup? -} - -extension GetStorageLensGroupOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageLensGroup = "StorageLensGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageLensGroupDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensGroup.self, forKey: .storageLensGroup) - storageLensGroup = storageLensGroupDecoded - } -} +enum GetStorageLensGroupOutputError { -enum GetStorageLensGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.Grantee: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case granteeIdentifier = "GranteeIdentifier" - case granteeType = "GranteeType" - } +extension S3ControlClientTypes.Grantee { static func writingClosure(_ value: S3ControlClientTypes.Grantee?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("GranteeIdentifier")].write(value.granteeIdentifier) - try writer[.init("GranteeType")].write(value.granteeType) + try writer["GranteeIdentifier"].write(value.granteeIdentifier) + try writer["GranteeType"].write(value.granteeType) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let granteeTypeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.GranteeType.self, forKey: .granteeType) - granteeType = granteeTypeDecoded - let granteeIdentifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .granteeIdentifier) - granteeIdentifier = granteeIdentifierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Grantee() + value.granteeType = try reader["GranteeType"].readIfPresent() + value.granteeIdentifier = try reader["GranteeIdentifier"].readIfPresent() + return value + } } } @@ -7782,16 +6609,26 @@ extension S3ControlClientTypes { } extension IdempotencyException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = IdempotencyException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension IdempotencyException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IdempotencyException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7819,73 +6656,21 @@ public struct IdempotencyException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct IdempotencyExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension IdempotencyExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension S3ControlClientTypes.Include: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case buckets = "Buckets" - case regions = "Regions" - } +extension S3ControlClientTypes.Include { static func writingClosure(_ value: S3ControlClientTypes.Include?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Buckets")].writeList(value.buckets, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Arn"), isFlattened: false) - try writer[.init("Regions")].writeList(value.regions, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Region"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.buckets) { - struct KeyVal0{struct Arn{}} - let bucketsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .buckets) - if let bucketsWrappedContainer = bucketsWrappedContainer { - let bucketsContainer = try bucketsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var bucketsBuffer:[Swift.String]? = nil - if let bucketsContainer = bucketsContainer { - bucketsBuffer = [Swift.String]() - for stringContainer0 in bucketsContainer { - bucketsBuffer?.append(stringContainer0) - } - } - buckets = bucketsBuffer - } else { - buckets = [] - } - } else { - buckets = nil - } - if containerValues.contains(.regions) { - struct KeyVal0{struct Region{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var regionsBuffer:[Swift.String]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [Swift.String]() - for stringContainer0 in regionsContainer { - regionsBuffer?.append(stringContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil + try writer["Buckets"].writeList(value.buckets, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Arn", isFlattened: false) + try writer["Regions"].writeList(value.regions, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Region", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Include() + value.buckets = try reader["Buckets"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Arn", isFlattened: false) + value.regions = try reader["Regions"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Region", isFlattened: false) + return value } } } @@ -7911,16 +6696,26 @@ extension S3ControlClientTypes { } extension InternalServiceException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InternalServiceException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension InternalServiceException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InternalServiceException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7948,33 +6743,27 @@ public struct InternalServiceException: ClientRuntime.ModeledError, AWSClientRun } } -struct InternalServiceExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InternalServiceExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidNextTokenException { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidNextTokenException() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidNextTokenException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidNextTokenException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8002,33 +6791,27 @@ public struct InvalidNextTokenException: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidNextTokenExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidNextTokenExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension InvalidRequestException { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = InvalidRequestException() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension InvalidRequestException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRequestException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8056,125 +6839,56 @@ public struct InvalidRequestException: ClientRuntime.ModeledError, AWSClientRunt } } -struct InvalidRequestExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidRequestExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension S3ControlClientTypes.JobDescriptor: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case confirmationRequired = "ConfirmationRequired" - case creationTime = "CreationTime" - case description = "Description" - case failureReasons = "FailureReasons" - case generatedManifestDescriptor = "GeneratedManifestDescriptor" - case jobArn = "JobArn" - case jobId = "JobId" - case manifest = "Manifest" - case manifestGenerator = "ManifestGenerator" - case operation = "Operation" - case priority = "Priority" - case progressSummary = "ProgressSummary" - case report = "Report" - case roleArn = "RoleArn" - case status = "Status" - case statusUpdateReason = "StatusUpdateReason" - case suspendedCause = "SuspendedCause" - case suspendedDate = "SuspendedDate" - case terminationDate = "TerminationDate" - } +extension S3ControlClientTypes.JobDescriptor { static func writingClosure(_ value: S3ControlClientTypes.JobDescriptor?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ConfirmationRequired")].write(value.confirmationRequired) - try writer[.init("CreationTime")].writeTimestamp(value.creationTime, format: .dateTime) - try writer[.init("Description")].write(value.description) - try writer[.init("FailureReasons")].writeList(value.failureReasons, memberWritingClosure: S3ControlClientTypes.JobFailure.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("GeneratedManifestDescriptor")].write(value.generatedManifestDescriptor, writingClosure: S3ControlClientTypes.S3GeneratedManifestDescriptor.writingClosure(_:to:)) - try writer[.init("JobArn")].write(value.jobArn) - try writer[.init("JobId")].write(value.jobId) - try writer[.init("Manifest")].write(value.manifest, writingClosure: S3ControlClientTypes.JobManifest.writingClosure(_:to:)) - try writer[.init("ManifestGenerator")].write(value.manifestGenerator, writingClosure: S3ControlClientTypes.JobManifestGenerator.writingClosure(_:to:)) - try writer[.init("Operation")].write(value.operation, writingClosure: S3ControlClientTypes.JobOperation.writingClosure(_:to:)) - try writer[.init("Priority")].write(value.priority) - try writer[.init("ProgressSummary")].write(value.progressSummary, writingClosure: S3ControlClientTypes.JobProgressSummary.writingClosure(_:to:)) - try writer[.init("Report")].write(value.report, writingClosure: S3ControlClientTypes.JobReport.writingClosure(_:to:)) - try writer[.init("RoleArn")].write(value.roleArn) - try writer[.init("Status")].write(value.status) - try writer[.init("StatusUpdateReason")].write(value.statusUpdateReason) - try writer[.init("SuspendedCause")].write(value.suspendedCause) - try writer[.init("SuspendedDate")].writeTimestamp(value.suspendedDate, format: .dateTime) - try writer[.init("TerminationDate")].writeTimestamp(value.terminationDate, format: .dateTime) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - let confirmationRequiredDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .confirmationRequired) ?? nil - confirmationRequired = confirmationRequiredDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let jobArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobArn) - jobArn = jobArnDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobStatus.self, forKey: .status) - status = statusDecoded - let manifestDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifest.self, forKey: .manifest) - manifest = manifestDecoded - let operationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobOperation.self, forKey: .operation) - operation = operationDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) ?? 0 - priority = priorityDecoded - let progressSummaryDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobProgressSummary.self, forKey: .progressSummary) - progressSummary = progressSummaryDecoded - let statusUpdateReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusUpdateReason) - statusUpdateReason = statusUpdateReasonDecoded - if containerValues.contains(.failureReasons) { - struct KeyVal0{struct member{}} - let failureReasonsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failureReasons) - if let failureReasonsWrappedContainer = failureReasonsWrappedContainer { - let failureReasonsContainer = try failureReasonsWrappedContainer.decodeIfPresent([S3ControlClientTypes.JobFailure].self, forKey: .member) - var failureReasonsBuffer:[S3ControlClientTypes.JobFailure]? = nil - if let failureReasonsContainer = failureReasonsContainer { - failureReasonsBuffer = [S3ControlClientTypes.JobFailure]() - for structureContainer0 in failureReasonsContainer { - failureReasonsBuffer?.append(structureContainer0) - } - } - failureReasons = failureReasonsBuffer - } else { - failureReasons = [] - } - } else { - failureReasons = nil - } - let reportDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobReport.self, forKey: .report) - report = reportDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let terminationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .terminationDate) - terminationDate = terminationDateDecoded - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let suspendedDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .suspendedDate) - suspendedDate = suspendedDateDecoded - let suspendedCauseDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .suspendedCause) - suspendedCause = suspendedCauseDecoded - let manifestGeneratorDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifestGenerator.self, forKey: .manifestGenerator) - manifestGenerator = manifestGeneratorDecoded - let generatedManifestDescriptorDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3GeneratedManifestDescriptor.self, forKey: .generatedManifestDescriptor) - generatedManifestDescriptor = generatedManifestDescriptorDecoded + try writer["ConfirmationRequired"].write(value.confirmationRequired) + try writer["CreationTime"].writeTimestamp(value.creationTime, format: .dateTime) + try writer["Description"].write(value.description) + try writer["FailureReasons"].writeList(value.failureReasons, memberWritingClosure: S3ControlClientTypes.JobFailure.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["GeneratedManifestDescriptor"].write(value.generatedManifestDescriptor, writingClosure: S3ControlClientTypes.S3GeneratedManifestDescriptor.writingClosure(_:to:)) + try writer["JobArn"].write(value.jobArn) + try writer["JobId"].write(value.jobId) + try writer["Manifest"].write(value.manifest, writingClosure: S3ControlClientTypes.JobManifest.writingClosure(_:to:)) + try writer["ManifestGenerator"].write(value.manifestGenerator, writingClosure: S3ControlClientTypes.JobManifestGenerator.writingClosure(_:to:)) + try writer["Operation"].write(value.operation, writingClosure: S3ControlClientTypes.JobOperation.writingClosure(_:to:)) + try writer["Priority"].write(value.priority) + try writer["ProgressSummary"].write(value.progressSummary, writingClosure: S3ControlClientTypes.JobProgressSummary.writingClosure(_:to:)) + try writer["Report"].write(value.report, writingClosure: S3ControlClientTypes.JobReport.writingClosure(_:to:)) + try writer["RoleArn"].write(value.roleArn) + try writer["Status"].write(value.status) + try writer["StatusUpdateReason"].write(value.statusUpdateReason) + try writer["SuspendedCause"].write(value.suspendedCause) + try writer["SuspendedDate"].writeTimestamp(value.suspendedDate, format: .dateTime) + try writer["TerminationDate"].writeTimestamp(value.terminationDate, format: .dateTime) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobDescriptor() + value.jobId = try reader["JobId"].readIfPresent() + value.confirmationRequired = try reader["ConfirmationRequired"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.jobArn = try reader["JobArn"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.manifest = try reader["Manifest"].readIfPresent(readingClosure: S3ControlClientTypes.JobManifest.readingClosure) + value.operation = try reader["Operation"].readIfPresent(readingClosure: S3ControlClientTypes.JobOperation.readingClosure) + value.priority = try reader["Priority"].readIfPresent() ?? 0 + value.progressSummary = try reader["ProgressSummary"].readIfPresent(readingClosure: S3ControlClientTypes.JobProgressSummary.readingClosure) + value.statusUpdateReason = try reader["StatusUpdateReason"].readIfPresent() + value.failureReasons = try reader["FailureReasons"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.JobFailure.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.report = try reader["Report"].readIfPresent(readingClosure: S3ControlClientTypes.JobReport.readingClosure) + value.creationTime = try reader["CreationTime"].readTimestampIfPresent(format: .dateTime) + value.terminationDate = try reader["TerminationDate"].readTimestampIfPresent(format: .dateTime) + value.roleArn = try reader["RoleArn"].readIfPresent() + value.suspendedDate = try reader["SuspendedDate"].readTimestampIfPresent(format: .dateTime) + value.suspendedCause = try reader["SuspendedCause"].readIfPresent() + value.manifestGenerator = try reader["ManifestGenerator"].readIfPresent(readingClosure: S3ControlClientTypes.JobManifestGenerator.readingClosure) + value.generatedManifestDescriptor = try reader["GeneratedManifestDescriptor"].readIfPresent(readingClosure: S3ControlClientTypes.S3GeneratedManifestDescriptor.readingClosure) + return value + } } } @@ -8266,24 +6980,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobFailure: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failureCode = "FailureCode" - case failureReason = "FailureReason" - } +extension S3ControlClientTypes.JobFailure { static func writingClosure(_ value: S3ControlClientTypes.JobFailure?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FailureCode")].write(value.failureCode) - try writer[.init("FailureReason")].write(value.failureReason) + try writer["FailureCode"].write(value.failureCode) + try writer["FailureReason"].write(value.failureReason) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let failureCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureCode) - failureCode = failureCodeDecoded - let failureReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureReason) - failureReason = failureReasonDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobFailure() + value.failureCode = try reader["FailureCode"].readIfPresent() + value.failureReason = try reader["FailureReason"].readIfPresent() + return value + } } } @@ -8307,48 +7019,34 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobListDescriptor: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case creationTime = "CreationTime" - case description = "Description" - case jobId = "JobId" - case operation = "Operation" - case priority = "Priority" - case progressSummary = "ProgressSummary" - case status = "Status" - case terminationDate = "TerminationDate" - } +extension S3ControlClientTypes.JobListDescriptor { static func writingClosure(_ value: S3ControlClientTypes.JobListDescriptor?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreationTime")].writeTimestamp(value.creationTime, format: .dateTime) - try writer[.init("Description")].write(value.description) - try writer[.init("JobId")].write(value.jobId) - try writer[.init("Operation")].write(value.operation) - try writer[.init("Priority")].write(value.priority) - try writer[.init("ProgressSummary")].write(value.progressSummary, writingClosure: S3ControlClientTypes.JobProgressSummary.writingClosure(_:to:)) - try writer[.init("Status")].write(value.status) - try writer[.init("TerminationDate")].writeTimestamp(value.terminationDate, format: .dateTime) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - let descriptionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .description) - description = descriptionDecoded - let operationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.OperationName.self, forKey: .operation) - operation = operationDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) ?? 0 - priority = priorityDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobStatus.self, forKey: .status) - status = statusDecoded - let creationTimeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationTime) - creationTime = creationTimeDecoded - let terminationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .terminationDate) - terminationDate = terminationDateDecoded - let progressSummaryDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobProgressSummary.self, forKey: .progressSummary) - progressSummary = progressSummaryDecoded + try writer["CreationTime"].writeTimestamp(value.creationTime, format: .dateTime) + try writer["Description"].write(value.description) + try writer["JobId"].write(value.jobId) + try writer["Operation"].write(value.operation) + try writer["Priority"].write(value.priority) + try writer["ProgressSummary"].write(value.progressSummary, writingClosure: S3ControlClientTypes.JobProgressSummary.writingClosure(_:to:)) + try writer["Status"].write(value.status) + try writer["TerminationDate"].writeTimestamp(value.terminationDate, format: .dateTime) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobListDescriptor() + value.jobId = try reader["JobId"].readIfPresent() + value.description = try reader["Description"].readIfPresent() + value.operation = try reader["Operation"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() ?? 0 + value.status = try reader["Status"].readIfPresent() + value.creationTime = try reader["CreationTime"].readTimestampIfPresent(format: .dateTime) + value.terminationDate = try reader["TerminationDate"].readTimestampIfPresent(format: .dateTime) + value.progressSummary = try reader["ProgressSummary"].readIfPresent(readingClosure: S3ControlClientTypes.JobProgressSummary.readingClosure) + return value + } } } @@ -8396,24 +7094,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobManifest: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case location = "Location" - case spec = "Spec" - } +extension S3ControlClientTypes.JobManifest { static func writingClosure(_ value: S3ControlClientTypes.JobManifest?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Location")].write(value.location, writingClosure: S3ControlClientTypes.JobManifestLocation.writingClosure(_:to:)) - try writer[.init("Spec")].write(value.spec, writingClosure: S3ControlClientTypes.JobManifestSpec.writingClosure(_:to:)) + try writer["Location"].write(value.location, writingClosure: S3ControlClientTypes.JobManifestLocation.writingClosure(_:to:)) + try writer["Spec"].write(value.spec, writingClosure: S3ControlClientTypes.JobManifestSpec.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let specDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifestSpec.self, forKey: .spec) - spec = specDecoded - let locationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifestLocation.self, forKey: .location) - location = locationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobManifest() + value.spec = try reader["Spec"].readIfPresent(readingClosure: S3ControlClientTypes.JobManifestSpec.readingClosure) + value.location = try reader["Location"].readIfPresent(readingClosure: S3ControlClientTypes.JobManifestLocation.readingClosure) + return value + } } } @@ -8509,31 +7205,28 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.JobManifestGenerator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case s3jobmanifestgenerator = "S3JobManifestGenerator" - case sdkUnknown - } +extension S3ControlClientTypes.JobManifestGenerator { static func writingClosure(_ value: S3ControlClientTypes.JobManifestGenerator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } switch value { case let .s3jobmanifestgenerator(s3jobmanifestgenerator): - try writer[.init("S3JobManifestGenerator")].write(s3jobmanifestgenerator, writingClosure: S3ControlClientTypes.S3JobManifestGenerator.writingClosure(_:to:)) + try writer["S3JobManifestGenerator"].write(s3jobmanifestgenerator, writingClosure: S3ControlClientTypes.S3JobManifestGenerator.writingClosure(_:to:)) case let .sdkUnknown(sdkUnknown): try writer[.init("sdkUnknown")].write(sdkUnknown) } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let key = containerValues.allKeys.first - switch key { - case .s3jobmanifestgenerator: - let s3jobmanifestgeneratorDecoded = try containerValues.decode(S3ControlClientTypes.S3JobManifestGenerator.self, forKey: .s3jobmanifestgenerator) - self = .s3jobmanifestgenerator(s3jobmanifestgeneratorDecoded) - default: - self = .sdkUnknown("") + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + let name = reader.children.first?.nodeInfo.name + switch name { + case "S3JobManifestGenerator": + return .s3jobmanifestgenerator(try reader["S3JobManifestGenerator"].read(readingClosure: S3ControlClientTypes.S3JobManifestGenerator.readingClosure)) + default: + return .sdkUnknown(name ?? "") + } } } } @@ -8548,81 +7241,33 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobManifestGeneratorFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createdAfter = "CreatedAfter" - case createdBefore = "CreatedBefore" - case eligibleForReplication = "EligibleForReplication" - case keyNameConstraint = "KeyNameConstraint" - case matchAnyStorageClass = "MatchAnyStorageClass" - case objectReplicationStatuses = "ObjectReplicationStatuses" - case objectSizeGreaterThanBytes = "ObjectSizeGreaterThanBytes" - case objectSizeLessThanBytes = "ObjectSizeLessThanBytes" - } +extension S3ControlClientTypes.JobManifestGeneratorFilter { static func writingClosure(_ value: S3ControlClientTypes.JobManifestGeneratorFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CreatedAfter")].writeTimestamp(value.createdAfter, format: .dateTime) - try writer[.init("CreatedBefore")].writeTimestamp(value.createdBefore, format: .dateTime) - try writer[.init("EligibleForReplication")].write(value.eligibleForReplication) - try writer[.init("KeyNameConstraint")].write(value.keyNameConstraint, writingClosure: S3ControlClientTypes.KeyNameConstraint.writingClosure(_:to:)) - try writer[.init("MatchAnyStorageClass")].writeList(value.matchAnyStorageClass, memberWritingClosure: S3ControlClientTypes.S3StorageClass.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("ObjectReplicationStatuses")].writeList(value.objectReplicationStatuses, memberWritingClosure: S3ControlClientTypes.ReplicationStatus.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("ObjectSizeGreaterThanBytes")].write(value.objectSizeGreaterThanBytes) - try writer[.init("ObjectSizeLessThanBytes")].write(value.objectSizeLessThanBytes) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let eligibleForReplicationDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .eligibleForReplication) ?? nil - eligibleForReplication = eligibleForReplicationDecoded - let createdAfterDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAfter) - createdAfter = createdAfterDecoded - let createdBeforeDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdBefore) - createdBefore = createdBeforeDecoded - if containerValues.contains(.objectReplicationStatuses) { - struct KeyVal0{struct member{}} - let objectReplicationStatusesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .objectReplicationStatuses) - if let objectReplicationStatusesWrappedContainer = objectReplicationStatusesWrappedContainer { - let objectReplicationStatusesContainer = try objectReplicationStatusesWrappedContainer.decodeIfPresent([S3ControlClientTypes.ReplicationStatus].self, forKey: .member) - var objectReplicationStatusesBuffer:[S3ControlClientTypes.ReplicationStatus]? = nil - if let objectReplicationStatusesContainer = objectReplicationStatusesContainer { - objectReplicationStatusesBuffer = [S3ControlClientTypes.ReplicationStatus]() - for enumContainer0 in objectReplicationStatusesContainer { - objectReplicationStatusesBuffer?.append(enumContainer0) - } - } - objectReplicationStatuses = objectReplicationStatusesBuffer - } else { - objectReplicationStatuses = [] - } - } else { - objectReplicationStatuses = nil - } - let keyNameConstraintDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.KeyNameConstraint.self, forKey: .keyNameConstraint) - keyNameConstraint = keyNameConstraintDecoded - let objectSizeGreaterThanBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSizeGreaterThanBytes) ?? nil - objectSizeGreaterThanBytes = objectSizeGreaterThanBytesDecoded - let objectSizeLessThanBytesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSizeLessThanBytes) ?? nil - objectSizeLessThanBytes = objectSizeLessThanBytesDecoded - if containerValues.contains(.matchAnyStorageClass) { - struct KeyVal0{struct member{}} - let matchAnyStorageClassWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnyStorageClass) - if let matchAnyStorageClassWrappedContainer = matchAnyStorageClassWrappedContainer { - let matchAnyStorageClassContainer = try matchAnyStorageClassWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3StorageClass].self, forKey: .member) - var matchAnyStorageClassBuffer:[S3ControlClientTypes.S3StorageClass]? = nil - if let matchAnyStorageClassContainer = matchAnyStorageClassContainer { - matchAnyStorageClassBuffer = [S3ControlClientTypes.S3StorageClass]() - for enumContainer0 in matchAnyStorageClassContainer { - matchAnyStorageClassBuffer?.append(enumContainer0) - } - } - matchAnyStorageClass = matchAnyStorageClassBuffer - } else { - matchAnyStorageClass = [] - } - } else { - matchAnyStorageClass = nil + try writer["CreatedAfter"].writeTimestamp(value.createdAfter, format: .dateTime) + try writer["CreatedBefore"].writeTimestamp(value.createdBefore, format: .dateTime) + try writer["EligibleForReplication"].write(value.eligibleForReplication) + try writer["KeyNameConstraint"].write(value.keyNameConstraint, writingClosure: S3ControlClientTypes.KeyNameConstraint.writingClosure(_:to:)) + try writer["MatchAnyStorageClass"].writeList(value.matchAnyStorageClass, memberWritingClosure: S3ControlClientTypes.S3StorageClass.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["ObjectReplicationStatuses"].writeList(value.objectReplicationStatuses, memberWritingClosure: S3ControlClientTypes.ReplicationStatus.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["ObjectSizeGreaterThanBytes"].write(value.objectSizeGreaterThanBytes) + try writer["ObjectSizeLessThanBytes"].write(value.objectSizeLessThanBytes) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobManifestGeneratorFilter() + value.eligibleForReplication = try reader["EligibleForReplication"].readIfPresent() + value.createdAfter = try reader["CreatedAfter"].readTimestampIfPresent(format: .dateTime) + value.createdBefore = try reader["CreatedBefore"].readTimestampIfPresent(format: .dateTime) + value.objectReplicationStatuses = try reader["ObjectReplicationStatuses"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ReplicationStatus.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.keyNameConstraint = try reader["KeyNameConstraint"].readIfPresent(readingClosure: S3ControlClientTypes.KeyNameConstraint.readingClosure) + value.objectSizeGreaterThanBytes = try reader["ObjectSizeGreaterThanBytes"].readIfPresent() + value.objectSizeLessThanBytes = try reader["ObjectSizeLessThanBytes"].readIfPresent() + value.matchAnyStorageClass = try reader["MatchAnyStorageClass"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3StorageClass.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8671,28 +7316,24 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobManifestLocation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eTag = "ETag" - case objectArn = "ObjectArn" - case objectVersionId = "ObjectVersionId" - } +extension S3ControlClientTypes.JobManifestLocation { static func writingClosure(_ value: S3ControlClientTypes.JobManifestLocation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ETag")].write(value.eTag) - try writer[.init("ObjectArn")].write(value.objectArn) - try writer[.init("ObjectVersionId")].write(value.objectVersionId) + try writer["ETag"].write(value.eTag) + try writer["ObjectArn"].write(value.objectArn) + try writer["ObjectVersionId"].write(value.objectVersionId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let objectArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .objectArn) - objectArn = objectArnDecoded - let objectVersionIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .objectVersionId) - objectVersionId = objectVersionIdDecoded - let eTagDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eTag) - eTag = eTagDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobManifestLocation() + value.objectArn = try reader["ObjectArn"].readIfPresent() + value.objectVersionId = try reader["ObjectVersionId"].readIfPresent() + value.eTag = try reader["ETag"].readIfPresent() + return value + } } } @@ -8722,40 +7363,21 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobManifestSpec: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fields = "Fields" - case format = "Format" - } +extension S3ControlClientTypes.JobManifestSpec { static func writingClosure(_ value: S3ControlClientTypes.JobManifestSpec?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Fields")].writeList(value.fields, memberWritingClosure: S3ControlClientTypes.JobManifestFieldName.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("Format")].write(value.format) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let formatDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifestFormat.self, forKey: .format) - format = formatDecoded - if containerValues.contains(.fields) { - struct KeyVal0{struct member{}} - let fieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .fields) - if let fieldsWrappedContainer = fieldsWrappedContainer { - let fieldsContainer = try fieldsWrappedContainer.decodeIfPresent([S3ControlClientTypes.JobManifestFieldName].self, forKey: .member) - var fieldsBuffer:[S3ControlClientTypes.JobManifestFieldName]? = nil - if let fieldsContainer = fieldsContainer { - fieldsBuffer = [S3ControlClientTypes.JobManifestFieldName]() - for enumContainer0 in fieldsContainer { - fieldsBuffer?.append(enumContainer0) - } - } - fields = fieldsBuffer - } else { - fields = [] - } - } else { - fields = nil + try writer["Fields"].writeList(value.fields, memberWritingClosure: S3ControlClientTypes.JobManifestFieldName.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["Format"].write(value.format) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobManifestSpec() + value.format = try reader["Format"].readIfPresent() + value.fields = try reader["Fields"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.JobManifestFieldName.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8781,52 +7403,36 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case lambdaInvoke = "LambdaInvoke" - case s3DeleteObjectTagging = "S3DeleteObjectTagging" - case s3InitiateRestoreObject = "S3InitiateRestoreObject" - case s3PutObjectAcl = "S3PutObjectAcl" - case s3PutObjectCopy = "S3PutObjectCopy" - case s3PutObjectLegalHold = "S3PutObjectLegalHold" - case s3PutObjectRetention = "S3PutObjectRetention" - case s3PutObjectTagging = "S3PutObjectTagging" - case s3ReplicateObject = "S3ReplicateObject" - } +extension S3ControlClientTypes.JobOperation { static func writingClosure(_ value: S3ControlClientTypes.JobOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("LambdaInvoke")].write(value.lambdaInvoke, writingClosure: S3ControlClientTypes.LambdaInvokeOperation.writingClosure(_:to:)) - try writer[.init("S3DeleteObjectTagging")].write(value.s3DeleteObjectTagging, writingClosure: S3ControlClientTypes.S3DeleteObjectTaggingOperation.writingClosure(_:to:)) - try writer[.init("S3InitiateRestoreObject")].write(value.s3InitiateRestoreObject, writingClosure: S3ControlClientTypes.S3InitiateRestoreObjectOperation.writingClosure(_:to:)) - try writer[.init("S3PutObjectAcl")].write(value.s3PutObjectAcl, writingClosure: S3ControlClientTypes.S3SetObjectAclOperation.writingClosure(_:to:)) - try writer[.init("S3PutObjectCopy")].write(value.s3PutObjectCopy, writingClosure: S3ControlClientTypes.S3CopyObjectOperation.writingClosure(_:to:)) - try writer[.init("S3PutObjectLegalHold")].write(value.s3PutObjectLegalHold, writingClosure: S3ControlClientTypes.S3SetObjectLegalHoldOperation.writingClosure(_:to:)) - try writer[.init("S3PutObjectRetention")].write(value.s3PutObjectRetention, writingClosure: S3ControlClientTypes.S3SetObjectRetentionOperation.writingClosure(_:to:)) - try writer[.init("S3PutObjectTagging")].write(value.s3PutObjectTagging, writingClosure: S3ControlClientTypes.S3SetObjectTaggingOperation.writingClosure(_:to:)) - try writer[.init("S3ReplicateObject")].write(value.s3ReplicateObject, writingClosure: S3ControlClientTypes.S3ReplicateObjectOperation.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lambdaInvokeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.LambdaInvokeOperation.self, forKey: .lambdaInvoke) - lambdaInvoke = lambdaInvokeDecoded - let s3PutObjectCopyDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3CopyObjectOperation.self, forKey: .s3PutObjectCopy) - s3PutObjectCopy = s3PutObjectCopyDecoded - let s3PutObjectAclDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3SetObjectAclOperation.self, forKey: .s3PutObjectAcl) - s3PutObjectAcl = s3PutObjectAclDecoded - let s3PutObjectTaggingDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3SetObjectTaggingOperation.self, forKey: .s3PutObjectTagging) - s3PutObjectTagging = s3PutObjectTaggingDecoded - let s3DeleteObjectTaggingDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3DeleteObjectTaggingOperation.self, forKey: .s3DeleteObjectTagging) - s3DeleteObjectTagging = s3DeleteObjectTaggingDecoded - let s3InitiateRestoreObjectDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3InitiateRestoreObjectOperation.self, forKey: .s3InitiateRestoreObject) - s3InitiateRestoreObject = s3InitiateRestoreObjectDecoded - let s3PutObjectLegalHoldDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3SetObjectLegalHoldOperation.self, forKey: .s3PutObjectLegalHold) - s3PutObjectLegalHold = s3PutObjectLegalHoldDecoded - let s3PutObjectRetentionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3SetObjectRetentionOperation.self, forKey: .s3PutObjectRetention) - s3PutObjectRetention = s3PutObjectRetentionDecoded - let s3ReplicateObjectDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ReplicateObjectOperation.self, forKey: .s3ReplicateObject) - s3ReplicateObject = s3ReplicateObjectDecoded + try writer["LambdaInvoke"].write(value.lambdaInvoke, writingClosure: S3ControlClientTypes.LambdaInvokeOperation.writingClosure(_:to:)) + try writer["S3DeleteObjectTagging"].write(value.s3DeleteObjectTagging, writingClosure: S3ControlClientTypes.S3DeleteObjectTaggingOperation.writingClosure(_:to:)) + try writer["S3InitiateRestoreObject"].write(value.s3InitiateRestoreObject, writingClosure: S3ControlClientTypes.S3InitiateRestoreObjectOperation.writingClosure(_:to:)) + try writer["S3PutObjectAcl"].write(value.s3PutObjectAcl, writingClosure: S3ControlClientTypes.S3SetObjectAclOperation.writingClosure(_:to:)) + try writer["S3PutObjectCopy"].write(value.s3PutObjectCopy, writingClosure: S3ControlClientTypes.S3CopyObjectOperation.writingClosure(_:to:)) + try writer["S3PutObjectLegalHold"].write(value.s3PutObjectLegalHold, writingClosure: S3ControlClientTypes.S3SetObjectLegalHoldOperation.writingClosure(_:to:)) + try writer["S3PutObjectRetention"].write(value.s3PutObjectRetention, writingClosure: S3ControlClientTypes.S3SetObjectRetentionOperation.writingClosure(_:to:)) + try writer["S3PutObjectTagging"].write(value.s3PutObjectTagging, writingClosure: S3ControlClientTypes.S3SetObjectTaggingOperation.writingClosure(_:to:)) + try writer["S3ReplicateObject"].write(value.s3ReplicateObject, writingClosure: S3ControlClientTypes.S3ReplicateObjectOperation.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobOperation() + value.lambdaInvoke = try reader["LambdaInvoke"].readIfPresent(readingClosure: S3ControlClientTypes.LambdaInvokeOperation.readingClosure) + value.s3PutObjectCopy = try reader["S3PutObjectCopy"].readIfPresent(readingClosure: S3ControlClientTypes.S3CopyObjectOperation.readingClosure) + value.s3PutObjectAcl = try reader["S3PutObjectAcl"].readIfPresent(readingClosure: S3ControlClientTypes.S3SetObjectAclOperation.readingClosure) + value.s3PutObjectTagging = try reader["S3PutObjectTagging"].readIfPresent(readingClosure: S3ControlClientTypes.S3SetObjectTaggingOperation.readingClosure) + value.s3DeleteObjectTagging = try reader["S3DeleteObjectTagging"].readIfPresent(readingClosure: S3ControlClientTypes.S3DeleteObjectTaggingOperation.readingClosure) + value.s3InitiateRestoreObject = try reader["S3InitiateRestoreObject"].readIfPresent(readingClosure: S3ControlClientTypes.S3InitiateRestoreObjectOperation.readingClosure) + value.s3PutObjectLegalHold = try reader["S3PutObjectLegalHold"].readIfPresent(readingClosure: S3ControlClientTypes.S3SetObjectLegalHoldOperation.readingClosure) + value.s3PutObjectRetention = try reader["S3PutObjectRetention"].readIfPresent(readingClosure: S3ControlClientTypes.S3SetObjectRetentionOperation.readingClosure) + value.s3ReplicateObject = try reader["S3ReplicateObject"].readIfPresent(readingClosure: S3ControlClientTypes.S3ReplicateObjectOperation.readingClosure) + return value + } } } @@ -8878,32 +7484,26 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobProgressSummary: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case numberOfTasksFailed = "NumberOfTasksFailed" - case numberOfTasksSucceeded = "NumberOfTasksSucceeded" - case timers = "Timers" - case totalNumberOfTasks = "TotalNumberOfTasks" - } +extension S3ControlClientTypes.JobProgressSummary { static func writingClosure(_ value: S3ControlClientTypes.JobProgressSummary?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("NumberOfTasksFailed")].write(value.numberOfTasksFailed) - try writer[.init("NumberOfTasksSucceeded")].write(value.numberOfTasksSucceeded) - try writer[.init("Timers")].write(value.timers, writingClosure: S3ControlClientTypes.JobTimers.writingClosure(_:to:)) - try writer[.init("TotalNumberOfTasks")].write(value.totalNumberOfTasks) + try writer["NumberOfTasksFailed"].write(value.numberOfTasksFailed) + try writer["NumberOfTasksSucceeded"].write(value.numberOfTasksSucceeded) + try writer["Timers"].write(value.timers, writingClosure: S3ControlClientTypes.JobTimers.writingClosure(_:to:)) + try writer["TotalNumberOfTasks"].write(value.totalNumberOfTasks) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let totalNumberOfTasksDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .totalNumberOfTasks) ?? nil - totalNumberOfTasks = totalNumberOfTasksDecoded - let numberOfTasksSucceededDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfTasksSucceeded) ?? nil - numberOfTasksSucceeded = numberOfTasksSucceededDecoded - let numberOfTasksFailedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .numberOfTasksFailed) ?? nil - numberOfTasksFailed = numberOfTasksFailedDecoded - let timersDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobTimers.self, forKey: .timers) - timers = timersDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobProgressSummary() + value.totalNumberOfTasks = try reader["TotalNumberOfTasks"].readIfPresent() + value.numberOfTasksSucceeded = try reader["NumberOfTasksSucceeded"].readIfPresent() + value.numberOfTasksFailed = try reader["NumberOfTasksFailed"].readIfPresent() + value.timers = try reader["Timers"].readIfPresent(readingClosure: S3ControlClientTypes.JobTimers.readingClosure) + return value + } } } @@ -8935,36 +7535,28 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.JobReport: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case enabled = "Enabled" - case format = "Format" - case `prefix` = "Prefix" - case reportScope = "ReportScope" - } +extension S3ControlClientTypes.JobReport { static func writingClosure(_ value: S3ControlClientTypes.JobReport?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("Enabled")].write(value.enabled) - try writer[.init("Format")].write(value.format) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("ReportScope")].write(value.reportScope) + try writer["Bucket"].write(value.bucket) + try writer["Enabled"].write(value.enabled) + try writer["Format"].write(value.format) + try writer["Prefix"].write(value.`prefix`) + try writer["ReportScope"].write(value.reportScope) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let formatDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobReportFormat.self, forKey: .format) - format = formatDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let reportScopeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobReportScope.self, forKey: .reportScope) - reportScope = reportScopeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobReport() + value.bucket = try reader["Bucket"].readIfPresent() + value.format = try reader["Format"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() ?? false + value.`prefix` = try reader["Prefix"].readIfPresent() + value.reportScope = try reader["ReportScope"].readIfPresent() + return value + } } } @@ -9128,16 +7720,26 @@ extension S3ControlClientTypes { } extension JobStatusException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = JobStatusException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension JobStatusException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = JobStatusException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9165,36 +7767,20 @@ public struct JobStatusException: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct JobStatusExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension JobStatusExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension S3ControlClientTypes.JobTimers: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case elapsedTimeInActiveSeconds = "ElapsedTimeInActiveSeconds" - } +extension S3ControlClientTypes.JobTimers { static func writingClosure(_ value: S3ControlClientTypes.JobTimers?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ElapsedTimeInActiveSeconds")].write(value.elapsedTimeInActiveSeconds) + try writer["ElapsedTimeInActiveSeconds"].write(value.elapsedTimeInActiveSeconds) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let elapsedTimeInActiveSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .elapsedTimeInActiveSeconds) ?? nil - elapsedTimeInActiveSeconds = elapsedTimeInActiveSecondsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.JobTimers() + value.elapsedTimeInActiveSeconds = try reader["ElapsedTimeInActiveSeconds"].readIfPresent() + return value + } } } @@ -9214,78 +7800,23 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.KeyNameConstraint: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case matchAnyPrefix = "MatchAnyPrefix" - case matchAnySubstring = "MatchAnySubstring" - case matchAnySuffix = "MatchAnySuffix" - } +extension S3ControlClientTypes.KeyNameConstraint { static func writingClosure(_ value: S3ControlClientTypes.KeyNameConstraint?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("MatchAnyPrefix")].writeList(value.matchAnyPrefix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("MatchAnySubstring")].writeList(value.matchAnySubstring, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("MatchAnySuffix")].writeList(value.matchAnySuffix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.matchAnyPrefix) { - struct KeyVal0{struct member{}} - let matchAnyPrefixWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnyPrefix) - if let matchAnyPrefixWrappedContainer = matchAnyPrefixWrappedContainer { - let matchAnyPrefixContainer = try matchAnyPrefixWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnyPrefixBuffer:[Swift.String]? = nil - if let matchAnyPrefixContainer = matchAnyPrefixContainer { - matchAnyPrefixBuffer = [Swift.String]() - for stringContainer0 in matchAnyPrefixContainer { - matchAnyPrefixBuffer?.append(stringContainer0) - } - } - matchAnyPrefix = matchAnyPrefixBuffer - } else { - matchAnyPrefix = [] - } - } else { - matchAnyPrefix = nil - } - if containerValues.contains(.matchAnySuffix) { - struct KeyVal0{struct member{}} - let matchAnySuffixWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnySuffix) - if let matchAnySuffixWrappedContainer = matchAnySuffixWrappedContainer { - let matchAnySuffixContainer = try matchAnySuffixWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnySuffixBuffer:[Swift.String]? = nil - if let matchAnySuffixContainer = matchAnySuffixContainer { - matchAnySuffixBuffer = [Swift.String]() - for stringContainer0 in matchAnySuffixContainer { - matchAnySuffixBuffer?.append(stringContainer0) - } - } - matchAnySuffix = matchAnySuffixBuffer - } else { - matchAnySuffix = [] - } - } else { - matchAnySuffix = nil - } - if containerValues.contains(.matchAnySubstring) { - struct KeyVal0{struct member{}} - let matchAnySubstringWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnySubstring) - if let matchAnySubstringWrappedContainer = matchAnySubstringWrappedContainer { - let matchAnySubstringContainer = try matchAnySubstringWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnySubstringBuffer:[Swift.String]? = nil - if let matchAnySubstringContainer = matchAnySubstringContainer { - matchAnySubstringBuffer = [Swift.String]() - for stringContainer0 in matchAnySubstringContainer { - matchAnySubstringBuffer?.append(stringContainer0) - } - } - matchAnySubstring = matchAnySubstringBuffer - } else { - matchAnySubstring = [] - } - } else { - matchAnySubstring = nil + try writer["MatchAnyPrefix"].writeList(value.matchAnyPrefix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["MatchAnySubstring"].writeList(value.matchAnySubstring, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["MatchAnySuffix"].writeList(value.matchAnySuffix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.KeyNameConstraint() + value.matchAnyPrefix = try reader["MatchAnyPrefix"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.matchAnySuffix = try reader["MatchAnySuffix"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.matchAnySubstring = try reader["MatchAnySubstring"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9314,44 +7845,23 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.LambdaInvokeOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionArn = "FunctionArn" - case invocationSchemaVersion = "InvocationSchemaVersion" - case userArguments = "UserArguments" - } +extension S3ControlClientTypes.LambdaInvokeOperation { static func writingClosure(_ value: S3ControlClientTypes.LambdaInvokeOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("FunctionArn")].write(value.functionArn) - try writer[.init("InvocationSchemaVersion")].write(value.invocationSchemaVersion) - try writer[.init("UserArguments")].writeMap(value.userArguments, valueWritingClosure: Swift.String.writingClosure(_:to:), keyNodeInfo: .init("key"), valueNodeInfo: .init("value"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionArn) - functionArn = functionArnDecoded - let invocationSchemaVersionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .invocationSchemaVersion) - invocationSchemaVersion = invocationSchemaVersionDecoded - if containerValues.contains(.userArguments) { - struct KeyVal0{struct key{}; struct value{}} - let userArgumentsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .userArguments) - if let userArgumentsWrappedContainer = userArgumentsWrappedContainer { - let userArgumentsContainer = try userArgumentsWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var userArgumentsBuffer: [Swift.String:Swift.String]? = nil - if let userArgumentsContainer = userArgumentsContainer { - userArgumentsBuffer = [Swift.String:Swift.String]() - for stringContainer0 in userArgumentsContainer { - userArgumentsBuffer?[stringContainer0.key] = stringContainer0.value - } - } - userArguments = userArgumentsBuffer - } else { - userArguments = [:] - } - } else { - userArguments = nil + try writer["FunctionArn"].write(value.functionArn) + try writer["InvocationSchemaVersion"].write(value.invocationSchemaVersion) + try writer["UserArguments"].writeMap(value.userArguments, valueWritingClosure: Swift.String.writingClosure(_:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.LambdaInvokeOperation() + value.functionArn = try reader["FunctionArn"].readIfPresent() + value.invocationSchemaVersion = try reader["InvocationSchemaVersion"].readIfPresent() + value.userArguments = try reader["UserArguments"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -9380,36 +7890,19 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.LifecycleConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rules = "Rules" - } +extension S3ControlClientTypes.LifecycleConfiguration { static func writingClosure(_ value: S3ControlClientTypes.LifecycleConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Rules")].writeList(value.rules, memberWritingClosure: S3ControlClientTypes.LifecycleRule.writingClosure(_:to:), memberNodeInfo: .init("Rule"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.rules) { - struct KeyVal0{struct Rule{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([S3ControlClientTypes.LifecycleRule].self, forKey: .member) - var rulesBuffer:[S3ControlClientTypes.LifecycleRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [S3ControlClientTypes.LifecycleRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] - } - } else { - rules = nil + try writer["Rules"].writeList(value.rules, memberWritingClosure: S3ControlClientTypes.LifecycleRule.writingClosure(_:to:), memberNodeInfo: "Rule", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.LifecycleConfiguration() + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.LifecycleRule.readingClosure, memberNodeInfo: "Rule", isFlattened: false) + return value } } } @@ -9430,28 +7923,24 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.LifecycleExpiration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case date = "Date" - case days = "Days" - case expiredObjectDeleteMarker = "ExpiredObjectDeleteMarker" - } +extension S3ControlClientTypes.LifecycleExpiration { static func writingClosure(_ value: S3ControlClientTypes.LifecycleExpiration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Date")].writeTimestamp(value.date, format: .dateTime) - try writer[.init("Days")].write(value.days) - try writer[.init("ExpiredObjectDeleteMarker")].write(value.expiredObjectDeleteMarker) + try writer["Date"].writeTimestamp(value.date, format: .dateTime) + try writer["Days"].write(value.days) + try writer["ExpiredObjectDeleteMarker"].write(value.expiredObjectDeleteMarker) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded - let daysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .days) ?? 0 - days = daysDecoded - let expiredObjectDeleteMarkerDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .expiredObjectDeleteMarker) ?? false - expiredObjectDeleteMarker = expiredObjectDeleteMarkerDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.LifecycleExpiration() + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + value.days = try reader["Days"].readIfPresent() ?? 0 + value.expiredObjectDeleteMarker = try reader["ExpiredObjectDeleteMarker"].readIfPresent() ?? false + return value + } } } @@ -9479,82 +7968,34 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.LifecycleRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case abortIncompleteMultipartUpload = "AbortIncompleteMultipartUpload" - case expiration = "Expiration" - case filter = "Filter" - case id = "ID" - case noncurrentVersionExpiration = "NoncurrentVersionExpiration" - case noncurrentVersionTransitions = "NoncurrentVersionTransitions" - case status = "Status" - case transitions = "Transitions" - } +extension S3ControlClientTypes.LifecycleRule { static func writingClosure(_ value: S3ControlClientTypes.LifecycleRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AbortIncompleteMultipartUpload")].write(value.abortIncompleteMultipartUpload, writingClosure: S3ControlClientTypes.AbortIncompleteMultipartUpload.writingClosure(_:to:)) - try writer[.init("Expiration")].write(value.expiration, writingClosure: S3ControlClientTypes.LifecycleExpiration.writingClosure(_:to:)) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ControlClientTypes.LifecycleRuleFilter.writingClosure(_:to:)) - try writer[.init("ID")].write(value.id) - try writer[.init("NoncurrentVersionExpiration")].write(value.noncurrentVersionExpiration, writingClosure: S3ControlClientTypes.NoncurrentVersionExpiration.writingClosure(_:to:)) - try writer[.init("NoncurrentVersionTransitions")].writeList(value.noncurrentVersionTransitions, memberWritingClosure: S3ControlClientTypes.NoncurrentVersionTransition.writingClosure(_:to:), memberNodeInfo: .init("NoncurrentVersionTransition"), isFlattened: false) - try writer[.init("Status")].write(value.status) - try writer[.init("Transitions")].writeList(value.transitions, memberWritingClosure: S3ControlClientTypes.Transition.writingClosure(_:to:), memberNodeInfo: .init("Transition"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let expirationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.LifecycleExpiration.self, forKey: .expiration) - expiration = expirationDecoded - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.LifecycleRuleFilter.self, forKey: .filter) - filter = filterDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ExpirationStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.transitions) { - struct KeyVal0{struct Transition{}} - let transitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitions) - if let transitionsWrappedContainer = transitionsWrappedContainer { - let transitionsContainer = try transitionsWrappedContainer.decodeIfPresent([S3ControlClientTypes.Transition].self, forKey: .member) - var transitionsBuffer:[S3ControlClientTypes.Transition]? = nil - if let transitionsContainer = transitionsContainer { - transitionsBuffer = [S3ControlClientTypes.Transition]() - for structureContainer0 in transitionsContainer { - transitionsBuffer?.append(structureContainer0) - } - } - transitions = transitionsBuffer - } else { - transitions = [] - } - } else { - transitions = nil - } - if containerValues.contains(.noncurrentVersionTransitions) { - struct KeyVal0{struct NoncurrentVersionTransition{}} - let noncurrentVersionTransitionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .noncurrentVersionTransitions) - if let noncurrentVersionTransitionsWrappedContainer = noncurrentVersionTransitionsWrappedContainer { - let noncurrentVersionTransitionsContainer = try noncurrentVersionTransitionsWrappedContainer.decodeIfPresent([S3ControlClientTypes.NoncurrentVersionTransition].self, forKey: .member) - var noncurrentVersionTransitionsBuffer:[S3ControlClientTypes.NoncurrentVersionTransition]? = nil - if let noncurrentVersionTransitionsContainer = noncurrentVersionTransitionsContainer { - noncurrentVersionTransitionsBuffer = [S3ControlClientTypes.NoncurrentVersionTransition]() - for structureContainer0 in noncurrentVersionTransitionsContainer { - noncurrentVersionTransitionsBuffer?.append(structureContainer0) - } - } - noncurrentVersionTransitions = noncurrentVersionTransitionsBuffer - } else { - noncurrentVersionTransitions = [] - } - } else { - noncurrentVersionTransitions = nil + try writer["AbortIncompleteMultipartUpload"].write(value.abortIncompleteMultipartUpload, writingClosure: S3ControlClientTypes.AbortIncompleteMultipartUpload.writingClosure(_:to:)) + try writer["Expiration"].write(value.expiration, writingClosure: S3ControlClientTypes.LifecycleExpiration.writingClosure(_:to:)) + try writer["Filter"].write(value.filter, writingClosure: S3ControlClientTypes.LifecycleRuleFilter.writingClosure(_:to:)) + try writer["ID"].write(value.id) + try writer["NoncurrentVersionExpiration"].write(value.noncurrentVersionExpiration, writingClosure: S3ControlClientTypes.NoncurrentVersionExpiration.writingClosure(_:to:)) + try writer["NoncurrentVersionTransitions"].writeList(value.noncurrentVersionTransitions, memberWritingClosure: S3ControlClientTypes.NoncurrentVersionTransition.writingClosure(_:to:), memberNodeInfo: "NoncurrentVersionTransition", isFlattened: false) + try writer["Status"].write(value.status) + try writer["Transitions"].writeList(value.transitions, memberWritingClosure: S3ControlClientTypes.Transition.writingClosure(_:to:), memberNodeInfo: "Transition", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.LifecycleRule() + value.expiration = try reader["Expiration"].readIfPresent(readingClosure: S3ControlClientTypes.LifecycleExpiration.readingClosure) + value.id = try reader["ID"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ControlClientTypes.LifecycleRuleFilter.readingClosure) + value.status = try reader["Status"].readIfPresent() + value.transitions = try reader["Transitions"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.Transition.readingClosure, memberNodeInfo: "Transition", isFlattened: false) + value.noncurrentVersionTransitions = try reader["NoncurrentVersionTransitions"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.NoncurrentVersionTransition.readingClosure, memberNodeInfo: "NoncurrentVersionTransition", isFlattened: false) + value.noncurrentVersionExpiration = try reader["NoncurrentVersionExpiration"].readIfPresent(readingClosure: S3ControlClientTypes.NoncurrentVersionExpiration.readingClosure) + value.abortIncompleteMultipartUpload = try reader["AbortIncompleteMultipartUpload"].readIfPresent(readingClosure: S3ControlClientTypes.AbortIncompleteMultipartUpload.readingClosure) + return value } - let noncurrentVersionExpirationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.NoncurrentVersionExpiration.self, forKey: .noncurrentVersionExpiration) - noncurrentVersionExpiration = noncurrentVersionExpirationDecoded - let abortIncompleteMultipartUploadDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AbortIncompleteMultipartUpload.self, forKey: .abortIncompleteMultipartUpload) - abortIncompleteMultipartUpload = abortIncompleteMultipartUploadDecoded } } @@ -9603,49 +8044,26 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.LifecycleRuleAndOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case objectSizeGreaterThan = "ObjectSizeGreaterThan" - case objectSizeLessThan = "ObjectSizeLessThan" - case `prefix` = "Prefix" - case tags = "Tags" - } +extension S3ControlClientTypes.LifecycleRuleAndOperator { static func writingClosure(_ value: S3ControlClientTypes.LifecycleRuleAndOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ObjectSizeGreaterThan")].write(value.objectSizeGreaterThan) - try writer[.init("ObjectSizeLessThan")].write(value.objectSizeLessThan) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + try writer["ObjectSizeGreaterThan"].write(value.objectSizeGreaterThan) + try writer["ObjectSizeLessThan"].write(value.objectSizeLessThan) + try writer["Prefix"].write(value.`prefix`) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.LifecycleRuleAndOperator() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.objectSizeGreaterThan = try reader["ObjectSizeGreaterThan"].readIfPresent() + value.objectSizeLessThan = try reader["ObjectSizeLessThan"].readIfPresent() + return value } - let objectSizeGreaterThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSizeGreaterThan) ?? nil - objectSizeGreaterThan = objectSizeGreaterThanDecoded - let objectSizeLessThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSizeLessThan) ?? nil - objectSizeLessThan = objectSizeLessThanDecoded } } @@ -9677,36 +8095,28 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.LifecycleRuleFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case and = "And" - case objectSizeGreaterThan = "ObjectSizeGreaterThan" - case objectSizeLessThan = "ObjectSizeLessThan" - case `prefix` = "Prefix" - case tag = "Tag" - } +extension S3ControlClientTypes.LifecycleRuleFilter { static func writingClosure(_ value: S3ControlClientTypes.LifecycleRuleFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("And")].write(value.and, writingClosure: S3ControlClientTypes.LifecycleRuleAndOperator.writingClosure(_:to:)) - try writer[.init("ObjectSizeGreaterThan")].write(value.objectSizeGreaterThan) - try writer[.init("ObjectSizeLessThan")].write(value.objectSizeLessThan) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tag")].write(value.tag, writingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:)) + try writer["And"].write(value.and, writingClosure: S3ControlClientTypes.LifecycleRuleAndOperator.writingClosure(_:to:)) + try writer["ObjectSizeGreaterThan"].write(value.objectSizeGreaterThan) + try writer["ObjectSizeLessThan"].write(value.objectSizeLessThan) + try writer["Prefix"].write(value.`prefix`) + try writer["Tag"].write(value.tag, writingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let tagDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3Tag.self, forKey: .tag) - tag = tagDecoded - let andDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.LifecycleRuleAndOperator.self, forKey: .and) - and = andDecoded - let objectSizeGreaterThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSizeGreaterThan) ?? nil - objectSizeGreaterThan = objectSizeGreaterThanDecoded - let objectSizeLessThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .objectSizeLessThan) ?? nil - objectSizeLessThan = objectSizeLessThanDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.LifecycleRuleFilter() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tag = try reader["Tag"].readIfPresent(readingClosure: S3ControlClientTypes.S3Tag.readingClosure) + value.and = try reader["And"].readIfPresent(readingClosure: S3ControlClientTypes.LifecycleRuleAndOperator.readingClosure) + value.objectSizeGreaterThan = try reader["ObjectSizeGreaterThan"].readIfPresent() + value.objectSizeLessThan = try reader["ObjectSizeLessThan"].readIfPresent() + return value + } } } @@ -9742,52 +8152,36 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ListAccessGrantEntry: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantArn = "AccessGrantArn" - case accessGrantId = "AccessGrantId" - case accessGrantsLocationConfiguration = "AccessGrantsLocationConfiguration" - case accessGrantsLocationId = "AccessGrantsLocationId" - case applicationArn = "ApplicationArn" - case createdAt = "CreatedAt" - case grantScope = "GrantScope" - case grantee = "Grantee" - case permission = "Permission" - } +extension S3ControlClientTypes.ListAccessGrantEntry { static func writingClosure(_ value: S3ControlClientTypes.ListAccessGrantEntry?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessGrantArn")].write(value.accessGrantArn) - try writer[.init("AccessGrantId")].write(value.accessGrantId) - try writer[.init("AccessGrantsLocationConfiguration")].write(value.accessGrantsLocationConfiguration, writingClosure: S3ControlClientTypes.AccessGrantsLocationConfiguration.writingClosure(_:to:)) - try writer[.init("AccessGrantsLocationId")].write(value.accessGrantsLocationId) - try writer[.init("ApplicationArn")].write(value.applicationArn) - try writer[.init("CreatedAt")].writeTimestamp(value.createdAt, format: .dateTime) - try writer[.init("GrantScope")].write(value.grantScope) - try writer[.init("Grantee")].write(value.grantee, writingClosure: S3ControlClientTypes.Grantee.writingClosure(_:to:)) - try writer[.init("Permission")].write(value.permission) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let accessGrantIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantId) - accessGrantId = accessGrantIdDecoded - let accessGrantArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantArn) - accessGrantArn = accessGrantArnDecoded - let granteeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Grantee.self, forKey: .grantee) - grantee = granteeDecoded - let permissionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Permission.self, forKey: .permission) - permission = permissionDecoded - let accessGrantsLocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationId) - accessGrantsLocationId = accessGrantsLocationIdDecoded - let accessGrantsLocationConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AccessGrantsLocationConfiguration.self, forKey: .accessGrantsLocationConfiguration) - accessGrantsLocationConfiguration = accessGrantsLocationConfigurationDecoded - let grantScopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .grantScope) - grantScope = grantScopeDecoded - let applicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .applicationArn) - applicationArn = applicationArnDecoded + try writer["AccessGrantArn"].write(value.accessGrantArn) + try writer["AccessGrantId"].write(value.accessGrantId) + try writer["AccessGrantsLocationConfiguration"].write(value.accessGrantsLocationConfiguration, writingClosure: S3ControlClientTypes.AccessGrantsLocationConfiguration.writingClosure(_:to:)) + try writer["AccessGrantsLocationId"].write(value.accessGrantsLocationId) + try writer["ApplicationArn"].write(value.applicationArn) + try writer["CreatedAt"].writeTimestamp(value.createdAt, format: .dateTime) + try writer["GrantScope"].write(value.grantScope) + try writer["Grantee"].write(value.grantee, writingClosure: S3ControlClientTypes.Grantee.writingClosure(_:to:)) + try writer["Permission"].write(value.permission) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ListAccessGrantEntry() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.accessGrantId = try reader["AccessGrantId"].readIfPresent() + value.accessGrantArn = try reader["AccessGrantArn"].readIfPresent() + value.grantee = try reader["Grantee"].readIfPresent(readingClosure: S3ControlClientTypes.Grantee.readingClosure) + value.permission = try reader["Permission"].readIfPresent() + value.accessGrantsLocationId = try reader["AccessGrantsLocationId"].readIfPresent() + value.accessGrantsLocationConfiguration = try reader["AccessGrantsLocationConfiguration"].readIfPresent(readingClosure: S3ControlClientTypes.AccessGrantsLocationConfiguration.readingClosure) + value.grantScope = try reader["GrantScope"].readIfPresent() + value.applicationArn = try reader["ApplicationArn"].readIfPresent() + return value + } } } @@ -9952,32 +8346,26 @@ public struct ListAccessGrantsInput: Swift.Equatable { } } -extension S3ControlClientTypes.ListAccessGrantsInstanceEntry: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsInstanceArn = "AccessGrantsInstanceArn" - case accessGrantsInstanceId = "AccessGrantsInstanceId" - case createdAt = "CreatedAt" - case identityCenterArn = "IdentityCenterArn" - } +extension S3ControlClientTypes.ListAccessGrantsInstanceEntry { static func writingClosure(_ value: S3ControlClientTypes.ListAccessGrantsInstanceEntry?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessGrantsInstanceArn")].write(value.accessGrantsInstanceArn) - try writer[.init("AccessGrantsInstanceId")].write(value.accessGrantsInstanceId) - try writer[.init("CreatedAt")].writeTimestamp(value.createdAt, format: .dateTime) - try writer[.init("IdentityCenterArn")].write(value.identityCenterArn) + try writer["AccessGrantsInstanceArn"].write(value.accessGrantsInstanceArn) + try writer["AccessGrantsInstanceId"].write(value.accessGrantsInstanceId) + try writer["CreatedAt"].writeTimestamp(value.createdAt, format: .dateTime) + try writer["IdentityCenterArn"].write(value.identityCenterArn) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessGrantsInstanceIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsInstanceId) - accessGrantsInstanceId = accessGrantsInstanceIdDecoded - let accessGrantsInstanceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsInstanceArn) - accessGrantsInstanceArn = accessGrantsInstanceArnDecoded - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let identityCenterArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identityCenterArn) - identityCenterArn = identityCenterArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ListAccessGrantsInstanceEntry() + value.accessGrantsInstanceId = try reader["AccessGrantsInstanceId"].readIfPresent() + value.accessGrantsInstanceArn = try reader["AccessGrantsInstanceArn"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.identityCenterArn = try reader["IdentityCenterArn"].readIfPresent() + return value + } } } @@ -10064,16 +8452,16 @@ public struct ListAccessGrantsInstancesInput: Swift.Equatable { } } -extension ListAccessGrantsInstancesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAccessGrantsInstancesOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsInstancesList = output.accessGrantsInstancesList - self.nextToken = output.nextToken - } else { - self.accessGrantsInstancesList = nil - self.nextToken = nil +extension ListAccessGrantsInstancesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListAccessGrantsInstancesOutput() + value.accessGrantsInstancesList = try reader["AccessGrantsInstancesList"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ListAccessGrantsInstanceEntry.readingClosure, memberNodeInfo: "AccessGrantsInstance", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -10094,82 +8482,41 @@ public struct ListAccessGrantsInstancesOutput: Swift.Equatable { } } -struct ListAccessGrantsInstancesOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let accessGrantsInstancesList: [S3ControlClientTypes.ListAccessGrantsInstanceEntry]? -} - -extension ListAccessGrantsInstancesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsInstancesList = "AccessGrantsInstancesList" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.accessGrantsInstancesList) { - struct KeyVal0{struct AccessGrantsInstance{}} - let accessGrantsInstancesListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessGrantsInstancesList) - if let accessGrantsInstancesListWrappedContainer = accessGrantsInstancesListWrappedContainer { - let accessGrantsInstancesListContainer = try accessGrantsInstancesListWrappedContainer.decodeIfPresent([S3ControlClientTypes.ListAccessGrantsInstanceEntry].self, forKey: .member) - var accessGrantsInstancesListBuffer:[S3ControlClientTypes.ListAccessGrantsInstanceEntry]? = nil - if let accessGrantsInstancesListContainer = accessGrantsInstancesListContainer { - accessGrantsInstancesListBuffer = [S3ControlClientTypes.ListAccessGrantsInstanceEntry]() - for structureContainer0 in accessGrantsInstancesListContainer { - accessGrantsInstancesListBuffer?.append(structureContainer0) - } - } - accessGrantsInstancesList = accessGrantsInstancesListBuffer - } else { - accessGrantsInstancesList = [] - } - } else { - accessGrantsInstancesList = nil - } - } -} +enum ListAccessGrantsInstancesOutputError { -enum ListAccessGrantsInstancesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.ListAccessGrantsLocationsEntry: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsLocationArn = "AccessGrantsLocationArn" - case accessGrantsLocationId = "AccessGrantsLocationId" - case createdAt = "CreatedAt" - case iamRoleArn = "IAMRoleArn" - case locationScope = "LocationScope" - } +extension S3ControlClientTypes.ListAccessGrantsLocationsEntry { static func writingClosure(_ value: S3ControlClientTypes.ListAccessGrantsLocationsEntry?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessGrantsLocationArn")].write(value.accessGrantsLocationArn) - try writer[.init("AccessGrantsLocationId")].write(value.accessGrantsLocationId) - try writer[.init("CreatedAt")].writeTimestamp(value.createdAt, format: .dateTime) - try writer[.init("IAMRoleArn")].write(value.iamRoleArn) - try writer[.init("LocationScope")].write(value.locationScope) + try writer["AccessGrantsLocationArn"].write(value.accessGrantsLocationArn) + try writer["AccessGrantsLocationId"].write(value.accessGrantsLocationId) + try writer["CreatedAt"].writeTimestamp(value.createdAt, format: .dateTime) + try writer["IAMRoleArn"].write(value.iamRoleArn) + try writer["LocationScope"].write(value.locationScope) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let accessGrantsLocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationId) - accessGrantsLocationId = accessGrantsLocationIdDecoded - let accessGrantsLocationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationArn) - accessGrantsLocationArn = accessGrantsLocationArnDecoded - let locationScopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationScope) - locationScope = locationScopeDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ListAccessGrantsLocationsEntry() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.accessGrantsLocationId = try reader["AccessGrantsLocationId"].readIfPresent() + value.accessGrantsLocationArn = try reader["AccessGrantsLocationArn"].readIfPresent() + value.locationScope = try reader["LocationScope"].readIfPresent() + value.iamRoleArn = try reader["IAMRoleArn"].readIfPresent() + return value + } } } @@ -10268,16 +8615,16 @@ public struct ListAccessGrantsLocationsInput: Swift.Equatable { } } -extension ListAccessGrantsLocationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAccessGrantsLocationsOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsLocationsList = output.accessGrantsLocationsList - self.nextToken = output.nextToken - } else { - self.accessGrantsLocationsList = nil - self.nextToken = nil +extension ListAccessGrantsLocationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListAccessGrantsLocationsOutput() + value.accessGrantsLocationsList = try reader["AccessGrantsLocationsList"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ListAccessGrantsLocationsEntry.readingClosure, memberNodeInfo: "AccessGrantsLocation", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -10298,62 +8645,29 @@ public struct ListAccessGrantsLocationsOutput: Swift.Equatable { } } -struct ListAccessGrantsLocationsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let accessGrantsLocationsList: [S3ControlClientTypes.ListAccessGrantsLocationsEntry]? -} - -extension ListAccessGrantsLocationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsLocationsList = "AccessGrantsLocationsList" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.accessGrantsLocationsList) { - struct KeyVal0{struct AccessGrantsLocation{}} - let accessGrantsLocationsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessGrantsLocationsList) - if let accessGrantsLocationsListWrappedContainer = accessGrantsLocationsListWrappedContainer { - let accessGrantsLocationsListContainer = try accessGrantsLocationsListWrappedContainer.decodeIfPresent([S3ControlClientTypes.ListAccessGrantsLocationsEntry].self, forKey: .member) - var accessGrantsLocationsListBuffer:[S3ControlClientTypes.ListAccessGrantsLocationsEntry]? = nil - if let accessGrantsLocationsListContainer = accessGrantsLocationsListContainer { - accessGrantsLocationsListBuffer = [S3ControlClientTypes.ListAccessGrantsLocationsEntry]() - for structureContainer0 in accessGrantsLocationsListContainer { - accessGrantsLocationsListBuffer?.append(structureContainer0) - } - } - accessGrantsLocationsList = accessGrantsLocationsListBuffer - } else { - accessGrantsLocationsList = [] +enum ListAccessGrantsLocationsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - accessGrantsLocationsList = nil } } } -enum ListAccessGrantsLocationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} +extension ListAccessGrantsOutput { -extension ListAccessGrantsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAccessGrantsOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsList = output.accessGrantsList - self.nextToken = output.nextToken - } else { - self.accessGrantsList = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListAccessGrantsOutput() + value.accessGrantsList = try reader["AccessGrantsList"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ListAccessGrantEntry.readingClosure, memberNodeInfo: "AccessGrant", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -10374,48 +8688,15 @@ public struct ListAccessGrantsOutput: Swift.Equatable { } } -struct ListAccessGrantsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let accessGrantsList: [S3ControlClientTypes.ListAccessGrantEntry]? -} - -extension ListAccessGrantsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsList = "AccessGrantsList" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.accessGrantsList) { - struct KeyVal0{struct AccessGrant{}} - let accessGrantsListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessGrantsList) - if let accessGrantsListWrappedContainer = accessGrantsListWrappedContainer { - let accessGrantsListContainer = try accessGrantsListWrappedContainer.decodeIfPresent([S3ControlClientTypes.ListAccessGrantEntry].self, forKey: .member) - var accessGrantsListBuffer:[S3ControlClientTypes.ListAccessGrantEntry]? = nil - if let accessGrantsListContainer = accessGrantsListContainer { - accessGrantsListBuffer = [S3ControlClientTypes.ListAccessGrantEntry]() - for structureContainer0 in accessGrantsListContainer { - accessGrantsListBuffer?.append(structureContainer0) - } - } - accessGrantsList = accessGrantsListBuffer - } else { - accessGrantsList = [] - } - } else { - accessGrantsList = nil - } - } -} +enum ListAccessGrantsOutputError { -enum ListAccessGrantsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10475,16 +8756,16 @@ public struct ListAccessPointsForObjectLambdaInput: Swift.Equatable { } } -extension ListAccessPointsForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAccessPointsForObjectLambdaOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.objectLambdaAccessPointList = output.objectLambdaAccessPointList - } else { - self.nextToken = nil - self.objectLambdaAccessPointList = nil +extension ListAccessPointsForObjectLambdaOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListAccessPointsForObjectLambdaOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.objectLambdaAccessPointList = try reader["ObjectLambdaAccessPointList"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ObjectLambdaAccessPoint.readingClosure, memberNodeInfo: "ObjectLambdaAccessPoint", isFlattened: false) + return value } } } @@ -10505,48 +8786,15 @@ public struct ListAccessPointsForObjectLambdaOutput: Swift.Equatable { } } -struct ListAccessPointsForObjectLambdaOutputBody: Swift.Equatable { - let objectLambdaAccessPointList: [S3ControlClientTypes.ObjectLambdaAccessPoint]? - let nextToken: Swift.String? -} - -extension ListAccessPointsForObjectLambdaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case objectLambdaAccessPointList = "ObjectLambdaAccessPointList" - } +enum ListAccessPointsForObjectLambdaOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.objectLambdaAccessPointList) { - struct KeyVal0{struct ObjectLambdaAccessPoint{}} - let objectLambdaAccessPointListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .objectLambdaAccessPointList) - if let objectLambdaAccessPointListWrappedContainer = objectLambdaAccessPointListWrappedContainer { - let objectLambdaAccessPointListContainer = try objectLambdaAccessPointListWrappedContainer.decodeIfPresent([S3ControlClientTypes.ObjectLambdaAccessPoint].self, forKey: .member) - var objectLambdaAccessPointListBuffer:[S3ControlClientTypes.ObjectLambdaAccessPoint]? = nil - if let objectLambdaAccessPointListContainer = objectLambdaAccessPointListContainer { - objectLambdaAccessPointListBuffer = [S3ControlClientTypes.ObjectLambdaAccessPoint]() - for structureContainer0 in objectLambdaAccessPointListContainer { - objectLambdaAccessPointListBuffer?.append(structureContainer0) - } - } - objectLambdaAccessPointList = objectLambdaAccessPointListBuffer - } else { - objectLambdaAccessPointList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - objectLambdaAccessPointList = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListAccessPointsForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -10614,16 +8862,16 @@ public struct ListAccessPointsInput: Swift.Equatable { } } -extension ListAccessPointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListAccessPointsOutputBody = try responseDecoder.decode(responseBody: data) - self.accessPointList = output.accessPointList - self.nextToken = output.nextToken - } else { - self.accessPointList = nil - self.nextToken = nil +extension ListAccessPointsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListAccessPointsOutput() + value.accessPointList = try reader["AccessPointList"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.AccessPoint.readingClosure, memberNodeInfo: "AccessPoint", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -10644,48 +8892,15 @@ public struct ListAccessPointsOutput: Swift.Equatable { } } -struct ListAccessPointsOutputBody: Swift.Equatable { - let accessPointList: [S3ControlClientTypes.AccessPoint]? - let nextToken: Swift.String? -} +enum ListAccessPointsOutputError { -extension ListAccessPointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPointList = "AccessPointList" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.accessPointList) { - struct KeyVal0{struct AccessPoint{}} - let accessPointListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessPointList) - if let accessPointListWrappedContainer = accessPointListWrappedContainer { - let accessPointListContainer = try accessPointListWrappedContainer.decodeIfPresent([S3ControlClientTypes.AccessPoint].self, forKey: .member) - var accessPointListBuffer:[S3ControlClientTypes.AccessPoint]? = nil - if let accessPointListContainer = accessPointListContainer { - accessPointListBuffer = [S3ControlClientTypes.AccessPoint]() - for structureContainer0 in accessPointListContainer { - accessPointListBuffer?.append(structureContainer0) - } - } - accessPointList = accessPointListBuffer - } else { - accessPointList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - accessPointList = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListAccessPointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -10755,16 +8970,16 @@ public struct ListJobsInput: Swift.Equatable { } } -extension ListJobsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListJobsOutputBody = try responseDecoder.decode(responseBody: data) - self.jobs = output.jobs - self.nextToken = output.nextToken - } else { - self.jobs = nil - self.nextToken = nil +extension ListJobsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListJobsOutput() + value.jobs = try reader["Jobs"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.JobListDescriptor.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -10785,51 +9000,19 @@ public struct ListJobsOutput: Swift.Equatable { } } -struct ListJobsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let jobs: [S3ControlClientTypes.JobListDescriptor]? -} - -extension ListJobsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobs = "Jobs" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.jobs) { - struct KeyVal0{struct member{}} - let jobsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .jobs) - if let jobsWrappedContainer = jobsWrappedContainer { - let jobsContainer = try jobsWrappedContainer.decodeIfPresent([S3ControlClientTypes.JobListDescriptor].self, forKey: .member) - var jobsBuffer:[S3ControlClientTypes.JobListDescriptor]? = nil - if let jobsContainer = jobsContainer { - jobsBuffer = [S3ControlClientTypes.JobListDescriptor]() - for structureContainer0 in jobsContainer { - jobsBuffer?.append(structureContainer0) - } - } - jobs = jobsBuffer - } else { - jobs = [] - } - } else { - jobs = nil - } - } -} +enum ListJobsOutputError { -enum ListJobsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidNextTokenException": return try await InvalidNextTokenException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidRequestException": return try await InvalidRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InternalServiceException": return try await InternalServiceException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidNextTokenException": return try await InvalidNextTokenException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InvalidRequestException": return try await InvalidRequestException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -10889,16 +9072,16 @@ public struct ListMultiRegionAccessPointsInput: Swift.Equatable { } } -extension ListMultiRegionAccessPointsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListMultiRegionAccessPointsOutputBody = try responseDecoder.decode(responseBody: data) - self.accessPoints = output.accessPoints - self.nextToken = output.nextToken - } else { - self.accessPoints = nil - self.nextToken = nil +extension ListMultiRegionAccessPointsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListMultiRegionAccessPointsOutput() + value.accessPoints = try reader["AccessPoints"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.MultiRegionAccessPointReport.readingClosure, memberNodeInfo: "AccessPoint", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -10919,48 +9102,15 @@ public struct ListMultiRegionAccessPointsOutput: Swift.Equatable { } } -struct ListMultiRegionAccessPointsOutputBody: Swift.Equatable { - let accessPoints: [S3ControlClientTypes.MultiRegionAccessPointReport]? - let nextToken: Swift.String? -} - -extension ListMultiRegionAccessPointsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessPoints = "AccessPoints" - case nextToken = "NextToken" - } +enum ListMultiRegionAccessPointsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.accessPoints) { - struct KeyVal0{struct AccessPoint{}} - let accessPointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessPoints) - if let accessPointsWrappedContainer = accessPointsWrappedContainer { - let accessPointsContainer = try accessPointsWrappedContainer.decodeIfPresent([S3ControlClientTypes.MultiRegionAccessPointReport].self, forKey: .member) - var accessPointsBuffer:[S3ControlClientTypes.MultiRegionAccessPointReport]? = nil - if let accessPointsContainer = accessPointsContainer { - accessPointsBuffer = [S3ControlClientTypes.MultiRegionAccessPointReport]() - for structureContainer0 in accessPointsContainer { - accessPointsBuffer?.append(structureContainer0) - } - } - accessPoints = accessPointsBuffer - } else { - accessPoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - accessPoints = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListMultiRegionAccessPointsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -11027,16 +9177,16 @@ public struct ListRegionalBucketsInput: Swift.Equatable { } } -extension ListRegionalBucketsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListRegionalBucketsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.regionalBucketList = output.regionalBucketList - } else { - self.nextToken = nil - self.regionalBucketList = nil +extension ListRegionalBucketsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListRegionalBucketsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.regionalBucketList = try reader["RegionalBucketList"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.RegionalBucket.readingClosure, memberNodeInfo: "RegionalBucket", isFlattened: false) + return value } } } @@ -11057,78 +9207,39 @@ public struct ListRegionalBucketsOutput: Swift.Equatable { } } -struct ListRegionalBucketsOutputBody: Swift.Equatable { - let regionalBucketList: [S3ControlClientTypes.RegionalBucket]? - let nextToken: Swift.String? -} - -extension ListRegionalBucketsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case regionalBucketList = "RegionalBucketList" - } +enum ListRegionalBucketsOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.regionalBucketList) { - struct KeyVal0{struct RegionalBucket{}} - let regionalBucketListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regionalBucketList) - if let regionalBucketListWrappedContainer = regionalBucketListWrappedContainer { - let regionalBucketListContainer = try regionalBucketListWrappedContainer.decodeIfPresent([S3ControlClientTypes.RegionalBucket].self, forKey: .member) - var regionalBucketListBuffer:[S3ControlClientTypes.RegionalBucket]? = nil - if let regionalBucketListContainer = regionalBucketListContainer { - regionalBucketListBuffer = [S3ControlClientTypes.RegionalBucket]() - for structureContainer0 in regionalBucketListContainer { - regionalBucketListBuffer?.append(structureContainer0) - } - } - regionalBucketList = regionalBucketListBuffer - } else { - regionalBucketList = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - regionalBucketList = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListRegionalBucketsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension S3ControlClientTypes.ListStorageLensConfigurationEntry: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case homeRegion = "HomeRegion" - case id = "Id" - case isEnabled = "IsEnabled" - case storageLensArn = "StorageLensArn" - } +extension S3ControlClientTypes.ListStorageLensConfigurationEntry { static func writingClosure(_ value: S3ControlClientTypes.ListStorageLensConfigurationEntry?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HomeRegion")].write(value.homeRegion) - try writer[.init("Id")].write(value.id) - try writer[.init("IsEnabled")].write(value.isEnabled) - try writer[.init("StorageLensArn")].write(value.storageLensArn) + try writer["HomeRegion"].write(value.homeRegion) + try writer["Id"].write(value.id) + try writer["IsEnabled"].write(value.isEnabled) + try writer["StorageLensArn"].write(value.storageLensArn) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let storageLensArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageLensArn) - storageLensArn = storageLensArnDecoded - let homeRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .homeRegion) - homeRegion = homeRegionDecoded - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) ?? false - isEnabled = isEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ListStorageLensConfigurationEntry() + value.id = try reader["Id"].readIfPresent() + value.storageLensArn = try reader["StorageLensArn"].readIfPresent() + value.homeRegion = try reader["HomeRegion"].readIfPresent() + value.isEnabled = try reader["IsEnabled"].readIfPresent() ?? false + return value + } } } @@ -11210,16 +9321,16 @@ public struct ListStorageLensConfigurationsInput: Swift.Equatable { } } -extension ListStorageLensConfigurationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStorageLensConfigurationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.storageLensConfigurationList = output.storageLensConfigurationList - } else { - self.nextToken = nil - self.storageLensConfigurationList = nil +extension ListStorageLensConfigurationsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListStorageLensConfigurationsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.storageLensConfigurationList = try reader["StorageLensConfigurationList"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ListStorageLensConfigurationEntry.readingClosure, memberNodeInfo: "StorageLensConfiguration", isFlattened: true) + return value } } } @@ -11240,73 +9351,37 @@ public struct ListStorageLensConfigurationsOutput: Swift.Equatable { } } -struct ListStorageLensConfigurationsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let storageLensConfigurationList: [S3ControlClientTypes.ListStorageLensConfigurationEntry]? -} - -extension ListStorageLensConfigurationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case storageLensConfigurationList = "StorageLensConfigurationList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.storageLensConfigurationList) { - let storageLensConfigurationListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .storageLensConfigurationList) - if storageLensConfigurationListWrappedContainer != nil { - let storageLensConfigurationListContainer = try containerValues.decodeIfPresent([S3ControlClientTypes.ListStorageLensConfigurationEntry].self, forKey: .storageLensConfigurationList) - var storageLensConfigurationListBuffer:[S3ControlClientTypes.ListStorageLensConfigurationEntry]? = nil - if let storageLensConfigurationListContainer = storageLensConfigurationListContainer { - storageLensConfigurationListBuffer = [S3ControlClientTypes.ListStorageLensConfigurationEntry]() - for structureContainer0 in storageLensConfigurationListContainer { - storageLensConfigurationListBuffer?.append(structureContainer0) - } - } - storageLensConfigurationList = storageLensConfigurationListBuffer - } else { - storageLensConfigurationList = [] - } - } else { - storageLensConfigurationList = nil - } - } -} +enum ListStorageLensConfigurationsOutputError { -enum ListStorageLensConfigurationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.ListStorageLensGroupEntry: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case homeRegion = "HomeRegion" - case name = "Name" - case storageLensGroupArn = "StorageLensGroupArn" - } +extension S3ControlClientTypes.ListStorageLensGroupEntry { static func writingClosure(_ value: S3ControlClientTypes.ListStorageLensGroupEntry?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("HomeRegion")].write(value.homeRegion) - try writer[.init("Name")].write(value.name) - try writer[.init("StorageLensGroupArn")].write(value.storageLensGroupArn) + try writer["HomeRegion"].write(value.homeRegion) + try writer["Name"].write(value.name) + try writer["StorageLensGroupArn"].write(value.storageLensGroupArn) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let storageLensGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageLensGroupArn) - storageLensGroupArn = storageLensGroupArnDecoded - let homeRegionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .homeRegion) - homeRegion = homeRegionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ListStorageLensGroupEntry() + value.name = try reader["Name"].readIfPresent() + value.storageLensGroupArn = try reader["StorageLensGroupArn"].readIfPresent() + value.homeRegion = try reader["HomeRegion"].readIfPresent() + return value + } } } @@ -11384,16 +9459,16 @@ public struct ListStorageLensGroupsInput: Swift.Equatable { } } -extension ListStorageLensGroupsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListStorageLensGroupsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.storageLensGroupList = output.storageLensGroupList - } else { - self.nextToken = nil - self.storageLensGroupList = nil +extension ListStorageLensGroupsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListStorageLensGroupsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.storageLensGroupList = try reader["StorageLensGroupList"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ListStorageLensGroupEntry.readingClosure, memberNodeInfo: "StorageLensGroup", isFlattened: true) + return value } } } @@ -11414,47 +9489,15 @@ public struct ListStorageLensGroupsOutput: Swift.Equatable { } } -struct ListStorageLensGroupsOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let storageLensGroupList: [S3ControlClientTypes.ListStorageLensGroupEntry]? -} - -extension ListStorageLensGroupsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case storageLensGroupList = "StorageLensGroupList" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.storageLensGroupList) { - let storageLensGroupListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .storageLensGroupList) - if storageLensGroupListWrappedContainer != nil { - let storageLensGroupListContainer = try containerValues.decodeIfPresent([S3ControlClientTypes.ListStorageLensGroupEntry].self, forKey: .storageLensGroupList) - var storageLensGroupListBuffer:[S3ControlClientTypes.ListStorageLensGroupEntry]? = nil - if let storageLensGroupListContainer = storageLensGroupListContainer { - storageLensGroupListBuffer = [S3ControlClientTypes.ListStorageLensGroupEntry]() - for structureContainer0 in storageLensGroupListContainer { - storageLensGroupListBuffer?.append(structureContainer0) - } - } - storageLensGroupList = storageLensGroupListBuffer - } else { - storageLensGroupList = [] - } - } else { - storageLensGroupList = nil - } - } -} +enum ListStorageLensGroupsOutputError { -enum ListStorageLensGroupsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -11498,14 +9541,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tags = output.tags - } else { - self.tags = nil +extension ListTagsForResourceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = ListTagsForResourceOutput() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + return value } } } @@ -11522,44 +9566,15 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let tags: [S3ControlClientTypes.Tag]? -} - -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +enum ListTagsForResourceOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) } - } else { - tags = nil - } - } -} - -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } @@ -11628,24 +9643,22 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.MatchObjectAge: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case daysGreaterThan = "DaysGreaterThan" - case daysLessThan = "DaysLessThan" - } +extension S3ControlClientTypes.MatchObjectAge { static func writingClosure(_ value: S3ControlClientTypes.MatchObjectAge?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DaysGreaterThan")].write(value.daysGreaterThan) - try writer[.init("DaysLessThan")].write(value.daysLessThan) + try writer["DaysGreaterThan"].write(value.daysGreaterThan) + try writer["DaysLessThan"].write(value.daysLessThan) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let daysGreaterThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .daysGreaterThan) ?? 0 - daysGreaterThan = daysGreaterThanDecoded - let daysLessThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .daysLessThan) ?? 0 - daysLessThan = daysLessThanDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.MatchObjectAge() + value.daysGreaterThan = try reader["DaysGreaterThan"].readIfPresent() ?? 0 + value.daysLessThan = try reader["DaysLessThan"].readIfPresent() ?? 0 + return value + } } } @@ -11669,24 +9682,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.MatchObjectSize: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bytesGreaterThan = "BytesGreaterThan" - case bytesLessThan = "BytesLessThan" - } +extension S3ControlClientTypes.MatchObjectSize { static func writingClosure(_ value: S3ControlClientTypes.MatchObjectSize?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("BytesGreaterThan")].write(value.bytesGreaterThan) - try writer[.init("BytesLessThan")].write(value.bytesLessThan) + try writer["BytesGreaterThan"].write(value.bytesGreaterThan) + try writer["BytesLessThan"].write(value.bytesLessThan) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bytesGreaterThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesGreaterThan) ?? 0 - bytesGreaterThan = bytesGreaterThanDecoded - let bytesLessThanDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bytesLessThan) ?? 0 - bytesLessThan = bytesLessThanDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.MatchObjectSize() + value.bytesGreaterThan = try reader["BytesGreaterThan"].readIfPresent() ?? 0 + value.bytesLessThan = try reader["BytesLessThan"].readIfPresent() ?? 0 + return value + } } } @@ -11710,24 +9721,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.Metrics: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case eventThreshold = "EventThreshold" - case status = "Status" - } +extension S3ControlClientTypes.Metrics { static func writingClosure(_ value: S3ControlClientTypes.Metrics?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EventThreshold")].write(value.eventThreshold, writingClosure: S3ControlClientTypes.ReplicationTimeValue.writingClosure(_:to:)) - try writer[.init("Status")].write(value.status) + try writer["EventThreshold"].write(value.eventThreshold, writingClosure: S3ControlClientTypes.ReplicationTimeValue.writingClosure(_:to:)) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MetricsStatus.self, forKey: .status) - status = statusDecoded - let eventThresholdDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationTimeValue.self, forKey: .eventThreshold) - eventThreshold = eventThresholdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Metrics() + value.status = try reader["Status"].readIfPresent() + value.eventThreshold = try reader["EventThreshold"].readIfPresent(readingClosure: S3ControlClientTypes.ReplicationTimeValue.readingClosure) + return value + } } } @@ -11784,24 +9793,22 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.MultiRegionAccessPointPolicyDocument: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case established = "Established" - case proposed = "Proposed" - } +extension S3ControlClientTypes.MultiRegionAccessPointPolicyDocument { static func writingClosure(_ value: S3ControlClientTypes.MultiRegionAccessPointPolicyDocument?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Established")].write(value.established, writingClosure: S3ControlClientTypes.EstablishedMultiRegionAccessPointPolicy.writingClosure(_:to:)) - try writer[.init("Proposed")].write(value.proposed, writingClosure: S3ControlClientTypes.ProposedMultiRegionAccessPointPolicy.writingClosure(_:to:)) + try writer["Established"].write(value.established, writingClosure: S3ControlClientTypes.EstablishedMultiRegionAccessPointPolicy.writingClosure(_:to:)) + try writer["Proposed"].write(value.proposed, writingClosure: S3ControlClientTypes.ProposedMultiRegionAccessPointPolicy.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let establishedDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.EstablishedMultiRegionAccessPointPolicy.self, forKey: .established) - established = establishedDecoded - let proposedDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ProposedMultiRegionAccessPointPolicy.self, forKey: .proposed) - proposed = proposedDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.MultiRegionAccessPointPolicyDocument() + value.established = try reader["Established"].readIfPresent(readingClosure: S3ControlClientTypes.EstablishedMultiRegionAccessPointPolicy.readingClosure) + value.proposed = try reader["Proposed"].readIfPresent(readingClosure: S3ControlClientTypes.ProposedMultiRegionAccessPointPolicy.readingClosure) + return value + } } } @@ -11825,24 +9832,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.MultiRegionAccessPointRegionalResponse: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case requestStatus = "RequestStatus" - } +extension S3ControlClientTypes.MultiRegionAccessPointRegionalResponse { static func writingClosure(_ value: S3ControlClientTypes.MultiRegionAccessPointRegionalResponse?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) - try writer[.init("RequestStatus")].write(value.requestStatus) + try writer["Name"].write(value.name) + try writer["RequestStatus"].write(value.requestStatus) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let requestStatusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestStatus) - requestStatus = requestStatusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.MultiRegionAccessPointRegionalResponse() + value.name = try reader["Name"].readIfPresent() + value.requestStatus = try reader["RequestStatus"].readIfPresent() + return value + } } } @@ -11866,56 +9871,29 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.MultiRegionAccessPointReport: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alias = "Alias" - case createdAt = "CreatedAt" - case name = "Name" - case publicAccessBlock = "PublicAccessBlock" - case regions = "Regions" - case status = "Status" - } +extension S3ControlClientTypes.MultiRegionAccessPointReport { static func writingClosure(_ value: S3ControlClientTypes.MultiRegionAccessPointReport?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Alias")].write(value.alias) - try writer[.init("CreatedAt")].writeTimestamp(value.createdAt, format: .dateTime) - try writer[.init("Name")].write(value.name) - try writer[.init("PublicAccessBlock")].write(value.publicAccessBlock, writingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) - try writer[.init("Regions")].writeList(value.regions, memberWritingClosure: S3ControlClientTypes.RegionReport.writingClosure(_:to:), memberNodeInfo: .init("Region"), isFlattened: false) - try writer[.init("Status")].write(value.status) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let aliasDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .alias) - alias = aliasDecoded - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let publicAccessBlockDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlock) - publicAccessBlock = publicAccessBlockDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MultiRegionAccessPointStatus.self, forKey: .status) - status = statusDecoded - if containerValues.contains(.regions) { - struct KeyVal0{struct Region{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([S3ControlClientTypes.RegionReport].self, forKey: .member) - var regionsBuffer:[S3ControlClientTypes.RegionReport]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [S3ControlClientTypes.RegionReport]() - for structureContainer0 in regionsContainer { - regionsBuffer?.append(structureContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil + try writer["Alias"].write(value.alias) + try writer["CreatedAt"].writeTimestamp(value.createdAt, format: .dateTime) + try writer["Name"].write(value.name) + try writer["PublicAccessBlock"].write(value.publicAccessBlock, writingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) + try writer["Regions"].writeList(value.regions, memberWritingClosure: S3ControlClientTypes.RegionReport.writingClosure(_:to:), memberNodeInfo: "Region", isFlattened: false) + try writer["Status"].write(value.status) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.MultiRegionAccessPointReport() + value.name = try reader["Name"].readIfPresent() + value.alias = try reader["Alias"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.publicAccessBlock = try reader["PublicAccessBlock"].readIfPresent(readingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.readingClosure) + value.status = try reader["Status"].readIfPresent() + value.regions = try reader["Regions"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.RegionReport.readingClosure, memberNodeInfo: "Region", isFlattened: false) + return value } } } @@ -11956,28 +9934,24 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.MultiRegionAccessPointRoute: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case region = "Region" - case trafficDialPercentage = "TrafficDialPercentage" - } +extension S3ControlClientTypes.MultiRegionAccessPointRoute { static func writingClosure(_ value: S3ControlClientTypes.MultiRegionAccessPointRoute?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("Region")].write(value.region) - try writer[.init("TrafficDialPercentage")].write(value.trafficDialPercentage) + try writer["Bucket"].write(value.bucket) + try writer["Region"].write(value.region) + try writer["TrafficDialPercentage"].write(value.trafficDialPercentage) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let trafficDialPercentageDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .trafficDialPercentage) - trafficDialPercentage = trafficDialPercentageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.MultiRegionAccessPointRoute() + value.bucket = try reader["Bucket"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.trafficDialPercentage = try reader["TrafficDialPercentage"].readIfPresent() + return value + } } } @@ -12050,36 +10024,19 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.MultiRegionAccessPointsAsyncResponse: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case regions = "Regions" - } +extension S3ControlClientTypes.MultiRegionAccessPointsAsyncResponse { static func writingClosure(_ value: S3ControlClientTypes.MultiRegionAccessPointsAsyncResponse?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Regions")].writeList(value.regions, memberWritingClosure: S3ControlClientTypes.MultiRegionAccessPointRegionalResponse.writingClosure(_:to:), memberNodeInfo: .init("Region"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.regions) { - struct KeyVal0{struct Region{}} - let regionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .regions) - if let regionsWrappedContainer = regionsWrappedContainer { - let regionsContainer = try regionsWrappedContainer.decodeIfPresent([S3ControlClientTypes.MultiRegionAccessPointRegionalResponse].self, forKey: .member) - var regionsBuffer:[S3ControlClientTypes.MultiRegionAccessPointRegionalResponse]? = nil - if let regionsContainer = regionsContainer { - regionsBuffer = [S3ControlClientTypes.MultiRegionAccessPointRegionalResponse]() - for structureContainer0 in regionsContainer { - regionsBuffer?.append(structureContainer0) - } - } - regions = regionsBuffer - } else { - regions = [] - } - } else { - regions = nil + try writer["Regions"].writeList(value.regions, memberWritingClosure: S3ControlClientTypes.MultiRegionAccessPointRegionalResponse.writingClosure(_:to:), memberNodeInfo: "Region", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.MultiRegionAccessPointsAsyncResponse() + value.regions = try reader["Regions"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.MultiRegionAccessPointRegionalResponse.readingClosure, memberNodeInfo: "Region", isFlattened: false) + return value } } } @@ -12133,16 +10090,26 @@ extension S3ControlClientTypes { } extension NoSuchPublicAccessBlockConfiguration { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NoSuchPublicAccessBlockConfiguration() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension NoSuchPublicAccessBlockConfiguration { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NoSuchPublicAccessBlockConfiguration() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12170,40 +10137,22 @@ public struct NoSuchPublicAccessBlockConfiguration: ClientRuntime.ModeledError, } } -struct NoSuchPublicAccessBlockConfigurationBody: Swift.Equatable { - let message: Swift.String? -} - -extension NoSuchPublicAccessBlockConfigurationBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension S3ControlClientTypes.NoncurrentVersionExpiration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case newerNoncurrentVersions = "NewerNoncurrentVersions" - case noncurrentDays = "NoncurrentDays" - } +extension S3ControlClientTypes.NoncurrentVersionExpiration { static func writingClosure(_ value: S3ControlClientTypes.NoncurrentVersionExpiration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("NewerNoncurrentVersions")].write(value.newerNoncurrentVersions) - try writer[.init("NoncurrentDays")].write(value.noncurrentDays) + try writer["NewerNoncurrentVersions"].write(value.newerNoncurrentVersions) + try writer["NoncurrentDays"].write(value.noncurrentDays) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let noncurrentDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .noncurrentDays) ?? 0 - noncurrentDays = noncurrentDaysDecoded - let newerNoncurrentVersionsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .newerNoncurrentVersions) ?? nil - newerNoncurrentVersions = newerNoncurrentVersionsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.NoncurrentVersionExpiration() + value.noncurrentDays = try reader["NoncurrentDays"].readIfPresent() ?? 0 + value.newerNoncurrentVersions = try reader["NewerNoncurrentVersions"].readIfPresent() + return value + } } } @@ -12227,24 +10176,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.NoncurrentVersionTransition: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case noncurrentDays = "NoncurrentDays" - case storageClass = "StorageClass" - } +extension S3ControlClientTypes.NoncurrentVersionTransition { static func writingClosure(_ value: S3ControlClientTypes.NoncurrentVersionTransition?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("NoncurrentDays")].write(value.noncurrentDays) - try writer[.init("StorageClass")].write(value.storageClass) + try writer["NoncurrentDays"].write(value.noncurrentDays) + try writer["StorageClass"].write(value.storageClass) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let noncurrentDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .noncurrentDays) ?? 0 - noncurrentDays = noncurrentDaysDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.TransitionStorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.NoncurrentVersionTransition() + value.noncurrentDays = try reader["NoncurrentDays"].readIfPresent() ?? 0 + value.storageClass = try reader["StorageClass"].readIfPresent() + return value + } } } @@ -12269,16 +10216,26 @@ extension S3ControlClientTypes { } extension NotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = NotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension NotFoundException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NotFoundException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -12306,44 +10263,24 @@ public struct NotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct NotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension S3ControlClientTypes.ObjectLambdaAccessPoint: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case alias = "Alias" - case name = "Name" - case objectLambdaAccessPointArn = "ObjectLambdaAccessPointArn" - } +extension S3ControlClientTypes.ObjectLambdaAccessPoint { static func writingClosure(_ value: S3ControlClientTypes.ObjectLambdaAccessPoint?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Alias")].write(value.alias, writingClosure: S3ControlClientTypes.ObjectLambdaAccessPointAlias.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) - try writer[.init("ObjectLambdaAccessPointArn")].write(value.objectLambdaAccessPointArn) + try writer["Alias"].write(value.alias, writingClosure: S3ControlClientTypes.ObjectLambdaAccessPointAlias.writingClosure(_:to:)) + try writer["Name"].write(value.name) + try writer["ObjectLambdaAccessPointArn"].write(value.objectLambdaAccessPointArn) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let objectLambdaAccessPointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .objectLambdaAccessPointArn) - objectLambdaAccessPointArn = objectLambdaAccessPointArnDecoded - let aliasDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ObjectLambdaAccessPointAlias.self, forKey: .alias) - alias = aliasDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ObjectLambdaAccessPoint() + value.name = try reader["Name"].readIfPresent() + value.objectLambdaAccessPointArn = try reader["ObjectLambdaAccessPointArn"].readIfPresent() + value.alias = try reader["Alias"].readIfPresent(readingClosure: S3ControlClientTypes.ObjectLambdaAccessPointAlias.readingClosure) + return value + } } } @@ -12372,24 +10309,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ObjectLambdaAccessPointAlias: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - case value = "Value" - } +extension S3ControlClientTypes.ObjectLambdaAccessPointAlias { static func writingClosure(_ value: S3ControlClientTypes.ObjectLambdaAccessPointAlias?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) - try writer[.init("Value")].write(value.value) + try writer["Status"].write(value.status) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ObjectLambdaAccessPointAliasStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ObjectLambdaAccessPointAlias() + value.value = try reader["Value"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -12483,65 +10418,25 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.ObjectLambdaConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case allowedFeatures = "AllowedFeatures" - case cloudWatchMetricsEnabled = "CloudWatchMetricsEnabled" - case supportingAccessPoint = "SupportingAccessPoint" - case transformationConfigurations = "TransformationConfigurations" - } +extension S3ControlClientTypes.ObjectLambdaConfiguration { static func writingClosure(_ value: S3ControlClientTypes.ObjectLambdaConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AllowedFeatures")].writeList(value.allowedFeatures, memberWritingClosure: S3ControlClientTypes.ObjectLambdaAllowedFeature.writingClosure(_:to:), memberNodeInfo: .init("AllowedFeature"), isFlattened: false) - try writer[.init("CloudWatchMetricsEnabled")].write(value.cloudWatchMetricsEnabled) - try writer[.init("SupportingAccessPoint")].write(value.supportingAccessPoint) - try writer[.init("TransformationConfigurations")].writeList(value.transformationConfigurations, memberWritingClosure: S3ControlClientTypes.ObjectLambdaTransformationConfiguration.writingClosure(_:to:), memberNodeInfo: .init("TransformationConfiguration"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let supportingAccessPointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .supportingAccessPoint) - supportingAccessPoint = supportingAccessPointDecoded - let cloudWatchMetricsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .cloudWatchMetricsEnabled) ?? false - cloudWatchMetricsEnabled = cloudWatchMetricsEnabledDecoded - if containerValues.contains(.allowedFeatures) { - struct KeyVal0{struct AllowedFeature{}} - let allowedFeaturesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .allowedFeatures) - if let allowedFeaturesWrappedContainer = allowedFeaturesWrappedContainer { - let allowedFeaturesContainer = try allowedFeaturesWrappedContainer.decodeIfPresent([S3ControlClientTypes.ObjectLambdaAllowedFeature].self, forKey: .member) - var allowedFeaturesBuffer:[S3ControlClientTypes.ObjectLambdaAllowedFeature]? = nil - if let allowedFeaturesContainer = allowedFeaturesContainer { - allowedFeaturesBuffer = [S3ControlClientTypes.ObjectLambdaAllowedFeature]() - for enumContainer0 in allowedFeaturesContainer { - allowedFeaturesBuffer?.append(enumContainer0) - } - } - allowedFeatures = allowedFeaturesBuffer - } else { - allowedFeatures = [] - } - } else { - allowedFeatures = nil - } - if containerValues.contains(.transformationConfigurations) { - struct KeyVal0{struct TransformationConfiguration{}} - let transformationConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transformationConfigurations) - if let transformationConfigurationsWrappedContainer = transformationConfigurationsWrappedContainer { - let transformationConfigurationsContainer = try transformationConfigurationsWrappedContainer.decodeIfPresent([S3ControlClientTypes.ObjectLambdaTransformationConfiguration].self, forKey: .member) - var transformationConfigurationsBuffer:[S3ControlClientTypes.ObjectLambdaTransformationConfiguration]? = nil - if let transformationConfigurationsContainer = transformationConfigurationsContainer { - transformationConfigurationsBuffer = [S3ControlClientTypes.ObjectLambdaTransformationConfiguration]() - for structureContainer0 in transformationConfigurationsContainer { - transformationConfigurationsBuffer?.append(structureContainer0) - } - } - transformationConfigurations = transformationConfigurationsBuffer - } else { - transformationConfigurations = [] - } - } else { - transformationConfigurations = nil + try writer["AllowedFeatures"].writeList(value.allowedFeatures, memberWritingClosure: S3ControlClientTypes.ObjectLambdaAllowedFeature.writingClosure(_:to:), memberNodeInfo: "AllowedFeature", isFlattened: false) + try writer["CloudWatchMetricsEnabled"].write(value.cloudWatchMetricsEnabled) + try writer["SupportingAccessPoint"].write(value.supportingAccessPoint) + try writer["TransformationConfigurations"].writeList(value.transformationConfigurations, memberWritingClosure: S3ControlClientTypes.ObjectLambdaTransformationConfiguration.writingClosure(_:to:), memberNodeInfo: "TransformationConfiguration", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ObjectLambdaConfiguration() + value.supportingAccessPoint = try reader["SupportingAccessPoint"].readIfPresent() + value.cloudWatchMetricsEnabled = try reader["CloudWatchMetricsEnabled"].readIfPresent() ?? false + value.allowedFeatures = try reader["AllowedFeatures"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ObjectLambdaAllowedFeature.readingClosure, memberNodeInfo: "AllowedFeature", isFlattened: false) + value.transformationConfigurations = try reader["TransformationConfigurations"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ObjectLambdaTransformationConfiguration.readingClosure, memberNodeInfo: "TransformationConfiguration", isFlattened: false) + return value } } } @@ -12576,31 +10471,28 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ObjectLambdaContentTransformation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case awslambda = "AwsLambda" - case sdkUnknown - } +extension S3ControlClientTypes.ObjectLambdaContentTransformation { static func writingClosure(_ value: S3ControlClientTypes.ObjectLambdaContentTransformation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } switch value { case let .awslambda(awslambda): - try writer[.init("AwsLambda")].write(awslambda, writingClosure: S3ControlClientTypes.AwsLambdaTransformation.writingClosure(_:to:)) + try writer["AwsLambda"].write(awslambda, writingClosure: S3ControlClientTypes.AwsLambdaTransformation.writingClosure(_:to:)) case let .sdkUnknown(sdkUnknown): try writer[.init("sdkUnknown")].write(sdkUnknown) } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let key = containerValues.allKeys.first - switch key { - case .awslambda: - let awslambdaDecoded = try containerValues.decode(S3ControlClientTypes.AwsLambdaTransformation.self, forKey: .awslambda) - self = .awslambda(awslambdaDecoded) - default: - self = .sdkUnknown("") + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + let name = reader.children.first?.nodeInfo.name + switch name { + case "AwsLambda": + return .awslambda(try reader["AwsLambda"].read(readingClosure: S3ControlClientTypes.AwsLambdaTransformation.readingClosure)) + default: + return .sdkUnknown(name ?? "") + } } } } @@ -12615,41 +10507,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ObjectLambdaTransformationConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case actions = "Actions" - case contentTransformation = "ContentTransformation" - } +extension S3ControlClientTypes.ObjectLambdaTransformationConfiguration { static func writingClosure(_ value: S3ControlClientTypes.ObjectLambdaTransformationConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Actions")].writeList(value.actions, memberWritingClosure: S3ControlClientTypes.ObjectLambdaTransformationConfigurationAction.writingClosure(_:to:), memberNodeInfo: .init("Action"), isFlattened: false) - try writer[.init("ContentTransformation")].write(value.contentTransformation, writingClosure: S3ControlClientTypes.ObjectLambdaContentTransformation.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.actions) { - struct KeyVal0{struct Action{}} - let actionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actions) - if let actionsWrappedContainer = actionsWrappedContainer { - let actionsContainer = try actionsWrappedContainer.decodeIfPresent([S3ControlClientTypes.ObjectLambdaTransformationConfigurationAction].self, forKey: .member) - var actionsBuffer:[S3ControlClientTypes.ObjectLambdaTransformationConfigurationAction]? = nil - if let actionsContainer = actionsContainer { - actionsBuffer = [S3ControlClientTypes.ObjectLambdaTransformationConfigurationAction]() - for enumContainer0 in actionsContainer { - actionsBuffer?.append(enumContainer0) - } - } - actions = actionsBuffer - } else { - actions = [] - } - } else { - actions = nil + try writer["Actions"].writeList(value.actions, memberWritingClosure: S3ControlClientTypes.ObjectLambdaTransformationConfigurationAction.writingClosure(_:to:), memberNodeInfo: "Action", isFlattened: false) + try writer["ContentTransformation"].write(value.contentTransformation, writingClosure: S3ControlClientTypes.ObjectLambdaContentTransformation.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ObjectLambdaTransformationConfiguration() + value.actions = try reader["Actions"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ObjectLambdaTransformationConfigurationAction.readingClosure, memberNodeInfo: "Action", isFlattened: false) + value.contentTransformation = try reader["ContentTransformation"].readIfPresent(readingClosure: S3ControlClientTypes.ObjectLambdaContentTransformation.readingClosure) + return value } - let contentTransformationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ObjectLambdaContentTransformation.self, forKey: .contentTransformation) - contentTransformation = contentTransformationDecoded } } @@ -12859,20 +10732,20 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.PolicyStatus: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isPublic = "IsPublic" - } +extension S3ControlClientTypes.PolicyStatus { static func writingClosure(_ value: S3ControlClientTypes.PolicyStatus?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsPublic")].write(value.isPublic) + try writer["IsPublic"].write(value.isPublic) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isPublicDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isPublic) ?? false - isPublic = isPublicDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.PolicyStatus() + value.isPublic = try reader["IsPublic"].readIfPresent() ?? false + return value + } } } @@ -12892,20 +10765,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.PrefixLevel: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageMetrics = "StorageMetrics" - } +extension S3ControlClientTypes.PrefixLevel { static func writingClosure(_ value: S3ControlClientTypes.PrefixLevel?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StorageMetrics")].write(value.storageMetrics, writingClosure: S3ControlClientTypes.PrefixLevelStorageMetrics.writingClosure(_:to:)) + try writer["StorageMetrics"].write(value.storageMetrics, writingClosure: S3ControlClientTypes.PrefixLevelStorageMetrics.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PrefixLevelStorageMetrics.self, forKey: .storageMetrics) - storageMetrics = storageMetricsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.PrefixLevel() + value.storageMetrics = try reader["StorageMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.PrefixLevelStorageMetrics.readingClosure) + return value + } } } @@ -12926,24 +10799,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.PrefixLevelStorageMetrics: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isEnabled = "IsEnabled" - case selectionCriteria = "SelectionCriteria" - } +extension S3ControlClientTypes.PrefixLevelStorageMetrics { static func writingClosure(_ value: S3ControlClientTypes.PrefixLevelStorageMetrics?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IsEnabled")].write(value.isEnabled) - try writer[.init("SelectionCriteria")].write(value.selectionCriteria, writingClosure: S3ControlClientTypes.SelectionCriteria.writingClosure(_:to:)) + try writer["IsEnabled"].write(value.isEnabled) + try writer["SelectionCriteria"].write(value.selectionCriteria, writingClosure: S3ControlClientTypes.SelectionCriteria.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) ?? false - isEnabled = isEnabledDecoded - let selectionCriteriaDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.SelectionCriteria.self, forKey: .selectionCriteria) - selectionCriteria = selectionCriteriaDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.PrefixLevelStorageMetrics() + value.isEnabled = try reader["IsEnabled"].readIfPresent() ?? false + value.selectionCriteria = try reader["SelectionCriteria"].readIfPresent(readingClosure: S3ControlClientTypes.SelectionCriteria.readingClosure) + return value + } } } @@ -12999,20 +10870,20 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.ProposedMultiRegionAccessPointPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } +extension S3ControlClientTypes.ProposedMultiRegionAccessPointPolicy { static func writingClosure(_ value: S3ControlClientTypes.ProposedMultiRegionAccessPointPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Policy")].write(value.policy) + try writer["Policy"].write(value.policy) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ProposedMultiRegionAccessPointPolicy() + value.policy = try reader["Policy"].readIfPresent() + return value + } } } @@ -13032,32 +10903,26 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.PublicAccessBlockConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case blockPublicAcls = "BlockPublicAcls" - case blockPublicPolicy = "BlockPublicPolicy" - case ignorePublicAcls = "IgnorePublicAcls" - case restrictPublicBuckets = "RestrictPublicBuckets" - } +extension S3ControlClientTypes.PublicAccessBlockConfiguration { static func writingClosure(_ value: S3ControlClientTypes.PublicAccessBlockConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("BlockPublicAcls")].write(value.blockPublicAcls) - try writer[.init("BlockPublicPolicy")].write(value.blockPublicPolicy) - try writer[.init("IgnorePublicAcls")].write(value.ignorePublicAcls) - try writer[.init("RestrictPublicBuckets")].write(value.restrictPublicBuckets) + try writer["BlockPublicAcls"].write(value.blockPublicAcls) + try writer["BlockPublicPolicy"].write(value.blockPublicPolicy) + try writer["IgnorePublicAcls"].write(value.ignorePublicAcls) + try writer["RestrictPublicBuckets"].write(value.restrictPublicBuckets) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let blockPublicAclsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blockPublicAcls) ?? false - blockPublicAcls = blockPublicAclsDecoded - let ignorePublicAclsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .ignorePublicAcls) ?? false - ignorePublicAcls = ignorePublicAclsDecoded - let blockPublicPolicyDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .blockPublicPolicy) ?? false - blockPublicPolicy = blockPublicPolicyDecoded - let restrictPublicBucketsDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .restrictPublicBuckets) ?? false - restrictPublicBuckets = restrictPublicBucketsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.PublicAccessBlockConfiguration() + value.blockPublicAcls = try reader["BlockPublicAcls"].readIfPresent() ?? false + value.ignorePublicAcls = try reader["IgnorePublicAcls"].readIfPresent() ?? false + value.blockPublicPolicy = try reader["BlockPublicPolicy"].readIfPresent() ?? false + value.restrictPublicBuckets = try reader["RestrictPublicBuckets"].readIfPresent() ?? false + return value + } } } @@ -13099,15 +10964,10 @@ extension S3ControlClientTypes { } extension PutAccessGrantsInstanceResourcePolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case organization = "Organization" - case policy = "Policy" - } - static func writingClosure(_ value: PutAccessGrantsInstanceResourcePolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Organization")].write(value.organization) - try writer[.init("Policy")].write(value.policy) + try writer["Organization"].write(value.organization) + try writer["Policy"].write(value.policy) } } @@ -13151,38 +11011,17 @@ public struct PutAccessGrantsInstanceResourcePolicyInput: Swift.Equatable { } } -struct PutAccessGrantsInstanceResourcePolicyInputBody: Swift.Equatable { - let policy: Swift.String? - let organization: Swift.String? -} - -extension PutAccessGrantsInstanceResourcePolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case organization = "Organization" - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - let organizationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organization) - organization = organizationDecoded - } -} +extension PutAccessGrantsInstanceResourcePolicyOutput { -extension PutAccessGrantsInstanceResourcePolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PutAccessGrantsInstanceResourcePolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.createdAt = output.createdAt - self.organization = output.organization - self.policy = output.policy - } else { - self.createdAt = nil - self.organization = nil - self.policy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = PutAccessGrantsInstanceResourcePolicyOutput() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.organization = try reader["Organization"].readIfPresent() + value.policy = try reader["Policy"].readIfPresent() + return value } } } @@ -13207,47 +11046,23 @@ public struct PutAccessGrantsInstanceResourcePolicyOutput: Swift.Equatable { } } -struct PutAccessGrantsInstanceResourcePolicyOutputBody: Swift.Equatable { - let policy: Swift.String? - let organization: Swift.String? - let createdAt: ClientRuntime.Date? -} - -extension PutAccessGrantsInstanceResourcePolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case createdAt = "CreatedAt" - case organization = "Organization" - case policy = "Policy" - } +enum PutAccessGrantsInstanceResourcePolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - let organizationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organization) - organization = organizationDecoded - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - } -} - -enum PutAccessGrantsInstanceResourcePolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutAccessPointConfigurationForObjectLambdaInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configuration = "Configuration" - } - static func writingClosure(_ value: PutAccessPointConfigurationForObjectLambdaInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Configuration")].write(value.configuration, writingClosure: S3ControlClientTypes.ObjectLambdaConfiguration.writingClosure(_:to:)) + try writer["Configuration"].write(value.configuration, writingClosure: S3ControlClientTypes.ObjectLambdaConfiguration.writingClosure(_:to:)) } } @@ -13295,24 +11110,12 @@ public struct PutAccessPointConfigurationForObjectLambdaInput: Swift.Equatable { } } -struct PutAccessPointConfigurationForObjectLambdaInputBody: Swift.Equatable { - let configuration: S3ControlClientTypes.ObjectLambdaConfiguration? -} +extension PutAccessPointConfigurationForObjectLambdaOutput { -extension PutAccessPointConfigurationForObjectLambdaInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configuration = "Configuration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ObjectLambdaConfiguration.self, forKey: .configuration) - configuration = configurationDecoded - } -} - -extension PutAccessPointConfigurationForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutAccessPointConfigurationForObjectLambdaOutput() + } } } @@ -13321,23 +11124,23 @@ public struct PutAccessPointConfigurationForObjectLambdaOutput: Swift.Equatable public init() { } } -enum PutAccessPointConfigurationForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutAccessPointConfigurationForObjectLambdaOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutAccessPointPolicyForObjectLambdaInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - static func writingClosure(_ value: PutAccessPointPolicyForObjectLambdaInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Policy")].write(value.policy) + try writer["Policy"].write(value.policy) } } @@ -13385,24 +11188,12 @@ public struct PutAccessPointPolicyForObjectLambdaInput: Swift.Equatable { } } -struct PutAccessPointPolicyForObjectLambdaInputBody: Swift.Equatable { - let policy: Swift.String? -} - -extension PutAccessPointPolicyForObjectLambdaInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} +extension PutAccessPointPolicyForObjectLambdaOutput { -extension PutAccessPointPolicyForObjectLambdaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutAccessPointPolicyForObjectLambdaOutput() + } } } @@ -13411,23 +11202,23 @@ public struct PutAccessPointPolicyForObjectLambdaOutput: Swift.Equatable { public init() { } } -enum PutAccessPointPolicyForObjectLambdaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutAccessPointPolicyForObjectLambdaOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutAccessPointPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - static func writingClosure(_ value: PutAccessPointPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Policy")].write(value.policy) + try writer["Policy"].write(value.policy) } } @@ -13475,24 +11266,12 @@ public struct PutAccessPointPolicyInput: Swift.Equatable { } } -struct PutAccessPointPolicyInputBody: Swift.Equatable { - let policy: Swift.String? -} - -extension PutAccessPointPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} +extension PutAccessPointPolicyOutput { -extension PutAccessPointPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutAccessPointPolicyOutput() + } } } @@ -13501,23 +11280,23 @@ public struct PutAccessPointPolicyOutput: Swift.Equatable { public init() { } } -enum PutAccessPointPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutAccessPointPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutBucketLifecycleConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case lifecycleConfiguration = "LifecycleConfiguration" - } - static func writingClosure(_ value: PutBucketLifecycleConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("LifecycleConfiguration")].write(value.lifecycleConfiguration, writingClosure: S3ControlClientTypes.LifecycleConfiguration.writingClosure(_:to:)) + try writer["LifecycleConfiguration"].write(value.lifecycleConfiguration, writingClosure: S3ControlClientTypes.LifecycleConfiguration.writingClosure(_:to:)) } } @@ -13564,24 +11343,12 @@ public struct PutBucketLifecycleConfigurationInput: Swift.Equatable { } } -struct PutBucketLifecycleConfigurationInputBody: Swift.Equatable { - let lifecycleConfiguration: S3ControlClientTypes.LifecycleConfiguration? -} +extension PutBucketLifecycleConfigurationOutput { -extension PutBucketLifecycleConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case lifecycleConfiguration = "LifecycleConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let lifecycleConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.LifecycleConfiguration.self, forKey: .lifecycleConfiguration) - lifecycleConfiguration = lifecycleConfigurationDecoded - } -} - -extension PutBucketLifecycleConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketLifecycleConfigurationOutput() + } } } @@ -13590,23 +11357,23 @@ public struct PutBucketLifecycleConfigurationOutput: Swift.Equatable { public init() { } } -enum PutBucketLifecycleConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutBucketLifecycleConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutBucketPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - static func writingClosure(_ value: PutBucketPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Policy")].write(value.policy) + try writer["Policy"].write(value.policy) } } @@ -13661,24 +11428,12 @@ public struct PutBucketPolicyInput: Swift.Equatable { } } -struct PutBucketPolicyInputBody: Swift.Equatable { - let policy: Swift.String? -} +extension PutBucketPolicyOutput { -extension PutBucketPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policy = "Policy" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} - -extension PutBucketPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketPolicyOutput() + } } } @@ -13687,23 +11442,23 @@ public struct PutBucketPolicyOutput: Swift.Equatable { public init() { } } -enum PutBucketPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutBucketPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutBucketReplicationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationConfiguration = "ReplicationConfiguration" - } - static func writingClosure(_ value: PutBucketReplicationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ReplicationConfiguration")].write(value.replicationConfiguration, writingClosure: S3ControlClientTypes.ReplicationConfiguration.writingClosure(_:to:)) + try writer["ReplicationConfiguration"].write(value.replicationConfiguration, writingClosure: S3ControlClientTypes.ReplicationConfiguration.writingClosure(_:to:)) } } @@ -13751,24 +11506,12 @@ public struct PutBucketReplicationInput: Swift.Equatable { } } -struct PutBucketReplicationInputBody: Swift.Equatable { - let replicationConfiguration: S3ControlClientTypes.ReplicationConfiguration? -} +extension PutBucketReplicationOutput { -extension PutBucketReplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicationConfiguration = "ReplicationConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let replicationConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationConfiguration.self, forKey: .replicationConfiguration) - replicationConfiguration = replicationConfigurationDecoded - } -} - -extension PutBucketReplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketReplicationOutput() + } } } @@ -13777,23 +11520,23 @@ public struct PutBucketReplicationOutput: Swift.Equatable { public init() { } } -enum PutBucketReplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutBucketReplicationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutBucketTaggingInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagging = "Tagging" - } - static func writingClosure(_ value: PutBucketTaggingInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Tagging")].write(value.tagging, writingClosure: S3ControlClientTypes.Tagging.writingClosure(_:to:)) + try writer["Tagging"].write(value.tagging, writingClosure: S3ControlClientTypes.Tagging.writingClosure(_:to:)) } } @@ -13841,24 +11584,12 @@ public struct PutBucketTaggingInput: Swift.Equatable { } } -struct PutBucketTaggingInputBody: Swift.Equatable { - let tagging: S3ControlClientTypes.Tagging? -} - -extension PutBucketTaggingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagging = "Tagging" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let taggingDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Tagging.self, forKey: .tagging) - tagging = taggingDecoded - } -} +extension PutBucketTaggingOutput { -extension PutBucketTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketTaggingOutput() + } } } @@ -13867,23 +11598,23 @@ public struct PutBucketTaggingOutput: Swift.Equatable { public init() { } } -enum PutBucketTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutBucketTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutBucketVersioningInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case versioningConfiguration = "VersioningConfiguration" - } - static func writingClosure(_ value: PutBucketVersioningInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("VersioningConfiguration")].write(value.versioningConfiguration, writingClosure: S3ControlClientTypes.VersioningConfiguration.writingClosure(_:to:)) + try writer["VersioningConfiguration"].write(value.versioningConfiguration, writingClosure: S3ControlClientTypes.VersioningConfiguration.writingClosure(_:to:)) } } @@ -13938,24 +11669,12 @@ public struct PutBucketVersioningInput: Swift.Equatable { } } -struct PutBucketVersioningInputBody: Swift.Equatable { - let versioningConfiguration: S3ControlClientTypes.VersioningConfiguration? -} - -extension PutBucketVersioningInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case versioningConfiguration = "VersioningConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let versioningConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.VersioningConfiguration.self, forKey: .versioningConfiguration) - versioningConfiguration = versioningConfigurationDecoded - } -} +extension PutBucketVersioningOutput { -extension PutBucketVersioningOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutBucketVersioningOutput() + } } } @@ -13964,23 +11683,23 @@ public struct PutBucketVersioningOutput: Swift.Equatable { public init() { } } -enum PutBucketVersioningOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutBucketVersioningOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutJobTaggingInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } - static func writingClosure(_ value: PutJobTaggingInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) } } @@ -14028,93 +11747,62 @@ public struct PutJobTaggingInput: Swift.Equatable { } } -struct PutJobTaggingInputBody: Swift.Equatable { - let tags: [S3ControlClientTypes.S3Tag]? -} - -extension PutJobTaggingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +extension PutJobTaggingOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutJobTaggingOutput() } } } -extension PutJobTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct PutJobTaggingOutput: Swift.Equatable { public init() { } } -enum PutJobTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRequestsException": return try await TooManyRequestsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyTagsException": return try await TooManyTagsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutJobTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "InternalServiceException": return try await InternalServiceException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NotFoundException": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRequestsException": return try await TooManyRequestsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyTagsException": return try await TooManyTagsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case policy = "Policy" - } +extension S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput { static func writingClosure(_ value: S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Name")].write(value.name) - try writer[.init("Policy")].write(value.policy) + try writer["Name"].write(value.name) + try writer["Policy"].write(value.policy) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput() + value.name = try reader["Name"].readIfPresent() + value.policy = try reader["Policy"].readIfPresent() + return value + } } } extension PutMultiRegionAccessPointPolicyInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case details = "Details" - } - static func writingClosure(_ value: PutMultiRegionAccessPointPolicyInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ClientToken")].write(value.clientToken) - try writer[.init("Details")].write(value.details, writingClosure: S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput.writingClosure(_:to:)) + try writer["ClientToken"].write(value.clientToken) + try writer["Details"].write(value.details, writingClosure: S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput.writingClosure(_:to:)) } } @@ -14181,34 +11869,15 @@ extension S3ControlClientTypes { } -struct PutMultiRegionAccessPointPolicyInputBody: Swift.Equatable { - let clientToken: Swift.String? - let details: S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput? -} +extension PutMultiRegionAccessPointPolicyOutput { -extension PutMultiRegionAccessPointPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case clientToken = "ClientToken" - case details = "Details" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let clientTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .clientToken) - clientToken = clientTokenDecoded - let detailsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PutMultiRegionAccessPointPolicyInput.self, forKey: .details) - details = detailsDecoded - } -} - -extension PutMultiRegionAccessPointPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PutMultiRegionAccessPointPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.requestTokenARN = output.requestTokenARN - } else { - self.requestTokenARN = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = PutMultiRegionAccessPointPolicyOutput() + value.requestTokenARN = try reader["RequestTokenARN"].readIfPresent() + return value } } } @@ -14225,39 +11894,23 @@ public struct PutMultiRegionAccessPointPolicyOutput: Swift.Equatable { } } -struct PutMultiRegionAccessPointPolicyOutputBody: Swift.Equatable { - let requestTokenARN: Swift.String? -} - -extension PutMultiRegionAccessPointPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case requestTokenARN = "RequestTokenARN" - } +enum PutMultiRegionAccessPointPolicyOutputError { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let requestTokenARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .requestTokenARN) - requestTokenARN = requestTokenARNDecoded - } -} - -enum PutMultiRegionAccessPointPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutPublicAccessBlockInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - } - static func writingClosure(_ value: PutPublicAccessBlockInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("PublicAccessBlockConfiguration")].write(value.publicAccessBlockConfiguration, writingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) + try writer["PublicAccessBlockConfiguration"].write(value.publicAccessBlockConfiguration, writingClosure: S3ControlClientTypes.PublicAccessBlockConfiguration.writingClosure(_:to:)) } } @@ -14297,24 +11950,12 @@ public struct PutPublicAccessBlockInput: Swift.Equatable { } } -struct PutPublicAccessBlockInputBody: Swift.Equatable { - let publicAccessBlockConfiguration: S3ControlClientTypes.PublicAccessBlockConfiguration? -} - -extension PutPublicAccessBlockInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publicAccessBlockConfiguration = "PublicAccessBlockConfiguration" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let publicAccessBlockConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.PublicAccessBlockConfiguration.self, forKey: .publicAccessBlockConfiguration) - publicAccessBlockConfiguration = publicAccessBlockConfigurationDecoded - } -} +extension PutPublicAccessBlockOutput { -extension PutPublicAccessBlockOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutPublicAccessBlockOutput() + } } } @@ -14323,25 +11964,24 @@ public struct PutPublicAccessBlockOutput: Swift.Equatable { public init() { } } -enum PutPublicAccessBlockOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutPublicAccessBlockOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutStorageLensConfigurationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageLensConfiguration = "StorageLensConfiguration" - case tags = "Tags" - } - static func writingClosure(_ value: PutStorageLensConfigurationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StorageLensConfiguration")].write(value.storageLensConfiguration, writingClosure: S3ControlClientTypes.StorageLensConfiguration.writingClosure(_:to:)) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.StorageLensTag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) + try writer["StorageLensConfiguration"].write(value.storageLensConfiguration, writingClosure: S3ControlClientTypes.StorageLensConfiguration.writingClosure(_:to:)) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.StorageLensTag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) } } @@ -14393,45 +12033,12 @@ public struct PutStorageLensConfigurationInput: Swift.Equatable { } } -struct PutStorageLensConfigurationInputBody: Swift.Equatable { - let storageLensConfiguration: S3ControlClientTypes.StorageLensConfiguration? - let tags: [S3ControlClientTypes.StorageLensTag]? -} - -extension PutStorageLensConfigurationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageLensConfiguration = "StorageLensConfiguration" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageLensConfigurationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensConfiguration.self, forKey: .storageLensConfiguration) - storageLensConfiguration = storageLensConfigurationDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.StorageLensTag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.StorageLensTag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.StorageLensTag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension PutStorageLensConfigurationOutput { -extension PutStorageLensConfigurationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutStorageLensConfigurationOutput() + } } } @@ -14440,23 +12047,23 @@ public struct PutStorageLensConfigurationOutput: Swift.Equatable { public init() { } } -enum PutStorageLensConfigurationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutStorageLensConfigurationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension PutStorageLensConfigurationTaggingInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } - static func writingClosure(_ value: PutStorageLensConfigurationTaggingInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.StorageLensTag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.StorageLensTag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) } } @@ -14504,76 +12111,49 @@ public struct PutStorageLensConfigurationTaggingInput: Swift.Equatable { } } -struct PutStorageLensConfigurationTaggingInputBody: Swift.Equatable { - let tags: [S3ControlClientTypes.StorageLensTag]? -} - -extension PutStorageLensConfigurationTaggingInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +extension PutStorageLensConfigurationTaggingOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.StorageLensTag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.StorageLensTag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.StorageLensTag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutStorageLensConfigurationTaggingOutput() } } } -extension PutStorageLensConfigurationTaggingOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct PutStorageLensConfigurationTaggingOutput: Swift.Equatable { public init() { } } -enum PutStorageLensConfigurationTaggingOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutStorageLensConfigurationTaggingOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.Region: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case bucketAccountId = "BucketAccountId" - } +extension S3ControlClientTypes.Region { static func writingClosure(_ value: S3ControlClientTypes.Region?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("BucketAccountId")].write(value.bucketAccountId) + try writer["Bucket"].write(value.bucket) + try writer["BucketAccountId"].write(value.bucketAccountId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let bucketAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketAccountId) - bucketAccountId = bucketAccountIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Region() + value.bucket = try reader["Bucket"].readIfPresent() + value.bucketAccountId = try reader["BucketAccountId"].readIfPresent() + return value + } } } @@ -14598,28 +12178,24 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.RegionReport: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case bucketAccountId = "BucketAccountId" - case region = "Region" - } +extension S3ControlClientTypes.RegionReport { static func writingClosure(_ value: S3ControlClientTypes.RegionReport?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("BucketAccountId")].write(value.bucketAccountId) - try writer[.init("Region")].write(value.region) + try writer["Bucket"].write(value.bucket) + try writer["BucketAccountId"].write(value.bucketAccountId) + try writer["Region"].write(value.region) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let regionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .region) - region = regionDecoded - let bucketAccountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketAccountId) - bucketAccountId = bucketAccountIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.RegionReport() + value.bucket = try reader["Bucket"].readIfPresent() + value.region = try reader["Region"].readIfPresent() + value.bucketAccountId = try reader["BucketAccountId"].readIfPresent() + return value + } } } @@ -14647,36 +12223,28 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.RegionalBucket: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case bucketArn = "BucketArn" - case creationDate = "CreationDate" - case outpostId = "OutpostId" - case publicAccessBlockEnabled = "PublicAccessBlockEnabled" - } +extension S3ControlClientTypes.RegionalBucket { static func writingClosure(_ value: S3ControlClientTypes.RegionalBucket?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("BucketArn")].write(value.bucketArn) - try writer[.init("CreationDate")].writeTimestamp(value.creationDate, format: .dateTime) - try writer[.init("OutpostId")].write(value.outpostId) - try writer[.init("PublicAccessBlockEnabled")].write(value.publicAccessBlockEnabled) + try writer["Bucket"].write(value.bucket) + try writer["BucketArn"].write(value.bucketArn) + try writer["CreationDate"].writeTimestamp(value.creationDate, format: .dateTime) + try writer["OutpostId"].write(value.outpostId) + try writer["PublicAccessBlockEnabled"].write(value.publicAccessBlockEnabled) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let bucketArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketArn) - bucketArn = bucketArnDecoded - let publicAccessBlockEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .publicAccessBlockEnabled) ?? false - publicAccessBlockEnabled = publicAccessBlockEnabledDecoded - let creationDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .creationDate) - creationDate = creationDateDecoded - let outpostIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .outpostId) - outpostId = outpostIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.RegionalBucket() + value.bucket = try reader["Bucket"].readIfPresent() + value.bucketArn = try reader["BucketArn"].readIfPresent() + value.publicAccessBlockEnabled = try reader["PublicAccessBlockEnabled"].readIfPresent() ?? false + value.creationDate = try reader["CreationDate"].readTimestampIfPresent(format: .dateTime) + value.outpostId = try reader["OutpostId"].readIfPresent() + return value + } } } @@ -14715,20 +12283,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ReplicaModifications: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ControlClientTypes.ReplicaModifications { static func writingClosure(_ value: S3ControlClientTypes.ReplicaModifications?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicaModificationsStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ReplicaModifications() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -14781,40 +12349,21 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.ReplicationConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case role = "Role" - case rules = "Rules" - } +extension S3ControlClientTypes.ReplicationConfiguration { static func writingClosure(_ value: S3ControlClientTypes.ReplicationConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Role")].write(value.role) - try writer[.init("Rules")].writeList(value.rules, memberWritingClosure: S3ControlClientTypes.ReplicationRule.writingClosure(_:to:), memberNodeInfo: .init("Rule"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .role) - role = roleDecoded - if containerValues.contains(.rules) { - struct KeyVal0{struct Rule{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([S3ControlClientTypes.ReplicationRule].self, forKey: .member) - var rulesBuffer:[S3ControlClientTypes.ReplicationRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [S3ControlClientTypes.ReplicationRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] - } - } else { - rules = nil + try writer["Role"].write(value.role) + try writer["Rules"].writeList(value.rules, memberWritingClosure: S3ControlClientTypes.ReplicationRule.writingClosure(_:to:), memberNodeInfo: "Rule", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ReplicationConfiguration() + value.role = try reader["Role"].readIfPresent() + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.ReplicationRule.readingClosure, memberNodeInfo: "Rule", isFlattened: false) + return value } } } @@ -14841,56 +12390,38 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ReplicationRule: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case deleteMarkerReplication = "DeleteMarkerReplication" - case destination = "Destination" - case existingObjectReplication = "ExistingObjectReplication" - case filter = "Filter" - case id = "ID" - case `prefix` = "Prefix" - case priority = "Priority" - case sourceSelectionCriteria = "SourceSelectionCriteria" - case status = "Status" - } +extension S3ControlClientTypes.ReplicationRule { static func writingClosure(_ value: S3ControlClientTypes.ReplicationRule?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("DeleteMarkerReplication")].write(value.deleteMarkerReplication, writingClosure: S3ControlClientTypes.DeleteMarkerReplication.writingClosure(_:to:)) - try writer[.init("Destination")].write(value.destination, writingClosure: S3ControlClientTypes.Destination.writingClosure(_:to:)) - try writer[.init("ExistingObjectReplication")].write(value.existingObjectReplication, writingClosure: S3ControlClientTypes.ExistingObjectReplication.writingClosure(_:to:)) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ControlClientTypes.ReplicationRuleFilter.writingClosure(_:to:)) - try writer[.init("ID")].write(value.id) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Priority")].write(value.priority) - try writer[.init("SourceSelectionCriteria")].write(value.sourceSelectionCriteria, writingClosure: S3ControlClientTypes.SourceSelectionCriteria.writingClosure(_:to:)) - try writer[.init("Status")].write(value.status) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) ?? nil - priority = priorityDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationRuleFilter.self, forKey: .filter) - filter = filterDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationRuleStatus.self, forKey: .status) - status = statusDecoded - let sourceSelectionCriteriaDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.SourceSelectionCriteria.self, forKey: .sourceSelectionCriteria) - sourceSelectionCriteria = sourceSelectionCriteriaDecoded - let existingObjectReplicationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ExistingObjectReplication.self, forKey: .existingObjectReplication) - existingObjectReplication = existingObjectReplicationDecoded - let destinationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Destination.self, forKey: .destination) - destination = destinationDecoded - let deleteMarkerReplicationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.DeleteMarkerReplication.self, forKey: .deleteMarkerReplication) - deleteMarkerReplication = deleteMarkerReplicationDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded + try writer["Bucket"].write(value.bucket) + try writer["DeleteMarkerReplication"].write(value.deleteMarkerReplication, writingClosure: S3ControlClientTypes.DeleteMarkerReplication.writingClosure(_:to:)) + try writer["Destination"].write(value.destination, writingClosure: S3ControlClientTypes.Destination.writingClosure(_:to:)) + try writer["ExistingObjectReplication"].write(value.existingObjectReplication, writingClosure: S3ControlClientTypes.ExistingObjectReplication.writingClosure(_:to:)) + try writer["Filter"].write(value.filter, writingClosure: S3ControlClientTypes.ReplicationRuleFilter.writingClosure(_:to:)) + try writer["ID"].write(value.id) + try writer["Prefix"].write(value.`prefix`) + try writer["Priority"].write(value.priority) + try writer["SourceSelectionCriteria"].write(value.sourceSelectionCriteria, writingClosure: S3ControlClientTypes.SourceSelectionCriteria.writingClosure(_:to:)) + try writer["Status"].write(value.status) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ReplicationRule() + value.id = try reader["ID"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ControlClientTypes.ReplicationRuleFilter.readingClosure) + value.status = try reader["Status"].readIfPresent() + value.sourceSelectionCriteria = try reader["SourceSelectionCriteria"].readIfPresent(readingClosure: S3ControlClientTypes.SourceSelectionCriteria.readingClosure) + value.existingObjectReplication = try reader["ExistingObjectReplication"].readIfPresent(readingClosure: S3ControlClientTypes.ExistingObjectReplication.readingClosure) + value.destination = try reader["Destination"].readIfPresent(readingClosure: S3ControlClientTypes.Destination.readingClosure) + value.deleteMarkerReplication = try reader["DeleteMarkerReplication"].readIfPresent(readingClosure: S3ControlClientTypes.DeleteMarkerReplication.readingClosure) + value.bucket = try reader["Bucket"].readIfPresent() + return value + } } } @@ -14950,40 +12481,21 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ReplicationRuleAndOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case `prefix` = "Prefix" - case tags = "Tags" - } +extension S3ControlClientTypes.ReplicationRuleAndOperator { static func writingClosure(_ value: S3ControlClientTypes.ReplicationRuleAndOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + try writer["Prefix"].write(value.`prefix`) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ReplicationRuleAndOperator() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15012,28 +12524,24 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.ReplicationRuleFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case and = "And" - case `prefix` = "Prefix" - case tag = "Tag" - } +extension S3ControlClientTypes.ReplicationRuleFilter { static func writingClosure(_ value: S3ControlClientTypes.ReplicationRuleFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("And")].write(value.and, writingClosure: S3ControlClientTypes.ReplicationRuleAndOperator.writingClosure(_:to:)) - try writer[.init("Prefix")].write(value.`prefix`) - try writer[.init("Tag")].write(value.tag, writingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:)) + try writer["And"].write(value.and, writingClosure: S3ControlClientTypes.ReplicationRuleAndOperator.writingClosure(_:to:)) + try writer["Prefix"].write(value.`prefix`) + try writer["Tag"].write(value.tag, writingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let tagDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3Tag.self, forKey: .tag) - tag = tagDecoded - let andDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationRuleAndOperator.self, forKey: .and) - and = andDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ReplicationRuleFilter() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.tag = try reader["Tag"].readIfPresent(readingClosure: S3ControlClientTypes.S3Tag.readingClosure) + value.and = try reader["And"].readIfPresent(readingClosure: S3ControlClientTypes.ReplicationRuleAndOperator.readingClosure) + return value + } } } @@ -15188,24 +12696,22 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.ReplicationTime: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - case time = "Time" - } +extension S3ControlClientTypes.ReplicationTime { static func writingClosure(_ value: S3ControlClientTypes.ReplicationTime?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) - try writer[.init("Time")].write(value.time, writingClosure: S3ControlClientTypes.ReplicationTimeValue.writingClosure(_:to:)) + try writer["Status"].write(value.status) + try writer["Time"].write(value.time, writingClosure: S3ControlClientTypes.ReplicationTimeValue.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationTimeStatus.self, forKey: .status) - status = statusDecoded - let timeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicationTimeValue.self, forKey: .time) - time = timeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ReplicationTime() + value.status = try reader["Status"].readIfPresent() + value.time = try reader["Time"].readIfPresent(readingClosure: S3ControlClientTypes.ReplicationTimeValue.readingClosure) + return value + } } } @@ -15263,20 +12769,20 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.ReplicationTimeValue: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case minutes = "Minutes" - } +extension S3ControlClientTypes.ReplicationTimeValue { static func writingClosure(_ value: S3ControlClientTypes.ReplicationTimeValue?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Minutes")].write(value.minutes) + try writer["Minutes"].write(value.minutes) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let minutesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .minutes) ?? nil - minutes = minutesDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.ReplicationTimeValue() + value.minutes = try reader["Minutes"].readIfPresent() + return value + } } } @@ -15328,40 +12834,21 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.S3AccessControlList: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case grants = "Grants" - case owner = "Owner" - } +extension S3ControlClientTypes.S3AccessControlList { static func writingClosure(_ value: S3ControlClientTypes.S3AccessControlList?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Grants")].writeList(value.grants, memberWritingClosure: S3ControlClientTypes.S3Grant.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("Owner")].write(value.owner, writingClosure: S3ControlClientTypes.S3ObjectOwner.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ownerDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ObjectOwner.self, forKey: .owner) - owner = ownerDecoded - if containerValues.contains(.grants) { - struct KeyVal0{struct member{}} - let grantsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .grants) - if let grantsWrappedContainer = grantsWrappedContainer { - let grantsContainer = try grantsWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Grant].self, forKey: .member) - var grantsBuffer:[S3ControlClientTypes.S3Grant]? = nil - if let grantsContainer = grantsContainer { - grantsBuffer = [S3ControlClientTypes.S3Grant]() - for structureContainer0 in grantsContainer { - grantsBuffer?.append(structureContainer0) - } - } - grants = grantsBuffer - } else { - grants = [] - } - } else { - grants = nil + try writer["Grants"].writeList(value.grants, memberWritingClosure: S3ControlClientTypes.S3Grant.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["Owner"].write(value.owner, writingClosure: S3ControlClientTypes.S3ObjectOwner.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3AccessControlList() + value.owner = try reader["Owner"].readIfPresent(readingClosure: S3ControlClientTypes.S3ObjectOwner.readingClosure) + value.grants = try reader["Grants"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Grant.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -15387,24 +12874,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3AccessControlPolicy: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlList = "AccessControlList" - case cannedAccessControlList = "CannedAccessControlList" - } +extension S3ControlClientTypes.S3AccessControlPolicy { static func writingClosure(_ value: S3ControlClientTypes.S3AccessControlPolicy?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlList")].write(value.accessControlList, writingClosure: S3ControlClientTypes.S3AccessControlList.writingClosure(_:to:)) - try writer[.init("CannedAccessControlList")].write(value.cannedAccessControlList) + try writer["AccessControlList"].write(value.accessControlList, writingClosure: S3ControlClientTypes.S3AccessControlList.writingClosure(_:to:)) + try writer["CannedAccessControlList"].write(value.cannedAccessControlList) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessControlListDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3AccessControlList.self, forKey: .accessControlList) - accessControlList = accessControlListDecoded - let cannedAccessControlListDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3CannedAccessControlList.self, forKey: .cannedAccessControlList) - cannedAccessControlList = cannedAccessControlListDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3AccessControlPolicy() + value.accessControlList = try reader["AccessControlList"].readIfPresent(readingClosure: S3ControlClientTypes.S3AccessControlList.readingClosure) + value.cannedAccessControlList = try reader["CannedAccessControlList"].readIfPresent() + return value + } } } @@ -15428,40 +12913,30 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3BucketDestination: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountId = "AccountId" - case arn = "Arn" - case encryption = "Encryption" - case format = "Format" - case outputSchemaVersion = "OutputSchemaVersion" - case `prefix` = "Prefix" - } +extension S3ControlClientTypes.S3BucketDestination { static func writingClosure(_ value: S3ControlClientTypes.S3BucketDestination?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccountId")].write(value.accountId) - try writer[.init("Arn")].write(value.arn) - try writer[.init("Encryption")].write(value.encryption, writingClosure: S3ControlClientTypes.StorageLensDataExportEncryption.writingClosure(_:to:)) - try writer[.init("Format")].write(value.format) - try writer[.init("OutputSchemaVersion")].write(value.outputSchemaVersion) - try writer[.init("Prefix")].write(value.`prefix`) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let formatDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Format.self, forKey: .format) - format = formatDecoded - let outputSchemaVersionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.OutputSchemaVersion.self, forKey: .outputSchemaVersion) - outputSchemaVersion = outputSchemaVersionDecoded - let accountIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accountId) - accountId = accountIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - let prefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .prefix) - `prefix` = prefixDecoded - let encryptionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensDataExportEncryption.self, forKey: .encryption) - encryption = encryptionDecoded + try writer["AccountId"].write(value.accountId) + try writer["Arn"].write(value.arn) + try writer["Encryption"].write(value.encryption, writingClosure: S3ControlClientTypes.StorageLensDataExportEncryption.writingClosure(_:to:)) + try writer["Format"].write(value.format) + try writer["OutputSchemaVersion"].write(value.outputSchemaVersion) + try writer["Prefix"].write(value.`prefix`) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3BucketDestination() + value.format = try reader["Format"].readIfPresent() + value.outputSchemaVersion = try reader["OutputSchemaVersion"].readIfPresent() + value.accountId = try reader["AccountId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.`prefix` = try reader["Prefix"].readIfPresent() + value.encryption = try reader["Encryption"].readIfPresent(readingClosure: S3ControlClientTypes.StorageLensDataExportEncryption.readingClosure) + return value + } } } @@ -15592,122 +13067,54 @@ extension S3ControlClientTypes { public enum S3ControlClientTypes {} -extension S3ControlClientTypes.S3CopyObjectOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlGrants = "AccessControlGrants" - case bucketKeyEnabled = "BucketKeyEnabled" - case cannedAccessControlList = "CannedAccessControlList" - case checksumAlgorithm = "ChecksumAlgorithm" - case metadataDirective = "MetadataDirective" - case modifiedSinceConstraint = "ModifiedSinceConstraint" - case newObjectMetadata = "NewObjectMetadata" - case newObjectTagging = "NewObjectTagging" - case objectLockLegalHoldStatus = "ObjectLockLegalHoldStatus" - case objectLockMode = "ObjectLockMode" - case objectLockRetainUntilDate = "ObjectLockRetainUntilDate" - case redirectLocation = "RedirectLocation" - case requesterPays = "RequesterPays" - case sseAwsKmsKeyId = "SSEAwsKmsKeyId" - case storageClass = "StorageClass" - case targetKeyPrefix = "TargetKeyPrefix" - case targetResource = "TargetResource" - case unModifiedSinceConstraint = "UnModifiedSinceConstraint" - } +extension S3ControlClientTypes.S3CopyObjectOperation { static func writingClosure(_ value: S3ControlClientTypes.S3CopyObjectOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlGrants")].writeList(value.accessControlGrants, memberWritingClosure: S3ControlClientTypes.S3Grant.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("BucketKeyEnabled")].write(value.bucketKeyEnabled) - try writer[.init("CannedAccessControlList")].write(value.cannedAccessControlList) - try writer[.init("ChecksumAlgorithm")].write(value.checksumAlgorithm) - try writer[.init("MetadataDirective")].write(value.metadataDirective) - try writer[.init("ModifiedSinceConstraint")].writeTimestamp(value.modifiedSinceConstraint, format: .dateTime) - try writer[.init("NewObjectMetadata")].write(value.newObjectMetadata, writingClosure: S3ControlClientTypes.S3ObjectMetadata.writingClosure(_:to:)) - try writer[.init("NewObjectTagging")].writeList(value.newObjectTagging, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - try writer[.init("ObjectLockLegalHoldStatus")].write(value.objectLockLegalHoldStatus) - try writer[.init("ObjectLockMode")].write(value.objectLockMode) - try writer[.init("ObjectLockRetainUntilDate")].writeTimestamp(value.objectLockRetainUntilDate, format: .dateTime) - try writer[.init("RedirectLocation")].write(value.redirectLocation) - try writer[.init("RequesterPays")].write(value.requesterPays) - try writer[.init("SSEAwsKmsKeyId")].write(value.sseAwsKmsKeyId) - try writer[.init("StorageClass")].write(value.storageClass) - try writer[.init("TargetKeyPrefix")].write(value.targetKeyPrefix) - try writer[.init("TargetResource")].write(value.targetResource) - try writer[.init("UnModifiedSinceConstraint")].writeTimestamp(value.unModifiedSinceConstraint, format: .dateTime) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let targetResourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetResource) - targetResource = targetResourceDecoded - let cannedAccessControlListDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3CannedAccessControlList.self, forKey: .cannedAccessControlList) - cannedAccessControlList = cannedAccessControlListDecoded - if containerValues.contains(.accessControlGrants) { - struct KeyVal0{struct member{}} - let accessControlGrantsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .accessControlGrants) - if let accessControlGrantsWrappedContainer = accessControlGrantsWrappedContainer { - let accessControlGrantsContainer = try accessControlGrantsWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Grant].self, forKey: .member) - var accessControlGrantsBuffer:[S3ControlClientTypes.S3Grant]? = nil - if let accessControlGrantsContainer = accessControlGrantsContainer { - accessControlGrantsBuffer = [S3ControlClientTypes.S3Grant]() - for structureContainer0 in accessControlGrantsContainer { - accessControlGrantsBuffer?.append(structureContainer0) - } - } - accessControlGrants = accessControlGrantsBuffer - } else { - accessControlGrants = [] - } - } else { - accessControlGrants = nil - } - let metadataDirectiveDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3MetadataDirective.self, forKey: .metadataDirective) - metadataDirective = metadataDirectiveDecoded - let modifiedSinceConstraintDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .modifiedSinceConstraint) - modifiedSinceConstraint = modifiedSinceConstraintDecoded - let newObjectMetadataDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ObjectMetadata.self, forKey: .newObjectMetadata) - newObjectMetadata = newObjectMetadataDecoded - if containerValues.contains(.newObjectTagging) { - struct KeyVal0{struct member{}} - let newObjectTaggingWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .newObjectTagging) - if let newObjectTaggingWrappedContainer = newObjectTaggingWrappedContainer { - let newObjectTaggingContainer = try newObjectTaggingWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var newObjectTaggingBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let newObjectTaggingContainer = newObjectTaggingContainer { - newObjectTaggingBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in newObjectTaggingContainer { - newObjectTaggingBuffer?.append(structureContainer0) - } - } - newObjectTagging = newObjectTaggingBuffer - } else { - newObjectTagging = [] - } - } else { - newObjectTagging = nil - } - let redirectLocationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .redirectLocation) - redirectLocation = redirectLocationDecoded - let requesterPaysDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requesterPays) ?? false - requesterPays = requesterPaysDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3StorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded - let unModifiedSinceConstraintDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .unModifiedSinceConstraint) - unModifiedSinceConstraint = unModifiedSinceConstraintDecoded - let sseAwsKmsKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sseAwsKmsKeyId) - sseAwsKmsKeyId = sseAwsKmsKeyIdDecoded - let targetKeyPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetKeyPrefix) - targetKeyPrefix = targetKeyPrefixDecoded - let objectLockLegalHoldStatusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ObjectLockLegalHoldStatus.self, forKey: .objectLockLegalHoldStatus) - objectLockLegalHoldStatus = objectLockLegalHoldStatusDecoded - let objectLockModeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ObjectLockMode.self, forKey: .objectLockMode) - objectLockMode = objectLockModeDecoded - let objectLockRetainUntilDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .objectLockRetainUntilDate) - objectLockRetainUntilDate = objectLockRetainUntilDateDecoded - let bucketKeyEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .bucketKeyEnabled) ?? false - bucketKeyEnabled = bucketKeyEnabledDecoded - let checksumAlgorithmDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ChecksumAlgorithm.self, forKey: .checksumAlgorithm) - checksumAlgorithm = checksumAlgorithmDecoded + try writer["AccessControlGrants"].writeList(value.accessControlGrants, memberWritingClosure: S3ControlClientTypes.S3Grant.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["BucketKeyEnabled"].write(value.bucketKeyEnabled) + try writer["CannedAccessControlList"].write(value.cannedAccessControlList) + try writer["ChecksumAlgorithm"].write(value.checksumAlgorithm) + try writer["MetadataDirective"].write(value.metadataDirective) + try writer["ModifiedSinceConstraint"].writeTimestamp(value.modifiedSinceConstraint, format: .dateTime) + try writer["NewObjectMetadata"].write(value.newObjectMetadata, writingClosure: S3ControlClientTypes.S3ObjectMetadata.writingClosure(_:to:)) + try writer["NewObjectTagging"].writeList(value.newObjectTagging, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + try writer["ObjectLockLegalHoldStatus"].write(value.objectLockLegalHoldStatus) + try writer["ObjectLockMode"].write(value.objectLockMode) + try writer["ObjectLockRetainUntilDate"].writeTimestamp(value.objectLockRetainUntilDate, format: .dateTime) + try writer["RedirectLocation"].write(value.redirectLocation) + try writer["RequesterPays"].write(value.requesterPays) + try writer["SSEAwsKmsKeyId"].write(value.sseAwsKmsKeyId) + try writer["StorageClass"].write(value.storageClass) + try writer["TargetKeyPrefix"].write(value.targetKeyPrefix) + try writer["TargetResource"].write(value.targetResource) + try writer["UnModifiedSinceConstraint"].writeTimestamp(value.unModifiedSinceConstraint, format: .dateTime) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3CopyObjectOperation() + value.targetResource = try reader["TargetResource"].readIfPresent() + value.cannedAccessControlList = try reader["CannedAccessControlList"].readIfPresent() + value.accessControlGrants = try reader["AccessControlGrants"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Grant.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.metadataDirective = try reader["MetadataDirective"].readIfPresent() + value.modifiedSinceConstraint = try reader["ModifiedSinceConstraint"].readTimestampIfPresent(format: .dateTime) + value.newObjectMetadata = try reader["NewObjectMetadata"].readIfPresent(readingClosure: S3ControlClientTypes.S3ObjectMetadata.readingClosure) + value.newObjectTagging = try reader["NewObjectTagging"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.redirectLocation = try reader["RedirectLocation"].readIfPresent() + value.requesterPays = try reader["RequesterPays"].readIfPresent() ?? false + value.storageClass = try reader["StorageClass"].readIfPresent() + value.unModifiedSinceConstraint = try reader["UnModifiedSinceConstraint"].readTimestampIfPresent(format: .dateTime) + value.sseAwsKmsKeyId = try reader["SSEAwsKmsKeyId"].readIfPresent() + value.targetKeyPrefix = try reader["TargetKeyPrefix"].readIfPresent() + value.objectLockLegalHoldStatus = try reader["ObjectLockLegalHoldStatus"].readIfPresent() + value.objectLockMode = try reader["ObjectLockMode"].readIfPresent() + value.objectLockRetainUntilDate = try reader["ObjectLockRetainUntilDate"].readTimestampIfPresent(format: .dateTime) + value.bucketKeyEnabled = try reader["BucketKeyEnabled"].readIfPresent() ?? false + value.checksumAlgorithm = try reader["ChecksumAlgorithm"].readIfPresent() + return value + } } } @@ -15799,13 +13206,17 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3DeleteObjectTaggingOperation: Swift.Decodable { +extension S3ControlClientTypes.S3DeleteObjectTaggingOperation { static func writingClosure(_ value: S3ControlClientTypes.S3DeleteObjectTaggingOperation?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ControlClientTypes.S3DeleteObjectTaggingOperation() + } } } @@ -15818,24 +13229,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3GeneratedManifestDescriptor: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case format = "Format" - case location = "Location" - } +extension S3ControlClientTypes.S3GeneratedManifestDescriptor { static func writingClosure(_ value: S3ControlClientTypes.S3GeneratedManifestDescriptor?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Format")].write(value.format) - try writer[.init("Location")].write(value.location, writingClosure: S3ControlClientTypes.JobManifestLocation.writingClosure(_:to:)) + try writer["Format"].write(value.format) + try writer["Location"].write(value.location, writingClosure: S3ControlClientTypes.JobManifestLocation.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let formatDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.GeneratedManifestFormat.self, forKey: .format) - format = formatDecoded - let locationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifestLocation.self, forKey: .location) - location = locationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3GeneratedManifestDescriptor() + value.format = try reader["Format"].readIfPresent() + value.location = try reader["Location"].readIfPresent(readingClosure: S3ControlClientTypes.JobManifestLocation.readingClosure) + return value + } } } @@ -15891,24 +13300,22 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.S3Grant: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case grantee = "Grantee" - case permission = "Permission" - } +extension S3ControlClientTypes.S3Grant { static func writingClosure(_ value: S3ControlClientTypes.S3Grant?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Grantee")].write(value.grantee, writingClosure: S3ControlClientTypes.S3Grantee.writingClosure(_:to:)) - try writer[.init("Permission")].write(value.permission) + try writer["Grantee"].write(value.grantee, writingClosure: S3ControlClientTypes.S3Grantee.writingClosure(_:to:)) + try writer["Permission"].write(value.permission) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let granteeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3Grantee.self, forKey: .grantee) - grantee = granteeDecoded - let permissionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3Permission.self, forKey: .permission) - permission = permissionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3Grant() + value.grantee = try reader["Grantee"].readIfPresent(readingClosure: S3ControlClientTypes.S3Grantee.readingClosure) + value.permission = try reader["Permission"].readIfPresent() + return value + } } } @@ -15932,28 +13339,24 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3Grantee: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case displayName = "DisplayName" - case identifier = "Identifier" - case typeIdentifier = "TypeIdentifier" - } +extension S3ControlClientTypes.S3Grantee { static func writingClosure(_ value: S3ControlClientTypes.S3Grantee?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DisplayName")].write(value.displayName) - try writer[.init("Identifier")].write(value.identifier) - try writer[.init("TypeIdentifier")].write(value.typeIdentifier) + try writer["DisplayName"].write(value.displayName) + try writer["Identifier"].write(value.identifier) + try writer["TypeIdentifier"].write(value.typeIdentifier) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let typeIdentifierDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3GranteeTypeIdentifier.self, forKey: .typeIdentifier) - typeIdentifier = typeIdentifierDecoded - let identifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identifier) - identifier = identifierDecoded - let displayNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .displayName) - displayName = displayNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3Grantee() + value.typeIdentifier = try reader["TypeIdentifier"].readIfPresent() + value.identifier = try reader["Identifier"].readIfPresent() + value.displayName = try reader["DisplayName"].readIfPresent() + return value + } } } @@ -16016,24 +13419,22 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.S3InitiateRestoreObjectOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case expirationInDays = "ExpirationInDays" - case glacierJobTier = "GlacierJobTier" - } +extension S3ControlClientTypes.S3InitiateRestoreObjectOperation { static func writingClosure(_ value: S3ControlClientTypes.S3InitiateRestoreObjectOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ExpirationInDays")].write(value.expirationInDays) - try writer[.init("GlacierJobTier")].write(value.glacierJobTier) + try writer["ExpirationInDays"].write(value.expirationInDays) + try writer["GlacierJobTier"].write(value.glacierJobTier) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let expirationInDaysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .expirationInDays) ?? nil - expirationInDays = expirationInDaysDecoded - let glacierJobTierDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3GlacierJobTier.self, forKey: .glacierJobTier) - glacierJobTier = glacierJobTierDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3InitiateRestoreObjectOperation() + value.expirationInDays = try reader["ExpirationInDays"].readIfPresent() + value.glacierJobTier = try reader["GlacierJobTier"].readIfPresent() + return value + } } } @@ -16057,36 +13458,28 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3JobManifestGenerator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enableManifestOutput = "EnableManifestOutput" - case expectedBucketOwner = "ExpectedBucketOwner" - case filter = "Filter" - case manifestOutputLocation = "ManifestOutputLocation" - case sourceBucket = "SourceBucket" - } +extension S3ControlClientTypes.S3JobManifestGenerator { static func writingClosure(_ value: S3ControlClientTypes.S3JobManifestGenerator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("EnableManifestOutput")].write(value.enableManifestOutput) - try writer[.init("ExpectedBucketOwner")].write(value.expectedBucketOwner) - try writer[.init("Filter")].write(value.filter, writingClosure: S3ControlClientTypes.JobManifestGeneratorFilter.writingClosure(_:to:)) - try writer[.init("ManifestOutputLocation")].write(value.manifestOutputLocation, writingClosure: S3ControlClientTypes.S3ManifestOutputLocation.writingClosure(_:to:)) - try writer[.init("SourceBucket")].write(value.sourceBucket) + try writer["EnableManifestOutput"].write(value.enableManifestOutput) + try writer["ExpectedBucketOwner"].write(value.expectedBucketOwner) + try writer["Filter"].write(value.filter, writingClosure: S3ControlClientTypes.JobManifestGeneratorFilter.writingClosure(_:to:)) + try writer["ManifestOutputLocation"].write(value.manifestOutputLocation, writingClosure: S3ControlClientTypes.S3ManifestOutputLocation.writingClosure(_:to:)) + try writer["SourceBucket"].write(value.sourceBucket) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let expectedBucketOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expectedBucketOwner) - expectedBucketOwner = expectedBucketOwnerDecoded - let sourceBucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceBucket) - sourceBucket = sourceBucketDecoded - let manifestOutputLocationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ManifestOutputLocation.self, forKey: .manifestOutputLocation) - manifestOutputLocation = manifestOutputLocationDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobManifestGeneratorFilter.self, forKey: .filter) - filter = filterDecoded - let enableManifestOutputDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enableManifestOutput) ?? false - enableManifestOutput = enableManifestOutputDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3JobManifestGenerator() + value.expectedBucketOwner = try reader["ExpectedBucketOwner"].readIfPresent() + value.sourceBucket = try reader["SourceBucket"].readIfPresent() + value.manifestOutputLocation = try reader["ManifestOutputLocation"].readIfPresent(readingClosure: S3ControlClientTypes.S3ManifestOutputLocation.readingClosure) + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ControlClientTypes.JobManifestGeneratorFilter.readingClosure) + value.enableManifestOutput = try reader["EnableManifestOutput"].readIfPresent() ?? false + return value + } } } @@ -16124,36 +13517,28 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3ManifestOutputLocation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case expectedManifestBucketOwner = "ExpectedManifestBucketOwner" - case manifestEncryption = "ManifestEncryption" - case manifestFormat = "ManifestFormat" - case manifestPrefix = "ManifestPrefix" - } +extension S3ControlClientTypes.S3ManifestOutputLocation { static func writingClosure(_ value: S3ControlClientTypes.S3ManifestOutputLocation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Bucket")].write(value.bucket) - try writer[.init("ExpectedManifestBucketOwner")].write(value.expectedManifestBucketOwner) - try writer[.init("ManifestEncryption")].write(value.manifestEncryption, writingClosure: S3ControlClientTypes.GeneratedManifestEncryption.writingClosure(_:to:)) - try writer[.init("ManifestFormat")].write(value.manifestFormat) - try writer[.init("ManifestPrefix")].write(value.manifestPrefix) + try writer["Bucket"].write(value.bucket) + try writer["ExpectedManifestBucketOwner"].write(value.expectedManifestBucketOwner) + try writer["ManifestEncryption"].write(value.manifestEncryption, writingClosure: S3ControlClientTypes.GeneratedManifestEncryption.writingClosure(_:to:)) + try writer["ManifestFormat"].write(value.manifestFormat) + try writer["ManifestPrefix"].write(value.manifestPrefix) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let expectedManifestBucketOwnerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .expectedManifestBucketOwner) - expectedManifestBucketOwner = expectedManifestBucketOwnerDecoded - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let manifestPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .manifestPrefix) - manifestPrefix = manifestPrefixDecoded - let manifestEncryptionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.GeneratedManifestEncryption.self, forKey: .manifestEncryption) - manifestEncryption = manifestEncryptionDecoded - let manifestFormatDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.GeneratedManifestFormat.self, forKey: .manifestFormat) - manifestFormat = manifestFormatDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3ManifestOutputLocation() + value.expectedManifestBucketOwner = try reader["ExpectedManifestBucketOwner"].readIfPresent() + value.bucket = try reader["Bucket"].readIfPresent() + value.manifestPrefix = try reader["ManifestPrefix"].readIfPresent() + value.manifestEncryption = try reader["ManifestEncryption"].readIfPresent(readingClosure: S3ControlClientTypes.GeneratedManifestEncryption.readingClosure) + value.manifestFormat = try reader["ManifestFormat"].readIfPresent() + return value + } } } @@ -16223,20 +13608,20 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.S3ObjectLockLegalHold: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ControlClientTypes.S3ObjectLockLegalHold { static func writingClosure(_ value: S3ControlClientTypes.S3ObjectLockLegalHold?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ObjectLockLegalHoldStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3ObjectLockLegalHold() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -16353,77 +13738,40 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.S3ObjectMetadata: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cacheControl = "CacheControl" - case contentDisposition = "ContentDisposition" - case contentEncoding = "ContentEncoding" - case contentLanguage = "ContentLanguage" - case contentLength = "ContentLength" - case contentMD5 = "ContentMD5" - case contentType = "ContentType" - case httpExpiresDate = "HttpExpiresDate" - case requesterCharged = "RequesterCharged" - case sseAlgorithm = "SSEAlgorithm" - case userMetadata = "UserMetadata" - } +extension S3ControlClientTypes.S3ObjectMetadata { static func writingClosure(_ value: S3ControlClientTypes.S3ObjectMetadata?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CacheControl")].write(value.cacheControl) - try writer[.init("ContentDisposition")].write(value.contentDisposition) - try writer[.init("ContentEncoding")].write(value.contentEncoding) - try writer[.init("ContentLanguage")].write(value.contentLanguage) - try writer[.init("ContentLength")].write(value.contentLength) - try writer[.init("ContentMD5")].write(value.contentMD5) - try writer[.init("ContentType")].write(value.contentType) - try writer[.init("HttpExpiresDate")].writeTimestamp(value.httpExpiresDate, format: .dateTime) - try writer[.init("RequesterCharged")].write(value.requesterCharged) - try writer[.init("SSEAlgorithm")].write(value.sseAlgorithm) - try writer[.init("UserMetadata")].writeMap(value.userMetadata, valueWritingClosure: Swift.String.writingClosure(_:to:), keyNodeInfo: .init("key"), valueNodeInfo: .init("value"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let cacheControlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cacheControl) - cacheControl = cacheControlDecoded - let contentDispositionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contentDisposition) - contentDisposition = contentDispositionDecoded - let contentEncodingDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contentEncoding) - contentEncoding = contentEncodingDecoded - let contentLanguageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contentLanguage) - contentLanguage = contentLanguageDecoded - if containerValues.contains(.userMetadata) { - struct KeyVal0{struct key{}; struct value{}} - let userMetadataWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .userMetadata) - if let userMetadataWrappedContainer = userMetadataWrappedContainer { - let userMetadataContainer = try userMetadataWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var userMetadataBuffer: [Swift.String:Swift.String]? = nil - if let userMetadataContainer = userMetadataContainer { - userMetadataBuffer = [Swift.String:Swift.String]() - for stringContainer0 in userMetadataContainer { - userMetadataBuffer?[stringContainer0.key] = stringContainer0.value - } - } - userMetadata = userMetadataBuffer - } else { - userMetadata = [:] - } - } else { - userMetadata = nil + try writer["CacheControl"].write(value.cacheControl) + try writer["ContentDisposition"].write(value.contentDisposition) + try writer["ContentEncoding"].write(value.contentEncoding) + try writer["ContentLanguage"].write(value.contentLanguage) + try writer["ContentLength"].write(value.contentLength) + try writer["ContentMD5"].write(value.contentMD5) + try writer["ContentType"].write(value.contentType) + try writer["HttpExpiresDate"].writeTimestamp(value.httpExpiresDate, format: .dateTime) + try writer["RequesterCharged"].write(value.requesterCharged) + try writer["SSEAlgorithm"].write(value.sseAlgorithm) + try writer["UserMetadata"].writeMap(value.userMetadata, valueWritingClosure: Swift.String.writingClosure(_:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3ObjectMetadata() + value.cacheControl = try reader["CacheControl"].readIfPresent() + value.contentDisposition = try reader["ContentDisposition"].readIfPresent() + value.contentEncoding = try reader["ContentEncoding"].readIfPresent() + value.contentLanguage = try reader["ContentLanguage"].readIfPresent() + value.userMetadata = try reader["UserMetadata"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + value.contentLength = try reader["ContentLength"].readIfPresent() + value.contentMD5 = try reader["ContentMD5"].readIfPresent() + value.contentType = try reader["ContentType"].readIfPresent() + value.httpExpiresDate = try reader["HttpExpiresDate"].readTimestampIfPresent(format: .dateTime) + value.requesterCharged = try reader["RequesterCharged"].readIfPresent() ?? false + value.sseAlgorithm = try reader["SSEAlgorithm"].readIfPresent() + return value } - let contentLengthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .contentLength) ?? nil - contentLength = contentLengthDecoded - let contentMD5Decoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contentMD5) - contentMD5 = contentMD5Decoded - let contentTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contentType) - contentType = contentTypeDecoded - let httpExpiresDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .httpExpiresDate) - httpExpiresDate = httpExpiresDateDecoded - let requesterChargedDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .requesterCharged) ?? false - requesterCharged = requesterChargedDecoded - let sseAlgorithmDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3SSEAlgorithm.self, forKey: .sseAlgorithm) - sseAlgorithm = sseAlgorithmDecoded } } @@ -16483,24 +13831,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3ObjectOwner: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case displayName = "DisplayName" - case id = "ID" - } +extension S3ControlClientTypes.S3ObjectOwner { static func writingClosure(_ value: S3ControlClientTypes.S3ObjectOwner?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("DisplayName")].write(value.displayName) - try writer[.init("ID")].write(value.id) + try writer["DisplayName"].write(value.displayName) + try writer["ID"].write(value.id) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let displayNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .displayName) - displayName = displayNameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3ObjectOwner() + value.id = try reader["ID"].readIfPresent() + value.displayName = try reader["DisplayName"].readIfPresent() + return value + } } } @@ -16594,13 +13940,17 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.S3ReplicateObjectOperation: Swift.Decodable { +extension S3ControlClientTypes.S3ReplicateObjectOperation { static func writingClosure(_ value: S3ControlClientTypes.S3ReplicateObjectOperation?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ControlClientTypes.S3ReplicateObjectOperation() + } } } @@ -16613,24 +13963,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3Retention: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case mode = "Mode" - case retainUntilDate = "RetainUntilDate" - } +extension S3ControlClientTypes.S3Retention { static func writingClosure(_ value: S3ControlClientTypes.S3Retention?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Mode")].write(value.mode) - try writer[.init("RetainUntilDate")].writeTimestamp(value.retainUntilDate, format: .dateTime) + try writer["Mode"].write(value.mode) + try writer["RetainUntilDate"].writeTimestamp(value.retainUntilDate, format: .dateTime) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let retainUntilDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .retainUntilDate) - retainUntilDate = retainUntilDateDecoded - let modeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ObjectLockRetentionMode.self, forKey: .mode) - mode = modeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3Retention() + value.retainUntilDate = try reader["RetainUntilDate"].readTimestampIfPresent(format: .dateTime) + value.mode = try reader["Mode"].readIfPresent() + return value + } } } @@ -16686,20 +14034,20 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.S3SetObjectAclOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessControlPolicy = "AccessControlPolicy" - } +extension S3ControlClientTypes.S3SetObjectAclOperation { static func writingClosure(_ value: S3ControlClientTypes.S3SetObjectAclOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccessControlPolicy")].write(value.accessControlPolicy, writingClosure: S3ControlClientTypes.S3AccessControlPolicy.writingClosure(_:to:)) + try writer["AccessControlPolicy"].write(value.accessControlPolicy, writingClosure: S3ControlClientTypes.S3AccessControlPolicy.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessControlPolicyDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3AccessControlPolicy.self, forKey: .accessControlPolicy) - accessControlPolicy = accessControlPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3SetObjectAclOperation() + value.accessControlPolicy = try reader["AccessControlPolicy"].readIfPresent(readingClosure: S3ControlClientTypes.S3AccessControlPolicy.readingClosure) + return value + } } } @@ -16719,20 +14067,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3SetObjectLegalHoldOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case legalHold = "LegalHold" - } +extension S3ControlClientTypes.S3SetObjectLegalHoldOperation { static func writingClosure(_ value: S3ControlClientTypes.S3SetObjectLegalHoldOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("LegalHold")].write(value.legalHold, writingClosure: S3ControlClientTypes.S3ObjectLockLegalHold.writingClosure(_:to:)) + try writer["LegalHold"].write(value.legalHold, writingClosure: S3ControlClientTypes.S3ObjectLockLegalHold.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let legalHoldDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3ObjectLockLegalHold.self, forKey: .legalHold) - legalHold = legalHoldDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3SetObjectLegalHoldOperation() + value.legalHold = try reader["LegalHold"].readIfPresent(readingClosure: S3ControlClientTypes.S3ObjectLockLegalHold.readingClosure) + return value + } } } @@ -16753,24 +14101,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3SetObjectRetentionOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bypassGovernanceRetention = "BypassGovernanceRetention" - case retention = "Retention" - } +extension S3ControlClientTypes.S3SetObjectRetentionOperation { static func writingClosure(_ value: S3ControlClientTypes.S3SetObjectRetentionOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("BypassGovernanceRetention")].write(value.bypassGovernanceRetention) - try writer[.init("Retention")].write(value.retention, writingClosure: S3ControlClientTypes.S3Retention.writingClosure(_:to:)) + try writer["BypassGovernanceRetention"].write(value.bypassGovernanceRetention) + try writer["Retention"].write(value.retention, writingClosure: S3ControlClientTypes.S3Retention.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bypassGovernanceRetentionDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .bypassGovernanceRetention) ?? nil - bypassGovernanceRetention = bypassGovernanceRetentionDecoded - let retentionDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3Retention.self, forKey: .retention) - retention = retentionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3SetObjectRetentionOperation() + value.bypassGovernanceRetention = try reader["BypassGovernanceRetention"].readIfPresent() + value.retention = try reader["Retention"].readIfPresent(readingClosure: S3ControlClientTypes.S3Retention.readingClosure) + return value + } } } @@ -16795,36 +14141,19 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.S3SetObjectTaggingOperation: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagSet = "TagSet" - } +extension S3ControlClientTypes.S3SetObjectTaggingOperation { static func writingClosure(_ value: S3ControlClientTypes.S3SetObjectTaggingOperation?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("TagSet")].writeList(value.tagSet, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tagSet) { - struct KeyVal0{struct member{}} - let tagSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSet) - if let tagSetWrappedContainer = tagSetWrappedContainer { - let tagSetContainer = try tagSetWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var tagSetBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let tagSetContainer = tagSetContainer { - tagSetBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in tagSetContainer { - tagSetBuffer?.append(structureContainer0) - } - } - tagSet = tagSetBuffer - } else { - tagSet = [] - } - } else { - tagSet = nil + try writer["TagSet"].writeList(value.tagSet, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3SetObjectTaggingOperation() + value.tagSet = try reader["TagSet"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -16892,24 +14221,22 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.S3Tag: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case value = "Value" - } +extension S3ControlClientTypes.S3Tag { static func writingClosure(_ value: S3ControlClientTypes.S3Tag?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Key")].write(value.key) - try writer[.init("Value")].write(value.value) + try writer["Key"].write(value.key) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.S3Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -16935,20 +14262,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.SSEKMS: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyId = "KeyId" - } +extension S3ControlClientTypes.SSEKMS { static func writingClosure(_ value: S3ControlClientTypes.SSEKMS?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KeyId")].write(value.keyId) + try writer["KeyId"].write(value.keyId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyId) - keyId = keyIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.SSEKMS() + value.keyId = try reader["KeyId"].readIfPresent() + return value + } } } @@ -16969,20 +14296,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.SSEKMSEncryption: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case keyId = "KeyId" - } +extension S3ControlClientTypes.SSEKMSEncryption { static func writingClosure(_ value: S3ControlClientTypes.SSEKMSEncryption?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("KeyId")].write(value.keyId) + try writer["KeyId"].write(value.keyId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .keyId) - keyId = keyIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.SSEKMSEncryption() + value.keyId = try reader["KeyId"].readIfPresent() + return value + } } } @@ -17003,13 +14330,17 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.SSES3: Swift.Decodable { +extension S3ControlClientTypes.SSES3 { static func writingClosure(_ value: S3ControlClientTypes.SSES3?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ControlClientTypes.SSES3() + } } } @@ -17022,13 +14353,17 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.SSES3Encryption: Swift.Decodable { +extension S3ControlClientTypes.SSES3Encryption { static func writingClosure(_ value: S3ControlClientTypes.SSES3Encryption?, to writer: SmithyXML.Writer) throws { guard value != nil else { writer.detach(); return } } - public init(from decoder: Swift.Decoder) throws { + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + return S3ControlClientTypes.SSES3Encryption() + } } } @@ -17041,28 +14376,24 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.SelectionCriteria: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case delimiter = "Delimiter" - case maxDepth = "MaxDepth" - case minStorageBytesPercentage = "MinStorageBytesPercentage" - } +extension S3ControlClientTypes.SelectionCriteria { static func writingClosure(_ value: S3ControlClientTypes.SelectionCriteria?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Delimiter")].write(value.delimiter) - try writer[.init("MaxDepth")].write(value.maxDepth) - try writer[.init("MinStorageBytesPercentage")].write(value.minStorageBytesPercentage) + try writer["Delimiter"].write(value.delimiter) + try writer["MaxDepth"].write(value.maxDepth) + try writer["MinStorageBytesPercentage"].write(value.minStorageBytesPercentage) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let delimiterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .delimiter) - delimiter = delimiterDecoded - let maxDepthDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxDepth) - maxDepth = maxDepthDecoded - let minStorageBytesPercentageDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .minStorageBytesPercentage) - minStorageBytesPercentage = minStorageBytesPercentageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.SelectionCriteria() + value.delimiter = try reader["Delimiter"].readIfPresent() + value.maxDepth = try reader["MaxDepth"].readIfPresent() + value.minStorageBytesPercentage = try reader["MinStorageBytesPercentage"].readIfPresent() + return value + } } } @@ -17090,24 +14421,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.SourceSelectionCriteria: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case replicaModifications = "ReplicaModifications" - case sseKmsEncryptedObjects = "SseKmsEncryptedObjects" - } +extension S3ControlClientTypes.SourceSelectionCriteria { static func writingClosure(_ value: S3ControlClientTypes.SourceSelectionCriteria?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("ReplicaModifications")].write(value.replicaModifications, writingClosure: S3ControlClientTypes.ReplicaModifications.writingClosure(_:to:)) - try writer[.init("SseKmsEncryptedObjects")].write(value.sseKmsEncryptedObjects, writingClosure: S3ControlClientTypes.SseKmsEncryptedObjects.writingClosure(_:to:)) + try writer["ReplicaModifications"].write(value.replicaModifications, writingClosure: S3ControlClientTypes.ReplicaModifications.writingClosure(_:to:)) + try writer["SseKmsEncryptedObjects"].write(value.sseKmsEncryptedObjects, writingClosure: S3ControlClientTypes.SseKmsEncryptedObjects.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sseKmsEncryptedObjectsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.SseKmsEncryptedObjects.self, forKey: .sseKmsEncryptedObjects) - sseKmsEncryptedObjects = sseKmsEncryptedObjectsDecoded - let replicaModificationsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.ReplicaModifications.self, forKey: .replicaModifications) - replicaModifications = replicaModificationsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.SourceSelectionCriteria() + value.sseKmsEncryptedObjects = try reader["SseKmsEncryptedObjects"].readIfPresent(readingClosure: S3ControlClientTypes.SseKmsEncryptedObjects.readingClosure) + value.replicaModifications = try reader["ReplicaModifications"].readIfPresent(readingClosure: S3ControlClientTypes.ReplicaModifications.readingClosure) + return value + } } } @@ -17131,20 +14460,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.SseKmsEncryptedObjects: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } +extension S3ControlClientTypes.SseKmsEncryptedObjects { static func writingClosure(_ value: S3ControlClientTypes.SseKmsEncryptedObjects?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Status")].write(value.status) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.SseKmsEncryptedObjectsStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.SseKmsEncryptedObjects() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -17197,20 +14526,20 @@ extension S3ControlClientTypes { } } -extension S3ControlClientTypes.StorageLensAwsOrg: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case arn = "Arn" - } +extension S3ControlClientTypes.StorageLensAwsOrg { static func writingClosure(_ value: S3ControlClientTypes.StorageLensAwsOrg?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Arn")].write(value.arn) + try writer["Arn"].write(value.arn) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensAwsOrg() + value.arn = try reader["Arn"].readIfPresent() + return value + } } } @@ -17231,48 +14560,34 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accountLevel = "AccountLevel" - case awsOrg = "AwsOrg" - case dataExport = "DataExport" - case exclude = "Exclude" - case id = "Id" - case include = "Include" - case isEnabled = "IsEnabled" - case storageLensArn = "StorageLensArn" - } +extension S3ControlClientTypes.StorageLensConfiguration { static func writingClosure(_ value: S3ControlClientTypes.StorageLensConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("AccountLevel")].write(value.accountLevel, writingClosure: S3ControlClientTypes.AccountLevel.writingClosure(_:to:)) - try writer[.init("AwsOrg")].write(value.awsOrg, writingClosure: S3ControlClientTypes.StorageLensAwsOrg.writingClosure(_:to:)) - try writer[.init("DataExport")].write(value.dataExport, writingClosure: S3ControlClientTypes.StorageLensDataExport.writingClosure(_:to:)) - try writer[.init("Exclude")].write(value.exclude, writingClosure: S3ControlClientTypes.Exclude.writingClosure(_:to:)) - try writer[.init("Id")].write(value.id) - try writer[.init("Include")].write(value.include, writingClosure: S3ControlClientTypes.Include.writingClosure(_:to:)) - try writer[.init("IsEnabled")].write(value.isEnabled) - try writer[.init("StorageLensArn")].write(value.storageLensArn) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let accountLevelDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.AccountLevel.self, forKey: .accountLevel) - accountLevel = accountLevelDecoded - let includeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Include.self, forKey: .include) - include = includeDecoded - let excludeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.Exclude.self, forKey: .exclude) - exclude = excludeDecoded - let dataExportDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensDataExport.self, forKey: .dataExport) - dataExport = dataExportDecoded - let isEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isEnabled) ?? false - isEnabled = isEnabledDecoded - let awsOrgDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensAwsOrg.self, forKey: .awsOrg) - awsOrg = awsOrgDecoded - let storageLensArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageLensArn) - storageLensArn = storageLensArnDecoded + try writer["AccountLevel"].write(value.accountLevel, writingClosure: S3ControlClientTypes.AccountLevel.writingClosure(_:to:)) + try writer["AwsOrg"].write(value.awsOrg, writingClosure: S3ControlClientTypes.StorageLensAwsOrg.writingClosure(_:to:)) + try writer["DataExport"].write(value.dataExport, writingClosure: S3ControlClientTypes.StorageLensDataExport.writingClosure(_:to:)) + try writer["Exclude"].write(value.exclude, writingClosure: S3ControlClientTypes.Exclude.writingClosure(_:to:)) + try writer["Id"].write(value.id) + try writer["Include"].write(value.include, writingClosure: S3ControlClientTypes.Include.writingClosure(_:to:)) + try writer["IsEnabled"].write(value.isEnabled) + try writer["StorageLensArn"].write(value.storageLensArn) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensConfiguration() + value.id = try reader["Id"].readIfPresent() + value.accountLevel = try reader["AccountLevel"].readIfPresent(readingClosure: S3ControlClientTypes.AccountLevel.readingClosure) + value.include = try reader["Include"].readIfPresent(readingClosure: S3ControlClientTypes.Include.readingClosure) + value.exclude = try reader["Exclude"].readIfPresent(readingClosure: S3ControlClientTypes.Exclude.readingClosure) + value.dataExport = try reader["DataExport"].readIfPresent(readingClosure: S3ControlClientTypes.StorageLensDataExport.readingClosure) + value.isEnabled = try reader["IsEnabled"].readIfPresent() ?? false + value.awsOrg = try reader["AwsOrg"].readIfPresent(readingClosure: S3ControlClientTypes.StorageLensAwsOrg.readingClosure) + value.storageLensArn = try reader["StorageLensArn"].readIfPresent() + return value + } } } @@ -17323,24 +14638,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensDataExport: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case cloudWatchMetrics = "CloudWatchMetrics" - case s3BucketDestination = "S3BucketDestination" - } +extension S3ControlClientTypes.StorageLensDataExport { static func writingClosure(_ value: S3ControlClientTypes.StorageLensDataExport?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("CloudWatchMetrics")].write(value.cloudWatchMetrics, writingClosure: S3ControlClientTypes.CloudWatchMetrics.writingClosure(_:to:)) - try writer[.init("S3BucketDestination")].write(value.s3BucketDestination, writingClosure: S3ControlClientTypes.S3BucketDestination.writingClosure(_:to:)) + try writer["CloudWatchMetrics"].write(value.cloudWatchMetrics, writingClosure: S3ControlClientTypes.CloudWatchMetrics.writingClosure(_:to:)) + try writer["S3BucketDestination"].write(value.s3BucketDestination, writingClosure: S3ControlClientTypes.S3BucketDestination.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3BucketDestinationDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.S3BucketDestination.self, forKey: .s3BucketDestination) - s3BucketDestination = s3BucketDestinationDecoded - let cloudWatchMetricsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.CloudWatchMetrics.self, forKey: .cloudWatchMetrics) - cloudWatchMetrics = cloudWatchMetricsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensDataExport() + value.s3BucketDestination = try reader["S3BucketDestination"].readIfPresent(readingClosure: S3ControlClientTypes.S3BucketDestination.readingClosure) + value.cloudWatchMetrics = try reader["CloudWatchMetrics"].readIfPresent(readingClosure: S3ControlClientTypes.CloudWatchMetrics.readingClosure) + return value + } } } @@ -17364,24 +14677,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensDataExportEncryption: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ssekms = "SSE-KMS" - case sses3 = "SSE-S3" - } +extension S3ControlClientTypes.StorageLensDataExportEncryption { static func writingClosure(_ value: S3ControlClientTypes.StorageLensDataExportEncryption?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("SSE-KMS")].write(value.ssekms, writingClosure: S3ControlClientTypes.SSEKMS.writingClosure(_:to:)) - try writer[.init("SSE-S3")].write(value.sses3, writingClosure: S3ControlClientTypes.SSES3.writingClosure(_:to:)) + try writer["SSE-KMS"].write(value.ssekms, writingClosure: S3ControlClientTypes.SSEKMS.writingClosure(_:to:)) + try writer["SSE-S3"].write(value.sses3, writingClosure: S3ControlClientTypes.SSES3.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sses3Decoded = try containerValues.decodeIfPresent(S3ControlClientTypes.SSES3.self, forKey: .sses3) - sses3 = sses3Decoded - let ssekmsDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.SSEKMS.self, forKey: .ssekms) - ssekms = ssekmsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensDataExportEncryption() + value.sses3 = try reader["SSE-S3"].readIfPresent(readingClosure: S3ControlClientTypes.SSES3.readingClosure) + value.ssekms = try reader["SSE-KMS"].readIfPresent(readingClosure: S3ControlClientTypes.SSEKMS.readingClosure) + return value + } } } @@ -17405,28 +14716,24 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensGroup: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "Filter" - case name = "Name" - case storageLensGroupArn = "StorageLensGroupArn" - } +extension S3ControlClientTypes.StorageLensGroup { static func writingClosure(_ value: S3ControlClientTypes.StorageLensGroup?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Filter")].write(value.filter, writingClosure: S3ControlClientTypes.StorageLensGroupFilter.writingClosure(_:to:)) - try writer[.init("Name")].write(value.name) - try writer[.init("StorageLensGroupArn")].write(value.storageLensGroupArn) + try writer["Filter"].write(value.filter, writingClosure: S3ControlClientTypes.StorageLensGroupFilter.writingClosure(_:to:)) + try writer["Name"].write(value.name) + try writer["StorageLensGroupArn"].write(value.storageLensGroupArn) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let filterDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensGroupFilter.self, forKey: .filter) - filter = filterDecoded - let storageLensGroupArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .storageLensGroupArn) - storageLensGroupArn = storageLensGroupArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensGroup() + value.name = try reader["Name"].readIfPresent() + value.filter = try reader["Filter"].readIfPresent(readingClosure: S3ControlClientTypes.StorageLensGroupFilter.readingClosure) + value.storageLensGroupArn = try reader["StorageLensGroupArn"].readIfPresent() + return value + } } } @@ -17456,87 +14763,28 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensGroupAndOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case matchAnyPrefix = "MatchAnyPrefix" - case matchAnySuffix = "MatchAnySuffix" - case matchAnyTag = "MatchAnyTag" - case matchObjectAge = "MatchObjectAge" - case matchObjectSize = "MatchObjectSize" - } +extension S3ControlClientTypes.StorageLensGroupAndOperator { static func writingClosure(_ value: S3ControlClientTypes.StorageLensGroupAndOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("MatchAnyPrefix")].writeList(value.matchAnyPrefix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Prefix"), isFlattened: false) - try writer[.init("MatchAnySuffix")].writeList(value.matchAnySuffix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Suffix"), isFlattened: false) - try writer[.init("MatchAnyTag")].writeList(value.matchAnyTag, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) - try writer[.init("MatchObjectAge")].write(value.matchObjectAge, writingClosure: S3ControlClientTypes.MatchObjectAge.writingClosure(_:to:)) - try writer[.init("MatchObjectSize")].write(value.matchObjectSize, writingClosure: S3ControlClientTypes.MatchObjectSize.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.matchAnyPrefix) { - struct KeyVal0{struct Prefix{}} - let matchAnyPrefixWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnyPrefix) - if let matchAnyPrefixWrappedContainer = matchAnyPrefixWrappedContainer { - let matchAnyPrefixContainer = try matchAnyPrefixWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnyPrefixBuffer:[Swift.String]? = nil - if let matchAnyPrefixContainer = matchAnyPrefixContainer { - matchAnyPrefixBuffer = [Swift.String]() - for stringContainer0 in matchAnyPrefixContainer { - matchAnyPrefixBuffer?.append(stringContainer0) - } - } - matchAnyPrefix = matchAnyPrefixBuffer - } else { - matchAnyPrefix = [] - } - } else { - matchAnyPrefix = nil - } - if containerValues.contains(.matchAnySuffix) { - struct KeyVal0{struct Suffix{}} - let matchAnySuffixWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnySuffix) - if let matchAnySuffixWrappedContainer = matchAnySuffixWrappedContainer { - let matchAnySuffixContainer = try matchAnySuffixWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnySuffixBuffer:[Swift.String]? = nil - if let matchAnySuffixContainer = matchAnySuffixContainer { - matchAnySuffixBuffer = [Swift.String]() - for stringContainer0 in matchAnySuffixContainer { - matchAnySuffixBuffer?.append(stringContainer0) - } - } - matchAnySuffix = matchAnySuffixBuffer - } else { - matchAnySuffix = [] - } - } else { - matchAnySuffix = nil - } - if containerValues.contains(.matchAnyTag) { - struct KeyVal0{struct Tag{}} - let matchAnyTagWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnyTag) - if let matchAnyTagWrappedContainer = matchAnyTagWrappedContainer { - let matchAnyTagContainer = try matchAnyTagWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var matchAnyTagBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let matchAnyTagContainer = matchAnyTagContainer { - matchAnyTagBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in matchAnyTagContainer { - matchAnyTagBuffer?.append(structureContainer0) - } - } - matchAnyTag = matchAnyTagBuffer - } else { - matchAnyTag = [] - } - } else { - matchAnyTag = nil + try writer["MatchAnyPrefix"].writeList(value.matchAnyPrefix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Prefix", isFlattened: false) + try writer["MatchAnySuffix"].writeList(value.matchAnySuffix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Suffix", isFlattened: false) + try writer["MatchAnyTag"].writeList(value.matchAnyTag, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) + try writer["MatchObjectAge"].write(value.matchObjectAge, writingClosure: S3ControlClientTypes.MatchObjectAge.writingClosure(_:to:)) + try writer["MatchObjectSize"].write(value.matchObjectSize, writingClosure: S3ControlClientTypes.MatchObjectSize.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensGroupAndOperator() + value.matchAnyPrefix = try reader["MatchAnyPrefix"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Prefix", isFlattened: false) + value.matchAnySuffix = try reader["MatchAnySuffix"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Suffix", isFlattened: false) + value.matchAnyTag = try reader["MatchAnyTag"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.matchObjectAge = try reader["MatchObjectAge"].readIfPresent(readingClosure: S3ControlClientTypes.MatchObjectAge.readingClosure) + value.matchObjectSize = try reader["MatchObjectSize"].readIfPresent(readingClosure: S3ControlClientTypes.MatchObjectSize.readingClosure) + return value } - let matchObjectAgeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MatchObjectAge.self, forKey: .matchObjectAge) - matchObjectAge = matchObjectAgeDecoded - let matchObjectSizeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MatchObjectSize.self, forKey: .matchObjectSize) - matchObjectSize = matchObjectSizeDecoded } } @@ -17572,95 +14820,32 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensGroupFilter: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case and = "And" - case matchAnyPrefix = "MatchAnyPrefix" - case matchAnySuffix = "MatchAnySuffix" - case matchAnyTag = "MatchAnyTag" - case matchObjectAge = "MatchObjectAge" - case matchObjectSize = "MatchObjectSize" - case or = "Or" - } +extension S3ControlClientTypes.StorageLensGroupFilter { static func writingClosure(_ value: S3ControlClientTypes.StorageLensGroupFilter?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("And")].write(value.and, writingClosure: S3ControlClientTypes.StorageLensGroupAndOperator.writingClosure(_:to:)) - try writer[.init("MatchAnyPrefix")].writeList(value.matchAnyPrefix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Prefix"), isFlattened: false) - try writer[.init("MatchAnySuffix")].writeList(value.matchAnySuffix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Suffix"), isFlattened: false) - try writer[.init("MatchAnyTag")].writeList(value.matchAnyTag, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) - try writer[.init("MatchObjectAge")].write(value.matchObjectAge, writingClosure: S3ControlClientTypes.MatchObjectAge.writingClosure(_:to:)) - try writer[.init("MatchObjectSize")].write(value.matchObjectSize, writingClosure: S3ControlClientTypes.MatchObjectSize.writingClosure(_:to:)) - try writer[.init("Or")].write(value.or, writingClosure: S3ControlClientTypes.StorageLensGroupOrOperator.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.matchAnyPrefix) { - struct KeyVal0{struct Prefix{}} - let matchAnyPrefixWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnyPrefix) - if let matchAnyPrefixWrappedContainer = matchAnyPrefixWrappedContainer { - let matchAnyPrefixContainer = try matchAnyPrefixWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnyPrefixBuffer:[Swift.String]? = nil - if let matchAnyPrefixContainer = matchAnyPrefixContainer { - matchAnyPrefixBuffer = [Swift.String]() - for stringContainer0 in matchAnyPrefixContainer { - matchAnyPrefixBuffer?.append(stringContainer0) - } - } - matchAnyPrefix = matchAnyPrefixBuffer - } else { - matchAnyPrefix = [] - } - } else { - matchAnyPrefix = nil - } - if containerValues.contains(.matchAnySuffix) { - struct KeyVal0{struct Suffix{}} - let matchAnySuffixWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnySuffix) - if let matchAnySuffixWrappedContainer = matchAnySuffixWrappedContainer { - let matchAnySuffixContainer = try matchAnySuffixWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnySuffixBuffer:[Swift.String]? = nil - if let matchAnySuffixContainer = matchAnySuffixContainer { - matchAnySuffixBuffer = [Swift.String]() - for stringContainer0 in matchAnySuffixContainer { - matchAnySuffixBuffer?.append(stringContainer0) - } - } - matchAnySuffix = matchAnySuffixBuffer - } else { - matchAnySuffix = [] - } - } else { - matchAnySuffix = nil - } - if containerValues.contains(.matchAnyTag) { - struct KeyVal0{struct Tag{}} - let matchAnyTagWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnyTag) - if let matchAnyTagWrappedContainer = matchAnyTagWrappedContainer { - let matchAnyTagContainer = try matchAnyTagWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var matchAnyTagBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let matchAnyTagContainer = matchAnyTagContainer { - matchAnyTagBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in matchAnyTagContainer { - matchAnyTagBuffer?.append(structureContainer0) - } - } - matchAnyTag = matchAnyTagBuffer - } else { - matchAnyTag = [] - } - } else { - matchAnyTag = nil + try writer["And"].write(value.and, writingClosure: S3ControlClientTypes.StorageLensGroupAndOperator.writingClosure(_:to:)) + try writer["MatchAnyPrefix"].writeList(value.matchAnyPrefix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Prefix", isFlattened: false) + try writer["MatchAnySuffix"].writeList(value.matchAnySuffix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Suffix", isFlattened: false) + try writer["MatchAnyTag"].writeList(value.matchAnyTag, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) + try writer["MatchObjectAge"].write(value.matchObjectAge, writingClosure: S3ControlClientTypes.MatchObjectAge.writingClosure(_:to:)) + try writer["MatchObjectSize"].write(value.matchObjectSize, writingClosure: S3ControlClientTypes.MatchObjectSize.writingClosure(_:to:)) + try writer["Or"].write(value.or, writingClosure: S3ControlClientTypes.StorageLensGroupOrOperator.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensGroupFilter() + value.matchAnyPrefix = try reader["MatchAnyPrefix"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Prefix", isFlattened: false) + value.matchAnySuffix = try reader["MatchAnySuffix"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Suffix", isFlattened: false) + value.matchAnyTag = try reader["MatchAnyTag"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.matchObjectAge = try reader["MatchObjectAge"].readIfPresent(readingClosure: S3ControlClientTypes.MatchObjectAge.readingClosure) + value.matchObjectSize = try reader["MatchObjectSize"].readIfPresent(readingClosure: S3ControlClientTypes.MatchObjectSize.readingClosure) + value.and = try reader["And"].readIfPresent(readingClosure: S3ControlClientTypes.StorageLensGroupAndOperator.readingClosure) + value.or = try reader["Or"].readIfPresent(readingClosure: S3ControlClientTypes.StorageLensGroupOrOperator.readingClosure) + return value } - let matchObjectAgeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MatchObjectAge.self, forKey: .matchObjectAge) - matchObjectAge = matchObjectAgeDecoded - let matchObjectSizeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MatchObjectSize.self, forKey: .matchObjectSize) - matchObjectSize = matchObjectSizeDecoded - let andDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensGroupAndOperator.self, forKey: .and) - and = andDecoded - let orDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensGroupOrOperator.self, forKey: .or) - or = orDecoded } } @@ -17704,20 +14889,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensGroupLevel: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case selectionCriteria = "SelectionCriteria" - } +extension S3ControlClientTypes.StorageLensGroupLevel { static func writingClosure(_ value: S3ControlClientTypes.StorageLensGroupLevel?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("SelectionCriteria")].write(value.selectionCriteria, writingClosure: S3ControlClientTypes.StorageLensGroupLevelSelectionCriteria.writingClosure(_:to:)) + try writer["SelectionCriteria"].write(value.selectionCriteria, writingClosure: S3ControlClientTypes.StorageLensGroupLevelSelectionCriteria.writingClosure(_:to:)) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let selectionCriteriaDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensGroupLevelSelectionCriteria.self, forKey: .selectionCriteria) - selectionCriteria = selectionCriteriaDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensGroupLevel() + value.selectionCriteria = try reader["SelectionCriteria"].readIfPresent(readingClosure: S3ControlClientTypes.StorageLensGroupLevelSelectionCriteria.readingClosure) + return value + } } } @@ -17737,57 +14922,21 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensGroupLevelSelectionCriteria: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case exclude = "Exclude" - case include = "Include" - } +extension S3ControlClientTypes.StorageLensGroupLevelSelectionCriteria { static func writingClosure(_ value: S3ControlClientTypes.StorageLensGroupLevelSelectionCriteria?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Exclude")].writeList(value.exclude, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Arn"), isFlattened: false) - try writer[.init("Include")].writeList(value.include, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Arn"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.include) { - struct KeyVal0{struct Arn{}} - let includeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .include) - if let includeWrappedContainer = includeWrappedContainer { - let includeContainer = try includeWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var includeBuffer:[Swift.String]? = nil - if let includeContainer = includeContainer { - includeBuffer = [Swift.String]() - for stringContainer0 in includeContainer { - includeBuffer?.append(stringContainer0) - } - } - include = includeBuffer - } else { - include = [] - } - } else { - include = nil - } - if containerValues.contains(.exclude) { - struct KeyVal0{struct Arn{}} - let excludeWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .exclude) - if let excludeWrappedContainer = excludeWrappedContainer { - let excludeContainer = try excludeWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var excludeBuffer:[Swift.String]? = nil - if let excludeContainer = excludeContainer { - excludeBuffer = [Swift.String]() - for stringContainer0 in excludeContainer { - excludeBuffer?.append(stringContainer0) - } - } - exclude = excludeBuffer - } else { - exclude = [] - } - } else { - exclude = nil + try writer["Exclude"].writeList(value.exclude, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Arn", isFlattened: false) + try writer["Include"].writeList(value.include, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Arn", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensGroupLevelSelectionCriteria() + value.include = try reader["Include"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Arn", isFlattened: false) + value.exclude = try reader["Exclude"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Arn", isFlattened: false) + return value } } } @@ -17812,87 +14961,28 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensGroupOrOperator: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case matchAnyPrefix = "MatchAnyPrefix" - case matchAnySuffix = "MatchAnySuffix" - case matchAnyTag = "MatchAnyTag" - case matchObjectAge = "MatchObjectAge" - case matchObjectSize = "MatchObjectSize" - } +extension S3ControlClientTypes.StorageLensGroupOrOperator { static func writingClosure(_ value: S3ControlClientTypes.StorageLensGroupOrOperator?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("MatchAnyPrefix")].writeList(value.matchAnyPrefix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Prefix"), isFlattened: false) - try writer[.init("MatchAnySuffix")].writeList(value.matchAnySuffix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: .init("Suffix"), isFlattened: false) - try writer[.init("MatchAnyTag")].writeList(value.matchAnyTag, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) - try writer[.init("MatchObjectAge")].write(value.matchObjectAge, writingClosure: S3ControlClientTypes.MatchObjectAge.writingClosure(_:to:)) - try writer[.init("MatchObjectSize")].write(value.matchObjectSize, writingClosure: S3ControlClientTypes.MatchObjectSize.writingClosure(_:to:)) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.matchAnyPrefix) { - struct KeyVal0{struct Prefix{}} - let matchAnyPrefixWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnyPrefix) - if let matchAnyPrefixWrappedContainer = matchAnyPrefixWrappedContainer { - let matchAnyPrefixContainer = try matchAnyPrefixWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnyPrefixBuffer:[Swift.String]? = nil - if let matchAnyPrefixContainer = matchAnyPrefixContainer { - matchAnyPrefixBuffer = [Swift.String]() - for stringContainer0 in matchAnyPrefixContainer { - matchAnyPrefixBuffer?.append(stringContainer0) - } - } - matchAnyPrefix = matchAnyPrefixBuffer - } else { - matchAnyPrefix = [] - } - } else { - matchAnyPrefix = nil - } - if containerValues.contains(.matchAnySuffix) { - struct KeyVal0{struct Suffix{}} - let matchAnySuffixWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnySuffix) - if let matchAnySuffixWrappedContainer = matchAnySuffixWrappedContainer { - let matchAnySuffixContainer = try matchAnySuffixWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var matchAnySuffixBuffer:[Swift.String]? = nil - if let matchAnySuffixContainer = matchAnySuffixContainer { - matchAnySuffixBuffer = [Swift.String]() - for stringContainer0 in matchAnySuffixContainer { - matchAnySuffixBuffer?.append(stringContainer0) - } - } - matchAnySuffix = matchAnySuffixBuffer - } else { - matchAnySuffix = [] - } - } else { - matchAnySuffix = nil - } - if containerValues.contains(.matchAnyTag) { - struct KeyVal0{struct Tag{}} - let matchAnyTagWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchAnyTag) - if let matchAnyTagWrappedContainer = matchAnyTagWrappedContainer { - let matchAnyTagContainer = try matchAnyTagWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var matchAnyTagBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let matchAnyTagContainer = matchAnyTagContainer { - matchAnyTagBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in matchAnyTagContainer { - matchAnyTagBuffer?.append(structureContainer0) - } - } - matchAnyTag = matchAnyTagBuffer - } else { - matchAnyTag = [] - } - } else { - matchAnyTag = nil + try writer["MatchAnyPrefix"].writeList(value.matchAnyPrefix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Prefix", isFlattened: false) + try writer["MatchAnySuffix"].writeList(value.matchAnySuffix, memberWritingClosure: Swift.String.writingClosure(_:to:), memberNodeInfo: "Suffix", isFlattened: false) + try writer["MatchAnyTag"].writeList(value.matchAnyTag, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) + try writer["MatchObjectAge"].write(value.matchObjectAge, writingClosure: S3ControlClientTypes.MatchObjectAge.writingClosure(_:to:)) + try writer["MatchObjectSize"].write(value.matchObjectSize, writingClosure: S3ControlClientTypes.MatchObjectSize.writingClosure(_:to:)) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensGroupOrOperator() + value.matchAnyPrefix = try reader["MatchAnyPrefix"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Prefix", isFlattened: false) + value.matchAnySuffix = try reader["MatchAnySuffix"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "Suffix", isFlattened: false) + value.matchAnyTag = try reader["MatchAnyTag"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "Tag", isFlattened: false) + value.matchObjectAge = try reader["MatchObjectAge"].readIfPresent(readingClosure: S3ControlClientTypes.MatchObjectAge.readingClosure) + value.matchObjectSize = try reader["MatchObjectSize"].readIfPresent(readingClosure: S3ControlClientTypes.MatchObjectSize.readingClosure) + return value } - let matchObjectAgeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MatchObjectAge.self, forKey: .matchObjectAge) - matchObjectAge = matchObjectAgeDecoded - let matchObjectSizeDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MatchObjectSize.self, forKey: .matchObjectSize) - matchObjectSize = matchObjectSizeDecoded } } @@ -17928,24 +15018,22 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.StorageLensTag: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case value = "Value" - } +extension S3ControlClientTypes.StorageLensTag { static func writingClosure(_ value: S3ControlClientTypes.StorageLensTag?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Key")].write(value.key) - try writer[.init("Value")].write(value.value) + try writer["Key"].write(value.key) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.StorageLensTag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -17972,13 +15060,9 @@ extension S3ControlClientTypes { } extension SubmitMultiRegionAccessPointRoutesInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case routeUpdates = "RouteUpdates" - } - static func writingClosure(_ value: SubmitMultiRegionAccessPointRoutesInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("RouteUpdates")].writeList(value.routeUpdates, memberWritingClosure: S3ControlClientTypes.MultiRegionAccessPointRoute.writingClosure(_:to:), memberNodeInfo: .init("Route"), isFlattened: false) + try writer["RouteUpdates"].writeList(value.routeUpdates, memberWritingClosure: S3ControlClientTypes.MultiRegionAccessPointRoute.writingClosure(_:to:), memberNodeInfo: "Route", isFlattened: false) } } @@ -18026,76 +15110,49 @@ public struct SubmitMultiRegionAccessPointRoutesInput: Swift.Equatable { } } -struct SubmitMultiRegionAccessPointRoutesInputBody: Swift.Equatable { - let routeUpdates: [S3ControlClientTypes.MultiRegionAccessPointRoute]? -} - -extension SubmitMultiRegionAccessPointRoutesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case routeUpdates = "RouteUpdates" - } +extension SubmitMultiRegionAccessPointRoutesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.routeUpdates) { - struct KeyVal0{struct Route{}} - let routeUpdatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .routeUpdates) - if let routeUpdatesWrappedContainer = routeUpdatesWrappedContainer { - let routeUpdatesContainer = try routeUpdatesWrappedContainer.decodeIfPresent([S3ControlClientTypes.MultiRegionAccessPointRoute].self, forKey: .member) - var routeUpdatesBuffer:[S3ControlClientTypes.MultiRegionAccessPointRoute]? = nil - if let routeUpdatesContainer = routeUpdatesContainer { - routeUpdatesBuffer = [S3ControlClientTypes.MultiRegionAccessPointRoute]() - for structureContainer0 in routeUpdatesContainer { - routeUpdatesBuffer?.append(structureContainer0) - } - } - routeUpdates = routeUpdatesBuffer - } else { - routeUpdates = [] - } - } else { - routeUpdates = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SubmitMultiRegionAccessPointRoutesOutput() } } } -extension SubmitMultiRegionAccessPointRoutesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct SubmitMultiRegionAccessPointRoutesOutput: Swift.Equatable { public init() { } } -enum SubmitMultiRegionAccessPointRoutesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SubmitMultiRegionAccessPointRoutesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.Tag: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case key = "Key" - case value = "Value" - } +extension S3ControlClientTypes.Tag { static func writingClosure(_ value: S3ControlClientTypes.Tag?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Key")].write(value.key) - try writer[.init("Value")].write(value.value) + try writer["Key"].write(value.key) + try writer["Value"].write(value.value) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -18122,13 +15179,9 @@ extension S3ControlClientTypes { } extension TagResourceInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } - static func writingClosure(_ value: TagResourceInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Tags")].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: .init("Tag"), isFlattened: false) + try writer["Tags"].writeList(value.tags, memberWritingClosure: S3ControlClientTypes.Tag.writingClosure(_:to:), memberNodeInfo: "Tag", isFlattened: false) } } @@ -18176,88 +15229,46 @@ public struct TagResourceInput: Swift.Equatable { } } -struct TagResourceInputBody: Swift.Equatable { - let tags: [S3ControlClientTypes.Tag]? -} - -extension TagResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +extension TagResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tags) { - struct KeyVal0{struct Tag{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([S3ControlClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[S3ControlClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [S3ControlClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagResourceOutput() } } } -extension TagResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagResourceOutput: Swift.Equatable { public init() { } } -enum TagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.Tagging: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tagSet = "TagSet" - } +extension S3ControlClientTypes.Tagging { static func writingClosure(_ value: S3ControlClientTypes.Tagging?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("TagSet")].writeList(value.tagSet, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: .init("member"), isFlattened: false) - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.tagSet) { - struct KeyVal0{struct member{}} - let tagSetWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagSet) - if let tagSetWrappedContainer = tagSetWrappedContainer { - let tagSetContainer = try tagSetWrappedContainer.decodeIfPresent([S3ControlClientTypes.S3Tag].self, forKey: .member) - var tagSetBuffer:[S3ControlClientTypes.S3Tag]? = nil - if let tagSetContainer = tagSetContainer { - tagSetBuffer = [S3ControlClientTypes.S3Tag]() - for structureContainer0 in tagSetContainer { - tagSetBuffer?.append(structureContainer0) - } - } - tagSet = tagSetBuffer - } else { - tagSet = [] - } - } else { - tagSet = nil + try writer["TagSet"].writeList(value.tagSet, memberWritingClosure: S3ControlClientTypes.S3Tag.writingClosure(_:to:), memberNodeInfo: "member", isFlattened: false) + } + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Tagging() + value.tagSet = try reader["TagSet"].readListIfPresent(memberReadingClosure: S3ControlClientTypes.S3Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -18280,16 +15291,26 @@ extension S3ControlClientTypes { } extension TooManyRequestsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil + + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyRequestsException() + value.properties.message = try reader["Message"].readIfPresent() + return value } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + } +} + +extension TooManyRequestsException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyRequestsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18317,33 +15338,27 @@ public struct TooManyRequestsException: ClientRuntime.ModeledError, AWSClientRun } } -struct TooManyRequestsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyRequestsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } +extension TooManyTagsException { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = TooManyTagsException() + value.properties.message = try reader["Message"].readIfPresent() + return value + } } } extension TooManyTagsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyTagsException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -18371,44 +15386,24 @@ public struct TooManyTagsException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct TooManyTagsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyTagsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension S3ControlClientTypes.Transition: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case date = "Date" - case days = "Days" - case storageClass = "StorageClass" - } +extension S3ControlClientTypes.Transition { static func writingClosure(_ value: S3ControlClientTypes.Transition?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("Date")].writeTimestamp(value.date, format: .dateTime) - try writer[.init("Days")].write(value.days) - try writer[.init("StorageClass")].write(value.storageClass) + try writer["Date"].writeTimestamp(value.date, format: .dateTime) + try writer["Days"].write(value.days) + try writer["StorageClass"].write(value.storageClass) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .date) - date = dateDecoded - let daysDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .days) ?? 0 - days = daysDecoded - let storageClassDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.TransitionStorageClass.self, forKey: .storageClass) - storageClass = storageClassDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.Transition() + value.date = try reader["Date"].readTimestampIfPresent(format: .dateTime) + value.days = try reader["Days"].readIfPresent() ?? 0 + value.storageClass = try reader["StorageClass"].readIfPresent() + return value + } } } @@ -18537,8 +15532,12 @@ public struct UntagResourceInput: Swift.Equatable { } } -extension UntagResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { +extension UntagResourceOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagResourceOutput() + } } } @@ -18547,23 +15546,23 @@ public struct UntagResourceOutput: Swift.Equatable { public init() { } } -enum UntagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateAccessGrantsLocationInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamRoleArn = "IAMRoleArn" - } - static func writingClosure(_ value: UpdateAccessGrantsLocationInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("IAMRoleArn")].write(value.iamRoleArn) + try writer["IAMRoleArn"].write(value.iamRoleArn) } } @@ -18611,38 +15610,19 @@ public struct UpdateAccessGrantsLocationInput: Swift.Equatable { } } -struct UpdateAccessGrantsLocationInputBody: Swift.Equatable { - let iamRoleArn: Swift.String? -} - -extension UpdateAccessGrantsLocationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case iamRoleArn = "IAMRoleArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - } -} +extension UpdateAccessGrantsLocationOutput { -extension UpdateAccessGrantsLocationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateAccessGrantsLocationOutputBody = try responseDecoder.decode(responseBody: data) - self.accessGrantsLocationArn = output.accessGrantsLocationArn - self.accessGrantsLocationId = output.accessGrantsLocationId - self.createdAt = output.createdAt - self.iamRoleArn = output.iamRoleArn - self.locationScope = output.locationScope - } else { - self.accessGrantsLocationArn = nil - self.accessGrantsLocationId = nil - self.createdAt = nil - self.iamRoleArn = nil - self.locationScope = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateAccessGrantsLocationOutput() + value.accessGrantsLocationArn = try reader["AccessGrantsLocationArn"].readIfPresent() + value.accessGrantsLocationId = try reader["AccessGrantsLocationId"].readIfPresent() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.iamRoleArn = try reader["IAMRoleArn"].readIfPresent() + value.locationScope = try reader["LocationScope"].readIfPresent() + return value } } } @@ -18675,43 +15655,15 @@ public struct UpdateAccessGrantsLocationOutput: Swift.Equatable { } } -struct UpdateAccessGrantsLocationOutputBody: Swift.Equatable { - let createdAt: ClientRuntime.Date? - let accessGrantsLocationId: Swift.String? - let accessGrantsLocationArn: Swift.String? - let locationScope: Swift.String? - let iamRoleArn: Swift.String? -} - -extension UpdateAccessGrantsLocationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessGrantsLocationArn = "AccessGrantsLocationArn" - case accessGrantsLocationId = "AccessGrantsLocationId" - case createdAt = "CreatedAt" - case iamRoleArn = "IAMRoleArn" - case locationScope = "LocationScope" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let accessGrantsLocationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationId) - accessGrantsLocationId = accessGrantsLocationIdDecoded - let accessGrantsLocationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessGrantsLocationArn) - accessGrantsLocationArn = accessGrantsLocationArnDecoded - let locationScopeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .locationScope) - locationScope = locationScopeDecoded - let iamRoleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleArn) - iamRoleArn = iamRoleArnDecoded - } -} +enum UpdateAccessGrantsLocationOutputError { -enum UpdateAccessGrantsLocationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -18774,16 +15726,16 @@ public struct UpdateJobPriorityInput: Swift.Equatable { } } -extension UpdateJobPriorityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateJobPriorityOutputBody = try responseDecoder.decode(responseBody: data) - self.jobId = output.jobId - self.priority = output.priority - } else { - self.jobId = nil - self.priority = 0 +extension UpdateJobPriorityOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateJobPriorityOutput() + value.jobId = try reader["JobId"].readIfPresent() + value.priority = try reader["Priority"].readIfPresent() ?? 0 + return value } } } @@ -18806,35 +15758,20 @@ public struct UpdateJobPriorityOutput: Swift.Equatable { } } -struct UpdateJobPriorityOutputBody: Swift.Equatable { - let jobId: Swift.String? - let priority: Swift.Int -} - -extension UpdateJobPriorityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobId = "JobId" - case priority = "Priority" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - let priorityDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .priority) ?? 0 - priority = priorityDecoded - } -} +enum UpdateJobPriorityOutputError { -enum UpdateJobPriorityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRequestsException": return try await TooManyRequestsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "BadRequestException": return try await BadRequestException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InternalServiceException": return try await InternalServiceException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NotFoundException": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRequestsException": return try await TooManyRequestsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } @@ -18905,18 +15842,17 @@ public struct UpdateJobStatusInput: Swift.Equatable { } } -extension UpdateJobStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: UpdateJobStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.jobId = output.jobId - self.status = output.status - self.statusUpdateReason = output.statusUpdateReason - } else { - self.jobId = nil - self.status = nil - self.statusUpdateReason = nil +extension UpdateJobStatusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader + var value = UpdateJobStatusOutput() + value.jobId = try reader["JobId"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.statusUpdateReason = try reader["StatusUpdateReason"].readIfPresent() + return value } } } @@ -18941,52 +15877,29 @@ public struct UpdateJobStatusOutput: Swift.Equatable { } } -struct UpdateJobStatusOutputBody: Swift.Equatable { - let jobId: Swift.String? - let status: S3ControlClientTypes.JobStatus? - let statusUpdateReason: Swift.String? -} - -extension UpdateJobStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case jobId = "JobId" - case status = "Status" - case statusUpdateReason = "StatusUpdateReason" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let jobIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .jobId) - jobId = jobIdDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.JobStatus.self, forKey: .status) - status = statusDecoded - let statusUpdateReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusUpdateReason) - statusUpdateReason = statusUpdateReasonDecoded - } -} +enum UpdateJobStatusOutputError { -enum UpdateJobStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "BadRequestException": return try await BadRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalServiceException": return try await InternalServiceException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "JobStatusException": return try await JobStatusException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFoundException": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyRequestsException": return try await TooManyRequestsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let errorBodyReader = AWSClientRuntime.RestXMLError.errorBodyReader(responseReader: responseReader, noErrorWrapping: false) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + case "BadRequestException": return try await BadRequestException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "InternalServiceException": return try await InternalServiceException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "JobStatusException": return try await JobStatusException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "NotFoundException": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + case "TooManyRequestsException": return try await TooManyRequestsException.responseErrorBinding(httpResponse: httpResponse, reader: errorBodyReader, message: restXMLError.message, requestID: restXMLError.requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } extension UpdateStorageLensGroupInput { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageLensGroup = "StorageLensGroup" - } - static func writingClosure(_ value: UpdateStorageLensGroupInput?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("StorageLensGroup")].write(value.storageLensGroup, writingClosure: S3ControlClientTypes.StorageLensGroup.writingClosure(_:to:)) + try writer["StorageLensGroup"].write(value.storageLensGroup, writingClosure: S3ControlClientTypes.StorageLensGroup.writingClosure(_:to:)) } } @@ -19034,24 +15947,12 @@ public struct UpdateStorageLensGroupInput: Swift.Equatable { } } -struct UpdateStorageLensGroupInputBody: Swift.Equatable { - let storageLensGroup: S3ControlClientTypes.StorageLensGroup? -} - -extension UpdateStorageLensGroupInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case storageLensGroup = "StorageLensGroup" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let storageLensGroupDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.StorageLensGroup.self, forKey: .storageLensGroup) - storageLensGroup = storageLensGroupDecoded - } -} +extension UpdateStorageLensGroupOutput { -extension UpdateStorageLensGroupOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateStorageLensGroupOutput() + } } } @@ -19060,33 +15961,35 @@ public struct UpdateStorageLensGroupOutput: Swift.Equatable { public init() { } } -enum UpdateStorageLensGroupOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateStorageLensGroupOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let restXMLError = try AWSClientRuntime.RestXMLError(responseReader: responseReader, noErrorWrapping: false) + switch restXMLError.code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestID, typeName: restXMLError.code) + } } } } -extension S3ControlClientTypes.VersioningConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case mfaDelete = "MfaDelete" - case status = "Status" - } +extension S3ControlClientTypes.VersioningConfiguration { static func writingClosure(_ value: S3ControlClientTypes.VersioningConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("MfaDelete")].write(value.mfaDelete) - try writer[.init("Status")].write(value.status) + try writer["MfaDelete"].write(value.mfaDelete) + try writer["Status"].write(value.status) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let mfaDeleteDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.MFADelete.self, forKey: .mfaDelete) - mfaDelete = mfaDeleteDecoded - let statusDecoded = try containerValues.decodeIfPresent(S3ControlClientTypes.BucketVersioningStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.VersioningConfiguration() + value.mfaDelete = try reader["MfaDelete"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -19110,20 +16013,20 @@ extension S3ControlClientTypes { } -extension S3ControlClientTypes.VpcConfiguration: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case vpcId = "VpcId" - } +extension S3ControlClientTypes.VpcConfiguration { static func writingClosure(_ value: S3ControlClientTypes.VpcConfiguration?, to writer: SmithyXML.Writer) throws { guard let value else { writer.detach(); return } - try writer[.init("VpcId")].write(value.vpcId) + try writer["VpcId"].write(value.vpcId) } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let vpcIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .vpcId) - vpcId = vpcIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = S3ControlClientTypes.VpcConfiguration() + value.vpcId = try reader["VpcId"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSSES/SESClient.swift b/Sources/Services/AWSSES/SESClient.swift index 6499039f577..73e54a17506 100644 --- a/Sources/Services/AWSSES/SESClient.swift +++ b/Sources/Services/AWSSES/SESClient.swift @@ -11,14 +11,11 @@ public class SESClient { let config: SESClient.SESClientConfiguration let serviceName = "SES" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: SESClient.SESClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -80,7 +77,6 @@ extension SESClient { public func cloneReceiptRuleSet(input: CloneReceiptRuleSetInput) async throws -> CloneReceiptRuleSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "cloneReceiptRuleSet") @@ -104,7 +100,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CloneReceiptRuleSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CloneReceiptRuleSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CloneReceiptRuleSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -127,7 +123,6 @@ extension SESClient { public func createConfigurationSet(input: CreateConfigurationSetInput) async throws -> CreateConfigurationSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createConfigurationSet") @@ -151,7 +146,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateConfigurationSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateConfigurationSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateConfigurationSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -177,7 +172,6 @@ extension SESClient { public func createConfigurationSetEventDestination(input: CreateConfigurationSetEventDestinationInput) async throws -> CreateConfigurationSetEventDestinationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createConfigurationSetEventDestination") @@ -201,7 +195,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateConfigurationSetEventDestinationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateConfigurationSetEventDestinationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateConfigurationSetEventDestinationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -228,7 +222,6 @@ extension SESClient { public func createConfigurationSetTrackingOptions(input: CreateConfigurationSetTrackingOptionsInput) async throws -> CreateConfigurationSetTrackingOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createConfigurationSetTrackingOptions") @@ -252,7 +245,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateConfigurationSetTrackingOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateConfigurationSetTrackingOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateConfigurationSetTrackingOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -276,7 +269,6 @@ extension SESClient { public func createCustomVerificationEmailTemplate(input: CreateCustomVerificationEmailTemplateInput) async throws -> CreateCustomVerificationEmailTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createCustomVerificationEmailTemplate") @@ -300,7 +292,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateCustomVerificationEmailTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateCustomVerificationEmailTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateCustomVerificationEmailTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -322,7 +314,6 @@ extension SESClient { public func createReceiptFilter(input: CreateReceiptFilterInput) async throws -> CreateReceiptFilterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createReceiptFilter") @@ -346,7 +337,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateReceiptFilterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateReceiptFilterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateReceiptFilterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -373,7 +364,6 @@ extension SESClient { public func createReceiptRule(input: CreateReceiptRuleInput) async throws -> CreateReceiptRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createReceiptRule") @@ -397,7 +387,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateReceiptRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateReceiptRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateReceiptRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -419,7 +409,6 @@ extension SESClient { public func createReceiptRuleSet(input: CreateReceiptRuleSetInput) async throws -> CreateReceiptRuleSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createReceiptRuleSet") @@ -443,7 +432,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateReceiptRuleSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateReceiptRuleSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateReceiptRuleSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -466,7 +455,6 @@ extension SESClient { public func createTemplate(input: CreateTemplateInput) async throws -> CreateTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTemplate") @@ -490,7 +478,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -511,7 +499,6 @@ extension SESClient { public func deleteConfigurationSet(input: DeleteConfigurationSetInput) async throws -> DeleteConfigurationSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteConfigurationSet") @@ -535,7 +522,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteConfigurationSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteConfigurationSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteConfigurationSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -557,7 +544,6 @@ extension SESClient { public func deleteConfigurationSetEventDestination(input: DeleteConfigurationSetEventDestinationInput) async throws -> DeleteConfigurationSetEventDestinationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteConfigurationSetEventDestination") @@ -581,7 +567,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteConfigurationSetEventDestinationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteConfigurationSetEventDestinationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteConfigurationSetEventDestinationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -603,7 +589,6 @@ extension SESClient { public func deleteConfigurationSetTrackingOptions(input: DeleteConfigurationSetTrackingOptionsInput) async throws -> DeleteConfigurationSetTrackingOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteConfigurationSetTrackingOptions") @@ -627,7 +612,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteConfigurationSetTrackingOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteConfigurationSetTrackingOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteConfigurationSetTrackingOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -643,7 +628,6 @@ extension SESClient { public func deleteCustomVerificationEmailTemplate(input: DeleteCustomVerificationEmailTemplateInput) async throws -> DeleteCustomVerificationEmailTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteCustomVerificationEmailTemplate") @@ -667,7 +651,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteCustomVerificationEmailTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteCustomVerificationEmailTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteCustomVerificationEmailTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -683,7 +667,6 @@ extension SESClient { public func deleteIdentity(input: DeleteIdentityInput) async throws -> DeleteIdentityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteIdentity") @@ -707,7 +690,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -723,7 +706,6 @@ extension SESClient { public func deleteIdentityPolicy(input: DeleteIdentityPolicyInput) async throws -> DeleteIdentityPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteIdentityPolicy") @@ -747,7 +729,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteIdentityPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteIdentityPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteIdentityPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -763,7 +745,6 @@ extension SESClient { public func deleteReceiptFilter(input: DeleteReceiptFilterInput) async throws -> DeleteReceiptFilterOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteReceiptFilter") @@ -787,7 +768,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteReceiptFilterOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteReceiptFilterOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteReceiptFilterOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -808,7 +789,6 @@ extension SESClient { public func deleteReceiptRule(input: DeleteReceiptRuleInput) async throws -> DeleteReceiptRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteReceiptRule") @@ -832,7 +812,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteReceiptRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteReceiptRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteReceiptRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -853,7 +833,6 @@ extension SESClient { public func deleteReceiptRuleSet(input: DeleteReceiptRuleSetInput) async throws -> DeleteReceiptRuleSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteReceiptRuleSet") @@ -877,7 +856,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteReceiptRuleSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteReceiptRuleSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteReceiptRuleSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -893,7 +872,6 @@ extension SESClient { public func deleteTemplate(input: DeleteTemplateInput) async throws -> DeleteTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTemplate") @@ -917,7 +895,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -933,7 +911,6 @@ extension SESClient { public func deleteVerifiedEmailAddress(input: DeleteVerifiedEmailAddressInput) async throws -> DeleteVerifiedEmailAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteVerifiedEmailAddress") @@ -957,7 +934,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteVerifiedEmailAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteVerifiedEmailAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteVerifiedEmailAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -973,7 +950,6 @@ extension SESClient { public func describeActiveReceiptRuleSet(input: DescribeActiveReceiptRuleSetInput) async throws -> DescribeActiveReceiptRuleSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeActiveReceiptRuleSet") @@ -997,7 +973,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeActiveReceiptRuleSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeActiveReceiptRuleSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeActiveReceiptRuleSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1018,7 +994,6 @@ extension SESClient { public func describeConfigurationSet(input: DescribeConfigurationSetInput) async throws -> DescribeConfigurationSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeConfigurationSet") @@ -1042,7 +1017,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeConfigurationSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeConfigurationSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeConfigurationSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1064,7 +1039,6 @@ extension SESClient { public func describeReceiptRule(input: DescribeReceiptRuleInput) async throws -> DescribeReceiptRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReceiptRule") @@ -1088,7 +1062,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReceiptRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReceiptRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReceiptRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1109,7 +1083,6 @@ extension SESClient { public func describeReceiptRuleSet(input: DescribeReceiptRuleSetInput) async throws -> DescribeReceiptRuleSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "describeReceiptRuleSet") @@ -1133,7 +1106,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DescribeReceiptRuleSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DescribeReceiptRuleSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DescribeReceiptRuleSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1149,7 +1122,6 @@ extension SESClient { public func getAccountSendingEnabled(input: GetAccountSendingEnabledInput) async throws -> GetAccountSendingEnabledOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAccountSendingEnabled") @@ -1173,7 +1145,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccountSendingEnabledOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccountSendingEnabledOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccountSendingEnabledOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1194,7 +1166,6 @@ extension SESClient { public func getCustomVerificationEmailTemplate(input: GetCustomVerificationEmailTemplateInput) async throws -> GetCustomVerificationEmailTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getCustomVerificationEmailTemplate") @@ -1218,7 +1189,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCustomVerificationEmailTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCustomVerificationEmailTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCustomVerificationEmailTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1243,7 +1214,6 @@ extension SESClient { public func getIdentityDkimAttributes(input: GetIdentityDkimAttributesInput) async throws -> GetIdentityDkimAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIdentityDkimAttributes") @@ -1267,7 +1237,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIdentityDkimAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIdentityDkimAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIdentityDkimAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1283,7 +1253,6 @@ extension SESClient { public func getIdentityMailFromDomainAttributes(input: GetIdentityMailFromDomainAttributesInput) async throws -> GetIdentityMailFromDomainAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIdentityMailFromDomainAttributes") @@ -1307,7 +1276,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIdentityMailFromDomainAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIdentityMailFromDomainAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIdentityMailFromDomainAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1323,7 +1292,6 @@ extension SESClient { public func getIdentityNotificationAttributes(input: GetIdentityNotificationAttributesInput) async throws -> GetIdentityNotificationAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIdentityNotificationAttributes") @@ -1347,7 +1315,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIdentityNotificationAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIdentityNotificationAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIdentityNotificationAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1363,7 +1331,6 @@ extension SESClient { public func getIdentityPolicies(input: GetIdentityPoliciesInput) async throws -> GetIdentityPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIdentityPolicies") @@ -1387,7 +1354,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIdentityPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIdentityPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIdentityPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1403,7 +1370,6 @@ extension SESClient { public func getIdentityVerificationAttributes(input: GetIdentityVerificationAttributesInput) async throws -> GetIdentityVerificationAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getIdentityVerificationAttributes") @@ -1427,7 +1393,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetIdentityVerificationAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetIdentityVerificationAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetIdentityVerificationAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1443,7 +1409,6 @@ extension SESClient { public func getSendQuota(input: GetSendQuotaInput) async throws -> GetSendQuotaOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSendQuota") @@ -1467,7 +1432,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSendQuotaOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSendQuotaOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSendQuotaOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1483,7 +1448,6 @@ extension SESClient { public func getSendStatistics(input: GetSendStatisticsInput) async throws -> GetSendStatisticsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSendStatistics") @@ -1507,7 +1471,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSendStatisticsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSendStatisticsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSendStatisticsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1528,7 +1492,6 @@ extension SESClient { public func getTemplate(input: GetTemplateInput) async throws -> GetTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTemplate") @@ -1552,7 +1515,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1568,7 +1531,6 @@ extension SESClient { public func listConfigurationSets(input: ListConfigurationSetsInput) async throws -> ListConfigurationSetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listConfigurationSets") @@ -1592,7 +1554,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListConfigurationSetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListConfigurationSetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListConfigurationSetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1608,7 +1570,6 @@ extension SESClient { public func listCustomVerificationEmailTemplates(input: ListCustomVerificationEmailTemplatesInput) async throws -> ListCustomVerificationEmailTemplatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listCustomVerificationEmailTemplates") @@ -1632,7 +1593,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListCustomVerificationEmailTemplatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListCustomVerificationEmailTemplatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListCustomVerificationEmailTemplatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1648,7 +1609,6 @@ extension SESClient { public func listIdentities(input: ListIdentitiesInput) async throws -> ListIdentitiesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listIdentities") @@ -1672,7 +1632,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListIdentitiesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListIdentitiesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListIdentitiesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1688,7 +1648,6 @@ extension SESClient { public func listIdentityPolicies(input: ListIdentityPoliciesInput) async throws -> ListIdentityPoliciesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listIdentityPolicies") @@ -1712,7 +1671,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListIdentityPoliciesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListIdentityPoliciesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListIdentityPoliciesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1728,7 +1687,6 @@ extension SESClient { public func listReceiptFilters(input: ListReceiptFiltersInput) async throws -> ListReceiptFiltersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listReceiptFilters") @@ -1752,7 +1710,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListReceiptFiltersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListReceiptFiltersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListReceiptFiltersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1768,7 +1726,6 @@ extension SESClient { public func listReceiptRuleSets(input: ListReceiptRuleSetsInput) async throws -> ListReceiptRuleSetsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listReceiptRuleSets") @@ -1792,7 +1749,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListReceiptRuleSetsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListReceiptRuleSetsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListReceiptRuleSetsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1808,7 +1765,6 @@ extension SESClient { public func listTemplates(input: ListTemplatesInput) async throws -> ListTemplatesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTemplates") @@ -1832,7 +1788,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTemplatesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTemplatesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTemplatesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1848,7 +1804,6 @@ extension SESClient { public func listVerifiedEmailAddresses(input: ListVerifiedEmailAddressesInput) async throws -> ListVerifiedEmailAddressesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listVerifiedEmailAddresses") @@ -1872,7 +1827,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListVerifiedEmailAddressesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListVerifiedEmailAddressesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListVerifiedEmailAddressesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1894,7 +1849,6 @@ extension SESClient { public func putConfigurationSetDeliveryOptions(input: PutConfigurationSetDeliveryOptionsInput) async throws -> PutConfigurationSetDeliveryOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putConfigurationSetDeliveryOptions") @@ -1918,7 +1872,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutConfigurationSetDeliveryOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutConfigurationSetDeliveryOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutConfigurationSetDeliveryOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1939,7 +1893,6 @@ extension SESClient { public func putIdentityPolicy(input: PutIdentityPolicyInput) async throws -> PutIdentityPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putIdentityPolicy") @@ -1963,7 +1916,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutIdentityPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutIdentityPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutIdentityPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1985,7 +1938,6 @@ extension SESClient { public func reorderReceiptRuleSet(input: ReorderReceiptRuleSetInput) async throws -> ReorderReceiptRuleSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "reorderReceiptRuleSet") @@ -2009,7 +1961,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ReorderReceiptRuleSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ReorderReceiptRuleSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ReorderReceiptRuleSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2030,7 +1982,6 @@ extension SESClient { public func sendBounce(input: SendBounceInput) async throws -> SendBounceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "sendBounce") @@ -2054,7 +2005,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SendBounceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SendBounceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SendBounceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2094,7 +2045,6 @@ extension SESClient { public func sendBulkTemplatedEmail(input: SendBulkTemplatedEmailInput) async throws -> SendBulkTemplatedEmailOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "sendBulkTemplatedEmail") @@ -2118,7 +2068,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SendBulkTemplatedEmailOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SendBulkTemplatedEmailOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SendBulkTemplatedEmailOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2143,7 +2093,6 @@ extension SESClient { public func sendCustomVerificationEmail(input: SendCustomVerificationEmailInput) async throws -> SendCustomVerificationEmailOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "sendCustomVerificationEmail") @@ -2167,7 +2116,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SendCustomVerificationEmailOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SendCustomVerificationEmailOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SendCustomVerificationEmailOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2205,7 +2154,6 @@ extension SESClient { public func sendEmail(input: SendEmailInput) async throws -> SendEmailOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "sendEmail") @@ -2229,7 +2177,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SendEmailOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SendEmailOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SendEmailOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2286,7 +2234,6 @@ extension SESClient { public func sendRawEmail(input: SendRawEmailInput) async throws -> SendRawEmailOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "sendRawEmail") @@ -2310,7 +2257,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SendRawEmailOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SendRawEmailOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SendRawEmailOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2351,7 +2298,6 @@ extension SESClient { public func sendTemplatedEmail(input: SendTemplatedEmailInput) async throws -> SendTemplatedEmailOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "sendTemplatedEmail") @@ -2375,7 +2321,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SendTemplatedEmailOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SendTemplatedEmailOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SendTemplatedEmailOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2396,7 +2342,6 @@ extension SESClient { public func setActiveReceiptRuleSet(input: SetActiveReceiptRuleSetInput) async throws -> SetActiveReceiptRuleSetOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setActiveReceiptRuleSet") @@ -2420,7 +2365,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetActiveReceiptRuleSetOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetActiveReceiptRuleSetOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetActiveReceiptRuleSetOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2436,7 +2381,6 @@ extension SESClient { public func setIdentityDkimEnabled(input: SetIdentityDkimEnabledInput) async throws -> SetIdentityDkimEnabledOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setIdentityDkimEnabled") @@ -2460,7 +2404,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetIdentityDkimEnabledOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetIdentityDkimEnabledOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetIdentityDkimEnabledOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2476,7 +2420,6 @@ extension SESClient { public func setIdentityFeedbackForwardingEnabled(input: SetIdentityFeedbackForwardingEnabledInput) async throws -> SetIdentityFeedbackForwardingEnabledOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setIdentityFeedbackForwardingEnabled") @@ -2500,7 +2443,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetIdentityFeedbackForwardingEnabledOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetIdentityFeedbackForwardingEnabledOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetIdentityFeedbackForwardingEnabledOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2516,7 +2459,6 @@ extension SESClient { public func setIdentityHeadersInNotificationsEnabled(input: SetIdentityHeadersInNotificationsEnabledInput) async throws -> SetIdentityHeadersInNotificationsEnabledOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setIdentityHeadersInNotificationsEnabled") @@ -2540,7 +2482,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetIdentityHeadersInNotificationsEnabledOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetIdentityHeadersInNotificationsEnabledOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetIdentityHeadersInNotificationsEnabledOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2556,7 +2498,6 @@ extension SESClient { public func setIdentityMailFromDomain(input: SetIdentityMailFromDomainInput) async throws -> SetIdentityMailFromDomainOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setIdentityMailFromDomain") @@ -2580,7 +2521,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetIdentityMailFromDomainOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetIdentityMailFromDomainOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetIdentityMailFromDomainOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2596,7 +2537,6 @@ extension SESClient { public func setIdentityNotificationTopic(input: SetIdentityNotificationTopicInput) async throws -> SetIdentityNotificationTopicOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setIdentityNotificationTopic") @@ -2620,7 +2560,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetIdentityNotificationTopicOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetIdentityNotificationTopicOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetIdentityNotificationTopicOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2642,7 +2582,6 @@ extension SESClient { public func setReceiptRulePosition(input: SetReceiptRulePositionInput) async throws -> SetReceiptRulePositionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setReceiptRulePosition") @@ -2666,7 +2605,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetReceiptRulePositionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetReceiptRulePositionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetReceiptRulePositionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2689,7 +2628,6 @@ extension SESClient { public func testRenderTemplate(input: TestRenderTemplateInput) async throws -> TestRenderTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "testRenderTemplate") @@ -2713,7 +2651,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TestRenderTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TestRenderTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TestRenderTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2729,7 +2667,6 @@ extension SESClient { public func updateAccountSendingEnabled(input: UpdateAccountSendingEnabledInput) async throws -> UpdateAccountSendingEnabledOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateAccountSendingEnabled") @@ -2753,7 +2690,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateAccountSendingEnabledOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateAccountSendingEnabledOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateAccountSendingEnabledOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2778,7 +2715,6 @@ extension SESClient { public func updateConfigurationSetEventDestination(input: UpdateConfigurationSetEventDestinationInput) async throws -> UpdateConfigurationSetEventDestinationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateConfigurationSetEventDestination") @@ -2802,7 +2738,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateConfigurationSetEventDestinationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateConfigurationSetEventDestinationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateConfigurationSetEventDestinationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2823,7 +2759,6 @@ extension SESClient { public func updateConfigurationSetReputationMetricsEnabled(input: UpdateConfigurationSetReputationMetricsEnabledInput) async throws -> UpdateConfigurationSetReputationMetricsEnabledOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateConfigurationSetReputationMetricsEnabled") @@ -2847,7 +2782,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateConfigurationSetReputationMetricsEnabledOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateConfigurationSetReputationMetricsEnabledOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateConfigurationSetReputationMetricsEnabledOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2868,7 +2803,6 @@ extension SESClient { public func updateConfigurationSetSendingEnabled(input: UpdateConfigurationSetSendingEnabledInput) async throws -> UpdateConfigurationSetSendingEnabledOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateConfigurationSetSendingEnabled") @@ -2892,7 +2826,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateConfigurationSetSendingEnabledOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateConfigurationSetSendingEnabledOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateConfigurationSetSendingEnabledOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2919,7 +2853,6 @@ extension SESClient { public func updateConfigurationSetTrackingOptions(input: UpdateConfigurationSetTrackingOptionsInput) async throws -> UpdateConfigurationSetTrackingOptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateConfigurationSetTrackingOptions") @@ -2943,7 +2876,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateConfigurationSetTrackingOptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateConfigurationSetTrackingOptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateConfigurationSetTrackingOptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2966,7 +2899,6 @@ extension SESClient { public func updateCustomVerificationEmailTemplate(input: UpdateCustomVerificationEmailTemplateInput) async throws -> UpdateCustomVerificationEmailTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateCustomVerificationEmailTemplate") @@ -2990,7 +2922,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateCustomVerificationEmailTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateCustomVerificationEmailTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateCustomVerificationEmailTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3016,7 +2948,6 @@ extension SESClient { public func updateReceiptRule(input: UpdateReceiptRuleInput) async throws -> UpdateReceiptRuleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateReceiptRule") @@ -3040,7 +2971,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateReceiptRuleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateReceiptRuleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateReceiptRuleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3062,7 +2993,6 @@ extension SESClient { public func updateTemplate(input: UpdateTemplateInput) async throws -> UpdateTemplateOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "updateTemplate") @@ -3086,7 +3016,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UpdateTemplateOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UpdateTemplateOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UpdateTemplateOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3111,7 +3041,6 @@ extension SESClient { public func verifyDomainDkim(input: VerifyDomainDkimInput) async throws -> VerifyDomainDkimOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "verifyDomainDkim") @@ -3135,7 +3064,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(VerifyDomainDkimOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(VerifyDomainDkimOutput.httpBinding, responseDocumentBinding), responseErrorClosure(VerifyDomainDkimOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3151,7 +3080,6 @@ extension SESClient { public func verifyDomainIdentity(input: VerifyDomainIdentityInput) async throws -> VerifyDomainIdentityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "verifyDomainIdentity") @@ -3175,7 +3103,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(VerifyDomainIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(VerifyDomainIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(VerifyDomainIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3191,7 +3119,6 @@ extension SESClient { public func verifyEmailAddress(input: VerifyEmailAddressInput) async throws -> VerifyEmailAddressOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "verifyEmailAddress") @@ -3215,7 +3142,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(VerifyEmailAddressOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(VerifyEmailAddressOutput.httpBinding, responseDocumentBinding), responseErrorClosure(VerifyEmailAddressOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -3231,7 +3158,6 @@ extension SESClient { public func verifyEmailIdentity(input: VerifyEmailIdentityInput) async throws -> VerifyEmailIdentityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "verifyEmailIdentity") @@ -3255,7 +3181,7 @@ extension SESClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(VerifyEmailIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(VerifyEmailIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(VerifyEmailIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSSES/models/Models.swift b/Sources/Services/AWSSES/models/Models.swift index 496620df68f..1adf6ed3592 100644 --- a/Sources/Services/AWSSES/models/Models.swift +++ b/Sources/Services/AWSSES/models/Models.swift @@ -1,18 +1,18 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension AccountSendingPausedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AccountSendingPausedException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -40,23 +40,7 @@ public struct AccountSendingPausedException: ClientRuntime.ModeledError, AWSClie } } -struct AccountSendingPausedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension AccountSendingPausedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SESClientTypes.AddHeaderAction: Swift.Codable { +extension SESClientTypes.AddHeaderAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case headerName = "HeaderName" case headerValue = "HeaderValue" @@ -72,12 +56,14 @@ extension SESClientTypes.AddHeaderAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let headerNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .headerName) - headerName = headerNameDecoded - let headerValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .headerValue) - headerValue = headerValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.AddHeaderAction() + value.headerName = try reader["HeaderName"].readIfPresent() + value.headerValue = try reader["HeaderValue"].readIfPresent() + return value + } } } @@ -104,18 +90,15 @@ extension SESClientTypes { } extension AlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.name = output.error.name - } else { - self.properties.name = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AlreadyExistsException() + value.properties.name = try reader["Name"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -147,26 +130,6 @@ public struct AlreadyExistsException: ClientRuntime.ModeledError, AWSClientRunti } } -struct AlreadyExistsExceptionBody: Swift.Equatable { - let name: Swift.String? - let message: Swift.String? -} - -extension AlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SESClientTypes { public enum BehaviorOnMXFailure: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case rejectmessage @@ -199,7 +162,7 @@ extension SESClientTypes { } } -extension SESClientTypes.Body: Swift.Codable { +extension SESClientTypes.Body: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case html = "Html" case text = "Text" @@ -215,12 +178,14 @@ extension SESClientTypes.Body: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let textDecoded = try containerValues.decodeIfPresent(SESClientTypes.Content.self, forKey: .text) - text = textDecoded - let htmlDecoded = try containerValues.decodeIfPresent(SESClientTypes.Content.self, forKey: .html) - html = htmlDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.Body() + value.text = try reader["Text"].readIfPresent(readingClosure: SESClientTypes.Content.readingClosure) + value.html = try reader["Html"].readIfPresent(readingClosure: SESClientTypes.Content.readingClosure) + return value + } } } @@ -244,7 +209,7 @@ extension SESClientTypes { } -extension SESClientTypes.BounceAction: Swift.Codable { +extension SESClientTypes.BounceAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case message = "Message" case sender = "Sender" @@ -272,18 +237,17 @@ extension SESClientTypes.BounceAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let smtpReplyCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .smtpReplyCode) - smtpReplyCode = smtpReplyCodeDecoded - let statusCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .statusCode) - statusCode = statusCodeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let senderDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sender) - sender = senderDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.BounceAction() + value.topicArn = try reader["TopicArn"].readIfPresent() + value.smtpReplyCode = try reader["SmtpReplyCode"].readIfPresent() + value.statusCode = try reader["StatusCode"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.sender = try reader["Sender"].readIfPresent() + return value + } } } @@ -366,7 +330,7 @@ extension SESClientTypes { } } -extension SESClientTypes.BouncedRecipientInfo: Swift.Codable { +extension SESClientTypes.BouncedRecipientInfo: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case bounceType = "BounceType" case recipient = "Recipient" @@ -390,16 +354,16 @@ extension SESClientTypes.BouncedRecipientInfo: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let recipientDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recipient) - recipient = recipientDecoded - let recipientArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .recipientArn) - recipientArn = recipientArnDecoded - let bounceTypeDecoded = try containerValues.decodeIfPresent(SESClientTypes.BounceType.self, forKey: .bounceType) - bounceType = bounceTypeDecoded - let recipientDsnFieldsDecoded = try containerValues.decodeIfPresent(SESClientTypes.RecipientDsnFields.self, forKey: .recipientDsnFields) - recipientDsnFields = recipientDsnFieldsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.BouncedRecipientInfo() + value.recipient = try reader["Recipient"].readIfPresent() + value.recipientArn = try reader["RecipientArn"].readIfPresent() + value.bounceType = try reader["BounceType"].readIfPresent() + value.recipientDsnFields = try reader["RecipientDsnFields"].readIfPresent(readingClosure: SESClientTypes.RecipientDsnFields.readingClosure) + return value + } } } @@ -432,7 +396,7 @@ extension SESClientTypes { } -extension SESClientTypes.BulkEmailDestination: Swift.Codable { +extension SESClientTypes.BulkEmailDestination: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case destination = "Destination" case replacementTags = "ReplacementTags" @@ -461,31 +425,15 @@ extension SESClientTypes.BulkEmailDestination: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let destinationDecoded = try containerValues.decodeIfPresent(SESClientTypes.Destination.self, forKey: .destination) - destination = destinationDecoded - if containerValues.contains(.replacementTags) { - struct KeyVal0{struct member{}} - let replacementTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replacementTags) - if let replacementTagsWrappedContainer = replacementTagsWrappedContainer { - let replacementTagsContainer = try replacementTagsWrappedContainer.decodeIfPresent([SESClientTypes.MessageTag].self, forKey: .member) - var replacementTagsBuffer:[SESClientTypes.MessageTag]? = nil - if let replacementTagsContainer = replacementTagsContainer { - replacementTagsBuffer = [SESClientTypes.MessageTag]() - for structureContainer0 in replacementTagsContainer { - replacementTagsBuffer?.append(structureContainer0) - } - } - replacementTags = replacementTagsBuffer - } else { - replacementTags = [] - } - } else { - replacementTags = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.BulkEmailDestination() + value.destination = try reader["Destination"].readIfPresent(readingClosure: SESClientTypes.Destination.readingClosure) + value.replacementTags = try reader["ReplacementTags"].readListIfPresent(memberReadingClosure: SESClientTypes.MessageTag.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.replacementTemplateData = try reader["ReplacementTemplateData"].readIfPresent() + return value } - let replacementTemplateDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .replacementTemplateData) - replacementTemplateData = replacementTemplateDataDecoded } } @@ -514,7 +462,7 @@ extension SESClientTypes { } -extension SESClientTypes.BulkEmailDestinationStatus: Swift.Codable { +extension SESClientTypes.BulkEmailDestinationStatus: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case error = "Error" case messageId = "MessageId" @@ -534,14 +482,15 @@ extension SESClientTypes.BulkEmailDestinationStatus: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let statusDecoded = try containerValues.decodeIfPresent(SESClientTypes.BulkEmailStatus.self, forKey: .status) - status = statusDecoded - let errorDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .error) - error = errorDecoded - let messageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageId) - messageId = messageIdDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.BulkEmailDestinationStatus() + value.status = try reader["Status"].readIfPresent() + value.error = try reader["Error"].readIfPresent() + value.messageId = try reader["MessageId"].readIfPresent() + return value + } } } @@ -666,18 +615,15 @@ extension SESClientTypes { } extension CannotDeleteException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.name = output.error.name - } else { - self.properties.name = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CannotDeleteException() + value.properties.name = try reader["Name"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -709,27 +655,12 @@ public struct CannotDeleteException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct CannotDeleteExceptionBody: Swift.Equatable { - let name: Swift.String? - let message: Swift.String? -} - -extension CannotDeleteExceptionBody: Swift.Decodable { +extension CloneReceiptRuleSetInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case originalRuleSetName = "OriginalRuleSetName" + case ruleSetName = "RuleSetName" } -} -extension CloneReceiptRuleSetInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let originalRuleSetName = originalRuleSetName { @@ -775,28 +706,12 @@ public struct CloneReceiptRuleSetInput: Swift.Equatable { } } -struct CloneReceiptRuleSetInputBody: Swift.Equatable { - let ruleSetName: Swift.String? - let originalRuleSetName: Swift.String? -} - -extension CloneReceiptRuleSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case originalRuleSetName = "OriginalRuleSetName" - case ruleSetName = "RuleSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - let originalRuleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originalRuleSetName) - originalRuleSetName = originalRuleSetNameDecoded - } -} +extension CloneReceiptRuleSetOutput { -extension CloneReceiptRuleSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CloneReceiptRuleSetOutput() + } } } @@ -806,19 +721,26 @@ public struct CloneReceiptRuleSetOutput: Swift.Equatable { public init() { } } -enum CloneReceiptRuleSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CloneReceiptRuleSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SESClientTypes.CloudWatchDestination: Swift.Codable { +extension SESClientTypes.CloudWatchDestination: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dimensionConfigurations = "DimensionConfigurations" } @@ -839,26 +761,12 @@ extension SESClientTypes.CloudWatchDestination: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.dimensionConfigurations) { - struct KeyVal0{struct member{}} - let dimensionConfigurationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dimensionConfigurations) - if let dimensionConfigurationsWrappedContainer = dimensionConfigurationsWrappedContainer { - let dimensionConfigurationsContainer = try dimensionConfigurationsWrappedContainer.decodeIfPresent([SESClientTypes.CloudWatchDimensionConfiguration].self, forKey: .member) - var dimensionConfigurationsBuffer:[SESClientTypes.CloudWatchDimensionConfiguration]? = nil - if let dimensionConfigurationsContainer = dimensionConfigurationsContainer { - dimensionConfigurationsBuffer = [SESClientTypes.CloudWatchDimensionConfiguration]() - for structureContainer0 in dimensionConfigurationsContainer { - dimensionConfigurationsBuffer?.append(structureContainer0) - } - } - dimensionConfigurations = dimensionConfigurationsBuffer - } else { - dimensionConfigurations = [] - } - } else { - dimensionConfigurations = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.CloudWatchDestination() + value.dimensionConfigurations = try reader["DimensionConfigurations"].readListIfPresent(memberReadingClosure: SESClientTypes.CloudWatchDimensionConfiguration.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -880,7 +788,7 @@ extension SESClientTypes { } -extension SESClientTypes.CloudWatchDimensionConfiguration: Swift.Codable { +extension SESClientTypes.CloudWatchDimensionConfiguration: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case defaultDimensionValue = "DefaultDimensionValue" case dimensionName = "DimensionName" @@ -900,14 +808,15 @@ extension SESClientTypes.CloudWatchDimensionConfiguration: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dimensionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dimensionName) - dimensionName = dimensionNameDecoded - let dimensionValueSourceDecoded = try containerValues.decodeIfPresent(SESClientTypes.DimensionValueSource.self, forKey: .dimensionValueSource) - dimensionValueSource = dimensionValueSourceDecoded - let defaultDimensionValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultDimensionValue) - defaultDimensionValue = defaultDimensionValueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.CloudWatchDimensionConfiguration() + value.dimensionName = try reader["DimensionName"].readIfPresent() + value.dimensionValueSource = try reader["DimensionValueSource"].readIfPresent() + value.defaultDimensionValue = try reader["DefaultDimensionValue"].readIfPresent() + return value + } } } @@ -946,7 +855,7 @@ extension SESClientTypes { } -extension SESClientTypes.ConfigurationSet: Swift.Codable { +extension SESClientTypes.ConfigurationSet: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" } @@ -958,10 +867,13 @@ extension SESClientTypes.ConfigurationSet: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.ConfigurationSet() + value.name = try reader["Name"].readIfPresent() + return value + } } } @@ -987,18 +899,15 @@ extension SESClientTypes { } extension ConfigurationSetAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConfigurationSetAlreadyExistsException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1030,26 +939,6 @@ public struct ConfigurationSetAlreadyExistsException: ClientRuntime.ModeledError } } -struct ConfigurationSetAlreadyExistsExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let message: Swift.String? -} - -extension ConfigurationSetAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SESClientTypes { public enum ConfigurationSetAttribute: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case deliveryOptions @@ -1089,18 +978,15 @@ extension SESClientTypes { } extension ConfigurationSetDoesNotExistException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConfigurationSetDoesNotExistException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1132,39 +1018,16 @@ public struct ConfigurationSetDoesNotExistException: ClientRuntime.ModeledError, } } -struct ConfigurationSetDoesNotExistExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let message: Swift.String? -} - -extension ConfigurationSetDoesNotExistExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ConfigurationSetSendingPausedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConfigurationSetSendingPausedException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1196,27 +1059,7 @@ public struct ConfigurationSetSendingPausedException: ClientRuntime.ModeledError } } -struct ConfigurationSetSendingPausedExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let message: Swift.String? -} - -extension ConfigurationSetSendingPausedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SESClientTypes.Content: Swift.Codable { +extension SESClientTypes.Content: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case charset = "Charset" case data = "Data" @@ -1232,12 +1075,14 @@ extension SESClientTypes.Content: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .data) - data = dataDecoded - let charsetDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .charset) - charset = charsetDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.Content() + value.data = try reader["Data"].readIfPresent() + value.charset = try reader["Charset"].readIfPresent() + return value + } } } @@ -1263,6 +1108,11 @@ extension SESClientTypes { } extension CreateConfigurationSetEventDestinationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case eventDestination = "EventDestination" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -1302,28 +1152,12 @@ public struct CreateConfigurationSetEventDestinationInput: Swift.Equatable { } } -struct CreateConfigurationSetEventDestinationInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let eventDestination: SESClientTypes.EventDestination? -} - -extension CreateConfigurationSetEventDestinationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case eventDestination = "EventDestination" - } +extension CreateConfigurationSetEventDestinationOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let eventDestinationDecoded = try containerValues.decodeIfPresent(SESClientTypes.EventDestination.self, forKey: .eventDestination) - eventDestination = eventDestinationDecoded - } -} - -extension CreateConfigurationSetEventDestinationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateConfigurationSetEventDestinationOutput() + } } } @@ -1333,22 +1167,33 @@ public struct CreateConfigurationSetEventDestinationOutput: Swift.Equatable { public init() { } } -enum CreateConfigurationSetEventDestinationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EventDestinationAlreadyExists": return try await EventDestinationAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCloudWatchDestination": return try await InvalidCloudWatchDestinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidFirehoseDestination": return try await InvalidFirehoseDestinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSNSDestination": return try await InvalidSNSDestinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateConfigurationSetEventDestinationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EventDestinationAlreadyExists": return try await EventDestinationAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCloudWatchDestination": return try await InvalidCloudWatchDestinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidFirehoseDestination": return try await InvalidFirehoseDestinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSNSDestination": return try await InvalidSNSDestinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateConfigurationSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSet = "ConfigurationSet" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSet = configurationSet { @@ -1380,24 +1225,12 @@ public struct CreateConfigurationSetInput: Swift.Equatable { } } -struct CreateConfigurationSetInputBody: Swift.Equatable { - let configurationSet: SESClientTypes.ConfigurationSet? -} - -extension CreateConfigurationSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSet = "ConfigurationSet" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetDecoded = try containerValues.decodeIfPresent(SESClientTypes.ConfigurationSet.self, forKey: .configurationSet) - configurationSet = configurationSetDecoded - } -} +extension CreateConfigurationSetOutput { -extension CreateConfigurationSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateConfigurationSetOutput() + } } } @@ -1407,19 +1240,31 @@ public struct CreateConfigurationSetOutput: Swift.Equatable { public init() { } } -enum CreateConfigurationSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetAlreadyExists": return try await ConfigurationSetAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidConfigurationSet": return try await InvalidConfigurationSetException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateConfigurationSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetAlreadyExists": return try await ConfigurationSetAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidConfigurationSet": return try await InvalidConfigurationSetException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateConfigurationSetTrackingOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case trackingOptions = "TrackingOptions" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -1459,28 +1304,12 @@ public struct CreateConfigurationSetTrackingOptionsInput: Swift.Equatable { } } -struct CreateConfigurationSetTrackingOptionsInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let trackingOptions: SESClientTypes.TrackingOptions? -} - -extension CreateConfigurationSetTrackingOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case trackingOptions = "TrackingOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let trackingOptionsDecoded = try containerValues.decodeIfPresent(SESClientTypes.TrackingOptions.self, forKey: .trackingOptions) - trackingOptions = trackingOptionsDecoded - } -} +extension CreateConfigurationSetTrackingOptionsOutput { -extension CreateConfigurationSetTrackingOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateConfigurationSetTrackingOptionsOutput() + } } } @@ -1490,19 +1319,35 @@ public struct CreateConfigurationSetTrackingOptionsOutput: Swift.Equatable { public init() { } } -enum CreateConfigurationSetTrackingOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTrackingOptions": return try await InvalidTrackingOptionsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrackingOptionsAlreadyExistsException": return try await TrackingOptionsAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateConfigurationSetTrackingOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTrackingOptions": return try await InvalidTrackingOptionsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrackingOptionsAlreadyExistsException": return try await TrackingOptionsAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateCustomVerificationEmailTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case failureRedirectionURL = "FailureRedirectionURL" + case fromEmailAddress = "FromEmailAddress" + case successRedirectionURL = "SuccessRedirectionURL" + case templateContent = "TemplateContent" + case templateName = "TemplateName" + case templateSubject = "TemplateSubject" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let failureRedirectionURL = failureRedirectionURL { @@ -1574,44 +1419,12 @@ public struct CreateCustomVerificationEmailTemplateInput: Swift.Equatable { } } -struct CreateCustomVerificationEmailTemplateInputBody: Swift.Equatable { - let templateName: Swift.String? - let fromEmailAddress: Swift.String? - let templateSubject: Swift.String? - let templateContent: Swift.String? - let successRedirectionURL: Swift.String? - let failureRedirectionURL: Swift.String? -} - -extension CreateCustomVerificationEmailTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failureRedirectionURL = "FailureRedirectionURL" - case fromEmailAddress = "FromEmailAddress" - case successRedirectionURL = "SuccessRedirectionURL" - case templateContent = "TemplateContent" - case templateName = "TemplateName" - case templateSubject = "TemplateSubject" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let fromEmailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fromEmailAddress) - fromEmailAddress = fromEmailAddressDecoded - let templateSubjectDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateSubject) - templateSubject = templateSubjectDecoded - let templateContentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateContent) - templateContent = templateContentDecoded - let successRedirectionURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .successRedirectionURL) - successRedirectionURL = successRedirectionURLDecoded - let failureRedirectionURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureRedirectionURL) - failureRedirectionURL = failureRedirectionURLDecoded - } -} +extension CreateCustomVerificationEmailTemplateOutput { -extension CreateCustomVerificationEmailTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateCustomVerificationEmailTemplateOutput() + } } } @@ -1620,20 +1433,31 @@ public struct CreateCustomVerificationEmailTemplateOutput: Swift.Equatable { public init() { } } -enum CreateCustomVerificationEmailTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CustomVerificationEmailInvalidContent": return try await CustomVerificationEmailInvalidContentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomVerificationEmailTemplateAlreadyExists": return try await CustomVerificationEmailTemplateAlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FromEmailAddressNotVerified": return try await FromEmailAddressNotVerifiedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateCustomVerificationEmailTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CustomVerificationEmailInvalidContent": return try await CustomVerificationEmailInvalidContentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomVerificationEmailTemplateAlreadyExists": return try await CustomVerificationEmailTemplateAlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "FromEmailAddressNotVerified": return try await FromEmailAddressNotVerifiedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateReceiptFilterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filter = "Filter" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filter = filter { @@ -1665,24 +1489,12 @@ public struct CreateReceiptFilterInput: Swift.Equatable { } } -struct CreateReceiptFilterInputBody: Swift.Equatable { - let filter: SESClientTypes.ReceiptFilter? -} - -extension CreateReceiptFilterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filter = "Filter" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let filterDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReceiptFilter.self, forKey: .filter) - filter = filterDecoded - } -} +extension CreateReceiptFilterOutput { -extension CreateReceiptFilterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateReceiptFilterOutput() + } } } @@ -1692,18 +1504,31 @@ public struct CreateReceiptFilterOutput: Swift.Equatable { public init() { } } -enum CreateReceiptFilterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateReceiptFilterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateReceiptRuleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case after = "After" + case rule = "Rule" + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let after = after { @@ -1750,32 +1575,12 @@ public struct CreateReceiptRuleInput: Swift.Equatable { } } -struct CreateReceiptRuleInputBody: Swift.Equatable { - let ruleSetName: Swift.String? - let after: Swift.String? - let rule: SESClientTypes.ReceiptRule? -} - -extension CreateReceiptRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case after = "After" - case rule = "Rule" - case ruleSetName = "RuleSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - let afterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .after) - after = afterDecoded - let ruleDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReceiptRule.self, forKey: .rule) - rule = ruleDecoded - } -} +extension CreateReceiptRuleOutput { -extension CreateReceiptRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateReceiptRuleOutput() + } } } @@ -1785,23 +1590,34 @@ public struct CreateReceiptRuleOutput: Swift.Equatable { public init() { } } -enum CreateReceiptRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidLambdaFunction": return try await InvalidLambdaFunctionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidS3Configuration": return try await InvalidS3ConfigurationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSnsTopic": return try await InvalidSnsTopicException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleDoesNotExist": return try await RuleDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateReceiptRuleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidLambdaFunction": return try await InvalidLambdaFunctionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidS3Configuration": return try await InvalidS3ConfigurationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSnsTopic": return try await InvalidSnsTopicException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleDoesNotExist": return try await RuleDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateReceiptRuleSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleSetName = ruleSetName { @@ -1839,24 +1655,12 @@ public struct CreateReceiptRuleSetInput: Swift.Equatable { } } -struct CreateReceiptRuleSetInputBody: Swift.Equatable { - let ruleSetName: Swift.String? -} - -extension CreateReceiptRuleSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleSetName = "RuleSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - } -} +extension CreateReceiptRuleSetOutput { -extension CreateReceiptRuleSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateReceiptRuleSetOutput() + } } } @@ -1866,18 +1670,29 @@ public struct CreateReceiptRuleSetOutput: Swift.Equatable { public init() { } } -enum CreateReceiptRuleSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateReceiptRuleSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case template = "Template" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let template = template { @@ -1909,24 +1724,12 @@ public struct CreateTemplateInput: Swift.Equatable { } } -struct CreateTemplateInputBody: Swift.Equatable { - let template: SESClientTypes.Template? -} - -extension CreateTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case template = "Template" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateDecoded = try containerValues.decodeIfPresent(SESClientTypes.Template.self, forKey: .template) - template = templateDecoded - } -} +extension CreateTemplateOutput { -extension CreateTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateTemplateOutput() + } } } @@ -1935,14 +1738,21 @@ public struct CreateTemplateOutput: Swift.Equatable { public init() { } } -enum CreateTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AlreadyExists": return try await AlreadyExistsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTemplate": return try await InvalidTemplateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AlreadyExists": return try await AlreadyExistsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTemplate": return try await InvalidTemplateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -1986,16 +1796,14 @@ extension SESClientTypes { } extension CustomVerificationEmailInvalidContentException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomVerificationEmailInvalidContentException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2023,23 +1831,7 @@ public struct CustomVerificationEmailInvalidContentException: ClientRuntime.Mode } } -struct CustomVerificationEmailInvalidContentExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension CustomVerificationEmailInvalidContentExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SESClientTypes.CustomVerificationEmailTemplate: Swift.Codable { +extension SESClientTypes.CustomVerificationEmailTemplate: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case failureRedirectionURL = "FailureRedirectionURL" case fromEmailAddress = "FromEmailAddress" @@ -2067,18 +1859,17 @@ extension SESClientTypes.CustomVerificationEmailTemplate: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let fromEmailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fromEmailAddress) - fromEmailAddress = fromEmailAddressDecoded - let templateSubjectDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateSubject) - templateSubject = templateSubjectDecoded - let successRedirectionURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .successRedirectionURL) - successRedirectionURL = successRedirectionURLDecoded - let failureRedirectionURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureRedirectionURL) - failureRedirectionURL = failureRedirectionURLDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.CustomVerificationEmailTemplate() + value.templateName = try reader["TemplateName"].readIfPresent() + value.fromEmailAddress = try reader["FromEmailAddress"].readIfPresent() + value.templateSubject = try reader["TemplateSubject"].readIfPresent() + value.successRedirectionURL = try reader["SuccessRedirectionURL"].readIfPresent() + value.failureRedirectionURL = try reader["FailureRedirectionURL"].readIfPresent() + return value + } } } @@ -2115,18 +1906,15 @@ extension SESClientTypes { } extension CustomVerificationEmailTemplateAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.customVerificationEmailTemplateName = output.error.customVerificationEmailTemplateName - self.properties.message = output.error.message - } else { - self.properties.customVerificationEmailTemplateName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomVerificationEmailTemplateAlreadyExistsException() + value.properties.customVerificationEmailTemplateName = try reader["CustomVerificationEmailTemplateName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2158,39 +1946,16 @@ public struct CustomVerificationEmailTemplateAlreadyExistsException: ClientRunti } } -struct CustomVerificationEmailTemplateAlreadyExistsExceptionBody: Swift.Equatable { - let customVerificationEmailTemplateName: Swift.String? - let message: Swift.String? -} - -extension CustomVerificationEmailTemplateAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customVerificationEmailTemplateName = "CustomVerificationEmailTemplateName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customVerificationEmailTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customVerificationEmailTemplateName) - customVerificationEmailTemplateName = customVerificationEmailTemplateNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension CustomVerificationEmailTemplateDoesNotExistException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.customVerificationEmailTemplateName = output.error.customVerificationEmailTemplateName - self.properties.message = output.error.message - } else { - self.properties.customVerificationEmailTemplateName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = CustomVerificationEmailTemplateDoesNotExistException() + value.properties.customVerificationEmailTemplateName = try reader["CustomVerificationEmailTemplateName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2222,27 +1987,12 @@ public struct CustomVerificationEmailTemplateDoesNotExistException: ClientRuntim } } -struct CustomVerificationEmailTemplateDoesNotExistExceptionBody: Swift.Equatable { - let customVerificationEmailTemplateName: Swift.String? - let message: Swift.String? -} - -extension CustomVerificationEmailTemplateDoesNotExistExceptionBody: Swift.Decodable { +extension DeleteConfigurationSetEventDestinationInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case customVerificationEmailTemplateName = "CustomVerificationEmailTemplateName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customVerificationEmailTemplateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customVerificationEmailTemplateName) - customVerificationEmailTemplateName = customVerificationEmailTemplateNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case configurationSetName = "ConfigurationSetName" + case eventDestinationName = "EventDestinationName" } -} -extension DeleteConfigurationSetEventDestinationInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -2282,29 +2032,13 @@ public struct DeleteConfigurationSetEventDestinationInput: Swift.Equatable { } } -struct DeleteConfigurationSetEventDestinationInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let eventDestinationName: Swift.String? -} - -extension DeleteConfigurationSetEventDestinationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case eventDestinationName = "EventDestinationName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let eventDestinationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventDestinationName) - eventDestinationName = eventDestinationNameDecoded - } -} - -extension DeleteConfigurationSetEventDestinationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } +extension DeleteConfigurationSetEventDestinationOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteConfigurationSetEventDestinationOutput() + } + } } /// An empty element returned on a successful request. @@ -2313,18 +2047,29 @@ public struct DeleteConfigurationSetEventDestinationOutput: Swift.Equatable { public init() { } } -enum DeleteConfigurationSetEventDestinationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EventDestinationDoesNotExist": return try await EventDestinationDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteConfigurationSetEventDestinationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EventDestinationDoesNotExist": return try await EventDestinationDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteConfigurationSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -2356,24 +2101,12 @@ public struct DeleteConfigurationSetInput: Swift.Equatable { } } -struct DeleteConfigurationSetInputBody: Swift.Equatable { - let configurationSetName: Swift.String? -} - -extension DeleteConfigurationSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - } -} +extension DeleteConfigurationSetOutput { -extension DeleteConfigurationSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteConfigurationSetOutput() + } } } @@ -2383,17 +2116,28 @@ public struct DeleteConfigurationSetOutput: Swift.Equatable { public init() { } } -enum DeleteConfigurationSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteConfigurationSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteConfigurationSetTrackingOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -2425,24 +2169,12 @@ public struct DeleteConfigurationSetTrackingOptionsInput: Swift.Equatable { } } -struct DeleteConfigurationSetTrackingOptionsInputBody: Swift.Equatable { - let configurationSetName: Swift.String? -} - -extension DeleteConfigurationSetTrackingOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - } -} +extension DeleteConfigurationSetTrackingOptionsOutput { -extension DeleteConfigurationSetTrackingOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteConfigurationSetTrackingOptionsOutput() + } } } @@ -2452,18 +2184,29 @@ public struct DeleteConfigurationSetTrackingOptionsOutput: Swift.Equatable { public init() { } } -enum DeleteConfigurationSetTrackingOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrackingOptionsDoesNotExistException": return try await TrackingOptionsDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteConfigurationSetTrackingOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrackingOptionsDoesNotExistException": return try await TrackingOptionsDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteCustomVerificationEmailTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case templateName = "TemplateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let templateName = templateName { @@ -2495,24 +2238,12 @@ public struct DeleteCustomVerificationEmailTemplateInput: Swift.Equatable { } } -struct DeleteCustomVerificationEmailTemplateInputBody: Swift.Equatable { - let templateName: Swift.String? -} - -extension DeleteCustomVerificationEmailTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateName = "TemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - } -} +extension DeleteCustomVerificationEmailTemplateOutput { -extension DeleteCustomVerificationEmailTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteCustomVerificationEmailTemplateOutput() + } } } @@ -2521,16 +2252,27 @@ public struct DeleteCustomVerificationEmailTemplateOutput: Swift.Equatable { public init() { } } -enum DeleteCustomVerificationEmailTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteCustomVerificationEmailTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteIdentityInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identity = "Identity" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identity = identity { @@ -2562,24 +2304,12 @@ public struct DeleteIdentityInput: Swift.Equatable { } } -struct DeleteIdentityInputBody: Swift.Equatable { - let identity: Swift.String? -} - -extension DeleteIdentityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identity = "Identity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - } -} +extension DeleteIdentityOutput { -extension DeleteIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteIdentityOutput() + } } } @@ -2589,16 +2319,28 @@ public struct DeleteIdentityOutput: Swift.Equatable { public init() { } } -enum DeleteIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteIdentityOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteIdentityPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identity = "Identity" + case policyName = "PolicyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identity = identity { @@ -2638,28 +2380,12 @@ public struct DeleteIdentityPolicyInput: Swift.Equatable { } } -struct DeleteIdentityPolicyInputBody: Swift.Equatable { - let identity: Swift.String? - let policyName: Swift.String? -} - -extension DeleteIdentityPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identity = "Identity" - case policyName = "PolicyName" - } +extension DeleteIdentityPolicyOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - } -} - -extension DeleteIdentityPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteIdentityPolicyOutput() + } } } @@ -2669,16 +2395,27 @@ public struct DeleteIdentityPolicyOutput: Swift.Equatable { public init() { } } -enum DeleteIdentityPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteIdentityPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteReceiptFilterInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case filterName = "FilterName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let filterName = filterName { @@ -2710,24 +2447,12 @@ public struct DeleteReceiptFilterInput: Swift.Equatable { } } -struct DeleteReceiptFilterInputBody: Swift.Equatable { - let filterName: Swift.String? -} - -extension DeleteReceiptFilterInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filterName = "FilterName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let filterNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .filterName) - filterName = filterNameDecoded - } -} +extension DeleteReceiptFilterOutput { -extension DeleteReceiptFilterOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteReceiptFilterOutput() + } } } @@ -2737,16 +2462,28 @@ public struct DeleteReceiptFilterOutput: Swift.Equatable { public init() { } } -enum DeleteReceiptFilterOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteReceiptFilterOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteReceiptRuleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleName = "RuleName" + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleName = ruleName { @@ -2786,28 +2523,12 @@ public struct DeleteReceiptRuleInput: Swift.Equatable { } } -struct DeleteReceiptRuleInputBody: Swift.Equatable { - let ruleSetName: Swift.String? - let ruleName: Swift.String? -} - -extension DeleteReceiptRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleName = "RuleName" - case ruleSetName = "RuleSetName" - } +extension DeleteReceiptRuleOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - let ruleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleName) - ruleName = ruleNameDecoded - } -} - -extension DeleteReceiptRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteReceiptRuleOutput() + } } } @@ -2817,17 +2538,28 @@ public struct DeleteReceiptRuleOutput: Swift.Equatable { public init() { } } -enum DeleteReceiptRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteReceiptRuleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteReceiptRuleSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleSetName = ruleSetName { @@ -2859,24 +2591,12 @@ public struct DeleteReceiptRuleSetInput: Swift.Equatable { } } -struct DeleteReceiptRuleSetInputBody: Swift.Equatable { - let ruleSetName: Swift.String? -} - -extension DeleteReceiptRuleSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleSetName = "RuleSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - } -} +extension DeleteReceiptRuleSetOutput { -extension DeleteReceiptRuleSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteReceiptRuleSetOutput() + } } } @@ -2886,17 +2606,28 @@ public struct DeleteReceiptRuleSetOutput: Swift.Equatable { public init() { } } -enum DeleteReceiptRuleSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CannotDelete": return try await CannotDeleteException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteReceiptRuleSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CannotDelete": return try await CannotDeleteException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case templateName = "TemplateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let templateName = templateName { @@ -2928,24 +2659,12 @@ public struct DeleteTemplateInput: Swift.Equatable { } } -struct DeleteTemplateInputBody: Swift.Equatable { - let templateName: Swift.String? -} - -extension DeleteTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateName = "TemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - } -} +extension DeleteTemplateOutput { -extension DeleteTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTemplateOutput() + } } } @@ -2954,16 +2673,27 @@ public struct DeleteTemplateOutput: Swift.Equatable { public init() { } } -enum DeleteTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteVerifiedEmailAddressInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case emailAddress = "EmailAddress" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let emailAddress = emailAddress { @@ -2995,24 +2725,12 @@ public struct DeleteVerifiedEmailAddressInput: Swift.Equatable { } } -struct DeleteVerifiedEmailAddressInputBody: Swift.Equatable { - let emailAddress: Swift.String? -} - -extension DeleteVerifiedEmailAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case emailAddress = "EmailAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let emailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .emailAddress) - emailAddress = emailAddressDecoded - } -} +extension DeleteVerifiedEmailAddressOutput { -extension DeleteVerifiedEmailAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteVerifiedEmailAddressOutput() + } } } @@ -3021,16 +2739,23 @@ public struct DeleteVerifiedEmailAddressOutput: Swift.Equatable { public init() { } } -enum DeleteVerifiedEmailAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteVerifiedEmailAddressOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SESClientTypes.DeliveryOptions: Swift.Codable { +extension SESClientTypes.DeliveryOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case tlsPolicy = "TlsPolicy" } @@ -3042,10 +2767,13 @@ extension SESClientTypes.DeliveryOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let tlsPolicyDecoded = try containerValues.decodeIfPresent(SESClientTypes.TlsPolicy.self, forKey: .tlsPolicy) - tlsPolicy = tlsPolicyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.DeliveryOptions() + value.tlsPolicy = try reader["TlsPolicy"].readIfPresent() + return value + } } } @@ -3066,6 +2794,7 @@ extension SESClientTypes { } extension DescribeActiveReceiptRuleSetInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("DescribeActiveReceiptRuleSet", forKey:ClientRuntime.Key("Action")) @@ -3086,16 +2815,16 @@ public struct DescribeActiveReceiptRuleSetInput: Swift.Equatable { public init() { } } -extension DescribeActiveReceiptRuleSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeActiveReceiptRuleSetOutputBody = try responseDecoder.decode(responseBody: data) - self.metadata = output.metadata - self.rules = output.rules - } else { - self.metadata = nil - self.rules = nil +extension DescribeActiveReceiptRuleSetOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeActiveReceiptRuleSetResult"] + var value = DescribeActiveReceiptRuleSetOutput() + value.metadata = try reader["Metadata"].readIfPresent(readingClosure: SESClientTypes.ReceiptRuleSetMetadata.readingClosure) + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: SESClientTypes.ReceiptRule.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3117,54 +2846,28 @@ public struct DescribeActiveReceiptRuleSetOutput: Swift.Equatable { } } -struct DescribeActiveReceiptRuleSetOutputBody: Swift.Equatable { - let metadata: SESClientTypes.ReceiptRuleSetMetadata? - let rules: [SESClientTypes.ReceiptRule]? -} +enum DescribeActiveReceiptRuleSetOutputError { -extension DescribeActiveReceiptRuleSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metadata = "Metadata" - case rules = "Rules" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeActiveReceiptRuleSetResult")) - let metadataDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReceiptRuleSetMetadata.self, forKey: .metadata) - metadata = metadataDecoded - if containerValues.contains(.rules) { - struct KeyVal0{struct member{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([SESClientTypes.ReceiptRule].self, forKey: .member) - var rulesBuffer:[SESClientTypes.ReceiptRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [SESClientTypes.ReceiptRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - rules = nil } } } -enum DescribeActiveReceiptRuleSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeConfigurationSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetAttributeNames = "ConfigurationSetAttributeNames" + case configurationSetName = "ConfigurationSetName" } -} -extension DescribeConfigurationSetInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetAttributeNames = configurationSetAttributeNames { @@ -3212,59 +2915,19 @@ public struct DescribeConfigurationSetInput: Swift.Equatable { } } -struct DescribeConfigurationSetInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let configurationSetAttributeNames: [SESClientTypes.ConfigurationSetAttribute]? -} - -extension DescribeConfigurationSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetAttributeNames = "ConfigurationSetAttributeNames" - case configurationSetName = "ConfigurationSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - if containerValues.contains(.configurationSetAttributeNames) { - struct KeyVal0{struct member{}} - let configurationSetAttributeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .configurationSetAttributeNames) - if let configurationSetAttributeNamesWrappedContainer = configurationSetAttributeNamesWrappedContainer { - let configurationSetAttributeNamesContainer = try configurationSetAttributeNamesWrappedContainer.decodeIfPresent([SESClientTypes.ConfigurationSetAttribute].self, forKey: .member) - var configurationSetAttributeNamesBuffer:[SESClientTypes.ConfigurationSetAttribute]? = nil - if let configurationSetAttributeNamesContainer = configurationSetAttributeNamesContainer { - configurationSetAttributeNamesBuffer = [SESClientTypes.ConfigurationSetAttribute]() - for enumContainer0 in configurationSetAttributeNamesContainer { - configurationSetAttributeNamesBuffer?.append(enumContainer0) - } - } - configurationSetAttributeNames = configurationSetAttributeNamesBuffer - } else { - configurationSetAttributeNames = [] - } - } else { - configurationSetAttributeNames = nil - } - } -} +extension DescribeConfigurationSetOutput { -extension DescribeConfigurationSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeConfigurationSetOutputBody = try responseDecoder.decode(responseBody: data) - self.configurationSet = output.configurationSet - self.deliveryOptions = output.deliveryOptions - self.eventDestinations = output.eventDestinations - self.reputationOptions = output.reputationOptions - self.trackingOptions = output.trackingOptions - } else { - self.configurationSet = nil - self.deliveryOptions = nil - self.eventDestinations = nil - self.reputationOptions = nil - self.trackingOptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeConfigurationSetResult"] + var value = DescribeConfigurationSetOutput() + value.configurationSet = try reader["ConfigurationSet"].readIfPresent(readingClosure: SESClientTypes.ConfigurationSet.readingClosure) + value.deliveryOptions = try reader["DeliveryOptions"].readIfPresent(readingClosure: SESClientTypes.DeliveryOptions.readingClosure) + value.eventDestinations = try reader["EventDestinations"].readListIfPresent(memberReadingClosure: SESClientTypes.EventDestination.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.reputationOptions = try reader["ReputationOptions"].readIfPresent(readingClosure: SESClientTypes.ReputationOptions.readingClosure) + value.trackingOptions = try reader["TrackingOptions"].readIfPresent(readingClosure: SESClientTypes.TrackingOptions.readingClosure) + return value } } } @@ -3298,67 +2961,29 @@ public struct DescribeConfigurationSetOutput: Swift.Equatable { } } -struct DescribeConfigurationSetOutputBody: Swift.Equatable { - let configurationSet: SESClientTypes.ConfigurationSet? - let eventDestinations: [SESClientTypes.EventDestination]? - let trackingOptions: SESClientTypes.TrackingOptions? - let deliveryOptions: SESClientTypes.DeliveryOptions? - let reputationOptions: SESClientTypes.ReputationOptions? -} - -extension DescribeConfigurationSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSet = "ConfigurationSet" - case deliveryOptions = "DeliveryOptions" - case eventDestinations = "EventDestinations" - case reputationOptions = "ReputationOptions" - case trackingOptions = "TrackingOptions" - } +enum DescribeConfigurationSetOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeConfigurationSetResult")) - let configurationSetDecoded = try containerValues.decodeIfPresent(SESClientTypes.ConfigurationSet.self, forKey: .configurationSet) - configurationSet = configurationSetDecoded - if containerValues.contains(.eventDestinations) { - struct KeyVal0{struct member{}} - let eventDestinationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .eventDestinations) - if let eventDestinationsWrappedContainer = eventDestinationsWrappedContainer { - let eventDestinationsContainer = try eventDestinationsWrappedContainer.decodeIfPresent([SESClientTypes.EventDestination].self, forKey: .member) - var eventDestinationsBuffer:[SESClientTypes.EventDestination]? = nil - if let eventDestinationsContainer = eventDestinationsContainer { - eventDestinationsBuffer = [SESClientTypes.EventDestination]() - for structureContainer0 in eventDestinationsContainer { - eventDestinationsBuffer?.append(structureContainer0) - } - } - eventDestinations = eventDestinationsBuffer - } else { - eventDestinations = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - eventDestinations = nil } - let trackingOptionsDecoded = try containerValues.decodeIfPresent(SESClientTypes.TrackingOptions.self, forKey: .trackingOptions) - trackingOptions = trackingOptionsDecoded - let deliveryOptionsDecoded = try containerValues.decodeIfPresent(SESClientTypes.DeliveryOptions.self, forKey: .deliveryOptions) - deliveryOptions = deliveryOptionsDecoded - let reputationOptionsDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReputationOptions.self, forKey: .reputationOptions) - reputationOptions = reputationOptionsDecoded } } -enum DescribeConfigurationSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension DescribeReceiptRuleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleName = "RuleName" + case ruleSetName = "RuleSetName" } -} -extension DescribeReceiptRuleInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleName = ruleName { @@ -3398,34 +3023,15 @@ public struct DescribeReceiptRuleInput: Swift.Equatable { } } -struct DescribeReceiptRuleInputBody: Swift.Equatable { - let ruleSetName: Swift.String? - let ruleName: Swift.String? -} - -extension DescribeReceiptRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleName = "RuleName" - case ruleSetName = "RuleSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - let ruleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleName) - ruleName = ruleNameDecoded - } -} +extension DescribeReceiptRuleOutput { -extension DescribeReceiptRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReceiptRuleOutputBody = try responseDecoder.decode(responseBody: data) - self.rule = output.rule - } else { - self.rule = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReceiptRuleResult"] + var value = DescribeReceiptRuleOutput() + value.rule = try reader["Rule"].readIfPresent(readingClosure: SESClientTypes.ReceiptRule.readingClosure) + return value } } } @@ -3443,35 +3049,29 @@ public struct DescribeReceiptRuleOutput: Swift.Equatable { } } -struct DescribeReceiptRuleOutputBody: Swift.Equatable { - let rule: SESClientTypes.ReceiptRule? -} - -extension DescribeReceiptRuleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rule = "Rule" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReceiptRuleResult")) - let ruleDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReceiptRule.self, forKey: .rule) - rule = ruleDecoded - } -} +enum DescribeReceiptRuleOutputError { -enum DescribeReceiptRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RuleDoesNotExist": return try await RuleDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RuleDoesNotExist": return try await RuleDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DescribeReceiptRuleSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleSetName = ruleSetName { @@ -3503,32 +3103,16 @@ public struct DescribeReceiptRuleSetInput: Swift.Equatable { } } -struct DescribeReceiptRuleSetInputBody: Swift.Equatable { - let ruleSetName: Swift.String? -} - -extension DescribeReceiptRuleSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleSetName = "RuleSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - } -} +extension DescribeReceiptRuleSetOutput { -extension DescribeReceiptRuleSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DescribeReceiptRuleSetOutputBody = try responseDecoder.decode(responseBody: data) - self.metadata = output.metadata - self.rules = output.rules - } else { - self.metadata = nil - self.rules = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DescribeReceiptRuleSetResult"] + var value = DescribeReceiptRuleSetOutput() + value.metadata = try reader["Metadata"].readIfPresent(readingClosure: SESClientTypes.ReceiptRuleSetMetadata.readingClosure) + value.rules = try reader["Rules"].readListIfPresent(memberReadingClosure: SESClientTypes.ReceiptRule.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3550,55 +3134,24 @@ public struct DescribeReceiptRuleSetOutput: Swift.Equatable { } } -struct DescribeReceiptRuleSetOutputBody: Swift.Equatable { - let metadata: SESClientTypes.ReceiptRuleSetMetadata? - let rules: [SESClientTypes.ReceiptRule]? -} +enum DescribeReceiptRuleSetOutputError { -extension DescribeReceiptRuleSetOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case metadata = "Metadata" - case rules = "Rules" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DescribeReceiptRuleSetResult")) - let metadataDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReceiptRuleSetMetadata.self, forKey: .metadata) - metadata = metadataDecoded - if containerValues.contains(.rules) { - struct KeyVal0{struct member{}} - let rulesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .rules) - if let rulesWrappedContainer = rulesWrappedContainer { - let rulesContainer = try rulesWrappedContainer.decodeIfPresent([SESClientTypes.ReceiptRule].self, forKey: .member) - var rulesBuffer:[SESClientTypes.ReceiptRule]? = nil - if let rulesContainer = rulesContainer { - rulesBuffer = [SESClientTypes.ReceiptRule]() - for structureContainer0 in rulesContainer { - rulesBuffer?.append(structureContainer0) - } - } - rules = rulesBuffer - } else { - rules = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - rules = nil } } } -enum DescribeReceiptRuleSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension SESClientTypes.Destination: Swift.Codable { +extension SESClientTypes.Destination: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case bccAddresses = "BccAddresses" case ccAddresses = "CcAddresses" @@ -3645,64 +3198,14 @@ extension SESClientTypes.Destination: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.toAddresses) { - struct KeyVal0{struct member{}} - let toAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .toAddresses) - if let toAddressesWrappedContainer = toAddressesWrappedContainer { - let toAddressesContainer = try toAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var toAddressesBuffer:[Swift.String]? = nil - if let toAddressesContainer = toAddressesContainer { - toAddressesBuffer = [Swift.String]() - for stringContainer0 in toAddressesContainer { - toAddressesBuffer?.append(stringContainer0) - } - } - toAddresses = toAddressesBuffer - } else { - toAddresses = [] - } - } else { - toAddresses = nil - } - if containerValues.contains(.ccAddresses) { - struct KeyVal0{struct member{}} - let ccAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ccAddresses) - if let ccAddressesWrappedContainer = ccAddressesWrappedContainer { - let ccAddressesContainer = try ccAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ccAddressesBuffer:[Swift.String]? = nil - if let ccAddressesContainer = ccAddressesContainer { - ccAddressesBuffer = [Swift.String]() - for stringContainer0 in ccAddressesContainer { - ccAddressesBuffer?.append(stringContainer0) - } - } - ccAddresses = ccAddressesBuffer - } else { - ccAddresses = [] - } - } else { - ccAddresses = nil - } - if containerValues.contains(.bccAddresses) { - struct KeyVal0{struct member{}} - let bccAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .bccAddresses) - if let bccAddressesWrappedContainer = bccAddressesWrappedContainer { - let bccAddressesContainer = try bccAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var bccAddressesBuffer:[Swift.String]? = nil - if let bccAddressesContainer = bccAddressesContainer { - bccAddressesBuffer = [Swift.String]() - for stringContainer0 in bccAddressesContainer { - bccAddressesBuffer?.append(stringContainer0) - } - } - bccAddresses = bccAddressesBuffer - } else { - bccAddresses = [] - } - } else { - bccAddresses = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.Destination() + value.toAddresses = try reader["ToAddresses"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.ccAddresses = try reader["CcAddresses"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.bccAddresses = try reader["BccAddresses"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3807,7 +3310,7 @@ extension SESClientTypes { } } -extension SESClientTypes.EventDestination: Swift.Codable { +extension SESClientTypes.EventDestination: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cloudWatchDestination = "CloudWatchDestination" case enabled = "Enabled" @@ -3848,37 +3351,18 @@ extension SESClientTypes.EventDestination: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - if containerValues.contains(.matchingEventTypes) { - struct KeyVal0{struct member{}} - let matchingEventTypesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .matchingEventTypes) - if let matchingEventTypesWrappedContainer = matchingEventTypesWrappedContainer { - let matchingEventTypesContainer = try matchingEventTypesWrappedContainer.decodeIfPresent([SESClientTypes.EventType].self, forKey: .member) - var matchingEventTypesBuffer:[SESClientTypes.EventType]? = nil - if let matchingEventTypesContainer = matchingEventTypesContainer { - matchingEventTypesBuffer = [SESClientTypes.EventType]() - for enumContainer0 in matchingEventTypesContainer { - matchingEventTypesBuffer?.append(enumContainer0) - } - } - matchingEventTypes = matchingEventTypesBuffer - } else { - matchingEventTypes = [] - } - } else { - matchingEventTypes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.EventDestination() + value.name = try reader["Name"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() ?? false + value.matchingEventTypes = try reader["MatchingEventTypes"].readListIfPresent(memberReadingClosure: SESClientTypes.EventType.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.kinesisFirehoseDestination = try reader["KinesisFirehoseDestination"].readIfPresent(readingClosure: SESClientTypes.KinesisFirehoseDestination.readingClosure) + value.cloudWatchDestination = try reader["CloudWatchDestination"].readIfPresent(readingClosure: SESClientTypes.CloudWatchDestination.readingClosure) + value.snsDestination = try reader["SNSDestination"].readIfPresent(readingClosure: SESClientTypes.SNSDestination.readingClosure) + return value } - let kinesisFirehoseDestinationDecoded = try containerValues.decodeIfPresent(SESClientTypes.KinesisFirehoseDestination.self, forKey: .kinesisFirehoseDestination) - kinesisFirehoseDestination = kinesisFirehoseDestinationDecoded - let cloudWatchDestinationDecoded = try containerValues.decodeIfPresent(SESClientTypes.CloudWatchDestination.self, forKey: .cloudWatchDestination) - cloudWatchDestination = cloudWatchDestinationDecoded - let snsDestinationDecoded = try containerValues.decodeIfPresent(SESClientTypes.SNSDestination.self, forKey: .snsDestination) - snsDestination = snsDestinationDecoded } } @@ -3941,20 +3425,16 @@ extension SESClientTypes { } extension EventDestinationAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.eventDestinationName = output.error.eventDestinationName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.eventDestinationName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EventDestinationAlreadyExistsException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.eventDestinationName = try reader["EventDestinationName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3990,46 +3470,18 @@ public struct EventDestinationAlreadyExistsException: ClientRuntime.ModeledError } } -struct EventDestinationAlreadyExistsExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let eventDestinationName: Swift.String? - let message: Swift.String? -} - -extension EventDestinationAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case eventDestinationName = "EventDestinationName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let eventDestinationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventDestinationName) - eventDestinationName = eventDestinationNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension EventDestinationDoesNotExistException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.eventDestinationName = output.error.eventDestinationName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.eventDestinationName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - } +extension EventDestinationDoesNotExistException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EventDestinationDoesNotExistException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.eventDestinationName = try reader["EventDestinationName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value + } } /// Indicates that the event destination does not exist. @@ -4064,30 +3516,6 @@ public struct EventDestinationDoesNotExistException: ClientRuntime.ModeledError, } } -struct EventDestinationDoesNotExistExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let eventDestinationName: Swift.String? - let message: Swift.String? -} - -extension EventDestinationDoesNotExistExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case eventDestinationName = "EventDestinationName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let eventDestinationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventDestinationName) - eventDestinationName = eventDestinationNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SESClientTypes { public enum EventType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case bounce @@ -4138,7 +3566,7 @@ extension SESClientTypes { } } -extension SESClientTypes.ExtensionField: Swift.Codable { +extension SESClientTypes.ExtensionField: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case value = "Value" @@ -4154,12 +3582,14 @@ extension SESClientTypes.ExtensionField: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.ExtensionField() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -4186,18 +3616,15 @@ extension SESClientTypes { } extension FromEmailAddressNotVerifiedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.fromEmailAddress = output.error.fromEmailAddress - self.properties.message = output.error.message - } else { - self.properties.fromEmailAddress = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FromEmailAddressNotVerifiedException() + value.properties.fromEmailAddress = try reader["FromEmailAddress"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4229,27 +3656,8 @@ public struct FromEmailAddressNotVerifiedException: ClientRuntime.ModeledError, } } -struct FromEmailAddressNotVerifiedExceptionBody: Swift.Equatable { - let fromEmailAddress: Swift.String? - let message: Swift.String? -} - -extension FromEmailAddressNotVerifiedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case fromEmailAddress = "FromEmailAddress" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let fromEmailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fromEmailAddress) - fromEmailAddress = fromEmailAddressDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension GetAccountSendingEnabledInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GetAccountSendingEnabled", forKey:ClientRuntime.Key("Action")) @@ -4269,14 +3677,15 @@ public struct GetAccountSendingEnabledInput: Swift.Equatable { public init() { } } -extension GetAccountSendingEnabledOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccountSendingEnabledOutputBody = try responseDecoder.decode(responseBody: data) - self.enabled = output.enabled - } else { - self.enabled = false +extension GetAccountSendingEnabledOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetAccountSendingEnabledResult"] + var value = GetAccountSendingEnabledOutput() + value.enabled = try reader["Enabled"].readIfPresent() ?? false + return value } } } @@ -4294,33 +3703,27 @@ public struct GetAccountSendingEnabledOutput: Swift.Equatable { } } -struct GetAccountSendingEnabledOutputBody: Swift.Equatable { - let enabled: Swift.Bool -} - -extension GetAccountSendingEnabledOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetAccountSendingEnabledResult")) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - } -} +enum GetAccountSendingEnabledOutputError { -enum GetAccountSendingEnabledOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetCustomVerificationEmailTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case templateName = "TemplateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let templateName = templateName { @@ -4352,40 +3755,20 @@ public struct GetCustomVerificationEmailTemplateInput: Swift.Equatable { } } -struct GetCustomVerificationEmailTemplateInputBody: Swift.Equatable { - let templateName: Swift.String? -} - -extension GetCustomVerificationEmailTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateName = "TemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - } -} +extension GetCustomVerificationEmailTemplateOutput { -extension GetCustomVerificationEmailTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetCustomVerificationEmailTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.failureRedirectionURL = output.failureRedirectionURL - self.fromEmailAddress = output.fromEmailAddress - self.successRedirectionURL = output.successRedirectionURL - self.templateContent = output.templateContent - self.templateName = output.templateName - self.templateSubject = output.templateSubject - } else { - self.failureRedirectionURL = nil - self.fromEmailAddress = nil - self.successRedirectionURL = nil - self.templateContent = nil - self.templateName = nil - self.templateSubject = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetCustomVerificationEmailTemplateResult"] + var value = GetCustomVerificationEmailTemplateOutput() + value.failureRedirectionURL = try reader["FailureRedirectionURL"].readIfPresent() + value.fromEmailAddress = try reader["FromEmailAddress"].readIfPresent() + value.successRedirectionURL = try reader["SuccessRedirectionURL"].readIfPresent() + value.templateContent = try reader["TemplateContent"].readIfPresent() + value.templateName = try reader["TemplateName"].readIfPresent() + value.templateSubject = try reader["TemplateSubject"].readIfPresent() + return value } } } @@ -4423,54 +3806,28 @@ public struct GetCustomVerificationEmailTemplateOutput: Swift.Equatable { } } -struct GetCustomVerificationEmailTemplateOutputBody: Swift.Equatable { - let templateName: Swift.String? - let fromEmailAddress: Swift.String? - let templateSubject: Swift.String? - let templateContent: Swift.String? - let successRedirectionURL: Swift.String? - let failureRedirectionURL: Swift.String? -} - -extension GetCustomVerificationEmailTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failureRedirectionURL = "FailureRedirectionURL" - case fromEmailAddress = "FromEmailAddress" - case successRedirectionURL = "SuccessRedirectionURL" - case templateContent = "TemplateContent" - case templateName = "TemplateName" - case templateSubject = "TemplateSubject" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetCustomVerificationEmailTemplateResult")) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let fromEmailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fromEmailAddress) - fromEmailAddress = fromEmailAddressDecoded - let templateSubjectDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateSubject) - templateSubject = templateSubjectDecoded - let templateContentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateContent) - templateContent = templateContentDecoded - let successRedirectionURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .successRedirectionURL) - successRedirectionURL = successRedirectionURLDecoded - let failureRedirectionURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureRedirectionURL) - failureRedirectionURL = failureRedirectionURLDecoded - } -} +enum GetCustomVerificationEmailTemplateOutputError { -enum GetCustomVerificationEmailTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CustomVerificationEmailTemplateDoesNotExist": return try await CustomVerificationEmailTemplateDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CustomVerificationEmailTemplateDoesNotExist": return try await CustomVerificationEmailTemplateDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetIdentityDkimAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identities = "Identities" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identities = identities { @@ -4511,47 +3868,15 @@ public struct GetIdentityDkimAttributesInput: Swift.Equatable { } } -struct GetIdentityDkimAttributesInputBody: Swift.Equatable { - let identities: [Swift.String]? -} - -extension GetIdentityDkimAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identities = "Identities" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.identities) { - struct KeyVal0{struct member{}} - let identitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .identities) - if let identitiesWrappedContainer = identitiesWrappedContainer { - let identitiesContainer = try identitiesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var identitiesBuffer:[Swift.String]? = nil - if let identitiesContainer = identitiesContainer { - identitiesBuffer = [Swift.String]() - for stringContainer0 in identitiesContainer { - identitiesBuffer?.append(stringContainer0) - } - } - identities = identitiesBuffer - } else { - identities = [] - } - } else { - identities = nil - } - } -} +extension GetIdentityDkimAttributesOutput { -extension GetIdentityDkimAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIdentityDkimAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.dkimAttributes = output.dkimAttributes - } else { - self.dkimAttributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetIdentityDkimAttributesResult"] + var value = GetIdentityDkimAttributesOutput() + value.dkimAttributes = try reader["DkimAttributes"].readMapIfPresent(valueReadingClosure: SESClientTypes.IdentityDkimAttributes.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -4570,50 +3895,27 @@ public struct GetIdentityDkimAttributesOutput: Swift.Equatable { } } -struct GetIdentityDkimAttributesOutputBody: Swift.Equatable { - let dkimAttributes: [Swift.String:SESClientTypes.IdentityDkimAttributes]? -} +enum GetIdentityDkimAttributesOutputError { -extension GetIdentityDkimAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dkimAttributes = "DkimAttributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetIdentityDkimAttributesResult")) - if containerValues.contains(.dkimAttributes) { - struct KeyVal0{struct key{}; struct value{}} - let dkimAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .dkimAttributes) - if let dkimAttributesWrappedContainer = dkimAttributesWrappedContainer { - let dkimAttributesContainer = try dkimAttributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var dkimAttributesBuffer: [Swift.String:SESClientTypes.IdentityDkimAttributes]? = nil - if let dkimAttributesContainer = dkimAttributesContainer { - dkimAttributesBuffer = [Swift.String:SESClientTypes.IdentityDkimAttributes]() - for structureContainer0 in dkimAttributesContainer { - dkimAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } - } - dkimAttributes = dkimAttributesBuffer - } else { - dkimAttributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dkimAttributes = nil } } } -enum GetIdentityDkimAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetIdentityMailFromDomainAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identities = "Identities" } -} -extension GetIdentityMailFromDomainAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identities = identities { @@ -4654,47 +3956,15 @@ public struct GetIdentityMailFromDomainAttributesInput: Swift.Equatable { } } -struct GetIdentityMailFromDomainAttributesInputBody: Swift.Equatable { - let identities: [Swift.String]? -} - -extension GetIdentityMailFromDomainAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identities = "Identities" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.identities) { - struct KeyVal0{struct member{}} - let identitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .identities) - if let identitiesWrappedContainer = identitiesWrappedContainer { - let identitiesContainer = try identitiesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var identitiesBuffer:[Swift.String]? = nil - if let identitiesContainer = identitiesContainer { - identitiesBuffer = [Swift.String]() - for stringContainer0 in identitiesContainer { - identitiesBuffer?.append(stringContainer0) - } - } - identities = identitiesBuffer - } else { - identities = [] - } - } else { - identities = nil - } - } -} +extension GetIdentityMailFromDomainAttributesOutput { -extension GetIdentityMailFromDomainAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIdentityMailFromDomainAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.mailFromDomainAttributes = output.mailFromDomainAttributes - } else { - self.mailFromDomainAttributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetIdentityMailFromDomainAttributesResult"] + var value = GetIdentityMailFromDomainAttributesOutput() + value.mailFromDomainAttributes = try reader["MailFromDomainAttributes"].readMapIfPresent(valueReadingClosure: SESClientTypes.IdentityMailFromDomainAttributes.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -4713,50 +3983,27 @@ public struct GetIdentityMailFromDomainAttributesOutput: Swift.Equatable { } } -struct GetIdentityMailFromDomainAttributesOutputBody: Swift.Equatable { - let mailFromDomainAttributes: [Swift.String:SESClientTypes.IdentityMailFromDomainAttributes]? -} +enum GetIdentityMailFromDomainAttributesOutputError { -extension GetIdentityMailFromDomainAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case mailFromDomainAttributes = "MailFromDomainAttributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetIdentityMailFromDomainAttributesResult")) - if containerValues.contains(.mailFromDomainAttributes) { - struct KeyVal0{struct key{}; struct value{}} - let mailFromDomainAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .mailFromDomainAttributes) - if let mailFromDomainAttributesWrappedContainer = mailFromDomainAttributesWrappedContainer { - let mailFromDomainAttributesContainer = try mailFromDomainAttributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var mailFromDomainAttributesBuffer: [Swift.String:SESClientTypes.IdentityMailFromDomainAttributes]? = nil - if let mailFromDomainAttributesContainer = mailFromDomainAttributesContainer { - mailFromDomainAttributesBuffer = [Swift.String:SESClientTypes.IdentityMailFromDomainAttributes]() - for structureContainer0 in mailFromDomainAttributesContainer { - mailFromDomainAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } - } - mailFromDomainAttributes = mailFromDomainAttributesBuffer - } else { - mailFromDomainAttributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - mailFromDomainAttributes = nil } } } -enum GetIdentityMailFromDomainAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetIdentityNotificationAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identities = "Identities" } -} -extension GetIdentityNotificationAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identities = identities { @@ -4797,47 +4044,15 @@ public struct GetIdentityNotificationAttributesInput: Swift.Equatable { } } -struct GetIdentityNotificationAttributesInputBody: Swift.Equatable { - let identities: [Swift.String]? -} - -extension GetIdentityNotificationAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identities = "Identities" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.identities) { - struct KeyVal0{struct member{}} - let identitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .identities) - if let identitiesWrappedContainer = identitiesWrappedContainer { - let identitiesContainer = try identitiesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var identitiesBuffer:[Swift.String]? = nil - if let identitiesContainer = identitiesContainer { - identitiesBuffer = [Swift.String]() - for stringContainer0 in identitiesContainer { - identitiesBuffer?.append(stringContainer0) - } - } - identities = identitiesBuffer - } else { - identities = [] - } - } else { - identities = nil - } - } -} +extension GetIdentityNotificationAttributesOutput { -extension GetIdentityNotificationAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIdentityNotificationAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.notificationAttributes = output.notificationAttributes - } else { - self.notificationAttributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetIdentityNotificationAttributesResult"] + var value = GetIdentityNotificationAttributesOutput() + value.notificationAttributes = try reader["NotificationAttributes"].readMapIfPresent(valueReadingClosure: SESClientTypes.IdentityNotificationAttributes.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -4856,50 +4071,28 @@ public struct GetIdentityNotificationAttributesOutput: Swift.Equatable { } } -struct GetIdentityNotificationAttributesOutputBody: Swift.Equatable { - let notificationAttributes: [Swift.String:SESClientTypes.IdentityNotificationAttributes]? -} +enum GetIdentityNotificationAttributesOutputError { -extension GetIdentityNotificationAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case notificationAttributes = "NotificationAttributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetIdentityNotificationAttributesResult")) - if containerValues.contains(.notificationAttributes) { - struct KeyVal0{struct key{}; struct value{}} - let notificationAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .notificationAttributes) - if let notificationAttributesWrappedContainer = notificationAttributesWrappedContainer { - let notificationAttributesContainer = try notificationAttributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var notificationAttributesBuffer: [Swift.String:SESClientTypes.IdentityNotificationAttributes]? = nil - if let notificationAttributesContainer = notificationAttributesContainer { - notificationAttributesBuffer = [Swift.String:SESClientTypes.IdentityNotificationAttributes]() - for structureContainer0 in notificationAttributesContainer { - notificationAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } - } - notificationAttributes = notificationAttributesBuffer - } else { - notificationAttributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - notificationAttributes = nil } } } -enum GetIdentityNotificationAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetIdentityPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identity = "Identity" + case policyNames = "PolicyNames" } -} -extension GetIdentityPoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identity = identity { @@ -4948,51 +4141,15 @@ public struct GetIdentityPoliciesInput: Swift.Equatable { } } -struct GetIdentityPoliciesInputBody: Swift.Equatable { - let identity: Swift.String? - let policyNames: [Swift.String]? -} - -extension GetIdentityPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identity = "Identity" - case policyNames = "PolicyNames" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] - } - } else { - policyNames = nil - } - } -} +extension GetIdentityPoliciesOutput { -extension GetIdentityPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIdentityPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.policies = output.policies - } else { - self.policies = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetIdentityPoliciesResult"] + var value = GetIdentityPoliciesOutput() + value.policies = try reader["Policies"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -5011,50 +4168,27 @@ public struct GetIdentityPoliciesOutput: Swift.Equatable { } } -struct GetIdentityPoliciesOutputBody: Swift.Equatable { - let policies: [Swift.String:Swift.String]? -} +enum GetIdentityPoliciesOutputError { -extension GetIdentityPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policies = "Policies" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetIdentityPoliciesResult")) - if containerValues.contains(.policies) { - struct KeyVal0{struct key{}; struct value{}} - let policiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .policies) - if let policiesWrappedContainer = policiesWrappedContainer { - let policiesContainer = try policiesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var policiesBuffer: [Swift.String:Swift.String]? = nil - if let policiesContainer = policiesContainer { - policiesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in policiesContainer { - policiesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - policies = policiesBuffer - } else { - policies = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policies = nil } } } -enum GetIdentityPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetIdentityVerificationAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identities = "Identities" } -} -extension GetIdentityVerificationAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identities = identities { @@ -5095,47 +4229,15 @@ public struct GetIdentityVerificationAttributesInput: Swift.Equatable { } } -struct GetIdentityVerificationAttributesInputBody: Swift.Equatable { - let identities: [Swift.String]? -} - -extension GetIdentityVerificationAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identities = "Identities" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.identities) { - struct KeyVal0{struct member{}} - let identitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .identities) - if let identitiesWrappedContainer = identitiesWrappedContainer { - let identitiesContainer = try identitiesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var identitiesBuffer:[Swift.String]? = nil - if let identitiesContainer = identitiesContainer { - identitiesBuffer = [Swift.String]() - for stringContainer0 in identitiesContainer { - identitiesBuffer?.append(stringContainer0) - } - } - identities = identitiesBuffer - } else { - identities = [] - } - } else { - identities = nil - } - } -} +extension GetIdentityVerificationAttributesOutput { -extension GetIdentityVerificationAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetIdentityVerificationAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.verificationAttributes = output.verificationAttributes - } else { - self.verificationAttributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetIdentityVerificationAttributesResult"] + var value = GetIdentityVerificationAttributesOutput() + value.verificationAttributes = try reader["VerificationAttributes"].readMapIfPresent(valueReadingClosure: SESClientTypes.IdentityVerificationAttributes.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -5154,50 +4256,24 @@ public struct GetIdentityVerificationAttributesOutput: Swift.Equatable { } } -struct GetIdentityVerificationAttributesOutputBody: Swift.Equatable { - let verificationAttributes: [Swift.String:SESClientTypes.IdentityVerificationAttributes]? -} +enum GetIdentityVerificationAttributesOutputError { -extension GetIdentityVerificationAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verificationAttributes = "VerificationAttributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetIdentityVerificationAttributesResult")) - if containerValues.contains(.verificationAttributes) { - struct KeyVal0{struct key{}; struct value{}} - let verificationAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .verificationAttributes) - if let verificationAttributesWrappedContainer = verificationAttributesWrappedContainer { - let verificationAttributesContainer = try verificationAttributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var verificationAttributesBuffer: [Swift.String:SESClientTypes.IdentityVerificationAttributes]? = nil - if let verificationAttributesContainer = verificationAttributesContainer { - verificationAttributesBuffer = [Swift.String:SESClientTypes.IdentityVerificationAttributes]() - for structureContainer0 in verificationAttributesContainer { - verificationAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } - } - verificationAttributes = verificationAttributesBuffer - } else { - verificationAttributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - verificationAttributes = nil - } - } -} - -enum GetIdentityVerificationAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension GetSendQuotaInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GetSendQuota", forKey:ClientRuntime.Key("Action")) @@ -5217,18 +4293,17 @@ public struct GetSendQuotaInput: Swift.Equatable { public init() { } } -extension GetSendQuotaOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSendQuotaOutputBody = try responseDecoder.decode(responseBody: data) - self.max24HourSend = output.max24HourSend - self.maxSendRate = output.maxSendRate - self.sentLast24Hours = output.sentLast24Hours - } else { - self.max24HourSend = 0.0 - self.maxSendRate = 0.0 - self.sentLast24Hours = 0.0 +extension GetSendQuotaOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetSendQuotaResult"] + var value = GetSendQuotaOutput() + value.max24HourSend = try reader["Max24HourSend"].readIfPresent() ?? 0 + value.maxSendRate = try reader["MaxSendRate"].readIfPresent() ?? 0 + value.sentLast24Hours = try reader["SentLast24Hours"].readIfPresent() ?? 0 + return value } } } @@ -5254,41 +4329,24 @@ public struct GetSendQuotaOutput: Swift.Equatable { } } -struct GetSendQuotaOutputBody: Swift.Equatable { - let max24HourSend: Swift.Double - let maxSendRate: Swift.Double - let sentLast24Hours: Swift.Double -} - -extension GetSendQuotaOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case max24HourSend = "Max24HourSend" - case maxSendRate = "MaxSendRate" - case sentLast24Hours = "SentLast24Hours" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetSendQuotaResult")) - let max24HourSendDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .max24HourSend) ?? 0 - max24HourSend = max24HourSendDecoded - let maxSendRateDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .maxSendRate) ?? 0 - maxSendRate = maxSendRateDecoded - let sentLast24HoursDecoded = try containerValues.decodeIfPresent(Swift.Double.self, forKey: .sentLast24Hours) ?? 0 - sentLast24Hours = sentLast24HoursDecoded - } -} +enum GetSendQuotaOutputError { -enum GetSendQuotaOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetSendStatisticsInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GetSendStatistics", forKey:ClientRuntime.Key("Action")) @@ -5308,14 +4366,15 @@ public struct GetSendStatisticsInput: Swift.Equatable { public init() { } } -extension GetSendStatisticsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSendStatisticsOutputBody = try responseDecoder.decode(responseBody: data) - self.sendDataPoints = output.sendDataPoints - } else { - self.sendDataPoints = nil +extension GetSendStatisticsOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetSendStatisticsResult"] + var value = GetSendStatisticsOutput() + value.sendDataPoints = try reader["SendDataPoints"].readListIfPresent(memberReadingClosure: SESClientTypes.SendDataPoint.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5333,50 +4392,27 @@ public struct GetSendStatisticsOutput: Swift.Equatable { } } -struct GetSendStatisticsOutputBody: Swift.Equatable { - let sendDataPoints: [SESClientTypes.SendDataPoint]? -} +enum GetSendStatisticsOutputError { -extension GetSendStatisticsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case sendDataPoints = "SendDataPoints" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetSendStatisticsResult")) - if containerValues.contains(.sendDataPoints) { - struct KeyVal0{struct member{}} - let sendDataPointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .sendDataPoints) - if let sendDataPointsWrappedContainer = sendDataPointsWrappedContainer { - let sendDataPointsContainer = try sendDataPointsWrappedContainer.decodeIfPresent([SESClientTypes.SendDataPoint].self, forKey: .member) - var sendDataPointsBuffer:[SESClientTypes.SendDataPoint]? = nil - if let sendDataPointsContainer = sendDataPointsContainer { - sendDataPointsBuffer = [SESClientTypes.SendDataPoint]() - for structureContainer0 in sendDataPointsContainer { - sendDataPointsBuffer?.append(structureContainer0) - } - } - sendDataPoints = sendDataPointsBuffer - } else { - sendDataPoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - sendDataPoints = nil } } } -enum GetSendStatisticsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case templateName = "TemplateName" } -} -extension GetTemplateInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let templateName = templateName { @@ -5407,30 +4443,15 @@ public struct GetTemplateInput: Swift.Equatable { } } -struct GetTemplateInputBody: Swift.Equatable { - let templateName: Swift.String? -} - -extension GetTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateName = "TemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - } -} +extension GetTemplateOutput { -extension GetTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.template = output.template - } else { - self.template = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetTemplateResult"] + var value = GetTemplateOutput() + value.template = try reader["Template"].readIfPresent(readingClosure: SESClientTypes.Template.readingClosure) + return value } } } @@ -5447,34 +4468,24 @@ public struct GetTemplateOutput: Swift.Equatable { } } -struct GetTemplateOutputBody: Swift.Equatable { - let template: SESClientTypes.Template? -} - -extension GetTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case template = "Template" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetTemplateResult")) - let templateDecoded = try containerValues.decodeIfPresent(SESClientTypes.Template.self, forKey: .template) - template = templateDecoded - } -} +enum GetTemplateOutputError { -enum GetTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "TemplateDoesNotExist": return try await TemplateDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "TemplateDoesNotExist": return try await TemplateDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SESClientTypes.IdentityDkimAttributes: Swift.Codable { +extension SESClientTypes.IdentityDkimAttributes: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case dkimEnabled = "DkimEnabled" case dkimTokens = "DkimTokens" @@ -5503,30 +4514,14 @@ extension SESClientTypes.IdentityDkimAttributes: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dkimEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dkimEnabled) ?? false - dkimEnabled = dkimEnabledDecoded - let dkimVerificationStatusDecoded = try containerValues.decodeIfPresent(SESClientTypes.VerificationStatus.self, forKey: .dkimVerificationStatus) - dkimVerificationStatus = dkimVerificationStatusDecoded - if containerValues.contains(.dkimTokens) { - struct KeyVal0{struct member{}} - let dkimTokensWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dkimTokens) - if let dkimTokensWrappedContainer = dkimTokensWrappedContainer { - let dkimTokensContainer = try dkimTokensWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dkimTokensBuffer:[Swift.String]? = nil - if let dkimTokensContainer = dkimTokensContainer { - dkimTokensBuffer = [Swift.String]() - for stringContainer0 in dkimTokensContainer { - dkimTokensBuffer?.append(stringContainer0) - } - } - dkimTokens = dkimTokensBuffer - } else { - dkimTokens = [] - } - } else { - dkimTokens = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.IdentityDkimAttributes() + value.dkimEnabled = try reader["DkimEnabled"].readIfPresent() ?? false + value.dkimVerificationStatus = try reader["DkimVerificationStatus"].readIfPresent() + value.dkimTokens = try reader["DkimTokens"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5557,7 +4552,7 @@ extension SESClientTypes { } -extension SESClientTypes.IdentityMailFromDomainAttributes: Swift.Codable { +extension SESClientTypes.IdentityMailFromDomainAttributes: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case behaviorOnMXFailure = "BehaviorOnMXFailure" case mailFromDomain = "MailFromDomain" @@ -5577,14 +4572,15 @@ extension SESClientTypes.IdentityMailFromDomainAttributes: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let mailFromDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .mailFromDomain) - mailFromDomain = mailFromDomainDecoded - let mailFromDomainStatusDecoded = try containerValues.decodeIfPresent(SESClientTypes.CustomMailFromStatus.self, forKey: .mailFromDomainStatus) - mailFromDomainStatus = mailFromDomainStatusDecoded - let behaviorOnMXFailureDecoded = try containerValues.decodeIfPresent(SESClientTypes.BehaviorOnMXFailure.self, forKey: .behaviorOnMXFailure) - behaviorOnMXFailure = behaviorOnMXFailureDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.IdentityMailFromDomainAttributes() + value.mailFromDomain = try reader["MailFromDomain"].readIfPresent() + value.mailFromDomainStatus = try reader["MailFromDomainStatus"].readIfPresent() + value.behaviorOnMXFailure = try reader["BehaviorOnMXFailure"].readIfPresent() + return value + } } } @@ -5615,7 +4611,7 @@ extension SESClientTypes { } -extension SESClientTypes.IdentityNotificationAttributes: Swift.Codable { +extension SESClientTypes.IdentityNotificationAttributes: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case bounceTopic = "BounceTopic" case complaintTopic = "ComplaintTopic" @@ -5651,22 +4647,19 @@ extension SESClientTypes.IdentityNotificationAttributes: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bounceTopicDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bounceTopic) - bounceTopic = bounceTopicDecoded - let complaintTopicDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .complaintTopic) - complaintTopic = complaintTopicDecoded - let deliveryTopicDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliveryTopic) - deliveryTopic = deliveryTopicDecoded - let forwardingEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forwardingEnabled) ?? false - forwardingEnabled = forwardingEnabledDecoded - let headersInBounceNotificationsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .headersInBounceNotificationsEnabled) ?? false - headersInBounceNotificationsEnabled = headersInBounceNotificationsEnabledDecoded - let headersInComplaintNotificationsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .headersInComplaintNotificationsEnabled) ?? false - headersInComplaintNotificationsEnabled = headersInComplaintNotificationsEnabledDecoded - let headersInDeliveryNotificationsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .headersInDeliveryNotificationsEnabled) ?? false - headersInDeliveryNotificationsEnabled = headersInDeliveryNotificationsEnabledDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.IdentityNotificationAttributes() + value.bounceTopic = try reader["BounceTopic"].readIfPresent() + value.complaintTopic = try reader["ComplaintTopic"].readIfPresent() + value.deliveryTopic = try reader["DeliveryTopic"].readIfPresent() + value.forwardingEnabled = try reader["ForwardingEnabled"].readIfPresent() ?? false + value.headersInBounceNotificationsEnabled = try reader["HeadersInBounceNotificationsEnabled"].readIfPresent() ?? false + value.headersInComplaintNotificationsEnabled = try reader["HeadersInComplaintNotificationsEnabled"].readIfPresent() ?? false + value.headersInDeliveryNotificationsEnabled = try reader["HeadersInDeliveryNotificationsEnabled"].readIfPresent() ?? false + return value + } } } @@ -5746,7 +4739,7 @@ extension SESClientTypes { } } -extension SESClientTypes.IdentityVerificationAttributes: Swift.Codable { +extension SESClientTypes.IdentityVerificationAttributes: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case verificationStatus = "VerificationStatus" case verificationToken = "VerificationToken" @@ -5762,12 +4755,14 @@ extension SESClientTypes.IdentityVerificationAttributes: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let verificationStatusDecoded = try containerValues.decodeIfPresent(SESClientTypes.VerificationStatus.self, forKey: .verificationStatus) - verificationStatus = verificationStatusDecoded - let verificationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verificationToken) - verificationToken = verificationTokenDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.IdentityVerificationAttributes() + value.verificationStatus = try reader["VerificationStatus"].readIfPresent() + value.verificationToken = try reader["VerificationToken"].readIfPresent() + return value + } } } @@ -5793,20 +4788,16 @@ extension SESClientTypes { } extension InvalidCloudWatchDestinationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.eventDestinationName = output.error.eventDestinationName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.eventDestinationName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidCloudWatchDestinationException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.eventDestinationName = try reader["EventDestinationName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5842,41 +4833,15 @@ public struct InvalidCloudWatchDestinationException: ClientRuntime.ModeledError, } } -struct InvalidCloudWatchDestinationExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let eventDestinationName: Swift.String? - let message: Swift.String? -} - -extension InvalidCloudWatchDestinationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case eventDestinationName = "EventDestinationName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let eventDestinationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventDestinationName) - eventDestinationName = eventDestinationNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidConfigurationSetException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidConfigurationSetException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5904,33 +4869,15 @@ public struct InvalidConfigurationSetException: ClientRuntime.ModeledError, AWSC } } -struct InvalidConfigurationSetExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidConfigurationSetExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidDeliveryOptionsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidDeliveryOptionsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5958,37 +4905,17 @@ public struct InvalidDeliveryOptionsException: ClientRuntime.ModeledError, AWSCl } } -struct InvalidDeliveryOptionsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidDeliveryOptionsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidFirehoseDestinationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.eventDestinationName = output.error.eventDestinationName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.eventDestinationName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidFirehoseDestinationException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.eventDestinationName = try reader["EventDestinationName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6024,44 +4951,17 @@ public struct InvalidFirehoseDestinationException: ClientRuntime.ModeledError, A } } -struct InvalidFirehoseDestinationExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let eventDestinationName: Swift.String? - let message: Swift.String? -} - -extension InvalidFirehoseDestinationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case eventDestinationName = "EventDestinationName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let eventDestinationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventDestinationName) - eventDestinationName = eventDestinationNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension InvalidLambdaFunctionException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.functionArn = output.error.functionArn - self.properties.message = output.error.message - } else { - self.properties.functionArn = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message - } +extension InvalidLambdaFunctionException { + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidLambdaFunctionException() + value.properties.functionArn = try reader["FunctionArn"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value + } } /// Indicates that the provided Amazon Web Services Lambda function is invalid, or that Amazon SES could not execute the provided function, possibly due to permissions issues. For information about giving permissions, see the [Amazon SES Developer Guide](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-permissions.html). @@ -6092,37 +4992,15 @@ public struct InvalidLambdaFunctionException: ClientRuntime.ModeledError, AWSCli } } -struct InvalidLambdaFunctionExceptionBody: Swift.Equatable { - let functionArn: Swift.String? - let message: Swift.String? -} - -extension InvalidLambdaFunctionExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case functionArn = "FunctionArn" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let functionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionArn) - functionArn = functionArnDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidPolicyException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidPolicyException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6150,35 +5028,16 @@ public struct InvalidPolicyException: ClientRuntime.ModeledError, AWSClientRunti } } -struct InvalidPolicyExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidPolicyExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidRenderingParameterException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.templateName = output.error.templateName - } else { - self.properties.templateName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidRenderingParameterException() + value.properties.templateName = try reader["TemplateName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6209,39 +5068,16 @@ public struct InvalidRenderingParameterException: ClientRuntime.ModeledError, AW } } -struct InvalidRenderingParameterExceptionBody: Swift.Equatable { - let templateName: Swift.String? - let message: Swift.String? -} - -extension InvalidRenderingParameterExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateName = "TemplateName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidS3ConfigurationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.bucket = output.error.bucket - self.properties.message = output.error.message - } else { - self.properties.bucket = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidS3ConfigurationException() + value.properties.bucket = try reader["Bucket"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6273,41 +5109,17 @@ public struct InvalidS3ConfigurationException: ClientRuntime.ModeledError, AWSCl } } -struct InvalidS3ConfigurationExceptionBody: Swift.Equatable { - let bucket: Swift.String? - let message: Swift.String? -} - -extension InvalidS3ConfigurationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bucket = "Bucket" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let bucketDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucket) - bucket = bucketDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSNSDestinationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.eventDestinationName = output.error.eventDestinationName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.eventDestinationName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSNSDestinationException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.eventDestinationName = try reader["EventDestinationName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6343,43 +5155,16 @@ public struct InvalidSNSDestinationException: ClientRuntime.ModeledError, AWSCli } } -struct InvalidSNSDestinationExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let eventDestinationName: Swift.String? - let message: Swift.String? -} - -extension InvalidSNSDestinationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case eventDestinationName = "EventDestinationName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let eventDestinationNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .eventDestinationName) - eventDestinationName = eventDestinationNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSnsTopicException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.topic = output.error.topic - } else { - self.properties.topic = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSnsTopicException() + value.properties.topic = try reader["Topic"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6411,39 +5196,16 @@ public struct InvalidSnsTopicException: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidSnsTopicExceptionBody: Swift.Equatable { - let topic: Swift.String? - let message: Swift.String? -} - -extension InvalidSnsTopicExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case topic = "Topic" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topic) - topic = topicDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidTemplateException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.templateName = output.error.templateName - } else { - self.properties.templateName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTemplateException() + value.properties.templateName = try reader["TemplateName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6474,37 +5236,15 @@ public struct InvalidTemplateException: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidTemplateExceptionBody: Swift.Equatable { - let templateName: Swift.String? - let message: Swift.String? -} - -extension InvalidTemplateExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateName = "TemplateName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidTrackingOptionsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidTrackingOptionsException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6536,22 +5276,6 @@ public struct InvalidTrackingOptionsException: ClientRuntime.ModeledError, AWSCl } } -struct InvalidTrackingOptionsExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidTrackingOptionsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SESClientTypes { public enum InvocationType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case event @@ -6584,7 +5308,7 @@ extension SESClientTypes { } } -extension SESClientTypes.KinesisFirehoseDestination: Swift.Codable { +extension SESClientTypes.KinesisFirehoseDestination: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case deliveryStreamARN = "DeliveryStreamARN" case iamRoleARN = "IAMRoleARN" @@ -6600,12 +5324,14 @@ extension SESClientTypes.KinesisFirehoseDestination: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let iamRoleARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iamRoleARN) - iamRoleARN = iamRoleARNDecoded - let deliveryStreamARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .deliveryStreamARN) - deliveryStreamARN = deliveryStreamARNDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.KinesisFirehoseDestination() + value.iamRoleARN = try reader["IAMRoleARN"].readIfPresent() + value.deliveryStreamARN = try reader["DeliveryStreamARN"].readIfPresent() + return value + } } } @@ -6631,7 +5357,7 @@ extension SESClientTypes { } -extension SESClientTypes.LambdaAction: Swift.Codable { +extension SESClientTypes.LambdaAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case functionArn = "FunctionArn" case invocationType = "InvocationType" @@ -6651,14 +5377,15 @@ extension SESClientTypes.LambdaAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let functionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .functionArn) - functionArn = functionArnDecoded - let invocationTypeDecoded = try containerValues.decodeIfPresent(SESClientTypes.InvocationType.self, forKey: .invocationType) - invocationType = invocationTypeDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.LambdaAction() + value.topicArn = try reader["TopicArn"].readIfPresent() + value.functionArn = try reader["FunctionArn"].readIfPresent() + value.invocationType = try reader["InvocationType"].readIfPresent() + return value + } } } @@ -6688,16 +5415,14 @@ extension SESClientTypes { } extension LimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = LimitExceededException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6725,23 +5450,12 @@ public struct LimitExceededException: ClientRuntime.ModeledError, AWSClientRunti } } -struct LimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension LimitExceededExceptionBody: Swift.Decodable { +extension ListConfigurationSetsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case maxItems = "MaxItems" + case nextToken = "NextToken" } -} -extension ListConfigurationSetsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxItems = maxItems { @@ -6779,36 +5493,16 @@ public struct ListConfigurationSetsInput: Swift.Equatable { } } -struct ListConfigurationSetsInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxItems: Swift.Int? -} - -extension ListConfigurationSetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxItems = "MaxItems" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListConfigurationSetsOutput { -extension ListConfigurationSetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListConfigurationSetsOutputBody = try responseDecoder.decode(responseBody: data) - self.configurationSets = output.configurationSets - self.nextToken = output.nextToken - } else { - self.configurationSets = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListConfigurationSetsResult"] + var value = ListConfigurationSetsOutput() + value.configurationSets = try reader["ConfigurationSets"].readListIfPresent(memberReadingClosure: SESClientTypes.ConfigurationSet.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -6830,54 +5524,28 @@ public struct ListConfigurationSetsOutput: Swift.Equatable { } } -struct ListConfigurationSetsOutputBody: Swift.Equatable { - let configurationSets: [SESClientTypes.ConfigurationSet]? - let nextToken: Swift.String? -} - -extension ListConfigurationSetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSets = "ConfigurationSets" - case nextToken = "NextToken" - } +enum ListConfigurationSetsOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListConfigurationSetsResult")) - if containerValues.contains(.configurationSets) { - struct KeyVal0{struct member{}} - let configurationSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .configurationSets) - if let configurationSetsWrappedContainer = configurationSetsWrappedContainer { - let configurationSetsContainer = try configurationSetsWrappedContainer.decodeIfPresent([SESClientTypes.ConfigurationSet].self, forKey: .member) - var configurationSetsBuffer:[SESClientTypes.ConfigurationSet]? = nil - if let configurationSetsContainer = configurationSetsContainer { - configurationSetsBuffer = [SESClientTypes.ConfigurationSet]() - for structureContainer0 in configurationSetsContainer { - configurationSetsBuffer?.append(structureContainer0) - } - } - configurationSets = configurationSetsBuffer - } else { - configurationSets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - configurationSets = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListConfigurationSetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListCustomVerificationEmailTemplatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" } -} -extension ListCustomVerificationEmailTemplatesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -6915,36 +5583,16 @@ public struct ListCustomVerificationEmailTemplatesInput: Swift.Equatable { } } -struct ListCustomVerificationEmailTemplatesInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxResults: Swift.Int? -} - -extension ListCustomVerificationEmailTemplatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} +extension ListCustomVerificationEmailTemplatesOutput { -extension ListCustomVerificationEmailTemplatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListCustomVerificationEmailTemplatesOutputBody = try responseDecoder.decode(responseBody: data) - self.customVerificationEmailTemplates = output.customVerificationEmailTemplates - self.nextToken = output.nextToken - } else { - self.customVerificationEmailTemplates = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListCustomVerificationEmailTemplatesResult"] + var value = ListCustomVerificationEmailTemplatesOutput() + value.customVerificationEmailTemplates = try reader["CustomVerificationEmailTemplates"].readListIfPresent(memberReadingClosure: SESClientTypes.CustomVerificationEmailTemplate.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -6966,54 +5614,29 @@ public struct ListCustomVerificationEmailTemplatesOutput: Swift.Equatable { } } -struct ListCustomVerificationEmailTemplatesOutputBody: Swift.Equatable { - let customVerificationEmailTemplates: [SESClientTypes.CustomVerificationEmailTemplate]? - let nextToken: Swift.String? -} - -extension ListCustomVerificationEmailTemplatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case customVerificationEmailTemplates = "CustomVerificationEmailTemplates" - case nextToken = "NextToken" - } +enum ListCustomVerificationEmailTemplatesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListCustomVerificationEmailTemplatesResult")) - if containerValues.contains(.customVerificationEmailTemplates) { - struct KeyVal0{struct member{}} - let customVerificationEmailTemplatesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .customVerificationEmailTemplates) - if let customVerificationEmailTemplatesWrappedContainer = customVerificationEmailTemplatesWrappedContainer { - let customVerificationEmailTemplatesContainer = try customVerificationEmailTemplatesWrappedContainer.decodeIfPresent([SESClientTypes.CustomVerificationEmailTemplate].self, forKey: .member) - var customVerificationEmailTemplatesBuffer:[SESClientTypes.CustomVerificationEmailTemplate]? = nil - if let customVerificationEmailTemplatesContainer = customVerificationEmailTemplatesContainer { - customVerificationEmailTemplatesBuffer = [SESClientTypes.CustomVerificationEmailTemplate]() - for structureContainer0 in customVerificationEmailTemplatesContainer { - customVerificationEmailTemplatesBuffer?.append(structureContainer0) - } - } - customVerificationEmailTemplates = customVerificationEmailTemplatesBuffer - } else { - customVerificationEmailTemplates = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - customVerificationEmailTemplates = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListCustomVerificationEmailTemplatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListIdentitiesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identityType = "IdentityType" + case maxItems = "MaxItems" + case nextToken = "NextToken" } -} -extension ListIdentitiesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identityType = identityType { @@ -7058,40 +5681,16 @@ public struct ListIdentitiesInput: Swift.Equatable { } } -struct ListIdentitiesInputBody: Swift.Equatable { - let identityType: SESClientTypes.IdentityType? - let nextToken: Swift.String? - let maxItems: Swift.Int? -} - -extension ListIdentitiesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identityType = "IdentityType" - case maxItems = "MaxItems" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityTypeDecoded = try containerValues.decodeIfPresent(SESClientTypes.IdentityType.self, forKey: .identityType) - identityType = identityTypeDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListIdentitiesOutput { -extension ListIdentitiesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListIdentitiesOutputBody = try responseDecoder.decode(responseBody: data) - self.identities = output.identities - self.nextToken = output.nextToken - } else { - self.identities = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListIdentitiesResult"] + var value = ListIdentitiesOutput() + value.identities = try reader["Identities"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -7114,54 +5713,27 @@ public struct ListIdentitiesOutput: Swift.Equatable { } } -struct ListIdentitiesOutputBody: Swift.Equatable { - let identities: [Swift.String]? - let nextToken: Swift.String? -} - -extension ListIdentitiesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identities = "Identities" - case nextToken = "NextToken" - } +enum ListIdentitiesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListIdentitiesResult")) - if containerValues.contains(.identities) { - struct KeyVal0{struct member{}} - let identitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .identities) - if let identitiesWrappedContainer = identitiesWrappedContainer { - let identitiesContainer = try identitiesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var identitiesBuffer:[Swift.String]? = nil - if let identitiesContainer = identitiesContainer { - identitiesBuffer = [Swift.String]() - for stringContainer0 in identitiesContainer { - identitiesBuffer?.append(stringContainer0) - } - } - identities = identitiesBuffer - } else { - identities = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - identities = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListIdentitiesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListIdentityPoliciesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identity = "Identity" } -} -extension ListIdentityPoliciesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identity = identity { @@ -7193,30 +5765,15 @@ public struct ListIdentityPoliciesInput: Swift.Equatable { } } -struct ListIdentityPoliciesInputBody: Swift.Equatable { - let identity: Swift.String? -} - -extension ListIdentityPoliciesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identity = "Identity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - } -} +extension ListIdentityPoliciesOutput { -extension ListIdentityPoliciesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListIdentityPoliciesOutputBody = try responseDecoder.decode(responseBody: data) - self.policyNames = output.policyNames - } else { - self.policyNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListIdentityPoliciesResult"] + var value = ListIdentityPoliciesOutput() + value.policyNames = try reader["PolicyNames"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7235,50 +5792,24 @@ public struct ListIdentityPoliciesOutput: Swift.Equatable { } } -struct ListIdentityPoliciesOutputBody: Swift.Equatable { - let policyNames: [Swift.String]? -} - -extension ListIdentityPoliciesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case policyNames = "PolicyNames" - } +enum ListIdentityPoliciesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListIdentityPoliciesResult")) - if containerValues.contains(.policyNames) { - struct KeyVal0{struct member{}} - let policyNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyNames) - if let policyNamesWrappedContainer = policyNamesWrappedContainer { - let policyNamesContainer = try policyNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var policyNamesBuffer:[Swift.String]? = nil - if let policyNamesContainer = policyNamesContainer { - policyNamesBuffer = [Swift.String]() - for stringContainer0 in policyNamesContainer { - policyNamesBuffer?.append(stringContainer0) - } - } - policyNames = policyNamesBuffer - } else { - policyNames = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - policyNames = nil - } - } -} - -enum ListIdentityPoliciesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension ListReceiptFiltersInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("ListReceiptFilters", forKey:ClientRuntime.Key("Action")) @@ -7299,14 +5830,15 @@ public struct ListReceiptFiltersInput: Swift.Equatable { public init() { } } -extension ListReceiptFiltersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListReceiptFiltersOutputBody = try responseDecoder.decode(responseBody: data) - self.filters = output.filters - } else { - self.filters = nil +extension ListReceiptFiltersOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListReceiptFiltersResult"] + var value = ListReceiptFiltersOutput() + value.filters = try reader["Filters"].readListIfPresent(memberReadingClosure: SESClientTypes.ReceiptFilter.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7324,50 +5856,27 @@ public struct ListReceiptFiltersOutput: Swift.Equatable { } } -struct ListReceiptFiltersOutputBody: Swift.Equatable { - let filters: [SESClientTypes.ReceiptFilter]? -} +enum ListReceiptFiltersOutputError { -extension ListReceiptFiltersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case filters = "Filters" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListReceiptFiltersResult")) - if containerValues.contains(.filters) { - struct KeyVal0{struct member{}} - let filtersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .filters) - if let filtersWrappedContainer = filtersWrappedContainer { - let filtersContainer = try filtersWrappedContainer.decodeIfPresent([SESClientTypes.ReceiptFilter].self, forKey: .member) - var filtersBuffer:[SESClientTypes.ReceiptFilter]? = nil - if let filtersContainer = filtersContainer { - filtersBuffer = [SESClientTypes.ReceiptFilter]() - for structureContainer0 in filtersContainer { - filtersBuffer?.append(structureContainer0) - } - } - filters = filtersBuffer - } else { - filters = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - filters = nil } } } -enum ListReceiptFiltersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListReceiptRuleSetsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" } -} -extension ListReceiptRuleSetsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -7398,32 +5907,16 @@ public struct ListReceiptRuleSetsInput: Swift.Equatable { } } -struct ListReceiptRuleSetsInputBody: Swift.Equatable { - let nextToken: Swift.String? -} - -extension ListReceiptRuleSetsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListReceiptRuleSetsOutput { -extension ListReceiptRuleSetsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListReceiptRuleSetsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.ruleSets = output.ruleSets - } else { - self.nextToken = nil - self.ruleSets = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListReceiptRuleSetsResult"] + var value = ListReceiptRuleSetsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.ruleSets = try reader["RuleSets"].readListIfPresent(memberReadingClosure: SESClientTypes.ReceiptRuleSetMetadata.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7445,54 +5938,28 @@ public struct ListReceiptRuleSetsOutput: Swift.Equatable { } } -struct ListReceiptRuleSetsOutputBody: Swift.Equatable { - let ruleSets: [SESClientTypes.ReceiptRuleSetMetadata]? - let nextToken: Swift.String? -} +enum ListReceiptRuleSetsOutputError { -extension ListReceiptRuleSetsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case ruleSets = "RuleSets" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListReceiptRuleSetsResult")) - if containerValues.contains(.ruleSets) { - struct KeyVal0{struct member{}} - let ruleSetsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleSets) - if let ruleSetsWrappedContainer = ruleSetsWrappedContainer { - let ruleSetsContainer = try ruleSetsWrappedContainer.decodeIfPresent([SESClientTypes.ReceiptRuleSetMetadata].self, forKey: .member) - var ruleSetsBuffer:[SESClientTypes.ReceiptRuleSetMetadata]? = nil - if let ruleSetsContainer = ruleSetsContainer { - ruleSetsBuffer = [SESClientTypes.ReceiptRuleSetMetadata]() - for structureContainer0 in ruleSetsContainer { - ruleSetsBuffer?.append(structureContainer0) - } - } - ruleSets = ruleSetsBuffer - } else { - ruleSets = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - ruleSets = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListReceiptRuleSetsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTemplatesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxItems = "MaxItems" + case nextToken = "NextToken" } -} -extension ListTemplatesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxItems = maxItems { @@ -7529,36 +5996,16 @@ public struct ListTemplatesInput: Swift.Equatable { } } -struct ListTemplatesInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxItems: Swift.Int? -} - -extension ListTemplatesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxItems = "MaxItems" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxItemsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxItems) - maxItems = maxItemsDecoded - } -} +extension ListTemplatesOutput { -extension ListTemplatesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTemplatesOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.templatesMetadata = output.templatesMetadata - } else { - self.nextToken = nil - self.templatesMetadata = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTemplatesResult"] + var value = ListTemplatesOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.templatesMetadata = try reader["TemplatesMetadata"].readListIfPresent(memberReadingClosure: SESClientTypes.TemplateMetadata.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7579,54 +6026,24 @@ public struct ListTemplatesOutput: Swift.Equatable { } } -struct ListTemplatesOutputBody: Swift.Equatable { - let templatesMetadata: [SESClientTypes.TemplateMetadata]? - let nextToken: Swift.String? -} +enum ListTemplatesOutputError { -extension ListTemplatesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case templatesMetadata = "TemplatesMetadata" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTemplatesResult")) - if containerValues.contains(.templatesMetadata) { - struct KeyVal0{struct member{}} - let templatesMetadataWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .templatesMetadata) - if let templatesMetadataWrappedContainer = templatesMetadataWrappedContainer { - let templatesMetadataContainer = try templatesMetadataWrappedContainer.decodeIfPresent([SESClientTypes.TemplateMetadata].self, forKey: .member) - var templatesMetadataBuffer:[SESClientTypes.TemplateMetadata]? = nil - if let templatesMetadataContainer = templatesMetadataContainer { - templatesMetadataBuffer = [SESClientTypes.TemplateMetadata]() - for structureContainer0 in templatesMetadataContainer { - templatesMetadataBuffer?.append(structureContainer0) - } - } - templatesMetadata = templatesMetadataBuffer - } else { - templatesMetadata = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - templatesMetadata = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListTemplatesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension ListVerifiedEmailAddressesInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("ListVerifiedEmailAddresses", forKey:ClientRuntime.Key("Action")) @@ -7646,14 +6063,15 @@ public struct ListVerifiedEmailAddressesInput: Swift.Equatable { public init() { } } -extension ListVerifiedEmailAddressesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListVerifiedEmailAddressesOutputBody = try responseDecoder.decode(responseBody: data) - self.verifiedEmailAddresses = output.verifiedEmailAddresses - } else { - self.verifiedEmailAddresses = nil +extension ListVerifiedEmailAddressesOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListVerifiedEmailAddressesResult"] + var value = ListVerifiedEmailAddressesOutput() + value.verifiedEmailAddresses = try reader["VerifiedEmailAddresses"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7671,60 +6089,31 @@ public struct ListVerifiedEmailAddressesOutput: Swift.Equatable { } } -struct ListVerifiedEmailAddressesOutputBody: Swift.Equatable { - let verifiedEmailAddresses: [Swift.String]? -} +enum ListVerifiedEmailAddressesOutputError { -extension ListVerifiedEmailAddressesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verifiedEmailAddresses = "VerifiedEmailAddresses" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListVerifiedEmailAddressesResult")) - if containerValues.contains(.verifiedEmailAddresses) { - struct KeyVal0{struct member{}} - let verifiedEmailAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .verifiedEmailAddresses) - if let verifiedEmailAddressesWrappedContainer = verifiedEmailAddressesWrappedContainer { - let verifiedEmailAddressesContainer = try verifiedEmailAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var verifiedEmailAddressesBuffer:[Swift.String]? = nil - if let verifiedEmailAddressesContainer = verifiedEmailAddressesContainer { - verifiedEmailAddressesBuffer = [Swift.String]() - for stringContainer0 in verifiedEmailAddressesContainer { - verifiedEmailAddressesBuffer?.append(stringContainer0) - } - } - verifiedEmailAddresses = verifiedEmailAddressesBuffer - } else { - verifiedEmailAddresses = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - verifiedEmailAddresses = nil - } - } -} - -enum ListVerifiedEmailAddressesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension MailFromDomainNotVerifiedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MailFromDomainNotVerifiedException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7752,26 +6141,10 @@ public struct MailFromDomainNotVerifiedException: ClientRuntime.ModeledError, AW } } -struct MailFromDomainNotVerifiedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension MailFromDomainNotVerifiedExceptionBody: Swift.Decodable { +extension SESClientTypes.Message: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SESClientTypes.Message: Swift.Codable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case body = "Body" - case subject = "Subject" + case body = "Body" + case subject = "Subject" } public func encode(to encoder: Swift.Encoder) throws { @@ -7784,12 +6157,14 @@ extension SESClientTypes.Message: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subjectDecoded = try containerValues.decodeIfPresent(SESClientTypes.Content.self, forKey: .subject) - subject = subjectDecoded - let bodyDecoded = try containerValues.decodeIfPresent(SESClientTypes.Body.self, forKey: .body) - body = bodyDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.Message() + value.subject = try reader["Subject"].readIfPresent(readingClosure: SESClientTypes.Content.readingClosure) + value.body = try reader["Body"].readIfPresent(readingClosure: SESClientTypes.Body.readingClosure) + return value + } } } @@ -7815,7 +6190,7 @@ extension SESClientTypes { } -extension SESClientTypes.MessageDsn: Swift.Codable { +extension SESClientTypes.MessageDsn: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arrivalDate = "ArrivalDate" case extensionFields = "ExtensionFields" @@ -7844,30 +6219,14 @@ extension SESClientTypes.MessageDsn: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let reportingMtaDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .reportingMta) - reportingMta = reportingMtaDecoded - let arrivalDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .arrivalDate) - arrivalDate = arrivalDateDecoded - if containerValues.contains(.extensionFields) { - struct KeyVal0{struct member{}} - let extensionFieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .extensionFields) - if let extensionFieldsWrappedContainer = extensionFieldsWrappedContainer { - let extensionFieldsContainer = try extensionFieldsWrappedContainer.decodeIfPresent([SESClientTypes.ExtensionField].self, forKey: .member) - var extensionFieldsBuffer:[SESClientTypes.ExtensionField]? = nil - if let extensionFieldsContainer = extensionFieldsContainer { - extensionFieldsBuffer = [SESClientTypes.ExtensionField]() - for structureContainer0 in extensionFieldsContainer { - extensionFieldsBuffer?.append(structureContainer0) - } - } - extensionFields = extensionFieldsBuffer - } else { - extensionFields = [] - } - } else { - extensionFields = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.MessageDsn() + value.reportingMta = try reader["ReportingMta"].readIfPresent() + value.arrivalDate = try reader["ArrivalDate"].readTimestampIfPresent(format: .dateTime) + value.extensionFields = try reader["ExtensionFields"].readListIfPresent(memberReadingClosure: SESClientTypes.ExtensionField.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -7898,16 +6257,14 @@ extension SESClientTypes { } extension MessageRejected { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MessageRejected() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7935,23 +6292,7 @@ public struct MessageRejected: ClientRuntime.ModeledError, AWSClientRuntime.AWSS } } -struct MessageRejectedBody: Swift.Equatable { - let message: Swift.String? -} - -extension MessageRejectedBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SESClientTypes.MessageTag: Swift.Codable { +extension SESClientTypes.MessageTag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case name = "Name" case value = "Value" @@ -7967,12 +6308,14 @@ extension SESClientTypes.MessageTag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.MessageTag() + value.name = try reader["Name"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -8007,18 +6350,15 @@ extension SESClientTypes { } extension MissingRenderingAttributeException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.templateName = output.error.templateName - } else { - self.properties.templateName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MissingRenderingAttributeException() + value.properties.templateName = try reader["TemplateName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8049,26 +6389,6 @@ public struct MissingRenderingAttributeException: ClientRuntime.ModeledError, AW } } -struct MissingRenderingAttributeExceptionBody: Swift.Equatable { - let templateName: Swift.String? - let message: Swift.String? -} - -extension MissingRenderingAttributeExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateName = "TemplateName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SESClientTypes { public enum NotificationType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { case bounce @@ -8105,16 +6425,14 @@ extension SESClientTypes { } extension ProductionAccessNotGrantedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ProductionAccessNotGrantedException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8142,23 +6460,12 @@ public struct ProductionAccessNotGrantedException: ClientRuntime.ModeledError, A } } -struct ProductionAccessNotGrantedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ProductionAccessNotGrantedExceptionBody: Swift.Decodable { +extension PutConfigurationSetDeliveryOptionsInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case configurationSetName = "ConfigurationSetName" + case deliveryOptions = "DeliveryOptions" } -} -extension PutConfigurationSetDeliveryOptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -8197,28 +6504,12 @@ public struct PutConfigurationSetDeliveryOptionsInput: Swift.Equatable { } } -struct PutConfigurationSetDeliveryOptionsInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let deliveryOptions: SESClientTypes.DeliveryOptions? -} - -extension PutConfigurationSetDeliveryOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case deliveryOptions = "DeliveryOptions" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let deliveryOptionsDecoded = try containerValues.decodeIfPresent(SESClientTypes.DeliveryOptions.self, forKey: .deliveryOptions) - deliveryOptions = deliveryOptionsDecoded - } -} +extension PutConfigurationSetDeliveryOptionsOutput { -extension PutConfigurationSetDeliveryOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutConfigurationSetDeliveryOptionsOutput() + } } } @@ -8228,18 +6519,31 @@ public struct PutConfigurationSetDeliveryOptionsOutput: Swift.Equatable { public init() { } } -enum PutConfigurationSetDeliveryOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidDeliveryOptions": return try await InvalidDeliveryOptionsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutConfigurationSetDeliveryOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidDeliveryOptions": return try await InvalidDeliveryOptionsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutIdentityPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identity = "Identity" + case policy = "Policy" + case policyName = "PolicyName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identity = identity { @@ -8287,32 +6591,12 @@ public struct PutIdentityPolicyInput: Swift.Equatable { } } -struct PutIdentityPolicyInputBody: Swift.Equatable { - let identity: Swift.String? - let policyName: Swift.String? - let policy: Swift.String? -} +extension PutIdentityPolicyOutput { -extension PutIdentityPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identity = "Identity" - case policy = "Policy" - case policyName = "PolicyName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - let policyNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policyName) - policyName = policyNameDecoded - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - } -} - -extension PutIdentityPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutIdentityPolicyOutput() + } } } @@ -8322,17 +6606,24 @@ public struct PutIdentityPolicyOutput: Swift.Equatable { public init() { } } -enum PutIdentityPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidPolicy": return try await InvalidPolicyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutIdentityPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidPolicy": return try await InvalidPolicyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SESClientTypes.RawMessage: Swift.Codable { +extension SESClientTypes.RawMessage: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case data = "Data" } @@ -8344,17 +6635,12 @@ extension SESClientTypes.RawMessage: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.data) { - do { - let dataDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .data) - data = dataDecoded - } catch { - data = "".data(using: .utf8) - } - } else { - data = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.RawMessage() + value.data = try reader["Data"].readIfPresent() + return value } } } @@ -8376,7 +6662,7 @@ extension SESClientTypes { } -extension SESClientTypes.ReceiptAction: Swift.Codable { +extension SESClientTypes.ReceiptAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case addHeaderAction = "AddHeaderAction" case bounceAction = "BounceAction" @@ -8412,22 +6698,19 @@ extension SESClientTypes.ReceiptAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let s3ActionDecoded = try containerValues.decodeIfPresent(SESClientTypes.S3Action.self, forKey: .s3Action) - s3Action = s3ActionDecoded - let bounceActionDecoded = try containerValues.decodeIfPresent(SESClientTypes.BounceAction.self, forKey: .bounceAction) - bounceAction = bounceActionDecoded - let workmailActionDecoded = try containerValues.decodeIfPresent(SESClientTypes.WorkmailAction.self, forKey: .workmailAction) - workmailAction = workmailActionDecoded - let lambdaActionDecoded = try containerValues.decodeIfPresent(SESClientTypes.LambdaAction.self, forKey: .lambdaAction) - lambdaAction = lambdaActionDecoded - let stopActionDecoded = try containerValues.decodeIfPresent(SESClientTypes.StopAction.self, forKey: .stopAction) - stopAction = stopActionDecoded - let addHeaderActionDecoded = try containerValues.decodeIfPresent(SESClientTypes.AddHeaderAction.self, forKey: .addHeaderAction) - addHeaderAction = addHeaderActionDecoded - let snsActionDecoded = try containerValues.decodeIfPresent(SESClientTypes.SNSAction.self, forKey: .snsAction) - snsAction = snsActionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.ReceiptAction() + value.s3Action = try reader["S3Action"].readIfPresent(readingClosure: SESClientTypes.S3Action.readingClosure) + value.bounceAction = try reader["BounceAction"].readIfPresent(readingClosure: SESClientTypes.BounceAction.readingClosure) + value.workmailAction = try reader["WorkmailAction"].readIfPresent(readingClosure: SESClientTypes.WorkmailAction.readingClosure) + value.lambdaAction = try reader["LambdaAction"].readIfPresent(readingClosure: SESClientTypes.LambdaAction.readingClosure) + value.stopAction = try reader["StopAction"].readIfPresent(readingClosure: SESClientTypes.StopAction.readingClosure) + value.addHeaderAction = try reader["AddHeaderAction"].readIfPresent(readingClosure: SESClientTypes.AddHeaderAction.readingClosure) + value.snsAction = try reader["SNSAction"].readIfPresent(readingClosure: SESClientTypes.SNSAction.readingClosure) + return value + } } } @@ -8471,7 +6754,7 @@ extension SESClientTypes { } -extension SESClientTypes.ReceiptFilter: Swift.Codable { +extension SESClientTypes.ReceiptFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case ipFilter = "IpFilter" case name = "Name" @@ -8487,12 +6770,14 @@ extension SESClientTypes.ReceiptFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let ipFilterDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReceiptIpFilter.self, forKey: .ipFilter) - ipFilter = ipFilterDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.ReceiptFilter() + value.name = try reader["Name"].readIfPresent() + value.ipFilter = try reader["IpFilter"].readIfPresent(readingClosure: SESClientTypes.ReceiptIpFilter.readingClosure) + return value + } } } @@ -8556,7 +6841,7 @@ extension SESClientTypes { } } -extension SESClientTypes.ReceiptIpFilter: Swift.Codable { +extension SESClientTypes.ReceiptIpFilter: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case cidr = "Cidr" case policy = "Policy" @@ -8572,12 +6857,14 @@ extension SESClientTypes.ReceiptIpFilter: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let policyDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReceiptFilterPolicy.self, forKey: .policy) - policy = policyDecoded - let cidrDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .cidr) - cidr = cidrDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.ReceiptIpFilter() + value.policy = try reader["Policy"].readIfPresent() + value.cidr = try reader["Cidr"].readIfPresent() + return value + } } } @@ -8603,7 +6890,7 @@ extension SESClientTypes { } -extension SESClientTypes.ReceiptRule: Swift.Codable { +extension SESClientTypes.ReceiptRule: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case actions = "Actions" case enabled = "Enabled" @@ -8653,54 +6940,18 @@ extension SESClientTypes.ReceiptRule: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - let tlsPolicyDecoded = try containerValues.decodeIfPresent(SESClientTypes.TlsPolicy.self, forKey: .tlsPolicy) - tlsPolicy = tlsPolicyDecoded - if containerValues.contains(.recipients) { - struct KeyVal0{struct member{}} - let recipientsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .recipients) - if let recipientsWrappedContainer = recipientsWrappedContainer { - let recipientsContainer = try recipientsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var recipientsBuffer:[Swift.String]? = nil - if let recipientsContainer = recipientsContainer { - recipientsBuffer = [Swift.String]() - for stringContainer0 in recipientsContainer { - recipientsBuffer?.append(stringContainer0) - } - } - recipients = recipientsBuffer - } else { - recipients = [] - } - } else { - recipients = nil - } - if containerValues.contains(.actions) { - struct KeyVal0{struct member{}} - let actionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actions) - if let actionsWrappedContainer = actionsWrappedContainer { - let actionsContainer = try actionsWrappedContainer.decodeIfPresent([SESClientTypes.ReceiptAction].self, forKey: .member) - var actionsBuffer:[SESClientTypes.ReceiptAction]? = nil - if let actionsContainer = actionsContainer { - actionsBuffer = [SESClientTypes.ReceiptAction]() - for structureContainer0 in actionsContainer { - actionsBuffer?.append(structureContainer0) - } - } - actions = actionsBuffer - } else { - actions = [] - } - } else { - actions = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.ReceiptRule() + value.name = try reader["Name"].readIfPresent() + value.enabled = try reader["Enabled"].readIfPresent() ?? false + value.tlsPolicy = try reader["TlsPolicy"].readIfPresent() + value.recipients = try reader["Recipients"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.actions = try reader["Actions"].readListIfPresent(memberReadingClosure: SESClientTypes.ReceiptAction.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.scanEnabled = try reader["ScanEnabled"].readIfPresent() ?? false + return value } - let scanEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .scanEnabled) ?? false - scanEnabled = scanEnabledDecoded } } @@ -8747,7 +6998,7 @@ extension SESClientTypes { } -extension SESClientTypes.ReceiptRuleSetMetadata: Swift.Codable { +extension SESClientTypes.ReceiptRuleSetMetadata: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createdTimestamp = "CreatedTimestamp" case name = "Name" @@ -8763,12 +7014,14 @@ extension SESClientTypes.ReceiptRuleSetMetadata: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let createdTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTimestamp) - createdTimestamp = createdTimestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.ReceiptRuleSetMetadata() + value.name = try reader["Name"].readIfPresent() + value.createdTimestamp = try reader["CreatedTimestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -8798,7 +7051,7 @@ extension SESClientTypes { } -extension SESClientTypes.RecipientDsnFields: Swift.Codable { +extension SESClientTypes.RecipientDsnFields: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case action = "Action" case diagnosticCode = "DiagnosticCode" @@ -8843,38 +7096,18 @@ extension SESClientTypes.RecipientDsnFields: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let finalRecipientDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .finalRecipient) - finalRecipient = finalRecipientDecoded - let actionDecoded = try containerValues.decodeIfPresent(SESClientTypes.DsnAction.self, forKey: .action) - action = actionDecoded - let remoteMtaDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .remoteMta) - remoteMta = remoteMtaDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let diagnosticCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .diagnosticCode) - diagnosticCode = diagnosticCodeDecoded - let lastAttemptDateDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastAttemptDate) - lastAttemptDate = lastAttemptDateDecoded - if containerValues.contains(.extensionFields) { - struct KeyVal0{struct member{}} - let extensionFieldsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .extensionFields) - if let extensionFieldsWrappedContainer = extensionFieldsWrappedContainer { - let extensionFieldsContainer = try extensionFieldsWrappedContainer.decodeIfPresent([SESClientTypes.ExtensionField].self, forKey: .member) - var extensionFieldsBuffer:[SESClientTypes.ExtensionField]? = nil - if let extensionFieldsContainer = extensionFieldsContainer { - extensionFieldsBuffer = [SESClientTypes.ExtensionField]() - for structureContainer0 in extensionFieldsContainer { - extensionFieldsBuffer?.append(structureContainer0) - } - } - extensionFields = extensionFieldsBuffer - } else { - extensionFields = [] - } - } else { - extensionFields = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.RecipientDsnFields() + value.finalRecipient = try reader["FinalRecipient"].readIfPresent() + value.action = try reader["Action"].readIfPresent() + value.remoteMta = try reader["RemoteMta"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.diagnosticCode = try reader["DiagnosticCode"].readIfPresent() + value.lastAttemptDate = try reader["LastAttemptDate"].readTimestampIfPresent(format: .dateTime) + value.extensionFields = try reader["ExtensionFields"].readListIfPresent(memberReadingClosure: SESClientTypes.ExtensionField.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -8922,6 +7155,11 @@ extension SESClientTypes { } extension ReorderReceiptRuleSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleNames = "RuleNames" + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleNames = ruleNames { @@ -8970,66 +7208,40 @@ public struct ReorderReceiptRuleSetInput: Swift.Equatable { } } -struct ReorderReceiptRuleSetInputBody: Swift.Equatable { - let ruleSetName: Swift.String? - let ruleNames: [Swift.String]? -} - -extension ReorderReceiptRuleSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleNames = "RuleNames" - case ruleSetName = "RuleSetName" - } +extension ReorderReceiptRuleSetOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - if containerValues.contains(.ruleNames) { - struct KeyVal0{struct member{}} - let ruleNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .ruleNames) - if let ruleNamesWrappedContainer = ruleNamesWrappedContainer { - let ruleNamesContainer = try ruleNamesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var ruleNamesBuffer:[Swift.String]? = nil - if let ruleNamesContainer = ruleNamesContainer { - ruleNamesBuffer = [Swift.String]() - for stringContainer0 in ruleNamesContainer { - ruleNamesBuffer?.append(stringContainer0) - } - } - ruleNames = ruleNamesBuffer - } else { - ruleNames = [] - } - } else { - ruleNames = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return ReorderReceiptRuleSetOutput() } } } -extension ReorderReceiptRuleSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// An empty element returned on a successful request. public struct ReorderReceiptRuleSetOutput: Swift.Equatable { public init() { } } -enum ReorderReceiptRuleSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RuleDoesNotExist": return try await RuleDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ReorderReceiptRuleSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RuleDoesNotExist": return try await RuleDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SESClientTypes.ReputationOptions: Swift.Codable { +extension SESClientTypes.ReputationOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case lastFreshStart = "LastFreshStart" case reputationMetricsEnabled = "ReputationMetricsEnabled" @@ -9049,14 +7261,15 @@ extension SESClientTypes.ReputationOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sendingEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .sendingEnabled) ?? false - sendingEnabled = sendingEnabledDecoded - let reputationMetricsEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .reputationMetricsEnabled) ?? false - reputationMetricsEnabled = reputationMetricsEnabledDecoded - let lastFreshStartDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .lastFreshStart) - lastFreshStart = lastFreshStartDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.ReputationOptions() + value.sendingEnabled = try reader["SendingEnabled"].readIfPresent() ?? false + value.reputationMetricsEnabled = try reader["ReputationMetricsEnabled"].readIfPresent() ?? false + value.lastFreshStart = try reader["LastFreshStart"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -9085,18 +7298,15 @@ extension SESClientTypes { } extension RuleDoesNotExistException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.name = output.error.name - } else { - self.properties.name = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RuleDoesNotExistException() + value.properties.name = try reader["Name"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9128,39 +7338,16 @@ public struct RuleDoesNotExistException: ClientRuntime.ModeledError, AWSClientRu } } -struct RuleDoesNotExistExceptionBody: Swift.Equatable { - let name: Swift.String? - let message: Swift.String? -} - -extension RuleDoesNotExistExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension RuleSetDoesNotExistException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.name = output.error.name - } else { - self.properties.name = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RuleSetDoesNotExistException() + value.properties.name = try reader["Name"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -9192,27 +7379,7 @@ public struct RuleSetDoesNotExistException: ClientRuntime.ModeledError, AWSClien } } -struct RuleSetDoesNotExistExceptionBody: Swift.Equatable { - let name: Swift.String? - let message: Swift.String? -} - -extension RuleSetDoesNotExistExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case name = "Name" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SESClientTypes.S3Action: Swift.Codable { +extension SESClientTypes.S3Action: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case bucketName = "BucketName" case kmsKeyArn = "KmsKeyArn" @@ -9236,16 +7403,16 @@ extension SESClientTypes.S3Action: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let bucketNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bucketName) - bucketName = bucketNameDecoded - let objectKeyPrefixDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .objectKeyPrefix) - objectKeyPrefix = objectKeyPrefixDecoded - let kmsKeyArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .kmsKeyArn) - kmsKeyArn = kmsKeyArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.S3Action() + value.topicArn = try reader["TopicArn"].readIfPresent() + value.bucketName = try reader["BucketName"].readIfPresent() + value.objectKeyPrefix = try reader["ObjectKeyPrefix"].readIfPresent() + value.kmsKeyArn = try reader["KmsKeyArn"].readIfPresent() + return value + } } } @@ -9287,7 +7454,7 @@ extension SESClientTypes { public enum SESClientTypes {} -extension SESClientTypes.SNSAction: Swift.Codable { +extension SESClientTypes.SNSAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case encoding = "Encoding" case topicArn = "TopicArn" @@ -9303,12 +7470,14 @@ extension SESClientTypes.SNSAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let encodingDecoded = try containerValues.decodeIfPresent(SESClientTypes.SNSActionEncoding.self, forKey: .encoding) - encoding = encodingDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.SNSAction() + value.topicArn = try reader["TopicArn"].readIfPresent() + value.encoding = try reader["Encoding"].readIfPresent() + return value + } } } @@ -9365,7 +7534,7 @@ extension SESClientTypes { } } -extension SESClientTypes.SNSDestination: Swift.Codable { +extension SESClientTypes.SNSDestination: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case topicARN = "TopicARN" } @@ -9377,10 +7546,13 @@ extension SESClientTypes.SNSDestination: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicARNDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicARN) - topicARN = topicARNDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.SNSDestination() + value.topicARN = try reader["TopicARN"].readIfPresent() + return value + } } } @@ -9402,6 +7574,15 @@ extension SESClientTypes { } extension SendBounceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case bounceSender = "BounceSender" + case bounceSenderArn = "BounceSenderArn" + case bouncedRecipientInfoList = "BouncedRecipientInfoList" + case explanation = "Explanation" + case messageDsn = "MessageDsn" + case originalMessageId = "OriginalMessageId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let bounceSender = bounceSender { @@ -9479,67 +7660,15 @@ public struct SendBounceInput: Swift.Equatable { } } -struct SendBounceInputBody: Swift.Equatable { - let originalMessageId: Swift.String? - let bounceSender: Swift.String? - let explanation: Swift.String? - let messageDsn: SESClientTypes.MessageDsn? - let bouncedRecipientInfoList: [SESClientTypes.BouncedRecipientInfo]? - let bounceSenderArn: Swift.String? -} - -extension SendBounceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case bounceSender = "BounceSender" - case bounceSenderArn = "BounceSenderArn" - case bouncedRecipientInfoList = "BouncedRecipientInfoList" - case explanation = "Explanation" - case messageDsn = "MessageDsn" - case originalMessageId = "OriginalMessageId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let originalMessageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .originalMessageId) - originalMessageId = originalMessageIdDecoded - let bounceSenderDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bounceSender) - bounceSender = bounceSenderDecoded - let explanationDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .explanation) - explanation = explanationDecoded - let messageDsnDecoded = try containerValues.decodeIfPresent(SESClientTypes.MessageDsn.self, forKey: .messageDsn) - messageDsn = messageDsnDecoded - if containerValues.contains(.bouncedRecipientInfoList) { - struct KeyVal0{struct member{}} - let bouncedRecipientInfoListWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .bouncedRecipientInfoList) - if let bouncedRecipientInfoListWrappedContainer = bouncedRecipientInfoListWrappedContainer { - let bouncedRecipientInfoListContainer = try bouncedRecipientInfoListWrappedContainer.decodeIfPresent([SESClientTypes.BouncedRecipientInfo].self, forKey: .member) - var bouncedRecipientInfoListBuffer:[SESClientTypes.BouncedRecipientInfo]? = nil - if let bouncedRecipientInfoListContainer = bouncedRecipientInfoListContainer { - bouncedRecipientInfoListBuffer = [SESClientTypes.BouncedRecipientInfo]() - for structureContainer0 in bouncedRecipientInfoListContainer { - bouncedRecipientInfoListBuffer?.append(structureContainer0) - } - } - bouncedRecipientInfoList = bouncedRecipientInfoListBuffer - } else { - bouncedRecipientInfoList = [] - } - } else { - bouncedRecipientInfoList = nil - } - let bounceSenderArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .bounceSenderArn) - bounceSenderArn = bounceSenderArnDecoded - } -} +extension SendBounceOutput { -extension SendBounceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SendBounceOutputBody = try responseDecoder.decode(responseBody: data) - self.messageId = output.messageId - } else { - self.messageId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SendBounceResult"] + var value = SendBounceOutput() + value.messageId = try reader["MessageId"].readIfPresent() + return value } } } @@ -9557,34 +7686,38 @@ public struct SendBounceOutput: Swift.Equatable { } } -struct SendBounceOutputBody: Swift.Equatable { - let messageId: Swift.String? -} - -extension SendBounceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case messageId = "MessageId" - } +enum SendBounceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SendBounceResult")) - let messageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageId) - messageId = messageIdDecoded - } -} - -enum SendBounceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "MessageRejected": return try await MessageRejected(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "MessageRejected": return try await MessageRejected.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SendBulkTemplatedEmailInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case defaultTags = "DefaultTags" + case defaultTemplateData = "DefaultTemplateData" + case destinations = "Destinations" + case replyToAddresses = "ReplyToAddresses" + case returnPath = "ReturnPath" + case returnPathArn = "ReturnPathArn" + case source = "Source" + case sourceArn = "SourceArn" + case template = "Template" + case templateArn = "TemplateArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -9715,121 +7848,15 @@ public struct SendBulkTemplatedEmailInput: Swift.Equatable { } } -struct SendBulkTemplatedEmailInputBody: Swift.Equatable { - let source: Swift.String? - let sourceArn: Swift.String? - let replyToAddresses: [Swift.String]? - let returnPath: Swift.String? - let returnPathArn: Swift.String? - let configurationSetName: Swift.String? - let defaultTags: [SESClientTypes.MessageTag]? - let template: Swift.String? - let templateArn: Swift.String? - let defaultTemplateData: Swift.String? - let destinations: [SESClientTypes.BulkEmailDestination]? -} - -extension SendBulkTemplatedEmailInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case defaultTags = "DefaultTags" - case defaultTemplateData = "DefaultTemplateData" - case destinations = "Destinations" - case replyToAddresses = "ReplyToAddresses" - case returnPath = "ReturnPath" - case returnPathArn = "ReturnPathArn" - case source = "Source" - case sourceArn = "SourceArn" - case template = "Template" - case templateArn = "TemplateArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - if containerValues.contains(.replyToAddresses) { - struct KeyVal0{struct member{}} - let replyToAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replyToAddresses) - if let replyToAddressesWrappedContainer = replyToAddressesWrappedContainer { - let replyToAddressesContainer = try replyToAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replyToAddressesBuffer:[Swift.String]? = nil - if let replyToAddressesContainer = replyToAddressesContainer { - replyToAddressesBuffer = [Swift.String]() - for stringContainer0 in replyToAddressesContainer { - replyToAddressesBuffer?.append(stringContainer0) - } - } - replyToAddresses = replyToAddressesBuffer - } else { - replyToAddresses = [] - } - } else { - replyToAddresses = nil - } - let returnPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .returnPath) - returnPath = returnPathDecoded - let returnPathArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .returnPathArn) - returnPathArn = returnPathArnDecoded - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - if containerValues.contains(.defaultTags) { - struct KeyVal0{struct member{}} - let defaultTagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .defaultTags) - if let defaultTagsWrappedContainer = defaultTagsWrappedContainer { - let defaultTagsContainer = try defaultTagsWrappedContainer.decodeIfPresent([SESClientTypes.MessageTag].self, forKey: .member) - var defaultTagsBuffer:[SESClientTypes.MessageTag]? = nil - if let defaultTagsContainer = defaultTagsContainer { - defaultTagsBuffer = [SESClientTypes.MessageTag]() - for structureContainer0 in defaultTagsContainer { - defaultTagsBuffer?.append(structureContainer0) - } - } - defaultTags = defaultTagsBuffer - } else { - defaultTags = [] - } - } else { - defaultTags = nil - } - let templateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .template) - template = templateDecoded - let templateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateArn) - templateArn = templateArnDecoded - let defaultTemplateDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .defaultTemplateData) - defaultTemplateData = defaultTemplateDataDecoded - if containerValues.contains(.destinations) { - struct KeyVal0{struct member{}} - let destinationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinations) - if let destinationsWrappedContainer = destinationsWrappedContainer { - let destinationsContainer = try destinationsWrappedContainer.decodeIfPresent([SESClientTypes.BulkEmailDestination].self, forKey: .member) - var destinationsBuffer:[SESClientTypes.BulkEmailDestination]? = nil - if let destinationsContainer = destinationsContainer { - destinationsBuffer = [SESClientTypes.BulkEmailDestination]() - for structureContainer0 in destinationsContainer { - destinationsBuffer?.append(structureContainer0) - } - } - destinations = destinationsBuffer - } else { - destinations = [] - } - } else { - destinations = nil - } - } -} +extension SendBulkTemplatedEmailOutput { -extension SendBulkTemplatedEmailOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SendBulkTemplatedEmailOutputBody = try responseDecoder.decode(responseBody: data) - self.status = output.status - } else { - self.status = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SendBulkTemplatedEmailResult"] + var value = SendBulkTemplatedEmailOutput() + value.status = try reader["Status"].readListIfPresent(memberReadingClosure: SESClientTypes.BulkEmailDestinationStatus.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -9847,56 +7874,35 @@ public struct SendBulkTemplatedEmailOutput: Swift.Equatable { } } -struct SendBulkTemplatedEmailOutputBody: Swift.Equatable { - let status: [SESClientTypes.BulkEmailDestinationStatus]? -} - -extension SendBulkTemplatedEmailOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SendBulkTemplatedEmailResult")) - if containerValues.contains(.status) { - struct KeyVal0{struct member{}} - let statusWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .status) - if let statusWrappedContainer = statusWrappedContainer { - let statusContainer = try statusWrappedContainer.decodeIfPresent([SESClientTypes.BulkEmailDestinationStatus].self, forKey: .member) - var statusBuffer:[SESClientTypes.BulkEmailDestinationStatus]? = nil - if let statusContainer = statusContainer { - statusBuffer = [SESClientTypes.BulkEmailDestinationStatus]() - for structureContainer0 in statusContainer { - statusBuffer?.append(structureContainer0) - } - } - status = statusBuffer - } else { - status = [] +enum SendBulkTemplatedEmailOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AccountSendingPausedException": return try await AccountSendingPausedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConfigurationSetSendingPausedException": return try await ConfigurationSetSendingPausedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MailFromDomainNotVerifiedException": return try await MailFromDomainNotVerifiedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MessageRejected": return try await MessageRejected.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TemplateDoesNotExist": return try await TemplateDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - status = nil } } } -enum SendBulkTemplatedEmailOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccountSendingPausedException": return try await AccountSendingPausedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConfigurationSetSendingPausedException": return try await ConfigurationSetSendingPausedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MailFromDomainNotVerifiedException": return try await MailFromDomainNotVerifiedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MessageRejected": return try await MessageRejected(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TemplateDoesNotExist": return try await TemplateDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension SendCustomVerificationEmailInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case emailAddress = "EmailAddress" + case templateName = "TemplateName" } -} -extension SendCustomVerificationEmailInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -9943,38 +7949,15 @@ public struct SendCustomVerificationEmailInput: Swift.Equatable { } } -struct SendCustomVerificationEmailInputBody: Swift.Equatable { - let emailAddress: Swift.String? - let templateName: Swift.String? - let configurationSetName: Swift.String? -} - -extension SendCustomVerificationEmailInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case emailAddress = "EmailAddress" - case templateName = "TemplateName" - } +extension SendCustomVerificationEmailOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let emailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .emailAddress) - emailAddress = emailAddressDecoded - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - } -} - -extension SendCustomVerificationEmailOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SendCustomVerificationEmailOutputBody = try responseDecoder.decode(responseBody: data) - self.messageId = output.messageId - } else { - self.messageId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SendCustomVerificationEmailResult"] + var value = SendCustomVerificationEmailOutput() + value.messageId = try reader["MessageId"].readIfPresent() + return value } } } @@ -9992,38 +7975,28 @@ public struct SendCustomVerificationEmailOutput: Swift.Equatable { } } -struct SendCustomVerificationEmailOutputBody: Swift.Equatable { - let messageId: Swift.String? -} - -extension SendCustomVerificationEmailOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case messageId = "MessageId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SendCustomVerificationEmailResult")) - let messageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageId) - messageId = messageIdDecoded - } -} +enum SendCustomVerificationEmailOutputError { -enum SendCustomVerificationEmailOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomVerificationEmailTemplateDoesNotExist": return try await CustomVerificationEmailTemplateDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FromEmailAddressNotVerified": return try await FromEmailAddressNotVerifiedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MessageRejected": return try await MessageRejected(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ProductionAccessNotGranted": return try await ProductionAccessNotGrantedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomVerificationEmailTemplateDoesNotExist": return try await CustomVerificationEmailTemplateDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "FromEmailAddressNotVerified": return try await FromEmailAddressNotVerifiedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MessageRejected": return try await MessageRejected.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ProductionAccessNotGranted": return try await ProductionAccessNotGrantedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SESClientTypes.SendDataPoint: Swift.Codable { +extension SESClientTypes.SendDataPoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case bounces = "Bounces" case complaints = "Complaints" @@ -10051,18 +8024,17 @@ extension SESClientTypes.SendDataPoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let timestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .timestamp) - timestamp = timestampDecoded - let deliveryAttemptsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .deliveryAttempts) ?? 0 - deliveryAttempts = deliveryAttemptsDecoded - let bouncesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .bounces) ?? 0 - bounces = bouncesDecoded - let complaintsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .complaints) ?? 0 - complaints = complaintsDecoded - let rejectsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .rejects) ?? 0 - rejects = rejectsDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.SendDataPoint() + value.timestamp = try reader["Timestamp"].readTimestampIfPresent(format: .dateTime) + value.deliveryAttempts = try reader["DeliveryAttempts"].readIfPresent() ?? 0 + value.bounces = try reader["Bounces"].readIfPresent() ?? 0 + value.complaints = try reader["Complaints"].readIfPresent() ?? 0 + value.rejects = try reader["Rejects"].readIfPresent() ?? 0 + return value + } } } @@ -10099,6 +8071,18 @@ extension SESClientTypes { } extension SendEmailInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case destination = "Destination" + case message = "Message" + case replyToAddresses = "ReplyToAddresses" + case returnPath = "ReturnPath" + case returnPathArn = "ReturnPathArn" + case source = "Source" + case sourceArn = "SourceArn" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -10206,96 +8190,15 @@ public struct SendEmailInput: Swift.Equatable { } } -struct SendEmailInputBody: Swift.Equatable { - let source: Swift.String? - let destination: SESClientTypes.Destination? - let message: SESClientTypes.Message? - let replyToAddresses: [Swift.String]? - let returnPath: Swift.String? - let sourceArn: Swift.String? - let returnPathArn: Swift.String? - let tags: [SESClientTypes.MessageTag]? - let configurationSetName: Swift.String? -} +extension SendEmailOutput { -extension SendEmailInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case destination = "Destination" - case message = "Message" - case replyToAddresses = "ReplyToAddresses" - case returnPath = "ReturnPath" - case returnPathArn = "ReturnPathArn" - case source = "Source" - case sourceArn = "SourceArn" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(SESClientTypes.Destination.self, forKey: .destination) - destination = destinationDecoded - let messageDecoded = try containerValues.decodeIfPresent(SESClientTypes.Message.self, forKey: .message) - message = messageDecoded - if containerValues.contains(.replyToAddresses) { - struct KeyVal0{struct member{}} - let replyToAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replyToAddresses) - if let replyToAddressesWrappedContainer = replyToAddressesWrappedContainer { - let replyToAddressesContainer = try replyToAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replyToAddressesBuffer:[Swift.String]? = nil - if let replyToAddressesContainer = replyToAddressesContainer { - replyToAddressesBuffer = [Swift.String]() - for stringContainer0 in replyToAddressesContainer { - replyToAddressesBuffer?.append(stringContainer0) - } - } - replyToAddresses = replyToAddressesBuffer - } else { - replyToAddresses = [] - } - } else { - replyToAddresses = nil - } - let returnPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .returnPath) - returnPath = returnPathDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let returnPathArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .returnPathArn) - returnPathArn = returnPathArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([SESClientTypes.MessageTag].self, forKey: .member) - var tagsBuffer:[SESClientTypes.MessageTag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [SESClientTypes.MessageTag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - } -} - -extension SendEmailOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SendEmailOutputBody = try responseDecoder.decode(responseBody: data) - self.messageId = output.messageId - } else { - self.messageId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SendEmailResult"] + var value = SendEmailOutput() + value.messageId = try reader["MessageId"].readIfPresent() + return value } } } @@ -10314,38 +8217,39 @@ public struct SendEmailOutput: Swift.Equatable { } } -struct SendEmailOutputBody: Swift.Equatable { - let messageId: Swift.String? -} - -extension SendEmailOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case messageId = "MessageId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SendEmailResult")) - let messageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageId) - messageId = messageIdDecoded - } -} +enum SendEmailOutputError { -enum SendEmailOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccountSendingPausedException": return try await AccountSendingPausedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConfigurationSetSendingPausedException": return try await ConfigurationSetSendingPausedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MailFromDomainNotVerifiedException": return try await MailFromDomainNotVerifiedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MessageRejected": return try await MessageRejected(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AccountSendingPausedException": return try await AccountSendingPausedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConfigurationSetSendingPausedException": return try await ConfigurationSetSendingPausedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MailFromDomainNotVerifiedException": return try await MailFromDomainNotVerifiedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MessageRejected": return try await MessageRejected.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SendRawEmailInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case destinations = "Destinations" + case fromArn = "FromArn" + case rawMessage = "RawMessage" + case returnPathArn = "ReturnPathArn" + case source = "Source" + case sourceArn = "SourceArn" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -10458,92 +8362,15 @@ public struct SendRawEmailInput: Swift.Equatable { } } -struct SendRawEmailInputBody: Swift.Equatable { - let source: Swift.String? - let destinations: [Swift.String]? - let rawMessage: SESClientTypes.RawMessage? - let fromArn: Swift.String? - let sourceArn: Swift.String? - let returnPathArn: Swift.String? - let tags: [SESClientTypes.MessageTag]? - let configurationSetName: Swift.String? -} - -extension SendRawEmailInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case destinations = "Destinations" - case fromArn = "FromArn" - case rawMessage = "RawMessage" - case returnPathArn = "ReturnPathArn" - case source = "Source" - case sourceArn = "SourceArn" - case tags = "Tags" - } +extension SendRawEmailOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - if containerValues.contains(.destinations) { - struct KeyVal0{struct member{}} - let destinationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .destinations) - if let destinationsWrappedContainer = destinationsWrappedContainer { - let destinationsContainer = try destinationsWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var destinationsBuffer:[Swift.String]? = nil - if let destinationsContainer = destinationsContainer { - destinationsBuffer = [Swift.String]() - for stringContainer0 in destinationsContainer { - destinationsBuffer?.append(stringContainer0) - } - } - destinations = destinationsBuffer - } else { - destinations = [] - } - } else { - destinations = nil - } - let rawMessageDecoded = try containerValues.decodeIfPresent(SESClientTypes.RawMessage.self, forKey: .rawMessage) - rawMessage = rawMessageDecoded - let fromArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fromArn) - fromArn = fromArnDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let returnPathArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .returnPathArn) - returnPathArn = returnPathArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([SESClientTypes.MessageTag].self, forKey: .member) - var tagsBuffer:[SESClientTypes.MessageTag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [SESClientTypes.MessageTag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - } -} - -extension SendRawEmailOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SendRawEmailOutputBody = try responseDecoder.decode(responseBody: data) - self.messageId = output.messageId - } else { - self.messageId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SendRawEmailResult"] + var value = SendRawEmailOutput() + value.messageId = try reader["MessageId"].readIfPresent() + return value } } } @@ -10562,38 +8389,42 @@ public struct SendRawEmailOutput: Swift.Equatable { } } -struct SendRawEmailOutputBody: Swift.Equatable { - let messageId: Swift.String? -} +enum SendRawEmailOutputError { -extension SendRawEmailOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case messageId = "MessageId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SendRawEmailResult")) - let messageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageId) - messageId = messageIdDecoded - } -} - -enum SendRawEmailOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccountSendingPausedException": return try await AccountSendingPausedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConfigurationSetSendingPausedException": return try await ConfigurationSetSendingPausedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MailFromDomainNotVerifiedException": return try await MailFromDomainNotVerifiedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MessageRejected": return try await MessageRejected(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AccountSendingPausedException": return try await AccountSendingPausedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConfigurationSetSendingPausedException": return try await ConfigurationSetSendingPausedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MailFromDomainNotVerifiedException": return try await MailFromDomainNotVerifiedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MessageRejected": return try await MessageRejected.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SendTemplatedEmailInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case destination = "Destination" + case replyToAddresses = "ReplyToAddresses" + case returnPath = "ReturnPath" + case returnPathArn = "ReturnPathArn" + case source = "Source" + case sourceArn = "SourceArn" + case tags = "Tags" + case template = "Template" + case templateArn = "TemplateArn" + case templateData = "TemplateData" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -10716,104 +8547,15 @@ public struct SendTemplatedEmailInput: Swift.Equatable { } } -struct SendTemplatedEmailInputBody: Swift.Equatable { - let source: Swift.String? - let destination: SESClientTypes.Destination? - let replyToAddresses: [Swift.String]? - let returnPath: Swift.String? - let sourceArn: Swift.String? - let returnPathArn: Swift.String? - let tags: [SESClientTypes.MessageTag]? - let configurationSetName: Swift.String? - let template: Swift.String? - let templateArn: Swift.String? - let templateData: Swift.String? -} - -extension SendTemplatedEmailInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case destination = "Destination" - case replyToAddresses = "ReplyToAddresses" - case returnPath = "ReturnPath" - case returnPathArn = "ReturnPathArn" - case source = "Source" - case sourceArn = "SourceArn" - case tags = "Tags" - case template = "Template" - case templateArn = "TemplateArn" - case templateData = "TemplateData" - } +extension SendTemplatedEmailOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let sourceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .source) - source = sourceDecoded - let destinationDecoded = try containerValues.decodeIfPresent(SESClientTypes.Destination.self, forKey: .destination) - destination = destinationDecoded - if containerValues.contains(.replyToAddresses) { - struct KeyVal0{struct member{}} - let replyToAddressesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .replyToAddresses) - if let replyToAddressesWrappedContainer = replyToAddressesWrappedContainer { - let replyToAddressesContainer = try replyToAddressesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var replyToAddressesBuffer:[Swift.String]? = nil - if let replyToAddressesContainer = replyToAddressesContainer { - replyToAddressesBuffer = [Swift.String]() - for stringContainer0 in replyToAddressesContainer { - replyToAddressesBuffer?.append(stringContainer0) - } - } - replyToAddresses = replyToAddressesBuffer - } else { - replyToAddresses = [] - } - } else { - replyToAddresses = nil - } - let returnPathDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .returnPath) - returnPath = returnPathDecoded - let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) - sourceArn = sourceArnDecoded - let returnPathArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .returnPathArn) - returnPathArn = returnPathArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([SESClientTypes.MessageTag].self, forKey: .member) - var tagsBuffer:[SESClientTypes.MessageTag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [SESClientTypes.MessageTag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let templateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .template) - template = templateDecoded - let templateArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateArn) - templateArn = templateArnDecoded - let templateDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateData) - templateData = templateDataDecoded - } -} - -extension SendTemplatedEmailOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SendTemplatedEmailOutputBody = try responseDecoder.decode(responseBody: data) - self.messageId = output.messageId - } else { - self.messageId = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SendTemplatedEmailResult"] + var value = SendTemplatedEmailOutput() + value.messageId = try reader["MessageId"].readIfPresent() + return value } } } @@ -10831,39 +8573,33 @@ public struct SendTemplatedEmailOutput: Swift.Equatable { } } -struct SendTemplatedEmailOutputBody: Swift.Equatable { - let messageId: Swift.String? -} - -extension SendTemplatedEmailOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case messageId = "MessageId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SendTemplatedEmailResult")) - let messageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageId) - messageId = messageIdDecoded - } -} - -enum SendTemplatedEmailOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AccountSendingPausedException": return try await AccountSendingPausedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConfigurationSetSendingPausedException": return try await ConfigurationSetSendingPausedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MailFromDomainNotVerifiedException": return try await MailFromDomainNotVerifiedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MessageRejected": return try await MessageRejected(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TemplateDoesNotExist": return try await TemplateDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SendTemplatedEmailOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AccountSendingPausedException": return try await AccountSendingPausedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConfigurationSetSendingPausedException": return try await ConfigurationSetSendingPausedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MailFromDomainNotVerifiedException": return try await MailFromDomainNotVerifiedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MessageRejected": return try await MessageRejected.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TemplateDoesNotExist": return try await TemplateDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetActiveReceiptRuleSetInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let ruleSetName = ruleSetName { @@ -10894,24 +8630,12 @@ public struct SetActiveReceiptRuleSetInput: Swift.Equatable { } } -struct SetActiveReceiptRuleSetInputBody: Swift.Equatable { - let ruleSetName: Swift.String? -} - -extension SetActiveReceiptRuleSetInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case ruleSetName = "RuleSetName" - } +extension SetActiveReceiptRuleSetOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - } -} - -extension SetActiveReceiptRuleSetOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetActiveReceiptRuleSetOutput() + } } } @@ -10921,17 +8645,29 @@ public struct SetActiveReceiptRuleSetOutput: Swift.Equatable { public init() { } } -enum SetActiveReceiptRuleSetOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetActiveReceiptRuleSetOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetIdentityDkimEnabledInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dkimEnabled = "DkimEnabled" + case identity = "Identity" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dkimEnabled = dkimEnabled { @@ -10971,28 +8707,12 @@ public struct SetIdentityDkimEnabledInput: Swift.Equatable { } } -struct SetIdentityDkimEnabledInputBody: Swift.Equatable { - let identity: Swift.String? - let dkimEnabled: Swift.Bool? -} - -extension SetIdentityDkimEnabledInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dkimEnabled = "DkimEnabled" - case identity = "Identity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - let dkimEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .dkimEnabled) ?? false - dkimEnabled = dkimEnabledDecoded - } -} +extension SetIdentityDkimEnabledOutput { -extension SetIdentityDkimEnabledOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetIdentityDkimEnabledOutput() + } } } @@ -11002,16 +8722,28 @@ public struct SetIdentityDkimEnabledOutput: Swift.Equatable { public init() { } } -enum SetIdentityDkimEnabledOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetIdentityDkimEnabledOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetIdentityFeedbackForwardingEnabledInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case forwardingEnabled = "ForwardingEnabled" + case identity = "Identity" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let forwardingEnabled = forwardingEnabled { @@ -11051,28 +8783,12 @@ public struct SetIdentityFeedbackForwardingEnabledInput: Swift.Equatable { } } -struct SetIdentityFeedbackForwardingEnabledInputBody: Swift.Equatable { - let identity: Swift.String? - let forwardingEnabled: Swift.Bool? -} - -extension SetIdentityFeedbackForwardingEnabledInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case forwardingEnabled = "ForwardingEnabled" - case identity = "Identity" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - let forwardingEnabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .forwardingEnabled) ?? false - forwardingEnabled = forwardingEnabledDecoded - } -} +extension SetIdentityFeedbackForwardingEnabledOutput { -extension SetIdentityFeedbackForwardingEnabledOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetIdentityFeedbackForwardingEnabledOutput() + } } } @@ -11082,16 +8798,29 @@ public struct SetIdentityFeedbackForwardingEnabledOutput: Swift.Equatable { public init() { } } -enum SetIdentityFeedbackForwardingEnabledOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetIdentityFeedbackForwardingEnabledOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetIdentityHeadersInNotificationsEnabledInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case enabled = "Enabled" + case identity = "Identity" + case notificationType = "NotificationType" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -11139,32 +8868,12 @@ public struct SetIdentityHeadersInNotificationsEnabledInput: Swift.Equatable { } } -struct SetIdentityHeadersInNotificationsEnabledInputBody: Swift.Equatable { - let identity: Swift.String? - let notificationType: SESClientTypes.NotificationType? - let enabled: Swift.Bool? -} - -extension SetIdentityHeadersInNotificationsEnabledInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - case identity = "Identity" - case notificationType = "NotificationType" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - let notificationTypeDecoded = try containerValues.decodeIfPresent(SESClientTypes.NotificationType.self, forKey: .notificationType) - notificationType = notificationTypeDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - } -} +extension SetIdentityHeadersInNotificationsEnabledOutput { -extension SetIdentityHeadersInNotificationsEnabledOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetIdentityHeadersInNotificationsEnabledOutput() + } } } @@ -11174,16 +8883,29 @@ public struct SetIdentityHeadersInNotificationsEnabledOutput: Swift.Equatable { public init() { } } -enum SetIdentityHeadersInNotificationsEnabledOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetIdentityHeadersInNotificationsEnabledOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetIdentityMailFromDomainInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case behaviorOnMXFailure = "BehaviorOnMXFailure" + case identity = "Identity" + case mailFromDomain = "MailFromDomain" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let behaviorOnMXFailure = behaviorOnMXFailure { @@ -11229,32 +8951,12 @@ public struct SetIdentityMailFromDomainInput: Swift.Equatable { } } -struct SetIdentityMailFromDomainInputBody: Swift.Equatable { - let identity: Swift.String? - let mailFromDomain: Swift.String? - let behaviorOnMXFailure: SESClientTypes.BehaviorOnMXFailure? -} - -extension SetIdentityMailFromDomainInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case behaviorOnMXFailure = "BehaviorOnMXFailure" - case identity = "Identity" - case mailFromDomain = "MailFromDomain" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - let mailFromDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .mailFromDomain) - mailFromDomain = mailFromDomainDecoded - let behaviorOnMXFailureDecoded = try containerValues.decodeIfPresent(SESClientTypes.BehaviorOnMXFailure.self, forKey: .behaviorOnMXFailure) - behaviorOnMXFailure = behaviorOnMXFailureDecoded - } -} +extension SetIdentityMailFromDomainOutput { -extension SetIdentityMailFromDomainOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetIdentityMailFromDomainOutput() + } } } @@ -11264,16 +8966,29 @@ public struct SetIdentityMailFromDomainOutput: Swift.Equatable { public init() { } } -enum SetIdentityMailFromDomainOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetIdentityMailFromDomainOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetIdentityNotificationTopicInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case identity = "Identity" + case notificationType = "NotificationType" + case snsTopic = "SnsTopic" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let identity = identity { @@ -11320,32 +9035,12 @@ public struct SetIdentityNotificationTopicInput: Swift.Equatable { } } -struct SetIdentityNotificationTopicInputBody: Swift.Equatable { - let identity: Swift.String? - let notificationType: SESClientTypes.NotificationType? - let snsTopic: Swift.String? -} - -extension SetIdentityNotificationTopicInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case identity = "Identity" - case notificationType = "NotificationType" - case snsTopic = "SnsTopic" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let identityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .identity) - identity = identityDecoded - let notificationTypeDecoded = try containerValues.decodeIfPresent(SESClientTypes.NotificationType.self, forKey: .notificationType) - notificationType = notificationTypeDecoded - let snsTopicDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .snsTopic) - snsTopic = snsTopicDecoded - } -} +extension SetIdentityNotificationTopicOutput { -extension SetIdentityNotificationTopicOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetIdentityNotificationTopicOutput() + } } } @@ -11355,16 +9050,29 @@ public struct SetIdentityNotificationTopicOutput: Swift.Equatable { public init() { } } -enum SetIdentityNotificationTopicOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetIdentityNotificationTopicOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetReceiptRulePositionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case after = "After" + case ruleName = "RuleName" + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let after = after { @@ -11411,32 +9119,12 @@ public struct SetReceiptRulePositionInput: Swift.Equatable { } } -struct SetReceiptRulePositionInputBody: Swift.Equatable { - let ruleSetName: Swift.String? - let ruleName: Swift.String? - let after: Swift.String? -} +extension SetReceiptRulePositionOutput { -extension SetReceiptRulePositionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case after = "After" - case ruleName = "RuleName" - case ruleSetName = "RuleSetName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - let ruleNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleName) - ruleName = ruleNameDecoded - let afterDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .after) - after = afterDecoded - } -} - -extension SetReceiptRulePositionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetReceiptRulePositionOutput() + } } } @@ -11446,18 +9134,25 @@ public struct SetReceiptRulePositionOutput: Swift.Equatable { public init() { } } -enum SetReceiptRulePositionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RuleDoesNotExist": return try await RuleDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetReceiptRulePositionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RuleDoesNotExist": return try await RuleDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SESClientTypes.StopAction: Swift.Codable { +extension SESClientTypes.StopAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case scope = "Scope" case topicArn = "TopicArn" @@ -11473,12 +9168,14 @@ extension SESClientTypes.StopAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let scopeDecoded = try containerValues.decodeIfPresent(SESClientTypes.StopScope.self, forKey: .scope) - scope = scopeDecoded - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.StopAction() + value.scope = try reader["Scope"].readIfPresent() + value.topicArn = try reader["TopicArn"].readIfPresent() + return value + } } } @@ -11532,7 +9229,7 @@ extension SESClientTypes { } } -extension SESClientTypes.Template: Swift.Codable { +extension SESClientTypes.Template: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case htmlPart = "HtmlPart" case subjectPart = "SubjectPart" @@ -11556,16 +9253,16 @@ extension SESClientTypes.Template: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let subjectPartDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subjectPart) - subjectPart = subjectPartDecoded - let textPartDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .textPart) - textPart = textPartDecoded - let htmlPartDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .htmlPart) - htmlPart = htmlPartDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.Template() + value.templateName = try reader["TemplateName"].readIfPresent() + value.subjectPart = try reader["SubjectPart"].readIfPresent() + value.textPart = try reader["TextPart"].readIfPresent() + value.htmlPart = try reader["HtmlPart"].readIfPresent() + return value + } } } @@ -11599,18 +9296,15 @@ extension SESClientTypes { } extension TemplateDoesNotExistException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.templateName = output.error.templateName - } else { - self.properties.templateName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TemplateDoesNotExistException() + value.properties.templateName = try reader["TemplateName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11632,36 +9326,16 @@ public struct TemplateDoesNotExistException: ClientRuntime.ModeledError, AWSClie public internal(set) var requestID: Swift.String? public init( - message: Swift.String? = nil, - templateName: Swift.String? = nil - ) - { - self.properties.message = message - self.properties.templateName = templateName - } -} - -struct TemplateDoesNotExistExceptionBody: Swift.Equatable { - let templateName: Swift.String? - let message: Swift.String? -} - -extension TemplateDoesNotExistExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateName = "TemplateName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + message: Swift.String? = nil, + templateName: Swift.String? = nil + ) + { + self.properties.message = message + self.properties.templateName = templateName } } -extension SESClientTypes.TemplateMetadata: Swift.Codable { +extension SESClientTypes.TemplateMetadata: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createdTimestamp = "CreatedTimestamp" case name = "Name" @@ -11677,12 +9351,14 @@ extension SESClientTypes.TemplateMetadata: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let createdTimestampDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdTimestamp) - createdTimestamp = createdTimestampDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.TemplateMetadata() + value.name = try reader["Name"].readIfPresent() + value.createdTimestamp = try reader["CreatedTimestamp"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -11707,6 +9383,11 @@ extension SESClientTypes { } extension TestRenderTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case templateData = "TemplateData" + case templateName = "TemplateName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let templateData = templateData { @@ -11745,34 +9426,15 @@ public struct TestRenderTemplateInput: Swift.Equatable { } } -struct TestRenderTemplateInputBody: Swift.Equatable { - let templateName: Swift.String? - let templateData: Swift.String? -} - -extension TestRenderTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case templateData = "TemplateData" - case templateName = "TemplateName" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let templateDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateData) - templateData = templateDataDecoded - } -} +extension TestRenderTemplateOutput { -extension TestRenderTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: TestRenderTemplateOutputBody = try responseDecoder.decode(responseBody: data) - self.renderedTemplate = output.renderedTemplate - } else { - self.renderedTemplate = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["TestRenderTemplateResult"] + var value = TestRenderTemplateOutput() + value.renderedTemplate = try reader["RenderedTemplate"].readIfPresent() + return value } } } @@ -11789,31 +9451,21 @@ public struct TestRenderTemplateOutput: Swift.Equatable { } } -struct TestRenderTemplateOutputBody: Swift.Equatable { - let renderedTemplate: Swift.String? -} - -extension TestRenderTemplateOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case renderedTemplate = "RenderedTemplate" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("TestRenderTemplateResult")) - let renderedTemplateDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .renderedTemplate) - renderedTemplate = renderedTemplateDecoded - } -} +enum TestRenderTemplateOutputError { -enum TestRenderTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidRenderingParameter": return try await InvalidRenderingParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MissingRenderingAttribute": return try await MissingRenderingAttributeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TemplateDoesNotExist": return try await TemplateDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidRenderingParameter": return try await InvalidRenderingParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MissingRenderingAttribute": return try await MissingRenderingAttributeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TemplateDoesNotExist": return try await TemplateDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -11850,7 +9502,7 @@ extension SESClientTypes { } } -extension SESClientTypes.TrackingOptions: Swift.Codable { +extension SESClientTypes.TrackingOptions: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case customRedirectDomain = "CustomRedirectDomain" } @@ -11862,10 +9514,13 @@ extension SESClientTypes.TrackingOptions: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let customRedirectDomainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customRedirectDomain) - customRedirectDomain = customRedirectDomainDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.TrackingOptions() + value.customRedirectDomain = try reader["CustomRedirectDomain"].readIfPresent() + return value + } } } @@ -11886,18 +9541,15 @@ extension SESClientTypes { } extension TrackingOptionsAlreadyExistsException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrackingOptionsAlreadyExistsException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11929,39 +9581,16 @@ public struct TrackingOptionsAlreadyExistsException: ClientRuntime.ModeledError, } } -struct TrackingOptionsAlreadyExistsExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let message: Swift.String? -} - -extension TrackingOptionsAlreadyExistsExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TrackingOptionsDoesNotExistException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.configurationSetName = output.error.configurationSetName - self.properties.message = output.error.message - } else { - self.properties.configurationSetName = nil - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TrackingOptionsDoesNotExistException() + value.properties.configurationSetName = try reader["ConfigurationSetName"].readIfPresent() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -11993,27 +9622,11 @@ public struct TrackingOptionsDoesNotExistException: ClientRuntime.ModeledError, } } -struct TrackingOptionsDoesNotExistExceptionBody: Swift.Equatable { - let configurationSetName: Swift.String? - let message: Swift.String? -} - -extension TrackingOptionsDoesNotExistExceptionBody: Swift.Decodable { +extension UpdateAccountSendingEnabledInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case enabled = "Enabled" } -} -extension UpdateAccountSendingEnabledInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let enabled = enabled { @@ -12044,24 +9657,12 @@ public struct UpdateAccountSendingEnabledInput: Swift.Equatable { } } -struct UpdateAccountSendingEnabledInputBody: Swift.Equatable { - let enabled: Swift.Bool? -} - -extension UpdateAccountSendingEnabledInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case enabled = "Enabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - } -} +extension UpdateAccountSendingEnabledOutput { -extension UpdateAccountSendingEnabledOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateAccountSendingEnabledOutput() + } } } @@ -12070,16 +9671,28 @@ public struct UpdateAccountSendingEnabledOutput: Swift.Equatable { public init() { } } -enum UpdateAccountSendingEnabledOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateAccountSendingEnabledOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateConfigurationSetEventDestinationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case eventDestination = "EventDestination" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -12119,28 +9732,12 @@ public struct UpdateConfigurationSetEventDestinationInput: Swift.Equatable { } } -struct UpdateConfigurationSetEventDestinationInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let eventDestination: SESClientTypes.EventDestination? -} - -extension UpdateConfigurationSetEventDestinationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case eventDestination = "EventDestination" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let eventDestinationDecoded = try containerValues.decodeIfPresent(SESClientTypes.EventDestination.self, forKey: .eventDestination) - eventDestination = eventDestinationDecoded - } -} +extension UpdateConfigurationSetEventDestinationOutput { -extension UpdateConfigurationSetEventDestinationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateConfigurationSetEventDestinationOutput() + } } } @@ -12150,21 +9747,33 @@ public struct UpdateConfigurationSetEventDestinationOutput: Swift.Equatable { public init() { } } -enum UpdateConfigurationSetEventDestinationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EventDestinationDoesNotExist": return try await EventDestinationDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidCloudWatchDestination": return try await InvalidCloudWatchDestinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidFirehoseDestination": return try await InvalidFirehoseDestinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSNSDestination": return try await InvalidSNSDestinationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateConfigurationSetEventDestinationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EventDestinationDoesNotExist": return try await EventDestinationDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidCloudWatchDestination": return try await InvalidCloudWatchDestinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidFirehoseDestination": return try await InvalidFirehoseDestinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSNSDestination": return try await InvalidSNSDestinationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateConfigurationSetReputationMetricsEnabledInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case enabled = "Enabled" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -12204,28 +9813,12 @@ public struct UpdateConfigurationSetReputationMetricsEnabledInput: Swift.Equatab } } -struct UpdateConfigurationSetReputationMetricsEnabledInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let enabled: Swift.Bool? -} - -extension UpdateConfigurationSetReputationMetricsEnabledInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case enabled = "Enabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - } -} +extension UpdateConfigurationSetReputationMetricsEnabledOutput { -extension UpdateConfigurationSetReputationMetricsEnabledOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateConfigurationSetReputationMetricsEnabledOutput() + } } } @@ -12234,17 +9827,29 @@ public struct UpdateConfigurationSetReputationMetricsEnabledOutput: Swift.Equata public init() { } } -enum UpdateConfigurationSetReputationMetricsEnabledOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateConfigurationSetReputationMetricsEnabledOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateConfigurationSetSendingEnabledInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case enabled = "Enabled" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -12284,28 +9889,12 @@ public struct UpdateConfigurationSetSendingEnabledInput: Swift.Equatable { } } -struct UpdateConfigurationSetSendingEnabledInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let enabled: Swift.Bool? -} - -extension UpdateConfigurationSetSendingEnabledInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case enabled = "Enabled" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let enabledDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .enabled) ?? false - enabled = enabledDecoded - } -} +extension UpdateConfigurationSetSendingEnabledOutput { -extension UpdateConfigurationSetSendingEnabledOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateConfigurationSetSendingEnabledOutput() + } } } @@ -12314,17 +9903,29 @@ public struct UpdateConfigurationSetSendingEnabledOutput: Swift.Equatable { public init() { } } -enum UpdateConfigurationSetSendingEnabledOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateConfigurationSetSendingEnabledOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateConfigurationSetTrackingOptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case configurationSetName = "ConfigurationSetName" + case trackingOptions = "TrackingOptions" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let configurationSetName = configurationSetName { @@ -12364,28 +9965,12 @@ public struct UpdateConfigurationSetTrackingOptionsInput: Swift.Equatable { } } -struct UpdateConfigurationSetTrackingOptionsInputBody: Swift.Equatable { - let configurationSetName: Swift.String? - let trackingOptions: SESClientTypes.TrackingOptions? -} - -extension UpdateConfigurationSetTrackingOptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case configurationSetName = "ConfigurationSetName" - case trackingOptions = "TrackingOptions" - } +extension UpdateConfigurationSetTrackingOptionsOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let configurationSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .configurationSetName) - configurationSetName = configurationSetNameDecoded - let trackingOptionsDecoded = try containerValues.decodeIfPresent(SESClientTypes.TrackingOptions.self, forKey: .trackingOptions) - trackingOptions = trackingOptionsDecoded - } -} - -extension UpdateConfigurationSetTrackingOptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateConfigurationSetTrackingOptionsOutput() + } } } @@ -12395,19 +9980,35 @@ public struct UpdateConfigurationSetTrackingOptionsOutput: Swift.Equatable { public init() { } } -enum UpdateConfigurationSetTrackingOptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidTrackingOptions": return try await InvalidTrackingOptionsException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TrackingOptionsDoesNotExistException": return try await TrackingOptionsDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateConfigurationSetTrackingOptionsOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ConfigurationSetDoesNotExist": return try await ConfigurationSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidTrackingOptions": return try await InvalidTrackingOptionsException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TrackingOptionsDoesNotExistException": return try await TrackingOptionsDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateCustomVerificationEmailTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case failureRedirectionURL = "FailureRedirectionURL" + case fromEmailAddress = "FromEmailAddress" + case successRedirectionURL = "SuccessRedirectionURL" + case templateContent = "TemplateContent" + case templateName = "TemplateName" + case templateSubject = "TemplateSubject" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let failureRedirectionURL = failureRedirectionURL { @@ -12474,44 +10075,12 @@ public struct UpdateCustomVerificationEmailTemplateInput: Swift.Equatable { } } -struct UpdateCustomVerificationEmailTemplateInputBody: Swift.Equatable { - let templateName: Swift.String? - let fromEmailAddress: Swift.String? - let templateSubject: Swift.String? - let templateContent: Swift.String? - let successRedirectionURL: Swift.String? - let failureRedirectionURL: Swift.String? -} - -extension UpdateCustomVerificationEmailTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failureRedirectionURL = "FailureRedirectionURL" - case fromEmailAddress = "FromEmailAddress" - case successRedirectionURL = "SuccessRedirectionURL" - case templateContent = "TemplateContent" - case templateName = "TemplateName" - case templateSubject = "TemplateSubject" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateName) - templateName = templateNameDecoded - let fromEmailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .fromEmailAddress) - fromEmailAddress = fromEmailAddressDecoded - let templateSubjectDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateSubject) - templateSubject = templateSubjectDecoded - let templateContentDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .templateContent) - templateContent = templateContentDecoded - let successRedirectionURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .successRedirectionURL) - successRedirectionURL = successRedirectionURLDecoded - let failureRedirectionURLDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureRedirectionURL) - failureRedirectionURL = failureRedirectionURLDecoded - } -} +extension UpdateCustomVerificationEmailTemplateOutput { -extension UpdateCustomVerificationEmailTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateCustomVerificationEmailTemplateOutput() + } } } @@ -12520,19 +10089,31 @@ public struct UpdateCustomVerificationEmailTemplateOutput: Swift.Equatable { public init() { } } -enum UpdateCustomVerificationEmailTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "CustomVerificationEmailInvalidContent": return try await CustomVerificationEmailInvalidContentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "CustomVerificationEmailTemplateDoesNotExist": return try await CustomVerificationEmailTemplateDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FromEmailAddressNotVerified": return try await FromEmailAddressNotVerifiedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateCustomVerificationEmailTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "CustomVerificationEmailInvalidContent": return try await CustomVerificationEmailInvalidContentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "CustomVerificationEmailTemplateDoesNotExist": return try await CustomVerificationEmailTemplateDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "FromEmailAddressNotVerified": return try await FromEmailAddressNotVerifiedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateReceiptRuleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case rule = "Rule" + case ruleSetName = "RuleSetName" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let rule = rule { @@ -12572,28 +10153,12 @@ public struct UpdateReceiptRuleInput: Swift.Equatable { } } -struct UpdateReceiptRuleInputBody: Swift.Equatable { - let ruleSetName: Swift.String? - let rule: SESClientTypes.ReceiptRule? -} - -extension UpdateReceiptRuleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case rule = "Rule" - case ruleSetName = "RuleSetName" - } +extension UpdateReceiptRuleOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let ruleSetNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .ruleSetName) - ruleSetName = ruleSetNameDecoded - let ruleDecoded = try containerValues.decodeIfPresent(SESClientTypes.ReceiptRule.self, forKey: .rule) - rule = ruleDecoded - } -} - -extension UpdateReceiptRuleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateReceiptRuleOutput() + } } } @@ -12603,22 +10168,33 @@ public struct UpdateReceiptRuleOutput: Swift.Equatable { public init() { } } -enum UpdateReceiptRuleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidLambdaFunction": return try await InvalidLambdaFunctionException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidS3Configuration": return try await InvalidS3ConfigurationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSnsTopic": return try await InvalidSnsTopicException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "LimitExceeded": return try await LimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleDoesNotExist": return try await RuleDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateReceiptRuleOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidLambdaFunction": return try await InvalidLambdaFunctionException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidS3Configuration": return try await InvalidS3ConfigurationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSnsTopic": return try await InvalidSnsTopicException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "LimitExceeded": return try await LimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleDoesNotExist": return try await RuleDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RuleSetDoesNotExist": return try await RuleSetDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UpdateTemplateInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case template = "Template" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let template = template { @@ -12649,24 +10225,12 @@ public struct UpdateTemplateInput: Swift.Equatable { } } -struct UpdateTemplateInputBody: Swift.Equatable { - let template: SESClientTypes.Template? -} - -extension UpdateTemplateInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case template = "Template" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let templateDecoded = try containerValues.decodeIfPresent(SESClientTypes.Template.self, forKey: .template) - template = templateDecoded - } -} +extension UpdateTemplateOutput { -extension UpdateTemplateOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UpdateTemplateOutput() + } } } @@ -12675,13 +10239,20 @@ public struct UpdateTemplateOutput: Swift.Equatable { public init() { } } -enum UpdateTemplateOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidTemplate": return try await InvalidTemplateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TemplateDoesNotExist": return try await TemplateDoesNotExistException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UpdateTemplateOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidTemplate": return try await InvalidTemplateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TemplateDoesNotExist": return try await TemplateDoesNotExistException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -12728,6 +10299,10 @@ extension SESClientTypes { } extension VerifyDomainDkimInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domain = "Domain" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domain = domain { @@ -12759,30 +10334,15 @@ public struct VerifyDomainDkimInput: Swift.Equatable { } } -struct VerifyDomainDkimInputBody: Swift.Equatable { - let domain: Swift.String? -} - -extension VerifyDomainDkimInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domain = "Domain" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - } -} +extension VerifyDomainDkimOutput { -extension VerifyDomainDkimOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: VerifyDomainDkimOutputBody = try responseDecoder.decode(responseBody: data) - self.dkimTokens = output.dkimTokens - } else { - self.dkimTokens = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["VerifyDomainDkimResult"] + var value = VerifyDomainDkimOutput() + value.dkimTokens = try reader["DkimTokens"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -12801,50 +10361,27 @@ public struct VerifyDomainDkimOutput: Swift.Equatable { } } -struct VerifyDomainDkimOutputBody: Swift.Equatable { - let dkimTokens: [Swift.String]? -} - -extension VerifyDomainDkimOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dkimTokens = "DkimTokens" - } +enum VerifyDomainDkimOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("VerifyDomainDkimResult")) - if containerValues.contains(.dkimTokens) { - struct KeyVal0{struct member{}} - let dkimTokensWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .dkimTokens) - if let dkimTokensWrappedContainer = dkimTokensWrappedContainer { - let dkimTokensContainer = try dkimTokensWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var dkimTokensBuffer:[Swift.String]? = nil - if let dkimTokensContainer = dkimTokensContainer { - dkimTokensBuffer = [Swift.String]() - for stringContainer0 in dkimTokensContainer { - dkimTokensBuffer?.append(stringContainer0) - } - } - dkimTokens = dkimTokensBuffer - } else { - dkimTokens = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - dkimTokens = nil } } } -enum VerifyDomainDkimOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension VerifyDomainIdentityInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case domain = "Domain" } -} -extension VerifyDomainIdentityInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let domain = domain { @@ -12876,30 +10413,15 @@ public struct VerifyDomainIdentityInput: Swift.Equatable { } } -struct VerifyDomainIdentityInputBody: Swift.Equatable { - let domain: Swift.String? -} - -extension VerifyDomainIdentityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case domain = "Domain" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let domainDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .domain) - domain = domainDecoded - } -} +extension VerifyDomainIdentityOutput { -extension VerifyDomainIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: VerifyDomainIdentityOutputBody = try responseDecoder.decode(responseBody: data) - self.verificationToken = output.verificationToken - } else { - self.verificationToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["VerifyDomainIdentityResult"] + var value = VerifyDomainIdentityOutput() + value.verificationToken = try reader["VerificationToken"].readIfPresent() + return value } } } @@ -12918,33 +10440,27 @@ public struct VerifyDomainIdentityOutput: Swift.Equatable { } } -struct VerifyDomainIdentityOutputBody: Swift.Equatable { - let verificationToken: Swift.String? -} - -extension VerifyDomainIdentityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case verificationToken = "VerificationToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("VerifyDomainIdentityResult")) - let verificationTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .verificationToken) - verificationToken = verificationTokenDecoded - } -} +enum VerifyDomainIdentityOutputError { -enum VerifyDomainIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension VerifyEmailAddressInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case emailAddress = "EmailAddress" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let emailAddress = emailAddress { @@ -12976,24 +10492,12 @@ public struct VerifyEmailAddressInput: Swift.Equatable { } } -struct VerifyEmailAddressInputBody: Swift.Equatable { - let emailAddress: Swift.String? -} - -extension VerifyEmailAddressInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case emailAddress = "EmailAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let emailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .emailAddress) - emailAddress = emailAddressDecoded - } -} +extension VerifyEmailAddressOutput { -extension VerifyEmailAddressOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return VerifyEmailAddressOutput() + } } } @@ -13002,16 +10506,27 @@ public struct VerifyEmailAddressOutput: Swift.Equatable { public init() { } } -enum VerifyEmailAddressOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum VerifyEmailAddressOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension VerifyEmailIdentityInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case emailAddress = "EmailAddress" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let emailAddress = emailAddress { @@ -13043,24 +10558,12 @@ public struct VerifyEmailIdentityInput: Swift.Equatable { } } -struct VerifyEmailIdentityInputBody: Swift.Equatable { - let emailAddress: Swift.String? -} - -extension VerifyEmailIdentityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case emailAddress = "EmailAddress" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let emailAddressDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .emailAddress) - emailAddress = emailAddressDecoded - } -} +extension VerifyEmailIdentityOutput { -extension VerifyEmailIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return VerifyEmailIdentityOutput() + } } } @@ -13070,16 +10573,23 @@ public struct VerifyEmailIdentityOutput: Swift.Equatable { public init() { } } -enum VerifyEmailIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum VerifyEmailIdentityOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SESClientTypes.WorkmailAction: Swift.Codable { +extension SESClientTypes.WorkmailAction: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case organizationArn = "OrganizationArn" case topicArn = "TopicArn" @@ -13095,12 +10605,14 @@ extension SESClientTypes.WorkmailAction: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let organizationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .organizationArn) - organizationArn = organizationArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SESClientTypes.WorkmailAction() + value.topicArn = try reader["TopicArn"].readIfPresent() + value.organizationArn = try reader["OrganizationArn"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSSNS/SNSClient.swift b/Sources/Services/AWSSNS/SNSClient.swift index 04aa5491897..eb2a4e8f918 100644 --- a/Sources/Services/AWSSNS/SNSClient.swift +++ b/Sources/Services/AWSSNS/SNSClient.swift @@ -11,14 +11,11 @@ public class SNSClient { let config: SNSClient.SNSClientConfiguration let serviceName = "SNS" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: SNSClient.SNSClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -81,7 +78,6 @@ extension SNSClient { public func addPermission(input: AddPermissionInput) async throws -> AddPermissionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "addPermission") @@ -105,7 +101,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AddPermissionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AddPermissionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AddPermissionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -129,7 +125,6 @@ extension SNSClient { public func checkIfPhoneNumberIsOptedOut(input: CheckIfPhoneNumberIsOptedOutInput) async throws -> CheckIfPhoneNumberIsOptedOutOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "checkIfPhoneNumberIsOptedOut") @@ -153,7 +148,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CheckIfPhoneNumberIsOptedOutOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CheckIfPhoneNumberIsOptedOutOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CheckIfPhoneNumberIsOptedOutOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -180,7 +175,6 @@ extension SNSClient { public func confirmSubscription(input: ConfirmSubscriptionInput) async throws -> ConfirmSubscriptionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "confirmSubscription") @@ -204,7 +198,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ConfirmSubscriptionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ConfirmSubscriptionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ConfirmSubscriptionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -244,7 +238,6 @@ extension SNSClient { public func createPlatformApplication(input: CreatePlatformApplicationInput) async throws -> CreatePlatformApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createPlatformApplication") @@ -268,7 +261,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePlatformApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreatePlatformApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreatePlatformApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -292,7 +285,6 @@ extension SNSClient { public func createPlatformEndpoint(input: CreatePlatformEndpointInput) async throws -> CreatePlatformEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createPlatformEndpoint") @@ -316,7 +308,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreatePlatformEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreatePlatformEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreatePlatformEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -342,7 +334,6 @@ extension SNSClient { public func createSMSSandboxPhoneNumber(input: CreateSMSSandboxPhoneNumberInput) async throws -> CreateSMSSandboxPhoneNumberOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createSMSSandboxPhoneNumber") @@ -366,7 +357,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateSMSSandboxPhoneNumberOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateSMSSandboxPhoneNumberOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateSMSSandboxPhoneNumberOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -395,7 +386,6 @@ extension SNSClient { public func createTopic(input: CreateTopicInput) async throws -> CreateTopicOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "createTopic") @@ -419,7 +409,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(CreateTopicOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(CreateTopicOutput.httpBinding, responseDocumentBinding), responseErrorClosure(CreateTopicOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -442,7 +432,6 @@ extension SNSClient { public func deleteEndpoint(input: DeleteEndpointInput) async throws -> DeleteEndpointOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteEndpoint") @@ -466,7 +455,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteEndpointOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteEndpointOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteEndpointOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -489,7 +478,6 @@ extension SNSClient { public func deletePlatformApplication(input: DeletePlatformApplicationInput) async throws -> DeletePlatformApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deletePlatformApplication") @@ -513,7 +501,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeletePlatformApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeletePlatformApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeletePlatformApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -539,7 +527,6 @@ extension SNSClient { public func deleteSMSSandboxPhoneNumber(input: DeleteSMSSandboxPhoneNumberInput) async throws -> DeleteSMSSandboxPhoneNumberOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteSMSSandboxPhoneNumber") @@ -563,7 +550,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteSMSSandboxPhoneNumberOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteSMSSandboxPhoneNumberOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteSMSSandboxPhoneNumberOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -591,7 +578,6 @@ extension SNSClient { public func deleteTopic(input: DeleteTopicInput) async throws -> DeleteTopicOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "deleteTopic") @@ -615,7 +601,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DeleteTopicOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DeleteTopicOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DeleteTopicOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -640,7 +626,6 @@ extension SNSClient { public func getDataProtectionPolicy(input: GetDataProtectionPolicyInput) async throws -> GetDataProtectionPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getDataProtectionPolicy") @@ -664,7 +649,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetDataProtectionPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetDataProtectionPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetDataProtectionPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -688,7 +673,6 @@ extension SNSClient { public func getEndpointAttributes(input: GetEndpointAttributesInput) async throws -> GetEndpointAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getEndpointAttributes") @@ -712,7 +696,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetEndpointAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetEndpointAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetEndpointAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -736,7 +720,6 @@ extension SNSClient { public func getPlatformApplicationAttributes(input: GetPlatformApplicationAttributesInput) async throws -> GetPlatformApplicationAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getPlatformApplicationAttributes") @@ -760,7 +743,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetPlatformApplicationAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetPlatformApplicationAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetPlatformApplicationAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -784,7 +767,6 @@ extension SNSClient { public func getSMSAttributes(input: GetSMSAttributesInput) async throws -> GetSMSAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSMSAttributes") @@ -808,7 +790,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSMSAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSMSAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSMSAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -831,7 +813,6 @@ extension SNSClient { public func getSMSSandboxAccountStatus(input: GetSMSSandboxAccountStatusInput) async throws -> GetSMSSandboxAccountStatusOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSMSSandboxAccountStatus") @@ -855,7 +836,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSMSSandboxAccountStatusOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSMSSandboxAccountStatusOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSMSSandboxAccountStatusOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -879,7 +860,6 @@ extension SNSClient { public func getSubscriptionAttributes(input: GetSubscriptionAttributesInput) async throws -> GetSubscriptionAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSubscriptionAttributes") @@ -903,7 +883,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSubscriptionAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSubscriptionAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSubscriptionAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -928,7 +908,6 @@ extension SNSClient { public func getTopicAttributes(input: GetTopicAttributesInput) async throws -> GetTopicAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getTopicAttributes") @@ -952,7 +931,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetTopicAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetTopicAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetTopicAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -976,7 +955,6 @@ extension SNSClient { public func listEndpointsByPlatformApplication(input: ListEndpointsByPlatformApplicationInput) async throws -> ListEndpointsByPlatformApplicationOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listEndpointsByPlatformApplication") @@ -1000,7 +978,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListEndpointsByPlatformApplicationOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListEndpointsByPlatformApplicationOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListEndpointsByPlatformApplicationOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1025,7 +1003,6 @@ extension SNSClient { public func listOriginationNumbers(input: ListOriginationNumbersInput) async throws -> ListOriginationNumbersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listOriginationNumbers") @@ -1049,7 +1026,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListOriginationNumbersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListOriginationNumbersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListOriginationNumbersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1073,7 +1050,6 @@ extension SNSClient { public func listPhoneNumbersOptedOut(input: ListPhoneNumbersOptedOutInput) async throws -> ListPhoneNumbersOptedOutOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listPhoneNumbersOptedOut") @@ -1097,7 +1073,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPhoneNumbersOptedOutOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPhoneNumbersOptedOutOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPhoneNumbersOptedOutOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1120,7 +1096,6 @@ extension SNSClient { public func listPlatformApplications(input: ListPlatformApplicationsInput) async throws -> ListPlatformApplicationsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listPlatformApplications") @@ -1144,7 +1119,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListPlatformApplicationsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListPlatformApplicationsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListPlatformApplicationsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1169,7 +1144,6 @@ extension SNSClient { public func listSMSSandboxPhoneNumbers(input: ListSMSSandboxPhoneNumbersInput) async throws -> ListSMSSandboxPhoneNumbersOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listSMSSandboxPhoneNumbers") @@ -1193,7 +1167,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListSMSSandboxPhoneNumbersOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListSMSSandboxPhoneNumbersOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListSMSSandboxPhoneNumbersOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1216,7 +1190,6 @@ extension SNSClient { public func listSubscriptions(input: ListSubscriptionsInput) async throws -> ListSubscriptionsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listSubscriptions") @@ -1240,7 +1213,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListSubscriptionsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListSubscriptionsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListSubscriptionsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1264,7 +1237,6 @@ extension SNSClient { public func listSubscriptionsByTopic(input: ListSubscriptionsByTopicInput) async throws -> ListSubscriptionsByTopicOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listSubscriptionsByTopic") @@ -1288,7 +1260,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListSubscriptionsByTopicOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListSubscriptionsByTopicOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListSubscriptionsByTopicOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1313,7 +1285,6 @@ extension SNSClient { public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTagsForResource") @@ -1337,7 +1308,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTagsForResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTagsForResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTagsForResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1360,7 +1331,6 @@ extension SNSClient { public func listTopics(input: ListTopicsInput) async throws -> ListTopicsOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "listTopics") @@ -1384,7 +1354,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(ListTopicsOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(ListTopicsOutput.httpBinding, responseDocumentBinding), responseErrorClosure(ListTopicsOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1408,7 +1378,6 @@ extension SNSClient { public func optInPhoneNumber(input: OptInPhoneNumberInput) async throws -> OptInPhoneNumberOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "optInPhoneNumber") @@ -1432,7 +1401,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(OptInPhoneNumberOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(OptInPhoneNumberOutput.httpBinding, responseDocumentBinding), responseErrorClosure(OptInPhoneNumberOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1467,7 +1436,6 @@ extension SNSClient { public func publish(input: PublishInput) async throws -> PublishOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "publish") @@ -1491,7 +1459,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PublishOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PublishOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PublishOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1531,7 +1499,6 @@ extension SNSClient { public func publishBatch(input: PublishBatchInput) async throws -> PublishBatchOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "publishBatch") @@ -1555,7 +1522,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PublishBatchOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PublishBatchOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PublishBatchOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1580,7 +1547,6 @@ extension SNSClient { public func putDataProtectionPolicy(input: PutDataProtectionPolicyInput) async throws -> PutDataProtectionPolicyOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "putDataProtectionPolicy") @@ -1604,7 +1570,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(PutDataProtectionPolicyOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(PutDataProtectionPolicyOutput.httpBinding, responseDocumentBinding), responseErrorClosure(PutDataProtectionPolicyOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1628,7 +1594,6 @@ extension SNSClient { public func removePermission(input: RemovePermissionInput) async throws -> RemovePermissionOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "removePermission") @@ -1652,7 +1617,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(RemovePermissionOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(RemovePermissionOutput.httpBinding, responseDocumentBinding), responseErrorClosure(RemovePermissionOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1676,7 +1641,6 @@ extension SNSClient { public func setEndpointAttributes(input: SetEndpointAttributesInput) async throws -> SetEndpointAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setEndpointAttributes") @@ -1700,7 +1664,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetEndpointAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetEndpointAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetEndpointAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1724,7 +1688,6 @@ extension SNSClient { public func setPlatformApplicationAttributes(input: SetPlatformApplicationAttributesInput) async throws -> SetPlatformApplicationAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setPlatformApplicationAttributes") @@ -1748,7 +1711,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetPlatformApplicationAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetPlatformApplicationAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetPlatformApplicationAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1772,7 +1735,6 @@ extension SNSClient { public func setSMSAttributes(input: SetSMSAttributesInput) async throws -> SetSMSAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setSMSAttributes") @@ -1796,7 +1758,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetSMSAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetSMSAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetSMSAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1822,7 +1784,6 @@ extension SNSClient { public func setSubscriptionAttributes(input: SetSubscriptionAttributesInput) async throws -> SetSubscriptionAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setSubscriptionAttributes") @@ -1846,7 +1807,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetSubscriptionAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetSubscriptionAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetSubscriptionAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1871,7 +1832,6 @@ extension SNSClient { public func setTopicAttributes(input: SetTopicAttributesInput) async throws -> SetTopicAttributesOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "setTopicAttributes") @@ -1895,7 +1855,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SetTopicAttributesOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SetTopicAttributesOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SetTopicAttributesOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1923,7 +1883,6 @@ extension SNSClient { public func subscribe(input: SubscribeInput) async throws -> SubscribeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "subscribe") @@ -1947,7 +1906,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(SubscribeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(SubscribeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(SubscribeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -1984,7 +1943,6 @@ extension SNSClient { public func tagResource(input: TagResourceInput) async throws -> TagResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "tagResource") @@ -2008,7 +1966,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(TagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(TagResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(TagResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2033,7 +1991,6 @@ extension SNSClient { public func unsubscribe(input: UnsubscribeInput) async throws -> UnsubscribeOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "unsubscribe") @@ -2057,7 +2014,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UnsubscribeOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UnsubscribeOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UnsubscribeOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2084,7 +2041,6 @@ extension SNSClient { public func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "untagResource") @@ -2108,7 +2064,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(UntagResourceOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(UntagResourceOutput.httpBinding, responseDocumentBinding), responseErrorClosure(UntagResourceOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -2134,7 +2090,6 @@ extension SNSClient { public func verifySMSSandboxPhoneNumber(input: VerifySMSSandboxPhoneNumberInput) async throws -> VerifySMSSandboxPhoneNumberOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "verifySMSSandboxPhoneNumber") @@ -2158,7 +2113,7 @@ extension SNSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(VerifySMSSandboxPhoneNumberOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(VerifySMSSandboxPhoneNumberOutput.httpBinding, responseDocumentBinding), responseErrorClosure(VerifySMSSandboxPhoneNumberOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSSNS/models/Models.swift b/Sources/Services/AWSSNS/models/Models.swift index 46d9947df67..ac3a892bb1f 100644 --- a/Sources/Services/AWSSNS/models/Models.swift +++ b/Sources/Services/AWSSNS/models/Models.swift @@ -1,8 +1,17 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML extension AddPermissionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case awsAccountId = "AWSAccountId" + case actionName = "ActionName" + case label = "Label" + case topicArn = "TopicArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let awsAccountId = awsAccountId { @@ -75,102 +84,49 @@ public struct AddPermissionInput: Swift.Equatable { } } -struct AddPermissionInputBody: Swift.Equatable { - let topicArn: Swift.String? - let label: Swift.String? - let awsAccountId: [Swift.String]? - let actionName: [Swift.String]? -} - -extension AddPermissionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case awsAccountId = "AWSAccountId" - case actionName = "ActionName" - case label = "Label" - case topicArn = "TopicArn" - } +extension AddPermissionOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) - label = labelDecoded - if containerValues.contains(.awsAccountId) { - struct KeyVal0{struct member{}} - let awsAccountIdWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .awsAccountId) - if let awsAccountIdWrappedContainer = awsAccountIdWrappedContainer { - let awsAccountIdContainer = try awsAccountIdWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var awsAccountIdBuffer:[Swift.String]? = nil - if let awsAccountIdContainer = awsAccountIdContainer { - awsAccountIdBuffer = [Swift.String]() - for stringContainer0 in awsAccountIdContainer { - awsAccountIdBuffer?.append(stringContainer0) - } - } - awsAccountId = awsAccountIdBuffer - } else { - awsAccountId = [] - } - } else { - awsAccountId = nil - } - if containerValues.contains(.actionName) { - struct KeyVal0{struct member{}} - let actionNameWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .actionName) - if let actionNameWrappedContainer = actionNameWrappedContainer { - let actionNameContainer = try actionNameWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var actionNameBuffer:[Swift.String]? = nil - if let actionNameContainer = actionNameContainer { - actionNameBuffer = [Swift.String]() - for stringContainer0 in actionNameContainer { - actionNameBuffer?.append(stringContainer0) - } - } - actionName = actionNameBuffer - } else { - actionName = [] - } - } else { - actionName = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return AddPermissionOutput() } } } -extension AddPermissionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct AddPermissionOutput: Swift.Equatable { public init() { } } -enum AddPermissionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AddPermissionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension AuthorizationErrorException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = AuthorizationErrorException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -198,33 +154,15 @@ public struct AuthorizationErrorException: ClientRuntime.ModeledError, AWSClient } } -struct AuthorizationErrorExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension AuthorizationErrorExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension BatchEntryIdsNotDistinctException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BatchEntryIdsNotDistinctException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -252,33 +190,15 @@ public struct BatchEntryIdsNotDistinctException: ClientRuntime.ModeledError, AWS } } -struct BatchEntryIdsNotDistinctExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension BatchEntryIdsNotDistinctExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension BatchRequestTooLongException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = BatchRequestTooLongException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -306,23 +226,7 @@ public struct BatchRequestTooLongException: ClientRuntime.ModeledError, AWSClien } } -struct BatchRequestTooLongExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension BatchRequestTooLongExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SNSClientTypes.BatchResultErrorEntry: Swift.Codable { +extension SNSClientTypes.BatchResultErrorEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case code = "Code" case id = "Id" @@ -346,16 +250,16 @@ extension SNSClientTypes.BatchResultErrorEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let codeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .code) - code = codeDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let senderFaultDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .senderFault) ?? false - senderFault = senderFaultDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.BatchResultErrorEntry() + value.id = try reader["Id"].readIfPresent() + value.code = try reader["Code"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.senderFault = try reader["SenderFault"].readIfPresent() ?? false + return value + } } } @@ -391,6 +295,10 @@ extension SNSClientTypes { } extension CheckIfPhoneNumberIsOptedOutInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case phoneNumber + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let phoneNumber = phoneNumber { @@ -422,30 +330,15 @@ public struct CheckIfPhoneNumberIsOptedOutInput: Swift.Equatable { } } -struct CheckIfPhoneNumberIsOptedOutInputBody: Swift.Equatable { - let phoneNumber: Swift.String? -} - -extension CheckIfPhoneNumberIsOptedOutInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case phoneNumber - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let phoneNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .phoneNumber) - phoneNumber = phoneNumberDecoded - } -} +extension CheckIfPhoneNumberIsOptedOutOutput { -extension CheckIfPhoneNumberIsOptedOutOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CheckIfPhoneNumberIsOptedOutOutputBody = try responseDecoder.decode(responseBody: data) - self.isOptedOut = output.isOptedOut - } else { - self.isOptedOut = false + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CheckIfPhoneNumberIsOptedOutResult"] + var value = CheckIfPhoneNumberIsOptedOutOutput() + value.isOptedOut = try reader["isOptedOut"].readIfPresent() ?? false + return value } } } @@ -467,47 +360,35 @@ public struct CheckIfPhoneNumberIsOptedOutOutput: Swift.Equatable { } } -struct CheckIfPhoneNumberIsOptedOutOutputBody: Swift.Equatable { - let isOptedOut: Swift.Bool -} - -extension CheckIfPhoneNumberIsOptedOutOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isOptedOut - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CheckIfPhoneNumberIsOptedOutResult")) - let isOptedOutDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isOptedOut) ?? false - isOptedOut = isOptedOutDecoded - } -} +enum CheckIfPhoneNumberIsOptedOutOutputError { -enum CheckIfPhoneNumberIsOptedOutOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ConcurrentAccessException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ConcurrentAccessException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -535,23 +416,13 @@ public struct ConcurrentAccessException: ClientRuntime.ModeledError, AWSClientRu } } -struct ConcurrentAccessExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ConcurrentAccessExceptionBody: Swift.Decodable { +extension ConfirmSubscriptionInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case authenticateOnUnsubscribe = "AuthenticateOnUnsubscribe" + case token = "Token" + case topicArn = "TopicArn" } -} -extension ConfirmSubscriptionInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let authenticateOnUnsubscribe = authenticateOnUnsubscribe { @@ -598,38 +469,15 @@ public struct ConfirmSubscriptionInput: Swift.Equatable { } } -struct ConfirmSubscriptionInputBody: Swift.Equatable { - let topicArn: Swift.String? - let token: Swift.String? - let authenticateOnUnsubscribe: Swift.String? -} - -extension ConfirmSubscriptionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case authenticateOnUnsubscribe = "AuthenticateOnUnsubscribe" - case token = "Token" - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let tokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .token) - token = tokenDecoded - let authenticateOnUnsubscribeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .authenticateOnUnsubscribe) - authenticateOnUnsubscribe = authenticateOnUnsubscribeDecoded - } -} +extension ConfirmSubscriptionOutput { -extension ConfirmSubscriptionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ConfirmSubscriptionOutputBody = try responseDecoder.decode(responseBody: data) - self.subscriptionArn = output.subscriptionArn - } else { - self.subscriptionArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ConfirmSubscriptionResult"] + var value = ConfirmSubscriptionOutput() + value.subscriptionArn = try reader["SubscriptionArn"].readIfPresent() + return value } } } @@ -647,40 +495,36 @@ public struct ConfirmSubscriptionOutput: Swift.Equatable { } } -struct ConfirmSubscriptionOutputBody: Swift.Equatable { - let subscriptionArn: Swift.String? -} - -extension ConfirmSubscriptionOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subscriptionArn = "SubscriptionArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ConfirmSubscriptionResult")) - let subscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionArn) - subscriptionArn = subscriptionArnDecoded - } -} - -enum ConfirmSubscriptionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FilterPolicyLimitExceeded": return try await FilterPolicyLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplayLimitExceeded": return try await ReplayLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionLimitExceeded": return try await SubscriptionLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum ConfirmSubscriptionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "FilterPolicyLimitExceeded": return try await FilterPolicyLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplayLimitExceeded": return try await ReplayLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionLimitExceeded": return try await SubscriptionLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreatePlatformApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case name = "Name" + case platform = "Platform" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -737,55 +581,15 @@ public struct CreatePlatformApplicationInput: Swift.Equatable { } } -struct CreatePlatformApplicationInputBody: Swift.Equatable { - let name: Swift.String? - let platform: Swift.String? - let attributes: [Swift.String:Swift.String]? -} - -extension CreatePlatformApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - case name = "Name" - case platform = "Platform" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let platformDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platform) - platform = platformDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil - } - } -} +extension CreatePlatformApplicationOutput { -extension CreatePlatformApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreatePlatformApplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.platformApplicationArn = output.platformApplicationArn - } else { - self.platformApplicationArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreatePlatformApplicationResult"] + var value = CreatePlatformApplicationOutput() + value.platformApplicationArn = try reader["PlatformApplicationArn"].readIfPresent() + return value } } } @@ -803,36 +607,33 @@ public struct CreatePlatformApplicationOutput: Swift.Equatable { } } -struct CreatePlatformApplicationOutputBody: Swift.Equatable { - let platformApplicationArn: Swift.String? -} - -extension CreatePlatformApplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case platformApplicationArn = "PlatformApplicationArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreatePlatformApplicationResult")) - let platformApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformApplicationArn) - platformApplicationArn = platformApplicationArnDecoded - } -} +enum CreatePlatformApplicationOutputError { -enum CreatePlatformApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreatePlatformEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case customUserData = "CustomUserData" + case platformApplicationArn = "PlatformApplicationArn" + case token = "Token" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -895,59 +696,15 @@ public struct CreatePlatformEndpointInput: Swift.Equatable { } } -struct CreatePlatformEndpointInputBody: Swift.Equatable { - let platformApplicationArn: Swift.String? - let token: Swift.String? - let customUserData: Swift.String? - let attributes: [Swift.String:Swift.String]? -} - -extension CreatePlatformEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - case customUserData = "CustomUserData" - case platformApplicationArn = "PlatformApplicationArn" - case token = "Token" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformApplicationArn) - platformApplicationArn = platformApplicationArnDecoded - let tokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .token) - token = tokenDecoded - let customUserDataDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .customUserData) - customUserData = customUserDataDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil - } - } -} +extension CreatePlatformEndpointOutput { -extension CreatePlatformEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreatePlatformEndpointOutputBody = try responseDecoder.decode(responseBody: data) - self.endpointArn = output.endpointArn - } else { - self.endpointArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreatePlatformEndpointResult"] + var value = CreatePlatformEndpointOutput() + value.endpointArn = try reader["EndpointArn"].readIfPresent() + return value } } } @@ -965,37 +722,32 @@ public struct CreatePlatformEndpointOutput: Swift.Equatable { } } -struct CreatePlatformEndpointOutputBody: Swift.Equatable { - let endpointArn: Swift.String? -} - -extension CreatePlatformEndpointOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpointArn = "EndpointArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreatePlatformEndpointResult")) - let endpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointArn) - endpointArn = endpointArnDecoded - } -} +enum CreatePlatformEndpointOutputError { -enum CreatePlatformEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateSMSSandboxPhoneNumberInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case languageCode = "LanguageCode" + case phoneNumber = "PhoneNumber" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let languageCode = languageCode { @@ -1033,28 +785,12 @@ public struct CreateSMSSandboxPhoneNumberInput: Swift.Equatable { } } -struct CreateSMSSandboxPhoneNumberInputBody: Swift.Equatable { - let phoneNumber: Swift.String? - let languageCode: SNSClientTypes.LanguageCodeString? -} - -extension CreateSMSSandboxPhoneNumberInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case languageCode = "LanguageCode" - case phoneNumber = "PhoneNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let phoneNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .phoneNumber) - phoneNumber = phoneNumberDecoded - let languageCodeDecoded = try containerValues.decodeIfPresent(SNSClientTypes.LanguageCodeString.self, forKey: .languageCode) - languageCode = languageCodeDecoded - } -} +extension CreateSMSSandboxPhoneNumberOutput { -extension CreateSMSSandboxPhoneNumberOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return CreateSMSSandboxPhoneNumberOutput() + } } } @@ -1063,22 +799,36 @@ public struct CreateSMSSandboxPhoneNumberOutput: Swift.Equatable { public init() { } } -enum CreateSMSSandboxPhoneNumberOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "OptedOut": return try await OptedOutException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserError": return try await UserErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateSMSSandboxPhoneNumberOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "OptedOut": return try await OptedOutException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserError": return try await UserErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension CreateTopicInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case dataProtectionPolicy = "DataProtectionPolicy" + case name = "Name" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -1179,76 +929,15 @@ public struct CreateTopicInput: Swift.Equatable { } } -struct CreateTopicInputBody: Swift.Equatable { - let name: Swift.String? - let attributes: [Swift.String:Swift.String]? - let tags: [SNSClientTypes.Tag]? - let dataProtectionPolicy: Swift.String? -} - -extension CreateTopicInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - case dataProtectionPolicy = "DataProtectionPolicy" - case name = "Name" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil - } - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([SNSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[SNSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [SNSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - let dataProtectionPolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataProtectionPolicy) - dataProtectionPolicy = dataProtectionPolicyDecoded - } -} +extension CreateTopicOutput { -extension CreateTopicOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: CreateTopicOutputBody = try responseDecoder.decode(responseBody: data) - self.topicArn = output.topicArn - } else { - self.topicArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["CreateTopicResult"] + var value = CreateTopicOutput() + value.topicArn = try reader["TopicArn"].readIfPresent() + return value } } } @@ -1266,42 +955,36 @@ public struct CreateTopicOutput: Swift.Equatable { } } -struct CreateTopicOutputBody: Swift.Equatable { - let topicArn: Swift.String? -} - -extension CreateTopicOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateTopicResult")) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - } -} - -enum CreateTopicOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConcurrentAccess": return try await ConcurrentAccessException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleTag": return try await StaleTagException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceeded": return try await TagLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagPolicy": return try await TagPolicyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TopicLimitExceeded": return try await TopicLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum CreateTopicOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConcurrentAccess": return try await ConcurrentAccessException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleTag": return try await StaleTagException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceeded": return try await TagLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagPolicy": return try await TagPolicyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TopicLimitExceeded": return try await TopicLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteEndpointInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case endpointArn = "EndpointArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let endpointArn = endpointArn { @@ -1333,24 +1016,12 @@ public struct DeleteEndpointInput: Swift.Equatable { } } -struct DeleteEndpointInputBody: Swift.Equatable { - let endpointArn: Swift.String? -} - -extension DeleteEndpointInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpointArn = "EndpointArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let endpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointArn) - endpointArn = endpointArnDecoded - } -} +extension DeleteEndpointOutput { -extension DeleteEndpointOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteEndpointOutput() + } } } @@ -1359,19 +1030,30 @@ public struct DeleteEndpointOutput: Swift.Equatable { public init() { } } -enum DeleteEndpointOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteEndpointOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeletePlatformApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case platformApplicationArn = "PlatformApplicationArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let platformApplicationArn = platformApplicationArn { @@ -1403,24 +1085,12 @@ public struct DeletePlatformApplicationInput: Swift.Equatable { } } -struct DeletePlatformApplicationInputBody: Swift.Equatable { - let platformApplicationArn: Swift.String? -} - -extension DeletePlatformApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case platformApplicationArn = "PlatformApplicationArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformApplicationArn) - platformApplicationArn = platformApplicationArnDecoded - } -} +extension DeletePlatformApplicationOutput { -extension DeletePlatformApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeletePlatformApplicationOutput() + } } } @@ -1429,19 +1099,30 @@ public struct DeletePlatformApplicationOutput: Swift.Equatable { public init() { } } -enum DeletePlatformApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeletePlatformApplicationOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteSMSSandboxPhoneNumberInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case phoneNumber = "PhoneNumber" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let phoneNumber = phoneNumber { @@ -1472,24 +1153,12 @@ public struct DeleteSMSSandboxPhoneNumberInput: Swift.Equatable { } } -struct DeleteSMSSandboxPhoneNumberInputBody: Swift.Equatable { - let phoneNumber: Swift.String? -} - -extension DeleteSMSSandboxPhoneNumberInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case phoneNumber = "PhoneNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let phoneNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .phoneNumber) - phoneNumber = phoneNumberDecoded - } -} +extension DeleteSMSSandboxPhoneNumberOutput { -extension DeleteSMSSandboxPhoneNumberOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteSMSSandboxPhoneNumberOutput() + } } } @@ -1498,23 +1167,34 @@ public struct DeleteSMSSandboxPhoneNumberOutput: Swift.Equatable { public init() { } } -enum DeleteSMSSandboxPhoneNumberOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "UserError": return try await UserErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteSMSSandboxPhoneNumberOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "UserError": return try await UserErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension DeleteTopicInput: Swift.Encodable { - public func encode(to encoder: Swift.Encoder) throws { + enum CodingKeys: Swift.String, Swift.CodingKey { + case topicArn = "TopicArn" + } + + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let topicArn = topicArn { try container.encode(topicArn, forKey: ClientRuntime.Key("TopicArn")) @@ -1544,24 +1224,12 @@ public struct DeleteTopicInput: Swift.Equatable { } } -struct DeleteTopicInputBody: Swift.Equatable { - let topicArn: Swift.String? -} - -extension DeleteTopicInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case topicArn = "TopicArn" - } +extension DeleteTopicOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - } -} - -extension DeleteTopicOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return DeleteTopicOutput() + } } } @@ -1570,34 +1238,39 @@ public struct DeleteTopicOutput: Swift.Equatable { public init() { } } -enum DeleteTopicOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConcurrentAccess": return try await ConcurrentAccessException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidState": return try await InvalidStateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleTag": return try await StaleTagException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagPolicy": return try await TagPolicyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum DeleteTopicOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConcurrentAccess": return try await ConcurrentAccessException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidState": return try await InvalidStateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleTag": return try await StaleTagException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagPolicy": return try await TagPolicyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension EmptyBatchRequestException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EmptyBatchRequestException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1625,23 +1298,7 @@ public struct EmptyBatchRequestException: ClientRuntime.ModeledError, AWSClientR } } -struct EmptyBatchRequestExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension EmptyBatchRequestExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SNSClientTypes.Endpoint: Swift.Codable { +extension SNSClientTypes.Endpoint: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributes = "Attributes" case endpointArn = "EndpointArn" @@ -1666,28 +1323,13 @@ extension SNSClientTypes.Endpoint: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let endpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointArn) - endpointArn = endpointArnDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.Endpoint() + value.endpointArn = try reader["EndpointArn"].readIfPresent() + value.attributes = try reader["Attributes"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -1713,16 +1355,14 @@ extension SNSClientTypes { } extension EndpointDisabledException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = EndpointDisabledException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1751,33 +1391,15 @@ public struct EndpointDisabledException: ClientRuntime.ModeledError, AWSClientRu } } -struct EndpointDisabledExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension EndpointDisabledExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension FilterPolicyLimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = FilterPolicyLimitExceededException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1805,23 +1427,11 @@ public struct FilterPolicyLimitExceededException: ClientRuntime.ModeledError, AW } } -struct FilterPolicyLimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension FilterPolicyLimitExceededExceptionBody: Swift.Decodable { +extension GetDataProtectionPolicyInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case resourceArn = "ResourceArn" } -} -extension GetDataProtectionPolicyInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -1852,30 +1462,15 @@ public struct GetDataProtectionPolicyInput: Swift.Equatable { } } -struct GetDataProtectionPolicyInputBody: Swift.Equatable { - let resourceArn: Swift.String? -} - -extension GetDataProtectionPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - } -} +extension GetDataProtectionPolicyOutput { -extension GetDataProtectionPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetDataProtectionPolicyOutputBody = try responseDecoder.decode(responseBody: data) - self.dataProtectionPolicy = output.dataProtectionPolicy - } else { - self.dataProtectionPolicy = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetDataProtectionPolicyResult"] + var value = GetDataProtectionPolicyOutput() + value.dataProtectionPolicy = try reader["DataProtectionPolicy"].readIfPresent() + return value } } } @@ -1892,38 +1487,32 @@ public struct GetDataProtectionPolicyOutput: Swift.Equatable { } } -struct GetDataProtectionPolicyOutputBody: Swift.Equatable { - let dataProtectionPolicy: Swift.String? -} - -extension GetDataProtectionPolicyOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataProtectionPolicy = "DataProtectionPolicy" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetDataProtectionPolicyResult")) - let dataProtectionPolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataProtectionPolicy) - dataProtectionPolicy = dataProtectionPolicyDecoded - } -} +enum GetDataProtectionPolicyOutputError { -enum GetDataProtectionPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetEndpointAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case endpointArn = "EndpointArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let endpointArn = endpointArn { @@ -1955,30 +1544,15 @@ public struct GetEndpointAttributesInput: Swift.Equatable { } } -struct GetEndpointAttributesInputBody: Swift.Equatable { - let endpointArn: Swift.String? -} +extension GetEndpointAttributesOutput { -extension GetEndpointAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpointArn = "EndpointArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let endpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointArn) - endpointArn = endpointArnDecoded - } -} - -extension GetEndpointAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetEndpointAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetEndpointAttributesResult"] + var value = GetEndpointAttributesOutput() + value.attributes = try reader["Attributes"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -2002,54 +1576,31 @@ public struct GetEndpointAttributesOutput: Swift.Equatable { } } -struct GetEndpointAttributesOutputBody: Swift.Equatable { - let attributes: [Swift.String:Swift.String]? -} +enum GetEndpointAttributesOutputError { -extension GetEndpointAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetEndpointAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil } } } -enum GetEndpointAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetPlatformApplicationAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case platformApplicationArn = "PlatformApplicationArn" } -} -extension GetPlatformApplicationAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let platformApplicationArn = platformApplicationArn { @@ -2081,30 +1632,15 @@ public struct GetPlatformApplicationAttributesInput: Swift.Equatable { } } -struct GetPlatformApplicationAttributesInputBody: Swift.Equatable { - let platformApplicationArn: Swift.String? -} - -extension GetPlatformApplicationAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case platformApplicationArn = "PlatformApplicationArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformApplicationArn) - platformApplicationArn = platformApplicationArnDecoded - } -} +extension GetPlatformApplicationAttributesOutput { -extension GetPlatformApplicationAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetPlatformApplicationAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetPlatformApplicationAttributesResult"] + var value = GetPlatformApplicationAttributesOutput() + value.attributes = try reader["Attributes"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -2136,54 +1672,31 @@ public struct GetPlatformApplicationAttributesOutput: Swift.Equatable { } } -struct GetPlatformApplicationAttributesOutputBody: Swift.Equatable { - let attributes: [Swift.String:Swift.String]? -} +enum GetPlatformApplicationAttributesOutputError { -extension GetPlatformApplicationAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetPlatformApplicationAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil } } } -enum GetPlatformApplicationAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetSMSAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes } -} -extension GetSMSAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -2223,47 +1736,15 @@ public struct GetSMSAttributesInput: Swift.Equatable { } } -struct GetSMSAttributesInputBody: Swift.Equatable { - let attributes: [Swift.String]? -} - -extension GetSMSAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.attributes) { - struct KeyVal0{struct member{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var attributesBuffer:[Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?.append(stringContainer0) - } - } - attributes = attributesBuffer - } else { - attributes = [] - } - } else { - attributes = nil - } - } -} +extension GetSMSAttributesOutput { -extension GetSMSAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSMSAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetSMSAttributesResult"] + var value = GetSMSAttributesOutput() + value.attributes = try reader["attributes"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -2281,54 +1762,28 @@ public struct GetSMSAttributesOutput: Swift.Equatable { } } -struct GetSMSAttributesOutputBody: Swift.Equatable { - let attributes: [Swift.String:Swift.String]? -} +enum GetSMSAttributesOutputError { -extension GetSMSAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetSMSAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil - } - } -} - -enum GetSMSAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension GetSMSSandboxAccountStatusInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GetSMSSandboxAccountStatus", forKey:ClientRuntime.Key("Action")) @@ -2348,14 +1803,15 @@ public struct GetSMSSandboxAccountStatusInput: Swift.Equatable { public init() { } } -extension GetSMSSandboxAccountStatusOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSMSSandboxAccountStatusOutputBody = try responseDecoder.decode(responseBody: data) - self.isInSandbox = output.isInSandbox - } else { - self.isInSandbox = false +extension GetSMSSandboxAccountStatusOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetSMSSandboxAccountStatusResult"] + var value = GetSMSSandboxAccountStatusOutput() + value.isInSandbox = try reader["IsInSandbox"].readIfPresent() ?? false + return value } } } @@ -2373,36 +1829,30 @@ public struct GetSMSSandboxAccountStatusOutput: Swift.Equatable { } } -struct GetSMSSandboxAccountStatusOutputBody: Swift.Equatable { - let isInSandbox: Swift.Bool -} +enum GetSMSSandboxAccountStatusOutputError { -extension GetSMSSandboxAccountStatusOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case isInSandbox = "IsInSandbox" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetSMSSandboxAccountStatusResult")) - let isInSandboxDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .isInSandbox) ?? false - isInSandbox = isInSandboxDecoded - } -} - -enum GetSMSSandboxAccountStatusOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetSubscriptionAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case subscriptionArn = "SubscriptionArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let subscriptionArn = subscriptionArn { @@ -2434,30 +1884,15 @@ public struct GetSubscriptionAttributesInput: Swift.Equatable { } } -struct GetSubscriptionAttributesInputBody: Swift.Equatable { - let subscriptionArn: Swift.String? -} - -extension GetSubscriptionAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subscriptionArn = "SubscriptionArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionArn) - subscriptionArn = subscriptionArnDecoded - } -} +extension GetSubscriptionAttributesOutput { -extension GetSubscriptionAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSubscriptionAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetSubscriptionAttributesResult"] + var value = GetSubscriptionAttributesOutput() + value.attributes = try reader["Attributes"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -2516,54 +1951,31 @@ public struct GetSubscriptionAttributesOutput: Swift.Equatable { } } -struct GetSubscriptionAttributesOutputBody: Swift.Equatable { - let attributes: [Swift.String:Swift.String]? -} +enum GetSubscriptionAttributesOutputError { -extension GetSubscriptionAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetSubscriptionAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil } } } -enum GetSubscriptionAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension GetTopicAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case topicArn = "TopicArn" } -} -extension GetTopicAttributesInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let topicArn = topicArn { @@ -2595,30 +2007,15 @@ public struct GetTopicAttributesInput: Swift.Equatable { } } -struct GetTopicAttributesInputBody: Swift.Equatable { - let topicArn: Swift.String? -} +extension GetTopicAttributesOutput { -extension GetTopicAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - } -} - -extension GetTopicAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetTopicAttributesOutputBody = try responseDecoder.decode(responseBody: data) - self.attributes = output.attributes - } else { - self.attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetTopicAttributesResult"] + var value = GetTopicAttributesOutput() + value.attributes = try reader["Attributes"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -2681,65 +2078,36 @@ public struct GetTopicAttributesOutput: Swift.Equatable { } } -struct GetTopicAttributesOutputBody: Swift.Equatable { - let attributes: [Swift.String:Swift.String]? -} - -extension GetTopicAttributesOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - } +enum GetTopicAttributesOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetTopicAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - attributes = nil - } - } -} - -enum GetTopicAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } extension InternalErrorException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InternalErrorException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2767,33 +2135,15 @@ public struct InternalErrorException: ClientRuntime.ModeledError, AWSClientRunti } } -struct InternalErrorExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InternalErrorExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidBatchEntryIdException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidBatchEntryIdException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2821,33 +2171,15 @@ public struct InvalidBatchEntryIdException: ClientRuntime.ModeledError, AWSClien } } -struct InvalidBatchEntryIdExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidBatchEntryIdExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidParameterException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidParameterException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2875,33 +2207,15 @@ public struct InvalidParameterException: ClientRuntime.ModeledError, AWSClientRu } } -struct InvalidParameterExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidParameterExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidParameterValueException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidParameterValueException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2930,33 +2244,15 @@ public struct InvalidParameterValueException: ClientRuntime.ModeledError, AWSCli } } -struct InvalidParameterValueExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidParameterValueExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidSecurityException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidSecurityException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2984,33 +2280,15 @@ public struct InvalidSecurityException: ClientRuntime.ModeledError, AWSClientRun } } -struct InvalidSecurityExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidSecurityExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidStateException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidStateException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3038,33 +2316,15 @@ public struct InvalidStateException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct InvalidStateExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidStateExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension KMSAccessDeniedException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSAccessDeniedException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3092,33 +2352,15 @@ public struct KMSAccessDeniedException: ClientRuntime.ModeledError, AWSClientRun } } -struct KMSAccessDeniedExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSAccessDeniedExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension KMSDisabledException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSDisabledException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3146,33 +2388,15 @@ public struct KMSDisabledException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct KMSDisabledExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSDisabledExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension KMSInvalidStateException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSInvalidStateException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3200,33 +2424,15 @@ public struct KMSInvalidStateException: ClientRuntime.ModeledError, AWSClientRun } } -struct KMSInvalidStateExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSInvalidStateExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension KMSNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSNotFoundException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3254,33 +2460,15 @@ public struct KMSNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime } } -struct KMSNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension KMSOptInRequired { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSOptInRequired() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3308,33 +2496,15 @@ public struct KMSOptInRequired: ClientRuntime.ModeledError, AWSClientRuntime.AWS } } -struct KMSOptInRequiredBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSOptInRequiredBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension KMSThrottlingException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = KMSThrottlingException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -3362,22 +2532,6 @@ public struct KMSThrottlingException: ClientRuntime.ModeledError, AWSClientRunti } } -struct KMSThrottlingExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension KMSThrottlingExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSClientTypes { /// Supported language code for sending OTP message public enum LanguageCodeString: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { @@ -3445,6 +2599,11 @@ extension SNSClientTypes { } extension ListEndpointsByPlatformApplicationInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" + case platformApplicationArn = "PlatformApplicationArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -3483,36 +2642,16 @@ public struct ListEndpointsByPlatformApplicationInput: Swift.Equatable { } } -struct ListEndpointsByPlatformApplicationInputBody: Swift.Equatable { - let platformApplicationArn: Swift.String? - let nextToken: Swift.String? -} +extension ListEndpointsByPlatformApplicationOutput { -extension ListEndpointsByPlatformApplicationInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case platformApplicationArn = "PlatformApplicationArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformApplicationArn) - platformApplicationArn = platformApplicationArnDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension ListEndpointsByPlatformApplicationOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListEndpointsByPlatformApplicationOutputBody = try responseDecoder.decode(responseBody: data) - self.endpoints = output.endpoints - self.nextToken = output.nextToken - } else { - self.endpoints = nil - self.nextToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListEndpointsByPlatformApplicationResult"] + var value = ListEndpointsByPlatformApplicationOutput() + value.endpoints = try reader["Endpoints"].readListIfPresent(memberReadingClosure: SNSClientTypes.Endpoint.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.nextToken = try reader["NextToken"].readIfPresent() + return value } } } @@ -3534,58 +2673,32 @@ public struct ListEndpointsByPlatformApplicationOutput: Swift.Equatable { } } -struct ListEndpointsByPlatformApplicationOutputBody: Swift.Equatable { - let endpoints: [SNSClientTypes.Endpoint]? - let nextToken: Swift.String? -} - -extension ListEndpointsByPlatformApplicationOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case endpoints = "Endpoints" - case nextToken = "NextToken" - } +enum ListEndpointsByPlatformApplicationOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListEndpointsByPlatformApplicationResult")) - if containerValues.contains(.endpoints) { - struct KeyVal0{struct member{}} - let endpointsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .endpoints) - if let endpointsWrappedContainer = endpointsWrappedContainer { - let endpointsContainer = try endpointsWrappedContainer.decodeIfPresent([SNSClientTypes.Endpoint].self, forKey: .member) - var endpointsBuffer:[SNSClientTypes.Endpoint]? = nil - if let endpointsContainer = endpointsContainer { - endpointsBuffer = [SNSClientTypes.Endpoint]() - for structureContainer0 in endpointsContainer { - endpointsBuffer?.append(structureContainer0) - } - } - endpoints = endpointsBuffer - } else { - endpoints = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - endpoints = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListEndpointsByPlatformApplicationOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListOriginationNumbersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" } -} -extension ListOriginationNumbersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -3622,36 +2735,16 @@ public struct ListOriginationNumbersInput: Swift.Equatable { } } -struct ListOriginationNumbersInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxResults: Swift.Int? -} +extension ListOriginationNumbersOutput { -extension ListOriginationNumbersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension ListOriginationNumbersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListOriginationNumbersOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.phoneNumbers = output.phoneNumbers - } else { - self.nextToken = nil - self.phoneNumbers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListOriginationNumbersResult"] + var value = ListOriginationNumbersOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.phoneNumbers = try reader["PhoneNumbers"].readListIfPresent(memberReadingClosure: SNSClientTypes.PhoneNumberInformation.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3672,59 +2765,32 @@ public struct ListOriginationNumbersOutput: Swift.Equatable { } } -struct ListOriginationNumbersOutputBody: Swift.Equatable { - let nextToken: Swift.String? - let phoneNumbers: [SNSClientTypes.PhoneNumberInformation]? -} +enum ListOriginationNumbersOutputError { -extension ListOriginationNumbersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case phoneNumbers = "PhoneNumbers" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListOriginationNumbersResult")) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.phoneNumbers) { - struct KeyVal0{struct member{}} - let phoneNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phoneNumbers) - if let phoneNumbersWrappedContainer = phoneNumbersWrappedContainer { - let phoneNumbersContainer = try phoneNumbersWrappedContainer.decodeIfPresent([SNSClientTypes.PhoneNumberInformation].self, forKey: .member) - var phoneNumbersBuffer:[SNSClientTypes.PhoneNumberInformation]? = nil - if let phoneNumbersContainer = phoneNumbersContainer { - phoneNumbersBuffer = [SNSClientTypes.PhoneNumberInformation]() - for structureContainer0 in phoneNumbersContainer { - phoneNumbersBuffer?.append(structureContainer0) - } - } - phoneNumbers = phoneNumbersBuffer - } else { - phoneNumbers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - phoneNumbers = nil } } } -enum ListOriginationNumbersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListPhoneNumbersOptedOutInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken } -} -extension ListPhoneNumbersOptedOutInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -3755,32 +2821,16 @@ public struct ListPhoneNumbersOptedOutInput: Swift.Equatable { } } -struct ListPhoneNumbersOptedOutInputBody: Swift.Equatable { - let nextToken: Swift.String? -} +extension ListPhoneNumbersOptedOutOutput { -extension ListPhoneNumbersOptedOutInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension ListPhoneNumbersOptedOutOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPhoneNumbersOptedOutOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.phoneNumbers = output.phoneNumbers - } else { - self.nextToken = nil - self.phoneNumbers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListPhoneNumbersOptedOutResult"] + var value = ListPhoneNumbersOptedOutOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.phoneNumbers = try reader["phoneNumbers"].readListIfPresent(memberReadingClosure: Swift.String.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3802,58 +2852,31 @@ public struct ListPhoneNumbersOptedOutOutput: Swift.Equatable { } } -struct ListPhoneNumbersOptedOutOutputBody: Swift.Equatable { - let phoneNumbers: [Swift.String]? - let nextToken: Swift.String? -} +enum ListPhoneNumbersOptedOutOutputError { -extension ListPhoneNumbersOptedOutOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken - case phoneNumbers - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListPhoneNumbersOptedOutResult")) - if containerValues.contains(.phoneNumbers) { - struct KeyVal0{struct member{}} - let phoneNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phoneNumbers) - if let phoneNumbersWrappedContainer = phoneNumbersWrappedContainer { - let phoneNumbersContainer = try phoneNumbersWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var phoneNumbersBuffer:[Swift.String]? = nil - if let phoneNumbersContainer = phoneNumbersContainer { - phoneNumbersBuffer = [Swift.String]() - for stringContainer0 in phoneNumbersContainer { - phoneNumbersBuffer?.append(stringContainer0) - } - } - phoneNumbers = phoneNumbersBuffer - } else { - phoneNumbers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - phoneNumbers = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListPhoneNumbersOptedOutOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListPlatformApplicationsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" } -} -extension ListPlatformApplicationsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -3884,32 +2907,16 @@ public struct ListPlatformApplicationsInput: Swift.Equatable { } } -struct ListPlatformApplicationsInputBody: Swift.Equatable { - let nextToken: Swift.String? -} +extension ListPlatformApplicationsOutput { -extension ListPlatformApplicationsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -extension ListPlatformApplicationsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListPlatformApplicationsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.platformApplications = output.platformApplications - } else { - self.nextToken = nil - self.platformApplications = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListPlatformApplicationsResult"] + var value = ListPlatformApplicationsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.platformApplications = try reader["PlatformApplications"].readListIfPresent(memberReadingClosure: SNSClientTypes.PlatformApplication.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -3931,57 +2938,31 @@ public struct ListPlatformApplicationsOutput: Swift.Equatable { } } -struct ListPlatformApplicationsOutputBody: Swift.Equatable { - let platformApplications: [SNSClientTypes.PlatformApplication]? - let nextToken: Swift.String? -} +enum ListPlatformApplicationsOutputError { -extension ListPlatformApplicationsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case platformApplications = "PlatformApplications" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListPlatformApplicationsResult")) - if containerValues.contains(.platformApplications) { - struct KeyVal0{struct member{}} - let platformApplicationsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .platformApplications) - if let platformApplicationsWrappedContainer = platformApplicationsWrappedContainer { - let platformApplicationsContainer = try platformApplicationsWrappedContainer.decodeIfPresent([SNSClientTypes.PlatformApplication].self, forKey: .member) - var platformApplicationsBuffer:[SNSClientTypes.PlatformApplication]? = nil - if let platformApplicationsContainer = platformApplicationsContainer { - platformApplicationsBuffer = [SNSClientTypes.PlatformApplication]() - for structureContainer0 in platformApplicationsContainer { - platformApplicationsBuffer?.append(structureContainer0) - } - } - platformApplications = platformApplicationsBuffer - } else { - platformApplications = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - platformApplications = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListPlatformApplicationsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListSMSSandboxPhoneNumbersInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" } -} -extension ListSMSSandboxPhoneNumbersInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let maxResults = maxResults { @@ -4018,36 +2999,16 @@ public struct ListSMSSandboxPhoneNumbersInput: Swift.Equatable { } } -struct ListSMSSandboxPhoneNumbersInputBody: Swift.Equatable { - let nextToken: Swift.String? - let maxResults: Swift.Int? -} +extension ListSMSSandboxPhoneNumbersOutput { -extension ListSMSSandboxPhoneNumbersInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case maxResults = "MaxResults" - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) - maxResults = maxResultsDecoded - } -} - -extension ListSMSSandboxPhoneNumbersOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListSMSSandboxPhoneNumbersOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.phoneNumbers = output.phoneNumbers - } else { - self.nextToken = nil - self.phoneNumbers = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListSMSSandboxPhoneNumbersResult"] + var value = ListSMSSandboxPhoneNumbersOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.phoneNumbers = try reader["PhoneNumbers"].readListIfPresent(memberReadingClosure: SNSClientTypes.SMSSandboxPhoneNumber.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4069,59 +3030,33 @@ public struct ListSMSSandboxPhoneNumbersOutput: Swift.Equatable { } } -struct ListSMSSandboxPhoneNumbersOutputBody: Swift.Equatable { - let phoneNumbers: [SNSClientTypes.SMSSandboxPhoneNumber]? - let nextToken: Swift.String? -} +enum ListSMSSandboxPhoneNumbersOutputError { -extension ListSMSSandboxPhoneNumbersOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case phoneNumbers = "PhoneNumbers" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListSMSSandboxPhoneNumbersResult")) - if containerValues.contains(.phoneNumbers) { - struct KeyVal0{struct member{}} - let phoneNumbersWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .phoneNumbers) - if let phoneNumbersWrappedContainer = phoneNumbersWrappedContainer { - let phoneNumbersContainer = try phoneNumbersWrappedContainer.decodeIfPresent([SNSClientTypes.SMSSandboxPhoneNumber].self, forKey: .member) - var phoneNumbersBuffer:[SNSClientTypes.SMSSandboxPhoneNumber]? = nil - if let phoneNumbersContainer = phoneNumbersContainer { - phoneNumbersBuffer = [SNSClientTypes.SMSSandboxPhoneNumber]() - for structureContainer0 in phoneNumbersContainer { - phoneNumbersBuffer?.append(structureContainer0) - } - } - phoneNumbers = phoneNumbersBuffer - } else { - phoneNumbers = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - phoneNumbers = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListSMSSandboxPhoneNumbersOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListSubscriptionsByTopicInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" + case topicArn = "TopicArn" } -} -extension ListSubscriptionsByTopicInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -4150,46 +3085,26 @@ public struct ListSubscriptionsByTopicInput: Swift.Equatable { /// This member is required. public var topicArn: Swift.String? - public init( - nextToken: Swift.String? = nil, - topicArn: Swift.String? = nil - ) - { - self.nextToken = nextToken - self.topicArn = topicArn - } -} - -struct ListSubscriptionsByTopicInputBody: Swift.Equatable { - let topicArn: Swift.String? - let nextToken: Swift.String? -} - -extension ListSubscriptionsByTopicInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded + public init( + nextToken: Swift.String? = nil, + topicArn: Swift.String? = nil + ) + { + self.nextToken = nextToken + self.topicArn = topicArn } } -extension ListSubscriptionsByTopicOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListSubscriptionsByTopicOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.subscriptions = output.subscriptions - } else { - self.nextToken = nil - self.subscriptions = nil +extension ListSubscriptionsByTopicOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListSubscriptionsByTopicResult"] + var value = ListSubscriptionsByTopicOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.subscriptions = try reader["Subscriptions"].readListIfPresent(memberReadingClosure: SNSClientTypes.Subscription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4211,58 +3126,31 @@ public struct ListSubscriptionsByTopicOutput: Swift.Equatable { } } -struct ListSubscriptionsByTopicOutputBody: Swift.Equatable { - let subscriptions: [SNSClientTypes.Subscription]? - let nextToken: Swift.String? -} +enum ListSubscriptionsByTopicOutputError { -extension ListSubscriptionsByTopicOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case subscriptions = "Subscriptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListSubscriptionsByTopicResult")) - if containerValues.contains(.subscriptions) { - struct KeyVal0{struct member{}} - let subscriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subscriptions) - if let subscriptionsWrappedContainer = subscriptionsWrappedContainer { - let subscriptionsContainer = try subscriptionsWrappedContainer.decodeIfPresent([SNSClientTypes.Subscription].self, forKey: .member) - var subscriptionsBuffer:[SNSClientTypes.Subscription]? = nil - if let subscriptionsContainer = subscriptionsContainer { - subscriptionsBuffer = [SNSClientTypes.Subscription]() - for structureContainer0 in subscriptionsContainer { - subscriptionsBuffer?.append(structureContainer0) - } - } - subscriptions = subscriptionsBuffer - } else { - subscriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - subscriptions = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListSubscriptionsByTopicOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListSubscriptionsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" } -} -extension ListSubscriptionsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -4293,32 +3181,16 @@ public struct ListSubscriptionsInput: Swift.Equatable { } } -struct ListSubscriptionsInputBody: Swift.Equatable { - let nextToken: Swift.String? -} - -extension ListSubscriptionsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListSubscriptionsOutput { -extension ListSubscriptionsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListSubscriptionsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.subscriptions = output.subscriptions - } else { - self.nextToken = nil - self.subscriptions = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListSubscriptionsResult"] + var value = ListSubscriptionsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.subscriptions = try reader["Subscriptions"].readListIfPresent(memberReadingClosure: SNSClientTypes.Subscription.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4340,57 +3212,30 @@ public struct ListSubscriptionsOutput: Swift.Equatable { } } -struct ListSubscriptionsOutputBody: Swift.Equatable { - let subscriptions: [SNSClientTypes.Subscription]? - let nextToken: Swift.String? -} +enum ListSubscriptionsOutputError { -extension ListSubscriptionsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case subscriptions = "Subscriptions" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListSubscriptionsResult")) - if containerValues.contains(.subscriptions) { - struct KeyVal0{struct member{}} - let subscriptionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .subscriptions) - if let subscriptionsWrappedContainer = subscriptionsWrappedContainer { - let subscriptionsContainer = try subscriptionsWrappedContainer.decodeIfPresent([SNSClientTypes.Subscription].self, forKey: .member) - var subscriptionsBuffer:[SNSClientTypes.Subscription]? = nil - if let subscriptionsContainer = subscriptionsContainer { - subscriptionsBuffer = [SNSClientTypes.Subscription]() - for structureContainer0 in subscriptionsContainer { - subscriptionsBuffer?.append(structureContainer0) - } - } - subscriptions = subscriptionsBuffer - } else { - subscriptions = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - subscriptions = nil } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded } } -enum ListSubscriptionsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTagsForResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" } -} -extension ListTagsForResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -4421,30 +3266,15 @@ public struct ListTagsForResourceInput: Swift.Equatable { } } -struct ListTagsForResourceInputBody: Swift.Equatable { - let resourceArn: Swift.String? -} - -extension ListTagsForResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - } -} +extension ListTagsForResourceOutput { -extension ListTagsForResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTagsForResourceOutputBody = try responseDecoder.decode(responseBody: data) - self.tags = output.tags - } else { - self.tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTagsForResourceResult"] + var value = ListTagsForResourceOutput() + value.tags = try reader["Tags"].readListIfPresent(memberReadingClosure: SNSClientTypes.Tag.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4461,55 +3291,32 @@ public struct ListTagsForResourceOutput: Swift.Equatable { } } -struct ListTagsForResourceOutputBody: Swift.Equatable { - let tags: [SNSClientTypes.Tag]? -} - -extension ListTagsForResourceOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tags" - } +enum ListTagsForResourceOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTagsForResourceResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([SNSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[SNSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [SNSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConcurrentAccess": return try await ConcurrentAccessException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagPolicy": return try await TagPolicyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - tags = nil } } } -enum ListTagsForResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConcurrentAccess": return try await ConcurrentAccessException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagPolicy": return try await TagPolicyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } +extension ListTopicsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case nextToken = "NextToken" } -} -extension ListTopicsInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let nextToken = nextToken { @@ -4539,32 +3346,16 @@ public struct ListTopicsInput: Swift.Equatable { } } -struct ListTopicsInputBody: Swift.Equatable { - let nextToken: Swift.String? -} - -extension ListTopicsInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} +extension ListTopicsOutput { -extension ListTopicsOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: ListTopicsOutputBody = try responseDecoder.decode(responseBody: data) - self.nextToken = output.nextToken - self.topics = output.topics - } else { - self.nextToken = nil - self.topics = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["ListTopicsResult"] + var value = ListTopicsOutput() + value.nextToken = try reader["NextToken"].readIfPresent() + value.topics = try reader["Topics"].readListIfPresent(memberReadingClosure: SNSClientTypes.Topic.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -4586,57 +3377,26 @@ public struct ListTopicsOutput: Swift.Equatable { } } -struct ListTopicsOutputBody: Swift.Equatable { - let topics: [SNSClientTypes.Topic]? - let nextToken: Swift.String? -} +enum ListTopicsOutputError { -extension ListTopicsOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case nextToken = "NextToken" - case topics = "Topics" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListTopicsResult")) - if containerValues.contains(.topics) { - struct KeyVal0{struct member{}} - let topicsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .topics) - if let topicsWrappedContainer = topicsWrappedContainer { - let topicsContainer = try topicsWrappedContainer.decodeIfPresent([SNSClientTypes.Topic].self, forKey: .member) - var topicsBuffer:[SNSClientTypes.Topic]? = nil - if let topicsContainer = topicsContainer { - topicsBuffer = [SNSClientTypes.Topic]() - for structureContainer0 in topicsContainer { - topicsBuffer?.append(structureContainer0) - } - } - topics = topicsBuffer - } else { - topics = [] + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) } - } else { - topics = nil - } - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - } -} - -enum ListTopicsOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) } } } -extension SNSClientTypes.MessageAttributeValue: Swift.Codable { +extension SNSClientTypes.MessageAttributeValue: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case binaryValue = "BinaryValue" case dataType = "DataType" @@ -4656,21 +3416,14 @@ extension SNSClientTypes.MessageAttributeValue: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) - dataType = dataTypeDecoded - let stringValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stringValue) - stringValue = stringValueDecoded - if containerValues.contains(.binaryValue) { - do { - let binaryValueDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .binaryValue) - binaryValue = binaryValueDecoded - } catch { - binaryValue = "".data(using: .utf8) - } - } else { - binaryValue = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.MessageAttributeValue() + value.dataType = try reader["DataType"].readIfPresent() + value.stringValue = try reader["StringValue"].readIfPresent() + value.binaryValue = try reader["BinaryValue"].readIfPresent() + return value } } } @@ -4701,16 +3454,14 @@ extension SNSClientTypes { } extension NotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = NotFoundException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4738,22 +3489,6 @@ public struct NotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct NotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension NotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSClientTypes { /// Enum listing out all supported number capabilities. public enum NumberCapability: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { @@ -4791,6 +3526,10 @@ extension SNSClientTypes { } extension OptInPhoneNumberInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case phoneNumber + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let phoneNumber = phoneNumber { @@ -4822,24 +3561,12 @@ public struct OptInPhoneNumberInput: Swift.Equatable { } } -struct OptInPhoneNumberInputBody: Swift.Equatable { - let phoneNumber: Swift.String? -} - -extension OptInPhoneNumberInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case phoneNumber - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let phoneNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .phoneNumber) - phoneNumber = phoneNumberDecoded - } -} +extension OptInPhoneNumberOutput { -extension OptInPhoneNumberOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return OptInPhoneNumberOutput() + } } } @@ -4849,30 +3576,35 @@ public struct OptInPhoneNumberOutput: Swift.Equatable { public init() { } } -enum OptInPhoneNumberOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum OptInPhoneNumberOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension OptedOutException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = OptedOutException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -4900,23 +3632,7 @@ public struct OptedOutException: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct OptedOutExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension OptedOutExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SNSClientTypes.PhoneNumberInformation: Swift.Codable { +extension SNSClientTypes.PhoneNumberInformation: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case createdAt = "CreatedAt" case iso2CountryCode = "Iso2CountryCode" @@ -4957,36 +3673,17 @@ extension SNSClientTypes.PhoneNumberInformation: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let createdAtDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .createdAt) - createdAt = createdAtDecoded - let phoneNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .phoneNumber) - phoneNumber = phoneNumberDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded - let iso2CountryCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .iso2CountryCode) - iso2CountryCode = iso2CountryCodeDecoded - let routeTypeDecoded = try containerValues.decodeIfPresent(SNSClientTypes.RouteType.self, forKey: .routeType) - routeType = routeTypeDecoded - if containerValues.contains(.numberCapabilities) { - struct KeyVal0{struct member{}} - let numberCapabilitiesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .numberCapabilities) - if let numberCapabilitiesWrappedContainer = numberCapabilitiesWrappedContainer { - let numberCapabilitiesContainer = try numberCapabilitiesWrappedContainer.decodeIfPresent([SNSClientTypes.NumberCapability].self, forKey: .member) - var numberCapabilitiesBuffer:[SNSClientTypes.NumberCapability]? = nil - if let numberCapabilitiesContainer = numberCapabilitiesContainer { - numberCapabilitiesBuffer = [SNSClientTypes.NumberCapability]() - for enumContainer0 in numberCapabilitiesContainer { - numberCapabilitiesBuffer?.append(enumContainer0) - } - } - numberCapabilities = numberCapabilitiesBuffer - } else { - numberCapabilities = [] - } - } else { - numberCapabilities = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.PhoneNumberInformation() + value.createdAt = try reader["CreatedAt"].readTimestampIfPresent(format: .dateTime) + value.phoneNumber = try reader["PhoneNumber"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + value.iso2CountryCode = try reader["Iso2CountryCode"].readIfPresent() + value.routeType = try reader["RouteType"].readIfPresent() + value.numberCapabilities = try reader["NumberCapabilities"].readListIfPresent(memberReadingClosure: SNSClientTypes.NumberCapability.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5027,7 +3724,7 @@ extension SNSClientTypes { } -extension SNSClientTypes.PlatformApplication: Swift.Codable { +extension SNSClientTypes.PlatformApplication: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case attributes = "Attributes" case platformApplicationArn = "PlatformApplicationArn" @@ -5052,28 +3749,13 @@ extension SNSClientTypes.PlatformApplication: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformApplicationArn) - platformApplicationArn = platformApplicationArnDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.PlatformApplication() + value.platformApplicationArn = try reader["PlatformApplicationArn"].readIfPresent() + value.attributes = try reader["Attributes"].readMapIfPresent(valueReadingClosure: Swift.String.readingClosure, keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) + return value } } } @@ -5099,16 +3781,14 @@ extension SNSClientTypes { } extension PlatformApplicationDisabledException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PlatformApplicationDisabledException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -5137,23 +3817,12 @@ public struct PlatformApplicationDisabledException: ClientRuntime.ModeledError, } } -struct PlatformApplicationDisabledExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PlatformApplicationDisabledExceptionBody: Swift.Decodable { +extension PublishBatchInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case publishBatchRequestEntries = "PublishBatchRequestEntries" + case topicArn = "TopicArn" } -} -extension PublishBatchInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let publishBatchRequestEntries = publishBatchRequestEntries { @@ -5201,53 +3870,16 @@ public struct PublishBatchInput: Swift.Equatable { } } -struct PublishBatchInputBody: Swift.Equatable { - let topicArn: Swift.String? - let publishBatchRequestEntries: [SNSClientTypes.PublishBatchRequestEntry]? -} - -extension PublishBatchInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case publishBatchRequestEntries = "PublishBatchRequestEntries" - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - if containerValues.contains(.publishBatchRequestEntries) { - struct KeyVal0{struct member{}} - let publishBatchRequestEntriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .publishBatchRequestEntries) - if let publishBatchRequestEntriesWrappedContainer = publishBatchRequestEntriesWrappedContainer { - let publishBatchRequestEntriesContainer = try publishBatchRequestEntriesWrappedContainer.decodeIfPresent([SNSClientTypes.PublishBatchRequestEntry].self, forKey: .member) - var publishBatchRequestEntriesBuffer:[SNSClientTypes.PublishBatchRequestEntry]? = nil - if let publishBatchRequestEntriesContainer = publishBatchRequestEntriesContainer { - publishBatchRequestEntriesBuffer = [SNSClientTypes.PublishBatchRequestEntry]() - for structureContainer0 in publishBatchRequestEntriesContainer { - publishBatchRequestEntriesBuffer?.append(structureContainer0) - } - } - publishBatchRequestEntries = publishBatchRequestEntriesBuffer - } else { - publishBatchRequestEntries = [] - } - } else { - publishBatchRequestEntries = nil - } - } -} +extension PublishBatchOutput { -extension PublishBatchOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PublishBatchOutputBody = try responseDecoder.decode(responseBody: data) - self.failed = output.failed - self.successful = output.successful - } else { - self.failed = nil - self.successful = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PublishBatchResult"] + var value = PublishBatchOutput() + value.failed = try reader["Failed"].readListIfPresent(memberReadingClosure: SNSClientTypes.BatchResultErrorEntry.readingClosure, memberNodeInfo: "member", isFlattened: false) + value.successful = try reader["Successful"].readListIfPresent(memberReadingClosure: SNSClientTypes.PublishBatchResultEntry.readingClosure, memberNodeInfo: "member", isFlattened: false) + return value } } } @@ -5268,91 +3900,43 @@ public struct PublishBatchOutput: Swift.Equatable { } } -struct PublishBatchOutputBody: Swift.Equatable { - let successful: [SNSClientTypes.PublishBatchResultEntry]? - let failed: [SNSClientTypes.BatchResultErrorEntry]? +enum PublishBatchOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "BatchEntryIdsNotDistinct": return try await BatchEntryIdsNotDistinctException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "BatchRequestTooLong": return try await BatchRequestTooLongException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EmptyBatchRequest": return try await EmptyBatchRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointDisabled": return try await EndpointDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidBatchEntryId": return try await InvalidBatchEntryIdException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ParameterValueInvalid": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSAccessDenied": return try await KMSAccessDeniedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSDisabled": return try await KMSDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSInvalidState": return try await KMSInvalidStateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSNotFound": return try await KMSNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSOptInRequired": return try await KMSOptInRequired.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSThrottling": return try await KMSThrottlingException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PlatformApplicationDisabled": return try await PlatformApplicationDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TooManyEntriesInBatchRequest": return try await TooManyEntriesInBatchRequestException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } } -extension PublishBatchOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case failed = "Failed" - case successful = "Successful" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PublishBatchResult")) - if containerValues.contains(.successful) { - struct KeyVal0{struct member{}} - let successfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .successful) - if let successfulWrappedContainer = successfulWrappedContainer { - let successfulContainer = try successfulWrappedContainer.decodeIfPresent([SNSClientTypes.PublishBatchResultEntry].self, forKey: .member) - var successfulBuffer:[SNSClientTypes.PublishBatchResultEntry]? = nil - if let successfulContainer = successfulContainer { - successfulBuffer = [SNSClientTypes.PublishBatchResultEntry]() - for structureContainer0 in successfulContainer { - successfulBuffer?.append(structureContainer0) - } - } - successful = successfulBuffer - } else { - successful = [] - } - } else { - successful = nil - } - if containerValues.contains(.failed) { - struct KeyVal0{struct member{}} - let failedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .failed) - if let failedWrappedContainer = failedWrappedContainer { - let failedContainer = try failedWrappedContainer.decodeIfPresent([SNSClientTypes.BatchResultErrorEntry].self, forKey: .member) - var failedBuffer:[SNSClientTypes.BatchResultErrorEntry]? = nil - if let failedContainer = failedContainer { - failedBuffer = [SNSClientTypes.BatchResultErrorEntry]() - for structureContainer0 in failedContainer { - failedBuffer?.append(structureContainer0) - } - } - failed = failedBuffer - } else { - failed = [] - } - } else { - failed = nil - } - } -} - -enum PublishBatchOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BatchEntryIdsNotDistinct": return try await BatchEntryIdsNotDistinctException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "BatchRequestTooLong": return try await BatchRequestTooLongException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EmptyBatchRequest": return try await EmptyBatchRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointDisabled": return try await EndpointDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidBatchEntryId": return try await InvalidBatchEntryIdException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ParameterValueInvalid": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSAccessDenied": return try await KMSAccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSDisabled": return try await KMSDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSInvalidState": return try await KMSInvalidStateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSNotFound": return try await KMSNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSOptInRequired": return try await KMSOptInRequired(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSThrottling": return try await KMSThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PlatformApplicationDisabled": return try await PlatformApplicationDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TooManyEntriesInBatchRequest": return try await TooManyEntriesInBatchRequestException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension SNSClientTypes.PublishBatchRequestEntry: Swift.Codable { +extension SNSClientTypes.PublishBatchRequestEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case id = "Id" case message = "Message" @@ -5397,39 +3981,19 @@ extension SNSClientTypes.PublishBatchRequestEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let subjectDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subject) - subject = subjectDecoded - let messageStructureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageStructure) - messageStructure = messageStructureDecoded - if containerValues.contains(.messageAttributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let messageAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .messageAttributes) - if let messageAttributesWrappedContainer = messageAttributesWrappedContainer { - let messageAttributesContainer = try messageAttributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var messageAttributesBuffer: [Swift.String:SNSClientTypes.MessageAttributeValue]? = nil - if let messageAttributesContainer = messageAttributesContainer { - messageAttributesBuffer = [Swift.String:SNSClientTypes.MessageAttributeValue]() - for structureContainer0 in messageAttributesContainer { - messageAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } - } - messageAttributes = messageAttributesBuffer - } else { - messageAttributes = [:] - } - } else { - messageAttributes = nil + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.PublishBatchRequestEntry() + value.id = try reader["Id"].readIfPresent() + value.message = try reader["Message"].readIfPresent() + value.subject = try reader["Subject"].readIfPresent() + value.messageStructure = try reader["MessageStructure"].readIfPresent() + value.messageAttributes = try reader["MessageAttributes"].readMapIfPresent(valueReadingClosure: SNSClientTypes.MessageAttributeValue.readingClosure, keyNodeInfo: "Name", valueNodeInfo: "Value", isFlattened: false) + value.messageDeduplicationId = try reader["MessageDeduplicationId"].readIfPresent() + value.messageGroupId = try reader["MessageGroupId"].readIfPresent() + return value } - let messageDeduplicationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageDeduplicationId) - messageDeduplicationId = messageDeduplicationIdDecoded - let messageGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageGroupId) - messageGroupId = messageGroupIdDecoded } } @@ -5502,7 +4066,7 @@ extension SNSClientTypes { } -extension SNSClientTypes.PublishBatchResultEntry: Swift.Codable { +extension SNSClientTypes.PublishBatchResultEntry: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case id = "Id" case messageId = "MessageId" @@ -5522,14 +4086,15 @@ extension SNSClientTypes.PublishBatchResultEntry: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let idDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .id) - id = idDecoded - let messageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageId) - messageId = messageIdDecoded - let sequenceNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sequenceNumber) - sequenceNumber = sequenceNumberDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.PublishBatchResultEntry() + value.id = try reader["Id"].readIfPresent() + value.messageId = try reader["MessageId"].readIfPresent() + value.sequenceNumber = try reader["SequenceNumber"].readIfPresent() + return value + } } } @@ -5558,6 +4123,18 @@ extension SNSClientTypes { } extension PublishInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message = "Message" + case messageAttributes = "MessageAttributes" + case messageDeduplicationId = "MessageDeduplicationId" + case messageGroupId = "MessageGroupId" + case messageStructure = "MessageStructure" + case phoneNumber = "PhoneNumber" + case subject = "Subject" + case targetArn = "TargetArn" + case topicArn = "TopicArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let message = message { @@ -5686,81 +4263,16 @@ public struct PublishInput: Swift.Equatable { } } -struct PublishInputBody: Swift.Equatable { - let topicArn: Swift.String? - let targetArn: Swift.String? - let phoneNumber: Swift.String? - let message: Swift.String? - let subject: Swift.String? - let messageStructure: Swift.String? - let messageAttributes: [Swift.String:SNSClientTypes.MessageAttributeValue]? - let messageDeduplicationId: Swift.String? - let messageGroupId: Swift.String? -} - -extension PublishInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - case messageAttributes = "MessageAttributes" - case messageDeduplicationId = "MessageDeduplicationId" - case messageGroupId = "MessageGroupId" - case messageStructure = "MessageStructure" - case phoneNumber = "PhoneNumber" - case subject = "Subject" - case targetArn = "TargetArn" - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let targetArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .targetArn) - targetArn = targetArnDecoded - let phoneNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .phoneNumber) - phoneNumber = phoneNumberDecoded - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let subjectDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subject) - subject = subjectDecoded - let messageStructureDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageStructure) - messageStructure = messageStructureDecoded - if containerValues.contains(.messageAttributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let messageAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .messageAttributes) - if let messageAttributesWrappedContainer = messageAttributesWrappedContainer { - let messageAttributesContainer = try messageAttributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var messageAttributesBuffer: [Swift.String:SNSClientTypes.MessageAttributeValue]? = nil - if let messageAttributesContainer = messageAttributesContainer { - messageAttributesBuffer = [Swift.String:SNSClientTypes.MessageAttributeValue]() - for structureContainer0 in messageAttributesContainer { - messageAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } - } - messageAttributes = messageAttributesBuffer - } else { - messageAttributes = [:] - } - } else { - messageAttributes = nil - } - let messageDeduplicationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageDeduplicationId) - messageDeduplicationId = messageDeduplicationIdDecoded - let messageGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageGroupId) - messageGroupId = messageGroupIdDecoded - } -} +extension PublishOutput { -extension PublishOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: PublishOutputBody = try responseDecoder.decode(responseBody: data) - self.messageId = output.messageId - self.sequenceNumber = output.sequenceNumber - } else { - self.messageId = nil - self.sequenceNumber = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["PublishResult"] + var value = PublishOutput() + value.messageId = try reader["MessageId"].readIfPresent() + value.sequenceNumber = try reader["SequenceNumber"].readIfPresent() + return value } } } @@ -5782,52 +4294,43 @@ public struct PublishOutput: Swift.Equatable { } } -struct PublishOutputBody: Swift.Equatable { - let messageId: Swift.String? - let sequenceNumber: Swift.String? -} - -extension PublishOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case messageId = "MessageId" - case sequenceNumber = "SequenceNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("PublishResult")) - let messageIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageId) - messageId = messageIdDecoded - let sequenceNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sequenceNumber) - sequenceNumber = sequenceNumberDecoded - } -} - -enum PublishOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "EndpointDisabled": return try await EndpointDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ParameterValueInvalid": return try await InvalidParameterValueException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSAccessDenied": return try await KMSAccessDeniedException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSDisabled": return try await KMSDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSInvalidState": return try await KMSInvalidStateException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSNotFound": return try await KMSNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSOptInRequired": return try await KMSOptInRequired(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "KMSThrottling": return try await KMSThrottlingException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PlatformApplicationDisabled": return try await PlatformApplicationDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ValidationException": return try await ValidationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PublishOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "EndpointDisabled": return try await EndpointDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ParameterValueInvalid": return try await InvalidParameterValueException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSAccessDenied": return try await KMSAccessDeniedException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSDisabled": return try await KMSDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSInvalidState": return try await KMSInvalidStateException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSNotFound": return try await KMSNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSOptInRequired": return try await KMSOptInRequired.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "KMSThrottling": return try await KMSThrottlingException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PlatformApplicationDisabled": return try await PlatformApplicationDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ValidationException": return try await ValidationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension PutDataProtectionPolicyInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case dataProtectionPolicy = "DataProtectionPolicy" + case resourceArn = "ResourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let dataProtectionPolicy = dataProtectionPolicy { @@ -5866,28 +4369,12 @@ public struct PutDataProtectionPolicyInput: Swift.Equatable { } } -struct PutDataProtectionPolicyInputBody: Swift.Equatable { - let resourceArn: Swift.String? - let dataProtectionPolicy: Swift.String? -} - -extension PutDataProtectionPolicyInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case dataProtectionPolicy = "DataProtectionPolicy" - case resourceArn = "ResourceArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - let dataProtectionPolicyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataProtectionPolicy) - dataProtectionPolicy = dataProtectionPolicyDecoded - } -} +extension PutDataProtectionPolicyOutput { -extension PutDataProtectionPolicyOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return PutDataProtectionPolicyOutput() + } } } @@ -5896,21 +4383,33 @@ public struct PutDataProtectionPolicyOutput: Swift.Equatable { public init() { } } -enum PutDataProtectionPolicyOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum PutDataProtectionPolicyOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension RemovePermissionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case label = "Label" + case topicArn = "TopicArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let label = label { @@ -5950,28 +4449,12 @@ public struct RemovePermissionInput: Swift.Equatable { } } -struct RemovePermissionInputBody: Swift.Equatable { - let topicArn: Swift.String? - let label: Swift.String? -} - -extension RemovePermissionInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case label = "Label" - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) - label = labelDecoded - } -} +extension RemovePermissionOutput { -extension RemovePermissionOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return RemovePermissionOutput() + } } } @@ -5980,30 +4463,35 @@ public struct RemovePermissionOutput: Swift.Equatable { public init() { } } -enum RemovePermissionOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum RemovePermissionOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ReplayLimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ReplayLimitExceededException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6031,33 +4519,15 @@ public struct ReplayLimitExceededException: ClientRuntime.ModeledError, AWSClien } } -struct ReplayLimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ReplayLimitExceededExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ResourceNotFoundException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ResourceNotFoundException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6085,22 +4555,6 @@ public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -struct ResourceNotFoundExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ResourceNotFoundExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension SNSClientTypes { /// Enum listing out all supported route types. The following enum values are supported. 1. Transactional : Non-marketing traffic 2. Promotional : Marketing 3. Premium : Premium routes for OTP delivery to the carriers public enum RouteType: Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Codable, Swift.Hashable { @@ -6137,7 +4591,7 @@ extension SNSClientTypes { } } -extension SNSClientTypes.SMSSandboxPhoneNumber: Swift.Codable { +extension SNSClientTypes.SMSSandboxPhoneNumber: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case phoneNumber = "PhoneNumber" case status = "Status" @@ -6153,12 +4607,14 @@ extension SNSClientTypes.SMSSandboxPhoneNumber: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let phoneNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .phoneNumber) - phoneNumber = phoneNumberDecoded - let statusDecoded = try containerValues.decodeIfPresent(SNSClientTypes.SMSSandboxPhoneNumberVerificationStatus.self, forKey: .status) - status = statusDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.SMSSandboxPhoneNumber() + value.phoneNumber = try reader["PhoneNumber"].readIfPresent() + value.status = try reader["Status"].readIfPresent() + return value + } } } @@ -6218,6 +4674,11 @@ extension SNSClientTypes { public enum SNSClientTypes {} extension SetEndpointAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case endpointArn = "EndpointArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -6272,67 +4733,46 @@ public struct SetEndpointAttributesInput: Swift.Equatable { } } -struct SetEndpointAttributesInputBody: Swift.Equatable { - let endpointArn: Swift.String? - let attributes: [Swift.String:Swift.String]? -} - -extension SetEndpointAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - case endpointArn = "EndpointArn" - } +extension SetEndpointAttributesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let endpointArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpointArn) - endpointArn = endpointArnDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetEndpointAttributesOutput() } } } -extension SetEndpointAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct SetEndpointAttributesOutput: Swift.Equatable { public init() { } } -enum SetEndpointAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetEndpointAttributesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetPlatformApplicationAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case platformApplicationArn = "PlatformApplicationArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -6434,67 +4874,45 @@ public struct SetPlatformApplicationAttributesInput: Swift.Equatable { } } -struct SetPlatformApplicationAttributesInputBody: Swift.Equatable { - let platformApplicationArn: Swift.String? - let attributes: [Swift.String:Swift.String]? -} - -extension SetPlatformApplicationAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - case platformApplicationArn = "PlatformApplicationArn" - } +extension SetPlatformApplicationAttributesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let platformApplicationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .platformApplicationArn) - platformApplicationArn = platformApplicationArnDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetPlatformApplicationAttributesOutput() } } } -extension SetPlatformApplicationAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct SetPlatformApplicationAttributesOutput: Swift.Equatable { public init() { } } -enum SetPlatformApplicationAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetPlatformApplicationAttributesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetSMSAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -6561,64 +4979,48 @@ public struct SetSMSAttributesInput: Swift.Equatable { } } -struct SetSMSAttributesInputBody: Swift.Equatable { - let attributes: [Swift.String:Swift.String]? -} - -extension SetSMSAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes - } +extension SetSMSAttributesOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetSMSAttributesOutput() } } } -extension SetSMSAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - /// The response for the SetSMSAttributes action. public struct SetSMSAttributesOutput: Swift.Equatable { public init() { } } -enum SetSMSAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetSMSAttributesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetSubscriptionAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeName = "AttributeName" + case attributeValue = "AttributeValue" + case subscriptionArn = "SubscriptionArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeName = attributeName { @@ -6694,32 +5096,12 @@ public struct SetSubscriptionAttributesInput: Swift.Equatable { } } -struct SetSubscriptionAttributesInputBody: Swift.Equatable { - let subscriptionArn: Swift.String? - let attributeName: Swift.String? - let attributeValue: Swift.String? -} - -extension SetSubscriptionAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeName = "AttributeName" - case attributeValue = "AttributeValue" - case subscriptionArn = "SubscriptionArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionArn) - subscriptionArn = subscriptionArnDecoded - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - let attributeValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeValue) - attributeValue = attributeValueDecoded - } -} +extension SetSubscriptionAttributesOutput { -extension SetSubscriptionAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetSubscriptionAttributesOutput() + } } } @@ -6728,22 +5110,35 @@ public struct SetSubscriptionAttributesOutput: Swift.Equatable { public init() { } } -enum SetSubscriptionAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FilterPolicyLimitExceeded": return try await FilterPolicyLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplayLimitExceeded": return try await ReplayLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetSubscriptionAttributesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "FilterPolicyLimitExceeded": return try await FilterPolicyLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplayLimitExceeded": return try await ReplayLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension SetTopicAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeName = "AttributeName" + case attributeValue = "AttributeValue" + case topicArn = "TopicArn" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributeName = attributeName { @@ -6871,32 +5266,12 @@ public struct SetTopicAttributesInput: Swift.Equatable { } } -struct SetTopicAttributesInputBody: Swift.Equatable { - let topicArn: Swift.String? - let attributeName: Swift.String? - let attributeValue: Swift.String? -} - -extension SetTopicAttributesInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeName = "AttributeName" - case attributeValue = "AttributeValue" - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let attributeNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeName) - attributeName = attributeNameDecoded - let attributeValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .attributeValue) - attributeValue = attributeValueDecoded - } -} +extension SetTopicAttributesOutput { -extension SetTopicAttributesOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return SetTopicAttributesOutput() + } } } @@ -6905,31 +5280,36 @@ public struct SetTopicAttributesOutput: Swift.Equatable { public init() { } } -enum SetTopicAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SetTopicAttributesOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension StaleTagException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = StaleTagException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -6957,23 +5337,15 @@ public struct StaleTagException: ClientRuntime.ModeledError, AWSClientRuntime.AW } } -struct StaleTagExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension StaleTagExceptionBody: Swift.Decodable { +extension SubscribeInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case attributes = "Attributes" + case endpoint = "Endpoint" + case `protocol` = "Protocol" + case returnSubscriptionArn = "ReturnSubscriptionArn" + case topicArn = "TopicArn" } -} -extension SubscribeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let attributes = attributes { @@ -7123,63 +5495,15 @@ public struct SubscribeInput: Swift.Equatable { } } -struct SubscribeInputBody: Swift.Equatable { - let topicArn: Swift.String? - let `protocol`: Swift.String? - let endpoint: Swift.String? - let attributes: [Swift.String:Swift.String]? - let returnSubscriptionArn: Swift.Bool? -} - -extension SubscribeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attributes" - case endpoint = "Endpoint" - case `protocol` = "Protocol" - case returnSubscriptionArn = "ReturnSubscriptionArn" - case topicArn = "TopicArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct key{}; struct value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if let attributesWrappedContainer = attributesWrappedContainer { - let attributesContainer = try attributesWrappedContainer.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .entry) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } - } - attributes = attributesBuffer - } else { - attributes = [:] - } - } else { - attributes = nil - } - let returnSubscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.Bool.self, forKey: .returnSubscriptionArn) ?? false - returnSubscriptionArn = returnSubscriptionArnDecoded - } -} +extension SubscribeOutput { -extension SubscribeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: SubscribeOutputBody = try responseDecoder.decode(responseBody: data) - self.subscriptionArn = output.subscriptionArn - } else { - self.subscriptionArn = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["SubscribeResult"] + var value = SubscribeOutput() + value.subscriptionArn = try reader["SubscriptionArn"].readIfPresent() + return value } } } @@ -7197,41 +5521,31 @@ public struct SubscribeOutput: Swift.Equatable { } } -struct SubscribeOutputBody: Swift.Equatable { - let subscriptionArn: Swift.String? -} - -extension SubscribeOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subscriptionArn = "SubscriptionArn" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SubscribeResult")) - let subscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionArn) - subscriptionArn = subscriptionArnDecoded - } -} - -enum SubscribeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "FilterPolicyLimitExceeded": return try await FilterPolicyLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReplayLimitExceeded": return try await ReplayLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "SubscriptionLimitExceeded": return try await SubscriptionLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum SubscribeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "FilterPolicyLimitExceeded": return try await FilterPolicyLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ReplayLimitExceeded": return try await ReplayLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "SubscriptionLimitExceeded": return try await SubscriptionLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } -extension SNSClientTypes.Subscription: Swift.Codable { +extension SNSClientTypes.Subscription: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case endpoint = "Endpoint" case owner = "Owner" @@ -7259,18 +5573,17 @@ extension SNSClientTypes.Subscription: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionArn) - subscriptionArn = subscriptionArnDecoded - let ownerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .owner) - owner = ownerDecoded - let protocolDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .protocol) - `protocol` = protocolDecoded - let endpointDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .endpoint) - endpoint = endpointDecoded - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.Subscription() + value.subscriptionArn = try reader["SubscriptionArn"].readIfPresent() + value.owner = try reader["Owner"].readIfPresent() + value.`protocol` = try reader["Protocol"].readIfPresent() + value.endpoint = try reader["Endpoint"].readIfPresent() + value.topicArn = try reader["TopicArn"].readIfPresent() + return value + } } } @@ -7307,16 +5620,14 @@ extension SNSClientTypes { } extension SubscriptionLimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = SubscriptionLimitExceededException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7344,23 +5655,7 @@ public struct SubscriptionLimitExceededException: ClientRuntime.ModeledError, AW } } -struct SubscriptionLimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension SubscriptionLimitExceededExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SNSClientTypes.Tag: Swift.Codable { +extension SNSClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -7376,12 +5671,14 @@ extension SNSClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } @@ -7408,16 +5705,14 @@ extension SNSClientTypes { } extension TagLimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TagLimitExceededException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7445,33 +5740,15 @@ public struct TagLimitExceededException: ClientRuntime.ModeledError, AWSClientRu } } -struct TagLimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TagLimitExceededExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TagPolicyException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TagPolicyException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7499,23 +5776,12 @@ public struct TagPolicyException: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct TagPolicyExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TagPolicyExceptionBody: Swift.Decodable { +extension TagResourceInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case resourceArn = "ResourceArn" + case tags = "Tags" } -} -extension TagResourceInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -7563,80 +5829,52 @@ public struct TagResourceInput: Swift.Equatable { } } -struct TagResourceInputBody: Swift.Equatable { - let resourceArn: Swift.String? - let tags: [SNSClientTypes.Tag]? -} - -extension TagResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - case tags = "Tags" - } +extension TagResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([SNSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[SNSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [SNSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return TagResourceOutput() } } } -extension TagResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct TagResourceOutput: Swift.Equatable { public init() { } } -enum TagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConcurrentAccess": return try await ConcurrentAccessException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleTag": return try await StaleTagException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceeded": return try await TagLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagPolicy": return try await TagPolicyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum TagResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConcurrentAccess": return try await ConcurrentAccessException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleTag": return try await StaleTagException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceeded": return try await TagLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagPolicy": return try await TagPolicyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ThrottledException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ThrottledException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7665,33 +5903,15 @@ public struct ThrottledException: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct ThrottledExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ThrottledExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension TooManyEntriesInBatchRequestException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TooManyEntriesInBatchRequestException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7719,23 +5939,7 @@ public struct TooManyEntriesInBatchRequestException: ClientRuntime.ModeledError, } } -struct TooManyEntriesInBatchRequestExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TooManyEntriesInBatchRequestExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension SNSClientTypes.Topic: Swift.Codable { +extension SNSClientTypes.Topic: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case topicArn = "TopicArn" } @@ -7747,10 +5951,13 @@ extension SNSClientTypes.Topic: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let topicArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .topicArn) - topicArn = topicArnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = SNSClientTypes.Topic() + value.topicArn = try reader["TopicArn"].readIfPresent() + return value + } } } @@ -7771,16 +5978,14 @@ extension SNSClientTypes { } extension TopicLimitExceededException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = TopicLimitExceededException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -7808,23 +6013,11 @@ public struct TopicLimitExceededException: ClientRuntime.ModeledError, AWSClient } } -struct TopicLimitExceededExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension TopicLimitExceededExceptionBody: Swift.Decodable { +extension UnsubscribeInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded + case subscriptionArn = "SubscriptionArn" } -} -extension UnsubscribeInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let subscriptionArn = subscriptionArn { @@ -7856,24 +6049,12 @@ public struct UnsubscribeInput: Swift.Equatable { } } -struct UnsubscribeInputBody: Swift.Equatable { - let subscriptionArn: Swift.String? -} - -extension UnsubscribeInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case subscriptionArn = "SubscriptionArn" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let subscriptionArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subscriptionArn) - subscriptionArn = subscriptionArnDecoded - } -} +extension UnsubscribeOutput { -extension UnsubscribeOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UnsubscribeOutput() + } } } @@ -7882,21 +6063,33 @@ public struct UnsubscribeOutput: Swift.Equatable { public init() { } } -enum UnsubscribeOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidSecurity": return try await InvalidSecurityException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "NotFound": return try await NotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UnsubscribeOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurityException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "NotFound": return try await NotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UntagResourceInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case resourceArn = "ResourceArn" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let resourceArn = resourceArn { @@ -7944,80 +6137,52 @@ public struct UntagResourceInput: Swift.Equatable { } } -struct UntagResourceInputBody: Swift.Equatable { - let resourceArn: Swift.String? - let tagKeys: [Swift.String]? -} - -extension UntagResourceInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case resourceArn = "ResourceArn" - case tagKeys = "TagKeys" - } +extension UntagResourceOutput { - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let resourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .resourceArn) - resourceArn = resourceArnDecoded - if containerValues.contains(.tagKeys) { - struct KeyVal0{struct member{}} - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tagKeys) - if let tagKeysWrappedContainer = tagKeysWrappedContainer { - let tagKeysContainer = try tagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } - } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] - } - } else { - tagKeys = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return UntagResourceOutput() } } } -extension UntagResourceOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - } -} - public struct UntagResourceOutput: Swift.Equatable { public init() { } } -enum UntagResourceOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ConcurrentAccess": return try await ConcurrentAccessException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "StaleTag": return try await StaleTagException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagLimitExceeded": return try await TagLimitExceededException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "TagPolicy": return try await TagPolicyException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum UntagResourceOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ConcurrentAccess": return try await ConcurrentAccessException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "StaleTag": return try await StaleTagException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagLimitExceeded": return try await TagLimitExceededException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "TagPolicy": return try await TagPolicyException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension UserErrorException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = UserErrorException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8045,33 +6210,15 @@ public struct UserErrorException: ClientRuntime.ModeledError, AWSClientRuntime.A } } -struct UserErrorExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension UserErrorExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension ValidationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ValidationException() + value.properties.message = try reader["Message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8100,35 +6247,16 @@ public struct ValidationException: ClientRuntime.ModeledError, AWSClientRuntime. } } -struct ValidationExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ValidationExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension VerificationException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - self.properties.status = output.error.status - } else { - self.properties.message = nil - self.properties.status = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = VerificationException() + value.properties.message = try reader["Message"].readIfPresent() + value.properties.status = try reader["Status"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -8162,27 +6290,12 @@ public struct VerificationException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct VerificationExceptionBody: Swift.Equatable { - let message: Swift.String? - let status: Swift.String? -} - -extension VerificationExceptionBody: Swift.Decodable { +extension VerifySMSSandboxPhoneNumberInput: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case message = "Message" - case status = "Status" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - let statusDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .status) - status = statusDecoded + case oneTimePassword = "OneTimePassword" + case phoneNumber = "PhoneNumber" } -} -extension VerifySMSSandboxPhoneNumberInput: Swift.Encodable { public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let oneTimePassword = oneTimePassword { @@ -8221,28 +6334,12 @@ public struct VerifySMSSandboxPhoneNumberInput: Swift.Equatable { } } -struct VerifySMSSandboxPhoneNumberInputBody: Swift.Equatable { - let phoneNumber: Swift.String? - let oneTimePassword: Swift.String? -} - -extension VerifySMSSandboxPhoneNumberInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case oneTimePassword = "OneTimePassword" - case phoneNumber = "PhoneNumber" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let phoneNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .phoneNumber) - phoneNumber = phoneNumberDecoded - let oneTimePasswordDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .oneTimePassword) - oneTimePassword = oneTimePasswordDecoded - } -} +extension VerifySMSSandboxPhoneNumberOutput { -extension VerifySMSSandboxPhoneNumberOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + return VerifySMSSandboxPhoneNumberOutput() + } } } @@ -8252,17 +6349,24 @@ public struct VerifySMSSandboxPhoneNumberOutput: Swift.Equatable { public init() { } } -enum VerifySMSSandboxPhoneNumberOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AuthorizationError": return try await AuthorizationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InternalError": return try await InternalErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidParameter": return try await InvalidParameterException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ResourceNotFound": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "Throttled": return try await ThrottledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "VerificationException": return try await VerificationException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum VerifySMSSandboxPhoneNumberOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "AuthorizationError": return try await AuthorizationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InternalError": return try await InternalErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidParameter": return try await InvalidParameterException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "ResourceNotFound": return try await ResourceNotFoundException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "Throttled": return try await ThrottledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "VerificationException": return try await VerificationException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } diff --git a/Sources/Services/AWSSTS/STSClient.swift b/Sources/Services/AWSSTS/STSClient.swift index 2111b25f39f..1c4091ac746 100644 --- a/Sources/Services/AWSSTS/STSClient.swift +++ b/Sources/Services/AWSSTS/STSClient.swift @@ -14,14 +14,11 @@ public class STSClient { let config: STSClient.STSClientConfiguration let serviceName = "STS" let encoder: ClientRuntime.RequestEncoder - let decoder: ClientRuntime.ResponseDecoder public init(config: STSClient.STSClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) let encoder = ClientRuntime.FormURLEncoder() self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() - self.decoder = config.decoder ?? decoder self.config = config } @@ -92,7 +89,6 @@ extension STSClient { public func assumeRole(input: AssumeRoleInput) async throws -> AssumeRoleOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "assumeRole") @@ -116,7 +112,7 @@ extension STSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssumeRoleOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssumeRoleOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssumeRoleOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -150,7 +146,6 @@ extension STSClient { public func assumeRoleWithSAML(input: AssumeRoleWithSAMLInput) async throws -> AssumeRoleWithSAMLOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "assumeRoleWithSAML") @@ -170,7 +165,7 @@ extension STSClient { operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssumeRoleWithSAMLOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssumeRoleWithSAMLOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssumeRoleWithSAMLOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -205,7 +200,6 @@ extension STSClient { public func assumeRoleWithWebIdentity(input: AssumeRoleWithWebIdentityInput) async throws -> AssumeRoleWithWebIdentityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "assumeRoleWithWebIdentity") @@ -225,7 +219,7 @@ extension STSClient { operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(AssumeRoleWithWebIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(AssumeRoleWithWebIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(AssumeRoleWithWebIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -256,7 +250,6 @@ extension STSClient { public func decodeAuthorizationMessage(input: DecodeAuthorizationMessageInput) async throws -> DecodeAuthorizationMessageOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "decodeAuthorizationMessage") @@ -280,7 +273,7 @@ extension STSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(DecodeAuthorizationMessageOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(DecodeAuthorizationMessageOutput.httpBinding, responseDocumentBinding), responseErrorClosure(DecodeAuthorizationMessageOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -296,7 +289,6 @@ extension STSClient { public func getAccessKeyInfo(input: GetAccessKeyInfoInput) async throws -> GetAccessKeyInfoOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getAccessKeyInfo") @@ -320,7 +312,7 @@ extension STSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetAccessKeyInfoOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetAccessKeyInfoOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetAccessKeyInfoOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -336,7 +328,6 @@ extension STSClient { public func getCallerIdentity(input: GetCallerIdentityInput) async throws -> GetCallerIdentityOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getCallerIdentity") @@ -360,7 +351,7 @@ extension STSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCallerIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCallerIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCallerIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -390,7 +381,6 @@ extension STSClient { public func getFederationToken(input: GetFederationTokenInput) async throws -> GetFederationTokenOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getFederationToken") @@ -414,7 +404,7 @@ extension STSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetFederationTokenOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetFederationTokenOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetFederationTokenOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result @@ -442,7 +432,6 @@ extension STSClient { public func getSessionToken(input: GetSessionTokenInput) async throws -> GetSessionTokenOutput { let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getSessionToken") @@ -466,7 +455,7 @@ extension STSClient { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetSessionTokenOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetSessionTokenOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetSessionTokenOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let result = try await operation.handleMiddleware(context: context, input: input, next: client.getHandler()) return result diff --git a/Sources/Services/AWSSTS/models/Models.swift b/Sources/Services/AWSSTS/models/Models.swift index 04cf8dcbebb..4c772b277f7 100644 --- a/Sources/Services/AWSSTS/models/Models.swift +++ b/Sources/Services/AWSSTS/models/Models.swift @@ -1,9 +1,26 @@ // Code generated by smithy-swift-codegen. DO NOT EDIT! import AWSClientRuntime import ClientRuntime +import SmithyReadWrite +import SmithyXML import typealias Foundation.TimeInterval extension AssumeRoleInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case durationSeconds = "DurationSeconds" + case externalId = "ExternalId" + case policy = "Policy" + case policyArns = "PolicyArns" + case providedContexts = "ProvidedContexts" + case roleArn = "RoleArn" + case roleSessionName = "RoleSessionName" + case serialNumber = "SerialNumber" + case sourceIdentity = "SourceIdentity" + case tags = "Tags" + case tokenCode = "TokenCode" + case transitiveTagKeys = "TransitiveTagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let durationSeconds = durationSeconds { @@ -148,148 +165,18 @@ public struct AssumeRoleInput: Swift.Equatable { } } -struct AssumeRoleInputBody: Swift.Equatable { - let roleArn: Swift.String? - let roleSessionName: Swift.String? - let policyArns: [STSClientTypes.PolicyDescriptorType]? - let policy: Swift.String? - let durationSeconds: Swift.Int? - let tags: [STSClientTypes.Tag]? - let transitiveTagKeys: [Swift.String]? - let externalId: Swift.String? - let serialNumber: Swift.String? - let tokenCode: Swift.String? - let sourceIdentity: Swift.String? - let providedContexts: [STSClientTypes.ProvidedContext]? -} - -extension AssumeRoleInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case durationSeconds = "DurationSeconds" - case externalId = "ExternalId" - case policy = "Policy" - case policyArns = "PolicyArns" - case providedContexts = "ProvidedContexts" - case roleArn = "RoleArn" - case roleSessionName = "RoleSessionName" - case serialNumber = "SerialNumber" - case sourceIdentity = "SourceIdentity" - case tags = "Tags" - case tokenCode = "TokenCode" - case transitiveTagKeys = "TransitiveTagKeys" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let roleSessionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleSessionName) - roleSessionName = roleSessionNameDecoded - if containerValues.contains(.policyArns) { - struct KeyVal0{struct member{}} - let policyArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyArns) - if let policyArnsWrappedContainer = policyArnsWrappedContainer { - let policyArnsContainer = try policyArnsWrappedContainer.decodeIfPresent([STSClientTypes.PolicyDescriptorType].self, forKey: .member) - var policyArnsBuffer:[STSClientTypes.PolicyDescriptorType]? = nil - if let policyArnsContainer = policyArnsContainer { - policyArnsBuffer = [STSClientTypes.PolicyDescriptorType]() - for structureContainer0 in policyArnsContainer { - policyArnsBuffer?.append(structureContainer0) - } - } - policyArns = policyArnsBuffer - } else { - policyArns = [] - } - } else { - policyArns = nil - } - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - let durationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .durationSeconds) - durationSeconds = durationSecondsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([STSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[STSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [STSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - if containerValues.contains(.transitiveTagKeys) { - struct KeyVal0{struct member{}} - let transitiveTagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .transitiveTagKeys) - if let transitiveTagKeysWrappedContainer = transitiveTagKeysWrappedContainer { - let transitiveTagKeysContainer = try transitiveTagKeysWrappedContainer.decodeIfPresent([Swift.String].self, forKey: .member) - var transitiveTagKeysBuffer:[Swift.String]? = nil - if let transitiveTagKeysContainer = transitiveTagKeysContainer { - transitiveTagKeysBuffer = [Swift.String]() - for stringContainer0 in transitiveTagKeysContainer { - transitiveTagKeysBuffer?.append(stringContainer0) - } - } - transitiveTagKeys = transitiveTagKeysBuffer - } else { - transitiveTagKeys = [] - } - } else { - transitiveTagKeys = nil - } - let externalIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .externalId) - externalId = externalIdDecoded - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - let tokenCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tokenCode) - tokenCode = tokenCodeDecoded - let sourceIdentityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentity) - sourceIdentity = sourceIdentityDecoded - if containerValues.contains(.providedContexts) { - struct KeyVal0{struct member{}} - let providedContextsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .providedContexts) - if let providedContextsWrappedContainer = providedContextsWrappedContainer { - let providedContextsContainer = try providedContextsWrappedContainer.decodeIfPresent([STSClientTypes.ProvidedContext].self, forKey: .member) - var providedContextsBuffer:[STSClientTypes.ProvidedContext]? = nil - if let providedContextsContainer = providedContextsContainer { - providedContextsBuffer = [STSClientTypes.ProvidedContext]() - for structureContainer0 in providedContextsContainer { - providedContextsBuffer?.append(structureContainer0) - } - } - providedContexts = providedContextsBuffer - } else { - providedContexts = [] - } - } else { - providedContexts = nil - } - } -} +extension AssumeRoleOutput { -extension AssumeRoleOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssumeRoleOutputBody = try responseDecoder.decode(responseBody: data) - self.assumedRoleUser = output.assumedRoleUser - self.credentials = output.credentials - self.packedPolicySize = output.packedPolicySize - self.sourceIdentity = output.sourceIdentity - } else { - self.assumedRoleUser = nil - self.credentials = nil - self.packedPolicySize = nil - self.sourceIdentity = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AssumeRoleResult"] + var value = AssumeRoleOutput() + value.assumedRoleUser = try reader["AssumedRoleUser"].readIfPresent(readingClosure: STSClientTypes.AssumedRoleUser.readingClosure) + value.credentials = try reader["Credentials"].readIfPresent(readingClosure: STSClientTypes.Credentials.readingClosure) + value.packedPolicySize = try reader["PackedPolicySize"].readIfPresent() + value.sourceIdentity = try reader["SourceIdentity"].readIfPresent() + return value } } } @@ -319,44 +206,22 @@ public struct AssumeRoleOutput: Swift.Equatable { } } -struct AssumeRoleOutputBody: Swift.Equatable { - let credentials: STSClientTypes.Credentials? - let assumedRoleUser: STSClientTypes.AssumedRoleUser? - let packedPolicySize: Swift.Int? - let sourceIdentity: Swift.String? -} - -extension AssumeRoleOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assumedRoleUser = "AssumedRoleUser" - case credentials = "Credentials" - case packedPolicySize = "PackedPolicySize" - case sourceIdentity = "SourceIdentity" - } +enum AssumeRoleOutputError { - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AssumeRoleResult")) - let credentialsDecoded = try containerValues.decodeIfPresent(STSClientTypes.Credentials.self, forKey: .credentials) - credentials = credentialsDecoded - let assumedRoleUserDecoded = try containerValues.decodeIfPresent(STSClientTypes.AssumedRoleUser.self, forKey: .assumedRoleUser) - assumedRoleUser = assumedRoleUserDecoded - let packedPolicySizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packedPolicySize) - packedPolicySize = packedPolicySizeDecoded - let sourceIdentityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentity) - sourceIdentity = sourceIdentityDecoded - } -} - -enum AssumeRoleOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ExpiredTokenException": return try await ExpiredTokenException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PackedPolicyTooLarge": return try await PackedPolicyTooLargeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RegionDisabledException": return try await RegionDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ExpiredTokenException": return try await ExpiredTokenException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PackedPolicyTooLarge": return try await PackedPolicyTooLargeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RegionDisabledException": return try await RegionDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -367,6 +232,15 @@ extension AssumeRoleWithSAMLInput: Swift.CustomDebugStringConvertible { } extension AssumeRoleWithSAMLInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case durationSeconds = "DurationSeconds" + case policy = "Policy" + case policyArns = "PolicyArns" + case principalArn = "PrincipalArn" + case roleArn = "RoleArn" + case samlAssertion = "SAMLAssertion" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let durationSeconds = durationSeconds { @@ -443,83 +317,23 @@ public struct AssumeRoleWithSAMLInput: Swift.Equatable { } } -struct AssumeRoleWithSAMLInputBody: Swift.Equatable { - let roleArn: Swift.String? - let principalArn: Swift.String? - let samlAssertion: Swift.String? - let policyArns: [STSClientTypes.PolicyDescriptorType]? - let policy: Swift.String? - let durationSeconds: Swift.Int? -} +extension AssumeRoleWithSAMLOutput { -extension AssumeRoleWithSAMLInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case durationSeconds = "DurationSeconds" - case policy = "Policy" - case policyArns = "PolicyArns" - case principalArn = "PrincipalArn" - case roleArn = "RoleArn" - case samlAssertion = "SAMLAssertion" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let principalArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .principalArn) - principalArn = principalArnDecoded - let samlAssertionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .samlAssertion) - samlAssertion = samlAssertionDecoded - if containerValues.contains(.policyArns) { - struct KeyVal0{struct member{}} - let policyArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyArns) - if let policyArnsWrappedContainer = policyArnsWrappedContainer { - let policyArnsContainer = try policyArnsWrappedContainer.decodeIfPresent([STSClientTypes.PolicyDescriptorType].self, forKey: .member) - var policyArnsBuffer:[STSClientTypes.PolicyDescriptorType]? = nil - if let policyArnsContainer = policyArnsContainer { - policyArnsBuffer = [STSClientTypes.PolicyDescriptorType]() - for structureContainer0 in policyArnsContainer { - policyArnsBuffer?.append(structureContainer0) - } - } - policyArns = policyArnsBuffer - } else { - policyArns = [] - } - } else { - policyArns = nil - } - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - let durationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .durationSeconds) - durationSeconds = durationSecondsDecoded - } -} - -extension AssumeRoleWithSAMLOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssumeRoleWithSAMLOutputBody = try responseDecoder.decode(responseBody: data) - self.assumedRoleUser = output.assumedRoleUser - self.audience = output.audience - self.credentials = output.credentials - self.issuer = output.issuer - self.nameQualifier = output.nameQualifier - self.packedPolicySize = output.packedPolicySize - self.sourceIdentity = output.sourceIdentity - self.subject = output.subject - self.subjectType = output.subjectType - } else { - self.assumedRoleUser = nil - self.audience = nil - self.credentials = nil - self.issuer = nil - self.nameQualifier = nil - self.packedPolicySize = nil - self.sourceIdentity = nil - self.subject = nil - self.subjectType = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AssumeRoleWithSAMLResult"] + var value = AssumeRoleWithSAMLOutput() + value.assumedRoleUser = try reader["AssumedRoleUser"].readIfPresent(readingClosure: STSClientTypes.AssumedRoleUser.readingClosure) + value.audience = try reader["Audience"].readIfPresent() + value.credentials = try reader["Credentials"].readIfPresent(readingClosure: STSClientTypes.Credentials.readingClosure) + value.issuer = try reader["Issuer"].readIfPresent() + value.nameQualifier = try reader["NameQualifier"].readIfPresent() + value.packedPolicySize = try reader["PackedPolicySize"].readIfPresent() + value.sourceIdentity = try reader["SourceIdentity"].readIfPresent() + value.subject = try reader["Subject"].readIfPresent() + value.subjectType = try reader["SubjectType"].readIfPresent() + return value } } } @@ -578,66 +392,24 @@ public struct AssumeRoleWithSAMLOutput: Swift.Equatable { } } -struct AssumeRoleWithSAMLOutputBody: Swift.Equatable { - let credentials: STSClientTypes.Credentials? - let assumedRoleUser: STSClientTypes.AssumedRoleUser? - let packedPolicySize: Swift.Int? - let subject: Swift.String? - let subjectType: Swift.String? - let issuer: Swift.String? - let audience: Swift.String? - let nameQualifier: Swift.String? - let sourceIdentity: Swift.String? -} - -extension AssumeRoleWithSAMLOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assumedRoleUser = "AssumedRoleUser" - case audience = "Audience" - case credentials = "Credentials" - case issuer = "Issuer" - case nameQualifier = "NameQualifier" - case packedPolicySize = "PackedPolicySize" - case sourceIdentity = "SourceIdentity" - case subject = "Subject" - case subjectType = "SubjectType" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AssumeRoleWithSAMLResult")) - let credentialsDecoded = try containerValues.decodeIfPresent(STSClientTypes.Credentials.self, forKey: .credentials) - credentials = credentialsDecoded - let assumedRoleUserDecoded = try containerValues.decodeIfPresent(STSClientTypes.AssumedRoleUser.self, forKey: .assumedRoleUser) - assumedRoleUser = assumedRoleUserDecoded - let packedPolicySizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packedPolicySize) - packedPolicySize = packedPolicySizeDecoded - let subjectDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subject) - subject = subjectDecoded - let subjectTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subjectType) - subjectType = subjectTypeDecoded - let issuerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .issuer) - issuer = issuerDecoded - let audienceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .audience) - audience = audienceDecoded - let nameQualifierDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nameQualifier) - nameQualifier = nameQualifierDecoded - let sourceIdentityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentity) - sourceIdentity = sourceIdentityDecoded - } -} - -enum AssumeRoleWithSAMLOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ExpiredTokenException": return try await ExpiredTokenException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IDPRejectedClaim": return try await IDPRejectedClaimException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIdentityToken": return try await InvalidIdentityTokenException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PackedPolicyTooLarge": return try await PackedPolicyTooLargeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RegionDisabledException": return try await RegionDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) +enum AssumeRoleWithSAMLOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ExpiredTokenException": return try await ExpiredTokenException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IDPRejectedClaim": return try await IDPRejectedClaimException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidIdentityToken": return try await InvalidIdentityTokenException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PackedPolicyTooLarge": return try await PackedPolicyTooLargeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RegionDisabledException": return try await RegionDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } @@ -648,6 +420,16 @@ extension AssumeRoleWithWebIdentityInput: Swift.CustomDebugStringConvertible { } extension AssumeRoleWithWebIdentityInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case durationSeconds = "DurationSeconds" + case policy = "Policy" + case policyArns = "PolicyArns" + case providerId = "ProviderId" + case roleArn = "RoleArn" + case roleSessionName = "RoleSessionName" + case webIdentityToken = "WebIdentityToken" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let durationSeconds = durationSeconds { @@ -731,83 +513,21 @@ public struct AssumeRoleWithWebIdentityInput: Swift.Equatable { } } -struct AssumeRoleWithWebIdentityInputBody: Swift.Equatable { - let roleArn: Swift.String? - let roleSessionName: Swift.String? - let webIdentityToken: Swift.String? - let providerId: Swift.String? - let policyArns: [STSClientTypes.PolicyDescriptorType]? - let policy: Swift.String? - let durationSeconds: Swift.Int? -} - -extension AssumeRoleWithWebIdentityInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case durationSeconds = "DurationSeconds" - case policy = "Policy" - case policyArns = "PolicyArns" - case providerId = "ProviderId" - case roleArn = "RoleArn" - case roleSessionName = "RoleSessionName" - case webIdentityToken = "WebIdentityToken" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let roleArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleArn) - roleArn = roleArnDecoded - let roleSessionNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .roleSessionName) - roleSessionName = roleSessionNameDecoded - let webIdentityTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .webIdentityToken) - webIdentityToken = webIdentityTokenDecoded - let providerIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .providerId) - providerId = providerIdDecoded - if containerValues.contains(.policyArns) { - struct KeyVal0{struct member{}} - let policyArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyArns) - if let policyArnsWrappedContainer = policyArnsWrappedContainer { - let policyArnsContainer = try policyArnsWrappedContainer.decodeIfPresent([STSClientTypes.PolicyDescriptorType].self, forKey: .member) - var policyArnsBuffer:[STSClientTypes.PolicyDescriptorType]? = nil - if let policyArnsContainer = policyArnsContainer { - policyArnsBuffer = [STSClientTypes.PolicyDescriptorType]() - for structureContainer0 in policyArnsContainer { - policyArnsBuffer?.append(structureContainer0) - } - } - policyArns = policyArnsBuffer - } else { - policyArns = [] - } - } else { - policyArns = nil - } - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - let durationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .durationSeconds) - durationSeconds = durationSecondsDecoded - } -} +extension AssumeRoleWithWebIdentityOutput { -extension AssumeRoleWithWebIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: AssumeRoleWithWebIdentityOutputBody = try responseDecoder.decode(responseBody: data) - self.assumedRoleUser = output.assumedRoleUser - self.audience = output.audience - self.credentials = output.credentials - self.packedPolicySize = output.packedPolicySize - self.provider = output.provider - self.sourceIdentity = output.sourceIdentity - self.subjectFromWebIdentityToken = output.subjectFromWebIdentityToken - } else { - self.assumedRoleUser = nil - self.audience = nil - self.credentials = nil - self.packedPolicySize = nil - self.provider = nil - self.sourceIdentity = nil - self.subjectFromWebIdentityToken = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["AssumeRoleWithWebIdentityResult"] + var value = AssumeRoleWithWebIdentityOutput() + value.assumedRoleUser = try reader["AssumedRoleUser"].readIfPresent(readingClosure: STSClientTypes.AssumedRoleUser.readingClosure) + value.audience = try reader["Audience"].readIfPresent() + value.credentials = try reader["Credentials"].readIfPresent(readingClosure: STSClientTypes.Credentials.readingClosure) + value.packedPolicySize = try reader["PackedPolicySize"].readIfPresent() + value.provider = try reader["Provider"].readIfPresent() + value.sourceIdentity = try reader["SourceIdentity"].readIfPresent() + value.subjectFromWebIdentityToken = try reader["SubjectFromWebIdentityToken"].readIfPresent() + return value } } } @@ -849,64 +569,30 @@ public struct AssumeRoleWithWebIdentityOutput: Swift.Equatable { } } -struct AssumeRoleWithWebIdentityOutputBody: Swift.Equatable { - let credentials: STSClientTypes.Credentials? - let subjectFromWebIdentityToken: Swift.String? - let assumedRoleUser: STSClientTypes.AssumedRoleUser? - let packedPolicySize: Swift.Int? - let provider: Swift.String? - let audience: Swift.String? - let sourceIdentity: Swift.String? +enum AssumeRoleWithWebIdentityOutputError { + + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "ExpiredTokenException": return try await ExpiredTokenException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IDPCommunicationError": return try await IDPCommunicationErrorException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "IDPRejectedClaim": return try await IDPRejectedClaimException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "InvalidIdentityToken": return try await InvalidIdentityTokenException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PackedPolicyTooLarge": return try await PackedPolicyTooLargeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RegionDisabledException": return try await RegionDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } + } + } } -extension AssumeRoleWithWebIdentityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case assumedRoleUser = "AssumedRoleUser" - case audience = "Audience" - case credentials = "Credentials" - case packedPolicySize = "PackedPolicySize" - case provider = "Provider" - case sourceIdentity = "SourceIdentity" - case subjectFromWebIdentityToken = "SubjectFromWebIdentityToken" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("AssumeRoleWithWebIdentityResult")) - let credentialsDecoded = try containerValues.decodeIfPresent(STSClientTypes.Credentials.self, forKey: .credentials) - credentials = credentialsDecoded - let subjectFromWebIdentityTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .subjectFromWebIdentityToken) - subjectFromWebIdentityToken = subjectFromWebIdentityTokenDecoded - let assumedRoleUserDecoded = try containerValues.decodeIfPresent(STSClientTypes.AssumedRoleUser.self, forKey: .assumedRoleUser) - assumedRoleUser = assumedRoleUserDecoded - let packedPolicySizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packedPolicySize) - packedPolicySize = packedPolicySizeDecoded - let providerDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .provider) - provider = providerDecoded - let audienceDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .audience) - audience = audienceDecoded - let sourceIdentityDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceIdentity) - sourceIdentity = sourceIdentityDecoded - } -} - -enum AssumeRoleWithWebIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ExpiredTokenException": return try await ExpiredTokenException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IDPCommunicationError": return try await IDPCommunicationErrorException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "IDPRejectedClaim": return try await IDPRejectedClaimException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "InvalidIdentityToken": return try await InvalidIdentityTokenException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PackedPolicyTooLarge": return try await PackedPolicyTooLargeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RegionDisabledException": return try await RegionDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) - } - } -} - -extension STSClientTypes.AssumedRoleUser: Swift.Codable { +extension STSClientTypes.AssumedRoleUser: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case assumedRoleId = "AssumedRoleId" @@ -922,12 +608,14 @@ extension STSClientTypes.AssumedRoleUser: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let assumedRoleIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .assumedRoleId) - assumedRoleId = assumedRoleIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = STSClientTypes.AssumedRoleUser() + value.assumedRoleId = try reader["AssumedRoleId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + return value + } } } @@ -953,7 +641,7 @@ extension STSClientTypes { } -extension STSClientTypes.Credentials: Swift.Codable { +extension STSClientTypes.Credentials: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case accessKeyId = "AccessKeyId" case expiration = "Expiration" @@ -977,16 +665,16 @@ extension STSClientTypes.Credentials: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - let secretAccessKeyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .secretAccessKey) - secretAccessKey = secretAccessKeyDecoded - let sessionTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sessionToken) - sessionToken = sessionTokenDecoded - let expirationDecoded = try containerValues.decodeTimestampIfPresent(.dateTime, forKey: .expiration) - expiration = expirationDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = STSClientTypes.Credentials() + value.accessKeyId = try reader["AccessKeyId"].readIfPresent() + value.secretAccessKey = try reader["SecretAccessKey"].readIfPresent() + value.sessionToken = try reader["SessionToken"].readIfPresent() + value.expiration = try reader["Expiration"].readTimestampIfPresent(format: .dateTime) + return value + } } } @@ -1028,6 +716,10 @@ extension STSClientTypes { } extension DecodeAuthorizationMessageInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case encodedMessage = "EncodedMessage" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let encodedMessage = encodedMessage { @@ -1058,30 +750,15 @@ public struct DecodeAuthorizationMessageInput: Swift.Equatable { } } -struct DecodeAuthorizationMessageInputBody: Swift.Equatable { - let encodedMessage: Swift.String? -} - -extension DecodeAuthorizationMessageInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case encodedMessage = "EncodedMessage" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let encodedMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .encodedMessage) - encodedMessage = encodedMessageDecoded - } -} +extension DecodeAuthorizationMessageOutput { -extension DecodeAuthorizationMessageOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: DecodeAuthorizationMessageOutputBody = try responseDecoder.decode(responseBody: data) - self.decodedMessage = output.decodedMessage - } else { - self.decodedMessage = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["DecodeAuthorizationMessageResult"] + var value = DecodeAuthorizationMessageOutput() + value.decodedMessage = try reader["DecodedMessage"].readIfPresent() + return value } } } @@ -1099,44 +776,32 @@ public struct DecodeAuthorizationMessageOutput: Swift.Equatable { } } -struct DecodeAuthorizationMessageOutputBody: Swift.Equatable { - let decodedMessage: Swift.String? -} +enum DecodeAuthorizationMessageOutputError { -extension DecodeAuthorizationMessageOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case decodedMessage = "DecodedMessage" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DecodeAuthorizationMessageResult")) - let decodedMessageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .decodedMessage) - decodedMessage = decodedMessageDecoded - } -} - -enum DecodeAuthorizationMessageOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidAuthorizationMessageException": return try await InvalidAuthorizationMessageException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "InvalidAuthorizationMessageException": return try await InvalidAuthorizationMessageException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension ExpiredTokenException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = ExpiredTokenException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1164,23 +829,7 @@ public struct ExpiredTokenException: ClientRuntime.ModeledError, AWSClientRuntim } } -struct ExpiredTokenExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension ExpiredTokenExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension STSClientTypes.FederatedUser: Swift.Codable { +extension STSClientTypes.FederatedUser: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn = "Arn" case federatedUserId = "FederatedUserId" @@ -1196,12 +845,14 @@ extension STSClientTypes.FederatedUser: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let federatedUserIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .federatedUserId) - federatedUserId = federatedUserIdDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = STSClientTypes.FederatedUser() + value.federatedUserId = try reader["FederatedUserId"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + return value + } } } @@ -1228,6 +879,10 @@ extension STSClientTypes { } extension GetAccessKeyInfoInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case accessKeyId = "AccessKeyId" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let accessKeyId = accessKeyId { @@ -1258,30 +913,15 @@ public struct GetAccessKeyInfoInput: Swift.Equatable { } } -struct GetAccessKeyInfoInputBody: Swift.Equatable { - let accessKeyId: Swift.String? -} - -extension GetAccessKeyInfoInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case accessKeyId = "AccessKeyId" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let accessKeyIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .accessKeyId) - accessKeyId = accessKeyIdDecoded - } -} +extension GetAccessKeyInfoOutput { -extension GetAccessKeyInfoOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetAccessKeyInfoOutputBody = try responseDecoder.decode(responseBody: data) - self.account = output.account - } else { - self.account = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetAccessKeyInfoResult"] + var value = GetAccessKeyInfoOutput() + value.account = try reader["Account"].readIfPresent() + return value } } } @@ -1298,33 +938,24 @@ public struct GetAccessKeyInfoOutput: Swift.Equatable { } } -struct GetAccessKeyInfoOutputBody: Swift.Equatable { - let account: Swift.String? -} - -extension GetAccessKeyInfoOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case account = "Account" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetAccessKeyInfoResult")) - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - } -} +enum GetAccessKeyInfoOutputError { -enum GetAccessKeyInfoOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetCallerIdentityInput: Swift.Encodable { + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) try container.encode("GetCallerIdentity", forKey:ClientRuntime.Key("Action")) @@ -1337,10 +968,8 @@ extension GetCallerIdentityInput { let serviceName = "STS" let input = self let encoder = ClientRuntime.FormURLEncoder() - let decoder = ClientRuntime.XMLDecoder() let context = ClientRuntime.HttpContextBuilder() .withEncoder(value: encoder) - .withDecoder(value: decoder) .withMethod(value: .post) .withServiceName(value: serviceName) .withOperation(value: "getCallerIdentity") @@ -1364,7 +993,7 @@ extension GetCallerIdentityInput { operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(expiration: expiration, unsignedBody: false, signingAlgorithm: .sigv4) operation.finalizeStep.intercept(position: .before, middleware: AWSClientRuntime.SigV4Middleware(config: sigv4Config)) - operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(decoder: decoder), responseErrorClosure(GetCallerIdentityOutputError.self, decoder: decoder))) + operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.DeserializeMiddleware(responseClosure(GetCallerIdentityOutput.httpBinding, responseDocumentBinding), responseErrorClosure(GetCallerIdentityOutputError.httpBinding, responseDocumentBinding))) operation.deserializeStep.intercept(position: .after, middleware: ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) let presignedRequestBuilder = try await operation.presignedRequest(context: context, input: input, output: GetCallerIdentityOutput(), next: ClientRuntime.NoopHandler()) guard let builtRequest = presignedRequestBuilder?.build() else { @@ -1386,18 +1015,17 @@ public struct GetCallerIdentityInput: Swift.Equatable { public init() { } } -extension GetCallerIdentityOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetCallerIdentityOutputBody = try responseDecoder.decode(responseBody: data) - self.account = output.account - self.arn = output.arn - self.userId = output.userId - } else { - self.account = nil - self.arn = nil - self.userId = nil +extension GetCallerIdentityOutput { + + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetCallerIdentityResult"] + var value = GetCallerIdentityOutput() + value.account = try reader["Account"].readIfPresent() + value.arn = try reader["Arn"].readIfPresent() + value.userId = try reader["UserId"].readIfPresent() + return value } } } @@ -1423,41 +1051,31 @@ public struct GetCallerIdentityOutput: Swift.Equatable { } } -struct GetCallerIdentityOutputBody: Swift.Equatable { - let userId: Swift.String? - let account: Swift.String? - let arn: Swift.String? -} - -extension GetCallerIdentityOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case account = "Account" - case arn = "Arn" - case userId = "UserId" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetCallerIdentityResult")) - let userIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .userId) - userId = userIdDecoded - let accountDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .account) - account = accountDecoded - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded - } -} +enum GetCallerIdentityOutputError { -enum GetCallerIdentityOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetFederationTokenInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case durationSeconds = "DurationSeconds" + case name = "Name" + case policy = "Policy" + case policyArns = "PolicyArns" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let durationSeconds = durationSeconds { @@ -1534,84 +1152,17 @@ public struct GetFederationTokenInput: Swift.Equatable { } } -struct GetFederationTokenInputBody: Swift.Equatable { - let name: Swift.String? - let policy: Swift.String? - let policyArns: [STSClientTypes.PolicyDescriptorType]? - let durationSeconds: Swift.Int? - let tags: [STSClientTypes.Tag]? -} - -extension GetFederationTokenInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case durationSeconds = "DurationSeconds" - case name = "Name" - case policy = "Policy" - case policyArns = "PolicyArns" - case tags = "Tags" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let nameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .name) - name = nameDecoded - let policyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .policy) - policy = policyDecoded - if containerValues.contains(.policyArns) { - struct KeyVal0{struct member{}} - let policyArnsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .policyArns) - if let policyArnsWrappedContainer = policyArnsWrappedContainer { - let policyArnsContainer = try policyArnsWrappedContainer.decodeIfPresent([STSClientTypes.PolicyDescriptorType].self, forKey: .member) - var policyArnsBuffer:[STSClientTypes.PolicyDescriptorType]? = nil - if let policyArnsContainer = policyArnsContainer { - policyArnsBuffer = [STSClientTypes.PolicyDescriptorType]() - for structureContainer0 in policyArnsContainer { - policyArnsBuffer?.append(structureContainer0) - } - } - policyArns = policyArnsBuffer - } else { - policyArns = [] - } - } else { - policyArns = nil - } - let durationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .durationSeconds) - durationSeconds = durationSecondsDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct member{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CollectionMemberCodingKey.CodingKeys.self, forKey: .tags) - if let tagsWrappedContainer = tagsWrappedContainer { - let tagsContainer = try tagsWrappedContainer.decodeIfPresent([STSClientTypes.Tag].self, forKey: .member) - var tagsBuffer:[STSClientTypes.Tag]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [STSClientTypes.Tag]() - for structureContainer0 in tagsContainer { - tagsBuffer?.append(structureContainer0) - } - } - tags = tagsBuffer - } else { - tags = [] - } - } else { - tags = nil - } - } -} +extension GetFederationTokenOutput { -extension GetFederationTokenOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetFederationTokenOutputBody = try responseDecoder.decode(responseBody: data) - self.credentials = output.credentials - self.federatedUser = output.federatedUser - self.packedPolicySize = output.packedPolicySize - } else { - self.credentials = nil - self.federatedUser = nil - self.packedPolicySize = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetFederationTokenResult"] + var value = GetFederationTokenOutput() + value.credentials = try reader["Credentials"].readIfPresent(readingClosure: STSClientTypes.Credentials.readingClosure) + value.federatedUser = try reader["FederatedUser"].readIfPresent(readingClosure: STSClientTypes.FederatedUser.readingClosure) + value.packedPolicySize = try reader["PackedPolicySize"].readIfPresent() + return value } } } @@ -1637,44 +1188,32 @@ public struct GetFederationTokenOutput: Swift.Equatable { } } -struct GetFederationTokenOutputBody: Swift.Equatable { - let credentials: STSClientTypes.Credentials? - let federatedUser: STSClientTypes.FederatedUser? - let packedPolicySize: Swift.Int? -} +enum GetFederationTokenOutputError { -extension GetFederationTokenOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case credentials = "Credentials" - case federatedUser = "FederatedUser" - case packedPolicySize = "PackedPolicySize" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetFederationTokenResult")) - let credentialsDecoded = try containerValues.decodeIfPresent(STSClientTypes.Credentials.self, forKey: .credentials) - credentials = credentialsDecoded - let federatedUserDecoded = try containerValues.decodeIfPresent(STSClientTypes.FederatedUser.self, forKey: .federatedUser) - federatedUser = federatedUserDecoded - let packedPolicySizeDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .packedPolicySize) - packedPolicySize = packedPolicySizeDecoded - } -} - -enum GetFederationTokenOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "PackedPolicyTooLarge": return try await PackedPolicyTooLargeException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "RegionDisabledException": return try await RegionDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "MalformedPolicyDocument": return try await MalformedPolicyDocumentException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "PackedPolicyTooLarge": return try await PackedPolicyTooLargeException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + case "RegionDisabledException": return try await RegionDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension GetSessionTokenInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case durationSeconds = "DurationSeconds" + case serialNumber = "SerialNumber" + case tokenCode = "TokenCode" + } + public func encode(to encoder: Swift.Encoder) throws { var container = encoder.container(keyedBy: ClientRuntime.Key.self) if let durationSeconds = durationSeconds { @@ -1718,38 +1257,15 @@ public struct GetSessionTokenInput: Swift.Equatable { } } -struct GetSessionTokenInputBody: Swift.Equatable { - let durationSeconds: Swift.Int? - let serialNumber: Swift.String? - let tokenCode: Swift.String? -} +extension GetSessionTokenOutput { -extension GetSessionTokenInputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case durationSeconds = "DurationSeconds" - case serialNumber = "SerialNumber" - case tokenCode = "TokenCode" - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let durationSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .durationSeconds) - durationSeconds = durationSecondsDecoded - let serialNumberDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .serialNumber) - serialNumber = serialNumberDecoded - let tokenCodeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .tokenCode) - tokenCode = tokenCodeDecoded - } -} - -extension GetSessionTokenOutput: ClientRuntime.HttpResponseBinding { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws { - if let data = try await httpResponse.body.readData(), - let responseDecoder = decoder { - let output: GetSessionTokenOutputBody = try responseDecoder.decode(responseBody: data) - self.credentials = output.credentials - } else { - self.credentials = nil + static var httpBinding: ClientRuntime.HTTPResponseOutputBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["GetSessionTokenResult"] + var value = GetSessionTokenOutput() + value.credentials = try reader["Credentials"].readIfPresent(readingClosure: STSClientTypes.Credentials.readingClosure) + return value } } } @@ -1767,44 +1283,32 @@ public struct GetSessionTokenOutput: Swift.Equatable { } } -struct GetSessionTokenOutputBody: Swift.Equatable { - let credentials: STSClientTypes.Credentials? -} - -extension GetSessionTokenOutputBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case credentials = "Credentials" - } - - public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetSessionTokenResult")) - let credentialsDecoded = try containerValues.decodeIfPresent(STSClientTypes.Credentials.self, forKey: .credentials) - credentials = credentialsDecoded - } -} +enum GetSessionTokenOutputError { -enum GetSessionTokenOutputError: ClientRuntime.HttpResponseErrorBinding { - static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "RegionDisabledException": return try await RegionDisabledException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + static var httpBinding: ClientRuntime.HTTPResponseErrorBinding { + { httpResponse, responseDocumentClosure in + let responseReader = try await responseDocumentClosure(httpResponse) + let reader = responseReader["Error"] + let requestID: String? = try responseReader["RequestId"].readIfPresent() + let code: String? = try reader["Code"].readIfPresent() + let message: String? = try reader["Message"].readIfPresent() + switch code { + case "RegionDisabledException": return try await RegionDisabledException.responseErrorBinding(httpResponse: httpResponse, reader: reader, message: message, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: message, requestID: requestID, typeName: code) + } } } } extension IDPCommunicationErrorException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IDPCommunicationErrorException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1832,33 +1336,15 @@ public struct IDPCommunicationErrorException: ClientRuntime.ModeledError, AWSCli } } -struct IDPCommunicationErrorExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension IDPCommunicationErrorExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension IDPRejectedClaimException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = IDPRejectedClaimException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1886,33 +1372,15 @@ public struct IDPRejectedClaimException: ClientRuntime.ModeledError, AWSClientRu } } -struct IDPRejectedClaimExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension IDPRejectedClaimExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidAuthorizationMessageException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidAuthorizationMessageException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1940,33 +1408,15 @@ public struct InvalidAuthorizationMessageException: ClientRuntime.ModeledError, } } -struct InvalidAuthorizationMessageExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidAuthorizationMessageExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension InvalidIdentityTokenException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = InvalidIdentityTokenException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -1994,33 +1444,15 @@ public struct InvalidIdentityTokenException: ClientRuntime.ModeledError, AWSClie } } -struct InvalidIdentityTokenExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension InvalidIdentityTokenExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension MalformedPolicyDocumentException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = MalformedPolicyDocumentException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2048,33 +1480,15 @@ public struct MalformedPolicyDocumentException: ClientRuntime.ModeledError, AWSC } } -struct MalformedPolicyDocumentExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension MalformedPolicyDocumentExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - extension PackedPolicyTooLargeException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = PackedPolicyTooLargeException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2102,23 +1516,7 @@ public struct PackedPolicyTooLargeException: ClientRuntime.ModeledError, AWSClie } } -struct PackedPolicyTooLargeExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension PackedPolicyTooLargeExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - -extension STSClientTypes.PolicyDescriptorType: Swift.Codable { +extension STSClientTypes.PolicyDescriptorType: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case arn } @@ -2130,10 +1528,13 @@ extension STSClientTypes.PolicyDescriptorType: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let arnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .arn) - arn = arnDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = STSClientTypes.PolicyDescriptorType() + value.arn = try reader["arn"].readIfPresent() + return value + } } } @@ -2153,7 +1554,7 @@ extension STSClientTypes { } -extension STSClientTypes.ProvidedContext: Swift.Codable { +extension STSClientTypes.ProvidedContext: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case contextAssertion = "ContextAssertion" case providerArn = "ProviderArn" @@ -2169,12 +1570,14 @@ extension STSClientTypes.ProvidedContext: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let providerArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .providerArn) - providerArn = providerArnDecoded - let contextAssertionDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .contextAssertion) - contextAssertion = contextAssertionDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = STSClientTypes.ProvidedContext() + value.providerArn = try reader["ProviderArn"].readIfPresent() + value.contextAssertion = try reader["ContextAssertion"].readIfPresent() + return value + } } } @@ -2199,16 +1602,14 @@ extension STSClientTypes { } extension RegionDisabledException { - public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { - if let data = try await httpResponse.body.readData(), let responseDecoder = decoder { - let output: AWSClientRuntime.ErrorResponseContainer = try responseDecoder.decode(responseBody: data) - self.properties.message = output.error.message - } else { - self.properties.message = nil - } - self.httpResponse = httpResponse - self.requestID = requestID - self.message = message + + static func responseErrorBinding(httpResponse: ClientRuntime.HttpResponse, reader: SmithyXML.Reader, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws -> Swift.Error { + var value = RegionDisabledException() + value.properties.message = try reader["message"].readIfPresent() + value.httpResponse = httpResponse + value.requestID = requestID + value.message = message + return value } } @@ -2236,25 +1637,9 @@ public struct RegionDisabledException: ClientRuntime.ModeledError, AWSClientRunt } } -struct RegionDisabledExceptionBody: Swift.Equatable { - let message: Swift.String? -} - -extension RegionDisabledExceptionBody: Swift.Decodable { - enum CodingKeys: Swift.String, Swift.CodingKey { - case message - } - - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) - message = messageDecoded - } -} - public enum STSClientTypes {} -extension STSClientTypes.Tag: Swift.Codable { +extension STSClientTypes.Tag: Swift.Encodable { enum CodingKeys: Swift.String, Swift.CodingKey { case key = "Key" case value = "Value" @@ -2270,12 +1655,14 @@ extension STSClientTypes.Tag: Swift.Codable { } } - public init(from decoder: Swift.Decoder) throws { - let containerValues = try decoder.container(keyedBy: CodingKeys.self) - let keyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .key) - key = keyDecoded - let valueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .value) - value = valueDecoded + static var readingClosure: SmithyReadWrite.ReadingClosure { + return { reader in + guard reader.content != nil else { return nil } + var value = STSClientTypes.Tag() + value.key = try reader["Key"].readIfPresent() + value.value = try reader["Value"].readIfPresent() + return value + } } } diff --git a/Sources/Services/AWSSageMakerRuntime/models/Models.swift b/Sources/Services/AWSSageMakerRuntime/models/Models.swift index 604e9982f6d..e43bf2834d0 100644 --- a/Sources/Services/AWSSageMakerRuntime/models/Models.swift +++ b/Sources/Services/AWSSageMakerRuntime/models/Models.swift @@ -718,7 +718,7 @@ extension InvokeEndpointWithResponseStreamOutput: ClientRuntime.HttpResponseBind } if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.body = decoderStream.toAsyncStream() } else { self.body = nil diff --git a/Sources/Services/AWSTranscribeStreaming/models/Models.swift b/Sources/Services/AWSTranscribeStreaming/models/Models.swift index 7d74db8e2d2..c7a7384a29c 100644 --- a/Sources/Services/AWSTranscribeStreaming/models/Models.swift +++ b/Sources/Services/AWSTranscribeStreaming/models/Models.swift @@ -2634,7 +2634,7 @@ extension StartCallAnalyticsStreamTranscriptionOutput: ClientRuntime.HttpRespons } if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.callAnalyticsTranscriptResultStream = decoderStream.toAsyncStream() } else { self.callAnalyticsTranscriptResultStream = nil @@ -2908,7 +2908,7 @@ extension StartMedicalStreamTranscriptionOutput: ClientRuntime.HttpResponseBindi } if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.transcriptResultStream = decoderStream.toAsyncStream() } else { self.transcriptResultStream = nil @@ -3303,7 +3303,7 @@ extension StartStreamTranscriptionOutput: ClientRuntime.HttpResponseBinding { } if case let .stream(stream) = httpResponse.body, let responseDecoder = decoder { let messageDecoder = AWSClientRuntime.AWSEventStream.AWSMessageDecoder() - let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, responseDecoder: responseDecoder) + let decoderStream = ClientRuntime.EventStream.DefaultMessageDecoderStream(stream: stream, messageDecoder: messageDecoder, unmarshalClosure: jsonUnmarshalClosure(responseDecoder: responseDecoder)) self.transcriptResultStream = decoderStream.toAsyncStream() } else { self.transcriptResultStream = nil